From 34d12db8353f38d6e875eeb69149c360ae66f3a6 Mon Sep 17 00:00:00 2001 From: Santosh Yadav Date: Tue, 24 Nov 2026 10:36:59 +0100 Subject: [PATCH 1/9] feat(mcp): add a WebMCP inspector that traces what each tool call changed Browser agents call the tools a page registers with `modelContext.registerTool()`, but nothing showed what a call actually did to the app. Only the Forms tab listed the last few calls of a form's tool. Add a `webmcp` inspector. The overlay shares one watcher between the forms and webmcp collectors, keeps a page-wide log of tool calls with masked arguments and results (`limits.webmcpCalls`, default 100), runs `execute` in a forked zone when Zone.js is there, and notes which HTTP requests, NgRx actions, navigations and signal writes started during each call. The server joins them with the other inspectors' data (`webmcp-trace.ts`), marks each effect caused or probably caused, and warns when a tool that claims `readOnlyHint` changed data. Agents read it through `webmcp-tools` and `webmcp-calls`. --- packages/devtools/package.json | 3 +- .../devtools/src/__tests__/config.test.ts | 3 + .../fixtures/agent-metadata-derived.json | 10 +- packages/devtools/src/__tests__/http.test.ts | 26 ++ .../src/__tests__/ngrx-collector.test.ts | 31 ++ .../src/__tests__/router-regressions.test.ts | 25 +- .../src/__tests__/signal-history.test.ts | 26 ++ .../src/__tests__/webmcp-call-log.test.ts | 187 ++++++++ .../src/__tests__/webmcp-collector.test.ts | 58 +++ .../src/__tests__/webmcp-register.test.ts | 95 ++++ .../devtools/src/__tests__/webmcp-testing.ts | 37 ++ .../src/__tests__/webmcp-trace.test.ts | 138 ++++++ packages/devtools/src/config.ts | 15 + packages/devtools/src/devframe-inspectors.ts | 19 + packages/devtools/src/devframe-pages.ts | 2 + packages/devtools/src/devframe.ts | 9 + packages/devtools/src/forms-collector.ts | 7 +- packages/devtools/src/forms-webmcp.ts | 251 +++++++++- packages/devtools/src/http.ts | 4 + packages/devtools/src/ngrx-collector.ts | 32 +- packages/devtools/src/overlay.ts | 9 + packages/devtools/src/router.ts | 10 + packages/devtools/src/rpc/state-read-tool.ts | 1 + packages/devtools/src/rpc/webmcp-register.ts | 433 ++++++++++++++++++ packages/devtools/src/signal-history.ts | 28 +- packages/devtools/src/webmcp-call-context.ts | 82 ++++ packages/devtools/src/webmcp-collector.ts | 105 +++++ packages/devtools/src/webmcp-trace.ts | 314 +++++++++++++ 28 files changed, 1935 insertions(+), 25 deletions(-) create mode 100644 packages/devtools/src/__tests__/webmcp-call-log.test.ts create mode 100644 packages/devtools/src/__tests__/webmcp-collector.test.ts create mode 100644 packages/devtools/src/__tests__/webmcp-register.test.ts create mode 100644 packages/devtools/src/__tests__/webmcp-testing.ts create mode 100644 packages/devtools/src/__tests__/webmcp-trace.test.ts create mode 100644 packages/devtools/src/rpc/webmcp-register.ts create mode 100644 packages/devtools/src/webmcp-call-context.ts create mode 100644 packages/devtools/src/webmcp-collector.ts create mode 100644 packages/devtools/src/webmcp-trace.ts diff --git a/packages/devtools/package.json b/packages/devtools/package.json index 95bc231d..a3205aff 100644 --- a/packages/devtools/package.json +++ b/packages/devtools/package.json @@ -55,7 +55,8 @@ "./internal/config": "./src/config.ts", "./internal/types": "./src/panel-types.ts", "./internal/http-data": "./src/http-data.ts", - "./internal/redaction-count": "./src/redaction-count.ts" + "./internal/redaction-count": "./src/redaction-count.ts", + "./internal/webmcp-trace": "./src/webmcp-trace.ts" }, "publishConfig": { "main": "./dist/devframe.mjs", diff --git a/packages/devtools/src/__tests__/config.test.ts b/packages/devtools/src/__tests__/config.test.ts index 6a024d47..ab018a2e 100644 --- a/packages/devtools/src/__tests__/config.test.ts +++ b/packages/devtools/src/__tests__/config.test.ts @@ -207,6 +207,7 @@ describe('resolvePangularConfig', () => { cdCycles: 200, cdSlowMs: 16, capacitorCalls: 200, + webmcpCalls: 100, idleAfterMs: 60_000, }); expect( @@ -219,6 +220,7 @@ describe('resolvePangularConfig', () => { changeLog: '500', cdCycles: 5, capacitorCalls: 5000, + webmcpCalls: 5, idleAfterMs: -1, }, }).limits, @@ -231,6 +233,7 @@ describe('resolvePangularConfig', () => { cdCycles: 10, cdSlowMs: 16, capacitorCalls: 2000, + webmcpCalls: 10, idleAfterMs: 0, }); expect(resolvePangularConfig({ limits: { refreshMs: 60_000 } }).limits.refreshMs).toBe(8000); diff --git a/packages/devtools/src/__tests__/fixtures/agent-metadata-derived.json b/packages/devtools/src/__tests__/fixtures/agent-metadata-derived.json index 7cb34bb6..1514d7d5 100644 --- a/packages/devtools/src/__tests__/fixtures/agent-metadata-derived.json +++ b/packages/devtools/src/__tests__/fixtures/agent-metadata-derived.json @@ -36,7 +36,6 @@ "inspect-route": "router", "inspect-signals": "signals", "inspect-transfer-state": "http", - "refetch-transfer-state": "http", "lint-forms": "forms", "lint-http": "http", "lint-routes": "router", @@ -74,6 +73,7 @@ "record-guards": "router", "record-pipes": "pipes", "redux-inspect-stores": "ngrx", + "refetch-transfer-state": "http", "remove-http-rule": "http", "remove-ssr-override": "http", "router": "router", @@ -101,7 +101,9 @@ "track-subscriptions": "components", "wait-for": "components", "watch-signal": "signals", - "web-vitals": "performance" + "web-vitals": "performance", + "webmcp-calls": "webmcp", + "webmcp-tools": "webmcp" }, "ACTION_TOOLS": { "forms": ["fill-form", "run-form-action"], @@ -251,7 +253,9 @@ "track-subscriptions", "wait-for", "watch-signal", - "web-vitals" + "web-vitals", + "webmcp-calls", + "webmcp-tools" ], "agentTags": { "analog-explain-render-modes": ["analog"], diff --git a/packages/devtools/src/__tests__/http.test.ts b/packages/devtools/src/__tests__/http.test.ts index aa74b3e4..fa1275f0 100644 --- a/packages/devtools/src/__tests__/http.test.ts +++ b/packages/devtools/src/__tests__/http.test.ts @@ -43,6 +43,7 @@ import { } from '../http-rules.ts'; import { decodePayload, sanitizeHydration, sanitizePayload } from '../http-payload.ts'; import { setRedaction } from '../forms-privacy.ts'; +import { fakeWebMcpCall } from './webmcp-testing.ts'; const rule = (overrides: Partial = {}): HttpRule => ({ id: 'r1', @@ -480,6 +481,31 @@ describe.runIf(angularAtLeast('16.0'))('interceptor', () => { expect(httpRegistry().calls?.[2]).toMatchObject({ mocked: true, preview: '{"a":1}' }); }); + it('ties a request a WebMCP tool call sent to that call, by the id it gets when it ends', async () => { + let finished!: Promise; + const trace = await fakeWebMcpCall(() => { + finished = new Promise((resolve) => { + run(new HttpRequest('GET', '/api/agent'), later({ ok: true })).subscribe({ + complete: resolve, + }); + }); + }); + try { + // The response lands after the tool call returned. + expect(trace.caused()).toBeUndefined(); + await finished; + const [call] = httpRegistry().calls ?? []; + expect(trace.caused()).toEqual([{ layer: 'http', key: call.id }]); + // A request sent outside any call is not tied to one. + await new Promise((resolve) => + run(new HttpRequest('GET', '/api/user'), later({})).subscribe({ complete: resolve }), + ); + expect(trace.caused()).toHaveLength(1); + } finally { + trace.stop(); + } + }); + it('records a request cancelled during a delay rule', () => { vi.useFakeTimers(); storeRules([rule({ status: undefined, delayMs: 1000 })]); diff --git a/packages/devtools/src/__tests__/ngrx-collector.test.ts b/packages/devtools/src/__tests__/ngrx-collector.test.ts index 3ff3df3c..c81b512f 100644 --- a/packages/devtools/src/__tests__/ngrx-collector.test.ts +++ b/packages/devtools/src/__tests__/ngrx-collector.test.ts @@ -14,6 +14,7 @@ import { } from '../ngrx-shared.ts'; import { mergeNgrxReport, nameStore, ngrxStateOf, type NgrxPages } from '../rpc/ngrx-tools.ts'; import { angularAtLeast, STANDALONE } from './angular-version.ts'; +import { fakeWebMcpCall } from './webmcp-testing.ts'; /** * The workspace installs @ngrx 22, which loads on Angular 19.0 and later (it @@ -203,6 +204,22 @@ describe('ngrx collector', () => { expect(entry.durationMs).toBeUndefined(); }); + it('ties a write a WebMCP tool call made to that call, though the entry is logged in a microtask', async () => { + const { store, collector } = setup(); + collector.collect(); + store.setQuery('before'); + const trace = await fakeWebMcpCall(() => patchState(store, { saved: ['x'] })); + try { + await Promise.resolve(); + store.setQuery('after'); + const log = collector.logSince(0); + const entry = log.find((e) => e.type === 'patchState')!; + expect(trace.caused()).toEqual([{ layer: 'ngrx', key: String(entry.seq) }]); + } finally { + trace.stop(); + } + }); + it('keeps a method change out of a patchState entry from earlier in the same tick', async () => { const { store, collector } = setup(); collector.collect(); @@ -1046,6 +1063,20 @@ describe('ngrx collector with a classic store', () => { expect(one).not.toHaveProperty('diffTruncated'); }); + it('ties an action a WebMCP tool call dispatched to that call', async () => { + const { store, collector } = fakeClassic({ n: 0 }, (state, action) => + action.type === 'bump' ? { n: state.n + 1 } : state, + ); + store.dispatch({ type: 'bump' }); + const trace = await fakeWebMcpCall(() => store.dispatch({ type: 'bump' })); + try { + const [, agent] = collector.logSince(0); + expect(trace.caused()).toEqual([{ layer: 'ngrx', key: String(agent.seq) }]); + } finally { + trace.stop(); + } + }); + it('reuses the serialized classic state while the store holds the same object', () => { const { store, collector } = fakeClassic({ n: 0 }, (s, action) => action.type === 'inc' ? { n: s.n + 1 } : s, diff --git a/packages/devtools/src/__tests__/router-regressions.test.ts b/packages/devtools/src/__tests__/router-regressions.test.ts index 777b2ae3..a94d29d5 100644 --- a/packages/devtools/src/__tests__/router-regressions.test.ts +++ b/packages/devtools/src/__tests__/router-regressions.test.ts @@ -1,10 +1,11 @@ // @vitest-environment jsdom import { describe, expect, it } from 'vitest'; -import { EventType, applyRouterEvent, type NavigationRecord } from '../router.ts'; +import { EventType, applyRouterEvent, noteFailedCall, type NavigationRecord } from '../router.ts'; import { configSignature, type RouteNode } from '../router-config.ts'; import { instrument, runAction } from '../router-actions.ts'; import { lintRoutes } from '../rpc/router-config-tools.ts'; import { explainNavigationText, type RouterPage, type RouterState } from '../rpc/router-tools.ts'; +import { fakeWebMcpCall } from './webmcp-testing.ts'; function node(fullPath: string, extra: Partial = {}): RouteNode { const path = extra.path ?? fullPath.split('/').pop() ?? ''; @@ -112,6 +113,28 @@ describe('router events', () => { expect(navigations.map((nav) => nav.trigger)).toEqual(['popstate', 'unknown']); }); + it('ties a navigation a WebMCP tool call started, and a call that failed, to that call', async () => { + const navigations: NavigationRecord[] = []; + const router = { url: '/', routerState: { snapshot: null } }; + const start = (id: number, url: string) => + applyRouterEvent(navigations, { type: EventType.NavigationStart, id, url }, 0, router); + start(1, '/home'); + const trace = await fakeWebMcpCall(() => { + start(2, '/orders'); + noteFailedCall(navigations, '/bad url', new Error('no match'), 0); + }); + try { + start(3, '/later'); + const failed = navigations.find((nav) => nav.id < 0)!; + expect(trace.caused()).toEqual([ + { layer: 'router', key: '2' }, + { layer: 'router', key: String(failed.id) }, + ]); + } finally { + trace.stop(); + } + }); + it('links a guard redirect from a cancel with no code, as Angular 12 to 14 send it', () => { const navigations: NavigationRecord[] = []; const router = { url: '/', routerState: { snapshot: null } }; diff --git a/packages/devtools/src/__tests__/signal-history.test.ts b/packages/devtools/src/__tests__/signal-history.test.ts index aee4e1a2..d6d16c0c 100644 --- a/packages/devtools/src/__tests__/signal-history.test.ts +++ b/packages/devtools/src/__tests__/signal-history.test.ts @@ -10,6 +10,7 @@ import { } from '../signal-history.ts'; import { setRawValue } from '../signal-locator.ts'; import type { SignalGraphNode } from '../types.ts'; +import { fakeWebMcpCall } from './webmcp-testing.ts'; const identity = (v: unknown) => v; @@ -44,6 +45,31 @@ describe('createSignalHistory', () => { expect(out['a'].filter((c) => c.source === 'write')).toHaveLength(2); }); + it('ties a write a WebMCP tool call made to that call, by node id and epoch', async () => { + const h = createSignalHistory(identity); + const count: RawSignalNode = { debugName: 'count', kind: 'signal', value: 0, version: 0 }; + const name: RawSignalNode = { debugName: 'name', kind: 'signal', value: '', version: 0 }; + // `count` is bound to graph node `a` before the call; `name` is not bound yet. + write(h.onWrite, count, 1); + h.collect([graphNode('a', 'count', 1, 1)]); + const trace = await fakeWebMcpCall(() => { + write(h.onWrite, count, 2); + write(h.onWrite, name, 'Ada'); + }); + try { + write(h.onWrite, count, 3); + // The write to a bound node is tied when it is flushed, the other once a snapshot binds it. + const out = h.collect([graphNode('a', 'count', 3, 3), graphNode('b', 'name', 1, 'Ada')]); + expect(out['b'].map((c) => [c.epoch, c.source])).toEqual([[1, 'write']]); + expect(trace.caused()).toEqual([ + { layer: 'signals', key: 'a:2' }, + { layer: 'signals', key: 'b:1' }, + ]); + } finally { + trace.stop(); + } + }); + it('records the first snapshot as initial', () => { const h = createSignalHistory(identity, () => 1); const out = h.collect([graphNode('a', 'count', 0, 0)]); diff --git a/packages/devtools/src/__tests__/webmcp-call-log.test.ts b/packages/devtools/src/__tests__/webmcp-call-log.test.ts new file mode 100644 index 00000000..06184cfd --- /dev/null +++ b/packages/devtools/src/__tests__/webmcp-call-log.test.ts @@ -0,0 +1,187 @@ +// @vitest-environment jsdom +import { afterEach, describe, expect, it, vi } from 'vitest'; +import { + noteWebMcpEffect, + shareWebMcp, + watchWebMcp, + webMcpCallNow, + type WebMcpWatcher, +} from '../forms-webmcp.ts'; + +type Tool = { + name: string; + description: string; + inputSchema?: unknown; + annotations?: Record; + execute: (args: unknown) => unknown; +}; + +const watchers: WebMcpWatcher[] = []; +afterEach(() => { + watchers.splice(0).forEach((w) => w.stop()); + delete (navigator as any).modelContext; + delete (globalThis as any).Zone; +}); + +const tick = () => new Promise((resolve) => setTimeout(resolve, 0)); + +function fakeContext() { + const tools = new Map(); + (navigator as any).modelContext = { + registerTool: vi.fn(async (tool: Tool) => { + tools.set(tool.name, tool); + }), + }; + return tools; +} + +function watch() { + const watcher = watchWebMcp(() => {}); + watchers.push(watcher); + return watcher; +} + +async function register(tool: Tool) { + await (navigator as any).modelContext.registerTool(tool); + await tick(); +} + +describe('the WebMCP call log', () => { + it('keeps masked argument and result values, the annotations and the outcome', async () => { + const tools = fakeContext(); + const watcher = watch(); + await register({ + name: 'login', + description: 'Sign in', + annotations: { readOnlyHint: false }, + execute: async () => ({ content: [{ type: 'text', text: 'ok' }], token: 'abc' }), + }); + await tools.get('login')!.execute({ email: 'a@b.c', password: 'hunter22' }); + await tick(); + const report = watcher.report(); + expect(report.tools[0]).toMatchObject({ name: 'login', annotations: { readOnlyHint: false } }); + const [call] = report.calls; + expect(call).toMatchObject({ tool: 'login', outcome: 'done' }); + expect(call!.args).toEqual({ email: 'a@b.c', password: '[redacted]' }); + expect((call!.result as any).token).toBe('[redacted]'); + expect(typeof call!.ms).toBe('number'); + }); + + it('keeps the newest calls up to the limit and counts the dropped ones', async () => { + const tools = fakeContext(); + const watcher = watch(); + watcher.setMaxCalls(2); + await register({ name: 'ping', description: 'Ping', execute: () => 'pong' }); + for (let i = 0; i < 3; i++) await tools.get('ping')!.execute({ i }); + await tick(); + const report = watcher.report(); + expect(report.calls.map((call) => (call.args as any).i)).toEqual([1, 2]); + expect(report.dropped).toBe(1); + }); + + it('records a call that throws', async () => { + const tools = fakeContext(); + const watcher = watch(); + await register({ + name: 'boom', + description: 'Fails', + execute: () => { + throw new Error('nope'); + }, + }); + expect(() => tools.get('boom')!.execute({})).toThrow('nope'); + expect(watcher.report().calls[0]).toMatchObject({ outcome: 'threw', detail: 'nope' }); + }); + + it('ties effects noted while execute runs to the call, and nothing outside it', async () => { + const tools = fakeContext(); + const watcher = watch(); + let seen: number | undefined; + await register({ + name: 'save', + description: 'Save', + execute: () => { + seen = webMcpCallNow(); + noteWebMcpEffect(seen, 'http', 'c1'); + return 'saved'; + }, + }); + expect(webMcpCallNow()).toBeUndefined(); + await tools.get('save')!.execute({}); + noteWebMcpEffect(undefined, 'http', 'c2'); + await tick(); + expect(seen).toBeTypeOf('number'); + expect(watcher.report().calls[0]!.caused).toEqual([{ layer: 'http', key: 'c1' }]); + }); + + it('runs execute in a forked zone when Zone.js is there, so later work stays tied', async () => { + let current: any = { get: () => undefined }; + const fork = vi.fn((spec: { properties: Record }) => { + const zone = { + get: (key: string) => spec.properties[key], + run: (fn: () => unknown) => { + const previous = current; + current = zone; + try { + return fn(); + } finally { + current = previous; + } + }, + }; + return zone; + }); + (globalThis as any).Zone = { + get current() { + return { ...current, fork }; + }, + }; + const tools = fakeContext(); + const watcher = watch(); + let later: () => void = () => {}; + await register({ + name: 'slow', + description: 'Slow', + execute: () => { + const zone = (globalThis as any).Zone.current; + // Work the zone resumes later still sees the call's zone. + later = () => zone.run(() => noteWebMcpEffect(webMcpCallNow(), 'ngrx', '7')); + return 'ok'; + }, + }); + await tools.get('slow')!.execute({}); + later(); + await tick(); + expect(fork).toHaveBeenCalledOnce(); + expect(watcher.report().calls[0]!.caused).toEqual([{ layer: 'ngrx', key: '7' }]); + }); + + it('marks a call the user was active during', async () => { + const tools = fakeContext(); + const watcher = watch(); + await register({ name: 'ping', description: 'Ping', execute: () => 'pong' }); + await tools.get('ping')!.execute({}); + document.dispatchEvent(new KeyboardEvent('keydown', { bubbles: true })); + await tick(); + expect(watcher.report().calls[0]!.userInput).toBe(true); + }); +}); + +describe('shareWebMcp', () => { + it('replaces registerTool once for every collector and stops with the last one', async () => { + fakeContext(); + const original = (navigator as any).modelContext.registerTool; + const first = vi.fn(); + const second = vi.fn(); + const a = shareWebMcp(first); + const b = shareWebMcp(second); + expect(a.watcher).toBe(b.watcher); + await register({ name: 'x', description: 'X', execute: () => 'x' }); + expect(first).toHaveBeenCalled(); + expect(second).toHaveBeenCalled(); + a.release(); + expect((navigator as any).modelContext.registerTool).not.toBe(original); + b.release(); + expect((navigator as any).modelContext.registerTool).toBe(original); + }); +}); diff --git a/packages/devtools/src/__tests__/webmcp-collector.test.ts b/packages/devtools/src/__tests__/webmcp-collector.test.ts new file mode 100644 index 00000000..d0b52354 --- /dev/null +++ b/packages/devtools/src/__tests__/webmcp-collector.test.ts @@ -0,0 +1,58 @@ +// @vitest-environment jsdom +import { afterEach, describe, expect, it, vi } from 'vitest'; +import { attachWebMcp } from '../webmcp-collector.ts'; + +const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); + +afterEach(() => { + delete (navigator as any).modelContext; +}); + +function fakeContext() { + const tools = new Map(); + (navigator as any).modelContext = { + registerTool: (tool: any) => void tools.set(tool.name, tool), + getTools: () => [...tools.values()].map(({ name, description }) => ({ name, description })), + }; + return tools; +} + +describe('attachWebMcp', () => { + it('reports tools registered before it attached', async () => { + fakeContext(); + (navigator as any).modelContext.registerTool({ + name: 'early', + description: 'd', + execute: () => 1, + }); + const call = vi.fn(async (..._args: unknown[]) => undefined); + const collector = attachWebMcp({ rpc: { call } }, 'p1'); + await wait(150); + expect(call).toHaveBeenCalledWith('push-webmcp', expect.objectContaining({ pageId: 'p1' })); + expect((call.mock.calls[0] as any)[1].tools[0].name).toBe('early'); + collector.stop(); + }); + + it('sends the unchanged report again after it resumes', async () => { + fakeContext(); + (navigator as any).modelContext.registerTool({ name: 'x', description: 'd', execute: () => 1 }); + const call = vi.fn(async (..._args: unknown[]) => undefined); + const collector = attachWebMcp({ rpc: { call } }, 'p1'); + await wait(150); + const pushes = () => call.mock.calls.filter(([name]) => name === 'push-webmcp').length; + expect(pushes()).toBe(1); + collector.leave(); + collector.resume(); + await wait(150); + expect(pushes()).toBe(2); + collector.stop(); + }); + + it('sends nothing for a page without modelContext or tools', async () => { + const call = vi.fn(async (..._args: unknown[]) => undefined); + const collector = attachWebMcp({ rpc: { call } }, 'p1'); + await collector.push(true); + expect(call).not.toHaveBeenCalled(); + collector.stop(); + }); +}); diff --git a/packages/devtools/src/__tests__/webmcp-register.test.ts b/packages/devtools/src/__tests__/webmcp-register.test.ts new file mode 100644 index 00000000..4c5318d1 --- /dev/null +++ b/packages/devtools/src/__tests__/webmcp-register.test.ts @@ -0,0 +1,95 @@ +import { describe, expect, it } from 'vitest'; +import { + toWebMcpPage, + webMcpCallsText, + webMcpToolsText, + type WebMcpState, +} from '../rpc/webmcp-register.ts'; + +const T = 1_000_000; + +function state(): WebMcpState { + const page = toWebMcpPage( + { + pageId: 'p1', + url: 'http://localhost/search?token=abc', + modelContext: true, + tools: [ + { + name: 'search', + description: 'Search flights', + status: 'registered', + seen: 'register', + annotations: { readOnlyHint: true, bogus: { nested: 1 } }, + inputs: ['q: string'], + }, + { name: '' }, + ], + calls: [ + { + id: 1, + tool: 'search', + at: T, + ms: 50, + outcome: 'done', + args: { q: 'paris', apiKey: 'k' }, + caused: [ + { layer: 'http', key: 'c1' }, + { layer: 'nope', key: 'x' }, + ], + }, + { id: 'bad', tool: 'search', at: T }, + ], + dropped: 3, + }, + T, + )!; + return { pages: { p1: page } }; +} + +describe('toWebMcpPage', () => { + it('keeps valid tools and calls, drops the rest, and masks values again', () => { + const page = state().pages['p1']!; + expect(page.tools.map((tool) => tool.name)).toEqual(['search']); + expect(page.tools[0]!.annotations).toEqual({ readOnlyHint: true }); + expect(page.calls).toHaveLength(1); + expect(page.calls[0]!.caused).toEqual([{ layer: 'http', key: 'c1' }]); + expect(page.calls[0]!.args).toEqual({ q: 'paris', apiKey: '[redacted]' }); + expect(page.dropped).toBe(3); + }); + + it('refuses a report without a page id', () => { + expect(toWebMcpPage({ tools: [] })).toBeNull(); + }); +}); + +describe('the WebMCP agent tool answers', () => { + it('lists the tools with the annotations the page claims', () => { + const text = webMcpToolsText(state()); + expect(text).toContain('`search`'); + expect(text).toContain('readOnlyHint: true'); + expect(text).toContain('Search flights'); + }); + + it('lists calls with their effects and warns about a read-only tool that wrote', () => { + const sources = { + http: { + pages: [ + { + pageId: 'p1', + calls: [{ id: 'c1', method: 'POST', url: '/api/log', at: T + 5, status: 201 }], + }, + ], + }, + }; + const text = webMcpCallsText(state(), sources, {}, T + 10_000); + expect(text).toContain('#1: done in 50 ms'); + expect(text).toContain('POST /api/log (201), caused, changes data'); + expect(text).toContain('**Warning:**'); + expect(text).toContain('3 older calls were dropped'); + }); + + it('says when no page reports WebMCP', () => { + expect(webMcpCallsText({ pages: {} }, {})).toContain('No page reports WebMCP tools'); + }); +}); diff --git a/packages/devtools/src/__tests__/webmcp-testing.ts b/packages/devtools/src/__tests__/webmcp-testing.ts new file mode 100644 index 00000000..4c2043f8 --- /dev/null +++ b/packages/devtools/src/__tests__/webmcp-testing.ts @@ -0,0 +1,37 @@ +import { watchWebMcp, type WebMcpWatcher } from '../forms-webmcp.ts'; + +type Tool = { name: string; execute: (args: unknown) => Promise }; + +/** + * A fake `navigator.modelContext` with a watcher on it. `call(run)` registers + * a tool whose `execute` runs `run`, and calls it through the watcher's + * wrapper, so an effect `run` starts belongs to a WebMCP call. + */ +export async function fakeWebMcpCall(run: () => unknown) { + const tools = new Map(); + (navigator as any).modelContext = { + registerTool: async (tool: Tool) => { + tools.set(tool.name, tool); + }, + }; + const watcher: WebMcpWatcher = watchWebMcp(() => {}); + await (navigator as any).modelContext.registerTool({ + name: 'agent_tool', + description: '', + inputSchema: { type: 'object', properties: {} }, + execute: async () => { + await run(); + return { content: [] }; + }, + }); + await tools.get('agent_tool')!.execute({}); + return { + watcher, + /** The `caused` list of the call. */ + caused: () => watcher.report().calls[0]?.caused, + stop() { + watcher.stop(); + delete (navigator as any).modelContext; + }, + }; +} diff --git a/packages/devtools/src/__tests__/webmcp-trace.test.ts b/packages/devtools/src/__tests__/webmcp-trace.test.ts new file mode 100644 index 00000000..bc5b1311 --- /dev/null +++ b/packages/devtools/src/__tests__/webmcp-trace.test.ts @@ -0,0 +1,138 @@ +import { describe, expect, it } from 'vitest'; +import { traceCall, type WebMcpCallEntry, type WebMcpPageTool } from '../webmcp-trace.ts'; + +const T = 1_000_000; +const readOnly: WebMcpPageTool = { + name: 'search', + description: 'Search', + status: 'registered', + seen: 'register', + annotations: { readOnlyHint: true }, +}; + +function call(over: Partial = {}): WebMcpCallEntry { + return { id: 1, tool: 'search', at: T, ms: 100, outcome: 'done', ...over }; +} + +const sources = { + http: { + pages: [ + { + pageId: 'p1', + calls: [ + { id: 'c1', method: 'GET', url: 'http://x/api/search?q=a', at: T + 10, status: 200 }, + { id: 'c2', method: 'POST', url: '/api/log', at: T + 400, status: 201 }, + { id: 'c3', method: 'POST', url: '/api/late', at: T + 6000, status: 201 }, + { id: 'c4', method: 'GET', url: '/before', at: T - 10 }, + ], + }, + { pageId: 'p2', calls: [{ id: 'o1', method: 'DELETE', url: '/x', at: T + 10 }] }, + ], + }, + ngrx: { + pages: [{ pageId: 'p1', log: [{ seq: 3, type: '[Search] Done', timestamp: T + 2000 }] }], + }, + router: { + pages: [ + { + pageId: 'p1', + navigations: [ + { id: 1, url: '/a', startedAt: T - 5000, outcome: 'succeeded' }, + { id: 2, url: '/a?q=1', startedAt: T + 20, outcome: 'succeeded' }, + ], + }, + ], + }, + forms: { + events: [ + { formId: 'f@p1', seq: 4, type: 'value', path: 'q', timestamp: T + 1, origin: 'agent' }, + { formId: 'f@p2', seq: 5, type: 'value', path: 'q', timestamp: T + 1, origin: 'agent' }, + ], + }, + signals: { + pages: { + p1: { + nodes: [ + { id: 'n1', label: 'results', kind: 'signal' }, + { id: 'n2', label: 'status', kind: 'signal', framework: true }, + ], + history: { + n1: [ + { epoch: 1, at: T - 100, source: 'initial' }, + { epoch: 2, at: T + 50, source: 'write' }, + ], + n2: [{ epoch: 9, at: T + 60, source: 'write' }], + }, + }, + }, + }, +}; + +describe('traceCall', () => { + it('lists effects in the call window for its page only, with what each changes', () => { + const trace = traceCall(call(), 'p1', sources, { now: T + 10_000 }); + const keys = trace.effects.map((e) => `${e.layer}:${e.key}:${e.certainty}:${e.change}`); + expect(keys).toEqual([ + 'forms:f@p1:4:caused:write', + 'http:c1:during:none', + // A navigation that only changes the query string does not count as a change. + 'router:2:during:none', + 'signals:n1:2:during:signal', + 'signals:n2:9:during:signal', + 'http:c2:during:write', + ]); + }); + + it('keeps effects a collector tied to the call past the window, up to 5 s', () => { + const trace = traceCall( + call({ + caused: [ + { layer: 'ngrx', key: '3' }, + { layer: 'http', key: 'c3' }, + ], + }), + 'p1', + sources, + { now: T + 10_000 }, + ); + const caused = trace.effects.filter((e) => e.certainty === 'caused').map((e) => e.key); + expect(caused).toContain('3'); + expect(caused).not.toContain('c3'); + }); + + it('leaves out untied effects when the user was active', () => { + const trace = traceCall(call({ userInput: true }), 'p1', sources, { now: T + 10_000 }); + expect(trace.userInput).toBe(true); + expect(trace.effects.map((e) => e.key)).toEqual(['f@p1:4']); + }); + + it('warns when a read-only tool changed data, and notes app signal writes alone', () => { + expect(traceCall(call(), 'p1', sources, { tool: readOnly }).verdict).toBe('warning'); + const signalsOnly = { signals: sources.signals }; + expect(traceCall(call(), 'p1', signalsOnly, { tool: readOnly }).verdict).toBe('info'); + const angularOnly = { + signals: { + pages: { + p1: { + nodes: [{ id: 'n2', label: 'status', kind: 'signal', framework: true }], + history: { n2: [{ epoch: 9, at: T + 60, source: 'write' }] }, + }, + }, + }, + }; + expect(traceCall(call(), 'p1', angularOnly, { tool: readOnly }).verdict).toBeUndefined(); + // A tool that does not claim to only read gets no verdict. + expect(traceCall(call(), 'p1', sources, {}).verdict).toBeUndefined(); + }); + + it('uses the time now as the end of a call that still runs', () => { + const running = call({ ms: undefined, outcome: 'running' }); + const late = { + http: { pages: [{ pageId: 'p1', calls: [{ id: 'c9', method: 'POST', at: T + 800 }] }] }, + }; + expect(traceCall(running, 'p1', late, { now: T + 5 }).effects).toEqual([]); + expect(traceCall(running, 'p1', late, { now: T + 400 }).effects.map((e) => e.key)).toEqual([ + 'c9', + ]); + }); +}); diff --git a/packages/devtools/src/config.ts b/packages/devtools/src/config.ts index 35c506f6..c59f3681 100644 --- a/packages/devtools/src/config.ts +++ b/packages/devtools/src/config.ts @@ -11,6 +11,7 @@ export const PANGULAR_INSPECTORS = [ 'analog', 'capacitor', 'errors', + 'webmcp', 'plugins', 'performance', 'build', @@ -64,6 +65,7 @@ export const PANGULAR_LIMITS = { cdCycles: { default: 200, min: 10, max: 2000 }, cdSlowMs: { default: 16, min: 1, max: 1000 }, capacitorCalls: { default: 200, min: 10, max: 2000 }, + webmcpCalls: { default: 100, min: 10, max: 1000 }, idleAfterMs: { default: 60_000, min: 0, max: 600_000 }, } as const; @@ -240,6 +242,8 @@ export interface PangularConfig { cdSlowMs?: number; /** Capacitor plugin calls kept per page and on the server. Default 200. */ capacitorCalls?: number; + /** WebMCP tool calls kept per page. Default 100. */ + webmcpCalls?: number; /** * How long, in ms, pages keep sending the component tree, injectors, * change detection and forms after an agent's last call when no panel is @@ -455,6 +459,7 @@ export const PANEL_TABS = [ { id: 'errors', label: 'Errors', inspector: 'errors' }, { id: 'performance', label: 'Performance', inspector: 'performance' }, { id: 'build', label: 'Build', inspector: 'build' }, + { id: 'webmcp', label: 'WebMCP', inspector: 'webmcp' }, { id: 'capacitor', label: 'Capacitor', inspector: 'capacitor' }, { id: 'plugins', label: 'Plugins', inspector: 'plugins' }, ] as const satisfies readonly { id: string; label: string; inspector?: PangularInspector }[]; @@ -485,6 +490,7 @@ export const PANEL_LINK_ITEMS: Partial> = { injectors: "a component's element injector, by the component's id", signals: "a component's signal graph, by the component's id", forms: 'a form, by its id', + webmcp: 'a WebMCP tool call, by its id', }; /** Where a deep link into the panel points: a tab, and an item on one page. */ @@ -1530,6 +1536,10 @@ export const AGENT_ENTRIES: Readonly> = { // Reads the build output on disk, so it works without a page. 'chunk-sizes': { kind: 'tool', inspectors: ['build'] }, + // webmcp + 'webmcp-tools': { kind: 'tool', inspectors: ['webmcp'], page: true }, + 'webmcp-calls': { kind: 'tool', inspectors: ['webmcp'], page: true }, + // plugins 'list-plugins': { kind: 'tool', inspectors: ['plugins'], page: true }, 'inspect-plugin': { kind: 'tool', inspectors: ['plugins'], page: true }, @@ -1774,6 +1784,8 @@ export const RPC_INSPECTOR: Record = { 'push-performance': 'performance', 'forget-performance-page': 'performance', 'get-build-graph': 'build', + 'push-webmcp': 'webmcp', + 'forget-webmcp-page': 'webmcp', 'push-analog': 'analog', 'forget-analog-page': 'analog', 'analog-clear-calls': 'analog', @@ -1837,6 +1849,7 @@ export const SHARED_STATE_INSPECTOR: Record = { errors: 'errors', 'server-errors': 'errors', performance: 'performance', + webmcp: 'webmcp', startup: 'injectors', plugins: 'plugins', }; @@ -2087,6 +2100,7 @@ const INSPECTOR_LABEL: Record = { analog: 'Analog', capacitor: 'Capacitor', errors: 'Errors', + webmcp: 'WebMCP', plugins: 'Plugins', performance: 'Performance', build: 'Build', @@ -2112,6 +2126,7 @@ const LIMIT_LABEL: Record string> = { cdCycles: (value) => `${value} change detection cycles`, cdSlowMs: (value) => `slow cycles over ${value} ms`, capacitorCalls: (value) => `${value} Capacitor plugin calls`, + webmcpCalls: (value) => `${value} WebMCP tool calls`, idleAfterMs: (value) => value ? `idle ${value / 1000} s after the last agent call` : 'never idle', }; diff --git a/packages/devtools/src/devframe-inspectors.ts b/packages/devtools/src/devframe-inspectors.ts index e6a76d61..cdecf2f3 100644 --- a/packages/devtools/src/devframe-inspectors.ts +++ b/packages/devtools/src/devframe-inspectors.ts @@ -17,6 +17,8 @@ import { registerReduxStores } from './rpc/redux-stores-register.ts'; import { registerServerErrors } from './rpc/server-errors-register.ts'; import { registerStartup } from './rpc/startup-register.ts'; import { registerBuild } from './rpc/build-register.ts'; +import { registerWebMcp } from './rpc/webmcp-register.ts'; +import type { WebMcpTraceSources } from './webmcp-trace.ts'; import { guardHandler } from './rpc/tool-input.ts'; import type { AgentRegistrar, @@ -44,6 +46,8 @@ export interface InspectorsEnv { /** When a page last beat (`rpc/page-heartbeats.ts`). */ seenAt: (pageId: string) => number | undefined; serverPlugins: readonly PangularServerPlugin[] | undefined; + /** The shared states the WebMCP call trace joins; read only when an agent asks. */ + webMcpSources: () => WebMcpTraceSources; } /** Errors, performance, build, leaks, startup, Ionic, plugins, Redux stores and TanStack Query. */ @@ -63,6 +67,7 @@ export async function registerInspectors(env: InspectorsEnv) { pageTools, seenAt, serverPlugins, + webMcpSources, } = env; const on = config.inspectors; const limits = config.limits; @@ -93,6 +98,19 @@ export async function registerInspectors(env: InspectorsEnv) { }) : null; if (on.build) registerBuild({ register, agent, root: ctx.cwd }); + // The WebMCP trace joins what the HTTP, NgRx, router, forms and signals collectors report. + const webMcpInspector = on.webmcp + ? await registerWebMcp({ + my, + rpcHost: ctx.rpc, + register, + agent, + owns, + mayForget, + ttl: liveTtl, + sources: webMcpSources, + }) + : null; const leaksInspector = on.components ? await registerLeaks({ my, @@ -184,6 +202,7 @@ export async function registerInspectors(env: InspectorsEnv) { perfInspector, leaksInspector, startupInspector, + webMcpInspector, ionicInspector, pluginsInspector, reduxStores, diff --git a/packages/devtools/src/devframe-pages.ts b/packages/devtools/src/devframe-pages.ts index 446554c0..c506a97b 100644 --- a/packages/devtools/src/devframe-pages.ts +++ b/packages/devtools/src/devframe-pages.ts @@ -308,6 +308,7 @@ export function createPageDirectory(env: PageDirectoryEnv) { tanstackQuery, errorsInspector, startupInspector, + webMcpInspector, ionicInspector, pluginsInspector, } = env.inspectors; @@ -385,6 +386,7 @@ export function createPageDirectory(env: PageDirectoryEnv) { capacitor: withUrl(capacitorPages.values()), errors: withUrl(errorsInspector?.pages() ?? []), startup: withUrl(startupInspector?.pages() ?? []), + webmcp: withUrl(webMcpInspector?.pages() ?? []), ionic: withUrl(ionicInspector?.pages() ?? []), plugins: withUrl(pluginsInspector?.pages() ?? []), analog: withUrl(on.analog ? analogPages() : []), diff --git a/packages/devtools/src/devframe.ts b/packages/devtools/src/devframe.ts index d7016f0a..14cae044 100644 --- a/packages/devtools/src/devframe.ts +++ b/packages/devtools/src/devframe.ts @@ -228,6 +228,14 @@ const pangular = defineDevframe({ pageTools, seenAt: heartbeats.seenAt, serverPlugins: info?.serverPlugins, + // Called only when an agent asks, after every state below exists. + webMcpSources: () => ({ + ...(on.http ? { http: http.httpState.value() } : {}), + ...(on.ngrx ? { ngrx: ngrxStoreState.value() } : {}), + ...(on.router ? { router: router.routerState.value() } : {}), + ...(on.forms ? { forms: formsState.value() } : {}), + ...(on.signals ? { signals: signalGraphState.value() } : {}), + }), }); const { errorsInspector, leaksInspector } = inspectors; @@ -301,6 +309,7 @@ const pangular = defineDevframe({ inspectors.reduxStores?.expire(now); inspectors.tanstackQuery?.expire(now); inspectors.startupInspector?.expire(now); + inspectors.webMcpInspector?.expire(now); inspectors.ionicInspector?.expire(now); inspectors.pluginsInspector?.expire(now); components.componentDeltas.prune((id) => componentPages.has(id)); diff --git a/packages/devtools/src/forms-collector.ts b/packages/devtools/src/forms-collector.ts index 059d715c..801d7c33 100644 --- a/packages/devtools/src/forms-collector.ts +++ b/packages/devtools/src/forms-collector.ts @@ -47,7 +47,7 @@ import { signalSubmitBlockers, wrapSubmitAction, } from './forms-submit.ts'; -import { watchWebMcp } from './forms-webmcp.ts'; +import { shareWebMcp } from './forms-webmcp.ts'; import { FORMLESS_FORM_ACTIONS } from './config.ts'; import { tapConsole } from './console-tap.ts'; import { createDeltaChannel } from './delta-channel.ts'; @@ -267,7 +267,8 @@ export function attachForms( const pendingStarted = new Map(); let cancelPick: (() => void) | null = null; const ownerNames = new Set(); - const webMcp = watchWebMcp(() => schedulePush()); + const sharedWebMcp = shareWebMcp(() => schedulePush()); + const webMcp = sharedWebMcp.watcher; const originNow = (formId: string): EventOrigin => isDevtoolsAction() @@ -1010,7 +1011,7 @@ export function attachForms( }, stop() { observer?.disconnect(); - webMcp.stop(); + sharedWebMcp.release(); probeEveryTime(false); clearTimeout(pushTimer); clearTimeout(sendTimer); diff --git a/packages/devtools/src/forms-webmcp.ts b/packages/devtools/src/forms-webmcp.ts index c4b19e84..d2b0afd8 100644 --- a/packages/devtools/src/forms-webmcp.ts +++ b/packages/devtools/src/forms-webmcp.ts @@ -1,14 +1,29 @@ import { redactFormText } from './forms.ts'; -import { redactText, serialize } from './serialize.ts'; +import { TRUNCATED, redactText, serialize } from './serialize.ts'; import { childPath } from './forms-path.ts'; import { tokenName, type DebugNg } from './injector-tree.ts'; +import { + WEBMCP_GRACE_MS, + type WebMcpCallEntry, + type WebMcpEffectKey, + type WebMcpOutcome, + type WebMcpPageTool, +} from './webmcp-trace.ts'; +import { + WEBMCP_ZONE_KEY, + enterWebMcpCall, + trackWebMcpCall, + untrackWebMcpCall, +} from './webmcp-call-context.ts'; + +export { noteWebMcpEffect, webMcpCallNow } from './webmcp-call-context.ts'; /** Longest a tried WebMCP tool may take to answer. */ export const RUN_TIMEOUT_MS = 10_000; type AnyRecord = Record; -export type WebMcpOutcome = 'running' | 'submitted' | 'failed' | 'done' | 'threw'; +export type { WebMcpOutcome }; export interface WebMcpCall { at: number; @@ -73,6 +88,15 @@ export interface WebMcpWatcher { forms: WebMcpForm[], ng?: DebugNg, ): { forms: Map; page?: WebMcpPage }; + /** Every tool and the page-wide call log, for the `webmcp` collector. */ + report(): { + modelContext: boolean; + tools: WebMcpPageTool[]; + calls: WebMcpCallEntry[]; + dropped: number; + }; + /** How many calls the page-wide log keeps (`limits.webmcpCalls`). */ + setMaxCalls(max: number): void; stop(): void; } @@ -84,11 +108,72 @@ interface ToolRecord { error?: string; schema?: AnyRecord; shape?: string; + annotations?: Record; + registeredAt?: number; + /** The form `describe` linked it to. */ + formId?: string; calls: (WebMcpCall & { started: number })[]; /** Calls the tool: the wrapped `execute`, or the browser's testing API for a listed tool. */ execute?: (args: unknown) => unknown; } +/** A call in the page-wide log; values are masked when it is reported. */ +interface LogEntry { + id: number; + record: ToolRecord; + at: number; + started: number; + ms?: number; + outcome: WebMcpOutcome; + args?: unknown; + result?: unknown; + detail?: string; + caused: WebMcpEffectKey[]; + /** Started from the panel's Try this tool, not by an agent. */ + tried?: boolean; +} + +const DEFAULT_MAX_LOG = 100; +/** About 4 KB of JSON per value. */ +const MAX_VALUE_CHARS = 4096; +const VALUE_LIMITS = { depth: 6, keys: 50, items: 50, text: 1000, budget: 400 }; +const MAX_INPUTS = 50; +let nextCallId = 0; + +function zoneApi(): AnyRecord | undefined { + return read(() => (globalThis as AnyRecord)['Zone'] as AnyRecord | undefined, undefined); +} + +/** A value as it may leave the page: masked, and cut to about 4 KB. */ +function captureValue(value: unknown): unknown { + if (value === undefined) return undefined; + const safe = read(() => serialize(value, VALUE_LIMITS), TRUNCATED); + const text = read(() => JSON.stringify(safe) ?? '', ''); + return text.length > MAX_VALUE_CHARS ? `${text.slice(0, MAX_VALUE_CHARS)}… ${TRUNCATED}` : safe; +} + +/** `value` with a form's masked field values hidden too. */ +function maskForForm(value: unknown, formId: string | undefined): unknown { + if (value === undefined || !formId) return value; + if (typeof value === 'string') return redactFormText(formId, value); + return read(() => { + const text = JSON.stringify(value); + const masked = redactFormText(formId, text); + return masked === text ? value : JSON.parse(masked); + }, '[Unreadable]'); +} + +function annotationsOf(tool: AnyRecord): Record | undefined { + const value = read(() => tool['annotations'], undefined); + if (!value || typeof value !== 'object') return undefined; + const out: Record = {}; + for (const [key, hint] of Object.entries(value).slice(0, 20)) { + if (typeof hint === 'boolean' || typeof hint === 'number') out[key.slice(0, 60)] = hint; + else if (typeof hint === 'string') out[key.slice(0, 60)] = redactText(hint.slice(0, 200)); + } + return Object.keys(out).length ? out : undefined; +} + interface Shape { schema?: AnyRecord; blocking: { path: string; reason: string }[]; @@ -267,6 +352,24 @@ function messageOf(error: unknown): string { return String((error as Error)?.message ?? error ?? 'error').slice(0, 300); } +/** + * Runs a tool's `execute` in a zone forked from the current one when the app + * uses Zone.js, so work it starts later (after an `await`, in a timer) is + * still tied to the call. The fork only adds a property; everything else + * goes to the parent zone as before. + */ +function inCallZone(id: number, run: () => T): T { + const zone = read( + () => + zoneApi()?.['current']?.fork?.({ + name: 'pangular-webmcp-call', + properties: { [WEBMCP_ZONE_KEY]: id }, + }) as AnyRecord | undefined, + undefined, + ); + return zone && typeof zone['run'] === 'function' ? (zone['run'](run) as T) : run(); +} + export function watchWebMcp(onChange: () => void): WebMcpWatcher { const records: ToolRecord[] = []; const links = new WeakMap(); @@ -287,6 +390,29 @@ export function watchWebMcp(onChange: () => void): WebMcpWatcher { let restore: (() => void) | null = null; // True while `run` calls a tool, so the call is marked as tried and not counted as the agent's. let trying = false; + const log: LogEntry[] = []; + let maxLog = DEFAULT_MAX_LOG; + let dropped = 0; + // When the user last pressed a key or the pointer, so a call's time window can leave them out. + const inputs: number[] = []; + const onInput = () => { + inputs.push(Date.now()); + if (inputs.length > MAX_INPUTS) inputs.shift(); + }; + const INPUT_EVENTS = ['pointerdown', 'keydown'] as const; + if (typeof addEventListener === 'function') { + for (const type of INPUT_EVENTS) { + addEventListener(type, onInput, { capture: true, passive: true }); + } + } + + const trimLog = () => { + while (log.length > maxLog) { + const old = log.shift()!; + untrackWebMcpCall(old.id); + dropped++; + } + }; const add = (record: ToolRecord) => { records.push(record); @@ -317,12 +443,30 @@ export function watchWebMcp(onChange: () => void): WebMcpWatcher { wrote.add(record); ran.add(record); } + const entry: LogEntry = { + id: ++nextCallId, + record, + at: call.at, + started: call.started, + outcome: 'running', + args: captureValue(args), + caused: [], + ...(tried ? { tried } : {}), + }; + log.push(entry); + trackWebMcpCall(entry); + trimLog(); const previous = current; current = record; - const settle = (outcome: WebMcpOutcome, detail?: string) => { + const previousEntry = enterWebMcpCall(entry); + const settle = (outcome: WebMcpOutcome, detail?: string, value?: unknown) => { call.outcome = outcome; call.ms = Math.round(performance.now() - call.started); if (detail) call.detail = detail.slice(0, 300); + entry.outcome = outcome; + entry.ms = call.ms; + if (detail) entry.detail = redactText(detail.slice(0, 300)); + if (value !== undefined) entry.result = captureValue(value); if (!tried) { const left = (running.get(record) ?? 1) - 1; if (left > 0) running.set(record, left); @@ -332,19 +476,26 @@ export function watchWebMcp(onChange: () => void): WebMcpWatcher { }; let out: unknown; try { - out = execute.call(this, args, ...rest); + out = inCallZone(entry.id, () => execute.call(this, args, ...rest)); } catch (error) { settle('threw', messageOf(error)); throw error; } finally { current = previous; + enterWebMcpCall(previousEntry); } Promise.resolve(out).then( (value) => { const text = resultText(value); if (text.startsWith('Form submission failed')) { - settle('failed', text.replace(/^Form submission failed:\n?/, '')); - } else settle(text.startsWith('Form submitted successfully') ? 'submitted' : 'done'); + settle('failed', text.replace(/^Form submission failed:\n?/, ''), value); + } else { + settle( + text.startsWith('Form submitted successfully') ? 'submitted' : 'done', + '', + value, + ); + } }, (error) => settle('threw', messageOf(error)), ); @@ -365,6 +516,8 @@ export function watchWebMcp(onChange: () => void): WebMcpWatcher { status: 'registering', seen: 'register', schema: parseSchema(read(() => tool['inputSchema'], undefined)), + annotations: annotationsOf(tool), + registeredAt: Date.now(), calls: [], }); record.shape = record.schema && shapeKey(record.schema); @@ -419,6 +572,7 @@ export function watchWebMcp(onChange: () => void): WebMcpWatcher { seen: 'list', schema, shape: schema && shapeKey(schema), + annotations: annotationsOf(tool), calls: [], execute: testingExecute(name), }); @@ -620,6 +774,7 @@ export function watchWebMcp(onChange: () => void): WebMcpWatcher { taken.add(blocked[0]); } const unlinked: WebMcpTool[] = []; + for (const record of records) record.formId = owner.get(record)?.formId; for (const record of records) { const form = owner.get(record); if (form) out.set(form.root, toTool(record, form, shapes.get(form))); @@ -630,11 +785,95 @@ export function watchWebMcp(onChange: () => void): WebMcpWatcher { page: { modelContext: !!context, provided, tools: unlinked.slice(0, MAX_LIST) }, }; }, + report() { + lookUp(); + const now = Date.now(); + const tools: WebMcpPageTool[] = records.slice(0, MAX_LIST).map((record) => { + const redact = (text: string) => + record.formId ? redactFormText(record.formId, text) : redactText(text); + const schema = record.schema; + return { + name: record.name, + description: redact(record.description), + status: record.status, + seen: record.seen, + ...(record.error ? { error: redact(record.error) } : {}), + ...(record.annotations ? { annotations: record.annotations } : {}), + ...(schema ? { inputs: schemaInputs(schema), required: schemaRequired(schema) } : {}), + ...(record.formId ? { formId: record.formId } : {}), + ...(records.filter((r) => r.name === record.name).length > 1 ? { duplicate: true } : {}), + ...(record.registeredAt ? { registeredAt: record.registeredAt } : {}), + }; + }); + const calls: WebMcpCallEntry[] = log.map((entry) => { + const formId = entry.record.formId; + const end = entry.at + (entry.ms ?? now - entry.at) + WEBMCP_GRACE_MS; + const userInput = inputs.some((at) => at >= entry.at && at <= end); + return { + id: entry.id, + tool: entry.record.name, + at: entry.at, + ...(entry.ms !== undefined ? { ms: entry.ms } : {}), + outcome: entry.outcome, + ...(entry.args !== undefined ? { args: maskForForm(entry.args, formId) } : {}), + ...(entry.result !== undefined ? { result: maskForForm(entry.result, formId) } : {}), + ...(entry.detail + ? { detail: formId ? redactFormText(formId, entry.detail) : entry.detail } + : {}), + ...(userInput ? { userInput: true } : {}), + ...(entry.caused.length ? { caused: entry.caused.slice() } : {}), + ...(formId ? { formId } : {}), + ...(entry.tried ? { tried: true } : {}), + }; + }); + return { modelContext: !!context, tools, calls, dropped }; + }, + setMaxCalls(max) { + maxLog = Math.max(1, Math.floor(max)); + trimLog(); + }, stop() { restore?.(); restore = null; + for (const entry of log) untrackWebMcpCall(entry.id); if (typeof removeEventListener === 'function') { removeEventListener('unhandledrejection', onRejection); + for (const type of INPUT_EVENTS) removeEventListener(type, onInput, { capture: true }); + } + }, + }; +} + +let shared: { watcher: WebMcpWatcher; listeners: Set<() => void> } | null = null; + +/** + * The one watcher of the page, shared by the forms and `webmcp` collectors: + * `registerTool` is replaced once, and each collector hears every change. + * The watcher stops when the last one releases it. + */ +export function shareWebMcp(listener: () => void): { + watcher: WebMcpWatcher; + release(): void; +} { + if (!shared) { + const listeners = new Set<() => void>(); + const watcher = watchWebMcp(() => { + for (const run of [...listeners]) run(); + }); + shared = { watcher, listeners }; + } + const own = shared; + own.listeners.add(listener); + let released = false; + return { + watcher: own.watcher, + release() { + if (released) return; + released = true; + own.listeners.delete(listener); + if (!own.listeners.size && shared === own) { + own.watcher.stop(); + shared = null; } }, }; diff --git a/packages/devtools/src/http.ts b/packages/devtools/src/http.ts index 4407f760..afc24ef2 100644 --- a/packages/devtools/src/http.ts +++ b/packages/devtools/src/http.ts @@ -64,6 +64,7 @@ import { tapConsole } from './console-tap.ts'; export * from './http-rules.ts'; import { redirectOf } from './http-redirect.ts'; import { claimTransferEntry, mockContentType, parseBody } from './http-internals.ts'; +import { noteWebMcpEffect, webMcpCallNow } from './webmcp-call-context.ts'; export { decodePayload, type PayloadEntry, type PayloadSummary } from './http-payload.ts'; declare const ngDevMode: unknown; @@ -172,6 +173,8 @@ export const pangularHttpInterceptor: HttpInterceptorFn = (req, next) => { const rules = side === 'client' ? clientRules() : registry.record && registry.rules; const rule = matchRule(url, req.method, rules, side); const started = Date.now(); + // The WebMCP tool call that sent this request, if any. + const webMcpCall = webMcpCallNow(); const delay = Math.min(Math.max(rule?.delayMs ?? 0, 0), MAX_DELAY_MS); const status = rule ? ruleStatus(rule) : undefined; const mocked = status !== undefined; @@ -202,6 +205,7 @@ export const pangularHttpInterceptor: HttpInterceptorFn = (req, next) => { }; // Only references: the headers are read when the call is reported. captureHeaders(call, req.headers, responseHeaders); + noteWebMcpEffect(webMcpCall, 'http', call.id); recordHttpCall(call); }; diff --git a/packages/devtools/src/ngrx-collector.ts b/packages/devtools/src/ngrx-collector.ts index 87f10b21..576907af 100644 --- a/packages/devtools/src/ngrx-collector.ts +++ b/packages/devtools/src/ngrx-collector.ts @@ -34,6 +34,10 @@ 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'; +import { noteWebMcpEffect, webMcpCallNow } from './webmcp-call-context.ts'; + +/** The WebMCP tool call that dispatched a classic action, kept until the action is logged. */ +const webMcpActions = new WeakMap(); /** * Angular's `untracked` (16.0+), read at runtime: a named import of it fails @@ -89,6 +93,8 @@ interface Tracked { writable: boolean; depth: number; pendingBefore: Record | null; + /** The WebMCP tool call that made the write `pendingBefore` waits to log. */ + pendingWebMcpCall?: number; lastNoop: Map; undo: (() => void)[]; /** @@ -494,8 +500,11 @@ export function createNgrxCollector( /** With `ngrx.trace`: where the event flowing through `Dispatcher.dispatch()` was dispatched. */ let currentEventTrace: string[] | undefined; - const append = (entry: Omit, keep: Saved) => { + const append = (entry: Omit, keep: Saved, webMcpCall?: number) => { const full = { ...entry, seq: ++seq }; + // A change logged later (a microtask, the actions stream) passes the call it started in. + const callId = webMcpCall ?? webMcpCallNow(); + if (callId !== undefined) noteWebMcpEffect(callId, 'ngrx', String(full.seq)); log.push(full); count(full); saved.set(full.seq, keep); @@ -547,6 +556,7 @@ export function createNgrxCollector( durationMs?: number, method?: unknown, trace?: string[], + webMcpCall?: number, ) => { const after = snapshot(t); const changes = snapshotDiff(before, after, t.stateKeys); @@ -594,6 +604,7 @@ export function createNgrxCollector( ...withTrace(trace), }, { kind: 'signal', tracked: t, before, after }, + webMcpCall, ); }; @@ -612,12 +623,11 @@ export function createNgrxCollector( t.pendingBefore = snapshot(t); // Under onWrite: the wrapped set or update. t.pendingTrace = traceNow(2); + t.pendingWebMcpCall = webMcpCallNow(); queueMicrotaskOutside(() => { const before = t.pendingBefore; - const trace = t.pendingTrace; t.pendingBefore = null; - t.pendingTrace = undefined; - if (before) finish(t, 'patchState', undefined, before, false, undefined, undefined, trace); + if (before) finishPending(t, before); }); }; @@ -629,10 +639,17 @@ export function createNgrxCollector( const flushPending = (t: Tracked) => { const before = t.pendingBefore; if (!before) return; - const trace = t.pendingTrace; t.pendingBefore = null; + finishPending(t, before); + }; + + /** Logs the writes `pendingBefore` held, with their stack and the WebMCP call that made them. */ + const finishPending = (t: Tracked, before: Snapshot) => { + const trace = t.pendingTrace; + const webMcpCall = t.pendingWebMcpCall; t.pendingTrace = undefined; - finish(t, 'patchState', undefined, before, false, undefined, undefined, trace); + t.pendingWebMcpCall = undefined; + finish(t, 'patchState', undefined, before, false, undefined, undefined, trace, webMcpCall); }; /** @@ -1135,6 +1152,7 @@ export function createNgrxCollector( ...withTrace(trace), }, { kind: 'classic', action, before, after: raw }, + action && typeof action === 'object' ? webMcpActions.get(action) : undefined, ); }; @@ -1196,6 +1214,8 @@ export function createNgrxCollector( const tag = (action: unknown, origin: NgrxActionOrigin) => { if (!active || !action || typeof action !== 'object') return; origins.set(action, origin); + const webMcpCall = webMcpCallNow(); + if (webMcpCall !== undefined) webMcpActions.set(action, webMcpCall); // Under tag and the wrapped dispatch or next. const trace = traceNow(2); if (trace) traces.set(action, trace); diff --git a/packages/devtools/src/overlay.ts b/packages/devtools/src/overlay.ts index cd2e17a2..a90fd913 100644 --- a/packages/devtools/src/overlay.ts +++ b/packages/devtools/src/overlay.ts @@ -13,6 +13,7 @@ export { lanDevtoolsURL } from './lan-url.ts'; import { attachAnalog } from './analog-runtime.ts'; import { attachForms } from './forms-collector.ts'; import { attachPipes } from './pipes-collector.ts'; +import { attachWebMcp } from './webmcp-collector.ts'; import { attachHttp } from './http-overlay.ts'; import { watchNativeFetch } from './fetch-collector.ts'; import { attachCapacitor } from './capacitor-overlay.ts'; @@ -559,6 +560,7 @@ async function startOverlay( forms?.push(true), leaks?.push(true), plugins?.push(true), + webmcp?.push(true), errors?.push(), ]), }); @@ -580,6 +582,9 @@ async function startOverlay( ) : null; const pipes = on.pipes ? attachPipes(my, pageId, getNg) : null; + const webmcp = on.webmcp + ? attachWebMcp(my, pageId, { maxCalls: limits.webmcpCalls, tickMs }) + : null; const http = on.http ? attachHttp(my, pageId, tickMs) : null; if (http) own(http.stop); // The page's own fetch() calls, next to the HttpClient ones (no-op when providePangularHttp did it). @@ -860,6 +865,7 @@ async function startOverlay( queries && (() => void queries.push()), forms && paced(() => void forms.sync()), pipes?.push, + webmcp && (() => void webmcp.push().catch(() => {})), on.router && (() => void pushRouter()), http && (() => void http.push().catch(() => {})), cd && paced(() => void cd.push().catch(() => {})), @@ -1193,6 +1199,7 @@ async function startOverlay( forget('router', 'forget-router-page'); lastRouterPayload = ''; forget('pipes', 'forget-pipes-page'); + webmcp?.leave(); treeChannel.resync(); forget('components', 'forget-component-page'); lastSignalKey = ''; @@ -1222,6 +1229,7 @@ async function startOverlay( heartbeat.lost(); sentGeneration = -1; pipes?.resume(); + webmcp?.resume(); capacitor?.resume(); errors?.resume(); leaks?.resume(); @@ -1264,6 +1272,7 @@ async function startOverlay( leave(); forms?.stop(); pipes?.stop(); + webmcp?.stop(); capacitor?.stop(); ngrx?.stop(); otherStores?.stop(); diff --git a/packages/devtools/src/router.ts b/packages/devtools/src/router.ts index e0e89671..f8e2884c 100644 --- a/packages/devtools/src/router.ts +++ b/packages/devtools/src/router.ts @@ -6,6 +6,7 @@ import { clip } from './text.ts'; import { matchedRoutesOf } from './router-matched.ts'; import { navigationFromQuery, redirectFromQuery } from './router-open-redirect.ts'; import { trackOf } from './router-track.ts'; +import { noteWebMcpEffect, webMcpCallNow } from './webmcp-call-context.ts'; import type { RouteGuards, ActiveRoute, @@ -124,6 +125,12 @@ export function setCaller(text: string, sticky = false, router?: object | null) } /** The config generation the next navigations of `router` are stamped with. */ +/** Ties a navigation that starts now to the WebMCP tool call running, if any. */ +function noteWebMcpNavigation(id: number) { + const call = webMcpCallNow(); + if (call !== undefined) noteWebMcpEffect(call, 'router', String(id)); +} + export function setGeneration(generation: number, router?: object | null) { trackOf(router).generation = generation; } @@ -858,6 +865,7 @@ export function noteFailedCall( caller: track.caller?.text, generation: track.generation, }); + noteWebMcpNavigation(-track.failedCalls); trimNavigations(navigations, navigationLimit); } @@ -984,6 +992,7 @@ export function applyRouterEvent( if (found) nav.queryRedirect = found; } navigations.push(nav); + noteWebMcpNavigation(nav.id); return true; } if (type === EventType.RouteConfigLoadStart) { @@ -1036,6 +1045,7 @@ export function applyRouterEvent( nav.caller = track.caller.text; track.caller = null; navigations.push(nav); + noteWebMcpNavigation(nav.id); } const nav = navigations.find((n) => n.id === id); if (!nav) return false; diff --git a/packages/devtools/src/rpc/state-read-tool.ts b/packages/devtools/src/rpc/state-read-tool.ts index 065399b6..d9695038 100644 --- a/packages/devtools/src/rpc/state-read-tool.ts +++ b/packages/devtools/src/rpc/state-read-tool.ts @@ -38,6 +38,7 @@ export const STATE_READ_BY: Readonly> = { 'pangular:capacitor': 'pangular:capacitor-list-calls', 'pangular:analog': 'pangular:analog-list-server-calls', 'pangular:errors': 'pangular:list-errors', + 'pangular:webmcp': 'pangular:webmcp-calls', 'pangular:startup': 'pangular:startup-timing', 'pangular:plugins': 'pangular:list-plugins', 'pangular:audit': 'pangular:audit', diff --git a/packages/devtools/src/rpc/webmcp-register.ts b/packages/devtools/src/rpc/webmcp-register.ts new file mode 100644 index 00000000..503f8c7a --- /dev/null +++ b/packages/devtools/src/rpc/webmcp-register.ts @@ -0,0 +1,433 @@ +import { createSharedState } from 'devframe/utils/shared-state'; +import { redactMessage, redactUrl } from '../router.ts'; +import { serialize } from '../serialize.ts'; +import { + claimsReadOnly, + traceCall, + type WebMcpCallEntry, + type WebMcpEffect, + type WebMcpEffectKey, + type WebMcpEffectLayer, + type WebMcpOutcome, + type WebMcpPageTool, + type WebMcpReport, + type WebMcpTraceSources, +} from '../webmcp-trace.ts'; +import { defaultPage } from './default-page.ts'; +import { code, untrusted } from './forms-tools.ts'; +import { trackPageSessions } from './page-sessions.ts'; +import type { PageTtl } from './page-ttl.ts'; +import { PAGE_ARGUMENT, byRecency, pageArgument, unknownPageText } from './pages.ts'; + +type AnyRecord = Record; + +export interface WebMcpPage extends WebMcpReport { + reportedAt: number; +} + +/** The `webmcp` shared state. */ +export interface WebMcpState { + pages: Record; +} + +const OUTCOMES: readonly WebMcpOutcome[] = ['running', 'submitted', 'failed', 'done', 'threw']; +const LAYERS: readonly WebMcpEffectLayer[] = ['http', 'ngrx', 'router', 'forms', 'signals']; +const STATUSES: readonly WebMcpPageTool['status'][] = ['registering', 'registered', 'failed']; +const SEEN: readonly WebMcpPageTool['seen'][] = ['register', 'list', 'error']; +const MAX_TOOLS = 40; +const MAX_CALLS = 1000; +const MAX_LINES = 50; +const VALUE_LIMITS = { depth: 6, keys: 50, items: 50, text: 1000, budget: 400 }; + +function record(value: unknown): AnyRecord { + return value && typeof value === 'object' && !Array.isArray(value) ? (value as AnyRecord) : {}; +} + +function text(value: unknown, max: number): string | undefined { + return typeof value === 'string' && value ? redactMessage(value.slice(0, max)) : undefined; +} + +function finite(value: unknown): value is number { + return typeof value === 'number' && Number.isFinite(value); +} + +function strings(value: unknown, max: number): string[] | undefined { + if (!Array.isArray(value)) return undefined; + const out = value + .filter((item): item is string => typeof item === 'string') + .slice(0, max) + .map((item) => item.slice(0, 300)); + return out.length ? out : undefined; +} + +function annotations(value: unknown): Record | undefined { + const out: Record = {}; + for (const [key, hint] of Object.entries(record(value)).slice(0, 20)) { + if (typeof hint === 'boolean' || finite(hint)) out[key.slice(0, 60)] = hint; + else if (typeof hint === 'string') out[key.slice(0, 60)] = redactMessage(hint.slice(0, 200)); + } + return Object.keys(out).length ? out : undefined; +} + +function toTool(value: unknown): WebMcpPageTool | null { + const tool = record(value); + const name = text(tool['name'], 200); + if (!name) return null; + const notes = annotations(tool['annotations']); + const inputs = strings(tool['inputs'], 40); + const required = strings(tool['required'], 40); + const error = text(tool['error'], 300); + const formId = text(tool['formId'], 200); + return { + name, + description: text(tool['description'], 500) ?? '', + status: STATUSES.includes(tool['status']) ? tool['status'] : 'registered', + seen: SEEN.includes(tool['seen']) ? tool['seen'] : 'register', + ...(error ? { error } : {}), + ...(notes ? { annotations: notes } : {}), + ...(inputs ? { inputs } : {}), + ...(required ? { required } : {}), + ...(formId ? { formId } : {}), + ...(tool['duplicate'] === true ? { duplicate: true } : {}), + ...(finite(tool['registeredAt']) ? { registeredAt: tool['registeredAt'] } : {}), + }; +} + +function toCall(value: unknown): WebMcpCallEntry | null { + const call = record(value); + const tool = text(call['tool'], 200); + if (!tool || !finite(call['id']) || !finite(call['at'])) return null; + const caused: WebMcpEffectKey[] = (Array.isArray(call['caused']) ? call['caused'] : []) + .slice(0, 100) + .flatMap((item: unknown) => { + const effect = record(item); + return LAYERS.includes(effect['layer']) && typeof effect['key'] === 'string' + ? [{ layer: effect['layer'] as WebMcpEffectLayer, key: effect['key'].slice(0, 300) }] + : []; + }); + const detail = text(call['detail'], 300); + const formId = text(call['formId'], 200); + // The page masks values already; the server masks again with its own secret names. + return { + id: call['id'], + tool, + at: call['at'], + ...(finite(call['ms']) && call['ms'] >= 0 ? { ms: call['ms'] } : {}), + outcome: OUTCOMES.includes(call['outcome']) ? call['outcome'] : 'done', + ...(call['args'] !== undefined ? { args: serialize(call['args'], VALUE_LIMITS) } : {}), + ...(call['result'] !== undefined ? { result: serialize(call['result'], VALUE_LIMITS) } : {}), + ...(detail ? { detail } : {}), + ...(call['userInput'] === true ? { userInput: true } : {}), + ...(caused.length ? { caused } : {}), + ...(formId ? { formId } : {}), + ...(call['tried'] === true ? { tried: true } : {}), + }; +} + +/** Reads a `push-webmcp` report; `null` when it is not one. */ +export function toWebMcpPage(message: unknown, now = Date.now()): WebMcpPage | null { + const report = record(message); + const pageId = report['pageId']; + if (typeof pageId !== 'string' || !pageId || pageId.length >= 50) return null; + const tools = (Array.isArray(report['tools']) ? report['tools'] : []) + .slice(0, MAX_TOOLS) + .flatMap((tool: unknown) => toTool(tool) ?? []); + const calls = (Array.isArray(report['calls']) ? report['calls'] : []) + .slice(-MAX_CALLS) + .flatMap((call: unknown) => toCall(call) ?? []); + const url = typeof report['url'] === 'string' ? redactUrl(report['url'].slice(0, 2000)) : ''; + const title = text(report['title'], 200); + return { + pageId, + ...(url ? { url } : {}), + ...(title ? { title } : {}), + modelContext: report['modelContext'] === true, + tools, + calls, + ...(finite(report['dropped']) && report['dropped'] > 0 ? { dropped: report['dropped'] } : {}), + reportedAt: now, + }; +} + +function json(value: unknown, max = 600): string { + let out: string; + try { + out = typeof value === 'string' ? value : (JSON.stringify(value) ?? ''); + } catch { + out = String(value); + } + return out.length > max ? `${out.slice(0, max - 1)}…` : out; +} + +function cell(value: string): string { + return value.replace(/\|/g, '\\|').replace(/\n/g, ' '); +} + +function pickPage( + state: WebMcpState, + page: string | undefined, +): { page?: WebMcpPage; text?: string; others: WebMcpPage[] } { + const pages = byRecency(Object.values(state.pages)); + if (!pages.length) { + return { + text: 'No page reports WebMCP tools. Open the app with the overlay loaded in a browser that has `document.modelContext` (or a WebMCP polyfill), and register a tool with `registerTool()` or Angular Signal Forms (`provideExperimentalWebMcpForms()`).', + others: [], + }; + } + const chosen = page ? pages.find((p) => p.pageId === page) : defaultPage(pages); + if (!chosen) return { text: unknownPageText(page!, pages, 'WebMCP tools'), others: [] }; + return { page: chosen, others: page ? [] : pages.filter((p) => p !== chosen) }; +} + +function otherPages(others: WebMcpPage[]): string[] { + return others.length + ? [ + '', + `Other pages report WebMCP too: ${others.map((p) => code(p.pageId)).join(', ')}. Pass one as \`page\`.`, + ] + : []; +} + +function hints(tool: WebMcpPageTool): string { + const entries = Object.entries(tool.annotations ?? {}); + return entries.length ? entries.map(([key, value]) => `${key}: ${String(value)}`).join(', ') : ''; +} + +/** The `webmcp-tools` answer. */ +export function webMcpToolsText(state: WebMcpState, args: { page?: string } = {}): string { + const { page, text: empty, others } = pickPage(state, args.page); + if (!page) return empty!; + const lines = [ + `WebMCP tools of page ${code(page.pageId)}${page.url ? ` (${code(page.url)})` : ''}. ${ + page.modelContext + ? 'The page has `modelContext`.' + : 'The page has no `modelContext`, so a browser agent sees none of these tools.' + } Annotations are what the page claims; a tool without \`readOnlyHint: true\` may change data.`, + ]; + if (!page.tools.length) { + lines.push('', 'No tool is registered right now.'); + } else { + lines.push( + '', + '| Tool | Status | Annotations | Form | Inputs |', + '| --- | --- | --- | --- | --- |', + ); + for (const tool of page.tools) { + const status = `${tool.status}${tool.duplicate ? ', duplicate name' : ''}${tool.error ? `: ${tool.error}` : ''}`; + lines.push( + `| ${code(tool.name)} | ${cell(status)} | ${cell(hints(tool)) || '—'} | ${tool.formId ? code(tool.formId) : '—'} | ${cell((tool.inputs ?? []).join(', ')) || '—'} |`, + ); + } + lines.push('', '### Descriptions', ''); + for (const tool of page.tools) { + lines.push(`- ${code(tool.name)}: ${tool.description || '(no description)'}`); + } + } + lines.push(...otherPages(others)); + // Names, descriptions and annotations come from the page. + return untrusted(lines.join('\n')); +} + +export interface WebMcpCallsArgs { + page?: string; + tool?: string; + limit?: unknown; +} + +function effectLine(effect: WebMcpEffect): string { + const certainty = effect.certainty === 'caused' ? 'caused' : 'probably caused'; + const change = + effect.change === 'write' + ? ', changes data' + : effect.change === 'signal' + ? effect.framework + ? ', Angular signal' + : ', app signal' + : ''; + return ` - ${effect.layer}: ${effect.title}${effect.detail ? ` (${effect.detail})` : ''}, ${certainty}${change}`; +} + +/** The `webmcp-calls` answer: calls newest first, each with its trace. */ +export function webMcpCallsText( + state: WebMcpState, + sources: WebMcpTraceSources, + args: WebMcpCallsArgs = {}, + now = Date.now(), +): string { + const { page, text: empty, others } = pickPage(state, args.page); + if (!page) return empty!; + const limit = finite(args.limit) ? Math.max(1, Math.min(MAX_LINES, Math.round(args.limit))) : 10; + const calls = page.calls + .filter((call) => !args.tool || call.tool === args.tool) + .slice() + .reverse() + .slice(0, limit); + const lines = [ + `WebMCP tool calls of page ${code(page.pageId)}, newest first. Values are masked. An effect is *caused* when a collector saw it start while the call ran (or in its Zone.js zone), and *probably caused* when it started between the call's start and its end plus 500 ms with no user input. Signal writes are seen only for the component the Signals tab inspects.`, + ]; + if (!calls.length) { + lines.push( + '', + args.tool ? `No call of ${code(args.tool)} is recorded.` : 'No tool has been called yet.', + ); + } + for (const call of calls) { + const tool = page.tools.find((t) => t.name === call.tool); + const trace = traceCall(call, page.pageId, sources, { tool, now }); + const when = new Date(call.at).toISOString(); + lines.push( + '', + `### ${code(call.tool)} #${call.id}: ${call.outcome}${finite(call.ms) ? ` in ${call.ms} ms` : ''}${call.tried ? ' (tried from the panel)' : ''}`, + '', + `- At: ${when}${call.formId ? `, form ${code(call.formId)}` : ''}`, + ); + if (call.args !== undefined) lines.push(`- Arguments: \`${cell(json(call.args))}\``); + if (call.result !== undefined) lines.push(`- Result: \`${cell(json(call.result))}\``); + if (call.detail) lines.push(`- Detail: ${call.detail}`); + if (trace.verdict === 'warning') { + lines.push( + `- **Warning:** the tool claims \`readOnlyHint\`, but this call changed data outside signals.`, + ); + } else if (trace.verdict === 'info') { + lines.push(`- Note: the tool claims \`readOnlyHint\` and this call wrote app signals.`); + } else if (!claimsReadOnly(tool) && tool) { + lines.push('- The tool does not claim `readOnlyHint`.'); + } + if (trace.userInput) { + lines.push('- The user was active during the call, so only caused effects are listed.'); + } + if (trace.effects.length) { + lines.push('- Effects:'); + for (const effect of trace.effects) lines.push(effectLine(effect)); + } else { + lines.push('- No effects seen.'); + } + } + if (page.dropped) { + lines.push( + '', + `_${page.dropped} older calls were dropped at the limit. Raise \`limits.webmcpCalls\` in the Pangular Inspector configuration to keep more._`, + ); + } + lines.push(...otherPages(others)); + // Tool names, values and effect titles come from the page. + return untrusted(lines.join('\n')); +} + +interface Scoped { + rpc: { sharedState(name: string, options: AnyRecord): Promise }; +} + +export interface WebMcpHost { + my: Scoped; + rpcHost: unknown; + register(definition: AnyRecord): void; + agent: { registerTool(tool: AnyRecord): void }; + owns(pageId: unknown): pageId is string; + mayForget(pageId: unknown): pageId is string; + ttl: PageTtl; + /** The shared states the trace joins: HTTP, NgRx, router, forms and signals. */ + sources(): WebMcpTraceSources; +} + +export interface WebMcpRegistration { + pages(): { pageId: string; reportedAt: number; url?: string; title?: string }[]; + expire(now?: number): void; +} + +/** + * The `webmcp` inspector on the server: the `webmcp` shared state, the + * `push-webmcp` and `forget-webmcp-page` RPC functions and the `webmcp-tools` + * and `webmcp-calls` agent tools. + */ +export async function registerWebMcp(host: WebMcpHost): Promise { + const shared = await host.my.rpc.sharedState('webmcp', { + sharedState: createSharedState({ + initialValue: { pages: {} }, + enablePatches: true, + }), + }); + const state = () => shared['value']() as WebMcpState; + const drop = (pageIds: readonly string[]) => { + const present = pageIds.filter((id) => state().pages[id]); + if (!present.length) return; + shared['mutate']((draft: WebMcpState) => { + for (const id of present) delete draft.pages[id]; + }); + }; + const sessions = trackPageSessions(host.rpcHost, drop); + + host.register({ + name: 'push-webmcp', + type: 'action', + jsonSerializable: true, + handler: (message: unknown) => { + const page = toWebMcpPage(message); + if (!page || !host.owns(page.pageId)) return; + sessions.bind(page.pageId); + shared['mutate']((draft: WebMcpState) => { + draft.pages[page.pageId] = page; + }); + }, + }); + + host.register({ + name: 'forget-webmcp-page', + type: 'action', + jsonSerializable: true, + handler: (pageId: unknown) => { + if (!host.mayForget(pageId)) return; + sessions.unbind(pageId); + drop([pageId]); + }, + }); + + host.agent.registerTool({ + id: 'pangular:webmcp-tools', + title: 'List WebMCP tools', + description: + 'The WebMCP tools the page registered with `modelContext.registerTool()` (Signal Forms tools included): name, description, status, the annotations the page claims (`readOnlyHint`), inputs and the form each belongs to. Only reads.', + inputSchema: { type: 'object', properties: { page: PAGE_ARGUMENT } }, + handler: async (args: AnyRecord) => ({ + markdown: webMcpToolsText(state(), { page: pageArgument(args) }), + }), + }); + + host.agent.registerTool({ + id: 'pangular:webmcp-calls', + title: 'List WebMCP tool calls', + description: + "Calls of the page's WebMCP tools, newest first: masked arguments and result, outcome, and the HTTP requests, NgRx actions, navigations, form changes and signal writes each caused or probably caused. Warns when a `readOnlyHint` tool changed data. Filter by `tool`. Only reads.", + inputSchema: { + type: 'object', + properties: { + page: PAGE_ARGUMENT, + tool: { type: 'string', description: 'Only calls of this tool.' }, + limit: { type: 'integer', description: 'How many calls to list (1-50, default 10).' }, + }, + }, + handler: async (args: AnyRecord) => ({ + markdown: webMcpCallsText(state(), host.sources(), { + page: pageArgument(args), + tool: typeof args?.['tool'] === 'string' ? args['tool'] : undefined, + limit: args?.['limit'], + }), + }), + }); + + return { + pages: () => + Object.values(state().pages).map((page) => ({ + pageId: page.pageId, + reportedAt: page.reportedAt, + url: page.url, + title: page.title, + })), + expire: (now = Date.now()) => + drop( + Object.values(state().pages) + .filter((page) => now - page.reportedAt > host.ttl(page.pageId)) + .map((page) => page.pageId), + ), + }; +} diff --git a/packages/devtools/src/signal-history.ts b/packages/devtools/src/signal-history.ts index 57bd671d..e3cfa41f 100644 --- a/packages/devtools/src/signal-history.ts +++ b/packages/devtools/src/signal-history.ts @@ -2,6 +2,7 @@ import { queueMicrotaskOutside } from './outside-angular.ts'; import { isLocatedNode, rawValueOf } from './signal-locator.ts'; import { appFrames, captureStack } from './signal-stack.ts'; import type { SignalChange, SignalGraphNode } from './types.ts'; +import { noteWebMcpEffect, webMcpCallNow } from './webmcp-call-context.ts'; export const MAX_CHANGES = 50; const MAX_TRACKS = 500; @@ -34,7 +35,7 @@ interface Track { kind: string; changes: SignalChange[]; /** Writes since the last flush, serialized off Angular's set path. */ - pending: { epoch: number; value: unknown; at: number; stack?: string }[]; + pending: { epoch: number; value: unknown; at: number; stack?: string; webMcpCall?: number }[]; } export interface SignalHistoryOptions { @@ -86,6 +87,8 @@ export function createSignalHistory( const sent = new Map(); // Lives as long as the entry is kept, so it shares the history caps. const raws = new WeakMap(); + /** The WebMCP tool call that made a write, until the write's graph node is known. */ + const webMcpWrites = new WeakMap(); const located = options.located ?? isLocatedNode; /** Nodes the last snapshot gave a locator, whose entries keep raw values. */ const restorable = new Set(); @@ -99,7 +102,8 @@ export function createSignalHistory( for (const track of dirty) { const node = options.restorable ? track.ref.deref() : undefined; const keepWrites = !!node && located(node); - for (const { stack, ...write } of track.pending) { + const nodeId = nodeOfTrack.get(track.id); + for (const { stack, webMcpCall, ...write } of track.pending) { let change: SignalChange; try { change = { ...write, value: serialize(write.value, track.label), source: 'write' }; @@ -110,7 +114,12 @@ export function createSignalHistory( if (frames.length) change.stack = frames; if (keepWrites) raws.set(change, { value: write.value, label: track.label }); append(track.changes, change); - notify(nodeOfTrack.get(track.id), track.label, change, { value: write.value }); + if (webMcpCall !== undefined) { + // The key needs the graph node id; a track not bound yet waits for `collect`. + if (nodeId === undefined) webMcpWrites.set(change, webMcpCall); + else noteWebMcpEffect(webMcpCall, 'signals', `${nodeId}:${change.epoch}`); + } + notify(nodeId, track.label, change, { value: write.value }); } track.pending = []; } @@ -177,12 +186,16 @@ export function createSignalHistory( // Angular's set path, and a burst of writes serializes only the entries the list keeps. // Taking a stack is the costly part, so it happens only while stacks are on. const stack = options.stacks?.() ? captureStack() : undefined; - track.pending.push({ + const write: Track['pending'][number] = { epoch: node.version ?? 0, value: node.value, at: now(), ...(stack ? { stack } : {}), - }); + }; + // The WebMCP tool call this write belongs to, read at the write: the flush runs later. + const webMcpCall = webMcpCallNow(); + if (webMcpCall !== undefined) write.webMcpCall = webMcpCall; + track.pending.push(write); if (track.pending.length > MAX_CHANGES) track.pending.shift(); dirty.add(track); if (!flushQueued) { @@ -254,6 +267,11 @@ export function createSignalHistory( if (change.epoch > node.epoch) break; if (change.epoch <= lastEpoch) continue; append(list, change); + const webMcpCall = webMcpWrites.get(change); + if (webMcpCall !== undefined) { + webMcpWrites.delete(change); + noteWebMcpEffect(webMcpCall, 'signals', `${node.id}:${change.epoch}`); + } total += lastEpoch >= 0 ? change.epoch - lastEpoch : 1; lastEpoch = change.epoch; } diff --git a/packages/devtools/src/webmcp-call-context.ts b/packages/devtools/src/webmcp-call-context.ts new file mode 100644 index 00000000..f253b868 --- /dev/null +++ b/packages/devtools/src/webmcp-call-context.ts @@ -0,0 +1,82 @@ +import { + WEBMCP_CAUSED_AFTER_MS, + type WebMcpEffectKey, + type WebMcpEffectLayer, +} from './webmcp-trace.ts'; + +/** + * Which WebMCP tool call is running right now, for collectors that tie the + * effects they see to it (`webMcpCallNow`, `noteWebMcpEffect`). It imports + * nothing heavy, so the HTTP interceptor entry can use it. + */ + +/** What the context needs of a call in the watcher's log. */ +export interface CallContextEntry { + id: number; + /** `performance.now()` at the start. */ + started: number; + ms?: number; + caused: WebMcpEffectKey[]; +} + +/** The Zone.js property that names the call a forked zone belongs to. */ +export const WEBMCP_ZONE_KEY = 'pangularWebMcpCall'; +const MAX_CAUSED = 100; + +let active: CallContextEntry | null = null; +/** Calls still in a watcher's log, by id, so a zone property finds its call. */ +const live = new Map(); + +/** Marks `entry` as the call whose `execute` runs synchronously now; returns the one before. */ +export function enterWebMcpCall(entry: CallContextEntry | null): CallContextEntry | null { + const previous = active; + active = entry; + return previous; +} + +export function trackWebMcpCall(entry: CallContextEntry): void { + live.set(entry.id, entry); +} + +export function untrackWebMcpCall(id: number): void { + live.delete(id); +} + +function zoneCallId(): unknown { + try { + const zone = (globalThis as Record)['Zone']; + return zone?.current?.get?.(WEBMCP_ZONE_KEY); + } catch { + return undefined; + } +} + +/** + * The id of the WebMCP tool call running now, synchronously or in its zone. + * A collector keeps it from the start of an effect it reports later. + */ +export function webMcpCallNow(): number | undefined { + if (active) return active.id; + const id = zoneCallId(); + if (typeof id !== 'number') return undefined; + const entry = live.get(id); + if (!entry) return undefined; + // A timer the call left behind stops counting as its own after a while. + const now = performance.now(); + const end = entry.started + (entry.ms ?? now - entry.started); + return now - end <= WEBMCP_CAUSED_AFTER_MS ? entry.id : undefined; +} + +/** Ties an effect a collector reports to the call `callId` (from `webMcpCallNow`). */ +export function noteWebMcpEffect( + callId: number | undefined, + layer: WebMcpEffectLayer, + key: string, +): void { + if (callId === undefined) return; + const entry = live.get(callId); + if (!entry || entry.caused.length >= MAX_CAUSED) return; + if (!entry.caused.some((effect) => effect.layer === layer && effect.key === key)) { + entry.caused.push({ layer, key }); + } +} diff --git a/packages/devtools/src/webmcp-collector.ts b/packages/devtools/src/webmcp-collector.ts new file mode 100644 index 00000000..d51b6f43 --- /dev/null +++ b/packages/devtools/src/webmcp-collector.ts @@ -0,0 +1,105 @@ +import { keepaliveDue } from './change-detection.ts'; +import { shareWebMcp } from './forms-webmcp.ts'; +import { redactMessage, redactUrl } from './router.ts'; +import type { WebMcpReport } from './webmcp-trace.ts'; + +interface Rpc { + rpc: { call(name: string, ...args: unknown[]): Promise }; +} + +export interface WebMcpCollector { + push(force?: boolean): Promise; + leave(): void; + resume(): void; + stop(): void; +} + +export interface WebMcpCollectorOptions { + /** The page-wide call log size, `limits.webmcpCalls`. */ + maxCalls?: number; + tickMs?: () => number; + now?: () => number; +} + +/** Changes arrive in bursts (register, call, settle); one push covers each burst. */ +const PUSH_DELAY_MS = 100; + +/** + * The `webmcp` inspector's collector: every tool the app registers with + * `modelContext.registerTool()` and the page-wide log of their calls, sent as + * `push-webmcp`. It shares the watcher with the forms collector, so + * `registerTool` is replaced once. A page without `modelContext` and without + * tools sends nothing. + */ +export function attachWebMcp( + my: Rpc, + pageId: string, + options: WebMcpCollectorOptions = {}, +): WebMcpCollector { + const tickMs = options.tickMs ?? (() => 0); + const now = options.now ?? Date.now; + let lastJson = ''; + let sentAt = 0; + let left = false; + let stopped = false; + let timer: ReturnType | undefined; + + const schedule = () => { + if (stopped || left || timer) return; + timer = setTimeout(() => { + timer = undefined; + void push().catch(() => {}); + }, PUSH_DELAY_MS); + }; + const shared = shareWebMcp(schedule); + if (options.maxCalls) shared.watcher.setMaxCalls(options.maxCalls); + + const push = async (force = false) => { + if (stopped || left) return; + const state = shared.watcher.report(); + if (!state.modelContext && !state.tools.length && !state.calls.length) return; + const report: WebMcpReport = { + pageId, + ...(typeof location === 'undefined' ? {} : { url: redactUrl(location.href) }), + ...(typeof document === 'undefined' ? {} : { title: redactMessage(document.title) }), + modelContext: state.modelContext, + tools: state.tools, + calls: state.calls, + ...(state.dropped ? { dropped: state.dropped } : {}), + }; + const json = JSON.stringify(report); + if (!force && json === lastJson && !keepaliveDue(sentAt, tickMs(), now())) return; + lastJson = json; + sentAt = now(); + try { + await my.rpc.call('push-webmcp', report); + } catch (error) { + lastJson = ''; + throw error; + } + }; + + return { + push, + leave() { + if (left) return; + left = true; + lastJson = ''; + clearTimeout(timer); + timer = undefined; + void my.rpc.call('forget-webmcp-page', pageId).catch(() => {}); + }, + resume() { + left = false; + lastJson = ''; + // The server may have lost this page (a restart, a back-forward cache restore): send it again. + schedule(); + }, + stop() { + stopped = true; + clearTimeout(timer); + timer = undefined; + shared.release(); + }, + }; +} diff --git a/packages/devtools/src/webmcp-trace.ts b/packages/devtools/src/webmcp-trace.ts new file mode 100644 index 00000000..f2baa4eb --- /dev/null +++ b/packages/devtools/src/webmcp-trace.ts @@ -0,0 +1,314 @@ +/** + * The WebMCP call trace: the shapes the `webmcp` collector reports, and the + * pure join that links one tool call to what happened on the page around it. + * The server's agent tools and the panel's WebMCP tab both run `traceCall`, + * so they always agree. Nothing here touches the page. + */ + +export type WebMcpOutcome = 'running' | 'submitted' | 'failed' | 'done' | 'threw'; + +/** The layers a call's effects come from; each matches a Timeline lane. */ +export type WebMcpEffectLayer = 'http' | 'ngrx' | 'router' | 'forms' | 'signals'; + +/** One effect a collector saw start while a tool call ran (synchronously or in its zone). */ +export interface WebMcpEffectKey { + layer: WebMcpEffectLayer; + key: string; +} + +/** One call of a WebMCP tool, as the page reports it. Values are masked. */ +export interface WebMcpCallEntry { + id: number; + tool: string; + /** Start, in ms since the epoch. */ + at: number; + /** How long `execute` took to settle; missing while it runs. */ + ms?: number; + outcome: WebMcpOutcome; + /** The arguments, masked by `serialize` (and the form's own masks for a form tool). */ + args?: unknown; + /** What `execute` resolved with, masked the same way. */ + result?: unknown; + /** The error or failure text. */ + detail?: string; + /** The user pressed a key or the pointer while the call ran or just after it. */ + userInput?: boolean; + /** Effects a collector tied to this call. */ + caused?: WebMcpEffectKey[]; + /** The form the tool submits, for a Signal Forms tool. */ + formId?: string; + /** Started from the panel's Try this tool, not by an agent. */ + tried?: boolean; +} + +/** One tool the app registered with `modelContext.registerTool()`. */ +export interface WebMcpPageTool { + name: string; + description: string; + status: 'registering' | 'registered' | 'failed'; + /** How the collector found it: its registration, a tool list, or Angular's schema error. */ + seen: 'register' | 'list' | 'error'; + error?: string; + /** The annotations the page claims, such as `readOnlyHint`. */ + annotations?: Record; + /** One `path: type` line per input. */ + inputs?: string[]; + required?: string[]; + /** The form this tool belongs to, for a Signal Forms tool. */ + formId?: string; + duplicate?: boolean; + registeredAt?: number; +} + +/** The `push-webmcp` report of one page. */ +export interface WebMcpReport { + pageId: string; + url?: string; + title?: string; + /** The page has `document.modelContext` (or `navigator.modelContext`). */ + modelContext: boolean; + tools: WebMcpPageTool[]; + /** Oldest first. */ + calls: WebMcpCallEntry[]; + /** Older calls removed at `limits.webmcpCalls`. */ + dropped?: number; +} + +/** After a call settles, effects that start within this window may still be its own. */ +export const WEBMCP_GRACE_MS = 500; +/** How long a zone keeps tying effects to a call after it settled (timers the call started). */ +export const WEBMCP_CAUSED_AFTER_MS = 5000; + +export type WebMcpCertainty = 'caused' | 'during'; +/** `write`: changes data outside the component; `signal`: only a signal write; `none`: reads. */ +export type WebMcpChange = 'write' | 'signal' | 'none'; + +export interface WebMcpEffect { + layer: WebMcpEffectLayer; + key: string; + at: number; + title: string; + detail?: string; + certainty: WebMcpCertainty; + change: WebMcpChange; + /** For a signal write: a signal Angular's own code created (`resource` state and so on). */ + framework?: boolean; + /** The tab that shows the effect in full. */ + tab: string; + /** The item that tab can select, when it can. */ + id?: string; +} + +export interface WebMcpTrace { + effects: WebMcpEffect[]; + /** + * For a tool that claims `readOnlyHint`: `warning` when the call changed data + * outside signals, `info` when it only wrote the app's own signals. + */ + verdict?: 'warning' | 'info'; + /** The user was active during the call, so effects no collector tied to it are left out. */ + userInput: boolean; +} + +/** The shared states the trace reads, as the server holds them. */ +export interface WebMcpTraceSources { + http?: unknown; + ngrx?: unknown; + router?: unknown; + forms?: unknown; + signals?: unknown; +} + +const READ_METHODS = new Set(['GET', 'HEAD', 'OPTIONS']); +const FORM_WRITES = new Set(['value', 'submit', 'reset']); +const MAX_EFFECTS = 100; + +type AnyRecord = Record; + +function record(value: unknown): AnyRecord { + return value && typeof value === 'object' && !Array.isArray(value) ? (value as AnyRecord) : {}; +} + +function list(value: unknown): AnyRecord[] { + return Array.isArray(value) ? (value as AnyRecord[]) : []; +} + +function finite(value: unknown): value is number { + return typeof value === 'number' && Number.isFinite(value); +} + +/** The page entries of a shared state that keeps them as an array or a record. */ +function pagesOf(state: unknown): AnyRecord[] { + const pages = record(state)['pages']; + return Array.isArray(pages) ? pages : Object.values(record(pages)); +} + +function pageIn(state: unknown, pageId: string): AnyRecord | undefined { + return pagesOf(state).find((page) => record(page)['pageId'] === pageId); +} + +function pathOf(url: unknown): string { + if (typeof url !== 'string') return ''; + try { + return new URL(url, 'http://x').pathname; + } catch { + return url.split(/[?#]/)[0] ?? url; + } +} + +function shortUrl(url: unknown): string { + if (typeof url !== 'string') return ''; + return url.replace(/^[a-z]+:\/\/[^/]+/i, '') || url; +} + +/** Whether the tool claims to only read. Anything but `readOnlyHint: true` may change data. */ +export function claimsReadOnly(tool: Pick | undefined): boolean { + return tool?.annotations?.['readOnlyHint'] === true; +} + +/** + * The effects of `call` on page `pageId`: what a collector tied to it + * (`caused`), and what started between its start and its end plus + * {@link WEBMCP_GRACE_MS} (`during`), unless the user was active then. + */ +export function traceCall( + call: WebMcpCallEntry, + pageId: string, + sources: WebMcpTraceSources, + options: { tool?: WebMcpPageTool; now?: number } = {}, +): WebMcpTrace { + const now = options.now ?? Date.now(); + const end = call.at + (finite(call.ms) ? call.ms : Math.max(0, now - call.at)); + const duringEnd = end + WEBMCP_GRACE_MS; + const causedEnd = end + WEBMCP_CAUSED_AFTER_MS; + const userInput = call.userInput === true; + const caused = new Set((call.caused ?? []).map((effect) => `${effect.layer}:${effect.key}`)); + const effects: WebMcpEffect[] = []; + + const consider = (effect: Omit, tied: boolean): void => { + if (!finite(effect.at)) return; + if (tied && effect.at >= call.at - 1 && effect.at <= causedEnd) { + effects.push({ ...effect, certainty: 'caused' }); + } else if (!userInput && effect.at >= call.at && effect.at <= duringEnd) { + effects.push({ ...effect, certainty: 'during' }); + } + }; + + const http = pageIn(sources.http, pageId); + for (const item of list(http?.['calls'])) { + const method = String(item['method'] ?? 'GET').toUpperCase(); + const status = finite(item['status']) && item['status'] ? String(item['status']) : ''; + consider( + { + layer: 'http', + key: String(item['id'] ?? item['at']), + at: item['at'], + title: `${method} ${shortUrl(item['url'])}`, + ...(status ? { detail: status } : {}), + change: READ_METHODS.has(method) ? 'none' : 'write', + tab: 'network', + }, + caused.has(`http:${item['id']}`), + ); + } + + const ngrx = pageIn(sources.ngrx, pageId); + for (const entry of list(ngrx?.['log'])) { + const title = + entry['source'] === 'event' ? String(entry['eventType'] ?? entry['type']) : entry['type']; + consider( + { + layer: 'ngrx', + key: String(entry['seq']), + at: entry['timestamp'], + title: String(title ?? 'action'), + ...(entry['storeId'] ? { detail: String(entry['storeId']) } : {}), + change: 'write', + tab: 'store', + }, + caused.has(`ngrx:${entry['seq']}`), + ); + } + + const router = pageIn(sources.router, pageId); + const navigations = list(router?.['navigations']).filter((nav) => finite(nav['startedAt'])); + navigations.sort((a, b) => a['startedAt'] - b['startedAt']); + let previousPath: string | undefined; + for (const nav of navigations) { + const target = nav['finalUrl'] ?? nav['url']; + const fromPath = nav['from'] !== undefined ? pathOf(nav['from']) : previousPath; + const moved = fromPath === undefined || pathOf(target) !== fromPath; + if (!nav['probe'] && !nav['beforeConnect']) { + consider( + { + layer: 'router', + key: String(nav['id']), + at: nav['startedAt'], + title: `Navigation to ${shortUrl(nav['url'])}`, + ...(nav['outcome'] ? { detail: String(nav['outcome']) } : {}), + change: + moved && nav['outcome'] !== 'cancelled' && nav['outcome'] !== 'failed' + ? 'write' + : 'none', + tab: 'routes', + }, + caused.has(`router:${nav['id']}`), + ); + } + if (nav['outcome'] !== 'cancelled' && nav['outcome'] !== 'failed') + previousPath = pathOf(target); + } + + for (const event of list(record(sources.forms)['events'])) { + const formId = event['formId']; + // Form ids end with `@`. + if (typeof formId !== 'string' || formId.split('@')[1] !== pageId) continue; + // A form event made while a tool ran is tagged `agent` by the forms collector. + consider( + { + layer: 'forms', + key: `${formId}:${event['seq']}`, + at: event['timestamp'], + title: `${event['type']} ${event['path'] || 'form'}`, + ...(event['outcome'] ? { detail: String(event['outcome']) } : {}), + change: FORM_WRITES.has(event['type']) ? 'write' : 'none', + tab: 'forms', + id: formId, + }, + event['origin'] === 'agent' || caused.has(`forms:${formId}:${event['seq']}`), + ); + } + + const graph = record(record(record(sources.signals)['pages'])[pageId]); + const nodes = new Map(list(graph['nodes']).map((node) => [String(node['id']), node] as const)); + for (const [nodeId, changes] of Object.entries(record(graph['history']))) { + const node = nodes.get(nodeId); + for (const change of list(changes)) { + if (change['source'] === 'initial') continue; + const key = `${nodeId}:${change['epoch'] ?? change['at']}`; + consider( + { + layer: 'signals', + key, + at: change['at'], + title: `${node?.['label'] || node?.['kind'] || 'signal'} ${change['source'] === 'write' ? 'set' : 'changed'}`, + change: 'signal', + ...(node?.['framework'] ? { framework: true } : {}), + tab: 'signals', + }, + caused.has(`signals:${key}`), + ); + } + } + + effects.sort((a, b) => a.at - b.at || a.layer.localeCompare(b.layer)); + const kept = effects.slice(0, MAX_EFFECTS); + let verdict: WebMcpTrace['verdict']; + if (claimsReadOnly(options.tool)) { + if (kept.some((effect) => effect.change === 'write')) verdict = 'warning'; + else if (kept.some((effect) => effect.change === 'signal' && !effect.framework)) { + verdict = 'info'; + } + } + return { effects: kept, ...(verdict ? { verdict } : {}), userInput }; +} From aba29a23dece4187042efaae43bc3efabd705b87 Mon Sep 17 00:00:00 2001 From: Santosh Yadav Date: Tue, 24 Nov 2026 10:37:00 +0100 Subject: [PATCH 2/9] feat(ui): add the WebMCP tab and a WebMCP lane on the Timeline The WebMCP tab lists the page's tools with the annotations they claim, and each call with its masked arguments, result and effects, linked to the tab that shows each one. The Timeline gets one span per call, marked when the call failed or a read-only tool changed data. --- app/src/__tests__/timeline.test.ts | 70 +- app/src/__tests__/webmcp-inspector.test.ts | 340 +++++++ app/src/app.ts | 22 +- app/src/devtools-config.ts | 1 + app/src/pages/tab-icon.ts | 6 + app/src/pages/timeline-data.ts | 65 +- app/src/pages/timeline.ts | 6 +- app/src/pages/webmcp-call-detail.ts | 259 +++++ app/src/pages/webmcp-data.ts | 294 ++++++ app/src/pages/webmcp-inspector.ts | 676 +++++++++++++ app/src/pages/webmcp-tool-detail.ts | 198 ++++ app/src/types/tab.types.ts | 1 + app/tsconfig.json | 3 +- ...=> browser-agent-rpc-KH4HHvHf-CPWctB97.js} | 2 +- .../{index-xQ_9JX3C.js => index-B_rNrIsI.js} | 940 ++++++++++++++---- extension/ui/index.html | 2 +- 16 files changed, 2703 insertions(+), 182 deletions(-) create mode 100644 app/src/__tests__/webmcp-inspector.test.ts create mode 100644 app/src/pages/webmcp-call-detail.ts create mode 100644 app/src/pages/webmcp-data.ts create mode 100644 app/src/pages/webmcp-inspector.ts create mode 100644 app/src/pages/webmcp-tool-detail.ts rename extension/ui/assets/{browser-agent-rpc-KH4HHvHf-uq6ycX2u.js => browser-agent-rpc-KH4HHvHf-CPWctB97.js} (95%) rename extension/ui/assets/{index-xQ_9JX3C.js => index-B_rNrIsI.js} (70%) diff --git a/app/src/__tests__/timeline.test.ts b/app/src/__tests__/timeline.test.ts index d9b2aae6..9df09d0d 100644 --- a/app/src/__tests__/timeline.test.ts +++ b/app/src/__tests__/timeline.test.ts @@ -22,7 +22,15 @@ vi.mock('devframe/client', () => ({ connectDevframe: () => new Promise(() => {}) const { Timeline, TIMELINE_LIST_CAP } = await import('../pages/timeline'); -const ALL_LAYERS = new Set(['router', 'http', 'ngrx', 'cd', 'forms', 'signals']); +const ALL_LAYERS = new Set([ + 'router', + 'http', + 'ngrx', + 'cd', + 'forms', + 'signals', + 'webmcp', +]); /** One page of each source, with events spread over a few seconds. */ function sources(): TimelineSources { @@ -296,6 +304,66 @@ describe('timeline data', () => { }); }); +describe('the WebMCP lane', () => { + const tool = (name: string, annotations?: Record) => ({ + name, + description: '', + status: 'registered', + seen: 'register', + ...(annotations ? { annotations } : {}), + }); + const webmcp = { + pages: { + p1: { + pageId: 'p1', + title: 'Trips', + modelContext: true, + tools: [tool('search', { readOnlyHint: true }), tool('book')], + calls: [ + { id: 1, tool: 'search', at: 1_990, ms: 40, outcome: 'done' }, + { id: 2, tool: 'book', at: 6_000, ms: 5, outcome: 'threw', detail: 'Boom' }, + { id: 3, tool: 'search', at: 7_000, outcome: 'running' }, + { id: 4, tool: 'book', at: 8_000, ms: 3, outcome: 'done' }, + ], + }, + }, + }; + + it('draws one span per call, linked to the call on the WebMCP tab', () => { + const events = mergeTimeline({ ...sources(), webmcp }).filter((e) => e.layer === 'webmcp'); + expect(events.map((event) => event.title)).toEqual([ + 'search call', + 'book call', + 'search call', + 'book call', + ]); + expect(events[0]).toMatchObject({ + key: 'webmcp:p1:1', + pageId: 'p1', + at: 1_990, + ms: 40, + detail: 'done · 40 ms', + link: { tab: 'webmcp', id: '1', page: 'p1' }, + }); + expect(events[2].detail).toBe('running'); + expect(events[2].ms).toBeUndefined(); + }); + + it('marks a call that threw, and a read-only tool that changed data', () => { + const events = mergeTimeline({ ...sources(), webmcp }).filter((e) => e.layer === 'webmcp'); + // The read-only search ran while the page posted to /api/seats. + expect(events.map((event) => event.tone)).toEqual(['warn', 'danger', undefined, undefined]); + // Without that HTTP call the same search reads only. + const quiet = mergeTimeline({ webmcp }).filter((e) => e.layer === 'webmcp'); + expect(quiet[0].tone).toBeUndefined(); + }); + + it('names a page from its WebMCP report', () => { + const events = mergeTimeline({ webmcp }); + expect(timelinePages({ webmcp }, events)).toEqual([{ pageId: 'p1', label: 'Trips' }]); + }); +}); + function fakeClient(states: Record, configs: Record = {}) { const rpc = { call: () => Promise.resolve([]), diff --git a/app/src/__tests__/webmcp-inspector.test.ts b/app/src/__tests__/webmcp-inspector.test.ts new file mode 100644 index 00000000..df42444a --- /dev/null +++ b/app/src/__tests__/webmcp-inspector.test.ts @@ -0,0 +1,340 @@ +import { TestBed, type ComponentFixture } from '@angular/core/testing'; +import type { DevframeRpcClient } from 'devframe/client'; +import { afterEach, describe, expect, it, vi } from 'vitest'; +import { + ALL_PAGES, + callRows, + defaultWebMcpPage, + droppedCalls, + toolRows, + traceRow, + valueText, + webMcpPages, +} from '../pages/webmcp-data'; + +vi.mock('devframe/client', () => ({ connectDevframe: () => new Promise(() => {}) })); + +const { WebMcpInspector } = await import('../pages/webmcp-inspector'); + +/** One page with a read-only tool, a form tool and a failed duplicate, and four calls. */ +function webmcpState() { + return { + pages: { + p1: { + pageId: 'p1', + url: 'http://localhost/trips', + title: 'Trips', + modelContext: true, + reportedAt: 2, + dropped: 3, + tools: [ + { + name: 'search-trips', + description: 'Finds trips by city', + status: 'registered', + seen: 'register', + annotations: { readOnlyHint: true }, + inputs: ['query: string', 'limit: number'], + required: ['query'], + }, + { + name: 'book-seat', + description: 'Books a seat', + status: 'registered', + seen: 'register', + formId: 'f1@p1', + }, + { + name: 'book-seat', + description: '', + status: 'failed', + seen: 'register', + error: 'A tool with this name exists', + duplicate: true, + }, + ], + calls: [ + { + id: 1, + tool: 'search-trips', + at: 10_000, + ms: 50, + outcome: 'done', + args: { query: 'paris', token: '[masked]' }, + result: { count: 2 }, + }, + { + id: 2, + tool: 'book-seat', + at: 20_000, + ms: 12, + outcome: 'threw', + detail: 'Boom', + formId: 'f1@p1', + }, + { id: 3, tool: 'search-trips', at: 30_000, ms: 20, outcome: 'done' }, + { id: 4, tool: 'search-trips', at: 40_000, ms: 20, outcome: 'done', userInput: true }, + ], + }, + }, + }; +} + +/** The other inspectors' states the trace reads, as the server sends them. */ +function traceStates() { + return { + http: { + pages: [ + { + pageId: 'p1', + calls: [ + { id: 'h1', url: '/api/trips', method: 'POST', status: 201, at: 10_010 }, + { id: 'h2', url: '/api/me', method: 'GET', status: 200, at: 40_010 }, + ], + }, + ], + }, + forms: { + events: [ + { formId: 'f1@p1', seq: 3, type: 'submit', path: '', timestamp: 20_005, origin: 'agent' }, + ], + }, + 'signal-graph': { + pages: { + p1: { + pageId: 'p1', + nodes: [{ id: 'n1', label: 'count', kind: 'signal' }], + history: { n1: [{ epoch: 2, value: 1, at: 30_005, source: 'write' }] }, + }, + }, + }, + }; +} + +const sources = () => { + const states = traceStates(); + return { http: states.http, forms: states.forms, signals: states['signal-graph'] }; +}; + +describe('WebMCP data', () => { + it('reads pages and picks this tab page, the only page, or all pages', () => { + const pages = webMcpPages(webmcpState()); + expect(pages.map((page) => page.pageId)).toEqual(['p1']); + expect(webMcpPages({ pages: 'nope' })).toEqual([]); + expect(webMcpPages(null)).toEqual([]); + expect(defaultWebMcpPage(pages, null)).toBe('p1'); + expect(defaultWebMcpPage([...pages, { ...pages[0], pageId: 'p2' }], null)).toBe(ALL_PAGES); + expect(defaultWebMcpPage([...pages, { ...pages[0], pageId: 'p2' }], 'p2')).toBe('p2'); + }); + + it('maps tools with their status, claims and inputs', () => { + const [search, book, duplicate] = toolRows(webMcpPages(webmcpState()), ALL_PAGES); + expect(search).toMatchObject({ + name: 'search-trips', + statusText: 'registered', + tone: 'ok', + readOnly: true, + claims: ['readOnlyHint: true'], + inputs: [ + { text: 'query: string', required: true }, + { text: 'limit: number', required: false }, + ], + }); + // A tool without readOnlyHint is treated as able to change data. + expect(book).toMatchObject({ readOnly: false, claims: [], formId: 'f1@p1' }); + expect(duplicate).toMatchObject({ + tone: 'danger', + duplicate: true, + error: 'A tool with this name exists', + }); + expect(new Set([search.key, book.key, duplicate.key]).size).toBe(3); + }); + + it('lists calls newest first with masked values as text', () => { + const calls = callRows(webMcpPages(webmcpState()), ALL_PAGES); + expect(calls.map((call) => call.id)).toEqual(['4', '3', '2', '1']); + const first = calls[3]; + expect(first).toMatchObject({ key: 'p1:1', outcomeText: 'done', tone: 'ok', ms: 50 }); + expect(first.args).toContain('"token": "[masked]"'); + expect(first.result).toContain('"count": 2'); + expect(calls[2]).toMatchObject({ outcomeText: 'threw', tone: 'danger', detail: 'Boom' }); + expect(valueText('x')).toBe('x'); + expect(droppedCalls(webMcpPages(webmcpState()), ALL_PAGES)).toBe(3); + }); + + it('warns when a read-only tool changed data outside signals', () => { + const pages = webMcpPages(webmcpState()); + const call = callRows(pages, ALL_PAGES).find((c) => c.id === '1')!; + const trace = traceRow(call, pages, sources()); + expect(trace.verdict).toBe('warning'); + expect(trace.effects).toEqual([ + expect.objectContaining({ + layer: 'http', + title: 'POST /api/trips', + certainty: 'during', + certaintyText: 'probably caused', + link: { tab: 'network', page: 'p1' }, + tabLabel: 'SSR & HTTP', + }), + ]); + }); + + it('marks effects a collector tied to the call as caused and links the form', () => { + const pages = webMcpPages(webmcpState()); + const call = callRows(pages, ALL_PAGES).find((c) => c.id === '2')!; + const trace = traceRow(call, pages, sources()); + expect(trace.verdict).toBeUndefined(); + expect(trace.effects[0]).toMatchObject({ + layer: 'forms', + certainty: 'caused', + certaintyText: 'caused', + link: { tab: 'forms', id: 'f1@p1', page: 'p1' }, + }); + }); + + it('calls a signal write by a read-only tool local state, not a warning', () => { + const pages = webMcpPages(webmcpState()); + const call = callRows(pages, ALL_PAGES).find((c) => c.id === '3')!; + const trace = traceRow(call, pages, sources()); + expect(trace.verdict).toBe('info'); + expect(trace.verdictText).toContain('changed local state'); + expect(trace.effects[0]).toMatchObject({ layer: 'signals', tabLabel: 'Signals' }); + }); + + it('lists only caused effects while the user was active', () => { + const pages = webMcpPages(webmcpState()); + const call = callRows(pages, ALL_PAGES).find((c) => c.id === '4')!; + const trace = traceRow(call, pages, sources()); + expect(trace.userInput).toBe(true); + expect(trace.effects).toEqual([]); + }); +}); + +function fakeClient(states: Record) { + const rpc = { + call: () => Promise.resolve([]), + sharedState: (name: string) => + name in states + ? Promise.resolve({ value: () => states[name], on: () => () => {} }) + : Promise.reject(new Error('no state')), + }; + return { + connectionMeta: { configs: {} }, + scope: () => ({ rpc }), + } as unknown as DevframeRpcClient; +} + +async function settle(fixture: ComponentFixture) { + for (let i = 0; i < 4; i++) { + await new Promise((resolve) => setTimeout(resolve)); + await fixture.whenStable(); + } +} + +const host = (fixture: ComponentFixture) => fixture.nativeElement as HTMLElement; +const text = (fixture: ComponentFixture) => + (host(fixture).textContent ?? '').replace(/\s+/g, ' '); +const rows = (fixture: ComponentFixture) => [ + ...host(fixture).querySelectorAll('button.row'), +]; +const button = (fixture: ComponentFixture, label: string) => + [...host(fixture).querySelectorAll('button')].find((b) => + (b.textContent ?? '').replace(/\s+/g, ' ').trim().startsWith(label), + )!; + +async function mount(states: Record) { + const fixture = TestBed.createComponent(WebMcpInspector); + fixture.componentRef.setInput('rpc', fakeClient(states)); + document.body.append(host(fixture)); + await settle(fixture); + return fixture; +} + +afterEach(() => { + document.body.innerHTML = ''; +}); + +describe('the WebMCP tab', () => { + it('says how to get data when no page reports WebMCP', async () => { + const fixture = await mount({ webmcp: { pages: {} } }); + expect(text(fixture)).toContain('No page reports WebMCP yet.'); + }); + + it('offers Retry when the server has no WebMCP state', async () => { + const fixture = await mount({}); + expect(host(fixture).querySelector('[role="alert"]')?.textContent).toContain( + "Can't read WebMCP tools", + ); + }); + + it('says a browser agent sees no tools without modelContext', async () => { + const state = webmcpState(); + const page = { ...state.pages.p1, modelContext: false, tools: [], calls: [] }; + const fixture = await mount({ webmcp: { pages: { p1: page } } }); + expect(text(fixture)).toContain('a browser agent sees none of these tools'); + expect(text(fixture)).toContain('No tools.'); + button(fixture, 'Calls').click(); + await settle(fixture); + expect(text(fixture)).toContain('No calls yet.'); + }); + + it('lists tools and shows what a tool claims', async () => { + const fixture = await mount({ webmcp: webmcpState(), ...traceStates() }); + expect(host(fixture).querySelector('h2')!.textContent).toBe('Tools'); + expect(rows(fixture)).toHaveLength(3); + expect(text(fixture)).toContain('3 of 3 tools'); + rows(fixture)[1].click(); + await settle(fixture); + const opened: unknown[] = []; + fixture.componentInstance.open.subscribe((link) => opened.push(link)); + expect(text(fixture)).toContain('Annotations claimed by the page'); + expect(text(fixture)).toContain('may change data'); + button(fixture, 'Show form').click(); + expect(opened).toEqual([{ tab: 'forms', id: 'f1@p1', page: 'p1' }]); + }); + + it('lists calls newest first and shows a call with its effects and verdict', async () => { + const fixture = await mount({ webmcp: webmcpState(), ...traceStates() }); + button(fixture, 'Calls').click(); + await settle(fixture); + expect(text(fixture)).toContain('3 older entries were dropped'); + const calls = rows(fixture); + expect(calls.map((row) => row.getAttribute('data-key'))).toEqual([ + 'p1:4', + 'p1:3', + 'p1:2', + 'p1:1', + ]); + // The read-only tool that posted is flagged in the list. + expect(calls[3].textContent).toContain('changed data'); + calls[3].click(); + await settle(fixture); + expect(text(fixture)).toContain('claims readOnlyHint, but this call changed data'); + expect(text(fixture)).toContain('probably caused'); + expect(host(fixture).querySelector('pre')!.textContent).toContain('[masked]'); + const opened: unknown[] = []; + fixture.componentInstance.open.subscribe((link) => opened.push(link)); + button(fixture, 'Open in SSR & HTTP').click(); + expect(opened).toEqual([{ tab: 'network', page: 'p1' }]); + + rows(fixture)[0].click(); + await settle(fixture); + expect(text(fixture)).toContain( + 'The user was active during this call, so only caused effects are listed.', + ); + }); + + it('selects the call a deep link names', async () => { + const fixture = TestBed.createComponent(WebMcpInspector); + fixture.componentRef.setInput('rpc', fakeClient({ webmcp: webmcpState(), ...traceStates() })); + fixture.componentRef.setInput('focus', { id: '2', page: 'p1' }); + let handled = 0; + fixture.componentInstance.focusHandled.subscribe(() => handled++); + await settle(fixture); + expect(handled).toBe(1); + expect(fixture.componentInstance.view()).toBe('calls'); + const selected = host(fixture).querySelector('button.row[aria-current="true"]')!; + expect(selected.getAttribute('data-key')).toBe('p1:2'); + expect(text(fixture)).toContain('Boom'); + }); +}); diff --git a/app/src/app.ts b/app/src/app.ts index 7de874a8..afd9af56 100644 --- a/app/src/app.ts +++ b/app/src/app.ts @@ -36,6 +36,7 @@ import { CapacitorInspector } from './pages/capacitor-inspector'; import { ErrorsInspector } from './pages/errors-inspector'; import { PerformanceInspector } from './pages/performance-inspector'; import { BuildInspector } from './pages/build-inspector'; +import { WebMcpInspector, type WebMcpFocus } from './pages/webmcp-inspector'; import { PluginsInspector, pluginsReporting } from './pages/plugins-inspector'; import { AuditInspector } from './pages/audit-inspector'; import { Timeline } from './pages/timeline'; @@ -117,6 +118,12 @@ const TAB_VIEW: Partial> = { analog: 'analog', capacitor: 'capacitor', }; +/** + * The tabs a deep link can select an item on: the ones `PANEL_LINK_ITEMS` + * lists, and the WebMCP tab, which selects a call by its id. + */ +const LINK_ITEM_TABS = new Set(Object.keys(PANEL_LINK_ITEMS)); + const VIEW_TABS: Partial> = { 'angular-native': ['components', 'signals', 'injectors', 'store', 'queries', 'pipes', 'errors'], }; @@ -229,6 +236,7 @@ function readView(): View | null { ErrorsInspector, PerformanceInspector, BuildInspector, + WebMcpInspector, PluginsInspector, AuditInspector, Timeline, @@ -620,6 +628,14 @@ function readView(): View | null { @case ('build') { } + @case ('webmcp') { + + } @case ('errors') { t.id === tab)) return false; if (this.tab() !== tab) this.switchTab(tab); - if (link.id && Object.hasOwn(PANEL_LINK_ITEMS, tab)) { + if (link.id && LINK_ITEM_TABS.has(tab)) { const pageId = link.page; if (tab === 'components') this.componentFocus.set({ id: link.id, pageId }); else if (tab === 'injectors') this.injectorFocus.set({ componentId: link.id, pageId }); else if (tab === 'signals') this.signalFocus.set({ componentId: link.id, pageId }); else if (tab === 'forms') this.formFocus.set({ id: link.id }); + else if (tab === 'webmcp') this.webmcpFocus.set({ id: link.id, page: pageId }); } history.replaceState(history.state, '', panelLinkHash(link)); return true; @@ -1738,9 +1755,12 @@ export class App implements OnInit, OnDestroy { } else if (tab === 'signals') { this.signalFocus.set({ componentId: link.id, pageId: link.page }); } else if (tab === 'forms') this.formFocus.set({ id: link.id }); + else if (tab === 'webmcp') this.webmcpFocus.set({ id: link.id, page: link.page }); } formFocus = signal<{ id: string } | null>(null); + /** A WebMCP call a deep link (such as a Timeline event) selects. */ + webmcpFocus = signal(null); // Belongs to the Components tab that received it, so leaving the tab drops it. readonly componentFocus = linkedSignal({ source: this.tab, diff --git a/app/src/devtools-config.ts b/app/src/devtools-config.ts index ce850d55..366dbe34 100644 --- a/app/src/devtools-config.ts +++ b/app/src/devtools-config.ts @@ -59,6 +59,7 @@ const TAB_INSPECTOR: Partial> = { analog: 'analog', capacitor: 'capacitor', errors: 'errors', + webmcp: 'webmcp', plugins: 'plugins', performance: 'performance', build: 'build', diff --git a/app/src/pages/tab-icon.ts b/app/src/pages/tab-icon.ts index d2d05051..3049cf33 100644 --- a/app/src/pages/tab-icon.ts +++ b/app/src/pages/tab-icon.ts @@ -101,6 +101,12 @@ import { Component, input } from '@angular/core'; } + @case ('webmcp') { + + + } @case ('plugins') { TimelineEvent[]> = { +/** + * One span per WebMCP tool call. A call of a tool that claims `readOnlyHint` + * and changed data outside signals is marked, with the same trace the WebMCP + * tab shows, so it reads the other sources too. + */ +function webmcpEvents(state: unknown, sources: TimelineSources): TimelineEvent[] { + const pages = webMcpPages(state); + const trace = { + http: sources.http, + ngrx: sources.ngrx, + router: sources.router, + forms: sources.forms, + signals: sources.signals, + }; + const events: TimelineEvent[] = []; + for (const page of pages) { + for (const call of page.calls) { + if (!finite(call?.at) || typeof call.tool !== 'string') continue; + const row = callRow(call, page.pageId); + const tone: TimelineTone | undefined = + call.outcome === 'threw' || call.outcome === 'failed' + ? 'danger' + : toolOf(pages, row)?.annotations?.['readOnlyHint'] === true && + traceRow(row, pages, trace).verdict === 'warning' + ? 'warn' + : undefined; + const took = finite(call.ms) ? call.ms : undefined; + events.push({ + key: `webmcp:${page.pageId}:${call.id}`, + layer: 'webmcp', + pageId: page.pageId, + at: call.at, + ...(took !== undefined ? { ms: took } : {}), + title: `${call.tool} call`, + detail: [outcomeText(call.outcome), took !== undefined ? ms(took) : ''] + .filter(Boolean) + .join(' · '), + ...(tone ? { tone } : {}), + link: { tab: 'webmcp', id: row.id, ...(page.pageId ? { page: page.pageId } : {}) }, + }); + } + } + return events; +} + +const READERS: Record< + TimelineLayer, + (state: unknown, sources: TimelineSources) => TimelineEvent[] +> = { router: routerEvents, http: httpEvents, ngrx: ngrxEvents, cd: cdEvents, forms: formsEvents, signals: signalEvents, + webmcp: webmcpEvents, }; /** @@ -419,7 +477,7 @@ export function mergeTimeline(sources: TimelineSources): TimelineEvent[] { const events: TimelineEvent[] = []; for (const layer of TIMELINE_LAYERS) { const state = sources[layer.id]; - if (state !== undefined && state !== null) events.push(...READERS[layer.id](state)); + if (state !== undefined && state !== null) events.push(...READERS[layer.id](state, sources)); } const order = new Map(TIMELINE_LAYERS.map((layer, index) => [layer.id, index])); events.sort( @@ -456,6 +514,7 @@ export function timelinePages(sources: TimelineSources, events: TimelineEvent[]) name(page?.pageId, page?.title || page?.url); for (const page of pagesOf(sources.router)) name(page?.pageId, page?.snapshot?.url); for (const page of pagesOf(sources.ngrx)) name(page?.pageId, page?.title || page?.url); + for (const page of webMcpPages(sources.webmcp)) name(page.pageId, page.title || page.url); for (const event of events) name(event.pageId, ''); return [...labels].map(([pageId, label]) => ({ pageId, label: label || pageId })); } diff --git a/app/src/pages/timeline.ts b/app/src/pages/timeline.ts index 272e4627..18f5572b 100644 --- a/app/src/pages/timeline.ts +++ b/app/src/pages/timeline.ts @@ -60,9 +60,9 @@ const DRAG_THRESHOLD = 4; imports: [AppState, Select, RovingList, SearchField], template: `

- Navigations, HTTP calls, NgRx actions, change detection cycles, form events and signal changes - from the live page on one time axis. Turn layers on and off, drag across the chart to look at - a range, and open an event in its own tab. + Navigations, HTTP calls, NgRx actions, change detection cycles, form events, signal changes + and WebMCP tool calls from the live page on one time axis. Turn layers on and off, drag across + the chart to look at a range, and open an event in its own tab.

@if (loading()) { Loading the timeline… diff --git a/app/src/pages/webmcp-call-detail.ts b/app/src/pages/webmcp-call-detail.ts new file mode 100644 index 00000000..06fb0882 --- /dev/null +++ b/app/src/pages/webmcp-call-detail.ts @@ -0,0 +1,259 @@ +import { Component, input, output } from '@angular/core'; +import type { PanelLink } from '@pangular-inspector/devtools/internal/config'; +import { clockTime, spanText } from './timeline-data'; +import type { WebMcpCallRow, WebMcpCallTrace } from './webmcp-data'; + +/** One WebMCP tool call in full: its masked values and what it did on the page. */ +@Component({ + selector: 'app-webmcp-call-detail', + template: ` + @let c = call(); + @let t = trace(); +

{{ c.tool }}

+
+
Outcome
+
+ {{ c.outcomeText }} +
+
Started
+
{{ clock(c.at) }}
+
Took
+
{{ c.ms !== undefined ? span(c.ms) : 'still running' }}
+
+ @if (c.detail) { +

{{ c.detail }}

+ } + + @if (t.verdict === 'warning') { +

{{ t.verdictText }}

+ } @else if (t.verdict === 'info') { +

{{ t.verdictText }}

+ } + +

Arguments

+ @if (c.args !== undefined) { +
{{ c.args }}
+ } @else { +

None.

+ } +

Result

+ @if (c.result !== undefined) { +
{{ c.result }}
+ } @else { +

{{ c.outcome === 'running' ? 'Not settled yet.' : 'None.' }}

+ } + +

Effects

+ @if (t.userInput) { +

The user was active during this call, so only caused effects are listed.

+ } + @if (t.effects.length) { +
    + @for (effect of t.effects; track effect.key) { +
  1. +
    + {{ + effect.certaintyText + }} + {{ effect.layerLabel }} + +
    + {{ effect.title }} + @if (effect.detail) { + {{ effect.detail }} + } + +
  2. + } +
+

+ Caused: a collector tied the effect to this call. Probably caused: it started while the call + ran. +

+ } @else { +

+ No navigation, HTTP call, NgRx action, form change or signal write was seen during this + call. +

+ } + + @if (c.formId && canShowForm()) { + + } + `, + styles: ` + @use 'mixins' as m; + + :host { + display: grid; + gap: 8px; + min-width: 0; + } + p { + margin: 0; + } + h3 { + margin: 4px 0 0; + @include m.label; + } + .name { + color: var(--text-strong); + font-family: var(--font-mono); + font-size: 12.5px; + font-weight: 600; + overflow-wrap: anywhere; + } + dl { + display: grid; + grid-template-columns: auto minmax(0, 1fr); + gap: 4px 12px; + margin: 0; + } + dt { + color: var(--text-2); + } + dd { + margin: 0; + } + .pill { + display: inline-flex; + align-items: center; + padding: 0 8px; + border: 1px solid var(--border); + border-radius: 99px; + background: var(--surface-2); + color: var(--text-2); + font-size: 11px; + font-weight: 600; + line-height: 18px; + white-space: nowrap; + } + .pill[data-tone='ok'] { + @include m.tint(ok); + } + .pill[data-tone='danger'] { + @include m.tint(danger); + } + .pill[data-certainty='caused'] { + @include m.tint(accent); + } + .problem { + color: var(--danger-text); + overflow-wrap: anywhere; + } + .verdict { + padding: 8px 12px; + border: 1px solid var(--border); + border-radius: var(--radius-sm); + background: var(--surface-2); + color: var(--text); + line-height: 1.5; + } + .verdict.warning { + @include m.tint(warn); + border-color: color-mix(in srgb, var(--warn) 45%, transparent); + } + .muted { + color: var(--text-2); + line-height: 1.5; + } + code, + pre { + font-family: var(--font-mono); + font-size: 12px; + } + pre { + max-height: 200px; + margin: 0; + padding: 8px; + overflow: auto; + border-radius: var(--radius-sm); + background: var(--bg); + color: var(--text); + white-space: pre-wrap; + overflow-wrap: anywhere; + } + pre:focus-visible { + @include m.focus-ring(-2px); + } + .effects { + display: grid; + gap: 6px; + margin: 0; + padding: 0; + list-style: none; + } + .effects li { + display: grid; + gap: 2px; + min-width: 0; + padding: 6px 8px; + border: 1px solid var(--border); + border-radius: var(--radius-sm); + background: var(--surface); + } + .effect-head { + display: flex; + flex-wrap: wrap; + gap: 4px 8px; + align-items: center; + font-size: 12px; + } + .layer { + color: var(--text-2); + } + .when { + margin-left: auto; + color: var(--text-2); + font-variant-numeric: tabular-nums; + } + .title { + color: var(--text-strong); + overflow-wrap: anywhere; + } + .link { + justify-self: start; + padding: 0; + border: 0; + border-radius: 2px; + background: none; + color: var(--accent-text); + font: inherit; + font-size: 12px; + text-decoration: underline; + text-underline-offset: 2px; + cursor: pointer; + } + .link:focus-visible { + @include m.focus-ring; + } + .small { + justify-self: start; + height: var(--control-h); + padding: 0 12px; + border: 1px solid var(--control-border); + border-radius: var(--radius-sm); + background: var(--surface-2); + color: var(--text); + font: inherit; + cursor: pointer; + } + .small:focus-visible { + @include m.focus-ring; + } + `, +}) +export class WebMcpCallDetail { + readonly call = input.required(); + readonly trace = input.required(); + readonly canShowForm = input(true); + readonly open = output(); + protected readonly clock = clockTime; + protected readonly span = spanText; + + showForm(call: WebMcpCallRow) { + if (call.formId) this.open.emit({ tab: 'forms', id: call.formId, page: call.pageId }); + } +} diff --git a/app/src/pages/webmcp-data.ts b/app/src/pages/webmcp-data.ts new file mode 100644 index 00000000..a515150f --- /dev/null +++ b/app/src/pages/webmcp-data.ts @@ -0,0 +1,294 @@ +import { PANEL_TABS, type PanelLink } from '@pangular-inspector/devtools/internal/config'; +import { + claimsReadOnly, + traceCall, + type WebMcpCallEntry, + type WebMcpCertainty, + type WebMcpEffectLayer, + type WebMcpOutcome, + type WebMcpPageTool, + type WebMcpReport, + type WebMcpTraceSources, +} from '@pangular-inspector/devtools/internal/webmcp-trace'; + +/** The WebMCP tab's data, as the `webmcp` shared state holds it. */ +export interface WebMcpPageView extends WebMcpReport { + reportedAt?: number; +} + +export const ALL_PAGES = 'all'; + +export type WebMcpTone = 'ok' | 'warn' | 'danger'; + +function record(value: unknown): Record { + return value && typeof value === 'object' && !Array.isArray(value) + ? (value as Record) + : {}; +} + +/** The pages that report WebMCP, the most recent report first. */ +export function webMcpPages(state: unknown): WebMcpPageView[] { + const pages = record(state)['pages']; + const list = Array.isArray(pages) ? pages : Object.values(record(pages)); + return list + .filter( + (page): page is WebMcpPageView => + !!page && typeof page === 'object' && typeof (page as WebMcpPageView).pageId === 'string', + ) + .map((page) => ({ + ...page, + tools: Array.isArray(page.tools) ? page.tools : [], + calls: Array.isArray(page.calls) ? page.calls : [], + modelContext: page.modelContext === true, + })) + .sort((a, b) => (b.reportedAt ?? 0) - (a.reportedAt ?? 0)); +} + +/** This tab's page while it reports, else the only page, else every page. */ +export function defaultWebMcpPage(pages: WebMcpPageView[], hostPageId: string | null): string { + if (hostPageId && pages.some((page) => page.pageId === hostPageId)) return hostPageId; + return pages.length === 1 ? pages[0].pageId : ALL_PAGES; +} + +export function pickPages(pages: WebMcpPageView[], pageId: string): WebMcpPageView[] { + return pages.filter((page) => pageId === ALL_PAGES || page.pageId === pageId); +} + +export function pageLabel(page: Pick): string { + return page.title || page.url || page.pageId; +} + +const STATUS_TEXT: Record = { + registering: 'registering', + registered: 'registered', + failed: 'failed', +}; + +const STATUS_TONE: Record = { + registering: undefined, + registered: 'ok', + failed: 'danger', +}; + +export interface WebMcpInput { + text: string; + required: boolean; +} + +export interface WebMcpToolRow { + /** Unique over every page. */ + key: string; + pageId: string; + name: string; + description: string; + status: WebMcpPageTool['status']; + statusText: string; + tone?: WebMcpTone; + error?: string; + duplicate: boolean; + /** The annotations the page claims, as `name: value` text. */ + claims: string[]; + /** Whether the tool claims `readOnlyHint: true`; any other tool may change data. */ + readOnly: boolean; + inputs: WebMcpInput[]; + formId?: string; + /** The tool was found in a tool list, so its calls from before the inspector are unknown. */ + listed: boolean; +} + +function inputPath(line: string): string { + return line.split(':')[0].trim(); +} + +export function toolRow(tool: WebMcpPageTool, pageId: string, index = 0): WebMcpToolRow { + const required = new Set(tool.required ?? []); + return { + key: `${pageId}:${tool.name}:${index}`, + pageId, + name: tool.name, + description: tool.description ?? '', + status: tool.status, + statusText: STATUS_TEXT[tool.status] ?? tool.status, + ...(STATUS_TONE[tool.status] ? { tone: STATUS_TONE[tool.status] } : {}), + ...(tool.error ? { error: tool.error } : {}), + duplicate: tool.duplicate === true, + claims: Object.entries(tool.annotations ?? {}).map(([name, value]) => `${name}: ${value}`), + readOnly: claimsReadOnly(tool), + inputs: (tool.inputs ?? []).map((text) => ({ text, required: required.has(inputPath(text)) })), + ...(tool.formId ? { formId: tool.formId } : {}), + listed: tool.seen === 'list', + }; +} + +/** The tools of the picked pages, in the order each page registered them. */ +export function toolRows(pages: WebMcpPageView[], pageId: string): WebMcpToolRow[] { + return pickPages(pages, pageId).flatMap((page) => + page.tools.map((tool, index) => toolRow(tool, page.pageId, index)), + ); +} + +const OUTCOME_TEXT: Record = { + running: 'running', + submitted: 'submitted', + failed: 'failed', + done: 'done', + threw: 'threw', +}; + +export function outcomeText(outcome: WebMcpOutcome): string { + return OUTCOME_TEXT[outcome] ?? outcome; +} + +export function outcomeTone(outcome: WebMcpOutcome): WebMcpTone | undefined { + if (outcome === 'threw' || outcome === 'failed') return 'danger'; + if (outcome === 'done' || outcome === 'submitted') return 'ok'; + return undefined; +} + +/** A masked value as text. The server masked it already; this never renders HTML. */ +export function valueText(value: unknown): string { + if (value === undefined) return ''; + if (typeof value === 'string') return value; + try { + return JSON.stringify(value, null, 2) ?? String(value); + } catch { + return String(value); + } +} + +export interface WebMcpCallRow { + /** Unique over every page: `:`. */ + key: string; + pageId: string; + /** The call's id on its page, which deep links use. */ + id: string; + tool: string; + at: number; + ms?: number; + outcome: WebMcpOutcome; + outcomeText: string; + tone?: WebMcpTone; + args?: string; + result?: string; + detail?: string; + formId?: string; + userInput: boolean; + entry: WebMcpCallEntry; +} + +export function callRow(call: WebMcpCallEntry, pageId: string): WebMcpCallRow { + const tone = outcomeTone(call.outcome); + return { + key: `${pageId}:${call.id}`, + pageId, + id: String(call.id), + tool: call.tool, + at: call.at, + ...(typeof call.ms === 'number' ? { ms: call.ms } : {}), + outcome: call.outcome, + outcomeText: outcomeText(call.outcome), + ...(tone ? { tone } : {}), + ...(call.args !== undefined ? { args: valueText(call.args) } : {}), + ...(call.result !== undefined ? { result: valueText(call.result) } : {}), + ...(call.detail ? { detail: call.detail } : {}), + ...(call.formId ? { formId: call.formId } : {}), + userInput: call.userInput === true, + entry: call, + }; +} + +/** The calls of the picked pages, newest first. */ +export function callRows(pages: WebMcpPageView[], pageId: string): WebMcpCallRow[] { + return pickPages(pages, pageId) + .flatMap((page) => page.calls.map((call) => callRow(call, page.pageId))) + .sort((a, b) => b.at - a.at || Number(b.id) - Number(a.id)); +} + +/** Older calls the picked pages dropped at `limits.webmcpCalls`. */ +export function droppedCalls(pages: WebMcpPageView[], pageId: string): number { + return pickPages(pages, pageId).reduce((sum, page) => sum + (page.dropped ?? 0), 0); +} + +const LAYER_LABEL: Record = { + http: 'HTTP', + ngrx: 'NgRx', + router: 'Router', + forms: 'Forms', + signals: 'Signals', +}; + +const TAB_LABEL: Record = Object.fromEntries( + PANEL_TABS.map((tab) => [tab.id, tab.label]), +); + +const CERTAINTY_TEXT: Record = { + caused: 'caused', + during: 'probably caused', +}; + +export interface WebMcpEffectRow { + key: string; + layer: WebMcpEffectLayer; + layerLabel: string; + title: string; + detail?: string; + at: number; + certainty: WebMcpCertainty; + certaintyText: string; + /** Whether the effect changed data: outside the component, or a signal write. */ + write: boolean; + link: PanelLink; + tabLabel: string; +} + +export interface WebMcpCallTrace { + effects: WebMcpEffectRow[]; + verdict?: 'warning' | 'info'; + verdictText?: string; + userInput: boolean; +} + +const VERDICT_TEXT = { + warning: 'The tool claims readOnlyHint, but this call changed data outside signals.', + info: "The tool claims readOnlyHint. This call changed local state: it wrote only the app's own signals.", +} as const; + +/** The tool `call` ran on its page, when the page still lists it. */ +export function toolOf(pages: WebMcpPageView[], call: WebMcpCallRow): WebMcpPageTool | undefined { + return pages.find((page) => page.pageId === call.pageId)?.tools.find((t) => t.name === call.tool); +} + +/** What `call` did on its page, joined from the other inspectors' shared states. */ +export function traceRow( + call: WebMcpCallRow, + pages: WebMcpPageView[], + sources: WebMcpTraceSources, + now?: number, +): WebMcpCallTrace { + const tool = toolOf(pages, call); + const trace = traceCall(call.entry, call.pageId, sources, { + ...(tool ? { tool } : {}), + ...(now !== undefined ? { now } : {}), + }); + return { + effects: trace.effects.map((effect, index) => ({ + key: `${effect.layer}:${effect.key}:${index}`, + layer: effect.layer, + layerLabel: LAYER_LABEL[effect.layer] ?? effect.layer, + title: effect.title, + ...(effect.detail ? { detail: effect.detail } : {}), + at: effect.at, + certainty: effect.certainty, + certaintyText: CERTAINTY_TEXT[effect.certainty], + write: effect.change !== 'none', + link: { + tab: effect.tab, + ...(effect.id ? { id: effect.id } : {}), + ...(call.pageId ? { page: call.pageId } : {}), + }, + tabLabel: TAB_LABEL[effect.tab] ?? effect.tab, + })), + ...(trace.verdict ? { verdict: trace.verdict, verdictText: VERDICT_TEXT[trace.verdict] } : {}), + userInput: trace.userInput, + }; +} diff --git a/app/src/pages/webmcp-inspector.ts b/app/src/pages/webmcp-inspector.ts new file mode 100644 index 00000000..bef1c31c --- /dev/null +++ b/app/src/pages/webmcp-inspector.ts @@ -0,0 +1,676 @@ +import { + Component, + DestroyRef, + computed, + effect, + inject, + input, + linkedSignal, + output, + signal, + untracked, +} from '@angular/core'; +import type { PanelLink } from '@pangular-inspector/devtools/internal/config'; +import type { WebMcpTraceSources } from '@pangular-inspector/devtools/internal/webmcp-trace'; +import type { DevframeRpcClient } from 'devframe/client'; +import { panelConfig } from '../devtools-config'; +import { hostPageId } from '../page-id'; +import { filterAnnouncement } from '../ui/filter-status'; +import { LimitNote } from '../ui/limit-note'; +import { RovingList } from '../ui/roving-list'; +import { SearchField } from '../ui/search-field'; +import { Select, type SelectOption } from '../ui/select'; +import { clockTime, spanText } from './timeline-data'; +import { WebMcpCallDetail } from './webmcp-call-detail'; +import { + ALL_PAGES, + callRows, + defaultWebMcpPage, + droppedCalls, + pageLabel, + pickPages, + toolOf, + toolRows, + traceRow, + webMcpPages, + type WebMcpCallRow, + type WebMcpPageView, +} from './webmcp-data'; +import { WebMcpToolDetail } from './webmcp-tool-detail'; + +type View = 'tools' | 'calls'; + +/** A call to select, from a deep link such as the Timeline's. */ +export interface WebMcpFocus { + id: string; + page?: string; +} + +/** The shared states the call trace reads, by their key in `WebMcpTraceSources`. */ +const TRACE_STATES: readonly [keyof WebMcpTraceSources, string][] = [ + ['http', 'http'], + ['ngrx', 'ngrx-store'], + ['router', 'router'], + ['forms', 'forms'], + ['signals', 'signal-graph'], +]; + +@Component({ + selector: 'app-webmcp-inspector', + imports: [Select, RovingList, LimitNote, SearchField, WebMcpToolDetail, WebMcpCallDetail], + template: ` +

+ The tools the live page registers with modelContext for browser agents, and each + call an agent made, with what it changed on the page. Values are masked like other live data. +

+ @if (!loaded()) { +

Loading WebMCP tools…

+ } @else if (failed()) { + + } @else if (!pages().length) { +
+

No page reports WebMCP yet.

+

+ Open the app with the overlay loaded. Tools show up here once the page registers them with + modelContext.registerTool(), and calls once an agent runs one. +

+
+ } @else { +
+
+ + +
+ + @if (pageOptions().length > 2) { + + } + {{ countText() }} +

{{ countStatus() }}

+
+ + @for (page of noModelContext(); track page.pageId) { +

+ {{ showPage() ? pageName(page.pageId) + ' has' : 'This page has' }} no + modelContext, so a browser agent sees none of these tools. +

+ } + + @if (view() === 'tools') { +
+
+

Tools

+ @if (!tools().length) { +

+ @if (noModelContext().length === picked().length) { + No tools. The browser has no modelContext, so the page could not + register any. + } @else { + The page registered no WebMCP tools yet. + } +

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

No tool matches “{{ query() }}”.

+ +
+ } @else { +
    + @for (tool of shownTools(); track tool.key) { +
  • + +
  • + } +
+ } +
+ +
+ } @else { + +
+
+

Calls

+ @if (!calls().length) { +

+ No calls yet. Calls show up here when an agent runs one of the page's tools. +

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

No call matches “{{ query() }}”.

+ +
+ } @else { +
    + @for (call of shownCalls(); track call.key) { +
  1. + +
  2. + } +
+ } +
+ +
+ } + } + `, + styles: ` + @use 'mixins' as m; + + :host { + display: block; + font-size: 13px; + } + h2 { + margin: 0 0 8px; + @include m.label; + } + .intro { + margin: 0 0 12px; + color: var(--text-2); + line-height: 1.5; + } + code { + font-family: var(--font-mono); + font-size: 12px; + } + .muted { + margin: 0; + color: var(--text-2); + line-height: 1.5; + } + .state, + .empty { + margin: 0 0 12px; + color: var(--text-2); + line-height: 1.5; + } + .state p, + .empty p { + margin: 0 0 8px; + } + .toolbar { + position: sticky; + top: 0; + z-index: 2; + display: flex; + flex-wrap: wrap; + gap: 8px 12px; + align-items: center; + margin: 0 0 12px; + padding: 8px; + background: color-mix(in srgb, var(--surface) 85%, transparent); + backdrop-filter: blur(10px); + border: 1px solid var(--border); + border-radius: var(--radius); + } + .views { + display: inline-flex; + gap: 4px; + } + .view { + display: inline-flex; + gap: 6px; + align-items: center; + height: var(--control-h); + padding: 0 12px; + border: 1px solid var(--control-border); + border-radius: var(--radius-sm); + background: var(--surface); + color: var(--text); + font: inherit; + cursor: pointer; + transition: background-color 150ms var(--ease); + } + .view:hover { + background: var(--surface-2); + } + .view[aria-pressed='true'] { + border-color: var(--accent-line); + background: var(--accent-soft); + color: var(--text-strong); + } + .view:focus-visible { + @include m.focus-ring; + } + .badge { + color: var(--text-2); + font-variant-numeric: tabular-nums; + } + .search { + flex: 1 1 200px; + min-width: 0; + } + .page-select { + flex: 0 1 200px; + min-width: 0; + } + .count { + margin-left: auto; + color: var(--text-2); + font-size: 12px; + font-variant-numeric: tabular-nums; + } + .notice { + margin: 0 0 12px; + padding: 8px 12px; + border: 1px solid var(--border); + border-radius: var(--radius-sm); + background: var(--surface); + color: var(--text-2); + line-height: 1.5; + } + .split { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); + gap: 12px; + align-items: start; + } + @media (max-width: 880px) { + .split { + grid-template-columns: minmax(0, 1fr); + } + } + .list { + min-width: 0; + } + .rows { + display: grid; + margin: 0; + padding: 0; + list-style: none; + border: 1px solid var(--border); + border-radius: var(--radius); + overflow: hidden; + } + .rows li + li { + border-top: 1px solid var(--border); + } + .row { + display: flex; + flex-wrap: wrap; + gap: 4px 10px; + align-items: center; + width: 100%; + min-width: 0; + padding: 6px 10px; + border: 0; + background: var(--surface); + color: var(--text); + font: inherit; + text-align: left; + cursor: pointer; + transition: background-color 150ms var(--ease); + } + .row:hover { + background: var(--surface-2); + } + .row.selected { + background: var(--accent-soft); + box-shadow: inset 3px 0 0 var(--accent); + } + .row:focus-visible { + @include m.focus-ring(-2px); + } + .when { + color: var(--text-2); + font-size: 12px; + font-variant-numeric: tabular-nums; + } + .title { + flex: 1 1 160px; + min-width: 0; + color: var(--text-strong); + font-family: var(--font-mono); + font-size: 12px; + overflow-wrap: anywhere; + } + .detail { + color: var(--text-2); + font-size: 12px; + overflow-wrap: anywhere; + } + .pill { + display: inline-flex; + align-items: center; + padding: 0 8px; + border: 1px solid var(--border); + border-radius: 99px; + background: var(--surface-2); + color: var(--text-2); + font-size: 11px; + font-weight: 600; + line-height: 18px; + white-space: nowrap; + } + .pill[data-tone='ok'] { + @include m.tint(ok); + } + .pill[data-tone='warn'] { + @include m.tint(warn); + } + .pill[data-tone='danger'] { + @include m.tint(danger); + } + .detail-panel { + @include m.panel; + position: sticky; + top: 64px; + display: grid; + gap: 8px; + min-width: 0; + padding: 12px; + } + .detail-panel h2 { + margin: 0; + } + .small { + height: var(--control-h); + padding: 0 12px; + border: 1px solid var(--control-border); + border-radius: var(--radius-sm); + background: var(--surface-2); + color: var(--text); + font: inherit; + cursor: pointer; + } + .small:focus-visible { + @include m.focus-ring; + } + @media (prefers-reduced-motion: reduce) { + .view, + .row { + transition: none; + } + } + `, +}) +export class WebMcpInspector { + readonly rpc = input(null); + /** A call to select once it is listed. */ + readonly focus = input(null); + readonly focusHandled = output(); + /** Opens a tool's form or a call's effect in its own tab. */ + readonly open = output(); + + private readonly destroyRef = inject(DestroyRef); + private readonly hostPageId = hostPageId(); + private cleanups: (() => void)[] = []; + private loads = 0; + protected readonly allPages = ALL_PAGES; + protected readonly clock = clockTime; + protected readonly span = spanText; + + readonly loaded = signal(false); + readonly failed = signal(false); + readonly pages = signal([]); + /** The latest value of each shared state the trace reads. */ + readonly sources = signal({}); + readonly view = signal('tools'); + readonly query = signal(''); + readonly toolKey = signal(null); + readonly callKey = signal(null); + + /** Keeps the picked page while it reports, and falls back once it is gone. */ + readonly pageId = linkedSignal({ + source: () => this.pages(), + computation: (pages, previous) => + previous?.value && + (previous.value === ALL_PAGES || pages.some((page) => page.pageId === previous.value)) + ? previous.value + : defaultWebMcpPage(pages, this.hostPageId), + }); + readonly pageOptions = computed(() => [ + { value: ALL_PAGES, label: 'All pages' }, + ...this.pages().map((page) => ({ + value: page.pageId, + label: pageLabel(page), + ...(page.url && page.url !== pageLabel(page) ? { hint: page.url } : {}), + })), + ]); + readonly showPage = computed(() => this.pageId() === ALL_PAGES && this.pages().length > 1); + readonly picked = computed(() => pickPages(this.pages(), this.pageId())); + readonly noModelContext = computed(() => this.picked().filter((page) => !page.modelContext)); + readonly formsOn = computed(() => panelConfig(this.rpc()).inspectors.forms); + readonly maxCalls = computed(() => panelConfig(this.rpc()).limits.webmcpCalls); + readonly dropped = computed(() => droppedCalls(this.pages(), this.pageId())); + + readonly tools = computed(() => toolRows(this.pages(), this.pageId())); + readonly calls = computed(() => callRows(this.pages(), this.pageId())); + readonly shownTools = computed(() => { + const text = this.query().trim().toLowerCase(); + if (!text) return this.tools(); + return this.tools().filter( + (tool) => + tool.name.toLowerCase().includes(text) || tool.description.toLowerCase().includes(text), + ); + }); + readonly shownCalls = computed(() => { + const text = this.query().trim().toLowerCase(); + if (!text) return this.calls(); + return this.calls().filter( + (call) => + call.tool.toLowerCase().includes(text) || call.outcomeText.toLowerCase().includes(text), + ); + }); + readonly selectedTool = computed( + () => this.tools().find((tool) => tool.key === this.toolKey()) ?? null, + ); + readonly selectedCall = computed( + () => this.calls().find((call) => call.key === this.callKey()) ?? null, + ); + readonly selectedTrace = computed(() => { + const call = this.selectedCall(); + return call ? traceRow(call, this.pages(), this.sources()) : null; + }); + /** Calls of tools that claim `readOnlyHint` but changed data outside signals. */ + readonly warned = computed(() => { + const pages = this.pages(); + const sources = this.sources(); + const keys = new Set(); + for (const call of this.calls()) { + if (toolOf(pages, call)?.annotations?.['readOnlyHint'] !== true) continue; + if (traceRow(call, pages, sources).verdict === 'warning') keys.add(call.key); + } + return keys; + }); + + readonly countText = computed(() => { + const [shown, total, noun] = + this.view() === 'tools' + ? [this.shownTools().length, this.tools().length, 'tool'] + : [this.shownCalls().length, this.calls().length, 'call']; + return `${shown} of ${total} ${total === 1 ? noun : `${noun}s`}`; + }); + /** Speaks the count only after the user changes the view, search or page. */ + readonly countStatus = filterAnnouncement( + () => [this.view(), this.query(), this.pageId()], + () => this.countText(), + ); + + constructor() { + effect(() => { + const client = this.rpc(); + if (client) void this.load(client); + }); + // A deep link selects its call once the call is listed. + effect(() => { + const focus = this.focus(); + const pages = this.pages(); + if (!focus) return; + const page = focus.page + ? pages.find((p) => p.pageId === focus.page) + : pages.find((p) => p.calls.some((c) => String(c.id) === focus.id)); + const call = page?.calls.find((c) => String(c.id) === focus.id); + if (!page || !call) return; + untracked(() => { + this.view.set('calls'); + this.query.set(''); + if (this.pageId() !== ALL_PAGES && this.pageId() !== page.pageId) { + this.pageId.set(page.pageId); + } + this.callKey.set(`${page.pageId}:${call.id}`); + this.focusHandled.emit(); + }); + }); + this.destroyRef.onDestroy(() => this.stop()); + } + + pageName(pageId: string): string { + const page = this.pages().find((p) => p.pageId === pageId); + return page ? pageLabel(page) : pageId; + } + + clearFilters() { + this.query.set(''); + } + + retry() { + const client = this.rpc(); + if (client) void this.load(client); + } + + private stop() { + for (const cleanup of this.cleanups.splice(0)) cleanup(); + } + + private async load(client: DevframeRpcClient) { + this.stop(); + const load = ++this.loads; + this.failed.set(false); + const rpc = client.scope('pangular').rpc; + const current = () => !this.destroyRef.destroyed && load === this.loads; + // The trace reads what the other inspectors hold; a missing one only leaves its effects out. + for (const [key, name] of TRACE_STATES) { + rpc.sharedState(name).then( + (state) => { + if (!current()) return; + const apply = (value: unknown) => + this.sources.update((sources) => ({ ...sources, [key]: value })); + apply(state.value()); + this.cleanups.push(state.on('updated', apply)); + }, + () => {}, + ); + } + try { + const state = await rpc.sharedState('webmcp'); + if (!current()) return; + const apply = (value: unknown) => this.pages.set(webMcpPages(value)); + apply(state.value()); + this.cleanups.push(state.on('updated', apply)); + } catch { + if (current()) this.failed.set(true); + } finally { + if (current()) this.loaded.set(true); + } + } +} diff --git a/app/src/pages/webmcp-tool-detail.ts b/app/src/pages/webmcp-tool-detail.ts new file mode 100644 index 00000000..4e00b43e --- /dev/null +++ b/app/src/pages/webmcp-tool-detail.ts @@ -0,0 +1,198 @@ +import { Component, input, output } from '@angular/core'; +import type { PanelLink } from '@pangular-inspector/devtools/internal/config'; +import type { WebMcpToolRow } from './webmcp-data'; + +/** One WebMCP tool in full: what the page registered and what it claims. */ +@Component({ + selector: 'app-webmcp-tool-detail', + template: ` + @let t = tool(); +

{{ t.name }}

+
+ {{ t.statusText }} + @if (t.duplicate) { + duplicate name + } + @if (t.readOnly) { + claims read only + } @else { + may change data + } +
+ @if (t.description) { +

{{ t.description }}

+ } @else { +

The page gave no description.

+ } + @if (t.error) { +

{{ t.error }}

+ } + @if (t.duplicate) { +

+ Another tool on this page has the same name, so the browser keeps only one of them. +

+ } + +

Annotations claimed by the page

+ @if (t.claims.length) { +
    + @for (claim of t.claims; track claim) { +
  • + {{ claim }} +
  • + } +
+ } @else { +

None.

+ } + @if (!t.readOnly) { +

+ Without readOnlyHint: true the tool is treated as able to change data. +

+ } @else { +

+ The page says this tool only reads. Calls that change data are flagged in the Calls list. +

+ } + +

Inputs

+ @if (t.inputs.length) { +
    + @for (entry of t.inputs; track entry.text) { +
  • + {{ entry.text }} + @if (entry.required) { + required + } +
  • + } +
+ } @else { +

No inputs.

+ } + + @if (t.formId) { +

Form

+

+ {{ t.formId }} + @if (canShowForm()) { + + } +

+ } + @if (t.listed) { +

+ The tool was registered before the inspector attached, so earlier calls are not recorded. +

+ } + `, + styles: ` + @use 'mixins' as m; + + :host { + display: grid; + gap: 8px; + min-width: 0; + } + p { + margin: 0; + } + h3 { + margin: 4px 0 0; + @include m.label; + } + .name { + color: var(--text-strong); + font-family: var(--font-mono); + font-size: 12.5px; + font-weight: 600; + overflow-wrap: anywhere; + } + .pills { + display: flex; + flex-wrap: wrap; + gap: 6px; + } + .pill, + .tag { + display: inline-flex; + align-items: center; + padding: 0 8px; + border: 1px solid var(--border); + border-radius: 99px; + background: var(--surface-2); + color: var(--text-2); + font-size: 11px; + font-weight: 600; + line-height: 18px; + } + .pill[data-tone='ok'] { + @include m.tint(ok); + } + .pill[data-tone='warn'] { + @include m.tint(warn); + } + .pill[data-tone='danger'] { + @include m.tint(danger); + } + .description { + color: var(--text); + line-height: 1.5; + overflow-wrap: anywhere; + } + .problem { + color: var(--danger-text); + overflow-wrap: anywhere; + } + .muted { + color: var(--text-2); + line-height: 1.5; + } + code { + font-family: var(--font-mono); + font-size: 12px; + overflow-wrap: anywhere; + } + .lines { + display: grid; + gap: 4px; + margin: 0; + padding: 0 0 0 16px; + } + .lines li { + min-width: 0; + } + .tag { + margin-left: 6px; + } + .form { + display: flex; + flex-wrap: wrap; + gap: 6px 10px; + align-items: center; + } + .small { + height: var(--control-h); + padding: 0 12px; + border: 1px solid var(--control-border); + border-radius: var(--radius-sm); + background: var(--surface-2); + color: var(--text); + font: inherit; + cursor: pointer; + } + .small:focus-visible { + @include m.focus-ring; + } + `, +}) +export class WebMcpToolDetail { + readonly tool = input.required(); + /** Whether the Forms tab is on, so "Show form" has somewhere to go. */ + readonly canShowForm = input(true); + readonly open = output(); + + showForm(tool: WebMcpToolRow) { + if (tool.formId) this.open.emit({ tab: 'forms', id: tool.formId, page: tool.pageId }); + } +} diff --git a/app/src/types/tab.types.ts b/app/src/types/tab.types.ts index cc4f2682..ed75690e 100644 --- a/app/src/types/tab.types.ts +++ b/app/src/types/tab.types.ts @@ -16,6 +16,7 @@ export type Tab = | 'settings' | 'errors' | 'plugins' + | 'webmcp' | 'performance' | 'build'; diff --git a/app/tsconfig.json b/app/tsconfig.json index 786965b5..4342cc7b 100644 --- a/app/tsconfig.json +++ b/app/tsconfig.json @@ -24,7 +24,8 @@ "../packages/devtools/src/config.ts", "../packages/devtools/src/cd-data.ts", "../packages/devtools/src/http-data.ts", - "../packages/devtools/src/redaction-count.ts" + "../packages/devtools/src/redaction-count.ts", + "../packages/devtools/src/webmcp-trace.ts" ], "exclude": ["node_modules", "vite.config.ts", "vitest.config.ts"] } diff --git a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-uq6ycX2u.js b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-CPWctB97.js similarity index 95% rename from extension/ui/assets/browser-agent-rpc-KH4HHvHf-uq6ycX2u.js rename to extension/ui/assets/browser-agent-rpc-KH4HHvHf-CPWctB97.js index 05714ed2..353c8f15 100644 --- a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-uq6ycX2u.js +++ b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-CPWctB97.js @@ -1 +1 @@ -import{t as e}from"./index-xQ_9JX3C.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-B_rNrIsI.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-xQ_9JX3C.js b/extension/ui/assets/index-B_rNrIsI.js similarity index 70% rename from extension/ui/assets/index-xQ_9JX3C.js rename to extension/ui/assets/index-B_rNrIsI.js index 239f3245..036ee723 100644 --- a/extension/ui/assets/index-xQ_9JX3C.js +++ b/extension/ui/assets/index-B_rNrIsI.js @@ -1,14 +1,14 @@ (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Object.defineProperty,t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,i=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,a=(e,a)=>{for(var o in a||={})n.call(a,o)&&i(e,o,a[o]);if(t)for(var o of t(a))r.call(a,o)&&i(e,o,a[o]);return e},o=(e,t,n)=>(i(e,typeof t==`symbol`?t:t+``,n),n),s=globalThis;function c(e){let t=s.__Zone_symbol_prefix;return(typeof t==`string`?t:`__zone_symbol__`)+e}function l(){let e=s.performance;function t(t){e&&e.mark&&e.mark(t)}function n(t,n){e&&e.measure&&e.measure(t,n)}t(`Zone`);let r=class e{constructor(e,t){o(this,`_parent`),o(this,`_name`),o(this,`_properties`),o(this,`_zoneDelegate`),this._parent=e,this._name=t?t.name||`unnamed`:``,this._properties=t&&t.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,t)}static assertZonePatched(){if(s.Promise!==me.ZoneAwarePromise)throw Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let t=e.current;for(;t.parent;)t=t.parent;return t}static get current(){return ge.zone}static get currentTask(){return _e}static __load_patch(r,i,a=!1){if(Object.hasOwn(me,r)){let e=s[c(`forceDuplicateZoneCheck`)]===!0;if(!a&&e)throw Error(`Already loaded patch: `+r)}else if(!s[`__Zone_disable_`+r]){let a=`Zone:`+r;t(a),me[r]=i(s,e,he),n(a,a)}}get parent(){return this._parent}get name(){return this._name}get(e){let t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(Object.hasOwn(t._properties,e))return t;t=t._parent}return null}fork(e){if(!e)throw Error(`ZoneSpec required!`);return this._zoneDelegate.fork(this,e)}wrap(e,t){if(typeof e!=`function`)throw Error(`Expecting function got: `+e);let n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}}run(e,t,n,r){ge={parent:ge,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{ge=ge.parent}}runGuarded(e,t=null,n,r){ge={parent:ge,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{ge=ge.parent}}runTask(e,t,n){if(e.zone!=this)throw Error(`A task can only be run in the zone of creation! (Creation: `+(e.zone||ie).name+`; Execution: `+this.name+`)`);let r=e,{type:i,data:{isPeriodic:a=!1,isRefreshable:o=!1}={}}=e;if(e.state===ae&&(i===pe||i===fe))return;let s=e.state!=ce;s&&r._transitionTo(ce,se);let c=_e;_e=r,ge={parent:ge,zone:this};try{i==fe&&e.data&&!a&&!o&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,r,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{let t=e.state;if(t!==ae&&t!==ue){if(i==pe||a||o&&t===oe)s&&r._transitionTo(se,ce,oe);else{let e=r._zoneDelegates;this._updateTaskCount(r,-1),s&&r._transitionTo(ae,ce,ae),o&&(r._zoneDelegates=e)}}ge=ge.parent,_e=c}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(oe,ae);let t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(ue,oe,ae),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==oe&&e._transitionTo(se,oe),e}scheduleMicroTask(e,t,n,r){return this.scheduleTask(new u(de,e,t,n,r,void 0))}scheduleMacroTask(e,t,n,r,i){return this.scheduleTask(new u(fe,e,t,n,r,i))}scheduleEventTask(e,t,n,r,i){return this.scheduleTask(new u(pe,e,t,n,r,i))}cancelTask(e){if(e.zone!=this)throw Error(`A task can only be cancelled in the zone of creation! (Creation: `+(e.zone||ie).name+`; Execution: `+this.name+`)`);if(e.state===se||e.state===ce){e._transitionTo(le,se,ce);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(ue,le),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(ae,le),e.runCount=-1,e}}_updateTaskCount(e,t){let n=e._zoneDelegates;t==-1&&(e._zoneDelegates=null);for(let r=0;re.hasTask(n,r),onScheduleTask:(e,t,n,r)=>e.scheduleTask(n,r),onInvokeTask:(e,t,n,r,i,a)=>e.invokeTask(n,r,i,a),onCancelTask:(e,t,n,r)=>e.cancelTask(n,r)};class l{constructor(e,t,n){o(this,`_zone`),o(this,`_taskCounts`,{microTask:0,macroTask:0,eventTask:0}),o(this,`_forkDlgt`),o(this,`_forkZS`),o(this,`_forkCurrZone`),o(this,`_interceptDlgt`),o(this,`_interceptZS`),o(this,`_interceptCurrZone`),o(this,`_invokeDlgt`),o(this,`_invokeZS`),o(this,`_invokeCurrZone`),o(this,`_handleErrorDlgt`),o(this,`_handleErrorZS`),o(this,`_handleErrorCurrZone`),o(this,`_scheduleTaskDlgt`),o(this,`_scheduleTaskZS`),o(this,`_scheduleTaskCurrZone`),o(this,`_invokeTaskDlgt`),o(this,`_invokeTaskZS`),o(this,`_invokeTaskCurrZone`),o(this,`_cancelTaskDlgt`),o(this,`_cancelTaskZS`),o(this,`_cancelTaskCurrZone`),o(this,`_hasTaskDlgt`),o(this,`_hasTaskDlgtOwner`),o(this,`_hasTaskZS`),o(this,`_hasTaskCurrZone`),this._zone=e,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this._zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this._zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this._zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this._zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this._zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this._zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this._zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;let r=n&&n.onHasTask,i=t&&t._hasTaskZS;(r||i)&&(this._hasTaskZS=r?n:a,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,n.onScheduleTask||(this._scheduleTaskZS=a,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this._zone),n.onInvokeTask||(this._invokeTaskZS=a,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this._zone),n.onCancelTask||(this._cancelTaskZS=a,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this._zone))}get zone(){return this._zone}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new i(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,r,i){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,i):t.apply(n,r)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||=t;else if(t.scheduleFn)t.scheduleFn(t);else if(t.type==de)ne(t);else throw Error(`Task is missing scheduleFn.`);return n}invokeTask(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error(`Task is not cancelable`);n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}}_updateTaskCount(e,t){let n=this._taskCounts,r=n[e],i=n[e]=r+t;if(i<0)throw Error(`More tasks executed then were scheduled.`);if(r==0||i==0){let t={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};this.hasTask(this._zone,t)}}}class u{constructor(e,t,n,r,i,a){if(o(this,`type`),o(this,`source`),o(this,`invoke`),o(this,`callback`),o(this,`data`),o(this,`scheduleFn`),o(this,`cancelFn`),o(this,`_zone`,null),o(this,`runCount`,0),o(this,`_zoneDelegates`,null),o(this,`_state`,`notScheduled`),this.type=e,this.source=t,this.data=r,this.scheduleFn=i,this.cancelFn=a,!n)throw Error(`callback is not defined`);this.callback=n;let c=this;this.invoke=e===pe&&r&&r.useG?u.invokeTask:function(){return u.invokeTask.call(s,c,this,arguments)}}static invokeTask(e,t,n){e||=this,ve++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{try{ve===1&&!s[m]&&re()}finally{ve--}}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(ae,oe)}_transitionTo(e,t,n){if(this._state===t||this._state===n)this._state=e,e==ae&&(this._zoneDelegates=null);else throw Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?` or '`+n+`'`:``}, was '${this._state}'.`)}toString(){return this.data&&this.data.handleId!==void 0?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}let d=c(`setTimeout`),f=c(`Promise`),p=c(`then`),m=c(`enable_native_microtask_draining`),ee=[],h=!1,g;function te(e){!g&&s[f]&&(g=s[f].resolve(0)),g?(g[p]??g.then).call(g,e):s[d](e,0)}function ne(e){let t=s[m],n=t&&ee.length===0&&!h,r=!t&&ve===0&&ee.length===0;(n||r)&&te(re),e&&ee.push(e)}function re(){if(!h){h=!0;try{for(;ee.length;){let e=ee;ee=[];for(let t of e)try{t.zone.runTask(t,null,null)}catch(e){he.onUnhandledError(e)}}}finally{if(s[m])h=!1,he.microtaskDrainDone();else try{he.microtaskDrainDone()}finally{h=!1}}}}let ie={name:`NO ZONE`},ae=`notScheduled`,oe=`scheduling`,se=`scheduled`,ce=`running`,le=`canceling`,ue=`unknown`,de=`microTask`,fe=`macroTask`,pe=`eventTask`,me=Object.create(null),he={symbol:c,currentZoneFrame:()=>ge,onUnhandledError:ye,microtaskDrainDone:ye,scheduleMicroTask:ne,showUncaughtError:()=>!i[c(`ignoreConsoleErrorUncaughtError`)],patchEventTarget:()=>[],patchOnProperties:ye,patchMethod:()=>ye,bindArguments:()=>[],patchThen:()=>ye,patchMacroTask:()=>ye,patchEventPrototype:()=>ye,getGlobalObjects:()=>void 0,ObjectDefineProperty:()=>ye,ObjectGetOwnPropertyDescriptor:()=>void 0,ObjectCreate:()=>void 0,ArraySlice:()=>[],patchClass:()=>ye,wrapWithCurrentZone:()=>ye,filterProperties:()=>[],attachOriginToPatched:()=>ye,_redefineProperty:()=>ye,patchCallbacks:()=>ye,nativeScheduleMicroTask:te},ge={parent:null,zone:new i(null,null)},_e=null,ve=0;function ye(){}return n(`Zone`,`Zone`),i}function u(){let e=globalThis,t=e[c(`forceDuplicateZoneCheck`)]===!0;if(e.Zone&&(t||typeof e.Zone.__symbol__!=`function`))throw Error(`Zone already loaded.`);return e.Zone??=l(),e.Zone}var d=Object.getOwnPropertyDescriptor,f=Object.defineProperty,p=Object.getPrototypeOf,m=Object.create,ee=Array.prototype.slice,h=`addEventListener`,g=`removeEventListener`,te=c(h),ne=c(g),re=`true`,ie=`false`,ae=c(``);function oe(e,t){return Zone.current.wrap(e,t)}function se(e,t,n,r,i){return Zone.current.scheduleMacroTask(e,t,n,r,i)}var ce=c,le=typeof window<`u`,ue=le?window:void 0,de=le&&ue||globalThis,fe=`removeAttribute`;function pe(e,t){for(let n=e.length-1;n>=0;n--)typeof e[n]==`function`&&(e[n]=oe(e[n],t+`_`+n));return e}function me(e,t){let n=e.constructor.name;for(let r=0;r{let t=function(){return e.apply(this,pe(arguments,n+`.`+i))};return ke(t,e),t})(a)}}}function he(e){return e?e.writable===!1?!1:typeof e.get!=`function`||e.set!==void 0:!0}var ge=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope,_e=!(`nw`in de)&&de.process!==void 0&&de.process.toString()===`[object process]`,ve=!_e&&!ge&&!!(le&&ue.HTMLElement),ye=de.process!==void 0&&de.process.toString()===`[object process]`&&!ge&&!!(le&&ue.HTMLElement),be=Object.create(null),xe=ce(`enable_beforeunload`),Se=function(e){if(e||=de.event,!e)return;let t=be[e.type];t||=be[e.type]=ce(`ON_PROPERTY`+e.type);let n=this||e.target||de,r=n[t],i;if(ve&&n===ue&&e.type===`error`){let t=e;i=r&&r.call(this,t.message,t.filename,t.lineno,t.colno,t.error),i===!0&&e.preventDefault()}else i=r&&r.apply(this,arguments),e.type===`beforeunload`&&de[xe]&&typeof i==`string`?e.returnValue=i:i!=null&&!i&&e.preventDefault();return i};function Ce(e,t,n){let r=d(e,t);if(!r&&n&&d(n,t)&&(r={enumerable:!0,configurable:!0}),!r||!r.configurable)return;let i=ce(`on`+t+`patched`);if(Object.hasOwn(e,i)&&e[i])return;delete r.writable,delete r.value;let a=r.get,o=r.set,s=t.slice(2),c=be[s];c||=be[s]=ce(`ON_PROPERTY`+s),r.set=function(t){let n=this;!n&&e===de&&(n=de),n&&(typeof n[c]==`function`&&n.removeEventListener(s,Se),o?.call(n,null),n[c]=t,typeof t==`function`&&n.addEventListener(s,Se,!1))},r.get=function(){let n=this;if(!n&&e===de&&(n=de),!n)return null;let i=n[c];if(i)return i;if(a){let e=a.call(this);if(e)return r.set.call(this,e),typeof n[fe]==`function`&&n.removeAttribute(t),e}return null},f(e,t,r),e[i]=!0}function we(e,t,n){if(t)for(let r=0;rfunction(t,r){let a=n(t,r);return a.cbIdx>=0&&typeof r[a.cbIdx]==`function`?se(a.name,r[a.cbIdx],a,i):e.apply(t,r)})}function ke(e,t){e[ce(`OriginalDelegate`)]=t}function Ae(e){return typeof e==`function`}function je(e){return typeof e==`number`}var Me={useG:!0},Ne=Object.create(null),Pe={},Fe=RegExp(`^`+ae+`(\\w+)(true|false)$`),Ie=ce(`propagationStopped`),Le=[`capture`,`once`,`passive`,`signal`];function Re(e,t){let n=(t?t(e):e)+ie,r=(t?t(e):e)+re,i=ae+n,a=ae+r;Ne[e]={[ie]:i,[re]:a}}function ze(e,t,n,r){let i=r&&r.add||h,o=r&&r.rm||g,s=r&&r.listeners||`eventListeners`,c=r&&r.rmAll||`removeAllListeners`,l=ce(i),u=`.`+i+`:`,d=function(e,t,n){if(e.isRemoved)return;let r=e.callback;typeof r==`object`&&r.handleEvent&&(e.callback=e=>r.handleEvent(e),e.originalDelegate=r);let i;try{e.invoke(e,t,[n])}catch(e){i=e}let a=e.options;if(a&&typeof a==`object`&&a.once){let r=e.originalDelegate?e.originalDelegate:e.callback;t[o].call(t,n.type,r,a)}return i};function f(n,r,i){if(r||=e.event,!r)return;let a=n||r.target||e,o=a[Ne[r.type][i?re:ie]];if(o){let e=[];if(o.length===1){let t=d(o[0],a,r);t&&e.push(t)}else{let t=o.slice();for(let n=0;n{throw r})}}}let m=function(e){return f(this,e,!1)},ee=function(e){return f(this,e,!0)};function te(t,n){if(!t)return!1;let r=!0;n&&n.useG!==void 0&&(r=n.useG);let d=n&&n.vh,f=!0;n&&n.chkDup!==void 0&&(f=n.chkDup);let h=!1;n&&n.rt!==void 0&&(h=n.rt);let g=t;for(;g&&!Object.hasOwn(g,i);)g=p(g);if(!g&&t[i]&&(g=t),!g||g[l])return!1;let te=n&&n.eventNameToString,ne={},oe=g[l]=g[i],se=g[ce(o)]=g[o],le=g[ce(s)]=g[s],ue=g[ce(c)]=g[c],de;n&&n.prepend&&(de=g[ce(n.prepend)]=g[n.prepend]);function fe(e,t){return t?typeof e==`boolean`?{capture:e,passive:!0}:e?(typeof e==`object`&&e.passive!==!1&&(e.passive=!0),e):{passive:!0}:e}let pe=function(e){if(!ne.isExisting)return oe.call(ne.target,ne.eventName,ne.capture?ee:m,ne.options)},me=function(e){if(!e.isRemoved){let t=Ne[e.eventName],n;t&&(n=t[e.capture?re:ie]);let r=n&&e.target[n];if(r){for(let t=0;tve.zone.cancelTask(ve);t.call(g,`abort`,e,{once:!0}),ve.removeAbortListener=()=>g.removeEventListener(`abort`,e)}if(ne.target=null,ge&&(ge.taskData=null),oe&&(ne.options.once=!0),typeof ve.options!=`boolean`&&(ve.options=h),ve.target=l,ve.capture=ae,ve.eventName=u,m&&(ve.originalDelegate=p),c?ue.unshift(ve):ue.push(ve),s)return l}};return g[i]=Te(oe,u,ye,be,h),de&&(g.prependListener=Te(de,`.prependListener:`,ge,be,h,!0)),g[o]=function(){let t=this||e,r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));let i=arguments[2],a=i?typeof i==`boolean`||i.capture:!1,o=arguments[1];if(!o)return se.apply(this,arguments);if(d&&!d(se,o,t,arguments))return;let s=Ne[r],c;s&&(c=s[a?re:ie]);let l=c&&t[c];if(l)for(let e=0;efunction(t,n){t[Ie]=!0,e&&e.apply(t,n)})}function He(e,t){t.patchMethod(e,`queueMicrotask`,e=>function(e,t){Zone.current.scheduleMicroTask(`queueMicrotask`,t[0])})}var Ue=ce(`zoneTask`);function We(e,t,n,r){let i=null,a=null;t+=r,n+=r;let o={};function s(t){let n=t.data;n.args[0]=function(){return t.invoke.apply(this,arguments)};let r=i.apply(e,n.args);return je(r)?n.handleId=r:(n.handle=r,n.isRefreshable=Ae(r?.refresh)),t}function c(t){let{handle:n,handleId:r}=t.data;return a.call(e,n??r)}i=De(e,t,n=>function(i,a){if(Ae(a[0])){let e={isRefreshable:!1,isPeriodic:r===`Interval`,delay:r===`Timeout`||r===`Interval`?a[1]||0:void 0,args:a},n=a[0];a[0]=function(){try{return n.apply(this,arguments)}finally{let{handle:t,handleId:n,isPeriodic:r,isRefreshable:i}=e;!r&&!i&&(n?delete o[n]:t&&(t[Ue]=null))}};let i=se(t,a[0],e,s,c);if(!i)return i;let{handleId:l,handle:u,isRefreshable:d,isPeriodic:f}=i.data;if(l)o[l]=i;else if(u&&(u[Ue]=i,d&&!f)){let e=u.refresh;u.refresh=function(){let{zone:t,state:n}=i;return n===`notScheduled`?(i._state=`scheduled`,t._updateTaskCount(i,1)):n===`running`&&(i._state=`scheduling`),e.call(this)}}return u??l??i}return n.apply(e,a)}),a=De(e,n,t=>function(n,r){let i=r[0],a;je(i)?(a=o[i],delete o[i]):(a=i?.[Ue],a?i[Ue]=null:a=i),a?.type?a.cancelFn&&a.zone.cancelTask(a):t.apply(e,r)})}function Ge(e,t){let{isBrowser:n,isMix:r}=t.getGlobalObjects();(n||r)&&e.customElements&&`customElements`in e&&t.patchCallbacks(t,e.customElements,`customElements`,`define`,[`connectedCallback`,`disconnectedCallback`,`adoptedCallback`,`attributeChangedCallback`,`formAssociatedCallback`,`formDisabledCallback`,`formResetCallback`,`formStateRestoreCallback`])}function Ke(e,t){if(Zone[t.symbol(`patchEventTarget`)])return;let{eventNames:n,zoneSymbolEventNames:r,TRUE_STR:i,FALSE_STR:a,ZONE_SYMBOL_PREFIX:o}=t.getGlobalObjects();for(let e=0;et.target===e);if(r.length===0)return t;let i=r[0].ignoreProperties;return t.filter(e=>i.indexOf(e)===-1)}function Ye(e,t,n,r){e&&we(e,Je(e,t,n),r)}function Xe(e){return Object.getOwnPropertyNames(e).filter(e=>e.startsWith(`on`)&&e.length>2).map(e=>e.substring(2))}function eee(e,t){if(_e&&!ye||Zone[e.symbol(`patchEvents`)])return;let n=t.__Zone_ignore_on_properties,r=[];if(ve){let e=window;r=r.concat([`Document`,`SVGElement`,`Element`,`HTMLElement`,`HTMLBodyElement`,`HTMLMediaElement`,`HTMLFrameSetElement`,`HTMLFrameElement`,`HTMLIFrameElement`,`HTMLMarqueeElement`,`Worker`]),Ye(e,Xe(e),n,p(e))}r=r.concat([`XMLHttpRequest`,`XMLHttpRequestEventTarget`,`IDBIndex`,`IDBRequest`,`IDBOpenDBRequest`,`IDBDatabase`,`IDBTransaction`,`IDBCursor`,`WebSocket`]);for(let e=0;e{let t=`clear`;We(e,`set`,t,`Timeout`),We(e,`set`,t,`Interval`),We(e,`set`,t,`Immediate`)}),e.__load_patch(`requestAnimationFrame`,e=>{We(e,`request`,`cancel`,`AnimationFrame`),We(e,`mozRequest`,`mozCancel`,`AnimationFrame`),We(e,`webkitRequest`,`webkitCancel`,`AnimationFrame`)}),e.__load_patch(`blocking`,(e,t)=>{let n=[`alert`,`prompt`,`confirm`];for(let r=0;rfunction(r,a){return t.current.run(n,e,a,i)})}}),e.__load_patch(`EventTarget`,(e,t,n)=>{qe(e,n),Ke(e,n);let r=e.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(e,n,[r.prototype])}),e.__load_patch(`MutationObserver`,(e,t,n)=>{Ee(`MutationObserver`),Ee(`WebKitMutationObserver`)}),e.__load_patch(`IntersectionObserver`,(e,t,n)=>{Ee(`IntersectionObserver`)}),e.__load_patch(`FileReader`,(e,t,n)=>{Ee(`FileReader`)}),e.__load_patch(`on_property`,(e,t,n)=>{eee(n,e)}),e.__load_patch(`customElements`,(e,t,n)=>{Ge(e,n)}),e.__load_patch(`XHR`,(e,t)=>{c(e);let n=ce(`xhrTask`),r=ce(`xhrSync`),i=ce(`xhrListener`),a=ce(`xhrScheduled`),o=ce(`xhrURL`),s=ce(`xhrErrorBeforeScheduled`);function c(e){let c=e.XMLHttpRequest;if(!c)return;let l=c.prototype;function u(e){return e[n]}let d=l[te],f=l[ne];if(!d){let t=e.XMLHttpRequestEventTarget;if(t){let e=t.prototype;d=e[te],f=e[ne]}}let p=`readystatechange`,m=`scheduled`;function ee(e){let r=e.data,o=r.target;o[a]=!1,o[s]=!1;let c=o[i];d||(d=o[te],f=o[ne]),c&&f.call(o,p,c);let l=o[i]=()=>{if(o.readyState===o.DONE){if(!r.aborted&&o[a]&&e.state===m){let n=o[t.__symbol__(`loadfalse`)];if(o.status!==0&&n&&n.length>0){let i=e.invoke;e.invoke=function(){let n=o[t.__symbol__(`loadfalse`)];for(let t=0;tfunction(e,t){return e[r]=t[2]==0,e[o]=t[1],re.apply(e,t)}),ie=ce(`fetchTaskAborting`),ae=ce(`fetchTaskScheduling`),oe=De(l,`send`,()=>function(e,n){if(t.current[ae]===!0||e[r])return oe.apply(e,n);{let t={target:e,url:e[o],isPeriodic:!1,args:n,aborted:!1},r=se(`XMLHttpRequest.send`,h,t,ee,g);e&&e[s]===!0&&!t.aborted&&r.state===m&&r.invoke()}}),le=De(l,`abort`,()=>function(e,n){let r=u(e);if(r&&typeof r.type==`string`){if(r.cancelFn==null||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}else if(t.current[ie]===!0)return le.apply(e,n)})}}),e.__load_patch(`geolocation`,e=>{e.navigator&&e.navigator.geolocation&&me(e.navigator.geolocation,[`getCurrentPosition`,`watchPosition`])}),e.__load_patch(`PromiseRejectionEvent`,(e,t)=>{function n(t){return function(n){Be(e,t).forEach(r=>{let i=e.PromiseRejectionEvent;if(i){let e=new i(t,{promise:n.promise,reason:n.rejection});r.invoke(e)}})}}e.PromiseRejectionEvent&&(t[ce(`unhandledPromiseRejectionHandler`)]=n(`unhandledrejection`),t[ce(`rejectionHandledHandler`)]=n(`rejectionhandled`))}),e.__load_patch(`queueMicrotask`,(e,t,n)=>{He(e,n)})}function nee(e){e.__load_patch(`ZoneAwarePromise`,(e,t,n)=>{let r=Object.getOwnPropertyDescriptor,i=Object.defineProperty;function a(e){return e&&e.toString===Object.prototype.toString?(e.constructor&&e.constructor.name||``)+`: `+JSON.stringify(e):e?e.toString():Object.prototype.toString.call(e)}let o=n.symbol,s=[],c=e[o(`DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION`)]!==!1,l=o(`Promise`),u=o(`then`);n.onUnhandledError=e=>{if(n.showUncaughtError()){let t=e&&e.rejection;t&&e.zone&&e.task?console.error(`Unhandled Promise rejection:`,t instanceof Error?t.message:t,`; Zone:`,e.zone.name,`; Task:`,e.task&&e.task.source,`; Value:`,t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=()=>{for(;s.length;){let e=s.shift();try{e.zone.runGuarded(()=>{throw e.throwOriginal?e.rejection:e})}catch(e){f(e)}}};let d=o(`unhandledPromiseRejectionHandler`);function f(e){n.onUnhandledError(e);try{let n=t[d];typeof n==`function`&&n.call(this,e)}catch{}}function p(e){return e&&typeof e.then==`function`}function m(e){return e}function ee(e){return pe.reject(e)}let h=o(`state`),g=o(`value`),te=o(`finally`),ne=o(`parentPromiseValue`),re=o(`parentPromiseState`);function ie(e,t){return n=>{try{se(e,t,n)}catch(t){se(e,!1,t)}}}let ae=function(){let e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},oe=o(`currentTaskTrace`);function se(e,r,o){let l=ae();if(e===o)throw TypeError(`Promise resolved with itself`);if(e[h]===null){let u=null;try{(typeof o==`object`||typeof o==`function`)&&(u=o&&o.then)}catch(t){return l(()=>{se(e,!1,t)})(),e}if(r!==!1&&o instanceof pe&&Object.hasOwn(o,h)&&Object.hasOwn(o,g)&&o[h]!==null)le(o),se(e,o[h],o[g]);else if(r!==!1&&typeof u==`function`)try{u.call(o,l(ie(e,r)),l(ie(e,!1)))}catch(t){l(()=>{se(e,!1,t)})()}else{e[h]=r;let l=e[g];if(e[g]=o,e[te]===te&&r===!0&&(e[h]=e[re],e[g]=e[ne]),r===!1&&o instanceof Error){let e=t.currentTask&&t.currentTask.data&&t.currentTask.data.__creationTrace__;e&&i(o,oe,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t{try{let r=e[g],i=!!n&&te===n[te];i&&(n[ne]=r,n[re]=a),se(n,!0,t.run(o,void 0,i&&o!==ee&&o!==m?[]:[r]))}catch(e){se(n,!1,e)}},n)}let de=function(){},fe=e.AggregateError;class pe{static toString(){return`function ZoneAwarePromise() { [native code] }`}static resolve(e){return e instanceof pe?e:se(new this(null),!0,e)}static reject(e){return se(new this(null),!1,e)}static withResolvers(){let e={};return e.promise=new pe((t,n)=>{e.resolve=t,e.reject=n}),e}static any(e){if(!e||typeof e[Symbol.iterator]!=`function`)return Promise.reject(new fe([],`All promises were rejected`));let t=[],n=0;try{for(let r of e)n++,t.push(pe.resolve(r))}catch{return Promise.reject(new fe([],`All promises were rejected`))}if(n===0)return Promise.reject(new fe([],`All promises were rejected`));let r=!1,i=[];return new pe((e,a)=>{for(let o=0;o{r||(r=!0,e(t))},e=>{i.push(e),n--,n===0&&(r=!0,a(new fe(i,`All promises were rejected`)))})})}static race(e){let t,n,r=new this((e,r)=>{t=e,n=r});function i(e){t(e)}function a(e){n(e)}for(let t of e)p(t)||(t=this.resolve(t)),t.then(i,a);return r}static all(e){return pe.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof pe?this:pe).allWithCallback(e,{thenCallback:e=>({status:`fulfilled`,value:e}),errorCallback:e=>({status:`rejected`,reason:e})})}static allWithCallback(e,t){let n,r,i=new this((e,t)=>{n=e,r=t}),a=2,o=0,s=[];for(let i of e){p(i)||(i=this.resolve(i));let e=o;try{i.then(r=>{s[e]=t?t.thenCallback(r):r,a--,a===0&&n(s)},i=>{t?(s[e]=t.errorCallback(i),a--,a===0&&n(s)):r(i)})}catch(e){r(e)}a++,o++}return a-=2,a===0&&n(s),i}constructor(e){let t=this;if(!(t instanceof pe))throw Error(`Must be an instanceof Promise.`);t[h]=null,t[g]=[];try{let n=ae();e&&e(n(ie(t,!0)),n(ie(t,!1)))}catch(e){se(t,!1,e)}}get[Symbol.toStringTag](){return`Promise`}get[Symbol.species](){return pe}then(e,n){let r=this.constructor?.[Symbol.species];(!r||typeof r!=`function`)&&(r=this.constructor||pe);let i=new r(de),a=t.current;return this[h]==null?this[g].push(a,i,e,n):ue(this,a,i,e,n),i}catch(e){return this.then(null,e)}finally(e){let n=this.constructor?.[Symbol.species];(!n||typeof n!=`function`)&&(n=pe);let r=new n(de);r[te]=te;let i=t.current;return this[h]==null?this[g].push(i,r,e,e):ue(this,i,r,e,e),r}}pe.resolve=pe.resolve,pe.reject=pe.reject,pe.race=pe.race,pe.all=pe.all;let me=e[l]=e.Promise;e.Promise=pe;let he=o(`thenPatched`);function ge(e){let t=e.prototype,n=r(t,`then`);if(n&&(n.writable===!1||!n.configurable))return;let i=t.then;t[u]=i,e.prototype.then=function(e,t){return new pe((e,t)=>{i.call(this,e,t)}).then(e,t)},e[he]=!0}n.patchThen=ge;function _e(e){return function(t,n){let r=e.apply(t,n);if(r instanceof pe)return r;let i=r.constructor;return i[he]||ge(i),r}}if(me){ge(me);let t=me.try;t&&typeof t==`function`&&(pe.try=t),De(e,`fetch`,e=>_e(e))}return Promise[t.__symbol__(`uncaughtPromiseErrors`)]=s,pe})}function Ze(e){e.__load_patch(`toString`,e=>{let t=Function.prototype.toString,n=ce(`OriginalDelegate`),r=ce(`Promise`),i=ce(`Error`),a=function(){if(typeof this==`function`){let a=this[n];if(a)return typeof a==`function`?t.call(a):Object.prototype.toString.call(a);if(this===Promise){let n=e[r];if(n)return t.call(n)}if(this===Error){let n=e[i];if(n)return t.call(n)}}return t.call(this)};a[n]=t,Function.prototype.toString=a;let o=Object.prototype.toString;Object.prototype.toString=function(){return typeof Promise==`function`&&this instanceof Promise?`[object Promise]`:o.call(this)}})}function Qe(e,t,n,r,i){let a=Zone.__symbol__(r);if(t[a])return;let o=t[a]=t[r];t[r]=function(a,s,c){return s&&s.prototype&&i.forEach(function(t){let i=`${n}.${r}::`+t,a=s.prototype;try{if(Object.hasOwn(a,t)){let n=e.ObjectGetOwnPropertyDescriptor(a,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,i),e._redefineProperty(s.prototype,t,n)):a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],i))}else a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],i))}catch{}}),o.call(t,a,s,c)},e.attachOriginToPatched(t[r],o)}function $e(e){e.__load_patch(`util`,(e,t,n)=>{let r=Xe(e);n.patchOnProperties=we,n.patchMethod=De,n.bindArguments=pe,n.patchMacroTask=Oe;let i=t.__symbol__(`BLACK_LISTED_EVENTS`),a=t.__symbol__(`UNPATCHED_EVENTS`);e[a]&&(e[i]=e[a]),e[i]&&(t[i]=t[a]=e[i]),n.patchEventPrototype=Ve,n.patchEventTarget=ze,n.ObjectDefineProperty=f,n.ObjectGetOwnPropertyDescriptor=d,n.ObjectCreate=m,n.ArraySlice=ee,n.patchClass=Ee,n.wrapWithCurrentZone=oe,n.filterProperties=Je,n.attachOriginToPatched=ke,n._redefineProperty=Object.defineProperty,n.patchCallbacks=Qe,n.getGlobalObjects=()=>({globalSources:Pe,zoneSymbolEventNames:Ne,eventNames:r,isBrowser:ve,isMix:ye,isNode:_e,TRUE_STR:re,FALSE_STR:ie,ZONE_SYMBOL_PREFIX:ae,ADD_EVENT_LISTENER_STR:h,REMOVE_EVENT_LISTENER_STR:g})})}function et(e){nee(e),Ze(e),$e(e)}var tt=u();et(tt),tee(tt);var nt=(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})(nt||{}),rt=(function(e){return e[e.None=0]=`None`,e[e.Const=1]=`Const`,e})(rt||{}),it=class{modifiers;constructor(e=rt.None){this.modifiers=e}hasModifier(e){return(this.modifiers&e)!==0}},at=(function(e){return e[e.Dynamic=0]=`Dynamic`,e[e.Bool=1]=`Bool`,e[e.String=2]=`String`,e[e.Int=3]=`Int`,e[e.Number=4]=`Number`,e[e.Function=5]=`Function`,e[e.Inferred=6]=`Inferred`,e[e.None=7]=`None`,e})(at||{}),ot=class extends it{name;constructor(e,t){super(t),this.name=e}visitType(e,t){return e.visitBuiltinType(this,t)}};at.Dynamic;var st=new ot(at.Inferred);at.Bool,at.Int,at.Number,at.String,at.Function,at.None;var _=(function(e){return e[e.Equals=0]=`Equals`,e[e.NotEquals=1]=`NotEquals`,e[e.Assign=2]=`Assign`,e[e.Identical=3]=`Identical`,e[e.NotIdentical=4]=`NotIdentical`,e[e.Minus=5]=`Minus`,e[e.Plus=6]=`Plus`,e[e.Divide=7]=`Divide`,e[e.Multiply=8]=`Multiply`,e[e.Modulo=9]=`Modulo`,e[e.And=10]=`And`,e[e.Or=11]=`Or`,e[e.BitwiseOr=12]=`BitwiseOr`,e[e.BitwiseAnd=13]=`BitwiseAnd`,e[e.Lower=14]=`Lower`,e[e.LowerEquals=15]=`LowerEquals`,e[e.Bigger=16]=`Bigger`,e[e.BiggerEquals=17]=`BiggerEquals`,e[e.NullishCoalesce=18]=`NullishCoalesce`,e[e.Exponentiation=19]=`Exponentiation`,e[e.In=20]=`In`,e[e.InstanceOf=21]=`InstanceOf`,e[e.AdditionAssignment=22]=`AdditionAssignment`,e[e.SubtractionAssignment=23]=`SubtractionAssignment`,e[e.MultiplicationAssignment=24]=`MultiplicationAssignment`,e[e.DivisionAssignment=25]=`DivisionAssignment`,e[e.RemainderAssignment=26]=`RemainderAssignment`,e[e.ExponentiationAssignment=27]=`ExponentiationAssignment`,e[e.AndAssignment=28]=`AndAssignment`,e[e.OrAssignment=29]=`OrAssignment`,e[e.NullishCoalesceAssignment=30]=`NullishCoalesceAssignment`,e})(_||{});function ct(e,t){return e==null||t==null?e==t:e.isEquivalent(t)}function lt(e,t,n){let r=e.length;if(r!==t.length)return!1;for(let i=0;ie.isEquivalent(t))}var dt=class{leadingComments;type;sourceSpan;constructor(e,t,n){this.leadingComments=n,this.type=e||null,this.sourceSpan=t||null}prop(e,t){return new xt(this,e,null,t)}key(e,t,n){return new St(this,e,t,n)}callFn(e,t,n,r){return new mt(this,e,null,t,n,r)}instantiate(e,t,n,r){return new ht(this,e,t,n)}conditional(e,t=null,n,r){return new yt(this,e,t,null,n)}equals(e,t){return new bt(_.Equals,this,e,null,t)}notEquals(e,t){return new bt(_.NotEquals,this,e,null,t)}identical(e,t){return new bt(_.Identical,this,e,null,t)}notIdentical(e,t){return new bt(_.NotIdentical,this,e,null,t)}minus(e,t){return new bt(_.Minus,this,e,null,t)}plus(e,t){return new bt(_.Plus,this,e,null,t)}divide(e,t){return new bt(_.Divide,this,e,null,t)}multiply(e,t){return new bt(_.Multiply,this,e,null,t)}modulo(e,t){return new bt(_.Modulo,this,e,null,t)}power(e,t){return new bt(_.Exponentiation,this,e,null,t)}and(e,t){return new bt(_.And,this,e,null,t)}bitwiseOr(e,t){return new bt(_.BitwiseOr,this,e,null,t)}bitwiseAnd(e,t){return new bt(_.BitwiseAnd,this,e,null,t)}or(e,t){return new bt(_.Or,this,e,null,t)}lower(e,t){return new bt(_.Lower,this,e,null,t)}lowerEquals(e,t){return new bt(_.LowerEquals,this,e,null,t)}bigger(e,t){return new bt(_.Bigger,this,e,null,t)}biggerEquals(e,t){return new bt(_.BiggerEquals,this,e,null,t)}isBlank(e){return this.equals(see,e)}nullishCoalesce(e,t){return new bt(_.NullishCoalesce,this,e,null,t)}toStmt(e){return new lee(this,null,e)}},ft=class e extends dt{name;constructor(e,t,n,r){super(t,n,r),this.name=e}isEquivalent(t){return t instanceof e&&this.name===t.name}isConstant(){return!1}visitExpression(e,t){return e.visitReadVarExpr(this,t)}clone(){return new e(this.name,this.type,this.sourceSpan)}set(e){return new bt(_.Assign,this,e,null,this.sourceSpan)}},pt=class e extends dt{expr;constructor(e,t,n,r){super(t,n,r),this.expr=e}visitExpression(e,t){return e.visitTypeofExpr(this,t)}isEquivalent(t){return t instanceof e&&t.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new e(this.expr.clone())}},mt=class e extends dt{fn;args;pure;isOptional;constructor(e,t,n,r,i=!1,a,o=!1){super(n,r,a),this.fn=e,this.args=t,this.pure=i,this.isOptional=o}get receiver(){return this.fn}isEquivalent(t){return t instanceof e&&this.fn.isEquivalent(t.fn)&&ut(this.args,t.args)&&this.pure===t.pure}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeFunctionExpr(this,t)}clone(){return new e(this.fn.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan,this.pure,[],this.isOptional)}},ht=class e extends dt{classExpr;args;constructor(e,t,n,r,i){super(n,r,i),this.classExpr=e,this.args=t}isEquivalent(t){return t instanceof e&&this.classExpr.isEquivalent(t.classExpr)&&ut(this.args,t.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInstantiateExpr(this,t)}clone(){return new e(this.classExpr.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan)}},gt=class e extends dt{body;flags;constructor(e,t,n,r){super(null,n,r),this.body=e,this.flags=t}isEquivalent(t){return t instanceof e&&this.body===t.body&&this.flags===t.flags}isConstant(){return!0}visitExpression(e,t){return e.visitRegularExpressionLiteral(this,t)}clone(){return new e(this.body,this.flags,this.sourceSpan)}},_t=class e extends dt{value;constructor(e,t,n,r){super(t,n,r),this.value=e}isEquivalent(t){return t instanceof e&&this.value===t.value}isConstant(){return!0}visitExpression(e,t){return e.visitLiteralExpr(this,t)}clone(){return new e(this.value,this.type,this.sourceSpan)}},vt=class e extends dt{value;typeParams;constructor(e,t,n=null,r,i){super(t,r,i),this.value=e,this.typeParams=n}isEquivalent(t){return t instanceof e&&this.value.name===t.value.name&&this.value.moduleName===t.value.moduleName}isConstant(){return!1}visitExpression(e,t){return e.visitExternalExpr(this,t)}clone(){return new e(this.value,this.type,this.typeParams,this.sourceSpan)}},yt=class e extends dt{condition;falseCase;trueCase;constructor(e,t,n=null,r,i,a){super(r||t.type,i,a),this.condition=e,this.falseCase=n,this.trueCase=t}isEquivalent(t){return t instanceof e&&this.condition.isEquivalent(t.condition)&&this.trueCase.isEquivalent(t.trueCase)&&ct(this.falseCase,t.falseCase)}isConstant(){return!1}visitExpression(e,t){return e.visitConditionalExpr(this,t)}clone(){return new e(this.condition.clone(),this.trueCase.clone(),this.falseCase?.clone(),this.type,this.sourceSpan)}},bt=class e extends dt{operator;rhs;lhs;constructor(e,t,n,r,i,a){super(r||t.type,i,a),this.operator=e,this.rhs=n,this.lhs=t}isEquivalent(t){return t instanceof e&&this.operator===t.operator&&this.lhs.isEquivalent(t.lhs)&&this.rhs.isEquivalent(t.rhs)}isConstant(){return!1}visitExpression(e,t){return e.visitBinaryOperatorExpr(this,t)}clone(){return new e(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan)}isAssignment(){let e=this.operator;return e===_.Assign||e===_.AdditionAssignment||e===_.SubtractionAssignment||e===_.MultiplicationAssignment||e===_.DivisionAssignment||e===_.RemainderAssignment||e===_.ExponentiationAssignment||e===_.AndAssignment||e===_.OrAssignment||e===_.NullishCoalesceAssignment}},xt=class e extends dt{receiver;name;isOptional;constructor(e,t,n,r,i,a=!1){super(n,r,i),this.receiver=e,this.name=t,this.isOptional=a}get index(){return this.name}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name&&this.isOptional===t.isOptional}isConstant(){return!1}visitExpression(e,t){return e.visitReadPropExpr(this,t)}set(e){return new bt(_.Assign,this.receiver.prop(this.name),e,null,this.sourceSpan)}clone(){return new e(this.receiver.clone(),this.name,this.type,this.sourceSpan,[],this.isOptional)}},St=class e extends dt{receiver;index;isOptional;constructor(e,t,n,r,i,a=!1){super(n,r,i),this.receiver=e,this.index=t,this.isOptional=a}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)&&this.isOptional===t.isOptional}isConstant(){return!1}visitExpression(e,t){return e.visitReadKeyExpr(this,t)}set(e){return new bt(_.Assign,this.receiver.key(this.index),e,null,this.sourceSpan)}clone(){return new e(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan,[],this.isOptional)}},ree=class e extends dt{entries;constructor(e,t,n,r){super(t,n,r),this.entries=e}isConstant(){return this.entries.every(e=>e.isConstant())}isEquivalent(t){return t instanceof e&&ut(this.entries,t.entries)}visitExpression(e,t){return e.visitLiteralArrayExpr(this,t)}clone(){return new e(this.entries.map(e=>e.clone()),this.type,this.sourceSpan)}},iee=class e{expression;constructor(e){this.expression=e}isEquivalent(t){return t instanceof e&&this.expression.isEquivalent(t.expression)}clone(){return new e(this.expression.clone())}isConstant(){return this.expression.isConstant()}},aee=class e extends dt{entries;valueType=null;constructor(e,t,n,r){super(t,n,r),this.entries=e,t&&(this.valueType=t.valueType)}isEquivalent(t){return t instanceof e&&ut(this.entries,t.entries)}isConstant(){return this.entries.every(e=>e.isConstant())}visitExpression(e,t){return e.visitLiteralMapExpr(this,t)}clone(){let t=this.entries.map(e=>e.clone());return new e(t,this.type,this.sourceSpan)}},oee=class e extends dt{expression;constructor(e,t,n){super(null,t,n),this.expression=e}isEquivalent(t){return t instanceof e&&this.expression.isEquivalent(t.expression)}isConstant(){return this.expression.isConstant()}visitExpression(e,t){return e.visitSpreadElementExpr(this,t)}clone(){return new e(this.expression.clone(),this.sourceSpan)}},see=new _t(null,st,null),Ct=(function(e){return e[e.None=0]=`None`,e[e.Final=1]=`Final`,e[e.Private=2]=`Private`,e[e.Exported=4]=`Exported`,e[e.Static=8]=`Static`,e})(Ct||{}),cee=class{modifiers;sourceSpan;leadingComments;constructor(e=Ct.None,t=null,n){this.modifiers=e,this.sourceSpan=t,this.leadingComments=n}hasModifier(e){return(this.modifiers&e)!==0}addLeadingComment(e){this.leadingComments=this.leadingComments??[],this.leadingComments.push(e)}},lee=class e extends cee{expr;constructor(e,t,n){super(Ct.None,t,n),this.expr=e}isEquivalent(t){return t instanceof e&&this.expr.isEquivalent(t.expr)}visitStatement(e,t){return e.visitExpressionStmt(this,t)}};(class e{static INSTANCE=new e;keyOf(e){if(e instanceof _t&&typeof e.value==`string`)return`"${e.value}"`;if(e instanceof _t)return String(e.value);if(e instanceof gt)return`/${e.body}/${e.flags??``}`;if(e instanceof ree){let t=[];for(let n of e.entries)t.push(this.keyOf(n));return`[${t.join(`,`)}]`}if(e instanceof aee){let t=[];for(let n of e.entries)if(n instanceof iee)t.push(`...`+this.keyOf(n.expression));else{let e=n.key;n.quoted&&(e=`"${e}"`),t.push(e+`:`+this.keyOf(n.value))}return`{${t.join(`,`)}}`}if(e instanceof vt)return`import("${e.value.moduleName}", ${e.value.name})`;if(e instanceof ft)return`read(${e.name})`;if(e instanceof pt)return`typeof(${this.keyOf(e.expr)})`;if(e instanceof oee)return`...${this.keyOf(e.expression)}`;throw Error(`${this.constructor.name} does not handle expressions of type ${e.constructor.name}`)}});var v=`@angular/core`,y=(()=>{class e{static core={name:null,moduleName:v};static namespaceHTML={name:`ɵɵnamespaceHTML`,moduleName:v};static namespaceMathML={name:`ɵɵnamespaceMathML`,moduleName:v};static namespaceSVG={name:`ɵɵnamespaceSVG`,moduleName:v};static element={name:`ɵɵelement`,moduleName:v};static elementStart={name:`ɵɵelementStart`,moduleName:v};static elementEnd={name:`ɵɵelementEnd`,moduleName:v};static foreignComponent={name:`ɵɵforeignComponent`,moduleName:v};static foreignContent={name:`ɵɵforeignContent`,moduleName:v};static foreignContentFn={name:`ɵɵforeignContentFn`,moduleName:v};static domElement={name:`ɵɵdomElement`,moduleName:v};static domElementStart={name:`ɵɵdomElementStart`,moduleName:v};static domElementEnd={name:`ɵɵdomElementEnd`,moduleName:v};static domElementContainer={name:`ɵɵdomElementContainer`,moduleName:v};static domElementContainerStart={name:`ɵɵdomElementContainerStart`,moduleName:v};static domElementContainerEnd={name:`ɵɵdomElementContainerEnd`,moduleName:v};static domTemplate={name:`ɵɵdomTemplate`,moduleName:v};static domListener={name:`ɵɵdomListener`,moduleName:v};static advance={name:`ɵɵadvance`,moduleName:v};static syntheticHostProperty={name:`ɵɵsyntheticHostProperty`,moduleName:v};static syntheticHostListener={name:`ɵɵsyntheticHostListener`,moduleName:v};static attribute={name:`ɵɵattribute`,moduleName:v};static classProp={name:`ɵɵclassProp`,moduleName:v};static elementContainerStart={name:`ɵɵelementContainerStart`,moduleName:v};static elementContainerEnd={name:`ɵɵelementContainerEnd`,moduleName:v};static elementContainer={name:`ɵɵelementContainer`,moduleName:v};static styleMap={name:`ɵɵstyleMap`,moduleName:v};static classMap={name:`ɵɵclassMap`,moduleName:v};static styleProp={name:`ɵɵstyleProp`,moduleName:v};static interpolate={name:`ɵɵinterpolate`,moduleName:v};static interpolate1={name:`ɵɵinterpolate1`,moduleName:v};static interpolate2={name:`ɵɵinterpolate2`,moduleName:v};static interpolate3={name:`ɵɵinterpolate3`,moduleName:v};static interpolate4={name:`ɵɵinterpolate4`,moduleName:v};static interpolate5={name:`ɵɵinterpolate5`,moduleName:v};static interpolate6={name:`ɵɵinterpolate6`,moduleName:v};static interpolate7={name:`ɵɵinterpolate7`,moduleName:v};static interpolate8={name:`ɵɵinterpolate8`,moduleName:v};static interpolateV={name:`ɵɵinterpolateV`,moduleName:v};static nextContext={name:`ɵɵnextContext`,moduleName:v};static resetView={name:`ɵɵresetView`,moduleName:v};static templateCreate={name:`ɵɵtemplate`,moduleName:v};static defer={name:`ɵɵdefer`,moduleName:v};static deferWhen={name:`ɵɵdeferWhen`,moduleName:v};static deferOnIdle={name:`ɵɵdeferOnIdle`,moduleName:v};static deferOnImmediate={name:`ɵɵdeferOnImmediate`,moduleName:v};static deferOnTimer={name:`ɵɵdeferOnTimer`,moduleName:v};static deferOnHover={name:`ɵɵdeferOnHover`,moduleName:v};static deferOnInteraction={name:`ɵɵdeferOnInteraction`,moduleName:v};static deferOnViewport={name:`ɵɵdeferOnViewport`,moduleName:v};static deferPrefetchWhen={name:`ɵɵdeferPrefetchWhen`,moduleName:v};static deferPrefetchOnIdle={name:`ɵɵdeferPrefetchOnIdle`,moduleName:v};static deferPrefetchOnImmediate={name:`ɵɵdeferPrefetchOnImmediate`,moduleName:v};static deferPrefetchOnTimer={name:`ɵɵdeferPrefetchOnTimer`,moduleName:v};static deferPrefetchOnHover={name:`ɵɵdeferPrefetchOnHover`,moduleName:v};static deferPrefetchOnInteraction={name:`ɵɵdeferPrefetchOnInteraction`,moduleName:v};static deferPrefetchOnViewport={name:`ɵɵdeferPrefetchOnViewport`,moduleName:v};static deferHydrateWhen={name:`ɵɵdeferHydrateWhen`,moduleName:v};static deferHydrateNever={name:`ɵɵdeferHydrateNever`,moduleName:v};static deferHydrateOnIdle={name:`ɵɵdeferHydrateOnIdle`,moduleName:v};static deferHydrateOnImmediate={name:`ɵɵdeferHydrateOnImmediate`,moduleName:v};static deferHydrateOnTimer={name:`ɵɵdeferHydrateOnTimer`,moduleName:v};static deferHydrateOnHover={name:`ɵɵdeferHydrateOnHover`,moduleName:v};static deferHydrateOnInteraction={name:`ɵɵdeferHydrateOnInteraction`,moduleName:v};static deferHydrateOnViewport={name:`ɵɵdeferHydrateOnViewport`,moduleName:v};static deferEnableTimerScheduling={name:`ɵɵdeferEnableTimerScheduling`,moduleName:v};static enableIncrementalHydrationRuntime={name:`ɵɵenableIncrementalHydrationRuntime`,moduleName:v};static conditionalCreate={name:`ɵɵconditionalCreate`,moduleName:v};static conditionalBranchCreate={name:`ɵɵconditionalBranchCreate`,moduleName:v};static conditional={name:`ɵɵconditional`,moduleName:v};static repeater={name:`ɵɵrepeater`,moduleName:v};static repeaterCreate={name:`ɵɵrepeaterCreate`,moduleName:v};static repeaterTrackByIndex={name:`ɵɵrepeaterTrackByIndex`,moduleName:v};static repeaterTrackByIdentity={name:`ɵɵrepeaterTrackByIdentity`,moduleName:v};static componentInstance={name:`ɵɵcomponentInstance`,moduleName:v};static text={name:`ɵɵtext`,moduleName:v};static enableBindings={name:`ɵɵenableBindings`,moduleName:v};static disableBindings={name:`ɵɵdisableBindings`,moduleName:v};static getCurrentView={name:`ɵɵgetCurrentView`,moduleName:v};static textInterpolate={name:`ɵɵtextInterpolate`,moduleName:v};static textInterpolate1={name:`ɵɵtextInterpolate1`,moduleName:v};static textInterpolate2={name:`ɵɵtextInterpolate2`,moduleName:v};static textInterpolate3={name:`ɵɵtextInterpolate3`,moduleName:v};static textInterpolate4={name:`ɵɵtextInterpolate4`,moduleName:v};static textInterpolate5={name:`ɵɵtextInterpolate5`,moduleName:v};static textInterpolate6={name:`ɵɵtextInterpolate6`,moduleName:v};static textInterpolate7={name:`ɵɵtextInterpolate7`,moduleName:v};static textInterpolate8={name:`ɵɵtextInterpolate8`,moduleName:v};static textInterpolateV={name:`ɵɵtextInterpolateV`,moduleName:v};static restoreView={name:`ɵɵrestoreView`,moduleName:v};static pureFunction0={name:`ɵɵpureFunction0`,moduleName:v};static pureFunction1={name:`ɵɵpureFunction1`,moduleName:v};static pureFunction2={name:`ɵɵpureFunction2`,moduleName:v};static pureFunction3={name:`ɵɵpureFunction3`,moduleName:v};static pureFunction4={name:`ɵɵpureFunction4`,moduleName:v};static pureFunction5={name:`ɵɵpureFunction5`,moduleName:v};static pureFunction6={name:`ɵɵpureFunction6`,moduleName:v};static pureFunction7={name:`ɵɵpureFunction7`,moduleName:v};static pureFunction8={name:`ɵɵpureFunction8`,moduleName:v};static pureFunctionV={name:`ɵɵpureFunctionV`,moduleName:v};static pipeBind1={name:`ɵɵpipeBind1`,moduleName:v};static pipeBind2={name:`ɵɵpipeBind2`,moduleName:v};static pipeBind3={name:`ɵɵpipeBind3`,moduleName:v};static pipeBind4={name:`ɵɵpipeBind4`,moduleName:v};static pipeBindV={name:`ɵɵpipeBindV`,moduleName:v};static domProperty={name:`ɵɵdomProperty`,moduleName:v};static ariaProperty={name:`ɵɵariaProperty`,moduleName:v};static property={name:`ɵɵproperty`,moduleName:v};static control={name:`ɵɵcontrol`,moduleName:v};static controlCreate={name:`ɵɵcontrolCreate`,moduleName:v};static animationEnterListener={name:`ɵɵanimateEnterListener`,moduleName:v};static animationLeaveListener={name:`ɵɵanimateLeaveListener`,moduleName:v};static animationEnter={name:`ɵɵanimateEnter`,moduleName:v};static animationLeave={name:`ɵɵanimateLeave`,moduleName:v};static i18n={name:`ɵɵi18n`,moduleName:v};static i18nAttributes={name:`ɵɵi18nAttributes`,moduleName:v};static i18nExp={name:`ɵɵi18nExp`,moduleName:v};static i18nStart={name:`ɵɵi18nStart`,moduleName:v};static i18nEnd={name:`ɵɵi18nEnd`,moduleName:v};static i18nApply={name:`ɵɵi18nApply`,moduleName:v};static i18nPostprocess={name:`ɵɵi18nPostprocess`,moduleName:v};static pipe={name:`ɵɵpipe`,moduleName:v};static projection={name:`ɵɵprojection`,moduleName:v};static projectionDef={name:`ɵɵprojectionDef`,moduleName:v};static reference={name:`ɵɵreference`,moduleName:v};static inject={name:`ɵɵinject`,moduleName:v};static injectAttribute={name:`ɵɵinjectAttribute`,moduleName:v};static directiveInject={name:`ɵɵdirectiveInject`,moduleName:v};static invalidFactory={name:`ɵɵinvalidFactory`,moduleName:v};static invalidFactoryDep={name:`ɵɵinvalidFactoryDep`,moduleName:v};static templateRefExtractor={name:`ɵɵtemplateRefExtractor`,moduleName:v};static forwardRef={name:`forwardRef`,moduleName:v};static resolveForwardRef={name:`resolveForwardRef`,moduleName:v};static replaceMetadata={name:`ɵɵreplaceMetadata`,moduleName:v};static getReplaceMetadataURL={name:`ɵɵgetReplaceMetadataURL`,moduleName:v};static ɵɵdefineInjectable={name:`ɵɵdefineInjectable`,moduleName:v};static declareInjectable={name:`ɵɵngDeclareInjectable`,moduleName:v};static InjectableDeclaration={name:`ɵɵInjectableDeclaration`,moduleName:v};static defineService={name:`ɵɵdefineService`,moduleName:v};static declareService={name:`ɵɵngDeclareService`,moduleName:v};static resolveWindow={name:`ɵɵresolveWindow`,moduleName:v};static resolveDocument={name:`ɵɵresolveDocument`,moduleName:v};static resolveBody={name:`ɵɵresolveBody`,moduleName:v};static getComponentDepsFactory={name:`ɵɵgetComponentDepsFactory`,moduleName:v};static defineComponent={name:`ɵɵdefineComponent`,moduleName:v};static declareComponent={name:`ɵɵngDeclareComponent`,moduleName:v};static setComponentScope={name:`ɵɵsetComponentScope`,moduleName:v};static ChangeDetectionStrategy={name:`ChangeDetectionStrategy`,moduleName:v};static ViewEncapsulation={name:`ViewEncapsulation`,moduleName:v};static ComponentDeclaration={name:`ɵɵComponentDeclaration`,moduleName:v};static FactoryDeclaration={name:`ɵɵFactoryDeclaration`,moduleName:v};static declareFactory={name:`ɵɵngDeclareFactory`,moduleName:v};static FactoryTarget={name:`ɵɵFactoryTarget`,moduleName:v};static defineDirective={name:`ɵɵdefineDirective`,moduleName:v};static declareDirective={name:`ɵɵngDeclareDirective`,moduleName:v};static DirectiveDeclaration={name:`ɵɵDirectiveDeclaration`,moduleName:v};static InjectorDef={name:`ɵɵInjectorDef`,moduleName:v};static InjectorDeclaration={name:`ɵɵInjectorDeclaration`,moduleName:v};static defineInjector={name:`ɵɵdefineInjector`,moduleName:v};static declareInjector={name:`ɵɵngDeclareInjector`,moduleName:v};static NgModuleDeclaration={name:`ɵɵNgModuleDeclaration`,moduleName:v};static ModuleWithProviders={name:`ModuleWithProviders`,moduleName:v};static defineNgModule={name:`ɵɵdefineNgModule`,moduleName:v};static declareNgModule={name:`ɵɵngDeclareNgModule`,moduleName:v};static setNgModuleScope={name:`ɵɵsetNgModuleScope`,moduleName:v};static registerNgModuleType={name:`ɵɵregisterNgModuleType`,moduleName:v};static PipeDeclaration={name:`ɵɵPipeDeclaration`,moduleName:v};static definePipe={name:`ɵɵdefinePipe`,moduleName:v};static declarePipe={name:`ɵɵngDeclarePipe`,moduleName:v};static declareClassMetadata={name:`ɵɵngDeclareClassMetadata`,moduleName:v};static declareClassMetadataAsync={name:`ɵɵngDeclareClassMetadataAsync`,moduleName:v};static setClassMetadata={name:`ɵsetClassMetadata`,moduleName:v};static setClassMetadataAsync={name:`ɵsetClassMetadataAsync`,moduleName:v};static setClassDebugInfo={name:`ɵsetClassDebugInfo`,moduleName:v};static queryRefresh={name:`ɵɵqueryRefresh`,moduleName:v};static viewQuery={name:`ɵɵviewQuery`,moduleName:v};static loadQuery={name:`ɵɵloadQuery`,moduleName:v};static contentQuery={name:`ɵɵcontentQuery`,moduleName:v};static viewQuerySignal={name:`ɵɵviewQuerySignal`,moduleName:v};static contentQuerySignal={name:`ɵɵcontentQuerySignal`,moduleName:v};static queryAdvance={name:`ɵɵqueryAdvance`,moduleName:v};static twoWayProperty={name:`ɵɵtwoWayProperty`,moduleName:v};static twoWayBindingSet={name:`ɵɵtwoWayBindingSet`,moduleName:v};static twoWayListener={name:`ɵɵtwoWayListener`,moduleName:v};static declareLet={name:`ɵɵdeclareLet`,moduleName:v};static storeLet={name:`ɵɵstoreLet`,moduleName:v};static readContextLet={name:`ɵɵreadContextLet`,moduleName:v};static arrowFunction={name:`ɵɵarrowFunction`,moduleName:v};static attachSourceLocations={name:`ɵɵattachSourceLocations`,moduleName:v};static NgOnChangesFeature={name:`ɵɵNgOnChangesFeature`,moduleName:v};static ControlFeature={name:`ɵɵControlFeature`,moduleName:v};static InheritDefinitionFeature={name:`ɵɵInheritDefinitionFeature`,moduleName:v};static ProvidersFeature={name:`ɵɵProvidersFeature`,moduleName:v};static HostDirectivesFeature={name:`ɵɵHostDirectivesFeature`,moduleName:v};static ExternalStylesFeature={name:`ɵɵExternalStylesFeature`,moduleName:v};static listener={name:`ɵɵlistener`,moduleName:v};static getInheritedFactory={name:`ɵɵgetInheritedFactory`,moduleName:v};static sanitizeHtml={name:`ɵɵsanitizeHtml`,moduleName:v};static sanitizeStyle={name:`ɵɵsanitizeStyle`,moduleName:v};static validateAttribute={name:`ɵɵvalidateAttribute`,moduleName:v};static sanitizeResourceUrl={name:`ɵɵsanitizeResourceUrl`,moduleName:v};static sanitizeScript={name:`ɵɵsanitizeScript`,moduleName:v};static sanitizeUrl={name:`ɵɵsanitizeUrl`,moduleName:v};static sanitizeUrlOrResourceUrl={name:`ɵɵsanitizeUrlOrResourceUrl`,moduleName:v};static trustConstantHtml={name:`ɵɵtrustConstantHtml`,moduleName:v};static trustConstantResourceUrl={name:`ɵɵtrustConstantResourceUrl`,moduleName:v};static inputDecorator={name:`Input`,moduleName:v};static outputDecorator={name:`Output`,moduleName:v};static viewChildDecorator={name:`ViewChild`,moduleName:v};static viewChildrenDecorator={name:`ViewChildren`,moduleName:v};static contentChildDecorator={name:`ContentChild`,moduleName:v};static contentChildrenDecorator={name:`ContentChildren`,moduleName:v};static InputSignalBrandWriteType={name:`ɵINPUT_SIGNAL_BRAND_WRITE_TYPE`,moduleName:v};static UnwrapDirectiveSignalInputs={name:`ɵUnwrapDirectiveSignalInputs`,moduleName:v};static unwrapWritableSignal={name:`ɵunwrapWritableSignal`,moduleName:v};static assertType={name:`ɵassertType`,moduleName:v}}return e})();_.And,_.Bigger,_.BiggerEquals,_.BitwiseOr,_.BitwiseAnd,_.Divide,_.Assign,_.Equals,_.Identical,_.Lower,_.LowerEquals,_.Minus,_.Modulo,_.Exponentiation,_.Multiply,_.NotEquals,_.NotIdentical,_.NullishCoalesce,_.Or,_.Plus,_.In,_.InstanceOf,_.AdditionAssignment,_.SubtractionAssignment,_.MultiplicationAssignment,_.DivisionAssignment,_.RemainderAssignment,_.ExponentiationAssignment,_.AndAssignment,_.OrAssignment,_.NullishCoalesceAssignment;var wt=class{span;sourceSpan;constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return`AST`}},Tt=class extends wt{receiver;args;argumentSpan;constructor(e,t,n,r,i){super(e,t),this.receiver=n,this.args=r,this.argumentSpan=i}visit(e,t=null){return e.visitCall(this,t)}},Et=(function(e){return e[e.Property=0]=`Property`,e[e.Attribute=1]=`Attribute`,e[e.Class=2]=`Class`,e[e.Style=3]=`Style`,e[e.LegacyAnimation=4]=`LegacyAnimation`,e[e.TwoWay=5]=`TwoWay`,e[e.Animation=6]=`Animation`,e})(Et||{}),Dt=`(:(where|is)\\()?`,Ot=`-shadowcsshost`,kt=`-shadowcsscontext`,At=`[^)(]*`,jt=String.raw`(?:\(${At}\)|${At})+?`,Mt=String.raw`(?:\(${jt}\)|${At})+?`,Nt=String.raw`(?:\((${Mt})\))`;String.raw`(:nth-[-\w]+)`+Nt,Ot+Nt+``,`${Dt}`,kt+Nt+``;var Pt=(function(e){return e[e.ListEnd=0]=`ListEnd`,e[e.Statement=1]=`Statement`,e[e.Variable=2]=`Variable`,e[e.ElementStart=3]=`ElementStart`,e[e.Element=4]=`Element`,e[e.ForeignComponent=5]=`ForeignComponent`,e[e.Template=6]=`Template`,e[e.ElementEnd=7]=`ElementEnd`,e[e.ContainerStart=8]=`ContainerStart`,e[e.Container=9]=`Container`,e[e.ContainerEnd=10]=`ContainerEnd`,e[e.DisableBindings=11]=`DisableBindings`,e[e.ConditionalCreate=12]=`ConditionalCreate`,e[e.ConditionalBranchCreate=13]=`ConditionalBranchCreate`,e[e.Conditional=14]=`Conditional`,e[e.EnableBindings=15]=`EnableBindings`,e[e.Text=16]=`Text`,e[e.Listener=17]=`Listener`,e[e.InterpolateText=18]=`InterpolateText`,e[e.Binding=19]=`Binding`,e[e.Property=20]=`Property`,e[e.StyleProp=21]=`StyleProp`,e[e.ClassProp=22]=`ClassProp`,e[e.StyleMap=23]=`StyleMap`,e[e.ClassMap=24]=`ClassMap`,e[e.Advance=25]=`Advance`,e[e.Pipe=26]=`Pipe`,e[e.Attribute=27]=`Attribute`,e[e.ExtractedAttribute=28]=`ExtractedAttribute`,e[e.Defer=29]=`Defer`,e[e.DeferOn=30]=`DeferOn`,e[e.DeferWhen=31]=`DeferWhen`,e[e.I18nMessage=32]=`I18nMessage`,e[e.DomProperty=33]=`DomProperty`,e[e.Namespace=34]=`Namespace`,e[e.ProjectionDef=35]=`ProjectionDef`,e[e.EnableIncrementalHydrationRuntime=36]=`EnableIncrementalHydrationRuntime`,e[e.Projection=37]=`Projection`,e[e.Content=38]=`Content`,e[e.RepeaterCreate=39]=`RepeaterCreate`,e[e.Repeater=40]=`Repeater`,e[e.TwoWayProperty=41]=`TwoWayProperty`,e[e.TwoWayListener=42]=`TwoWayListener`,e[e.DeclareLet=43]=`DeclareLet`,e[e.StoreLet=44]=`StoreLet`,e[e.I18nStart=45]=`I18nStart`,e[e.I18n=46]=`I18n`,e[e.I18nEnd=47]=`I18nEnd`,e[e.I18nExpression=48]=`I18nExpression`,e[e.I18nApply=49]=`I18nApply`,e[e.IcuStart=50]=`IcuStart`,e[e.IcuEnd=51]=`IcuEnd`,e[e.IcuPlaceholder=52]=`IcuPlaceholder`,e[e.I18nContext=53]=`I18nContext`,e[e.I18nAttributes=54]=`I18nAttributes`,e[e.SourceLocation=55]=`SourceLocation`,e[e.Animation=56]=`Animation`,e[e.AnimationString=57]=`AnimationString`,e[e.AnimationBinding=58]=`AnimationBinding`,e[e.AnimationListener=59]=`AnimationListener`,e[e.Control=60]=`Control`,e[e.ControlCreate=61]=`ControlCreate`,e})(Pt||{}),Ft=(function(e){return e[e.LexicalRead=0]=`LexicalRead`,e[e.Context=1]=`Context`,e[e.TrackContext=2]=`TrackContext`,e[e.ReadVariable=3]=`ReadVariable`,e[e.NextContext=4]=`NextContext`,e[e.Reference=5]=`Reference`,e[e.StoreLet=6]=`StoreLet`,e[e.ContextLetReference=7]=`ContextLetReference`,e[e.GetCurrentView=8]=`GetCurrentView`,e[e.RestoreView=9]=`RestoreView`,e[e.ResetView=10]=`ResetView`,e[e.PureFunctionExpr=11]=`PureFunctionExpr`,e[e.PureFunctionParameterExpr=12]=`PureFunctionParameterExpr`,e[e.PipeBinding=13]=`PipeBinding`,e[e.PipeBindingVariadic=14]=`PipeBindingVariadic`,e[e.SafePropertyRead=15]=`SafePropertyRead`,e[e.SafeKeyedRead=16]=`SafeKeyedRead`,e[e.SafeNavigationMigration=17]=`SafeNavigationMigration`,e[e.SafeTernaryExpr=18]=`SafeTernaryExpr`,e[e.EmptyExpr=19]=`EmptyExpr`,e[e.AssignTemporaryExpr=20]=`AssignTemporaryExpr`,e[e.ReadTemporaryExpr=21]=`ReadTemporaryExpr`,e[e.SlotLiteralExpr=22]=`SlotLiteralExpr`,e[e.ConditionalCase=23]=`ConditionalCase`,e[e.ConstCollected=24]=`ConstCollected`,e[e.TwoWayBindingSet=25]=`TwoWayBindingSet`,e[e.ForeignContent=26]=`ForeignContent`,e[e.ArrowFunction=27]=`ArrowFunction`,e})(Ft||{}),It=(function(e){return e[e.None=0]=`None`,e[e.AlwaysInline=1]=`AlwaysInline`,e})(It||{}),Lt=(function(e){return e[e.Context=0]=`Context`,e[e.Identifier=1]=`Identifier`,e[e.SavedView=2]=`SavedView`,e[e.Alias=3]=`Alias`,e})(Lt||{}),Rt=(function(e){return e[e.Attribute=0]=`Attribute`,e[e.ClassName=1]=`ClassName`,e[e.StyleProperty=2]=`StyleProperty`,e[e.Property=3]=`Property`,e[e.Template=4]=`Template`,e[e.I18n=5]=`I18n`,e[e.LegacyAnimation=6]=`LegacyAnimation`,e[e.TwoWayProperty=7]=`TwoWayProperty`,e[e.Animation=8]=`Animation`,e})(Rt||{}),zt=(function(e){return e[e.Creation=0]=`Creation`,e[e.Postproccessing=1]=`Postproccessing`,e})(zt||{}),Bt=(function(e){return e[e.I18nText=0]=`I18nText`,e[e.I18nAttribute=1]=`I18nAttribute`,e})(Bt||{}),Vt=(function(e){return e[e.None=0]=`None`,e[e.ElementTag=1]=`ElementTag`,e[e.TemplateTag=2]=`TemplateTag`,e[e.OpenTag=4]=`OpenTag`,e[e.CloseTag=8]=`CloseTag`,e[e.ExpressionIndex=16]=`ExpressionIndex`,e})(Vt||{}),Ht=(function(e){return e[e.HTML=0]=`HTML`,e[e.SVG=1]=`SVG`,e[e.Math=2]=`Math`,e})(Ht||{}),Ut=(function(e){return e[e.Idle=0]=`Idle`,e[e.Immediate=1]=`Immediate`,e[e.Timer=2]=`Timer`,e[e.Hover=3]=`Hover`,e[e.Interaction=4]=`Interaction`,e[e.Viewport=5]=`Viewport`,e[e.Never=6]=`Never`,e})(Ut||{}),Wt=(function(e){return e[e.RootI18n=0]=`RootI18n`,e[e.Icu=1]=`Icu`,e[e.Attr=2]=`Attr`,e})(Wt||{}),Gt=(function(e){return e[e.NgTemplate=0]=`NgTemplate`,e[e.Structural=1]=`Structural`,e[e.Block=2]=`Block`,e})(Gt||{}),Kt=(function(e){return e[e.None=0]=`None`,e[e.InChildOperation=1]=`InChildOperation`,e[e.InArrowFunctionOperation=2]=`InArrowFunctionOperation`,e[e.InSafeNavigationMigration=4]=`InSafeNavigationMigration`,e})(Kt||{});Pt.Element,Pt.ElementStart,Pt.Container,Pt.ContainerStart,Pt.Template,Pt.RepeaterCreate,Pt.ConditionalCreate,Pt.ConditionalBranchCreate;var qt=(function(e){return e[e.Tmpl=0]=`Tmpl`,e[e.Host=1]=`Host`,e[e.Both=2]=`Both`,e})(qt||{}),Jt=(function(e){return e[e.Full=0]=`Full`,e[e.DomOnly=1]=`DomOnly`,e})(Jt||{});y.ariaProperty,y.ariaProperty,y.attribute,y.attribute,y.classProp,y.classProp,y.element,y.element,y.elementContainer,y.elementContainer,y.elementContainerEnd,y.elementContainerEnd,y.elementContainerStart,y.elementContainerStart,y.elementEnd,y.elementEnd,y.elementStart,y.elementStart,y.domProperty,y.domProperty,y.i18nExp,y.i18nExp,y.listener,y.listener,y.listener,y.listener,y.property,y.property,y.styleProp,y.styleProp,y.syntheticHostListener,y.syntheticHostListener,y.syntheticHostProperty,y.syntheticHostProperty,y.templateCreate,y.templateCreate,y.twoWayProperty,y.twoWayProperty,y.twoWayListener,y.twoWayListener,y.declareLet,y.declareLet,y.conditionalCreate,y.conditionalBranchCreate,y.conditionalBranchCreate,y.conditionalBranchCreate,y.domElement,y.domElement,y.domElementStart,y.domElementStart,y.domElementEnd,y.domElementEnd,y.domElementContainer,y.domElementContainer,y.domElementContainerStart,y.domElementContainerStart,y.domElementContainerEnd,y.domElementContainerEnd,y.domListener,y.domListener,y.domTemplate,y.domTemplate,y.animationEnter,y.animationEnter,y.animationLeave,y.animationLeave,y.animationEnterListener,y.animationEnterListener,y.animationLeaveListener,y.animationLeaveListener,_.And,_.Bigger,_.BiggerEquals,_.BitwiseOr,_.BitwiseAnd,_.Divide,_.Assign,_.Equals,_.Identical,_.Lower,_.LowerEquals,_.Minus,_.Modulo,_.Exponentiation,_.Multiply,_.NotEquals,_.NotIdentical,_.NullishCoalesce,_.Or,_.Plus,_.In,_.InstanceOf,_.AdditionAssignment,_.SubtractionAssignment,_.MultiplicationAssignment,_.DivisionAssignment,_.RemainderAssignment,_.ExponentiationAssignment,_.AndAssignment,_.OrAssignment,_.NullishCoalesceAssignment,Pt.Property,Pt.Property,Pt.Property,Pt.Attribute,Pt.Attribute,Pt.Property,Pt.TwoWayProperty,Pt.Container,Pt.ContainerStart,Pt.ContainerEnd,Pt.Element,Pt.ElementStart,Pt.ElementEnd,Pt.Template,Pt.ElementEnd,Pt.ElementStart,Pt.Element,Pt.ContainerEnd,Pt.ContainerStart,Pt.Container,Pt.I18nEnd,Pt.I18nStart,Pt.I18n,Pt.Pipe;var Yt=` \f -\r \v ᠎ - \u2028\u2029   `;`${Yt}`,`${Yt}`;var Xt=(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})(Xt||{}),Zt=(function(e){return e[e.Plain=0]=`Plain`,e[e.TemplateLiteralPart=1]=`TemplateLiteralPart`,e[e.TemplateLiteralEnd=2]=`TemplateLiteralEnd`,e})(Zt||{});Xt.Character,Pt.StyleMap,Pt.ClassMap,Pt.StyleProp,Pt.ClassProp,Pt.Attribute,Pt.Property,Pt.Attribute,Pt.Control,Pt.DomProperty,Pt.DomProperty,Pt.Attribute,Pt.StyleMap,Pt.ClassMap,Pt.StyleProp,Pt.ClassProp,Pt.Listener,Pt.TwoWayListener,Pt.AnimationListener,Pt.StyleMap,Pt.ClassMap,Pt.StyleProp,Pt.ClassProp,Pt.Property,Pt.TwoWayProperty,Pt.DomProperty,Pt.Attribute,Pt.Animation,Pt.Control,Ut.Idle,y.deferOnIdle,y.deferPrefetchOnIdle,y.deferHydrateOnIdle,Ut.Immediate,y.deferOnImmediate,y.deferPrefetchOnImmediate,y.deferHydrateOnImmediate,Ut.Timer,y.deferOnTimer,y.deferPrefetchOnTimer,y.deferHydrateOnTimer,Ut.Hover,y.deferOnHover,y.deferPrefetchOnHover,y.deferHydrateOnHover,Ut.Interaction,y.deferOnInteraction,y.deferPrefetchOnInteraction,y.deferHydrateOnInteraction,Ut.Viewport,y.deferOnViewport,y.deferPrefetchOnViewport,y.deferHydrateOnViewport,Ut.Never,y.deferHydrateNever,y.deferHydrateNever,y.deferHydrateNever,y.pipeBind1,y.pipeBind2,y.pipeBind3,y.pipeBind4,y.textInterpolate,y.textInterpolate1,y.textInterpolate2,y.textInterpolate3,y.textInterpolate4,y.textInterpolate5,y.textInterpolate6,y.textInterpolate7,y.textInterpolate8,y.textInterpolateV,y.interpolate,y.interpolate1,y.interpolate2,y.interpolate3,y.interpolate4,y.interpolate5,y.interpolate6,y.interpolate7,y.interpolate8,y.interpolateV,y.pureFunction0,y.pureFunction1,y.pureFunction2,y.pureFunction3,y.pureFunction4,y.pureFunction5,y.pureFunction6,y.pureFunction7,y.pureFunction8,y.pureFunctionV,y.resolveWindow,y.resolveDocument,y.resolveBody,nt.HTML,y.sanitizeHtml,nt.RESOURCE_URL,y.sanitizeResourceUrl,nt.SCRIPT,y.sanitizeScript,nt.STYLE,y.sanitizeStyle,nt.URL,y.sanitizeUrl,nt.ATTRIBUTE_NO_BINDING,y.validateAttribute,nt.HTML,y.trustConstantHtml,nt.RESOURCE_URL,y.trustConstantResourceUrl;var Qt=(function(e){return e[e.None=0]=`None`,e[e.ViewContextRead=1]=`ViewContextRead`,e[e.ViewContextWrite=2]=`ViewContextWrite`,e[e.SideEffectful=4]=`SideEffectful`,e})(Qt||{});qt.Tmpl,qt.Tmpl,qt.Both,qt.Host,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Both,qt.Both,qt.Both,qt.Tmpl,qt.Both,qt.Both,qt.Tmpl,qt.Both,qt.Tmpl,qt.Both,qt.Both,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Both,qt.Both,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Both,qt.Both,qt.Both,qt.Tmpl,qt.Tmpl,qt.Both,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Both,qt.Both,qt.Tmpl,qt.Both,qt.Both,qt.Both,qt.Both,qt.Both,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Both,qt.Tmpl,qt.Both,qt.Tmpl,qt.Both,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Tmpl,qt.Both,qt.Both,qt.Both,Et.Property,Rt.Property,Et.TwoWay,Rt.TwoWayProperty,Et.Attribute,Rt.Attribute,Et.Class,Rt.ClassName,Et.Style,Rt.StyleProperty,Et.LegacyAnimation,Rt.LegacyAnimation,Et.Animation,Rt.Animation;var $t=`%COMP%`;`${$t}`,`${$t}`,class e{static SINGLETON=new e;static veWillInferAnyFor(t){let n=e.SINGLETON;return t instanceof Tt?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 en=null,tn=!1,nn=1,rn=null,an=Symbol(`SIGNAL`);function on(e){let t=en;return en=e,t}function sn(){return en}var cn={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 ln(e){if(tn)throw Error(``);if(en===null)return;en.consumerOnSignalRead(e);let t=en.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=en.recomputing;if(r&&(n=t===void 0?en.producers:t.nextProducer,n!==void 0&&n.producer===e)){en.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=nn;return}let i=e.consumersTail;if(i!==void 0&&i.consumer===en&&(!r||i.knownValidAtEpoch===nn))return;let a=wn(en),o={producer:e,consumer:en,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:nn,lastReadVersion:e.version,nextConsumer:void 0};en.producersTail=o,t===void 0?en.producers=o:t.nextProducer=o,a&&Sn(e,o)}function un(){nn++}function dn(e){if((!wn(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==nn)){if(!e.producerMustRecompute(e)&&!bn(e)){hn(e);return}e.producerRecomputeValue(e),hn(e)}}function fn(e){if(e.consumers===void 0)return;let t=tn;tn=!0;try{for(let t=e.consumers;t!==void 0;t=t.nextConsumer){let e=t.consumer;e.dirty||mn(e)}}finally{tn=t}}function pn(){return en?.consumerAllowSignalWrites!==!1}function mn(e){e.dirty=!0,fn(e),e.consumerMarkedDirty?.(e)}function hn(e){e.dirty=!1,e.lastCleanEpoch=nn}function gn(e){return e&&_n(e),on(e)}function _n(e){if(e.producersTail?.knownValidAtEpoch===nn){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function vn(e,t){on(t),e&&yn(e)}function yn(e){e.recomputing=!1;let t=e.producersTail,n=t===void 0?e.producers:t.nextProducer;if(n!==void 0){if(wn(e))do n=Cn(n);while(n!==void 0);t===void 0?e.producers=void 0:t.nextProducer=void 0}}function bn(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let e=t.producer,n=t.lastReadVersion;if(n!==e.version||(dn(e),n!==e.version))return!0}return!1}function xn(e){if(wn(e)){let t=e.producers;for(;t!==void 0;)t=Cn(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function Sn(e,t){let n=e.consumersTail,r=wn(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)Sn(t.producer,t)}function Cn(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,!wn(t)){let e=t.producers;for(;e!==void 0;)e=Cn(e)}return n}function wn(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function Tn(e){rn?.(e)}function En(e,t){return Object.is(e,t)}function Dn(e,t){let n=Object.create(uee);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(dn(n),ln(n),n.value===An)throw n.error;return n.value};return r[an]=n,Tn(n),r}var On=Symbol(`UNSET`),kn=Symbol(`COMPUTING`),An=Symbol(`ERRORED`),uee={...cn,value:On,dirty:!0,error:null,equal:En,kind:`computed`,producerMustRecompute(e){return e.value===On||e.value===kn},producerRecomputeValue(e){if(e.value===kn)throw Error(``);let t=e.value;e.value=kn;let n=gn(e),r,i=!1;try{r=e.computation(),on(null),i=t!==On&&t!==An&&r!==An&&e.equal(t,r)}catch(t){r=An,e.error=t}finally{vn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function dee(){throw Error()}var jn=dee;function Mn(e){jn(e)}function fee(e){jn=e}var pee=null;function mee(e,t){let n=Object.create(Fn);n.value=e,t!==void 0&&(n.equal=t);let r=()=>hee(n);return r[an]=n,Tn(n),[r,e=>Nn(n,e),e=>Pn(n,e)]}function hee(e){return ln(e),e.value}function Nn(e,t){pn()||Mn(e),e.equal(e.value,t)||(e.value=t,In(e))}function Pn(e,t){pn()||Mn(e),Nn(e,t(e.value))}var Fn={...cn,equal:En,value:void 0,kind:`signal`};function In(e){e.version++,un(),fn(e),pee?.(e)}var Ln={...cn,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:`effect`};function Rn(e){if(e.dirty=!1,e.version>0&&!bn(e))return;e.version++;let t=gn(e);try{e.cleanup(),e.fn()}finally{vn(e,t)}}var zn=void 0;function Bn(){return zn}function Vn(e){let t=zn;return zn=e,t}var Hn=Symbol(`NotFound`);function Un(e){return e===Hn||e?.name===`ɵNotFound`}function Wn(e,t,n){let r=Object.create(qn);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(dn(r),ln(r),r.value===An)throw r.error;return r.value};return i[an]=r,Tn(r),i}function Gn(e,t){dn(e),Nn(e,t),hn(e)}function Kn(e,t){if(dn(e),e.value===An)throw e.error;Pn(e,t),hn(e)}var qn={...cn,value:On,dirty:!0,error:null,equal:En,kind:`linkedSignal`,producerMustRecompute(e){return e.value===On||e.value===kn},producerRecomputeValue(e){if(e.value===kn)throw Error(``);let t=e.value;e.value=kn;let n=gn(e),r,i=!1;try{let n=e.source(),a=t!==On&&t!==An,o=a?{source:e.sourceValue,value:t}:void 0;r=e.computation(n,o),e.sourceValue=n,on(null),i=a&&r!==An&&e.equal(t,r)}catch(t){r=An,e.error=t}finally{vn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function Jn(e){let t=on(null);try{return e()}finally{on(t)}}var Yn=function(e,t){return Yn=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])},Yn(e,t)};function Xn(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Yn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Zn(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 Qn(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 er(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 tr(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 nr?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 ir(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof $n==`function`?$n(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 ar(e){return typeof e==`function`}function or(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 sr=or(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription: +`+o.stack:``))}catch(e){r=e}c&&(r.throwOriginal=!0),r.rejection=o,r.promise=e,r.zone=t.current,r.task=t.currentTask,s.push(r),n.scheduleMicroTask()}}}return e}let ce=o(`rejectionHandledHandler`);function le(e){if(e[h]===0){try{let n=t[ce];n&&typeof n==`function`&&n.call(this,{rejection:e[g],promise:e})}catch{}e[h]=!1;for(let t=0;t{try{let r=e[g],i=!!n&&te===n[te];i&&(n[ne]=r,n[re]=a),se(n,!0,t.run(o,void 0,i&&o!==ee&&o!==m?[]:[r]))}catch(e){se(n,!1,e)}},n)}let de=function(){},fe=e.AggregateError;class pe{static toString(){return`function ZoneAwarePromise() { [native code] }`}static resolve(e){return e instanceof pe?e:se(new this(null),!0,e)}static reject(e){return se(new this(null),!1,e)}static withResolvers(){let e={};return e.promise=new pe((t,n)=>{e.resolve=t,e.reject=n}),e}static any(e){if(!e||typeof e[Symbol.iterator]!=`function`)return Promise.reject(new fe([],`All promises were rejected`));let t=[],n=0;try{for(let r of e)n++,t.push(pe.resolve(r))}catch{return Promise.reject(new fe([],`All promises were rejected`))}if(n===0)return Promise.reject(new fe([],`All promises were rejected`));let r=!1,i=[];return new pe((e,a)=>{for(let o=0;o{r||(r=!0,e(t))},e=>{i.push(e),n--,n===0&&(r=!0,a(new fe(i,`All promises were rejected`)))})})}static race(e){let t,n,r=new this((e,r)=>{t=e,n=r});function i(e){t(e)}function a(e){n(e)}for(let t of e)p(t)||(t=this.resolve(t)),t.then(i,a);return r}static all(e){return pe.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof pe?this:pe).allWithCallback(e,{thenCallback:e=>({status:`fulfilled`,value:e}),errorCallback:e=>({status:`rejected`,reason:e})})}static allWithCallback(e,t){let n,r,i=new this((e,t)=>{n=e,r=t}),a=2,o=0,s=[];for(let i of e){p(i)||(i=this.resolve(i));let e=o;try{i.then(r=>{s[e]=t?t.thenCallback(r):r,a--,a===0&&n(s)},i=>{t?(s[e]=t.errorCallback(i),a--,a===0&&n(s)):r(i)})}catch(e){r(e)}a++,o++}return a-=2,a===0&&n(s),i}constructor(e){let t=this;if(!(t instanceof pe))throw Error(`Must be an instanceof Promise.`);t[h]=null,t[g]=[];try{let n=ae();e&&e(n(ie(t,!0)),n(ie(t,!1)))}catch(e){se(t,!1,e)}}get[Symbol.toStringTag](){return`Promise`}get[Symbol.species](){return pe}then(e,n){let r=this.constructor?.[Symbol.species];(!r||typeof r!=`function`)&&(r=this.constructor||pe);let i=new r(de),a=t.current;return this[h]==null?this[g].push(a,i,e,n):ue(this,a,i,e,n),i}catch(e){return this.then(null,e)}finally(e){let n=this.constructor?.[Symbol.species];(!n||typeof n!=`function`)&&(n=pe);let r=new n(de);r[te]=te;let i=t.current;return this[h]==null?this[g].push(i,r,e,e):ue(this,i,r,e,e),r}}pe.resolve=pe.resolve,pe.reject=pe.reject,pe.race=pe.race,pe.all=pe.all;let me=e[l]=e.Promise;e.Promise=pe;let he=o(`thenPatched`);function ge(e){let t=e.prototype,n=r(t,`then`);if(n&&(n.writable===!1||!n.configurable))return;let i=t.then;t[u]=i,e.prototype.then=function(e,t){return new pe((e,t)=>{i.call(this,e,t)}).then(e,t)},e[he]=!0}n.patchThen=ge;function _e(e){return function(t,n){let r=e.apply(t,n);if(r instanceof pe)return r;let i=r.constructor;return i[he]||ge(i),r}}if(me){ge(me);let t=me.try;t&&typeof t==`function`&&(pe.try=t),De(e,`fetch`,e=>_e(e))}return Promise[t.__symbol__(`uncaughtPromiseErrors`)]=s,pe})}function ree(e){e.__load_patch(`toString`,e=>{let t=Function.prototype.toString,n=ce(`OriginalDelegate`),r=ce(`Promise`),i=ce(`Error`),a=function(){if(typeof this==`function`){let a=this[n];if(a)return typeof a==`function`?t.call(a):Object.prototype.toString.call(a);if(this===Promise){let n=e[r];if(n)return t.call(n)}if(this===Error){let n=e[i];if(n)return t.call(n)}}return t.call(this)};a[n]=t,Function.prototype.toString=a;let o=Object.prototype.toString;Object.prototype.toString=function(){return typeof Promise==`function`&&this instanceof Promise?`[object Promise]`:o.call(this)}})}function Ze(e,t,n,r,i){let a=Zone.__symbol__(r);if(t[a])return;let o=t[a]=t[r];t[r]=function(a,s,c){return s&&s.prototype&&i.forEach(function(t){let i=`${n}.${r}::`+t,a=s.prototype;try{if(Object.hasOwn(a,t)){let n=e.ObjectGetOwnPropertyDescriptor(a,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,i),e._redefineProperty(s.prototype,t,n)):a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],i))}else a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],i))}catch{}}),o.call(t,a,s,c)},e.attachOriginToPatched(t[r],o)}function Qe(e){e.__load_patch(`util`,(e,t,n)=>{let r=Xe(e);n.patchOnProperties=we,n.patchMethod=De,n.bindArguments=pe,n.patchMacroTask=Oe;let i=t.__symbol__(`BLACK_LISTED_EVENTS`),a=t.__symbol__(`UNPATCHED_EVENTS`);e[a]&&(e[i]=e[a]),e[i]&&(t[i]=t[a]=e[i]),n.patchEventPrototype=Ve,n.patchEventTarget=ze,n.ObjectDefineProperty=f,n.ObjectGetOwnPropertyDescriptor=d,n.ObjectCreate=m,n.ArraySlice=ee,n.patchClass=Ee,n.wrapWithCurrentZone=oe,n.filterProperties=Je,n.attachOriginToPatched=ke,n._redefineProperty=Object.defineProperty,n.patchCallbacks=Ze,n.getGlobalObjects=()=>({globalSources:Pe,zoneSymbolEventNames:Ne,eventNames:r,isBrowser:ve,isMix:ye,isNode:_e,TRUE_STR:re,FALSE_STR:ie,ZONE_SYMBOL_PREFIX:ae,ADD_EVENT_LISTENER_STR:h,REMOVE_EVENT_LISTENER_STR:g})})}function $e(e){nee(e),ree(e),Qe(e)}var et=u();$e(et),tee(et);var tt=(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})(tt||{}),nt=(function(e){return e[e.None=0]=`None`,e[e.Const=1]=`Const`,e})(nt||{}),rt=class{modifiers;constructor(e=nt.None){this.modifiers=e}hasModifier(e){return(this.modifiers&e)!==0}},it=(function(e){return e[e.Dynamic=0]=`Dynamic`,e[e.Bool=1]=`Bool`,e[e.String=2]=`String`,e[e.Int=3]=`Int`,e[e.Number=4]=`Number`,e[e.Function=5]=`Function`,e[e.Inferred=6]=`Inferred`,e[e.None=7]=`None`,e})(it||{}),at=class extends rt{name;constructor(e,t){super(t),this.name=e}visitType(e,t){return e.visitBuiltinType(this,t)}};it.Dynamic;var ot=new at(it.Inferred);it.Bool,it.Int,it.Number,it.String,it.Function,it.None;var _=(function(e){return e[e.Equals=0]=`Equals`,e[e.NotEquals=1]=`NotEquals`,e[e.Assign=2]=`Assign`,e[e.Identical=3]=`Identical`,e[e.NotIdentical=4]=`NotIdentical`,e[e.Minus=5]=`Minus`,e[e.Plus=6]=`Plus`,e[e.Divide=7]=`Divide`,e[e.Multiply=8]=`Multiply`,e[e.Modulo=9]=`Modulo`,e[e.And=10]=`And`,e[e.Or=11]=`Or`,e[e.BitwiseOr=12]=`BitwiseOr`,e[e.BitwiseAnd=13]=`BitwiseAnd`,e[e.Lower=14]=`Lower`,e[e.LowerEquals=15]=`LowerEquals`,e[e.Bigger=16]=`Bigger`,e[e.BiggerEquals=17]=`BiggerEquals`,e[e.NullishCoalesce=18]=`NullishCoalesce`,e[e.Exponentiation=19]=`Exponentiation`,e[e.In=20]=`In`,e[e.InstanceOf=21]=`InstanceOf`,e[e.AdditionAssignment=22]=`AdditionAssignment`,e[e.SubtractionAssignment=23]=`SubtractionAssignment`,e[e.MultiplicationAssignment=24]=`MultiplicationAssignment`,e[e.DivisionAssignment=25]=`DivisionAssignment`,e[e.RemainderAssignment=26]=`RemainderAssignment`,e[e.ExponentiationAssignment=27]=`ExponentiationAssignment`,e[e.AndAssignment=28]=`AndAssignment`,e[e.OrAssignment=29]=`OrAssignment`,e[e.NullishCoalesceAssignment=30]=`NullishCoalesceAssignment`,e})(_||{});function st(e,t){return e==null||t==null?e==t:e.isEquivalent(t)}function ct(e,t,n){let r=e.length;if(r!==t.length)return!1;for(let i=0;ie.isEquivalent(t))}var ut=class{leadingComments;type;sourceSpan;constructor(e,t,n){this.leadingComments=n,this.type=e||null,this.sourceSpan=t||null}prop(e,t){return new bt(this,e,null,t)}key(e,t,n){return new xt(this,e,t,n)}callFn(e,t,n,r){return new pt(this,e,null,t,n,r)}instantiate(e,t,n,r){return new mt(this,e,t,n)}conditional(e,t=null,n,r){return new vt(this,e,t,null,n)}equals(e,t){return new yt(_.Equals,this,e,null,t)}notEquals(e,t){return new yt(_.NotEquals,this,e,null,t)}identical(e,t){return new yt(_.Identical,this,e,null,t)}notIdentical(e,t){return new yt(_.NotIdentical,this,e,null,t)}minus(e,t){return new yt(_.Minus,this,e,null,t)}plus(e,t){return new yt(_.Plus,this,e,null,t)}divide(e,t){return new yt(_.Divide,this,e,null,t)}multiply(e,t){return new yt(_.Multiply,this,e,null,t)}modulo(e,t){return new yt(_.Modulo,this,e,null,t)}power(e,t){return new yt(_.Exponentiation,this,e,null,t)}and(e,t){return new yt(_.And,this,e,null,t)}bitwiseOr(e,t){return new yt(_.BitwiseOr,this,e,null,t)}bitwiseAnd(e,t){return new yt(_.BitwiseAnd,this,e,null,t)}or(e,t){return new yt(_.Or,this,e,null,t)}lower(e,t){return new yt(_.Lower,this,e,null,t)}lowerEquals(e,t){return new yt(_.LowerEquals,this,e,null,t)}bigger(e,t){return new yt(_.Bigger,this,e,null,t)}biggerEquals(e,t){return new yt(_.BiggerEquals,this,e,null,t)}isBlank(e){return this.equals(cee,e)}nullishCoalesce(e,t){return new yt(_.NullishCoalesce,this,e,null,t)}toStmt(e){return new uee(this,null,e)}},dt=class e extends ut{name;constructor(e,t,n,r){super(t,n,r),this.name=e}isEquivalent(t){return t instanceof e&&this.name===t.name}isConstant(){return!1}visitExpression(e,t){return e.visitReadVarExpr(this,t)}clone(){return new e(this.name,this.type,this.sourceSpan)}set(e){return new yt(_.Assign,this,e,null,this.sourceSpan)}},ft=class e extends ut{expr;constructor(e,t,n,r){super(t,n,r),this.expr=e}visitExpression(e,t){return e.visitTypeofExpr(this,t)}isEquivalent(t){return t instanceof e&&t.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new e(this.expr.clone())}},pt=class e extends ut{fn;args;pure;isOptional;constructor(e,t,n,r,i=!1,a,o=!1){super(n,r,a),this.fn=e,this.args=t,this.pure=i,this.isOptional=o}get receiver(){return this.fn}isEquivalent(t){return t instanceof e&&this.fn.isEquivalent(t.fn)&<(this.args,t.args)&&this.pure===t.pure}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeFunctionExpr(this,t)}clone(){return new e(this.fn.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan,this.pure,[],this.isOptional)}},mt=class e extends ut{classExpr;args;constructor(e,t,n,r,i){super(n,r,i),this.classExpr=e,this.args=t}isEquivalent(t){return t instanceof e&&this.classExpr.isEquivalent(t.classExpr)&<(this.args,t.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInstantiateExpr(this,t)}clone(){return new e(this.classExpr.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan)}},ht=class e extends ut{body;flags;constructor(e,t,n,r){super(null,n,r),this.body=e,this.flags=t}isEquivalent(t){return t instanceof e&&this.body===t.body&&this.flags===t.flags}isConstant(){return!0}visitExpression(e,t){return e.visitRegularExpressionLiteral(this,t)}clone(){return new e(this.body,this.flags,this.sourceSpan)}},gt=class e extends ut{value;constructor(e,t,n,r){super(t,n,r),this.value=e}isEquivalent(t){return t instanceof e&&this.value===t.value}isConstant(){return!0}visitExpression(e,t){return e.visitLiteralExpr(this,t)}clone(){return new e(this.value,this.type,this.sourceSpan)}},_t=class e extends ut{value;typeParams;constructor(e,t,n=null,r,i){super(t,r,i),this.value=e,this.typeParams=n}isEquivalent(t){return t instanceof e&&this.value.name===t.value.name&&this.value.moduleName===t.value.moduleName}isConstant(){return!1}visitExpression(e,t){return e.visitExternalExpr(this,t)}clone(){return new e(this.value,this.type,this.typeParams,this.sourceSpan)}},vt=class e extends ut{condition;falseCase;trueCase;constructor(e,t,n=null,r,i,a){super(r||t.type,i,a),this.condition=e,this.falseCase=n,this.trueCase=t}isEquivalent(t){return t instanceof e&&this.condition.isEquivalent(t.condition)&&this.trueCase.isEquivalent(t.trueCase)&&st(this.falseCase,t.falseCase)}isConstant(){return!1}visitExpression(e,t){return e.visitConditionalExpr(this,t)}clone(){return new e(this.condition.clone(),this.trueCase.clone(),this.falseCase?.clone(),this.type,this.sourceSpan)}},yt=class e extends ut{operator;rhs;lhs;constructor(e,t,n,r,i,a){super(r||t.type,i,a),this.operator=e,this.rhs=n,this.lhs=t}isEquivalent(t){return t instanceof e&&this.operator===t.operator&&this.lhs.isEquivalent(t.lhs)&&this.rhs.isEquivalent(t.rhs)}isConstant(){return!1}visitExpression(e,t){return e.visitBinaryOperatorExpr(this,t)}clone(){return new e(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan)}isAssignment(){let e=this.operator;return e===_.Assign||e===_.AdditionAssignment||e===_.SubtractionAssignment||e===_.MultiplicationAssignment||e===_.DivisionAssignment||e===_.RemainderAssignment||e===_.ExponentiationAssignment||e===_.AndAssignment||e===_.OrAssignment||e===_.NullishCoalesceAssignment}},bt=class e extends ut{receiver;name;isOptional;constructor(e,t,n,r,i,a=!1){super(n,r,i),this.receiver=e,this.name=t,this.isOptional=a}get index(){return this.name}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name&&this.isOptional===t.isOptional}isConstant(){return!1}visitExpression(e,t){return e.visitReadPropExpr(this,t)}set(e){return new yt(_.Assign,this.receiver.prop(this.name),e,null,this.sourceSpan)}clone(){return new e(this.receiver.clone(),this.name,this.type,this.sourceSpan,[],this.isOptional)}},xt=class e extends ut{receiver;index;isOptional;constructor(e,t,n,r,i,a=!1){super(n,r,i),this.receiver=e,this.index=t,this.isOptional=a}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)&&this.isOptional===t.isOptional}isConstant(){return!1}visitExpression(e,t){return e.visitReadKeyExpr(this,t)}set(e){return new yt(_.Assign,this.receiver.key(this.index),e,null,this.sourceSpan)}clone(){return new e(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan,[],this.isOptional)}},iee=class e extends ut{entries;constructor(e,t,n,r){super(t,n,r),this.entries=e}isConstant(){return this.entries.every(e=>e.isConstant())}isEquivalent(t){return t instanceof e&<(this.entries,t.entries)}visitExpression(e,t){return e.visitLiteralArrayExpr(this,t)}clone(){return new e(this.entries.map(e=>e.clone()),this.type,this.sourceSpan)}},aee=class e{expression;constructor(e){this.expression=e}isEquivalent(t){return t instanceof e&&this.expression.isEquivalent(t.expression)}clone(){return new e(this.expression.clone())}isConstant(){return this.expression.isConstant()}},oee=class e extends ut{entries;valueType=null;constructor(e,t,n,r){super(t,n,r),this.entries=e,t&&(this.valueType=t.valueType)}isEquivalent(t){return t instanceof e&<(this.entries,t.entries)}isConstant(){return this.entries.every(e=>e.isConstant())}visitExpression(e,t){return e.visitLiteralMapExpr(this,t)}clone(){let t=this.entries.map(e=>e.clone());return new e(t,this.type,this.sourceSpan)}},see=class e extends ut{expression;constructor(e,t,n){super(null,t,n),this.expression=e}isEquivalent(t){return t instanceof e&&this.expression.isEquivalent(t.expression)}isConstant(){return this.expression.isConstant()}visitExpression(e,t){return e.visitSpreadElementExpr(this,t)}clone(){return new e(this.expression.clone(),this.sourceSpan)}},cee=new gt(null,ot,null),St=(function(e){return e[e.None=0]=`None`,e[e.Final=1]=`Final`,e[e.Private=2]=`Private`,e[e.Exported=4]=`Exported`,e[e.Static=8]=`Static`,e})(St||{}),lee=class{modifiers;sourceSpan;leadingComments;constructor(e=St.None,t=null,n){this.modifiers=e,this.sourceSpan=t,this.leadingComments=n}hasModifier(e){return(this.modifiers&e)!==0}addLeadingComment(e){this.leadingComments=this.leadingComments??[],this.leadingComments.push(e)}},uee=class e extends lee{expr;constructor(e,t,n){super(St.None,t,n),this.expr=e}isEquivalent(t){return t instanceof e&&this.expr.isEquivalent(t.expr)}visitStatement(e,t){return e.visitExpressionStmt(this,t)}};(class e{static INSTANCE=new e;keyOf(e){if(e instanceof gt&&typeof e.value==`string`)return`"${e.value}"`;if(e instanceof gt)return String(e.value);if(e instanceof ht)return`/${e.body}/${e.flags??``}`;if(e instanceof iee){let t=[];for(let n of e.entries)t.push(this.keyOf(n));return`[${t.join(`,`)}]`}if(e instanceof oee){let t=[];for(let n of e.entries)if(n instanceof aee)t.push(`...`+this.keyOf(n.expression));else{let e=n.key;n.quoted&&(e=`"${e}"`),t.push(e+`:`+this.keyOf(n.value))}return`{${t.join(`,`)}}`}if(e instanceof _t)return`import("${e.value.moduleName}", ${e.value.name})`;if(e instanceof dt)return`read(${e.name})`;if(e instanceof ft)return`typeof(${this.keyOf(e.expr)})`;if(e instanceof see)return`...${this.keyOf(e.expression)}`;throw Error(`${this.constructor.name} does not handle expressions of type ${e.constructor.name}`)}});var v=`@angular/core`,y=(()=>{class e{static core={name:null,moduleName:v};static namespaceHTML={name:`ɵɵnamespaceHTML`,moduleName:v};static namespaceMathML={name:`ɵɵnamespaceMathML`,moduleName:v};static namespaceSVG={name:`ɵɵnamespaceSVG`,moduleName:v};static element={name:`ɵɵelement`,moduleName:v};static elementStart={name:`ɵɵelementStart`,moduleName:v};static elementEnd={name:`ɵɵelementEnd`,moduleName:v};static foreignComponent={name:`ɵɵforeignComponent`,moduleName:v};static foreignContent={name:`ɵɵforeignContent`,moduleName:v};static foreignContentFn={name:`ɵɵforeignContentFn`,moduleName:v};static domElement={name:`ɵɵdomElement`,moduleName:v};static domElementStart={name:`ɵɵdomElementStart`,moduleName:v};static domElementEnd={name:`ɵɵdomElementEnd`,moduleName:v};static domElementContainer={name:`ɵɵdomElementContainer`,moduleName:v};static domElementContainerStart={name:`ɵɵdomElementContainerStart`,moduleName:v};static domElementContainerEnd={name:`ɵɵdomElementContainerEnd`,moduleName:v};static domTemplate={name:`ɵɵdomTemplate`,moduleName:v};static domListener={name:`ɵɵdomListener`,moduleName:v};static advance={name:`ɵɵadvance`,moduleName:v};static syntheticHostProperty={name:`ɵɵsyntheticHostProperty`,moduleName:v};static syntheticHostListener={name:`ɵɵsyntheticHostListener`,moduleName:v};static attribute={name:`ɵɵattribute`,moduleName:v};static classProp={name:`ɵɵclassProp`,moduleName:v};static elementContainerStart={name:`ɵɵelementContainerStart`,moduleName:v};static elementContainerEnd={name:`ɵɵelementContainerEnd`,moduleName:v};static elementContainer={name:`ɵɵelementContainer`,moduleName:v};static styleMap={name:`ɵɵstyleMap`,moduleName:v};static classMap={name:`ɵɵclassMap`,moduleName:v};static styleProp={name:`ɵɵstyleProp`,moduleName:v};static interpolate={name:`ɵɵinterpolate`,moduleName:v};static interpolate1={name:`ɵɵinterpolate1`,moduleName:v};static interpolate2={name:`ɵɵinterpolate2`,moduleName:v};static interpolate3={name:`ɵɵinterpolate3`,moduleName:v};static interpolate4={name:`ɵɵinterpolate4`,moduleName:v};static interpolate5={name:`ɵɵinterpolate5`,moduleName:v};static interpolate6={name:`ɵɵinterpolate6`,moduleName:v};static interpolate7={name:`ɵɵinterpolate7`,moduleName:v};static interpolate8={name:`ɵɵinterpolate8`,moduleName:v};static interpolateV={name:`ɵɵinterpolateV`,moduleName:v};static nextContext={name:`ɵɵnextContext`,moduleName:v};static resetView={name:`ɵɵresetView`,moduleName:v};static templateCreate={name:`ɵɵtemplate`,moduleName:v};static defer={name:`ɵɵdefer`,moduleName:v};static deferWhen={name:`ɵɵdeferWhen`,moduleName:v};static deferOnIdle={name:`ɵɵdeferOnIdle`,moduleName:v};static deferOnImmediate={name:`ɵɵdeferOnImmediate`,moduleName:v};static deferOnTimer={name:`ɵɵdeferOnTimer`,moduleName:v};static deferOnHover={name:`ɵɵdeferOnHover`,moduleName:v};static deferOnInteraction={name:`ɵɵdeferOnInteraction`,moduleName:v};static deferOnViewport={name:`ɵɵdeferOnViewport`,moduleName:v};static deferPrefetchWhen={name:`ɵɵdeferPrefetchWhen`,moduleName:v};static deferPrefetchOnIdle={name:`ɵɵdeferPrefetchOnIdle`,moduleName:v};static deferPrefetchOnImmediate={name:`ɵɵdeferPrefetchOnImmediate`,moduleName:v};static deferPrefetchOnTimer={name:`ɵɵdeferPrefetchOnTimer`,moduleName:v};static deferPrefetchOnHover={name:`ɵɵdeferPrefetchOnHover`,moduleName:v};static deferPrefetchOnInteraction={name:`ɵɵdeferPrefetchOnInteraction`,moduleName:v};static deferPrefetchOnViewport={name:`ɵɵdeferPrefetchOnViewport`,moduleName:v};static deferHydrateWhen={name:`ɵɵdeferHydrateWhen`,moduleName:v};static deferHydrateNever={name:`ɵɵdeferHydrateNever`,moduleName:v};static deferHydrateOnIdle={name:`ɵɵdeferHydrateOnIdle`,moduleName:v};static deferHydrateOnImmediate={name:`ɵɵdeferHydrateOnImmediate`,moduleName:v};static deferHydrateOnTimer={name:`ɵɵdeferHydrateOnTimer`,moduleName:v};static deferHydrateOnHover={name:`ɵɵdeferHydrateOnHover`,moduleName:v};static deferHydrateOnInteraction={name:`ɵɵdeferHydrateOnInteraction`,moduleName:v};static deferHydrateOnViewport={name:`ɵɵdeferHydrateOnViewport`,moduleName:v};static deferEnableTimerScheduling={name:`ɵɵdeferEnableTimerScheduling`,moduleName:v};static enableIncrementalHydrationRuntime={name:`ɵɵenableIncrementalHydrationRuntime`,moduleName:v};static conditionalCreate={name:`ɵɵconditionalCreate`,moduleName:v};static conditionalBranchCreate={name:`ɵɵconditionalBranchCreate`,moduleName:v};static conditional={name:`ɵɵconditional`,moduleName:v};static repeater={name:`ɵɵrepeater`,moduleName:v};static repeaterCreate={name:`ɵɵrepeaterCreate`,moduleName:v};static repeaterTrackByIndex={name:`ɵɵrepeaterTrackByIndex`,moduleName:v};static repeaterTrackByIdentity={name:`ɵɵrepeaterTrackByIdentity`,moduleName:v};static componentInstance={name:`ɵɵcomponentInstance`,moduleName:v};static text={name:`ɵɵtext`,moduleName:v};static enableBindings={name:`ɵɵenableBindings`,moduleName:v};static disableBindings={name:`ɵɵdisableBindings`,moduleName:v};static getCurrentView={name:`ɵɵgetCurrentView`,moduleName:v};static textInterpolate={name:`ɵɵtextInterpolate`,moduleName:v};static textInterpolate1={name:`ɵɵtextInterpolate1`,moduleName:v};static textInterpolate2={name:`ɵɵtextInterpolate2`,moduleName:v};static textInterpolate3={name:`ɵɵtextInterpolate3`,moduleName:v};static textInterpolate4={name:`ɵɵtextInterpolate4`,moduleName:v};static textInterpolate5={name:`ɵɵtextInterpolate5`,moduleName:v};static textInterpolate6={name:`ɵɵtextInterpolate6`,moduleName:v};static textInterpolate7={name:`ɵɵtextInterpolate7`,moduleName:v};static textInterpolate8={name:`ɵɵtextInterpolate8`,moduleName:v};static textInterpolateV={name:`ɵɵtextInterpolateV`,moduleName:v};static restoreView={name:`ɵɵrestoreView`,moduleName:v};static pureFunction0={name:`ɵɵpureFunction0`,moduleName:v};static pureFunction1={name:`ɵɵpureFunction1`,moduleName:v};static pureFunction2={name:`ɵɵpureFunction2`,moduleName:v};static pureFunction3={name:`ɵɵpureFunction3`,moduleName:v};static pureFunction4={name:`ɵɵpureFunction4`,moduleName:v};static pureFunction5={name:`ɵɵpureFunction5`,moduleName:v};static pureFunction6={name:`ɵɵpureFunction6`,moduleName:v};static pureFunction7={name:`ɵɵpureFunction7`,moduleName:v};static pureFunction8={name:`ɵɵpureFunction8`,moduleName:v};static pureFunctionV={name:`ɵɵpureFunctionV`,moduleName:v};static pipeBind1={name:`ɵɵpipeBind1`,moduleName:v};static pipeBind2={name:`ɵɵpipeBind2`,moduleName:v};static pipeBind3={name:`ɵɵpipeBind3`,moduleName:v};static pipeBind4={name:`ɵɵpipeBind4`,moduleName:v};static pipeBindV={name:`ɵɵpipeBindV`,moduleName:v};static domProperty={name:`ɵɵdomProperty`,moduleName:v};static ariaProperty={name:`ɵɵariaProperty`,moduleName:v};static property={name:`ɵɵproperty`,moduleName:v};static control={name:`ɵɵcontrol`,moduleName:v};static controlCreate={name:`ɵɵcontrolCreate`,moduleName:v};static animationEnterListener={name:`ɵɵanimateEnterListener`,moduleName:v};static animationLeaveListener={name:`ɵɵanimateLeaveListener`,moduleName:v};static animationEnter={name:`ɵɵanimateEnter`,moduleName:v};static animationLeave={name:`ɵɵanimateLeave`,moduleName:v};static i18n={name:`ɵɵi18n`,moduleName:v};static i18nAttributes={name:`ɵɵi18nAttributes`,moduleName:v};static i18nExp={name:`ɵɵi18nExp`,moduleName:v};static i18nStart={name:`ɵɵi18nStart`,moduleName:v};static i18nEnd={name:`ɵɵi18nEnd`,moduleName:v};static i18nApply={name:`ɵɵi18nApply`,moduleName:v};static i18nPostprocess={name:`ɵɵi18nPostprocess`,moduleName:v};static pipe={name:`ɵɵpipe`,moduleName:v};static projection={name:`ɵɵprojection`,moduleName:v};static projectionDef={name:`ɵɵprojectionDef`,moduleName:v};static reference={name:`ɵɵreference`,moduleName:v};static inject={name:`ɵɵinject`,moduleName:v};static injectAttribute={name:`ɵɵinjectAttribute`,moduleName:v};static directiveInject={name:`ɵɵdirectiveInject`,moduleName:v};static invalidFactory={name:`ɵɵinvalidFactory`,moduleName:v};static invalidFactoryDep={name:`ɵɵinvalidFactoryDep`,moduleName:v};static templateRefExtractor={name:`ɵɵtemplateRefExtractor`,moduleName:v};static forwardRef={name:`forwardRef`,moduleName:v};static resolveForwardRef={name:`resolveForwardRef`,moduleName:v};static replaceMetadata={name:`ɵɵreplaceMetadata`,moduleName:v};static getReplaceMetadataURL={name:`ɵɵgetReplaceMetadataURL`,moduleName:v};static ɵɵdefineInjectable={name:`ɵɵdefineInjectable`,moduleName:v};static declareInjectable={name:`ɵɵngDeclareInjectable`,moduleName:v};static InjectableDeclaration={name:`ɵɵInjectableDeclaration`,moduleName:v};static defineService={name:`ɵɵdefineService`,moduleName:v};static declareService={name:`ɵɵngDeclareService`,moduleName:v};static resolveWindow={name:`ɵɵresolveWindow`,moduleName:v};static resolveDocument={name:`ɵɵresolveDocument`,moduleName:v};static resolveBody={name:`ɵɵresolveBody`,moduleName:v};static getComponentDepsFactory={name:`ɵɵgetComponentDepsFactory`,moduleName:v};static defineComponent={name:`ɵɵdefineComponent`,moduleName:v};static declareComponent={name:`ɵɵngDeclareComponent`,moduleName:v};static setComponentScope={name:`ɵɵsetComponentScope`,moduleName:v};static ChangeDetectionStrategy={name:`ChangeDetectionStrategy`,moduleName:v};static ViewEncapsulation={name:`ViewEncapsulation`,moduleName:v};static ComponentDeclaration={name:`ɵɵComponentDeclaration`,moduleName:v};static FactoryDeclaration={name:`ɵɵFactoryDeclaration`,moduleName:v};static declareFactory={name:`ɵɵngDeclareFactory`,moduleName:v};static FactoryTarget={name:`ɵɵFactoryTarget`,moduleName:v};static defineDirective={name:`ɵɵdefineDirective`,moduleName:v};static declareDirective={name:`ɵɵngDeclareDirective`,moduleName:v};static DirectiveDeclaration={name:`ɵɵDirectiveDeclaration`,moduleName:v};static InjectorDef={name:`ɵɵInjectorDef`,moduleName:v};static InjectorDeclaration={name:`ɵɵInjectorDeclaration`,moduleName:v};static defineInjector={name:`ɵɵdefineInjector`,moduleName:v};static declareInjector={name:`ɵɵngDeclareInjector`,moduleName:v};static NgModuleDeclaration={name:`ɵɵNgModuleDeclaration`,moduleName:v};static ModuleWithProviders={name:`ModuleWithProviders`,moduleName:v};static defineNgModule={name:`ɵɵdefineNgModule`,moduleName:v};static declareNgModule={name:`ɵɵngDeclareNgModule`,moduleName:v};static setNgModuleScope={name:`ɵɵsetNgModuleScope`,moduleName:v};static registerNgModuleType={name:`ɵɵregisterNgModuleType`,moduleName:v};static PipeDeclaration={name:`ɵɵPipeDeclaration`,moduleName:v};static definePipe={name:`ɵɵdefinePipe`,moduleName:v};static declarePipe={name:`ɵɵngDeclarePipe`,moduleName:v};static declareClassMetadata={name:`ɵɵngDeclareClassMetadata`,moduleName:v};static declareClassMetadataAsync={name:`ɵɵngDeclareClassMetadataAsync`,moduleName:v};static setClassMetadata={name:`ɵsetClassMetadata`,moduleName:v};static setClassMetadataAsync={name:`ɵsetClassMetadataAsync`,moduleName:v};static setClassDebugInfo={name:`ɵsetClassDebugInfo`,moduleName:v};static queryRefresh={name:`ɵɵqueryRefresh`,moduleName:v};static viewQuery={name:`ɵɵviewQuery`,moduleName:v};static loadQuery={name:`ɵɵloadQuery`,moduleName:v};static contentQuery={name:`ɵɵcontentQuery`,moduleName:v};static viewQuerySignal={name:`ɵɵviewQuerySignal`,moduleName:v};static contentQuerySignal={name:`ɵɵcontentQuerySignal`,moduleName:v};static queryAdvance={name:`ɵɵqueryAdvance`,moduleName:v};static twoWayProperty={name:`ɵɵtwoWayProperty`,moduleName:v};static twoWayBindingSet={name:`ɵɵtwoWayBindingSet`,moduleName:v};static twoWayListener={name:`ɵɵtwoWayListener`,moduleName:v};static declareLet={name:`ɵɵdeclareLet`,moduleName:v};static storeLet={name:`ɵɵstoreLet`,moduleName:v};static readContextLet={name:`ɵɵreadContextLet`,moduleName:v};static arrowFunction={name:`ɵɵarrowFunction`,moduleName:v};static attachSourceLocations={name:`ɵɵattachSourceLocations`,moduleName:v};static NgOnChangesFeature={name:`ɵɵNgOnChangesFeature`,moduleName:v};static ControlFeature={name:`ɵɵControlFeature`,moduleName:v};static InheritDefinitionFeature={name:`ɵɵInheritDefinitionFeature`,moduleName:v};static ProvidersFeature={name:`ɵɵProvidersFeature`,moduleName:v};static HostDirectivesFeature={name:`ɵɵHostDirectivesFeature`,moduleName:v};static ExternalStylesFeature={name:`ɵɵExternalStylesFeature`,moduleName:v};static listener={name:`ɵɵlistener`,moduleName:v};static getInheritedFactory={name:`ɵɵgetInheritedFactory`,moduleName:v};static sanitizeHtml={name:`ɵɵsanitizeHtml`,moduleName:v};static sanitizeStyle={name:`ɵɵsanitizeStyle`,moduleName:v};static validateAttribute={name:`ɵɵvalidateAttribute`,moduleName:v};static sanitizeResourceUrl={name:`ɵɵsanitizeResourceUrl`,moduleName:v};static sanitizeScript={name:`ɵɵsanitizeScript`,moduleName:v};static sanitizeUrl={name:`ɵɵsanitizeUrl`,moduleName:v};static sanitizeUrlOrResourceUrl={name:`ɵɵsanitizeUrlOrResourceUrl`,moduleName:v};static trustConstantHtml={name:`ɵɵtrustConstantHtml`,moduleName:v};static trustConstantResourceUrl={name:`ɵɵtrustConstantResourceUrl`,moduleName:v};static inputDecorator={name:`Input`,moduleName:v};static outputDecorator={name:`Output`,moduleName:v};static viewChildDecorator={name:`ViewChild`,moduleName:v};static viewChildrenDecorator={name:`ViewChildren`,moduleName:v};static contentChildDecorator={name:`ContentChild`,moduleName:v};static contentChildrenDecorator={name:`ContentChildren`,moduleName:v};static InputSignalBrandWriteType={name:`ɵINPUT_SIGNAL_BRAND_WRITE_TYPE`,moduleName:v};static UnwrapDirectiveSignalInputs={name:`ɵUnwrapDirectiveSignalInputs`,moduleName:v};static unwrapWritableSignal={name:`ɵunwrapWritableSignal`,moduleName:v};static assertType={name:`ɵassertType`,moduleName:v}}return e})();_.And,_.Bigger,_.BiggerEquals,_.BitwiseOr,_.BitwiseAnd,_.Divide,_.Assign,_.Equals,_.Identical,_.Lower,_.LowerEquals,_.Minus,_.Modulo,_.Exponentiation,_.Multiply,_.NotEquals,_.NotIdentical,_.NullishCoalesce,_.Or,_.Plus,_.In,_.InstanceOf,_.AdditionAssignment,_.SubtractionAssignment,_.MultiplicationAssignment,_.DivisionAssignment,_.RemainderAssignment,_.ExponentiationAssignment,_.AndAssignment,_.OrAssignment,_.NullishCoalesceAssignment;var dee=class{span;sourceSpan;constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return`AST`}},fee=class extends dee{receiver;args;argumentSpan;constructor(e,t,n,r,i){super(e,t),this.receiver=n,this.args=r,this.argumentSpan=i}visit(e,t=null){return e.visitCall(this,t)}},Ct=(function(e){return e[e.Property=0]=`Property`,e[e.Attribute=1]=`Attribute`,e[e.Class=2]=`Class`,e[e.Style=3]=`Style`,e[e.LegacyAnimation=4]=`LegacyAnimation`,e[e.TwoWay=5]=`TwoWay`,e[e.Animation=6]=`Animation`,e})(Ct||{}),pee=`(:(where|is)\\()?`,wt=`-shadowcsshost`,Tt=`-shadowcsscontext`,Et=`[^)(]*`,Dt=String.raw`(?:\(${Et}\)|${Et})+?`,Ot=String.raw`(?:\(${Dt}\)|${Et})+?`,kt=String.raw`(?:\((${Ot})\))`;String.raw`(:nth-[-\w]+)`+kt,wt+kt+``,`${pee}`,Tt+kt+``;var At=(function(e){return e[e.ListEnd=0]=`ListEnd`,e[e.Statement=1]=`Statement`,e[e.Variable=2]=`Variable`,e[e.ElementStart=3]=`ElementStart`,e[e.Element=4]=`Element`,e[e.ForeignComponent=5]=`ForeignComponent`,e[e.Template=6]=`Template`,e[e.ElementEnd=7]=`ElementEnd`,e[e.ContainerStart=8]=`ContainerStart`,e[e.Container=9]=`Container`,e[e.ContainerEnd=10]=`ContainerEnd`,e[e.DisableBindings=11]=`DisableBindings`,e[e.ConditionalCreate=12]=`ConditionalCreate`,e[e.ConditionalBranchCreate=13]=`ConditionalBranchCreate`,e[e.Conditional=14]=`Conditional`,e[e.EnableBindings=15]=`EnableBindings`,e[e.Text=16]=`Text`,e[e.Listener=17]=`Listener`,e[e.InterpolateText=18]=`InterpolateText`,e[e.Binding=19]=`Binding`,e[e.Property=20]=`Property`,e[e.StyleProp=21]=`StyleProp`,e[e.ClassProp=22]=`ClassProp`,e[e.StyleMap=23]=`StyleMap`,e[e.ClassMap=24]=`ClassMap`,e[e.Advance=25]=`Advance`,e[e.Pipe=26]=`Pipe`,e[e.Attribute=27]=`Attribute`,e[e.ExtractedAttribute=28]=`ExtractedAttribute`,e[e.Defer=29]=`Defer`,e[e.DeferOn=30]=`DeferOn`,e[e.DeferWhen=31]=`DeferWhen`,e[e.I18nMessage=32]=`I18nMessage`,e[e.DomProperty=33]=`DomProperty`,e[e.Namespace=34]=`Namespace`,e[e.ProjectionDef=35]=`ProjectionDef`,e[e.EnableIncrementalHydrationRuntime=36]=`EnableIncrementalHydrationRuntime`,e[e.Projection=37]=`Projection`,e[e.Content=38]=`Content`,e[e.RepeaterCreate=39]=`RepeaterCreate`,e[e.Repeater=40]=`Repeater`,e[e.TwoWayProperty=41]=`TwoWayProperty`,e[e.TwoWayListener=42]=`TwoWayListener`,e[e.DeclareLet=43]=`DeclareLet`,e[e.StoreLet=44]=`StoreLet`,e[e.I18nStart=45]=`I18nStart`,e[e.I18n=46]=`I18n`,e[e.I18nEnd=47]=`I18nEnd`,e[e.I18nExpression=48]=`I18nExpression`,e[e.I18nApply=49]=`I18nApply`,e[e.IcuStart=50]=`IcuStart`,e[e.IcuEnd=51]=`IcuEnd`,e[e.IcuPlaceholder=52]=`IcuPlaceholder`,e[e.I18nContext=53]=`I18nContext`,e[e.I18nAttributes=54]=`I18nAttributes`,e[e.SourceLocation=55]=`SourceLocation`,e[e.Animation=56]=`Animation`,e[e.AnimationString=57]=`AnimationString`,e[e.AnimationBinding=58]=`AnimationBinding`,e[e.AnimationListener=59]=`AnimationListener`,e[e.Control=60]=`Control`,e[e.ControlCreate=61]=`ControlCreate`,e})(At||{}),jt=(function(e){return e[e.LexicalRead=0]=`LexicalRead`,e[e.Context=1]=`Context`,e[e.TrackContext=2]=`TrackContext`,e[e.ReadVariable=3]=`ReadVariable`,e[e.NextContext=4]=`NextContext`,e[e.Reference=5]=`Reference`,e[e.StoreLet=6]=`StoreLet`,e[e.ContextLetReference=7]=`ContextLetReference`,e[e.GetCurrentView=8]=`GetCurrentView`,e[e.RestoreView=9]=`RestoreView`,e[e.ResetView=10]=`ResetView`,e[e.PureFunctionExpr=11]=`PureFunctionExpr`,e[e.PureFunctionParameterExpr=12]=`PureFunctionParameterExpr`,e[e.PipeBinding=13]=`PipeBinding`,e[e.PipeBindingVariadic=14]=`PipeBindingVariadic`,e[e.SafePropertyRead=15]=`SafePropertyRead`,e[e.SafeKeyedRead=16]=`SafeKeyedRead`,e[e.SafeNavigationMigration=17]=`SafeNavigationMigration`,e[e.SafeTernaryExpr=18]=`SafeTernaryExpr`,e[e.EmptyExpr=19]=`EmptyExpr`,e[e.AssignTemporaryExpr=20]=`AssignTemporaryExpr`,e[e.ReadTemporaryExpr=21]=`ReadTemporaryExpr`,e[e.SlotLiteralExpr=22]=`SlotLiteralExpr`,e[e.ConditionalCase=23]=`ConditionalCase`,e[e.ConstCollected=24]=`ConstCollected`,e[e.TwoWayBindingSet=25]=`TwoWayBindingSet`,e[e.ForeignContent=26]=`ForeignContent`,e[e.ArrowFunction=27]=`ArrowFunction`,e})(jt||{}),Mt=(function(e){return e[e.None=0]=`None`,e[e.AlwaysInline=1]=`AlwaysInline`,e})(Mt||{}),Nt=(function(e){return e[e.Context=0]=`Context`,e[e.Identifier=1]=`Identifier`,e[e.SavedView=2]=`SavedView`,e[e.Alias=3]=`Alias`,e})(Nt||{}),Pt=(function(e){return e[e.Attribute=0]=`Attribute`,e[e.ClassName=1]=`ClassName`,e[e.StyleProperty=2]=`StyleProperty`,e[e.Property=3]=`Property`,e[e.Template=4]=`Template`,e[e.I18n=5]=`I18n`,e[e.LegacyAnimation=6]=`LegacyAnimation`,e[e.TwoWayProperty=7]=`TwoWayProperty`,e[e.Animation=8]=`Animation`,e})(Pt||{}),Ft=(function(e){return e[e.Creation=0]=`Creation`,e[e.Postproccessing=1]=`Postproccessing`,e})(Ft||{}),It=(function(e){return e[e.I18nText=0]=`I18nText`,e[e.I18nAttribute=1]=`I18nAttribute`,e})(It||{}),Lt=(function(e){return e[e.None=0]=`None`,e[e.ElementTag=1]=`ElementTag`,e[e.TemplateTag=2]=`TemplateTag`,e[e.OpenTag=4]=`OpenTag`,e[e.CloseTag=8]=`CloseTag`,e[e.ExpressionIndex=16]=`ExpressionIndex`,e})(Lt||{}),Rt=(function(e){return e[e.HTML=0]=`HTML`,e[e.SVG=1]=`SVG`,e[e.Math=2]=`Math`,e})(Rt||{}),zt=(function(e){return e[e.Idle=0]=`Idle`,e[e.Immediate=1]=`Immediate`,e[e.Timer=2]=`Timer`,e[e.Hover=3]=`Hover`,e[e.Interaction=4]=`Interaction`,e[e.Viewport=5]=`Viewport`,e[e.Never=6]=`Never`,e})(zt||{}),Bt=(function(e){return e[e.RootI18n=0]=`RootI18n`,e[e.Icu=1]=`Icu`,e[e.Attr=2]=`Attr`,e})(Bt||{}),Vt=(function(e){return e[e.NgTemplate=0]=`NgTemplate`,e[e.Structural=1]=`Structural`,e[e.Block=2]=`Block`,e})(Vt||{}),Ht=(function(e){return e[e.None=0]=`None`,e[e.InChildOperation=1]=`InChildOperation`,e[e.InArrowFunctionOperation=2]=`InArrowFunctionOperation`,e[e.InSafeNavigationMigration=4]=`InSafeNavigationMigration`,e})(Ht||{});At.Element,At.ElementStart,At.Container,At.ContainerStart,At.Template,At.RepeaterCreate,At.ConditionalCreate,At.ConditionalBranchCreate;var Ut=(function(e){return e[e.Tmpl=0]=`Tmpl`,e[e.Host=1]=`Host`,e[e.Both=2]=`Both`,e})(Ut||{}),Wt=(function(e){return e[e.Full=0]=`Full`,e[e.DomOnly=1]=`DomOnly`,e})(Wt||{});y.ariaProperty,y.ariaProperty,y.attribute,y.attribute,y.classProp,y.classProp,y.element,y.element,y.elementContainer,y.elementContainer,y.elementContainerEnd,y.elementContainerEnd,y.elementContainerStart,y.elementContainerStart,y.elementEnd,y.elementEnd,y.elementStart,y.elementStart,y.domProperty,y.domProperty,y.i18nExp,y.i18nExp,y.listener,y.listener,y.listener,y.listener,y.property,y.property,y.styleProp,y.styleProp,y.syntheticHostListener,y.syntheticHostListener,y.syntheticHostProperty,y.syntheticHostProperty,y.templateCreate,y.templateCreate,y.twoWayProperty,y.twoWayProperty,y.twoWayListener,y.twoWayListener,y.declareLet,y.declareLet,y.conditionalCreate,y.conditionalBranchCreate,y.conditionalBranchCreate,y.conditionalBranchCreate,y.domElement,y.domElement,y.domElementStart,y.domElementStart,y.domElementEnd,y.domElementEnd,y.domElementContainer,y.domElementContainer,y.domElementContainerStart,y.domElementContainerStart,y.domElementContainerEnd,y.domElementContainerEnd,y.domListener,y.domListener,y.domTemplate,y.domTemplate,y.animationEnter,y.animationEnter,y.animationLeave,y.animationLeave,y.animationEnterListener,y.animationEnterListener,y.animationLeaveListener,y.animationLeaveListener,_.And,_.Bigger,_.BiggerEquals,_.BitwiseOr,_.BitwiseAnd,_.Divide,_.Assign,_.Equals,_.Identical,_.Lower,_.LowerEquals,_.Minus,_.Modulo,_.Exponentiation,_.Multiply,_.NotEquals,_.NotIdentical,_.NullishCoalesce,_.Or,_.Plus,_.In,_.InstanceOf,_.AdditionAssignment,_.SubtractionAssignment,_.MultiplicationAssignment,_.DivisionAssignment,_.RemainderAssignment,_.ExponentiationAssignment,_.AndAssignment,_.OrAssignment,_.NullishCoalesceAssignment,At.Property,At.Property,At.Property,At.Attribute,At.Attribute,At.Property,At.TwoWayProperty,At.Container,At.ContainerStart,At.ContainerEnd,At.Element,At.ElementStart,At.ElementEnd,At.Template,At.ElementEnd,At.ElementStart,At.Element,At.ContainerEnd,At.ContainerStart,At.Container,At.I18nEnd,At.I18nStart,At.I18n,At.Pipe;var Gt=` \f +\r \v ᠎ - \u2028\u2029   `;`${Gt}`,`${Gt}`;var Kt=(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})(Kt||{}),qt=(function(e){return e[e.Plain=0]=`Plain`,e[e.TemplateLiteralPart=1]=`TemplateLiteralPart`,e[e.TemplateLiteralEnd=2]=`TemplateLiteralEnd`,e})(qt||{});Kt.Character,At.StyleMap,At.ClassMap,At.StyleProp,At.ClassProp,At.Attribute,At.Property,At.Attribute,At.Control,At.DomProperty,At.DomProperty,At.Attribute,At.StyleMap,At.ClassMap,At.StyleProp,At.ClassProp,At.Listener,At.TwoWayListener,At.AnimationListener,At.StyleMap,At.ClassMap,At.StyleProp,At.ClassProp,At.Property,At.TwoWayProperty,At.DomProperty,At.Attribute,At.Animation,At.Control,zt.Idle,y.deferOnIdle,y.deferPrefetchOnIdle,y.deferHydrateOnIdle,zt.Immediate,y.deferOnImmediate,y.deferPrefetchOnImmediate,y.deferHydrateOnImmediate,zt.Timer,y.deferOnTimer,y.deferPrefetchOnTimer,y.deferHydrateOnTimer,zt.Hover,y.deferOnHover,y.deferPrefetchOnHover,y.deferHydrateOnHover,zt.Interaction,y.deferOnInteraction,y.deferPrefetchOnInteraction,y.deferHydrateOnInteraction,zt.Viewport,y.deferOnViewport,y.deferPrefetchOnViewport,y.deferHydrateOnViewport,zt.Never,y.deferHydrateNever,y.deferHydrateNever,y.deferHydrateNever,y.pipeBind1,y.pipeBind2,y.pipeBind3,y.pipeBind4,y.textInterpolate,y.textInterpolate1,y.textInterpolate2,y.textInterpolate3,y.textInterpolate4,y.textInterpolate5,y.textInterpolate6,y.textInterpolate7,y.textInterpolate8,y.textInterpolateV,y.interpolate,y.interpolate1,y.interpolate2,y.interpolate3,y.interpolate4,y.interpolate5,y.interpolate6,y.interpolate7,y.interpolate8,y.interpolateV,y.pureFunction0,y.pureFunction1,y.pureFunction2,y.pureFunction3,y.pureFunction4,y.pureFunction5,y.pureFunction6,y.pureFunction7,y.pureFunction8,y.pureFunctionV,y.resolveWindow,y.resolveDocument,y.resolveBody,tt.HTML,y.sanitizeHtml,tt.RESOURCE_URL,y.sanitizeResourceUrl,tt.SCRIPT,y.sanitizeScript,tt.STYLE,y.sanitizeStyle,tt.URL,y.sanitizeUrl,tt.ATTRIBUTE_NO_BINDING,y.validateAttribute,tt.HTML,y.trustConstantHtml,tt.RESOURCE_URL,y.trustConstantResourceUrl;var Jt=(function(e){return e[e.None=0]=`None`,e[e.ViewContextRead=1]=`ViewContextRead`,e[e.ViewContextWrite=2]=`ViewContextWrite`,e[e.SideEffectful=4]=`SideEffectful`,e})(Jt||{});Ut.Tmpl,Ut.Tmpl,Ut.Both,Ut.Host,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Both,Ut.Both,Ut.Both,Ut.Tmpl,Ut.Both,Ut.Both,Ut.Tmpl,Ut.Both,Ut.Tmpl,Ut.Both,Ut.Both,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Both,Ut.Both,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Both,Ut.Both,Ut.Both,Ut.Tmpl,Ut.Tmpl,Ut.Both,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Both,Ut.Both,Ut.Tmpl,Ut.Both,Ut.Both,Ut.Both,Ut.Both,Ut.Both,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Both,Ut.Tmpl,Ut.Both,Ut.Tmpl,Ut.Both,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Tmpl,Ut.Both,Ut.Both,Ut.Both,Ct.Property,Pt.Property,Ct.TwoWay,Pt.TwoWayProperty,Ct.Attribute,Pt.Attribute,Ct.Class,Pt.ClassName,Ct.Style,Pt.StyleProperty,Ct.LegacyAnimation,Pt.LegacyAnimation,Ct.Animation,Pt.Animation;var Yt=`%COMP%`;`${Yt}`,`${Yt}`,class e{static SINGLETON=new e;static veWillInferAnyFor(t){let n=e.SINGLETON;return t instanceof fee?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 Xt=null,Zt=!1,Qt=1,$t=null,en=Symbol(`SIGNAL`);function tn(e){let t=Xt;return Xt=e,t}function nn(){return Xt}var rn={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 an(e){if(Zt)throw Error(``);if(Xt===null)return;Xt.consumerOnSignalRead(e);let t=Xt.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=Xt.recomputing;if(r&&(n=t===void 0?Xt.producers:t.nextProducer,n!==void 0&&n.producer===e)){Xt.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=Qt;return}let i=e.consumersTail;if(i!==void 0&&i.consumer===Xt&&(!r||i.knownValidAtEpoch===Qt))return;let a=bn(Xt),o={producer:e,consumer:Xt,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:Qt,lastReadVersion:e.version,nextConsumer:void 0};Xt.producersTail=o,t===void 0?Xt.producers=o:t.nextProducer=o,a&&vn(e,o)}function on(){Qt++}function sn(e){if((!bn(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==Qt)){if(!e.producerMustRecompute(e)&&!gn(e)){dn(e);return}e.producerRecomputeValue(e),dn(e)}}function cn(e){if(e.consumers===void 0)return;let t=Zt;Zt=!0;try{for(let t=e.consumers;t!==void 0;t=t.nextConsumer){let e=t.consumer;e.dirty||un(e)}}finally{Zt=t}}function ln(){return Xt?.consumerAllowSignalWrites!==!1}function un(e){e.dirty=!0,cn(e),e.consumerMarkedDirty?.(e)}function dn(e){e.dirty=!1,e.lastCleanEpoch=Qt}function fn(e){return e&&pn(e),tn(e)}function pn(e){if(e.producersTail?.knownValidAtEpoch===Qt){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function mn(e,t){tn(t),e&&hn(e)}function hn(e){e.recomputing=!1;let t=e.producersTail,n=t===void 0?e.producers:t.nextProducer;if(n!==void 0){if(bn(e))do n=yn(n);while(n!==void 0);t===void 0?e.producers=void 0:t.nextProducer=void 0}}function gn(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let e=t.producer,n=t.lastReadVersion;if(n!==e.version||(sn(e),n!==e.version))return!0}return!1}function _n(e){if(bn(e)){let t=e.producers;for(;t!==void 0;)t=yn(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function vn(e,t){let n=e.consumersTail,r=bn(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)vn(t.producer,t)}function yn(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,!bn(t)){let e=t.producers;for(;e!==void 0;)e=yn(e)}return n}function bn(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function xn(e){$t?.(e)}function Sn(e,t){return Object.is(e,t)}function Cn(e,t){let n=Object.create(mee);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(sn(n),an(n),n.value===En)throw n.error;return n.value};return r[en]=n,xn(n),r}var wn=Symbol(`UNSET`),Tn=Symbol(`COMPUTING`),En=Symbol(`ERRORED`),mee={...rn,value:wn,dirty:!0,error:null,equal:Sn,kind:`computed`,producerMustRecompute(e){return e.value===wn||e.value===Tn},producerRecomputeValue(e){if(e.value===Tn)throw Error(``);let t=e.value;e.value=Tn;let n=fn(e),r,i=!1;try{r=e.computation(),tn(null),i=t!==wn&&t!==En&&r!==En&&e.equal(t,r)}catch(t){r=En,e.error=t}finally{mn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function hee(){throw Error()}var Dn=hee;function On(e){Dn(e)}function gee(e){Dn=e}var _ee=null;function vee(e,t){let n=Object.create(jn);n.value=e,t!==void 0&&(n.equal=t);let r=()=>yee(n);return r[en]=n,xn(n),[r,e=>kn(n,e),e=>An(n,e)]}function yee(e){return an(e),e.value}function kn(e,t){ln()||On(e),e.equal(e.value,t)||(e.value=t,bee(e))}function An(e,t){ln()||On(e),kn(e,t(e.value))}var jn={...rn,equal:Sn,value:void 0,kind:`signal`};function bee(e){e.version++,on(),cn(e),_ee?.(e)}var xee={...rn,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:`effect`};function See(e){if(e.dirty=!1,e.version>0&&!gn(e))return;e.version++;let t=fn(e);try{e.cleanup(),e.fn()}finally{mn(e,t)}}var Mn=void 0;function Nn(){return Mn}function Pn(e){let t=Mn;return Mn=e,t}var Fn=Symbol(`NotFound`);function In(e){return e===Fn||e?.name===`ɵNotFound`}function Ln(e,t,n){let r=Object.create(Bn);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(sn(r),an(r),r.value===En)throw r.error;return r.value};return i[en]=r,xn(r),i}function Rn(e,t){sn(e),kn(e,t),dn(e)}function zn(e,t){if(sn(e),e.value===En)throw e.error;An(e,t),dn(e)}var Bn={...rn,value:wn,dirty:!0,error:null,equal:Sn,kind:`linkedSignal`,producerMustRecompute(e){return e.value===wn||e.value===Tn},producerRecomputeValue(e){if(e.value===Tn)throw Error(``);let t=e.value;e.value=Tn;let n=fn(e),r,i=!1;try{let n=e.source(),a=t!==wn&&t!==En,o=a?{source:e.sourceValue,value:t}:void 0;r=e.computation(n,o),e.sourceValue=n,tn(null),i=a&&r!==En&&e.equal(t,r)}catch(t){r=En,e.error=t}finally{mn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function Vn(e){let t=tn(null);try{return e()}finally{tn(t)}}var Hn=function(e,t){return Hn=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])},Hn(e,t)};function Un(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Hn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Wn(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 Gn(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 qn(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 Jn(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 Yn?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 Zn(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Kn==`function`?Kn(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 Qn(e){return typeof e==`function`}function $n(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 er=$n(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 cr(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var lr=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=$n(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(ar(c))try{c()}catch(e){i=e instanceof sr?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=$n(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{fr(f)}catch(e){i??=[],e instanceof sr?i=tr(tr([],er(i)),er(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 sr(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)fr(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)&&cr(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&cr(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),ur=lr.EMPTY;function dr(e){return e instanceof lr||e&&`closed`in e&&ar(e.remove)&&ar(e.add)&&ar(e.unsubscribe)}function fr(e){ar(e)?e():e.unsubscribe()}var pr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},mr={setTimeout:function(e,t){var n=[...arguments].slice(2),r=mr.delegate;return r?.setTimeout?r.setTimeout.apply(r,tr([e,t],er(n))):setTimeout.apply(void 0,tr([e,t],er(n)))},clearTimeout:function(e){return(mr.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function hr(e){mr.setTimeout(function(){var t=pr.onUnhandledError;if(t)t(e);else throw e})}function gr(){}var _r=(function(){return br(`C`,void 0,void 0)})();function vr(e){return br(`E`,void 0,e)}function yr(e){return br(`N`,e,void 0)}function br(e,t,n){return{kind:e,value:t,error:n}}var xr=null;function Sr(e){if(pr.useDeprecatedSynchronousErrorHandling){var t=!xr;if(t&&(xr={errorThrown:!1,error:null}),e(),t){var n=xr,r=n.errorThrown,i=n.error;if(xr=null,r)throw i}}else e()}function Cr(e){pr.useDeprecatedSynchronousErrorHandling&&xr&&(xr.errorThrown=!0,xr.error=e)}var wr=function(e){Xn(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,dr(t)&&t.add(n)):n.destination=Mr,n}return t.create=function(e,t,n){return new Or(e,t,n)},t.prototype.next=function(e){this.isStopped?jr(yr(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?jr(vr(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?jr(_r,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}(lr),Tr=Function.prototype.bind;function Er(e,t){return Tr.call(e,t)}var Dr=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){kr(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){kr(e)}else kr(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){kr(e)}},e}(),Or=function(e){Xn(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(ar(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&pr.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&Er(t.next,o),error:t.error&&Er(t.error,o),complete:t.complete&&Er(t.complete,o)}):a=t}return i.destination=new Dr(a),i}return t}(wr);function kr(e){pr.useDeprecatedSynchronousErrorHandling?Cr(e):hr(e)}function Ar(e){throw e}function jr(e,t){var n=pr.onStoppedNotification;n&&mr.setTimeout(function(){return n(e,t)})}var Mr={closed:!0,next:gr,error:Ar,complete:gr},Nr=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Pr(e){return e}function Fr(e){return e.length===0?Pr:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Ir=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=zr(e)?e:new Or(e,t,n);return Sr(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=Lr(t),new t(function(t,r){var i=new Or({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[Nr]=function(){return this},e.prototype.pipe=function(){return Fr([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Lr(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 Lr(e){return e??pr.Promise??Promise}function Rr(e){return e&&ar(e.next)&&ar(e.error)&&ar(e.complete)}function zr(e){return e&&e instanceof wr||Rr(e)&&dr(e)}function Br(e){return ar(e?.lift)}function Vr(e){return function(t){if(Br(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 Hr(e,t,n,r,i){return new Ur(e,t,n,r,i)}var Ur=function(e){Xn(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}(wr),Wr=or(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Gr=function(e){Xn(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 Kr(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Wr},t.prototype.next=function(e){var t=this;Sr(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=$n(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;Sr(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;Sr(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?ur:(this.currentObservers=null,a.push(e),new lr(function(){t.currentObservers=null,cr(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 Ir;return e.source=this,e},t.create=function(e,t){return new Kr(e,t)},t}(Ir),Kr=function(e){Xn(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)??ur},t}(Gr),qr=function(e){Xn(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}(Gr);function Jr(e){return e[e.length-1]}function Yr(e){return ar(Jr(e))?e.pop():void 0}var Xr=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function Zr(e){return ar(e?.then)}function Qr(e){return ar(e[Nr])}function $r(e){return Symbol.asyncIterator&&ar(e?.[Symbol.asyncIterator])}function ei(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 ti(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var ni=ti();function ri(e){return ar(e?.[ni])}function ii(e){return rr(this,arguments,function(){var t,n,r,i;return Qn(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,nr(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,nr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,nr(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 ai(e){return ar(e?.getReader)}function oi(e){if(e instanceof Ir)return e;if(e!=null){if(Qr(e))return si(e);if(Xr(e))return ci(e);if(Zr(e))return li(e);if($r(e))return di(e);if(ri(e))return ui(e);if(ai(e))return fi(e)}throw ei(e)}function si(e){return new Ir(function(t){var n=e[Nr]();if(ar(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function ci(e){return new Ir(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 Lee=xi({__forward_ref__:xi});function wi(e){return e.__forward_ref__=wi,e}function Ti(e){return Ei(e)?e():e}function Ei(e){return typeof e==`function`&&Object.hasOwn(e,Lee)&&e.__forward_ref__===wi}function Di(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Oi(e){return Ree(e,ji)}function Ree(e,t){return Object.hasOwn(e,t)&&e[t]||null}function ki(e){return(e?.[ji]??null)||null}function Ai(e){return e&&Object.hasOwn(e,Mi)?e[Mi]:null}var ji=xi({ɵprov:xi}),Mi=xi({ɵinj:xi}),Ni=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=Di({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Pi(e){return e&&!!e.ɵproviders}var Fi=xi({ɵcmp:xi}),Ii=xi({ɵdir:xi}),Li=xi({ɵpipe:xi}),Ri=xi({ɵfac:xi}),zi=xi({__NG_ELEMENT_ID__:xi}),Bi=xi({__NG_ENV_ID__:xi});function Vi(e){return Wi(e,`@Component`),e[Fi]||null}function Hi(e){return Wi(e,`@Directive`),e[Ii]||null}function Ui(e){return Wi(e,`@Pipe`),e[Li]||null}function Wi(e,t){if(e==null)throw new yi(-919,!1)}function Gi(e){return typeof e==`string`?e:e==null?``:String(e)}var Ki=xi({ngErrorCode:xi}),qi=xi({ngErrorMessage:xi}),Ji=xi({ngTokenPath:xi});function Yi(e,t){return Zi(``,-200,t)}function Xi(e,t){throw new yi(-201,!1)}function Zi(e,t,n){let r=new yi(t,e);return r[Ki]=t,r[qi]=e,n&&(r[Ji]=n),r}function Qi(e){return e[Ki]}var $i;function ea(){return $i}function ta(e){let t=$i;return $i=e,t}function na(e,t,n){let r=Oi(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;Xi(e,``)}var ra=globalThis,ia={},aa=`__NG_DI_FLAG__`,oa=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=la(t)||0;try{return this.injector.get(e,n&8?null:ia,n)}catch(e){if(Un(e))return e;throw e}}};function sa(e,t=0){let n=Bn();if(n===void 0)throw new yi(-203,!1);if(n===null)return na(e,void 0,t);{let r=ua(t),i=n.retrieve(e,r);if(Un(i)){if(r.optional)return null;throw i}return i}}function ca(e,t=0){return(ea()||sa)(Ti(e),t)}function b(e,t){return ca(e,la(t))}function la(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function ua(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function da(e){let t=[];for(let n=0;nArray.isArray(e)?ga(e,t):t(e))}function _a(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function va(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function ya(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 xa(e,t,n){let r=Ca(e,t);return r>=0?e[r|1]=n:(r=~r,ba(e,r,t,n)),r}function Sa(e,t){let n=Ca(e,t);if(n>=0)return e[n|1]}function Ca(e,t){return wa(e,t,1)}function wa(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 ga(t,e=>{let t=e;Pa(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Na(i,a),n}function Na(e,t){for(let n=0;n{t(e,r)})}}function Pa(e,t,n,r){if(e=Ti(e),!e)return!1;let i=null,a=Ai(e),o=!a&&Vi(e);if(!a&&!o){let t=e.ngModule;if(a=Ai(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)Pa(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{ga(a.imports,i=>{Pa(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Na(e,t)}if(!s){let e=pa(i)||(()=>new i);t({provide:i,useFactory:e,deps:Ea},i),t({provide:ka,useValue:i,multi:!0},i),t({provide:Da,useValue:()=>ca(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Fa(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Fa(e,t){for(let n of e)Pi(n)&&(n=n.ɵproviders),Array.isArray(n)?Fa(n,t):t(n)}var Ia=xi({provide:String,useValue:xi});function La(e){return typeof e==`object`&&!!e&&Ia in e}function Ra(e){return!!(e&&e.useExisting)}function za(e){return!!(e&&e.useFactory)}function Ba(e){return typeof e==`function`}function Va(e){return!!e.useClass}var Ha=new Ni(``),Ua={},Wa={},Ga=void 0;function Ka(){return Ga===void 0&&(Ga=new Aa),Ga}var qa=class{},Ja=class extends qa{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,io(e,e=>this.processProvider(e)),this.records.set(Oa,eo(void 0,this)),r.has(`environment`)&&this.records.set(qa,eo(void 0,this));let i=this.records.get(Ha);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(ka,Ea,{self:!0}))}retrieve(e,t){let n=la(t)||0;try{return this.get(e,ia,n)}catch(e){if(Un(e))return e;throw e}}destroy(){$a(this),this._destroyed=!0;let e=on(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(),on(e)}}onDestroy(e){return $a(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){$a(this);let t=Vn(this),n=ta(void 0);try{return e()}finally{Vn(t),ta(n)}}get(e,t=ia,n){if($a(this),Object.hasOwn(e,Bi))return e[Bi](this);let r=la(n),i=Vn(this),a=ta(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=ro(e)&&Oi(e);t=n&&this.injectableDefInScope(n)?eo(Ya(e),Ua):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Ka():this.parent;return t=r&8&&t===ia?null:t,n.get(e,t)}catch(e){let t=Qi(e);throw t===-200||t===-201?new yi(t,null):e}finally{ta(a),Vn(i)}}resolveInjectorInitializers(){let e=on(null),t=Vn(this),n=ta(void 0);try{let e=this.get(Da,Ea,{self:!0});for(let t of e)t()}finally{Vn(t),ta(n),on(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=Ti(e);let t=Ba(e)?e:Ti(e&&e.provide),n=Za(e);if(!Ba(e)&&e.multi===!0){let n=this.records.get(t);n||(n=eo(void 0,Ua,!0),n.factory=()=>da(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=on(null);try{if(t.value===Wa)throw Yi(``);return t.value===Ua&&(t.value=Wa,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&no(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{on(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Ti(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 Ya(e){let t=Oi(e),n=t===null?pa(e):t.factory;if(n!==null)return n;if(e instanceof Ni)throw new yi(-204,!1);if(e instanceof Function)return Xa(e);throw new yi(-204,!1)}function Xa(e){if(e.length>0)throw new yi(-204,!1);let t=ki(e);return t===null?()=>new e:()=>t.factory(e)}function Za(e){return La(e)?eo(void 0,e.useValue):eo(Qa(e),Ua)}function Qa(e,t,n){let r;if(Ba(e)){let t=Ti(e);return pa(t)||Ya(t)}if(La(e))r=()=>Ti(e.useValue);else if(za(e))r=()=>e.useFactory(...da(e.deps||[]));else if(Ra(e))r=(t,n)=>ca(Ti(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=Ti(e&&(e.useClass||e.provide));if(to(e))r=()=>new t(...da(e.deps));else return pa(t)||Ya(t)}return r}function $a(e){if(e.destroyed)throw new yi(-205,!1)}function eo(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function to(e){return!!e.deps}function no(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function ro(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function io(e,t){for(let n of e)Array.isArray(n)?io(n,t):n&&Pi(n)?io(n.ɵproviders,t):t(n)}function ao(e,t){let n;e instanceof Ja?($a(e),n=e):n=new oa(e);let r=Vn(n),i=ta(void 0);try{return t()}finally{Vn(r),ta(i)}}function oo(){return ea()!==void 0||Bn()!=null}var so=1;function co(e){return Array.isArray(e)&&typeof e[so]==`object`}function lo(e){return Array.isArray(e)&&e[so]===!0}function uo(e){return!!(e.flags&4)}function fo(e){return e.componentOffset>-1}function po(e){return(e.flags&1)==1}function mo(e){return!!e.template}function ho(e){return!!(e[2]&512)}function go(e){return(e[2]&256)==256}var _o=(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})(_o||{}),vo=`math`;function yo(e){for(;Array.isArray(e);)e=e[0];return e}function bo(e,t){return yo(t[e])}function xo(e,t){return yo(t[e.index])}function So(e,t){return e.data[t]}function Co(e,t){return e[t]}function wo(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function To(e,t){let n=t[e];return co(n)?n:n[0]}function Eo(e){return(e[2]&128)==128}function Do(e){return lo(e[3])}function Oo(e,t){return t==null?null:e[t]}function ko(e){e[17]=0}function Ao(e){e[2]&1024||(e[2]|=1024,Eo(e)&&Po(e))}function jo(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=Lo(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!Eo(t)));)t=Lo(t)}function Fo(e,t){if(go(e))throw new yi(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Io(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function Lo(e){let t=e[3];return lo(t)?t[3]:t}function Ro(e){return e[7]??=[]}function zo(e){return e.cleanup??=[]}function zee(e,t,n,r){let i=Ro(t);i.push(n),e.firstCreatePass&&zo(e).push(r,i.length-1)}var Bo={lFrame:fs(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Vo=!1;function Bee(){return Bo.lFrame.elementDepthCount}function Vee(){Bo.lFrame.elementDepthCount++}function Ho(){Bo.lFrame.elementDepthCount--}function Uo(){return Bo.bindingsEnabled}function Wo(){return Bo.skipHydrationRootTNode!==null}function Go(e){return Bo.skipHydrationRootTNode===e}function Ko(){Bo.skipHydrationRootTNode=null}function qo(){return Bo.lFrame.lView}function Jo(){return Bo.lFrame.tView}function x(e){return Bo.lFrame.contextLView=e,e[8]}function S(e){return Bo.lFrame.contextLView=null,e}function Yo(){let e=Xo();for(;e!==null&&e.type===64;)e=e.parent;return e}function Xo(){return Bo.lFrame.currentTNode}function Hee(){let e=Bo.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Zo(e,t){let n=Bo.lFrame;n.currentTNode=e,n.isParent=t}function Qo(){return Bo.lFrame.isParent}function $o(){Bo.lFrame.isParent=!1}function es(){return Bo.lFrame.contextLView}function ts(){return Vo}function ns(e){let t=Vo;return Vo=e,t}function rs(){let e=Bo.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function is(){return Bo.lFrame.bindingIndex}function Uee(e){return Bo.lFrame.bindingIndex=e}function as(){return Bo.lFrame.bindingIndex++}function os(e){let t=Bo.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Wee(){return Bo.lFrame.inI18n}function Gee(e,t){let n=Bo.lFrame;n.bindingIndex=n.bindingRootIndex=e,ss(t)}function Kee(){return Bo.lFrame.currentDirectiveIndex}function ss(e){Bo.lFrame.currentDirectiveIndex=e}function qee(e){let t=Bo.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function Jee(){return Bo.lFrame.currentQueryIndex}function cs(e){Bo.lFrame.currentQueryIndex=e}function Yee(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=Yee(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=Bo.lFrame=ds();return r.currentTNode=t,r.lView=e,!0}function us(e){let t=ds(),n=e[1];Bo.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=Bo.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=Bo.lFrame;return Bo.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 Xee(e){return(Bo.lFrame.contextLView=jo(e,Bo.lFrame.contextLView))[8]}function gs(){return Bo.lFrame.selectedIndex}function _s(e){Bo.lFrame.selectedIndex=e}function vs(){let e=Bo.lFrame;return So(e.tView,e.selectedIndex)}function C(){Bo.lFrame.currentNamespace=`svg`}function ys(){Zee()}function Zee(){Bo.lFrame.currentNamespace=null}function bs(){return Bo.lFrame.currentNamespace}var xs=!0;function Ss(){return xs}function Cs(e){xs=e}function ws(e,t=null,n=null,r){let i=Ts(e,t,n,r);return i.resolveInjectorInitializers(),i}function Ts(e,t=null,n=null,r,i=new Set){return new Ja([n||Ea,ja(e)],t||Ka(),null,i)}var Es=class e{static THROW_IF_NOT_FOUND=ia;static NULL=new Aa;static create(e,t){if(Array.isArray(e))return ws({name:``},t,e,``);{let t=e.name??``;return ws({name:t},e.parent,e.providers,t)}}static ɵprov=Di({token:e,providedIn:`any`,factory:()=>ca(Oa)});static __NG_ELEMENT_ID__=-1},Ds=new Ni(``),Os=class{static __NG_ELEMENT_ID__=As;static __NG_ENV_ID__=e=>e},ks=class extends Os{_lView;constructor(e){super(),this._lView=e}get destroyed(){return go(this._lView)}onDestroy(e){let t=this._lView;return Fo(t,e),()=>Io(t,e)}};function As(){return new ks(qo())}var js=new Ni(``),Ms=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new qr(!1);debugTaskTracker=b(js,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Ir(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=Di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Ns=class extends Gr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,oo()&&(this.destroyRef=b(Os,{optional:!0})??void 0,this.pendingTasks=b(Ms,{optional:!0})??void 0)}emit(e){let t=on(null);try{super.next(e)}finally{on(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 lr&&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 Ps(...e){}function Fs(e){let t,n;function r(){e=Ps;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 Is(e){return queueMicrotask(()=>e()),()=>{e=Ps}}var Ls=`isAngularZone`,Rs=`isAngularZone_ID`,zs=0,Bs=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Ns(!1);onMicrotaskEmpty=new Ns(!1);onStable=new Ns(!1);onError=new Ns(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new yi(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,Ws(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Ls)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new yi(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new yi(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,Vs,Ps,Ps);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)}},Vs={};function Hs(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 Us(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Fs(()=>{e.callbackScheduled=!1,Gs(e),e.isCheckStableRunning=!0,Hs(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Gs(e)}function Ws(e){let t=()=>{Us(e)},n=zs++;e._inner=e._inner.fork({name:`angular`,properties:{[Ls]:!0,[Rs]:n,[Rs+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Ys(s))return n.invokeTask(i,a,o,s);try{return Ks(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),qs(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Ks(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Xs(s)&&t(),qs(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Gs(e),Hs(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 Gs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Ks(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function qs(e){e._nesting--,Hs(e)}var Js=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Ns;onMicrotaskEmpty=new Ns;onStable=new Ns;onError=new Ns;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 Ys(e){return Zs(e,`__ignore_ng_zone__`)}function Xs(e){return Zs(e,`__scheduler_tick__`)}function Zs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Qs=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},$s=new Ni(``,{factory:()=>{let e=b(Bs),t=b(qa),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Qs),n.handleError(r))})}}}),ec={provide:Da,useValue:()=>{b(Qs,{optional:!0})},multi:!0};function w(e,t){let[n,r,i]=mee(e,t?.equal),a=n;return a[an],a.set=r,a.update=i,a.asReadonly=tc.bind(a),a}function tc(){let e=this[an];if(e.readonlyFn===void 0){let t=()=>this();t[an]=e,e.readonlyFn=t}return e.readonlyFn}var nc=new Ni(``,{factory:()=>rc}),rc=`ng`,ic=new Ni(``),ac=new Ni(``,{providedIn:`platform`,factory:()=>`unknown`}),oc=new Ni(``,{factory:()=>b(Ds).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),sc=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=cc}return e})();function cc(){return new sc(qo(),Yo())}var lc=class{},uc=new Ni(``,{factory:()=>!0}),dc=new Ni(``),fc=(()=>{class e{static ɵprov=Di({token:e,providedIn:`root`,factory:()=>new pc})}return e})(),pc=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}},mc=class{[an];constructor(e){this[an]=e}destroy(){this[an].destroy()}};function T(e,t){let n=t?.injector??b(Es),r=t?.manualCleanup===!0?null:n.get(Os),i,a=n.get(sc,null,{optional:!0}),o=n.get(lc);return a===null?i=yc(e,n.get(fc),o):(i=vc(a.view,o,e),r instanceof ks&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new mc(i)}var hc={...Ln,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=ns(!1);try{Rn(this)}finally{ns(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=on(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],on(e)}}},gc={...hc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(xn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},_c={...hc,consumerMarkedDirty(){this.view[2]|=8192,Po(this.view),this.notifier.notify(13)},destroy(){if(xn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function vc(e,t,n){let r=Object.create(_c);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=bc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function yc(e,t,n){let r=Object.create(gc);return r.fn=bc(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 bc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function xc(e){return typeof e==`function`&&e[an]!==void 0}function Sc(e){return xc(e)&&typeof e.set==`function`}var Cc=Symbol(`InputSignalNode#UNSET`),wc={...Fn,transformFn:void 0,applyValueToInputSignal(e,t){Nn(e,t)}};function Tc(e){return{toString:e}.toString()}var Ec=(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})(Ec||{}),Dc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Oc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var kc=null,Ac=(()=>{kc=Mc;let e=()=>Mc;return e.ngInherit=!0,e})();function jc(){return kc}function Mc(e){return e.type.prototype.ngOnChanges&&(e.setInput=Pc),Nc}function Nc(){let e=Ic(this),t=e?.current;if(t){let n=e.previous;if(n===Ta)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Pc(e,t,n,r,i){let a=this.declaredInputs[r],o=Ic(e)||Lc(e,{previous:Ta,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new Dc(l&&l.currentValue,n,c===Ta),Oc(e,t,i,n)}var Fc=`__ngSimpleChanges__`;function Ic(e){return Object.hasOwn(e,Fc)&&e[Fc]||null}function Lc(e,t){return e[Fc]=t}var Rc=[],zc=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,Kc(o,a)):Kc(o,a)}var Jc=-1,Yc=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 Xc(e){return!!(e.flags&8)}function Zc(e){return!!(e.flags&16)}function Qc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function ol(e,t){let n=al(e),r=t;for(;n>0;)r=r[14],n--;return r}var sl=!0;function cl(e){let t=sl;return sl=e,t}var ll=255,ul=5,dl=0,fl={};function pl(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,zi)&&(r=n[zi]),r??=n[zi]=dl++;let i=r&ll,a=1<>ul)]|=a}function ml(e,t){let n=gl(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,hl(r.data,e),hl(t,null),hl(r.blueprint,null));let i=_l(e,t),a=e.injectorIndex;if(rl(i)){let e=il(i),n=ol(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 hl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function gl(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function _l(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=Pl(i),r===null)return Jc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Jc}function vl(e,t,n){pl(e,t,n)}function yl(e,t,n){if(n&8||e!==void 0)return e;Xi(t,`NodeInjector`)}function bl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=ta(void 0);try{return i?i.get(t,r,n&8):na(t,r,n&8)}finally{ta(a)}}return yl(r,t,n)}function xl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=Nl(e,t,n,r,fl);if(i!==fl)return i}let i=Sl(e,t,n,r,fl);if(i!==fl)return i}return bl(t,n,r,i)}function Sl(e,t,n,r,i){let a=El(n);if(typeof a==`function`){if(!ls(t,e,r))return r&1?yl(i,n,r):bl(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Xi(n);else return e}finally{ms()}}else if(typeof a==`number`){let i=null,o=gl(e,t),s=Jc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?_l(e,t):t[o+8],s===Jc||!Ol(r,!1)?o=-1:(i=t[1],o=il(s),t=ol(s,t)));o!==-1;){let e=t[1];if(Dl(a,o,e.data)){let e=Cl(o,t,n,i,r,c);if(e!==fl)return e}s=t[o+8],s!==Jc&&Ol(r,t[1].data[o+8]===c)&&Dl(a,o,t)?(i=e,o=il(s),t=ol(s,t)):o=-1}}return i}function Cl(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=wl(s,o,n,r==null?fo(s)&&sl:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?fl:Tl(t,o,c,s,i)}function wl(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&&mo(e)&&e.type===n)return c}return null}function Tl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Yc){let s=a;if(s.resolving)throw Yi(``);let c=cl(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?ta(s.injectImpl):null;ls(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Bc(n,o[n],t)}finally{l!==null&&ta(l),cl(c),s.resolving=!1,ms()}}return a}function El(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,zi)?e[zi]:void 0;return typeof t==`number`?t>=0?t&ll:Al:t}function Dl(e,t,n){let r=1<>ul)]&r)}function Ol(e,t){return!(e&2)&&!(e&1&&t)}var kl=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return xl(this._tNode,this._lView,e,la(n),t)}};function Al(){return new kl(Yo(),qo())}function jl(e){return Tc(()=>{let t=e.prototype.constructor,n=t[Ri]||Ml(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let e=i[Ri]||Ml(i);if(e&&e!==n)return e;i=Object.getPrototypeOf(i)}return e=>new e})}function Ml(e){return Ei(e)?()=>{let t=Ml(Ti(e));return t&&t()}:pa(e)}function Nl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!ho(o);){let e=Sl(a,o,n,r|2,fl);if(e!==fl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,fl,r);if(t!==fl)return t}t=Pl(o),o=o[14]}a=t}return i}function Pl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Fl(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Il(){return Ll(Yo(),qo())}function Ll(e,t){return new Rl(xo(e,t))}var Rl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Il}return e})();function zl(e){return e instanceof Rl?e.nativeElement:e}function Bl(){return this._results[Symbol.iterator]()}var Vl=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 Gr}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=ha(e);(this._changesDetected=!ma(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]=Bl};function Hl(e){return(e.flags&128)==128}var Ul=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Ul||{}),Wl=new Map,Gl=0;function Kl(){return Gl++}function ql(e){Wl.set(e[19],e)}function Jl(e){Wl.delete(e[19])}var Yl=`__ngContext__`;function Xl(e,t){co(t)?(e[Yl]=t[19],ql(t)):e[Yl]=t}function Zl(e){return $l(e[12])}function Ql(e){return $l(e[4])}function $l(e){for(;e!==null&&!lo(e);)e=e[4];return e}var eu=void 0;function tu(e){eu=e}function nu(){if(eu!==void 0)return eu;if(typeof document<`u`)return document;throw new yi(210,!1)}var ru=!1,iu=new Ni(``,{factory:()=>ru}),au=new WeakMap;function ou(e,t){if(typeof e!=`object`||!e)return;let n=au.get(e);n||(n=new WeakSet,au.set(e,n)),n.add(t)}function su(e){return(e.flags&32)==32}var cu=()=>null;function lu(e,t,n=!1){return cu(e,t,n)}function uu(e,t){let n=e.contentQueries;if(n!==null){let r=on(null);try{for(let r=0;r|^->||--!>|)/g,Su=`​$1​`;function Cu(e){return e.replace(bu,e=>e.replace(xu,Su))}function wu(e,t){return e.createText(t)}function Tu(e,t,n){e.setValue(t,n)}function Eu(e,t){return e.createComment(Cu(t))}function Du(e,t,n){return e.createElement(t,n)}function Ou(e,t,n,r,i){e.insertBefore(t,n,r,i)}function ku(e,t,n){e.appendChild(t,n)}function Au(e,t,n,r,i){r===null?ku(e,t,n):Ou(e,t,n,r,i)}function ju(e,t,n,r){e.removeChild(null,t,n,r)}function Mu(e,t,n){e.setAttribute(t,`style`,n)}function Nu(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function Pu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Qc(e,t,r),i!==null&&Nu(e,t,i),a!==null&&Mu(e,t,a)}function Fu(e){let t=Iu();return t?t.sanitize(_o.URL,e)||``:gu(e,`URL`)?hu(e):yu(Gi(e))}function Iu(){let e=qo();return e&&e[10].sanitizer}function Lu(e){return e.ownerDocument.defaultView}function Ru(e){return e.ownerDocument}function zu(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let n=t.length;if(i+n===r||e.charCodeAt(i+n)<=32)return i}n=i+1}}var Bu=`ng-template`;function Vu(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(Gu(r))return!1;o=!0}}}}}return Gu(r)||o}function Gu(e){return!(e&1)}function Ku(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!==``&&!Gu(o)&&(t+=Ju(a,i),i=``),r=o,a||=!Gu(r);n++}return i!==``&&(t+=Ju(a,i)),t}function rte(e){return e.map(nte).join(`,`)}function ite(e){let t=[],n=[],r=1,i=2;for(;r!1});function Qu(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function $u(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function ste(e){let t=$u(e,`transition-property`),n=$u(e,`transition-duration`),r=$u(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 cte(e){let t=$u(e,`animation-name`),n=$u(e,`animation-delay`),r=$u(e,`animation-duration`),i=$u(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 ed(e,t){return e!==void 0&&e.duration>t.duration}function td(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function nd(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 lte(e,t){let n=getComputedStyle(e),r=cte(n),i=ste(n),a=r.duration>i.duration?r:i;ed(t.get(e),a)||td(a)&&t.set(e,a)}function ute(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?lte(e,t):dte(e,t,r)}function dte(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=nd(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}ed(t.get(e),r)||td(r)&&t.set(e,r)}var rd=new Set,fte=!1,pte=1,id=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function mte(e){return e[9].get(ote,fte)}function hte(e,t,n){let r=od.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else od.set(e,{classList:t,cleanupFns:n})}function ad(e){let t=od.get(e);if(t){for(let e of t.cleanupFns)e();od.delete(e)}sd.delete(e)}var od=new WeakMap,sd=new WeakMap,cd=new WeakMap;function ld(e){return e?e[14]??e:null}var ud=new WeakSet;function gte(e,t,n){let r=cd.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=ld(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),ud.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 _te(e,t,n){let r=ld(n),i=cd.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):cd.set(e,[{el:t,declarationView:r}])}function dd(e){let t=e[26]??={};return t.enter??=new Map}function vte(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 fd(e){return e.composedPath?e.composedPath()[0]:e.target}function pd(e,t){let n=sd.get(t);if(n===void 0)return!0;if(t!==fd(e))return!1;let r=e.animation;if(r){let e=nd(r);if(e!==void 0&&e+pte{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=Di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),yd=[0,1,2,3],bd=(()=>{class e{ngZone=b(Bs);scheduler=b(lc);errorHandler=b(Qs,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){b(hd,{optional:!0})}execute(){let e=this.sequences.size>0;e&&zc(Ec.AfterRenderHooksStart),this.executing=!0;for(let e of yd)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&&zc(Ec.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(md.AFTER_NEXT_RENDER,e):e()}static ɵprov=Di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),xd=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 Sd(e,t){let n=t?.injector??b(Es);return _d(`NgAfterNextRender`),xte(e,n,t,!0)}function bte(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function xte(e,t,n,r){let i=t.get(vd);i.impl??=t.get(bd);let a=t.get(hd,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(Os),s=t.get(sc,null,{optional:!0}),c=new xd(i.impl,bte(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var Cd=new Ni(``,{factory:()=>{let e=b(qa),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function wd(e,t,n){let r=e.get(Cd);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 Ste(e,t){let n=e.get(Cd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Cte(e,t){let n=e.get(Cd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function wte(e){let t=e.get(Cd);t.isScheduled||=(Sd(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Tte(e){let t=e.get(Cd);t.scheduler=wte,t.scheduler(e)}function Td(e,t){for(let[n,r]of t)wd(e,r.animateFns)}function Ed(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&Td(r,i)}function Dd(e,t,n,r){try{n.get(Oa)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Ste(n,i.enter.get(t.index).animateFns);let a=Ete(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];Od(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&rd.add(e[19]),wd(n,()=>Dte(e,t,i||void 0,a,r),i||void 0)}function Ete(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 Dte(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&&Od(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),kte(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&rd.delete(e[19]),i(!0)})}else e&&rd.delete(e[19]),i(!1)}function Od(e,t,n){if(t.type&12){let r=e[t.index];if(lo(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,rd.delete(e[19])),n(!0)})}function kd(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;lo(i)?c=i:co(i)&&(l=!0,i=i[0]);let u=yo(i);e===0&&r!==null?(Ed(s,r,a,n),o==null?ku(t,r,u):Ou(t,r,u,o||null,!0)):e===1&&r!==null?(Ed(s,r,a,n),Ou(t,r,u,o||null,!0),gte(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&_te(a,u,s),ud.delete(u),Dd(s,a,n,e=>{if(ud.has(u)){ud.delete(u);return}ju(t,u,l,e)})):e===3&&(ud.delete(u),Dd(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Bte(t,e,n,c,a,r,o)}}function Ate(e,t){Ad(e,t),t[0]=null,t[5]=null}function jte(e,t,n,r,i,a){r[0]=i,r[5]=t,Vd(e,r,n,1,i,a)}function Ad(e,t){t[10].changeDetectionScheduler?.notify(9),Vd(e,t,t[11],2,null,null)}function Mte(e){let t=e[12];if(!t)return Nd(e[1],e);for(;t;){let n=null;if(co(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)co(t)&&Nd(t[1],t),t=t[3];t===null&&(t=e),co(t)&&Nd(t[1],t),n=t&&t[4]}t=n}}function jd(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function Md(e,t){if(go(t))return;let n=t[11];n.destroyNode&&Vd(e,t,n,3,null,null),Mte(t)}function Nd(e,t){if(go(t))return;let n=on(null);try{t[2]&=-129,t[2]|=256,t[24]&&xn(t[24]),Pte(e,t),Nte(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&lo(t[3])){n!==t[3]&&jd(n,t);let r=t[18];r!==null&&r.detachView(e)}Jl(t)}finally{on(n)}}function Nte(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&&Yd(e,t,27,!1),zc(o?Ec.TemplateUpdateStart:Ec.TemplateCreateStart,i,n),n(r,i)}finally{_s(a),zc(o?Ec.TemplateUpdateEnd:Ec.TemplateCreateEnd,i,n)}}function $d(e,t,n){sf(e,t,n),(n.flags&64)==64&&cf(e,t,n)}function ef(e,t,n=xo){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];Zd(o,n[i],s,a),l=!0}else if(i>c)break}}return o!==null&&Object.hasOwn(r.inputs,i)&&(Zd(r,n[o],i,a),l=!0),l}function yf(e,t){let n=To(t,e),r=n[1];bf(r,n);let i=n[0];i!==null&&n[6]===null&&(n[6]=lu(i,n[9])),zc(Ec.ComponentStart);try{xf(r,n,n[8])}finally{zc(Ec.ComponentEnd,n[8])}}function bf(e,t){for(let n=t.length;n{Po(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function Nf(e){let t=e[24]??Object.create(Pf);return t.lView=e,t}var Pf={...cn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Lo(e.lView);for(;t&&!Ff(t[1]);)t=Lo(t);t&&Ao(t)},consumerOnSignalRead(){this.lView[24]=this}};function Ff(e){return e.type!==2}function If(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 Lf=100;function Rf(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{zf(e,t)}finally{n.end?.()}}function zf(e,t){let n=ts();try{ns(!0),Gf(e,t);let n=0;for(;Mo(e);){if(n===Lf)throw new yi(103,!1);n++,Gf(e,1)}}finally{ns(n)}}function Bf(e,t,n,r){if(go(t))return;let i=t[2];us(t);let a=!0,o=null,s=null;Ff(e)?(s=kf(t),o=gn(s)):sn()===null?(a=!1,s=Nf(t),o=gn(s)):t[24]&&=(xn(t[24]),null);try{ko(t),Uee(e.bindingStartIndex),n!==null&&Qd(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Hc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Uc(t,n,0,null),Wc(t,0)}if(Hf(t),If(t),Vf(t,0),e.contentQueries!==null&&uu(e,t),a){let n=e.contentCheckHooks;n!==null&&Hc(t,n)}else{let n=e.contentHooks;n!==null&&Uc(t,n,1),Wc(t,1)}qf(e,t);let o=e.components;o!==null&&Kf(t,o,0);let s=e.viewQuery;if(s!==null&&du(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Hc(t,n)}else{let n=e.viewHooks;n!==null&&Uc(t,n,2),Wc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}Df(t),t[2]&=-73}catch(e){throw Po(t),e}finally{s!==null&&(vn(s,o),a&&jf(s)),hs()}}function Vf(e,t){for(let n=Zl(e);n!==null;n=Ql(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=va(e,10+t);Ate(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 ep(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&($f(e,n),va(t,n))}this._attachedToViewContainer=!1}Md(this._lView[1],this._lView)}onDestroy(e){Fo(this._lView,e)}markForCheck(){Jf(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){No(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Rf(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new yi(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=ho(this._lView),t=this._lView[16];t!==null&&!e&&jd(t,this._lView),Ad(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new yi(902,!1);this._appRef=e;let t=ho(this._lView),n=this._lView[16];n!==null&&!t&&tp(n,this._lView),No(this._lView)}},rp=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=ip;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 np(Cf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function ip(){return ap(Yo(),qo())}function ap(e,t){return e.type&4?new rp(t,e,Ll(e,t)):null}function op(e,t,n,r,i){let a=e.data[t];if(a===null)a=sp(e,t,n,r,i),Wee()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Hee();a.injectorIndex=e===null?-1:e.injectorIndex}return Zo(a,!0),a}function sp(e,t,n,r,i){let a=Xo(),o=Qo(),s=o?a:a&&a.parent,c=e.data[t]=lp(e,s,n,t,r,i);return cp(e,c,a,o),c}function cp(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 lp(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Wo()&&(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:bs(),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 up(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?dp(e,n):r.push(e);e[6]=r}function dp(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,pp=()=>null;function mp(e,t){return fp(e,t)}function hp(e,t,n){return pp(e,t,n)}var gp=class{},_p=class{},vp=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>yp()};function yp(){let e=qo(),t=To(Yo().index,e);return(co(t)?t:e)[11]}var bp=(()=>{class e{static ɵprov=Di({token:e,providedIn:`root`,factory:()=>null})}return e})();function xp(e){return e.debugInfo?.className||e.type.name||null}var Sp={},Cp=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,Sp,n);return r!==Sp||t===Sp?r:this.parentInjector.get(e,t,n)}};function wp(e,t,n){return e[t]=n}function Tp(e,t){return e[t]}function Ep(e,t,n){if(n===Yu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function Dp(e,t,n,r){let i=Ep(e,t,n);return Ep(e,t+1,r)||i}function Op(e,t,n,r,i){let a=Dp(e,t,n,r);return Ep(e,t+2,i)||a}function kp(e,t,n,r,i,a){let o=Dp(e,t,n,r);return Dp(e,t+2,i,a)||o}function Ap(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&ou(i,a),Jf(fo(e)?To(e.index,t):t,5);let o=t[8],s=jp(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=jp(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function jp(e,t,n,r){let i=on(null);try{return zc(Ec.OutputStart,t,n),n(r)!==!1}catch(t){return gf(e,t),!1}finally{zc(Ec.OutputEnd,t,n),on(i)}}function Mp(e,t,n,r,i,a,o,s){let c=po(e),l=!1,u=null;if(!r&&c&&(u=Pp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=xo(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);Np(a)||Fp(r?t=>r(yo(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function Np(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function Pp(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 Fp(e,t,n,r,i,a,o){let s=t.firstCreatePass?zo(t):null,c=Ro(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function Ip(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,Lp(e,t,l,n[a+1],r,i);else if(l>s)break}}return Object.hasOwn(n.outputs,r)&&(c=!0,Lp(e,t,a,r,r,i)),c}function Lp(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Fp(e.index,s,t,i,a,c,!0)}function Rp(){zp()}function zp(){let e=qo(),t=Jo(),n=Yo();if(t.firstCreatePass&&Gp(t,n),n.controlDirectiveIndex===-1)return;_d(`NgSignalForms`);let r=e[n.controlDirectiveIndex];t.data[n.controlDirectiveIndex].controlDef.create(r,new Hp(e,t,n))}function Bp(){Vp()}function Vp(){let e=qo(),t=Jo(),n=vs();if(n.controlDirectiveIndex===-1)return;let r=t.data[n.controlDirectiveIndex].controlDef,i=e[n.controlDirectiveIndex];r.update(i,new Hp(e,t,n))}var Hp=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 xo(this.tNode,this.lView)}get descriptor(){return`<${this.tNode.value}>`}listenToCustomControlOutput(e,t){let n=this.tView.data[this.tNode.customControlIndex];Ip(this.tNode,this.lView,n,e,Ap(this.tNode,this.lView,t))}listenToCustomControlModel(e){let t=this.tNode.flags&1024?`valueChange`:`checkedChange`,n=this.tView.data[this.tNode.customControlIndex];Ip(this.tNode,this.lView,n,t,Ap(this.tNode,this.lView,e))}listenToDom(e,t){Mp(this.tNode,this.tView,this.lView,void 0,this.lView[11],e,t,Ap(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(Wp(r,o,e)))&&(Zd(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=Up(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}Kp(e,t)}function Kp(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 qp(e,t){return Jp(e,t)&&Yp(e,t+`Change`)}function Jp(e,t){return t in e.inputs}function Yp(e,t){return t in e.outputs}var Xp=Symbol(`BINDING`),Zp=new Ni(``);function Qp(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 fm(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&Xd.SignalBased)!==0};return i&&(a.transform=i),a})}function bm(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function xm(e,t,n){let r=t instanceof qa?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Cp(n,r):n}function Sm(e){let t=e.get(_p,null);if(t===null)throw new yi(407,!1);return{rendererFactory:t,sanitizer:e.get(bp,null),changeDetectionScheduler:e.get(lc,null),ngReflect:!1,tracingService:e.get(hd,null,{optional:!0})}}function Cm(e,t,n){let r=Tm(e);return Du(t,r,r===`svg`?`svg`:r===`math`?vo:n)}function wm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new yi(905,!1)}function Tm(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Em=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=ym(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=bm(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=rte(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){zc(Ec.DynamicComponentStart);let s=on(null);try{let s=this.componentDef,c=xm(s,r||this.ngModule,e),l=Sm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(xp(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{on(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=Dm(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?tf(l,r,s.encapsulation,t):Cm(s,l,o??null);wm(u);let d=t.get(Zp,null),f=Om(u,()=>t.get(Ds,null)??nu());d&&d.addHost(f);let p=a?.some(Am)||i?.some(e=>typeof e!=`function`&&e.bindings.some(Am)),m=Wd(null,c,null,512|Kd(s),null,null,e,l,t,null,lu(u,t,!0));d&&_m&&f instanceof ShadowRoot&&Fo(m,()=>{d.removeHost(f)}),m[27]=u,us(m);let ee=null;try{let e=mm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);Pu(l,u,e),Xl(u,m),$d(c,m,e),fu(c,e,m),hm(c,e),n!==void 0&&Mm(e,this.ngContentSelectors,n),ee=To(e.index,m),m[8]=ee[8],xf(c,m,null)}catch(e){throw ee!==null&&Jl(ee),Jl(m),e}finally{zc(Ec.DynamicComponentEnd),hs()}return new jm(this.componentType,m,!!p)}};function Dm(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:ite(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[Xp].requiredVars,e.create&&(e.targetIdx=0,(a??=[]).push(e)),e.update&&(e.targetIdx=0,(o??=[]).push(e));if(r)for(let e=0;e{if(n&1&&e)for(let t of e)t.create();if(n&2&&t)for(let e of t)e.update()}}function Am(e){let t=e[Xp].kind;return t===`input`||t===`twoWay`}var jm=class extends gp{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=So(t[1],27),this.location=Ll(this._tNode,t),this.instance=To(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new np(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;_f(n,r[1],r,e,t),this.previousInputValues.set(e,t),Jf(To(n.index,r),1)}get injector(){return new kl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function Mm(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=Pm}return e})();function Pm(){return Rm(Yo(),qo())}var Fm=class e extends Nm{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Ll(this._hostTNode,this._hostLView)}get injector(){return new kl(this._hostTNode,this._hostLView)}get parentInjector(){let e=_l(this._hostTNode,this._hostLView);if(rl(e)){let t=ol(e,this._hostLView),n=il(e),r=t[1].data[n+8];return new kl(r,t)}return new kl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=Im(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=mp(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,wf(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 Em(Vi(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(qa,null);e&&(i=e)}let d=Vi(l.componentType??{}),f=mp(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,wf(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(Do(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 Zf(o,i,a,r),t.attachToViewContainerRef(),_a(Lm(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=Im(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=$f(this._lContainer,t);n&&(va(Lm(this._lContainer),t),Md(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=$f(this._lContainer,t);return n&&va(Lm(this._lContainer),t)!=null?new np(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function Im(e){return e[8]}function Lm(e){return e[8]||=[]}function Rm(e,t){let n,r=t[e.index];return lo(r)?n=r:(n=Yf(r,t,null,e),t[e.index]=n,Jd(t,n)),Bm(n,t,e,r),new Fm(n,e,t)}function zm(e,t){let n=e[11],r=n.createComment(``),i=xo(t,e);return Ou(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var Bm=Um,Vm=()=>!1;function Hm(e,t,n){return Vm(e,t,n)}function Um(e,t,n,r){if(e[7])return;let i;i=n.type&8?yo(r):zm(t,n),e[7]=i}var Wm=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Gm=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 ah(e,t,n){e.queries===null&&(e.queries=new qm),e.queries.track(new Jm(t,n))}function oh(e,t){return e.queries.getByIndex(t)}function sh(e,t){let n=e[1],r=oh(n,t);return r.crossesNgTemplate?eh(n,e,t,[]):$m(n,e,r,t)}function ch(e,t,n){let r,i=Dn(()=>{r._dirtyCounter();let n=fh(r,e);if(t&&n===void 0)throw new yi(-951,!1);return n});return r=i[an],r._dirtyCounter=w(0),r._flatValue=void 0,i}function lh(e){return ch(!0,!1,e)}function uh(e){return ch(!0,!0,e)}function dh(e,t){let n=e[an];n._lView=qo(),n._queryIndex=t,n._queryList=th(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function fh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:Ea;let i=th(n,r),a=sh(n,r);return i.reset(a,zl),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function ph(e){return!!e&&typeof e.then==`function`}function mh(e){return!!e&&typeof e.subscribe==`function`}var hh=class{},gh=class extends hh{injector;instance=null;constructor(e){super();let t=new Ja([...e.providers,{provide:hh,useValue:this}],e.parent||Ka(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function _h(e,t,n=null){return new gh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var vh=(()=>{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=Ma(!1,e.type),n=t.length>0?_h([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=Di({token:e,providedIn:`environment`,factory:()=>new e(ca(qa))})}return e})();function D(e){return Tc(()=>{let t=wh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Ul.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(vh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||pu.Emulated,styles:e.styles||Ea,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&_d(`NgStandalone`),Th(n);let r=e.dependencies;return n.directiveDefs=Eh(r,yh),n.pipeDefs=Eh(r,Ui),n.id=Dh(n),n})}function yh(e){return Vi(e)||Hi(e)}function bh(e,t){if(e==null)return Ta;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=Xd.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function xh(e){if(e==null)return Ta;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Sh(e){return Tc(()=>{let t=wh(e);return Th(t),t})}function Ch(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 wh(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||Ta,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Ea,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:bh(e.inputs,t),outputs:xh(e.outputs),debugInfo:null}}function Th(e){e.features?.forEach(t=>t(e))}function Eh(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 Dh(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 Oh=new Ni(``),kh=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=b(Oh,{optional:!0})??[];injector=b(Es);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=ao(this.injector,t);if(ph(n))e.push(n);else if(mh(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=Fl({token:e,factory:e.ɵfac})}return e})();function Ah(e){return t=>{t.controlDef={create:(e,t)=>{e?.ɵngControlCreate(t)},update:(e,t)=>{e?.ɵngControlUpdate?.(t)},passThroughInput:e}}}function jh(e){return Object.getPrototypeOf(e.prototype).constructor}function Mh(e){let t=jh(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let i,a=Object.hasOwn(t,Fi)?t[Fi]:void 0,o=Object.hasOwn(t,Ii)?t[Ii]:void 0;if(mo(e))i=a??o;else{if(a)throw new yi(903,!1);i=o}if(i){if(n){r.push(i);let t=e;t.inputs=Fh(e.inputs),t.declaredInputs=Fh(e.declaredInputs),t.outputs=Fh(e.outputs);let n=i.hostBindings;n&&Rh(e,n);let a=i.viewQuery,o=i.contentQueries;if(a&&Ih(e,a),o&&Lh(e,o),Nh(e,i),Iee(e.outputs,i.outputs),mo(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=tl(i.hostAttrs,n=tl(n,i.hostAttrs))}}function Fh(e){return e===Ta?{}:e===Ea?[]:e}function Ih(e,t){let n=e.viewQuery;e.viewQuery=n?(e,r)=>{t(e,r),n(e,r)}:t}function Lh(e,t){let n=e.contentQueries;e.contentQueries=n?(e,r,i)=>{t(e,r,i),n(e,r,i)}:t}function Rh(e,t){let n=e.hostBindings;e.hostBindings=n?(e,r)=>{t(e,r),n(e,r)}:t}function zh(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=tl(e.mergedAttrs,e.attrs);let t=e.tView=Ud(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),Zo(e,!1);let c=Uh(n,t,e,r);Ss()&&Id(n,t,c,e),Xl(c,t);let l=Yf(c,t,c,e);t[r+27]=l,Jd(t,l),Hm(l,e,t)}function Bh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=op(t,d,4,o||null,s||null),Uo()&&em(t,e,f,Oo(t.consts,l),uf),Vc(t,f)):f=t.data[d],zh(f,e,t,n,r,i,a,c),po(f)&&$d(t,e,f),l!=null&&ef(e,f,u),f}function Vh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=op(t,d,4,o||null,s||null),l!=null){let e=Oo(t.consts,l);f.localNames=[];for(let t=0;t{throw new yi(600,``)})}var Jh=10,Yh=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=b($s);afterRenderManager=b(vd);zonelessEnabled=b(uc);rootEffectScheduler=b(fc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Gr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=b(Ms);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(_i(e=>!e))}constructor(){b(hd,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=b(qa);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Es.NULL){return this._injector.get(Bs).run(()=>{if(zc(Ec.BootstrapComponentStart),!this._injector.get(kh).done)throw new yi(405,``);let r=Vi(e),i=this._injector.get(hh),a=new Em(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=Xh(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Gh,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),Zh(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),zc(Ec.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){zc(Ec.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(md.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw zc(Ec.ChangeDetectionEnd),new yi(101,!1);let e=on(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,on(e),this.afterTick.next(),zc(Ec.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(_p,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;Zh(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(Kh,[]).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),()=>Zh(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new yi(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=Fl({token:e,factory:e.ɵfac})}return e})();function Xh(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function Zh(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function O(e,t,n,r){let i=qo();return Ep(i,as(),t)&&(Jo(),df(vs(),i,e,t,n,r)),O}function Qh(e){if(_d(`NgAnimateEnter`),!id)return Qh;let t=qo();if(mte(t))return Qh;let n=Yo(),r=t[9].get(Bs);return yte(dd(t),n,()=>$h(t,n,e,r)),Tte(t[9]),Td(t[9],dd(t)),Qh}function $h(e,t,n,r){let i=xo(t,e),a=e[11],o=vte(n),s=[],c=!1,l=e=>{if(fd(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{fd(e)===i&&(pd(e,i)&&(c=!0),eg(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),hte(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(ute(i,sd,id),!sd.has(i))){for(let e of o)a.removeClass(i,e);ad(i)}})})}}function eg(e,t,n){let r=od.get(t);if(fd(e)===t&&r&&pd(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);ad(t)}}var tg=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 ng(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function rg(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){on(r);let c=t.length-1;for(on(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=ng(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=ng(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),ee=n(s,d),h=n(o,l);if(Object.is(h,ee)){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 sg,a??=og(e,o,s,n),ig(e,i,o,h))e.updateValue(o,l),o++,s++;else if(a.has(h))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)ag(e,i,n,o,t[o]),o++}else if(t!=null){on(r);let c=t[Symbol.iterator]();on(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=ng(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new sg,a??=og(e,o,s,n);let u=n(o,r);if(ig(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;)ag(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 ig(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function ag(e,t,n,r,i){if(ig(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function og(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 sg=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 k(e,t,n,r,i,a,o,s){_d(`NgControlFlow`);let c=qo(),l=Jo();return Vh(c,l,e,t,n,r,i,Oo(l.consts,a),256,o,s),cg}function cg(e,t,n,r,i,a,o,s){_d(`NgControlFlow`);let c=qo(),l=Jo();return Vh(c,l,e,t,n,r,i,Oo(l.consts,a),512,o,s),cg}function A(e,t){_d(`NgControlFlow`);let n=qo(),r=as(),i=n[r]===Yu?-1:n[r],a=i===-1?void 0:mg(n,27+i);if(Ep(n,r,e)){let r=on(null);try{if(a!==void 0&&Qf(a,0),e!==-1){let r=27+e,i=mg(n,r),a=yg(n[1],r),o=hp(i,a,n);Zf(i,Cf(n,a,t,{dehydratedView:o}),0,wf(a,o))}}finally{on(r)}}else if(a!==void 0){let e=Xf(a,0);e!==void 0&&(e[8]=t)}}var lg=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 ug(e){return e}function dg(e,t){return t}var fg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function j(e,t,n,r,i,a,o,s,c,l,u,d,f){_d(`NgControlFlow`);let p=qo(),m=Jo(),ee=c!==void 0,h=qo(),g=new fg(ee,s?o.bind(h[15][8]):o);h[27+e]=g,Vh(p,m,e+1,t,n,r,i,Oo(m.consts,a),256),ee&&Vh(p,m,e+2,c,l,u,d,Oo(m.consts,f),512)}var pg=class extends tg{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,Zf(this.lContainer,t,e,wf(this.templateTNode,n)),hg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,gg(this.lContainer,e),_g(this.lContainer,e)}create(e,t){let n=mp(this.lContainer,this.templateTNode.tView.ssrId);return Cf(this.hostLView,this.templateTNode,new lg(this.lContainer,t,e),{dehydratedView:n})}destroy(e){Md(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];Cte(e,r),rd.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function gg(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 _g(e,t){return $f(e,t)}function vg(e,t){return Xf(e,t)}function yg(e,t){return So(e,t)}function N(e,t,n){let r=qo();return Ep(r,as(),t)&&(Jo(),rf(vs(),r,e,t,r[11],n)),N}function bg(e,t,n,r,i){_f(t,e,n,i?`class`:`style`,r)}function P(e,t,n,r){let i=qo(),a=i[1],o=e+27,s=a.firstCreatePass?mm(o,i,2,t,uf,Uo(),n,r):a.data[o];if(fo(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(xp(o),()=>(xg(e,t,i,s,r),P))}}return xg(e,t,i,s,r),P}function xg(e,t,n,r,i){if(mf(r,n,e,t,Cg),po(r)){let e=n[1];$d(e,n,r),fu(e,r,n)}i!=null&&ef(n,r)}function F(){let e=Jo(),t=hf(Yo());return e.firstCreatePass&&hm(e,t),Go(t)&&Ko(),Ho(),t.classesWithoutHost!=null&&Xc(t)&&bg(e,t,qo(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Zc(t)&&bg(e,t,qo(),t.stylesWithoutHost,!1),F}function I(e,t,n,r){return P(e,t,n,r),F(),I}function L(e,t,n,r){let i=qo(),a=i[1],o=e+27,s=a.firstCreatePass?gm(o,a,2,t,n,r):a.data[o];return mf(s,i,e,t,Cg),r!=null&&ef(i,s),L}function R(){return Go(hf(Yo()))&&Ko(),Ho(),R}function Sg(e,t,n,r){return L(e,t,n,r),R(),Sg}var Cg=(e,t,n,r,i)=>(Cs(!0),Du(t[11],r,bs()));function wg(e,t,n){let r=qo(),i=r[1],a=e+27,o=i.firstCreatePass?mm(a,r,8,`ng-container`,uf,Uo(),t,n):i.data[a];if(mf(o,r,e,`ng-container`,Dg),po(o)){let e=r[1];$d(e,r,o),fu(e,o,r)}return n!=null&&ef(r,o),wg}function Tg(){let e=Jo(),t=hf(Yo());return e.firstCreatePass&&hm(e,t),Tg}function Eg(e,t,n){return wg(e,t,n),Tg(),Eg}var Dg=(e,t,n,r,i)=>(Cs(!0),Eu(t[11],``));function z(){return qo()}function B(e,t,n){let r=qo();return Ep(r,as(),t)&&(Jo(),af(vs(),r,e,t,r[11],n)),B}var Og=void 0;function kg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var Ag=[`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`]],Og,[[`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`]],Og,[[`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}`,Og,Og,Og],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,kg],jg=Object.create(null);function Mg(e){let t=Fg(e),n=Ng(t);if(n)return n;let r=t.split(`-`)[0];if(n=Ng(r),n)return n;if(r===`en`)return Ag;throw new yi(701,!1)}function Ng(e){if(!(e in jg)){let t=ra.ng&&ra.ng.common&&ra.ng.common.locales&&ra.ng.common.locales[e];return t!==void 0&&(jg[e]=t),t}return jg[e]}var Pg={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 Fg(e){return e.toLowerCase().replace(/_/g,`-`)}var Ig=`en-US`;function Lg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function V(e,t,n){let r=qo(),i=Jo(),a=Yo();return Rg(i,r,r[11],a,e,t,n),V}function H(e,t,n){let r=qo(),i=Jo(),a=Yo();return(a.type&3||n)&&Mp(a,i,r,n,r[11],e,t,Ap(a,r,t)),H}function Rg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=Ap(r,t,a),Mp(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 Jg(e){return(e&2)==2}function Yg(e,t){return e&131071|t<<17}function Xg(e){return e|2}function Zg(e){return(e&131068)>>2}function Qg(e,t){return e&-131069|t<<2}function $g(e){return(e&1)==1}function e_(e){return e|1}function t_(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=qg(o),c=Zg(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||Ca(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=qg(e[s+1]);e[r+1]=Kg(t,s),t!==0&&(e[t+1]=Qg(e[t+1],r)),e[s+1]=Yg(e[s+1],r)}else e[r+1]=Kg(s,0),s!==0&&(e[s+1]=Qg(e[s+1],r)),s=r}else e[r+1]=Kg(c,0),s===0?s=r:e[c+1]=Qg(e[c+1],r),c=r;l&&(e[r+1]=Xg(e[r+1])),r_(e,u,r,!0),r_(e,u,r,!1),n_(t,u,e,r,a),o=Kg(s,c),a?t.classBindings=o:t.styleBindings=o}function n_(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&Ca(a,t)>=0&&(n[r+1]=e_(n[r+1]))}function r_(e,t,n,r){let i=e[n+1],a=t===null,o=r?qg(i):Zg(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];i_(n,t)&&(s=!0,e[o+1]=r?e_(i):Xg(i)),o=r?qg(i):Zg(i)}s&&(e[n+1]=r?Xg(i):e_(i))}function i_(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?Ca(e,t)>=0:!1}var a_={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function o_(e){return e.substring(a_.key,a_.keyEnd)}function s_(e){return l_(e),c_(e,u_(e,0,a_.textEnd))}function c_(e,t){let n=a_.textEnd;return n===t?-1:(t=a_.keyEnd=d_(e,a_.key=t,n),u_(e,t,n))}function l_(e){a_.key=0,a_.keyEnd=0,a_.value=0,a_.valueEnd=0,a_.textEnd=e.length}function u_(e,t,n){for(;t32;)t++;return t}function f_(e,t,n){return h_(e,t,n,!1),f_}function W(e,t){return h_(e,t,null,!0),W}function p_(e){g_(E_,m_,e,!0)}function m_(e,t){for(let n=s_(t);n>=0;n=c_(t,n))xa(e,o_(t),!0)}function h_(e,t,n,r){let i=qo(),a=Jo(),o=os(2);if(a.firstUpdatePass&&v_(a,e,o,r),t!==Yu&&Ep(i,o,t)){let s=a.data[gs()];O_(a,s,i,i[11],e,i[o+1]=j_(t,n),r,o)}}function g_(e,t,n,r){let i=Jo(),a=os(2);i.firstUpdatePass&&v_(i,null,a,r);let o=qo();if(n!==Yu&&Ep(o,a,n)){let s=i.data[gs()];if(M_(s,r)&&!__(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=Ci(e,n||``)),bg(i,s,o,n,r)}else D_(i,s,o,o[11],o[a+1],o[a+1]=T_(e,t,n),r,a)}}function __(e,t){return t>=e.expandoStartIndex}function v_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[gs()],o=__(e,n);M_(a,r)&&t===null&&!o&&(t=!1),t=y_(i,a,t,r),t_(i,a,t,n,o,r)}}function y_(e,t,n,r){let i=qee(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=C_(null,e,t,n,r),n=w_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=C_(i,e,t,n,r),a===null){let n=b_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=C_(null,e,t,n[1],r),n=w_(n,t.attrs,r),x_(e,t,r,n))}else a=S_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function b_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Zg(r)!==0)return e[qg(r)]}function x_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[qg(i)]=r}function S_(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===Yu&&(u=l?Ea:void 0);let d=l?Sa(u,r):c===r?u:void 0;if(a&&!A_(d)&&(d=Sa(t,r)),A_(d)&&(s=d,o))return s;let f=e[i+1];i=o?qg(f):Zg(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=Sa(e,r))}return s}function A_(e){return e!==void 0}function j_(e,t){return e==null||e===``||(typeof t==`string`?e=hu(e)+t:typeof e==`object`&&(e=Si(hu(e)))),e}function M_(e,t){return!!(e.flags&(t?8:16))}function G(e,t=``){let n=qo(),r=Jo(),i=e+27,a=r.firstCreatePass?op(r,i,1,t,null):r.data[i],o=N_(r,n,a,t);n[i]=o,Ss()&&Id(r,n,o,a),Zo(a,!1)}var N_=(e,t,n,r)=>(Cs(!0),wu(t[11],r));function P_(e,t,n,r=``){return Ep(e,as(),n)?t+Gi(n)+r:Yu}function F_(e,t,n,r,i,a=``){let o=Dp(e,is(),n,i);return os(2),o?t+Gi(n)+r+Gi(i)+a:Yu}function I_(e,t,n,r,i,a,o,s=``){let c=Op(e,is(),n,i,o);return os(3),c?t+Gi(n)+r+Gi(i)+a+Gi(o)+s:Yu}function L_(e,t,n,r,i,a,o,s,c,l=``){let u=kp(e,is(),n,i,o,c);return os(4),u?t+Gi(n)+r+Gi(i)+a+Gi(o)+s+Gi(c)+l:Yu}function K(e){return q(``,e),K}function q(e,t,n){let r=qo(),i=P_(r,e,t,n);return i!==Yu&&B_(r,gs(),i),q}function J(e,t,n,r,i){let a=qo(),o=F_(a,e,t,n,r,i);return o!==Yu&&B_(a,gs(),o),J}function R_(e,t,n,r,i,a,o){let s=qo(),c=I_(s,e,t,n,r,i,a,o);return c!==Yu&&B_(s,gs(),c),R_}function z_(e,t,n,r,i,a,o,s,c){let l=qo(),u=L_(l,e,t,n,r,i,a,o,s,c);return u!==Yu&&B_(l,gs(),u),z_}function B_(e,t,n){let r=bo(t,e);Tu(e[11],r,n)}function V_(e,t,n){Sc(t)&&(t=t());let r=qo();return Ep(r,as(),t)&&(Jo(),rf(vs(),r,e,t,r[11],n)),V_}function H_(e,t){let n=Sc(e);return n&&e.set(t),n}function U_(e,t){let n=qo(),r=Jo(),i=Yo();return Rg(r,n,n[11],i,e,t),U_}var W_={};function G_(e){_d(`NgLet`);let t=Jo(),n=qo(),r=e+27;return Zo(op(t,r,128,null,null),!1),wo(t,n,r,W_),G_}function K_(e){return wo(Jo(),qo(),gs(),e),e}function Y(e){let t=Co(es(),27+e);if(t===W_)throw new yi(314,!1);return t}function q_(e,t,n=``){return P_(qo(),e,t,n)}function J_(e,t,n){let r=Jo();r.firstCreatePass&&Y_(t,r.data,r.blueprint,mo(e),n)}function Y_(e,t,n,r,i){if(e=Ti(e),Array.isArray(e))for(let a=0;a>20;if(Ba(e)||!e.multi){let r=new Yc(l,i,$p,null),p=Q_(c,t,i?u:u+f,d);p===-1?(vl(ml(s,o),a,c),X_(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=Q_(c,t,u+f,d),m=Q_(c,t,u,u+f),ee=p>=0&&n[p],h=m>=0&&n[m];if(i&&!h||!i&&!ee){vl(ml(s,o),a,c);let u=nv(i?ev:$_,n.length,i,r,l,e);!i&&h&&(n[m].providerFactory=u),X_(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=Z_(n[i?m:p],l,!i&&r);X_(a,e,p>-1?p:m,t)}!i&&r&&h&&n[m].componentProviders++}}}function X_(e,t,n,r){let i=Ba(t),a=Va(t);if(i||a){let o=(a?Ti(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 Z_(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function Q_(e,t,n,r){for(let i=n;i{n.providersResolver=(t,n)=>J_(t,n?n(e):e,!1),t&&(n.viewProvidersResolver=(e,n)=>J_(e,n?n(t):t,!0))}}function iv(e,t){let n=rs()+e,r=qo();return r[n]===Yu?wp(r,n,t()):Tp(r,n)}function av(e,t,n){return cv(qo(),rs(),e,t,n)}function ov(e,t,n,r){return lv(qo(),rs(),e,t,n,r)}function Wte(e,t,n,r,i,a,o){return Gte(qo(),rs(),e,t,n,r,i,a)}function sv(e,t){let n=e[t];return n===Yu?void 0:n}function cv(e,t,n,r,i,a){let o=t+n;return Ep(e,o,i)?wp(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 Dp(e,s,i,a)?wp(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 kp(e,l,i,a,o,s)?wp(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=Jo(),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=pa(r.type,!0)),o=ta($p);try{let e=cl(!1),t=a();return cl(e),wo(n,qo(),i,t),t}finally{ta(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=qo(),a=Co(i,r);return pv(i,r)?cv(i,rs(),t,a.transform,n,a):a.transform(n)}function fv(e,t,n,r){let i=e+27,a=qo(),o=Co(a,i);return pv(a,i)?lv(a,rs(),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 ap(e,t)}var qte=(()=>{class e{applicationErrorHandler=b($s);appRef=b(Yh);taskService=b(Ms);ngZone=b(Bs);zonelessEnabled=b(uc);tracing=b(hd,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new lr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Rs):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(b(dc,{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?Is:Fs;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=Fl({token:e,factory:e.ɵfac})}return e})();function Jte(){return[{provide:lc,useExisting:qte},{provide:Bs,useClass:Js},{provide:uc,useValue:!0}]}function Yte(){return typeof $localize<`u`&&$localize.locale||`en-US`}var hv=new Ni(``,{factory:()=>b(hv,{optional:!0,skipSelf:!0})||Yte()}),gv=class{destroyed=!1;listeners=null;errorHandler=b(Qs,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=b(Os);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new yi(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(bi(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=on(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)),on(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 Dn(e,t?.equal)}function Z(e){return Jn(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(Wn(e,Zte,t?.equal),t?.debugName,t?.set):_v(Wn(e.source,e.computation,e.equal),e.debugName,e.set)}function _v(e,t,n){let r=e[an],i=e;if(n!==void 0){let t=e=>Gn(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Z(e)),t)}else i.set=e=>Gn(r,e),i.update=e=>Kn(r,e);return i.asReadonly=tc.bind(e),i}var vv=!1;function Qte(){return vv}function yv(e){vv=e}function bv(e,t){let n=Object.create(wc);n.value=e,n.transformFn=t?.transform;function r(){if(ln(n),n.value===Cc)throw new yi(-950,null);return n.value}return r[an]=n,r}function xv(e){return new gv}function Sv(e,t){return bv(e,t)}function $te(e){return bv(Cc,e)}var $=(Sv.required=$te,Sv);function Cv(e,t){let n=Object.create(wc),r=new gv;n.value=e;function i(){return ln(n),wv(n.value),n.value}return i[an]=n,i.asReadonly=tc.bind(i),i.set=e=>{n.equal(n.value,e)||(Nn(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===Cc)throw new yi(952,!1)}function Tv(e,t){return Cv(e,t)}function ene(e){return Cv(Cc,e)}var Ev=(Tv.required=ene,Tv);function Dv(e,t){return lh(t)}function tne(e,t){return uh(t)}var Ov=(Dv.required=tne,Dv),nne=(()=>{class e{static __NG_ELEMENT_ID__=rne}return e})();function rne(e){return ine(Yo(),qo(),(e&16)==16)}function ine(e,t,n){if(fo(e)&&!n){let n=To(e.index,t);return new np(n,n)}if(e.type&175){let e=t[15];return new np(e,t)}return null}var kv=new Ni(``),ane=new Ni(``);function Av(e){return!e.moduleRef}function one(e){let t=Av(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Bs);return n.run(()=>{Av(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get($s),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(()=>{Zh(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return cne(r,n,()=>{let n=t.get(Ms),r=n.add(),i=t.get(kh);return i.runInitializers(),i.donePromise.then(()=>{if(Lg(t.get(hv,Ig)||`en-US`),!t.get(ane,!0))return Av(e)?t.get(Yh):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Av(e)){let n=t.get(Yh);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 ph(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 Es.create({name:t,providers:[{provide:Ha,useValue:`platform`},{provide:kv,useValue:new Set([()=>jv=null])},...e]})}function une(e=[]){if(jv)return jv;let t=lne(e);return jv=t,qh(),dne(t),t}function dne(e){let t=e.get(ic,null);ao(e,()=>{t?.forEach(e=>e())})}function fne(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;zc(Ec.BootstrapApplicationStart);try{let e=i?.injector??une(r);return one({r3Injector:new gh({providers:[Jte(),ec,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{zc(Ec.BootstrapApplicationEnd)}}function Mv(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var Nv=Symbol(`NOT_SET`),Pv=new Set,pne={...Fn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:Nv,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(ln(r),r.value),r.signal[an]=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{xn(e)}}};function Fv(e,t){let n=t?.injector??b(Es),r=n.get(lc),i=n.get(vd),a=n.get(hd,null,{optional:!0});i.impl??=n.get(bd);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(sc,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 Mg(e)[Pg.LocaleId]}function vne(e,t,n){let r=Mg(e);return qv(qv([r[Pg.DayPeriodsFormat],r[Pg.DayPeriodsStandalone]],t),n)}function yne(e,t,n){let r=Mg(e);return qv(qv([r[Pg.DaysFormat],r[Pg.DaysStandalone]],t),n)}function bne(e,t,n){let r=Mg(e);return qv(qv([r[Pg.MonthsFormat],r[Pg.MonthsStandalone]],t),n)}function xne(e,t){let n=Mg(e)[Pg.Eras];return qv(n,t)}function Hv(e,t){return qv(Mg(e)[Pg.DateFormat],t)}function Uv(e,t){return qv(Mg(e)[Pg.TimeFormat],t)}function Wv(e,t){let n=Mg(e)[Pg.DateTimeFormat];return qv(n,t)}function Gv(e,t){let n=Mg(e),r=n[Pg.NumberSymbols][t];if(r===void 0){if(t===Vv.CurrencyDecimal)return n[Pg.NumberSymbols][Vv.Decimal];if(t===Vv.CurrencyGroup)return n[Pg.NumberSymbols][Vv.Group]}return r}function Kv(e){if(!e[Pg.ExtraData])throw new yi(2303,!1)}function Sne(e){let t=Mg(e);return Kv(t),(t[Pg.ExtraData][2]||[]).map(e=>typeof e==`string`?Jv(e):[Jv(e[0]),Jv(e[1])])}function Cne(e,t,n){let r=Mg(e);return Kv(r),qv(qv([r[Pg.ExtraData][0],r[Pg.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 yi(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 yi(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 yi(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 yi(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 yi(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=b(Es);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)($p(Nm))};static ɵdir=Sh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[Ac]})}return e})();function zne(e,t){return new yi(2100,!1)}var Bne=`mediumDate`,Vne=new Ni(``),Hne=new Ni(``),dy=(()=>{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??Bne,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Dne(t,e,i||this.locale,a)}catch(t){throw zne(e,t.message)}}static ɵfac=function(t){return new(t||e)($p(hv,16),$p(Vne,24),$p(Hne,24))};static ɵpipe=Ch({name:`date`,type:e,pure:!0})}return e})(),fy=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=Ch({name:`json`,type:e,pure:!1})}return e})();function Une(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 Wne=`browser`,py=class{_doc;constructor(e){this._doc=e}manager},my=(()=>{class e extends py{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)(ca(Ds))};static ɵprov=Di({token:e,factory:e.ɵfac})}return e})(),hy=new Ni(``),gy=(()=>{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 my));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof my);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 yi(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(ca(hy),ca(Bs))};static ɵprov=Di({token:e,factory:e.ɵfac})}return e})(),_y=`ng-app-id`;function vy(e){for(let t of e)t.remove()}function yy(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Gne(e,t,n,r){let i=e.head?.querySelectorAll(`style[${_y}="${t}"],link[${_y}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(_y),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 by(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var xy=(()=>{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,Gne(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,yy);t?.forEach(e=>this.addUsage(e,this.external,by))}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&&(vy(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])vy(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,yy(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,by(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)(ca(Ds),ca(nc),ca(oc,8),ca(ac))};static ɵprov=Di({token:e,factory:e.ɵfac})}return e})(),Sy={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`},Cy=/%COMP%/g,wy=`%COMP%`,Kne=`_nghost-${wy}`,qne=`_ngcontent-${wy}`,Jne=!0,Yne=new Ni(``,{factory:()=>Jne}),Xne=new Ni(``);function Zne(e){return qne.replace(Cy,e)}function Qne(e){return Kne.replace(Cy,e)}function Ty(e,t){return t.map(t=>t.replace(Cy,e))}var Ey=(()=>{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 Dy(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 Ay&&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 pu.Emulated:r=new jy(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case pu.ShadowDom:return new ky(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case pu.ExperimentalIsolatedShadowDom:return new ky(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new Ay(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)(ca(gy),ca(Zp),ca(nc),ca(Yne),ca(Ds),ca(Bs),ca(oc),ca(hd,8),ca(Xne,8))};static ɵprov=Di({token:e,factory:e.ɵfac})}return e})(),Dy=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(Sy[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Oy(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=Oy(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new yi(-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 yi(-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=Sy[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Sy[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&(Xu.DashCase|Xu.Important)?e.style.setProperty(t,n,r&Xu.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&Xu.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 yi(-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 Oy(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var ky=class extends Dy{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=Ty(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=by(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)}},Ay=class extends Dy{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?Ty(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&&rd.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},jy=class extends Ay{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=Zne(l),this.hostAttr=Qne(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}},$ne=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=ere();return t==null?null:tre(t)}resetBaseElement(){My=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return Une(document.cookie,e)}},My=null;function ere(){return My||=document.head.querySelector(`base`),My?My.getAttribute(`href`):null}function tre(e){return new URL(e,document.baseURI).pathname}var Ny=[`alt`,`control`,`meta`,`shift`],nre={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},rre={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},ire=(()=>{class e extends py{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.`),Ny.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=nre[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`),Ny.forEach(t=>{if(t!==n){let n=rre[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)(ca(Ds))};static ɵprov=Di({token:e,factory:e.ɵfac})}return e})();async function are(e,t,n){return fne({rootComponent:e,...ore(t,n)})}function ore(e,t){return{platformRef:t?.platformRef,appProviders:[...dre,...e?.providers??[]],platformProviders:ure}}function sre(){$ne.makeCurrent()}function cre(){return new Qs}function lre(){return tu(document),document}var ure=[{provide:ac,useValue:Wne},{provide:ic,useValue:sre,multi:!0},{provide:Ds,useFactory:lre}],dre=[{provide:Ha,useValue:`root`},{provide:Qs,useFactory:cre},{provide:hy,useClass:my,multi:!0},{provide:hy,useClass:ire,multi:!0},Ey,{provide:Zp,useClass:xy},{provide:xy,useExisting:Zp},gy,{provide:_p,useExisting:Ey},[]];function Py(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 mre({code:i,why:Fy(a.why,e),fix:Fy(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:Fy(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function _re(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 Sre=Math.random.bind(Math),Cre=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function wre(e=21){let t=``,n=e;for(;n--;)t+=Cre[Sre()*64|0];return t}var Tre=6e4,Ly=e=>e,Ere=Ly,{clearTimeout:Ry,setTimeout:Dre}=globalThis;function Ore(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Ly,deserialize:s=Ere,resolver:c,bind:l=`rpc`,timeout:u=Tre,proxify:d=!0}=t,f=!1,p=new Map,m,ee;async function h(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:h}=xre(),g=wre();s.i=g;let te;async function ne(n=s){return u>=0&&(te=Dre(()=>{try{if(t.onTimeoutError?.call(ee,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){h(e)}p.delete(g)},u),typeof te==`object`&&(te=te.unref?.())),p.set(g,{resolve:d,reject:h,timeoutId:te,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(ee,s,ne,d):await ne()}catch(e){if(t.onGeneralError?.call(ee,e)!==!0)throw e;return}finally{Ry(te),p.delete(g)}return l}let g={$call:(e,...t)=>h(e,t,!1),$callOptional:(e,...t)=>h(e,t,!1,!0),$callEvent:(e,...t)=>h(e,t,!0),$callRaw:e=>h(e.method,e.args,e.event,e.optional),$rejectPendingCalls:ne,get $closed(){return f},get $meta(){return t.meta},$close:te,$functions:e};ee=d?new Proxy({},{get(t,n){if(Object.hasOwn(g,n))return g[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>h(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>h(n,e,!1);return i.asEvent=r,i}}):g;function te(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(re)}function ne(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 re(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(ee,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(ee,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`?ee:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(ee,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(ee,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(ee,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Ry(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(re),ee}function kre(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var zy=Object.freeze({type:`object`,additionalProperties:!0});function Are(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return zy}return zy}function jre(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 Nre(e,t){return Mre(e,t)??[e]}function Pre(e){return typeof e==`string`?`'${e}'`:new Ire().serialize(e)}var Fre=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,By=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Fre.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Vy(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})(),Lre=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Rre=[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],zre=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Hy=[],Bre=class{_data=new Uy;_hash=new Uy([...Lre]);_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)Hy[n]=e[t+n]|0;else{let e=Hy[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Hy[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Hy[n]=t+Hy[n-7]+i+Hy[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),ee=u+m+d+Rre[n]+Hy[n],h=p+f;u=l,l=c,c=s,s=o+ee|0,o=a,a=i,i=r,r=ee+h|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=Uy.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 Vre(e){return new Bre().finalize(e).toBase64()}function Wy(e){return Vre(Pre(e))}function Gy(e){return Wy(e)}function Ky(){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 qy=/^[\w+.-]{2,}:\/\//;function Jy(e){return e.endsWith(`/`)?e:`${e}/`}function Yy(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function Xy(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Jy(n)+e.replace(/^\.?\//,``):e);return n}function Zy(e,t){if(!t||t===`/`||qy.test(e))return e;let n=Yy(t);return e.startsWith(n)?e:Xy(n,e)}function Qy(e,t){let n=e.match(qy);return t+(n?e.slice(n[0].length):e)}var $y=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function eb(e=21){let t=``,n=e;for(;n--;)t+=$y[Math.random()*64|0];return t}var tb=Symbol.for(`immer-nothing`),nb=Symbol.for(`immer-draftable`),rb=Symbol.for(`immer-state`),ib=[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 ab(e,...t){{let n=ib[e],r=kb(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var ob=Object,sb=ob.getPrototypeOf,cb=`constructor`,lb=`prototype`,ub=`configurable`,db=`enumerable`,fb=`writable`,pb=`value`,mb=e=>!!e&&!!e[rb];function hb(e){return e?vb(e)||Tb(e)||!!e[nb]||!!e[cb]?.[nb]||Eb(e)||Db(e):!1}var gb=ob[lb][cb].toString(),_b=new WeakMap;function vb(e){if(!e||!Ob(e))return!1;let t=sb(e);if(t===null||t===ob[lb])return!0;let n=ob.hasOwnProperty.call(t,cb)&&t[cb];if(n===Object)return!0;if(!kb(n))return!1;let r=_b.get(n);return r===void 0&&(r=Function.toString.call(n),_b.set(n,r)),r===gb}function yb(e,t,n=!0){bb(e)===0?(n?Reflect.ownKeys(e):ob.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function bb(e){let t=e[rb];return t?t.type_:Tb(e)?1:Eb(e)?2:Db(e)?3:0}var xb=(e,t,n=bb(e))=>n===2?e.has(t):ob[lb].hasOwnProperty.call(e,t),Sb=(e,t,n=bb(e))=>n===2?e.get(t):e[t],Cb=(e,t,n,r=bb(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function wb(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Tb=Array.isArray,Eb=e=>e instanceof Map,Db=e=>e instanceof Set,Ob=e=>typeof e==`object`,kb=e=>typeof e==`function`,Ab=e=>typeof e==`boolean`;function jb(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Mb=e=>Ob(e)?e?.[rb]:null,Nb=e=>e.copy_||e.base_,Pb=e=>e.modified_?e.copy_:e.base_;function Fb(e,t){if(Eb(e))return new Map(e);if(Db(e))return new Set(e);if(Tb(e))return Array[lb].slice.call(e);let n=vb(e);if(t===!0||t===`class_only`&&!n){let t=ob.getOwnPropertyDescriptors(e);delete t[rb];let n=Reflect.ownKeys(t);for(let r=0;r1&&ob.defineProperties(e,{set:Rb,add:Rb,clear:Rb,delete:Rb}),ob.freeze(e),t&&yb(e,(e,t)=>{Ib(t,!0)},!1),e)}function Lb(){ab(2)}var Rb={[pb]:Lb};function zb(e){return e===null||!Ob(e)||ob.isFrozen(e)}var Bb=`MapSet`,Vb=`Patches`,Hb=`ArrayMethods`,Ub={};function Wb(e){let t=Ub[e];return t||ab(0,e),t}var Gb=e=>!!Ub[e];function Kb(e,t){Ub[e]||(Ub[e]=t)}var qb,Jb=()=>qb,Yb=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Gb(Bb)?Wb(Bb):void 0,arrayMethodsPlugin_:Gb(Hb)?Wb(Hb):void 0});function Xb(e,t){t&&(e.patchPlugin_=Wb(Vb),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Zb(e){Qb(e),e.drafts_.forEach(ex),e.drafts_=null}function Qb(e){e===qb&&(qb=e.parent_)}var $b=e=>qb=Yb(qb,e);function ex(e){let t=e[rb];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function tx(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[rb].modified_&&(Zb(t),ab(4)),hb(e)&&(e=nx(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[rb].base_,e,t)}else e=nx(t,n);return rx(t,e,!0),Zb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===tb?void 0:e}function nx(e,t){if(zb(t))return t;let n=t[rb];if(!n)return dx(t,e.handledSet_,e);if(!ax(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);lx(n,e)}return n.copy_}function rx(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ib(t,n)}function ix(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var ax=(e,t)=>e.scope_===t,ox=[];function sx(e,t,n,r){let i=Nb(e),a=e.type_;if(r!==void 0&&Sb(i,r,a)===t){Cb(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;yb(i,(e,n)=>{if(mb(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??ox;for(let e of o)Cb(i,e,n,a)}function cx(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!ax(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Pb(i);sx(e,i.draft_??i,a,n),lx(i,r)})}function lx(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)}ix(e)}}function ux(e,t,n){let{scope_:r}=e;if(mb(n)){let i=n[rb];ax(i,r)&&i.callbacks_.push(function(){bx(e),sx(e,n,Pb(i),t)})}else hb(n)&&e.callbacks_.push(function(){let i=Nb(e);e.type_===3?i.has(n)&&dx(n,r.handledSet_,r):Sb(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&dx(Sb(e.copy_,t,e.type_),r.handledSet_,r)})}function dx(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||mb(e)||t.has(e)||!hb(e)||zb(e)?e:(t.add(e),yb(e,(r,i)=>{if(mb(i)){let t=i[rb];ax(t,n)&&(Cb(e,r,Pb(t),e.type_),ix(t))}else hb(i)&&dx(i,t,n)}),e)}function fx(e,t){let n=Tb(e),r={type_:+!!n,scope_:t?t.scope_:Jb(),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=px;n&&(i=[r],a=mx);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var px={get(e,t){if(t===rb)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=Nb(e);if(!xb(i,t,e.type_))return _x(e,i,t);let a=i[t];if(e.finalized_||!hb(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&jb(t))return a;if(a===hx(e.base_,t)||gx(e,t,a)){bx(e);let n=e.type_===1?+t:t,r=Sx(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Nb(e)},ownKeys(e){return Reflect.ownKeys(Nb(e))},set(e,t,n){let r=vx(Nb(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=hx(Nb(e),t),i=r?.[rb];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(wb(n,r)&&(n!==void 0||xb(e.base_,t,e.type_)))return!0;bx(e),yx(e)}return e.copy_[t]===n&&(n!==void 0||xb(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),ux(e,t,n),!0)},deleteProperty(e,t){return bx(e),hx(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),yx(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Nb(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[fb]:!0,[ub]:e.type_!==1||t!==`length`,[db]:r[db],[pb]:n[t]}},defineProperty(){ab(11)},getPrototypeOf(e){return sb(e.base_)},setPrototypeOf(){ab(12)}},mx={};for(let e in px){let t=px[e];mx[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}mx.deleteProperty=function(e,t){return isNaN(parseInt(t))&&ab(13),mx.set.call(this,e,t,void 0)},mx.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&ab(14),px.set.call(this,e[0],t,n,e[0])};function hx(e,t){let n=e[rb];return(n?Nb(n):e)[t]}function gx(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!hb(n)||n[rb]?!1:e.baseRefs_.has(n)}function _x(e,t,n){let r=vx(t,n);return r?pb in r?r[pb]:r.get?.call(e.draft_):void 0}function vx(e,t){if(!(t in e))return;let n=sb(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=sb(n)}}function yx(e){e.modified_||(e.modified_=!0,e.parent_&&yx(e.parent_))}function bx(e){e.copy_||=(e.assigned_=new Map,Fb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var xx=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(kb(e)&&!kb(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}kb(t)||ab(6),n!==void 0&&!kb(n)&&ab(7);let r;if(hb(e)){let i=$b(this),a=Sx(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Zb(i):Qb(i)}return Xb(i,n),tx(r,i)}if(!e||!Ob(e)){if(r=t(e),r===void 0&&(r=e),r===tb&&(r=void 0),this.autoFreeze_&&Ib(r,!0),n){let t=[],i=[];Wb(Vb).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}ab(1,e)},this.produceWithPatches=(e,t)=>{if(kb(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]},Ab(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Ab(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Ab(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){hb(e)||ab(8),mb(e)&&(e=Cx(e));let t=$b(this),n=Sx(t,e,void 0);return n[rb].isManual_=!0,Qb(t),n}finishDraft(e,t){let n=e&&e[rb];(!n||!n.isManual_)&&ab(9);let{scope_:r}=n;return Xb(r,t),tx(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=Wb(Vb).applyPatches_;return mb(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Sx(e,t,n,r){let[i,a]=Eb(t)?Wb(Bb).proxyMap_(t,n):Db(t)?Wb(Bb).proxySet_(t,n):fx(t,n);return(n?.scope_??Jb()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?cx(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 Cx(e){return mb(e)||ab(10,e),wx(e)}function wx(e){if(!hb(e)||zb(e))return e;let t=e[rb],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Fb(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Fb(e,!0);let i=n;return Db(n)&&(n=new Set),yb(i,(e,t)=>{Cb(n,e,wx(t))},r),t&&(t.finalized_=!1),n}function Tx(){ib.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=Mb(Sb(e,n.key_)),i=Sb(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||xb(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=Sb(o,e,c),f=Sb(s,e,c),p=l?xb(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===tb?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(Db(e))return new Set(Array.from(e).map(u));let t=Object.create(sb(e));for(let n in e)t[n]=u(e[n]);return xb(e,nb)&&(t[nb]=e[nb]),t}function d(e){return mb(e)?u(e):e}Kb(Vb,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var Ex=new xx,Dx=Ex.produce,Ox=Ex.produceWithPatches.bind(Ex),kx=Ex.applyPatches.bind(Ex),Ax=1e3;function jx(e,t){if(e.add(t),e.size>Ax){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function Mx(e){let{enablePatches:t=!1}=e;t&&Tx();let n=Ky(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=eb())=>{i.has(t)||(Tx(),r=kx(r,e),jx(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=eb())=>{if(!i.has(a)){if(jx(i,a),t){let[t,i]=Ox(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=Dx(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var Nx=typeof self==`object`?self:globalThis,Px=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),Fx=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function Ix(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=Px.has(e)?Nx[e]:void 0;return n(new(r??Nx.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`&&Fx.has(a))return n(new Nx[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function Lx(e){return Ix(new Map,e)(0)}var Rx=``,{toString:zx}={},{keys:Bx}=Object;function Vx(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=zx.call(e).slice(8,-1);switch(n){case`Array`:return[1,Rx];case`Object`:return[2,Rx];case`Date`:return[3,Rx];case`RegExp`:return[4,Rx];case`Map`:return[5,Rx];case`Set`:return[6,Rx];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function Hx([e,t]){return e===0&&(t===`function`||t===`symbol`)}function Ux(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]=Vx(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 Bx(r))(e||!Hx(Vx(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||!(Hx(Vx(n))||Hx(Vx(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Hx(Vx(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function Wx(e,t={}){let n=[];return Ux(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:Gx,stringify:Kx}=JSON,qx={json:!0,lossy:!0};function Jx(e){return Lx(Gx(e))}function Yx(e){return Kx(Wx(e,qx))}function Xx(e){return Lx(e)}function Zx(e){return Yx(e)}function Qx(e){return Jx(e)}var $x=256,eS=class extends Error{name=`StreamClosedError`};function tS(e={}){let t=e.id??eb(),n=Math.max(0,e.replayWindow??0),r=Ky(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new eS(`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=rS(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function nS(e={}){let t=e.id??eb(),n=Math.max(1,e.highWaterMark??$x),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 ee(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function h(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){ee()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return h()},cancel:ee,_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 ee(),Promise.resolve({value:void 0,done:!0})}}}}}function rS(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 iS=128;function aS(e){return e.replace(/[^\w-]+/g,`_`).slice(0,iS)}var oS=`modulepreload`,sS=function(e,t){return new URL(e,t).href},cS={},lS=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=sS(t,n),t=s(t),t in cS)return;cS[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`:oS,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)})},uS=`__connection.json`,dS=`__DEVFRAME_CONNECTION__`,fS=`x-birpc-session`,pS=`__rpc-dump/index.json`,mS=`devframe:services`,hS=`devframe_otp`,gS=`devframe_auth_token`;Iy.postMessage.remoteAssetsError;var _S=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Gy(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()}},vS=bre({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 yS(e){if(e.agent&&e.jsonSerializable===!1)throw vS.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function bS(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function xS(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 SS(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 TS(e,t){let n=e.handler;if(!n){let r=await wS(e,t);if(!r.handler)throw vS.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 SS(e.name,r,t),o=await a(...n);return await CS(e.name,i,o)}}var ES=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 TS(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 vS.DF0021({name:e.name});yS(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 vS.DF0022({name:e.name});yS(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 TS(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw vS.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 DS(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 kS(t,`undefined`,r,e);return n}return i!==null&&OS(i,r,e,t),n})}function OS(e,t,n,r){if(typeof e==`bigint`)throw kS(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw kS(r,`Map`,t,n);if(e instanceof Set)throw kS(r,`Set`,t,n);if(e instanceof Date)throw kS(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw kS(r,e.constructor?.name??`class instance`,t,n)}function kS(e,t,n,r){let i=AS(n,r);return vS.DF0020({name:e||``,type:t,path:i})}function AS(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var jS=`__DEVFRAME_CONNECTION_META__`,MS=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function NS(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 PS(){return NS(dS)}function FS(){return NS(jS)}function IS(e){if(e)return e;try{let e=localStorage.getItem(MS);if(e)return e}catch{}return NS(MS)}function LS(e){globalThis[dS]=e,globalThis[jS]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&RS(e.authToken)}function RS(e){try{localStorage.setItem(MS,e)}catch{}globalThis[MS]=e;let t=PS();t&&(globalThis[dS]={...t,authToken:e})}function zS(e){let t=Zy(uS,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function BS(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function VS(){let e=PS();if(e)return BS(e,IS()??e.authToken??e.connectionMeta.authToken);let t=FS();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??zS(`./`),authToken:IS(t.authToken)}}async function HS(e={}){if(e.connection){let t=BS(e.connection,IS(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return LS(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:zS(t[0]??`./`),authToken:IS(e.authToken??e.connectionMeta.authToken)};return LS(n),n}let n=VS();if(n){let t=BS(n,IS(e.authToken??n.authToken??n.connectionMeta.authToken));return LS(t),t}let r=[];for(let n of t){let t=Zy(uS,n),i=zS(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:IS(e.authToken??r.authToken)};return LS(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var US=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function WS(e=hS){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function GS(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 KS(e=hS){let t=WS(e);return t&&GS(e),t}async function qS(e,t={}){let n=KS(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function JS(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(mS,{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 YS(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:Iy.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:Iy.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=Mx({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(Iy.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var XS=new Map;function ZS(e=XS){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?DS(n,r??``):`s:${Zx(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?Qx(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function QS(){}function $S(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 eC(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 tC(e){let{onConnected:t=QS,onError:n=QS,onDisconnected:r=QS,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${gS}=${encodeURIComponent(e.authToken)}`);let s=ZS(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function ee(e){l||(l=!0,p(e),n(e),r())}function h(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function g(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function te(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=$S(r);if(!e)break;r=e.rest;let{event:t,data:n}=eC(e.frame);n.length>0&&g(t,n.join(` -`))}}h()}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 te(e.body)}catch(e){if(c.signal.aborted){h();return}ee(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`,[fS]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function nC(e,t){let{channel:n,rpcOptions:r={}}=t;return Ore(e,{...n,timeout:-1,...r,proxify:!1})}function rC(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(Iy.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function ee(){return l===`disconnected`||l===`error`?new US(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new US(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function h(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(Iy.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 US(`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(Iy.client.error,n,t),r(n)})})}let g=new Map;for(let e of r.jsonSerializableMethods??[])g.set(e,{jsonSerializable:!0});let te=e.createChannel({definitions:g,onError(e){f(`error`,e),i.emit(Iy.client.connectionError,e),m(new US(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new US(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),ne=nC(a.functions,{channel:te,rpcOptions:o});a.register({name:Iy.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new US(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Iy.client.connectionError,e),m(e),i.emit(Iy.client.isTrustedUpdated,!1)}});let re=n;async function ie(e){re=e;let t=await ne.$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 US(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Iy.client.connectionError,e)}return i.emit(Iy.client.isTrustedUpdated,c),t.isTrusted}async function ae(e){let t=(await ne.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(re=t,c=!0,d.resolve(!0),f(`connected`),i.emit(Iy.client.isTrustedUpdated,!0)),t}async function oe(e={}){await ne.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function se(){return c?!0:ie(re??``)}async function ce(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:se,requestTrustWithToken:ie,requestTrustWithCode:ae,requestAuthCode:oe,ensureTrusted:ce,call:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(Iy.client.error,n,t),Promise.reject(n)):h(ne.$call(...e),t)},callEvent:(...e)=>{let t=ee();if(t){i.emit(Iy.client.error,t,String(e[0]));return}return ne.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(Iy.client.error,n,t),Promise.reject(n)):h(ne.$callOptional(...e),t)},close:()=>{te.close()}}}function iC(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 aC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=iC(n.sse,r??`./`,location);return rC({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>tC({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 oC(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:sC(r)?oC(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function sC(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function cC(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function lC(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function uC(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function dC(e){if(e.error)throw oC(e.error);return e.output}function fC(e){return e.some(e=>e!=null)}function pC(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function mC(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?Xx(e):e}function a(e,t){return i(pC(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 uC(r)?dC(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(cC(r)){if(fC(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(lC(r)){let e=Gy(n),i=r.records[e];if(i)return dC(await s(i,r.serialization));if(r.fallback)return dC(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!fC(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 hC(e){let t=mC(await e.fetchJsonFromBases(pS),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 gC=``;function _C(e,t){return`${e}${gC}${t}`}function vC(e){let t=new Map,n=new Map;e.client.register({name:Iy.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(_C(e,n))?._push(r,i)}}),e.client.register({name:Iy.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=_C(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Iy.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=_C(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Iy.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(gC);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=_C(n,r),o=t.get(a);if(o)return o;let s=nS({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(Iy.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=_C(t,r),a=n.get(i);if(a)return a;let o=tS({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 yC(){}var bC=new Map;function xC(e){let t=e.url;e.authToken&&(t=`${t}?${gS}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=yC,onError:i=yC,onDisconnected:a=yC,definitions:o=bC}=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=ZS(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 SC(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 Qy(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function CC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=SC(n.websocket,r??`./`,location);return rC({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>xC({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 wC(e){return e.includes(`:`)}function TC(e,t){return wC(t)?t:`${e}:${t}`}function EC(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 DC(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 EC(a)}function OC(e,t){return{global:DC(e,t,`global`),project:DC(e,t,`project`)}}function kC(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(wC(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(TC(t,n),...r)),callEvent:((n,...r)=>e.callEvent(TC(t,n),...r)),callOptional:((n,...r)=>e.callOptional(TC(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(TC(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(TC(t,n),r,i),upload:(n,r)=>e.streaming.upload(TC(t,n),r)}},settings:OC(e,t),scope:e.scope}}function AC(){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 jC(e,t={}){let n=t.modelContext??AC();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=aS(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=kre(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:jre(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>MC(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 MC(e,t,n){try{let r=Nre(n,e.args?.length);return{content:[{type:`text`,text:NC(await(await TS(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:PC(e)}]}}}function NC(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function PC(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 FC(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 IC(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Ky(),a=Array.isArray(t)?t:[t],o=await HS(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new _S({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new ES(f),m=e.webmcp===!1?void 0:jC(p),ee,h=!1,g=0,te;function ne(){g++,te=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:Iy.broadcast.cacheInvalidate,type:`event`,handler:ne}),i.on(Iy.client.connectionStatus,ne),i.on(Iy.client.isTrustedUpdated,ne));async function re(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(Zy(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 ie=e.callTimeout??0,ae=ie>0?ie:1/0,oe,se={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+ae;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&oe.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new US(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${ie}ms`)}for(;!te&&(t(),!(h||oe.status!==`connected`));){let e=g;te=oe.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===g&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===g&&(te=void 0),t}),await te}await te,t()}let o=g;if(r&&e.i&&!h&&oe.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&&!h&&d.apply(e,n)}else await t(e)}}},ce=FC(e.transport??`auto`,s);oe=ce===`static`?await hC({fetchJsonFromBases:re}):ce===`sse`?aC({...se,sseOptions:e.sseOptions}):CC({...se,wsOptions:e.wsOptions});let le;try{le=new BroadcastChannel(`devframe-auth`)}catch{}let ue,de=!1;function fe(e){return((...t)=>de||!ue?e(...t):ue.then(()=>e(...t)))}function pe(){h=!0,ne();try{ee?.(),m?.()}finally{try{le?.close()}finally{oe.close?.()}}}let me={events:i,get isTrusted(){return oe.isTrusted},get status(){return oe.status},get connectionError(){return oe.connectionError},get transport(){return oe.transport??ce},get connection(){return o},connectionMeta:s,ensureTrusted:oe.ensureTrusted,requestTrust:oe.requestTrust,requestTrustWithToken:async e=>(RS(e),o={...o,authToken:e},oe.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await oe.requestTrustWithCode(e);if(!t)return!1;RS(t),o={...o,authToken:t};try{le?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>oe.requestAuthCode(e),call:fe(oe.call),callEvent:fe(oe.callEvent),callOptional:fe(oe.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:pe};me.sharedState=YS(me),me.streaming=vC(me),me.services=JS(me);let he=new Map;me.scope=(e=>{if(!e)return me;let t=he.get(e);return t||(t=kC(me,e),he.set(e,t)),t}),f.rpc=me;function ge(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function _e(){if(e.simpleAuth!==!1&&ge()&&typeof globalThis.prompt==`function`)for(await me.requestAuthCode().catch(()=>{});!me.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 me.requestTrustWithCode(t))return}}async function ve(){let t=await oe.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await qS(me,{param:n}):!1;t||r||me.isTrusted||await _e()}return ue=ve().then(()=>{de=!0},()=>{de=!0}),s.mcp&&lS(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-uq6ycX2u.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{h||(ee=e(me))}).catch(()=>{}),le&&(le.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&me.requestTrustWithToken(e.data.authToken)}),me}var LC=IC,RC=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`,`performance`,`build`],zC=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function BC(e){return`pangular:${e}`}var VC=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],HC={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},cdSlowMs:{default:16,min:1,max:1e3},capacitorCalls:{default:200,min:10,max:2e3},idleAfterMs:{default:6e4,min:0,max:6e5}},UC={"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`,filter:`the transferCache filter passed to withPangular() left it out`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},WC=[[0,`Network error (offline)`],[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 GC(e){return WC.some(([t])=>t===e)}var KC=/^[a-z][a-z0-9-]{0,39}$/;function qC(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&KC.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 JC=`pangular`,YC={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},XC=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function ZC(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=YC[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[...XC.filter(e=>n.has(e)),r].join(`+`)}function QC(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 $C(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 ew=[{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:`performance`,label:`Performance`,inspector:`performance`},{id:`build`,label:`Build`,inspector:`build`},{id:`capacitor`,label:`Capacitor`,inspector:`capacitor`},{id:`plugins`,label:`Plugins`,inspector:`plugins`}],tw=1e4;function nw(e){return ew.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var rw={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,signals:`a component's signal graph, by the component's id`,forms:`a form, by its id`},iw=200;function aw(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 ow(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=iw?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 sw=[{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 cw(e){let t=nw(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=sw.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function lw(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}var uw=Object.freeze({minLength:24,threshold:4.5}),dw={min:16,max:512},fw={min:2,max:6};function pw(e){return typeof e==`number`&&Number.isInteger(e)&&e>=dw.min&&e<=dw.max}function mw(e){return typeof e==`number`&&Number.isFinite(e)&&e>=fw.min&&e<=fw.max}function hw(e){if(e===!0)return{...uw};if(!e||typeof e!=`object`||Array.isArray(e))return;let{minLength:t,threshold:n}=e;return{minLength:pw(t)?t:uw.minLength,threshold:mw(n)?n:uw.threshold}}function gw(e){let t=hw(e);return t?{entropy:t}:{}}function _w(e,t){return typeof e==`boolean`?e:t}var vw=100,yw=100;function bw(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=yw);return[...new Set(t)].slice(0,vw)}function xw(e,t){let{default:n,min:r,max:i}=HC[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function Sw(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function Cw(e){let t=lw(e),n=lw(t.agent),r=lw(t.inspectors),i=lw(n.tools),a=lw(t.actions),o=_w(t.actions,!0),s=lw(t.redaction),c=lw(t.limits),l=Sw(RC,e=>_w(r[e],!0));return{inspectors:l,agent:{readOnly:_w(n.readOnly,!1),tools:Sw(RC,e=>l[e]&&_w(i[e],!0)),browserTools:_w(n.browserTools,!1)},actions:Sw(VC,e=>l[e]&&_w(a[e],o)),redaction:{secretNames:bw(s.secretNames),unmask:bw(s.unmask),...gw(s.entropy)},limits:Object.fromEntries(Object.keys(HC).map(e=>[e,xw(c[e],e)])),popup:{hotkey:Aw(lw(t.popup).hotkey)},plugins:kw(t.plugins),lint:{rules:Dw(t.lint)},analog:Tw(t.analog),ngrx:{trace:_w(lw(t.ngrx).trace,!1)}}}var ww=500;function Tw(e){let t=lw(e).contentSchema;return typeof t==`string`&&t.trim()&&t.length<=ww?{contentSchema:t.trim()}:{}}var Ew=200;function Dw(e){let t=lw(lw(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,Ew))typeof r==`boolean`&&(n[e]=r);return n}var Ow=100;function kw(e){let t={};for(let[n,r]of Object.entries(lw(e)).slice(0,Ow)){if(!KC.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=lw(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:_w(e.enabled,!0),tools:_w(e.tools,!0),actions:_w(e.actions,!0)})}return t}function Aw(e){return e===!1?!1:ZC(e)??`Alt+Shift+P`}function jw(e){let t=e?.configs;return Cw(t?.[JC])}function Mw(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, refetching the TransferState payload, and clearing HTTP calls`,analog:`Calling API routes, clearing server calls, running Nitro tasks and purging the Nitro cache`,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 Nw=[`pangular:build-meta`],Pw={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`,performance:`Performance`,build:`Build`},Fw={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`},Iw={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`,cdSlowMs:e=>`slow cycles over ${e} ms`,capacitorCalls:e=>`${e} Capacitor plugin calls`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function Lw(e){if(!e)return[];let t=[`On`];return e.minLength!==uw.minLength&&t.push(`${e.minLength} characters or more`),e.threshold!==uw.threshold&&t.push(`up to ${e.threshold} bits per character`),t}function Rw(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=RC.filter(t=>e.inspectors[t]);n(`Inspectors off`,RC.filter(t=>!e.inspectors[t]).map(e=>Pw[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>Pw[e])),n(`Blocked actions`,VC.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>Fw[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Entropy masking`,Lw(e.redaction.entropy)),n(`Limits`,Object.keys(HC).filter(t=>e.limits[t]!==HC[t].default).map(t=>Iw[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 zw(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 Bw(e){return!e.tags.length&&!e.directives.length&&!e.text}function Vw(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 Hw={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 Uw(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function Ww(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function Gw(e,t){let n=Ww(e),r=Ww(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function Kw(e,t){return e?.capabilities?.[t]===!1}function qw(e,t){let n=Hw[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=Uw(t);return Gw(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}.`}function Jw(e){return e.hydration===`hydrated`&&e.hydratedAt===void 0?`hydrated before inspection`:e.hydration}var Yw=/^on (viewport|interaction|hover)\b/;function Xw(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>Yw.test(e))}function Zw(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(Xw(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 Qw=`pangular-page-id`,$w=null;function eT(e){$w=e}function tT(){if($w)return $w;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(Qw)||null)}catch{return null}}function nT(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 rT(e,t){return e?t?e.pages?.[t]??null:e:null}function iT(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function aT(){return{functions:[...Nw]}}function oT(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function sT(e,t,n){return oT(e,t,n).then(e=>e,()=>null)}function cT(e){return e?.connectionMeta.backend===`static`}function lT(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 uT(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function dT(e){return e.split(`@`)[1]??``}var fT={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},pT={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},mT=sT,hT={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 gT(e){return hT[e]??e}var _T=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function vT(e,t){return await mT(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function yT(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 bT=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function xT(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(bT,(e,t)=>t??(e===`**`?``:e))}function ST(e,t){let n=Math.max(0,e-t),r=Math.ceil(n/6e4);if(r<60)return`in ${r} min`;let i=Math.round(r/60);return i<48?`in ${i} ${i===1?`hour`:`hours`}`:`in ${Math.round(i/24)} days`}function CT(e,t){return e.length?e.join(`, `):t}function wT(e,t){let n=[];if(n.push({label:`One-time code`,value:e.auth?e.oneTimeCode.state===`locked`?`Locked after too many wrong codes: run pangular token --rotate or restart the server for a new code`:e.oneTimeCode.expiresAt?`On, current code expires ${ST(e.oneTimeCode.expiresAt,t)}`:`On`:`Off: every client is trusted`}),e.auth){let{count:r,nextExpiresAt:i,lastExpiresAt:a}=e.tokens;n.push({label:`Trusted clients`,value:r?r===1||i===a?`${r} ${r===1?`token`:`tokens`}, expires ${ST(i??t,t)}`:`${r} tokens, the first expires ${ST(i??t,t)}, the last ${ST(a??t,t)}`:`None`}),e.pairingTokens&&n.push({label:`Pairing tokens`,value:`${e.pairingTokens} accepted instead of the code`})}return e.reported?(n.push({label:`Reach`,value:e.network?`This machine and other machines`:`This machine only`}),n.push({label:`Allowed origins`,value:e.originCheck?`${CT(e.allowedOrigins,`This machine and the Chrome extension`)}${e.customOrigins?`, plus a custom origin check`:``}`:`Any: the origin check is off`}),(e.allowedHosts===`any`||e.allowedHosts.length)&&n.push({label:`Allowed hosts`,value:e.allowedHosts===`any`?`Any`:e.allowedHosts.join(`, `)}),n):n}function TT(e){return jw(e?.connectionMeta)}function ET(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function DT(e,t){if(!t||typeof t!=`object`)return e;let n=ET(t.secretNames),r=ET(t.unmask);if(!n||!r)return e;let i=hw(t.entropy);return{...e,redaction:i?{secretNames:n,unmask:r,entropy:i}:{secretNames:n,unmask:r}}}function OT(e,t){return TT(e).actions[t]}var kT={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`,performance:`performance`,build:`build`};function AT(e){return kT[e]}var jT=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function MT(e,t){let n=kT[e];return!n||t.inspectors[n]}function NT(e,t){e&1&&(C(),Sg(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function PT(e,t){e&1&&(C(),Sg(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function FT(e,t){e&1&&(C(),Sg(0,`path`,13)(1,`path`,14))}function IT(e,t){e&1&&(C(),Sg(0,`path`,15)(1,`path`,16)(2,`path`,17))}function LT(e,t){e&1&&(C(),Sg(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function RT(e,t){e&1&&(C(),Sg(0,`path`,1))}function zT(e,t){e&1&&(C(),Sg(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function BT(e,t){e&1&&(C(),Sg(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function VT(e,t){e&1&&(C(),Sg(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function HT(e,t){e&1&&(C(),Sg(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function UT(e,t){e&1&&(C(),Sg(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function WT(e,t){e&1&&(C(),Sg(0,`circle`,39)(1,`path`,40))}function GT(e,t){e&1&&(C(),Sg(0,`ellipse`,41)(1,`path`,42)(2,`path`,43)(3,`path`,44)(4,`path`,45))}function KT(e,t){e&1&&(C(),Sg(0,`circle`,32)(1,`path`,46)(2,`path`,47))}function qT(e,t){e&1&&(C(),Sg(0,`path`,48)(1,`path`,49))}function JT(e,t){e&1&&(C(),Sg(0,`path`,50)(1,`path`,51)(2,`path`,52))}function YT(e,t){e&1&&(C(),Sg(0,`path`,2))}function XT(e,t){e&1&&(C(),Sg(0,`path`,3))}function ZT(e,t){e&1&&(C(),Sg(0,`path`,4))}var QT=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:20,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`],[`d`,`M12 14l4-4`],[`d`,`M3.34 19a10 10 0 1 1 17.32 0`],[`d`,`M21 16V8l-9-5-9 5v8l9 5 9-5Z`],[`d`,`m3.3 7 8.7 5 8.7-5`],[`d`,`M12 22V12`]],template:function(e,t){if(e&1&&(C(),L(0,`svg`,0),k(1,NT,4,0)(2,PT,4,0)(3,FT,2,0)(4,IT,3,0)(5,LT,3,0)(6,RT,1,0,`:svg:path`,1)(7,zT,4,0)(8,BT,3,0)(9,VT,4,0)(10,HT,3,0)(11,UT,5,0)(12,WT,2,0)(13,GT,5,0)(14,KT,3,0)(15,qT,2,0)(16,JT,3,0)(17,YT,1,0,`:svg:path`,2)(18,XT,1,0,`:svg:path`,3)(19,ZT,1,0,`:svg:path`,4),R()),e&2){let e;E(),A((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===`performance`?15:e===`build`?16:e===`plugins`?17:e===`analog`?18:e===`capacitor`?19:-1)}},styles:[`[_nghost-%COMP%] { + `):``,this.name=`UnsubscriptionError`,this.errors=t}});function tr(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var nr=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=Kn(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(Qn(c))try{c()}catch(e){i=e instanceof er?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Kn(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{ar(f)}catch(e){i??=[],e instanceof er?i=Jn(Jn([],qn(i)),qn(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 er(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)ar(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)&&tr(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&tr(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),rr=nr.EMPTY;function ir(e){return e instanceof nr||e&&`closed`in e&&Qn(e.remove)&&Qn(e.add)&&Qn(e.unsubscribe)}function ar(e){Qn(e)?e():e.unsubscribe()}var or={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},sr={setTimeout:function(e,t){var n=[...arguments].slice(2),r=sr.delegate;return r?.setTimeout?r.setTimeout.apply(r,Jn([e,t],qn(n))):setTimeout.apply(void 0,Jn([e,t],qn(n)))},clearTimeout:function(e){return(sr.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function cr(e){sr.setTimeout(function(){var t=or.onUnhandledError;if(t)t(e);else throw e})}function lr(){}var ur=(function(){return pr(`C`,void 0,void 0)})();function dr(e){return pr(`E`,void 0,e)}function fr(e){return pr(`N`,e,void 0)}function pr(e,t,n){return{kind:e,value:t,error:n}}var mr=null;function hr(e){if(or.useDeprecatedSynchronousErrorHandling){var t=!mr;if(t&&(mr={errorThrown:!1,error:null}),e(),t){var n=mr,r=n.errorThrown,i=n.error;if(mr=null,r)throw i}}else e()}function gr(e){or.useDeprecatedSynchronousErrorHandling&&mr&&(mr.errorThrown=!0,mr.error=e)}var _r=function(e){Un(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,ir(t)&&t.add(n)):n.destination=Tr,n}return t.create=function(e,t,n){return new xr(e,t,n)},t.prototype.next=function(e){this.isStopped?wr(fr(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?wr(dr(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?wr(ur,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}(nr),vr=Function.prototype.bind;function yr(e,t){return vr.call(e,t)}var br=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){Sr(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Sr(e)}else Sr(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Sr(e)}},e}(),xr=function(e){Un(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(Qn(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&or.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&yr(t.next,o),error:t.error&&yr(t.error,o),complete:t.complete&&yr(t.complete,o)}):a=t}return i.destination=new br(a),i}return t}(_r);function Sr(e){or.useDeprecatedSynchronousErrorHandling?gr(e):cr(e)}function Cr(e){throw e}function wr(e,t){var n=or.onStoppedNotification;n&&sr.setTimeout(function(){return n(e,t)})}var Tr={closed:!0,next:lr,error:Cr,complete:lr},Er=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Dr(e){return e}function Or(e){return e.length===0?Dr:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var kr=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=Mr(e)?e:new xr(e,t,n);return hr(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=Ar(t),new t(function(t,r){var i=new xr({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[Er]=function(){return this},e.prototype.pipe=function(){return Or([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Ar(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 Ar(e){return e??or.Promise??Promise}function jr(e){return e&&Qn(e.next)&&Qn(e.error)&&Qn(e.complete)}function Mr(e){return e&&e instanceof _r||jr(e)&&ir(e)}function Nr(e){return Qn(e?.lift)}function Pr(e){return function(t){if(Nr(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 Fr(e,t,n,r,i){return new Ir(e,t,n,r,i)}var Ir=function(e){Un(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}(_r),Lr=$n(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Rr=function(e){Un(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 zr(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Lr},t.prototype.next=function(e){var t=this;hr(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=Kn(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;hr(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;hr(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?rr:(this.currentObservers=null,a.push(e),new nr(function(){t.currentObservers=null,tr(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 kr;return e.source=this,e},t.create=function(e,t){return new zr(e,t)},t}(kr),zr=function(e){Un(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)??rr},t}(Rr),Br=function(e){Un(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}(Rr);function Vr(e){return e[e.length-1]}function Hr(e){return Qn(Vr(e))?e.pop():void 0}var Ur=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function Wr(e){return Qn(e?.then)}function Gr(e){return Qn(e[Er])}function Kr(e){return Symbol.asyncIterator&&Qn(e?.[Symbol.asyncIterator])}function qr(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 Jr(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var Yr=Jr();function Xr(e){return Qn(e?.[Yr])}function Zr(e){return Xn(this,arguments,function(){var t,n,r,i;return Gn(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,Yn(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,Yn(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Yn(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 Qr(e){return Qn(e?.getReader)}function $r(e){if(e instanceof kr)return e;if(e!=null){if(Gr(e))return ei(e);if(Ur(e))return ti(e);if(Wr(e))return ni(e);if(Kr(e))return ii(e);if(Xr(e))return ri(e);if(Qr(e))return ai(e)}throw qr(e)}function ei(e){return new kr(function(t){var n=e[Er]();if(Qn(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function ti(e){return new kr(function(t){for(var n=0;n=0?n.slice(0,r):n}function gi(e,t){return e?t?`${e} ${t}`:e:t||``}var Wee=mi({__forward_ref__:mi});function _i(e){return e.__forward_ref__=_i,e}function vi(e){return yi(e)?e():e}function yi(e){return typeof e==`function`&&Object.hasOwn(e,Wee)&&e.__forward_ref__===_i}function bi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function xi(e){return Gee(e,Ci)}function Gee(e,t){return Object.hasOwn(e,t)&&e[t]||null}function Kee(e){return(e?.[Ci]??null)||null}function Si(e){return e&&Object.hasOwn(e,wi)?e[wi]:null}var Ci=mi({ɵprov:mi}),wi=mi({ɵinj:mi}),Ti=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=bi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Ei(e){return e&&!!e.ɵproviders}var Di=mi({ɵcmp:mi}),Oi=mi({ɵdir:mi}),ki=mi({ɵpipe:mi}),Ai=mi({ɵfac:mi}),ji=mi({__NG_ELEMENT_ID__:mi}),Mi=mi({__NG_ENV_ID__:mi});function Ni(e){return Ii(e,`@Component`),e[Di]||null}function Pi(e){return Ii(e,`@Directive`),e[Oi]||null}function Fi(e){return Ii(e,`@Pipe`),e[ki]||null}function Ii(e,t){if(e==null)throw new fi(-919,!1)}function Li(e){return typeof e==`string`?e:e==null?``:String(e)}var Ri=mi({ngErrorCode:mi}),zi=mi({ngErrorMessage:mi}),Bi=mi({ngTokenPath:mi});function Vi(e,t){return Ui(``,-200,t)}function Hi(e,t){throw new fi(-201,!1)}function Ui(e,t,n){let r=new fi(t,e);return r[Ri]=t,r[zi]=e,n&&(r[Bi]=n),r}function Wi(e){return e[Ri]}var Gi;function Ki(){return Gi}function qi(e){let t=Gi;return Gi=e,t}function Ji(e,t,n){let r=xi(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;Hi(e,``)}var Yi=globalThis,Xi={},Zi=`__NG_DI_FLAG__`,Qi=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=ta(t)||0;try{return this.injector.get(e,n&8?null:Xi,n)}catch(e){if(In(e))return e;throw e}}};function $i(e,t=0){let n=Nn();if(n===void 0)throw new fi(-203,!1);if(n===null)return Ji(e,void 0,t);{let r=na(t),i=n.retrieve(e,r);if(In(i)){if(r.optional)return null;throw i}return i}}function ea(e,t=0){return(Ki()||$i)(vi(e),t)}function b(e,t){return ea(e,ta(t))}function ta(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function na(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function ra(e){let t=[];for(let n=0;nArray.isArray(e)?ca(e,t):t(e))}function la(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function ua(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function da(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 pa(e,t,n){let r=ha(e,t);return r>=0?e[r|1]=n:(r=~r,fa(e,r,t,n)),r}function ma(e,t){let n=ha(e,t);if(n>=0)return e[n|1]}function ha(e,t){return ga(e,t,1)}function ga(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 ca(t,e=>{let t=e;Ea(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Ta(i,a),n}function Ta(e,t){for(let n=0;n{t(e,r)})}}function Ea(e,t,n,r){if(e=vi(e),!e)return!1;let i=null,a=Si(e),o=!a&&Ni(e);if(!a&&!o){let t=e.ngModule;if(a=Si(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)Ea(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{ca(a.imports,i=>{Ea(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Ta(e,t)}if(!s){let e=aa(i)||(()=>new i);t({provide:i,useFactory:e,deps:va},i),t({provide:xa,useValue:i,multi:!0},i),t({provide:ya,useValue:()=>ea(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Da(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Da(e,t){for(let n of e)Ei(n)&&(n=n.ɵproviders),Array.isArray(n)?Da(n,t):t(n)}var Oa=mi({provide:String,useValue:mi});function ka(e){return typeof e==`object`&&!!e&&Oa in e}function Aa(e){return!!(e&&e.useExisting)}function ja(e){return!!(e&&e.useFactory)}function Ma(e){return typeof e==`function`}function Na(e){return!!e.useClass}var Pa=new Ti(``),Fa={},Ia={},La=void 0;function Ra(){return La===void 0&&(La=new Sa),La}var za=class{},Ba=class extends za{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,Xa(e,e=>this.processProvider(e)),this.records.set(ba,Ka(void 0,this)),r.has(`environment`)&&this.records.set(za,Ka(void 0,this));let i=this.records.get(Pa);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(xa,va,{self:!0}))}retrieve(e,t){let n=ta(t)||0;try{return this.get(e,Xi,n)}catch(e){if(In(e))return e;throw e}}destroy(){Ga(this),this._destroyed=!0;let e=tn(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(),tn(e)}}onDestroy(e){return Ga(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ga(this);let t=Pn(this),n=qi(void 0);try{return e()}finally{Pn(t),qi(n)}}get(e,t=Xi,n){if(Ga(this),Object.hasOwn(e,Mi))return e[Mi](this);let r=ta(n),i=Pn(this),a=qi(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Ya(e)&&xi(e);t=n&&this.injectableDefInScope(n)?Ka(Va(e),Fa):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Ra():this.parent;return t=r&8&&t===Xi?null:t,n.get(e,t)}catch(e){let t=Wi(e);throw t===-200||t===-201?new fi(t,null):e}finally{qi(a),Pn(i)}}resolveInjectorInitializers(){let e=tn(null),t=Pn(this),n=qi(void 0);try{let e=this.get(ya,va,{self:!0});for(let t of e)t()}finally{Pn(t),qi(n),tn(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=vi(e);let t=Ma(e)?e:vi(e&&e.provide),n=Ua(e);if(!Ma(e)&&e.multi===!0){let n=this.records.get(t);n||(n=Ka(void 0,Fa,!0),n.factory=()=>ra(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=tn(null);try{if(t.value===Ia)throw Vi(``);return t.value===Fa&&(t.value=Ia,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Ja(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{tn(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=vi(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 Va(e){let t=xi(e),n=t===null?aa(e):t.factory;if(n!==null)return n;if(e instanceof Ti)throw new fi(-204,!1);if(e instanceof Function)return Ha(e);throw new fi(-204,!1)}function Ha(e){if(e.length>0)throw new fi(-204,!1);let t=Kee(e);return t===null?()=>new e:()=>t.factory(e)}function Ua(e){return ka(e)?Ka(void 0,e.useValue):Ka(Wa(e),Fa)}function Wa(e,t,n){let r;if(Ma(e)){let t=vi(e);return aa(t)||Va(t)}if(ka(e))r=()=>vi(e.useValue);else if(ja(e))r=()=>e.useFactory(...ra(e.deps||[]));else if(Aa(e))r=(t,n)=>ea(vi(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=vi(e&&(e.useClass||e.provide));if(qa(e))r=()=>new t(...ra(e.deps));else return aa(t)||Va(t)}return r}function Ga(e){if(e.destroyed)throw new fi(-205,!1)}function Ka(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function qa(e){return!!e.deps}function Ja(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Ya(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Xa(e,t){for(let n of e)Array.isArray(n)?Xa(n,t):n&&Ei(n)?Xa(n.ɵproviders,t):t(n)}function Za(e,t){let n;e instanceof Ba?(Ga(e),n=e):n=new Qi(e);let r=Pn(n),i=qi(void 0);try{return t()}finally{Pn(r),qi(i)}}function Qa(){return Ki()!==void 0||Nn()!=null}var $a=1;function eo(e){return Array.isArray(e)&&typeof e[$a]==`object`}function to(e){return Array.isArray(e)&&e[$a]===!0}function no(e){return!!(e.flags&4)}function ro(e){return e.componentOffset>-1}function io(e){return(e.flags&1)==1}function ao(e){return!!e.template}function oo(e){return!!(e[2]&512)}function so(e){return(e[2]&256)==256}var co=(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})(co||{}),lo=`math`;function uo(e){for(;Array.isArray(e);)e=e[0];return e}function fo(e,t){return uo(t[e])}function po(e,t){return uo(t[e.index])}function mo(e,t){return e.data[t]}function ho(e,t){return e[t]}function go(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function _o(e,t){let n=t[e];return eo(n)?n:n[0]}function vo(e){return(e[2]&128)==128}function yo(e){return to(e[3])}function bo(e,t){return t==null?null:e[t]}function xo(e){e[17]=0}function So(e){e[2]&1024||(e[2]|=1024,vo(e)&&Eo(e))}function Co(e,t){for(;e>0;)t=t[14],e--;return t}function wo(e){return!!(e[2]&9216||e[24]?.dirty)}function To(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),wo(e)&&Eo(e)}function Eo(e){e[10].changeDetectionScheduler?.notify(0);let t=ko(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!vo(t)));)t=ko(t)}function Do(e,t){if(so(e))throw new fi(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Oo(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function ko(e){let t=e[3];return to(t)?t[3]:t}function Ao(e){return e[7]??=[]}function jo(e){return e.cleanup??=[]}function qee(e,t,n,r){let i=Ao(t);i.push(n),e.firstCreatePass&&jo(e).push(r,i.length-1)}var Mo={lFrame:is(null),bindingsEnabled:!0,skipHydrationRootTNode:null},No=!1;function Jee(){return Mo.lFrame.elementDepthCount}function Yee(){Mo.lFrame.elementDepthCount++}function Po(){Mo.lFrame.elementDepthCount--}function Fo(){return Mo.bindingsEnabled}function Io(){return Mo.skipHydrationRootTNode!==null}function Lo(e){return Mo.skipHydrationRootTNode===e}function Ro(){Mo.skipHydrationRootTNode=null}function zo(){return Mo.lFrame.lView}function Bo(){return Mo.lFrame.tView}function x(e){return Mo.lFrame.contextLView=e,e[8]}function S(e){return Mo.lFrame.contextLView=null,e}function Vo(){let e=Ho();for(;e!==null&&e.type===64;)e=e.parent;return e}function Ho(){return Mo.lFrame.currentTNode}function Xee(){let e=Mo.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Uo(e,t){let n=Mo.lFrame;n.currentTNode=e,n.isParent=t}function Wo(){return Mo.lFrame.isParent}function Go(){Mo.lFrame.isParent=!1}function Ko(){return Mo.lFrame.contextLView}function qo(){return No}function Jo(e){let t=No;return No=e,t}function Yo(){let e=Mo.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Xo(){return Mo.lFrame.bindingIndex}function Zee(e){return Mo.lFrame.bindingIndex=e}function Zo(){return Mo.lFrame.bindingIndex++}function Qo(e){let t=Mo.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Qee(){return Mo.lFrame.inI18n}function $ee(e,t){let n=Mo.lFrame;n.bindingIndex=n.bindingRootIndex=e,$o(t)}function ete(){return Mo.lFrame.currentDirectiveIndex}function $o(e){Mo.lFrame.currentDirectiveIndex=e}function tte(e){let t=Mo.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function nte(){return Mo.lFrame.currentQueryIndex}function es(e){Mo.lFrame.currentQueryIndex=e}function rte(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function ts(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=rte(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=Mo.lFrame=rs();return r.currentTNode=t,r.lView=e,!0}function ns(e){let t=rs(),n=e[1];Mo.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function rs(){let e=Mo.lFrame,t=e===null?null:e.child;return t===null?is(e):t}function is(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 as(){let e=Mo.lFrame;return Mo.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var os=as;function ss(){let e=as();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 ite(e){return(Mo.lFrame.contextLView=Co(e,Mo.lFrame.contextLView))[8]}function cs(){return Mo.lFrame.selectedIndex}function ls(e){Mo.lFrame.selectedIndex=e}function us(){let e=Mo.lFrame;return mo(e.tView,e.selectedIndex)}function C(){Mo.lFrame.currentNamespace=`svg`}function ds(){ate()}function ate(){Mo.lFrame.currentNamespace=null}function fs(){return Mo.lFrame.currentNamespace}var ps=!0;function ms(){return ps}function hs(e){ps=e}function gs(e,t=null,n=null,r){let i=ote(e,t,n,r);return i.resolveInjectorInitializers(),i}function ote(e,t=null,n=null,r,i=new Set){return new Ba([n||va,Ca(e)],t||Ra(),null,i)}var _s=class e{static THROW_IF_NOT_FOUND=Xi;static NULL=new Sa;static create(e,t){if(Array.isArray(e))return gs({name:``},t,e,``);{let t=e.name??``;return gs({name:t},e.parent,e.providers,t)}}static ɵprov=bi({token:e,providedIn:`any`,factory:()=>ea(ba)});static __NG_ELEMENT_ID__=-1},vs=new Ti(``),ys=class{static __NG_ELEMENT_ID__=ste;static __NG_ENV_ID__=e=>e},bs=class extends ys{_lView;constructor(e){super(),this._lView=e}get destroyed(){return so(this._lView)}onDestroy(e){let t=this._lView;return Do(t,e),()=>Oo(t,e)}};function ste(){return new bs(zo())}var xs=new Ti(``),Ss=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Br(!1);debugTaskTracker=b(xs,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new kr(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=bi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Cs=class extends Rr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Qa()&&(this.destroyRef=b(ys,{optional:!0})??void 0,this.pendingTasks=b(Ss,{optional:!0})??void 0)}emit(e){let t=tn(null);try{super.next(e)}finally{tn(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 nr&&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 ws(...e){}function Ts(e){let t,n;function r(){e=ws;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 Es(e){return queueMicrotask(()=>e()),()=>{e=ws}}var Ds=`isAngularZone`,Os=`isAngularZone_ID`,ks=0,As=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Cs(!1);onMicrotaskEmpty=new Cs(!1);onStable=new Cs(!1);onError=new Cs(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new fi(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,Ps(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Ds)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new fi(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new fi(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,js,ws,ws);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)}},js={};function Ms(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 Ns(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Ts(()=>{e.callbackScheduled=!1,Fs(e),e.isCheckStableRunning=!0,Ms(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Fs(e)}function Ps(e){let t=()=>{Ns(e)},n=ks++;e._inner=e._inner.fork({name:`angular`,properties:{[Ds]:!0,[Os]:n,[Os+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(zs(s))return n.invokeTask(i,a,o,s);try{return Is(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Ls(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Is(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Bs(s)&&t(),Ls(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Fs(e),Ms(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 Fs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Is(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Ls(e){e._nesting--,Ms(e)}var Rs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Cs;onMicrotaskEmpty=new Cs;onStable=new Cs;onError=new Cs;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 Vs(e,`__ignore_ng_zone__`)}function Bs(e){return Vs(e,`__scheduler_tick__`)}function Vs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Hs=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},Us=new Ti(``,{factory:()=>{let e=b(As),t=b(za),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Hs),n.handleError(r))})}}}),Ws={provide:ya,useValue:()=>{b(Hs,{optional:!0})},multi:!0};function w(e,t){let[n,r,i]=vee(e,t?.equal),a=n;return a[en],a.set=r,a.update=i,a.asReadonly=Gs.bind(a),a}function Gs(){let e=this[en];if(e.readonlyFn===void 0){let t=()=>this();t[en]=e,e.readonlyFn=t}return e.readonlyFn}var Ks=new Ti(``,{factory:()=>qs}),qs=`ng`,Js=new Ti(``),Ys=new Ti(``,{providedIn:`platform`,factory:()=>`unknown`}),Xs=new Ti(``,{factory:()=>b(vs).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),Zs=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=Qs}return e})();function Qs(){return new Zs(zo(),Vo())}var $s=class{},ec=new Ti(``,{factory:()=>!0}),tc=new Ti(``),nc=(()=>{class e{static ɵprov=bi({token:e,providedIn:`root`,factory:()=>new rc})}return e})(),rc=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}},ic=class{[en];constructor(e){this[en]=e}destroy(){this[en].destroy()}};function T(e,t){let n=t?.injector??b(_s),r=t?.manualCleanup===!0?null:n.get(ys),i,a=n.get(Zs,null,{optional:!0}),o=n.get($s);return a===null?i=lc(e,n.get(nc),o):(i=cc(a.view,o,e),r instanceof bs&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new ic(i)}var ac={...xee,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Jo(!1);try{See(this)}finally{Jo(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=tn(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],tn(e)}}},oc={...ac,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(_n(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},sc={...ac,consumerMarkedDirty(){this.view[2]|=8192,Eo(this.view),this.notifier.notify(13)},destroy(){if(_n(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function cc(e,t,n){let r=Object.create(sc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=uc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function lc(e,t,n){let r=Object.create(oc);return r.fn=uc(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 uc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function dc(e){return typeof e==`function`&&e[en]!==void 0}function fc(e){return dc(e)&&typeof e.set==`function`}var pc=Symbol(`InputSignalNode#UNSET`),mc={...jn,transformFn:void 0,applyValueToInputSignal(e,t){kn(e,t)}};function hc(e){return{toString:e}.toString()}var gc=(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})(gc||{}),_c=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function vc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var yc=null,bc=(()=>{yc=Sc;let e=()=>Sc;return e.ngInherit=!0,e})();function xc(){return yc}function Sc(e){return e.type.prototype.ngOnChanges&&(e.setInput=wc),Cc}function Cc(){let e=Ec(this),t=e?.current;if(t){let n=e.previous;if(n===_a)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function wc(e,t,n,r,i){let a=this.declaredInputs[r],o=Ec(e)||Dc(e,{previous:_a,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new _c(l&&l.currentValue,n,c===_a),vc(e,t,i,n)}var Tc=`__ngSimpleChanges__`;function Ec(e){return Object.hasOwn(e,Tc)&&e[Tc]||null}function Dc(e,t){return e[Tc]=t}var Oc=[],kc=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,Ic(o,a)):Ic(o,a)}var Rc=-1,zc=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 Bc(e){return!!(e.flags&8)}function Vc(e){return!!(e.flags&16)}function Hc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function Xc(e,t){let n=Yc(e),r=t;for(;n>0;)r=r[14],n--;return r}var Zc=!0;function Qc(e){let t=Zc;return Zc=e,t}var $c=255,el=5,tl=0,nl={};function rl(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,ji)&&(r=n[ji]),r??=n[ji]=tl++;let i=r&$c,a=1<>el)]|=a}function il(e,t){let n=ol(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,al(r.data,e),al(t,null),al(r.blueprint,null));let i=sl(e,t),a=e.injectorIndex;if(qc(i)){let e=Jc(i),n=Xc(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 al(e,t){e.push(0,0,0,0,0,0,0,0,t)}function ol(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function sl(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=wl(i),r===null)return Rc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Rc}function cl(e,t,n){rl(e,t,n)}function ll(e,t,n){if(n&8||e!==void 0)return e;Hi(t,`NodeInjector`)}function ul(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=qi(void 0);try{return i?i.get(t,r,n&8):Ji(t,r,n&8)}finally{qi(a)}}return ll(r,t,n)}function dl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=Cl(e,t,n,r,nl);if(i!==nl)return i}let i=fl(e,t,n,r,nl);if(i!==nl)return i}return ul(t,n,r,i)}function fl(e,t,n,r,i){let a=gl(n);if(typeof a==`function`){if(!ts(t,e,r))return r&1?ll(i,n,r):ul(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Hi(n);else return e}finally{os()}}else if(typeof a==`number`){let i=null,o=ol(e,t),s=Rc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?sl(e,t):t[o+8],s===Rc||!vl(r,!1)?o=-1:(i=t[1],o=Jc(s),t=Xc(s,t)));o!==-1;){let e=t[1];if(_l(a,o,e.data)){let e=pl(o,t,n,i,r,c);if(e!==nl)return e}s=t[o+8],s!==Rc&&vl(r,t[1].data[o+8]===c)&&_l(a,o,t)?(i=e,o=Jc(s),t=Xc(s,t)):o=-1}}return i}function pl(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=ml(s,o,n,r==null?ro(s)&&Zc:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?nl:hl(t,o,c,s,i)}function ml(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&&ao(e)&&e.type===n)return c}return null}function hl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof zc){let s=a;if(s.resolving)throw Vi(``);let c=Qc(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?qi(s.injectImpl):null;ts(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Ac(n,o[n],t)}finally{l!==null&&qi(l),Qc(c),s.resolving=!1,os()}}return a}function gl(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,ji)?e[ji]:void 0;return typeof t==`number`?t>=0?t&$c:bl:t}function _l(e,t,n){let r=1<>el)]&r)}function vl(e,t){return!(e&2)&&!(e&1&&t)}var yl=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return dl(this._tNode,this._lView,e,ta(n),t)}};function bl(){return new yl(Vo(),zo())}function xl(e){return hc(()=>{let t=e.prototype.constructor,n=t[Ai]||Sl(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let e=i[Ai]||Sl(i);if(e&&e!==n)return e;i=Object.getPrototypeOf(i)}return e=>new e})}function Sl(e){return yi(e)?()=>{let t=Sl(vi(e));return t&&t()}:aa(e)}function Cl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!oo(o);){let e=fl(a,o,n,r|2,nl);if(e!==nl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,nl,r);if(t!==nl)return t}t=wl(o),o=o[14]}a=t}return i}function wl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Tl(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function El(){return Dl(Vo(),zo())}function Dl(e,t){return new Ol(po(e,t))}var Ol=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=El}return e})();function kl(e){return e instanceof Ol?e.nativeElement:e}function Al(){return this._results[Symbol.iterator]()}var jl=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 Rr}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=sa(e);(this._changesDetected=!oa(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]=Al};function Ml(e){return(e.flags&128)==128}var Nl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Nl||{}),Pl=new Map,Fl=0;function Il(){return Fl++}function Ll(e){Pl.set(e[19],e)}function Rl(e){Pl.delete(e[19])}var zl=`__ngContext__`;function Bl(e,t){eo(t)?(e[zl]=t[19],Ll(t)):e[zl]=t}function Vl(e){return Ul(e[12])}function Hl(e){return Ul(e[4])}function Ul(e){for(;e!==null&&!to(e);)e=e[4];return e}var Wl=void 0;function Gl(e){Wl=e}function Kl(){if(Wl!==void 0)return Wl;if(typeof document<`u`)return document;throw new fi(210,!1)}var ql=!1,Jl=new Ti(``,{factory:()=>ql}),Yl=new WeakMap;function Xl(e,t){if(typeof e!=`object`||!e)return;let n=Yl.get(e);n||(n=new WeakSet,Yl.set(e,n)),n.add(t)}function Zl(e){return(e.flags&32)==32}var Ql=()=>null;function $l(e,t,n=!1){return Ql(e,t,n)}function eu(e,t){let n=e.contentQueries;if(n!==null){let r=tn(null);try{for(let r=0;r|^->||--!>|)/g,fu=`​$1​`;function pu(e){return e.replace(uu,e=>e.replace(du,fu))}function mu(e,t){return e.createText(t)}function hu(e,t,n){e.setValue(t,n)}function gu(e,t){return e.createComment(pu(t))}function _u(e,t,n){return e.createElement(t,n)}function vu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function yu(e,t,n){e.appendChild(t,n)}function bu(e,t,n,r,i){r===null?yu(e,t,n):vu(e,t,n,r,i)}function xu(e,t,n,r){e.removeChild(null,t,n,r)}function Su(e,t,n){e.setAttribute(t,`style`,n)}function Cu(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function wu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Hc(e,t,r),i!==null&&Cu(e,t,i),a!==null&&Su(e,t,a)}function Tu(e){let t=Eu();return t?t.sanitize(co.URL,e)||``:ou(e,`URL`)?au(e):lu(Li(e))}function Eu(){let e=zo();return e&&e[10].sanitizer}function Du(e){return e.ownerDocument.defaultView}function Ou(e){return e.ownerDocument}function ku(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 Au=`ng-template`;function ju(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 Iu(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+=Ru(a,i),i=``),r=o,a||=!Fu(r);n++}return i!==``&&(t+=Ru(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 Hu(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function Uu(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function _te(e){let t=Uu(e,`transition-property`),n=Uu(e,`transition-duration`),r=Uu(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=Uu(e,`animation-name`),n=Uu(e,`animation-delay`),r=Uu(e,`animation-duration`),i=Uu(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 Wu(e,t){return e!==void 0&&e.duration>t.duration}function Gu(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function Ku(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;Wu(t.get(e),a)||Gu(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=Ku(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}Wu(t.get(e),r)||Gu(r)&&t.set(e,r)}var qu=new Set,Ste=!1,Cte=1,Ju=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function wte(e){return e[9].get(gte,Ste)}function Tte(e,t,n){let r=Xu.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else Xu.set(e,{classList:t,cleanupFns:n})}function Yu(e){let t=Xu.get(e);if(t){for(let e of t.cleanupFns)e();Xu.delete(e)}Zu.delete(e)}var Xu=new WeakMap,Zu=new WeakMap,Qu=new WeakMap;function $u(e){return e?e[14]??e:null}var ed=new WeakSet;function Ete(e,t,n){let r=Qu.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=$u(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),ed.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=$u(n),i=Qu.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):Qu.set(e,[{el:t,declarationView:r}])}function td(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 nd(e){return e.composedPath?e.composedPath()[0]:e.target}function rd(e,t){let n=Zu.get(t);if(n===void 0)return!0;if(t!==nd(e))return!1;let r=e.animation;if(r){let e=Ku(r);if(e!==void 0&&e+Cte{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=bi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),ld=[0,1,2,3],ud=(()=>{class e{ngZone=b(As);scheduler=b($s);errorHandler=b(Hs,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){b(ad,{optional:!0})}execute(){let e=this.sequences.size>0;e&&kc(gc.AfterRenderHooksStart),this.executing=!0;for(let e of ld)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&&kc(gc.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),Eo(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(id.AFTER_NEXT_RENDER,e):e()}static ɵprov=bi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),dd=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 fd(e,t){let n=t?.injector??b(_s);return sd(`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(cd);i.impl??=t.get(ud);let a=t.get(ad,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(ys),s=t.get(Zs,null,{optional:!0}),c=new dd(i.impl,Ate(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var pd=new Ti(``,{factory:()=>{let e=b(za),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function md(e,t,n){let r=e.get(pd);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(pd);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(pd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Pte(e){let t=e.get(pd);t.isScheduled||=(fd(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Fte(e){let t=e.get(pd);t.scheduler=Pte,t.scheduler(e)}function hd(e,t){for(let[n,r]of t)md(e,r.animateFns)}function gd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&hd(r,i)}function _d(e,t,n,r){try{n.get(ba)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Mte(n,i.enter.get(t.index).animateFns);let a=Ite(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&&qu.add(e[19]),md(n,()=>Lte(e,t,i||void 0,a,r),i||void 0)}function Ite(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 Lte(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),zte(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&qu.delete(e[19]),i(!0)})}else e&&qu.delete(e[19]),i(!1)}function vd(e,t,n){if(t.type&12){let r=e[t.index];if(to(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,qu.delete(e[19])),n(!0)})}function yd(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;to(i)?c=i:eo(i)&&(l=!0,i=i[0]);let u=uo(i);e===0&&r!==null?(gd(s,r,a,n),o==null?yu(t,r,u):vu(t,r,u,o||null,!0)):e===1&&r!==null?(gd(s,r,a,n),vu(t,r,u,o||null,!0),Ete(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Dte(a,u,s),ed.delete(u),_d(s,a,n,e=>{if(ed.has(u)){ed.delete(u);return}xu(t,u,l,e)})):e===3&&(ed.delete(u),_d(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Xte(t,e,n,c,a,r,o)}}function Bte(e,t){bd(e,t),t[0]=null,t[5]=null}function Vte(e,t,n,r,i,a){r[0]=i,r[5]=t,jd(e,r,n,1,i,a)}function bd(e,t){t[10].changeDetectionScheduler?.notify(9),jd(e,t,t[11],2,null,null)}function Hte(e){let t=e[12];if(!t)return Cd(e[1],e);for(;t;){let n=null;if(eo(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)eo(t)&&Cd(t[1],t),t=t[3];t===null&&(t=e),eo(t)&&Cd(t[1],t),n=t&&t[4]}t=n}}function xd(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function Sd(e,t){if(so(t))return;let n=t[11];n.destroyNode&&jd(e,t,n,3,null,null),Hte(t)}function Cd(e,t){if(so(t))return;let n=tn(null);try{t[2]&=-129,t[2]|=256,t[24]&&_n(t[24]),Wte(e,t),Ute(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&to(t[3])){n!==t[3]&&xd(n,t);let r=t[18];r!==null&&r.detachView(e)}Rl(t)}finally{tn(n)}}function Ute(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&&Rd(e,t,27,!1),kc(o?gc.TemplateUpdateStart:gc.TemplateCreateStart,i,n),n(r,i)}finally{ls(a),kc(o?gc.TemplateUpdateEnd:gc.TemplateCreateEnd,i,n)}}function Hd(e,t,n){Jd(e,t,n),(n.flags&64)==64&&Yd(e,t,n)}function Ud(e,t,n=po){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];Bd(o,n[i],s,a),l=!0}else if(i>c)break}}return o!==null&&Object.hasOwn(r.inputs,i)&&(Bd(r,n[o],i,a),l=!0),l}function sf(e,t){let n=_o(t,e),r=n[1];cf(r,n);let i=n[0];i!==null&&n[6]===null&&(n[6]=$l(i,n[9])),kc(gc.ComponentStart);try{lf(r,n,n[8])}finally{kc(gc.ComponentEnd,n[8])}}function cf(e,t){for(let n=t.length;n{Eo(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function xf(e){let t=e[24]??Object.create(Sf);return t.lView=e,t}var Sf={...rn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=ko(e.lView);for(;t&&!Cf(t[1]);)t=ko(t);t&&So(t)},consumerOnSignalRead(){this.lView[24]=this}};function Cf(e){return e.type!==2}function wf(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 Tf=100;function Ef(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Df(e,t)}finally{n.end?.()}}function Df(e,t){let n=qo();try{Jo(!0),Nf(e,t);let n=0;for(;wo(e);){if(n===Tf)throw new fi(103,!1);n++,Nf(e,1)}}finally{Jo(n)}}function Of(e,t,n,r){if(so(t))return;let i=t[2];ns(t);let a=!0,o=null,s=null;Cf(e)?(s=_f(t),o=fn(s)):nn()===null?(a=!1,s=xf(t),o=fn(s)):t[24]&&=(_n(t[24]),null);try{xo(t),Zee(e.bindingStartIndex),n!==null&&Vd(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Mc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Nc(t,n,0,null),Pc(t,0)}if(Af(t),wf(t),kf(t,0),e.contentQueries!==null&&eu(e,t),a){let n=e.contentCheckHooks;n!==null&&Mc(t,n)}else{let n=e.contentHooks;n!==null&&Nc(t,n,1),Pc(t,1)}Ff(e,t);let o=e.components;o!==null&&Pf(t,o,0);let s=e.viewQuery;if(s!==null&&tu(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Mc(t,n)}else{let n=e.viewHooks;n!==null&&Nc(t,n,2),Pc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}hf(t),t[2]&=-73}catch(e){throw Eo(t),e}finally{s!==null&&(mn(s,o),a&&yf(s)),ss()}}function kf(e,t){for(let n=Vl(e);n!==null;n=Hl(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=ua(e,10+t);Bte(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 Hf(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(Vf(e,n),ua(t,n))}this._attachedToViewContainer=!1}Sd(this._lView[1],this._lView)}onDestroy(e){Do(this._lView,e)}markForCheck(){If(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){To(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Ef(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new fi(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=oo(this._lView),t=this._lView[16];t!==null&&!e&&xd(t,this._lView),bd(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new fi(902,!1);this._appRef=e;let t=oo(this._lView),n=this._lView[16];n!==null&&!t&&Uf(n,this._lView),To(this._lView)}},Gf=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=Kf;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 Wf(df(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function Kf(){return qf(Vo(),zo())}function qf(e,t){return e.type&4?new Gf(t,e,Dl(e,t)):null}function Jf(e,t,n,r,i){let a=e.data[t];if(a===null)a=Yf(e,t,n,r,i),Qee()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Xee();a.injectorIndex=e===null?-1:e.injectorIndex}return Uo(a,!0),a}function Yf(e,t,n,r,i){let a=Ho(),o=Wo(),s=o?a:a&&a.parent,c=e.data[t]=Zf(e,s,n,t,r,i);return Xf(e,c,a,o),c}function Xf(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 Zf(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Io()&&(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:fs(),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 Qf(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?$f(e,n):r.push(e);e[6]=r}function $f(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,tp=()=>null;function np(e,t){return ep(e,t)}function rp(e,t,n){return tp(e,t,n)}var ip=class{},ap=class{},op=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>sp()};function sp(){let e=zo(),t=_o(Vo().index,e);return(eo(t)?t:e)[11]}var cp=(()=>{class e{static ɵprov=bi({token:e,providedIn:`root`,factory:()=>null})}return e})();function lp(e){return e.debugInfo?.className||e.type.name||null}var up={},dp=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,up,n);return r!==up||t===up?r:this.parentInjector.get(e,t,n)}};function fp(e,t,n){return e[t]=n}function pp(e,t){return e[t]}function mp(e,t,n){if(n===zu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function hp(e,t,n,r){let i=mp(e,t,n);return mp(e,t+1,r)||i}function gp(e,t,n,r,i){let a=hp(e,t,n,r);return mp(e,t+2,i)||a}function _p(e,t,n,r,i,a){let o=hp(e,t,n,r);return hp(e,t+2,i,a)||o}function vp(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&Xl(i,a),If(ro(e)?_o(e.index,t):t,5);let o=t[8],s=yp(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=yp(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function yp(e,t,n,r){let i=tn(null);try{return kc(gc.OutputStart,t,n),n(r)!==!1}catch(t){return rf(e,t),!1}finally{kc(gc.OutputEnd,t,n),tn(i)}}function bp(e,t,n,r,i,a,o,s){let c=io(e),l=!1,u=null;if(!r&&c&&(u=Sp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=po(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);xp(a)||Cp(r?t=>r(uo(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function xp(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function Sp(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 Cp(e,t,n,r,i,a,o){let s=t.firstCreatePass?jo(t):null,c=Ao(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function wp(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,Tp(e,t,l,n[a+1],r,i);else if(l>s)break}}return Object.hasOwn(n.outputs,r)&&(c=!0,Tp(e,t,a,r,r,i)),c}function Tp(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Cp(e.index,s,t,i,a,c,!0)}function Ep(){Dp()}function Dp(){let e=zo(),t=Bo(),n=Vo();if(t.firstCreatePass&&Np(t,n),n.controlDirectiveIndex===-1)return;sd(`NgSignalForms`);let r=e[n.controlDirectiveIndex];t.data[n.controlDirectiveIndex].controlDef.create(r,new Ap(e,t,n))}function Op(){kp()}function kp(){let e=zo(),t=Bo(),n=us();if(n.controlDirectiveIndex===-1)return;let r=t.data[n.controlDirectiveIndex].controlDef,i=e[n.controlDirectiveIndex];r.update(i,new Ap(e,t,n))}var Ap=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 po(this.tNode,this.lView)}get descriptor(){return`<${this.tNode.value}>`}listenToCustomControlOutput(e,t){let n=this.tView.data[this.tNode.customControlIndex];wp(this.tNode,this.lView,n,e,vp(this.tNode,this.lView,t))}listenToCustomControlModel(e){let t=this.tNode.flags&1024?`valueChange`:`checkedChange`,n=this.tView.data[this.tNode.customControlIndex];wp(this.tNode,this.lView,n,t,vp(this.tNode,this.lView,e))}listenToDom(e,t){bp(this.tNode,this.tView,this.lView,void 0,this.lView[11],e,t,vp(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(Mp(r,o,e)))&&(Bd(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=jp(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}Pp(e,t)}function Pp(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 Fp(e,t){return Ip(e,t)&&Lp(e,t+`Change`)}function Ip(e,t){return t in e.inputs}function Lp(e,t){return t in e.outputs}var Rp=Symbol(`BINDING`),zp=new Ti(``);function Bp(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 em(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&zd.SignalBased)!==0};return i&&(a.transform=i),a})}function cm(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function lm(e,t,n){let r=t instanceof za?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new dp(n,r):n}function um(e){let t=e.get(ap,null);if(t===null)throw new fi(407,!1);return{rendererFactory:t,sanitizer:e.get(cp,null),changeDetectionScheduler:e.get($s,null),ngReflect:!1,tracingService:e.get(ad,null,{optional:!0})}}function dm(e,t,n){let r=pm(e);return _u(t,r,r===`svg`?`svg`:r===`math`?lo:n)}function fm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new fi(905,!1)}function pm(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??=sm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=cm(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){kc(gc.DynamicComponentStart);let s=tn(null);try{let s=this.componentDef,c=lm(s,r||this.ngModule,e),l=um(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(lp(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{tn(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=hm(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?tne(l,r,s.encapsulation,t):dm(s,l,o??null);fm(u);let d=t.get(zp,null),f=gm(u,()=>t.get(vs,null)??Kl());d&&d.addHost(f);let p=a?.some(vm)||i?.some(e=>typeof e!=`function`&&e.bindings.some(vm)),m=Pd(null,c,null,512|Fd(s),null,null,e,l,t,null,$l(u,t,!0));d&&am&&f instanceof ShadowRoot&&Do(m,()=>{d.removeHost(f)}),m[27]=u,ns(m);let ee=null;try{let e=nm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);wu(l,u,e),Bl(u,m),Hd(c,m,e),nu(c,e,m),rm(c,e),n!==void 0&&bm(e,this.ngContentSelectors,n),ee=_o(e.index,m),m[8]=ee[8],lf(c,m,null)}catch(e){throw ee!==null&&Rl(ee),Rl(m),e}finally{kc(gc.DynamicComponentEnd),ss()}return new ym(this.componentType,m,!!p)}};function hm(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[Rp].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 vm(e){let t=e[Rp].kind;return t===`input`||t===`twoWay`}var ym=class extends ip{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=mo(t[1],27),this.location=Dl(this._tNode,t),this.instance=_o(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Wf(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;af(n,r[1],r,e,t),this.previousInputValues.set(e,t),If(_o(n.index,r),1)}get injector(){return new yl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function bm(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=Sm}return e})();function Sm(){return Em(Vo(),zo())}var Cm=class e extends xm{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Dl(this._hostTNode,this._hostLView)}get injector(){return new yl(this._hostTNode,this._hostLView)}get parentInjector(){let e=sl(this._hostTNode,this._hostLView);if(qc(e)){let t=Xc(e,this._hostLView),n=Jc(e),r=t[1].data[n+8];return new yl(r,t)}return new yl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=wm(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=np(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,ff(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(Ni(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(za,null);e&&(i=e)}let d=Ni(l.componentType??{}),f=np(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,ff(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(yo(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 zf(o,i,a,r),t.attachToViewContainerRef(),la(Tm(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=wm(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Vf(this._lContainer,t);n&&(ua(Tm(this._lContainer),t),Sd(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Vf(this._lContainer,t);return n&&ua(Tm(this._lContainer),t)!=null?new Wf(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function wm(e){return e[8]}function Tm(e){return e[8]||=[]}function Em(e,t){let n,r=t[e.index];return to(r)?n=r:(n=Lf(r,t,null,e),t[e.index]=n,Ld(t,n)),Om(n,t,e,r),new Cm(n,e,t)}function Dm(e,t){let n=e[11],r=n.createComment(``),i=po(t,e);return vu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var Om=jm,km=()=>!1;function Am(e,t,n){return km(e,t,n)}function jm(e,t,n,r){if(e[7])return;let i;i=n.type&8?uo(r):Dm(t,n),e[7]=i}var Mm=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Nm=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 qm(e,t,n){e.queries===null&&(e.queries=new Fm),e.queries.track(new Im(t,n))}function Jm(e,t){return e.queries.getByIndex(t)}function Ym(e,t){let n=e[1],r=Jm(n,t);return r.crossesNgTemplate?Hm(n,e,t,[]):Vm(n,e,r,t)}function Xm(e,t,n){let r,i=Cn(()=>{r._dirtyCounter();let n=eh(r,e);if(t&&n===void 0)throw new fi(-951,!1);return n});return r=i[en],r._dirtyCounter=w(0),r._flatValue=void 0,i}function Zm(e){return Xm(!0,!1,e)}function Qm(e){return Xm(!0,!0,e)}function $m(e,t){let n=e[en];n._lView=zo(),n._queryIndex=t,n._queryList=Um(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function eh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:va;let i=Um(n,r),a=Ym(n,r);return i.reset(a,kl),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function th(e){return!!e&&typeof e.then==`function`}function nh(e){return!!e&&typeof e.subscribe==`function`}var rh=class{},ih=class extends rh{injector;instance=null;constructor(e){super();let t=new Ba([...e.providers,{provide:rh,useValue:this}],e.parent||Ra(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function ah(e,t,n=null){return new ih({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var oh=(()=>{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=wa(!1,e.type),n=t.length>0?ah([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=bi({token:e,providedIn:`environment`,factory:()=>new e(ea(za))})}return e})();function D(e){return hc(()=>{let t=fh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Nl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(oh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||ru.Emulated,styles:e.styles||va,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&sd(`NgStandalone`),ph(n);let r=e.dependencies;return n.directiveDefs=mh(r,sh),n.pipeDefs=mh(r,Fi),n.id=hh(n),n})}function sh(e){return Ni(e)||Pi(e)}function ch(e,t){if(e==null)return _a;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=zd.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function lh(e){if(e==null)return _a;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function uh(e){return hc(()=>{let t=fh(e);return ph(t),t})}function dh(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 fh(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||_a,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||va,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:ch(e.inputs,t),outputs:lh(e.outputs),debugInfo:null}}function ph(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 hh(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 gh=new Ti(``),_h=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=b(gh,{optional:!0})??[];injector=b(_s);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Za(this.injector,t);if(th(n))e.push(n);else if(nh(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=Tl({token:e,factory:e.ɵfac})}return e})();function vh(e){return t=>{t.controlDef={create:(e,t)=>{e?.ɵngControlCreate(t)},update:(e,t)=>{e?.ɵngControlUpdate?.(t)},passThroughInput:e}}}function yh(e){return Object.getPrototypeOf(e.prototype).constructor}function bh(e){let t=yh(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let i,a=Object.hasOwn(t,Di)?t[Di]:void 0,o=Object.hasOwn(t,Oi)?t[Oi]:void 0;if(ao(e))i=a??o;else{if(a)throw new fi(903,!1);i=o}if(i){if(n){r.push(i);let t=e;t.inputs=Ch(e.inputs),t.declaredInputs=Ch(e.declaredInputs),t.outputs=Ch(e.outputs);let n=i.hostBindings;n&&Eh(e,n);let a=i.viewQuery,o=i.contentQueries;if(a&&wh(e,a),o&&Th(e,o),xh(e,i),Uee(e.outputs,i.outputs),ao(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=Gc(i.hostAttrs,n=Gc(n,i.hostAttrs))}}function Ch(e){return e===_a?{}:e===va?[]:e}function wh(e,t){let n=e.viewQuery;e.viewQuery=n?(e,r)=>{t(e,r),n(e,r)}:t}function Th(e,t){let n=e.contentQueries;e.contentQueries=n?(e,r,i)=>{t(e,r,i),n(e,r,i)}:t}function Eh(e,t){let n=e.hostBindings;e.hostBindings=n?(e,r)=>{t(e,r),n(e,r)}:t}function Dh(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=Gc(e.mergedAttrs,e.attrs);let t=e.tView=Nd(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),Uo(e,!1);let c=jh(n,t,e,r);ms()&&Ed(n,t,c,e),Bl(c,t);let l=Lf(c,t,c,e);t[r+27]=l,Ld(t,l),Am(l,e,t)}function Oh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=Jf(t,d,4,o||null,s||null),Fo()&&Hp(t,e,f,bo(t.consts,l),Zd),jc(t,f)):f=t.data[d],Dh(f,e,t,n,r,i,a,c),io(f)&&Hd(t,e,f),l!=null&&Ud(e,f,u),f}function kh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Jf(t,d,4,o||null,s||null),l!=null){let e=bo(t.consts,l);f.localNames=[];for(let t=0;t{throw new fi(600,``)})}var Ih=10,Lh=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=b(Us);afterRenderManager=b(cd);zonelessEnabled=b(ec);rootEffectScheduler=b(nc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Rr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=b(Ss);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(ui(e=>!e))}constructor(){b(ad,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=b(za);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=_s.NULL){return this._injector.get(As).run(()=>{if(kc(gc.BootstrapComponentStart),!this._injector.get(_h).done)throw new fi(405,``);let r=Ni(e),i=this._injector.get(rh),a=new mm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=Rh(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Nh,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),zh(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),kc(gc.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){kc(gc.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(id.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw kc(gc.ChangeDetectionEnd),new fi(101,!1);let e=tn(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,tn(e),this.afterTick.next(),kc(gc.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(ap,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++wo(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;zh(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(Ph,[]).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),()=>zh(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new fi(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=Tl({token:e,factory:e.ɵfac})}return e})();function Rh(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function zh(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function O(e,t,n,r){let i=zo();return mp(i,Zo(),t)&&(Bo(),Qd(us(),i,e,t,n,r)),O}function Bh(e){if(sd(`NgAnimateEnter`),!Ju)return Bh;let t=zo();if(wte(t))return Bh;let n=Vo(),r=t[9].get(As);return kte(td(t),n,()=>Vh(t,n,e,r)),Fte(t[9]),hd(t[9],td(t)),Bh}function Vh(e,t,n,r){let i=po(t,e),a=e[11],o=Ote(n),s=[],c=!1,l=e=>{if(nd(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{nd(e)===i&&(rd(e,i)&&(c=!0),Hh(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,Zu,Ju),!Zu.has(i))){for(let e of o)a.removeClass(i,e);Yu(i)}})})}}function Hh(e,t,n){let r=Xu.get(t);if(nd(e)===t&&r&&rd(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);Yu(t)}}var Uh=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 Wh(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Gh(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){tn(r);let c=t.length-1;for(tn(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=Wh(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=Wh(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),ee=n(s,d),h=n(o,l);if(Object.is(h,ee)){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 Yh,a??=Jh(e,o,s,n),Kh(e,i,o,h))e.updateValue(o,l),o++,s++;else if(a.has(h))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)qh(e,i,n,o,t[o]),o++}else if(t!=null){tn(r);let c=t[Symbol.iterator]();tn(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=Wh(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new Yh,a??=Jh(e,o,s,n);let u=n(o,r);if(Kh(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;)qh(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 Kh(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function qh(e,t,n,r,i){if(Kh(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function Jh(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 Yh=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 k(e,t,n,r,i,a,o,s){sd(`NgControlFlow`);let c=zo(),l=Bo();return kh(c,l,e,t,n,r,i,bo(l.consts,a),256,o,s),Xh}function Xh(e,t,n,r,i,a,o,s){sd(`NgControlFlow`);let c=zo(),l=Bo();return kh(c,l,e,t,n,r,i,bo(l.consts,a),512,o,s),Xh}function A(e,t){sd(`NgControlFlow`);let n=zo(),r=Zo(),i=n[r]===zu?-1:n[r],a=i===-1?void 0:ng(n,27+i);if(mp(n,r,e)){let r=tn(null);try{if(a!==void 0&&Bf(a,0),e!==-1){let r=27+e,i=ng(n,r),a=sg(n[1],r),o=rp(i,a,n);zf(i,df(n,a,t,{dehydratedView:o}),0,ff(a,o))}}finally{tn(r)}}else if(a!==void 0){let e=Rf(a,0);e!==void 0&&(e[8]=t)}}var Zh=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 Qh(e){return e}function $h(e,t){return t}var eg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function j(e,t,n,r,i,a,o,s,c,l,u,d,f){sd(`NgControlFlow`);let p=zo(),m=Bo(),ee=c!==void 0,h=zo(),g=new eg(ee,s?o.bind(h[15][8]):o);h[27+e]=g,kh(p,m,e+1,t,n,r,i,bo(m.consts,a),256),ee&&kh(p,m,e+2,c,l,u,d,bo(m.consts,f),512)}var tg=class extends Uh{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,zf(this.lContainer,t,e,ff(this.templateTNode,n)),rg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,ig(this.lContainer,e),ag(this.lContainer,e)}create(e,t){let n=np(this.lContainer,this.templateTNode.tView.ssrId);return df(this.hostLView,this.templateTNode,new Zh(this.lContainer,t,e),{dehydratedView:n})}destroy(e){Sd(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),qu.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function ig(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 ag(e,t){return Vf(e,t)}function og(e,t){return Rf(e,t)}function sg(e,t){return mo(e,t)}function N(e,t,n){let r=zo();return mp(r,Zo(),t)&&(Bo(),Gd(us(),r,e,t,r[11],n)),N}function cg(e,t,n,r,i){af(t,e,n,i?`class`:`style`,r)}function P(e,t,n,r){let i=zo(),a=i[1],o=e+27,s=a.firstCreatePass?nm(o,i,2,t,Zd,Fo(),n,r):a.data[o];if(ro(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(lp(o),()=>(lg(e,t,i,s,r),P))}}return lg(e,t,i,s,r),P}function lg(e,t,n,r,i){if(tf(r,n,e,t,dg),io(r)){let e=n[1];Hd(e,n,r),nu(e,r,n)}i!=null&&Ud(n,r)}function F(){let e=Bo(),t=nf(Vo());return e.firstCreatePass&&rm(e,t),Lo(t)&&Ro(),Po(),t.classesWithoutHost!=null&&Bc(t)&&cg(e,t,zo(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Vc(t)&&cg(e,t,zo(),t.stylesWithoutHost,!1),F}function I(e,t,n,r){return P(e,t,n,r),F(),I}function L(e,t,n,r){let i=zo(),a=i[1],o=e+27,s=a.firstCreatePass?im(o,a,2,t,n,r):a.data[o];return tf(s,i,e,t,dg),r!=null&&Ud(i,s),L}function R(){return Lo(nf(Vo()))&&Ro(),Po(),R}function ug(e,t,n,r){return L(e,t,n,r),R(),ug}var dg=(e,t,n,r,i)=>(hs(!0),_u(t[11],r,fs()));function fg(e,t,n){let r=zo(),i=r[1],a=e+27,o=i.firstCreatePass?nm(a,r,8,`ng-container`,Zd,Fo(),t,n):i.data[a];if(tf(o,r,e,`ng-container`,hg),io(o)){let e=r[1];Hd(e,r,o),nu(e,o,r)}return n!=null&&Ud(r,o),fg}function pg(){let e=Bo(),t=nf(Vo());return e.firstCreatePass&&rm(e,t),pg}function mg(e,t,n){return fg(e,t,n),pg(),mg}var hg=(e,t,n,r,i)=>(hs(!0),gu(t[11],``));function z(){return zo()}function B(e,t,n){let r=zo();return mp(r,Zo(),t)&&(Bo(),Kd(us(),r,e,t,r[11],n)),B}var gg=void 0;function _g(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var vg=[`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`]],gg,[[`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`]],gg,[[`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}`,gg,gg,gg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,_g],yg=Object.create(null);function bg(e){let t=Cg(e),n=xg(t);if(n)return n;let r=t.split(`-`)[0];if(n=xg(r),n)return n;if(r===`en`)return vg;throw new fi(701,!1)}function xg(e){if(!(e in yg)){let t=Yi.ng&&Yi.ng.common&&Yi.ng.common.locales&&Yi.ng.common.locales[e];return t!==void 0&&(yg[e]=t),t}return yg[e]}var Sg={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 Cg(e){return e.toLowerCase().replace(/_/g,`-`)}var wg=`en-US`;function Tg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function V(e,t,n){let r=zo(),i=Bo(),a=Vo();return Eg(i,r,r[11],a,e,t,n),V}function H(e,t,n){let r=zo(),i=Bo(),a=Vo();return(a.type&3||n)&&bp(a,i,r,n,r[11],e,t,vp(a,r,t)),H}function Eg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=vp(r,t,a),bp(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 Ig(e){return(e&2)==2}function Lg(e,t){return e&131071|t<<17}function Rg(e){return e|2}function zg(e){return(e&131068)>>2}function Bg(e,t){return e&-131069|t<<2}function Vg(e){return(e&1)==1}function Hg(e){return e|1}function Ug(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=Fg(o),c=zg(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||ha(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=Fg(e[s+1]);e[r+1]=Pg(t,s),t!==0&&(e[t+1]=Bg(e[t+1],r)),e[s+1]=Lg(e[s+1],r)}else e[r+1]=Pg(s,0),s!==0&&(e[s+1]=Bg(e[s+1],r)),s=r}else e[r+1]=Pg(c,0),s===0?s=r:e[c+1]=Bg(e[c+1],r),c=r;l&&(e[r+1]=Rg(e[r+1])),Gg(e,u,r,!0),Gg(e,u,r,!1),Wg(t,u,e,r,a),o=Pg(s,c),a?t.classBindings=o:t.styleBindings=o}function Wg(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&ha(a,t)>=0&&(n[r+1]=Hg(n[r+1]))}function Gg(e,t,n,r){let i=e[n+1],a=t===null,o=r?Fg(i):zg(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];Kg(n,t)&&(s=!0,e[o+1]=r?Hg(i):Rg(i)),o=r?Fg(i):zg(i)}s&&(e[n+1]=r?Rg(i):Hg(i))}function Kg(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?ha(e,t)>=0:!1}var qg={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Jg(e){return e.substring(qg.key,qg.keyEnd)}function Yg(e){return Zg(e),Xg(e,Qg(e,0,qg.textEnd))}function Xg(e,t){let n=qg.textEnd;return n===t?-1:(t=qg.keyEnd=$g(e,qg.key=t,n),Qg(e,t,n))}function Zg(e){qg.key=0,qg.keyEnd=0,qg.value=0,qg.valueEnd=0,qg.textEnd=e.length}function Qg(e,t,n){for(;t32;)t++;return t}function e_(e,t,n){return r_(e,t,n,!1),e_}function W(e,t){return r_(e,t,null,!0),W}function t_(e){i_(m_,n_,e,!0)}function n_(e,t){for(let n=Yg(t);n>=0;n=Xg(t,n))pa(e,Jg(t),!0)}function r_(e,t,n,r){let i=zo(),a=Bo(),o=Qo(2);if(a.firstUpdatePass&&o_(a,e,o,r),t!==zu&&mp(i,o,t)){let s=a.data[cs()];g_(a,s,i,i[11],e,i[o+1]=y_(t,n),r,o)}}function i_(e,t,n,r){let i=Bo(),a=Qo(2);i.firstUpdatePass&&o_(i,null,a,r);let o=zo();if(n!==zu&&mp(o,a,n)){let s=i.data[cs()];if(b_(s,r)&&!a_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=gi(e,n||``)),cg(i,s,o,n,r)}else h_(i,s,o,o[11],o[a+1],o[a+1]=p_(e,t,n),r,a)}}function a_(e,t){return t>=e.expandoStartIndex}function o_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[cs()],o=a_(e,n);b_(a,r)&&t===null&&!o&&(t=!1),t=s_(i,a,t,r),Ug(i,a,t,n,o,r)}}function s_(e,t,n,r){let i=tte(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=d_(null,e,t,n,r),n=f_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=d_(i,e,t,n,r),a===null){let n=c_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=d_(null,e,t,n[1],r),n=f_(n,t.attrs,r),l_(e,t,r,n))}else a=u_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function c_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(zg(r)!==0)return e[Fg(r)]}function l_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Fg(i)]=r}function u_(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===zu&&(u=l?va:void 0);let d=l?ma(u,r):c===r?u:void 0;if(a&&!v_(d)&&(d=ma(t,r)),v_(d)&&(s=d,o))return s;let f=e[i+1];i=o?Fg(f):zg(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=ma(e,r))}return s}function v_(e){return e!==void 0}function y_(e,t){return e==null||e===``||(typeof t==`string`?e=au(e)+t:typeof e==`object`&&(e=hi(au(e)))),e}function b_(e,t){return!!(e.flags&(t?8:16))}function G(e,t=``){let n=zo(),r=Bo(),i=e+27,a=r.firstCreatePass?Jf(r,i,1,t,null):r.data[i],o=x_(r,n,a,t);n[i]=o,ms()&&Ed(r,n,o,a),Uo(a,!1)}var x_=(e,t,n,r)=>(hs(!0),mu(t[11],r));function S_(e,t,n,r=``){return mp(e,Zo(),n)?t+Li(n)+r:zu}function C_(e,t,n,r,i,a=``){let o=hp(e,Xo(),n,i);return Qo(2),o?t+Li(n)+r+Li(i)+a:zu}function w_(e,t,n,r,i,a,o,s=``){let c=gp(e,Xo(),n,i,o);return Qo(3),c?t+Li(n)+r+Li(i)+a+Li(o)+s:zu}function T_(e,t,n,r,i,a,o,s,c,l=``){let u=_p(e,Xo(),n,i,o,c);return Qo(4),u?t+Li(n)+r+Li(i)+a+Li(o)+s+Li(c)+l:zu}function K(e){return q(``,e),K}function q(e,t,n){let r=zo(),i=S_(r,e,t,n);return i!==zu&&O_(r,cs(),i),q}function J(e,t,n,r,i){let a=zo(),o=C_(a,e,t,n,r,i);return o!==zu&&O_(a,cs(),o),J}function E_(e,t,n,r,i,a,o){let s=zo(),c=w_(s,e,t,n,r,i,a,o);return c!==zu&&O_(s,cs(),c),E_}function D_(e,t,n,r,i,a,o,s,c){let l=zo(),u=T_(l,e,t,n,r,i,a,o,s,c);return u!==zu&&O_(l,cs(),u),D_}function O_(e,t,n){let r=fo(t,e);hu(e[11],r,n)}function k_(e,t,n){fc(t)&&(t=t());let r=zo();return mp(r,Zo(),t)&&(Bo(),Gd(us(),r,e,t,r[11],n)),k_}function A_(e,t){let n=fc(e);return n&&e.set(t),n}function j_(e,t){let n=zo(),r=Bo(),i=Vo();return Eg(r,n,n[11],i,e,t),j_}var M_={};function N_(e){sd(`NgLet`);let t=Bo(),n=zo(),r=e+27;return Uo(Jf(t,r,128,null,null),!1),go(t,n,r,M_),N_}function P_(e){return go(Bo(),zo(),cs(),e),e}function Y(e){let t=ho(Ko(),27+e);if(t===M_)throw new fi(314,!1);return t}function F_(e,t,n=``){return S_(zo(),e,t,n)}function I_(e,t,n){let r=Bo();r.firstCreatePass&&L_(t,r.data,r.blueprint,ao(e),n)}function L_(e,t,n,r,i){if(e=vi(e),Array.isArray(e))for(let a=0;a>20;if(Ma(e)||!e.multi){let r=new zc(l,i,Vp,null),p=B_(c,t,i?u:u+f,d);p===-1?(cl(il(s,o),a,c),R_(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=B_(c,t,u+f,d),m=B_(c,t,u,u+f),ee=p>=0&&n[p],h=m>=0&&n[m];if(i&&!h||!i&&!ee){cl(il(s,o),a,c);let u=W_(i?H_:V_,n.length,i,r,l,e);!i&&h&&(n[m].providerFactory=u),R_(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=z_(n[i?m:p],l,!i&&r);R_(a,e,p>-1?p:m,t)}!i&&r&&h&&n[m].componentProviders++}}}function R_(e,t,n,r){let i=Ma(t),a=Na(t);if(i||a){let o=(a?vi(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 z_(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function B_(e,t,n,r){for(let i=n;i{n.providersResolver=(t,n)=>I_(t,n?n(e):e,!1),t&&(n.viewProvidersResolver=(e,n)=>I_(e,n?n(t):t,!0))}}function K_(e,t){let n=Yo()+e,r=zo();return r[n]===zu?fp(r,n,t()):pp(r,n)}function q_(e,t,n){return X_(zo(),Yo(),e,t,n)}function J_(e,t,n,r){return Z_(zo(),Yo(),e,t,n,r)}function nne(e,t,n,r,i,a,o){return rne(zo(),Yo(),e,t,n,r,i,a)}function Y_(e,t){let n=e[t];return n===zu?void 0:n}function X_(e,t,n,r,i,a){let o=t+n;return mp(e,o,i)?fp(e,o+1,a?r.call(a,i):r(i)):Y_(e,o+1)}function Z_(e,t,n,r,i,a,o){let s=t+n;return hp(e,s,i,a)?fp(e,s+2,o?r.call(o,i,a):r(i,a)):Y_(e,s+2)}function rne(e,t,n,r,i,a,o,s,c){let l=t+n;return _p(e,l,i,a,o,s)?fp(e,l+4,c?r.call(c,i,a,o,s):r(i,a,o,s)):Y_(e,l+4)}function Q_(e,t){let n=Bo(),r,i=e+27;n.firstCreatePass?(r=ine(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=aa(r.type,!0)),o=qi(Vp);try{let e=Qc(!1),t=a();return Qc(e),go(n,zo(),i,t),t}finally{qi(o)}}function ine(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function $_(e,t,n){let r=e+27,i=zo(),a=ho(i,r);return tv(i,r)?X_(i,Yo(),t,a.transform,n,a):a.transform(n)}function ev(e,t,n,r){let i=e+27,a=zo(),o=ho(a,i);return tv(a,i)?Z_(a,Yo(),t,o.transform,n,r,o):o.transform(n,r)}function tv(e,t){return e[1].data[t].pure}function nv(e,t){return qf(e,t)}var ane=(()=>{class e{applicationErrorHandler=b(Us);appRef=b(Lh);taskService=b(Ss);ngZone=b(As);zonelessEnabled=b(ec);tracing=b(ad,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new nr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Os):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(b(tc,{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?Es:Ts;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=Tl({token:e,factory:e.ɵfac})}return e})();function one(){return[{provide:$s,useExisting:ane},{provide:As,useClass:Rs},{provide:ec,useValue:!0}]}function sne(){return typeof $localize<`u`&&$localize.locale||`en-US`}var rv=new Ti(``,{factory:()=>b(rv,{optional:!0,skipSelf:!0})||sne()}),iv=class{destroyed=!1;listeners=null;errorHandler=b(Hs,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=b(ys);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new fi(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(pi(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=tn(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&&cne(this.listeners)),tn(t),this.isEmitting=!1}}};function cne(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function X(e,t){return Cn(e,t?.equal)}function Z(e){return Vn(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var lne=e=>e;function Q(e,t){return typeof e==`function`?av(Ln(e,lne,t?.equal),t?.debugName,t?.set):av(Ln(e.source,e.computation,e.equal),e.debugName,e.set)}function av(e,t,n){let r=e[en],i=e;if(n!==void 0){let t=e=>Rn(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Z(e)),t)}else i.set=e=>Rn(r,e),i.update=e=>zn(r,e);return i.asReadonly=Gs.bind(e),i}var ov=!1;function une(){return ov}function sv(e){ov=e}function cv(e,t){let n=Object.create(mc);n.value=e,n.transformFn=t?.transform;function r(){if(an(n),n.value===pc)throw new fi(-950,null);return n.value}return r[en]=n,r}function lv(e){return new iv}function uv(e,t){return cv(e,t)}function dne(e){return cv(pc,e)}var $=(uv.required=dne,uv);function dv(e,t){let n=Object.create(mc),r=new iv;n.value=e;function i(){return an(n),fv(n.value),n.value}return i[en]=n,i.asReadonly=Gs.bind(i),i.set=e=>{n.equal(n.value,e)||(kn(n,e),r.emit(e))},i.update=e=>{fv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function fv(e){if(e===pc)throw new fi(952,!1)}function pv(e,t){return dv(e,t)}function fne(e){return dv(pc,e)}var mv=(pv.required=fne,pv);function hv(e,t){return Zm(t)}function pne(e,t){return Qm(t)}var gv=(hv.required=pne,hv),mne=(()=>{class e{static __NG_ELEMENT_ID__=hne}return e})();function hne(e){return gne(Vo(),zo(),(e&16)==16)}function gne(e,t,n){if(ro(e)&&!n){let n=_o(e.index,t);return new Wf(n,n)}if(e.type&175){let e=t[15];return new Wf(e,t)}return null}var _v=new Ti(``),_ne=new Ti(``);function vv(e){return!e.moduleRef}function vne(e){let t=vv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(As);return n.run(()=>{vv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Us),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),vv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(_v);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(_v);n.add(t),e.moduleRef.onDestroy(()=>{zh(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return bne(r,n,()=>{let n=t.get(Ss),r=n.add(),i=t.get(_h);return i.runInitializers(),i.donePromise.then(()=>{if(Tg(t.get(rv,wg)||`en-US`),!t.get(_ne,!0))return vv(e)?t.get(Lh):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(vv(e)){let n=t.get(Lh);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return yne?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var yne;function bne(e,t,n){try{let r=n();return th(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var yv=null;function xne(e=[],t){return _s.create({name:t,providers:[{provide:Pa,useValue:`platform`},{provide:_v,useValue:new Set([()=>yv=null])},...e]})}function Sne(e=[]){if(yv)return yv;let t=xne(e);return yv=t,Fh(),Cne(t),t}function Cne(e){let t=e.get(Js,null);Za(e,()=>{t?.forEach(e=>e())})}function wne(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;kc(gc.BootstrapApplicationStart);try{let e=i?.injector??Sne(r);return vne({r3Injector:new ih({providers:[one(),Ws,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{kc(gc.BootstrapApplicationEnd)}}function bv(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var xv=Symbol(`NOT_SET`),Sv=new Set,Tne={...jn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:xv,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(an(r),r.value),r.signal[en]=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??Sv)t()}finally{_n(e)}}};function Cv(e,t){let n=t?.injector??b(_s),r=n.get($s),i=n.get(cd),a=n.get(ad,null,{optional:!0});i.impl??=n.get(ud);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(Zs,null,{optional:!0}),c=new Ene(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var wv=null;function Tv(){return wv}function Dne(e){wv??=e}var One=class{},Ev=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(Ev||{}),Dv=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(Dv||{}),Ov=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(Ov||{}),kv={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 kne(e){return bg(e)[Sg.LocaleId]}function Ane(e,t,n){let r=bg(e);return Fv(Fv([r[Sg.DayPeriodsFormat],r[Sg.DayPeriodsStandalone]],t),n)}function jne(e,t,n){let r=bg(e);return Fv(Fv([r[Sg.DaysFormat],r[Sg.DaysStandalone]],t),n)}function Mne(e,t,n){let r=bg(e);return Fv(Fv([r[Sg.MonthsFormat],r[Sg.MonthsStandalone]],t),n)}function Nne(e,t){let n=bg(e)[Sg.Eras];return Fv(n,t)}function Av(e,t){return Fv(bg(e)[Sg.DateFormat],t)}function jv(e,t){return Fv(bg(e)[Sg.TimeFormat],t)}function Mv(e,t){let n=bg(e)[Sg.DateTimeFormat];return Fv(n,t)}function Nv(e,t){let n=bg(e),r=n[Sg.NumberSymbols][t];if(r===void 0){if(t===kv.CurrencyDecimal)return n[Sg.NumberSymbols][kv.Decimal];if(t===kv.CurrencyGroup)return n[Sg.NumberSymbols][kv.Group]}return r}function Pv(e){if(!e[Sg.ExtraData])throw new fi(2303,!1)}function Pne(e){let t=bg(e);return Pv(t),(t[Sg.ExtraData][2]||[]).map(e=>typeof e==`string`?Iv(e):[Iv(e[0]),Iv(e[1])])}function Fne(e,t,n){let r=bg(e);return Pv(r),Fv(Fv([r[Sg.ExtraData][0],r[Sg.ExtraData][1]],t)||[],n)||[]}function Fv(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new fi(2304,!1)}function Iv(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Ine=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Lv=Object.create(null),Lne=/((?:[^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]*)/,Rne=256;function zne(e,t,n,r){let i=Yne(e);Bne(t),t=zv(n,t)||t;let a=[],o;for(;t;)if(o=Lne.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=Xv(r,s),i=Jne(i,r));let c=``;return a.forEach(e=>{let t=Kne(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function Bne(e){if(e.length>Rne)throw new fi(2300,!1)}function Rv(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=kne(e);if(Lv[n]??=Object.create(null),Lv[n][t])return Lv[n][t];let r=``;switch(t){case`shortDate`:r=Av(e,Ov.Short);break;case`mediumDate`:r=Av(e,Ov.Medium);break;case`longDate`:r=Av(e,Ov.Long);break;case`fullDate`:r=Av(e,Ov.Full);break;case`shortTime`:r=jv(e,Ov.Short);break;case`mediumTime`:r=jv(e,Ov.Medium);break;case`longTime`:r=jv(e,Ov.Long);break;case`fullTime`:r=jv(e,Ov.Full);break;case`short`:let t=zv(e,`shortTime`),n=zv(e,`shortDate`);r=Bv(Mv(e,Ov.Short),[t,n]);break;case`medium`:let i=zv(e,`mediumTime`),a=zv(e,`mediumDate`);r=Bv(Mv(e,Ov.Medium),[i,a]);break;case`long`:let o=zv(e,`longTime`),s=zv(e,`longDate`);r=Bv(Mv(e,Ov.Long),[o,s]);break;case`full`:let c=zv(e,`fullTime`),l=zv(e,`fullDate`);r=Bv(Mv(e,Ov.Full),[c,l])}return r&&(Lv[n][t]=r),r}function Bv(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function Vv(e,t,n=`-`,r,i){let a=``;(e<0||i&&e<=0)&&(i?e=-e+1:(e=-e,a=n));let o=String(e);for(;o.length0||s>-n)&&(s+=n),e===3)s===0&&n===-12&&(s=12);else if(e===6)return Vne(s,t);let c=Nv(o,kv.MinusSign);return Vv(s,t,c,r,i)}}function Hne(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 fi(2301,!1)}}function Uv(e,t,n=Ev.Format,r=!1){return function(i,a){return Une(i,a,e,t,n,r)}}function Une(e,t,n,r,i,a){switch(n){case 2:return Mne(t,i,r)[e.getMonth()];case 1:return jne(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Pne(t),a=Fne(t,i,r),s=e.findIndex(e=>{if(Array.isArray(e)){let[t,r]=e,i=n>=t.hours&&o>=t.minutes,a=n0?Math.floor(i/60):Math.ceil(i/60);switch(e){case 0:return(i>=0?`+`:``)+Vv(o,2,a)+Vv(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Vv(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Vv(o,2,a)+`:`+Vv(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Vv(o,2,a)+`:`+Vv(Math.abs(i%60),2,a);default:throw new fi(2310,!1)}}}var Wne=0,Gv=4;function Gne(e){let t=Rv(e,Wne,1).getDay();return Rv(e,0,1+(t<=Gv?Gv:11)-t)}function Kv(e){let t=e.getDay(),n=t===0?-3:Gv-t;return Rv(e.getFullYear(),e.getMonth(),e.getDate()+n)}function qv(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=Kv(n),t=Gne(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Vv(i,e,Nv(r,kv.MinusSign))}}function Jv(e,t=!1){return function(n,r){return Vv(Kv(n).getFullYear(),e,Nv(r,kv.MinusSign),t)}}var Yv=Object.create(null);function Kne(e){if(Yv[e])return Yv[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Uv(3,Dv.Abbreviated);break;case`GGGG`:t=Uv(3,Dv.Wide);break;case`GGGGG`:t=Uv(3,Dv.Narrow);break;case`y`:t=Hv(0,1,0,!1,!0);break;case`yy`:t=Hv(0,2,0,!0,!0);break;case`yyy`:t=Hv(0,3,0,!1,!0);break;case`yyyy`:t=Hv(0,4,0,!1,!0);break;case`Y`:t=Jv(1);break;case`YY`:t=Jv(2,!0);break;case`YYY`:t=Jv(3);break;case`YYYY`:t=Jv(4);break;case`M`:case`L`:t=Hv(1,1,1);break;case`MM`:case`LL`:t=Hv(1,2,1);break;case`MMM`:t=Uv(2,Dv.Abbreviated);break;case`MMMM`:t=Uv(2,Dv.Wide);break;case`MMMMM`:t=Uv(2,Dv.Narrow);break;case`LLL`:t=Uv(2,Dv.Abbreviated,Ev.Standalone);break;case`LLLL`:t=Uv(2,Dv.Wide,Ev.Standalone);break;case`LLLLL`:t=Uv(2,Dv.Narrow,Ev.Standalone);break;case`w`:t=qv(1);break;case`ww`:t=qv(2);break;case`W`:t=qv(1,!0);break;case`d`:t=Hv(2,1);break;case`dd`:t=Hv(2,2);break;case`c`:case`cc`:t=Hv(7,1);break;case`ccc`:t=Uv(1,Dv.Abbreviated,Ev.Standalone);break;case`cccc`:t=Uv(1,Dv.Wide,Ev.Standalone);break;case`ccccc`:t=Uv(1,Dv.Narrow,Ev.Standalone);break;case`cccccc`:t=Uv(1,Dv.Short,Ev.Standalone);break;case`E`:case`EE`:case`EEE`:t=Uv(1,Dv.Abbreviated);break;case`EEEE`:t=Uv(1,Dv.Wide);break;case`EEEEE`:t=Uv(1,Dv.Narrow);break;case`EEEEEE`:t=Uv(1,Dv.Short);break;case`a`:case`aa`:case`aaa`:t=Uv(0,Dv.Abbreviated);break;case`aaaa`:t=Uv(0,Dv.Wide);break;case`aaaaa`:t=Uv(0,Dv.Narrow);break;case`b`:case`bb`:case`bbb`:t=Uv(0,Dv.Abbreviated,Ev.Standalone,!0);break;case`bbbb`:t=Uv(0,Dv.Wide,Ev.Standalone,!0);break;case`bbbbb`:t=Uv(0,Dv.Narrow,Ev.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Uv(0,Dv.Abbreviated,Ev.Format,!0);break;case`BBBB`:t=Uv(0,Dv.Wide,Ev.Format,!0);break;case`BBBBB`:t=Uv(0,Dv.Narrow,Ev.Format,!0);break;case`h`:t=Hv(3,1,-12);break;case`hh`:t=Hv(3,2,-12);break;case`H`:t=Hv(3,1);break;case`HH`:t=Hv(3,2);break;case`m`:t=Hv(4,1);break;case`mm`:t=Hv(4,2);break;case`s`:t=Hv(5,1);break;case`ss`:t=Hv(5,2);break;case`S`:t=Hv(6,1);break;case`SS`:t=Hv(6,2);break;case`SSS`:t=Hv(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Wv(0);break;case`ZZZZZ`:t=Wv(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Wv(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Wv(2);break;default:return null}return Yv[e]=t,t}function Xv(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function qne(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function Jne(e,t,n){let r=e.getTimezoneOffset();return qne(e,-1*(Xv(t,r)-r))}function Yne(e){if(Zv(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 Rv(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Ine))return Xne(n)}let t=new Date(e);if(!Zv(t))throw new fi(2311,!1);return t}function Xne(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 Zv(e){return e instanceof Date&&!isNaN(e.valueOf())}var Qv=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=b(_s);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)(Vp(xm))};static ɵdir=uh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[bc]})}return e})();function Zne(e,t){return new fi(2100,!1)}var Qne=`mediumDate`,$ne=new Ti(``),ere=new Ti(``),$v=(()=>{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??Qne,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return zne(t,e,i||this.locale,a)}catch(t){throw Zne(e,t.message)}}static ɵfac=function(t){return new(t||e)(Vp(rv,16),Vp($ne,24),Vp(ere,24))};static ɵpipe=dh({name:`date`,type:e,pure:!0})}return e})(),ey=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=dh({name:`json`,type:e,pure:!1})}return e})();function tre(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 nre=`browser`,ty=class{_doc;constructor(e){this._doc=e}manager},ny=(()=>{class e extends ty{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)(ea(vs))};static ɵprov=bi({token:e,factory:e.ɵfac})}return e})(),ry=new Ti(``),iy=(()=>{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 ny));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof ny);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 fi(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(ea(ry),ea(As))};static ɵprov=bi({token:e,factory:e.ɵfac})}return e})(),ay=`ng-app-id`;function oy(e){for(let t of e)t.remove()}function sy(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function rre(e,t,n,r){let i=e.head?.querySelectorAll(`style[${ay}="${t}"],link[${ay}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(ay),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 cy(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var ly=(()=>{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,rre(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,sy);t?.forEach(e=>this.addUsage(e,this.external,cy))}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&&(oy(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])oy(e);this.hosts.clear()}addHost(e){if(!this.hosts.has(e)){this.hosts.add(e);for(let[t,{elements:n}]of this.inline)n.push(this.addElement(e,sy(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,cy(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)(ea(vs),ea(Ks),ea(Xs,8),ea(Ys))};static ɵprov=bi({token:e,factory:e.ɵfac})}return e})(),uy={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`,math:`http://www.w3.org/1998/Math/MathML`},dy=/%COMP%/g,fy=`%COMP%`,ire=`_nghost-${fy}`,are=`_ngcontent-${fy}`,ore=!0,sre=new Ti(``,{factory:()=>ore}),cre=new Ti(``);function lre(e){return are.replace(dy,e)}function ure(e){return ire.replace(dy,e)}function py(e,t){return t.map(t=>t.replace(dy,e))}var my=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;cssVarNamespace;constructor(e,t,n,r,i,a,o=null,s=null,c=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.removeStylesOnCompDestroy=r,this.doc=i,this.ngZone=a,this.nonce=o,this.tracingService=s,this.cssVarNamespace=c??``,this.defaultRenderer=new hy(e,i,a,this.tracingService,this.cssVarNamespace)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let n=this.getOrCreateRenderer(e,t);return n instanceof yy?n.applyToHost(e):n instanceof vy&&n.applyStyles(),n}getOrCreateRenderer(e,t){let n=this.rendererByCompId,r=n.get(t.id);if(!r){let i=this.doc,a=this.ngZone,o=this.eventManager,s=this.sharedStylesHost,c=this.removeStylesOnCompDestroy,l=this.tracingService;switch(t.encapsulation){case ru.Emulated:r=new yy(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case ru.ShadowDom:return new _y(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case ru.ExperimentalIsolatedShadowDom:return new _y(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new vy(o,s,t,c,i,a,l,this.cssVarNamespace)}n.set(t.id,r)}return r}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static ɵfac=function(t){return new(t||e)(ea(iy),ea(zp),ea(Ks),ea(sre),ea(vs),ea(As),ea(Xs),ea(ad,8),ea(cre,8))};static ɵprov=bi({token:e,factory:e.ɵfac})}return e})(),hy=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i=``){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(uy[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 fi(-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 fi(-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=uy[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=uy[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&(Bu.DashCase|Bu.Important)?e.style.setProperty(t,n,r&Bu.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&Bu.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=Tv().getGlobalEventTarget(this.doc,e),!e))throw new fi(-5102,!1);let i=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t===`__ngUnwrap__`)return e;e(t)===!1&&t.preventDefault()}}};function gy(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var _y=class extends hy{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,n,r,i,a,o,s,c){super(e,r,i,o,s),this.hostEl=t,this.sharedStylesHost=c,this.shadowRoot=t.attachShadow({mode:`open`}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=n.styles;l=py(n.id,l).map(e=>e.replace(/%NS%/g,s));for(let e of l){let t=document.createElement(`style`);a&&t.setAttribute(`nonce`,a),t.textContent=e,this.shadowRoot.appendChild(t)}let u=n.getExternalStyles?.();if(u)for(let e of u){let t=cy(e,r);a&&t.setAttribute(`nonce`,a),this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},vy=class extends hy{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,a,o,s,c){super(e,i,a,o,s),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let l=n.styles,u=c?py(c,l):l;this.styles=u.map(e=>e.replace(/%NS%/g,s)),this.styleUrls=n.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&qu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},yy=class extends vy{contentAttr;hostAttr;constructor(e,t,n,r,i,a,o,s,c){let l=r+`-`+n.id;super(e,t,n,i,a,o,s,c,l),this.contentAttr=lre(l),this.hostAttr=ure(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}},dre=class e extends One{supportsDOMEvents=!0;static makeCurrent(){Dne(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=fre();return t==null?null:pre(t)}resetBaseElement(){by=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return tre(document.cookie,e)}},by=null;function fre(){return by||=document.head.querySelector(`base`),by?by.getAttribute(`href`):null}function pre(e){return new URL(e,document.baseURI).pathname}var xy=[`alt`,`control`,`meta`,`shift`],mre={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},hre={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},gre=(()=>{class e extends ty{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(()=>Tv().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=mre[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=hre[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)(ea(vs))};static ɵprov=bi({token:e,factory:e.ɵfac})}return e})();async function _re(e,t,n){return wne({rootComponent:e,...vre(t,n)})}function vre(e,t){return{platformRef:t?.platformRef,appProviders:[...Cre,...e?.providers??[]],platformProviders:Sre}}function yre(){dre.makeCurrent()}function bre(){return new Hs}function xre(){return Gl(document),document}var Sre=[{provide:Ys,useValue:nre},{provide:Js,useValue:yre,multi:!0},{provide:vs,useFactory:xre}],Cre=[{provide:Pa,useValue:`root`},{provide:Hs,useFactory:bre},{provide:ry,useClass:ny,multi:!0},{provide:ry,useClass:gre,multi:!0},my,{provide:zp,useClass:ly},{provide:ly,useExisting:zp},iy,{provide:ap,useExisting:my},[]];function Sy(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 Ere({code:i,why:Cy(a.why,e),fix:Cy(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:Cy(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function kre(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 Pre=Math.random.bind(Math),Fre=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Ire(e=21){let t=``,n=e;for(;n--;)t+=Fre[Pre()*64|0];return t}var Lre=6e4,Ty=e=>e,Rre=Ty,{clearTimeout:Ey,setTimeout:zre}=globalThis;function Bre(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Ty,deserialize:s=Rre,resolver:c,bind:l=`rpc`,timeout:u=Lre,proxify:d=!0}=t,f=!1,p=new Map,m,ee;async function h(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:h}=Nre(),g=Ire();s.i=g;let te;async function ne(n=s){return u>=0&&(te=zre(()=>{try{if(t.onTimeoutError?.call(ee,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){h(e)}p.delete(g)},u),typeof te==`object`&&(te=te.unref?.())),p.set(g,{resolve:d,reject:h,timeoutId:te,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(ee,s,ne,d):await ne()}catch(e){if(t.onGeneralError?.call(ee,e)!==!0)throw e;return}finally{Ey(te),p.delete(g)}return l}let g={$call:(e,...t)=>h(e,t,!1),$callOptional:(e,...t)=>h(e,t,!1,!0),$callEvent:(e,...t)=>h(e,t,!0),$callRaw:e=>h(e.method,e.args,e.event,e.optional),$rejectPendingCalls:ne,get $closed(){return f},get $meta(){return t.meta},$close:te,$functions:e};ee=d?new Proxy({},{get(t,n){if(Object.hasOwn(g,n))return g[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>h(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>h(n,e,!1);return i.asEvent=r,i}}):g;function te(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(re)}function ne(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 re(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(ee,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(ee,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`?ee:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(ee,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(ee,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(ee,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Ey(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(re),ee}function Vre(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Dy=Object.freeze({type:`object`,additionalProperties:!0});function Hre(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Dy}return Dy}function Ure(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 Gre(e,t){return Wre(e,t)??[e]}function Kre(e){return typeof e==`string`?`'${e}'`:new Jre().serialize(e)}var qre=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Oy=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[qre.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function ky(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})(),Yre=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Xre=[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],Zre=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Ay=[],Qre=class{_data=new jy;_hash=new jy([...Yre]);_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)Ay[n]=e[t+n]|0;else{let e=Ay[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Ay[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Ay[n]=t+Ay[n-7]+i+Ay[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),ee=u+m+d+Xre[n]+Ay[n],h=p+f;u=l,l=c,c=s,s=o+ee|0,o=a,a=i,i=r,r=ee+h|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=jy.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 $re(e){return new Qre().finalize(e).toBase64()}function eie(e){return $re(Kre(e))}function My(e){return eie(e)}function Ny(){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 Py=/^[\w+.-]{2,}:\/\//;function tie(e){return e.endsWith(`/`)?e:`${e}/`}function nie(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function rie(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?tie(n)+e.replace(/^\.?\//,``):e);return n}function Fy(e,t){if(!t||t===`/`||Py.test(e))return e;let n=nie(t);return e.startsWith(n)?e:rie(n,e)}function iie(e,t){let n=e.match(Py);return t+(n?e.slice(n[0].length):e)}var aie=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Iy(e=21){let t=``,n=e;for(;n--;)t+=aie[Math.random()*64|0];return t}var Ly=Symbol.for(`immer-nothing`),Ry=Symbol.for(`immer-draftable`),zy=Symbol.for(`immer-state`),By=[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 Vy(e,...t){{let n=By[e],r=db(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var Hy=Object,Uy=Hy.getPrototypeOf,Wy=`constructor`,Gy=`prototype`,Ky=`configurable`,qy=`enumerable`,Jy=`writable`,Yy=`value`,Xy=e=>!!e&&!!e[zy];function Zy(e){return e?eb(e)||sb(e)||!!e[Ry]||!!e[Wy]?.[Ry]||cb(e)||lb(e):!1}var Qy=Hy[Gy][Wy].toString(),$y=new WeakMap;function eb(e){if(!e||!ub(e))return!1;let t=Uy(e);if(t===null||t===Hy[Gy])return!0;let n=Hy.hasOwnProperty.call(t,Wy)&&t[Wy];if(n===Object)return!0;if(!db(n))return!1;let r=$y.get(n);return r===void 0&&(r=Function.toString.call(n),$y.set(n,r)),r===Qy}function tb(e,t,n=!0){nb(e)===0?(n?Reflect.ownKeys(e):Hy.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function nb(e){let t=e[zy];return t?t.type_:sb(e)?1:cb(e)?2:lb(e)?3:0}var rb=(e,t,n=nb(e))=>n===2?e.has(t):Hy[Gy].hasOwnProperty.call(e,t),ib=(e,t,n=nb(e))=>n===2?e.get(t):e[t],ab=(e,t,n,r=nb(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function ob(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var sb=Array.isArray,cb=e=>e instanceof Map,lb=e=>e instanceof Set,ub=e=>typeof e==`object`,db=e=>typeof e==`function`,fb=e=>typeof e==`boolean`;function pb(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var mb=e=>ub(e)?e?.[zy]:null,hb=e=>e.copy_||e.base_,gb=e=>e.modified_?e.copy_:e.base_;function _b(e,t){if(cb(e))return new Map(e);if(lb(e))return new Set(e);if(sb(e))return Array[Gy].slice.call(e);let n=eb(e);if(t===!0||t===`class_only`&&!n){let t=Hy.getOwnPropertyDescriptors(e);delete t[zy];let n=Reflect.ownKeys(t);for(let r=0;r1&&Hy.defineProperties(e,{set:bb,add:bb,clear:bb,delete:bb}),Hy.freeze(e),t&&tb(e,(e,t)=>{vb(t,!0)},!1),e)}function yb(){Vy(2)}var bb={[Yy]:yb};function xb(e){return e===null||!ub(e)||Hy.isFrozen(e)}var Sb=`MapSet`,Cb=`Patches`,wb=`ArrayMethods`,Tb={};function Eb(e){let t=Tb[e];return t||Vy(0,e),t}var Db=e=>!!Tb[e];function Ob(e,t){Tb[e]||(Tb[e]=t)}var kb,Ab=()=>kb,jb=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Db(Sb)?Eb(Sb):void 0,arrayMethodsPlugin_:Db(wb)?Eb(wb):void 0});function Mb(e,t){t&&(e.patchPlugin_=Eb(Cb),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Nb(e){Pb(e),e.drafts_.forEach(Ib),e.drafts_=null}function Pb(e){e===kb&&(kb=e.parent_)}var Fb=e=>kb=jb(kb,e);function Ib(e){let t=e[zy];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Lb(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[zy].modified_&&(Nb(t),Vy(4)),Zy(e)&&(e=Rb(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[zy].base_,e,t)}else e=Rb(t,n);return zb(t,e,!0),Nb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Ly?void 0:e}function Rb(e,t){if(xb(t))return t;let n=t[zy];if(!n)return qb(t,e.handledSet_,e);if(!Vb(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);Gb(n,e)}return n.copy_}function zb(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vb(t,n)}function Bb(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Vb=(e,t)=>e.scope_===t,Hb=[];function Ub(e,t,n,r){let i=hb(e),a=e.type_;if(r!==void 0&&ib(i,r,a)===t){ab(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;tb(i,(e,n)=>{if(Xy(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Hb;for(let e of o)ab(i,e,n,a)}function Wb(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Vb(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=gb(i);Ub(e,i.draft_??i,a,n),Gb(i,r)})}function Gb(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)}Bb(e)}}function Kb(e,t,n){let{scope_:r}=e;if(Xy(n)){let i=n[zy];Vb(i,r)&&i.callbacks_.push(function(){nx(e),Ub(e,n,gb(i),t)})}else Zy(n)&&e.callbacks_.push(function(){let i=hb(e);e.type_===3?i.has(n)&&qb(n,r.handledSet_,r):ib(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&qb(ib(e.copy_,t,e.type_),r.handledSet_,r)})}function qb(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Xy(e)||t.has(e)||!Zy(e)||xb(e)?e:(t.add(e),tb(e,(r,i)=>{if(Xy(i)){let t=i[zy];Vb(t,n)&&(ab(e,r,gb(t),e.type_),Bb(t))}else Zy(i)&&qb(i,t,n)}),e)}function Jb(e,t){let n=sb(e),r={type_:+!!n,scope_:t?t.scope_:Ab(),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=Yb;n&&(i=[r],a=Xb);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Yb={get(e,t){if(t===zy)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=hb(e);if(!rb(i,t,e.type_))return $b(e,i,t);let a=i[t];if(e.finalized_||!Zy(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&pb(t))return a;if(a===Zb(e.base_,t)||Qb(e,t,a)){nx(e);let n=e.type_===1?+t:t,r=ix(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in hb(e)},ownKeys(e){return Reflect.ownKeys(hb(e))},set(e,t,n){let r=ex(hb(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Zb(hb(e),t),i=r?.[zy];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(ob(n,r)&&(n!==void 0||rb(e.base_,t,e.type_)))return!0;nx(e),tx(e)}return e.copy_[t]===n&&(n!==void 0||rb(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Kb(e,t,n),!0)},deleteProperty(e,t){return nx(e),Zb(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),tx(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=hb(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Jy]:!0,[Ky]:e.type_!==1||t!==`length`,[qy]:r[qy],[Yy]:n[t]}},defineProperty(){Vy(11)},getPrototypeOf(e){return Uy(e.base_)},setPrototypeOf(){Vy(12)}},Xb={};for(let e in Yb){let t=Yb[e];Xb[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Xb.deleteProperty=function(e,t){return isNaN(parseInt(t))&&Vy(13),Xb.set.call(this,e,t,void 0)},Xb.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&Vy(14),Yb.set.call(this,e[0],t,n,e[0])};function Zb(e,t){let n=e[zy];return(n?hb(n):e)[t]}function Qb(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Zy(n)||n[zy]?!1:e.baseRefs_.has(n)}function $b(e,t,n){let r=ex(t,n);return r?Yy in r?r[Yy]:r.get?.call(e.draft_):void 0}function ex(e,t){if(!(t in e))return;let n=Uy(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Uy(n)}}function tx(e){e.modified_||(e.modified_=!0,e.parent_&&tx(e.parent_))}function nx(e){e.copy_||=(e.assigned_=new Map,_b(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var rx=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(db(e)&&!db(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}db(t)||Vy(6),n!==void 0&&!db(n)&&Vy(7);let r;if(Zy(e)){let i=Fb(this),a=ix(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Nb(i):Pb(i)}return Mb(i,n),Lb(r,i)}if(!e||!ub(e)){if(r=t(e),r===void 0&&(r=e),r===Ly&&(r=void 0),this.autoFreeze_&&vb(r,!0),n){let t=[],i=[];Eb(Cb).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Vy(1,e)},this.produceWithPatches=(e,t)=>{if(db(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]},fb(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),fb(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),fb(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Zy(e)||Vy(8),Xy(e)&&(e=ax(e));let t=Fb(this),n=ix(t,e,void 0);return n[zy].isManual_=!0,Pb(t),n}finishDraft(e,t){let n=e&&e[zy];(!n||!n.isManual_)&&Vy(9);let{scope_:r}=n;return Mb(r,t),Lb(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=Eb(Cb).applyPatches_;return Xy(e)?r(e,t):this.produce(e,e=>r(e,t))}};function ix(e,t,n,r){let[i,a]=cb(t)?Eb(Sb).proxyMap_(t,n):lb(t)?Eb(Sb).proxySet_(t,n):Jb(t,n);return(n?.scope_??Ab()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?Wb(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 ax(e){return Xy(e)||Vy(10,e),ox(e)}function ox(e){if(!Zy(e)||xb(e))return e;let t=e[zy],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=_b(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=_b(e,!0);let i=n;return lb(n)&&(n=new Set),tb(i,(e,t)=>{ab(n,e,ox(t))},r),t&&(t.finalized_=!1),n}function sx(){By.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=mb(ib(e,n.key_)),i=ib(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||rb(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=ib(o,e,c),f=ib(s,e,c),p=l?rb(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===Ly?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(lb(e))return new Set(Array.from(e).map(u));let t=Object.create(Uy(e));for(let n in e)t[n]=u(e[n]);return rb(e,Ry)&&(t[Ry]=e[Ry]),t}function d(e){return Xy(e)?u(e):e}Ob(Cb,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var cx=new rx,lx=cx.produce,ux=cx.produceWithPatches.bind(cx),dx=cx.applyPatches.bind(cx),fx=1e3;function px(e,t){if(e.add(t),e.size>fx){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function mx(e){let{enablePatches:t=!1}=e;t&&sx();let n=Ny(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=Iy())=>{i.has(t)||(sx(),r=dx(r,e),px(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=Iy())=>{if(!i.has(a)){if(px(i,a),t){let[t,i]=ux(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=lx(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var hx=typeof self==`object`?self:globalThis,gx=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),_x=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function vx(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=gx.has(e)?hx[e]:void 0;return n(new(r??hx.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`&&_x.has(a))return n(new hx[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function yx(e){return vx(new Map,e)(0)}var bx=``,{toString:xx}={},{keys:Sx}=Object;function Cx(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=xx.call(e).slice(8,-1);switch(n){case`Array`:return[1,bx];case`Object`:return[2,bx];case`Date`:return[3,bx];case`RegExp`:return[4,bx];case`Map`:return[5,bx];case`Set`:return[6,bx];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function wx([e,t]){return e===0&&(t===`function`||t===`symbol`)}function Tx(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]=Cx(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 Sx(r))(e||!wx(Cx(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||!(wx(Cx(n))||wx(Cx(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!wx(Cx(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function Ex(e,t={}){let n=[];return Tx(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:Dx,stringify:Ox}=JSON,kx={json:!0,lossy:!0};function Ax(e){return yx(Dx(e))}function jx(e){return Ox(Ex(e,kx))}function Mx(e){return yx(e)}function Nx(e){return jx(e)}function Px(e){return Ax(e)}var Fx=256,Ix=class extends Error{name=`StreamClosedError`};function Lx(e={}){let t=e.id??Iy(),n=Math.max(0,e.replayWindow??0),r=Ny(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new Ix(`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=zx(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 Rx(e={}){let t=e.id??Iy(),n=Math.max(1,e.highWaterMark??Fx),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 ee(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function h(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){ee()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return h()},cancel:ee,_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 ee(),Promise.resolve({value:void 0,done:!0})}}}}}function zx(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 Bx=128;function Vx(e){return e.replace(/[^\w-]+/g,`_`).slice(0,Bx)}var Hx=`modulepreload`,Ux=function(e,t){return new URL(e,t).href},Wx={},Gx=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=Ux(t,n),t=s(t),t in Wx)return;Wx[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`:Hx,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)})},Kx=`__connection.json`,qx=`__DEVFRAME_CONNECTION__`,Jx=`x-birpc-session`,Yx=`__rpc-dump/index.json`,Xx=`devframe:services`,Zx=`devframe_otp`,Qx=`devframe_auth_token`;wy.postMessage.remoteAssetsError;var $x=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>My(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()}},eS=Mre({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 tS(e){if(e.agent&&e.jsonSerializable===!1)throw eS.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function nS(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function rS(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 iS(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 sS(e,t){let n=e.handler;if(!n){let r=await oS(e,t);if(!r.handler)throw eS.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 iS(e.name,r,t),o=await a(...n);return await aS(e.name,i,o)}}var cS=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 sS(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 eS.DF0021({name:e.name});tS(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 eS.DF0022({name:e.name});tS(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 sS(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw eS.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 lS(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 dS(t,`undefined`,r,e);return n}return i!==null&&uS(i,r,e,t),n})}function uS(e,t,n,r){if(typeof e==`bigint`)throw dS(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw dS(r,`Map`,t,n);if(e instanceof Set)throw dS(r,`Set`,t,n);if(e instanceof Date)throw dS(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw dS(r,e.constructor?.name??`class instance`,t,n)}function dS(e,t,n,r){let i=fS(n,r);return eS.DF0020({name:e||``,type:t,path:i})}function fS(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var pS=`__DEVFRAME_CONNECTION_META__`,mS=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function hS(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 gS(){return hS(qx)}function _S(){return hS(pS)}function vS(e){if(e)return e;try{let e=localStorage.getItem(mS);if(e)return e}catch{}return hS(mS)}function yS(e){globalThis[qx]=e,globalThis[pS]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&bS(e.authToken)}function bS(e){try{localStorage.setItem(mS,e)}catch{}globalThis[mS]=e;let t=gS();t&&(globalThis[qx]={...t,authToken:e})}function xS(e){let t=Fy(Kx,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function SS(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function CS(){let e=gS();if(e)return SS(e,vS()??e.authToken??e.connectionMeta.authToken);let t=_S();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??xS(`./`),authToken:vS(t.authToken)}}async function wS(e={}){if(e.connection){let t=SS(e.connection,vS(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return yS(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:xS(t[0]??`./`),authToken:vS(e.authToken??e.connectionMeta.authToken)};return yS(n),n}let n=CS();if(n){let t=SS(n,vS(e.authToken??n.authToken??n.connectionMeta.authToken));return yS(t),t}let r=[];for(let n of t){let t=Fy(Kx,n),i=xS(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:vS(e.authToken??r.authToken)};return yS(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var TS=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function ES(e=Zx){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function DS(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 OS(e=Zx){let t=ES(e);return t&&DS(e),t}async function kS(e,t={}){let n=OS(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function AS(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(Xx,{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 jS(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:wy.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:wy.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=mx({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(wy.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var MS=new Map;function NS(e=MS){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?lS(n,r??``):`s:${Nx(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?Px(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function PS(){}function FS(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 IS(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 LS(e){let{onConnected:t=PS,onError:n=PS,onDisconnected:r=PS,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${Qx}=${encodeURIComponent(e.authToken)}`);let s=NS(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function ee(e){l||(l=!0,p(e),n(e),r())}function h(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function g(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function te(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=FS(r);if(!e)break;r=e.rest;let{event:t,data:n}=IS(e.frame);n.length>0&&g(t,n.join(` +`))}}h()}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 te(e.body)}catch(e){if(c.signal.aborted){h();return}ee(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`,[Jx]: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 RS(e,t){let{channel:n,rpcOptions:r={}}=t;return Bre(e,{...n,timeout:-1,...r,proxify:!1})}function zS(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(wy.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function ee(){return l===`disconnected`||l===`error`?new TS(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new TS(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function h(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(wy.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 TS(`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(wy.client.error,n,t),r(n)})})}let g=new Map;for(let e of r.jsonSerializableMethods??[])g.set(e,{jsonSerializable:!0});let te=e.createChannel({definitions:g,onError(e){f(`error`,e),i.emit(wy.client.connectionError,e),m(new TS(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new TS(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),ne=RS(a.functions,{channel:te,rpcOptions:o});a.register({name:wy.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new TS(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(wy.client.connectionError,e),m(e),i.emit(wy.client.isTrustedUpdated,!1)}});let re=n;async function ie(e){re=e;let t=await ne.$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 TS(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(wy.client.connectionError,e)}return i.emit(wy.client.isTrustedUpdated,c),t.isTrusted}async function ae(e){let t=(await ne.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(re=t,c=!0,d.resolve(!0),f(`connected`),i.emit(wy.client.isTrustedUpdated,!0)),t}async function oe(e={}){await ne.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function se(){return c?!0:ie(re??``)}async function ce(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:se,requestTrustWithToken:ie,requestTrustWithCode:ae,requestAuthCode:oe,ensureTrusted:ce,call:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(wy.client.error,n,t),Promise.reject(n)):h(ne.$call(...e),t)},callEvent:(...e)=>{let t=ee();if(t){i.emit(wy.client.error,t,String(e[0]));return}return ne.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(wy.client.error,n,t),Promise.reject(n)):h(ne.$callOptional(...e),t)},close:()=>{te.close()}}}function BS(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 VS(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=BS(n.sse,r??`./`,location);return zS({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>LS({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 HS(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:US(r)?HS(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function US(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function WS(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function GS(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function KS(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function qS(e){if(e.error)throw HS(e.error);return e.output}function JS(e){return e.some(e=>e!=null)}function YS(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function XS(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?Mx(e):e}function a(e,t){return i(YS(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 KS(r)?qS(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(WS(r)){if(JS(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(GS(r)){let e=My(n),i=r.records[e];if(i)return qS(await s(i,r.serialization));if(r.fallback)return qS(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!JS(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 ZS(e){let t=XS(await e.fetchJsonFromBases(Yx),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 QS=``;function $S(e,t){return`${e}${QS}${t}`}function eC(e){let t=new Map,n=new Map;e.client.register({name:wy.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get($S(e,n))?._push(r,i)}}),e.client.register({name:wy.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=$S(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:wy.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=$S(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(wy.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(QS);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=$S(n,r),o=t.get(a);if(o)return o;let s=Rx({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(wy.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=$S(t,r),a=n.get(i);if(a)return a;let o=Lx({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 tC(){}var nC=new Map;function rC(e){let t=e.url;e.authToken&&(t=`${t}?${Qx}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=tC,onError:i=tC,onDisconnected:a=tC,definitions:o=nC}=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=NS(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 iC(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 iie(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function aC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=iC(n.websocket,r??`./`,location);return zS({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>rC({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 oC(e){return e.includes(`:`)}function sC(e,t){return oC(t)?t:`${e}:${t}`}function cC(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 lC(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 cC(a)}function uC(e,t){return{global:lC(e,t,`global`),project:lC(e,t,`project`)}}function dC(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(oC(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(sC(t,n),...r)),callEvent:((n,...r)=>e.callEvent(sC(t,n),...r)),callOptional:((n,...r)=>e.callOptional(sC(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(sC(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(sC(t,n),r,i),upload:(n,r)=>e.streaming.upload(sC(t,n),r)}},settings:uC(e,t),scope:e.scope}}function fC(){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 pC(e,t={}){let n=t.modelContext??fC();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=Vx(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=Vre(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Ure(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>mC(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 mC(e,t,n){try{let r=Gre(n,e.args?.length);return{content:[{type:`text`,text:hC(await(await sS(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:gC(e)}]}}}function hC(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function gC(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 _C(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 vC(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Ny(),a=Array.isArray(t)?t:[t],o=await wS(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new $x({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new cS(f),m=e.webmcp===!1?void 0:pC(p),ee,h=!1,g=0,te;function ne(){g++,te=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:wy.broadcast.cacheInvalidate,type:`event`,handler:ne}),i.on(wy.client.connectionStatus,ne),i.on(wy.client.isTrustedUpdated,ne));async function re(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(Fy(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 ie=e.callTimeout??0,ae=ie>0?ie:1/0,oe,se={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+ae;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&oe.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new TS(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${ie}ms`)}for(;!te&&(t(),!(h||oe.status!==`connected`));){let e=g;te=oe.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===g&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===g&&(te=void 0),t}),await te}await te,t()}let o=g;if(r&&e.i&&!h&&oe.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&&!h&&d.apply(e,n)}else await t(e)}}},ce=_C(e.transport??`auto`,s);oe=ce===`static`?await ZS({fetchJsonFromBases:re}):ce===`sse`?VS({...se,sseOptions:e.sseOptions}):aC({...se,wsOptions:e.wsOptions});let le;try{le=new BroadcastChannel(`devframe-auth`)}catch{}let ue,de=!1;function fe(e){return((...t)=>de||!ue?e(...t):ue.then(()=>e(...t)))}function pe(){h=!0,ne();try{ee?.(),m?.()}finally{try{le?.close()}finally{oe.close?.()}}}let me={events:i,get isTrusted(){return oe.isTrusted},get status(){return oe.status},get connectionError(){return oe.connectionError},get transport(){return oe.transport??ce},get connection(){return o},connectionMeta:s,ensureTrusted:oe.ensureTrusted,requestTrust:oe.requestTrust,requestTrustWithToken:async e=>(bS(e),o={...o,authToken:e},oe.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await oe.requestTrustWithCode(e);if(!t)return!1;bS(t),o={...o,authToken:t};try{le?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>oe.requestAuthCode(e),call:fe(oe.call),callEvent:fe(oe.callEvent),callOptional:fe(oe.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:pe};me.sharedState=jS(me),me.streaming=eC(me),me.services=AS(me);let he=new Map;me.scope=(e=>{if(!e)return me;let t=he.get(e);return t||(t=dC(me,e),he.set(e,t)),t}),f.rpc=me;function ge(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function _e(){if(e.simpleAuth!==!1&&ge()&&typeof globalThis.prompt==`function`)for(await me.requestAuthCode().catch(()=>{});!me.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 me.requestTrustWithCode(t))return}}async function ve(){let t=await oe.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await kS(me,{param:n}):!1;t||r||me.isTrusted||await _e()}return ue=ve().then(()=>{de=!0},()=>{de=!0}),s.mcp&&Gx(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-CPWctB97.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{h||(ee=e(me))}).catch(()=>{}),le&&(le.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&me.requestTrustWithToken(e.data.authToken)}),me}var yC=vC,bC=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`webmcp`,`plugins`,`performance`,`build`],xC=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function SC(e){return`pangular:${e}`}var CC=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],wC={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},cdSlowMs:{default:16,min:1,max:1e3},capacitorCalls:{default:200,min:10,max:2e3},webmcpCalls:{default:100,min:10,max:1e3},idleAfterMs:{default:6e4,min:0,max:6e5}},TC={"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`,filter:`the transferCache filter passed to withPangular() left it out`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},EC=[[0,`Network error (offline)`],[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 DC(e){return EC.some(([t])=>t===e)}var OC=/^[a-z][a-z0-9-]{0,39}$/;function kC(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&OC.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 AC=`pangular`,jC={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},MC=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function NC(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=jC[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[...MC.filter(e=>n.has(e)),r].join(`+`)}function PC(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 FC(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 IC=[{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:`performance`,label:`Performance`,inspector:`performance`},{id:`build`,label:`Build`,inspector:`build`},{id:`webmcp`,label:`WebMCP`,inspector:`webmcp`},{id:`capacitor`,label:`Capacitor`,inspector:`capacitor`},{id:`plugins`,label:`Plugins`,inspector:`plugins`}],LC=1e4;function RC(e){return IC.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var zC={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,signals:`a component's signal graph, by the component's id`,forms:`a form, by its id`,webmcp:`a WebMCP tool call, by its id`},BC=200;function VC(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 HC(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=BC?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 UC=[{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 WC(e){let t=RC(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=UC.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function GC(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}var KC=Object.freeze({minLength:24,threshold:4.5}),qC={min:16,max:512},JC={min:2,max:6};function YC(e){return typeof e==`number`&&Number.isInteger(e)&&e>=qC.min&&e<=qC.max}function XC(e){return typeof e==`number`&&Number.isFinite(e)&&e>=JC.min&&e<=JC.max}function ZC(e){if(e===!0)return{...KC};if(!e||typeof e!=`object`||Array.isArray(e))return;let{minLength:t,threshold:n}=e;return{minLength:YC(t)?t:KC.minLength,threshold:XC(n)?n:KC.threshold}}function QC(e){let t=ZC(e);return t?{entropy:t}:{}}function $C(e,t){return typeof e==`boolean`?e:t}var ew=100,tw=100;function nw(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=tw);return[...new Set(t)].slice(0,ew)}function rw(e,t){let{default:n,min:r,max:i}=wC[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function iw(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function aw(e){let t=GC(e),n=GC(t.agent),r=GC(t.inspectors),i=GC(n.tools),a=GC(t.actions),o=$C(t.actions,!0),s=GC(t.redaction),c=GC(t.limits),l=iw(bC,e=>$C(r[e],!0));return{inspectors:l,agent:{readOnly:$C(n.readOnly,!1),tools:iw(bC,e=>l[e]&&$C(i[e],!0)),browserTools:$C(n.browserTools,!1)},actions:iw(CC,e=>l[e]&&$C(a[e],o)),redaction:{secretNames:nw(s.secretNames),unmask:nw(s.unmask),...QC(s.entropy)},limits:Object.fromEntries(Object.keys(wC).map(e=>[e,rw(c[e],e)])),popup:{hotkey:fw(GC(t.popup).hotkey)},plugins:dw(t.plugins),lint:{rules:lw(t.lint)},analog:sw(t.analog),ngrx:{trace:$C(GC(t.ngrx).trace,!1)}}}var ow=500;function sw(e){let t=GC(e).contentSchema;return typeof t==`string`&&t.trim()&&t.length<=ow?{contentSchema:t.trim()}:{}}var cw=200;function lw(e){let t=GC(GC(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,cw))typeof r==`boolean`&&(n[e]=r);return n}var uw=100;function dw(e){let t={};for(let[n,r]of Object.entries(GC(e)).slice(0,uw)){if(!OC.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=GC(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:$C(e.enabled,!0),tools:$C(e.tools,!0),actions:$C(e.actions,!0)})}return t}function fw(e){return e===!1?!1:NC(e)??`Alt+Shift+P`}function pw(e){let t=e?.configs;return aw(t?.[AC])}function mw(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, refetching the TransferState payload, and clearing HTTP calls`,analog:`Calling API routes, clearing server calls, running Nitro tasks and purging the Nitro cache`,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 hw=[`pangular:build-meta`],gw={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`,webmcp:`WebMCP`,plugins:`Plugins`,performance:`Performance`,build:`Build`},_w={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`},vw={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`,cdSlowMs:e=>`slow cycles over ${e} ms`,capacitorCalls:e=>`${e} Capacitor plugin calls`,webmcpCalls:e=>`${e} WebMCP tool calls`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function yw(e){if(!e)return[];let t=[`On`];return e.minLength!==KC.minLength&&t.push(`${e.minLength} characters or more`),e.threshold!==KC.threshold&&t.push(`up to ${e.threshold} bits per character`),t}function bw(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=bC.filter(t=>e.inspectors[t]);n(`Inspectors off`,bC.filter(t=>!e.inspectors[t]).map(e=>gw[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>gw[e])),n(`Blocked actions`,CC.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>_w[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Entropy masking`,yw(e.redaction.entropy)),n(`Limits`,Object.keys(wC).filter(t=>e.limits[t]!==wC[t].default).map(t=>vw[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 xw(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 Sw(e){return!e.tags.length&&!e.directives.length&&!e.text}function Cw(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 ww={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 Tw(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function Ew(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function Dw(e,t){let n=Ew(e),r=Ew(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function Ow(e,t){return e?.capabilities?.[t]===!1}function kw(e,t){let n=ww[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=Tw(t);return Dw(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}.`}function Aw(e){return e.hydration===`hydrated`&&e.hydratedAt===void 0?`hydrated before inspection`:e.hydration}var jw=/^on (viewport|interaction|hover)\b/;function Mw(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>jw.test(e))}function Nw(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(Mw(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 Pw=`pangular-page-id`,Fw=null;function Iw(e){Fw=e}function Lw(){if(Fw)return Fw;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(Pw)||null)}catch{return null}}function Rw(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 zw(e,t){return e?t?e.pages?.[t]??null:e:null}function Bw(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function Vw(){return{functions:[...hw]}}function Hw(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function Uw(e,t,n){return Hw(e,t,n).then(e=>e,()=>null)}function Ww(e){return e?.connectionMeta.backend===`static`}function Gw(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 Kw(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function qw(e){return e.split(`@`)[1]??``}var Jw={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},Yw={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},Xw=Uw,Zw={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 Qw(e){return Zw[e]??e}var $w=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function eT(e,t){return await Xw(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function tT(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 nT=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function rT(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(nT,(e,t)=>t??(e===`**`?``:e))}function iT(e,t){let n=Math.max(0,e-t),r=Math.ceil(n/6e4);if(r<60)return`in ${r} min`;let i=Math.round(r/60);return i<48?`in ${i} ${i===1?`hour`:`hours`}`:`in ${Math.round(i/24)} days`}function aT(e,t){return e.length?e.join(`, `):t}function oT(e,t){let n=[];if(n.push({label:`One-time code`,value:e.auth?e.oneTimeCode.state===`locked`?`Locked after too many wrong codes: run pangular token --rotate or restart the server for a new code`:e.oneTimeCode.expiresAt?`On, current code expires ${iT(e.oneTimeCode.expiresAt,t)}`:`On`:`Off: every client is trusted`}),e.auth){let{count:r,nextExpiresAt:i,lastExpiresAt:a}=e.tokens;n.push({label:`Trusted clients`,value:r?r===1||i===a?`${r} ${r===1?`token`:`tokens`}, expires ${iT(i??t,t)}`:`${r} tokens, the first expires ${iT(i??t,t)}, the last ${iT(a??t,t)}`:`None`}),e.pairingTokens&&n.push({label:`Pairing tokens`,value:`${e.pairingTokens} accepted instead of the code`})}return e.reported?(n.push({label:`Reach`,value:e.network?`This machine and other machines`:`This machine only`}),n.push({label:`Allowed origins`,value:e.originCheck?`${aT(e.allowedOrigins,`This machine and the Chrome extension`)}${e.customOrigins?`, plus a custom origin check`:``}`:`Any: the origin check is off`}),(e.allowedHosts===`any`||e.allowedHosts.length)&&n.push({label:`Allowed hosts`,value:e.allowedHosts===`any`?`Any`:e.allowedHosts.join(`, `)}),n):n}function sT(e){return pw(e?.connectionMeta)}function cT(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function lT(e,t){if(!t||typeof t!=`object`)return e;let n=cT(t.secretNames),r=cT(t.unmask);if(!n||!r)return e;let i=ZC(t.entropy);return{...e,redaction:i?{secretNames:n,unmask:r,entropy:i}:{secretNames:n,unmask:r}}}function uT(e,t){return sT(e).actions[t]}var dT={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,queries:`tanstackQuery`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`,webmcp:`webmcp`,plugins:`plugins`,performance:`performance`,build:`build`};function fT(e){return dT[e]}var pT=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function mT(e,t){let n=dT[e];return!n||t.inspectors[n]}function hT(e,t){e&1&&(C(),ug(0,`rect`,6)(1,`rect`,7)(2,`rect`,8)(3,`rect`,9))}function gT(e,t){e&1&&(C(),ug(0,`path`,10)(1,`circle`,11)(2,`circle`,12)(3,`path`,13))}function _T(e,t){e&1&&(C(),ug(0,`path`,14)(1,`path`,15))}function vT(e,t){e&1&&(C(),ug(0,`path`,16)(1,`path`,17)(2,`path`,18))}function yT(e,t){e&1&&(C(),ug(0,`circle`,19)(1,`path`,20)(2,`circle`,21))}function bT(e,t){e&1&&(C(),ug(0,`path`,1))}function xT(e,t){e&1&&(C(),ug(0,`path`,22)(1,`path`,23)(2,`path`,24)(3,`path`,25))}function ST(e,t){e&1&&(C(),ug(0,`ellipse`,26)(1,`path`,27)(2,`path`,28))}function CT(e,t){e&1&&(C(),ug(0,`rect`,29)(1,`path`,30)(2,`path`,31)(3,`path`,32))}function wT(e,t){e&1&&(C(),ug(0,`circle`,33)(1,`path`,10)(2,`path`,34))}function TT(e,t){e&1&&(C(),ug(0,`path`,35)(1,`path`,36)(2,`path`,37)(3,`path`,38)(4,`circle`,39))}function ET(e,t){e&1&&(C(),ug(0,`circle`,40)(1,`path`,41))}function DT(e,t){e&1&&(C(),ug(0,`ellipse`,42)(1,`path`,43)(2,`path`,44)(3,`path`,45)(4,`path`,46))}function OT(e,t){e&1&&(C(),ug(0,`circle`,33)(1,`path`,47)(2,`path`,48))}function kT(e,t){e&1&&(C(),ug(0,`path`,49)(1,`path`,50))}function AT(e,t){e&1&&(C(),ug(0,`path`,51)(1,`path`,52)(2,`path`,53))}function jT(e,t){e&1&&(C(),ug(0,`path`,2))}function MT(e,t){e&1&&(C(),ug(0,`path`,3))}function NT(e,t){e&1&&(C(),ug(0,`path`,4))}function PT(e,t){e&1&&(C(),ug(0,`path`,5))}var FT=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:21,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`,`M14.7 6.3a4 4 0 0 0 5 5L21 13a6 6 0 0 1-7.8 1.6l-6.4 6.4a2.1 2.1 0 0 1-3-3l6.4-6.4A6 6 0 0 1 11.8 3.8l1.6 1.3a4 4 0 0 0 1.3 1.2Z`],[`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`],[`d`,`M12 14l4-4`],[`d`,`M3.34 19a10 10 0 1 1 17.32 0`],[`d`,`M21 16V8l-9-5-9 5v8l9 5 9-5Z`],[`d`,`m3.3 7 8.7 5 8.7-5`],[`d`,`M12 22V12`]],template:function(e,t){if(e&1&&(C(),L(0,`svg`,0),k(1,hT,4,0)(2,gT,4,0)(3,_T,2,0)(4,vT,3,0)(5,yT,3,0)(6,bT,1,0,`:svg:path`,1)(7,xT,4,0)(8,ST,3,0)(9,CT,4,0)(10,wT,3,0)(11,TT,5,0)(12,ET,2,0)(13,DT,5,0)(14,OT,3,0)(15,kT,2,0)(16,AT,3,0)(17,jT,1,0,`:svg:path`,2)(18,MT,1,0,`:svg:path`,3)(19,NT,1,0,`:svg:path`,4)(20,PT,1,0,`:svg:path`,5),R()),e&2){let e;E(),A((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===`performance`?15:e===`build`?16:e===`webmcp`?17:e===`plugins`?18:e===`analog`?19:e===`capacitor`?20:-1)}},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-shrink: 0; -}`]})},$T=(e,t)=>t.tab,eE=(e,t)=>t.label;function tE(e,t){e&1&&G(0),e&2&&q(` `,U().meta()?.projectName,` `)}function nE(e,t){e&1&&G(0,` Project details unavailable `)}function rE(e,t){e&1&&G(0,` Loading… `)}function iE(e,t){e&1&&(G(0,` Run `),P(1,`code`),G(2,`pangular build`),F(),G(3,` again to rebuild the report. `))}function aE(e,t){e&1&&G(0,` Check that the dev server is running. `)}function oE(e,t){if(e&1){let e=z();P(0,`button`,13),V(`click`,function(){return x(e),S(U(2).loadMeta())}),G(1,`Try again`),F()}}function sE(e,t){if(e&1&&(P(0,`p`,11),k(1,iE,4,0)(2,aE,1,0),F(),k(3,oE,2,0,`button`,12)),e&2){let e=U();E(),A(e.staticReport()?1:2),E(2),A(e.staticReport()?-1:3)}}function cE(e,t){e&1&&(P(0,`li`,5)(1,`span`),G(2,`Analog`),F(),G(3),F()),e&2&&(E(3),K(t))}function lE(e,t){e&1&&(P(0,`li`)(1,`span`),G(2,`Change detection`),F(),G(3),F()),e&2&&(E(3),K(t))}function uE(e,t){if(e&1&&(P(0,`span`,20),G(1),F(),P(2,`span`,21),G(3),F()),e&2){let e=U().$implicit,t=U();E(),K(t.cards()[e.tab]?.value),E(2),K(t.cards()[e.tab]?.sub)}}function dE(e,t){e&1&&(P(0,`span`,22),G(1,`–`),F(),P(2,`span`,21),G(3,`Count unavailable`),F())}function fE(e,t){e&1&&(I(0,`span`,23),P(1,`span`,21),G(2,`Counting…`),F())}function pE(e,t){if(e&1){let e=z();P(0,`button`,14),V(`click`,function(){let t=x(e).$implicit;return S(U().navigate.emit(t.tab))}),P(1,`span`,15)(2,`span`,16),I(3,`app-tab-icon`,17),F(),P(4,`span`,18),G(5,`→`),F()(),P(6,`span`,19),G(7),F(),k(8,uE,4,2)(9,dE,4,0)(10,fE,3,0),F()}if(e&2){let e,n=t.$implicit,r=t.$index,i=U().stateOf(n.tab);f_(`animation-delay`,60*r,`ms`),O(`aria-busy`,i===`loading`),E(3),N(`name`,n.tab),E(4),K(n.label),E(),A((e=i)===`ready`?8:e===`error`?9:10)}}function mE(e,t){e&1&&(P(0,`p`),G(1,`Loading…`),F())}function hE(e,t){if(e&1&&(P(0,`div`)(1,`dt`),G(2),F(),P(3,`dd`),G(4),F()()),e&2){let e=t.$implicit;E(2),K(e.label),E(2),K(e.value)}}function gE(e,t){if(e&1&&(P(0,`dl`),j(1,hE,5,2,`div`,null,eE),F()),e&2){let e=U();E(),M(e.configItems())}}function _E(e,t){e&1&&(P(0,`p`),G(1,`Defaults`),F())}function vE(e,t){if(e&1&&(P(0,`div`)(1,`dt`),G(2),F(),P(3,`dd`),G(4),F()()),e&2){let e=t.$implicit;E(2),K(e.label),E(2),K(e.value)}}function yE(e,t){e&1&&(P(0,`section`,10)(1,`h2`,24),G(2,`Security`),F(),P(3,`dl`),j(4,vE,5,2,`div`,null,eE),F()()),e&2&&(E(4),M(t))}var bE=[{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 xE(e){return bE.filter(t=>MT(t.tab,e))}var SE={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function CE(e){return e&&Object.hasOwn(SE,e)?SE[e]:null}var wE=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),TE={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 EE(e,t,n){return`${e} ${e===1?t:n}`}function DE(e,t){for(let n of e??[])t(n),DE(n.children,t)}function OE(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 · ${EE(t,`directive`,`directives`)}`}}function kE(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 · ${EE(t,`redirect`,`redirects`)}`}}function AE(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]=TE[e]??[e,e];return EE(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function jE(e,t){let n=e?.forms??[],r=t?n.filter(e=>dT(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 ME(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function NE(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(ME).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var PE=class e{rpc=$(null);navigate=xv();staticReport=X(()=>cT(this.rpc()));meta=w(null);security=w(null);redaction=w(null);config=X(()=>DT(TT(this.rpc()),this.redaction()));stats=X(()=>this.rpc()?xE(this.config()):[]);configItems=X(()=>Rw(this.config()));metaState=w(`loading`);states=w({});rows=w({});injectorTree=w(null);signalGraph=w(null);formsState=w(null);httpState=w(null);pageId=tT();destroyRef=b(Os);stopLive=[];zone=X(()=>CE(rT(this.injectorTree(),this.pageId)?.zone));liveInjectors=X(()=>{let e=rT(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return DE(e.roots,r),DE(e.environment,r),{injectors:t,providers:n}});liveSignals=X(()=>{let e=iT(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>wE.has(e.kind??``)).length:null});cards=X(()=>{let e=this.rows(),t={};if(e.components&&(t.components=OE(e.components)),e.routes&&(t.routes=kE(e.routes)),e.store&&(t.store=AE(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 · ${EE(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=jE(i,this.pageId));let a=this.httpState();return a&&(t.network=NE(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),!cT(e)&&oT(e,`redaction-config`).then(t=>{this.rpc()===e&&this.redaction.set(t)}).catch(()=>{})}loadSecurity(e){this.security.set(null),!cT(e)&&sT(e,`security-status`).then(t=>{this.rpc()===e&&t&&this.security.set(wT(t,Date.now()))})}constructor(){T(()=>{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),this.loadSecurity(e);let n=TT(e),r=e=>MT(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)),MT(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),MT(`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=D({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:34,vars:15,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`],[`aria-labelledby`,`security-title`,1,`config`],[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`],[`id`,`security-title`]],template:function(e,t){if(e&1&&(P(0,`section`,0)(1,`div`,1)(2,`p`,2),G(3,`Project`),F(),P(4,`h2`,3),k(5,tE,1,1)(6,nE,1,0)(7,rE,1,0),F(),k(8,sE,4,2),F(),P(9,`ul`,4)(10,`li`)(11,`span`),G(12,`Angular`),F(),G(13),F(),P(14,`li`)(15,`span`),G(16,`TypeScript`),F(),G(17),F(),P(18,`li`)(19,`span`),G(20,`SSR`),F(),G(21),F(),k(22,cE,4,1,`li`,5),k(23,lE,4,1,`li`),F()(),P(24,`div`,6),j(25,pE,11,6,`button`,7,$T),F(),P(27,`section`,8)(28,`h2`,9),G(29,`Configuration`),F(),k(30,mE,2,0,`p`)(31,gE,3,0,`dl`)(32,_E,2,0,`p`),F(),k(33,yE,6,0,`section`,10)),e&2){let e,n,r,i;O(`aria-busy`,t.metaState()===`loading`),E(4),W(`muted`,t.metaState()!==`ready`),E(),A((e=t.metaState())===`ready`?5:e===`error`?6:7),E(3),A(t.metaState()===`error`?8:-1),E(),W(`pending`,t.metaState()===`loading`),E(4),K(t.meta()?.angularVersion??`…`),E(4),K(t.meta()?.typescript??`…`),E(4),K(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),E(),A((n=t.meta()?.analog)?22:-1,n),E(),A((r=t.zone())?23:-1,r),E(2),M(t.stats()),E(2),O(`aria-busy`,!t.rpc()),E(3),A(t.rpc()?t.configItems().length?31:32:30),E(3),A((i=t.security())?33:-1,i)}},dependencies:[QT],styles:[`[_nghost-%COMP%] { +}`]})},IT=(e,t)=>t.tab,LT=(e,t)=>t.label;function RT(e,t){e&1&&G(0),e&2&&q(` `,U().meta()?.projectName,` `)}function zT(e,t){e&1&&G(0,` Project details unavailable `)}function BT(e,t){e&1&&G(0,` Loading… `)}function VT(e,t){e&1&&(G(0,` Run `),P(1,`code`),G(2,`pangular build`),F(),G(3,` again to rebuild the report. `))}function HT(e,t){e&1&&G(0,` Check that the dev server is running. `)}function UT(e,t){if(e&1){let e=z();P(0,`button`,13),V(`click`,function(){return x(e),S(U(2).loadMeta())}),G(1,`Try again`),F()}}function WT(e,t){if(e&1&&(P(0,`p`,11),k(1,VT,4,0)(2,HT,1,0),F(),k(3,UT,2,0,`button`,12)),e&2){let e=U();E(),A(e.staticReport()?1:2),E(2),A(e.staticReport()?-1:3)}}function GT(e,t){e&1&&(P(0,`li`,5)(1,`span`),G(2,`Analog`),F(),G(3),F()),e&2&&(E(3),K(t))}function KT(e,t){e&1&&(P(0,`li`)(1,`span`),G(2,`Change detection`),F(),G(3),F()),e&2&&(E(3),K(t))}function qT(e,t){if(e&1&&(P(0,`span`,20),G(1),F(),P(2,`span`,21),G(3),F()),e&2){let e=U().$implicit,t=U();E(),K(t.cards()[e.tab]?.value),E(2),K(t.cards()[e.tab]?.sub)}}function JT(e,t){e&1&&(P(0,`span`,22),G(1,`–`),F(),P(2,`span`,21),G(3,`Count unavailable`),F())}function YT(e,t){e&1&&(I(0,`span`,23),P(1,`span`,21),G(2,`Counting…`),F())}function XT(e,t){if(e&1){let e=z();P(0,`button`,14),V(`click`,function(){let t=x(e).$implicit;return S(U().navigate.emit(t.tab))}),P(1,`span`,15)(2,`span`,16),I(3,`app-tab-icon`,17),F(),P(4,`span`,18),G(5,`→`),F()(),P(6,`span`,19),G(7),F(),k(8,qT,4,2)(9,JT,4,0)(10,YT,3,0),F()}if(e&2){let e,n=t.$implicit,r=t.$index,i=U().stateOf(n.tab);e_(`animation-delay`,60*r,`ms`),O(`aria-busy`,i===`loading`),E(3),N(`name`,n.tab),E(4),K(n.label),E(),A((e=i)===`ready`?8:e===`error`?9:10)}}function ZT(e,t){e&1&&(P(0,`p`),G(1,`Loading…`),F())}function QT(e,t){if(e&1&&(P(0,`div`)(1,`dt`),G(2),F(),P(3,`dd`),G(4),F()()),e&2){let e=t.$implicit;E(2),K(e.label),E(2),K(e.value)}}function $T(e,t){if(e&1&&(P(0,`dl`),j(1,QT,5,2,`div`,null,LT),F()),e&2){let e=U();E(),M(e.configItems())}}function eE(e,t){e&1&&(P(0,`p`),G(1,`Defaults`),F())}function tE(e,t){if(e&1&&(P(0,`div`)(1,`dt`),G(2),F(),P(3,`dd`),G(4),F()()),e&2){let e=t.$implicit;E(2),K(e.label),E(2),K(e.value)}}function nE(e,t){e&1&&(P(0,`section`,10)(1,`h2`,24),G(2,`Security`),F(),P(3,`dl`),j(4,tE,5,2,`div`,null,LT),F()()),e&2&&(E(4),M(t))}var rE=[{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 iE(e){return rE.filter(t=>mT(t.tab,e))}var aE={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function oE(e){return e&&Object.hasOwn(aE,e)?aE[e]:null}var sE=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),cE={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 lE(e,t,n){return`${e} ${e===1?t:n}`}function uE(e,t){for(let n of e??[])t(n),uE(n.children,t)}function dE(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 · ${lE(t,`directive`,`directives`)}`}}function fE(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 · ${lE(t,`redirect`,`redirects`)}`}}function pE(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]=cE[e]??[e,e];return lE(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function mE(e,t){let n=e?.forms??[],r=t?n.filter(e=>qw(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 hE(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function gE(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(hE).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var _E=class e{rpc=$(null);navigate=lv();staticReport=X(()=>Ww(this.rpc()));meta=w(null);security=w(null);redaction=w(null);config=X(()=>lT(sT(this.rpc()),this.redaction()));stats=X(()=>this.rpc()?iE(this.config()):[]);configItems=X(()=>bw(this.config()));metaState=w(`loading`);states=w({});rows=w({});injectorTree=w(null);signalGraph=w(null);formsState=w(null);httpState=w(null);pageId=Lw();destroyRef=b(ys);stopLive=[];zone=X(()=>oE(zw(this.injectorTree(),this.pageId)?.zone));liveInjectors=X(()=>{let e=zw(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return uE(e.roots,r),uE(e.environment,r),{injectors:t,providers:n}});liveSignals=X(()=>{let e=Bw(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>sE.has(e.kind??``)).length:null});cards=X(()=>{let e=this.rows(),t={};if(e.components&&(t.components=dE(e.components)),e.routes&&(t.routes=fE(e.routes)),e.store&&(t.store=pE(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 · ${lE(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=mE(i,this.pageId));let a=this.httpState();return a&&(t.network=gE(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),!Ww(e)&&Hw(e,`redaction-config`).then(t=>{this.rpc()===e&&this.redaction.set(t)}).catch(()=>{})}loadSecurity(e){this.security.set(null),!Ww(e)&&Uw(e,`security-status`).then(t=>{this.rpc()===e&&t&&this.security.set(oT(t,Date.now()))})}constructor(){T(()=>{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),this.loadSecurity(e);let n=sT(e),r=e=>mT(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)),mT(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),mT(`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=D({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:34,vars:15,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`],[`aria-labelledby`,`security-title`,1,`config`],[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`],[`id`,`security-title`]],template:function(e,t){if(e&1&&(P(0,`section`,0)(1,`div`,1)(2,`p`,2),G(3,`Project`),F(),P(4,`h2`,3),k(5,RT,1,1)(6,zT,1,0)(7,BT,1,0),F(),k(8,WT,4,2),F(),P(9,`ul`,4)(10,`li`)(11,`span`),G(12,`Angular`),F(),G(13),F(),P(14,`li`)(15,`span`),G(16,`TypeScript`),F(),G(17),F(),P(18,`li`)(19,`span`),G(20,`SSR`),F(),G(21),F(),k(22,GT,4,1,`li`,5),k(23,KT,4,1,`li`),F()(),P(24,`div`,6),j(25,XT,11,6,`button`,7,IT),F(),P(27,`section`,8)(28,`h2`,9),G(29,`Configuration`),F(),k(30,ZT,2,0,`p`)(31,$T,3,0,`dl`)(32,eE,2,0,`p`),F(),k(33,nE,6,0,`section`,10)),e&2){let e,n,r,i;O(`aria-busy`,t.metaState()===`loading`),E(4),W(`muted`,t.metaState()!==`ready`),E(),A((e=t.metaState())===`ready`?5:e===`error`?6:7),E(3),A(t.metaState()===`error`?8:-1),E(),W(`pending`,t.metaState()===`loading`),E(4),K(t.meta()?.angularVersion??`…`),E(4),K(t.meta()?.typescript??`…`),E(4),K(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),E(),A((n=t.meta()?.analog)?22:-1,n),E(),A((r=t.zone())?23:-1,r),E(2),M(t.stats()),E(2),O(`aria-busy`,!t.rpc()),E(3),A(t.rpc()?t.configItems().length?31:32:30),E(3),A((i=t.security())?33:-1,i)}},dependencies:[FT],styles:[`[_nghost-%COMP%] { display: block; max-width: 1200px; } @@ -325,7 +325,7 @@ h2.muted[_ngcontent-%COMP%] { .skeleton[_ngcontent-%COMP%] { animation: none; } -}`]})},FE=[`*`];function IE(e,t){if(e&1&&(L(0,`div`,1)(1,`p`,2),G(2),R(),L(3,`p`,3),G(4),Vg(5),L(6,`a`,4),G(7,`Supported versions`),R()()()),e&2){let e=U();W(`compact`,e.compact()),E(2),K(e.title()),E(2),q(` `,t,` `),E(2),B(`href`,e.docsUrl,Fu)}}var LE=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,RE=class e{page=$(null);capability=$.required();missing=$(!1,{transform:Mv});compact=$(!1,{transform:Mv});docsUrl=LE;text=X(()=>{let e=this.page();return!this.missing()&&!Kw(e,this.capability())?null:qw(this.capability(),e?.version)});title=X(()=>{let e=this.page()?.version;return e?`Not available on Angular ${Uw(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:FE,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&&(Bg(),k(0,IE,8,5,`div`,0)),e&2){let e;A((e=t.text())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})},vE=[`*`];function yE(e,t){if(e&1&&(L(0,`div`,1)(1,`p`,2),G(2),R(),L(3,`p`,3),G(4),kg(5),L(6,`a`,4),G(7,`Supported versions`),R()()()),e&2){let e=U();W(`compact`,e.compact()),E(2),K(e.title()),E(2),q(` `,t,` `),E(2),B(`href`,e.docsUrl,Tu)}}var bE=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,xE=class e{page=$(null);capability=$.required();missing=$(!1,{transform:bv});compact=$(!1,{transform:bv});docsUrl=bE;text=X(()=>{let e=this.page();return!this.missing()&&!Ow(e,this.capability())?null:kw(this.capability(),e?.version)});title=X(()=>{let e=this.page()?.version;return e?`Not available on Angular ${Tw(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:vE,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&&(Og(),k(0,yE,8,5,`div`,0)),e&2){let e;A((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; -}`]})},zE=[`trigger`],BE=[`list`],VE=(e,t)=>t.value;function HE(e,t){if(e&1&&(L(0,`span`,4),G(1),R()),e&2){let e=U();E(),K(e.current().hint)}}function UE(e,t){if(e&1&&(L(0,`span`,15),G(1),R()),e&2){let e=U().$implicit;E(),K(e.hint)}}function WE(e,t){if(e&1){let e=z();L(0,`li`,11),H(`pointerenter`,function(){let t=x(e).$index;return S(U(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=x(e).$index;return S(U(2).choose(t))}),C(),L(1,`svg`,12),Sg(2,`path`,13),R(),ys(),L(3,`span`,14),G(4),R(),k(5,UE,2,1,`span`,15),R()}if(e&2){let e=t.$implicit,n=t.$index,r=U(2);W(`active`,n===r.active())(`selected`,e.value===r.value()),O(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),E(4),K(e.label),E(),A(e.hint?5:-1)}}function GE(e,t){if(e&1&&(L(0,`li`,10),G(1),R()),e&2){let e=U(2);E(),K(e.emptyText())}}function KE(e,t){if(e&1&&(L(0,`ul`,8,1),Qh(`list-in`),H(`pointerdown`,function(e){return e.preventDefault()}),j(2,WE,6,9,`li`,9,VE,!1,GE,2,1,`li`,10),R()),e&2){let e=U();W(`up`,e.dropUp()),O(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),E(2),M(e.options())}}var qE=0,JE=class e{options=$.required();value=Ev(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++qE}`;open=w(!1);active=w(-1);dropUp=w(!1);current=X(()=>this.options().find(e=>e.value===this.value())??null);host=b(Rl);injector=b(Es);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=D({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&Ug(t.trigger,zE,5)(t.list,BE,5),e&2&&Wg(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&V(`pointerdown`,function(e){return t.onOutside(e)},Ru),e&2&&W(`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&&(L(0,`button`,2,0),H(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),L(2,`span`,3),G(3),R(),k(4,HE,2,1,`span`,4),C(),L(5,`svg`,5),Sg(6,`path`,6),R()(),k(7,KE,5,5,`ul`,7)),e&2&&(B(`disabled`,t.disabled()),O(`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),E(2),W(`placeholder`,!t.current()),E(),q(` `,t.current()?.label??t.placeholder(),` `),E(),A(t.current()?.hint?4:-1),E(3),A(t.open()?7:-1))},styles:[`[_nghost-%COMP%] { +}`]})},SE=[`trigger`],CE=[`list`],wE=(e,t)=>t.value;function TE(e,t){if(e&1&&(L(0,`span`,4),G(1),R()),e&2){let e=U();E(),K(e.current().hint)}}function EE(e,t){if(e&1&&(L(0,`span`,15),G(1),R()),e&2){let e=U().$implicit;E(),K(e.hint)}}function DE(e,t){if(e&1){let e=z();L(0,`li`,11),H(`pointerenter`,function(){let t=x(e).$index;return S(U(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=x(e).$index;return S(U(2).choose(t))}),C(),L(1,`svg`,12),ug(2,`path`,13),R(),ds(),L(3,`span`,14),G(4),R(),k(5,EE,2,1,`span`,15),R()}if(e&2){let e=t.$implicit,n=t.$index,r=U(2);W(`active`,n===r.active())(`selected`,e.value===r.value()),O(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),E(4),K(e.label),E(),A(e.hint?5:-1)}}function OE(e,t){if(e&1&&(L(0,`li`,10),G(1),R()),e&2){let e=U(2);E(),K(e.emptyText())}}function kE(e,t){if(e&1&&(L(0,`ul`,8,1),Bh(`list-in`),H(`pointerdown`,function(e){return e.preventDefault()}),j(2,DE,6,9,`li`,9,wE,!1,OE,2,1,`li`,10),R()),e&2){let e=U();W(`up`,e.dropUp()),O(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),E(2),M(e.options())}}var AE=0,jE=class e{options=$.required();value=mv(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++AE}`;open=w(!1);active=w(-1);dropUp=w(!1);current=X(()=>this.options().find(e=>e.value===this.value())??null);host=b(Ol);injector=b(_s);trigger=gv.required(`trigger`);list=gv(`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=D({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&jg(t.trigger,SE,5)(t.list,CE,5),e&2&&Mg(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&V(`pointerdown`,function(e){return t.onOutside(e)},Ou),e&2&&W(`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&&(L(0,`button`,2,0),H(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),L(2,`span`,3),G(3),R(),k(4,TE,2,1,`span`,4),C(),L(5,`svg`,5),ug(6,`path`,6),R()(),k(7,kE,5,5,`ul`,7)),e&2&&(B(`disabled`,t.disabled()),O(`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),E(2),W(`placeholder`,!t.current()),E(),q(` `,t.current()?.label??t.placeholder(),` `),E(),A(t.current()?.hint?4:-1),E(3),A(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; } -}`]})},YE=[`input`];function XE(e,t){if(e&1){let e=z();L(0,`button`,9),H(`click`,function(){return x(e),S(U().save())}),C(),L(1,`svg`,10),Sg(2,`path`,11),R(),ys(),L(3,`span`,12),G(4,`Save`),R()()}e&2&&O(`aria-label`,`Save filter `+U().query())}function ZE(e,t){if(e&1){let e=z();L(0,`li`,14)(1,`button`,15),H(`click`,function(){let t=x(e).$implicit;return S(U(2).apply(t))}),G(2),R(),L(3,`button`,16),H(`click`,function(){let t=x(e).$implicit;return S(U(2).remove(t))}),C(),L(4,`svg`,10),Sg(5,`path`,17),R()()()}if(e&2){let e=t.$implicit,n=U(2);W(`active`,e===n.query()),E(),O(`aria-pressed`,e===n.query())(`title`,e),E(),q(` `,e,` `),E(),O(`aria-label`,`Remove saved filter `+e)}}function QE(e,t){if(e&1&&(L(0,`ul`,7),j(1,ZE,6,6,`li`,13,dg),R()),e&2){let e=U();E(),M(e.saved())}}function $E(e,t){if(e&1&&(L(0,`span`,8),G(1),R()),e&2){let e=U();E(),K(e.announcement())}}var eD=`pangular-pref:filters`,tD=200;function nD(e){try{let t=localStorage.getItem(`${eD}:${e}`),n=t?JSON.parse(t):[];if(!Array.isArray(n))return[];let r=n.filter(e=>typeof e==`string`&&!!e.trim()&&e.length<=tD);return[...new Set(r)].slice(-8)}catch{return[]}}function rD(e,t){try{t.length?localStorage.setItem(`${eD}:${e}`,JSON.stringify(t)):localStorage.removeItem(`${eD}:${e}`)}catch{}}var iD=class e{value=Ev(``);label=$(`Filter`);placeholder=$(`Filter`);inputId=$(null);describedBy=$(null);saveKey=$(null);input=Ov.required(`input`);host=b(Rl);injector=b(Es);announcement=w(``);query=X(()=>this.value().trim());saved=Q(()=>{let e=this.saveKey();return e?nD(e):[]});canSave=X(()=>{let e=this.query();return!!this.saveKey()&&!!e&&e.length<=tD&&!this.saved().includes(e)&&this.saved().length<8});focus(){this.input().nativeElement.focus()}clear(e){this.value()&&(e.preventDefault(),e.stopPropagation(),this.value.set(``))}save(){let e=this.saveKey(),t=this.query();if(!e||!this.canSave())return;let n=[...this.saved(),t];this.saved.set(n),rD(e,n),this.say(`Filter ${t} saved.`),this.focusAfterRender(`.chip:last-child .apply`)}apply(e){this.value.set(this.query()===e?``:e)}remove(e){let t=this.saveKey();if(!t)return;let n=this.saved().indexOf(e),r=this.saved().filter(t=>t!==e);if(this.saved.set(r),rD(t,r),this.say(`Saved filter ${e} removed.`),!r.length){this.focus();return}let i=Math.min(n,r.length-1)+1;this.focusAfterRender(`.chip:nth-child(${i}) .apply`)}focusAfterRender(e){Sd(()=>{let t=this.host.nativeElement.querySelector(e);t?t.focus():this.focus()},{injector:this.injector})}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`app-search-field`]],viewQuery:function(e,t){e&1&&Ug(t.input,YE,5),e&2&&Wg()},inputs:{value:[1,`value`],label:[1,`label`],placeholder:[1,`placeholder`],inputId:[1,`inputId`],describedBy:[1,`describedBy`],saveKey:[1,`saveKey`]},outputs:{value:`valueChange`},decls:9,vars:8,consts:[[`input`,``],[1,`box`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`placeholder`,`value`],[`type`,`button`,1,`save`],[`aria-label`,`Saved filters`,1,`chips`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`save`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M6 4h12v16l-6-4-6 4z`],[1,`save-text`],[1,`chip`,3,`active`],[1,`chip`],[`type`,`button`,1,`apply`,3,`click`],[`type`,`button`,1,`remove`,3,`click`],[`d`,`M7 7l10 10M17 7 7 17`]],template:function(e,t){e&1&&(L(0,`div`,1),C(),L(1,`svg`,2),Sg(2,`circle`,3)(3,`path`,4),R(),ys(),L(4,`input`,5,0),H(`input`,function(e){return t.value.set(e.target.value)})(`keydown.escape`,function(e){return t.clear(e)}),R()(),k(6,XE,5,1,`button`,6),k(7,QE,3,0,`ul`,7),k(8,$E,2,1,`span`,8)),e&2&&(E(4),B(`placeholder`,t.placeholder())(`value`,t.value()),O(`id`,t.inputId())(`aria-label`,t.label())(`aria-describedby`,t.describedBy()),E(2),A(t.canSave()?6:-1),E(),A(t.saveKey()&&t.saved().length?7:-1),E(),A(t.saveKey()?8:-1))},styles:[`[_nghost-%COMP%] { +}`]})},ME=[`input`];function NE(e,t){if(e&1){let e=z();L(0,`button`,9),H(`click`,function(){return x(e),S(U().save())}),C(),L(1,`svg`,10),ug(2,`path`,11),R(),ds(),L(3,`span`,12),G(4,`Save`),R()()}e&2&&O(`aria-label`,`Save filter `+U().query())}function PE(e,t){if(e&1){let e=z();L(0,`li`,14)(1,`button`,15),H(`click`,function(){let t=x(e).$implicit;return S(U(2).apply(t))}),G(2),R(),L(3,`button`,16),H(`click`,function(){let t=x(e).$implicit;return S(U(2).remove(t))}),C(),L(4,`svg`,10),ug(5,`path`,17),R()()()}if(e&2){let e=t.$implicit,n=U(2);W(`active`,e===n.query()),E(),O(`aria-pressed`,e===n.query())(`title`,e),E(),q(` `,e,` `),E(),O(`aria-label`,`Remove saved filter `+e)}}function FE(e,t){if(e&1&&(L(0,`ul`,7),j(1,PE,6,6,`li`,13,$h),R()),e&2){let e=U();E(),M(e.saved())}}function IE(e,t){if(e&1&&(L(0,`span`,8),G(1),R()),e&2){let e=U();E(),K(e.announcement())}}var LE=`pangular-pref:filters`,RE=200;function zE(e){try{let t=localStorage.getItem(`${LE}:${e}`),n=t?JSON.parse(t):[];if(!Array.isArray(n))return[];let r=n.filter(e=>typeof e==`string`&&!!e.trim()&&e.length<=RE);return[...new Set(r)].slice(-8)}catch{return[]}}function BE(e,t){try{t.length?localStorage.setItem(`${LE}:${e}`,JSON.stringify(t)):localStorage.removeItem(`${LE}:${e}`)}catch{}}var VE=class e{value=mv(``);label=$(`Filter`);placeholder=$(`Filter`);inputId=$(null);describedBy=$(null);saveKey=$(null);input=gv.required(`input`);host=b(Ol);injector=b(_s);announcement=w(``);query=X(()=>this.value().trim());saved=Q(()=>{let e=this.saveKey();return e?zE(e):[]});canSave=X(()=>{let e=this.query();return!!this.saveKey()&&!!e&&e.length<=RE&&!this.saved().includes(e)&&this.saved().length<8});focus(){this.input().nativeElement.focus()}clear(e){this.value()&&(e.preventDefault(),e.stopPropagation(),this.value.set(``))}save(){let e=this.saveKey(),t=this.query();if(!e||!this.canSave())return;let n=[...this.saved(),t];this.saved.set(n),BE(e,n),this.say(`Filter ${t} saved.`),this.focusAfterRender(`.chip:last-child .apply`)}apply(e){this.value.set(this.query()===e?``:e)}remove(e){let t=this.saveKey();if(!t)return;let n=this.saved().indexOf(e),r=this.saved().filter(t=>t!==e);if(this.saved.set(r),BE(t,r),this.say(`Saved filter ${e} removed.`),!r.length){this.focus();return}let i=Math.min(n,r.length-1)+1;this.focusAfterRender(`.chip:nth-child(${i}) .apply`)}focusAfterRender(e){fd(()=>{let t=this.host.nativeElement.querySelector(e);t?t.focus():this.focus()},{injector:this.injector})}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`app-search-field`]],viewQuery:function(e,t){e&1&&jg(t.input,ME,5),e&2&&Mg()},inputs:{value:[1,`value`],label:[1,`label`],placeholder:[1,`placeholder`],inputId:[1,`inputId`],describedBy:[1,`describedBy`],saveKey:[1,`saveKey`]},outputs:{value:`valueChange`},decls:9,vars:8,consts:[[`input`,``],[1,`box`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`placeholder`,`value`],[`type`,`button`,1,`save`],[`aria-label`,`Saved filters`,1,`chips`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`save`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M6 4h12v16l-6-4-6 4z`],[1,`save-text`],[1,`chip`,3,`active`],[1,`chip`],[`type`,`button`,1,`apply`,3,`click`],[`type`,`button`,1,`remove`,3,`click`],[`d`,`M7 7l10 10M17 7 7 17`]],template:function(e,t){e&1&&(L(0,`div`,1),C(),L(1,`svg`,2),ug(2,`circle`,3)(3,`path`,4),R(),ds(),L(4,`input`,5,0),H(`input`,function(e){return t.value.set(e.target.value)})(`keydown.escape`,function(e){return t.clear(e)}),R()(),k(6,NE,5,1,`button`,6),k(7,FE,3,0,`ul`,7),k(8,IE,2,1,`span`,8)),e&2&&(E(4),B(`placeholder`,t.placeholder())(`value`,t.value()),O(`id`,t.inputId())(`aria-label`,t.label())(`aria-describedby`,t.describedBy()),E(2),A(t.canSave()?6:-1),E(),A(t.saveKey()&&t.saved().length?7:-1),E(),A(t.saveKey()?8:-1))},styles:[`[_nghost-%COMP%] { display: flex; flex: 1 1 220px; flex-wrap: wrap; @@ -735,7 +735,7 @@ input[_ngcontent-%COMP%]:focus { .save[_ngcontent-%COMP%] { transition: none; } -}`]})};function aD(e){return new Date(e).toLocaleTimeString()}var oD=/[ \t\n\r]/;function sD(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 HE(e){return new Date(e).toLocaleTimeString()}var UE=/[ \t\n\r]/;function WE(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; } @@ -762,7 +762,7 @@ a[_ngcontent-%COMP%] { a[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})};function fD(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function pD(e){let t=b(Os),n=w({}),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(fD(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return T(()=>{let t=e();t&&t!==r&&Z(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function mD(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 hD=1e3;function gD(e){return typeof e==`number`&&Number.isFinite(e)&&e>0&&e<=hD?e:16}var _D=864e13,vD=200,yD=300,bD=100,xD=10,SD=100,CD=2e3,wD=2e3,TD=4e3,ED=1e3,DD=100,OD=3,kD=50,AD={component:`c`,hook:`h`,afterRender:`r`,output:`o`},jD=Object.values(AD),MD=e=>!!e&&typeof e==`object`&&!Array.isArray(e),ND=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,PD=(e,t)=>typeof e==`string`?e.slice(0,t):``,FD=e=>ND(e)>0?ND(e):void 0,ID=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function LD(e){if(!MD(e))return null;let t=PD(e.name,vD);return t?{name:t,checks:ND(e.checks),ms:ND(e.ms)}:null}function RD(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>ED||typeof o!=`string`||!jD.includes(o)?null:[n,r,ND(i),a,o]}function zD(e,t,n){if(!MD(e)||typeof e.id!=`number`)return null;let r=ID(e.components,xD).map(LD).filter(e=>!!e),i=PD(e.trigger,yD),a=ID(e.spans,40).map(e=>RD(e,t)).filter(e=>!!e),o=Array.isArray(e.spans)?e.spans.length-40:0,s=Math.floor(ND(e.droppedSpans))+Math.max(0,o),c={t:typeof e.t==`number`?ND(e.t):void 0,hookMs:FD(e.hookMs),afterRenderMs:FD(e.afterRenderMs),outputMs:FD(e.outputMs)},l=UD(e.cause),u=FD(e.refreshed),d=FD(e.unchanged);return{id:ND(e.id),at:ND(e.at),ms:ND(e.ms),passes:ND(e.passes),...i?{trigger:i}:{},checks:ND(e.checks),components:r,...Object.fromEntries(Object.entries(c).filter(([,e])=>e!==void 0)),...a.length?{spans:a}:{},...s?{droppedSpans:s}:{},...l?{cause:l}:{},...u?{refreshed:u}:{},...d?{unchanged:d}:{},...ND(e.ms)>n?{slow:!0}:{}}}var BD=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],VD={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`},HD=e=>typeof e==`string`&&BD.includes(e);function UD(e){if(!MD(e)||!HD(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};HD(e.via)&&(n.via=e.via);for(let r of t){let t=PD(e[r],vD);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=ID(e.stack,OD).map(e=>PD(e,yD)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(ND(e.more));return i&&(n.more=i),n}function WD(e){if(!MD(e))return null;let t=PD(e.name,vD);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(ND(e.refreshed)),unchanged:Math.floor(ND(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function GD(e){if(!MD(e))return null;let t=PD(e.name,vD),n=PD(e.input,vD);if(!t||!n)return null;let r=PD(e.parent,vD);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(ND(e.inPlace)),sameContents:Math.floor(ND(e.sameContents))}}function KD(e){if(!MD(e))return null;let t=PD(e.name,vD);if(!t)return null;let n=ID(e.tasks,3).map(e=>PD(e,vD)).filter(Boolean);return{name:t,ticks:Math.floor(ND(e.ticks)),...n.length?{tasks:n}:{}}}function qD(e){if(!MD(e))return;let t={};if(MD(e.causes))for(let n of BD){let r=Math.floor(ND(e.causes[n]));r&&(t[n]=r)}let n=ID(e.components,SD).map(WD).filter(e=>!!e),r=ID(e.inputs,kD).map(GD).filter(e=>!!e),i=ID(e.zone,kD).map(KD).filter(e=>!!e),a=Math.floor(ND(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 JD(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(`${VD[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 ${VD[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 YD(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 XD(e){let t=LD(e);return!t||!MD(e)?null:{...t,maxMs:ND(e.maxMs),cycles:ND(e.cycles)}}function ZD(e){if(!MD(e))return null;let t=PD(e.name,vD),n=PD(e.hook,bD);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:ND(r),ms:ND(i),maxMs:ND(a)}}function QD(e){if(!MD(e))return null;let t=PD(e.name,vD);if(!t)return null;let n=PD(e.listener,vD);return{name:t,...n?{listener:n}:{},calls:ND(e.calls),ms:ND(e.ms),maxMs:ND(e.maxMs)}}function $D(e){if(MD(e)&&ND(e.runs))return{runs:ND(e.runs),ms:ND(e.ms),maxMs:ND(e.maxMs)}}function eO(e,t){if(!MD(e))return null;let n=ID(e.spanNames,TD).map(e=>PD(e,yD)),r=gD(e.slowMs),i=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,wD)).map(e=>zD(e,n.length,r)).filter(e=>!!e):[],a={},o=0;if(MD(e.hosts)){let t=Object.entries(e.hosts);o=Math.max(0,t.length-CD);for(let[e,n]of t.slice(0,CD))e.length<50&&ND(n)&&(a[e]=ND(n))}let s=Array.isArray(e.components)?e.components:[],c=Math.floor(ND(e.droppedClasses))+Math.max(0,s.length-SD),l=Math.floor(ND(e.droppedHosts))+o,u=ID(e.hooks,DD).map(ZD).filter(e=>!!e),d=ID(e.outputs,DD).map(QD).filter(e=>!!e),f=Math.max(0,ID(e.hooks,1/0).length-DD)+Math.max(0,ID(e.outputs,1/0).length-DD),p=Math.floor(ND(e.droppedTimings))+f,m=$D(e.afterRender),ee=i.some(e=>e.spans?.length),h=qD(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=_D?ND(e.startedAt):null,dropped:ND(e.dropped),slowMs:r,cycles:i,components:s.slice(0,SD).map(XD).filter(e=>!!e),...c?{droppedClasses:c}:{},hosts:a,...l?{droppedHosts:l}:{},...u.length?{hooks:u}:{},...d.length?{outputs:d}:{},...p?{droppedTimings:p}:{},...m?{afterRender:m}:{},...ee?{spanNames:n}:{},...h?{diagnosis:h}:{}}}var tO=`pangular-inspector/change-detection`;function nO(e,t,n=Date.now()){return{format:tO,version:1,exportedAt:n,pageId:t,recording:{...eO(e,wD)??e,recording:!1,hosts:{}}}}function rO(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(!MD(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=MD(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=eO(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=PD(n.pageId??r.pageId,49)||`imported`,o=FD(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var iO=1,aO=1,oO=2,sO={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},cO=e=>Math.round(e*1e6)/1e3;function lO(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:iO,tid:aO,ts:cO(e),dur:cO(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:JD(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===AD.output){let n=e+i;a.push({name:l,cat:sO[d],ph:`X`,pid:iO,tid:oO,ts:cO(n),dur:cO(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=cO((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:iO,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l(aO,`thread_name`,`Change detection`),l(oO,`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<=_D?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}function uO(e,t=16){return e.ms>t}function dO(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function fO(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 pO(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 mO(e,t=16){let n=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(n,t*1.25)}function hO(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 gO={c:`component`,h:`hook`,r:`afterRender`,o:`output`};function _O(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 vO(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],ee=f>0&&m!==void 0&&ot.kind,bO=(e,t)=>t.name,xO=(e,t)=>t.name+`.`+t.input;function SO(e,t){e&1&&(L(0,`p`,3),G(1,` The page has no Angular change detection scheduler the overlay could find (it needs Angular 18 or later), so cycles have no cause. `),R())}function CO(e,t){if(e&1&&(L(0,`tr`)(1,`td`),G(2),R(),L(3,`td`,6),G(4),R()()),e&2){let e=t.$implicit;E(2),K(e.label),E(2),K(e.count)}}function wO(e,t){if(e&1&&(L(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),G(4,`Trigger`),R(),L(5,`th`,5),G(6,`Cycles`),R()()(),L(7,`tbody`),j(8,CO,5,2,`tr`,null,yO),R()()),e&2){let e=U(2);E(8),M(e.causes())}}function TO(e,t){e&1&&(L(0,`p`,3),G(1,`No cycle has a cause yet.`),R())}function EO(e,t){if(e&1&&(L(0,`tr`)(1,`td`,7),G(2),R(),L(3,`td`,6),G(4),R(),L(5,`td`,7),G(6),R()()),e&2){let e=t.$implicit;E(2),K(e.name),E(2),K(e.ticks),E(2),K(e.tasks?.join(`, `))}}function DO(e,t){if(e&1&&(L(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),G(4,`Component`),R(),L(5,`th`,5),G(6,`Zone-only ticks`),R(),L(7,`th`,4),G(8,`After`),R()()(),L(9,`tbody`),j(10,EO,7,3,`tr`,null,bO),R()()),e&2){let e=U(3);E(10),M(e.zone())}}function OO(e,t){if(e&1&&(L(0,`p`,3),G(1),R()),e&2){let e=U(3);E(),K(e.zoneNote())}}function kO(e,t){if(e&1&&(L(0,`div`)(1,`h4`),G(2,`Depends on zone.js`),R(),k(3,DO,12,0,`table`)(4,OO,2,1,`p`,3),R()),e&2){let e=U(),t=U();E(3),A(t.zone().length?3:e.triggers?4:-1)}}function AO(e,t){e&1&&(L(0,`p`,3),G(1,`The page can't watch DOM updates, so wasted checks are not counted.`),R())}function jO(e,t){if(e&1&&(L(0,`tr`)(1,`td`,7),G(2),R(),L(3,`td`,6),G(4),R(),L(5,`td`,6),G(6),R(),L(7,`td`),G(8),R()()),e&2){let e=t.$implicit,n=U(3);E(2),K(e.name),E(2),K(e.refreshed),E(2),J(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),E(2),K(e.strategy??`Unknown`)}}function MO(e,t){if(e&1&&(L(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),G(4,`Component`),R(),L(5,`th`,5),G(6,`Refreshed`),R(),L(7,`th`,5),G(8,`Changed nothing`),R(),L(9,`th`,4),G(10,`Strategy`),R()()(),L(11,`tbody`),j(12,jO,9,5,`tr`,null,bO),R()()),e&2){let e=U(2);E(12),M(e.wasted())}}function NO(e,t){e&1&&(L(0,`p`,3),G(1,`Every refreshed check changed something.`),R())}function PO(e,t){if(e&1&&(L(0,`tr`)(1,`td`,7),G(2),R(),L(3,`td`,7),G(4),R(),L(5,`td`,6),G(6),R(),L(7,`td`,6),G(8),R()()),e&2){let e=t.$implicit;E(2),J(``,e.name,`.`,e.input),E(2),K(e.parent??`Unknown`),E(2),K(e.inPlace),E(2),K(e.sameContents)}}function FO(e,t){if(e&1&&(L(0,`h4`),G(1,`Inputs that break OnPush`),R(),L(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),G(6,`Input`),R(),L(7,`th`,4),G(8,`Set by`),R(),L(9,`th`,5),G(10,`Changed in place`),R(),L(11,`th`,5),G(12,`Same contents, new reference`),R()()(),L(13,`tbody`),j(14,PO,9,5,`tr`,null,xO),R()()),e&2){let e=U(2);E(14),M(e.inputs())}}function IO(e,t){if(e&1&&(L(0,`li`),G(1),R()),e&2){let e=t.$implicit;E(),K(e.text)}}function LO(e,t){if(e&1&&(L(0,`h4`),G(1,`Hints`),R(),L(2,`ul`,8),j(3,IO,2,1,`li`,null,ug),R()),e&2){let e=U(2);E(3),M(e.hints())}}function RO(e,t){if(e&1&&(L(0,`section`,0)(1,`h3`,1),G(2,`Why it ran and what it wasted`),R(),L(3,`div`,2)(4,`div`)(5,`h4`),G(6,`What started the cycles`),R(),k(7,SO,2,0,`p`,3)(8,wO,10,0,`table`)(9,TO,2,0,`p`,3),R(),k(10,kO,5,1,`div`),R(),L(11,`h4`),G(12,`Wasted checks`),R(),k(13,AO,2,0,`p`,3)(14,MO,14,0,`table`)(15,NO,2,0,`p`,3),k(16,FO,16,0),k(17,LO,5,0),R()),e&2){let e=t,n=U();E(7),A(e.triggers?n.causes().length?8:9:7),E(3),A(n.hasZone()?10:-1),E(3),A(e.waste?n.wasted().length?14:15:13),E(3),A(n.inputs().length?16:-1),E(),A(n.hints().length?17:-1)}}var zO=10,BO=class e{page=$(null);diagnosis=X(()=>this.page()?.diagnosis??null);causes=X(()=>{let e=this.diagnosis()?.causes??{};return BD.filter(t=>e[t]).map(t=>({kind:t,label:VD[t],count:e[t]}))});zone=X(()=>(this.diagnosis()?.zone??[]).slice(0,zO));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,zO));inputs=X(()=>(this.diagnosis()?.inputs??[]).slice(0,zO));hints=X(()=>YD(this.diagnosis()??void 0).slice(0,zO));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({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&&k(0,RO,18,5,`section`,0),e&2){let e;A((e=t.diagnosis())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})};function YE(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function XE(e){let t=b(ys),n=w({}),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(YE(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return T(()=>{let t=e();t&&t!==r&&Z(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function ZE(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 QE=1e3;function $E(e){return typeof e==`number`&&Number.isFinite(e)&&e>0&&e<=QE?e:16}var eD=864e13,tD=200,nD=300,rD=100,iD=10,aD=100,oD=2e3,sD=2e3,cD=4e3,lD=1e3,uD=100,dD=3,fD=50,pD={component:`c`,hook:`h`,afterRender:`r`,output:`o`},mD=Object.values(pD),hD=e=>!!e&&typeof e==`object`&&!Array.isArray(e),gD=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,_D=(e,t)=>typeof e==`string`?e.slice(0,t):``,vD=e=>gD(e)>0?gD(e):void 0,yD=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function bD(e){if(!hD(e))return null;let t=_D(e.name,tD);return t?{name:t,checks:gD(e.checks),ms:gD(e.ms)}:null}function xD(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>lD||typeof o!=`string`||!mD.includes(o)?null:[n,r,gD(i),a,o]}function SD(e,t,n){if(!hD(e)||typeof e.id!=`number`)return null;let r=yD(e.components,iD).map(bD).filter(e=>!!e),i=_D(e.trigger,nD),a=yD(e.spans,40).map(e=>xD(e,t)).filter(e=>!!e),o=Array.isArray(e.spans)?e.spans.length-40:0,s=Math.floor(gD(e.droppedSpans))+Math.max(0,o),c={t:typeof e.t==`number`?gD(e.t):void 0,hookMs:vD(e.hookMs),afterRenderMs:vD(e.afterRenderMs),outputMs:vD(e.outputMs)},l=ED(e.cause),u=vD(e.refreshed),d=vD(e.unchanged);return{id:gD(e.id),at:gD(e.at),ms:gD(e.ms),passes:gD(e.passes),...i?{trigger:i}:{},checks:gD(e.checks),components:r,...Object.fromEntries(Object.entries(c).filter(([,e])=>e!==void 0)),...a.length?{spans:a}:{},...s?{droppedSpans:s}:{},...l?{cause:l}:{},...u?{refreshed:u}:{},...d?{unchanged:d}:{},...gD(e.ms)>n?{slow:!0}:{}}}var CD=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],wD={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`},TD=e=>typeof e==`string`&&CD.includes(e);function ED(e){if(!hD(e)||!TD(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};TD(e.via)&&(n.via=e.via);for(let r of t){let t=_D(e[r],tD);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=yD(e.stack,dD).map(e=>_D(e,nD)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(gD(e.more));return i&&(n.more=i),n}function DD(e){if(!hD(e))return null;let t=_D(e.name,tD);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(gD(e.refreshed)),unchanged:Math.floor(gD(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function OD(e){if(!hD(e))return null;let t=_D(e.name,tD),n=_D(e.input,tD);if(!t||!n)return null;let r=_D(e.parent,tD);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(gD(e.inPlace)),sameContents:Math.floor(gD(e.sameContents))}}function kD(e){if(!hD(e))return null;let t=_D(e.name,tD);if(!t)return null;let n=yD(e.tasks,3).map(e=>_D(e,tD)).filter(Boolean);return{name:t,ticks:Math.floor(gD(e.ticks)),...n.length?{tasks:n}:{}}}function AD(e){if(!hD(e))return;let t={};if(hD(e.causes))for(let n of CD){let r=Math.floor(gD(e.causes[n]));r&&(t[n]=r)}let n=yD(e.components,aD).map(DD).filter(e=>!!e),r=yD(e.inputs,fD).map(OD).filter(e=>!!e),i=yD(e.zone,fD).map(kD).filter(e=>!!e),a=Math.floor(gD(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 jD(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(`${wD[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 ${wD[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 MD(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 ND(e){let t=bD(e);return!t||!hD(e)?null:{...t,maxMs:gD(e.maxMs),cycles:gD(e.cycles)}}function PD(e){if(!hD(e))return null;let t=_D(e.name,tD),n=_D(e.hook,rD);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:gD(r),ms:gD(i),maxMs:gD(a)}}function FD(e){if(!hD(e))return null;let t=_D(e.name,tD);if(!t)return null;let n=_D(e.listener,tD);return{name:t,...n?{listener:n}:{},calls:gD(e.calls),ms:gD(e.ms),maxMs:gD(e.maxMs)}}function ID(e){if(hD(e)&&gD(e.runs))return{runs:gD(e.runs),ms:gD(e.ms),maxMs:gD(e.maxMs)}}function LD(e,t){if(!hD(e))return null;let n=yD(e.spanNames,cD).map(e=>_D(e,nD)),r=$E(e.slowMs),i=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,sD)).map(e=>SD(e,n.length,r)).filter(e=>!!e):[],a={},o=0;if(hD(e.hosts)){let t=Object.entries(e.hosts);o=Math.max(0,t.length-oD);for(let[e,n]of t.slice(0,oD))e.length<50&&gD(n)&&(a[e]=gD(n))}let s=Array.isArray(e.components)?e.components:[],c=Math.floor(gD(e.droppedClasses))+Math.max(0,s.length-aD),l=Math.floor(gD(e.droppedHosts))+o,u=yD(e.hooks,uD).map(PD).filter(e=>!!e),d=yD(e.outputs,uD).map(FD).filter(e=>!!e),f=Math.max(0,yD(e.hooks,1/0).length-uD)+Math.max(0,yD(e.outputs,1/0).length-uD),p=Math.floor(gD(e.droppedTimings))+f,m=ID(e.afterRender),ee=i.some(e=>e.spans?.length),h=AD(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=eD?gD(e.startedAt):null,dropped:gD(e.dropped),slowMs:r,cycles:i,components:s.slice(0,aD).map(ND).filter(e=>!!e),...c?{droppedClasses:c}:{},hosts:a,...l?{droppedHosts:l}:{},...u.length?{hooks:u}:{},...d.length?{outputs:d}:{},...p?{droppedTimings:p}:{},...m?{afterRender:m}:{},...ee?{spanNames:n}:{},...h?{diagnosis:h}:{}}}var RD=`pangular-inspector/change-detection`;function zD(e,t,n=Date.now()){return{format:RD,version:1,exportedAt:n,pageId:t,recording:{...LD(e,sD)??e,recording:!1,hosts:{}}}}function BD(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(!hD(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=hD(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=LD(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=_D(n.pageId??r.pageId,49)||`imported`,o=vD(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var VD=1,HD=1,UD=2,WD={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},GD=e=>Math.round(e*1e6)/1e3;function KD(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:VD,tid:HD,ts:GD(e),dur:GD(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:jD(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===pD.output){let n=e+i;a.push({name:l,cat:WD[d],ph:`X`,pid:VD,tid:UD,ts:GD(n),dur:GD(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=GD((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:VD,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l(HD,`thread_name`,`Change detection`),l(UD,`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<=eD?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}function qD(e,t=16){return e.ms>t}function JD(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function YD(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 XD(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 ZD(e,t=16){let n=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(n,t*1.25)}function QD(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 $D={c:`component`,h:`hook`,r:`afterRender`,o:`output`};function eO(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 tO(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],ee=f>0&&m!==void 0&&ot.kind,rO=(e,t)=>t.name,iO=(e,t)=>t.name+`.`+t.input;function aO(e,t){e&1&&(L(0,`p`,3),G(1,` The page has no Angular change detection scheduler the overlay could find (it needs Angular 18 or later), so cycles have no cause. `),R())}function oO(e,t){if(e&1&&(L(0,`tr`)(1,`td`),G(2),R(),L(3,`td`,6),G(4),R()()),e&2){let e=t.$implicit;E(2),K(e.label),E(2),K(e.count)}}function sO(e,t){if(e&1&&(L(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),G(4,`Trigger`),R(),L(5,`th`,5),G(6,`Cycles`),R()()(),L(7,`tbody`),j(8,oO,5,2,`tr`,null,nO),R()()),e&2){let e=U(2);E(8),M(e.causes())}}function cO(e,t){e&1&&(L(0,`p`,3),G(1,`No cycle has a cause yet.`),R())}function lO(e,t){if(e&1&&(L(0,`tr`)(1,`td`,7),G(2),R(),L(3,`td`,6),G(4),R(),L(5,`td`,7),G(6),R()()),e&2){let e=t.$implicit;E(2),K(e.name),E(2),K(e.ticks),E(2),K(e.tasks?.join(`, `))}}function uO(e,t){if(e&1&&(L(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),G(4,`Component`),R(),L(5,`th`,5),G(6,`Zone-only ticks`),R(),L(7,`th`,4),G(8,`After`),R()()(),L(9,`tbody`),j(10,lO,7,3,`tr`,null,rO),R()()),e&2){let e=U(3);E(10),M(e.zone())}}function dO(e,t){if(e&1&&(L(0,`p`,3),G(1),R()),e&2){let e=U(3);E(),K(e.zoneNote())}}function fO(e,t){if(e&1&&(L(0,`div`)(1,`h4`),G(2,`Depends on zone.js`),R(),k(3,uO,12,0,`table`)(4,dO,2,1,`p`,3),R()),e&2){let e=U(),t=U();E(3),A(t.zone().length?3:e.triggers?4:-1)}}function pO(e,t){e&1&&(L(0,`p`,3),G(1,`The page can't watch DOM updates, so wasted checks are not counted.`),R())}function mO(e,t){if(e&1&&(L(0,`tr`)(1,`td`,7),G(2),R(),L(3,`td`,6),G(4),R(),L(5,`td`,6),G(6),R(),L(7,`td`),G(8),R()()),e&2){let e=t.$implicit,n=U(3);E(2),K(e.name),E(2),K(e.refreshed),E(2),J(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),E(2),K(e.strategy??`Unknown`)}}function hO(e,t){if(e&1&&(L(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),G(4,`Component`),R(),L(5,`th`,5),G(6,`Refreshed`),R(),L(7,`th`,5),G(8,`Changed nothing`),R(),L(9,`th`,4),G(10,`Strategy`),R()()(),L(11,`tbody`),j(12,mO,9,5,`tr`,null,rO),R()()),e&2){let e=U(2);E(12),M(e.wasted())}}function gO(e,t){e&1&&(L(0,`p`,3),G(1,`Every refreshed check changed something.`),R())}function _O(e,t){if(e&1&&(L(0,`tr`)(1,`td`,7),G(2),R(),L(3,`td`,7),G(4),R(),L(5,`td`,6),G(6),R(),L(7,`td`,6),G(8),R()()),e&2){let e=t.$implicit;E(2),J(``,e.name,`.`,e.input),E(2),K(e.parent??`Unknown`),E(2),K(e.inPlace),E(2),K(e.sameContents)}}function vO(e,t){if(e&1&&(L(0,`h4`),G(1,`Inputs that break OnPush`),R(),L(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),G(6,`Input`),R(),L(7,`th`,4),G(8,`Set by`),R(),L(9,`th`,5),G(10,`Changed in place`),R(),L(11,`th`,5),G(12,`Same contents, new reference`),R()()(),L(13,`tbody`),j(14,_O,9,5,`tr`,null,iO),R()()),e&2){let e=U(2);E(14),M(e.inputs())}}function yO(e,t){if(e&1&&(L(0,`li`),G(1),R()),e&2){let e=t.$implicit;E(),K(e.text)}}function bO(e,t){if(e&1&&(L(0,`h4`),G(1,`Hints`),R(),L(2,`ul`,8),j(3,yO,2,1,`li`,null,Qh),R()),e&2){let e=U(2);E(3),M(e.hints())}}function xO(e,t){if(e&1&&(L(0,`section`,0)(1,`h3`,1),G(2,`Why it ran and what it wasted`),R(),L(3,`div`,2)(4,`div`)(5,`h4`),G(6,`What started the cycles`),R(),k(7,aO,2,0,`p`,3)(8,sO,10,0,`table`)(9,cO,2,0,`p`,3),R(),k(10,fO,5,1,`div`),R(),L(11,`h4`),G(12,`Wasted checks`),R(),k(13,pO,2,0,`p`,3)(14,hO,14,0,`table`)(15,gO,2,0,`p`,3),k(16,vO,16,0),k(17,bO,5,0),R()),e&2){let e=t,n=U();E(7),A(e.triggers?n.causes().length?8:9:7),E(3),A(n.hasZone()?10:-1),E(3),A(e.waste?n.wasted().length?14:15:13),E(3),A(n.inputs().length?16:-1),E(),A(n.hints().length?17:-1)}}var SO=10,CO=class e{page=$(null);diagnosis=X(()=>this.page()?.diagnosis??null);causes=X(()=>{let e=this.diagnosis()?.causes??{};return CD.filter(t=>e[t]).map(t=>({kind:t,label:wD[t],count:e[t]}))});zone=X(()=>(this.diagnosis()?.zone??[]).slice(0,SO));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,SO));inputs=X(()=>(this.diagnosis()?.inputs??[]).slice(0,SO));hints=X(()=>MD(this.diagnosis()??void 0).slice(0,SO));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({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&&k(0,xO,18,5,`section`,0),e&2){let e;A((e=t.diagnosis())?0:-1,e)}},styles:[`[_nghost-%COMP%] { display: block; } @@ -841,7 +841,7 @@ td.mono[_ngcontent-%COMP%] { .hints[_ngcontent-%COMP%] li[_ngcontent-%COMP%] + li[_ngcontent-%COMP%] { margin-top: 4px; -}`]})},VO=(e,t)=>t.cycle.id,HO=(e,t)=>t.id;function UO(e,t){if(e&1){let e=z();L(0,`button`,27),H(`click`,function(){return x(e),S(U().showAll())}),G(1,`Show all cycles`),R()}}function WO(e,t){if(e&1&&Sg(0,`div`,28),e&2){let e=t;f_(`left`,e.left,`%`)(`width`,e.width,`%`)}}function GO(e,t){if(e&1&&(L(0,`div`,29),Sg(1,`span`,30),R()),e&2){let e=t.$implicit,n=U();W(`over`,e.over)(`out`,!n.inRange(e.index)&&!!n.range())(`active`,n.focused()&&n.active()===e.index),B(`id`,n.optionId(e.index)),O(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),E(),f_(`height`,e.height,`%`)}}function KO(e,t){e&1&&(L(0,`span`,33),G(1,`over budget`),R())}function qO(e,t){if(e&1&&(L(0,`p`),G(1,` after `),L(2,`span`,35),G(3),R()()),e&2){let e=U();E(3),K(e.cycle.trigger)}}function JO(e,t){if(e&1&&(L(0,`p`,34)(1,`span`,36),G(2),R(),L(3,`span`),G(4),R()()),e&2){let e=t.$implicit,n=U(2);E(2),K(e.name),E(2),K(n.fmt(e.ms))}}function YO(e,t){if(e&1&&(L(0,`div`,31)(1,`p`,32)(2,`strong`),G(3),R(),L(4,`span`),G(5),R(),k(6,KO,2,0,`span`,33),R(),k(7,qO,4,1,`p`),L(8,`p`),G(9),R(),j(10,JO,5,2,`p`,34,ug),R()),e&2){let e=t,n=U();f_(`left`,e.left)(`right`,e.right),E(3),K(n.fmt(e.cycle.ms)),E(2),q(`cycle `,e.cycle.id),E(),A(e.over?6:-1),E(),A(e.cycle.trigger?7:-1),E(2),z_(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),E(),M(e.top)}}function XO(e,t){if(e&1&&Sg(0,`span`),e&2){let e=t.$implicit;W(`over`,e.over)}}function ZO(e,t){if(e&1&&G(0),e&2){let e=t,n=U(2);J(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function QO(e,t){if(e&1&&(L(0,`tr`)(1,`td`,37),G(2),R(),L(3,`td`,37),G(4),R(),L(5,`td`),G(6),R(),L(7,`td`,37),G(8),R(),L(9,`td`,37),G(10),R(),L(11,`td`,35),G(12),R(),L(13,`td`,35),k(14,ZO,1,2),R()()),e&2){let e,n=t.$implicit,r=U();E(2),K(n.id),E(2),K(r.fmt(n.ms)),E(2),K(r.isOver(n)?`Over`:`Within`),E(2),K(n.checks),E(2),K(n.passes),E(2),K(n.trigger??``),E(2),A((e=n.components[0])?14:-1,e)}}var $O=0,ek=80,tk=10,nk=class e{cycles=$([]);range=Ev(null);slowMs=$(16);gapUntil=ek;budgetLabel=X(()=>`${this.slowMs()} ms budget`);uid=`cd-chart-${$O++}`;hintId=`${this.uid}-hint`;active=w(null);anchor=null;dragging=!1;hover=w(null);focused=w(!1);max=X(()=>mO(this.cycles(),this.slowMs()));budgetAt=X(()=>this.slowMs()/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:uO(t,this.slowMs()),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||afO(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=this.slowMs(),n=e.filter(e=>uO(e,t)).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`}`}. ${n} over the ${t} 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:uO(t,this.slowMs()),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}`,dO(e.ms)];uO(e,this.slowMs())&&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} ${dO(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+tk;break;case`PageUp`:r=n-tk;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=D({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&V(`pointerup`,function(){return t.endDrag()},Lu)(`pointercancel`,function(){return t.endDrag()},Lu)},inputs:{cycles:[1,`cycles`],range:[1,`range`],slowMs:[1,`slowMs`]},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&&(L(0,`div`,0)(1,`label`)(2,`span`),G(3,`Start`),R(),L(4,`input`,1),H(`change`,function(e){return t.setEnd(`from`,e)}),R()(),L(5,`label`)(6,`span`),G(7,`End`),R(),L(8,`input`,1),H(`change`,function(e){return t.setEnd(`to`,e)}),R()(),k(9,UO,2,0,`button`,2),L(10,`p`,3),G(11),R()(),L(12,`p`,4),G(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. `),R(),L(14,`div`,5)(15,`div`,6)(16,`span`,7),G(17),R(),L(18,`span`,8),G(19,`0 ms`),R()(),L(20,`div`,9),k(21,WO,1,4,`div`,10),L(22,`div`,11)(23,`span`),G(24),R()(),L(25,`div`,12),H(`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)}),j(26,GO,2,12,`div`,13,VO),R(),k(28,YO,12,12,`div`,14),R()(),L(29,`div`,15),j(30,XO,1,2,`span`,16,VO),R(),L(32,`ul`,17)(33,`li`),Sg(34,`span`,18),G(35,`Within budget`),R(),L(36,`li`),Sg(37,`span`,19)(38,`span`,20),G(39,`Over budget `),R(),L(40,`li`),Sg(41,`span`,21),G(42),R()(),L(43,`details`,22)(44,`summary`),G(45,`Show the cycles as a table`),R(),L(46,`div`,23)(47,`table`)(48,`caption`,24),G(49),R(),L(50,`thead`)(51,`tr`)(52,`th`,25),G(53,`Cycle`),R(),L(54,`th`,25),G(55,`Duration`),R(),L(56,`th`,26),G(57,`Budget`),R(),L(58,`th`,25),G(59,`Checks`),R(),L(60,`th`,25),G(61,`Passes`),R(),L(62,`th`,26),G(63,`After`),R(),L(64,`th`,26),G(65,`Slowest component`),R()()(),L(66,`tbody`),j(67,QO,15,7,`tr`,null,HO),R()()()()),e&2){let e,n;E(4),B(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),E(4),B(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),E(),A(t.range()?9:-1),E(2),K(t.summary()),E(),B(`id`,t.hintId),E(2),W(`flush`,t.bars().length>t.gapUntil),E(3),K(t.fmt(t.max())),E(4),A((e=t.band())?21:-1,e),E(),f_(`bottom`,t.budgetAt(),`%`),E(2),K(t.budgetLabel()),E(),O(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),E(),M(t.bars()),E(2),A((n=t.tip())?28:-1,n),E(),W(`flush`,t.bars().length>t.gapUntil),E(),M(t.bars()),E(12),K(t.budgetLabel()),E(4),O(`aria-label`,t.tableLabel()),E(3),q(` `,t.tableLabel(),` `),E(18),M(t.selected())}},styles:[`[_nghost-%COMP%] { +}`]})},wO=(e,t)=>t.cycle.id,TO=(e,t)=>t.id;function EO(e,t){if(e&1){let e=z();L(0,`button`,27),H(`click`,function(){return x(e),S(U().showAll())}),G(1,`Show all cycles`),R()}}function DO(e,t){if(e&1&&ug(0,`div`,28),e&2){let e=t;e_(`left`,e.left,`%`)(`width`,e.width,`%`)}}function OO(e,t){if(e&1&&(L(0,`div`,29),ug(1,`span`,30),R()),e&2){let e=t.$implicit,n=U();W(`over`,e.over)(`out`,!n.inRange(e.index)&&!!n.range())(`active`,n.focused()&&n.active()===e.index),B(`id`,n.optionId(e.index)),O(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),E(),e_(`height`,e.height,`%`)}}function kO(e,t){e&1&&(L(0,`span`,33),G(1,`over budget`),R())}function AO(e,t){if(e&1&&(L(0,`p`),G(1,` after `),L(2,`span`,35),G(3),R()()),e&2){let e=U();E(3),K(e.cycle.trigger)}}function jO(e,t){if(e&1&&(L(0,`p`,34)(1,`span`,36),G(2),R(),L(3,`span`),G(4),R()()),e&2){let e=t.$implicit,n=U(2);E(2),K(e.name),E(2),K(n.fmt(e.ms))}}function MO(e,t){if(e&1&&(L(0,`div`,31)(1,`p`,32)(2,`strong`),G(3),R(),L(4,`span`),G(5),R(),k(6,kO,2,0,`span`,33),R(),k(7,AO,4,1,`p`),L(8,`p`),G(9),R(),j(10,jO,5,2,`p`,34,Qh),R()),e&2){let e=t,n=U();e_(`left`,e.left)(`right`,e.right),E(3),K(n.fmt(e.cycle.ms)),E(2),q(`cycle `,e.cycle.id),E(),A(e.over?6:-1),E(),A(e.cycle.trigger?7:-1),E(2),D_(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),E(),M(e.top)}}function NO(e,t){if(e&1&&ug(0,`span`),e&2){let e=t.$implicit;W(`over`,e.over)}}function PO(e,t){if(e&1&&G(0),e&2){let e=t,n=U(2);J(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function FO(e,t){if(e&1&&(L(0,`tr`)(1,`td`,37),G(2),R(),L(3,`td`,37),G(4),R(),L(5,`td`),G(6),R(),L(7,`td`,37),G(8),R(),L(9,`td`,37),G(10),R(),L(11,`td`,35),G(12),R(),L(13,`td`,35),k(14,PO,1,2),R()()),e&2){let e,n=t.$implicit,r=U();E(2),K(n.id),E(2),K(r.fmt(n.ms)),E(2),K(r.isOver(n)?`Over`:`Within`),E(2),K(n.checks),E(2),K(n.passes),E(2),K(n.trigger??``),E(2),A((e=n.components[0])?14:-1,e)}}var IO=0,LO=80,RO=10,zO=class e{cycles=$([]);range=mv(null);slowMs=$(16);gapUntil=LO;budgetLabel=X(()=>`${this.slowMs()} ms budget`);uid=`cd-chart-${IO++}`;hintId=`${this.uid}-hint`;active=w(null);anchor=null;dragging=!1;hover=w(null);focused=w(!1);max=X(()=>ZD(this.cycles(),this.slowMs()));budgetAt=X(()=>this.slowMs()/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:qD(t,this.slowMs()),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||aYD(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=this.slowMs(),n=e.filter(e=>qD(e,t)).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`}`}. ${n} over the ${t} 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:qD(t,this.slowMs()),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}`,JD(e.ms)];qD(e,this.slowMs())&&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} ${JD(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+RO;break;case`PageUp`:r=n-RO;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=D({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&V(`pointerup`,function(){return t.endDrag()},Du)(`pointercancel`,function(){return t.endDrag()},Du)},inputs:{cycles:[1,`cycles`],range:[1,`range`],slowMs:[1,`slowMs`]},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&&(L(0,`div`,0)(1,`label`)(2,`span`),G(3,`Start`),R(),L(4,`input`,1),H(`change`,function(e){return t.setEnd(`from`,e)}),R()(),L(5,`label`)(6,`span`),G(7,`End`),R(),L(8,`input`,1),H(`change`,function(e){return t.setEnd(`to`,e)}),R()(),k(9,EO,2,0,`button`,2),L(10,`p`,3),G(11),R()(),L(12,`p`,4),G(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. `),R(),L(14,`div`,5)(15,`div`,6)(16,`span`,7),G(17),R(),L(18,`span`,8),G(19,`0 ms`),R()(),L(20,`div`,9),k(21,DO,1,4,`div`,10),L(22,`div`,11)(23,`span`),G(24),R()(),L(25,`div`,12),H(`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)}),j(26,OO,2,12,`div`,13,wO),R(),k(28,MO,12,12,`div`,14),R()(),L(29,`div`,15),j(30,NO,1,2,`span`,16,wO),R(),L(32,`ul`,17)(33,`li`),ug(34,`span`,18),G(35,`Within budget`),R(),L(36,`li`),ug(37,`span`,19)(38,`span`,20),G(39,`Over budget `),R(),L(40,`li`),ug(41,`span`,21),G(42),R()(),L(43,`details`,22)(44,`summary`),G(45,`Show the cycles as a table`),R(),L(46,`div`,23)(47,`table`)(48,`caption`,24),G(49),R(),L(50,`thead`)(51,`tr`)(52,`th`,25),G(53,`Cycle`),R(),L(54,`th`,25),G(55,`Duration`),R(),L(56,`th`,26),G(57,`Budget`),R(),L(58,`th`,25),G(59,`Checks`),R(),L(60,`th`,25),G(61,`Passes`),R(),L(62,`th`,26),G(63,`After`),R(),L(64,`th`,26),G(65,`Slowest component`),R()()(),L(66,`tbody`),j(67,FO,15,7,`tr`,null,TO),R()()()()),e&2){let e,n;E(4),B(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),E(4),B(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),E(),A(t.range()?9:-1),E(2),K(t.summary()),E(),B(`id`,t.hintId),E(2),W(`flush`,t.bars().length>t.gapUntil),E(3),K(t.fmt(t.max())),E(4),A((e=t.band())?21:-1,e),E(),e_(`bottom`,t.budgetAt(),`%`),E(2),K(t.budgetLabel()),E(),O(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),E(),M(t.bars()),E(2),A((n=t.tip())?28:-1,n),E(),W(`flush`,t.bars().length>t.gapUntil),E(),M(t.bars()),E(12),K(t.budgetLabel()),E(4),O(`aria-label`,t.tableLabel()),E(3),q(` `,t.tableLabel(),` `),E(18),M(t.selected())}},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1221,7 +1221,7 @@ td.mono[_ngcontent-%COMP%] { .bar[_ngcontent-%COMP%] { transition: none; } -}`]})},rk=(e,t)=>t.id,ik=(e,t)=>t.index,ak=(e,t)=>t.kind;function ok(e,t){if(e&1&&(L(0,`p`,0),G(1),R()),e&2){let e=U(2);E(),J(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function sk(e,t){if(e&1&&(L(0,`span`),G(1),R()),e&2){let e=t.$implicit;f_(`left`,e.x,`%`)(`width`,e.w,`%`),E(),q(`cycle `,e.id)}}function ck(e,t){if(e&1){let e=z();L(0,`button`,11),H(`focus`,function(){let t=x(e).$implicit;return S(U(3).current.set(t.index))})(`mouseenter`,function(){let t=x(e).$implicit;return S(U(3).hover.set(t.index))})(`mouseleave`,function(){return x(e),S(U(3).hover.set(null))})(`click`,function(){let t=x(e).$implicit;return S(U(3).choose(t))}),L(1,`span`,12),G(2),R()()}if(e&2){let e=t.$implicit,n=U(3);p_(q_(`block kind-`,e.kind)),f_(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),W(`narrow`,e.w<4),O(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),E(2),K(e.name)}}function lk(e,t){if(e&1&&(L(0,`li`),Sg(1,`span`,13),G(2),R()),e&2){let e=t.$implicit;E(),p_(q_(`key kind-`,e.kind)),E(),K(e.label)}}function uk(e,t){if(e&1&&(L(0,`p`,0),G(1),R()),e&2){let e=U(3);E(),J(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function dk(e,t){if(e&1&&(L(0,`tr`)(1,`td`,17),G(2),R(),L(3,`td`,18),G(4),R(),L(5,`td`),G(6),R(),L(7,`td`,17),G(8),R(),L(9,`td`,17),G(10),R(),L(11,`td`,17),G(12),R(),L(13,`td`,17),G(14),R()()),e&2){let e=t.$implicit,n=U(4);E(2),K(e.cycleId),E(),f_(`padding-left`,6+e.depth*8,`px`),E(),K(e.name),E(2),K(n.kindLabel(e)),E(2),K(e.depth),E(2),K(n.fmt(e.start)),E(2),K(n.fmt(e.ms)),E(2),K(n.fmt(e.selfMs))}}function fk(e,t){if(e&1&&(L(0,`div`,10)(1,`table`)(2,`caption`,14),G(3),R(),L(4,`thead`)(5,`tr`)(6,`th`,15),G(7,`Cycle`),R(),L(8,`th`,16),G(9,`Span`),R(),L(10,`th`,16),G(11,`Kind`),R(),L(12,`th`,15),G(13,`Depth`),R(),L(14,`th`,15),G(15,`Start`),R(),L(16,`th`,15),G(17,`Total`),R(),L(18,`th`,15),G(19,`Self`),R()()(),L(20,`tbody`),j(21,dk,15,9,`tr`,null,ik),R()()()),e&2){let e=U(),t=U(2);O(`aria-label`,t.tableLabel()),E(3),q(` `,t.tableLabel(),` `),E(18),M(e.blocks)}}function pk(e,t){if(e&1){let e=z();L(0,`div`,1),H(`keydown`,function(t){return x(e),S(U(2).onKey(t))}),L(1,`div`,2),j(2,sk,2,5,`span`,3,rk),R(),L(4,`div`,4),j(5,ck,3,16,`button`,5,ik),R()(),L(7,`p`,6),G(8),R(),L(9,`ul`,7),j(10,lk,3,4,`li`,null,ak),R(),L(12,`p`,8),G(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. `),R(),k(14,uk,2,2,`p`,0),L(15,`details`,9),H(`toggle`,function(t){return x(e),S(U(2).onToggle(t))}),L(16,`summary`),G(17,`Show the spans as a table`),R(),k(18,fk,23,2,`div`,10),R()}if(e&2){let e=t,n=U(2);O(`aria-label`,n.label()),E(2),M(e.cycles),E(2),f_(`height`,e.depth*n.row,`px`),E(),M(e.blocks),E(3),K(n.readout()),E(2),M(n.kinds),E(4),A(n.dropped()?14:-1),E(4),A(n.tableOpen()?18:-1)}}function mk(e,t){if(e&1&&(L(0,`h3`),G(1,`Spans in the picked cycles`),R(),k(2,ok,2,2,`p`,0)(3,pk,19,6)),e&2){let e,t=U();E(2),A(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var hk=22;function gk(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]}var _k=class e{cycles=$([]);names=$([]);scope=$(`the recording`);pick=xv();row=hk;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:gO[e]}));current=w(0);tableOpen=w(!1);hover=w(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:vO(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 dO(e)}kindLabel(e){return gO[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,gO[e.kind],`${dO(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${dO(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${dO(-e.start)} before it started`:`cycle ${e.cycleId} at ${dO(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=gk(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=D({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&&k(0,mk,4,1),e&2&&A(t.hasSpans()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},BO=(e,t)=>t.id,VO=(e,t)=>t.index,HO=(e,t)=>t.kind;function UO(e,t){if(e&1&&(L(0,`p`,0),G(1),R()),e&2){let e=U(2);E(),J(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function WO(e,t){if(e&1&&(L(0,`span`),G(1),R()),e&2){let e=t.$implicit;e_(`left`,e.x,`%`)(`width`,e.w,`%`),E(),q(`cycle `,e.id)}}function GO(e,t){if(e&1){let e=z();L(0,`button`,11),H(`focus`,function(){let t=x(e).$implicit;return S(U(3).current.set(t.index))})(`mouseenter`,function(){let t=x(e).$implicit;return S(U(3).hover.set(t.index))})(`mouseleave`,function(){return x(e),S(U(3).hover.set(null))})(`click`,function(){let t=x(e).$implicit;return S(U(3).choose(t))}),L(1,`span`,12),G(2),R()()}if(e&2){let e=t.$implicit,n=U(3);t_(F_(`block kind-`,e.kind)),e_(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),W(`narrow`,e.w<4),O(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),E(2),K(e.name)}}function KO(e,t){if(e&1&&(L(0,`li`),ug(1,`span`,13),G(2),R()),e&2){let e=t.$implicit;E(),t_(F_(`key kind-`,e.kind)),E(),K(e.label)}}function qO(e,t){if(e&1&&(L(0,`p`,0),G(1),R()),e&2){let e=U(3);E(),J(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function JO(e,t){if(e&1&&(L(0,`tr`)(1,`td`,17),G(2),R(),L(3,`td`,18),G(4),R(),L(5,`td`),G(6),R(),L(7,`td`,17),G(8),R(),L(9,`td`,17),G(10),R(),L(11,`td`,17),G(12),R(),L(13,`td`,17),G(14),R()()),e&2){let e=t.$implicit,n=U(4);E(2),K(e.cycleId),E(),e_(`padding-left`,6+e.depth*8,`px`),E(),K(e.name),E(2),K(n.kindLabel(e)),E(2),K(e.depth),E(2),K(n.fmt(e.start)),E(2),K(n.fmt(e.ms)),E(2),K(n.fmt(e.selfMs))}}function YO(e,t){if(e&1&&(L(0,`div`,10)(1,`table`)(2,`caption`,14),G(3),R(),L(4,`thead`)(5,`tr`)(6,`th`,15),G(7,`Cycle`),R(),L(8,`th`,16),G(9,`Span`),R(),L(10,`th`,16),G(11,`Kind`),R(),L(12,`th`,15),G(13,`Depth`),R(),L(14,`th`,15),G(15,`Start`),R(),L(16,`th`,15),G(17,`Total`),R(),L(18,`th`,15),G(19,`Self`),R()()(),L(20,`tbody`),j(21,JO,15,9,`tr`,null,VO),R()()()),e&2){let e=U(),t=U(2);O(`aria-label`,t.tableLabel()),E(3),q(` `,t.tableLabel(),` `),E(18),M(e.blocks)}}function XO(e,t){if(e&1){let e=z();L(0,`div`,1),H(`keydown`,function(t){return x(e),S(U(2).onKey(t))}),L(1,`div`,2),j(2,WO,2,5,`span`,3,BO),R(),L(4,`div`,4),j(5,GO,3,16,`button`,5,VO),R()(),L(7,`p`,6),G(8),R(),L(9,`ul`,7),j(10,KO,3,4,`li`,null,HO),R(),L(12,`p`,8),G(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. `),R(),k(14,qO,2,2,`p`,0),L(15,`details`,9),H(`toggle`,function(t){return x(e),S(U(2).onToggle(t))}),L(16,`summary`),G(17,`Show the spans as a table`),R(),k(18,YO,23,2,`div`,10),R()}if(e&2){let e=t,n=U(2);O(`aria-label`,n.label()),E(2),M(e.cycles),E(2),e_(`height`,e.depth*n.row,`px`),E(),M(e.blocks),E(3),K(n.readout()),E(2),M(n.kinds),E(4),A(n.dropped()?14:-1),E(4),A(n.tableOpen()?18:-1)}}function ZO(e,t){if(e&1&&(L(0,`h3`),G(1,`Spans in the picked cycles`),R(),k(2,UO,2,2,`p`,0)(3,XO,19,6)),e&2){let e,t=U();E(2),A(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var QO=22;function $O(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]}var ek=class e{cycles=$([]);names=$([]);scope=$(`the recording`);pick=lv();row=QO;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:$D[e]}));current=w(0);tableOpen=w(!1);hover=w(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:tO(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 JD(e)}kindLabel(e){return $D[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,$D[e.kind],`${JD(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${JD(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${JD(-e.start)} before it started`:`cycle ${e.cycleId} at ${JD(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=$O(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=D({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&&k(0,ZO,4,1),e&2&&A(t.hasSpans()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1428,7 +1428,7 @@ td.mono[_ngcontent-%COMP%] { .num[_ngcontent-%COMP%] { text-align: right; font-variant-numeric: tabular-nums; -}`]})};function vk(e,t){if(e&1&&(L(0,`tr`)(1,`td`,5),G(2),R(),L(3,`td`,6),G(4),R(),L(5,`td`,6),G(6),R(),L(7,`td`,6),G(8),R()()),e&2){let e=t.$implicit,n=U(3);E(2),J(``,e.name,`.`,e.hook),E(2),K(e.calls),E(2),K(n.ms(e.ms)),E(2),K(n.ms(e.maxMs))}}function yk(e,t){if(e&1&&(L(0,`div`)(1,`h3`),G(2,`Lifecycle hooks`),R(),L(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),G(7,`Hook`),R(),L(8,`th`,4),G(9,`Calls`),R(),L(10,`th`,4),G(11,`Time`),R(),L(12,`th`,4),G(13,`Slowest`),R()()(),L(14,`tbody`),j(15,vk,9,5,`tr`,null,ug),R()()()),e&2){let e=U(2);E(15),M(e.hooks())}}function bk(e,t){if(e&1&&G(0),e&2){let e=U().$implicit;q(` (`,e.listener,`) `)}}function xk(e,t){if(e&1&&(L(0,`tr`)(1,`td`,5),G(2),k(3,bk,1,1),R(),L(4,`td`,6),G(5),R(),L(6,`td`,6),G(7),R(),L(8,`td`,6),G(9),R()()),e&2){let e=t.$implicit,n=U(3);E(2),q(` `,e.name,` `),E(),A(e.listener?3:-1),E(2),K(e.calls),E(2),K(n.ms(e.ms)),E(2),K(n.ms(e.maxMs))}}function Sk(e,t){if(e&1&&(L(0,`div`)(1,`h3`),G(2,`Output listeners`),R(),L(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),G(7,`Listener`),R(),L(8,`th`,4),G(9,`Calls`),R(),L(10,`th`,4),G(11,`Time`),R(),L(12,`th`,4),G(13,`Slowest`),R()()(),L(14,`tbody`),j(15,xk,10,5,`tr`,null,ug),R()()()),e&2){let e=U(2);E(15),M(e.outputs())}}function Ck(e,t){if(e&1&&(L(0,`p`,1),G(1),R()),e&2){let e=t,n=U(2);E(),z_(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function wk(e,t){if(e&1&&(L(0,`p`,2),G(1),R()),e&2){let e=U(2);E(),J(` `,e.dropped(),` more hook or output `,e.dropped()===1?`row is`:`rows are`,` left out. A recording lists at most 100 of each. `)}}function Tk(e,t){if(e&1&&(L(0,`div`,0),k(1,yk,17,0,`div`),k(2,Sk,17,0,`div`),R(),k(3,Ck,2,4,`p`,1),k(4,wk,2,2,`p`,2)),e&2){let e,t=U();E(),A(t.hooks().length?1:-1),E(),A(t.outputs().length?2:-1),E(),A((e=t.afterRender())?3:-1,e),E(),A(t.dropped()?4:-1)}}var Ek=10;function Dk(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var Ok=class e{page=$(null);hooks=X(()=>(this.page()?.hooks??[]).slice(0,Ek));outputs=X(()=>(this.page()?.outputs??[]).slice(0,Ek));afterRender=X(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=X(()=>this.page()?.droppedTimings??0);ms(e){return Dk(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({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&&k(0,Tk,5,4),e&2&&A(t.hooks().length||t.outputs().length||t.afterRender()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})};function tk(e,t){if(e&1&&(L(0,`tr`)(1,`td`,5),G(2),R(),L(3,`td`,6),G(4),R(),L(5,`td`,6),G(6),R(),L(7,`td`,6),G(8),R()()),e&2){let e=t.$implicit,n=U(3);E(2),J(``,e.name,`.`,e.hook),E(2),K(e.calls),E(2),K(n.ms(e.ms)),E(2),K(n.ms(e.maxMs))}}function nk(e,t){if(e&1&&(L(0,`div`)(1,`h3`),G(2,`Lifecycle hooks`),R(),L(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),G(7,`Hook`),R(),L(8,`th`,4),G(9,`Calls`),R(),L(10,`th`,4),G(11,`Time`),R(),L(12,`th`,4),G(13,`Slowest`),R()()(),L(14,`tbody`),j(15,tk,9,5,`tr`,null,Qh),R()()()),e&2){let e=U(2);E(15),M(e.hooks())}}function rk(e,t){if(e&1&&G(0),e&2){let e=U().$implicit;q(` (`,e.listener,`) `)}}function ik(e,t){if(e&1&&(L(0,`tr`)(1,`td`,5),G(2),k(3,rk,1,1),R(),L(4,`td`,6),G(5),R(),L(6,`td`,6),G(7),R(),L(8,`td`,6),G(9),R()()),e&2){let e=t.$implicit,n=U(3);E(2),q(` `,e.name,` `),E(),A(e.listener?3:-1),E(2),K(e.calls),E(2),K(n.ms(e.ms)),E(2),K(n.ms(e.maxMs))}}function ak(e,t){if(e&1&&(L(0,`div`)(1,`h3`),G(2,`Output listeners`),R(),L(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),G(7,`Listener`),R(),L(8,`th`,4),G(9,`Calls`),R(),L(10,`th`,4),G(11,`Time`),R(),L(12,`th`,4),G(13,`Slowest`),R()()(),L(14,`tbody`),j(15,ik,10,5,`tr`,null,Qh),R()()()),e&2){let e=U(2);E(15),M(e.outputs())}}function ok(e,t){if(e&1&&(L(0,`p`,1),G(1),R()),e&2){let e=t,n=U(2);E(),D_(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function sk(e,t){if(e&1&&(L(0,`p`,2),G(1),R()),e&2){let e=U(2);E(),J(` `,e.dropped(),` more hook or output `,e.dropped()===1?`row is`:`rows are`,` left out. A recording lists at most 100 of each. `)}}function ck(e,t){if(e&1&&(L(0,`div`,0),k(1,nk,17,0,`div`),k(2,ak,17,0,`div`),R(),k(3,ok,2,4,`p`,1),k(4,sk,2,2,`p`,2)),e&2){let e,t=U();E(),A(t.hooks().length?1:-1),E(),A(t.outputs().length?2:-1),E(),A((e=t.afterRender())?3:-1,e),E(),A(t.dropped()?4:-1)}}var lk=10;function uk(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var dk=class e{page=$(null);hooks=X(()=>(this.page()?.hooks??[]).slice(0,lk));outputs=X(()=>(this.page()?.outputs??[]).slice(0,lk));afterRender=X(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=X(()=>this.page()?.droppedTimings??0);ms(e){return uk(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({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&&k(0,ck,5,4),e&2&&A(t.hooks().length||t.outputs().length||t.afterRender()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -1488,7 +1488,7 @@ td.mono[_ngcontent-%COMP%] { margin: 8px 0 0; color: var(--%NS%text-2); font-size: 12px; -}`]})};function kk(e,t){if(e&1&&(L(0,`p`,5),G(1),R()),e&2){let e=U();E(),K(e.error())}}function Ak(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 jk=class e{page=$(null);maxCycles=$(200);imported=xv();error=w(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&Ak(nO(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&Ak(lO(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=rO(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=D({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=z();L(0,`div`,1)(1,`button`,2),H(`click`,function(){return t.exportJson()}),G(2,`Export JSON`),R(),L(3,`button`,2),H(`click`,function(){return t.exportTrace()}),G(4,` Export trace (Perfetto) `),R(),L(5,`button`,3),H(`click`,function(){return x(e),S(Gg(8).click())}),G(6,`Import`),R(),L(7,`input`,4,0),H(`change`,function(){x(e);let n=Gg(8);return S(t.read(n))}),R()(),k(9,kk,2,1,`p`,5)}e&2&&(E(),B(`disabled`,!t.hasCycles()),E(2),B(`disabled`,!t.hasCycles()),E(6),A(t.error()?9:-1))},styles:[`[_nghost-%COMP%] { +}`]})};function fk(e,t){if(e&1&&(L(0,`p`,5),G(1),R()),e&2){let e=U();E(),K(e.error())}}function pk(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 mk=class e{page=$(null);maxCycles=$(200);imported=lv();error=w(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&pk(zD(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&pk(KD(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=BD(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=D({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=z();L(0,`div`,1)(1,`button`,2),H(`click`,function(){return t.exportJson()}),G(2,`Export JSON`),R(),L(3,`button`,2),H(`click`,function(){return t.exportTrace()}),G(4,` Export trace (Perfetto) `),R(),L(5,`button`,3),H(`click`,function(){return x(e),S(Ng(8).click())}),G(6,`Import`),R(),L(7,`input`,4,0),H(`change`,function(){x(e);let n=Ng(8);return S(t.read(n))}),R()(),k(9,fk,2,1,`p`,5)}e&2&&(E(),B(`disabled`,!t.hasCycles()),E(2),B(`disabled`,!t.hasCycles()),E(6),A(t.error()?9:-1))},styles:[`[_nghost-%COMP%] { display: contents; } @@ -1530,7 +1530,7 @@ button[_ngcontent-%COMP%]:disabled { margin: 0; color: var(--%NS%danger-text); font-size: 12px; -}`]})},Mk=(e,t)=>t.stat.name;function Nk(e,t){if(e&1&&(L(0,`span`,8),G(1),R()),e&2){let e=U(2).$implicit;E(),q(``,e.other,` more`)}}function Pk(e,t){if(e&1&&(L(0,`div`,6)(1,`span`,7),G(2),R(),k(3,Nk,2,1,`span`,8),R()),e&2){let e=U().$implicit;f_(`--%NS%tone`,e.tone+`%`),E(2),K(e.label),E(),A(e.roomy?3:-1)}}function Fk(e,t){if(e&1&&(L(0,`span`,10),G(1),R(),L(2,`span`,11),G(3),R()),e&2){let e=U(2).$implicit,t=U(2);E(),K(e.stat.name),E(2),K(t.fmt(e.stat.ms))}}function Ik(e,t){if(e&1){let e=z();L(0,`button`,9),H(`focus`,function(){x(e);let t=U().$index;return S(U(2).current.set(t))})(`click`,function(){x(e);let t=U().$implicit;return S(U(2).pick.emit(t.stat.name))}),k(1,Fk,4,2),R()}if(e&2){let e=U(),t=e.$implicit,n=e.$index,r=U(2);f_(`--%NS%tone`,t.tone+`%`),O(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),E(),A(t.roomy?1:-1)}}function Lk(e,t){if(e&1&&(L(0,`li`),k(1,Pk,4,4,`div`,4)(2,Ik,2,6,`button`,5),R()),e&2){let e=t.$implicit;f_(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),E(),A(e.other?1:2)}}function Rk(e,t){if(e&1){let e=z();L(0,`ul`,2),H(`keydown`,function(t){return x(e),S(U().onKey(t))}),j(1,Lk,3,9,`li`,3,Mk),R()}if(e&2){let e=U();O(`aria-label`,e.label()),E(),M(e.cells())}}function zk(e,t){e&1&&(L(0,`p`,1),G(1,`No component time in these cycles.`),R())}var Bk=24,Vk=3,Hk=class e{stats=$([]);scope=$(`the recording`);pick=xv();current=w(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,Bk),n=e.slice(Bk),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=hO(i,e=>e.stat.ms,Vk);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, ${dO(t.ms)}, ${r}% of self time`:`${t.name}, ${dO(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 dO(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=D({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&&k(0,Rk,3,1,`ul`,0)(1,zk,2,0,`p`,1),e&2&&A(+!t.cells().length)},styles:[`[_nghost-%COMP%] { +}`]})},hk=(e,t)=>t.stat.name;function gk(e,t){if(e&1&&(L(0,`span`,8),G(1),R()),e&2){let e=U(2).$implicit;E(),q(``,e.other,` more`)}}function _k(e,t){if(e&1&&(L(0,`div`,6)(1,`span`,7),G(2),R(),k(3,gk,2,1,`span`,8),R()),e&2){let e=U().$implicit;e_(`--%NS%tone`,e.tone+`%`),E(2),K(e.label),E(),A(e.roomy?3:-1)}}function vk(e,t){if(e&1&&(L(0,`span`,10),G(1),R(),L(2,`span`,11),G(3),R()),e&2){let e=U(2).$implicit,t=U(2);E(),K(e.stat.name),E(2),K(t.fmt(e.stat.ms))}}function yk(e,t){if(e&1){let e=z();L(0,`button`,9),H(`focus`,function(){x(e);let t=U().$index;return S(U(2).current.set(t))})(`click`,function(){x(e);let t=U().$implicit;return S(U(2).pick.emit(t.stat.name))}),k(1,vk,4,2),R()}if(e&2){let e=U(),t=e.$implicit,n=e.$index,r=U(2);e_(`--%NS%tone`,t.tone+`%`),O(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),E(),A(t.roomy?1:-1)}}function bk(e,t){if(e&1&&(L(0,`li`),k(1,_k,4,4,`div`,4)(2,yk,2,6,`button`,5),R()),e&2){let e=t.$implicit;e_(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),E(),A(e.other?1:2)}}function xk(e,t){if(e&1){let e=z();L(0,`ul`,2),H(`keydown`,function(t){return x(e),S(U().onKey(t))}),j(1,bk,3,9,`li`,3,hk),R()}if(e&2){let e=U();O(`aria-label`,e.label()),E(),M(e.cells())}}function Sk(e,t){e&1&&(L(0,`p`,1),G(1,`No component time in these cycles.`),R())}var Ck=24,wk=3,Tk=class e{stats=$([]);scope=$(`the recording`);pick=lv();current=w(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,Ck),n=e.slice(Ck),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=QD(i,e=>e.stat.ms,wk);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, ${JD(t.ms)}, ${r}% of self time`:`${t.name}, ${JD(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 JD(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=D({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&&k(0,xk,3,1,`ul`,0)(1,Sk,2,0,`p`,1),e&2&&A(+!t.cells().length)},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1606,7 +1606,7 @@ button.cell[_ngcontent-%COMP%]:focus-visible { .empty[_ngcontent-%COMP%] { margin: 8px 0; color: var(--%NS%text-2); -}`]})},Uk=(e,t)=>t.id;function Wk(e,t){if(e&1){let e=z();P(0,`button`,14),V(`click`,function(){return x(e),S(U(2).clear())}),G(1,`Clear`),F()}}function Gk(e,t){if(e&1){let e=z();P(0,`button`,11),V(`click`,function(){return x(e),S(U().toggle())}),I(1,`span`,12),G(2),F(),k(3,Wk,2,0,`button`,13)}if(e&2){let e=U();W(`on`,e.recording()),N(`disabled`,!e.pageId()),E(2),q(` `,e.recording()?`Stop recording`:`Record`,` `),E(),A(e.cycles().length?3:-1)}}function Kk(e,t){if(e&1){let e=z();P(0,`p`,6)(1,`span`,15),G(2,`Imported recording`),F(),P(3,`span`,16),G(4),F(),P(5,`button`,14),V(`click`,function(){return x(e),S(U().closeImport())}),G(6,`Back to live recording`),F()()}e&2&&(E(4),K(t.fileName))}function qk(e,t){e&1&&G(0,` An app on a device has no DOM, so checks that changed nothing are not counted there. `)}function Jk(e,t){e&1&&G(0,` A recording keeps running when the tab reloads, so it catches the next start of the app. The cycles from before the reload are gone with the old page. `)}function Yk(e,t){e&1&&(P(0,`p`,9),G(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. `),F())}function Xk(e,t){e&1&&I(0,`app-angular-unavailable`,17),e&2&&N(`page`,U(2).angularPage())}function Zk(e,t){e&1&&k(0,Yk,2,0,`p`,9)(1,Xk,1,1,`app-angular-unavailable`,17),e&2&&A(+!U().attachPending())}function Qk(e,t){e&1&&(P(0,`p`,9),G(1,`Angular profiling stays on until the page reloads.`),F())}function $k(e,t){e&1&&I(0,`app-angular-unavailable`,21),e&2&&N(`page`,U(2).angularPage())}function eA(e,t){if(e&1){let e=z();P(0,`div`,18)(1,`span`,19),G(2,`Live views`),F(),P(3,`button`,20),V(`click`,function(){x(e);let t=U();return S(t.setView(`flash`,!t.views().flash))}),I(4,`span`,12),G(5,` Flash checks `),F(),P(6,`button`,20),V(`click`,function(){x(e);let t=U();return S(t.setView(`track`,!t.views().track))}),I(7,`span`,12),G(8,` Performance track `),F(),P(9,`button`,20),V(`click`,function(){return x(e),S(U().setView(`angularProfiling`,!0))}),I(10,`span`,12),G(11,` Angular profiling `),F()(),P(12,`p`,7),G(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. `),F(),k(14,Qk,2,0,`p`,9)(15,$k,1,1,`app-angular-unavailable`,21)}if(e&2){let e=U();E(3),N(`disabled`,!e.canShowViews()),O(`aria-pressed`,e.views().flash),E(3),N(`disabled`,!e.canShowViews()),O(`aria-pressed`,e.views().track),E(3),N(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),O(`aria-pressed`,e.views().angularProfiling),E(5),A(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function tA(e,t){if(e&1&&(P(0,`p`,9),G(1),F()),e&2){let e=t.$implicit;E(),K(e)}}function nA(e,t){if(e&1&&(P(0,`p`,24),G(1),F()),e&2){let e=U(2);E(),q(` `,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 rA(e,t){e&1&&(P(0,`p`,9),G(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),F())}function iA(e,t){if(e&1){let e=z();P(0,`h3`),G(1,`Cycles`),F(),P(2,`app-cd-cycle-chart`,22),U_(`rangeChange`,function(t){x(e);let n=U();return H_(n.range,t)||(n.range=t),S(t)}),F(),P(3,`app-cd-flame-graph`,23),V(`pick`,function(t){return x(e),S(U().showComponent.emit(t))}),F(),k(4,nA,2,1,`p`,24),P(5,`h3`),G(6,`Self time by component`),F(),k(7,rA,2,0,`p`,9),P(8,`app-cd-treemap`,25),V(`pick`,function(t){return x(e),S(U().showComponent.emit(t))}),F()}if(e&2){let e=U();E(2),N(`cycles`,e.cycles())(`slowMs`,e.slowMs()),V_(`range`,e.range),E(),N(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),E(),A(e.hasSpans()?-1:4),E(3),A(e.range()?7:-1),E(),N(`stats`,e.stats())(`scope`,e.scope())}}function aA(e,t){if(e&1){let e=z();P(0,`tr`)(1,`td`,16)(2,`button`,31),V(`click`,function(){let t=x(e).$implicit;return S(U(2).showComponent.emit(t.name))}),G(3),F()(),P(4,`td`,32),G(5),F(),P(6,`td`,32),G(7),F(),P(8,`td`,32),G(9),F()()}if(e&2){let e=t.$implicit,n=U(2);E(3),q(` `,e.name,` `),E(2),K(e.checks),E(2),K(n.ms(e.ms)),E(2),K(n.ms(e.maxMs))}}function oA(e,t){e&1&&(P(0,`tr`)(1,`td`,33),G(2,`No component time in the picked cycles.`),F()())}function sA(e,t){if(e&1){let e=z();P(0,`tr`)(1,`td`,16)(2,`button`,31),V(`click`,function(){let t=x(e).$implicit;return S(U(2).showComponent.emit(t.name))}),G(3),F()(),P(4,`td`,32),G(5),F(),P(6,`td`,32),G(7),F(),P(8,`td`,32),G(9),F()()}if(e&2){let e=t.$implicit,n=U(2);E(3),q(` `,e.name,` `),E(2),K(e.checks),E(2),K(e.cycles),E(2),K(n.ms(e.ms))}}function cA(e,t){e&1&&(P(0,`tr`)(1,`td`,33),G(2,`No component checks in the picked cycles.`),F()())}function lA(e,t){if(e&1&&(P(0,`span`,35),G(1,`from `),P(2,`span`,16),G(3),F()()),e&2){let e=U(3);E(3),K(e.causeText(t))}}function uA(e,t){if(e&1&&(P(0,`span`,35),G(1,`after `),P(2,`span`,16),G(3),F()()),e&2){let e=U().$implicit;E(3),K(e.trigger)}}function dA(e,t){if(e&1&&(P(0,`span`,36),G(1),F()),e&2){let e=U().$implicit;E(),q(``,e.unchanged,` changed nothing`)}}function fA(e,t){if(e&1&&(P(0,`span`,36),G(1),F()),e&2){let e=U().$implicit,t=U(2);E(),q(`hooks `,t.ms(e.hookMs))}}function pA(e,t){if(e&1&&(P(0,`span`,36),G(1),F()),e&2){let e=U().$implicit,t=U(2);E(),q(`afterRender `,t.ms(e.afterRenderMs))}}function mA(e,t){if(e&1&&(P(0,`span`,37),G(1,` slowest `),P(2,`span`,16),G(3),F(),G(4),F()),e&2){let e=t,n=U(3);E(3),K(e.name),E(),q(` `,n.ms(e.ms),` `)}}function hA(e,t){if(e&1&&(P(0,`li`)(1,`span`,34),G(2),F(),P(3,`span`,16),G(4),F(),P(5,`span`),G(6),F(),k(7,lA,4,1,`span`,35)(8,uA,4,1,`span`,35),k(9,dA,2,1,`span`,36),k(10,fA,2,1,`span`,36),k(11,pA,2,1,`span`,36),k(12,mA,5,2,`span`,37),F()),e&2){let e,n,r=t.$implicit,i=U(2);E(2),K(i.clock(r.at)),E(2),K(i.ms(r.ms)),E(2),z_(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),E(),A((e=r.cause)?7:r.trigger?8:-1,e),E(2),A(r.unchanged?9:-1),E(),A(r.hookMs?10:-1),E(),A(r.afterRenderMs?11:-1),E(),A((n=r.components[0])?12:-1,n)}}function gA(e,t){if(e&1&&(P(0,`div`,26)(1,`div`)(2,`h3`),G(3),F(),P(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),G(8,`Component`),F(),P(9,`th`,28),G(10,`Checks`),F(),P(11,`th`,28),G(12,`Self time`),F(),P(13,`th`,28),G(14,`Slowest`),F()()(),P(15,`tbody`),j(16,aA,10,4,`tr`,null,ug,!1,oA,3,0,`tr`),F()(),P(19,`h3`),G(20),F(),P(21,`table`)(22,`thead`)(23,`tr`)(24,`th`,27),G(25,`Component`),F(),P(26,`th`,28),G(27,`Checks`),F(),P(28,`th`,28),G(29,`Cycles`),F(),P(30,`th`,28),G(31,`Self time`),F()()(),P(32,`tbody`),j(33,sA,10,4,`tr`,null,ug,!1,cA,3,0,`tr`),F()(),P(36,`p`,7),G(37,` Select a component name to show its most checked instance in the tree. `),F()(),P(38,`div`)(39,`h3`),G(40,`Latest cycles`),F(),P(41,`ol`,29),j(42,hA,13,11,`li`,null,Uk),F()()(),I(44,`app-cd-timing`,30)(45,`app-cd-diagnosis`,30)),e&2){let e=U();E(3),q(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),E(13),M(e.slowest()),E(4),q(` `,e.range()?`Most often checked in the picked cycles`:`Most often checked`,` `),E(13),M(e.busiest()),E(9),M(e.latest()),E(2),N(`page`,e.page()),E(),N(`page`,e.page())}}function _A(e,t){e&1&&(P(0,`p`,10),G(1,`Use the app. Cycles show up here as Angular runs change detection.`),F())}var vA=3e3,yA=10,bA=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);native=$(!1);angularPages=pD(()=>this.rpc());angularPage=X(()=>mD(this.angularPages(),this.pageId()));attachPending=X(()=>this.angularPage()?.capabilities.profiler===!0);showComponent=xv();range=w(null);imported=w(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=w(``);announcement=w(``);recording=X(()=>this.page()?.recording===!0);cycles=X(()=>this.page()?.cycles??[]);slowMs=X(()=>this.page()?.slowMs??16);maxCycles=X(()=>TT(this.rpc()).limits.cdCycles);picked=X(()=>fO(this.cycles(),this.range()));hasSpans=X(()=>this.picked().some(e=>e.spans?.length));spanNames=X(()=>this.page()?.spanNames??[]);stats=X(()=>this.range()?pO(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,yA));busiest=X(()=>[...this.stats()].sort((e,t)=>t.checks-e.checks).slice(0,yA));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 aD(e)}causeText(e){return JD(e)}confirming=w(null);confirmTimer;constructor(){T(()=>{let e=this.confirming();e!==null&&this.livePage()?.recording===!0===e&&Z(()=>this.confirmed(e))}),b(Os).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)},vA))}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 oT(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=D({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`],native:[1,`native`]},outputs:{showComponent:`showComponent`},decls:23,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`,`slowMs`,`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`],[`type`,`button`,1,`name-link`,3,`click`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(P(0,`section`,0)(1,`div`,1)(2,`h2`,2),G(3,`Change detection`),F(),k(4,Gk,4,5),P(5,`app-cd-transfer`,3),V(`imported`,function(e){return t.showImport(e)}),F(),P(6,`p`,4),G(7),F(),P(8,`p`,5),G(9),F()(),k(10,Kk,7,1,`p`,6),P(11,`p`,7),G(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. `),k(13,qk,1,0)(14,Jk,1,0),F(),k(15,Zk,2,1),k(16,eA,16,7),I(17,`app-limit-note`,8),j(18,tA,2,1,`p`,9,dg),k(20,iA,9,10),k(21,gA,46,6)(22,_A,2,0,`p`,10),F()),e&2){let e;E(4),A(t.imported()?-1:4),E(),N(`page`,t.page())(`maxCycles`,t.maxCycles()),E(2),K(t.status()),E(2),K(t.announcement()),E(),A((e=t.imported())?10:-1,e),E(3),A(t.native()?13:14),E(2),A(t.page()?.supported===!1?15:-1),E(),A(!t.imported()&&!t.native()?16:-1),E(),N(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),E(),M(t.capNotes()),E(2),A(t.cycles().length?20:-1),E(),A(t.page()?.components?.length?21:t.recording()?22:-1)}},dependencies:[RE,dD,Ok,BO,jk,nk,_k,Hk],styles:[`[_nghost-%COMP%] { +}`]})},Ek=(e,t)=>t.id;function Dk(e,t){if(e&1){let e=z();P(0,`button`,14),V(`click`,function(){return x(e),S(U(2).clear())}),G(1,`Clear`),F()}}function Ok(e,t){if(e&1){let e=z();P(0,`button`,11),V(`click`,function(){return x(e),S(U().toggle())}),I(1,`span`,12),G(2),F(),k(3,Dk,2,0,`button`,13)}if(e&2){let e=U();W(`on`,e.recording()),N(`disabled`,!e.pageId()),E(2),q(` `,e.recording()?`Stop recording`:`Record`,` `),E(),A(e.cycles().length?3:-1)}}function kk(e,t){if(e&1){let e=z();P(0,`p`,6)(1,`span`,15),G(2,`Imported recording`),F(),P(3,`span`,16),G(4),F(),P(5,`button`,14),V(`click`,function(){return x(e),S(U().closeImport())}),G(6,`Back to live recording`),F()()}e&2&&(E(4),K(t.fileName))}function Ak(e,t){e&1&&G(0,` An app on a device has no DOM, so checks that changed nothing are not counted there. `)}function jk(e,t){e&1&&G(0,` A recording keeps running when the tab reloads, so it catches the next start of the app. The cycles from before the reload are gone with the old page. `)}function Mk(e,t){e&1&&(P(0,`p`,9),G(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. `),F())}function Nk(e,t){e&1&&I(0,`app-angular-unavailable`,17),e&2&&N(`page`,U(2).angularPage())}function Pk(e,t){e&1&&k(0,Mk,2,0,`p`,9)(1,Nk,1,1,`app-angular-unavailable`,17),e&2&&A(+!U().attachPending())}function Fk(e,t){e&1&&(P(0,`p`,9),G(1,`Angular profiling stays on until the page reloads.`),F())}function Ik(e,t){e&1&&I(0,`app-angular-unavailable`,21),e&2&&N(`page`,U(2).angularPage())}function Lk(e,t){if(e&1){let e=z();P(0,`div`,18)(1,`span`,19),G(2,`Live views`),F(),P(3,`button`,20),V(`click`,function(){x(e);let t=U();return S(t.setView(`flash`,!t.views().flash))}),I(4,`span`,12),G(5,` Flash checks `),F(),P(6,`button`,20),V(`click`,function(){x(e);let t=U();return S(t.setView(`track`,!t.views().track))}),I(7,`span`,12),G(8,` Performance track `),F(),P(9,`button`,20),V(`click`,function(){return x(e),S(U().setView(`angularProfiling`,!0))}),I(10,`span`,12),G(11,` Angular profiling `),F()(),P(12,`p`,7),G(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. `),F(),k(14,Fk,2,0,`p`,9)(15,Ik,1,1,`app-angular-unavailable`,21)}if(e&2){let e=U();E(3),N(`disabled`,!e.canShowViews()),O(`aria-pressed`,e.views().flash),E(3),N(`disabled`,!e.canShowViews()),O(`aria-pressed`,e.views().track),E(3),N(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),O(`aria-pressed`,e.views().angularProfiling),E(5),A(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function Rk(e,t){if(e&1&&(P(0,`p`,9),G(1),F()),e&2){let e=t.$implicit;E(),K(e)}}function zk(e,t){if(e&1&&(P(0,`p`,24),G(1),F()),e&2){let e=U(2);E(),q(` `,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 Bk(e,t){e&1&&(P(0,`p`,9),G(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),F())}function Vk(e,t){if(e&1){let e=z();P(0,`h3`),G(1,`Cycles`),F(),P(2,`app-cd-cycle-chart`,22),j_(`rangeChange`,function(t){x(e);let n=U();return A_(n.range,t)||(n.range=t),S(t)}),F(),P(3,`app-cd-flame-graph`,23),V(`pick`,function(t){return x(e),S(U().showComponent.emit(t))}),F(),k(4,zk,2,1,`p`,24),P(5,`h3`),G(6,`Self time by component`),F(),k(7,Bk,2,0,`p`,9),P(8,`app-cd-treemap`,25),V(`pick`,function(t){return x(e),S(U().showComponent.emit(t))}),F()}if(e&2){let e=U();E(2),N(`cycles`,e.cycles())(`slowMs`,e.slowMs()),k_(`range`,e.range),E(),N(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),E(),A(e.hasSpans()?-1:4),E(3),A(e.range()?7:-1),E(),N(`stats`,e.stats())(`scope`,e.scope())}}function Hk(e,t){if(e&1){let e=z();P(0,`tr`)(1,`td`,16)(2,`button`,31),V(`click`,function(){let t=x(e).$implicit;return S(U(2).showComponent.emit(t.name))}),G(3),F()(),P(4,`td`,32),G(5),F(),P(6,`td`,32),G(7),F(),P(8,`td`,32),G(9),F()()}if(e&2){let e=t.$implicit,n=U(2);E(3),q(` `,e.name,` `),E(2),K(e.checks),E(2),K(n.ms(e.ms)),E(2),K(n.ms(e.maxMs))}}function Uk(e,t){e&1&&(P(0,`tr`)(1,`td`,33),G(2,`No component time in the picked cycles.`),F()())}function Wk(e,t){if(e&1){let e=z();P(0,`tr`)(1,`td`,16)(2,`button`,31),V(`click`,function(){let t=x(e).$implicit;return S(U(2).showComponent.emit(t.name))}),G(3),F()(),P(4,`td`,32),G(5),F(),P(6,`td`,32),G(7),F(),P(8,`td`,32),G(9),F()()}if(e&2){let e=t.$implicit,n=U(2);E(3),q(` `,e.name,` `),E(2),K(e.checks),E(2),K(e.cycles),E(2),K(n.ms(e.ms))}}function Gk(e,t){e&1&&(P(0,`tr`)(1,`td`,33),G(2,`No component checks in the picked cycles.`),F()())}function Kk(e,t){if(e&1&&(P(0,`span`,35),G(1,`from `),P(2,`span`,16),G(3),F()()),e&2){let e=U(3);E(3),K(e.causeText(t))}}function qk(e,t){if(e&1&&(P(0,`span`,35),G(1,`after `),P(2,`span`,16),G(3),F()()),e&2){let e=U().$implicit;E(3),K(e.trigger)}}function Jk(e,t){if(e&1&&(P(0,`span`,36),G(1),F()),e&2){let e=U().$implicit;E(),q(``,e.unchanged,` changed nothing`)}}function Yk(e,t){if(e&1&&(P(0,`span`,36),G(1),F()),e&2){let e=U().$implicit,t=U(2);E(),q(`hooks `,t.ms(e.hookMs))}}function Xk(e,t){if(e&1&&(P(0,`span`,36),G(1),F()),e&2){let e=U().$implicit,t=U(2);E(),q(`afterRender `,t.ms(e.afterRenderMs))}}function Zk(e,t){if(e&1&&(P(0,`span`,37),G(1,` slowest `),P(2,`span`,16),G(3),F(),G(4),F()),e&2){let e=t,n=U(3);E(3),K(e.name),E(),q(` `,n.ms(e.ms),` `)}}function Qk(e,t){if(e&1&&(P(0,`li`)(1,`span`,34),G(2),F(),P(3,`span`,16),G(4),F(),P(5,`span`),G(6),F(),k(7,Kk,4,1,`span`,35)(8,qk,4,1,`span`,35),k(9,Jk,2,1,`span`,36),k(10,Yk,2,1,`span`,36),k(11,Xk,2,1,`span`,36),k(12,Zk,5,2,`span`,37),F()),e&2){let e,n,r=t.$implicit,i=U(2);E(2),K(i.clock(r.at)),E(2),K(i.ms(r.ms)),E(2),D_(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),E(),A((e=r.cause)?7:r.trigger?8:-1,e),E(2),A(r.unchanged?9:-1),E(),A(r.hookMs?10:-1),E(),A(r.afterRenderMs?11:-1),E(),A((n=r.components[0])?12:-1,n)}}function $k(e,t){if(e&1&&(P(0,`div`,26)(1,`div`)(2,`h3`),G(3),F(),P(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),G(8,`Component`),F(),P(9,`th`,28),G(10,`Checks`),F(),P(11,`th`,28),G(12,`Self time`),F(),P(13,`th`,28),G(14,`Slowest`),F()()(),P(15,`tbody`),j(16,Hk,10,4,`tr`,null,Qh,!1,Uk,3,0,`tr`),F()(),P(19,`h3`),G(20),F(),P(21,`table`)(22,`thead`)(23,`tr`)(24,`th`,27),G(25,`Component`),F(),P(26,`th`,28),G(27,`Checks`),F(),P(28,`th`,28),G(29,`Cycles`),F(),P(30,`th`,28),G(31,`Self time`),F()()(),P(32,`tbody`),j(33,Wk,10,4,`tr`,null,Qh,!1,Gk,3,0,`tr`),F()(),P(36,`p`,7),G(37,` Select a component name to show its most checked instance in the tree. `),F()(),P(38,`div`)(39,`h3`),G(40,`Latest cycles`),F(),P(41,`ol`,29),j(42,Qk,13,11,`li`,null,Ek),F()()(),I(44,`app-cd-timing`,30)(45,`app-cd-diagnosis`,30)),e&2){let e=U();E(3),q(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),E(13),M(e.slowest()),E(4),q(` `,e.range()?`Most often checked in the picked cycles`:`Most often checked`,` `),E(13),M(e.busiest()),E(9),M(e.latest()),E(2),N(`page`,e.page()),E(),N(`page`,e.page())}}function eA(e,t){e&1&&(P(0,`p`,10),G(1,`Use the app. Cycles show up here as Angular runs change detection.`),F())}var tA=3e3,nA=10,rA=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);native=$(!1);angularPages=XE(()=>this.rpc());angularPage=X(()=>ZE(this.angularPages(),this.pageId()));attachPending=X(()=>this.angularPage()?.capabilities.profiler===!0);showComponent=lv();range=w(null);imported=w(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=w(``);announcement=w(``);recording=X(()=>this.page()?.recording===!0);cycles=X(()=>this.page()?.cycles??[]);slowMs=X(()=>this.page()?.slowMs??16);maxCycles=X(()=>sT(this.rpc()).limits.cdCycles);picked=X(()=>YD(this.cycles(),this.range()));hasSpans=X(()=>this.picked().some(e=>e.spans?.length));spanNames=X(()=>this.page()?.spanNames??[]);stats=X(()=>this.range()?XD(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,nA));busiest=X(()=>[...this.stats()].sort((e,t)=>t.checks-e.checks).slice(0,nA));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 HE(e)}causeText(e){return jD(e)}confirming=w(null);confirmTimer;constructor(){T(()=>{let e=this.confirming();e!==null&&this.livePage()?.recording===!0===e&&Z(()=>this.confirmed(e))}),b(ys).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)},tA))}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 Hw(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=D({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`],native:[1,`native`]},outputs:{showComponent:`showComponent`},decls:23,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`,`slowMs`,`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`],[`type`,`button`,1,`name-link`,3,`click`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(P(0,`section`,0)(1,`div`,1)(2,`h2`,2),G(3,`Change detection`),F(),k(4,Ok,4,5),P(5,`app-cd-transfer`,3),V(`imported`,function(e){return t.showImport(e)}),F(),P(6,`p`,4),G(7),F(),P(8,`p`,5),G(9),F()(),k(10,kk,7,1,`p`,6),P(11,`p`,7),G(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. `),k(13,Ak,1,0)(14,jk,1,0),F(),k(15,Pk,2,1),k(16,Lk,16,7),I(17,`app-limit-note`,8),j(18,Rk,2,1,`p`,9,$h),k(20,Vk,9,10),k(21,$k,46,6)(22,eA,2,0,`p`,10),F()),e&2){let e;E(4),A(t.imported()?-1:4),E(),N(`page`,t.page())(`maxCycles`,t.maxCycles()),E(2),K(t.status()),E(2),K(t.announcement()),E(),A((e=t.imported())?10:-1,e),E(3),A(t.native()?13:14),E(2),A(t.page()?.supported===!1?15:-1),E(),A(!t.imported()&&!t.native()?16:-1),E(),N(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),E(),M(t.capNotes()),E(2),A(t.cycles().length?20:-1),E(),A(t.page()?.components?.length?21:t.recording()?22:-1)}},dependencies:[xE,JE,dk,CO,mk,zO,ek,Tk],styles:[`[_nghost-%COMP%] { display: block; margin-top: 16px; } @@ -1832,7 +1832,7 @@ td.mono[_ngcontent-%COMP%] { .trigger[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%], .top[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%] { overflow-wrap: anywhere; -}`]})},xA=(e,t)=>t.block.id,SA=(e,t)=>t.kind,CA=(e,t)=>t.id;function wA(e,t){if(e&1&&G(0),e&2){let e=U().$implicit;q(` `,e.label,` `)}}function TA(e,t){if(e&1&&(G(0),L(1,`span`,18),G(2),R()),e&2){let e=U().$implicit;q(` `,e.kind,` `),E(2),q(``,e.seconds,`s`)}}function EA(e,t){if(e&1&&(L(0,`span`,9),k(1,wA,1,1)(2,TA,3,2),R()),e&2){let e=t.$implicit;p_(`note-`+e.kind),O(`title`,e.text),E(),A(e.seconds===void 0?1:2)}}function DA(e,t){if(e&1&&(L(0,`span`,9),G(1),R()),e&2){let e=U().$implicit;O(`title`,e.block.hydratedAt===void 0?`The block hydrated before the devtools attached to the page.`:null),E(),K(e.hydrated)}}function OA(e,t){e&1&&(L(0,`span`,9),G(1,`@error block`),R())}function kA(e,t){if(e&1&&(L(0,`span`,10),G(1),R()),e&2){let e=U().$implicit;E(),K(e.timings)}}function AA(e,t){e&1&&(L(0,`span`,11),G(1,`mismatch`),R())}function jA(e,t){if(e&1&&(L(0,`dt`),G(1,`Template of`),R(),L(2,`dd`,19),G(3),R()),e&2){let e=t;E(3),J(``,e.name,` <`,e.tag,`>`)}}function MA(e,t){if(e&1&&(L(0,`dt`),G(1,`In this state since`),R(),L(2,`dd`),G(3),R()),e&2){let e=U(2).$implicit,t=U(2);E(3),K(t.clock(e.block.since))}}function NA(e,t){if(e&1&&(L(0,`dt`),G(1,`Hydrated`),R(),L(2,`dd`),G(3),R()),e&2){let e=U(2).$implicit,t=U(2);E(3),q(` `,e.block.hydratedAt===void 0?`Before the devtools attached`:t.clock(e.block.hydratedAt),` `)}}function PA(e,t){if(e&1&&(L(0,`span`,23),G(1),R()),e&2){let e=U().$implicit;E(),K(e.hydration)}}function FA(e,t){if(e&1&&(L(0,`li`)(1,`span`,22),G(2),R(),L(3,`span`,19),G(4),R(),k(5,PA,2,1,`span`,23),R()),e&2){let e=t.$implicit,n=U(5);E(2),K(n.clock(e.at)),E(2),K(e.state),E(),A(e.hydration===`not-configured`?-1:5)}}function IA(e,t){if(e&1&&(L(0,`h3`,20),G(1,`Transitions`),R(),L(2,`ol`,21),j(3,FA,6,3,`li`,null,ug),R()),e&2){let e=U(2).$implicit;E(3),M(e.block.transitions)}}function LA(e,t){if(e&1){let e=z();L(0,`li`)(1,`button`,25),H(`click`,function(){let t=x(e).$implicit;return S(U(5).showNode.emit(t.id))}),G(2),L(3,`span`,19),G(4),R()()()}if(e&2){let e=t.$implicit;E(2),q(` Show `,e.name,` `),E(2),q(`<`,e.tag,`>`)}}function RA(e,t){if(e&1&&(L(0,`h3`,20),G(1,`Hydration mismatches`),R(),L(2,`ul`,24),j(3,LA,5,2,`li`,null,CA),R()),e&2){let e=U(2).$implicit;E(3),M(e.mismatches)}}function zA(e,t){if(e&1&&(L(0,`div`,17)(1,`dl`)(2,`dt`),G(3,`Block`),R(),L(4,`dd`,19),G(5),R(),k(6,jA,4,2),k(7,MA,4,1),k(8,NA,4,1),L(9,`dt`),G(10,`Root elements`),R(),L(11,`dd`),G(12),R(),L(13,`dt`),G(14,`Triggers`),R(),L(15,`dd`,19),G(16),R()(),k(17,IA,5,0),k(18,RA,5,0),R()),e&2){let e,t=U().$implicit;B(`id`,`defer-detail-`+t.block.id),E(5),K(t.block.id),E(),A((e=t.block.owner)?6:-1,e),E(),A(t.block.since?7:-1),E(),A(t.block.hydration===`hydrated`?8:-1),E(4),K(t.block.rootIds.length||`None rendered`),E(4),K(t.block.triggers.join(`, `)||`None`),E(),A(t.block.transitions?.length?17:-1),E(),A(t.mismatches.length?18:-1)}}function BA(e,t){if(e&1){let e=z();L(0,`li`,4)(1,`button`,5),H(`click`,function(){let t=x(e).$implicit;return S(U(2).showOwner.emit(t.block))})(`focus`,function(){let t=x(e).$implicit;return S(U(2).highlight.emit(t.block))})(`blur`,function(){return x(e),S(U(2).highlight.emit(null))})(`mouseenter`,function(){let t=x(e).$implicit;return S(U(2).highlight.emit(t.block))})(`mouseleave`,function(){return x(e),S(U(2).highlight.emit(null))}),L(2,`span`,6),G(3),R(),L(4,`span`,7),G(5),R(),j(6,EA,3,4,`span`,8,SA),k(8,DA,2,2,`span`,9),k(9,OA,2,0,`span`,9),k(10,kA,2,1,`span`,10),k(11,AA,2,0,`span`,11),L(12,`span`,12),G(13),R()(),L(14,`button`,13),H(`click`,function(){let t=x(e).$implicit;return S(U(2).toggle(t.block.id))}),C(),L(15,`svg`,14),Sg(16,`path`,15),R(),ys(),L(17,`span`,16),G(18),R()(),k(19,zA,19,9,`div`,17),R()}if(e&2){let e=t.$implicit,n=U(2);E(),O(`aria-disabled`,e.block.owner?null:`true`),E(2),K(e.block.owner?.name??`Unknown component`),E(),p_(`defer-state-`+e.block.state),E(),K(e.block.state),E(),M(e.notes),E(2),A(e.hydrated?8:-1),E(),A(e.block.hasErrorBlock?9:-1),E(),A(e.timings?10:-1),E(),A(e.mismatches.length?11:-1),E(2),K(e.block.triggers.join(`, `)||`no triggers`),E(),O(`aria-expanded`,n.isOpen(e.block.id))(`aria-controls`,n.isOpen(e.block.id)?`defer-detail-`+e.block.id:null),E(4),q(`Details of the block in `,e.block.owner?.name??`an unknown component`),E(),A(n.isOpen(e.block.id)?19:-1)}}function VA(e,t){if(e&1&&(L(0,`section`,0)(1,`h2`,1),G(2,` Defer blocks `),L(3,`span`,2),G(4),R()(),L(5,`ul`,3),j(6,BA,20,14,`li`,4,xA),R()()),e&2){let e=U();E(4),J(``,e.rows().length,``,e.truncated()?`+`:``),E(2),M(e.rows())}}function HA(e){return e<1e3?`${e}ms`:`${Number((e/1e3).toFixed(2))}s`}function UA(e){let t=[],n=e.placeholder?.minimumTime;n!=null&&t.push(`placeholder min ${HA(n)}`);let r=[e.loading?.afterTime==null?``:`after ${HA(e.loading.afterTime)}`,e.loading?.minimumTime==null?``:`min ${HA(e.loading.minimumTime)}`].filter(Boolean);return r.length&&t.push(`loading ${r.join(`, `)}`),t.join(` · `)}var WA=class e{blocks=$([]);truncated=$(!1);clockOffset=$(0);showOwner=xv();mismatches=$([]);showNode=xv();open=w(new Set);highlight=xv();now=w(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:Zw({...t,since:t.since||e},e),timings:UA(t),mismatches:this.mismatches().filter(e=>t.rootIds.includes(e.id)),hydrated:t.hydration===`hydrated`?Jw(t):``}))});isOpen(e){return this.open().has(e)}toggle(e){this.open.update(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})}clock(e){return aD(e)}constructor(){let e,t=()=>{clearInterval(e),e=void 0};T(()=>{if(!this.waiting())return t();e===void 0&&(this.now.set(Date.now()),e=setInterval(()=>this.now.set(Date.now()),1e3))}),b(Os).onDestroy(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`app-defer-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],clockOffset:[1,`clockOffset`],mismatches:[1,`mismatches`]},outputs:{showOwner:`showOwner`,showNode:`showNode`,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`],[1,`defer-item`],[`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,`flag`,`note-failed`],[1,`triggers`,`mono`],[`type`,`button`,1,`defer-toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m9 6 6 6-6 6`],[1,`sr-only`],[1,`defer-detail`,3,`id`],[`aria-hidden`,`true`],[1,`mono`],[1,`detail-label`],[1,`transitions`],[1,`when`],[1,`muted`],[1,`mismatch-links`],[`type`,`button`,3,`click`]],template:function(e,t){e&1&&k(0,VA,8,2,`section`,0),e&2&&A(t.rows().length?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},iA=(e,t)=>t.block.id,aA=(e,t)=>t.kind,oA=(e,t)=>t.id;function sA(e,t){if(e&1&&G(0),e&2){let e=U().$implicit;q(` `,e.label,` `)}}function cA(e,t){if(e&1&&(G(0),L(1,`span`,18),G(2),R()),e&2){let e=U().$implicit;q(` `,e.kind,` `),E(2),q(``,e.seconds,`s`)}}function lA(e,t){if(e&1&&(L(0,`span`,9),k(1,sA,1,1)(2,cA,3,2),R()),e&2){let e=t.$implicit;t_(`note-`+e.kind),O(`title`,e.text),E(),A(e.seconds===void 0?1:2)}}function uA(e,t){if(e&1&&(L(0,`span`,9),G(1),R()),e&2){let e=U().$implicit;O(`title`,e.block.hydratedAt===void 0?`The block hydrated before the devtools attached to the page.`:null),E(),K(e.hydrated)}}function dA(e,t){e&1&&(L(0,`span`,9),G(1,`@error block`),R())}function fA(e,t){if(e&1&&(L(0,`span`,10),G(1),R()),e&2){let e=U().$implicit;E(),K(e.timings)}}function pA(e,t){e&1&&(L(0,`span`,11),G(1,`mismatch`),R())}function mA(e,t){if(e&1&&(L(0,`dt`),G(1,`Template of`),R(),L(2,`dd`,19),G(3),R()),e&2){let e=t;E(3),J(``,e.name,` <`,e.tag,`>`)}}function hA(e,t){if(e&1&&(L(0,`dt`),G(1,`In this state since`),R(),L(2,`dd`),G(3),R()),e&2){let e=U(2).$implicit,t=U(2);E(3),K(t.clock(e.block.since))}}function gA(e,t){if(e&1&&(L(0,`dt`),G(1,`Hydrated`),R(),L(2,`dd`),G(3),R()),e&2){let e=U(2).$implicit,t=U(2);E(3),q(` `,e.block.hydratedAt===void 0?`Before the devtools attached`:t.clock(e.block.hydratedAt),` `)}}function _A(e,t){if(e&1&&(L(0,`span`,23),G(1),R()),e&2){let e=U().$implicit;E(),K(e.hydration)}}function vA(e,t){if(e&1&&(L(0,`li`)(1,`span`,22),G(2),R(),L(3,`span`,19),G(4),R(),k(5,_A,2,1,`span`,23),R()),e&2){let e=t.$implicit,n=U(5);E(2),K(n.clock(e.at)),E(2),K(e.state),E(),A(e.hydration===`not-configured`?-1:5)}}function yA(e,t){if(e&1&&(L(0,`h3`,20),G(1,`Transitions`),R(),L(2,`ol`,21),j(3,vA,6,3,`li`,null,Qh),R()),e&2){let e=U(2).$implicit;E(3),M(e.block.transitions)}}function bA(e,t){if(e&1){let e=z();L(0,`li`)(1,`button`,25),H(`click`,function(){let t=x(e).$implicit;return S(U(5).showNode.emit(t.id))}),G(2),L(3,`span`,19),G(4),R()()()}if(e&2){let e=t.$implicit;E(2),q(` Show `,e.name,` `),E(2),q(`<`,e.tag,`>`)}}function xA(e,t){if(e&1&&(L(0,`h3`,20),G(1,`Hydration mismatches`),R(),L(2,`ul`,24),j(3,bA,5,2,`li`,null,oA),R()),e&2){let e=U(2).$implicit;E(3),M(e.mismatches)}}function SA(e,t){if(e&1&&(L(0,`div`,17)(1,`dl`)(2,`dt`),G(3,`Block`),R(),L(4,`dd`,19),G(5),R(),k(6,mA,4,2),k(7,hA,4,1),k(8,gA,4,1),L(9,`dt`),G(10,`Root elements`),R(),L(11,`dd`),G(12),R(),L(13,`dt`),G(14,`Triggers`),R(),L(15,`dd`,19),G(16),R()(),k(17,yA,5,0),k(18,xA,5,0),R()),e&2){let e,t=U().$implicit;B(`id`,`defer-detail-`+t.block.id),E(5),K(t.block.id),E(),A((e=t.block.owner)?6:-1,e),E(),A(t.block.since?7:-1),E(),A(t.block.hydration===`hydrated`?8:-1),E(4),K(t.block.rootIds.length||`None rendered`),E(4),K(t.block.triggers.join(`, `)||`None`),E(),A(t.block.transitions?.length?17:-1),E(),A(t.mismatches.length?18:-1)}}function CA(e,t){if(e&1){let e=z();L(0,`li`,4)(1,`button`,5),H(`click`,function(){let t=x(e).$implicit;return S(U(2).showOwner.emit(t.block))})(`focus`,function(){let t=x(e).$implicit;return S(U(2).highlight.emit(t.block))})(`blur`,function(){return x(e),S(U(2).highlight.emit(null))})(`mouseenter`,function(){let t=x(e).$implicit;return S(U(2).highlight.emit(t.block))})(`mouseleave`,function(){return x(e),S(U(2).highlight.emit(null))}),L(2,`span`,6),G(3),R(),L(4,`span`,7),G(5),R(),j(6,lA,3,4,`span`,8,aA),k(8,uA,2,2,`span`,9),k(9,dA,2,0,`span`,9),k(10,fA,2,1,`span`,10),k(11,pA,2,0,`span`,11),L(12,`span`,12),G(13),R()(),L(14,`button`,13),H(`click`,function(){let t=x(e).$implicit;return S(U(2).toggle(t.block.id))}),C(),L(15,`svg`,14),ug(16,`path`,15),R(),ds(),L(17,`span`,16),G(18),R()(),k(19,SA,19,9,`div`,17),R()}if(e&2){let e=t.$implicit,n=U(2);E(),O(`aria-disabled`,e.block.owner?null:`true`),E(2),K(e.block.owner?.name??`Unknown component`),E(),t_(`defer-state-`+e.block.state),E(),K(e.block.state),E(),M(e.notes),E(2),A(e.hydrated?8:-1),E(),A(e.block.hasErrorBlock?9:-1),E(),A(e.timings?10:-1),E(),A(e.mismatches.length?11:-1),E(2),K(e.block.triggers.join(`, `)||`no triggers`),E(),O(`aria-expanded`,n.isOpen(e.block.id))(`aria-controls`,n.isOpen(e.block.id)?`defer-detail-`+e.block.id:null),E(4),q(`Details of the block in `,e.block.owner?.name??`an unknown component`),E(),A(n.isOpen(e.block.id)?19:-1)}}function wA(e,t){if(e&1&&(L(0,`section`,0)(1,`h2`,1),G(2,` Defer blocks `),L(3,`span`,2),G(4),R()(),L(5,`ul`,3),j(6,CA,20,14,`li`,4,iA),R()()),e&2){let e=U();E(4),J(``,e.rows().length,``,e.truncated()?`+`:``),E(2),M(e.rows())}}function TA(e){return e<1e3?`${e}ms`:`${Number((e/1e3).toFixed(2))}s`}function EA(e){let t=[],n=e.placeholder?.minimumTime;n!=null&&t.push(`placeholder min ${TA(n)}`);let r=[e.loading?.afterTime==null?``:`after ${TA(e.loading.afterTime)}`,e.loading?.minimumTime==null?``:`min ${TA(e.loading.minimumTime)}`].filter(Boolean);return r.length&&t.push(`loading ${r.join(`, `)}`),t.join(` · `)}var DA=class e{blocks=$([]);truncated=$(!1);clockOffset=$(0);showOwner=lv();mismatches=$([]);showNode=lv();open=w(new Set);highlight=lv();now=w(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:Nw({...t,since:t.since||e},e),timings:EA(t),mismatches:this.mismatches().filter(e=>t.rootIds.includes(e.id)),hydrated:t.hydration===`hydrated`?Aw(t):``}))});isOpen(e){return this.open().has(e)}toggle(e){this.open.update(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})}clock(e){return HE(e)}constructor(){let e,t=()=>{clearInterval(e),e=void 0};T(()=>{if(!this.waiting())return t();e===void 0&&(this.now.set(Date.now()),e=setInterval(()=>this.now.set(Date.now()),1e3))}),b(ys).onDestroy(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`app-defer-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],clockOffset:[1,`clockOffset`],mismatches:[1,`mismatches`]},outputs:{showOwner:`showOwner`,showNode:`showNode`,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`],[1,`defer-item`],[`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,`flag`,`note-failed`],[1,`triggers`,`mono`],[`type`,`button`,1,`defer-toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m9 6 6 6-6 6`],[1,`sr-only`],[1,`defer-detail`,3,`id`],[`aria-hidden`,`true`],[1,`mono`],[1,`detail-label`],[1,`transitions`],[1,`when`],[1,`muted`],[1,`mismatch-links`],[`type`,`button`,3,`click`]],template:function(e,t){e&1&&k(0,wA,8,2,`section`,0),e&2&&A(t.rows().length?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -2070,7 +2070,7 @@ td.mono[_ngcontent-%COMP%] { min-width: 0; text-overflow: ellipsis; white-space: nowrap; -}`]})},GA=(e,t)=>t.id;function KA(e,t){if(e&1&&(P(0,`p`,4),G(1),F()),e&2){let e=U(2);E(),q(`The page has more @for blocks than the `,e.length,` listed.`)}}function qA(e,t){e&1&&(P(0,`span`,9),G(1,`@empty showing`),F())}function JA(e,t){e&1&&(P(0,`span`,10),G(1,`@empty`),F())}function YA(e,t){e&1&&(P(0,`span`,10),G(1,`renders nothing`),F())}function XA(e,t){if(e&1){let e=z();P(0,`li`)(1,`button`,6),V(`click`,function(){let t=x(e).$implicit;return S(U(3).showOwner.emit(t))})(`focus`,function(){let t=x(e).$implicit,n=U(3);return S(n.highlight.emit(n.target(t)))})(`blur`,function(){return x(e),S(U(3).highlight.emit(null))})(`mouseenter`,function(){let t=x(e).$implicit,n=U(3);return S(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return x(e),S(U(3).highlight.emit(null))}),P(2,`span`,7),G(3),F(),P(4,`span`,8),G(5),F(),k(6,qA,2,0,`span`,9)(7,JA,2,0,`span`,10)(8,YA,2,0,`span`,10),P(9,`span`,11),G(10),F()()()}if(e&2){let e=t.$implicit,n=U(3);E(),O(`aria-disabled`,e.owner?null:`true`),E(2),K(e.owner?.name??`Unknown component`),E(2),J(` `,e.count,` `,e.count===1?`item`:`items`,` `),E(),A(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),E(4),K(n.trackLabel(e))}}function ZA(e,t){if(e&1&&(P(0,`section`,1)(1,`h2`,2),G(2,` @for blocks `),P(3,`span`,3),G(4),F()(),k(5,KA,2,1,`p`,4),P(6,`ul`,5),j(7,XA,11,6,`li`,null,GA),F()()),e&2){let e=U(),t=U();E(4),K(t.truncated()?e.length+`+`:e.length),E(),A(t.truncated()?5:-1),E(2),M(e)}}function QA(e,t){e&1&&k(0,ZA,9,2,`section`,1),e&2&&A(t.length?0:-1)}function $A(e,t){e&1&&I(0,`app-angular-unavailable`,0),e&2&&N(`page`,U().angular())}var ej={$index:`track $index`,item:`track item`,function:`track expression`},tj=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?ej[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({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&&k(0,QA,1,1)(1,$A,1,1,`app-angular-unavailable`,0),e&2){let e;A((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},dependencies:[RE],styles:[`[_nghost-%COMP%] { +}`]})},OA=(e,t)=>t.id;function kA(e,t){if(e&1&&(P(0,`p`,4),G(1),F()),e&2){let e=U(2);E(),q(`The page has more @for blocks than the `,e.length,` listed.`)}}function AA(e,t){e&1&&(P(0,`span`,9),G(1,`@empty showing`),F())}function jA(e,t){e&1&&(P(0,`span`,10),G(1,`@empty`),F())}function MA(e,t){e&1&&(P(0,`span`,10),G(1,`renders nothing`),F())}function NA(e,t){if(e&1){let e=z();P(0,`li`)(1,`button`,6),V(`click`,function(){let t=x(e).$implicit;return S(U(3).showOwner.emit(t))})(`focus`,function(){let t=x(e).$implicit,n=U(3);return S(n.highlight.emit(n.target(t)))})(`blur`,function(){return x(e),S(U(3).highlight.emit(null))})(`mouseenter`,function(){let t=x(e).$implicit,n=U(3);return S(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return x(e),S(U(3).highlight.emit(null))}),P(2,`span`,7),G(3),F(),P(4,`span`,8),G(5),F(),k(6,AA,2,0,`span`,9)(7,jA,2,0,`span`,10)(8,MA,2,0,`span`,10),P(9,`span`,11),G(10),F()()()}if(e&2){let e=t.$implicit,n=U(3);E(),O(`aria-disabled`,e.owner?null:`true`),E(2),K(e.owner?.name??`Unknown component`),E(2),J(` `,e.count,` `,e.count===1?`item`:`items`,` `),E(),A(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),E(4),K(n.trackLabel(e))}}function PA(e,t){if(e&1&&(P(0,`section`,1)(1,`h2`,2),G(2,` @for blocks `),P(3,`span`,3),G(4),F()(),k(5,kA,2,1,`p`,4),P(6,`ul`,5),j(7,NA,11,6,`li`,null,OA),F()()),e&2){let e=U(),t=U();E(4),K(t.truncated()?e.length+`+`:e.length),E(),A(t.truncated()?5:-1),E(2),M(e)}}function FA(e,t){e&1&&k(0,PA,9,2,`section`,1),e&2&&A(t.length?0:-1)}function IA(e,t){e&1&&I(0,`app-angular-unavailable`,0),e&2&&N(`page`,U().angular())}var LA={$index:`track $index`,item:`track item`,function:`track expression`},RA=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);angular=$(null);showOwner=lv();highlight=lv();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?LA[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({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&&k(0,FA,1,1)(1,IA,1,1,`app-angular-unavailable`,0),e&2){let e;A((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},dependencies:[xE],styles:[`[_nghost-%COMP%] { display: block; } @@ -2188,7 +2188,7 @@ td.mono[_ngcontent-%COMP%] { min-width: 0; text-overflow: ellipsis; white-space: nowrap; -}`]})},nj=(e,t)=>t.key,rj=(e,t)=>t.id;function ij(e,t){e&1&&(L(0,`p`,2),G(1,` The HTML came from the server, but no component was hydrated, so the app rendered again on the client. Add `),L(2,`code`),G(3,`provideClientHydration()`),R(),G(4,` and use a development build to see each component's status. `),R())}function aj(e,t){if(e&1&&(L(0,`li`)(1,`span`,9),G(2),R(),G(3),R()),e&2){let e=t.$implicit;p_(`count count-`+e.key),E(2),K(e.value),E(),q(` `,e.label,` `)}}function oj(e,t){if(e&1&&(L(0,`span`,15),G(1,`Expected `),L(2,`code`),G(3),R()()),e&2){let e=U().$implicit;E(3),K(e.expected)}}function sj(e,t){if(e&1&&(L(0,`span`,15),G(1,`Found `),L(2,`code`),G(3),R()()),e&2){let e=U().$implicit;E(3),K(e.actual)}}function cj(e,t){if(e&1){let e=z();L(0,`li`)(1,`button`,12),H(`click`,function(){let t=x(e).$implicit;return S(U(4).showNode.emit(t.id))})(`focus`,function(){let t=x(e).$implicit;return S(U(4).highlight.emit(t.id))})(`blur`,function(){return x(e),S(U(4).highlight.emit(null))})(`mouseenter`,function(){let t=x(e).$implicit;return S(U(4).highlight.emit(t.id))})(`mouseleave`,function(){return x(e),S(U(4).highlight.emit(null))}),L(2,`span`,13),G(3),R(),L(4,`span`,14),G(5),R(),k(6,oj,4,1,`span`,15),k(7,sj,4,1,`span`,15),R()()}if(e&2){let e=t.$implicit;E(3),K(e.name),E(2),q(`<`,e.tag,`>`),E(),A(e.expected?6:-1),E(),A(e.actual?7:-1)}}function lj(e,t){if(e&1&&(L(0,`h3`,10),G(1,`Mismatches`),R(),L(2,`ul`,11),j(3,cj,8,4,`li`,null,rj),R()),e&2){let e=U(2);E(3),M(e.mismatches)}}function uj(e,t){if(e&1){let e=z();L(0,`div`,3)(1,`ul`,4),j(2,aj,4,4,`li`,5,nj),R(),L(4,`button`,6),H(`click`,function(){return x(e),S(U(2).toggleOverlay())}),C(),L(5,`svg`,7),Sg(6,`rect`,8),R(),G(7,` Outline on page `),R()(),k(8,lj,5,0)}if(e&2){let e=U(),t=U();E(2),M(t.counts()),E(2),O(`aria-pressed`,t.overlayOn()),E(4),A(e.mismatches.length?8:-1)}}function dj(e,t){e&1&&k(0,ij,5,0,`p`,2)(1,uj,9,2),e&2&&A(+!!t.hydrated)}function fj(e,t){e&1&&(L(0,`p`,2),G(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),L(2,`code`),G(3,`provideClientHydration()`),R(),G(4,`, each component shows whether it was hydrated, skipped or mismatched. `),R())}var pj=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=D({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&&(L(0,`section`,0)(1,`h2`,1),G(2,`Hydration`),R(),k(3,dj,2,1)(4,fj,5,0,`p`,2),R()),e&2){let e;E(3),A((e=t.report())?3:4,e)}},styles:[`.hydration[_ngcontent-%COMP%] { +}`]})},zA=(e,t)=>t.key,BA=(e,t)=>t.id;function VA(e,t){e&1&&(L(0,`p`,2),G(1,` The HTML came from the server, but no component was hydrated, so the app rendered again on the client. Add `),L(2,`code`),G(3,`provideClientHydration()`),R(),G(4,` and use a development build to see each component's status. `),R())}function HA(e,t){if(e&1&&(L(0,`li`)(1,`span`,9),G(2),R(),G(3),R()),e&2){let e=t.$implicit;t_(`count count-`+e.key),E(2),K(e.value),E(),q(` `,e.label,` `)}}function UA(e,t){if(e&1&&(L(0,`span`,15),G(1,`Expected `),L(2,`code`),G(3),R()()),e&2){let e=U().$implicit;E(3),K(e.expected)}}function WA(e,t){if(e&1&&(L(0,`span`,15),G(1,`Found `),L(2,`code`),G(3),R()()),e&2){let e=U().$implicit;E(3),K(e.actual)}}function GA(e,t){if(e&1){let e=z();L(0,`li`)(1,`button`,12),H(`click`,function(){let t=x(e).$implicit;return S(U(4).showNode.emit(t.id))})(`focus`,function(){let t=x(e).$implicit;return S(U(4).highlight.emit(t.id))})(`blur`,function(){return x(e),S(U(4).highlight.emit(null))})(`mouseenter`,function(){let t=x(e).$implicit;return S(U(4).highlight.emit(t.id))})(`mouseleave`,function(){return x(e),S(U(4).highlight.emit(null))}),L(2,`span`,13),G(3),R(),L(4,`span`,14),G(5),R(),k(6,UA,4,1,`span`,15),k(7,WA,4,1,`span`,15),R()()}if(e&2){let e=t.$implicit;E(3),K(e.name),E(2),q(`<`,e.tag,`>`),E(),A(e.expected?6:-1),E(),A(e.actual?7:-1)}}function KA(e,t){if(e&1&&(L(0,`h3`,10),G(1,`Mismatches`),R(),L(2,`ul`,11),j(3,GA,8,4,`li`,null,BA),R()),e&2){let e=U(2);E(3),M(e.mismatches)}}function qA(e,t){if(e&1){let e=z();L(0,`div`,3)(1,`ul`,4),j(2,HA,4,4,`li`,5,zA),R(),L(4,`button`,6),H(`click`,function(){return x(e),S(U(2).toggleOverlay())}),C(),L(5,`svg`,7),ug(6,`rect`,8),R(),G(7,` Outline on page `),R()(),k(8,KA,5,0)}if(e&2){let e=U(),t=U();E(2),M(t.counts()),E(2),O(`aria-pressed`,t.overlayOn()),E(4),A(e.mismatches.length?8:-1)}}function JA(e,t){e&1&&k(0,VA,5,0,`p`,2)(1,qA,9,2),e&2&&A(+!!t.hydrated)}function YA(e,t){e&1&&(L(0,`p`,2),G(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),L(2,`code`),G(3,`provideClientHydration()`),R(),G(4,`, each component shows whether it was hydrated, skipped or mismatched. `),R())}var XA=class e{report=$(void 0);overlay=lv();showNode=lv();highlight=lv();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=D({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&&(L(0,`section`,0)(1,`h2`,1),G(2,`Hydration`),R(),k(3,JA,2,1)(4,YA,5,0,`p`,2),R()),e&2){let e;E(3),A((e=t.report())?3:4,e)}},styles:[`.hydration[_ngcontent-%COMP%] { margin-top: 16px; } @@ -2359,7 +2359,7 @@ svg[_ngcontent-%COMP%] { button[_ngcontent-%COMP%] { transition: none; } -}`]})},mj=(e,t)=>t.id;function hj(e,t){if(e&1&&(P(0,`p`,11),G(1),F(),P(2,`h3`,7),G(3,`Still retained`),F(),P(4,`p`,6),G(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. `),F()),e&2){let e=U(),t=U();E(),K(t.plural(e.navigations,`navigation`))}}function gj(e,t){e&1&&(P(0,`p`,6),G(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),F())}function _j(e,t){if(e&1&&(P(0,`span`,18),G(1),F()),e&2){let e=U().$implicit,t=U(4);E(),K(t.plural(e.subscriptions,`open subscription`))}}function vj(e,t){if(e&1&&(P(0,`li`,13)(1,`span`,14),G(2),F(),P(3,`span`,15),G(4),F(),P(5,`span`,16),G(6),F(),P(7,`span`,17),G(8),F(),k(9,_j,2,1,`span`,18),F()),e&2){let e=t.$implicit,n=U(4);E(2),K(e.name),E(2),K(e.route||`/`),E(2),q(``,n.plural(e.navigations,`navigation`),` ago`),E(2),K(n.ageOf(e)),E(),A(e.subscriptions?9:-1)}}function yj(e,t){if(e&1&&(P(0,`p`,6),G(1),F(),P(2,`ul`,12),j(3,vj,10,5,`li`,13,mj),F()),e&2){let e=U(3);E(),J(` 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. `),E(2),M(e.retained().slice(0,e.shown))}}function bj(e,t){e&1&&(P(0,`p`,6),G(1,`No destroyed component is still in memory after a few navigations.`),F())}function xj(e,t){if(e&1&&(P(0,`p`,6),G(1),P(2,`span`,19),G(3),F(),G(4,`. Navigate a few times to see whether they stay. `),F()),e&2){let e=U(3);E(),q(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),E(2),K(e.names(e.recent()))}}function Sj(e,t){if(e&1&&(k(0,gj,2,0,`p`,6),P(1,`p`,11),G(2),F(),P(3,`h3`,7),G(4,` Still retained `),P(5,`span`,8),G(6),F()(),k(7,yj,5,2)(8,bj,2,0,`p`,6),k(9,xj,5,2,`p`,6)),e&2){let e=U(),t=U();A(e.support.retention?-1:0),E(2),R_(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),E(4),K(t.retained().length),E(),A(t.retained().length?7:8),E(2),A(t.recent().length?9:-1)}}function Cj(e,t){if(e&1&&(P(0,`p`,6),G(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),P(2,`span`,19),G(3),F(),G(4,`. `),F()),e&2){let e=U(2);E(3),K(e.names(e.detached()))}}function wj(e,t){if(e&1&&(P(0,`span`,8),G(1),F()),e&2){let e=U();E(),K(e.subscriptions.length)}}function Tj(e,t){if(e&1&&(P(0,`span`,15),G(1),F()),e&2){let e=U().$implicit;E(),K(e.source)}}function Ej(e,t){if(e&1&&(P(0,`li`,13)(1,`span`,14),G(2),F(),P(3,`span`,16),G(4),F(),P(5,`span`,18),G(6),F(),k(7,Tj,2,1,`span`,15),F()),e&2){let e=t.$implicit;E(2),K(e.name),E(2),q(``,e.count,` open`),E(2),q(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),E(),A(e.source?7:-1)}}function Dj(e,t){if(e&1&&(P(0,`p`,6),G(1,` Still open although the component that made them is gone. Tear them down with takeUntilDestroyed(), DestroyRef.onDestroy or the async pipe. `),F(),P(2,`ul`,12),j(3,Ej,8,4,`li`,13,ug),F()),e&2){let e=U(2),t=U();E(3),M(e.subscriptions.slice(0,t.shown))}}function Oj(e,t){e&1&&(P(0,`p`,6),G(1,`No subscription is still open after its component went away.`),F())}function kj(e,t){e&1&&(P(0,`p`,6),G(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),F())}function Aj(e,t){if(e&1&&(k(0,Dj,5,0)(1,Oj,2,0,`p`,6),k(2,kj,2,0,`p`,6)),e&2){let e=U();A(+!e.subscriptions.length),E(2),A(e.support.instances?-1:2)}}function jj(e,t){e&1&&(P(0,`p`,9),G(1,` Tracking could not start: the page has no RxJS the overlay can load. `),F())}function Mj(e,t){e&1&&(P(0,`p`,6),G(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. `),F())}function Nj(e,t){e&1&&I(0,`app-angular-unavailable`,10),e&2&&N(`page`,U(2).angular())}function Pj(e,t){if(e&1&&(P(0,`span`,16),G(1),F()),e&2){let e=U().$implicit,t=U(3);E(),K(t.plural(e.subscriptions,`subscription`))}}function Fj(e,t){if(e&1){let e=z();P(0,`li`)(1,`button`,20),V(`click`,function(){let t=x(e).$implicit;return S(U(3).showComponent.emit(t.id))})(`focus`,function(){let t=x(e).$implicit;return S(U(3).highlight.emit(t.id))})(`blur`,function(){return x(e),S(U(3).highlight.emit(null))})(`mouseenter`,function(){let t=x(e).$implicit;return S(U(3).highlight.emit(t.id))})(`mouseleave`,function(){return x(e),S(U(3).highlight.emit(null))}),P(2,`span`,14),G(3),F(),P(4,`span`,16),G(5),F(),k(6,Pj,2,1,`span`,16),F()()}if(e&2){let e=t.$implicit,n=U(2),r=U();E(3),K(e.name),E(2),K(r.effectsText(e)),E(),A(n.support.subscriptions===`on`?6:-1)}}function Ij(e,t){e&1&&(P(0,`p`,6),G(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. `),F())}function Lj(e,t){if(e&1&&(P(0,`ul`,12),j(1,Fj,7,3,`li`,null,mj),F(),k(3,Ij,2,0,`p`,6)),e&2){let e=U(),t=U();E(),M(e.components.slice(0,t.shown)),E(2),A(e.components.some(t.hasShared)?3:-1)}}function Rj(e,t){e&1&&(P(0,`p`,6),G(1,`No component on the page has a live effect or a tracked subscription.`),F())}function zj(e,t){if(e&1&&(k(0,hj,6,1)(1,Sj,10,7),k(2,Cj,5,1,`p`,6),P(3,`h3`,7),G(4,` Open subscriptions after destroy `),k(5,wj,2,1,`span`,8),F(),k(6,Aj,3,2)(7,jj,2,0,`p`,9)(8,Mj,2,0,`p`,6),P(9,`h3`,7),G(10,` Live effects and subscriptions `),P(11,`span`,8),G(12),F()(),k(13,Nj,1,1,`app-angular-unavailable`,10),k(14,Lj,4,1)(15,Rj,2,0,`p`,6)),e&2){let e,n=t,r=U();A(n.support.retention===`dev-di-debug`?0:1),E(2),A(r.detached().length?2:-1),E(3),A(n.support.subscriptions===`on`?5:-1),E(),A((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),E(6),K(n.components.length),E(),A(n.support.effects?-1:13),E(),A(n.components.length?14:15)}}function Bj(e,t){e&1&&(P(0,`p`,6),G(1,`No leak data from this page yet. It comes with the next report.`),F())}var Vj=20;function Hj(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 Uj=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,Wj=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=xv();highlight=xv();shown=Vj;minNavigations=2;minSeconds=tw/1e3;plural=Uj;busy=w(!1);announcement=w(``);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?`${Hj(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=Uj(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 oT(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=D({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&&(P(0,`section`,0)(1,`div`,1)(2,`h2`,2),G(3,`Leaks`),F(),P(4,`button`,3),V(`click`,function(){return t.toggle()}),G(5,` Track subscriptions `),F(),P(6,`p`,4),G(7),F()(),P(8,`p`,5),G(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. `),F(),k(10,zj,16,7)(11,Bj,2,0,`p`,6),F()),e&2){let e;E(4),N(`disabled`,!t.pageId()||!t.report()),O(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),E(3),K(t.announcement()),E(3),A((e=t.report())?10:11,e)}},dependencies:[RE],styles:[`[_nghost-%COMP%] { +}`]})},ZA=(e,t)=>t.id;function QA(e,t){if(e&1&&(P(0,`p`,11),G(1),F(),P(2,`h3`,7),G(3,`Still retained`),F(),P(4,`p`,6),G(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. `),F()),e&2){let e=U(),t=U();E(),K(t.plural(e.navigations,`navigation`))}}function $A(e,t){e&1&&(P(0,`p`,6),G(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),F())}function ej(e,t){if(e&1&&(P(0,`span`,18),G(1),F()),e&2){let e=U().$implicit,t=U(4);E(),K(t.plural(e.subscriptions,`open subscription`))}}function tj(e,t){if(e&1&&(P(0,`li`,13)(1,`span`,14),G(2),F(),P(3,`span`,15),G(4),F(),P(5,`span`,16),G(6),F(),P(7,`span`,17),G(8),F(),k(9,ej,2,1,`span`,18),F()),e&2){let e=t.$implicit,n=U(4);E(2),K(e.name),E(2),K(e.route||`/`),E(2),q(``,n.plural(e.navigations,`navigation`),` ago`),E(2),K(n.ageOf(e)),E(),A(e.subscriptions?9:-1)}}function nj(e,t){if(e&1&&(P(0,`p`,6),G(1),F(),P(2,`ul`,12),j(3,tj,10,5,`li`,13,ZA),F()),e&2){let e=U(3);E(),J(` 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. `),E(2),M(e.retained().slice(0,e.shown))}}function rj(e,t){e&1&&(P(0,`p`,6),G(1,`No destroyed component is still in memory after a few navigations.`),F())}function ij(e,t){if(e&1&&(P(0,`p`,6),G(1),P(2,`span`,19),G(3),F(),G(4,`. Navigate a few times to see whether they stay. `),F()),e&2){let e=U(3);E(),q(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),E(2),K(e.names(e.recent()))}}function aj(e,t){if(e&1&&(k(0,$A,2,0,`p`,6),P(1,`p`,11),G(2),F(),P(3,`h3`,7),G(4,` Still retained `),P(5,`span`,8),G(6),F()(),k(7,nj,5,2)(8,rj,2,0,`p`,6),k(9,ij,5,2,`p`,6)),e&2){let e=U(),t=U();A(e.support.retention?-1:0),E(2),E_(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),E(4),K(t.retained().length),E(),A(t.retained().length?7:8),E(2),A(t.recent().length?9:-1)}}function oj(e,t){if(e&1&&(P(0,`p`,6),G(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),P(2,`span`,19),G(3),F(),G(4,`. `),F()),e&2){let e=U(2);E(3),K(e.names(e.detached()))}}function sj(e,t){if(e&1&&(P(0,`span`,8),G(1),F()),e&2){let e=U();E(),K(e.subscriptions.length)}}function cj(e,t){if(e&1&&(P(0,`span`,15),G(1),F()),e&2){let e=U().$implicit;E(),K(e.source)}}function lj(e,t){if(e&1&&(P(0,`li`,13)(1,`span`,14),G(2),F(),P(3,`span`,16),G(4),F(),P(5,`span`,18),G(6),F(),k(7,cj,2,1,`span`,15),F()),e&2){let e=t.$implicit;E(2),K(e.name),E(2),q(``,e.count,` open`),E(2),q(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),E(),A(e.source?7:-1)}}function uj(e,t){if(e&1&&(P(0,`p`,6),G(1,` Still open although the component that made them is gone. Tear them down with takeUntilDestroyed(), DestroyRef.onDestroy or the async pipe. `),F(),P(2,`ul`,12),j(3,lj,8,4,`li`,13,Qh),F()),e&2){let e=U(2),t=U();E(3),M(e.subscriptions.slice(0,t.shown))}}function dj(e,t){e&1&&(P(0,`p`,6),G(1,`No subscription is still open after its component went away.`),F())}function fj(e,t){e&1&&(P(0,`p`,6),G(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),F())}function pj(e,t){if(e&1&&(k(0,uj,5,0)(1,dj,2,0,`p`,6),k(2,fj,2,0,`p`,6)),e&2){let e=U();A(+!e.subscriptions.length),E(2),A(e.support.instances?-1:2)}}function mj(e,t){e&1&&(P(0,`p`,9),G(1,` Tracking could not start: the page has no RxJS the overlay can load. `),F())}function hj(e,t){e&1&&(P(0,`p`,6),G(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. `),F())}function gj(e,t){e&1&&I(0,`app-angular-unavailable`,10),e&2&&N(`page`,U(2).angular())}function _j(e,t){if(e&1&&(P(0,`span`,16),G(1),F()),e&2){let e=U().$implicit,t=U(3);E(),K(t.plural(e.subscriptions,`subscription`))}}function vj(e,t){if(e&1){let e=z();P(0,`li`)(1,`button`,20),V(`click`,function(){let t=x(e).$implicit;return S(U(3).showComponent.emit(t.id))})(`focus`,function(){let t=x(e).$implicit;return S(U(3).highlight.emit(t.id))})(`blur`,function(){return x(e),S(U(3).highlight.emit(null))})(`mouseenter`,function(){let t=x(e).$implicit;return S(U(3).highlight.emit(t.id))})(`mouseleave`,function(){return x(e),S(U(3).highlight.emit(null))}),P(2,`span`,14),G(3),F(),P(4,`span`,16),G(5),F(),k(6,_j,2,1,`span`,16),F()()}if(e&2){let e=t.$implicit,n=U(2),r=U();E(3),K(e.name),E(2),K(r.effectsText(e)),E(),A(n.support.subscriptions===`on`?6:-1)}}function yj(e,t){e&1&&(P(0,`p`,6),G(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. `),F())}function bj(e,t){if(e&1&&(P(0,`ul`,12),j(1,vj,7,3,`li`,null,ZA),F(),k(3,yj,2,0,`p`,6)),e&2){let e=U(),t=U();E(),M(e.components.slice(0,t.shown)),E(2),A(e.components.some(t.hasShared)?3:-1)}}function xj(e,t){e&1&&(P(0,`p`,6),G(1,`No component on the page has a live effect or a tracked subscription.`),F())}function Sj(e,t){if(e&1&&(k(0,QA,6,1)(1,aj,10,7),k(2,oj,5,1,`p`,6),P(3,`h3`,7),G(4,` Open subscriptions after destroy `),k(5,sj,2,1,`span`,8),F(),k(6,pj,3,2)(7,mj,2,0,`p`,9)(8,hj,2,0,`p`,6),P(9,`h3`,7),G(10,` Live effects and subscriptions `),P(11,`span`,8),G(12),F()(),k(13,gj,1,1,`app-angular-unavailable`,10),k(14,bj,4,1)(15,xj,2,0,`p`,6)),e&2){let e,n=t,r=U();A(n.support.retention===`dev-di-debug`?0:1),E(2),A(r.detached().length?2:-1),E(3),A(n.support.subscriptions===`on`?5:-1),E(),A((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),E(6),K(n.components.length),E(),A(n.support.effects?-1:13),E(),A(n.components.length?14:15)}}function Cj(e,t){e&1&&(P(0,`p`,6),G(1,`No leak data from this page yet. It comes with the next report.`),F())}var wj=20;function Tj(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 Ej=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,Dj=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=lv();highlight=lv();shown=wj;minNavigations=2;minSeconds=LC/1e3;plural=Ej;busy=w(!1);announcement=w(``);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?`${Tj(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=Ej(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 Hw(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=D({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&&(P(0,`section`,0)(1,`div`,1)(2,`h2`,2),G(3,`Leaks`),F(),P(4,`button`,3),V(`click`,function(){return t.toggle()}),G(5,` Track subscriptions `),F(),P(6,`p`,4),G(7),F()(),P(8,`p`,5),G(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. `),F(),k(10,Sj,16,7)(11,Cj,2,0,`p`,6),F()),e&2){let e;E(4),N(`disabled`,!t.pageId()||!t.report()),O(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),E(3),K(t.announcement()),E(3),A((e=t.report())?10:11,e)}},dependencies:[xE],styles:[`[_nghost-%COMP%] { display: block; } @@ -2515,7 +2515,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); -}`]})},Gj=[`[redacted]`,`[email]`],Kj=2e4;function qj(e){let t=0;for(let n of Gj)for(let r=e.indexOf(n);r>=0;r=e.indexOf(n,r+n.length))t++;return t}function Jj(e,t=Kj){let n=0,r=t,i=new Set,a=[e];for(;a.length;){let e=a.pop();if(typeof e==`string`){if(--r<0)return{count:n,capped:!0};n+=qj(e);continue}if(typeof e==`object`&&e&&!i.has(e)){if(i.add(e),Array.isArray(e)){for(let t of e)a.push(t);continue}for(let[t,i]of Object.entries(e)){if(--r<0)return{count:n,capped:!0};n+=qj(t),a.push(i)}}}return{count:n,capped:!1}}function Yj(e,t){if(e&1&&(L(0,`p`,0),G(1),L(2,`span`,1),G(3),R()()),e&2){let e=U();E(),R_(` `,e.result().capped?`At least `:``,``,e.result().count,` `,e.result().count===1?`value`:`values`,` masked `),E(2),K(e.why())}}var Xj=class e{value=$(void 0);why=$(`by redaction (secret names, tokens and emails).`);result=X(()=>Jj(this.value()));static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`app-redaction-count`]],inputs:{value:[1,`value`],why:[1,`why`]},decls:1,vars:1,consts:[[`data-redaction-count`,``,1,`count`],[1,`why`]],template:function(e,t){e&1&&k(0,Yj,4,4,`p`,0),e&2&&A(t.result().count>0?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},Oj=[`[redacted]`,`[email]`],kj=2e4;function Aj(e){let t=0;for(let n of Oj)for(let r=e.indexOf(n);r>=0;r=e.indexOf(n,r+n.length))t++;return t}function jj(e,t=kj){let n=0,r=t,i=new Set,a=[e];for(;a.length;){let e=a.pop();if(typeof e==`string`){if(--r<0)return{count:n,capped:!0};n+=Aj(e);continue}if(typeof e==`object`&&e&&!i.has(e)){if(i.add(e),Array.isArray(e)){for(let t of e)a.push(t);continue}for(let[t,i]of Object.entries(e)){if(--r<0)return{count:n,capped:!0};n+=Aj(t),a.push(i)}}}return{count:n,capped:!1}}function Mj(e,t){if(e&1&&(L(0,`p`,0),G(1),L(2,`span`,1),G(3),R()()),e&2){let e=U();E(),E_(` `,e.result().capped?`At least `:``,``,e.result().count,` `,e.result().count===1?`value`:`values`,` masked `),E(2),K(e.why())}}var Nj=class e{value=$(void 0);why=$(`by redaction (secret names, tokens and emails).`);result=X(()=>jj(this.value()));static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`app-redaction-count`]],inputs:{value:[1,`value`],why:[1,`why`]},decls:1,vars:1,consts:[[`data-redaction-count`,``,1,`count`],[1,`why`]],template:function(e,t){e&1&&k(0,Mj,4,4,`p`,0),e&2&&A(t.result().count>0?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -2529,7 +2529,7 @@ h2[_ngcontent-%COMP%] { .why[_ngcontent-%COMP%] { color: var(--%NS%text-2); -}`]})},Zj=[`*`];function Qj(e,t){e&1&&G(0),e&2&&K(U(2).label())}function $j(e,t){e&1&&Vg(0,0,null,Qj,1,1)}function eM(e,t){if(e&1&&(P(0,`span`,4),G(1),F()),e&2){let e=U(2);E(),K(e.message())}}function tM(e,t){if(e&1){let e=z();P(0,`button`,2),V(`click`,function(){return x(e),S(U().open())}),Eg(1,3),F(),k(2,eM,2,1,`span`,4)}if(e&2){let e=U(),t=Gg(1);N(`title`,`Open `+e.label()+` in your editor`),O(`aria-label`,`Open `+e.label()+` in your editor`),E(),N(`ngTemplateOutlet`,t),E(),A(e.message()?2:-1)}}function nM(e,t){if(e&1&&(P(0,`span`,1),Eg(1,3),F()),e&2){let e=U(),t=Gg(1);N(`title`,e.label()),E(),N(`ngTemplateOutlet`,t)}}var rM=class e{source=w(w(null));client=X(()=>this.source()());available=X(()=>{let e=this.client();return!!e&&!cT(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 oT(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=Fl({token:e,factory:e.ɵfac})};function iM(e,t){return t?`${e}:${t}`:e}var aM=class e{editor=b(rM);file=$.required();line=$(void 0);label=X(()=>iM(this.file(),this.line()));message=w(``);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=D({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:Zj,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&&(Bg(),Hh(0,$j,2,0,`ng-template`,null,0,mv),k(2,tM,3,4)(3,nM,2,2,`span`,1)),e&2&&(E(2),A(t.editor.available()?2:3))},dependencies:[uy],styles:[`[_nghost-%COMP%] { +}`]})},Pj=[`*`];function Fj(e,t){e&1&&G(0),e&2&&K(U(2).label())}function Ij(e,t){e&1&&kg(0,0,null,Fj,1,1)}function Lj(e,t){if(e&1&&(P(0,`span`,4),G(1),F()),e&2){let e=U(2);E(),K(e.message())}}function Rj(e,t){if(e&1){let e=z();P(0,`button`,2),V(`click`,function(){return x(e),S(U().open())}),mg(1,3),F(),k(2,Lj,2,1,`span`,4)}if(e&2){let e=U(),t=Ng(1);N(`title`,`Open `+e.label()+` in your editor`),O(`aria-label`,`Open `+e.label()+` in your editor`),E(),N(`ngTemplateOutlet`,t),E(),A(e.message()?2:-1)}}function zj(e,t){if(e&1&&(P(0,`span`,1),mg(1,3),F()),e&2){let e=U(),t=Ng(1);N(`title`,e.label()),E(),N(`ngTemplateOutlet`,t)}}var Bj=class e{source=w(w(null));client=X(()=>this.source()());available=X(()=>{let e=this.client();return!!e&&!Ww(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 Hw(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=Tl({token:e,factory:e.ɵfac})};function Vj(e,t){return t?`${e}:${t}`:e}var Hj=class e{editor=b(Bj);file=$.required();line=$(void 0);label=X(()=>Vj(this.file(),this.line()));message=w(``);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=D({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:Pj,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&&(Og(),Ah(0,Ij,2,0,`ng-template`,null,0,nv),k(2,Rj,3,4)(3,zj,2,2,`span`,1)),e&2&&(E(2),A(t.editor.available()?2:3))},dependencies:[Qv],styles:[`[_nghost-%COMP%] { display: inline; min-width: 0; } @@ -2564,7 +2564,7 @@ h2[_ngcontent-%COMP%] { color: var(--%NS%danger-text); font-family: var(--%NS%font-sans); font-size: 0.92em; -}`]})};function oM(e,t){if(e&1&&(L(0,`span`,1),G(1),R()),e&2){let e=U(2);E(),q(`: `,e.label())}}function sM(e,t){if(e&1&&(L(0,`span`,1),G(1),R()),e&2){let e=U(3);E(),q(`: `,e.label())}}function cM(e,t){if(e&1){let e=z();L(0,`button`,4),H(`click`,function(){return x(e),S(U(2).store(`log`))}),G(1,` Log to console `),k(2,sM,2,1,`span`,1),R()}if(e&2){let e=U(2);B(`disabled`,e.busy()||!e.rpc()||!e.pageId()),E(2),A(e.label()?2:-1)}}function lM(e,t){if(e&1){let e=z();L(0,`button`,0),H(`click`,function(){return x(e),S(U().store())}),G(1,` Store as global `),k(2,oM,2,1,`span`,1),R(),k(3,cM,3,2,`button`,2),L(4,`span`,3),G(5),R()}if(e&2){let e=U();B(`disabled`,e.busy()||!e.rpc()||!e.pageId()),E(2),A(e.label()?2:-1),E(),A(e.canLog()?3:-1),E(2),K(e.message())}}var uM=class e{rpc=$(null);pageId=$(null);target=$.required();label=$(``);canLog=$(!1);staticReport=X(()=>cT(this.rpc()));busy=w(!1);message=w(``);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=D({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&&k(0,lM,6,4),e&2&&A(t.staticReport()?-1:0)},styles:[`[_nghost-%COMP%] { +}`]})};function Uj(e,t){if(e&1&&(L(0,`span`,1),G(1),R()),e&2){let e=U(2);E(),q(`: `,e.label())}}function Wj(e,t){if(e&1&&(L(0,`span`,1),G(1),R()),e&2){let e=U(3);E(),q(`: `,e.label())}}function Gj(e,t){if(e&1){let e=z();L(0,`button`,4),H(`click`,function(){return x(e),S(U(2).store(`log`))}),G(1,` Log to console `),k(2,Wj,2,1,`span`,1),R()}if(e&2){let e=U(2);B(`disabled`,e.busy()||!e.rpc()||!e.pageId()),E(2),A(e.label()?2:-1)}}function Kj(e,t){if(e&1){let e=z();L(0,`button`,0),H(`click`,function(){return x(e),S(U().store())}),G(1,` Store as global `),k(2,Uj,2,1,`span`,1),R(),k(3,Gj,3,2,`button`,2),L(4,`span`,3),G(5),R()}if(e&2){let e=U();B(`disabled`,e.busy()||!e.rpc()||!e.pageId()),E(2),A(e.label()?2:-1),E(),A(e.canLog()?3:-1),E(2),K(e.message())}}var qj=class e{rpc=$(null);pageId=$(null);target=$.required();label=$(``);canLog=$(!1);staticReport=X(()=>Ww(this.rpc()));busy=w(!1);message=w(``);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=D({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&&k(0,Kj,6,4),e&2&&A(t.staticReport()?-1:0)},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-wrap: wrap; align-items: center; @@ -2613,7 +2613,7 @@ h2[_ngcontent-%COMP%] { .status[_ngcontent-%COMP%]:empty { display: none; -}`]})},dM=(e,t)=>t.name;function fM(e,t){e&1&&(L(0,`span`,11),G(1,`impure`),R())}function pM(e,t){e&1&&(L(0,`span`,11),G(1,`churning`),R())}function mM(e,t){e&1&&(L(0,`span`,11),G(1,`stale?`),R())}function hM(e,t){if(e&1&&(L(0,`span`,10),G(1),R()),e&2){let e=U(2).$implicit,t=U(3);E(),K(t.plural(e.calls,`call`))}}function gM(e,t){if(e&1){let e=z();L(0,`button`,7),H(`click`,function(){x(e);let t=U().$implicit;return S(U(3).showPipe.emit(t.name))}),L(1,`span`,8),G(2,`Show in Pipes:`),R(),L(3,`span`,9),G(4),R(),L(5,`span`,10),G(6),R(),k(7,fM,2,0,`span`,11),k(8,pM,2,0,`span`,11),k(9,mM,2,0,`span`,11),k(10,hM,2,1,`span`,10),R()}if(e&2){let e=U().$implicit;E(4),K(e.name),E(2),q(``,e.uses,`×`),E(),A(e.isPure?-1:7),E(),A(e.churn?8:-1),E(),A(e.stale?9:-1),E(),A(e.calls===void 0?-1:10)}}function _M(e,t){e&1&&(L(0,`span`,11),G(1,`impure`),R())}function vM(e,t){if(e&1&&(L(0,`span`,6)(1,`span`,9),G(2),R(),L(3,`span`,10),G(4),R(),k(5,_M,2,0,`span`,11),R()),e&2){let e=U().$implicit;E(2),K(e.name),E(2),q(``,e.uses,`×`),E(),A(e.isPure?-1:5)}}function yM(e,t){if(e&1&&(L(0,`li`),k(1,gM,11,6,`button`,5)(2,vM,6,3,`span`,6),R()),e&2){let e=U(3);E(),A(e.canShowPipes()?1:2)}}function bM(e,t){if(e&1&&(L(0,`ul`,3),j(1,yM,3,1,`li`,null,dM),R(),L(3,`p`,4),G(4,` Call counts cover every component that uses the pipe. Record calls in the Pipes tab to see them. `),R()),e&2){let e=U(2);E(),M(e.rows())}}function xM(e,t){e&1&&(L(0,`p`,2),G(1,`No pipe is in use in the rendered part of its template.`),R())}function SM(e,t){if(e&1&&(L(0,`div`,0)(1,`h3`),G(2,` Pipes in template `),L(3,`span`,1),G(4),R()(),k(5,bM,5,0)(6,xM,2,0,`p`,2),R()),e&2){let e=U();E(4),K(e.rows().length),E(),A(e.rows().length?5:6)}}function CM(e,t,n){let r=(t?e?.pages?.find(e=>e.pageId===t):void 0)?.pipes??e?.pipes??[],i=[];for(let e of r){let t=e.components.find(e=>e.name===n);t&&i.push({name:e.name,isPure:e.isPure,uses:t.count,...e.call?{calls:e.call.callCount}:{},churn:!!e.churn,stale:!!e.stale})}return i.sort((e,t)=>e.name.localeCompare(t.name))}var wM=class e{plural=cD;destroyRef=b(Os);rpc=$(null);pageId=$(void 0);component=$.required();canShowPipes=$(!1);showPipe=xv();snapshot=w(void 0);loaded=w(!1);rows=X(()=>CM(this.snapshot(),this.pageId(),this.component()));unsubscribe;constructor(){T(()=>{let e=this.rpc();e&&this.subscribe(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async subscribe(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`pipe-usage`);if(this.destroyRef.destroyed)return;let n=e=>{this.snapshot.set(e),this.loaded.set(!0)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`app-component-pipes`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],component:[1,`component`],canShowPipes:[1,`canShowPipes`]},outputs:{showPipe:`showPipe`},decls:1,vars:1,consts:[[1,`block`],[1,`pill`],[1,`empty-line`],[1,`chips`],[1,`hint`],[`type`,`button`,1,`pipe`],[1,`pipe`],[`type`,`button`,1,`pipe`,3,`click`],[1,`sr-only`],[1,`mono`],[1,`note`],[1,`flag`,`warn`]],template:function(e,t){e&1&&k(0,SM,7,2,`div`,0),e&2&&A(t.loaded()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},Jj=(e,t)=>t.name;function Yj(e,t){e&1&&(L(0,`span`,11),G(1,`impure`),R())}function Xj(e,t){e&1&&(L(0,`span`,11),G(1,`churning`),R())}function Zj(e,t){e&1&&(L(0,`span`,11),G(1,`stale?`),R())}function Qj(e,t){if(e&1&&(L(0,`span`,10),G(1),R()),e&2){let e=U(2).$implicit,t=U(3);E(),K(t.plural(e.calls,`call`))}}function $j(e,t){if(e&1){let e=z();L(0,`button`,7),H(`click`,function(){x(e);let t=U().$implicit;return S(U(3).showPipe.emit(t.name))}),L(1,`span`,8),G(2,`Show in Pipes:`),R(),L(3,`span`,9),G(4),R(),L(5,`span`,10),G(6),R(),k(7,Yj,2,0,`span`,11),k(8,Xj,2,0,`span`,11),k(9,Zj,2,0,`span`,11),k(10,Qj,2,1,`span`,10),R()}if(e&2){let e=U().$implicit;E(4),K(e.name),E(2),q(``,e.uses,`×`),E(),A(e.isPure?-1:7),E(),A(e.churn?8:-1),E(),A(e.stale?9:-1),E(),A(e.calls===void 0?-1:10)}}function eM(e,t){e&1&&(L(0,`span`,11),G(1,`impure`),R())}function tM(e,t){if(e&1&&(L(0,`span`,6)(1,`span`,9),G(2),R(),L(3,`span`,10),G(4),R(),k(5,eM,2,0,`span`,11),R()),e&2){let e=U().$implicit;E(2),K(e.name),E(2),q(``,e.uses,`×`),E(),A(e.isPure?-1:5)}}function nM(e,t){if(e&1&&(L(0,`li`),k(1,$j,11,6,`button`,5)(2,tM,6,3,`span`,6),R()),e&2){let e=U(3);E(),A(e.canShowPipes()?1:2)}}function rM(e,t){if(e&1&&(L(0,`ul`,3),j(1,nM,3,1,`li`,null,Jj),R(),L(3,`p`,4),G(4,` Call counts cover every component that uses the pipe. Record calls in the Pipes tab to see them. `),R()),e&2){let e=U(2);E(),M(e.rows())}}function iM(e,t){e&1&&(L(0,`p`,2),G(1,`No pipe is in use in the rendered part of its template.`),R())}function aM(e,t){if(e&1&&(L(0,`div`,0)(1,`h3`),G(2,` Pipes in template `),L(3,`span`,1),G(4),R()(),k(5,rM,5,0)(6,iM,2,0,`p`,2),R()),e&2){let e=U();E(4),K(e.rows().length),E(),A(e.rows().length?5:6)}}function oM(e,t,n){let r=(t?e?.pages?.find(e=>e.pageId===t):void 0)?.pipes??e?.pipes??[],i=[];for(let e of r){let t=e.components.find(e=>e.name===n);t&&i.push({name:e.name,isPure:e.isPure,uses:t.count,...e.call?{calls:e.call.callCount}:{},churn:!!e.churn,stale:!!e.stale})}return i.sort((e,t)=>e.name.localeCompare(t.name))}var sM=class e{plural=GE;destroyRef=b(ys);rpc=$(null);pageId=$(void 0);component=$.required();canShowPipes=$(!1);showPipe=lv();snapshot=w(void 0);loaded=w(!1);rows=X(()=>oM(this.snapshot(),this.pageId(),this.component()));unsubscribe;constructor(){T(()=>{let e=this.rpc();e&&this.subscribe(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async subscribe(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`pipe-usage`);if(this.destroyRef.destroyed)return;let n=e=>{this.snapshot.set(e),this.loaded.set(!0)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`app-component-pipes`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],component:[1,`component`],canShowPipes:[1,`canShowPipes`]},outputs:{showPipe:`showPipe`},decls:1,vars:1,consts:[[1,`block`],[1,`pill`],[1,`empty-line`],[1,`chips`],[1,`hint`],[`type`,`button`,1,`pipe`],[1,`pipe`],[`type`,`button`,1,`pipe`,3,`click`],[1,`sr-only`],[1,`mono`],[1,`note`],[1,`flag`,`warn`]],template:function(e,t){e&1&&k(0,aM,7,2,`div`,0),e&2&&A(t.loaded()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -2724,7 +2724,7 @@ button.pipe[_ngcontent-%COMP%]:focus-visible { button.pipe[_ngcontent-%COMP%] { transition: none; } -}`]})},TM=[`field`],EM=[`editButton`],DM=[`valueBox`];function OM(e,t){if(e&1){let e=z();L(0,`div`,5)(1,`label`,6),G(2),R(),L(3,`input`,7,0),H(`input`,function(t){return x(e),S(U().draft.set(t.target.value))})(`keydown.enter`,function(t){x(e);let n=U();return t.preventDefault(),S(n.apply())})(`keydown.escape`,function(t){x(e);let n=U();return t.preventDefault(),t.stopPropagation(),S(n.cancel())}),R(),L(5,`button`,8),H(`click`,function(){return x(e),S(U().apply())}),G(6,`Apply`),R(),L(7,`button`,9),H(`click`,function(){return x(e),S(U().cancel())}),G(8,`Cancel`),R()(),L(9,`p`,10),G(10),R()}if(e&2){let e=U();E(),B(`htmlFor`,e.fieldId),E(),q(`New value of `,e.prop().name,`, as JSON`),E(),B(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),O(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),E(2),B(`disabled`,e.busy()),E(4),B(`id`,e.hintId),E(),q(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function kM(e,t){if(e&1&&(L(0,`pre`,null,1),G(2),uv(3,`json`),R()),e&2){let e=U(2);O(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),E(2),K(dv(3,4,e.prop().value))}}function AM(e,t){if(e&1){let e=z();L(0,`button`,14,2),H(`click`,function(){return x(e),S(U(2).start())}),G(2,` Edit `),R()}if(e&2){let e=U(2);B(`disabled`,e.busy()),O(`aria-label`,`Edit `+e.prop().name)}}function jM(e,t){if(e&1&&(L(0,`p`,13),G(1),R()),e&2){let e=U(2);E(),K(e.prop().locked)}}function MM(e,t){if(e&1&&(L(0,`div`,11),k(1,kM,4,6,`pre`),k(2,AM,3,2,`button`,12),R(),k(3,jM,2,1,`p`,13)),e&2){let e=U();E(),A(e.bare()?-1:1),E(),A(e.editable()?2:-1),E(),A(e.writes()&&e.prop().locked?3:-1)}}function NM(e,t){if(e&1&&(L(0,`p`,3),G(1),R()),e&2){let e=U();B(`id`,e.errorId),E(),K(e.error())}}var PM=0;function FM(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 IM=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++PM}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=w(!1);draft=w(``);busy=w(!1);error=w(``);done=w(``);editable=X(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=Ov(`field`);editButton=Ov(`editButton`);valueBox=Ov(`valueBox`);injector=b(Es);scrollable=w(!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),Sd(()=>{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=FM(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(){Sd(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&Ug(t.field,TM,5)(t.editButton,EM,5)(t.valueBox,DM,5),e&2&&Wg(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&&(k(0,OM,11,11)(1,MM,4,3),k(2,NM,2,2,`p`,3),L(3,`p`,4),G(4),R()),e&2&&(A(+!t.editing()),E(2),A(t.error()?2:-1),E(2),K(t.done()))},dependencies:[fy],styles:[`[_nghost-%COMP%] { +}`]})},cM=[`field`],lM=[`editButton`],uM=[`valueBox`];function dM(e,t){if(e&1){let e=z();L(0,`div`,5)(1,`label`,6),G(2),R(),L(3,`input`,7,0),H(`input`,function(t){return x(e),S(U().draft.set(t.target.value))})(`keydown.enter`,function(t){x(e);let n=U();return t.preventDefault(),S(n.apply())})(`keydown.escape`,function(t){x(e);let n=U();return t.preventDefault(),t.stopPropagation(),S(n.cancel())}),R(),L(5,`button`,8),H(`click`,function(){return x(e),S(U().apply())}),G(6,`Apply`),R(),L(7,`button`,9),H(`click`,function(){return x(e),S(U().cancel())}),G(8,`Cancel`),R()(),L(9,`p`,10),G(10),R()}if(e&2){let e=U();E(),B(`htmlFor`,e.fieldId),E(),q(`New value of `,e.prop().name,`, as JSON`),E(),B(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),O(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),E(2),B(`disabled`,e.busy()),E(4),B(`id`,e.hintId),E(),q(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function fM(e,t){if(e&1&&(L(0,`pre`,null,1),G(2),Q_(3,`json`),R()),e&2){let e=U(2);O(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),E(2),K($_(3,4,e.prop().value))}}function pM(e,t){if(e&1){let e=z();L(0,`button`,14,2),H(`click`,function(){return x(e),S(U(2).start())}),G(2,` Edit `),R()}if(e&2){let e=U(2);B(`disabled`,e.busy()),O(`aria-label`,`Edit `+e.prop().name)}}function mM(e,t){if(e&1&&(L(0,`p`,13),G(1),R()),e&2){let e=U(2);E(),K(e.prop().locked)}}function hM(e,t){if(e&1&&(L(0,`div`,11),k(1,fM,4,6,`pre`),k(2,pM,3,2,`button`,12),R(),k(3,mM,2,1,`p`,13)),e&2){let e=U();E(),A(e.bare()?-1:1),E(),A(e.editable()?2:-1),E(),A(e.writes()&&e.prop().locked?3:-1)}}function gM(e,t){if(e&1&&(L(0,`p`,3),G(1),R()),e&2){let e=U();B(`id`,e.errorId),E(),K(e.error())}}var _M=0;function vM(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 yM=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++_M}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=w(!1);draft=w(``);busy=w(!1);error=w(``);done=w(``);editable=X(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=gv(`field`);editButton=gv(`editButton`);valueBox=gv(`valueBox`);injector=b(_s);scrollable=w(!1);constructor(){Cv(()=>{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),fd(()=>{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=vM(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(){fd(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&jg(t.field,cM,5)(t.editButton,lM,5)(t.valueBox,uM,5),e&2&&Mg(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&&(k(0,dM,11,11)(1,hM,4,3),k(2,gM,2,2,`p`,3),L(3,`p`,4),G(4),R()),e&2&&(A(+!t.editing()),E(2),A(t.error()?2:-1),E(2),K(t.done()))},dependencies:[ey],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -2847,7 +2847,7 @@ button.edit[_ngcontent-%COMP%] { .error[_ngcontent-%COMP%] { color: var(--%NS%danger-text); -}`]})},LM=1e3,RM={depth:5,limit:100},zM=`[redacted]`;function BM(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function VM(e){return BM(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function HM(e){return BM(e)&&typeof e.$collapsed==`string`&&typeof e.size==`number`&&Object.keys(e).length===2}function UM(e){return e===`Array`?`array`:e===`Map`?`map`:e===`Set`?`set`:`object`}function WM(e){return e.$type===`Map`&&Array.isArray(e.entries)}function GM(e){return e.$type===`Set`&&Array.isArray(e.values)}function KM(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function qM(e){if(!e||typeof e!=`object`)return null;if(HM(e))return e.size<=0?null:{kind:UM(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(VM(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=VM(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(WM(t)||GM(t)){let e=typeof t.size==`number`?t.size:0,n=WM(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=KM(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function JM(e){if(typeof e==`string`)return JSON.stringify(e);let t=qM(e);if(t)return ZM(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function YM(e){let t=qM(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(VM(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:JM(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:KM(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function XM(e,t,n){return`${e} ${e===1?t:n}`}function ZM(e){let t={array:XM(e.size,`item`,`items`),object:XM(e.size,`key`,`keys`),map:XM(e.size,`entry`,`entries`),set:XM(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function QM(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function $M(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function eN(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var tN=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function nN(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==zM&&!tN.test(e)&&!e.endsWith(`…`)}function rN(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function iN(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=QM(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of YM(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!qM(r.value))continue;let i=n(t)??(qM(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var aN=(e,t)=>t.id;function oN(e,t){if(e&1){let e=z();P(0,`button`,2),V(`click`,function(){x(e);let t=U().$implicit;return S(U(3).toggle(t))}),C(),P(1,`svg`,3),I(2,`path`,4),F(),ys(),P(3,`span`,14),G(4),F(),P(5,`span`,5),G(6),F()()}if(e&2){let e=U().$implicit;O(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),E(4),q(``,e.label,`:`),E(2),K(e.text)}}function sN(e,t){if(e&1&&I(0,`app-prop-value`,15),e&2){let e=U(5);N(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function cN(e,t){if(e&1&&(P(0,`span`,16),G(1),F()),e&2){let e=U(2).$implicit;E(),K(e.text)}}function lN(e,t){if(e&1&&(P(0,`span`,14),G(1),F(),k(2,sN,1,5,`app-prop-value`,15)(3,cN,2,1,`span`,16)),e&2){let e,t=U().$implicit;E(),q(``,t.label,`:`),E(),A((e=t.edit)?2:3,e)}}function uN(e,t){if(e&1){let e=z();P(0,`button`,17),V(`click`,function(){x(e);let t=U().$implicit;return S(U(3).more(t))}),G(1),P(2,`span`,18),G(3),F()()}if(e&2){let e=U().$implicit,t=U(3);E(),q(` Show `,t.step(e),` more `),E(2),q(`(`,e.more,` not listed)`)}}function dN(e,t){e&1&&(P(0,`span`,12),G(1,`Reading from the page…`),F())}function fN(e,t){if(e&1&&(P(0,`span`,13),G(1),F()),e&2){let e=U().$implicit;E(),K(e.text)}}function pN(e,t){if(e&1&&(P(0,`li`,9),k(1,oN,7,4,`button`,10)(2,lN,4,2)(3,uN,4,2,`button`,11)(4,dN,2,0,`span`,12)(5,fN,2,1,`span`,13),F()),e&2){let e,n=t.$implicit;f_(`padding-left`,n.depth*14,`px`),E(),A((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function mN(e,t){if(e&1&&(P(0,`ul`,7),j(1,pN,6,3,`li`,8,aN),F()),e&2){let e=U(2);N(`id`,e.listId),O(`aria-label`,e.prop().name+` entries`),E(),M(e.rows())}}function hN(e,t){if(e&1){let e=z();P(0,`div`,1)(1,`button`,2),V(`click`,function(){return x(e),S(U().toggleRoot())}),C(),P(2,`svg`,3),I(3,`path`,4),F(),ys(),P(4,`span`,5),G(5),F()(),I(6,`app-prop-value`,6),F(),k(7,mN,3,2,`ul`,7)}if(e&2){let e=t,n=U();E(),O(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),E(4),K(n.summaryOf(e)),E(),N(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),E(),A(n.rootOpen()?7:-1)}}function gN(e,t){if(e&1&&I(0,`app-prop-value`,0),e&2){let e=U();N(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var _N=0;function vN(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function yN(e){if(Array.isArray(e))return e.every(yN);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(yN)}return nN(e)}var bN=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++_N}`;host=b(Rl);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(()=>qM(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 iN(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(QM(e));for(let t=2;t<=e.length;t++)i.add(QM(e.slice(0,t)))}let o=this.prop(),s=this.writes()&&n===void 0,c=[],l=(e,o,d,f,p,m)=>{let{children:ee,more:h}=YM(e);for(let e of ee){let ee=[...o,e.key],h=QM(ee);if(r&&!m&&!i.has(h))continue;let g=qM(e.value),te=QM(ee,n);if(!g){let t=p&&nN(e.value)?eN(ee):null;c.push({id:te,kind:`leaf`,depth:f,path:ee,label:e.label,text:vN(e.value),edit:s&&t&&p?{name:$M(ee,[...d]),prop:t,value:e.value,edit:p}:void 0});continue}let ne=!!r&&!m&&i.has(h)&&!a.has(h)||t.isOpen(ee,n);if(c.push({id:te,kind:`node`,depth:f,path:ee,label:e.label,text:ZM(g),container:g,open:ne}),!ne)continue;let re=t.level(ee,n)??(g.collapsed?void 0:e.value),ie=[...d,g.kind];re===void 0?t.errors().has(te)?c.push({...u(ee,f+1,`error`),text:t.errors().get(te)}):c.push(u(ee,f+1,`loading`)):l(re,ee,ie,f+1,rN(p,g),m||a.has(h))}h>0&&(!r||m)&&c.push({...u(o,f,`more`),more:h,listed:ee.length})},u=(e,t,r)=>({id:`${QM(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?rN(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),RM.depth,RM.limit);return e.ok?yN(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 ZM(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=D({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&&k(0,hN,8,12)(1,gN,1,5,`app-prop-value`,0),e&2){let e;A((e=t.root())?0:1,e)}},dependencies:[IM],styles:[`[_nghost-%COMP%] { +}`]})},bM=1e3,xM={depth:5,limit:100},SM=`[redacted]`;function CM(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function wM(e){return CM(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function TM(e){return CM(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 DM(e){return e.$type===`Map`&&Array.isArray(e.entries)}function OM(e){return e.$type===`Set`&&Array.isArray(e.values)}function kM(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function AM(e){if(!e||typeof e!=`object`)return null;if(TM(e))return e.size<=0?null:{kind:EM(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(wM(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=wM(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(DM(t)||OM(t)){let e=typeof t.size==`number`?t.size:0,n=DM(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=kM(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function jM(e){if(typeof e==`string`)return JSON.stringify(e);let t=AM(e);if(t)return PM(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function MM(e){let t=AM(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(wM(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:jM(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:kM(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function NM(e,t,n){return`${e} ${e===1?t:n}`}function PM(e){let t={array:NM(e.size,`item`,`items`),object:NM(e.size,`key`,`keys`),map:NM(e.size,`entry`,`entries`),set:NM(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function FM(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function IM(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function LM(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var RM=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function zM(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==SM&&!RM.test(e)&&!e.endsWith(`…`)}function BM(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function VM(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=FM(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of MM(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!AM(r.value))continue;let i=n(t)??(AM(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var HM=(e,t)=>t.id;function UM(e,t){if(e&1){let e=z();P(0,`button`,2),V(`click`,function(){x(e);let t=U().$implicit;return S(U(3).toggle(t))}),C(),P(1,`svg`,3),I(2,`path`,4),F(),ds(),P(3,`span`,14),G(4),F(),P(5,`span`,5),G(6),F()()}if(e&2){let e=U().$implicit;O(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),E(4),q(``,e.label,`:`),E(2),K(e.text)}}function WM(e,t){if(e&1&&I(0,`app-prop-value`,15),e&2){let e=U(5);N(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function GM(e,t){if(e&1&&(P(0,`span`,16),G(1),F()),e&2){let e=U(2).$implicit;E(),K(e.text)}}function KM(e,t){if(e&1&&(P(0,`span`,14),G(1),F(),k(2,WM,1,5,`app-prop-value`,15)(3,GM,2,1,`span`,16)),e&2){let e,t=U().$implicit;E(),q(``,t.label,`:`),E(),A((e=t.edit)?2:3,e)}}function qM(e,t){if(e&1){let e=z();P(0,`button`,17),V(`click`,function(){x(e);let t=U().$implicit;return S(U(3).more(t))}),G(1),P(2,`span`,18),G(3),F()()}if(e&2){let e=U().$implicit,t=U(3);E(),q(` Show `,t.step(e),` more `),E(2),q(`(`,e.more,` not listed)`)}}function JM(e,t){e&1&&(P(0,`span`,12),G(1,`Reading from the page…`),F())}function YM(e,t){if(e&1&&(P(0,`span`,13),G(1),F()),e&2){let e=U().$implicit;E(),K(e.text)}}function XM(e,t){if(e&1&&(P(0,`li`,9),k(1,UM,7,4,`button`,10)(2,KM,4,2)(3,qM,4,2,`button`,11)(4,JM,2,0,`span`,12)(5,YM,2,1,`span`,13),F()),e&2){let e,n=t.$implicit;e_(`padding-left`,n.depth*14,`px`),E(),A((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function ZM(e,t){if(e&1&&(P(0,`ul`,7),j(1,XM,6,3,`li`,8,HM),F()),e&2){let e=U(2);N(`id`,e.listId),O(`aria-label`,e.prop().name+` entries`),E(),M(e.rows())}}function QM(e,t){if(e&1){let e=z();P(0,`div`,1)(1,`button`,2),V(`click`,function(){return x(e),S(U().toggleRoot())}),C(),P(2,`svg`,3),I(3,`path`,4),F(),ds(),P(4,`span`,5),G(5),F()(),I(6,`app-prop-value`,6),F(),k(7,ZM,3,2,`ul`,7)}if(e&2){let e=t,n=U();E(),O(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),E(4),K(n.summaryOf(e)),E(),N(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),E(),A(n.rootOpen()?7:-1)}}function $M(e,t){if(e&1&&I(0,`app-prop-value`,0),e&2){let e=U();N(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var eN=0;function tN(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function nN(e){if(Array.isArray(e))return e.every(nN);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(nN)}return zM(e)}var rN=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++eN}`;host=b(Ol);pendingMore=null;constructor(){Cv(()=>{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(()=>AM(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 VM(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(FM(e));for(let t=2;t<=e.length;t++)i.add(FM(e.slice(0,t)))}let o=this.prop(),s=this.writes()&&n===void 0,c=[],l=(e,o,d,f,p,m)=>{let{children:ee,more:h}=MM(e);for(let e of ee){let ee=[...o,e.key],h=FM(ee);if(r&&!m&&!i.has(h))continue;let g=AM(e.value),te=FM(ee,n);if(!g){let t=p&&zM(e.value)?LM(ee):null;c.push({id:te,kind:`leaf`,depth:f,path:ee,label:e.label,text:tN(e.value),edit:s&&t&&p?{name:IM(ee,[...d]),prop:t,value:e.value,edit:p}:void 0});continue}let ne=!!r&&!m&&i.has(h)&&!a.has(h)||t.isOpen(ee,n);if(c.push({id:te,kind:`node`,depth:f,path:ee,label:e.label,text:PM(g),container:g,open:ne}),!ne)continue;let re=t.level(ee,n)??(g.collapsed?void 0:e.value),ie=[...d,g.kind];re===void 0?t.errors().has(te)?c.push({...u(ee,f+1,`error`),text:t.errors().get(te)}):c.push(u(ee,f+1,`loading`)):l(re,ee,ie,f+1,BM(p,g),m||a.has(h))}h>0&&(!r||m)&&c.push({...u(o,f,`more`),more:h,listed:ee.length})},u=(e,t,r)=>({id:`${FM(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?BM(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),xM.depth,xM.limit);return e.ok?nN(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 PM(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=D({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&&k(0,QM,8,12)(1,$M,1,5,`app-prop-value`,0),e&2){let e;A((e=t.root())?0:1,e)}},dependencies:[yM],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -2969,7 +2969,7 @@ button.edit[_ngcontent-%COMP%] { .more[_ngcontent-%COMP%] { transition: none; } -}`]})};function xN(e){return e.replace(/^_(?=[A-Z])/,``)}function SN(e,t){let n=e=>e.replace(/\\/g,`/`).replace(/^\.\//,``),[r,i]=[n(e),n(t)];return r===i||r.endsWith(`/`+i)||i.endsWith(`/`+r)}function CN(e,t){let n=[],r=new Set([t]);for(let i=e.get(t);i&&!r.has(i);i=e.get(i))r.add(i),n.push(i);return n}var wN={ArrowDown:`next`,ArrowUp:`previous`,ArrowLeft:`parent`,ArrowRight:`child`,Enter:`pick`},TN=`pangular:components:directive-hosts`;function EN(){try{return localStorage.getItem(TN)!==`hidden`}catch{return!0}}var DN=`pangular:panel-action-result`,ON=6e3,kN=0;function AN(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function jN(e,t=window){let n=`pa-${Date.now().toString(36)}-${++kN}`;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!==DN||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`}),ON);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var MN=class e{available=AN();reveal(e,t){return jN({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return jN({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=Fl({token:e,factory:e.ɵfac})};function NN(e){return Object.fromEntries(e.map(e=>[e.name,e.value??null]))}function PN(e){return e.map(e=>({name:e.name,listened:!!e.listened}))}function FN(e){let t={component:e.name,tag:e.tag,hostPath:e.path};e.selector&&(t.selector=e.selector),e.source&&(t.source=e.source),e.changeDetection&&(t.changeDetection=e.changeDetection),e.encapsulation&&(t.encapsulation=e.encapsulation),t.inputs=NN(e.inputs),t.outputs=PN(e.outputs),t.properties=NN(e.properties??[]),e.listeners.length&&(t.listeners=e.listeners),e.directives.length&&(t.directives=e.directives.map(e=>({name:e.name,inputs:NN(e.inputs),outputs:PN(e.outputs)}))),t.injected=e.dependencies.map(e=>({token:e.token,providedBy:e.providedBy?e.providedByName??`an injector`:null}));try{return JSON.stringify(t,null,2)}catch{return JSON.stringify({component:e.name,tag:e.tag,hostPath:e.path})}}function IN(e){return e.selector||e.path}var LN=1e3;function RN(e,t){let n=[];for(let[r,i]of t){let t=e.get(r);t!==void 0&&t!==i&&n.push(r)}return n}function zN(e){try{return JSON.stringify(e)??`undefined`}catch{return String(e)}}var BN=class{ms;changed=w(new Set);owner=null;last=new Map;timers=new Map;constructor(e=LN){this.ms=e}update(e,t){let n=new Map([...t].map(([e,t])=>[e,zN(t)]));if(e!==this.owner){this.clear(),this.owner=e,this.last=n;return}let r=RN(this.last,n);if(this.last=n,r.length){this.changed.update(e=>new Set([...e,...r]));for(let e of r)clearTimeout(this.timers.get(e)),this.timers.set(e,setTimeout(()=>{this.timers.delete(e),this.changed.update(t=>{let n=new Set(t);return n.delete(e),n})},this.ms))}}clear(){for(let e of this.timers.values())clearTimeout(e);this.timers.clear(),this.changed().size&&this.changed.set(new Set)}};function VN(e,t,n=0){return e===`directive`?`directive:${n}:${t}`:`${e}:${t}`}function HN(e,t){return e.length>t.length&&e.startsWith(`${t.slice(0,-1)},`)}var UN=class{sender;target={rpc:null,pageId:null,componentId:null};fetched=w(new Map);pushed=w({});open=w(new Set);loading=w(new Set);errors=w(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=QM(e,t),r=this.pushed();return Object.hasOwn(r,n)?r[n]:this.fetched().get(n)}isOpen(e,t){return this.open().has(QM(e,t))}toggle(e,t,n){let r=QM(e,t),i=new Set(this.open());if(i.has(r)){for(let e of i)(e===r||HN(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=QM(e,t),i=Math.min(LM,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=QM(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 WN(e){return e?.platform===`angular-native`}function GN(e){return WN(e)||e?.platform===`nativescript`}function KN(e,t){let n=Object.values(e??{}).filter(WN);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 qN=12,JN=900;function YN(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 XN=class{options;injector=b(Es);visibleTop=w(0);viewport=w(JN);rowHeight;host=null;scroller=null;detach=null;enabled;range;padTop;padBottom;constructor(e){this.options=e,this.rowHeight=w(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)-qN));return{start:a,end:Math.min(t,Math.max(a,Math.ceil((i+r)/n)+qN))}}),this.padTop=X(()=>this.enabled()?this.range().start*this.rowHeight():0),this.padBottom=X(()=>this.enabled()?(e.count()-this.range().end)*this.rowHeight():0),T(()=>{e.count(),Sd(()=>this.update(),{injector:this.injector})}),b(Os).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:JN)}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&&Sd(t,{injector:this.injector})}};function ZN(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 QN=e=>{let t=parseFloat(e);return Number.isFinite(t)?t:0};function $N(e,t=8){let n=e.ownerDocument.defaultView;if(!n)return e.offsetHeight+t;let r=ZN(e),i=r?n.getComputedStyle(r):null,a=i?QN(i.paddingTop):0,o=i?QN(i.scrollPaddingTop):0,s=QN(n.getComputedStyle(e).top);return Math.max(0,Math.ceil(a+s+e.offsetHeight+t-o))}function eP(e,t,n=8){let r=ZN(e),i=t.getBoundingClientRect().bottom+n-e.getBoundingClientRect().top;i<=0||(r?r.scrollTop-=i:e.ownerDocument.defaultView?.scrollBy(0,-i))}function tP(e,t){let n=zw(t);if(Bw(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=Vw(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function nP(e){return e.flatMap(e=>e.kind===`directive`?nP(e.children):[{...e,children:nP(e.children)}])}function rP(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var iP={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function aP(e){return iP[e]}function oP(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 sP(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 cP(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 lP(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&&!uP(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function uP(e,t){return e.some(e=>e.id===t||uP(e.children,t))}function dP(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 fP=class e{inputs={rpc:w(null),canShowInjector:w(!1),canShowSignals:w(!1),canShowPipes:w(!1)};rpc=X(()=>this.inputs.rpc());canShowInjector=X(()=>this.inputs.canShowInjector());canShowSignals=X(()=>this.inputs.canShowSignals());canShowPipes=X(()=>this.inputs.canShowPipes());staticReport=X(()=>cT(this.rpc()));filter=w(``);pages=w({});chosenPageId=w(null);selectedId=w(null);destroyed=w(null);announcement=w(``);pickMessage=w(``);focusId=w(null);collapsed=w(new Set);showDirectiveHosts=w(EN());routerPages=w([]);pageId=tT();angularPages=pD(()=>this.rpc());angularPage=X(()=>mD(this.angularPages(),this.page()?.pageId??this.pageId));hasControlFlow=X(()=>{let e=this.angularPage()?.version;return!e||Gw(e,`17.0`)});deferUnavailable=X(()=>this.hasControlFlow()&&Kw(this.angularPage(),`deferBlocks`));forUnavailable=X(()=>this.hasControlFlow()&&Kw(this.angularPage(),`forBlocks`));injector=b(Es);host=b(Rl);pagesKnown=w(!1);cleanups=[];selection={pageId:null,detailId:null};gone=!1;shownPageId=Q({source:()=>({pages:this.pages(),chosen:this.chosenPageId()}),computation:({pages:e,chosen:t},n)=>nT(e,{chosen:t,host:this.pageId,previous:n?.value??null})});page=X(()=>{let e=this.shownPageId();return e?this.pages()[e]??null:null});pageOptions=X(()=>Object.values(this.pages()).map(e=>({value:e.pageId,label:e.title||e.url||`Page ${e.pageId}`,hint:e.url})));live=X(()=>(this.page()?.roots.length??0)>0);native=X(()=>GN(this.page()));canEdit=X(()=>this.live()&&!this.native()&&!this.staticReport()&&OT(this.rpc(),`components`));cdPages=w({});cdPage=X(()=>{let e=this.page()?.pageId;return e?this.cdPages()[e]??null:null});cdHosts=X(()=>this.cdPage()?.hosts??{});leaksPages=w({});leaksPage=X(()=>{let e=this.page()?.pageId;return e?this.leaksPages()[e]??null:null});visibleRoots=X(()=>{let e=this.page()?.roots??[];return this.showDirectiveHosts()||!this.page()?.directiveHostCount?e:nP(e)});index=X(()=>{let e=new Map,t=new Map,n=(r,i)=>{for(let a of r)e.has(a.id)||(e.set(a.id,a),i&&t.set(a.id,i),n(a.children,a.id))};return n(this.visibleRoots(),null),{map:e,parents:t}});query=X(()=>this.filter().trim().toLowerCase());filtered=X(()=>tP(this.visibleRoots(),this.query()));shownDirectiveHosts=X(()=>this.showDirectiveHosts()?this.page()?.directiveHostCount??0:0);deferBlocks=X(()=>this.page()?.deferBlocks??[]);ownedDeferBlocks=X(()=>{let e=this.selectedId();return e?this.deferBlocks().filter(t=>t.owner?.id===e):[]});countLabel=X(()=>oP(this.page()?.count??0,this.filtered().matches,!!this.query(),!!this.page()?.truncated,this.shownDirectiveHosts()));truncationText=X(()=>cP(this.page()?.truncatedBy));rows=X(()=>{let e=[],t=this.collapsed(),n=!!this.query(),r=(i,a)=>{i.forEach((o,s)=>{let c=n||!t.has(o.id);e.push({node:o,depth:a,hasChildren:o.children.length>0,expanded:c,posinset:s+1,setsize:i.length}),c&&r(o.children,a+1)})};return r(this.filtered().nodes,0),e});rowWindow=new XN({count:X(()=>this.rows().length),estimate:32,fixed:!0});shownRows=X(()=>{let{start:e,end:t}=this.rowWindow.range();return this.rows().slice(e,t).map((t,n)=>({row:t,index:e+n}))});tabStop=X(()=>{let e=this.rovingId(),t=this.shownRows();return t.some(({row:t})=>t.node.id===e)?e:t[0]?.row.node.id??null});selectedNode=X(()=>{let e=this.selectedId();return e?this.index().map.get(e)??null:null});selectedHost=X(()=>{let e=this.selectedNode();return e?.kind===`directive`?e:null});detail=X(()=>{let e=this.page()?.detail;return e&&e.id===this.selectedId()?e:null});rovingId=X(()=>{let e=this.rows(),t=new Set(e.map(e=>e.node.id)),n=this.focusId();if(n&&t.has(n))return n;let r=this.selectedId();return r&&t.has(r)?r:e[0]?.node.id??null});outlets=X(()=>{let e=this.page()?.pageId;return this.routerPages().find(t=>t.pageId===e)?.outlets??[]});routedById=X(()=>{let e=new Map,t=n=>{for(let r of n){if(r.activated&&r.devtoolsId){let t=e.get(r.devtoolsId)??[];t.push({route:r.route??``,outlet:r.outlet}),e.set(r.devtoolsId,t)}r.children&&t(r.children)}};return t(this.outlets()),e});connect(e){this.inputs=e}destroy(){this.gone=!0,this.highlight(null);for(let e of this.cleanups.splice(0))e()}async watch(e){for(let e of this.cleanups.splice(0))e();let t=e.scope(`pangular`);try{let e=await t.rpc.sharedState(`component-tree`);if(this.gone)return;let n=e=>{let t=e?.pages;this.applyPages(t&&typeof t==`object`?t:{}),e!==void 0&&this.pagesKnown.set(!0)};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.applyPages({}),this.pagesKnown.set(!0)}try{let e=await t.rpc.sharedState(`change-detection`);if(this.gone)return;let n=e=>{let t=e?.pages;this.cdPages.set(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.cdPages.set({})}try{let e=await t.rpc.sharedState(`leaks`);if(this.gone)return;let n=e=>{let t=e?.pages;this.leaksPages.set(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.leaksPages.set({})}try{let e=await t.rpc.sharedState(`router`);if(this.gone)return;let n=e=>{let t=e?.pages;this.routerPages.set(Array.isArray(t)?t:[])};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.routerPages.set([])}}applyPages(e){let t=document.activeElement,n=t instanceof HTMLElement&&this.host.nativeElement.contains(t)?t.closest(`.row`)?.dataset.id??null:null,r=n?this.rows().map(e=>e.node.id):[],i=this.index().map;if(this.pages.set(e),this.syncSelection(i),!n)return;let a=new Set(this.rows().map(e=>e.node.id));if(a.has(n))return;let o=dP(r,a,n);o&&(this.focusId.set(o),Sd(()=>this.rowElement(o)?.focus(),{injector:this.injector}))}syncSelection(e=this.index().map){let t=this.page(),n=lP({...this.selection,selectedId:this.selectedId()},t?{pageId:t.pageId,roots:t.roots,detail:t.detail,truncated:t.truncated}:null),r=n.destroyed?e.get(n.destroyed)?.name:void 0;this.selection={pageId:n.pageId,detailId:n.detailId},n.selectedId!==this.selectedId()&&this.selectedId.set(n.selectedId),n.selectedId&&this.destroyed.set(null),n.destroyed&&(this.destroyed.set(r??`The component`),this.announcement.set(`The selected component was destroyed.`),this.sendSelection(null))}selectPage(e){e&&(this.chosenPageId.set(e),this.destroyed.set(null),this.syncSelection())}setFilter(e){this.filter.set(e);let{matches:t}=this.filtered();this.announcement.set(sP(this.page()?.count??0,t,e,!!this.page()?.truncated,this.shownDirectiveHosts()))}say(e){this.pickMessage.set(e),this.announce(e)}sendSelection(e){let t=this.rpc();t&&t.scope(`pangular`).rpc.call(`select-component`,{pageId:this.page()?.pageId,id:e,console:!0}).catch(()=>{})}rowElement(e){return this.host.nativeElement.querySelector(`.row[data-id="${CSS.escape(e)}"]`)}select(e){let t=this.selectedId()===e?null:e;this.selectedId.set(t),this.destroyed.set(null),this.focusId.set(e),!(t&&this.index().map.get(t)?.kind===`directive`)&&this.sendSelection(t)}ownerOf(e){let{map:t,parents:n}=this.index();for(let r of CN(n,e)){let e=t.get(r);if(e&&e.kind!==`directive`)return e}return null}toggleDirectiveHosts(){let e=!this.showDirectiveHosts();this.showDirectiveHosts.set(e);try{localStorage.setItem(TN,e?`shown`:`hidden`)}catch{}let t=this.selectedId();!e&&t&&!this.index().map.has(t)&&this.selectedId.set(null),this.announce(e?`Directive hosts are shown.`:`Directive hosts are hidden.`)}setHydrationOverlay(e){let t=this.rpc(),n=this.page()?.pageId;t&&n&&(t.scope(`pangular`).rpc.call(`request-hydration-overlay`,{pageId:n,on:e}).catch(()=>{}),this.announce(e?`Outlining hydration on the page.`:`Hydration outline removed.`))}reveal(e,t=!1){let{parents:n}=this.index();this.collapsed.update(t=>{let r=new Set(t);for(let t of CN(n,e))r.delete(t);return r}),this.rows().some(t=>t.node.id===e)||this.setFilter(``),this.selectedId()!==e&&this.select(e),t&&this.focusId.set(e);let r=this.rows().findIndex(t=>t.node.id===e);r>=0&&this.rowWindow.reveal(r),Sd(()=>{let n=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);this.clearToolbar(),n?.scrollIntoView({block:`nearest`}),n&&this.keepBelowToolbar(n),t&&n?.focus({preventScroll:!0})},{injector:this.injector})}clearToolbar(){let e=this.host.nativeElement.querySelector(`.toolbar`);e&&this.host.nativeElement.style.setProperty(`--ct-toolbar-clearance`,`${$N(e)}px`)}keepBelowToolbar(e){let t=this.host.nativeElement.querySelector(`.toolbar`);t&&eP(e,t)}toggle(e,t){t?.stopPropagation(),!this.query()&&this.collapsed.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}expandAll(){this.query()||(this.collapsed.set(new Set),this.announce(`Expanded every component.`))}collapseAll(){if(this.query())return;let{map:e,parents:t}=this.index(),n=this.rovingId(),r=new Set;for(let t of e.values())t.children.length&&r.add(t.id);if(this.collapsed.set(r),n){let e=new Set(this.rows().map(e=>e.node.id)),r=n;for(;r&&!e.has(r);)r=t.get(r);r&&this.focusId.set(r)}this.announce(`Collapsed every component. Only the top level is shown.`)}announce(e){this.announcement.update(t=>t===e?`${e} `:e)}expandSiblings(e){if(this.query())return;let t=this.index().parents.get(e),n=t?this.index().map.get(t)?.children??[]:this.page()?.roots??[];this.collapsed.update(e=>{let t=new Set(e);for(let e of n)t.delete(e.id);return t})}highlight(e){this.requestHighlight(e?{id:e}:null)}highlightBlock(e){e.rootIds.length>1?this.requestHighlight({ids:e.rootIds}):this.highlight(e.rootIds[0]??e.owner?.id??null)}requestHighlight(e){let t=this.rpc();t&&t.scope(`pangular`).rpc.call(`request-page-highlight`,e&&{pageId:this.page()?.pageId,...e}).catch(()=>{})}static ɵfac=function(t){return new(t||e)};static ɵprov=Di({token:e,factory:e.ɵfac})},pP=class e{tree=b(fP);loading=w(!1);error=w(!1);source=w([]);formOwners=w([]);openKey=w(null);guessTitle=`The page gave no exact location. This comes from the source scan, matched by class name.`;sourceByClass=X(()=>{let e=new Map;for(let t of this.source()){let n=xN(t.className);e.set(n,[...e.get(n)??[],t])}return e});filteredSource=X(()=>{let e=this.tree.query(),t=this.source();return e?t.filter(t=>t.selector.toLowerCase().includes(e)||t.className.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):t});sourceCounts=X(()=>{let e=this.source().filter(e=>e.kind===`component`).length;return{components:e,directives:this.source().length-e}});async refresh(){let e=this.tree.rpc();if(!e)return;this.loading.set(!0);let t=e.scope(`pangular`);try{this.source.set(await t.rpc.call(`get-components`)),this.error.set(!1)}catch{this.error.set(!0)}finally{this.loading.set(!1)}let n=await t.rpc.call(`forms-owners`).catch(()=>[]);this.formOwners.set(n??[])}formsIn(e){return this.formOwners().filter(t=>t.file===e)}sourceCandidates(e){let t=(this.sourceByClass().get(xN(e.name))??[]).filter(e=>e.kind===`component`),n=t.filter(t=>t.selector===e.tag);return n.length?n:t}sourceFor(e){let t=this.sourceCandidates(e),n=this.tree.detail()?.source;return n?t.find(e=>SN(e.file,n.file))??null:t.length===1?t[0]:null}directiveSources(e){return(this.sourceByClass().get(xN(e))??[]).filter(e=>e.kind===`directive`)}sourceKey(e){return`${e.file}#${e.className}`}sourceLabel(e){return e.selector?e.kind===`component`&&/^[a-z][\w-]*$/i.test(e.selector)?`<${e.selector}>`:e.selector:xN(e.className)}static ɵfac=function(t){return new(t||e)};static ɵprov=Di({token:e,factory:e.ɵfac})},mP=class e{tree=b(fP);scan=b(pP);bridge=b(MN);actionMessage=Q({source:this.tree.selectedId,computation:()=>``});copyMessage=Q({source:this.tree.selectedId,computation:()=>``});flash=new BN;devtoolsActions=X(()=>this.bridge.available&&!!this.tree.page()&&!this.tree.native()&&!this.tree.staticReport());values=new UN;propFilter=w(``);propQuery=X(()=>this.propFilter().trim().toLowerCase());shownValues=X(()=>{let e=this.tree.detail();if(!e)return null;let t=this.propQuery(),n=e=>!t||e.name.toLowerCase().includes(t)||e.prop.toLowerCase().includes(t),r=(e,r)=>n(e)||iN([e.prop],e.value,e=>this.values.level(e,r),t,1).length>0,i=e.inputs.filter(e=>r(e)),a=e.outputs.filter(n),o=(e.properties??[]).filter(e=>r(e)),s=e.directives.map((e,t)=>({...e,index:t,inputs:e.inputs.filter(e=>r(e,t)),outputs:e.outputs.filter(n)})).filter(e=>!t||e.inputs.length||e.outputs.length);return{inputs:i,outputs:a,properties:o,directives:s,count:i.length+a.length+o.length+s.reduce((e,t)=>e+t.inputs.length+t.outputs.length,0)}});valueTotal=X(()=>{let e=this.tree.detail();return e?e.inputs.length+e.outputs.length+(e.properties?.length??0)+e.directives.reduce((e,t)=>e+t.inputs.length+t.outputs.length,0):0});propFilterStatus=X(()=>{if(!this.propQuery())return``;let e=this.shownValues()?.count??0;return e?`${e} of ${this.valueTotal()} values match.`:`No inputs, outputs or properties match.`});followValues(){let e=this.tree.detail(),t={rpc:this.tree.rpc(),pageId:this.tree.page()?.pageId??null,componentId:e?.id??null};Z(()=>this.values.follow(t,e?.expanded))}trackChanges(){let e=this.tree.detail(),t=e?`${this.tree.page()?.pageId??``}|${e.id}`:null,n=new Map;for(let t of e?.inputs??[])n.set(VN(`input`,t.name),t.value);for(let t of e?.properties??[])n.set(VN(`property`,t.name),t.value);e?.directives.forEach((e,t)=>{for(let r of e.inputs)n.set(VN(`directive`,r.name,t),r.value)}),Z(()=>this.flash.update(t,n))}clearChanges(){this.flash.clear()}flashed(e,t,n){return this.flash.changed().has(VN(e,t,n))}whereOf(e){let t=this.tree.detail()?.source;if(t)return t;let n=this.scan.sourceCandidates(e);return n.length===1?n[0]:null}async revealInElements(e){let t=this.tree.page()?.pageId;if(!t)return;this.actionMessage.set(``);let n=await this.bridge.reveal(t,e.id);this.tree.selectedId()===e.id&&this.actionMessage.set(n.ok?``:`Could not reveal it. The component must be rendered in the tab these DevTools inspect.`)}async openSource(e){let t=this.tree.page()?.pageId;if(!t)return;let n=this.whereOf(e);this.actionMessage.set(``);let r=await this.bridge.openSource(t,e.id,n);this.tree.selectedId()===e.id&&(r.ok||this.actionMessage.set(n?`Not found in Sources. Open ${n.file}:${n.line} in your editor.`:`Could not open the source. The component must be rendered in the tab these DevTools inspect.`))}async copyJson(e){await this.copy(e.id,FN(e),`Copied ${e.name} as JSON.`)}async copyHostPath(e){await this.copy(e.id,IN(e),e.selector?`Copied the host selector.`:`Copied the host path.`)}async copy(e,t,n){let r=n;try{await navigator.clipboard.writeText(t)}catch{r=`The clipboard is not available here.`}this.tree.selectedId()===e&&this.copyMessage.set(r)}static ɵfac=function(t){return new(t||e)};static ɵprov=Di({token:e,factory:e.ɵfac})},hP=[`propFilterInput`],gP=e=>({kind:`component`,id:e}),_P=()=>[],vP=e=>({$implicit:e});function yP(e,t){return this.sourceKey(t)}var bP=(e,t)=>t.formId,xP=(e,t)=>t.outlet+t.route,SP=(e,t)=>t.name+t.index,CP=(e,t)=>t.name,wP=(e,t)=>t.id,TP=(e,t)=>t.token+e;function EP(e,t){if(e&1&&(P(0,`p`,6),I(1,`app-source-link`,10),F()),e&2){let e=t;E(),N(`file`,e.file)(`line`,e.line)}}function DP(e,t){if(e&1&&(P(0,`p`,11)(1,`span`,13),G(2,`Likely`),F(),P(3,`span`,14),G(4,`, matched by class name: `),F(),I(5,`app-source-link`,10),F()),e&2){U();let e=Y(0);N(`title`,U().guessTitle),E(5),N(`file`,e[0].file)(`line`,e[0].line)}}function OP(e,t){if(e&1&&(P(0,`li`),I(1,`app-source-link`,10),F()),e&2){let e=t.$implicit;E(),N(`file`,e.file)(`line`,e.line)}}function kP(e,t){if(e&1&&(P(0,`div`,12)(1,`p`,15)(2,`span`,13),G(3,`Not certain`),F(),G(4),F(),P(5,`ul`,16),j(6,OP,2,2,`li`,null,yP,!0),F()()),e&2){U();let e=Y(0),t=U(),n=Y(0);N(`title`,t.guessTitle),E(4),J(` `,e.length,` source files define `,t.bareName(n.name),`: `),E(2),M(e)}}function AP(e,t){if(e&1&&(G_(0),k(1,DP,6,3,`p`,11)(2,kP,8,3,`div`,12)),e&2){let e=U(),t=Y(0),n=K_(e.sourceCandidates(t));E(),A(n.length===1?1:n.length>1?2:-1)}}function jP(e,t){if(e&1){let e=z();P(0,`div`,17)(1,`button`,18),V(`click`,function(){x(e);let t=U(),n=Y(0);return S(t.revealInElements(n))}),G(2,`Reveal in Elements`),F(),P(3,`button`,18),V(`click`,function(){x(e);let t=U(),n=Y(0);return S(t.openSource(n))}),G(4,`Open source`),F()(),P(5,`p`,19),G(6),F()}if(e&2){let e=U();E(6),K(e.actionMessage())}}function MP(e,t){if(e&1){let e=z();P(0,`button`,21),V(`click`,function(){let t=x(e).$implicit;return S(U(3).showForm.emit(t.formId))}),G(1),F()}if(e&2){let e=t.$implicit;E(),q(` Show `,e.label,` in Forms `)}}function NP(e,t){if(e&1&&(P(0,`div`,7),j(1,MP,2,1,`button`,20,bP),F()),e&2){let e=U(),t=U();E(),M(t.formsIn(e.file))}}function PP(e,t){e&1&&k(0,NP,3,0,`div`,7),e&2&&A(U().formsIn(t.file).length?0:-1)}function FP(e,t){if(e&1){let e=z();P(0,`button`,18),V(`click`,function(){x(e);let t=U(2),n=Y(0);return S(t.openInjector(n))}),G(1,` Show in Injectors `),P(2,`span`,14),G(3),F()()}if(e&2){U(2);let e=Y(0);E(3),q(`: `,e.name)}}function IP(e,t){if(e&1){let e=z();P(0,`button`,18),V(`click`,function(){x(e);let t=U(2),n=Y(0);return S(t.openSignals(n))}),G(1,` Show in Signals `),P(2,`span`,14),G(3),F()()}if(e&2){U(2);let e=Y(0);E(3),q(`: `,e.name)}}function LP(e,t){if(e&1&&(P(0,`div`,7),k(1,FP,4,1,`button`,22),k(2,IP,4,1,`button`,22),F()),e&2){let e=U();E(),A(e.canShowInjector()?1:-1),E(),A(e.canShowSignals()?2:-1)}}function RP(e,t){if(e&1){let e=z();P(0,`div`,23)(1,`button`,18),V(`click`,function(){let t=x(e);return S(U().copyJson(t))}),G(2,`Copy as JSON`),F(),P(3,`button`,18),V(`click`,function(){let t=x(e);return S(U().copyHostPath(t))}),G(4,`Copy host path`),F()(),P(5,`p`,19),G(6),F()}if(e&2){let e=U();E(6),K(e.copyMessage())}}function zP(e,t){if(e&1&&I(0,`app-store-global`,8),e&2){let e=U(),t=Y(0);N(`rpc`,e.rpc())(`pageId`,e.page()?.pageId)(`target`,av(4,gP,t.id))(`label`,t.name)}}function BP(e,t){if(e&1&&(P(0,`dt`),G(1,`Routed`),F(),P(2,`dd`,25),G(3),F()),e&2){let e=t.$implicit;E(3),J(``,e.route||`/`,` in outlet `,e.outlet)}}function VP(e,t){if(e&1&&(P(0,`span`,28),G(1),F()),e&2){let e=U(2);E(),J(``,e.shownValues()?.count??0,` of `,e.valueTotal())}}function HP(e,t){if(e&1){let e=z();P(0,`div`,36)(1,`p`,37),G(2),F(),P(3,`p`,38),G(4,` The filter searches names, and the nested keys of values you opened. `),F(),P(5,`button`,18),V(`click`,function(){return x(e),S(U(3).clearPropFilter())}),G(6,`Clear filters`),F()()}if(e&2){let e=U(3);E(2),q(` No inputs, outputs or properties match “`,e.propFilter().trim(),`” `)}}function UP(e,t){if(e&1&&(P(0,`span`,43),G(1),F()),e&2){let e=U().$implicit;E(),q(`(`,e.prop,`)`)}}function WP(e,t){if(e&1&&(P(0,`li`,41)(1,`span`,42),G(2),k(3,UP,2,1,`span`,43),F(),I(4,`app-value-tree`,44),F()),e&2){let e=t.$implicit,n=U(4),r=U();W(`changed`,r.flashed(`input`,e.name)),E(2),q(` `,e.name,` `),E(),A(e.prop===e.name?-1:3),E(),N(`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&&(P(0,`ul`,39),j(1,WP,5,11,`li`,40,CP),F()),e&2){let e=U(2);E(),M(e.inputs)}}function KP(e,t){e&1&&(P(0,`p`,33),G(1,`No inputs.`),F())}function qP(e,t){if(e&1&&(P(0,`div`,30)(1,`h3`),G(2,` Inputs `),P(3,`span`,31),G(4),F()(),k(5,GP,3,0,`ul`,39)(6,KP,2,0,`p`,33),F()),e&2){let e=U();E(4),K(e.inputs.length),E(),A(e.inputs.length?5:6)}}function JP(e,t){if(e&1&&(P(0,`li`,47)(1,`span`,25),G(2),F(),P(3,`span`,48),G(4),F()()),e&2){let e=t.$implicit;W(`on`,e.listened),E(2),K(e.name),E(2),K(e.listened?`listened`:`no listener`)}}function YP(e,t){if(e&1&&(P(0,`ul`,45),j(1,JP,5,4,`li`,46,CP),F()),e&2){let e=U(2);E(),M(e.outputs)}}function XP(e,t){e&1&&(P(0,`p`,33),G(1,`No outputs.`),F())}function ZP(e,t){if(e&1&&(P(0,`div`,30)(1,`h3`),G(2,` Outputs `),P(3,`span`,31),G(4),F()(),k(5,YP,3,0,`ul`,45)(6,XP,2,0,`p`,33),F()),e&2){let e=U();E(4),K(e.outputs.length),E(),A(e.outputs.length?5:6)}}function QP(e,t){if(e&1&&(P(0,`span`,49),G(1),F()),e&2){let e=U().$implicit;E(),K(e.kind)}}function $P(e,t){if(e&1){let e=z();P(0,`button`,51),V(`click`,function(){x(e);let t=U().$implicit,n=U(5),r=Y(0);return S(n.openSignals(r,t.prop))}),G(1,` Show in Signals`),P(2,`span`,14),G(3),F()()}if(e&2){let e=U().$implicit;E(3),q(`: `,e.name)}}function eF(e,t){if(e&1&&(P(0,`li`,41)(1,`span`,42),G(2),k(3,QP,2,1,`span`,49),k(4,$P,4,1,`button`,50),F(),I(5,`app-value-tree`,44),F()),e&2){let e=t.$implicit,n=U(4),r=U();W(`changed`,r.flashed(`property`,e.name)),E(2),q(` `,e.name,` `),E(),A(e.kind?3:-1),E(),A(e.kind===`signal`&&r.canShowSignals()&&!r.staticReport()?4:-1),E(),N(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function tF(e,t){if(e&1&&(P(0,`ul`,39),j(1,eF,6,12,`li`,40,CP),F()),e&2){let e=U(2);E(),M(e.properties)}}function nF(e,t){e&1&&(P(0,`p`,33),G(1,`No other properties.`),F())}function rF(e,t){if(e&1&&(P(0,`div`,30)(1,`h3`),G(2,` Properties `),P(3,`span`,31),G(4),F()(),k(5,tF,3,0,`ul`,39)(6,nF,2,0,`p`,33),F()),e&2){let e=U();E(4),K(e.properties.length),E(),A(e.properties.length?5:6)}}function iF(e,t){if(e&1&&(P(0,`li`,52),G(1),F()),e&2){let e=t.$implicit;E(),K(e)}}function aF(e,t){if(e&1&&(P(0,`div`,30)(1,`h3`),G(2,` DOM listeners `),P(3,`span`,31),G(4),F()(),P(5,`ul`,45),j(6,iF,2,1,`li`,52,dg),F()()),e&2){let e=U(2);E(4),K(e.listeners.length),E(2),M(e.listeners)}}function oF(e,t){if(e&1&&(P(0,`li`,47)(1,`span`,25),G(2),F(),P(3,`span`,48),G(4),F()()),e&2){let e=t.$implicit;E(2),K(e.state),E(2),K(e.triggers.join(`, `)||`no triggers`)}}function sF(e,t){if(e&1&&(P(0,`div`,30)(1,`h3`),G(2,` Defer blocks `),P(3,`span`,31),G(4),F()(),P(5,`ul`,45),j(6,oF,5,2,`li`,47,wP),F()()),e&2){let e=U(3);E(4),K(e.ownedDeferBlocks().length),E(2),M(e.ownedDeferBlocks())}}function cF(e,t){if(e&1&&(P(0,`li`,41)(1,`span`,42),G(2),F(),I(3,`app-value-tree`,55),F()),e&2){let e=t.$implicit,n=U(2).$implicit,r=U(2),i=U();W(`changed`,i.flashed(`directive`,e.name,n.index)),E(2),K(e.name),E(),N(`prop`,e)(`store`,i.values)(`query`,i.propFilter())(`directive`,n.index)(`componentId`,r.id)(`pageId`,i.page()?.pageId??null)(`rpc`,i.rpc())}}function lF(e,t){if(e&1&&(P(0,`ul`,39),j(1,cF,4,10,`li`,40,CP),F()),e&2){let e=U().$implicit;E(),M(e.inputs)}}function uF(e,t){if(e&1&&(P(0,`li`,47)(1,`span`,25),G(2),F(),P(3,`span`,48),G(4),F()()),e&2){let e=t.$implicit;W(`on`,e.listened),E(2),K(e.name),E(2),K(e.listened?`listened`:`no listener`)}}function dF(e,t){if(e&1&&(P(0,`ul`,45),j(1,uF,5,4,`li`,46,CP),F()),e&2){let e=U().$implicit;E(),M(e.outputs)}}function fF(e,t){e&1&&(P(0,`p`,33),G(1,`No inputs or outputs.`),F())}function pF(e,t){if(e&1&&(P(0,`div`,30)(1,`h3`)(2,`span`,25),G(3),F(),P(4,`span`,49),G(5,`directive on host`),F()(),P(6,`p`,53),Eg(7,54),F(),k(8,lF,3,0,`ul`,39),k(9,dF,3,0,`ul`,45),k(10,fF,2,0,`p`,33),F()),e&2){let e=t.$implicit;U(3);let n=Gg(18);E(3),K(e.name),E(4),N(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,av(6,vP,e.name)),E(),A(e.inputs.length?8:-1),E(),A(e.outputs.length?9:-1),E(),A(!e.inputs.length&&!e.outputs.length?10:-1)}}function mF(e,t){if(e&1&&(I(0,`app-redaction-count`,35),k(1,HP,7,1,`div`,36),k(2,qP,7,2,`div`,30),k(3,ZP,7,2,`div`,30),k(4,rF,7,2,`div`,30),k(5,aF,8,1,`div`,30),k(6,sF,8,1,`div`,30),j(7,pF,11,8,`div`,30,SP)),e&2){let e=t,n=U(),r=U();N(`value`,e),E(),A(r.propQuery()&&!e.count?1:-1),E(),A(!r.propQuery()||e.inputs.length?2:-1),E(),A(!r.propQuery()||e.outputs.length?3:-1),E(),A(!r.propQuery()||e.properties.length?4:-1),E(),A(!r.propQuery()&&n.listeners.length?5:-1),E(),A(!r.propQuery()&&r.ownedDeferBlocks().length?6:-1),E(),M(e.directives)}}function hF(e,t){if(e&1&&(P(0,`span`,49),G(1),F()),e&2){let e=t.$implicit;E(),K(e)}}function gF(e,t){if(e&1&&(P(0,`span`,58),G(1,`from `),P(2,`span`,25),G(3),F()()),e&2){let e=U().$implicit;E(3),K(e.providedByName??`an injector`)}}function _F(e,t){e&1&&(P(0,`span`,59),G(1,`not provided`),F())}function vF(e,t){if(e&1&&(P(0,`li`,56)(1,`span`,57),G(2),F(),j(3,hF,2,1,`span`,49,dg),k(5,gF,4,1,`span`,58)(6,_F,2,0,`span`,59),F()),e&2){let e=t.$implicit;E(2),K(e.token),E(),M(e.flags),E(2),A(e.providedBy?5:6)}}function yF(e,t){if(e&1&&(P(0,`ul`,32),j(1,vF,7,2,`li`,56,TP),F()),e&2){let e=U();E(),M(e.dependencies)}}function bF(e,t){e&1&&(P(0,`p`,33),G(1,`Nothing is injected through the constructor or inject().`),F())}function xF(e,t){if(e&1){let e=z();P(0,`app-component-pipes`,60),V(`showPipe`,function(t){x(e);let n=U(2);return S(n.showPipe.emit({name:t,pageId:n.page()?.pageId}))}),F()}if(e&2){let e=U(2),t=Y(0);N(`rpc`,e.rpc())(`pageId`,e.page()?.pageId)(`component`,e.bareName(t.name))(`canShowPipes`,!e.staticReport())}}function SF(e,t){if(e&1){let e=z();P(0,`dl`,24)(1,`dt`),G(2,`Change detection`),F(),P(3,`dd`),G(4),F(),P(5,`dt`),G(6,`Encapsulation`),F(),P(7,`dd`),G(8),F(),P(9,`dt`),G(10,`Host path`),F(),P(11,`dd`,25),G(12),F(),j(13,BP,4,2,null,null,xP),F(),P(15,`div`,26)(16,`app-search-field`,27,1),U_(`valueChange`,function(t){x(e);let n=U();return H_(n.propFilter,t)||(n.propFilter=t),S(t)}),F(),k(18,VP,2,2,`span`,28),P(19,`p`,29),G(20),F()(),k(21,mF,9,7),P(22,`div`,30)(23,`h3`),G(24,` Injected `),P(25,`span`,31),G(26),F()(),k(27,yF,3,0,`ul`,32)(28,bF,2,0,`p`,33),F(),k(29,xF,1,4,`app-component-pipes`,34)}if(e&2){let e,n=t,r=U(),i=Y(0);E(4),K(n.changeDetection??`Unknown`),E(4),K(n.encapsulation??`Unknown`),E(4),K(n.path),E(),M(r.routedById().get(i.id)??iv(10,_P)),E(3),V_(`value`,r.propFilter),E(2),A(r.propQuery()?18:-1),E(2),K(r.propFilterStatus()),E(),A((e=r.shownValues())?21:-1,e),E(5),K(n.dependencies.length),E(),A(n.dependencies.length?27:28),E(2),A(r.canShowPipes()?29:-1)}}function CF(e,t){e&1&&(P(0,`div`,9),I(1,`span`,61),P(2,`p`,38),G(3,`Reading live values from the page…`),F()())}function wF(e,t){if(e&1&&(P(0,`span`,62)(1,`span`,13),G(2,`Likely`),F(),P(3,`span`,14),G(4,`, matched by class name: `),F(),I(5,`app-source-link`,10),F()),e&2){U();let e=Y(0);N(`title`,U().guessTitle),E(5),N(`file`,e[0].file)(`line`,e[0].line)}}function TF(e,t){if(e&1&&(P(0,`span`,63),G(1),F()),e&2){let e=U().$implicit,t=Y(0),n=U();N(`title`,n.guessTitle),E(),J(``,t.length,` source files define `,n.bareName(e))}}function EF(e,t){if(e&1&&(G_(0),k(1,wF,6,3,`span`,62)(2,TF,2,3,`span`,63)),e&2){let e=t.$implicit,n=K_(U().directiveSources(e));E(),A(n.length===1?1:n.length>1?2:-1)}}var DF=class e{state=b(fP);scan=b(pP);details=b(mP);node=$.required();showForm=xv();showInjector=xv();showSignals=xv();showPipe=xv();rpc=this.state.rpc;page=this.state.page;detail=this.state.detail;native=this.state.native;staticReport=this.state.staticReport;canEdit=this.state.canEdit;canShowInjector=this.state.canShowInjector;canShowSignals=this.state.canShowSignals;canShowPipes=this.state.canShowPipes;routedById=this.state.routedById;ownedDeferBlocks=this.state.ownedDeferBlocks;guessTitle=this.scan.guessTitle;devtoolsActions=this.details.devtoolsActions;actionMessage=this.details.actionMessage;copyMessage=this.details.copyMessage;values=this.details.values;propFilter=this.details.propFilter;propQuery=this.details.propQuery;shownValues=this.details.shownValues;valueTotal=this.details.valueTotal;propFilterStatus=this.details.propFilterStatus;propFilterInput=Ov(`propFilterInput`);clearPropFilter(e){e&&this.propFilter()&&(e.stopPropagation(),e.preventDefault()),this.propFilter.set(``),this.propFilterInput()?.focus()}flashed(e,t,n){return this.details.flashed(e,t,n)}revealInElements(e){return this.details.revealInElements(e)}openSource(e){return this.details.openSource(e)}copyJson(e){return this.details.copyJson(e)}copyHostPath(e){return this.details.copyHostPath(e)}openSignals(e,t){let n=this.page()?.pageId;this.showSignals.emit({componentId:e.id,...n?{pageId:n}:{},...t?{key:t}:{}})}openInjector(e){let t=this.page()?.pageId;this.showInjector.emit(t?{componentId:e.id,pageId:t}:{componentId:e.id})}formsIn(e){return this.scan.formsIn(e)}sourceCandidates(e){return this.scan.sourceCandidates(e)}sourceFor(e){return this.scan.sourceFor(e)}directiveSources(e){return this.scan.directiveSources(e)}sourceKey(e){return this.scan.sourceKey(e)}bareName(e){return xN(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`section`,`appComponentDetail`,``]],viewQuery:function(e,t){e&1&&Ug(t.propFilterInput,hP,5),e&2&&Wg()},inputs:{node:[1,`node`]},outputs:{showForm:`showForm`,showInjector:`showInjector`,showSignals:`showSignals`,showPipe:`showPipe`},decls:19,vars:10,consts:[[`directiveSource`,``],[`propFilterInput`,``],[1,`detail-head`],[1,`badge`],[`id`,`ct-detail-title`,1,`mono`],[1,`mono`,`muted`],[1,`where`,`mono`],[1,`actions`],[1,`console-global`,3,`rpc`,`pageId`,`target`,`label`],[`role`,`status`,1,`state`,`compact`],[3,`file`,`line`],[1,`where`,`mono`,`guess`,3,`title`],[1,`where`,`guess`,3,`title`],[1,`likely`],[1,`sr-only`],[1,`guess-text`],[1,`guess-list`,`mono`],[`role`,`group`,`aria-label`,`Chrome DevTools`,1,`actions`],[`type`,`button`,3,`click`],[`role`,`status`,1,`where`,`action-message`],[`type`,`button`,1,`show-form`],[`type`,`button`,1,`show-form`,3,`click`],[`type`,`button`],[`role`,`group`,`aria-label`,`Copy`,1,`actions`],[1,`facts`],[1,`mono`],[1,`prop-filter`],[`label`,`Filter values`,`placeholder`,`Filter inputs, outputs and properties by name`,1,`search`,3,`valueChange`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[1,`block`],[1,`pill`],[1,`deps`],[1,`empty-line`],[3,`rpc`,`pageId`,`component`,`canShowPipes`],[3,`value`],[1,`state`,`compact`],[1,`state-title`],[1,`state-hint`],[1,`props`],[1,`prop`,3,`changed`],[1,`prop`],[1,`prop-name`,`mono`],[1,`muted`],[3,`prop`,`store`,`query`,`componentId`,`pageId`,`rpc`,`writes`],[1,`chips`],[1,`chip`,3,`on`],[1,`chip`],[1,`chip-note`],[1,`flag`],[`type`,`button`,1,`signal-link`],[`type`,`button`,1,`signal-link`,3,`click`],[1,`chip`,`mono`],[1,`directive-where`,`mono`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[3,`prop`,`store`,`query`,`directive`,`componentId`,`pageId`,`rpc`],[1,`dep`],[1,`token`,`mono`],[1,`from`],[1,`from`,`missing`],[3,`showPipe`,`rpc`,`pageId`,`component`,`canShowPipes`],[`aria-hidden`,`true`,1,`spinner`],[1,`directive-guess`,3,`title`],[1,`chip-note`,3,`title`]],template:function(e,t){if(e&1&&(G_(0),P(1,`header`,2)(2,`span`,3),G(3,`component`),F(),P(4,`h2`,4),G(5),F(),P(6,`span`,5),G(7),F(),k(8,EP,2,2,`p`,6)(9,AP,3,2),k(10,jP,7,1),k(11,PP,1,1),k(12,LP,3,2,`div`,7),k(13,RP,7,1),k(14,zP,1,6,`app-store-global`,8),F(),k(15,SF,30,11)(16,CF,4,0,`div`,9),Hh(17,EF,3,2,`ng-template`,null,0,mv)),e&2){let e,n,r,i,a=K_(t.node());E(5),K(a.name),E(2),q(`<`,a.tag,`>`),E(),A((e=t.detail()?.source)?8:9,e),E(2),A(t.devtoolsActions()?10:-1),E(),A((n=t.sourceFor(a))?11:-1,n),E(),A((t.canShowInjector()||t.canShowSignals())&&!t.staticReport()?12:-1),E(),A((r=t.detail())?13:-1,r),E(),A(!t.staticReport()&&!t.native()?14:-1),E(),A((i=t.detail())?15:16,i)}},dependencies:[uy,Xj,iD,aM,uM,bN,wM],styles:[`.mono[_ngcontent-%COMP%] { +}`]})};function iN(e){return e.replace(/^_(?=[A-Z])/,``)}function aN(e,t){let n=e=>e.replace(/\\/g,`/`).replace(/^\.\//,``),[r,i]=[n(e),n(t)];return r===i||r.endsWith(`/`+i)||i.endsWith(`/`+r)}function oN(e,t){let n=[],r=new Set([t]);for(let i=e.get(t);i&&!r.has(i);i=e.get(i))r.add(i),n.push(i);return n}var sN={ArrowDown:`next`,ArrowUp:`previous`,ArrowLeft:`parent`,ArrowRight:`child`,Enter:`pick`},cN=`pangular:components:directive-hosts`;function lN(){try{return localStorage.getItem(cN)!==`hidden`}catch{return!0}}var uN=`pangular:panel-action-result`,dN=6e3,fN=0;function pN(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function mN(e,t=window){let n=`pa-${Date.now().toString(36)}-${++fN}`;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!==uN||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`}),dN);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var hN=class e{available=pN();reveal(e,t){return mN({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return mN({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=Tl({token:e,factory:e.ɵfac})};function gN(e){return Object.fromEntries(e.map(e=>[e.name,e.value??null]))}function _N(e){return e.map(e=>({name:e.name,listened:!!e.listened}))}function vN(e){let t={component:e.name,tag:e.tag,hostPath:e.path};e.selector&&(t.selector=e.selector),e.source&&(t.source=e.source),e.changeDetection&&(t.changeDetection=e.changeDetection),e.encapsulation&&(t.encapsulation=e.encapsulation),t.inputs=gN(e.inputs),t.outputs=_N(e.outputs),t.properties=gN(e.properties??[]),e.listeners.length&&(t.listeners=e.listeners),e.directives.length&&(t.directives=e.directives.map(e=>({name:e.name,inputs:gN(e.inputs),outputs:_N(e.outputs)}))),t.injected=e.dependencies.map(e=>({token:e.token,providedBy:e.providedBy?e.providedByName??`an injector`:null}));try{return JSON.stringify(t,null,2)}catch{return JSON.stringify({component:e.name,tag:e.tag,hostPath:e.path})}}function yN(e){return e.selector||e.path}var bN=1e3;function xN(e,t){let n=[];for(let[r,i]of t){let t=e.get(r);t!==void 0&&t!==i&&n.push(r)}return n}function SN(e){try{return JSON.stringify(e)??`undefined`}catch{return String(e)}}var CN=class{ms;changed=w(new Set);owner=null;last=new Map;timers=new Map;constructor(e=bN){this.ms=e}update(e,t){let n=new Map([...t].map(([e,t])=>[e,SN(t)]));if(e!==this.owner){this.clear(),this.owner=e,this.last=n;return}let r=xN(this.last,n);if(this.last=n,r.length){this.changed.update(e=>new Set([...e,...r]));for(let e of r)clearTimeout(this.timers.get(e)),this.timers.set(e,setTimeout(()=>{this.timers.delete(e),this.changed.update(t=>{let n=new Set(t);return n.delete(e),n})},this.ms))}}clear(){for(let e of this.timers.values())clearTimeout(e);this.timers.clear(),this.changed().size&&this.changed.set(new Set)}};function wN(e,t,n=0){return e===`directive`?`directive:${n}:${t}`:`${e}:${t}`}function TN(e,t){return e.length>t.length&&e.startsWith(`${t.slice(0,-1)},`)}var EN=class{sender;target={rpc:null,pageId:null,componentId:null};fetched=w(new Map);pushed=w({});open=w(new Set);loading=w(new Set);errors=w(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=FM(e,t),r=this.pushed();return Object.hasOwn(r,n)?r[n]:this.fetched().get(n)}isOpen(e,t){return this.open().has(FM(e,t))}toggle(e,t,n){let r=FM(e,t),i=new Set(this.open());if(i.has(r)){for(let e of i)(e===r||TN(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=FM(e,t),i=Math.min(bM,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=FM(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 DN(e){return e?.platform===`angular-native`}function ON(e){return DN(e)||e?.platform===`nativescript`}function kN(e,t){let n=Object.values(e??{}).filter(DN);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 AN=12,jN=900;function MN(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 NN=class{options;injector=b(_s);visibleTop=w(0);viewport=w(jN);rowHeight;host=null;scroller=null;detach=null;enabled;range;padTop;padBottom;constructor(e){this.options=e,this.rowHeight=w(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)-AN));return{start:a,end:Math.min(t,Math.max(a,Math.ceil((i+r)/n)+AN))}}),this.padTop=X(()=>this.enabled()?this.range().start*this.rowHeight():0),this.padBottom=X(()=>this.enabled()?(e.count()-this.range().end)*this.rowHeight():0),T(()=>{e.count(),fd(()=>this.update(),{injector:this.injector})}),b(ys).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:jN)}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&&fd(t,{injector:this.injector})}};function PN(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 FN=e=>{let t=parseFloat(e);return Number.isFinite(t)?t:0};function IN(e,t=8){let n=e.ownerDocument.defaultView;if(!n)return e.offsetHeight+t;let r=PN(e),i=r?n.getComputedStyle(r):null,a=i?FN(i.paddingTop):0,o=i?FN(i.scrollPaddingTop):0,s=FN(n.getComputedStyle(e).top);return Math.max(0,Math.ceil(a+s+e.offsetHeight+t-o))}function LN(e,t,n=8){let r=PN(e),i=t.getBoundingClientRect().bottom+n-e.getBoundingClientRect().top;i<=0||(r?r.scrollTop-=i:e.ownerDocument.defaultView?.scrollBy(0,-i))}function RN(e,t){let n=xw(t);if(Sw(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=Cw(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function zN(e){return e.flatMap(e=>e.kind===`directive`?zN(e.children):[{...e,children:zN(e.children)}])}function BN(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var VN={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function HN(e){return VN[e]}function UN(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 WN(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 GN(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 KN(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&&!qN(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function qN(e,t){return e.some(e=>e.id===t||qN(e.children,t))}function JN(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 YN=class e{inputs={rpc:w(null),canShowInjector:w(!1),canShowSignals:w(!1),canShowPipes:w(!1)};rpc=X(()=>this.inputs.rpc());canShowInjector=X(()=>this.inputs.canShowInjector());canShowSignals=X(()=>this.inputs.canShowSignals());canShowPipes=X(()=>this.inputs.canShowPipes());staticReport=X(()=>Ww(this.rpc()));filter=w(``);pages=w({});chosenPageId=w(null);selectedId=w(null);destroyed=w(null);announcement=w(``);pickMessage=w(``);focusId=w(null);collapsed=w(new Set);showDirectiveHosts=w(lN());routerPages=w([]);pageId=Lw();angularPages=XE(()=>this.rpc());angularPage=X(()=>ZE(this.angularPages(),this.page()?.pageId??this.pageId));hasControlFlow=X(()=>{let e=this.angularPage()?.version;return!e||Dw(e,`17.0`)});deferUnavailable=X(()=>this.hasControlFlow()&&Ow(this.angularPage(),`deferBlocks`));forUnavailable=X(()=>this.hasControlFlow()&&Ow(this.angularPage(),`forBlocks`));injector=b(_s);host=b(Ol);pagesKnown=w(!1);cleanups=[];selection={pageId:null,detailId:null};gone=!1;shownPageId=Q({source:()=>({pages:this.pages(),chosen:this.chosenPageId()}),computation:({pages:e,chosen:t},n)=>Rw(e,{chosen:t,host:this.pageId,previous:n?.value??null})});page=X(()=>{let e=this.shownPageId();return e?this.pages()[e]??null:null});pageOptions=X(()=>Object.values(this.pages()).map(e=>({value:e.pageId,label:e.title||e.url||`Page ${e.pageId}`,hint:e.url})));live=X(()=>(this.page()?.roots.length??0)>0);native=X(()=>ON(this.page()));canEdit=X(()=>this.live()&&!this.native()&&!this.staticReport()&&uT(this.rpc(),`components`));cdPages=w({});cdPage=X(()=>{let e=this.page()?.pageId;return e?this.cdPages()[e]??null:null});cdHosts=X(()=>this.cdPage()?.hosts??{});leaksPages=w({});leaksPage=X(()=>{let e=this.page()?.pageId;return e?this.leaksPages()[e]??null:null});visibleRoots=X(()=>{let e=this.page()?.roots??[];return this.showDirectiveHosts()||!this.page()?.directiveHostCount?e:zN(e)});index=X(()=>{let e=new Map,t=new Map,n=(r,i)=>{for(let a of r)e.has(a.id)||(e.set(a.id,a),i&&t.set(a.id,i),n(a.children,a.id))};return n(this.visibleRoots(),null),{map:e,parents:t}});query=X(()=>this.filter().trim().toLowerCase());filtered=X(()=>RN(this.visibleRoots(),this.query()));shownDirectiveHosts=X(()=>this.showDirectiveHosts()?this.page()?.directiveHostCount??0:0);deferBlocks=X(()=>this.page()?.deferBlocks??[]);ownedDeferBlocks=X(()=>{let e=this.selectedId();return e?this.deferBlocks().filter(t=>t.owner?.id===e):[]});countLabel=X(()=>UN(this.page()?.count??0,this.filtered().matches,!!this.query(),!!this.page()?.truncated,this.shownDirectiveHosts()));truncationText=X(()=>GN(this.page()?.truncatedBy));rows=X(()=>{let e=[],t=this.collapsed(),n=!!this.query(),r=(i,a)=>{i.forEach((o,s)=>{let c=n||!t.has(o.id);e.push({node:o,depth:a,hasChildren:o.children.length>0,expanded:c,posinset:s+1,setsize:i.length}),c&&r(o.children,a+1)})};return r(this.filtered().nodes,0),e});rowWindow=new NN({count:X(()=>this.rows().length),estimate:32,fixed:!0});shownRows=X(()=>{let{start:e,end:t}=this.rowWindow.range();return this.rows().slice(e,t).map((t,n)=>({row:t,index:e+n}))});tabStop=X(()=>{let e=this.rovingId(),t=this.shownRows();return t.some(({row:t})=>t.node.id===e)?e:t[0]?.row.node.id??null});selectedNode=X(()=>{let e=this.selectedId();return e?this.index().map.get(e)??null:null});selectedHost=X(()=>{let e=this.selectedNode();return e?.kind===`directive`?e:null});detail=X(()=>{let e=this.page()?.detail;return e&&e.id===this.selectedId()?e:null});rovingId=X(()=>{let e=this.rows(),t=new Set(e.map(e=>e.node.id)),n=this.focusId();if(n&&t.has(n))return n;let r=this.selectedId();return r&&t.has(r)?r:e[0]?.node.id??null});outlets=X(()=>{let e=this.page()?.pageId;return this.routerPages().find(t=>t.pageId===e)?.outlets??[]});routedById=X(()=>{let e=new Map,t=n=>{for(let r of n){if(r.activated&&r.devtoolsId){let t=e.get(r.devtoolsId)??[];t.push({route:r.route??``,outlet:r.outlet}),e.set(r.devtoolsId,t)}r.children&&t(r.children)}};return t(this.outlets()),e});connect(e){this.inputs=e}destroy(){this.gone=!0,this.highlight(null);for(let e of this.cleanups.splice(0))e()}async watch(e){for(let e of this.cleanups.splice(0))e();let t=e.scope(`pangular`);try{let e=await t.rpc.sharedState(`component-tree`);if(this.gone)return;let n=e=>{let t=e?.pages;this.applyPages(t&&typeof t==`object`?t:{}),e!==void 0&&this.pagesKnown.set(!0)};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.applyPages({}),this.pagesKnown.set(!0)}try{let e=await t.rpc.sharedState(`change-detection`);if(this.gone)return;let n=e=>{let t=e?.pages;this.cdPages.set(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.cdPages.set({})}try{let e=await t.rpc.sharedState(`leaks`);if(this.gone)return;let n=e=>{let t=e?.pages;this.leaksPages.set(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.leaksPages.set({})}try{let e=await t.rpc.sharedState(`router`);if(this.gone)return;let n=e=>{let t=e?.pages;this.routerPages.set(Array.isArray(t)?t:[])};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.routerPages.set([])}}applyPages(e){let t=document.activeElement,n=t instanceof HTMLElement&&this.host.nativeElement.contains(t)?t.closest(`.row`)?.dataset.id??null:null,r=n?this.rows().map(e=>e.node.id):[],i=this.index().map;if(this.pages.set(e),this.syncSelection(i),!n)return;let a=new Set(this.rows().map(e=>e.node.id));if(a.has(n))return;let o=JN(r,a,n);o&&(this.focusId.set(o),fd(()=>this.rowElement(o)?.focus(),{injector:this.injector}))}syncSelection(e=this.index().map){let t=this.page(),n=KN({...this.selection,selectedId:this.selectedId()},t?{pageId:t.pageId,roots:t.roots,detail:t.detail,truncated:t.truncated}:null),r=n.destroyed?e.get(n.destroyed)?.name:void 0;this.selection={pageId:n.pageId,detailId:n.detailId},n.selectedId!==this.selectedId()&&this.selectedId.set(n.selectedId),n.selectedId&&this.destroyed.set(null),n.destroyed&&(this.destroyed.set(r??`The component`),this.announcement.set(`The selected component was destroyed.`),this.sendSelection(null))}selectPage(e){e&&(this.chosenPageId.set(e),this.destroyed.set(null),this.syncSelection())}setFilter(e){this.filter.set(e);let{matches:t}=this.filtered();this.announcement.set(WN(this.page()?.count??0,t,e,!!this.page()?.truncated,this.shownDirectiveHosts()))}say(e){this.pickMessage.set(e),this.announce(e)}sendSelection(e){let t=this.rpc();t&&t.scope(`pangular`).rpc.call(`select-component`,{pageId:this.page()?.pageId,id:e,console:!0}).catch(()=>{})}rowElement(e){return this.host.nativeElement.querySelector(`.row[data-id="${CSS.escape(e)}"]`)}select(e){let t=this.selectedId()===e?null:e;this.selectedId.set(t),this.destroyed.set(null),this.focusId.set(e),!(t&&this.index().map.get(t)?.kind===`directive`)&&this.sendSelection(t)}ownerOf(e){let{map:t,parents:n}=this.index();for(let r of oN(n,e)){let e=t.get(r);if(e&&e.kind!==`directive`)return e}return null}toggleDirectiveHosts(){let e=!this.showDirectiveHosts();this.showDirectiveHosts.set(e);try{localStorage.setItem(cN,e?`shown`:`hidden`)}catch{}let t=this.selectedId();!e&&t&&!this.index().map.has(t)&&this.selectedId.set(null),this.announce(e?`Directive hosts are shown.`:`Directive hosts are hidden.`)}setHydrationOverlay(e){let t=this.rpc(),n=this.page()?.pageId;t&&n&&(t.scope(`pangular`).rpc.call(`request-hydration-overlay`,{pageId:n,on:e}).catch(()=>{}),this.announce(e?`Outlining hydration on the page.`:`Hydration outline removed.`))}reveal(e,t=!1){let{parents:n}=this.index();this.collapsed.update(t=>{let r=new Set(t);for(let t of oN(n,e))r.delete(t);return r}),this.rows().some(t=>t.node.id===e)||this.setFilter(``),this.selectedId()!==e&&this.select(e),t&&this.focusId.set(e);let r=this.rows().findIndex(t=>t.node.id===e);r>=0&&this.rowWindow.reveal(r),fd(()=>{let n=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);this.clearToolbar(),n?.scrollIntoView({block:`nearest`}),n&&this.keepBelowToolbar(n),t&&n?.focus({preventScroll:!0})},{injector:this.injector})}clearToolbar(){let e=this.host.nativeElement.querySelector(`.toolbar`);e&&this.host.nativeElement.style.setProperty(`--ct-toolbar-clearance`,`${IN(e)}px`)}keepBelowToolbar(e){let t=this.host.nativeElement.querySelector(`.toolbar`);t&&LN(e,t)}toggle(e,t){t?.stopPropagation(),!this.query()&&this.collapsed.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}expandAll(){this.query()||(this.collapsed.set(new Set),this.announce(`Expanded every component.`))}collapseAll(){if(this.query())return;let{map:e,parents:t}=this.index(),n=this.rovingId(),r=new Set;for(let t of e.values())t.children.length&&r.add(t.id);if(this.collapsed.set(r),n){let e=new Set(this.rows().map(e=>e.node.id)),r=n;for(;r&&!e.has(r);)r=t.get(r);r&&this.focusId.set(r)}this.announce(`Collapsed every component. Only the top level is shown.`)}announce(e){this.announcement.update(t=>t===e?`${e} `:e)}expandSiblings(e){if(this.query())return;let t=this.index().parents.get(e),n=t?this.index().map.get(t)?.children??[]:this.page()?.roots??[];this.collapsed.update(e=>{let t=new Set(e);for(let e of n)t.delete(e.id);return t})}highlight(e){this.requestHighlight(e?{id:e}:null)}highlightBlock(e){e.rootIds.length>1?this.requestHighlight({ids:e.rootIds}):this.highlight(e.rootIds[0]??e.owner?.id??null)}requestHighlight(e){let t=this.rpc();t&&t.scope(`pangular`).rpc.call(`request-page-highlight`,e&&{pageId:this.page()?.pageId,...e}).catch(()=>{})}static ɵfac=function(t){return new(t||e)};static ɵprov=bi({token:e,factory:e.ɵfac})},XN=class e{tree=b(YN);loading=w(!1);error=w(!1);source=w([]);formOwners=w([]);openKey=w(null);guessTitle=`The page gave no exact location. This comes from the source scan, matched by class name.`;sourceByClass=X(()=>{let e=new Map;for(let t of this.source()){let n=iN(t.className);e.set(n,[...e.get(n)??[],t])}return e});filteredSource=X(()=>{let e=this.tree.query(),t=this.source();return e?t.filter(t=>t.selector.toLowerCase().includes(e)||t.className.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):t});sourceCounts=X(()=>{let e=this.source().filter(e=>e.kind===`component`).length;return{components:e,directives:this.source().length-e}});async refresh(){let e=this.tree.rpc();if(!e)return;this.loading.set(!0);let t=e.scope(`pangular`);try{this.source.set(await t.rpc.call(`get-components`)),this.error.set(!1)}catch{this.error.set(!0)}finally{this.loading.set(!1)}let n=await t.rpc.call(`forms-owners`).catch(()=>[]);this.formOwners.set(n??[])}formsIn(e){return this.formOwners().filter(t=>t.file===e)}sourceCandidates(e){let t=(this.sourceByClass().get(iN(e.name))??[]).filter(e=>e.kind===`component`),n=t.filter(t=>t.selector===e.tag);return n.length?n:t}sourceFor(e){let t=this.sourceCandidates(e),n=this.tree.detail()?.source;return n?t.find(e=>aN(e.file,n.file))??null:t.length===1?t[0]:null}directiveSources(e){return(this.sourceByClass().get(iN(e))??[]).filter(e=>e.kind===`directive`)}sourceKey(e){return`${e.file}#${e.className}`}sourceLabel(e){return e.selector?e.kind===`component`&&/^[a-z][\w-]*$/i.test(e.selector)?`<${e.selector}>`:e.selector:iN(e.className)}static ɵfac=function(t){return new(t||e)};static ɵprov=bi({token:e,factory:e.ɵfac})},ZN=class e{tree=b(YN);scan=b(XN);bridge=b(hN);actionMessage=Q({source:this.tree.selectedId,computation:()=>``});copyMessage=Q({source:this.tree.selectedId,computation:()=>``});flash=new CN;devtoolsActions=X(()=>this.bridge.available&&!!this.tree.page()&&!this.tree.native()&&!this.tree.staticReport());values=new EN;propFilter=w(``);propQuery=X(()=>this.propFilter().trim().toLowerCase());shownValues=X(()=>{let e=this.tree.detail();if(!e)return null;let t=this.propQuery(),n=e=>!t||e.name.toLowerCase().includes(t)||e.prop.toLowerCase().includes(t),r=(e,r)=>n(e)||VM([e.prop],e.value,e=>this.values.level(e,r),t,1).length>0,i=e.inputs.filter(e=>r(e)),a=e.outputs.filter(n),o=(e.properties??[]).filter(e=>r(e)),s=e.directives.map((e,t)=>({...e,index:t,inputs:e.inputs.filter(e=>r(e,t)),outputs:e.outputs.filter(n)})).filter(e=>!t||e.inputs.length||e.outputs.length);return{inputs:i,outputs:a,properties:o,directives:s,count:i.length+a.length+o.length+s.reduce((e,t)=>e+t.inputs.length+t.outputs.length,0)}});valueTotal=X(()=>{let e=this.tree.detail();return e?e.inputs.length+e.outputs.length+(e.properties?.length??0)+e.directives.reduce((e,t)=>e+t.inputs.length+t.outputs.length,0):0});propFilterStatus=X(()=>{if(!this.propQuery())return``;let e=this.shownValues()?.count??0;return e?`${e} of ${this.valueTotal()} values match.`:`No inputs, outputs or properties match.`});followValues(){let e=this.tree.detail(),t={rpc:this.tree.rpc(),pageId:this.tree.page()?.pageId??null,componentId:e?.id??null};Z(()=>this.values.follow(t,e?.expanded))}trackChanges(){let e=this.tree.detail(),t=e?`${this.tree.page()?.pageId??``}|${e.id}`:null,n=new Map;for(let t of e?.inputs??[])n.set(wN(`input`,t.name),t.value);for(let t of e?.properties??[])n.set(wN(`property`,t.name),t.value);e?.directives.forEach((e,t)=>{for(let r of e.inputs)n.set(wN(`directive`,r.name,t),r.value)}),Z(()=>this.flash.update(t,n))}clearChanges(){this.flash.clear()}flashed(e,t,n){return this.flash.changed().has(wN(e,t,n))}whereOf(e){let t=this.tree.detail()?.source;if(t)return t;let n=this.scan.sourceCandidates(e);return n.length===1?n[0]:null}async revealInElements(e){let t=this.tree.page()?.pageId;if(!t)return;this.actionMessage.set(``);let n=await this.bridge.reveal(t,e.id);this.tree.selectedId()===e.id&&this.actionMessage.set(n.ok?``:`Could not reveal it. The component must be rendered in the tab these DevTools inspect.`)}async openSource(e){let t=this.tree.page()?.pageId;if(!t)return;let n=this.whereOf(e);this.actionMessage.set(``);let r=await this.bridge.openSource(t,e.id,n);this.tree.selectedId()===e.id&&(r.ok||this.actionMessage.set(n?`Not found in Sources. Open ${n.file}:${n.line} in your editor.`:`Could not open the source. The component must be rendered in the tab these DevTools inspect.`))}async copyJson(e){await this.copy(e.id,vN(e),`Copied ${e.name} as JSON.`)}async copyHostPath(e){await this.copy(e.id,yN(e),e.selector?`Copied the host selector.`:`Copied the host path.`)}async copy(e,t,n){let r=n;try{await navigator.clipboard.writeText(t)}catch{r=`The clipboard is not available here.`}this.tree.selectedId()===e&&this.copyMessage.set(r)}static ɵfac=function(t){return new(t||e)};static ɵprov=bi({token:e,factory:e.ɵfac})},QN=[`propFilterInput`],$N=e=>({kind:`component`,id:e}),eP=()=>[],tP=e=>({$implicit:e});function nP(e,t){return this.sourceKey(t)}var rP=(e,t)=>t.formId,iP=(e,t)=>t.outlet+t.route,aP=(e,t)=>t.name+t.index,oP=(e,t)=>t.name,sP=(e,t)=>t.id,cP=(e,t)=>t.token+e;function lP(e,t){if(e&1&&(P(0,`p`,6),I(1,`app-source-link`,10),F()),e&2){let e=t;E(),N(`file`,e.file)(`line`,e.line)}}function uP(e,t){if(e&1&&(P(0,`p`,11)(1,`span`,13),G(2,`Likely`),F(),P(3,`span`,14),G(4,`, matched by class name: `),F(),I(5,`app-source-link`,10),F()),e&2){U();let e=Y(0);N(`title`,U().guessTitle),E(5),N(`file`,e[0].file)(`line`,e[0].line)}}function dP(e,t){if(e&1&&(P(0,`li`),I(1,`app-source-link`,10),F()),e&2){let e=t.$implicit;E(),N(`file`,e.file)(`line`,e.line)}}function fP(e,t){if(e&1&&(P(0,`div`,12)(1,`p`,15)(2,`span`,13),G(3,`Not certain`),F(),G(4),F(),P(5,`ul`,16),j(6,dP,2,2,`li`,null,nP,!0),F()()),e&2){U();let e=Y(0),t=U(),n=Y(0);N(`title`,t.guessTitle),E(4),J(` `,e.length,` source files define `,t.bareName(n.name),`: `),E(2),M(e)}}function pP(e,t){if(e&1&&(N_(0),k(1,uP,6,3,`p`,11)(2,fP,8,3,`div`,12)),e&2){let e=U(),t=Y(0),n=P_(e.sourceCandidates(t));E(),A(n.length===1?1:n.length>1?2:-1)}}function mP(e,t){if(e&1){let e=z();P(0,`div`,17)(1,`button`,18),V(`click`,function(){x(e);let t=U(),n=Y(0);return S(t.revealInElements(n))}),G(2,`Reveal in Elements`),F(),P(3,`button`,18),V(`click`,function(){x(e);let t=U(),n=Y(0);return S(t.openSource(n))}),G(4,`Open source`),F()(),P(5,`p`,19),G(6),F()}if(e&2){let e=U();E(6),K(e.actionMessage())}}function hP(e,t){if(e&1){let e=z();P(0,`button`,21),V(`click`,function(){let t=x(e).$implicit;return S(U(3).showForm.emit(t.formId))}),G(1),F()}if(e&2){let e=t.$implicit;E(),q(` Show `,e.label,` in Forms `)}}function gP(e,t){if(e&1&&(P(0,`div`,7),j(1,hP,2,1,`button`,20,rP),F()),e&2){let e=U(),t=U();E(),M(t.formsIn(e.file))}}function _P(e,t){e&1&&k(0,gP,3,0,`div`,7),e&2&&A(U().formsIn(t.file).length?0:-1)}function vP(e,t){if(e&1){let e=z();P(0,`button`,18),V(`click`,function(){x(e);let t=U(2),n=Y(0);return S(t.openInjector(n))}),G(1,` Show in Injectors `),P(2,`span`,14),G(3),F()()}if(e&2){U(2);let e=Y(0);E(3),q(`: `,e.name)}}function yP(e,t){if(e&1){let e=z();P(0,`button`,18),V(`click`,function(){x(e);let t=U(2),n=Y(0);return S(t.openSignals(n))}),G(1,` Show in Signals `),P(2,`span`,14),G(3),F()()}if(e&2){U(2);let e=Y(0);E(3),q(`: `,e.name)}}function bP(e,t){if(e&1&&(P(0,`div`,7),k(1,vP,4,1,`button`,22),k(2,yP,4,1,`button`,22),F()),e&2){let e=U();E(),A(e.canShowInjector()?1:-1),E(),A(e.canShowSignals()?2:-1)}}function xP(e,t){if(e&1){let e=z();P(0,`div`,23)(1,`button`,18),V(`click`,function(){let t=x(e);return S(U().copyJson(t))}),G(2,`Copy as JSON`),F(),P(3,`button`,18),V(`click`,function(){let t=x(e);return S(U().copyHostPath(t))}),G(4,`Copy host path`),F()(),P(5,`p`,19),G(6),F()}if(e&2){let e=U();E(6),K(e.copyMessage())}}function SP(e,t){if(e&1&&I(0,`app-store-global`,8),e&2){let e=U(),t=Y(0);N(`rpc`,e.rpc())(`pageId`,e.page()?.pageId)(`target`,q_(4,$N,t.id))(`label`,t.name)}}function CP(e,t){if(e&1&&(P(0,`dt`),G(1,`Routed`),F(),P(2,`dd`,25),G(3),F()),e&2){let e=t.$implicit;E(3),J(``,e.route||`/`,` in outlet `,e.outlet)}}function wP(e,t){if(e&1&&(P(0,`span`,28),G(1),F()),e&2){let e=U(2);E(),J(``,e.shownValues()?.count??0,` of `,e.valueTotal())}}function TP(e,t){if(e&1){let e=z();P(0,`div`,36)(1,`p`,37),G(2),F(),P(3,`p`,38),G(4,` The filter searches names, and the nested keys of values you opened. `),F(),P(5,`button`,18),V(`click`,function(){return x(e),S(U(3).clearPropFilter())}),G(6,`Clear filters`),F()()}if(e&2){let e=U(3);E(2),q(` No inputs, outputs or properties match “`,e.propFilter().trim(),`” `)}}function EP(e,t){if(e&1&&(P(0,`span`,43),G(1),F()),e&2){let e=U().$implicit;E(),q(`(`,e.prop,`)`)}}function DP(e,t){if(e&1&&(P(0,`li`,41)(1,`span`,42),G(2),k(3,EP,2,1,`span`,43),F(),I(4,`app-value-tree`,44),F()),e&2){let e=t.$implicit,n=U(4),r=U();W(`changed`,r.flashed(`input`,e.name)),E(2),q(` `,e.name,` `),E(),A(e.prop===e.name?-1:3),E(),N(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function OP(e,t){if(e&1&&(P(0,`ul`,39),j(1,DP,5,11,`li`,40,oP),F()),e&2){let e=U(2);E(),M(e.inputs)}}function kP(e,t){e&1&&(P(0,`p`,33),G(1,`No inputs.`),F())}function AP(e,t){if(e&1&&(P(0,`div`,30)(1,`h3`),G(2,` Inputs `),P(3,`span`,31),G(4),F()(),k(5,OP,3,0,`ul`,39)(6,kP,2,0,`p`,33),F()),e&2){let e=U();E(4),K(e.inputs.length),E(),A(e.inputs.length?5:6)}}function jP(e,t){if(e&1&&(P(0,`li`,47)(1,`span`,25),G(2),F(),P(3,`span`,48),G(4),F()()),e&2){let e=t.$implicit;W(`on`,e.listened),E(2),K(e.name),E(2),K(e.listened?`listened`:`no listener`)}}function MP(e,t){if(e&1&&(P(0,`ul`,45),j(1,jP,5,4,`li`,46,oP),F()),e&2){let e=U(2);E(),M(e.outputs)}}function NP(e,t){e&1&&(P(0,`p`,33),G(1,`No outputs.`),F())}function PP(e,t){if(e&1&&(P(0,`div`,30)(1,`h3`),G(2,` Outputs `),P(3,`span`,31),G(4),F()(),k(5,MP,3,0,`ul`,45)(6,NP,2,0,`p`,33),F()),e&2){let e=U();E(4),K(e.outputs.length),E(),A(e.outputs.length?5:6)}}function FP(e,t){if(e&1&&(P(0,`span`,49),G(1),F()),e&2){let e=U().$implicit;E(),K(e.kind)}}function IP(e,t){if(e&1){let e=z();P(0,`button`,51),V(`click`,function(){x(e);let t=U().$implicit,n=U(5),r=Y(0);return S(n.openSignals(r,t.prop))}),G(1,` Show in Signals`),P(2,`span`,14),G(3),F()()}if(e&2){let e=U().$implicit;E(3),q(`: `,e.name)}}function LP(e,t){if(e&1&&(P(0,`li`,41)(1,`span`,42),G(2),k(3,FP,2,1,`span`,49),k(4,IP,4,1,`button`,50),F(),I(5,`app-value-tree`,44),F()),e&2){let e=t.$implicit,n=U(4),r=U();W(`changed`,r.flashed(`property`,e.name)),E(2),q(` `,e.name,` `),E(),A(e.kind?3:-1),E(),A(e.kind===`signal`&&r.canShowSignals()&&!r.staticReport()?4:-1),E(),N(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function RP(e,t){if(e&1&&(P(0,`ul`,39),j(1,LP,6,12,`li`,40,oP),F()),e&2){let e=U(2);E(),M(e.properties)}}function zP(e,t){e&1&&(P(0,`p`,33),G(1,`No other properties.`),F())}function BP(e,t){if(e&1&&(P(0,`div`,30)(1,`h3`),G(2,` Properties `),P(3,`span`,31),G(4),F()(),k(5,RP,3,0,`ul`,39)(6,zP,2,0,`p`,33),F()),e&2){let e=U();E(4),K(e.properties.length),E(),A(e.properties.length?5:6)}}function VP(e,t){if(e&1&&(P(0,`li`,52),G(1),F()),e&2){let e=t.$implicit;E(),K(e)}}function HP(e,t){if(e&1&&(P(0,`div`,30)(1,`h3`),G(2,` DOM listeners `),P(3,`span`,31),G(4),F()(),P(5,`ul`,45),j(6,VP,2,1,`li`,52,$h),F()()),e&2){let e=U(2);E(4),K(e.listeners.length),E(2),M(e.listeners)}}function UP(e,t){if(e&1&&(P(0,`li`,47)(1,`span`,25),G(2),F(),P(3,`span`,48),G(4),F()()),e&2){let e=t.$implicit;E(2),K(e.state),E(2),K(e.triggers.join(`, `)||`no triggers`)}}function WP(e,t){if(e&1&&(P(0,`div`,30)(1,`h3`),G(2,` Defer blocks `),P(3,`span`,31),G(4),F()(),P(5,`ul`,45),j(6,UP,5,2,`li`,47,sP),F()()),e&2){let e=U(3);E(4),K(e.ownedDeferBlocks().length),E(2),M(e.ownedDeferBlocks())}}function GP(e,t){if(e&1&&(P(0,`li`,41)(1,`span`,42),G(2),F(),I(3,`app-value-tree`,55),F()),e&2){let e=t.$implicit,n=U(2).$implicit,r=U(2),i=U();W(`changed`,i.flashed(`directive`,e.name,n.index)),E(2),K(e.name),E(),N(`prop`,e)(`store`,i.values)(`query`,i.propFilter())(`directive`,n.index)(`componentId`,r.id)(`pageId`,i.page()?.pageId??null)(`rpc`,i.rpc())}}function KP(e,t){if(e&1&&(P(0,`ul`,39),j(1,GP,4,10,`li`,40,oP),F()),e&2){let e=U().$implicit;E(),M(e.inputs)}}function qP(e,t){if(e&1&&(P(0,`li`,47)(1,`span`,25),G(2),F(),P(3,`span`,48),G(4),F()()),e&2){let e=t.$implicit;W(`on`,e.listened),E(2),K(e.name),E(2),K(e.listened?`listened`:`no listener`)}}function JP(e,t){if(e&1&&(P(0,`ul`,45),j(1,qP,5,4,`li`,46,oP),F()),e&2){let e=U().$implicit;E(),M(e.outputs)}}function YP(e,t){e&1&&(P(0,`p`,33),G(1,`No inputs or outputs.`),F())}function XP(e,t){if(e&1&&(P(0,`div`,30)(1,`h3`)(2,`span`,25),G(3),F(),P(4,`span`,49),G(5,`directive on host`),F()(),P(6,`p`,53),mg(7,54),F(),k(8,KP,3,0,`ul`,39),k(9,JP,3,0,`ul`,45),k(10,YP,2,0,`p`,33),F()),e&2){let e=t.$implicit;U(3);let n=Ng(18);E(3),K(e.name),E(4),N(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,q_(6,tP,e.name)),E(),A(e.inputs.length?8:-1),E(),A(e.outputs.length?9:-1),E(),A(!e.inputs.length&&!e.outputs.length?10:-1)}}function ZP(e,t){if(e&1&&(I(0,`app-redaction-count`,35),k(1,TP,7,1,`div`,36),k(2,AP,7,2,`div`,30),k(3,PP,7,2,`div`,30),k(4,BP,7,2,`div`,30),k(5,HP,8,1,`div`,30),k(6,WP,8,1,`div`,30),j(7,XP,11,8,`div`,30,aP)),e&2){let e=t,n=U(),r=U();N(`value`,e),E(),A(r.propQuery()&&!e.count?1:-1),E(),A(!r.propQuery()||e.inputs.length?2:-1),E(),A(!r.propQuery()||e.outputs.length?3:-1),E(),A(!r.propQuery()||e.properties.length?4:-1),E(),A(!r.propQuery()&&n.listeners.length?5:-1),E(),A(!r.propQuery()&&r.ownedDeferBlocks().length?6:-1),E(),M(e.directives)}}function QP(e,t){if(e&1&&(P(0,`span`,49),G(1),F()),e&2){let e=t.$implicit;E(),K(e)}}function $P(e,t){if(e&1&&(P(0,`span`,58),G(1,`from `),P(2,`span`,25),G(3),F()()),e&2){let e=U().$implicit;E(3),K(e.providedByName??`an injector`)}}function eF(e,t){e&1&&(P(0,`span`,59),G(1,`not provided`),F())}function tF(e,t){if(e&1&&(P(0,`li`,56)(1,`span`,57),G(2),F(),j(3,QP,2,1,`span`,49,$h),k(5,$P,4,1,`span`,58)(6,eF,2,0,`span`,59),F()),e&2){let e=t.$implicit;E(2),K(e.token),E(),M(e.flags),E(2),A(e.providedBy?5:6)}}function nF(e,t){if(e&1&&(P(0,`ul`,32),j(1,tF,7,2,`li`,56,cP),F()),e&2){let e=U();E(),M(e.dependencies)}}function rF(e,t){e&1&&(P(0,`p`,33),G(1,`Nothing is injected through the constructor or inject().`),F())}function iF(e,t){if(e&1){let e=z();P(0,`app-component-pipes`,60),V(`showPipe`,function(t){x(e);let n=U(2);return S(n.showPipe.emit({name:t,pageId:n.page()?.pageId}))}),F()}if(e&2){let e=U(2),t=Y(0);N(`rpc`,e.rpc())(`pageId`,e.page()?.pageId)(`component`,e.bareName(t.name))(`canShowPipes`,!e.staticReport())}}function aF(e,t){if(e&1){let e=z();P(0,`dl`,24)(1,`dt`),G(2,`Change detection`),F(),P(3,`dd`),G(4),F(),P(5,`dt`),G(6,`Encapsulation`),F(),P(7,`dd`),G(8),F(),P(9,`dt`),G(10,`Host path`),F(),P(11,`dd`,25),G(12),F(),j(13,CP,4,2,null,null,iP),F(),P(15,`div`,26)(16,`app-search-field`,27,1),j_(`valueChange`,function(t){x(e);let n=U();return A_(n.propFilter,t)||(n.propFilter=t),S(t)}),F(),k(18,wP,2,2,`span`,28),P(19,`p`,29),G(20),F()(),k(21,ZP,9,7),P(22,`div`,30)(23,`h3`),G(24,` Injected `),P(25,`span`,31),G(26),F()(),k(27,nF,3,0,`ul`,32)(28,rF,2,0,`p`,33),F(),k(29,iF,1,4,`app-component-pipes`,34)}if(e&2){let e,n=t,r=U(),i=Y(0);E(4),K(n.changeDetection??`Unknown`),E(4),K(n.encapsulation??`Unknown`),E(4),K(n.path),E(),M(r.routedById().get(i.id)??K_(10,eP)),E(3),k_(`value`,r.propFilter),E(2),A(r.propQuery()?18:-1),E(2),K(r.propFilterStatus()),E(),A((e=r.shownValues())?21:-1,e),E(5),K(n.dependencies.length),E(),A(n.dependencies.length?27:28),E(2),A(r.canShowPipes()?29:-1)}}function oF(e,t){e&1&&(P(0,`div`,9),I(1,`span`,61),P(2,`p`,38),G(3,`Reading live values from the page…`),F()())}function sF(e,t){if(e&1&&(P(0,`span`,62)(1,`span`,13),G(2,`Likely`),F(),P(3,`span`,14),G(4,`, matched by class name: `),F(),I(5,`app-source-link`,10),F()),e&2){U();let e=Y(0);N(`title`,U().guessTitle),E(5),N(`file`,e[0].file)(`line`,e[0].line)}}function cF(e,t){if(e&1&&(P(0,`span`,63),G(1),F()),e&2){let e=U().$implicit,t=Y(0),n=U();N(`title`,n.guessTitle),E(),J(``,t.length,` source files define `,n.bareName(e))}}function lF(e,t){if(e&1&&(N_(0),k(1,sF,6,3,`span`,62)(2,cF,2,3,`span`,63)),e&2){let e=t.$implicit,n=P_(U().directiveSources(e));E(),A(n.length===1?1:n.length>1?2:-1)}}var uF=class e{state=b(YN);scan=b(XN);details=b(ZN);node=$.required();showForm=lv();showInjector=lv();showSignals=lv();showPipe=lv();rpc=this.state.rpc;page=this.state.page;detail=this.state.detail;native=this.state.native;staticReport=this.state.staticReport;canEdit=this.state.canEdit;canShowInjector=this.state.canShowInjector;canShowSignals=this.state.canShowSignals;canShowPipes=this.state.canShowPipes;routedById=this.state.routedById;ownedDeferBlocks=this.state.ownedDeferBlocks;guessTitle=this.scan.guessTitle;devtoolsActions=this.details.devtoolsActions;actionMessage=this.details.actionMessage;copyMessage=this.details.copyMessage;values=this.details.values;propFilter=this.details.propFilter;propQuery=this.details.propQuery;shownValues=this.details.shownValues;valueTotal=this.details.valueTotal;propFilterStatus=this.details.propFilterStatus;propFilterInput=gv(`propFilterInput`);clearPropFilter(e){e&&this.propFilter()&&(e.stopPropagation(),e.preventDefault()),this.propFilter.set(``),this.propFilterInput()?.focus()}flashed(e,t,n){return this.details.flashed(e,t,n)}revealInElements(e){return this.details.revealInElements(e)}openSource(e){return this.details.openSource(e)}copyJson(e){return this.details.copyJson(e)}copyHostPath(e){return this.details.copyHostPath(e)}openSignals(e,t){let n=this.page()?.pageId;this.showSignals.emit({componentId:e.id,...n?{pageId:n}:{},...t?{key:t}:{}})}openInjector(e){let t=this.page()?.pageId;this.showInjector.emit(t?{componentId:e.id,pageId:t}:{componentId:e.id})}formsIn(e){return this.scan.formsIn(e)}sourceCandidates(e){return this.scan.sourceCandidates(e)}sourceFor(e){return this.scan.sourceFor(e)}directiveSources(e){return this.scan.directiveSources(e)}sourceKey(e){return this.scan.sourceKey(e)}bareName(e){return iN(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`section`,`appComponentDetail`,``]],viewQuery:function(e,t){e&1&&jg(t.propFilterInput,QN,5),e&2&&Mg()},inputs:{node:[1,`node`]},outputs:{showForm:`showForm`,showInjector:`showInjector`,showSignals:`showSignals`,showPipe:`showPipe`},decls:19,vars:10,consts:[[`directiveSource`,``],[`propFilterInput`,``],[1,`detail-head`],[1,`badge`],[`id`,`ct-detail-title`,1,`mono`],[1,`mono`,`muted`],[1,`where`,`mono`],[1,`actions`],[1,`console-global`,3,`rpc`,`pageId`,`target`,`label`],[`role`,`status`,1,`state`,`compact`],[3,`file`,`line`],[1,`where`,`mono`,`guess`,3,`title`],[1,`where`,`guess`,3,`title`],[1,`likely`],[1,`sr-only`],[1,`guess-text`],[1,`guess-list`,`mono`],[`role`,`group`,`aria-label`,`Chrome DevTools`,1,`actions`],[`type`,`button`,3,`click`],[`role`,`status`,1,`where`,`action-message`],[`type`,`button`,1,`show-form`],[`type`,`button`,1,`show-form`,3,`click`],[`type`,`button`],[`role`,`group`,`aria-label`,`Copy`,1,`actions`],[1,`facts`],[1,`mono`],[1,`prop-filter`],[`label`,`Filter values`,`placeholder`,`Filter inputs, outputs and properties by name`,1,`search`,3,`valueChange`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[1,`block`],[1,`pill`],[1,`deps`],[1,`empty-line`],[3,`rpc`,`pageId`,`component`,`canShowPipes`],[3,`value`],[1,`state`,`compact`],[1,`state-title`],[1,`state-hint`],[1,`props`],[1,`prop`,3,`changed`],[1,`prop`],[1,`prop-name`,`mono`],[1,`muted`],[3,`prop`,`store`,`query`,`componentId`,`pageId`,`rpc`,`writes`],[1,`chips`],[1,`chip`,3,`on`],[1,`chip`],[1,`chip-note`],[1,`flag`],[`type`,`button`,1,`signal-link`],[`type`,`button`,1,`signal-link`,3,`click`],[1,`chip`,`mono`],[1,`directive-where`,`mono`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[3,`prop`,`store`,`query`,`directive`,`componentId`,`pageId`,`rpc`],[1,`dep`],[1,`token`,`mono`],[1,`from`],[1,`from`,`missing`],[3,`showPipe`,`rpc`,`pageId`,`component`,`canShowPipes`],[`aria-hidden`,`true`,1,`spinner`],[1,`directive-guess`,3,`title`],[1,`chip-note`,3,`title`]],template:function(e,t){if(e&1&&(N_(0),P(1,`header`,2)(2,`span`,3),G(3,`component`),F(),P(4,`h2`,4),G(5),F(),P(6,`span`,5),G(7),F(),k(8,lP,2,2,`p`,6)(9,pP,3,2),k(10,mP,7,1),k(11,_P,1,1),k(12,bP,3,2,`div`,7),k(13,xP,7,1),k(14,SP,1,6,`app-store-global`,8),F(),k(15,aF,30,11)(16,oF,4,0,`div`,9),Ah(17,lF,3,2,`ng-template`,null,0,nv)),e&2){let e,n,r,i,a=P_(t.node());E(5),K(a.name),E(2),q(`<`,a.tag,`>`),E(),A((e=t.detail()?.source)?8:9,e),E(2),A(t.devtoolsActions()?10:-1),E(),A((n=t.sourceFor(a))?11:-1,n),E(),A((t.canShowInjector()||t.canShowSignals())&&!t.staticReport()?12:-1),E(),A((r=t.detail())?13:-1,r),E(),A(!t.staticReport()&&!t.native()?14:-1),E(),A((i=t.detail())?15:16,i)}},dependencies:[Qv,Nj,VE,Hj,qj,rN,sM],styles:[`.mono[_ngcontent-%COMP%] { font-family: var(--%NS%font-mono); } @@ -3482,7 +3482,7 @@ pre[_ngcontent-%COMP%] { .refresh.spinning[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] { animation: none; } -}`]})},OF=()=>[],kF=e=>({$implicit:e}),AF=(e,t)=>t+e;function jF(e,t){if(e&1&&(P(0,`li`,8),G(1),Eg(2,11),F()),e&2){let e=t.$implicit;U();let n=Gg(20);E(),q(` `,e,` `),E(),N(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,av(3,kF,e))}}function MF(e,t){if(e&1){let e=z();P(0,`div`,10)(1,`button`,12),V(`click`,function(){let t=x(e);return S(U().reveal(t.id,!0))}),G(2),F()()}e&2&&(E(2),q(`Show `,t.name))}function NF(e,t){if(e&1&&(P(0,`span`,13)(1,`span`,15),G(2,`Likely`),F(),P(3,`span`,16),G(4,`, matched by class name: `),F(),I(5,`app-source-link`,17),F()),e&2){U();let e=Y(0);N(`title`,U().guessTitle),E(5),N(`file`,e[0].file)(`line`,e[0].line)}}function PF(e,t){if(e&1&&(P(0,`span`,14),G(1),F()),e&2){let e=U().$implicit,t=Y(0),n=U();N(`title`,n.guessTitle),E(),J(``,t.length,` source files define `,n.bareName(e))}}function FF(e,t){if(e&1&&(G_(0),k(1,NF,6,3,`span`,13)(2,PF,2,3,`span`,14)),e&2){let e=t.$implicit,n=K_(U().directiveSources(e));E(),A(n.length===1?1:n.length>1?2:-1)}}var IF=class e{state=b(fP);scan=b(pP);node=$.required();guessTitle=this.scan.guessTitle;hostLabel(e){return rP(e)}ownerOf(e){return this.state.ownerOf(e)}reveal(e,t=!1){this.state.reveal(e,t)}directiveSources(e){return this.scan.directiveSources(e)}bareName(e){return xN(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`section`,`appHostDetail`,``]],inputs:{node:[1,`node`]},decls:21,vars:5,consts:[[`directiveSource`,``],[1,`detail-head`],[1,`badge`],[`id`,`ct-detail-title`,1,`mono`],[1,`mono`,`muted`],[1,`block`],[1,`pill`],[1,`chips`],[1,`chip`,`mono`],[1,`empty-line`],[1,`actions`,`owner-action`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`type`,`button`,3,`click`],[1,`directive-guess`,3,`title`],[1,`chip-note`,3,`title`],[1,`likely`],[1,`sr-only`],[3,`file`,`line`]],template:function(e,t){if(e&1&&(P(0,`header`,1)(1,`span`,2),G(2,`directive host`),F(),P(3,`h2`,3),G(4),F(),P(5,`span`,4),G(6),F()(),P(7,`div`,5)(8,`h3`),G(9,` Directives `),P(10,`span`,6),G(11),F()(),P(12,`ul`,7),j(13,jF,3,5,`li`,8,AF),F()(),P(15,`div`,5)(16,`p`,9),G(17,` This element hosts directives but no component. Their inputs are bound in the template of the component that renders it. `),F(),k(18,MF,3,1,`div`,10),F(),Hh(19,FF,3,2,`ng-template`,null,0,mv)),e&2){let e,n=t.node();E(4),q(`<`,n.tag,`>`),E(2),K(t.hostLabel(n)),E(5),K(n.directives?.length??0),E(2),M(n.directives??iv(4,OF)),E(5),A((e=t.ownerOf(n.id))?18:-1,e)}},dependencies:[uy,aM],styles:[`.mono[_ngcontent-%COMP%] { +}`]})},dF=()=>[],fF=e=>({$implicit:e}),pF=(e,t)=>t+e;function mF(e,t){if(e&1&&(P(0,`li`,8),G(1),mg(2,11),F()),e&2){let e=t.$implicit;U();let n=Ng(20);E(),q(` `,e,` `),E(),N(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,q_(3,fF,e))}}function hF(e,t){if(e&1){let e=z();P(0,`div`,10)(1,`button`,12),V(`click`,function(){let t=x(e);return S(U().reveal(t.id,!0))}),G(2),F()()}e&2&&(E(2),q(`Show `,t.name))}function gF(e,t){if(e&1&&(P(0,`span`,13)(1,`span`,15),G(2,`Likely`),F(),P(3,`span`,16),G(4,`, matched by class name: `),F(),I(5,`app-source-link`,17),F()),e&2){U();let e=Y(0);N(`title`,U().guessTitle),E(5),N(`file`,e[0].file)(`line`,e[0].line)}}function _F(e,t){if(e&1&&(P(0,`span`,14),G(1),F()),e&2){let e=U().$implicit,t=Y(0),n=U();N(`title`,n.guessTitle),E(),J(``,t.length,` source files define `,n.bareName(e))}}function vF(e,t){if(e&1&&(N_(0),k(1,gF,6,3,`span`,13)(2,_F,2,3,`span`,14)),e&2){let e=t.$implicit,n=P_(U().directiveSources(e));E(),A(n.length===1?1:n.length>1?2:-1)}}var yF=class e{state=b(YN);scan=b(XN);node=$.required();guessTitle=this.scan.guessTitle;hostLabel(e){return BN(e)}ownerOf(e){return this.state.ownerOf(e)}reveal(e,t=!1){this.state.reveal(e,t)}directiveSources(e){return this.scan.directiveSources(e)}bareName(e){return iN(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`section`,`appHostDetail`,``]],inputs:{node:[1,`node`]},decls:21,vars:5,consts:[[`directiveSource`,``],[1,`detail-head`],[1,`badge`],[`id`,`ct-detail-title`,1,`mono`],[1,`mono`,`muted`],[1,`block`],[1,`pill`],[1,`chips`],[1,`chip`,`mono`],[1,`empty-line`],[1,`actions`,`owner-action`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`type`,`button`,3,`click`],[1,`directive-guess`,3,`title`],[1,`chip-note`,3,`title`],[1,`likely`],[1,`sr-only`],[3,`file`,`line`]],template:function(e,t){if(e&1&&(P(0,`header`,1)(1,`span`,2),G(2,`directive host`),F(),P(3,`h2`,3),G(4),F(),P(5,`span`,4),G(6),F()(),P(7,`div`,5)(8,`h3`),G(9,` Directives `),P(10,`span`,6),G(11),F()(),P(12,`ul`,7),j(13,mF,3,5,`li`,8,pF),F()(),P(15,`div`,5)(16,`p`,9),G(17,` This element hosts directives but no component. Their inputs are bound in the template of the component that renders it. `),F(),k(18,hF,3,1,`div`,10),F(),Ah(19,vF,3,2,`ng-template`,null,0,nv)),e&2){let e,n=t.node();E(4),q(`<`,n.tag,`>`),E(2),K(t.hostLabel(n)),E(5),K(n.directives?.length??0),E(2),M(n.directives??K_(4,dF)),E(5),A((e=t.ownerOf(n.id))?18:-1,e)}},dependencies:[Qv,Hj],styles:[`.mono[_ngcontent-%COMP%] { font-family: var(--%NS%font-mono); } @@ -3806,7 +3806,7 @@ pre[_ngcontent-%COMP%] { .empty-line[_ngcontent-%COMP%] { margin: 0; color: var(--%NS%text-2); -}`]})},LF=class e{tree=b(fP);picking=w(!1);pickPageId=null;pickSeq=0;pickLabel=X(()=>this.picking()?`Cancel pick`:this.tree.native()?`Pick component on device`:`Pick component on page`);followPage(e){this.picking()&&e!==this.pickPageId&&this.dropPick()}async pick(){let e=this.tree.rpc();if(!e||this.picking())return;let t=++this.pickSeq;this.pickPageId=this.tree.page()?.pageId??null,this.picking.set(!0),this.tree.say(this.tree.native()?`Tap a component on the device, or use the arrow keys to move between components and Enter to pick one. Press Escape to cancel.`:`Click a component in the app, or use the arrow keys to move between components and Enter to pick one. Press Escape to cancel.`);let n=await e.scope(`pangular`).rpc.call(`request-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>({ok:!1,error:`Could not reach the devtools server.`}));if(t===this.pickSeq){if(this.picking.set(!1),!n?.ok||!n.id){this.tree.say(n?.error??`No component was picked.`);return}n.pageId&&n.pageId!==this.tree.page()?.pageId&&this.tree.selectPage(n.pageId),this.tree.say(`Picked ${n.name??`a component`}.`),this.tree.destroyed.set(null),this.tree.index().map.has(n.id)?this.tree.reveal(n.id):this.tree.selectedId.set(n.id)}}pickKey(e){let t=wN[e.key];if(!this.picking()||!t||e.altKey||e.ctrlKey||e.metaKey)return;e.preventDefault();let n=this.tree.rpc();if(!n)return;let r=this.pickSeq;n.scope(`pangular`).rpc.call(`request-component-pick-move`,{pageId:this.pickPageId??void 0,key:t}).then(e=>{let n=e;r===this.pickSeq&&this.picking()&&t!==`pick`&&this.tree.say(n?.moved?`${n.name??`Component`} <${n.tag??``}>. Press Enter to pick it.`:n?.error??`The page did not move.`)}).catch(()=>{})}cancelPick(){let e=this.tree.rpc();e&&this.picking()&&e.scope(`pangular`).rpc.call(`cancel-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>{})}dropPick(){this.cancelPick(),this.pickSeq++,this.picking.set(!1),this.tree.say(`Picking stopped because the page changed.`)}static ɵfac=function(t){return new(t||e)};static ɵprov=Di({token:e,factory:e.ɵfac})};function RF(e,t){return this.sourceKey(t)}var zF=(e,t)=>t.formId;function BF(e,t){if(e&1&&G(0),e&2){let e=U().$implicit;q(` `,U().bareName(e.className),` · `)}}function VF(e,t){if(e&1&&(P(0,`dt`),G(1,`Change detection`),F(),P(2,`dd`),G(3),F()),e&2){let e=U(2).$implicit;E(3),K(e.changeDetection??`Unknown`)}}function HF(e,t){if(e&1){let e=z();P(0,`button`,14),V(`click`,function(){let t=x(e).$implicit;return S(U(3).showForm.emit(t.formId))}),G(1),F()}if(e&2){let e=t.$implicit;E(),q(` Show `,e.label,` in Forms `)}}function UF(e,t){if(e&1&&(P(0,`div`,9)(1,`dl`,10)(2,`dt`),G(3,`Class`),F(),P(4,`dd`,11),G(5),F(),P(6,`dt`),G(7,`File`),F(),P(8,`dd`,11),I(9,`app-source-link`,12),F(),P(10,`dt`),G(11,`Standalone`),F(),P(12,`dd`),G(13),F(),k(14,VF,4,1),P(15,`dt`),G(16,`Inputs`),F(),P(17,`dd`,11),G(18),F(),P(19,`dt`),G(20,`Outputs`),F(),P(21,`dd`,11),G(22),F()(),j(23,HF,2,1,`button`,13,zF),F()),e&2){let e=U(),t=e.$implicit,n=e.$index,r=U();N(`id`,`ct-source-`+n),E(5),K(r.bareName(t.className)),E(4),N(`file`,t.file)(`line`,t.line),E(4),K(t.isStandalone?`Yes`:`No`),E(),A(t.kind===`component`?14:-1),E(4),K(t.inputs.join(`, `)||`None`),E(4),K(t.outputs.join(`, `)||`None`),E(),M(r.formsIn(t.file))}}function WF(e,t){if(e&1){let e=z();P(0,`li`,1)(1,`button`,2),V(`click`,function(){let t=x(e).$implicit,n=U();return S(n.openKey.set(n.openKey()===n.sourceKey(t)?null:n.sourceKey(t)))}),P(2,`span`,3),G(3),F(),P(4,`span`,4)(5,`span`,5),G(6),F(),P(7,`span`,6),k(8,BF,1,1),G(9),F()(),C(),P(10,`svg`,7),I(11,`path`,8),F()(),k(12,UF,25,8,`div`,9),F()}if(e&2){let e=t.$implicit,n=t.$index,r=U();W(`expanded`,r.openKey()===r.sourceKey(e)),E(),O(`aria-expanded`,r.openKey()===r.sourceKey(e))(`aria-controls`,r.openKey()===r.sourceKey(e)?`ct-source-`+n:null),E(),W(`directive`,e.kind===`directive`),E(),K(e.kind),E(3),K(r.sourceLabel(e)),E(2),A(e.selector?8:-1),E(),J(` `,e.file,`:`,e.line,` `),E(3),A(r.openKey()===r.sourceKey(e)?12:-1)}}var GF=class e{scan=b(pP);showForm=xv();filteredSource=this.scan.filteredSource;openKey=this.scan.openKey;formsIn(e){return this.scan.formsIn(e)}sourceKey(e){return this.scan.sourceKey(e)}sourceLabel(e){return this.scan.sourceLabel(e)}bareName(e){return xN(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`ul`,`appSourceList`,``]],outputs:{showForm:`showForm`},decls:2,vars:0,consts:[[1,`source-item`,3,`expanded`],[1,`source-item`],[`type`,`button`,1,`source-toggle`,3,`click`],[1,`kind-flag`],[1,`row-main`],[1,`selector`,`mono`],[1,`file`,`mono`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m9 6 6 6-6 6`],[1,`inline-detail`,3,`id`],[1,`facts`],[1,`mono`],[3,`file`,`line`],[`type`,`button`,1,`show-form`],[`type`,`button`,1,`show-form`,3,`click`]],template:function(e,t){e&1&&j(0,WF,13,12,`li`,0,RF,!0),e&2&&M(t.filteredSource())},dependencies:[aM],styles:[`.mono[_ngcontent-%COMP%] { +}`]})},bF=class e{tree=b(YN);picking=w(!1);pickPageId=null;pickSeq=0;pickLabel=X(()=>this.picking()?`Cancel pick`:this.tree.native()?`Pick component on device`:`Pick component on page`);followPage(e){this.picking()&&e!==this.pickPageId&&this.dropPick()}async pick(){let e=this.tree.rpc();if(!e||this.picking())return;let t=++this.pickSeq;this.pickPageId=this.tree.page()?.pageId??null,this.picking.set(!0),this.tree.say(this.tree.native()?`Tap a component on the device, or use the arrow keys to move between components and Enter to pick one. Press Escape to cancel.`:`Click a component in the app, or use the arrow keys to move between components and Enter to pick one. Press Escape to cancel.`);let n=await e.scope(`pangular`).rpc.call(`request-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>({ok:!1,error:`Could not reach the devtools server.`}));if(t===this.pickSeq){if(this.picking.set(!1),!n?.ok||!n.id){this.tree.say(n?.error??`No component was picked.`);return}n.pageId&&n.pageId!==this.tree.page()?.pageId&&this.tree.selectPage(n.pageId),this.tree.say(`Picked ${n.name??`a component`}.`),this.tree.destroyed.set(null),this.tree.index().map.has(n.id)?this.tree.reveal(n.id):this.tree.selectedId.set(n.id)}}pickKey(e){let t=sN[e.key];if(!this.picking()||!t||e.altKey||e.ctrlKey||e.metaKey)return;e.preventDefault();let n=this.tree.rpc();if(!n)return;let r=this.pickSeq;n.scope(`pangular`).rpc.call(`request-component-pick-move`,{pageId:this.pickPageId??void 0,key:t}).then(e=>{let n=e;r===this.pickSeq&&this.picking()&&t!==`pick`&&this.tree.say(n?.moved?`${n.name??`Component`} <${n.tag??``}>. Press Enter to pick it.`:n?.error??`The page did not move.`)}).catch(()=>{})}cancelPick(){let e=this.tree.rpc();e&&this.picking()&&e.scope(`pangular`).rpc.call(`cancel-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>{})}dropPick(){this.cancelPick(),this.pickSeq++,this.picking.set(!1),this.tree.say(`Picking stopped because the page changed.`)}static ɵfac=function(t){return new(t||e)};static ɵprov=bi({token:e,factory:e.ɵfac})};function xF(e,t){return this.sourceKey(t)}var SF=(e,t)=>t.formId;function CF(e,t){if(e&1&&G(0),e&2){let e=U().$implicit;q(` `,U().bareName(e.className),` · `)}}function wF(e,t){if(e&1&&(P(0,`dt`),G(1,`Change detection`),F(),P(2,`dd`),G(3),F()),e&2){let e=U(2).$implicit;E(3),K(e.changeDetection??`Unknown`)}}function TF(e,t){if(e&1){let e=z();P(0,`button`,14),V(`click`,function(){let t=x(e).$implicit;return S(U(3).showForm.emit(t.formId))}),G(1),F()}if(e&2){let e=t.$implicit;E(),q(` Show `,e.label,` in Forms `)}}function EF(e,t){if(e&1&&(P(0,`div`,9)(1,`dl`,10)(2,`dt`),G(3,`Class`),F(),P(4,`dd`,11),G(5),F(),P(6,`dt`),G(7,`File`),F(),P(8,`dd`,11),I(9,`app-source-link`,12),F(),P(10,`dt`),G(11,`Standalone`),F(),P(12,`dd`),G(13),F(),k(14,wF,4,1),P(15,`dt`),G(16,`Inputs`),F(),P(17,`dd`,11),G(18),F(),P(19,`dt`),G(20,`Outputs`),F(),P(21,`dd`,11),G(22),F()(),j(23,TF,2,1,`button`,13,SF),F()),e&2){let e=U(),t=e.$implicit,n=e.$index,r=U();N(`id`,`ct-source-`+n),E(5),K(r.bareName(t.className)),E(4),N(`file`,t.file)(`line`,t.line),E(4),K(t.isStandalone?`Yes`:`No`),E(),A(t.kind===`component`?14:-1),E(4),K(t.inputs.join(`, `)||`None`),E(4),K(t.outputs.join(`, `)||`None`),E(),M(r.formsIn(t.file))}}function DF(e,t){if(e&1){let e=z();P(0,`li`,1)(1,`button`,2),V(`click`,function(){let t=x(e).$implicit,n=U();return S(n.openKey.set(n.openKey()===n.sourceKey(t)?null:n.sourceKey(t)))}),P(2,`span`,3),G(3),F(),P(4,`span`,4)(5,`span`,5),G(6),F(),P(7,`span`,6),k(8,CF,1,1),G(9),F()(),C(),P(10,`svg`,7),I(11,`path`,8),F()(),k(12,EF,25,8,`div`,9),F()}if(e&2){let e=t.$implicit,n=t.$index,r=U();W(`expanded`,r.openKey()===r.sourceKey(e)),E(),O(`aria-expanded`,r.openKey()===r.sourceKey(e))(`aria-controls`,r.openKey()===r.sourceKey(e)?`ct-source-`+n:null),E(),W(`directive`,e.kind===`directive`),E(),K(e.kind),E(3),K(r.sourceLabel(e)),E(2),A(e.selector?8:-1),E(),J(` `,e.file,`:`,e.line,` `),E(3),A(r.openKey()===r.sourceKey(e)?12:-1)}}var OF=class e{scan=b(XN);showForm=lv();filteredSource=this.scan.filteredSource;openKey=this.scan.openKey;formsIn(e){return this.scan.formsIn(e)}sourceKey(e){return this.scan.sourceKey(e)}sourceLabel(e){return this.scan.sourceLabel(e)}bareName(e){return iN(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`ul`,`appSourceList`,``]],outputs:{showForm:`showForm`},decls:2,vars:0,consts:[[1,`source-item`,3,`expanded`],[1,`source-item`],[`type`,`button`,1,`source-toggle`,3,`click`],[1,`kind-flag`],[1,`row-main`],[1,`selector`,`mono`],[1,`file`,`mono`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m9 6 6 6-6 6`],[1,`inline-detail`,3,`id`],[1,`facts`],[1,`mono`],[3,`file`,`line`],[`type`,`button`,1,`show-form`],[`type`,`button`,1,`show-form`,3,`click`]],template:function(e,t){e&1&&j(0,DF,13,12,`li`,0,xF,!0),e&2&&M(t.filteredSource())},dependencies:[Hj],styles:[`.mono[_ngcontent-%COMP%] { font-family: var(--%NS%font-mono); } @@ -3993,7 +3993,7 @@ button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] { .inline-detail[_ngcontent-%COMP%] .show-form[_ngcontent-%COMP%] { margin: 0 16px; -}`]})},KF=[`treeEl`],qF=()=>[],JF=(e,t)=>t.row.node.id,YF=(e,t)=>t.outlet+t.route;function XF(e,t){e&1&&(L(0,`p`,8),G(1,`The filter only searches the components the tree lists.`),R())}function ZF(e,t){e&1&&(L(0,`p`,8),G(1,`Directive hosts are hidden, so they are not searched.`),R())}function QF(e,t){if(e&1){let e=z();L(0,`div`,2)(1,`p`,7),G(2),R(),k(3,XF,2,0,`p`,8),k(4,ZF,2,0,`p`,8),L(5,`button`,9),H(`click`,function(){return x(e),S(U().clearFilter.emit())}),G(6,`Clear filters`),R()()}if(e&2){let e=U();E(2),q(`No components match “`,e.filter().trim(),`”`),E(),A(e.page().truncated?3:-1),E(),A(!e.showDirectiveHosts()&&e.page().directiveHostCount?4:-1)}}function $F(e,t){if(e&1&&(L(0,`p`,3),G(1),R()),e&2){let e=U();E(),q(` `,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 eI(e,t){if(e&1){let e=z();L(0,`span`,17),H(`click`,function(t){x(e),U();let n=Y(0);return S(U().toggle(n.node.id,t))}),C(),L(1,`svg`,18),Sg(2,`path`,19),R()()}e&2&&(U(),W(`open`,Y(0).expanded))}function tI(e,t){e&1&&Sg(0,`span`,12)}function nI(e,t){if(e&1&&(L(0,`span`,20),G(1),R(),L(2,`span`,21),G(3),R(),L(4,`span`,1),G(5,`directive host`),R()),e&2){U();let e=Y(0),t=U();E(),q(`<`,e.node.tag,`>`),E(),O(`title`,e.node.directives?.join(`, `)),E(),K(t.hostLabel(e.node))}}function rI(e,t){if(e&1&&(L(0,`span`,22),G(1),R(),L(2,`span`,23),G(3),R()),e&2){U();let e=Y(0);O(`title`,e.node.name),E(),K(e.node.name),E(),O(`title`,`<`+e.node.tag+`>`),E(),q(`<`,e.node.tag,`>`)}}function iI(e,t){if(e&1&&(L(0,`span`)(1,`span`,1),G(2,`Hydration: `),R(),G(3),R()),e&2){let e=t,n=U(2);p_(`hyd hyd-`+e),E(3),K(n.hydrationText(e))}}function aI(e,t){if(e&1&&(L(0,`span`,14),G(1),R()),e&2){let e=t.$implicit;E(),K(e.route||`/`)}}function oI(e,t){if(e&1&&(L(0,`span`,15),G(1),L(2,`span`,1),G(3),R()()),e&2){let e=t;E(),q(` `,e),E(2),q(` `,e===1?`check`:`checks`,` while recording`)}}function sI(e,t){if(e&1&&(L(0,`span`,16),G(1),L(2,`span`,1),G(3),R()()),e&2){U();let e=Y(0);O(`title`,e.node.directives.join(`, `)),E(),q(` +`,e.node.directives.length,` `),E(2),q(` `,e.node.directives.length===1?`directive`:`directives`,` `)}}function cI(e,t){if(e&1){let e=z();G_(0),L(1,`div`,10),H(`click`,function(){x(e);let t=Y(0);return S(U().select(t.node.id))})(`focus`,function(t){x(e);let n=Y(0),r=U();return r.focusId.set(n.node.id),r.highlight(n.node.id),S(r.showNameTip(t))})(`blur`,function(){x(e);let t=U();return t.highlight(null),S(t.nameTip.set(null))})(`keydown.escape`,function(){return x(e),S(U().nameTip.set(null))})(`mouseenter`,function(){x(e);let t=Y(0);return S(U().highlight(t.node.id))})(`mouseleave`,function(){return x(e),S(U().highlight(null))}),k(2,eI,3,2,`span`,11)(3,tI,1,0,`span`,12),k(4,nI,6,3)(5,rI,4,4),k(6,iI,4,3,`span`,13),j(7,aI,2,1,`span`,14,YF),k(9,oI,4,2,`span`,15),k(10,sI,4,3,`span`,16),R()}if(e&2){let e,n,r=t.$implicit,i=U(),a=K_(r.row);E(),f_(`--%NS%depth`,a.depth),W(`selected`,i.selectedId()===a.node.id)(`dir-host`,a.node.kind===`directive`),O(`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),E(),A(a.hasChildren?2:3),E(2),A(a.node.kind===`directive`?4:5),E(2),A((e=a.node.hydration)?6:-1,e),E(),M(i.routedById().get(a.node.id)??iv(20,qF)),E(2),A((n=i.cdHosts()[a.node.id])?9:-1,n),E(),A(a.node.kind!==`directive`&&a.node.directives?.length?10:-1)}}function lI(e,t){if(e&1&&(L(0,`div`,24),G(1),R()),e&2){let e=t;f_(`top`,e.top,`px`),E(),q(` `,e.text,` `)}}var uI=class e{state=b(fP);clearFilter=xv();filter=this.state.filter;page=this.state.page;rows=this.state.rows;rowWindow=this.state.rowWindow;shownRows=this.state.shownRows;selectedId=this.state.selectedId;tabStop=this.state.tabStop;focusId=this.state.focusId;showDirectiveHosts=this.state.showDirectiveHosts;routedById=this.state.routedById;cdHosts=this.state.cdHosts;nameTip=w(null);treeEl=Ov(`treeEl`);constructor(){T(()=>{let e=this.treeEl()?.nativeElement;e&&this.rowWindow.attach(e)})}select(e){this.state.select(e)}toggle(e,t){this.state.toggle(e,t)}highlight(e){this.state.highlight(e)}hostLabel(e){return rP(e)}hydrationText(e){return aP(e)}showNameTip(e){let t=e.currentTarget,n=Array.from(t.querySelectorAll(`.name, .tag, .host-dirs`));if(!n.some(e=>e.scrollWidth>e.clientWidth+1)){this.nameTip.set(null);return}let r=n.map(e=>e.title||e.textContent?.trim()).join(` `);this.nameTip.set({text:r,top:t.offsetTop+t.offsetHeight+2})}onTreeKey(e){let t=this.state,n=t.rows();if(!n.length)return;let r=n.findIndex(e=>e.node.id===t.rovingId()),i=Math.max(r,0),a=n[i],o=-1;switch(e.key){case`ArrowDown`:o=Math.min(i+1,n.length-1);break;case`ArrowUp`:o=Math.max(i-1,0);break;case`Home`:o=0;break;case`End`:o=n.length-1;break;case`ArrowRight`:a.hasChildren&&!a.expanded?t.toggle(a.node.id):a.hasChildren&&(o=i+1);break;case`ArrowLeft`:if(a.hasChildren&&a.expanded&&!t.query())t.toggle(a.node.id);else{let e=t.index().parents.get(a.node.id);o=n.findIndex(t=>t.node.id===e)}break;case`Enter`:case` `:t.select(a.node.id);break;case`*`:t.expandSiblings(a.node.id);break;default:return}if(e.preventDefault(),o>=0){let e=n[o].node.id;t.focusId.set(e);let r=()=>{let n=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);t.clearToolbar(),n?.focus({preventScroll:!0}),n?.scrollIntoView({block:`nearest`}),n&&t.keepBelowToolbar(n)};this.rowWindow.rendered(o)?queueMicrotask(r):this.rowWindow.reveal(o,r)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`div`,`appTreeRows`,``]],viewQuery:function(e,t){e&1&&Ug(t.treeEl,KF,5),e&2&&Wg()},outputs:{clearFilter:`clearFilter`},decls:9,vars:10,consts:[[`treeEl`,``],[1,`sr-only`],[1,`state`,`compact`,`tree`],[1,`window-note`],[`role`,`tree`,`aria-label`,`Component instances`,1,`tree`,3,`keydown`,`hidden`],[`role`,`treeitem`,1,`row`,3,`selected`,`dir-host`,`--%NS%depth`],[`aria-hidden`,`true`,1,`name-tip`,`mono`,3,`top`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[`role`,`treeitem`,1,`row`,3,`click`,`focus`,`blur`,`keydown.escape`,`mouseenter`,`mouseleave`],[`aria-hidden`,`true`,1,`twisty`,3,`open`],[`aria-hidden`,`true`,1,`twisty-space`],[3,`class`],[1,`routed`],[1,`checks`],[1,`dirs`],[`aria-hidden`,`true`,1,`twisty`,3,`click`],[`viewBox`,`0 0 24 24`],[`d`,`m9 6 6 6-6 6`],[1,`tag`,`host-tag`,`mono`],[1,`host-dirs`,`mono`],[1,`name`,`mono`],[1,`tag`,`mono`],[`aria-hidden`,`true`,1,`name-tip`,`mono`]],template:function(e,t){if(e&1&&(L(0,`h2`,1),G(1,`Component tree`),R(),k(2,QF,7,3,`div`,2),k(3,$F,2,1,`p`,3),L(4,`div`,4,0),H(`keydown`,function(e){return t.onTreeKey(e)}),j(6,cI,11,21,`div`,5,JF),R(),k(8,lI,2,3,`div`,6)),e&2){let e;E(2),A(t.rows().length?-1:2),E(),A(t.rowWindow.enabled()?3:-1),E(),f_(`padding-top`,t.rowWindow.enabled()?6+t.rowWindow.padTop():null,`px`)(`padding-bottom`,t.rowWindow.enabled()?6+t.rowWindow.padBottom():null,`px`),W(`windowed`,t.rowWindow.enabled()),B(`hidden`,!t.rows().length),E(2),M(t.shownRows()),E(2),A((e=t.nameTip())?8:-1,e)}},styles:[`.mono[_ngcontent-%COMP%] { +}`]})},kF=[`treeEl`],AF=()=>[],jF=(e,t)=>t.row.node.id,MF=(e,t)=>t.outlet+t.route;function NF(e,t){e&1&&(L(0,`p`,8),G(1,`The filter only searches the components the tree lists.`),R())}function PF(e,t){e&1&&(L(0,`p`,8),G(1,`Directive hosts are hidden, so they are not searched.`),R())}function FF(e,t){if(e&1){let e=z();L(0,`div`,2)(1,`p`,7),G(2),R(),k(3,NF,2,0,`p`,8),k(4,PF,2,0,`p`,8),L(5,`button`,9),H(`click`,function(){return x(e),S(U().clearFilter.emit())}),G(6,`Clear filters`),R()()}if(e&2){let e=U();E(2),q(`No components match “`,e.filter().trim(),`”`),E(),A(e.page().truncated?3:-1),E(),A(!e.showDirectiveHosts()&&e.page().directiveHostCount?4:-1)}}function IF(e,t){if(e&1&&(L(0,`p`,3),G(1),R()),e&2){let e=U();E(),q(` `,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 LF(e,t){if(e&1){let e=z();L(0,`span`,17),H(`click`,function(t){x(e),U();let n=Y(0);return S(U().toggle(n.node.id,t))}),C(),L(1,`svg`,18),ug(2,`path`,19),R()()}e&2&&(U(),W(`open`,Y(0).expanded))}function RF(e,t){e&1&&ug(0,`span`,12)}function zF(e,t){if(e&1&&(L(0,`span`,20),G(1),R(),L(2,`span`,21),G(3),R(),L(4,`span`,1),G(5,`directive host`),R()),e&2){U();let e=Y(0),t=U();E(),q(`<`,e.node.tag,`>`),E(),O(`title`,e.node.directives?.join(`, `)),E(),K(t.hostLabel(e.node))}}function BF(e,t){if(e&1&&(L(0,`span`,22),G(1),R(),L(2,`span`,23),G(3),R()),e&2){U();let e=Y(0);O(`title`,e.node.name),E(),K(e.node.name),E(),O(`title`,`<`+e.node.tag+`>`),E(),q(`<`,e.node.tag,`>`)}}function VF(e,t){if(e&1&&(L(0,`span`)(1,`span`,1),G(2,`Hydration: `),R(),G(3),R()),e&2){let e=t,n=U(2);t_(`hyd hyd-`+e),E(3),K(n.hydrationText(e))}}function HF(e,t){if(e&1&&(L(0,`span`,14),G(1),R()),e&2){let e=t.$implicit;E(),K(e.route||`/`)}}function UF(e,t){if(e&1&&(L(0,`span`,15),G(1),L(2,`span`,1),G(3),R()()),e&2){let e=t;E(),q(` `,e),E(2),q(` `,e===1?`check`:`checks`,` while recording`)}}function WF(e,t){if(e&1&&(L(0,`span`,16),G(1),L(2,`span`,1),G(3),R()()),e&2){U();let e=Y(0);O(`title`,e.node.directives.join(`, `)),E(),q(` +`,e.node.directives.length,` `),E(2),q(` `,e.node.directives.length===1?`directive`:`directives`,` `)}}function GF(e,t){if(e&1){let e=z();N_(0),L(1,`div`,10),H(`click`,function(){x(e);let t=Y(0);return S(U().select(t.node.id))})(`focus`,function(t){x(e);let n=Y(0),r=U();return r.focusId.set(n.node.id),r.highlight(n.node.id),S(r.showNameTip(t))})(`blur`,function(){x(e);let t=U();return t.highlight(null),S(t.nameTip.set(null))})(`keydown.escape`,function(){return x(e),S(U().nameTip.set(null))})(`mouseenter`,function(){x(e);let t=Y(0);return S(U().highlight(t.node.id))})(`mouseleave`,function(){return x(e),S(U().highlight(null))}),k(2,LF,3,2,`span`,11)(3,RF,1,0,`span`,12),k(4,zF,6,3)(5,BF,4,4),k(6,VF,4,3,`span`,13),j(7,HF,2,1,`span`,14,MF),k(9,UF,4,2,`span`,15),k(10,WF,4,3,`span`,16),R()}if(e&2){let e,n,r=t.$implicit,i=U(),a=P_(r.row);E(),e_(`--%NS%depth`,a.depth),W(`selected`,i.selectedId()===a.node.id)(`dir-host`,a.node.kind===`directive`),O(`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),E(),A(a.hasChildren?2:3),E(2),A(a.node.kind===`directive`?4:5),E(2),A((e=a.node.hydration)?6:-1,e),E(),M(i.routedById().get(a.node.id)??K_(20,AF)),E(2),A((n=i.cdHosts()[a.node.id])?9:-1,n),E(),A(a.node.kind!==`directive`&&a.node.directives?.length?10:-1)}}function KF(e,t){if(e&1&&(L(0,`div`,24),G(1),R()),e&2){let e=t;e_(`top`,e.top,`px`),E(),q(` `,e.text,` `)}}var qF=class e{state=b(YN);clearFilter=lv();filter=this.state.filter;page=this.state.page;rows=this.state.rows;rowWindow=this.state.rowWindow;shownRows=this.state.shownRows;selectedId=this.state.selectedId;tabStop=this.state.tabStop;focusId=this.state.focusId;showDirectiveHosts=this.state.showDirectiveHosts;routedById=this.state.routedById;cdHosts=this.state.cdHosts;nameTip=w(null);treeEl=gv(`treeEl`);constructor(){T(()=>{let e=this.treeEl()?.nativeElement;e&&this.rowWindow.attach(e)})}select(e){this.state.select(e)}toggle(e,t){this.state.toggle(e,t)}highlight(e){this.state.highlight(e)}hostLabel(e){return BN(e)}hydrationText(e){return HN(e)}showNameTip(e){let t=e.currentTarget,n=Array.from(t.querySelectorAll(`.name, .tag, .host-dirs`));if(!n.some(e=>e.scrollWidth>e.clientWidth+1)){this.nameTip.set(null);return}let r=n.map(e=>e.title||e.textContent?.trim()).join(` `);this.nameTip.set({text:r,top:t.offsetTop+t.offsetHeight+2})}onTreeKey(e){let t=this.state,n=t.rows();if(!n.length)return;let r=n.findIndex(e=>e.node.id===t.rovingId()),i=Math.max(r,0),a=n[i],o=-1;switch(e.key){case`ArrowDown`:o=Math.min(i+1,n.length-1);break;case`ArrowUp`:o=Math.max(i-1,0);break;case`Home`:o=0;break;case`End`:o=n.length-1;break;case`ArrowRight`:a.hasChildren&&!a.expanded?t.toggle(a.node.id):a.hasChildren&&(o=i+1);break;case`ArrowLeft`:if(a.hasChildren&&a.expanded&&!t.query())t.toggle(a.node.id);else{let e=t.index().parents.get(a.node.id);o=n.findIndex(t=>t.node.id===e)}break;case`Enter`:case` `:t.select(a.node.id);break;case`*`:t.expandSiblings(a.node.id);break;default:return}if(e.preventDefault(),o>=0){let e=n[o].node.id;t.focusId.set(e);let r=()=>{let n=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);t.clearToolbar(),n?.focus({preventScroll:!0}),n?.scrollIntoView({block:`nearest`}),n&&t.keepBelowToolbar(n)};this.rowWindow.rendered(o)?queueMicrotask(r):this.rowWindow.reveal(o,r)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=D({type:e,selectors:[[`div`,`appTreeRows`,``]],viewQuery:function(e,t){e&1&&jg(t.treeEl,kF,5),e&2&&Mg()},outputs:{clearFilter:`clearFilter`},decls:9,vars:10,consts:[[`treeEl`,``],[1,`sr-only`],[1,`state`,`compact`,`tree`],[1,`window-note`],[`role`,`tree`,`aria-label`,`Component instances`,1,`tree`,3,`keydown`,`hidden`],[`role`,`treeitem`,1,`row`,3,`selected`,`dir-host`,`--%NS%depth`],[`aria-hidden`,`true`,1,`name-tip`,`mono`,3,`top`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[`role`,`treeitem`,1,`row`,3,`click`,`focus`,`blur`,`keydown.escape`,`mouseenter`,`mouseleave`],[`aria-hidden`,`true`,1,`twisty`,3,`open`],[`aria-hidden`,`true`,1,`twisty-space`],[3,`class`],[1,`routed`],[1,`checks`],[1,`dirs`],[`aria-hidden`,`true`,1,`twisty`,3,`click`],[`viewBox`,`0 0 24 24`],[`d`,`m9 6 6 6-6 6`],[1,`tag`,`host-tag`,`mono`],[1,`host-dirs`,`mono`],[1,`name`,`mono`],[1,`tag`,`mono`],[`aria-hidden`,`true`,1,`name-tip`,`mono`]],template:function(e,t){if(e&1&&(L(0,`h2`,1),G(1,`Component tree`),R(),k(2,FF,7,3,`div`,2),k(3,IF,2,1,`p`,3),L(4,`div`,4,0),H(`keydown`,function(e){return t.onTreeKey(e)}),j(6,GF,11,21,`div`,5,jF),R(),k(8,KF,2,3,`div`,6)),e&2){let e;E(2),A(t.rows().length?-1:2),E(),A(t.rowWindow.enabled()?3:-1),E(),e_(`padding-top`,t.rowWindow.enabled()?6+t.rowWindow.padTop():null,`px`)(`padding-bottom`,t.rowWindow.enabled()?6+t.rowWindow.padBottom():null,`px`),W(`windowed`,t.rowWindow.enabled()),B(`hidden`,!t.rows().length),E(2),M(t.shownRows()),E(2),A((e=t.nameTip())?8:-1,e)}},styles:[`.mono[_ngcontent-%COMP%] { font-family: var(--%NS%font-mono); } @@ -4306,7 +4306,7 @@ button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] { .refresh.spinning[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] { animation: none; } -}`]})},dI=[`filterInput`],fI=()=>[];function pI(e,t){if(e&1){let e=z();P(0,`span`,30),G(1,`Page`),F(),P(2,`app-select`,31),V(`valueChange`,function(t){return x(e),S(U(2).selectPage(t))}),F()}if(e&2){let e=U(2);E(2),N(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function mI(e,t){if(e&1){let e=z();P(0,`button`,32),V(`click`,function(){return x(e),S(U(2).toggleDirectiveHosts())}),C(),P(1,`svg`,9),I(2,`path`,33)(3,`path`,34),F(),ys(),P(4,`span`,12),G(5,`Directive hosts`),F()()}e&2&&O(`aria-pressed`,U(2).showDirectiveHosts())}function hI(e,t){if(e&1&&(P(0,`p`,19),G(1),F()),e&2){let e=U(2);E(),K(e.pickMessage())}}function gI(e,t){if(e&1&&(P(0,`p`,20),G(1),F()),e&2){let e=U(2);E(),K(e.truncationText())}}function _I(e,t){e&1&&I(0,`section`,23),e&2&&N(`node`,t)}function vI(e,t){if(e&1){let e=z();P(0,`section`,35),V(`showForm`,function(t){return x(e),S(U(2).showForm.emit(t))})(`showInjector`,function(t){return x(e),S(U(2).showInjector.emit(t))})(`showSignals`,function(t){return x(e),S(U(2).showSignals.emit(t))})(`showPipe`,function(t){return x(e),S(U(2).showPipe.emit(t))}),F()}e&2&&N(`node`,t)}function yI(e,t){e&1&&(P(0,`p`,37),G(1,`The selected component was destroyed`),F(),P(2,`p`,36)(3,`span`,38),G(4),F(),G(5,` is no longer on the page. Select another component to see its live values. `),F()),e&2&&(E(4),K(t))}function bI(e,t){e&1&&(P(0,`p`,36),G(1,` Select a component to see its live inputs, properties, outputs, change detection and injected services. `),F())}function xI(e,t){if(e&1&&(P(0,`div`,25),k(1,yI,6,1)(2,bI,2,0,`p`,36),F()),e&2){let e,t=U(2);E(),A((e=t.destroyed())?1:2,e)}}function SI(e,t){e&1&&I(0,`app-angular-unavailable`,27),e&2&&N(`page`,U(2).angularPage())}function CI(e,t){if(e&1){let e=z();P(0,`app-hydration-section`,39),V(`overlay`,function(t){return x(e),S(U(2).setHydrationOverlay(t))})(`showNode`,function(t){return x(e),S(U(2).revealNode(t))})(`highlight`,function(t){return x(e),S(U(2).highlight(t))}),F()}e&2&&N(`report`,U(2).page()?.hydration)}function wI(e,t){if(e&1){let e=z();P(0,`app-cd-recording`,40),V(`showComponent`,function(t){return x(e),S(U(2).showCdComponent(t))}),F(),P(1,`app-leaks-section`,41),V(`showComponent`,function(t){return x(e),S(U(2).showLeakComponent(t))})(`highlight`,function(t){return x(e),S(U(2).highlight(t))}),F()}if(e&2){let e=U(2);N(`page`,e.cdPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`native`,e.native()),E(),N(`report`,e.leaksPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`angular`,e.angularPage())}}function TI(e,t){if(e&1){let e=z();P(0,`p`,1),G(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. `),F(),P(2,`div`,2)(3,`app-search-field`,3,0),V(`valueChange`,function(t){return x(e),S(U().setFilter(t))}),F(),P(5,`span`,4),G(6,` Type plain text, a tag such as