diff --git a/app/src/__tests__/plugins-view.test.ts b/app/src/__tests__/plugins-view.test.ts new file mode 100644 index 00000000..977db90f --- /dev/null +++ b/app/src/__tests__/plugins-view.test.ts @@ -0,0 +1,308 @@ +import { TestBed, type ComponentFixture } from '@angular/core/testing'; +import type { DevframeRpcClient } from 'devframe/client'; +import { afterEach, describe, expect, it, vi } from 'vitest'; +import { travelView, type TravelSource } from '../../../src/app/devtools/travel-plugin'; + +const connection = vi.hoisted(() => ({ resolve: (_client: unknown) => {} })); + +vi.mock('devframe/client', () => ({ + connectDevframe: () => + new Promise((resolve) => { + connection.resolve = resolve; + }), +})); + +const { App } = await import('../app'); +const { PluginsInspector, pluginsReporting, pluginsState } = + await import('../pages/plugins-inspector'); + +const source = (saved = ['kyoto']): TravelSource => ({ + bookings: () => [ + { + id: 'TRV-1041', + destinationName: 'Kyoto', + startDate: '2026-11-02', + travelers: 2, + total: 3120, + email: 'ada@example.com', + }, + { + id: 'TRV-1042', + destinationName: 'Lisbon', + startDate: '2026-12-10', + travelers: 1, + total: 980, + email: 'grace@example.com', + }, + ], + saved: () => saved, + recentQueries: () => ['beach'], + filters: () => ({ query: '', region: 'Europe', sort: 'price' }), + unsaveAll: () => {}, +}); + +const page = (pageId: string, extra: Record = {}) => ({ + pageId, + url: `http://localhost/${pageId}`, + title: `Travel ${pageId}`, + reportedAt: 5_000, + plugins: [ + { + id: 'travel', + version: '1.0.0', + title: 'Travel store', + description: 'Bookings from the demo TravelStore.', + apiVersion: 1, + status: 'running', + view: travelView(source()), + actions: ['unsave-all'], + ...extra, + }, + ], +}); + +const serverTools = [ + { + id: 'travel', + version: '1.0.0', + title: 'Travel store', + tools: [ + { + name: 'bookings', + id: 'pangular:plugin:travel:bookings', + safety: 'read', + description: 'Bookings.', + registered: true, + }, + { + name: 'clear-saved', + id: 'pangular:plugin:travel:clear-saved', + safety: 'action', + description: 'Clears saved.', + registered: false, + }, + ], + }, +]; + +function fakeClient(value: unknown, configs: Record = {}) { + const calls: { name: string; args: unknown[] }[] = []; + const rpc = { + call: (name: string, ...args: unknown[]) => { + calls.push({ name, args }); + return Promise.resolve(name === 'request-plugin-action' ? { ok: true } : []); + }, + callEvent: () => Promise.resolve(), + sharedState: (name: string) => + Promise.resolve({ + value: () => (name === 'plugins' ? value : null), + on: () => () => {}, + }), + }; + const client = { + connectionMeta: { configs }, + scope: () => ({ rpc }), + events: { on: () => () => {} }, + } as unknown as DevframeRpcClient; + return { client, calls }; +} + +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, ' '); + +async function mount(value: unknown, configs: Record = {}) { + const fixture = TestBed.createComponent(PluginsInspector); + const fake = fakeClient(value, configs); + fixture.componentRef.setInput('rpc', fake.client); + document.body.append(host(fixture)); + await settle(fixture); + return { fixture, calls: fake.calls }; +} + +function button(fixture: ComponentFixture, name: string): HTMLButtonElement { + const found = [...host(fixture).querySelectorAll('button')].find((b) => + (b.textContent ?? '').replace(/\s+/g, ' ').trim().startsWith(name), + ); + if (!found) throw new Error(`No button ${name}`); + return found; +} + +afterEach(() => { + document.body.innerHTML = ''; + location.hash = ''; + sessionStorage.clear(); +}); + +describe('the plugins state', () => { + it('lists pages newest first and knows when a plugin reports', () => { + const state = pluginsState({ + pages: { a: { ...page('a'), reportedAt: 1 }, b: page('b') }, + server: [], + }); + expect(state.pages.map((p) => p.pageId)).toEqual(['b', 'a']); + expect(pluginsReporting({ pages: {}, server: [] })).toBe(false); + expect(pluginsReporting({ pages: { a: page('a') }, server: [] })).toBe(true); + expect(pluginsReporting({ pages: {}, server: serverTools })).toBe(true); + expect(pluginsReporting(undefined)).toBe(false); + }); +}); + +describe('the Plugins tab', () => { + it('says how to add a plugin when none reports', async () => { + const { fixture } = await mount({ pages: {}, server: [] }); + expect(text(fixture)).toContain('No plugin reports yet.'); + expect(text(fixture)).toContain('registerPangularPlugin()'); + }); + + it("renders the example plugin's stats, table, list and tree from its view", async () => { + const { fixture } = await mount({ pages: { p1: page('p1') }, server: serverTools }); + const root = host(fixture); + expect(root.querySelector('h2')?.textContent).toContain('Travel store'); + expect(text(fixture)).toContain('2 bookings, 1 saved destination'); + expect(text(fixture)).toContain('Region: Europe'); + expect([...root.querySelectorAll('h3')].map((h) => h.textContent?.trim())).toEqual([ + 'Totals', + 'Bookings', + 'Recent searches', + 'Filters', + ]); + const headers = [...root.querySelectorAll('th')].map((th) => th.textContent?.trim()); + expect(headers).toEqual(['Booking', 'Destination', 'Starts', 'Travelers', 'Total', 'Email']); + expect(root.querySelectorAll('tbody tr')).toHaveLength(2); + expect(root.querySelector('summary')).toBeNull(); + expect(text(fixture)).toContain('"Europe"'); + // The server plugin's tools, with the hidden one marked. + expect(text(fixture)).toContain('pangular:plugin:travel:bookings'); + expect(text(fixture)).toContain('Hidden from agents by the config'); + expect(text(fixture)).toContain('3 of 3 rows and items'); + }); + + it('filters rows and items, and offers Clear filter when nothing matches', async () => { + const { fixture } = await mount({ pages: { p1: page('p1') }, server: [] }); + const search = host(fixture).querySelector('input[type="search"]')!; + search.value = 'lisbon'; + search.dispatchEvent(new Event('input')); + await settle(fixture); + expect(host(fixture).querySelectorAll('tbody tr')).toHaveLength(1); + expect(text(fixture)).toContain('1 of 3 rows and items'); + search.value = 'zzz'; + search.dispatchEvent(new Event('input')); + await settle(fixture); + expect(text(fixture)).toContain('No row or item matches “zzz”.'); + button(fixture, 'Clear filter').click(); + await settle(fixture); + expect(host(fixture).querySelectorAll('tbody tr')).toHaveLength(2); + }); + + it('asks before an action that says so, then runs it on the page', async () => { + const { fixture, calls } = await mount({ pages: { p1: page('p1') }, server: [] }); + button(fixture, 'Clear saved destinations').click(); + await settle(fixture); + expect(text(fixture)).toContain('Remove every saved destination from the store?'); + button(fixture, 'Cancel').click(); + await settle(fixture); + expect(calls.filter((call) => call.name === 'request-plugin-action')).toEqual([]); + button(fixture, 'Clear saved destinations').click(); + await settle(fixture); + button(fixture, 'Clear saved destinations').click(); + await settle(fixture); + expect(calls.filter((call) => call.name === 'request-plugin-action')).toEqual([ + { + name: 'request-plugin-action', + args: [{ pageId: 'p1', pluginId: 'travel', action: 'unsave-all' }], + }, + ]); + expect(host(fixture).querySelector('[role="status"].result')?.textContent).toBe('Done.'); + }); + + it('says actions are off when the config blocks them', async () => { + const { fixture } = await mount( + { pages: { p1: page('p1') }, server: [] }, + { pangular: { plugins: { travel: { actions: false } } } }, + ); + expect(text(fixture)).toContain('Actions of this plugin are turned off'); + expect(() => button(fixture, 'Clear saved destinations')).toThrow(); + }); + + it('shows why a plugin failed', async () => { + const { fixture } = await mount({ + pages: { + p1: page('p1', { status: 'error', error: 'TypeError: store is undefined', view: null }), + }, + server: [], + }); + expect(text(fixture)).toContain('Failed'); + expect(host(fixture).querySelector('[role="alert"]')?.textContent).toContain( + 'store is undefined', + ); + expect(text(fixture)).toContain('has not reported a view yet'); + }); + + it('switches between plugins and pages', async () => { + const other = { + ...page('p2'), + plugins: [ + { + id: 'query', + version: '5.0.0', + title: 'Query cache', + status: 'running', + view: { sections: [{ kind: 'text', title: 'Note', text: 'Two queries' }] }, + actions: [], + }, + ], + }; + const { fixture } = await mount({ + pages: { p1: page('p1'), p2: other, p3: { ...page('p3'), reportedAt: 1 } }, + server: [], + }); + const plugins = [...host(fixture).querySelectorAll('[aria-label="Plugin"] button')]; + expect(plugins.map((b) => b.textContent?.trim())).toEqual(['Query cache', 'Travel store']); + // Query cache comes first and runs on one page only. + expect(text(fixture)).toContain('Two queries'); + expect(host(fixture).querySelector('[aria-label="Page"]')).toBeNull(); + button(fixture, 'Travel store').click(); + await settle(fixture); + expect(text(fixture)).toContain('2 bookings'); + expect(host(fixture).querySelector('[aria-label="Page"]')).not.toBeNull(); + }); +}); + +describe('the Plugins tab in the shell', () => { + async function open(value: unknown, configs: Record = {}) { + const fixture = TestBed.createComponent(App); + document.body.append(host(fixture)); + await settle(fixture); + connection.resolve(fakeClient(value, configs).client); + await settle(fixture); + return fixture; + } + const tabs = (fixture: ComponentFixture) => + [...host(fixture).querySelectorAll('nav button')].map((b) => b.textContent?.trim()); + + it('appears once a plugin reports, and not with the inspector off', async () => { + const none = await open({ pages: {}, server: [] }); + expect(tabs(none)).not.toContain('Plugins'); + none.destroy(); + document.body.innerHTML = ''; + + const some = await open({ pages: { p1: page('p1') }, server: [] }); + expect(tabs(some)).toContain('Plugins'); + some.destroy(); + document.body.innerHTML = ''; + + const off = await open( + { pages: { p1: page('p1') }, server: [] }, + { pangular: { inspectors: { plugins: false } } }, + ); + expect(tabs(off)).not.toContain('Plugins'); + }); +}); diff --git a/app/src/__tests__/startup-section.test.ts b/app/src/__tests__/startup-section.test.ts new file mode 100644 index 00000000..1e342af3 --- /dev/null +++ b/app/src/__tests__/startup-section.test.ts @@ -0,0 +1,150 @@ +import { TestBed, type ComponentFixture } from '@angular/core/testing'; +import type { DevframeRpcClient } from 'devframe/client'; +import { afterEach, describe, expect, it } from 'vitest'; +import { + StartupSection, + formatMs, + milestones, + startupPages, + type PanelStartupPage, +} from '../pages/startup-section'; + +const report = (pageId: string, extra: Partial = {}): PanelStartupPage => ({ + pageId, + reportedAt: 5_000, + angularVersion: '22.1.7', + navigation: { domContentLoaded: 120, firstContentfulPaint: 300 }, + angularStart: { at: 140, source: 'hook' }, + bootstrapComponent: { start: 180, end: 230 }, + firstStable: { at: 640, exact: true }, + overlayStart: 900, + hook: true, + providers: { + status: 'measured', + count: 42, + totalSelfMs: 61.5, + slowest: [{ name: 'TripService', count: 1, ms: 30, selfMs: 24.5, firstAt: 200 }], + }, + ...extra, +}); + +function fakeClient(value: unknown) { + const rpc = { + call: () => Promise.resolve(null), + sharedState: (name: string) => + Promise.resolve({ value: () => (name === 'startup' ? value : null), on: () => () => {} }), + }; + return { scope: () => ({ rpc }) } as unknown as DevframeRpcClient; +} + +async function settle(fixture: ComponentFixture) { + for (let i = 0; i < 3; i++) { + await new Promise((resolve) => setTimeout(resolve)); + await fixture.whenStable(); + } +} + +async function mount(value: unknown, pageId: string | null = null) { + const fixture = TestBed.createComponent(StartupSection); + fixture.componentRef.setInput('rpc', fakeClient(value)); + fixture.componentRef.setInput('pageId', pageId); + document.body.append(fixture.nativeElement); + await settle(fixture); + return fixture; +} + +const text = (fixture: ComponentFixture) => + ((fixture.nativeElement as HTMLElement).textContent ?? '').replace(/\s+/g, ' '); + +afterEach(() => { + document.body.innerHTML = ''; +}); + +describe('startup timing helpers', () => { + it('orders the milestones and marks an upper bound', () => { + const steps = milestones(report('p1', { firstStable: { at: 950, exact: false } })); + expect(steps.map((step) => step.label)).toEqual([ + 'DOM content loaded', + 'Angular started', + 'Root component created', + 'First contentful paint', + 'Overlay started', + 'First stable, at the latest', + ]); + expect(formatMs(24.54)).toBe('24.5 ms'); + expect(formatMs(1250)).toBe('1.25 s'); + expect(startupPages({ pages: { a: report('a', { reportedAt: 1 }), b: report('b') } })).toEqual([ + expect.objectContaining({ pageId: 'b' }), + expect.objectContaining({ pageId: 'a' }), + ]); + }); +}); + +describe('the startup section', () => { + it('stays hidden while no page reports', async () => { + const fixture = await mount({ pages: {} }); + expect((fixture.nativeElement as HTMLElement).querySelector('section')).toBeNull(); + }); + + it('shows the milestones, the time to stable and the slowest providers of the shown page', async () => { + const fixture = await mount( + { pages: { p1: report('p1'), p2: report('p2', { angularVersion: '21.0.0' }) } }, + 'p1', + ); + const root = fixture.nativeElement as HTMLElement; + expect(root.querySelector('h2')?.textContent).toBe('Startup'); + expect(text(fixture)).toContain("(Angular 22.1.7): 500 ms from Angular's start to stable."); + expect(text(fixture)).toContain('Root component created'); + expect(text(fixture)).toContain('42 provider instances, 61.5 ms of construction'); + const rows = [...root.querySelectorAll('[aria-label="Slowest providers"] tbody tr')]; + expect( + rows.map((row) => [...row.querySelectorAll('td')].map((cell) => cell.textContent?.trim())), + ).toEqual([['TripService', '24.5 ms', '30 ms', '1']]); + for (const region of root.querySelectorAll('[role="region"]')) { + expect(region.getAttribute('tabindex')).toBe('0'); + } + }); + + it('says how to time providers without the startup hook', async () => { + const fixture = await mount({ + pages: { + p1: report('p1', { + hook: false, + firstStable: { at: 950, exact: false }, + providers: { status: 'needs-hook', count: 0, totalSelfMs: 0, slowest: [] }, + }), + }, + }); + expect(text(fixture)).toContain('at most 810 ms'); + expect(text(fixture)).toContain('@pangular-inspector/devtools/startup-hook'); + }); + + it('drops a late answer from the client it had before the rpc input changed', async () => { + let answerOld: (state: unknown) => void = () => {}; + const slowRpc = { + call: () => Promise.resolve(null), + sharedState: () => + new Promise((resolve) => { + answerOld = resolve; + }), + }; + const oldClient = { scope: () => ({ rpc: slowRpc }) } as unknown as DevframeRpcClient; + const fixture = TestBed.createComponent(StartupSection); + fixture.componentRef.setInput('rpc', oldClient); + fixture.componentRef.setInput('pageId', null); + document.body.append(fixture.nativeElement); + await settle(fixture); + fixture.componentRef.setInput( + 'rpc', + fakeClient({ pages: { fresh: report('fresh', { angularVersion: '22.1.7' }) } }), + ); + await settle(fixture); + answerOld({ + value: () => ({ pages: { stale: report('stale', { angularVersion: '19.0.0' }) } }), + on: () => () => {}, + }); + await settle(fixture); + expect(text(fixture)).toContain('Angular 22.1.7'); + expect(text(fixture)).not.toContain('19.0.0'); + }); +}); diff --git a/app/src/app.ts b/app/src/app.ts index ab9bda9e..2a67a8b7 100644 --- a/app/src/app.ts +++ b/app/src/app.ts @@ -31,6 +31,7 @@ import { NetworkInspector } from './pages/network-inspector'; import { ComingSoon, type ComingSoonInfo } from './pages/coming-soon'; import { CapacitorInspector } from './pages/capacitor-inspector'; import { ErrorsInspector } from './pages/errors-inspector'; +import { PluginsInspector, pluginsReporting } from './pages/plugins-inspector'; import { AuditInspector } from './pages/audit-inspector'; import { Timeline } from './pages/timeline'; import { capacitorPages } from './pages/capacitor-types'; @@ -212,6 +213,7 @@ function readView(): View | null { NetworkInspector, CapacitorInspector, ErrorsInspector, + PluginsInspector, AuditInspector, Timeline, ComingSoon, @@ -564,6 +566,9 @@ function readView(): View | null { @case ('capacitor') { } + @case ('plugins') { + + } @case ('errors') { (null); @@ -1082,6 +1089,7 @@ export class App implements OnInit, OnDestroy { (t) => (t.id !== 'analog' || this.analog()) && (t.id !== 'capacitor' || this.capacitorReporting()) && + (t.id !== 'plugins' || this.pluginsReporting()) && !(view === 'angular' && TAB_VIEW[t.id]), ); }); @@ -1156,6 +1164,7 @@ export class App implements OnInit, OnDestroy { private stopVisibility = () => {}; private stopNative = () => {}; private stopCapacitor = () => {}; + private stopPlugins = () => {}; private stopFollowing = () => {}; private stopHighlights = () => {}; @@ -1282,6 +1291,7 @@ export class App implements OnInit, OnDestroy { void this.watchVisibility(client); void this.watchAngularNative(client); void this.watchCapacitor(client); + void this.watchPlugins(client); const scoped = client.scope('pangular').rpc as unknown as { call: (name: string) => Promise; }; @@ -1347,6 +1357,7 @@ export class App implements OnInit, OnDestroy { clearTimeout(this.retryTimer); this.stopNative(); this.stopCapacitor(); + this.stopPlugins(); this.stopFollowing(); this.stopVisibility(); this.stopHighlights(); @@ -1681,6 +1692,29 @@ export class App implements OnInit, OnDestroy { } } + /** The Plugins tab exists once a plugin reports; a stored or linked Plugins tab opens then. */ + private async watchPlugins(client: DevframeRpcClient) { + let restore = + !this.view() && + initialTab(location.hash, storedTab(this.tabScope()), ['plugins']) === 'plugins'; + try { + const state = await client.scope('pangular').rpc.sharedState('plugins'); + const apply = (value: unknown) => { + if (value === undefined) return; + const reporting = pluginsReporting(value); + this.pluginsReporting.set(reporting); + if (reporting && restore && tabEnabled('plugins', this.config())) this.tab.set('plugins'); + if (reporting) restore = false; + if (!reporting && this.tab() === 'plugins' && !this.view()) this.tab.set('dashboard'); + }; + apply(state.value()); + this.stopPlugins(); + this.stopPlugins = state.on('updated', apply); + } catch { + this.pluginsReporting.set(false); + } + } + private async watchCapacitor(client: DevframeRpcClient) { try { const state = await client.scope('pangular').rpc.sharedState('capacitor'); diff --git a/app/src/devtools-config.ts b/app/src/devtools-config.ts index 4a373875..2c1db880 100644 --- a/app/src/devtools-config.ts +++ b/app/src/devtools-config.ts @@ -31,6 +31,7 @@ const TAB_INSPECTOR: Partial> = { analog: 'analog', capacitor: 'capacitor', errors: 'errors', + plugins: 'plugins', }; /** The `inspectors` key that turns a tab on or off, if any. */ diff --git a/app/src/pages/di-inspector.ts b/app/src/pages/di-inspector.ts index aa5acfd1..a27d29f9 100644 --- a/app/src/pages/di-inspector.ts +++ b/app/src/pages/di-inspector.ts @@ -27,6 +27,7 @@ import { StoreGlobal } from '../ui/store-global'; import type { ComponentFocus } from '../types/component-focus.types'; import type { InjectorFocus } from '../types/injector-focus.types'; import { storeFlag, storedFlag } from '../view-prefs'; +import { StartupSection } from './startup-section'; interface ProviderInfo { token: string; @@ -122,7 +123,7 @@ function isTree(value: unknown): value is InjectorNode[] { @Component({ selector: 'app-di-inspector', - imports: [AngularUnavailable, NgTemplateOutlet, Select, SourceLink, StoreGlobal], + imports: [AngularUnavailable, NgTemplateOutlet, Select, SourceLink, StartupSection, StoreGlobal], template: `

{{ announcement() }}

@@ -553,6 +554,7 @@ function isTree(value: unknown): value is InjectorNode[] { } + } @else if (!loaded()) {
diff --git a/app/src/pages/plugin-view.ts b/app/src/pages/plugin-view.ts new file mode 100644 index 00000000..b23c0a0f --- /dev/null +++ b/app/src/pages/plugin-view.ts @@ -0,0 +1,410 @@ +import { Component, computed, input } from '@angular/core'; +import { NgTemplateOutlet } from '@angular/common'; +import type { PluginCell, PluginSection } from '@pangular-inspector/devtools/plugin'; + +// Renders one section of a plugin view: the declarative shapes a plugin +// reports instead of shipping code into the panel. Every value is text. + +/** The text of a table cell, for display and the filter. */ +export function cellText(value: PluginCell | undefined): string { + if (value === null || value === undefined) return ''; + if (typeof value === 'object') return value.text; + return String(value); +} + +function matches(text: string, filter: string): boolean { + return !filter || text.toLowerCase().includes(filter); +} + +/** The rows or items of a section the filter keeps, and how many it had. */ +export function filteredCount( + section: PluginSection, + filter: string, +): { shown: number; total: number } { + const text = filter.trim().toLowerCase(); + if (section.kind === 'table') { + const shown = section.rows.filter((row) => + section.columns.some((column) => matches(cellText(row[column.key]), text)), + ).length; + return { shown, total: section.rows.length }; + } + if (section.kind === 'list') { + const shown = section.items.filter((item) => + matches(`${item.label} ${item.detail ?? ''} ${item.badge?.label ?? ''}`, text), + ).length; + return { shown, total: section.items.length }; + } + return { shown: 0, total: 0 }; +} + +interface TreeEntry { + key: string; + value: unknown; + /** A nested object or array, folded. */ + nested: boolean; + summary: string; +} + +const MAX_TREE_DEPTH = 8; +const MAX_TREE_ENTRIES = 200; + +function entriesOf(value: unknown): TreeEntry[] { + if (!value || typeof value !== 'object') return []; + const pairs: [string, unknown][] = Array.isArray(value) + ? value.map((item, index) => [String(index), item]) + : Object.entries(value as Record); + return pairs.slice(0, MAX_TREE_ENTRIES).map(([key, item]) => { + const nested = !!item && typeof item === 'object'; + const summary = Array.isArray(item) + ? `Array(${item.length})` + : nested + ? `{${Object.keys(item as object).length}}` + : item === null + ? 'null' + : typeof item === 'string' + ? JSON.stringify(item) + : String(item); + return { key, value: item, nested, summary }; + }); +} + +@Component({ + selector: 'app-plugin-section', + imports: [NgTemplateOutlet], + template: ` + @let part = section(); +
+

{{ part.title }}

+ @switch (part.kind) { + @case ('stats') { +
+ @for (item of part.items; track $index) { +
+
{{ item.label }}
+
{{ item.value }}
+
+ } +
+ } + @case ('text') { +

{{ part.text }}

+ } + @case ('table') { + @if (!part.rows.length) { +

{{ part.empty ?? 'No rows.' }}

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

No row matches the filter.

+ } @else { +
+ + + + @for (column of part.columns; track column.key) { + + } + + + + @for (row of rows(); track $index) { + + @for (column of part.columns; track column.key) { + @let value = row[column.key]; + + } + + } + +
{{ column.label }}
+ @if (toneOf(value); as tone) { + {{ cellText(value) }} + } @else { + {{ cellText(value) }} + } +
+
+ } + } + @case ('list') { + @if (!part.items.length) { +

{{ part.empty ?? 'Nothing listed.' }}

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

No item matches the filter.

+ } @else { +
    + @for (item of items(); track $index) { +
  • + {{ item.label }} + @if (item.badge; as badge) { + {{ + badge.label + }} + } + @if (item.detail) { + {{ item.detail }} + } +
  • + } +
+ } + } + @case ('tree') { + + } + } +
+ + + @let entries = entriesOf(value); + @if (!entries.length) { + {{ leafText(value) }} + } @else { +
    + @for (entry of entries; track entry.key) { +
  • + @if (entry.nested && depth < maxDepth) { +
    + + {{ entry.key }} + {{ entry.summary }} + + +
    + } @else { + {{ entry.key }} + {{ entry.summary }} + } +
  • + } +
+ } +
+ `, + styles: ` + @use 'mixins' as m; + :host { + display: block; + } + .section { + @include m.panel; + display: grid; + gap: 8px; + min-width: 0; + padding: 10px 12px; + } + .title { + @include m.label; + margin: 0; + } + .stats { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); + gap: 8px; + margin: 0; + } + .stat { + display: grid; + gap: 2px; + padding: 8px 10px; + border: 1px solid var(--border); + border-radius: var(--radius-sm); + background: var(--surface-2); + } + .stat dt { + color: var(--text-2); + font-size: 12px; + } + .stat dd { + margin: 0; + color: var(--text-strong); + font-size: 18px; + font-weight: 600; + font-variant-numeric: tabular-nums; + overflow-wrap: anywhere; + } + .stat[data-tone='ok'] dd { + color: var(--ok-text); + } + .stat[data-tone='warn'] dd { + color: var(--warn-text); + } + .stat[data-tone='danger'] dd { + color: var(--danger-text); + } + .stat[data-tone='accent'] dd { + color: var(--accent-text); + } + .text { + margin: 0; + color: var(--text); + line-height: 1.5; + white-space: pre-wrap; + overflow-wrap: anywhere; + } + .empty { + margin: 0; + color: var(--text-2); + } + .table-wrap { + max-width: 100%; + overflow-x: auto; + border-radius: var(--radius-sm); + } + .table-wrap:focus-visible { + @include m.focus-ring(-2px); + } + table { + width: 100%; + border-collapse: collapse; + font-size: 12px; + } + th, + td { + padding: 6px 8px; + border-bottom: 1px solid var(--border); + text-align: left; + vertical-align: top; + } + th { + color: var(--text-2); + font-weight: 600; + white-space: nowrap; + } + td { + color: var(--text); + font-variant-numeric: tabular-nums; + overflow-wrap: anywhere; + } + .chip { + display: inline-flex; + align-items: center; + padding: 1px 8px; + border: 1px solid var(--border); + border-radius: 99px; + background: var(--surface-2); + color: var(--text-2); + font-size: 11px; + font-weight: 600; + } + .chip[data-tone='ok'] { + @include m.tint(ok); + } + .chip[data-tone='warn'] { + @include m.tint(warn); + } + .chip[data-tone='danger'] { + @include m.tint(danger); + } + .chip[data-tone='accent'] { + @include m.tint(accent); + } + .list { + display: grid; + gap: 4px; + margin: 0; + padding: 0; + list-style: none; + } + .list li { + display: flex; + flex-wrap: wrap; + gap: 4px 8px; + align-items: baseline; + min-width: 0; + padding: 4px 0; + border-bottom: 1px solid var(--border); + } + .label { + color: var(--text-strong); + overflow-wrap: anywhere; + } + .detail { + flex: 1 1 200px; + min-width: 0; + color: var(--text-2); + overflow-wrap: anywhere; + } + .tree { + margin: 0; + padding: 0 0 0 14px; + list-style: none; + font-family: var(--font-mono); + font-size: 12px; + } + .tree.root { + padding-left: 0; + } + .tree li { + padding: 2px 0; + min-width: 0; + overflow-wrap: anywhere; + } + summary { + width: fit-content; + max-width: 100%; + border-radius: 2px; + cursor: pointer; + } + summary:focus-visible { + @include m.focus-ring; + } + .key { + margin-right: 6px; + color: var(--accent-text); + } + .summary { + color: var(--text-2); + } + .leaf { + color: var(--text); + font-family: var(--font-mono); + font-size: 12px; + } + `, +}) +export class PluginSectionView { + readonly section = input.required(); + /** Keeps the table rows and list items whose text contains it. */ + readonly filter = input(''); + /** Makes the heading id unique on the page. */ + readonly index = input(0); + + protected readonly maxDepth = MAX_TREE_DEPTH; + protected readonly cellText = cellText; + protected readonly entriesOf = entriesOf; + protected readonly headingId = computed(() => `plugin-section-${this.index()}`); + + private readonly text = computed(() => this.filter().trim().toLowerCase()); + protected readonly rows = computed(() => { + const part = this.section(); + if (part.kind !== 'table') return []; + const text = this.text(); + return part.rows.filter((row) => + part.columns.some((column) => matches(cellText(row[column.key]), text)), + ); + }); + protected readonly items = computed(() => { + const part = this.section(); + if (part.kind !== 'list') return []; + const text = this.text(); + return part.items.filter((item) => + matches(`${item.label} ${item.detail ?? ''} ${item.badge?.label ?? ''}`, text), + ); + }); + + protected toneOf(value: PluginCell | undefined): string | null { + return value && typeof value === 'object' && value.tone ? value.tone : null; + } + + protected leafText(value: unknown): string { + if (value === null || value === undefined) return String(value); + if (Array.isArray(value)) return '[]'; + if (typeof value === 'object') return '{}'; + return typeof value === 'string' ? JSON.stringify(value) : String(value); + } +} diff --git a/app/src/pages/plugins-inspector.ts b/app/src/pages/plugins-inspector.ts new file mode 100644 index 00000000..28d4564c --- /dev/null +++ b/app/src/pages/plugins-inspector.ts @@ -0,0 +1,654 @@ +import { + Component, + DestroyRef, + computed, + effect, + inject, + input, + linkedSignal, + signal, +} from '@angular/core'; +import type { DevframeRpcClient } from 'devframe/client'; +import type { PluginView } from '@pangular-inspector/devtools/plugin'; +import { pluginSwitches } from '@pangular-inspector/devtools/config'; +import { panelConfig } from '../devtools-config'; +import { hostPageId } from '../page-id'; +import { Select, type SelectOption } from '../ui/select'; +import { PluginSectionView, filteredCount } from './plugin-view'; + +/** One plugin as a page reported it (`rpc/plugins-register.ts`). */ +export interface PanelPluginEntry { + id: string; + version: string; + title: string; + description?: string; + status: 'running' | 'error' | 'unsupported'; + error?: string; + view: PluginView | null; + actions: string[]; +} + +export interface PanelPluginsPage { + pageId: string; + url?: string; + title?: string; + reportedAt: number; + plugins: PanelPluginEntry[]; +} + +export interface PanelServerPlugin { + id: string; + version: string; + title: string; + description?: string; + tools: { name: string; id: string; safety: string; description: string; registered: boolean }[]; +} + +export interface PanelPluginsState { + pages: PanelPluginsPage[]; + server: PanelServerPlugin[]; +} + +/** The `plugins` shared state as lists, newest page first. */ +export function pluginsState(value: unknown): PanelPluginsState { + const state = (value ?? {}) as { pages?: unknown; server?: unknown }; + const pages = + state.pages && typeof state.pages === 'object' + ? (Object.values(state.pages) as PanelPluginsPage[]).filter( + (page) => page && typeof page.pageId === 'string' && Array.isArray(page.plugins), + ) + : []; + return { + pages: pages.sort((a, b) => b.reportedAt - a.reportedAt), + server: Array.isArray(state.server) ? (state.server as PanelServerPlugin[]) : [], + }; +} + +/** Whether any page runs a plugin or a server plugin is set, so the tab has something to show. */ +export function pluginsReporting(value: unknown): boolean { + const state = pluginsState(value); + return state.server.length > 0 || state.pages.some((page) => page.plugins.length > 0); +} + +const STATUS_LABEL: Record = { + running: 'Running', + error: 'Failed', + unsupported: 'Needs a newer Pangular', +}; + +const STATUS_TONE: Record = { + running: 'ok', + error: 'danger', + unsupported: 'warn', +}; + +@Component({ + selector: 'app-plugins-inspector', + imports: [Select, PluginSectionView], + template: ` + @if (!loaded()) { +

Loading plugins…

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

No plugin reports yet.

+

+ A library adds a tab here with registerPangularPlugin() from + @pangular-inspector/devtools/plugin. Its view shows up once the app runs + with the overlay loaded. +

+
+ } @else { +

+ Views that libraries report from the live page through the plugin API. The values come from + each plugin's code on the page and are masked like other live data. +

+ +
+
+ @for (id of pluginIds(); track id) { + + } +
+ + @if (pageOptions().length > 1) { + + } + {{ countText() }} +
+ + @if (entry(); as plugin) { +
+
+

{{ plugin.title }}

+ @if (plugin.version) { + {{ plugin.version }} + } + {{ + statusLabel[plugin.status] + }} + @for (badge of plugin.view?.badges ?? []; track $index) { + {{ badge.label }} + } +
+ @if (plugin.view?.summary; as summary) { +

{{ summary }}

+ } + @if (plugin.description) { +

{{ plugin.description }}

+ } + @if (plugin.error) { + + } + + @if (actions().length) { +
+ @if (!actionsAllowed()) { +

+ Actions of this plugin are turned off in the devtools config (actions.plugins + or plugins.{{ plugin.id }}.actions). +

+ } @else if (confirming(); as action) { +

{{ action.confirm }}

+ + + } @else { + @for (action of actions(); track action.name) { + + } + } +
+ } +

{{ result() }}

+ + @if (!plugin.view) { +

+ The plugin has not reported a view yet. It reports while this panel is open. +

+ } @else if (!plugin.view.sections.length) { +

The plugin reported no sections.

+ } @else if (filter().trim() && !filterMatches()) { +
+

No row or item matches “{{ filter().trim() }}”.

+ +
+ } @else { +
+ @for (section of plugin.view.sections; track $index) { + + } +
+ } +
+ } @else { +

+ No page reports the {{ titleOf(pluginId() ?? '') }} plugin. Open the app with the plugin + registered and the overlay loaded. +

+ } + + @if (server(); as serverPlugin) { +
+

Agent tools

+
    + @for (tool of serverPlugin.tools; track tool.id) { +
  • + {{ tool.id }} + {{ + tool.safety + }} + @if (!tool.registered) { + Hidden from agents by the config + } +

    {{ tool.description }}

    +
  • + } @empty { +
  • This plugin has no agent tools.
  • + } +
+
+ } + } + `, + styles: ` + @use 'mixins' as m; + :host { + display: block; + font-size: 13px; + } + .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; + } + .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); + } + .plugins { + display: inline-flex; + flex-wrap: wrap; + gap: 4px; + min-width: 0; + } + .view { + height: var(--control-h); + max-width: 100%; + padding: 0 12px; + border: 1px solid var(--border); + border-radius: var(--radius-sm); + background: var(--surface); + color: var(--text); + font: inherit; + cursor: pointer; + transition: background-color 150ms var(--ease); + @include m.truncate; + } + .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; + } + .search { + position: relative; + flex: 1 1 180px; + min-width: 0; + } + .search-icon { + position: absolute; + top: 50%; + left: 12px; + width: 14px; + height: 14px; + transform: translateY(-50%); + fill: none; + stroke: var(--text-3); + stroke-width: 2.2; + stroke-linecap: round; + pointer-events: none; + } + input[type='search'] { + width: 100%; + height: var(--control-h); + padding: 0 12px 0 34px; + background: var(--bg); + border: 1px solid var(--border-strong); + border-radius: var(--radius-sm); + color: var(--text); + font-size: 13px; + } + input[type='search']:focus { + @include m.field-focus; + } + .page-select { + flex: 0 1 200px; + min-width: 0; + } + .count { + margin-left: auto; + color: var(--text-2); + font-size: 12px; + } + .plugin { + display: grid; + gap: 10px; + min-width: 0; + } + .head { + display: flex; + flex-wrap: wrap; + gap: 6px 8px; + align-items: center; + } + h2 { + margin: 0; + color: var(--text-strong); + font-size: 16px; + overflow-wrap: anywhere; + } + .summary { + margin: 0; + color: var(--text); + } + .chip { + display: inline-flex; + align-items: center; + padding: 1px 8px; + border: 1px solid transparent; + border-radius: 99px; + font-size: 11px; + font-weight: 600; + @include m.tint(accent); + } + .chip.plain, + .chip[data-tone='plain'], + .chip[data-tone='neutral'] { + border-color: var(--border); + background: var(--surface-2); + color: var(--text-2); + } + .chip[data-tone='ok'] { + @include m.tint(ok); + } + .chip[data-tone='warn'] { + @include m.tint(warn); + } + .chip[data-tone='danger'] { + @include m.tint(danger); + } + .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; + } + .actions { + display: flex; + flex-wrap: wrap; + gap: 8px; + align-items: center; + } + .confirm { + margin: 0; + color: var(--text); + } + .result { + margin: 0; + color: var(--text-2); + } + .result:empty { + display: none; + } + .small { + height: var(--control-h); + padding: 0 12px; + border: 1px solid var(--border-strong); + border-radius: var(--radius-sm); + background: var(--surface-2); + color: var(--text); + font: inherit; + cursor: pointer; + } + .small.primary { + border-color: var(--accent); + background: var(--accent); + color: var(--accent-ink); + } + .small[aria-disabled='true'] { + opacity: 0.6; + cursor: default; + } + .small:focus-visible { + @include m.focus-ring; + } + .sections { + display: grid; + gap: 10px; + min-width: 0; + } + .empty, + .state { + margin: 0 0 12px; + color: var(--text-2); + } + .empty p, + .state p { + margin: 0 0 8px; + } + .tools { + margin-top: 16px; + } + .label { + @include m.label; + margin: 0 0 8px; + } + .tools ul { + display: grid; + gap: 6px; + margin: 0; + padding: 0; + list-style: none; + } + .tools li { + @include m.panel; + display: flex; + flex-wrap: wrap; + gap: 4px 8px; + align-items: center; + min-width: 0; + padding: 8px 12px; + } + .tools li code { + overflow-wrap: anywhere; + } + .tools li p { + flex-basis: 100%; + } + `, +}) +export class PluginsInspector { + readonly rpc = input(null); + + private readonly destroyRef = inject(DestroyRef); + private readonly hostPageId = hostPageId(); + private unsubscribe?: () => void; + + protected readonly statusLabel = STATUS_LABEL; + protected readonly statusTone = STATUS_TONE; + + readonly state = signal({ pages: [], server: [] }); + readonly loaded = signal(false); + readonly failed = signal(false); + readonly filter = signal(''); + readonly running = signal(false); + readonly result = signal(''); + readonly confirming = signal<{ name: string; label: string; confirm: string } | null>(null); + + /** Every plugin a page reports or the server has, in name order. */ + readonly pluginIds = computed(() => { + const ids = new Set(); + for (const page of this.state().pages) for (const plugin of page.plugins) ids.add(plugin.id); + for (const plugin of this.state().server) ids.add(plugin.id); + return [...ids].sort((a, b) => this.titleOf(a).localeCompare(this.titleOf(b))); + }); + readonly pluginId = linkedSignal({ + source: () => this.pluginIds(), + computation: (ids, previous) => + previous?.value && ids.includes(previous.value) ? previous.value : (ids[0] ?? null), + }); + /** The pages that run the picked plugin. */ + private readonly pages = computed(() => + this.state().pages.filter((page) => page.plugins.some((p) => p.id === this.pluginId())), + ); + readonly pageId = linkedSignal({ + source: () => this.pages(), + computation: (pages, previous) => { + if (previous?.value && pages.some((page) => page.pageId === previous.value)) { + return previous.value; + } + return ( + pages.find((page) => page.pageId === this.hostPageId)?.pageId ?? pages[0]?.pageId ?? null + ); + }, + }); + readonly pageOptions = computed(() => + this.pages().map((page) => ({ + value: page.pageId, + label: page.title || page.url || page.pageId, + hint: page.url, + })), + ); + readonly entry = computed(() => { + const page = this.pages().find((p) => p.pageId === this.pageId()); + return page?.plugins.find((plugin) => plugin.id === this.pluginId()) ?? null; + }); + readonly server = computed( + () => this.state().server.find((plugin) => plugin.id === this.pluginId()) ?? null, + ); + /** The view's action buttons the page plugin declares. */ + readonly actions = computed(() => { + const plugin = this.entry(); + return (plugin?.view?.actions ?? []).filter((action) => plugin!.actions.includes(action.name)); + }); + readonly actionsAllowed = computed(() => { + const id = this.pluginId(); + return !!id && pluginSwitches(id, panelConfig(this.rpc())).actions; + }); + private readonly counts = computed(() => { + const sections = this.entry()?.view?.sections ?? []; + return sections.reduce( + (sum, section) => { + const { shown, total } = filteredCount(section, this.filter()); + return { shown: sum.shown + shown, total: sum.total + total }; + }, + { shown: 0, total: 0 }, + ); + }); + readonly filterMatches = computed(() => this.counts().shown > 0); + readonly countText = computed(() => { + const { shown, total } = this.counts(); + return total ? `${shown} of ${total} rows and items` : ''; + }); + + constructor() { + effect(() => { + const client = this.rpc(); + if (client) void this.load(client); + }); + this.destroyRef.onDestroy(() => this.unsubscribe?.()); + } + + titleOf(id: string): string { + for (const page of this.state().pages) { + const plugin = page.plugins.find((p) => p.id === id); + if (plugin) return plugin.title || id; + } + return this.state().server.find((plugin) => plugin.id === id)?.title || id; + } + + retry() { + const client = this.rpc(); + if (client) void this.load(client); + } + + ask(action: { name: string; label: string; confirm?: string }) { + if (this.running()) return; + if (action.confirm) { + this.confirming.set({ name: action.name, label: action.label, confirm: action.confirm }); + return; + } + void this.run(action.name); + } + + async run(name: string) { + const client = this.rpc(); + const pluginId = this.pluginId(); + const pageId = this.pageId(); + this.confirming.set(null); + if (!client || !pluginId || !pageId || this.running()) return; + this.running.set(true); + this.result.set(''); + try { + const answer = (await client + .scope('pangular') + .rpc.call( + 'request-plugin-action' as never, + { pageId, pluginId, action: name } as never, + )) as { ok?: boolean; error?: string } | undefined; + this.result.set(answer?.ok ? 'Done.' : (answer?.error ?? 'The action failed.')); + } catch { + this.result.set("The devtools server did not answer. Check that it's still running."); + } finally { + this.running.set(false); + } + } + + private async load(client: DevframeRpcClient) { + this.failed.set(false); + try { + const shared = await client.scope('pangular').rpc.sharedState('plugins'); + if (this.destroyRef.destroyed) return; + const apply = (value: unknown) => this.state.set(pluginsState(value)); + apply(shared.value()); + this.unsubscribe?.(); + this.unsubscribe = shared.on('updated', apply); + } catch { + this.failed.set(true); + } finally { + this.loaded.set(true); + } + } +} diff --git a/app/src/pages/startup-section.ts b/app/src/pages/startup-section.ts new file mode 100644 index 00000000..5d87ed38 --- /dev/null +++ b/app/src/pages/startup-section.ts @@ -0,0 +1,300 @@ +import { Component, DestroyRef, computed, effect, inject, input, signal } from '@angular/core'; +import type { DevframeRpcClient } from 'devframe/client'; + +// Startup timing for the Injectors tab: milestones from navigation start to +// the first stable state, and the slowest providers to construct +// (`startup-timing.ts` and `startup-recorder.ts` in the package). + +export interface PanelProviderTiming { + name: string; + count: number; + ms: number; + selfMs: number; + firstAt: number; +} + +export interface PanelStartupPage { + pageId: string; + url?: string; + reportedAt: number; + angularVersion?: string; + navigation: { domContentLoaded?: number; load?: number; firstContentfulPaint?: number }; + angularStart?: { at: number; source: 'hook' | 'feature-mark' }; + bootstrapComponent?: { start: number; end: number }; + firstStable?: { at: number; exact: boolean }; + overlayStart: number; + hook: boolean; + providers: { + status: 'measured' | 'recording' | 'needs-hook' | 'unavailable'; + note?: string; + count: number; + totalSelfMs: number; + slowest: PanelProviderTiming[]; + }; +} + +interface Milestone { + label: string; + at: number; + source: string; +} + +/** `640 ms` or `1.25 s`. */ +export function formatMs(value: number): string { + return value >= 1000 ? `${(value / 1000).toFixed(2)} s` : `${Math.round(value * 10) / 10} ms`; +} + +/** The milestones of a page, in time order. */ +export function milestones(page: PanelStartupPage): Milestone[] { + const list: Milestone[] = []; + const add = (label: string, at: number | undefined, source: string) => { + if (typeof at === 'number') list.push({ label, at, source }); + }; + add('DOM content loaded', page.navigation.domContentLoaded, 'Navigation timing'); + add('First contentful paint', page.navigation.firstContentfulPaint, 'Paint timing'); + add( + 'Angular started', + page.angularStart?.at, + page.angularStart?.source === 'hook' ? 'Startup hook' : 'First Angular feature mark', + ); + add('Root component created', page.bootstrapComponent?.end, 'Angular profiler'); + add( + page.firstStable?.exact === false ? 'First stable, at the latest' : 'First stable', + page.firstStable?.at, + 'ApplicationRef.isStable', + ); + add('Load event', page.navigation.load, 'Navigation timing'); + add('Overlay started', page.overlayStart, 'Overlay'); + return list.sort((a, b) => a.at - b.at); +} + +/** The pages of the `startup` shared state, newest first. */ +export function startupPages(value: unknown): PanelStartupPage[] { + const pages = (value as { pages?: Record } | undefined)?.pages; + if (!pages || typeof pages !== 'object') return []; + return Object.values(pages) + .filter((page) => page && typeof page.pageId === 'string' && page.providers) + .sort((a, b) => b.reportedAt - a.reportedAt); +} + +const SLOWEST_SHOWN = 10; + +@Component({ + selector: 'app-startup-section', + template: ` + @if (page(); as startup) { +
+

Startup

+

{{ intro() }}

+
+ + + + + + + + + + @for (step of steps(); track step.label) { + + + + + + } + +
MilestoneAtSource
{{ step.label }}{{ format(step.at) }}{{ step.source }}
+
+ +

Slowest providers

+ @switch (startup.providers.status) { + @case ('needs-hook') { +

+ Load @pangular-inspector/devtools/startup-hook from the polyfills of + the development build to time each provider's construction. +

+ } + @case ('unavailable') { +

+ {{ startup.providers.note || 'Provider timing is unavailable on this page.' }} +

+ } + @default { +

+ @if (startup.providers.status === 'recording') { + Recording until one second after the app is first stable. + } + {{ startup.providers.count }} provider instances, + {{ format(startup.providers.totalSelfMs) }} + of construction, from Angular's own profiling. Own time leaves out what each one + created. Components and directives show up too, since Angular creates them through + injectors. +

+ @if (slowest().length) { +
+ + + + + + + + + + + @for (provider of slowest(); track provider.name) { + + + + + + + } + +
ProviderOwn timeTotalInstances
{{ provider.name }}{{ format(provider.selfMs) }}{{ format(provider.ms) }}{{ provider.count }}
+
+ } + } + } +
+ } + `, + styles: ` + @use 'mixins' as m; + :host { + display: block; + } + .startup { + @include m.panel; + display: grid; + gap: 8px; + min-width: 0; + margin-top: 16px; + padding: 12px; + font-size: 13px; + } + h2 { + margin: 0; + color: var(--text-strong); + font-size: 15px; + } + .label { + @include m.label; + margin: 8px 0 0; + } + .intro, + .muted { + margin: 0; + color: var(--text-2); + line-height: 1.5; + } + code, + .mono { + font-family: var(--font-mono); + font-size: 12px; + } + .table-wrap { + max-width: 100%; + overflow-x: auto; + border-radius: var(--radius-sm); + } + .table-wrap:focus-visible { + @include m.focus-ring(-2px); + } + table { + width: 100%; + border-collapse: collapse; + font-size: 12px; + } + th, + td { + padding: 6px 8px; + border-bottom: 1px solid var(--border); + text-align: left; + } + th { + color: var(--text-2); + font-weight: 600; + white-space: nowrap; + } + td { + color: var(--text); + overflow-wrap: anywhere; + } + td.muted { + color: var(--text-2); + } + .num { + font-variant-numeric: tabular-nums; + white-space: nowrap; + } + `, +}) +export class StartupSection { + readonly rpc = input(null); + /** The page the Injectors tab shows; the newest report without one. */ + readonly pageId = input(null); + + private readonly destroyRef = inject(DestroyRef); + private unsubscribe?: () => void; + protected readonly format = formatMs; + + readonly pages = signal([]); + readonly page = computed(() => { + const pages = this.pages(); + const wanted = this.pageId(); + return (wanted ? pages.find((page) => page.pageId === wanted) : undefined) ?? pages[0] ?? null; + }); + readonly steps = computed(() => { + const page = this.page(); + return page ? milestones(page) : []; + }); + readonly slowest = computed(() => this.page()?.providers.slowest.slice(0, SLOWEST_SHOWN) ?? []); + readonly intro = computed(() => { + const page = this.page(); + const version = page?.angularVersion ? ` (Angular ${page.angularVersion})` : ''; + const span = this.total(); + const took = span + ? `: ${span.exact ? '' : 'at most '}${formatMs(span.ms)} from Angular's start to stable` + : ''; + return `From navigation start to the app's first stable state on the live page${version}${took}.`; + }); + /** Angular start to first stable. */ + readonly total = computed(() => { + const page = this.page(); + if (!page?.angularStart || !page.firstStable) return null; + return { + ms: Math.max(0, page.firstStable.at - page.angularStart.at), + exact: page.firstStable.exact, + }; + }); + + constructor() { + effect(() => { + const client = this.rpc(); + if (client) void this.load(client); + }); + this.destroyRef.onDestroy(() => this.unsubscribe?.()); + } + + /** Counts loads, so an answer for an earlier `rpc` client is dropped. */ + private loadId = 0; + + private async load(client: DevframeRpcClient) { + const id = ++this.loadId; + const current = () => !this.destroyRef.destroyed && id === this.loadId && this.rpc() === client; + try { + const shared = await client.scope('pangular').rpc.sharedState('startup'); + if (!current()) return; + const apply = (value: unknown) => this.pages.set(startupPages(value)); + apply(shared.value()); + this.unsubscribe?.(); + this.unsubscribe = shared.on('updated', apply); + } catch { + if (!current()) return; + // The Injectors tab shows its own load error; this section stays hidden. + this.pages.set([]); + } + } +} diff --git a/app/src/pages/tab-icon.ts b/app/src/pages/tab-icon.ts index ec40cae2..15ba18ad 100644 --- a/app/src/pages/tab-icon.ts +++ b/app/src/pages/tab-icon.ts @@ -84,6 +84,11 @@ import { Component, input } from '@angular/core'; } + @case ('plugins') { + + } @case ('analog') { } diff --git a/app/src/types/tab.types.ts b/app/src/types/tab.types.ts index 59858f74..fd930181 100644 --- a/app/src/types/tab.types.ts +++ b/app/src/types/tab.types.ts @@ -13,7 +13,8 @@ export type Tab = | 'analog' | 'capacitor' | 'settings' - | 'errors'; + | 'errors' + | 'plugins'; export type Tabs = { id: Tab; diff --git a/apps/docs/src/content/agents/browser-agents.md b/apps/docs/src/content/agents/browser-agents.md index 0573bc78..b1ab75b0 100644 --- a/apps/docs/src/content/agents/browser-agents.md +++ b/apps/docs/src/content/agents/browser-agents.md @@ -33,6 +33,7 @@ Of the `read` tools, the page registers two kinds. The first answer for one page | `screenshot-component` | A page tool answers with text, not an image, and the capture draws the whole component. | | `highlight` | It draws on the page and changes the selection in open panels. | | `open-in-panel` | It switches the panels that are open. | +| A [server plugin's own tools](./tools.md#plugins) | Their handlers can read every page the plugin sees. | The config decides the rest, as for MCP clients: diff --git a/apps/docs/src/content/agents/resources.md b/apps/docs/src/content/agents/resources.md index edc2f413..61ec233d 100644 --- a/apps/docs/src/content/agents/resources.md +++ b/apps/docs/src/content/agents/resources.md @@ -88,17 +88,20 @@ The HTTP endpoint leaves out the keys of an inspector whose agent tools are hidd This table covers the data that has no resource of its own. -| Key | Content | -| --------------------------- | ----------------------------------------------------------------------- | -| `pangular:http` | The SSR & HTTP timeline, SSR requests, fault rules and hydration data | -| `pangular:http-payloads` | The TransferState payload of each page, by page id | -| `pangular:change-detection` | Change detection recordings, by page id | -| `pangular:pipe-usage` | Live pipe instances and recorded calls | -| `pangular:errors` | Error groups and console calls, by page id | -| `pangular:leaks` | Leak hints: retained instances, open subscriptions, effects, by page id | -| `pangular:audit` | Audit sessions and axe passes: when each was taken, by page id | -| `pangular:analog` | Analog page data and the server call log | -| `pangular:routes` | Declared but not filled. Use `get-routes` or `list-routes` instead. | +| Key | Content | +| --------------------------- | --------------------------------------------------------------------------------------------------------- | +| `pangular:http` | The SSR & HTTP timeline, SSR requests, fault rules and hydration data | +| `pangular:http-payloads` | The TransferState payload of each page, by page id | +| `pangular:change-detection` | Change detection recordings, by page id | +| `pangular:pipe-usage` | Live pipe instances and recorded calls | +| `pangular:errors` | Error groups and console calls, by page id | +| `pangular:leaks` | Leak hints: retained instances, open subscriptions, effects, by page id | +| `pangular:startup` | Startup timing: milestones and the slowest providers, by page id | +| `pangular:plugins` | Plugin views by page id, and the server plugins with their tools. Hidden while any plugin's tools are off | +| `pangular:plugin.` | A server plugin's own state, hidden with that plugin's tools | +| `pangular:audit` | Audit sessions and axe passes: when each was taken, by page id | +| `pangular:analog` | Analog page data and the server call log | +| `pangular:routes` | Declared but not filled. Use `get-routes` or `list-routes` instead. | The list also includes the keys behind the six resources above (`pangular:component-tree`, `pangular:forms`, and so on). diff --git a/apps/docs/src/content/agents/tools.md b/apps/docs/src/content/agents/tools.md index 9cd8c266..eafb83b0 100644 --- a/apps/docs/src/content/agents/tools.md +++ b/apps/docs/src/content/agents/tools.md @@ -4,7 +4,7 @@ description: Every agent tool the devtools expose, grouped by inspector, with wh --- - Eighty-one tools, grouped by inspector. Each one answers a question you would otherwise answer by clicking through the panel. + Eighty-four tools, grouped by inspector. Each one answers a question you would otherwise answer by clicking through the panel. # Tools @@ -53,11 +53,11 @@ The URL comes from the HTTP or router report. A page that sends neither (no rout Gives the user a link that opens the panel on one tab with one item selected, and switches the panels that are open to it. Reads: page. Use it to point the user at what you found. -| Argument | Required | What it is | -| -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tab` | Yes | The tab: `dashboard`, `timeline`, `audit`, `components`, `routes`, `signals`, `injectors`, `store`, `forms`, `pipes`, `network` (SSR & HTTP), `errors`, `analog` or `capacitor`. Only tabs that are on count. | -| `id` | No | The item to select: a component id on `components`, the id of the component whose element injector to show on `injectors`, a form id on `forms`. Other tabs ignore it. | -| `page` | No | The page the item belongs to, from `list-pages`. | +| Argument | Required | What it is | +| -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `tab` | Yes | The tab: `dashboard`, `timeline`, `audit`, `components`, `routes`, `signals`, `injectors`, `store`, `forms`, `pipes`, `network` (SSR & HTTP), `errors`, `analog`, `capacitor` or `plugins`. Only tabs that are on count. | +| `id` | No | The item to select: a component id on `components`, the id of the component whose element injector to show on `injectors`, a form id on `forms`. Other tabs ignore it. | +| `page` | No | The page the item belongs to, from `list-pages`. | The answer is a full URL, such as `http://localhost:4200/__devframes/pangular/#tab=components&id=12&page=k3x9`, when the hub serves the panel and a page has reported its address. Otherwise it is the hash to add to the panel's address. Each panel that is open and not in a background tab opens the link at once. The tool is `read`: it changes what the panel shows, not the app. See [Deep links](../getting-started/popup-and-hub.md#deep-links). @@ -79,7 +79,7 @@ When the hub is mounted, each finished call of an `action` or `destructive` tool ### Turn tools off -The server decides which tools exist. Set `agent.readOnly` to keep only the `read` tools. `change-detection` stays as a `read` tool without its `record`, `flash`, `track` and `angularProfiling` arguments, so it reads a recording the panel started. `hydration` stays as a `read` tool without its `overlay` argument, and `audit` without its `axe` argument, so it reads the last axe pass the panel ran. Set `agent.tools.` to `false` to hide one inspector's tools and resources, and keep its tab. Turning an inspector off with `inspectors`, or blocking an action with `actions`, drops the matching tools too. `actions.router` is the exception: `navigate` stays for `instrument` and `resolve-lazy`, and refuses `navigate`, `abort`, `replay` and `probe`. See [Inspectors and agent tools](../getting-started/configuration.md#inspectors-and-agent-tools). +The server decides which tools exist. Set `agent.readOnly` to keep only the `read` tools. `change-detection` stays as a `read` tool without its `record`, `flash`, `track` and `angularProfiling` arguments, so it reads a recording the panel started. `hydration` stays as a `read` tool without its `overlay` argument, and `audit` without its `axe` argument, so it reads the last axe pass the panel ran. Set `agent.tools.` to `false` to hide one inspector's tools and resources, and keep its tab. Turning an inspector off with `inspectors`, or blocking an action with `actions`, drops the matching tools too. A [plugin's own tools](#plugins) follow the same switches, with the tier the plugin declares. `actions.router` is the exception: `navigate` stays for `instrument` and `resolve-lazy`, and refuses `navigate`, `abort`, `replay` and `probe`. See [Inspectors and agent tools](../getting-started/configuration.md#inspectors-and-agent-tools). ## Source scan @@ -386,6 +386,16 @@ How Angular resolves one token for one component, element or environment injecto The answer is a table of steps: **provides it**, **not provided**, **hidden** (a `viewProviders` entry the lookup can't see), **skipped**, **not asked** or **unknown**. A `providedIn: 'root'` service counts as provided once something on the page got it. When a selector matches several injectors, the answer uses the first and lists the others. Before Angular 16.2 the path is rebuilt from the rendered tree and providers are unknown, and the answer says so. `selector` and `token` take at most 500 characters each. +### startup-timing + +How the running app started, from navigation start: DOM content loaded, first contentful paint, when Angular started, when the root component was created, when the app was first stable, and the slowest providers to construct. Reads: page. See [Startup timing](../inspectors/injectors.md#startup-timing). + +| Argument | Required | Value | +| -------- | -------- | --------------------------------------- | +| `limit` | no | Providers to list, 1 to 50. Default 10. | + +When the overlay or the startup hook saw the app become stable, the time is exact. Otherwise the answer says the app was stable at or before the time the overlay looked. Provider times need the `startup-hook` entry on Angular 20 or later in a development build; without it the answer says how to add it. + ## NgRx Two tools read the live `@ngrx/signals` and `@ngrx/store` state a page reported. Reads: page. @@ -748,6 +758,19 @@ These tools cover *Analog apps. Most read your source. Some also read what the V analog-server-calls and analog-call-api need the Vite plugin. The plugin records the calls and knows the dev server address. +## Plugins + +These tools read the views that [Pangular plugins](../guides/write-a-plugin.md) report from the page. Both read the page. + +| Tool | What it answers | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `list-plugins` | The page plugins each page runs, with version, status and pages, and the server plugins with their tools and tiers. Takes no arguments. | +| `inspect-plugin` | One plugin's view of a page as markdown: its tables, lists, stats and trees, its status, page actions and tools. Takes `plugin` (required, the plugin id) and `limit` (rows, 1-200). | + +### A plugin's own tools + +A server plugin adds tools named `plugin::`, which your client calls as `pangular_plugin__`. Built-in tools never start with `plugin`, so a plugin can't replace one. Each tool is `read` unless the plugin declares `action` or `destructive`, and its answer starts with a note that it comes from the plugin and the page. `agent.readOnly` and `actions.plugins: false` drop the tools that are not `read`. `plugins..tools: false` drops all of one plugin's tools and leaves the plugin out of `list-plugins` and `inspect-plugin`. MCP clients take tool names of up to 64 characters, so the server skips a plugin whose `pangular_plugin__` name is longer. + ## Shared state `devframe_state_read` reads the devtools' live shared state. Call it without arguments to list the keys, then with `key` to read a value as JSON. Over HTTP, it leaves out the keys of an inspector whose agent tools are hidden (`agent.tools.: false`). diff --git a/apps/docs/src/content/contributing/publishing.md b/apps/docs/src/content/contributing/publishing.md index bfc4eca0..e2aef1eb 100644 --- a/apps/docs/src/content/contributing/publishing.md +++ b/apps/docs/src/content/contributing/publishing.md @@ -23,6 +23,8 @@ The package publishes `dist/` and `bin.mjs`. On publish, `publishConfig.exports` | `@pangular-inspector/devtools/overlay` | `dist/overlay.mjs` | | `@pangular-inspector/devtools/overlay-manual` | `dist/overlay-manual.mjs` | | `@pangular-inspector/devtools/capacitor-hook` | `dist/capacitor-hook.mjs` | +| `@pangular-inspector/devtools/startup-hook` | `dist/startup-hook.mjs` | +| `@pangular-inspector/devtools/plugin` | `dist/plugin.mjs` | | `@pangular-inspector/devtools/popup` | `dist/popup.mjs` | | `@pangular-inspector/devtools/http` | `dist/http.mjs` | | `@pangular-inspector/devtools/hub` | `dist/hub.mjs` | diff --git a/apps/docs/src/content/getting-started/configuration.md b/apps/docs/src/content/getting-started/configuration.md index ff1caaf7..d4a0d257 100644 --- a/apps/docs/src/content/getting-started/configuration.md +++ b/apps/docs/src/content/getting-started/configuration.md @@ -100,9 +100,10 @@ type PangularInspector = | 'http' | 'analog' | 'capacitor' - | 'errors'; + | 'errors' + | 'plugins'; -type PangularAction = 'forms' | 'router' | 'ngrx' | 'http' | 'analog' | 'components'; +type PangularAction = 'forms' | 'router' | 'ngrx' | 'http' | 'analog' | 'components' | 'plugins'; interface PangularConfig { inspectors?: Partial>; @@ -124,6 +125,7 @@ interface PangularConfig { idleAfterMs?: number; }; popup?: {hotkey?: string | false}; + plugins?: Record; } ``` @@ -152,6 +154,7 @@ Actions are the writes that the panel and agents make to your app or the server. | `actions.http` | `true` | Editing fault injection rules and SSR overrides, and clearing the HTTP timeline. Drops the `set-http-rule`, `remove-http-rule`, `set-ssr-override` and `remove-ssr-override` agent tools and HTTP clearing in `clear-recordings`. | | `actions.analog` | `true` | The Analog request playground and clearing server calls. Drops the `analog-call-api` agent tool and Analog clearing in `clear-recordings`. | | `actions.components` | `true` | Editing component inputs, properties and writable signals from the **Components** tab. Drops the `set-component-property` and `set-signal` agent tools. | +| `actions.plugins` | `true` | Every plugin's page actions, from the **Plugins** tab and from its tools. Drops the plugin tools that are not `read`. | | `actions` | `true` | All of the above. | Pass `actions: false` to block every action, or an object to block some. Keys you leave out of the object stay on. @@ -226,6 +229,25 @@ const devtools = initPangularHub({ The overlay reads the option from the server when it connects, so the default works until then. With `false`, [passive mode](./settings.md#passive-mode) has no effect and the floating button always shows. +### Plugins + +`inspectors.plugins: false` turns every [Pangular plugin](../guides/write-a-plugin.md) off: the **Plugins** tab, the page plugins, the server plugins' tools and state. `plugins` turns one plugin off, by its id, or only part of it: + +| Option | Default | What `false` turns off | +| ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `plugins.` | `true` | The plugin: the page doesn't run it, and its tools and state are not registered. | +| `plugins..tools` | `true` | The plugin's agent tools, its shared state over HTTP MCP, and the plugin in `list-plugins` and `inspect-plugin` answers. The `pangular:plugins` state, which holds every plugin's view, is hidden from HTTP MCP too. Its view stays in the panel. | +| `plugins..actions` | `true` | The plugin's page actions and its tools that are not `read`. | + +```ts +// src/server.ts +const devtools = initPangularHub({ + plugins: {travel: {actions: false}}, +}); +``` + +The server plugins themselves go in `serverPlugins`, an option of the Express hub, the Vite plugin and `createPangular()`'s host options. It is not part of `PangularConfig`, so the CLI config file doesn't take it. See [Write a plugin](../guides/write-a-plugin.md#add-agent-tools). + ### Terminals `terminals` is an option of the Express hub and the Vite plugin only, next to the access options. It is not part of `PangularConfig`, so `createPangular()` and the CLI config file don't take it. @@ -250,16 +272,18 @@ A value that the server ignores falls back to its default, which is usually the The [Dashboard](../inspectors/dashboard.md#configuration-block) has a **Configuration** block. It lists the options that differ from the defaults, or says **Defaults** when nothing is changed. -| Row | Lists | -| ------------------------- | ---------------------------------------------- | -| **Inspectors off** | Inspectors set to `false`. | -| **Agent** | **Read-only** when `agent.readOnly` is `true`. | -| **Hidden from the agent** | Inspectors whose agent tools are hidden. | -| **Blocked actions** | Actions set to `false`. | -| **Extra secret names** | `redaction.secretNames`. | -| **Unmasked names** | `redaction.unmask`. | -| **Limits** | Limits that differ from the defaults. | -| **Popup shortcut** | `popup.hotkey`, or **Off** when it is `false`. | +| Row | Lists | +| ------------------------------- | ------------------------------------------------- | +| **Inspectors off** | Inspectors set to `false`. | +| **Agent** | **Read-only** when `agent.readOnly` is `true`. | +| **Hidden from the agent** | Inspectors whose agent tools are hidden. | +| **Blocked actions** | Actions set to `false`. | +| **Extra secret names** | `redaction.secretNames`. | +| **Unmasked names** | `redaction.unmask`. | +| **Limits** | Limits that differ from the defaults. | +| **Popup shortcut** | `popup.hotkey`, or **Off** when it is `false`. | +| **Plugins off** | Plugins set to `false` in `plugins`. | +| **Plugin tools or actions off** | Plugins with `tools` or `actions` set to `false`. | ## Where to next diff --git a/apps/docs/src/content/getting-started/installation.md b/apps/docs/src/content/getting-started/installation.md index f51632ce..8fde9d3a 100644 --- a/apps/docs/src/content/getting-started/installation.md +++ b/apps/docs/src/content/getting-started/installation.md @@ -138,6 +138,8 @@ MCP agent support (`@devframes/agentic`) and Devframe itself are included. You d | `@pangular-inspector/devtools/overlay` | The browser script that collects live data from your page. | | `@pangular-inspector/devtools/overlay-manual` | The same script, started only when you call `initOverlay`. See [Set up Capacitor](../guides/capacitor.md). | | `@pangular-inspector/devtools/capacitor-hook` | Logs Capacitor plugin calls from app start. See [Capacitor](../inspectors/capacitor.md#web-calls). | +| `@pangular-inspector/devtools/startup-hook` | Times provider construction at startup. See [Injectors](../inspectors/injectors.md#startup-timing). | +| `@pangular-inspector/devtools/plugin` | The plugin API for a library's own tab and agent tools. See [Write a plugin](../guides/write-a-plugin.md). | | `@pangular-inspector/devtools/overlay-angular-native` | The overlay for an Angular Native app. See [Angular Native](./angular-native.md). | | `@pangular-inspector/devtools/overlay-nativescript` | The overlay for a NativeScript Angular app. See [NativeScript](./nativescript.md). | | `@pangular-inspector/devtools/popup` | The floating button and panel on your page. | diff --git a/apps/docs/src/content/guides/write-a-plugin.md b/apps/docs/src/content/guides/write-a-plugin.md new file mode 100644 index 00000000..7fa392c1 --- /dev/null +++ b/apps/docs/src/content/guides/write-a-plugin.md @@ -0,0 +1,321 @@ +--- +title: Write a plugin +description: Give a library its own tab in the panel and its own agent tools with the Pangular plugin API. +--- + + + Report what your library knows from the running page, and the panel shows it in a Plugins tab while agents read it over MCP. + + +# Write a plugin + +A Pangular plugin lets a library, such as a store add-on or a query cache, show its own state next to the built-in inspectors. The plugin API is the `@pangular-inspector/devtools/plugin` entry point, version 1. + +A plugin has up to two parts: + + + + Runs in the app. It returns a view made of tables, lists, stats and key and value trees, and can declare page actions. The panel renders the view in the Plugins tab. + + + Runs in the devtools server. It adds agent tools, named under the plugin id, and its own shared state. + + + +The demo app ships an example plugin for its `TravelStore`: `src/app/devtools/travel-plugin.ts` for the page and `src/app/devtools/travel-plugin.server.ts` for the server. This guide builds it step by step. + +## Write the page plugin + + + + Write a function that reads your library's state and returns a PluginView: a summary line, badges and sections. + + + Give it an id, a version and a collect function that returns the view. + + + Call registerPangularPlugin() once the state exists. The overlay picks the plugin up whether it loads before or after. + + + +### Describe the view + +A view lists sections. Each section has a `kind` and a `title`: + +```ts +// src/app/devtools/travel-plugin.ts +import type {PangularPagePlugin, PluginView} from '@pangular-inspector/devtools/plugin'; + +export interface TravelBooking { + id: string; + destinationName: string; + startDate: string; + travelers: number; + total: number; + email: string; +} + +export interface TravelSource { + bookings(): readonly TravelBooking[]; + saved(): readonly string[]; + recentQueries(): readonly string[]; + filters(): {query: string; region: string; sort: string}; + unsaveAll(): void; +} + +export function travelView(source: TravelSource): PluginView { + const bookings = source.bookings(); + const saved = source.saved(); + return { + summary: `${bookings.length} bookings, ${saved.length} saved destinations`, + sections: [ + { + kind: 'stats', + title: 'Totals', + items: [ + {label: 'Bookings', value: bookings.length}, + {label: 'Saved', value: saved.length, tone: saved.length ? 'ok' : 'neutral'}, + ], + }, + { + kind: 'table', + title: 'Bookings', + columns: [ + {key: 'id', label: 'Booking'}, + {key: 'destination', label: 'Destination'}, + {key: 'email', label: 'Email'}, + ], + rows: bookings.map((booking) => ({ + id: booking.id, + destination: booking.destinationName, + email: booking.email, + })), + empty: 'No bookings yet.', + }, + {kind: 'tree', title: 'Filters', value: source.filters()}, + ], + actions: saved.length + ? [ + { + name: 'unsave-all', + label: 'Clear saved destinations', + confirm: 'Remove every saved destination from the store?', + }, + ] + : [], + }; +} +``` + +Write the plugin against a small interface like `TravelSource` rather than your store, so a test can drive it without Angular. + +### Define the plugin + +```ts +// src/app/devtools/travel-plugin.ts +export function travelPlugin(source: TravelSource): PangularPagePlugin { + return { + id: 'travel', + version: '1.0.0', + title: 'Travel store', + description: 'Bookings, saved destinations and searches from the demo TravelStore.', + collect: () => travelView(source), + actions: { + 'unsave-all': () => { + const removed = source.saved().length; + source.unsaveAll(); + return {removed}; + }, + }, + }; +} +``` + +`collect` runs after Angular updates the page, while a panel is open or an agent asked within the last minute (`limits.idleAfterMs`). To report on your own schedule, such as when your store changes, call `ctx.push(view)` from `setup` instead. + +### Register it in development + +```ts +// src/app/devtools/travel-plugin.provider.ts +import {isPlatformBrowser} from '@angular/common'; +import {DestroyRef, PLATFORM_ID, inject, provideAppInitializer} from '@angular/core'; +import {registerPangularPlugin} from '@pangular-inspector/devtools/plugin'; +import {TravelStore} from '../travel/travel.store'; +import {travelPlugin} from './travel-plugin'; + +export function provideTravelPangularPlugin() { + return provideAppInitializer(() => { + if (typeof ngDevMode !== 'undefined' && !ngDevMode) return; + if (!isPlatformBrowser(inject(PLATFORM_ID))) return; + const store = inject(TravelStore); + const unregister = registerPangularPlugin( + travelPlugin({ + bookings: () => store.bookings(), + saved: () => store.saved(), + recentQueries: () => store.recentQueries(), + filters: () => ({query: store.query(), region: store.region(), sort: store.sort()}), + unsaveAll: () => { + for (const id of store.saved()) store.toggleSaved(id); + }, + }), + ); + inject(DestroyRef).onDestroy(unregister); + }); +} +``` + +Add `provideTravelPangularPlugin()` to the app's providers. Registering the same id again replaces the plugin, as a hot reload does. The **Plugins** tab appears in the panel once a page reports a plugin. + +## Sections + +| `kind` | Fields | The panel shows | +| ------- | -------------------------------------------------------------------- | ----------------------------------------------------------------- | +| `stats` | `items`: `label`, `value`, optional `tone` | A grid of numbers with labels. | +| `table` | `columns` (`key`, `label`), `rows` keyed by column, optional `empty` | A table. A cell is text, a number, or `{text, tone}` for a badge. | +| `list` | `items`: `label`, optional `detail` and `badge`, optional `empty` | A list with badges. | +| `tree` | `value` | A key and value tree, folded past the first level. | +| `text` | `text` | A paragraph. | + +A tone is `ok`, `warn`, `danger`, `accent` or `neutral`, and maps to the panel's own status colors. The view also takes a `summary` line, `badges` and `actions`. The search box in the **Plugins** tab filters table rows and list items. + +The panel renders each view with its own components, and every value is text. A plugin never runs code in the panel, so a library can't style the panel, read other tabs or reach the devtools server through it. + +## Add page actions + +A page action changes the app, so the devtools treat it like the built-in [actions](../getting-started/configuration.md#actions): + +- The page plugin declares it in `actions`, a map of name to function. The function gets the arguments and the plugin context. +- The view lists the ones the panel shows as buttons in `actions`. `confirm` asks before running it. +- `actions.plugins: false` or `plugins..actions: false` blocks it on the server and on the page. + +Action names are lowercase letters, digits and dashes. `registerPangularPlugin()` prints a `[pangular]` warning for any other name and drops that action. An action runs for up to 10 seconds by default. A server tool sets another limit with `timeoutMs` in `runPageAction`, up to 30 seconds. The page stops waiting after that time and answers with a timeout. A plugin that needs a later plugin API offers no actions. + +## Add agent tools + +A server plugin adds agent tools over what the page plugin reports: + +```ts +// src/app/devtools/travel-plugin.server.ts +import {definePangularServerPlugin} from '@pangular-inspector/devtools/plugin'; + +export const travelServerPlugin = definePangularServerPlugin({ + id: 'travel', + version: '1.0.0', + title: 'Travel store', + tools: [ + { + name: 'bookings', + description: "The demo TravelStore's bookings on the running page.", + handler: (args, ctx) => { + const page = ctx.page(typeof args['page'] === 'string' ? args['page'] : undefined); + if (!page?.view) return 'No page runs the travel plugin.'; + return ctx.markdown(page.view); + }, + }, + { + name: 'clear-saved', + safety: 'action', + description: 'Remove every saved destination from the TravelStore on the running page.', + handler: async (args, ctx) => { + const result = await ctx.runPageAction('unsave-all'); + return result.ok ? `Removed on page ${result.pageId}.` : (result.error ?? 'Failed.'); + }, + }, + ], +}); +``` + +Pass it to the hub, or to the Vite plugin as the same option: + +```ts {7} +// src/server.ts +import {initPangularHub} from '@pangular-inspector/devtools/hub'; +import {travelServerPlugin} from './app/devtools/travel-plugin.server'; + +const devtools = initPangularHub({ + browserDistFolder, + serverPlugins: [travelServerPlugin], +}); +``` + +The tools above register as `pangular:plugin:travel:bookings` and `pangular:plugin:travel:clear-saved`. MCP clients call them `pangular_plugin_travel_bookings` and `pangular_plugin_travel_clear-saved`. Built-in tools never start with `plugin`, so a plugin tool can't shadow one, and the server skips a second plugin with the same id. + +MCP clients take tool names of up to 64 characters. The plugin id and the tool name together can be at most 47 characters, so `pangular_plugin__` fits. The server skips a plugin with a longer one and prints a `[pangular]` warning. + +| Tier | What it may do | Dropped by | +| ----------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | +| `read` (the default) | Read page reports and its own state. | `plugins..tools: false` | +| `action`, `destructive` | Also run page actions with `ctx.runPageAction()`. | `agent.readOnly`, `actions.plugins: false`, `plugins..actions: false` | + +A `read` tool that calls `runPageAction` gets a refusal instead. Every answer starts with a note that it comes from the plugin and the page, so agents treat it as data. + +## API reference + +### registerPangularPlugin + +`registerPangularPlugin(plugin: PangularPagePlugin): () => void` adds a page plugin to a global registry and returns a function that removes it. It throws for an id that is not lowercase letters, digits and dashes, starting with a letter. It prints a warning for an action name that isn't, and drops that action. The registry is shared by every copy of the entry point, so a library can bundle its own. + +| `PangularPagePlugin` field | Required | What it is | +| -------------------------- | -------- | ---------------------------------------------------------------------------------------- | +| `id` | yes | The plugin id, up to 40 characters. | +| `version` | yes | The plugin's own version, shown in the panel. | +| `apiVersion` | no | The plugin API it needs. Defaults to 1. A later one shows as **Needs a newer Pangular**. | +| `title`, `description` | no | The name and the line under it in the panel. | +| `setup(ctx)` | no | Runs once when the overlay starts the plugin. Return a cleanup function. | +| `collect(ctx)` | no | Returns the view, or `null` for none. | +| `actions` | no | Page actions by name: `(args, ctx) => result`. | + +### The page context + +| `PangularPluginContext` member | What it is | +| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `pageId` | The id every report from this page carries. | +| `apiVersion` | The plugin API the overlay runs. | +| `active` | Whether a panel or an agent is watching. `collect` runs only while it is. | +| `getNg()` | Angular's debug API (`window.ng`) in a development build, or `undefined`. | +| `push(view)` | Sends a view about 50 ms later, so a burst sends once. An unchanged view is skipped. While nobody watches, the view goes out once someone does. | +| `refresh()` | Asks for a `collect`. It runs while someone watches, at most once a second. | +| `serialize(value, limits?)` | Limits depth and size and masks secret-looking names, JWTs and bearer tokens. | +| `redact(text)` | Masks credentials, JWTs, bearer tokens and secret `key=value` pairs in a text. | +| `isSecretName(name)` | Whether a field name looks secret under the [redaction](../getting-started/configuration.md#redaction) options. | + +### definePangularServerPlugin + +`definePangularServerPlugin(plugin)` returns the plugin unchanged, with its types. The server checks it when it starts and prints a `[pangular]` warning for one it skips. + +| `PangularServerPlugin` field | Required | What it is | +| ---------------------------- | -------- | ----------------------------------------------------------------------- | +| `id`, `version` | yes | The same id as the page plugin, and the plugin's version. | +| `tools` | no | Agent tools: `name`, `description`, `inputSchema`, `safety`, `handler`. | +| `state` | no | `{initialValue}` for the plugin's shared state. | +| `setup(ctx)` | no | Runs once when the server starts. Return a cleanup function. | + +| Server context member | What it is | +| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | +| `pages()` | The pages that run the plugin, newest report first, with `pageId`, `url`, `reportedAt`, `version` and `view`. | +| `page(pageId?)` | One page, or the newest. | +| `state.get()`, `state.set(value)` | The shared state `pangular:plugin.`, masked like other values. Agents read it while the plugin's tools are on. | +| `markdown(view)` | A view as markdown, as `inspect-plugin` writes it. | +| `serialize`, `redact` | The same helpers as on the page. | +| `runPageAction(name, args?, {page, timeoutMs})` | In tools that are not `read`: runs a page action and resolves with `{ok, pageId, result, error}`. | + +## What the devtools take care of + +| Concern | How | +| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Redaction | The page and the server run every view through `serialize()`, so `redaction.secretNames`, JWTs and bearer tokens are masked. | +| Pages | Each report carries the page id. The server keeps one entry per page, drops it 15 seconds after the last report, and forgets it when the tab closes. | +| Cost | `collect` runs while someone watches, at most once a second for page updates and `refresh()`. It also runs right away for the first report, even while nobody watches, and when someone starts watching. While someone watches, a finished page action or a plugin registering runs it right away too. An unchanged report is skipped, and a keepalive keeps an idle page listed. | +| Size | Up to 20 sections, 12 columns, 200 rows or items per section, and 2,000 characters per text. Unknown section kinds are dropped. | +| Failures | A plugin that throws shows as **Failed** with its message. The other plugins keep running. | +| Switches | `inspectors.plugins` and `plugins.` turn plugins off. See [Plugins](../getting-started/configuration.md#plugins). | + +Agents read plugin views with [`list-plugins` and `inspect-plugin`](../agents/tools.md#plugins). + +## Where to next + + + + + + diff --git a/apps/docs/src/content/inspectors/injectors.md b/apps/docs/src/content/inspectors/injectors.md index f0a8b180..a6e1bca8 100644 --- a/apps/docs/src/content/inspectors/injectors.md +++ b/apps/docs/src/content/inspectors/injectors.md @@ -105,6 +105,37 @@ Without a live tree, the tab lists DI found in your source files, in four groups If the devtools server does not answer, the tab says **Couldn't load DI data** with a **Retry** button instead of an empty list. If only the live tree fails, the source list stays and a **Couldn't load the live injector tree** message with **Retry** sits above it. +### Startup timing + +Below the live tree, the **Startup** section shows how the shown page started, from navigation start, and how long Angular took from its start to the app's first stable state. + +| Milestone | Where it comes from | +| -------------------------- | ---------------------------------------------------------------------------------------------------------- | +| **DOM content loaded** | The browser's navigation timing. | +| **First contentful paint** | The browser's paint timing. | +| **Angular started** | When Angular published `ng`, with the startup hook. Without it, Angular's first `mark_feature_usage` mark. | +| **Root component created** | Angular's profiler, with the startup hook on Angular 20 or later. | +| **First stable** | The first time `ApplicationRef.isStable` was `true`. | +| **Load event** | The browser's navigation timing. | +| **Overlay started** | When the overlay ran on the page. | + +The first stable time is exact when the overlay or the startup hook watched the app become stable. Sometimes the overlay loads after that, as when `main.ts` imports it after `whenStable()`. The overlay then checks an app that is already stable, so it knows only that the app became stable before this time. The row reads **First stable, at the latest**. + +**Slowest providers** lists the providers that took longest to construct, by own time (without the providers each one created while it ran), with total time and instance count. Components and directives show up in it too, since Angular creates them through injectors. Angular reports provider construction only through its own profiling (`ng.enableProfiling()`, Angular 20 or later, development builds), so this list needs the startup hook loaded before Angular, from the polyfills of your development build. A configuration's `polyfills` replaces the build target's list, so repeat the polyfills the target already has and add the hook after them: + +```json +// angular.json (or project.json), build target +"configurations": { + "development": { + "polyfills": ["zone.js", "@pangular-inspector/devtools/startup-hook"] + } +} +``` + +A zoneless app has no `zone.js` in its polyfills, so it lists only the hook (and any other polyfills it has). + +The hook turns Angular's profiling on right after `bootstrapApplication()` creates the platform and reads its provider entries until one second after the app is first stable, then turns it off. Providers created by environment initializers before that point are not timed. Angular's own track shows in the Chrome Performance panel while the hook records. + ## Where the data comes from @@ -184,6 +215,7 @@ If the selected injector leaves the page because its component or directive was | `pangular:get-providers` | tool | DI providers from source: `@Injectable` services, `inject()` calls, constructor parameters and `providers` arrays. | | `pangular:explain-injection` | tool | The lookup of one token from a component, element or environment injector, step by step, with `self`, `skipSelf`, `host` and `optional`. Says at each injector whether it provides the token and why the lookup stops. See [Explain a lookup with flags](#explain-a-lookup-with-flags). | | `pangular:inspect-providers` | tool | The injector tree a page reported, with what components and created services inject. `selector` narrows it to matching element or environment injectors (`Root`, `Platform`, `Route: admin`) or a component instance id, `token` to where a token is provided and injected. `componentId` and `framework` mark the owning component and Angular's own injectors and providers. | +| `pangular:startup-timing` | tool | How the page started: milestones from navigation start to the first stable state, and the slowest providers to construct with own and total time. See [Startup timing](#startup-timing). | | `pangular:injector-tree` | resource | The live tree last reported by a page. | See [Tools](../agents/tools.md) and [Resources](../agents/resources.md). diff --git a/apps/docs/src/ngmd.config.ts b/apps/docs/src/ngmd.config.ts index a2725ffd..b6016158 100644 --- a/apps/docs/src/ngmd.config.ts +++ b/apps/docs/src/ngmd.config.ts @@ -231,6 +231,7 @@ const config: NgmdConfig = { {label: 'Set up NativeScript', href: '/guides/nativescript'}, {label: 'Set up Angular Native', href: '/guides/angular-native'}, {label: 'Set up Capacitor', href: '/guides/capacitor', status: 'new'}, + {label: 'Write a plugin', href: '/guides/write-a-plugin', status: 'new'}, {label: 'Inspect, fix and verify', href: '/guides/inspect-fix-verify', status: 'new'}, ], }, diff --git a/docs/CONTEXT.md b/docs/CONTEXT.md index 61ef75aa..d17dcf8f 100644 --- a/docs/CONTEXT.md +++ b/docs/CONTEXT.md @@ -41,8 +41,12 @@ A report a collector sends to the server over RPC, such as `push-component-tree` _Avoid_: sync, upload, post **Inspector**: -One area the devtools can look at: `components`, `injectors`, `signals`, `ngrx`, `forms`, `router`, `pipes`, `http`, `analog` and `capacitor` (`PANGULAR_INSPECTORS` in `config.ts`). An inspector owns a collector, its RPC functions, its agent tools and its view in the panel, and `inspectors` in the config turns all of them off together. -_Avoid_: plugin, module, feature +One area the devtools can look at: `components`, `injectors`, `signals`, `ngrx`, `forms`, `router`, `pipes`, `http`, `analog`, `capacitor`, `errors` and `plugins` (`PANGULAR_INSPECTORS` in `config.ts`). An inspector owns a collector, its RPC functions, its agent tools and its view in the panel, and `inspectors` in the config turns all of them off together. +_Avoid_: plugin (a Pangular plugin is a library's own view), module, feature + +**Pangular plugin**: +A library's own view in the panel and its own agent tools, through the public plugin API (`@pangular-inspector/devtools/plugin`). The page plugin, registered with `registerPangularPlugin()`, returns a declarative view (tables, lists, stats, trees) that the Plugins tab renders; the server plugin, passed as `serverPlugins`, adds tools named `pangular:plugin::` and the shared state `pangular:plugin.`. The `plugins` inspector runs them, and `plugins.` in the config turns one off. +_Avoid_: extension (the Chrome extension), add-on, inspector **Devframe**: The framework the devtools are built on (`devframe`). One definition, `packages/devtools/src/devframe.ts`, declares the RPC functions, shared state and agent tools, and Devframe serves it as the embedded panel, the standalone CLI, the static report and the MCP server. diff --git a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-85BPnAAT.js b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-DI-HhtpW.js similarity index 93% rename from extension/ui/assets/browser-agent-rpc-BXhoSh1z-85BPnAAT.js rename to extension/ui/assets/browser-agent-rpc-BXhoSh1z-DI-HhtpW.js index 5ae3f4bf..de952ac7 100644 --- a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-85BPnAAT.js +++ b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-DI-HhtpW.js @@ -1 +1 @@ -import{t as e}from"./index-IFTmL_6d.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge}; \ No newline at end of file +import{t as e}from"./index-BneRB3AE.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge}; \ No newline at end of file diff --git a/extension/ui/assets/index-IFTmL_6d.js b/extension/ui/assets/index-BneRB3AE.js similarity index 74% rename from extension/ui/assets/index-IFTmL_6d.js rename to extension/ui/assets/index-BneRB3AE.js index 04dc92e9..a139e8b1 100644 --- a/extension/ui/assets/index-IFTmL_6d.js +++ b/extension/ui/assets/index-BneRB3AE.js @@ -3,12 +3,12 @@ \r \v ᠎ - \u2028\u2029   `;`${nn}`,`${nn}`;var rn=(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})(rn||{}),an=(function(e){return e[e.Plain=0]=`Plain`,e[e.TemplateLiteralPart=1]=`TemplateLiteralPart`,e[e.TemplateLiteralEnd=2]=`TemplateLiteralEnd`,e})(an||{});rn.Character,x.StyleMap,x.ClassMap,x.StyleProp,x.ClassProp,x.Attribute,x.Property,x.Attribute,x.Control,x.DomProperty,x.DomProperty,x.Attribute,x.StyleMap,x.ClassMap,x.StyleProp,x.ClassProp,x.Listener,x.TwoWayListener,x.AnimationListener,x.StyleMap,x.ClassMap,x.StyleProp,x.ClassProp,x.Property,x.TwoWayProperty,x.DomProperty,x.Attribute,x.Animation,x.Control,Zt.Idle,b.deferOnIdle,b.deferPrefetchOnIdle,b.deferHydrateOnIdle,Zt.Immediate,b.deferOnImmediate,b.deferPrefetchOnImmediate,b.deferHydrateOnImmediate,Zt.Timer,b.deferOnTimer,b.deferPrefetchOnTimer,b.deferHydrateOnTimer,Zt.Hover,b.deferOnHover,b.deferPrefetchOnHover,b.deferHydrateOnHover,Zt.Interaction,b.deferOnInteraction,b.deferPrefetchOnInteraction,b.deferHydrateOnInteraction,Zt.Viewport,b.deferOnViewport,b.deferPrefetchOnViewport,b.deferHydrateOnViewport,Zt.Never,b.deferHydrateNever,b.deferHydrateNever,b.deferHydrateNever,b.pipeBind1,b.pipeBind2,b.pipeBind3,b.pipeBind4,b.textInterpolate,b.textInterpolate1,b.textInterpolate2,b.textInterpolate3,b.textInterpolate4,b.textInterpolate5,b.textInterpolate6,b.textInterpolate7,b.textInterpolate8,b.textInterpolateV,b.interpolate,b.interpolate1,b.interpolate2,b.interpolate3,b.interpolate4,b.interpolate5,b.interpolate6,b.interpolate7,b.interpolate8,b.interpolateV,b.pureFunction0,b.pureFunction1,b.pureFunction2,b.pureFunction3,b.pureFunction4,b.pureFunction5,b.pureFunction6,b.pureFunction7,b.pureFunction8,b.pureFunctionV,b.resolveWindow,b.resolveDocument,b.resolveBody,it.HTML,b.sanitizeHtml,it.RESOURCE_URL,b.sanitizeResourceUrl,it.SCRIPT,b.sanitizeScript,it.STYLE,b.sanitizeStyle,it.URL,b.sanitizeUrl,it.ATTRIBUTE_NO_BINDING,b.validateAttribute,it.HTML,b.trustConstantHtml,it.RESOURCE_URL,b.trustConstantResourceUrl;var on=(function(e){return e[e.None=0]=`None`,e[e.ViewContextRead=1]=`ViewContextRead`,e[e.ViewContextWrite=2]=`ViewContextWrite`,e[e.SideEffectful=4]=`SideEffectful`,e})(on||{});S.Tmpl,S.Tmpl,S.Both,S.Host,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Both,S.Both,S.Tmpl,S.Both,S.Both,S.Tmpl,S.Both,S.Tmpl,S.Both,S.Both,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Both,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Both,S.Both,S.Tmpl,S.Tmpl,S.Both,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Both,S.Tmpl,S.Both,S.Both,S.Both,S.Both,S.Both,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Tmpl,S.Both,S.Tmpl,S.Both,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Both,S.Both,Ft.Property,Kt.Property,Ft.TwoWay,Kt.TwoWayProperty,Ft.Attribute,Kt.Attribute,Ft.Class,Kt.ClassName,Ft.Style,Kt.StyleProperty,Ft.LegacyAnimation,Kt.LegacyAnimation,Ft.Animation,Kt.Animation;var sn=`%COMP%`;`${sn}`,`${sn}`,class e{static SINGLETON=new e;static veWillInferAnyFor(t){let n=e.SINGLETON;return t instanceof Pt?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 cn=null,ln=!1,un=1,dn=null,fn=Symbol(`SIGNAL`);function pn(e){let t=cn;return cn=e,t}function mn(){return cn}var hn={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 gn(e){if(ln)throw Error(``);if(cn===null)return;cn.consumerOnSignalRead(e);let t=cn.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=cn.recomputing;if(r&&(n=t===void 0?cn.producers:t.nextProducer,n!==void 0&&n.producer===e)){cn.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=un;return}let i=e.consumersTail;if(i!==void 0&&i.consumer===cn&&(!r||i.knownValidAtEpoch===un))return;let a=jn(cn),o={producer:e,consumer:cn,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:un,lastReadVersion:e.version,nextConsumer:void 0};cn.producersTail=o,t===void 0?cn.producers=o:t.nextProducer=o,a&&kn(e,o)}function _n(){un++}function vn(e){if((!jn(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==un)){if(!e.producerMustRecompute(e)&&!Dn(e)){Sn(e);return}e.producerRecomputeValue(e),Sn(e)}}function yn(e){if(e.consumers===void 0)return;let t=ln;ln=!0;try{for(let t=e.consumers;t!==void 0;t=t.nextConsumer){let e=t.consumer;e.dirty||xn(e)}}finally{ln=t}}function bn(){return cn?.consumerAllowSignalWrites!==!1}function xn(e){e.dirty=!0,yn(e),e.consumerMarkedDirty?.(e)}function Sn(e){e.dirty=!1,e.lastCleanEpoch=un}function Cn(e){return e&&wn(e),pn(e)}function wn(e){if(e.producersTail?.knownValidAtEpoch===un){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function Tn(e,t){pn(t),e&&En(e)}function En(e){e.recomputing=!1;let t=e.producersTail,n=t===void 0?e.producers:t.nextProducer;if(n!==void 0){if(jn(e))do n=An(n);while(n!==void 0);t===void 0?e.producers=void 0:t.nextProducer=void 0}}function Dn(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let e=t.producer,n=t.lastReadVersion;if(n!==e.version||(vn(e),n!==e.version))return!0}return!1}function On(e){if(jn(e)){let t=e.producers;for(;t!==void 0;)t=An(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function kn(e,t){let n=e.consumersTail,r=jn(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)kn(t.producer,t)}function An(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,!jn(t)){let e=t.producers;for(;e!==void 0;)e=An(e)}return n}function jn(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function Mn(e){dn?.(e)}function Nn(e,t){return Object.is(e,t)}function Pn(e,t){let n=Object.create(Rn);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(vn(n),gn(n),n.value===Ln)throw n.error;return n.value};return r[fn]=n,Mn(n),r}var Fn=Symbol(`UNSET`),In=Symbol(`COMPUTING`),Ln=Symbol(`ERRORED`),Rn={...hn,value:Fn,dirty:!0,error:null,equal:Nn,kind:`computed`,producerMustRecompute(e){return e.value===Fn||e.value===In},producerRecomputeValue(e){if(e.value===In)throw Error(``);let t=e.value;e.value=In;let n=Cn(e),r,i=!1;try{r=e.computation(),pn(null),i=t!==Fn&&t!==Ln&&r!==Ln&&e.equal(t,r)}catch(t){r=Ln,e.error=t}finally{Tn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function zn(){throw Error()}var Bn=zn;function Vn(e){Bn(e)}function Hn(e){Bn=e}var Un=null;function Wn(e,t){let n=Object.create(Jn);n.value=e,t!==void 0&&(n.equal=t);let r=()=>Gn(n);return r[fn]=n,Mn(n),[r,e=>Kn(n,e),e=>qn(n,e)]}function Gn(e){return gn(e),e.value}function Kn(e,t){bn()||Vn(e),e.equal(e.value,t)||(e.value=t,Yn(e))}function qn(e,t){bn()||Vn(e),Kn(e,t(e.value))}var Jn={...hn,equal:Nn,value:void 0,kind:`signal`};function Yn(e){e.version++,_n(),yn(e),Un?.(e)}var Xn={...hn,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:`effect`};function Zn(e){if(e.dirty=!1,e.version>0&&!Dn(e))return;e.version++;let t=Cn(e);try{e.cleanup(),e.fn()}finally{Tn(e,t)}}var Qn=void 0;function $n(){return Qn}function er(e){let t=Qn;return Qn=e,t}var tr=Symbol(`NotFound`);function nr(e){return e===tr||e?.name===`ɵNotFound`}function rr(e,t,n){let r=Object.create(or);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(vn(r),gn(r),r.value===Ln)throw r.error;return r.value};return i[fn]=r,Mn(r),i}function ir(e,t){vn(e),Kn(e,t),Sn(e)}function ar(e,t){if(vn(e),e.value===Ln)throw e.error;qn(e,t),Sn(e)}var or={...hn,value:Fn,dirty:!0,error:null,equal:Nn,kind:`linkedSignal`,producerMustRecompute(e){return e.value===Fn||e.value===In},producerRecomputeValue(e){if(e.value===In)throw Error(``);let t=e.value;e.value=In;let n=Cn(e),r,i=!1;try{let n=e.source(),a=t!==Fn&&t!==Ln,o=a?{source:e.sourceValue,value:t}:void 0;r=e.computation(n,o),e.sourceValue=n,pn(null),i=a&&r!==Ln&&e.equal(t,r)}catch(t){r=Ln,e.error=t}finally{Tn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function sr(e){let t=pn(null);try{return e()}finally{pn(t)}}var cr=function(e,t){return cr=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])},cr(e,t)};function lr(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);cr(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function ur(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function dr(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 fr(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?vr:(this.currentObservers=null,a.push(e),new _r(function(){t.currentObservers=null,gr(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 Wr;return e.source=this,e},t.create=function(e,t){return new ei(e,t)},t}(Wr),ei=function(e){lr(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)??vr},t}($r),ti=function(e){lr(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}($r);function ni(e,t){return Yr(function(n,r){var i=0;n.subscribe(Xr(r,function(n){r.next(e.call(t,n,i++))}))})}var ri=`https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss`,ii=class extends Error{code;constructor(e,t){super(oi(e,t)),this.code=e}};function ai(e){return`NG0${Math.abs(e)}`}function oi(e,t){return`${ai(e)}${t?`: `+t:``}`}function si(e){for(let t in e)if(e[t]===si)return t;throw Error(``)}function ci(e){if(typeof e==`string`)return e;if(Array.isArray(e))return`[${e.map(ci).join(`, `)}]`;if(e==null)return``+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return``+n;let r=n.indexOf(` -`);return r>=0?n.slice(0,r):n}function li(e,t){return e?t?`${e} ${t}`:e:t||``}var ui=si({__forward_ref__:si});function di(e){return e.__forward_ref__=di,e}function fi(e){return pi(e)?e():e}function pi(e){return typeof e==`function`&&Object.hasOwn(e,ui)&&e.__forward_ref__===di}function mi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function hi(e){return gi(e,yi)}function gi(e,t){return Object.hasOwn(e,t)&&e[t]||null}function _i(e){return(e?.[yi]??null)||null}function vi(e){return e&&Object.hasOwn(e,bi)?e[bi]:null}var yi=si({ɵprov:si}),bi=si({ɵinj:si}),xi=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=mi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Si(e){return e&&!!e.ɵproviders}var Ci=si({ɵcmp:si}),wi=si({ɵdir:si}),Ti=si({ɵpipe:si}),Ei=si({ɵfac:si}),Di=si({__NG_ELEMENT_ID__:si}),Oi=si({__NG_ENV_ID__:si});function ki(e){return Mi(e,`@Component`),e[Ci]||null}function Ai(e){return Mi(e,`@Directive`),e[wi]||null}function ji(e){return Mi(e,`@Pipe`),e[Ti]||null}function Mi(e,t){if(e==null)throw new ii(-919,!1)}function Ni(e){return typeof e==`string`?e:e==null?``:String(e)}var Pi=si({ngErrorCode:si}),Fi=si({ngErrorMessage:si}),Ii=si({ngTokenPath:si});function Li(e,t){return zi(``,-200,t)}function Ri(e,t){throw new ii(-201,!1)}function zi(e,t,n){let r=new ii(t,e);return r[Pi]=t,r[Fi]=e,n&&(r[Ii]=n),r}function Bi(e){return e[Pi]}var Vi;function Hi(){return Vi}function Ui(e){let t=Vi;return Vi=e,t}function Wi(e,t,n){let r=hi(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;Ri(e,``)}var Gi=globalThis,Ki={},qi=`__NG_DI_FLAG__`,Ji=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=Zi(t)||0;try{return this.injector.get(e,n&8?null:Ki,n)}catch(e){if(nr(e))return e;throw e}}};function Yi(e,t=0){let n=$n();if(n===void 0)throw new ii(-203,!1);if(n===null)return Wi(e,void 0,t);{let r=Qi(t),i=n.retrieve(e,r);if(nr(i)){if(r.optional)return null;throw i}return i}}function Xi(e,t=0){return(Hi()||Yi)(fi(e),t)}function C(e,t){return Xi(e,Zi(t))}function Zi(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Qi(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function $i(e){let t=[];for(let n=0;nArray.isArray(e)?ia(e,t):t(e))}function aa(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function oa(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function sa(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 la(e,t,n){let r=da(e,t);return r>=0?e[r|1]=n:(r=~r,ca(e,r,t,n)),r}function ua(e,t){let n=da(e,t);if(n>=0)return e[n|1]}function da(e,t){return fa(e,t,1)}function fa(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 ia(t,e=>{let t=e;Sa(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&xa(i,a),n}function xa(e,t){for(let n=0;n{t(e,r)})}}function Sa(e,t,n,r){if(e=fi(e),!e)return!1;let i=null,a=vi(e),o=!a&&ki(e);if(!a&&!o){let t=e.ngModule;if(a=vi(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)Sa(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{ia(a.imports,i=>{Sa(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&xa(e,t)}if(!s){let e=ta(i)||(()=>new i);t({provide:i,useFactory:e,deps:ma},i),t({provide:_a,useValue:i,multi:!0},i),t({provide:ha,useValue:()=>Xi(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Ca(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Ca(e,t){for(let n of e)Si(n)&&(n=n.ɵproviders),Array.isArray(n)?Ca(n,t):t(n)}var wa=si({provide:String,useValue:si});function Ta(e){return typeof e==`object`&&!!e&&wa in e}function Ea(e){return!!(e&&e.useExisting)}function Da(e){return!!(e&&e.useFactory)}function Oa(e){return typeof e==`function`}var ka=new xi(``),Aa={},ja={},Ma=void 0;function Na(){return Ma===void 0&&(Ma=new va),Ma}var Pa=class{},Fa=class extends Pa{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,Ga(e,e=>this.processProvider(e)),this.records.set(ga,Va(void 0,this)),r.has(`environment`)&&this.records.set(Pa,Va(void 0,this));let i=this.records.get(ka);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(_a,ma,{self:!0}))}retrieve(e,t){let n=Zi(t)||0;try{return this.get(e,Ki,n)}catch(e){if(nr(e))return e;throw e}}destroy(){Ba(this),this._destroyed=!0;let e=pn(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(),pn(e)}}onDestroy(e){return Ba(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ba(this);let t=er(this),n=Ui(void 0);try{return e()}finally{er(t),Ui(n)}}get(e,t=Ki,n){if(Ba(this),Object.hasOwn(e,Oi))return e[Oi](this);let r=Zi(n),i=er(this),a=Ui(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Wa(e)&&hi(e);t=n&&this.injectableDefInScope(n)?Va(Ia(e),Aa):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Na():this.parent;return t=r&8&&t===Ki?null:t,n.get(e,t)}catch(e){let t=Bi(e);throw t===-200||t===-201?new ii(t,null):e}finally{Ui(a),er(i)}}resolveInjectorInitializers(){let e=pn(null),t=er(this),n=Ui(void 0);try{let e=this.get(ha,ma,{self:!0});for(let t of e)t()}finally{er(t),Ui(n),pn(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=fi(e);let t=Oa(e)?e:fi(e&&e.provide),n=Ra(e);if(!Oa(e)&&e.multi===!0){let n=this.records.get(t);n||(n=Va(void 0,Aa,!0),n.factory=()=>$i(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=pn(null);try{if(t.value===ja)throw Li(``);return t.value===Aa&&(t.value=ja,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Ua(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{pn(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=fi(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 Ia(e){let t=hi(e),n=t===null?ta(e):t.factory;if(n!==null)return n;if(e instanceof xi)throw new ii(-204,!1);if(e instanceof Function)return La(e);throw new ii(-204,!1)}function La(e){if(e.length>0)throw new ii(-204,!1);let t=_i(e);return t===null?()=>new e:()=>t.factory(e)}function Ra(e){return Ta(e)?Va(void 0,e.useValue):Va(za(e),Aa)}function za(e,t,n){let r;if(Oa(e)){let t=fi(e);return ta(t)||Ia(t)}if(Ta(e))r=()=>fi(e.useValue);else if(Da(e))r=()=>e.useFactory(...$i(e.deps||[]));else if(Ea(e))r=(t,n)=>Xi(fi(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=fi(e&&(e.useClass||e.provide));if(Ha(e))r=()=>new t(...$i(e.deps));else return ta(t)||Ia(t)}return r}function Ba(e){if(e.destroyed)throw new ii(-205,!1)}function Va(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Ha(e){return!!e.deps}function Ua(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Wa(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Ga(e,t){for(let n of e)Array.isArray(n)?Ga(n,t):n&&Si(n)?Ga(n.ɵproviders,t):t(n)}function Ka(e,t){let n;e instanceof Fa?(Ba(e),n=e):n=new Ji(e);let r=er(n),i=Ui(void 0);try{return t()}finally{er(r),Ui(i)}}function qa(){return Hi()!==void 0||$n()!=null}var Ja=1;function Ya(e){return Array.isArray(e)&&typeof e[Ja]==`object`}function Xa(e){return Array.isArray(e)&&e[Ja]===!0}function Za(e){return!!(e.flags&4)}function Qa(e){return e.componentOffset>-1}function $a(e){return(e.flags&1)==1}function eo(e){return!!e.template}function to(e){return!!(e[2]&512)}function no(e){return(e[2]&256)==256}var ro=(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})(ro||{}),io=`math`;function ao(e){for(;Array.isArray(e);)e=e[0];return e}function oo(e,t){return ao(t[e])}function so(e,t){return ao(t[e.index])}function co(e,t){return e.data[t]}function lo(e,t){return e[t]}function uo(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function fo(e,t){let n=t[e];return Ya(n)?n:n[0]}function po(e){return(e[2]&128)==128}function mo(e){return Xa(e[3])}function ho(e,t){return t==null?null:e[t]}function go(e){e[17]=0}function _o(e){e[2]&1024||(e[2]|=1024,po(e)&&xo(e))}function vo(e,t){for(;e>0;)t=t[14],e--;return t}function yo(e){return!!(e[2]&9216||e[24]?.dirty)}function bo(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),yo(e)&&xo(e)}function xo(e){e[10].changeDetectionScheduler?.notify(0);let t=wo(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!po(t)));)t=wo(t)}function So(e,t){if(no(e))throw new ii(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Co(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function wo(e){let t=e[3];return Xa(t)?t[3]:t}function To(e){return e[7]??=[]}function Eo(e){return e.cleanup??=[]}function Do(e,t,n,r){let i=To(t);i.push(n),e.firstCreatePass&&Eo(e).push(r,i.length-1)}var Oo={lFrame:ls(null),bindingsEnabled:!0,skipHydrationRootTNode:null},ko=!1;function Ao(){return Oo.lFrame.elementDepthCount}function jo(){Oo.lFrame.elementDepthCount++}function Mo(){Oo.lFrame.elementDepthCount--}function No(){return Oo.bindingsEnabled}function Po(){return Oo.skipHydrationRootTNode!==null}function Fo(e){return Oo.skipHydrationRootTNode===e}function Io(){Oo.skipHydrationRootTNode=null}function w(){return Oo.lFrame.lView}function Lo(){return Oo.lFrame.tView}function T(e){return Oo.lFrame.contextLView=e,e[8]}function E(e){return Oo.lFrame.contextLView=null,e}function Ro(){let e=zo();for(;e!==null&&e.type===64;)e=e.parent;return e}function zo(){return Oo.lFrame.currentTNode}function Bo(){let e=Oo.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Vo(e,t){let n=Oo.lFrame;n.currentTNode=e,n.isParent=t}function Ho(){return Oo.lFrame.isParent}function Uo(){Oo.lFrame.isParent=!1}function Wo(){return Oo.lFrame.contextLView}function Go(){return ko}function Ko(e){let t=ko;return ko=e,t}function qo(){let e=Oo.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Jo(){return Oo.lFrame.bindingIndex}function Yo(e){return Oo.lFrame.bindingIndex=e}function Xo(){return Oo.lFrame.bindingIndex++}function Zo(e){let t=Oo.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Qo(){return Oo.lFrame.inI18n}function $o(e,t){let n=Oo.lFrame;n.bindingIndex=n.bindingRootIndex=e,ts(t)}function es(){return Oo.lFrame.currentDirectiveIndex}function ts(e){Oo.lFrame.currentDirectiveIndex=e}function ns(e){let t=Oo.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function rs(){return Oo.lFrame.currentQueryIndex}function is(e){Oo.lFrame.currentQueryIndex=e}function as(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function os(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=as(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=Oo.lFrame=cs();return r.currentTNode=t,r.lView=e,!0}function ss(e){let t=cs(),n=e[1];Oo.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function cs(){let e=Oo.lFrame,t=e===null?null:e.child;return t===null?ls(e):t}function ls(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 us(){let e=Oo.lFrame;return Oo.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var ds=us;function fs(){let e=us();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 ps(e){return(Oo.lFrame.contextLView=vo(e,Oo.lFrame.contextLView))[8]}function ms(){return Oo.lFrame.selectedIndex}function hs(e){Oo.lFrame.selectedIndex=e}function gs(){let e=Oo.lFrame;return co(e.tView,e.selectedIndex)}function D(){Oo.lFrame.currentNamespace=`svg`}function _s(){vs()}function vs(){Oo.lFrame.currentNamespace=null}function ys(){return Oo.lFrame.currentNamespace}var bs=!0;function xs(){return bs}function Ss(e){bs=e}function Cs(e,t=null,n=null,r){let i=ws(e,t,n,r);return i.resolveInjectorInitializers(),i}function ws(e,t=null,n=null,r,i=new Set){return new Fa([n||ma,ya(e)],t||Na(),null,i)}var Ts=class e{static THROW_IF_NOT_FOUND=Ki;static NULL=new va;static create(e,t){if(Array.isArray(e))return Cs({name:``},t,e,``);{let t=e.name??``;return Cs({name:t},e.parent,e.providers,t)}}static ɵprov=mi({token:e,providedIn:`any`,factory:()=>Xi(ga)});static __NG_ELEMENT_ID__=-1},Es=new xi(``),Ds=class{static __NG_ELEMENT_ID__=ks;static __NG_ENV_ID__=e=>e},Os=class extends Ds{_lView;constructor(e){super(),this._lView=e}get destroyed(){return no(this._lView)}onDestroy(e){let t=this._lView;return So(t,e),()=>Co(t,e)}};function ks(){return new Os(w())}var As=new xi(``),js=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new ti(!1);debugTaskTracker=C(As,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Wr(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=mi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Ms=class extends $r{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,qa()&&(this.destroyRef=C(Ds,{optional:!0})??void 0,this.pendingTasks=C(js,{optional:!0})??void 0)}emit(e){let t=pn(null);try{super.next(e)}finally{pn(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 _r&&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 Ns(...e){}function Ps(e){let t,n;function r(){e=Ns;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 Fs(e){return queueMicrotask(()=>e()),()=>{e=Ns}}var Is=`isAngularZone`,Ls=`isAngularZone_ID`,Rs=0,zs=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Ms(!1);onMicrotaskEmpty=new Ms(!1);onStable=new Ms(!1);onError=new Ms(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new ii(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,Us(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Is)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new ii(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new ii(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,Bs,Ns,Ns);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)}},Bs={};function Vs(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 Hs(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Ps(()=>{e.callbackScheduled=!1,Ws(e),e.isCheckStableRunning=!0,Vs(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Ws(e)}function Us(e){let t=()=>{Hs(e)},n=Rs++;e._inner=e._inner.fork({name:`angular`,properties:{[Is]:!0,[Ls]:n,[Ls+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Js(s))return n.invokeTask(i,a,o,s);try{return Gs(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Ks(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Gs(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Ys(s)&&t(),Ks(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Ws(e),Vs(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 Ws(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Gs(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Ks(e){e._nesting--,Vs(e)}var qs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Ms;onMicrotaskEmpty=new Ms;onStable=new Ms;onError=new Ms;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 Js(e){return Xs(e,`__ignore_ng_zone__`)}function Ys(e){return Xs(e,`__scheduler_tick__`)}function Xs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Zs=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},Qs=new xi(``,{factory:()=>{let e=C(zs),t=C(Pa),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Zs),n.handleError(r))})}}}),$s={provide:ha,useValue:()=>{C(Zs,{optional:!0})},multi:!0};function O(e,t){let[n,r,i]=Wn(e,t?.equal),a=n;return a[fn],a.set=r,a.update=i,a.asReadonly=ec.bind(a),a}function ec(){let e=this[fn];if(e.readonlyFn===void 0){let t=()=>this();t[fn]=e,e.readonlyFn=t}return e.readonlyFn}var tc=new xi(``,{factory:()=>nc}),nc=`ng`,rc=new xi(``),ic=new xi(``,{providedIn:`platform`,factory:()=>`unknown`}),ac=new xi(``,{factory:()=>C(Es).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),oc=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=sc}return e})();function sc(){return new oc(w(),Ro())}var cc=class{},lc=new xi(``,{factory:()=>!0}),uc=new xi(``),dc=(()=>{class e{static ɵprov=mi({token:e,providedIn:`root`,factory:()=>new fc})}return e})(),fc=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}},pc=class{[fn];constructor(e){this[fn]=e}destroy(){this[fn].destroy()}};function mc(e,t){let n=t?.injector??C(Ts),r=t?.manualCleanup===!0?null:n.get(Ds),i,a=n.get(oc,null,{optional:!0}),o=n.get(cc);return a===null?i=yc(e,n.get(dc),o):(i=vc(a.view,o,e),r instanceof Os&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new pc(i)}var hc={...Xn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Ko(!1);try{Zn(this)}finally{Ko(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=pn(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],pn(e)}}},gc={...hc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(On(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},_c={...hc,consumerMarkedDirty(){this.view[2]|=8192,xo(this.view),this.notifier.notify(13)},destroy(){if(On(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[fn]!==void 0}function Sc(e){return xc(e)&&typeof e.set==`function`}var Cc=Symbol(`InputSignalNode#UNSET`),wc={...Jn,transformFn:void 0,applyValueToInputSignal(e,t){Kn(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===pa)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:pa,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new Dc(l&&l.currentValue,n,c===pa),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,Di)&&(r=n[Di]),r??=n[Di]=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=Ml(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;Ri(t,`NodeInjector`)}function bl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Ui(void 0);try{return i?i.get(t,r,n&8):Wi(t,r,n&8)}finally{Ui(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=jl(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(!os(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))Ri(n);else return e}finally{ds()}}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?Qa(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&&eo(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 Li(``);let c=cl(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Ui(s.injectImpl):null;os(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&&Ui(l),cl(c),s.resolving=!1,ds()}}return a}function El(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Di)?e[Di]: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,Zi(n),t)}};function Al(){return new kl(Ro(),w())}function jl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!to(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=Ml(o),o=o[14]}a=t}return i}function Ml(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Nl(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Pl(){return Fl(Ro(),w())}function Fl(e,t){return new Il(so(e,t))}var Il=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Pl}return e})();function Ll(e){return e instanceof Il?e.nativeElement:e}function Rl(){return this._results[Symbol.iterator]()}var zl=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 $r}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=ra(e);(this._changesDetected=!na(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]=Rl};function Bl(e){return(e.flags&128)==128}var Vl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Vl||{}),Hl=new Map,Ul=0;function Wl(){return Ul++}function Gl(e){Hl.set(e[19],e)}function Kl(e){Hl.delete(e[19])}var ql=`__ngContext__`;function Jl(e,t){Ya(t)?(e[ql]=t[19],Gl(t)):e[ql]=t}function Yl(e){return Zl(e[12])}function Xl(e){return Zl(e[4])}function Zl(e){for(;e!==null&&!Xa(e);)e=e[4];return e}var Ql=void 0;function $l(e){Ql=e}function eu(){if(Ql!==void 0)return Ql;if(typeof document<`u`)return document;throw new ii(210,!1)}var tu=!1,nu=new xi(``,{factory:()=>tu}),ru=new WeakMap;function iu(e,t){if(typeof e!=`object`||!e)return;let n=ru.get(e);n||(n=new WeakSet,ru.set(e,n)),n.add(t)}function au(e){return(e.flags&32)==32}var ou=()=>null;function su(e,t,n=!1){return ou(e,t,n)}function cu(e,t){let n=e.contentQueries;if(n!==null){let r=pn(null);try{for(let r=0;r|^->||--!>|)/g,bu=`​$1​`;function xu(e){return e.replace(vu,e=>e.replace(yu,bu))}function Su(e,t){return e.createText(t)}function Cu(e,t,n){e.setValue(t,n)}function wu(e,t){return e.createComment(xu(t))}function Tu(e,t,n){return e.createElement(t,n)}function Eu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function Du(e,t,n){e.appendChild(t,n)}function Ou(e,t,n,r,i){r===null?Du(e,t,n):Eu(e,t,n,r,i)}function ku(e,t,n,r){e.removeChild(null,t,n,r)}function Au(e,t,n){e.setAttribute(t,`style`,n)}function ju(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function Mu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Qc(e,t,r),i!==null&&ju(e,t,i),a!==null&&Au(e,t,a)}function Nu(e){let t=Pu();return t?t.sanitize(ro.URL,e)||``:mu(e,`URL`)?pu(e):_u(Ni(e))}function Pu(){let e=w();return e&&e[10].sanitizer}function Fu(e){return e.ownerDocument.defaultView}function Iu(e){return e.ownerDocument}function Lu(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let n=t.length;if(i+n===r||e.charCodeAt(i+n)<=32)return i}n=i+1}}var Ru=`ng-template`;function zu(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(Uu(r))return!1;o=!0}}}}}return Uu(r)||o}function Uu(e){return!(e&1)}function Wu(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!==``&&!Uu(o)&&(t+=Xu(a,i),i=``),r=o,a||=!Uu(r);n++}return i!==``&&(t+=Xu(a,i)),t}function Qu(e){return e.map(Zu).join(`,`)}function $u(e){let t=[],n=[],r=1,i=2;for(;r!1});function ad(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function od(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function sd(e){let t=od(e,`transition-property`),n=od(e,`transition-duration`),r=od(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 cd(e){let t=od(e,`animation-name`),n=od(e,`animation-delay`),r=od(e,`animation-duration`),i=od(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 ld(e,t){return e!==void 0&&e.duration>t.duration}function ud(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function dd(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 fd(e,t){let n=getComputedStyle(e),r=cd(n),i=sd(n),a=r.duration>i.duration?r:i;ld(t.get(e),a)||ud(a)&&t.set(e,a)}function pd(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?fd(e,t):md(e,t,r)}function md(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=dd(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}ld(t.get(e),r)||ud(r)&&t.set(e,r)}var hd=new Set,gd=!1,_d=1,vd=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function yd(e){return e[9].get(id,gd)}function bd(e,t,n){let r=Sd.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else Sd.set(e,{classList:t,cleanupFns:n})}function xd(e){let t=Sd.get(e);if(t){for(let e of t.cleanupFns)e();Sd.delete(e)}Cd.delete(e)}var Sd=new WeakMap,Cd=new WeakMap,wd=new WeakMap;function Td(e){return e?e[14]??e:null}var Ed=new WeakSet;function Dd(e,t,n){let r=wd.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=Td(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 Od(e,t,n){let r=Td(n),i=wd.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):wd.set(e,[{el:t,declarationView:r}])}function kd(e){let t=e[26]??={};return t.enter??=new Map}function Ad(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 jd(e){return e.composedPath?e.composedPath()[0]:e.target}function Md(e,t){let n=Cd.get(t);if(n===void 0)return!0;if(t!==jd(e))return!1;let r=e.animation;if(r){let e=dd(r);if(e!==void 0&&e+_d{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=mi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),zd=[0,1,2,3],Bd=(()=>{class e{ngZone=C(zs);scheduler=C(cc);errorHandler=C(Zs,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){C(Fd,{optional:!0})}execute(){let e=this.sequences.size>0;e&&zc(Ec.AfterRenderHooksStart),this.executing=!0;for(let e of zd)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),xo(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(Pd.AFTER_NEXT_RENDER,e):e()}static ɵprov=mi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Vd=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 Hd(e,t){let n=t?.injector??C(Ts);return Ld(`NgAfterNextRender`),Wd(e,n,t,!0)}function Ud(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Wd(e,t,n,r){let i=t.get(Rd);i.impl??=t.get(Bd);let a=t.get(Fd,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(Ds),s=t.get(oc,null,{optional:!0}),c=new Vd(i.impl,Ud(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var Gd=new xi(``,{factory:()=>{let e=C(Pa),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function Kd(e,t,n){let r=e.get(Gd);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 qd(e,t){let n=e.get(Gd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Jd(e,t){let n=e.get(Gd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Yd(e){let t=e.get(Gd);t.isScheduled||=(Hd(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Xd(e){let t=e.get(Gd);t.scheduler=Yd,t.scheduler(e)}function Zd(e,t){for(let[n,r]of t)Kd(e,r.animateFns)}function Qd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&Zd(r,i)}function $d(e,t,n,r){try{n.get(ga)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&qd(n,i.enter.get(t.index).animateFns);let a=ef(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];nf(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&hd.add(e[19]),Kd(n,()=>tf(e,t,i||void 0,a,r),i||void 0)}function ef(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 tf(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&&nf(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),af(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&hd.delete(e[19]),i(!0)})}else e&&hd.delete(e[19]),i(!1)}function nf(e,t,n){if(t.type&12){let r=e[t.index];if(Xa(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,hd.delete(e[19])),n(!0)})}function of(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;Xa(i)?c=i:Ya(i)&&(l=!0,i=i[0]);let u=ao(i);e===0&&r!==null?(Qd(s,r,a,n),o==null?Du(t,r,u):Eu(t,r,u,o||null,!0)):e===1&&r!==null?(Qd(s,r,a,n),Eu(t,r,u,o||null,!0),Dd(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Od(a,u,s),Ed.delete(u),$d(s,a,n,e=>{if(Ed.has(u)){Ed.delete(u);return}ku(t,u,l,e)})):e===3&&(Ed.delete(u),$d(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Af(t,e,n,c,a,r,o)}}function sf(e,t){lf(e,t),t[0]=null,t[5]=null}function cf(e,t,n,r,i,a){r[0]=i,r[5]=t,Ef(e,r,n,1,i,a)}function lf(e,t){t[10].changeDetectionScheduler?.notify(9),Ef(e,t,t[11],2,null,null)}function uf(e){let t=e[12];if(!t)return pf(e[1],e);for(;t;){let n=null;if(Ya(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)Ya(t)&&pf(t[1],t),t=t[3];t===null&&(t=e),Ya(t)&&pf(t[1],t),n=t&&t[4]}t=n}}function df(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function ff(e,t){if(no(t))return;let n=t[11];n.destroyNode&&Ef(e,t,n,3,null,null),uf(t)}function pf(e,t){if(no(t))return;let n=pn(null);try{t[2]&=-129,t[2]|=256,t[24]&&On(t[24]),hf(e,t),mf(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&Xa(t[3])){n!==t[3]&&df(n,t);let r=t[18];r!==null&&r.detachView(e)}Kl(t)}finally{pn(n)}}function mf(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&&Bf(e,t,27,!1),zc(o?Ec.TemplateUpdateStart:Ec.TemplateCreateStart,i,n),n(r,i)}finally{hs(a),zc(o?Ec.TemplateUpdateEnd:Ec.TemplateCreateEnd,i,n)}}function Wf(e,t,n){Zf(e,t,n),(n.flags&64)==64&&Qf(e,t,n)}function Gf(e,t,n=so){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a{xo(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function Sp(e){let t=e[24]??Object.create(Cp);return t.lView=e,t}var Cp={...hn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=wo(e.lView);for(;t&&!wp(t[1]);)t=wo(t);t&&_o(t)},consumerOnSignalRead(){this.lView[24]=this}};function wp(e){return e.type!==2}function Tp(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 Ep=100;function Dp(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Op(e,t)}finally{n.end?.()}}function Op(e,t){let n=Go();try{Ko(!0),Pp(e,t);let n=0;for(;yo(e);){if(n===Ep)throw new ii(103,!1);n++,Pp(e,1)}}finally{Ko(n)}}function kp(e,t,n,r){if(no(t))return;let i=t[2];ss(t);let a=!0,o=null,s=null;wp(e)?(s=vp(t),o=Cn(s)):mn()===null?(a=!1,s=Sp(t),o=Cn(s)):t[24]&&=(On(t[24]),null);try{go(t),Yo(e.bindingStartIndex),n!==null&&Uf(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(jp(t),Tp(t),Ap(t,0),e.contentQueries!==null&&cu(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)}Ip(e,t);let o=e.components;o!==null&&Fp(t,o,0);let s=e.viewQuery;if(s!==null&&lu(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}gp(t),t[2]&=-73}catch(e){throw xo(t),e}finally{s!==null&&(Tn(s,o),a&&bp(s)),fs()}}function Ap(e,t){for(let n=Yl(e);n!==null;n=Xl(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=oa(e,10+t);sf(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 Up(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(Hp(e,n),oa(t,n))}this._attachedToViewContainer=!1}ff(this._lView[1],this._lView)}onDestroy(e){So(this._lView,e)}markForCheck(){Lp(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){bo(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Dp(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new ii(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=to(this._lView),t=this._lView[16];t!==null&&!e&&df(t,this._lView),lf(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new ii(902,!1);this._appRef=e;let t=to(this._lView),n=this._lView[16];n!==null&&!t&&Wp(n,this._lView),bo(this._lView)}},Kp=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=qp;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 Gp(fp(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function qp(){return Jp(Ro(),w())}function Jp(e,t){return e.type&4?new Kp(t,e,Fl(e,t)):null}function Yp(e,t,n,r,i){let a=e.data[t];if(a===null)a=Xp(e,t,n,r,i),Qo()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Bo();a.injectorIndex=e===null?-1:e.injectorIndex}return Vo(a,!0),a}function Xp(e,t,n,r,i){let a=zo(),o=Ho(),s=o?a:a&&a.parent,c=e.data[t]=Qp(e,s,n,t,r,i);return Zp(e,c,a,o),c}function Zp(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 Qp(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Po()&&(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:ys(),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 $p(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?em(e,n):r.push(e);e[6]=r}function em(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,nm=()=>null;function rm(e,t){return tm(e,t)}function im(e,t,n){return nm(e,t,n)}var am=class{},om=class{},sm=(()=>{class e{static ɵprov=mi({token:e,providedIn:`root`,factory:()=>null})}return e})();function cm(e){return e.debugInfo?.className||e.type.name||null}var lm={},um=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,lm,n);return r!==lm||t===lm?r:this.parentInjector.get(e,t,n)}};function dm(e,t,n){return e[t]=n}function fm(e,t){return e[t]}function pm(e,t,n){if(n===ed)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function mm(e,t,n,r){let i=pm(e,t,n);return pm(e,t+1,r)||i}function hm(e,t,n,r,i){let a=mm(e,t,n,r);return pm(e,t+2,i)||a}function gm(e,t,n,r,i,a){let o=mm(e,t,n,r);return mm(e,t+2,i,a)||o}function _m(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&iu(i,a),Lp(Qa(e)?fo(e.index,t):t,5);let o=t[8],s=vm(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=vm(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function vm(e,t,n,r){let i=pn(null);try{return zc(Ec.OutputStart,t,n),n(r)!==!1}catch(t){return op(e,t),!1}finally{zc(Ec.OutputEnd,t,n),pn(i)}}function ym(e,t,n,r,i,a,o,s){let c=$a(e),l=!1,u=null;if(!r&&c&&(u=xm(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=so(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);bm(a)||Sm(r?t=>r(ao(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function bm(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function xm(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 Sm(e,t,n,r,i,a,o){let s=t.firstCreatePass?Eo(t):null,c=To(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function Cm(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Sm(e.index,s,t,i,a,c,!0)}var wm=Symbol(`BINDING`),Tm=new xi(``);function Em(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 Bm(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&Vf.SignalBased)!==0};return i&&(a.transform=i),a})}function Jm(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Ym(e,t,n){let r=t instanceof Pa?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new um(n,r):n}function Xm(e){let t=e.get(om,null);if(t===null)throw new ii(407,!1);return{rendererFactory:t,sanitizer:e.get(sm,null),changeDetectionScheduler:e.get(cc,null),ngReflect:!1,tracingService:e.get(Fd,null,{optional:!0})}}function Zm(e,t,n){let r=$m(e);return Tu(t,r,r===`svg`?`svg`:r===`math`?io:n)}function Qm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new ii(905,!1)}function $m(e){return(e.selectors[0][0]||`div`).toLowerCase()}var eh=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=qm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Jm(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=Qu(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){zc(Ec.DynamicComponentStart);let s=pn(null);try{let s=this.componentDef,c=Ym(s,r||this.ngModule,e),l=Xm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(cm(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{pn(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=th(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Kf(l,r,s.encapsulation,t):Zm(s,l,o??null);Qm(u);let d=t.get(Tm,null),f=nh(u,()=>t.get(Es,null)??eu());d&&d.addHost(f);let p=a?.some(ih)||i?.some(e=>typeof e!=`function`&&e.bindings.some(ih)),m=Ff(null,c,null,512|Lf(s),null,null,e,l,t,null,su(u,t,!0));d&&Gm&&f instanceof ShadowRoot&&So(m,()=>{d.removeHost(f)}),m[27]=u,ss(m);let h=null;try{let e=Hm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);Mu(l,u,e),Jl(u,m),Wf(c,m,e),uu(c,e,m),Um(c,e),n!==void 0&&oh(e,this.ngContentSelectors,n),h=fo(e.index,m),m[8]=h[8],up(c,m,null)}catch(e){throw h!==null&&Kl(h),Kl(m),e}finally{zc(Ec.DynamicComponentEnd),fs()}return new ah(this.componentType,m,!!p)}};function th(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:$u(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[wm].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 ih(e){let t=e[wm].kind;return t===`input`||t===`twoWay`}var ah=class extends am{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=co(t[1],27),this.location=Fl(this._tNode,t),this.instance=fo(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Gp(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;sp(n,r[1],r,e,t),this.previousInputValues.set(e,t),Lp(fo(n.index,r),1)}get injector(){return new kl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function oh(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=ch}return e})();function ch(){return fh(Ro(),w())}var lh=class e extends sh{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Fl(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=uh(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=rm(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,pp(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 eh(ki(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Pa,null);e&&(i=e)}let d=ki(l.componentType??{}),f=rm(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,pp(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(mo(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 Bp(o,i,a,r),t.attachToViewContainerRef(),aa(dh(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=uh(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Hp(this._lContainer,t);n&&(oa(dh(this._lContainer),t),ff(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Hp(this._lContainer,t);return n&&oa(dh(this._lContainer),t)!=null?new Gp(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function uh(e){return e[8]}function dh(e){return e[8]||=[]}function fh(e,t){let n,r=t[e.index];return Xa(r)?n=r:(n=Rp(r,t,null,e),t[e.index]=n,zf(t,n)),mh(n,t,e,r),new lh(n,e,t)}function ph(e,t){let n=e[11],r=n.createComment(``),i=so(t,e);return Eu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var mh=_h,hh=()=>!1;function gh(e,t,n){return hh(e,t,n)}function _h(e,t,n,r){if(e[7])return;let i;i=n.type&8?ao(r):ph(t,n),e[7]=i}var vh=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},yh=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 Nh(e,t,n){e.queries===null&&(e.queries=new xh),e.queries.track(new Sh(t,n))}function Ph(e,t){return e.queries.getByIndex(t)}function Fh(e,t){let n=e[1],r=Ph(n,t);return r.crossesNgTemplate?Oh(n,e,t,[]):Dh(n,e,r,t)}function Ih(e,t,n){let r,i=Pn(()=>{r._dirtyCounter();let n=Bh(r,e);if(t&&n===void 0)throw new ii(-951,!1);return n});return r=i[fn],r._dirtyCounter=O(0),r._flatValue=void 0,i}function Lh(e){return Ih(!0,!1,e)}function Rh(e){return Ih(!0,!0,e)}function zh(e,t){let n=e[fn];n._lView=w(),n._queryIndex=t,n._queryList=kh(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function Bh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:ma;let i=kh(n,r),a=Fh(n,r);return i.reset(a,Ll),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function Vh(e){return!!e&&typeof e.then==`function`}function Hh(e){return!!e&&typeof e.subscribe==`function`}var Uh=class{},Wh=class extends Uh{injector;instance=null;constructor(e){super();let t=new Fa([...e.providers,{provide:Uh,useValue:this}],e.parent||Na(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Gh(e,t,n=null){return new Wh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var Kh=(()=>{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=ba(!1,e.type),n=t.length>0?Gh([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=mi({token:e,providedIn:`environment`,factory:()=>new e(Xi(Pa))})}return e})();function A(e){return Tc(()=>{let t=Qh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Vl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(Kh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||du.Emulated,styles:e.styles||ma,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&Ld(`NgStandalone`),$h(n);let r=e.dependencies;return n.directiveDefs=eg(r,qh),n.pipeDefs=eg(r,ji),n.id=tg(n),n})}function qh(e){return ki(e)||Ai(e)}function Jh(e,t){if(e==null)return pa;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=Vf.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function Yh(e){if(e==null)return pa;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Xh(e){return Tc(()=>{let t=Qh(e);return $h(t),t})}function Zh(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 Qh(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||pa,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||ma,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Jh(e.inputs,t),outputs:Yh(e.outputs),debugInfo:null}}function $h(e){e.features?.forEach(t=>t(e))}function eg(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 tg(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 ng=new xi(``),rg=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=C(ng,{optional:!0})??[];injector=C(Ts);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Ka(this.injector,t);if(Vh(n))e.push(n);else if(Hh(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=Nl({token:e,factory:e.ɵfac})}return e})();function ig(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=tl(e.mergedAttrs,e.attrs);let t=e.tView=Mf(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),Vo(e,!1);let c=cg(n,t,e,r);xs()&&xf(n,t,c,e),Jl(c,t);let l=Rp(c,t,c,e);t[r+27]=l,zf(t,l),gh(l,e,t)}function ag(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=Yp(t,d,4,o||null,s||null),No()&&Om(t,e,f,ho(t.consts,l),ep),Vc(t,f)):f=t.data[d],ig(f,e,t,n,r,i,a,c),$a(f)&&Wf(t,e,f),l!=null&&Gf(e,f,u),f}function og(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Yp(t,d,4,o||null,s||null),l!=null){let e=ho(t.consts,l);f.localNames=[];for(let t=0;t{throw new ii(600,``)})}var pg=10,mg=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=C(Qs);afterRenderManager=C(Rd);zonelessEnabled=C(lc);rootEffectScheduler=C(dc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new $r;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=C(js);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(ni(e=>!e))}constructor(){C(Fd,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=C(Pa);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Ts.NULL){return this._injector.get(zs).run(()=>{if(zc(Ec.BootstrapComponentStart),!this._injector.get(rg).done)throw new ii(405,``);let r=ki(e),i=this._injector.get(Uh),a=new eh(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=hg(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(ug,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),gg(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(Pd.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw zc(Ec.ChangeDetectionEnd),new ii(101,!1);let e=pn(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,pn(e),this.afterTick.next(),zc(Ec.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(om,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++yo(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;gg(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(dg,[]).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),()=>gg(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new ii(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=Nl({token:e,factory:e.ɵfac})}return e})();function hg(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function gg(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function j(e,t,n,r){let i=w();return pm(i,Xo(),t)&&(Lo(),tp(gs(),i,e,t,n,r)),j}function _g(e){if(Ld(`NgAnimateEnter`),!vd)return _g;let t=w();if(yd(t))return _g;let n=Ro(),r=t[9].get(zs);return Nd(kd(t),n,()=>vg(t,n,e,r)),Xd(t[9]),Zd(t[9],kd(t)),_g}function vg(e,t,n,r){let i=so(t,e),a=e[11],o=Ad(n),s=[],c=!1,l=e=>{if(jd(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{jd(e)===i&&(Md(e,i)&&(c=!0),yg(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),bd(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(pd(i,Cd,vd),!Cd.has(i))){for(let e of o)a.removeClass(i,e);xd(i)}})})}}function yg(e,t,n){let r=Sd.get(t);if(jd(e)===t&&r&&Md(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);xd(t)}}var bg=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 xg(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Sg(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){pn(r);let c=t.length-1;for(pn(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=xg(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=xg(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),h=n(s,d),g=n(o,l);if(Object.is(g,h)){let t=n(c,f);Object.is(t,m)?(e.swap(o,s),e.updateValue(s,f),c--,s--):e.move(s,o),e.updateValue(o,l),o++;continue}if(i??=new Eg,a??=Tg(e,o,s,n),Cg(e,i,o,g))e.updateValue(o,l),o++,s++;else if(a.has(g))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)wg(e,i,n,o,t[o]),o++}else if(t!=null){pn(r);let c=t[Symbol.iterator]();pn(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=xg(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new Eg,a??=Tg(e,o,s,n);let u=n(o,r);if(Cg(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;)wg(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 Cg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function wg(e,t,n,r,i){if(Cg(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function Tg(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 Eg=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 M(e,t,n,r,i,a,o,s){Ld(`NgControlFlow`);let c=w(),l=Lo();return og(c,l,e,t,n,r,i,ho(l.consts,a),256,o,s),Dg}function Dg(e,t,n,r,i,a,o,s){Ld(`NgControlFlow`);let c=w(),l=Lo();return og(c,l,e,t,n,r,i,ho(l.consts,a),512,o,s),Dg}function N(e,t){Ld(`NgControlFlow`);let n=w(),r=Xo(),i=n[r]===ed?-1:n[r],a=i===-1?void 0:Ng(n,27+i);if(pm(n,r,e)){let r=pn(null);try{if(a!==void 0&&Vp(a,0),e!==-1){let r=27+e,i=Ng(n,r),a=Rg(n[1],r),o=im(i,a,n);Bp(i,fp(n,a,t,{dehydratedView:o}),0,pp(a,o))}}finally{pn(r)}}else if(a!==void 0){let e=zp(a,0);e!==void 0&&(e[8]=t)}}var Og=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 kg(e){return e}function Ag(e,t){return t}var jg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function P(e,t,n,r,i,a,o,s,c,l,u,d,f){Ld(`NgControlFlow`);let p=w(),m=Lo(),h=c!==void 0,g=w(),_=new jg(h,s?o.bind(g[15][8]):o);g[27+e]=_,og(p,m,e+1,t,n,r,i,ho(m.consts,a),256),h&&og(p,m,e+2,c,l,u,d,ho(m.consts,f),512)}var Mg=class extends bg{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,Bp(this.lContainer,t,e,pp(this.templateTNode,n)),Pg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,Fg(this.lContainer,e),Ig(this.lContainer,e)}create(e,t){let n=rm(this.lContainer,this.templateTNode.tView.ssrId);return fp(this.hostLView,this.templateTNode,new Og(this.lContainer,t,e),{dehydratedView:n})}destroy(e){ff(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];Jd(e,r),hd.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function Fg(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 Ig(e,t){return Hp(e,t)}function Lg(e,t){return zp(e,t)}function Rg(e,t){return co(e,t)}function I(e,t,n){let r=w();return pm(r,Xo(),t)&&(Lo(),Jf(gs(),r,e,t,r[11],n)),I}function zg(e,t,n,r,i){sp(t,e,n,i?`class`:`style`,r)}function L(e,t,n,r){let i=w(),a=i[1],o=e+27,s=a.firstCreatePass?Hm(o,i,2,t,ep,No(),n,r):a.data[o];if(Qa(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(cm(o),()=>(Bg(e,t,i,s,r),L))}}return Bg(e,t,i,s,r),L}function Bg(e,t,n,r,i){if(ip(r,n,e,t,Hg),$a(r)){let e=n[1];Wf(e,n,r),uu(e,r,n)}i!=null&&Gf(n,r)}function R(){let e=Lo(),t=ap(Ro());return e.firstCreatePass&&Um(e,t),Fo(t)&&Io(),Mo(),t.classesWithoutHost!=null&&Xc(t)&&zg(e,t,w(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Zc(t)&&zg(e,t,w(),t.stylesWithoutHost,!1),R}function z(e,t,n,r){return L(e,t,n,r),R(),z}function B(e,t,n,r){let i=w(),a=i[1],o=e+27,s=a.firstCreatePass?Wm(o,a,2,t,n,r):a.data[o];return ip(s,i,e,t,Hg),r!=null&&Gf(i,s),B}function V(){return Fo(ap(Ro()))&&Io(),Mo(),V}function Vg(e,t,n,r){return B(e,t,n,r),V(),Vg}var Hg=(e,t,n,r,i)=>(Ss(!0),Tu(t[11],r,ys()));function Ug(e,t,n){let r=w(),i=r[1],a=e+27,o=i.firstCreatePass?Hm(a,r,8,`ng-container`,ep,No(),t,n):i.data[a];if(ip(o,r,e,`ng-container`,Kg),$a(o)){let e=r[1];Wf(e,r,o),uu(e,o,r)}return n!=null&&Gf(r,o),Ug}function Wg(){let e=Lo(),t=ap(Ro());return e.firstCreatePass&&Um(e,t),Wg}function Gg(e,t,n){return Ug(e,t,n),Wg(),Gg}var Kg=(e,t,n,r,i)=>(Ss(!0),wu(t[11],``));function H(){return w()}function qg(e,t,n){let r=w();return pm(r,Xo(),t)&&(Lo(),Yf(gs(),r,e,t,r[11],n)),qg}var Jg=void 0;function Yg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var Xg=[`en`,[[`a`,`p`],[`AM`,`PM`]],[[`AM`,`PM`]],[[`S`,`M`,`T`,`W`,`T`,`F`,`S`],[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`]],Jg,[[`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`]],Jg,[[`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}`,Jg,Jg,Jg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,Yg],Zg=Object.create(null);function Qg(e){let t=t_(e),n=$g(t);if(n)return n;let r=t.split(`-`)[0];if(n=$g(r),n)return n;if(r===`en`)return Xg;throw new ii(701,!1)}function $g(e){if(!(e in Zg)){let t=Gi.ng&&Gi.ng.common&&Gi.ng.common.locales&&Gi.ng.common.locales[e];return t!==void 0&&(Zg[e]=t),t}return Zg[e]}var e_={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 t_(e){return e.toLowerCase().replace(/_/g,`-`)}var n_=`en-US`;function r_(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function U(e,t,n){let r=w(),i=Lo(),a=Ro();return i_(i,r,r[11],a,e,t,n),U}function W(e,t,n){let r=w(),i=Lo(),a=Ro();return(a.type&3||n)&&ym(a,i,r,n,r[11],e,t,_m(a,r,t)),W}function i_(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=_m(r,t,a),ym(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 m_(e){return(e&2)==2}function h_(e,t){return e&131071|t<<17}function g_(e){return e|2}function __(e){return(e&131068)>>2}function v_(e,t){return e&-131069|t<<2}function y_(e){return(e&1)==1}function b_(e){return e|1}function x_(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=p_(o),c=__(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||da(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=p_(e[s+1]);e[r+1]=f_(t,s),t!==0&&(e[t+1]=v_(e[t+1],r)),e[s+1]=h_(e[s+1],r)}else e[r+1]=f_(s,0),s!==0&&(e[s+1]=v_(e[s+1],r)),s=r}else e[r+1]=f_(c,0),s===0?s=r:e[c+1]=v_(e[c+1],r),c=r;l&&(e[r+1]=g_(e[r+1])),C_(e,u,r,!0),C_(e,u,r,!1),S_(t,u,e,r,a),o=f_(s,c),a?t.classBindings=o:t.styleBindings=o}function S_(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&da(a,t)>=0&&(n[r+1]=b_(n[r+1]))}function C_(e,t,n,r){let i=e[n+1],a=t===null,o=r?p_(i):__(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];w_(n,t)&&(s=!0,e[o+1]=r?b_(i):g_(i)),o=r?p_(i):__(i)}s&&(e[n+1]=r?g_(i):b_(i))}function w_(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?da(e,t)>=0:!1}var T_={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function E_(e){return e.substring(T_.key,T_.keyEnd)}function D_(e){return k_(e),O_(e,A_(e,0,T_.textEnd))}function O_(e,t){let n=T_.textEnd;return n===t?-1:(t=T_.keyEnd=j_(e,T_.key=t,n),A_(e,t,n))}function k_(e){T_.key=0,T_.keyEnd=0,T_.value=0,T_.valueEnd=0,T_.textEnd=e.length}function A_(e,t,n){for(;t32;)t++;return t}function K(e,t,n){return P_(e,t,n,!1),K}function q(e,t){return P_(e,t,null,!0),q}function M_(e){F_(G_,N_,e,!0)}function N_(e,t){for(let n=D_(t);n>=0;n=O_(t,n))la(e,E_(t),!0)}function P_(e,t,n,r){let i=w(),a=Lo(),o=Zo(2);if(a.firstUpdatePass&&L_(a,e,o,r),t!==ed&&pm(i,o,t)){let s=a.data[ms()];q_(a,s,i,i[11],e,i[o+1]=X_(t,n),r,o)}}function F_(e,t,n,r){let i=Lo(),a=Zo(2);i.firstUpdatePass&&L_(i,null,a,r);let o=w();if(n!==ed&&pm(o,a,n)){let s=i.data[ms()];if(Z_(s,r)&&!I_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=li(e,n||``)),zg(i,s,o,n,r)}else K_(i,s,o,o[11],o[a+1],o[a+1]=W_(e,t,n),r,a)}}function I_(e,t){return t>=e.expandoStartIndex}function L_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[ms()],o=I_(e,n);Z_(a,r)&&t===null&&!o&&(t=!1),t=R_(i,a,t,r),x_(i,a,t,n,o,r)}}function R_(e,t,n,r){let i=ns(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=H_(null,e,t,n,r),n=U_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=H_(i,e,t,n,r),a===null){let n=z_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=H_(null,e,t,n[1],r),n=U_(n,t.attrs,r),B_(e,t,r,n))}else a=V_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function z_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(__(r)!==0)return e[p_(r)]}function B_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[p_(i)]=r}function V_(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===ed&&(u=l?ma:void 0);let d=l?ua(u,r):c===r?u:void 0;if(a&&!Y_(d)&&(d=ua(t,r)),Y_(d)&&(s=d,o))return s;let f=e[i+1];i=o?p_(f):__(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=ua(e,r))}return s}function Y_(e){return e!==void 0}function X_(e,t){return e==null||e===``||(typeof t==`string`?e=pu(e)+t:typeof e==`object`&&(e=ci(pu(e)))),e}function Z_(e,t){return!!(e.flags&(t?8:16))}function J(e,t=``){let n=w(),r=Lo(),i=e+27,a=r.firstCreatePass?Yp(r,i,1,t,null):r.data[i],o=Q_(r,n,a,t);n[i]=o,xs()&&xf(r,n,o,a),Vo(a,!1)}var Q_=(e,t,n,r)=>(Ss(!0),Su(t[11],r));function $_(e,t,n,r=``){return pm(e,Xo(),n)?t+Ni(n)+r:ed}function ev(e,t,n,r,i,a=``){let o=mm(e,Jo(),n,i);return Zo(2),o?t+Ni(n)+r+Ni(i)+a:ed}function tv(e,t,n,r,i,a,o,s=``){let c=hm(e,Jo(),n,i,o);return Zo(3),c?t+Ni(n)+r+Ni(i)+a+Ni(o)+s:ed}function nv(e,t,n,r,i,a,o,s,c,l=``){let u=gm(e,Jo(),n,i,o,c);return Zo(4),u?t+Ni(n)+r+Ni(i)+a+Ni(o)+s+Ni(c)+l:ed}function Y(e){return X(``,e),Y}function X(e,t,n){let r=w(),i=$_(r,e,t,n);return i!==ed&&av(r,ms(),i),X}function Z(e,t,n,r,i){let a=w(),o=ev(a,e,t,n,r,i);return o!==ed&&av(a,ms(),o),Z}function rv(e,t,n,r,i,a,o){let s=w(),c=tv(s,e,t,n,r,i,a,o);return c!==ed&&av(s,ms(),c),rv}function iv(e,t,n,r,i,a,o,s,c){let l=w(),u=nv(l,e,t,n,r,i,a,o,s,c);return u!==ed&&av(l,ms(),u),iv}function av(e,t,n){let r=oo(t,e);Cu(e[11],r,n)}function ov(e,t,n){Sc(t)&&(t=t());let r=w();return pm(r,Xo(),t)&&(Lo(),Jf(gs(),r,e,t,r[11],n)),ov}function sv(e,t){let n=Sc(e);return n&&e.set(t),n}function cv(e,t){let n=w(),r=Lo(),i=Ro();return i_(r,n,n[11],i,e,t),cv}var lv={};function uv(e){Ld(`NgLet`);let t=Lo(),n=w(),r=e+27;return Vo(Yp(t,r,128,null,null),!1),uo(t,n,r,lv),uv}function dv(e){return uo(Lo(),w(),ms(),e),e}function fv(e){let t=lo(Wo(),27+e);if(t===lv)throw new ii(314,!1);return t}function pv(e,t,n=``){return $_(w(),e,t,n)}function mv(e,t){let n=qo()+e,r=w();return r[n]===ed?dm(r,n,t()):fm(r,n)}function hv(e,t,n){return vv(w(),qo(),e,t,n)}function gv(e,t,n,r,i){return bv(w(),qo(),e,t,n,r,i)}function _v(e,t){let n=e[t];return n===ed?void 0:n}function vv(e,t,n,r,i,a){let o=t+n;return pm(e,o,i)?dm(e,o+1,a?r.call(a,i):r(i)):_v(e,o+1)}function yv(e,t,n,r,i,a,o){let s=t+n;return mm(e,s,i,a)?dm(e,s+2,o?r.call(o,i,a):r(i,a)):_v(e,s+2)}function bv(e,t,n,r,i,a,o,s){let c=t+n;return hm(e,c,i,a,o)?dm(e,c+3,s?r.call(s,i,a,o):r(i,a,o)):_v(e,c+3)}function xv(e,t){let n=Lo(),r,i=e+27;n.firstCreatePass?(r=Sv(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=ta(r.type,!0)),o=Ui(Dm);try{let e=cl(!1),t=a();return cl(e),uo(n,w(),i,t),t}finally{Ui(o)}}function Sv(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Cv(e,t,n){let r=e+27,i=w(),a=lo(i,r);return Tv(i,r)?vv(i,qo(),t,a.transform,n,a):a.transform(n)}function wv(e,t,n,r){let i=e+27,a=w(),o=lo(a,i);return Tv(a,i)?yv(a,qo(),t,o.transform,n,r,o):o.transform(n,r)}function Tv(e,t){return e[1].data[t].pure}function Ev(e,t){return Jp(e,t)}var Dv=(()=>{class e{applicationErrorHandler=C(Qs);appRef=C(mg);taskService=C(js);ngZone=C(zs);zonelessEnabled=C(lc);tracing=C(Fd,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new _r;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Ls):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(C(uc,{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?Fs:Ps;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=Nl({token:e,factory:e.ɵfac})}return e})();function Ov(){return[{provide:cc,useExisting:Dv},{provide:zs,useClass:qs},{provide:lc,useValue:!0}]}function kv(){return typeof $localize<`u`&&$localize.locale||`en-US`}var Av=new xi(``,{factory:()=>C(Av,{optional:!0,skipSelf:!0})||kv()}),jv=class{destroyed=!1;listeners=null;errorHandler=C(Zs,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=C(Ds);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new ii(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(oi(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=pn(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&&Mv(this.listeners)),pn(t),this.isEmitting=!1}}};function Mv(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function Q(e,t){return Pn(e,t?.equal)}function Nv(e){return sr(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var Pv=e=>e;function Fv(e,t){return typeof e==`function`?Iv(rr(e,Pv,t?.equal),t?.debugName,t?.set):Iv(rr(e.source,e.computation,e.equal),e.debugName,e.set)}function Iv(e,t,n){let r=e[fn],i=e;if(n!==void 0){let t=e=>ir(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Nv(e)),t)}else i.set=e=>ir(r,e),i.update=e=>ar(r,e);return i.asReadonly=ec.bind(e),i}function Lv(e,t){let n=Object.create(wc);n.value=e,n.transformFn=t?.transform;function r(){if(gn(n),n.value===Cc)throw new ii(-950,null);return n.value}return r[fn]=n,r}function Rv(e){return new jv}function zv(e,t){return Lv(e,t)}function Bv(e){return Lv(Cc,e)}var $=(zv.required=Bv,zv);function Vv(e,t){let n=Object.create(wc),r=new jv;n.value=e;function i(){return gn(n),Hv(n.value),n.value}return i[fn]=n,i.asReadonly=ec.bind(i),i.set=e=>{n.equal(n.value,e)||(Kn(n,e),r.emit(e))},i.update=e=>{Hv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function Hv(e){if(e===Cc)throw new ii(952,!1)}function Uv(e,t){return Vv(e,t)}function Wv(e){return Vv(Cc,e)}var Gv=(Uv.required=Wv,Uv);function Kv(e,t){return Lh(t)}function qv(e,t){return Rh(t)}var Jv=(Kv.required=qv,Kv),Yv=new xi(``),Xv=new xi(``);function Zv(e){return!e.moduleRef}function Qv(e){let t=Zv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(zs);return n.run(()=>{Zv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Qs),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),Zv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(Yv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(Yv);n.add(t),e.moduleRef.onDestroy(()=>{gg(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return ey(r,n,()=>{let n=t.get(js),r=n.add(),i=t.get(rg);return i.runInitializers(),i.donePromise.then(()=>{if(r_(t.get(Av,n_)||`en-US`),!t.get(Xv,!0))return Zv(e)?t.get(mg):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Zv(e)){let n=t.get(mg);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return $v?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var $v;function ey(e,t,n){try{let r=n();return Vh(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var ty=null;function ny(e=[],t){return Ts.create({name:t,providers:[{provide:ka,useValue:`platform`},{provide:Yv,useValue:new Set([()=>ty=null])},...e]})}function ry(e=[]){if(ty)return ty;let t=ny(e);return ty=t,fg(),iy(t),t}function iy(e){let t=e.get(rc,null);Ka(e,()=>{t?.forEach(e=>e())})}function ay(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;zc(Ec.BootstrapApplicationStart);try{let e=i?.injector??ry(r);return Qv({r3Injector:new Wh({providers:[Ov(),$s,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{zc(Ec.BootstrapApplicationEnd)}}function oy(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var sy=Symbol(`NOT_SET`),cy=new Set,ly={...Jn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:sy,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(gn(r),r.value),r.signal[fn]=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??cy)t()}finally{On(e)}}};function dy(e,t){let n=t?.injector??C(Ts),r=n.get(cc),i=n.get(Rd),a=n.get(Fd,null,{optional:!0});i.impl??=n.get(Bd);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(oc,null,{optional:!0}),c=new uy(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var fy=null;function py(){return fy}function my(e){fy??=e}var hy=class{},gy=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(gy||{}),_y=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(_y||{}),vy=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(vy||{}),yy={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 by(e){return Qg(e)[e_.LocaleId]}function xy(e,t,n){let r=Qg(e);return My(My([r[e_.DayPeriodsFormat],r[e_.DayPeriodsStandalone]],t),n)}function Sy(e,t,n){let r=Qg(e);return My(My([r[e_.DaysFormat],r[e_.DaysStandalone]],t),n)}function Cy(e,t,n){let r=Qg(e);return My(My([r[e_.MonthsFormat],r[e_.MonthsStandalone]],t),n)}function wy(e,t){let n=Qg(e)[e_.Eras];return My(n,t)}function Ty(e,t){return My(Qg(e)[e_.DateFormat],t)}function Ey(e,t){return My(Qg(e)[e_.TimeFormat],t)}function Dy(e,t){let n=Qg(e)[e_.DateTimeFormat];return My(n,t)}function Oy(e,t){let n=Qg(e),r=n[e_.NumberSymbols][t];if(r===void 0){if(t===yy.CurrencyDecimal)return n[e_.NumberSymbols][yy.Decimal];if(t===yy.CurrencyGroup)return n[e_.NumberSymbols][yy.Group]}return r}function ky(e){if(!e[e_.ExtraData])throw new ii(2303,!1)}function Ay(e){let t=Qg(e);return ky(t),(t[e_.ExtraData][2]||[]).map(e=>typeof e==`string`?Ny(e):[Ny(e[0]),Ny(e[1])])}function jy(e,t,n){let r=Qg(e);return ky(r),My(My([r[e_.ExtraData][0],r[e_.ExtraData][1]],t)||[],n)||[]}function My(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new ii(2304,!1)}function Ny(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Py=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Fy=Object.create(null),Iy=/((?:[^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]*)/,Ly=256;function Ry(e,t,n,r){let i=sb(e);zy(t),t=Vy(n,t)||t;let a=[],o;for(;t;)if(o=Iy.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=ib(r,s),i=ob(i,r));let c=``;return a.forEach(e=>{let t=rb(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function zy(e){if(e.length>Ly)throw new ii(2300,!1)}function By(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function Vy(e,t){let n=by(e);if(Fy[n]??=Object.create(null),Fy[n][t])return Fy[n][t];let r=``;switch(t){case`shortDate`:r=Ty(e,vy.Short);break;case`mediumDate`:r=Ty(e,vy.Medium);break;case`longDate`:r=Ty(e,vy.Long);break;case`fullDate`:r=Ty(e,vy.Full);break;case`shortTime`:r=Ey(e,vy.Short);break;case`mediumTime`:r=Ey(e,vy.Medium);break;case`longTime`:r=Ey(e,vy.Long);break;case`fullTime`:r=Ey(e,vy.Full);break;case`short`:let t=Vy(e,`shortTime`),n=Vy(e,`shortDate`);r=Hy(Dy(e,vy.Short),[t,n]);break;case`medium`:let i=Vy(e,`mediumTime`),a=Vy(e,`mediumDate`);r=Hy(Dy(e,vy.Medium),[i,a]);break;case`long`:let o=Vy(e,`longTime`),s=Vy(e,`longDate`);r=Hy(Dy(e,vy.Long),[o,s]);break;case`full`:let c=Vy(e,`fullTime`),l=Vy(e,`fullDate`);r=Hy(Dy(e,vy.Full),[c,l])}return r&&(Fy[n][t]=r),r}function Hy(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function Uy(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 Wy(s,t);let c=Oy(o,yy.MinusSign);return Uy(s,t,c,r,i)}}function Ky(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 ii(2301,!1)}}function qy(e,t,n=gy.Format,r=!1){return function(i,a){return Jy(i,a,e,t,n,r)}}function Jy(e,t,n,r,i,a){switch(n){case 2:return Cy(t,i,r)[e.getMonth()];case 1:return Sy(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Ay(t),a=jy(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?`+`:``)+Uy(o,2,a)+Uy(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Uy(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Uy(o,2,a)+`:`+Uy(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Uy(o,2,a)+`:`+Uy(Math.abs(i%60),2,a);default:throw new ii(2310,!1)}}}var Xy=0,Zy=4;function Qy(e){let t=By(e,Xy,1).getDay();return By(e,0,1+(t<=Zy?Zy:11)-t)}function $y(e){let t=e.getDay(),n=t===0?-3:Zy-t;return By(e.getFullYear(),e.getMonth(),e.getDate()+n)}function eb(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=$y(n),t=Qy(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Uy(i,e,Oy(r,yy.MinusSign))}}function tb(e,t=!1){return function(n,r){return Uy($y(n).getFullYear(),e,Oy(r,yy.MinusSign),t)}}var nb=Object.create(null);function rb(e){if(nb[e])return nb[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=qy(3,_y.Abbreviated);break;case`GGGG`:t=qy(3,_y.Wide);break;case`GGGGG`:t=qy(3,_y.Narrow);break;case`y`:t=Gy(0,1,0,!1,!0);break;case`yy`:t=Gy(0,2,0,!0,!0);break;case`yyy`:t=Gy(0,3,0,!1,!0);break;case`yyyy`:t=Gy(0,4,0,!1,!0);break;case`Y`:t=tb(1);break;case`YY`:t=tb(2,!0);break;case`YYY`:t=tb(3);break;case`YYYY`:t=tb(4);break;case`M`:case`L`:t=Gy(1,1,1);break;case`MM`:case`LL`:t=Gy(1,2,1);break;case`MMM`:t=qy(2,_y.Abbreviated);break;case`MMMM`:t=qy(2,_y.Wide);break;case`MMMMM`:t=qy(2,_y.Narrow);break;case`LLL`:t=qy(2,_y.Abbreviated,gy.Standalone);break;case`LLLL`:t=qy(2,_y.Wide,gy.Standalone);break;case`LLLLL`:t=qy(2,_y.Narrow,gy.Standalone);break;case`w`:t=eb(1);break;case`ww`:t=eb(2);break;case`W`:t=eb(1,!0);break;case`d`:t=Gy(2,1);break;case`dd`:t=Gy(2,2);break;case`c`:case`cc`:t=Gy(7,1);break;case`ccc`:t=qy(1,_y.Abbreviated,gy.Standalone);break;case`cccc`:t=qy(1,_y.Wide,gy.Standalone);break;case`ccccc`:t=qy(1,_y.Narrow,gy.Standalone);break;case`cccccc`:t=qy(1,_y.Short,gy.Standalone);break;case`E`:case`EE`:case`EEE`:t=qy(1,_y.Abbreviated);break;case`EEEE`:t=qy(1,_y.Wide);break;case`EEEEE`:t=qy(1,_y.Narrow);break;case`EEEEEE`:t=qy(1,_y.Short);break;case`a`:case`aa`:case`aaa`:t=qy(0,_y.Abbreviated);break;case`aaaa`:t=qy(0,_y.Wide);break;case`aaaaa`:t=qy(0,_y.Narrow);break;case`b`:case`bb`:case`bbb`:t=qy(0,_y.Abbreviated,gy.Standalone,!0);break;case`bbbb`:t=qy(0,_y.Wide,gy.Standalone,!0);break;case`bbbbb`:t=qy(0,_y.Narrow,gy.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=qy(0,_y.Abbreviated,gy.Format,!0);break;case`BBBB`:t=qy(0,_y.Wide,gy.Format,!0);break;case`BBBBB`:t=qy(0,_y.Narrow,gy.Format,!0);break;case`h`:t=Gy(3,1,-12);break;case`hh`:t=Gy(3,2,-12);break;case`H`:t=Gy(3,1);break;case`HH`:t=Gy(3,2);break;case`m`:t=Gy(4,1);break;case`mm`:t=Gy(4,2);break;case`s`:t=Gy(5,1);break;case`ss`:t=Gy(5,2);break;case`S`:t=Gy(6,1);break;case`SS`:t=Gy(6,2);break;case`SSS`:t=Gy(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Yy(0);break;case`ZZZZZ`:t=Yy(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Yy(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Yy(2);break;default:return null}return nb[e]=t,t}function ib(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function ab(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function ob(e,t,n){let r=e.getTimezoneOffset();return ab(e,-1*(ib(t,r)-r))}function sb(e){if(lb(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 By(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Py))return cb(n)}let t=new Date(e);if(!lb(t))throw new ii(2311,!1);return t}function cb(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 lb(e){return e instanceof Date&&!isNaN(e.valueOf())}var ub=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=C(Ts);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)(Dm(sh))};static ɵdir=Xh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[Ac]})}return e})();function db(e,t){return new ii(2100,!1)}var fb=`mediumDate`,pb=new xi(``),mb=new xi(``),hb=(()=>{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??fb,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Ry(t,e,i||this.locale,a)}catch(t){throw db(e,t.message)}}static ɵfac=function(t){return new(t||e)(Dm(Av,16),Dm(pb,24),Dm(mb,24))};static ɵpipe=Zh({name:`date`,type:e,pure:!0})}return e})(),gb=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=Zh({name:`json`,type:e,pure:!1})}return e})();function _b(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 vb=`browser`,yb=class{_doc;constructor(e){this._doc=e}manager},bb=(()=>{class e extends yb{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)(Xi(Es))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),xb=new xi(``),Sb=(()=>{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 bb));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof bb);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 ii(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(Xi(xb),Xi(zs))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),Cb=`ng-app-id`;function wb(e){for(let t of e)t.remove()}function Tb(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Eb(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Cb}="${t}"],link[${Cb}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Cb),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 Db(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var Ob=(()=>{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,Eb(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,Tb);t?.forEach(e=>this.addUsage(e,this.external,Db))}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&&(wb(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])wb(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,Tb(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Db(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)(Xi(Es),Xi(tc),Xi(ac,8),Xi(ic))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),kb={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`},Ab=/%COMP%/g,jb=`%COMP%`,Mb=`_nghost-${jb}`,Nb=`_ngcontent-${jb}`,Pb=!0,Fb=new xi(``,{factory:()=>Pb}),Ib=new xi(``);function Lb(e){return Nb.replace(Ab,e)}function Rb(e){return Mb.replace(Ab,e)}function zb(e,t){return t.map(t=>t.replace(Ab,e))}var Bb=(()=>{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 Vb(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 Gb?n.applyToHost(e):n instanceof Wb&&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 du.Emulated:r=new Gb(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case du.ShadowDom:return new Ub(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case du.ExperimentalIsolatedShadowDom:return new Ub(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new Wb(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)(Xi(Sb),Xi(Tm),Xi(tc),Xi(Fb),Xi(Es),Xi(zs),Xi(ac),Xi(Fd,8),Xi(Ib,8))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),Vb=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(kb[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Hb(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=Hb(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new ii(-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 ii(-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=kb[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=kb[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&(td.DashCase|td.Important)?e.style.setProperty(t,n,r&td.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&td.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=py().getGlobalEventTarget(this.doc,e),!e))throw new ii(-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 Hb(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var Ub=class extends Vb{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=zb(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=Db(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)}},Wb=class extends Vb{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?zb(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&&hd.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Gb=class extends Wb{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=Lb(l),this.hostAttr=Rb(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}},Kb=class e extends hy{supportsDOMEvents=!0;static makeCurrent(){my(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=Jb();return t==null?null:Yb(t)}resetBaseElement(){qb=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return _b(document.cookie,e)}},qb=null;function Jb(){return qb||=document.head.querySelector(`base`),qb?qb.getAttribute(`href`):null}function Yb(e){return new URL(e,document.baseURI).pathname}var Xb=[`alt`,`control`,`meta`,`shift`],Zb={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},Qb={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},$b=(()=>{class e extends yb{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(()=>py().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.`),Xb.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=Zb[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`),Xb.forEach(t=>{if(t!==n){let n=Qb[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)(Xi(Es))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})();async function ex(e,t,n){return ay({rootComponent:e,...tx(t,n)})}function tx(e,t){return{platformRef:t?.platformRef,appProviders:[...ox,...e?.providers??[]],platformProviders:ax}}function nx(){Kb.makeCurrent()}function rx(){return new Zs}function ix(){return $l(document),document}var ax=[{provide:ic,useValue:vb},{provide:rc,useValue:nx,multi:!0},{provide:Es,useFactory:ix}],ox=[{provide:ka,useValue:`root`},{provide:Zs,useFactory:rx},{provide:xb,useClass:bb,multi:!0},{provide:xb,useClass:$b,multi:!0},Bb,{provide:Tm,useClass:Ob},{provide:Ob,useExisting:Tm},Sb,{provide:om,useExisting:Bb},[]];function sx(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 dx({code:i,why:lx(a.why,e),fix:lx(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:lx(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function mx(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 bx=Math.random.bind(Math),xx=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Sx(e=21){let t=``,n=e;for(;n--;)t+=xx[bx()*64|0];return t}var Cx=6e4,wx=e=>e,Tx=wx,{clearTimeout:Ex,setTimeout:Dx}=globalThis;function Ox(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=wx,deserialize:s=Tx,resolver:c,bind:l=`rpc`,timeout:u=Cx,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=yx(),_=Sx();s.i=_;let ee;async function te(n=s){return u>=0&&(ee=Dx(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof ee==`object`&&(ee=ee.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:ee,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,te,d):await te()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Ex(ee),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:te,get $closed(){return f},get $meta(){return t.meta},$close:ee,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function ee(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(ne)}function te(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function ne(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Ex(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(ne),h}function kx(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Ax=Object.freeze({type:`object`,additionalProperties:!0});function jx(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Ax}return Ax}function Mx(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 Px(e,t){return Nx(e,t)??[e]}function Fx(e){return typeof e==`string`?`'${e}'`:new zx().serialize(e)}var Ix=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Lx=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Ix.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Rx(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})(),Bx=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Vx=[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],Hx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Ux=[],Wx=class{_data=new Gx;_hash=new Gx([...Bx]);_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)Ux[n]=e[t+n]|0;else{let e=Ux[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Ux[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Ux[n]=t+Ux[n-7]+i+Ux[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+Vx[n]+Ux[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=Gx.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 Kx(e){return new Wx().finalize(e).toBase64()}function qx(e){return Kx(Fx(e))}function Jx(e){return qx(e)}function Yx(){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 Xx=/^[\w+.-]{2,}:\/\//;function Zx(e){return e.endsWith(`/`)?e:`${e}/`}function Qx(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function $x(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Zx(n)+e.replace(/^\.?\//,``):e);return n}function eS(e,t){if(!t||t===`/`||Xx.test(e))return e;let n=Qx(t);return e.startsWith(n)?e:$x(n,e)}function tS(e,t){let n=e.match(Xx);return t+(n?e.slice(n[0].length):e)}var nS=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function rS(e=21){let t=``,n=e;for(;n--;)t+=nS[Math.random()*64|0];return t}var iS=Symbol.for(`immer-nothing`),aS=Symbol.for(`immer-draftable`),oS=Symbol.for(`immer-state`),sS=[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 cS(e,...t){{let n=sS[e],r=MS(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var lS=Object,uS=lS.getPrototypeOf,dS=`constructor`,fS=`prototype`,pS=`configurable`,mS=`enumerable`,hS=`writable`,gS=`value`,_S=e=>!!e&&!!e[oS];function vS(e){return e?xS(e)||OS(e)||!!e[aS]||!!e[dS]?.[aS]||kS(e)||AS(e):!1}var yS=lS[fS][dS].toString(),bS=new WeakMap;function xS(e){if(!e||!jS(e))return!1;let t=uS(e);if(t===null||t===lS[fS])return!0;let n=lS.hasOwnProperty.call(t,dS)&&t[dS];if(n===Object)return!0;if(!MS(n))return!1;let r=bS.get(n);return r===void 0&&(r=Function.toString.call(n),bS.set(n,r)),r===yS}function SS(e,t,n=!0){CS(e)===0?(n?Reflect.ownKeys(e):lS.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function CS(e){let t=e[oS];return t?t.type_:OS(e)?1:kS(e)?2:AS(e)?3:0}var wS=(e,t,n=CS(e))=>n===2?e.has(t):lS[fS].hasOwnProperty.call(e,t),TS=(e,t,n=CS(e))=>n===2?e.get(t):e[t],ES=(e,t,n,r=CS(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function DS(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var OS=Array.isArray,kS=e=>e instanceof Map,AS=e=>e instanceof Set,jS=e=>typeof e==`object`,MS=e=>typeof e==`function`,NS=e=>typeof e==`boolean`;function PS(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var FS=e=>jS(e)?e?.[oS]:null,IS=e=>e.copy_||e.base_,LS=e=>e.modified_?e.copy_:e.base_;function RS(e,t){if(kS(e))return new Map(e);if(AS(e))return new Set(e);if(OS(e))return Array[fS].slice.call(e);let n=xS(e);if(t===!0||t===`class_only`&&!n){let t=lS.getOwnPropertyDescriptors(e);delete t[oS];let n=Reflect.ownKeys(t);for(let r=0;r1&&lS.defineProperties(e,{set:VS,add:VS,clear:VS,delete:VS}),lS.freeze(e),t&&SS(e,(e,t)=>{zS(t,!0)},!1),e)}function BS(){cS(2)}var VS={[gS]:BS};function HS(e){return e===null||!jS(e)||lS.isFrozen(e)}var US=`MapSet`,WS=`Patches`,GS=`ArrayMethods`,KS={};function qS(e){let t=KS[e];return t||cS(0,e),t}var JS=e=>!!KS[e];function YS(e,t){KS[e]||(KS[e]=t)}var XS,ZS=()=>XS,QS=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:JS(US)?qS(US):void 0,arrayMethodsPlugin_:JS(GS)?qS(GS):void 0});function $S(e,t){t&&(e.patchPlugin_=qS(WS),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function eC(e){tC(e),e.drafts_.forEach(rC),e.drafts_=null}function tC(e){e===XS&&(XS=e.parent_)}var nC=e=>XS=QS(XS,e);function rC(e){let t=e[oS];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function iC(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[oS].modified_&&(eC(t),cS(4)),vS(e)&&(e=aC(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[oS].base_,e,t)}else e=aC(t,n);return oC(t,e,!0),eC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===iS?void 0:e}function aC(e,t){if(HS(t))return t;let n=t[oS];if(!n)return mC(t,e.handledSet_,e);if(!cC(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);fC(n,e)}return n.copy_}function oC(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zS(t,n)}function sC(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var cC=(e,t)=>e.scope_===t,lC=[];function uC(e,t,n,r){let i=IS(e),a=e.type_;if(r!==void 0&&TS(i,r,a)===t){ES(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;SS(i,(e,n)=>{if(_S(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??lC;for(let e of o)ES(i,e,n,a)}function dC(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!cC(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=LS(i);uC(e,i.draft_??i,a,n),fC(i,r)})}function fC(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)}sC(e)}}function pC(e,t,n){let{scope_:r}=e;if(_S(n)){let i=n[oS];cC(i,r)&&i.callbacks_.push(function(){CC(e),uC(e,n,LS(i),t)})}else vS(n)&&e.callbacks_.push(function(){let i=IS(e);e.type_===3?i.has(n)&&mC(n,r.handledSet_,r):TS(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&mC(TS(e.copy_,t,e.type_),r.handledSet_,r)})}function mC(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||_S(e)||t.has(e)||!vS(e)||HS(e)?e:(t.add(e),SS(e,(r,i)=>{if(_S(i)){let t=i[oS];cC(t,n)&&(ES(e,r,LS(t),e.type_),sC(t))}else vS(i)&&mC(i,t,n)}),e)}function hC(e,t){let n=OS(e),r={type_:+!!n,scope_:t?t.scope_:ZS(),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=gC;n&&(i=[r],a=_C);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var gC={get(e,t){if(t===oS)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=IS(e);if(!wS(i,t,e.type_))return bC(e,i,t);let a=i[t];if(e.finalized_||!vS(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&PS(t))return a;if(a===vC(e.base_,t)||yC(e,t,a)){CC(e);let n=e.type_===1?+t:t,r=TC(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in IS(e)},ownKeys(e){return Reflect.ownKeys(IS(e))},set(e,t,n){let r=xC(IS(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=vC(IS(e),t),i=r?.[oS];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(DS(n,r)&&(n!==void 0||wS(e.base_,t,e.type_)))return!0;CC(e),SC(e)}return e.copy_[t]===n&&(n!==void 0||wS(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),pC(e,t,n),!0)},deleteProperty(e,t){return CC(e),vC(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),SC(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=IS(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[hS]:!0,[pS]:e.type_!==1||t!==`length`,[mS]:r[mS],[gS]:n[t]}},defineProperty(){cS(11)},getPrototypeOf(e){return uS(e.base_)},setPrototypeOf(){cS(12)}},_C={};for(let e in gC){let t=gC[e];_C[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}_C.deleteProperty=function(e,t){return isNaN(parseInt(t))&&cS(13),_C.set.call(this,e,t,void 0)},_C.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&cS(14),gC.set.call(this,e[0],t,n,e[0])};function vC(e,t){let n=e[oS];return(n?IS(n):e)[t]}function yC(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!vS(n)||n[oS]?!1:e.baseRefs_.has(n)}function bC(e,t,n){let r=xC(t,n);return r?gS in r?r[gS]:r.get?.call(e.draft_):void 0}function xC(e,t){if(!(t in e))return;let n=uS(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=uS(n)}}function SC(e){e.modified_||(e.modified_=!0,e.parent_&&SC(e.parent_))}function CC(e){e.copy_||=(e.assigned_=new Map,RS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var wC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(MS(e)&&!MS(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}MS(t)||cS(6),n!==void 0&&!MS(n)&&cS(7);let r;if(vS(e)){let i=nC(this),a=TC(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?eC(i):tC(i)}return $S(i,n),iC(r,i)}if(!e||!jS(e)){if(r=t(e),r===void 0&&(r=e),r===iS&&(r=void 0),this.autoFreeze_&&zS(r,!0),n){let t=[],i=[];qS(WS).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}cS(1,e)},this.produceWithPatches=(e,t)=>{if(MS(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]},NS(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),NS(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),NS(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){vS(e)||cS(8),_S(e)&&(e=EC(e));let t=nC(this),n=TC(t,e,void 0);return n[oS].isManual_=!0,tC(t),n}finishDraft(e,t){let n=e&&e[oS];(!n||!n.isManual_)&&cS(9);let{scope_:r}=n;return $S(r,t),iC(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=qS(WS).applyPatches_;return _S(e)?r(e,t):this.produce(e,e=>r(e,t))}};function TC(e,t,n,r){let[i,a]=kS(t)?qS(US).proxyMap_(t,n):AS(t)?qS(US).proxySet_(t,n):hC(t,n);return(n?.scope_??ZS()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?dC(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 EC(e){return _S(e)||cS(10,e),DC(e)}function DC(e){if(!vS(e)||HS(e))return e;let t=e[oS],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=RS(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=RS(e,!0);return SS(n,(e,t)=>{ES(n,e,DC(t))},r),t&&(t.finalized_=!1),n}function OC(){sS.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=FS(TS(e,n.key_)),i=TS(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||wS(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e{let u=TS(o,e,c),f=TS(s,e,c),p=l?wS(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===iS?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(AS(e))return new Set(Array.from(e).map(u));let t=Object.create(uS(e));for(let n in e)t[n]=u(e[n]);return wS(e,aS)&&(t[aS]=e[aS]),t}function d(e){return _S(e)?u(e):e}YS(WS,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var kC=new wC,AC=kC.produce,jC=kC.produceWithPatches.bind(kC),MC=kC.applyPatches.bind(kC),NC=1e3;function PC(e,t){if(e.add(t),e.size>NC){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function FC(e){let{enablePatches:t=!1}=e;t&&OC();let n=Yx(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=rS())=>{i.has(t)||(OC(),r=MC(r,e),PC(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=rS())=>{if(!i.has(a)){if(PC(i,a),t){let[t,i]=jC(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=AC(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var IC=typeof self==`object`?self:globalThis,LC=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),RC=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function zC(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=LC.has(e)?IC[e]:void 0;return n(new(r??IC.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`&&RC.has(a))return n(new IC[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function BC(e){return zC(new Map,e)(0)}var VC=``,{toString:HC}={},{keys:UC}=Object;function WC(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=HC.call(e).slice(8,-1);switch(n){case`Array`:return[1,VC];case`Object`:return[2,VC];case`Date`:return[3,VC];case`RegExp`:return[4,VC];case`Map`:return[5,VC];case`Set`:return[6,VC];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function GC([e,t]){return e===0&&(t===`function`||t===`symbol`)}function KC(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]=WC(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 UC(r))(e||!GC(WC(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||!(GC(WC(n))||GC(WC(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!GC(WC(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function qC(e,t={}){let n=[];return KC(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:JC,stringify:YC}=JSON,XC={json:!0,lossy:!0};function ZC(e){return BC(JC(e))}function QC(e){return YC(qC(e,XC))}function $C(e){return BC(e)}function ew(e){return QC(e)}function tw(e){return ZC(e)}var nw=256,rw=class extends Error{name=`StreamClosedError`};function iw(e={}){let t=e.id??rS(),n=Math.max(0,e.replayWindow??0),r=Yx(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new rw(`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=ow(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 aw(e={}){let t=e.id??rS(),n=Math.max(1,e.highWaterMark??nw),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function ow(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 sw=128;function cw(e){return e.replace(/[^\w-]+/g,`_`).slice(0,sw)}var lw=`modulepreload`,uw=function(e,t){return new URL(e,t).href},dw={},fw=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=uw(t,n),t=s(t),t in dw)return;dw[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`:lw,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)})},pw=`__connection.json`,mw=`__DEVFRAME_CONNECTION__`,hw=`x-birpc-session`,gw=`__rpc-dump/index.json`,_w=`devframe:services`,vw=`devframe_otp`,yw=`devframe_auth_token`;hx.postMessage.remoteAssetsError;var bw=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Jx(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()}},xw=vx({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 Sw(e){if(e.agent&&e.jsonSerializable===!1)throw xw.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function Cw(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function ww(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 Tw(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 Ow(e,t){let n=e.handler;if(!n){let r=await Dw(e,t);if(!r.handler)throw xw.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 Tw(e.name,r,t),o=await a(...n);return await Ew(e.name,i,o)}}var kw=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 Ow(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 xw.DF0021({name:e.name});Sw(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 xw.DF0022({name:e.name});Sw(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 Ow(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw xw.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 Aw(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 Mw(t,`undefined`,r,e);return n}return i!==null&&jw(i,r,e,t),n})}function jw(e,t,n,r){if(typeof e==`bigint`)throw Mw(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw Mw(r,`Map`,t,n);if(e instanceof Set)throw Mw(r,`Set`,t,n);if(e instanceof Date)throw Mw(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw Mw(r,e.constructor?.name??`class instance`,t,n)}function Mw(e,t,n,r){let i=Nw(n,r);return xw.DF0020({name:e||``,type:t,path:i})}function Nw(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var Pw=`__DEVFRAME_CONNECTION_META__`,Fw=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function Iw(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 Lw(){return Iw(mw)}function Rw(){return Iw(Pw)}function zw(e){if(e)return e;try{let e=localStorage.getItem(Fw);if(e)return e}catch{}return Iw(Fw)}function Bw(e){globalThis[mw]=e,globalThis[Pw]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&Vw(e.authToken)}function Vw(e){try{localStorage.setItem(Fw,e)}catch{}globalThis[Fw]=e;let t=Lw();t&&(globalThis[mw]={...t,authToken:e})}function Hw(e){let t=eS(pw,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function Uw(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function Ww(){let e=Lw();if(e)return Uw(e,zw()??e.authToken??e.connectionMeta.authToken);let t=Rw();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??Hw(`./`),authToken:zw(t.authToken)}}async function Gw(e={}){if(e.connection){let t=Uw(e.connection,zw(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return Bw(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:Hw(t[0]??`./`),authToken:zw(e.authToken??e.connectionMeta.authToken)};return Bw(n),n}let n=Ww();if(n){let t=Uw(n,zw(e.authToken??n.authToken??n.connectionMeta.authToken));return Bw(t),t}let r=[];for(let n of t){let t=eS(pw,n),i=Hw(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:zw(e.authToken??r.authToken)};return Bw(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var Kw=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function qw(e=vw){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function Jw(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 Yw(e=vw){let t=qw(e);return t&&Jw(e),t}async function Xw(e,t={}){let n=Yw(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function Zw(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(_w,{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 Qw(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:hx.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:hx.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=FC({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise(t=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(hx.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var $w=new Map;function eT(e=$w){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?Aw(n,r??``):`s:${ew(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?tw(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function tT(){}function nT(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 rT(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 iT(e){let{onConnected:t=tT,onError:n=tT,onDisconnected:r=tT,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${yw}=${encodeURIComponent(e.authToken)}`);let s=eT(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function h(e){l||(l=!0,p(e),n(e),r())}function g(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function _(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function ee(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=nT(r);if(!e)break;r=e.rest;let{event:t,data:n}=rT(e.frame);n.length>0&&_(t,n.join(` -`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await ee(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[hw]: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 aT(e,t){let{channel:n,rpcOptions:r={}}=t;return Ox(e,{...n,timeout:-1,...r,proxify:!1})}function oT(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(hx.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new Kw(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Kw(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(hx.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 Kw(`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(hx.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let ee=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(hx.client.connectionError,e),m(new Kw(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Kw(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=aT(a.functions,{channel:ee,rpcOptions:o});a.register({name:hx.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Kw(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(hx.client.connectionError,e),m(e),i.emit(hx.client.isTrustedUpdated,!1)}});let ne=n;async function re(e){ne=e;let t=await te.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new Kw(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(hx.client.connectionError,e)}return i.emit(hx.client.isTrustedUpdated,c),t.isTrusted}async function ie(e){let t=(await te.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(ne=t,c=!0,d.resolve(!0),f(`connected`),i.emit(hx.client.isTrustedUpdated,!0)),t}async function ae(e={}){await te.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function oe(){return c?!0:re(ne??``)}async function se(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:oe,requestTrustWithToken:re,requestTrustWithCode:ie,requestAuthCode:ae,ensureTrusted:se,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(hx.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(hx.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(hx.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function sT(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 cT(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=sT(n.sse,r??`./`,location);return oT({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>iT({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 lT(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:uT(r)?lT(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function uT(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function dT(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function fT(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function pT(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function mT(e){if(e.error)throw lT(e.error);return e.output}function hT(e){return e.some(e=>e!=null)}function gT(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function _T(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?$C(e):e}function a(e,t){return i(gT(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 pT(r)?mT(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(dT(r)){if(hT(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(fT(r)){let e=Jx(n),i=r.records[e];if(i)return mT(await s(i,r.serialization));if(r.fallback)return mT(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!hT(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 vT(e){let t=_T(await e.fetchJsonFromBases(gw),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 yT=``;function bT(e,t){return`${e}${yT}${t}`}function xT(e){let t=new Map,n=new Map;e.client.register({name:hx.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(bT(e,n))?._push(r,i)}}),e.client.register({name:hx.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=bT(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:hx.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=bT(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(hx.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(yT);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=bT(n,r),o=t.get(a);if(o)return o;let s=aw({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(hx.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=bT(t,r),a=n.get(i);if(a)return a;let o=iw({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 ST(){}var CT=new Map;function wT(e){let t=e.url;e.authToken&&(t=`${t}?${yw}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=ST,onError:i=ST,onDisconnected:a=ST,definitions:o=CT}=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=eT(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 TT(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 tS(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function ET(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=TT(n.websocket,r??`./`,location);return oT({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>wT({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 DT(e){return e.includes(`:`)}function OT(e,t){return DT(t)?t:`${e}:${t}`}function kT(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function AT(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return kT(a)}function jT(e,t){return{global:AT(e,t,`global`),project:AT(e,t,`project`)}}function MT(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(DT(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(OT(t,n),...r)),callEvent:((n,...r)=>e.callEvent(OT(t,n),...r)),callOptional:((n,...r)=>e.callOptional(OT(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(OT(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(OT(t,n),r,i),upload:(n,r)=>e.streaming.upload(OT(t,n),r)}},settings:jT(e,t),scope:e.scope}}function NT(){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 PT(e,t={}){let n=t.modelContext??NT();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=cw(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=kx(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Mx(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>FT(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 FT(e,t,n){try{let r=Px(n,e.args?.length);return{content:[{type:`text`,text:IT(await(await Ow(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:LT(e)}]}}}function IT(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function LT(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 RT(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 zT(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Yx(),a=Array.isArray(t)?t:[t],o=await Gw(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new bw({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new kw(f),m=e.webmcp===!1?void 0:PT(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(eS(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 ee={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},te=RT(e.transport??`auto`,s),ne=te===`static`?await vT({fetchJsonFromBases:_}):te===`sse`?cT({...ee,sseOptions:e.sseOptions}):ET({...ee,wsOptions:e.wsOptions}),re;try{re=new BroadcastChannel(`devframe-auth`)}catch{}let ie,ae=!1;function oe(e){return((...t)=>ae||!ie?e(...t):ie.then(()=>e(...t)))}function se(){g=!0;try{h?.(),m?.()}finally{try{re?.close()}finally{ne.close?.()}}}let ce={events:i,get isTrusted(){return ne.isTrusted},get status(){return ne.status},get connectionError(){return ne.connectionError},get transport(){return ne.transport??te},get connection(){return o},connectionMeta:s,ensureTrusted:ne.ensureTrusted,requestTrust:ne.requestTrust,requestTrustWithToken:async e=>(Vw(e),o={...o,authToken:e},ne.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ne.requestTrustWithCode(e);if(!t)return!1;Vw(t),o={...o,authToken:t};try{re?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>ne.requestAuthCode(e),call:oe(ne.call),callEvent:oe(ne.callEvent),callOptional:oe(ne.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:se};ce.sharedState=Qw(ce),ce.streaming=xT(ce),ce.services=Zw(ce);let le=new Map;ce.scope=(e=>{if(!e)return ce;let t=le.get(e);return t||(t=MT(ce,e),le.set(e,t)),t}),f.rpc=ce;function ue(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function de(){if(e.simpleAuth!==!1&&ue()&&typeof globalThis.prompt==`function`)for(await ce.requestAuthCode().catch(()=>{});!ce.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 ce.requestTrustWithCode(t))return}}async function fe(){let t=await ne.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await Xw(ce,{param:n}):!1;t||r||ce.isTrusted||await de()}return ie=fe().then(()=>{ae=!0},()=>{ae=!0}),s.mcp&&fw(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-85BPnAAT.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(ce))}).catch(()=>{}),re&&(re.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&ce.requestTrustWithToken(e.data.authToken)}),ce}var BT=zT,VT=[`components`,`injectors`,`signals`,`ngrx`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`],HT=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function UT(e){return`pangular:${e}`}var WT=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`],GT={refreshMs:{default:3e3,min:500,max:8e3},navigations:{default:50,min:5,max:500},formTimeline:{default:200,min:10,max:2e3},httpCalls:{default:200,min:10,max:2e3},changeLog:{default:200,min:10,max:2e3},cdCycles:{default:200,min:10,max:2e3},capacitorCalls:{default:200,min:10,max:2e3},idleAfterMs:{default:6e4,min:0,max:6e5}},KT={"opted-out":`the request sets transferCache: false`,post:`POST requests are left out unless includePostRequests is set`,method:`only GET, HEAD and POST requests are cached`,"auth-headers":`it sends an Authorization, Proxy-Authorization or Cookie header`,credentials:`it sends credentials (withCredentials or credentials: include/same-origin)`,"no-cache-request":`the request asks for no-store, no-cache or private`,"no-cache-response":`the response has Cache-Control no-store, no-cache or private`,"set-cookie":`the response sets a cookie`,error:`failed responses are not stored`,mocked:`a fault rule answered before the transfer cache ran`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},qT=[[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 JT(e){return qT.some(([t])=>t===e)}var YT=`pangular`,XT={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},ZT=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function QT(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=XT[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[...ZT.filter(e=>n.has(e)),r].join(`+`)}function $T(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 eE(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 tE=[{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:`forms`,label:`Forms`,inspector:`forms`},{id:`pipes`,label:`Pipes`,inspector:`pipes`},{id:`network`,label:`SSR & HTTP`,inspector:`http`},{id:`errors`,label:`Errors`,inspector:`errors`},{id:`capacitor`,label:`Capacitor`,inspector:`capacitor`}],nE=1e4;function rE(e){return tE.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var iE={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,forms:`a form, by its id`},aE=200;function oE(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 sE(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=aE?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 cE=[{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 lE(e){let t=rE(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=cE.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function uE(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function dE(e,t){return typeof e==`boolean`?e:t}var fE=100,pE=100;function mE(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=pE);return[...new Set(t)].slice(0,fE)}function hE(e,t){let{default:n,min:r,max:i}=GT[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function gE(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function _E(e){let t=uE(e),n=uE(t.agent),r=uE(t.inspectors),i=uE(n.tools),a=uE(t.actions),o=dE(t.actions,!0),s=uE(t.redaction),c=uE(t.limits),l=gE(VT,e=>dE(r[e],!0));return{inspectors:l,agent:{readOnly:dE(n.readOnly,!1),tools:gE(VT,e=>l[e]&&dE(i[e],!0)),browserTools:dE(n.browserTools,!1)},actions:gE(WT,e=>l[e]&&dE(a[e],o)),redaction:{secretNames:mE(s.secretNames),unmask:mE(s.unmask)},limits:Object.fromEntries(Object.keys(GT).map(e=>[e,hE(c[e],e)])),popup:{hotkey:vE(uE(t.popup).hotkey)}}}function vE(e){return e===!1?!1:QT(e)??`Alt+Shift+P`}function yE(e){let t=e?.configs;return _E(t?.[YT])}function bE(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state and dispatching actions`,http:`Changing HTTP mock rules and SSR overrides, and clearing HTTP calls`,analog:`Calling API routes and clearing server calls`,components:`Editing component properties and signals`}[e]} is turned off in the devtools config (actions.${e}).`}var xE={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`},SE={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore and dispatch`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`},CE={refreshMs:e=>`poll every ${e} ms`,navigations:e=>`${e} navigations`,formTimeline:e=>`${e} form events`,httpCalls:e=>`${e} HTTP calls`,changeLog:e=>`${e} NgRx changes`,cdCycles:e=>`${e} change detection cycles`,capacitorCalls:e=>`${e} Capacitor plugin calls`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function wE(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=VT.filter(t=>e.inspectors[t]);return n(`Inspectors off`,VT.filter(t=>!e.inspectors[t]).map(e=>xE[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>xE[e])),n(`Blocked actions`,WT.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>SE[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(GT).filter(t=>e.limits[t]!==GT[t].default).map(t=>CE[t](e.limits[t]))),e.popup.hotkey!==`Alt+Shift+P`&&n(`Popup shortcut`,[e.popup.hotkey===!1?`Off`:e.popup.hotkey]),t}function TE(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 EE(e){return!e.tags.length&&!e.directives.length&&!e.text}function DE(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 OE={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 kE(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function AE(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function jE(e,t){let n=AE(e),r=AE(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function ME(e,t){return e?.capabilities?.[t]===!1}function NE(e,t){let n=OE[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=kE(t);return jE(t,n.since)?`${r} in a development build; this page runs Angular ${i} without it, which usually means a production build.`:`${r}; this page runs Angular ${i}.`}var PE=`pangular-page-id`,FE=null;function IE(e){FE=e}function LE(){if(FE)return FE;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(PE)||null)}catch{return null}}function RE(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 zE(e,t){return e?t?e.pages?.[t]??null:e:null}function BE(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function VE(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function HE(e,t,n){return VE(e,t,n).then(e=>e,()=>null)}function UE(e){return e?.connectionMeta.backend===`static`}function WE(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 GE(e){return e.split(`@`)[1]??``}var KE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},qE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},JE=HE,YE={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 XE(e){return YE[e]??e}var ZE=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function QE(e,t){return await JE(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function $E(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 eD=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function tD(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(eD,(e,t)=>t??(e===`**`?``:e))}function nD(e){return yE(e?.connectionMeta)}function rD(e,t){return nD(e).actions[t]}var iD={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`};function aD(e){return iD[e]}var oD=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function sD(e,t){let n=iD[e];return!n||t.inspectors[n]}function cD(e,t){e&1&&(D(),Vg(0,`rect`,4)(1,`rect`,5)(2,`rect`,6)(3,`rect`,7))}function lD(e,t){e&1&&(D(),Vg(0,`path`,8)(1,`circle`,9)(2,`circle`,10)(3,`path`,11))}function uD(e,t){e&1&&(D(),Vg(0,`path`,12)(1,`path`,13))}function dD(e,t){e&1&&(D(),Vg(0,`path`,14)(1,`path`,15)(2,`path`,16))}function fD(e,t){e&1&&(D(),Vg(0,`circle`,17)(1,`path`,18)(2,`circle`,19))}function pD(e,t){e&1&&(D(),Vg(0,`path`,1))}function mD(e,t){e&1&&(D(),Vg(0,`path`,20)(1,`path`,21)(2,`path`,22)(3,`path`,23))}function hD(e,t){e&1&&(D(),Vg(0,`ellipse`,24)(1,`path`,25)(2,`path`,26))}function gD(e,t){e&1&&(D(),Vg(0,`rect`,27)(1,`path`,28)(2,`path`,29)(3,`path`,30))}function _D(e,t){e&1&&(D(),Vg(0,`circle`,31)(1,`path`,8)(2,`path`,32))}function vD(e,t){e&1&&(D(),Vg(0,`path`,33)(1,`path`,34)(2,`path`,35)(3,`path`,36)(4,`circle`,37))}function yD(e,t){e&1&&(D(),Vg(0,`circle`,38)(1,`path`,39))}function bD(e,t){e&1&&(D(),Vg(0,`circle`,31)(1,`path`,40)(2,`path`,41))}function xD(e,t){e&1&&(D(),Vg(0,`path`,2))}function SD(e,t){e&1&&(D(),Vg(0,`path`,3))}var CD=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:16,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`,`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`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`]],template:function(e,t){if(e&1&&(D(),B(0,`svg`,0),M(1,cD,4,0)(2,lD,4,0)(3,uD,2,0)(4,dD,3,0)(5,fD,3,0)(6,pD,1,0,`:svg:path`,1)(7,mD,4,0)(8,hD,3,0)(9,gD,4,0)(10,_D,3,0)(11,vD,5,0)(12,yD,2,0)(13,bD,3,0)(14,xD,1,0,`:svg:path`,2)(15,SD,1,0,`:svg:path`,3),V()),e&2){let e;k(),N((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===`errors`?13:e===`analog`?14:e===`capacitor`?15:-1)}},styles:[`[_nghost-%COMP%] { +`);return r>=0?n.slice(0,r):n}function li(e,t){return e?t?`${e} ${t}`:e:t||``}var ui=si({__forward_ref__:si});function di(e){return e.__forward_ref__=di,e}function fi(e){return pi(e)?e():e}function pi(e){return typeof e==`function`&&Object.hasOwn(e,ui)&&e.__forward_ref__===di}function mi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function hi(e){return gi(e,yi)}function gi(e,t){return Object.hasOwn(e,t)&&e[t]||null}function _i(e){return(e?.[yi]??null)||null}function vi(e){return e&&Object.hasOwn(e,bi)?e[bi]:null}var yi=si({ɵprov:si}),bi=si({ɵinj:si}),xi=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=mi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Si(e){return e&&!!e.ɵproviders}var Ci=si({ɵcmp:si}),wi=si({ɵdir:si}),Ti=si({ɵpipe:si}),Ei=si({ɵfac:si}),Di=si({__NG_ELEMENT_ID__:si}),Oi=si({__NG_ENV_ID__:si});function ki(e){return Mi(e,`@Component`),e[Ci]||null}function Ai(e){return Mi(e,`@Directive`),e[wi]||null}function ji(e){return Mi(e,`@Pipe`),e[Ti]||null}function Mi(e,t){if(e==null)throw new ii(-919,!1)}function Ni(e){return typeof e==`string`?e:e==null?``:String(e)}var Pi=si({ngErrorCode:si}),Fi=si({ngErrorMessage:si}),Ii=si({ngTokenPath:si});function Li(e,t){return zi(``,-200,t)}function Ri(e,t){throw new ii(-201,!1)}function zi(e,t,n){let r=new ii(t,e);return r[Pi]=t,r[Fi]=e,n&&(r[Ii]=n),r}function Bi(e){return e[Pi]}var Vi;function Hi(){return Vi}function Ui(e){let t=Vi;return Vi=e,t}function Wi(e,t,n){let r=hi(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;Ri(e,``)}var Gi=globalThis,Ki={},qi=`__NG_DI_FLAG__`,Ji=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=Zi(t)||0;try{return this.injector.get(e,n&8?null:Ki,n)}catch(e){if(nr(e))return e;throw e}}};function Yi(e,t=0){let n=$n();if(n===void 0)throw new ii(-203,!1);if(n===null)return Wi(e,void 0,t);{let r=Qi(t),i=n.retrieve(e,r);if(nr(i)){if(r.optional)return null;throw i}return i}}function Xi(e,t=0){return(Hi()||Yi)(fi(e),t)}function C(e,t){return Xi(e,Zi(t))}function Zi(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Qi(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function $i(e){let t=[];for(let n=0;nArray.isArray(e)?ia(e,t):t(e))}function aa(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function oa(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function sa(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 la(e,t,n){let r=da(e,t);return r>=0?e[r|1]=n:(r=~r,ca(e,r,t,n)),r}function ua(e,t){let n=da(e,t);if(n>=0)return e[n|1]}function da(e,t){return fa(e,t,1)}function fa(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 ia(t,e=>{let t=e;Sa(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&xa(i,a),n}function xa(e,t){for(let n=0;n{t(e,r)})}}function Sa(e,t,n,r){if(e=fi(e),!e)return!1;let i=null,a=vi(e),o=!a&&ki(e);if(!a&&!o){let t=e.ngModule;if(a=vi(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)Sa(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{ia(a.imports,i=>{Sa(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&xa(e,t)}if(!s){let e=ta(i)||(()=>new i);t({provide:i,useFactory:e,deps:ma},i),t({provide:_a,useValue:i,multi:!0},i),t({provide:ha,useValue:()=>Xi(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Ca(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Ca(e,t){for(let n of e)Si(n)&&(n=n.ɵproviders),Array.isArray(n)?Ca(n,t):t(n)}var wa=si({provide:String,useValue:si});function Ta(e){return typeof e==`object`&&!!e&&wa in e}function Ea(e){return!!(e&&e.useExisting)}function Da(e){return!!(e&&e.useFactory)}function Oa(e){return typeof e==`function`}var ka=new xi(``),Aa={},ja={},Ma=void 0;function Na(){return Ma===void 0&&(Ma=new va),Ma}var Pa=class{},Fa=class extends Pa{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,Ga(e,e=>this.processProvider(e)),this.records.set(ga,Va(void 0,this)),r.has(`environment`)&&this.records.set(Pa,Va(void 0,this));let i=this.records.get(ka);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(_a,ma,{self:!0}))}retrieve(e,t){let n=Zi(t)||0;try{return this.get(e,Ki,n)}catch(e){if(nr(e))return e;throw e}}destroy(){Ba(this),this._destroyed=!0;let e=pn(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(),pn(e)}}onDestroy(e){return Ba(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ba(this);let t=er(this),n=Ui(void 0);try{return e()}finally{er(t),Ui(n)}}get(e,t=Ki,n){if(Ba(this),Object.hasOwn(e,Oi))return e[Oi](this);let r=Zi(n),i=er(this),a=Ui(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Wa(e)&&hi(e);t=n&&this.injectableDefInScope(n)?Va(Ia(e),Aa):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Na():this.parent;return t=r&8&&t===Ki?null:t,n.get(e,t)}catch(e){let t=Bi(e);throw t===-200||t===-201?new ii(t,null):e}finally{Ui(a),er(i)}}resolveInjectorInitializers(){let e=pn(null),t=er(this),n=Ui(void 0);try{let e=this.get(ha,ma,{self:!0});for(let t of e)t()}finally{er(t),Ui(n),pn(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=fi(e);let t=Oa(e)?e:fi(e&&e.provide),n=Ra(e);if(!Oa(e)&&e.multi===!0){let n=this.records.get(t);n||(n=Va(void 0,Aa,!0),n.factory=()=>$i(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=pn(null);try{if(t.value===ja)throw Li(``);return t.value===Aa&&(t.value=ja,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Ua(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{pn(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=fi(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 Ia(e){let t=hi(e),n=t===null?ta(e):t.factory;if(n!==null)return n;if(e instanceof xi)throw new ii(-204,!1);if(e instanceof Function)return La(e);throw new ii(-204,!1)}function La(e){if(e.length>0)throw new ii(-204,!1);let t=_i(e);return t===null?()=>new e:()=>t.factory(e)}function Ra(e){return Ta(e)?Va(void 0,e.useValue):Va(za(e),Aa)}function za(e,t,n){let r;if(Oa(e)){let t=fi(e);return ta(t)||Ia(t)}if(Ta(e))r=()=>fi(e.useValue);else if(Da(e))r=()=>e.useFactory(...$i(e.deps||[]));else if(Ea(e))r=(t,n)=>Xi(fi(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=fi(e&&(e.useClass||e.provide));if(Ha(e))r=()=>new t(...$i(e.deps));else return ta(t)||Ia(t)}return r}function Ba(e){if(e.destroyed)throw new ii(-205,!1)}function Va(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Ha(e){return!!e.deps}function Ua(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Wa(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Ga(e,t){for(let n of e)Array.isArray(n)?Ga(n,t):n&&Si(n)?Ga(n.ɵproviders,t):t(n)}function Ka(e,t){let n;e instanceof Fa?(Ba(e),n=e):n=new Ji(e);let r=er(n),i=Ui(void 0);try{return t()}finally{er(r),Ui(i)}}function qa(){return Hi()!==void 0||$n()!=null}var Ja=1;function Ya(e){return Array.isArray(e)&&typeof e[Ja]==`object`}function Xa(e){return Array.isArray(e)&&e[Ja]===!0}function Za(e){return!!(e.flags&4)}function Qa(e){return e.componentOffset>-1}function $a(e){return(e.flags&1)==1}function eo(e){return!!e.template}function to(e){return!!(e[2]&512)}function no(e){return(e[2]&256)==256}var ro=(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})(ro||{}),io=`math`;function ao(e){for(;Array.isArray(e);)e=e[0];return e}function oo(e,t){return ao(t[e])}function so(e,t){return ao(t[e.index])}function co(e,t){return e.data[t]}function lo(e,t){return e[t]}function uo(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function fo(e,t){let n=t[e];return Ya(n)?n:n[0]}function po(e){return(e[2]&128)==128}function mo(e){return Xa(e[3])}function ho(e,t){return t==null?null:e[t]}function go(e){e[17]=0}function _o(e){e[2]&1024||(e[2]|=1024,po(e)&&xo(e))}function vo(e,t){for(;e>0;)t=t[14],e--;return t}function yo(e){return!!(e[2]&9216||e[24]?.dirty)}function bo(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),yo(e)&&xo(e)}function xo(e){e[10].changeDetectionScheduler?.notify(0);let t=wo(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!po(t)));)t=wo(t)}function So(e,t){if(no(e))throw new ii(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Co(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function wo(e){let t=e[3];return Xa(t)?t[3]:t}function To(e){return e[7]??=[]}function Eo(e){return e.cleanup??=[]}function Do(e,t,n,r){let i=To(t);i.push(n),e.firstCreatePass&&Eo(e).push(r,i.length-1)}var Oo={lFrame:ls(null),bindingsEnabled:!0,skipHydrationRootTNode:null},ko=!1;function Ao(){return Oo.lFrame.elementDepthCount}function jo(){Oo.lFrame.elementDepthCount++}function Mo(){Oo.lFrame.elementDepthCount--}function No(){return Oo.bindingsEnabled}function Po(){return Oo.skipHydrationRootTNode!==null}function Fo(e){return Oo.skipHydrationRootTNode===e}function Io(){Oo.skipHydrationRootTNode=null}function w(){return Oo.lFrame.lView}function Lo(){return Oo.lFrame.tView}function T(e){return Oo.lFrame.contextLView=e,e[8]}function E(e){return Oo.lFrame.contextLView=null,e}function Ro(){let e=zo();for(;e!==null&&e.type===64;)e=e.parent;return e}function zo(){return Oo.lFrame.currentTNode}function Bo(){let e=Oo.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Vo(e,t){let n=Oo.lFrame;n.currentTNode=e,n.isParent=t}function Ho(){return Oo.lFrame.isParent}function Uo(){Oo.lFrame.isParent=!1}function Wo(){return Oo.lFrame.contextLView}function Go(){return ko}function Ko(e){let t=ko;return ko=e,t}function qo(){let e=Oo.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Jo(){return Oo.lFrame.bindingIndex}function Yo(e){return Oo.lFrame.bindingIndex=e}function Xo(){return Oo.lFrame.bindingIndex++}function Zo(e){let t=Oo.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Qo(){return Oo.lFrame.inI18n}function $o(e,t){let n=Oo.lFrame;n.bindingIndex=n.bindingRootIndex=e,ts(t)}function es(){return Oo.lFrame.currentDirectiveIndex}function ts(e){Oo.lFrame.currentDirectiveIndex=e}function ns(e){let t=Oo.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function rs(){return Oo.lFrame.currentQueryIndex}function is(e){Oo.lFrame.currentQueryIndex=e}function as(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function os(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=as(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=Oo.lFrame=cs();return r.currentTNode=t,r.lView=e,!0}function ss(e){let t=cs(),n=e[1];Oo.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function cs(){let e=Oo.lFrame,t=e===null?null:e.child;return t===null?ls(e):t}function ls(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 us(){let e=Oo.lFrame;return Oo.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var ds=us;function fs(){let e=us();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 ps(e){return(Oo.lFrame.contextLView=vo(e,Oo.lFrame.contextLView))[8]}function ms(){return Oo.lFrame.selectedIndex}function hs(e){Oo.lFrame.selectedIndex=e}function gs(){let e=Oo.lFrame;return co(e.tView,e.selectedIndex)}function D(){Oo.lFrame.currentNamespace=`svg`}function _s(){vs()}function vs(){Oo.lFrame.currentNamespace=null}function ys(){return Oo.lFrame.currentNamespace}var bs=!0;function xs(){return bs}function Ss(e){bs=e}function Cs(e,t=null,n=null,r){let i=ws(e,t,n,r);return i.resolveInjectorInitializers(),i}function ws(e,t=null,n=null,r,i=new Set){return new Fa([n||ma,ya(e)],t||Na(),null,i)}var Ts=class e{static THROW_IF_NOT_FOUND=Ki;static NULL=new va;static create(e,t){if(Array.isArray(e))return Cs({name:``},t,e,``);{let t=e.name??``;return Cs({name:t},e.parent,e.providers,t)}}static ɵprov=mi({token:e,providedIn:`any`,factory:()=>Xi(ga)});static __NG_ELEMENT_ID__=-1},Es=new xi(``),Ds=class{static __NG_ELEMENT_ID__=ks;static __NG_ENV_ID__=e=>e},Os=class extends Ds{_lView;constructor(e){super(),this._lView=e}get destroyed(){return no(this._lView)}onDestroy(e){let t=this._lView;return So(t,e),()=>Co(t,e)}};function ks(){return new Os(w())}var As=new xi(``),js=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new ti(!1);debugTaskTracker=C(As,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Wr(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=mi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Ms=class extends $r{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,qa()&&(this.destroyRef=C(Ds,{optional:!0})??void 0,this.pendingTasks=C(js,{optional:!0})??void 0)}emit(e){let t=pn(null);try{super.next(e)}finally{pn(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 _r&&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 Ns(...e){}function Ps(e){let t,n;function r(){e=Ns;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 Fs(e){return queueMicrotask(()=>e()),()=>{e=Ns}}var Is=`isAngularZone`,Ls=`isAngularZone_ID`,Rs=0,zs=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Ms(!1);onMicrotaskEmpty=new Ms(!1);onStable=new Ms(!1);onError=new Ms(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new ii(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,Us(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Is)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new ii(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new ii(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,Bs,Ns,Ns);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)}},Bs={};function Vs(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 Hs(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Ps(()=>{e.callbackScheduled=!1,Ws(e),e.isCheckStableRunning=!0,Vs(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Ws(e)}function Us(e){let t=()=>{Hs(e)},n=Rs++;e._inner=e._inner.fork({name:`angular`,properties:{[Is]:!0,[Ls]:n,[Ls+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Js(s))return n.invokeTask(i,a,o,s);try{return Gs(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Ks(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Gs(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Ys(s)&&t(),Ks(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Ws(e),Vs(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 Ws(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Gs(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Ks(e){e._nesting--,Vs(e)}var qs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Ms;onMicrotaskEmpty=new Ms;onStable=new Ms;onError=new Ms;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 Js(e){return Xs(e,`__ignore_ng_zone__`)}function Ys(e){return Xs(e,`__scheduler_tick__`)}function Xs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Zs=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},Qs=new xi(``,{factory:()=>{let e=C(zs),t=C(Pa),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Zs),n.handleError(r))})}}}),$s={provide:ha,useValue:()=>{C(Zs,{optional:!0})},multi:!0};function O(e,t){let[n,r,i]=Wn(e,t?.equal),a=n;return a[fn],a.set=r,a.update=i,a.asReadonly=ec.bind(a),a}function ec(){let e=this[fn];if(e.readonlyFn===void 0){let t=()=>this();t[fn]=e,e.readonlyFn=t}return e.readonlyFn}var tc=new xi(``,{factory:()=>nc}),nc=`ng`,rc=new xi(``),ic=new xi(``,{providedIn:`platform`,factory:()=>`unknown`}),ac=new xi(``,{factory:()=>C(Es).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),oc=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=sc}return e})();function sc(){return new oc(w(),Ro())}var cc=class{},lc=new xi(``,{factory:()=>!0}),uc=new xi(``),dc=(()=>{class e{static ɵprov=mi({token:e,providedIn:`root`,factory:()=>new fc})}return e})(),fc=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}},pc=class{[fn];constructor(e){this[fn]=e}destroy(){this[fn].destroy()}};function mc(e,t){let n=t?.injector??C(Ts),r=t?.manualCleanup===!0?null:n.get(Ds),i,a=n.get(oc,null,{optional:!0}),o=n.get(cc);return a===null?i=yc(e,n.get(dc),o):(i=vc(a.view,o,e),r instanceof Os&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new pc(i)}var hc={...Xn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Ko(!1);try{Zn(this)}finally{Ko(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=pn(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],pn(e)}}},gc={...hc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(On(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},_c={...hc,consumerMarkedDirty(){this.view[2]|=8192,xo(this.view),this.notifier.notify(13)},destroy(){if(On(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[fn]!==void 0}function Sc(e){return xc(e)&&typeof e.set==`function`}var Cc=Symbol(`InputSignalNode#UNSET`),wc={...Jn,transformFn:void 0,applyValueToInputSignal(e,t){Kn(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===pa)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:pa,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new Dc(l&&l.currentValue,n,c===pa),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,Di)&&(r=n[Di]),r??=n[Di]=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=Ml(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;Ri(t,`NodeInjector`)}function bl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Ui(void 0);try{return i?i.get(t,r,n&8):Wi(t,r,n&8)}finally{Ui(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=jl(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(!os(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))Ri(n);else return e}finally{ds()}}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?Qa(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&&eo(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 Li(``);let c=cl(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Ui(s.injectImpl):null;os(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&&Ui(l),cl(c),s.resolving=!1,ds()}}return a}function El(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Di)?e[Di]: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,Zi(n),t)}};function Al(){return new kl(Ro(),w())}function jl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!to(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=Ml(o),o=o[14]}a=t}return i}function Ml(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Nl(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Pl(){return Fl(Ro(),w())}function Fl(e,t){return new Il(so(e,t))}var Il=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Pl}return e})();function Ll(e){return e instanceof Il?e.nativeElement:e}function Rl(){return this._results[Symbol.iterator]()}var zl=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 $r}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=ra(e);(this._changesDetected=!na(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]=Rl};function Bl(e){return(e.flags&128)==128}var Vl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Vl||{}),Hl=new Map,Ul=0;function Wl(){return Ul++}function Gl(e){Hl.set(e[19],e)}function Kl(e){Hl.delete(e[19])}var ql=`__ngContext__`;function Jl(e,t){Ya(t)?(e[ql]=t[19],Gl(t)):e[ql]=t}function Yl(e){return Zl(e[12])}function Xl(e){return Zl(e[4])}function Zl(e){for(;e!==null&&!Xa(e);)e=e[4];return e}var Ql=void 0;function $l(e){Ql=e}function eu(){if(Ql!==void 0)return Ql;if(typeof document<`u`)return document;throw new ii(210,!1)}var tu=!1,nu=new xi(``,{factory:()=>tu}),ru=new WeakMap;function iu(e,t){if(typeof e!=`object`||!e)return;let n=ru.get(e);n||(n=new WeakSet,ru.set(e,n)),n.add(t)}function au(e){return(e.flags&32)==32}var ou=()=>null;function su(e,t,n=!1){return ou(e,t,n)}function cu(e,t){let n=e.contentQueries;if(n!==null){let r=pn(null);try{for(let r=0;r|^->||--!>|)/g,bu=`​$1​`;function xu(e){return e.replace(vu,e=>e.replace(yu,bu))}function Su(e,t){return e.createText(t)}function Cu(e,t,n){e.setValue(t,n)}function wu(e,t){return e.createComment(xu(t))}function Tu(e,t,n){return e.createElement(t,n)}function Eu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function Du(e,t,n){e.appendChild(t,n)}function Ou(e,t,n,r,i){r===null?Du(e,t,n):Eu(e,t,n,r,i)}function ku(e,t,n,r){e.removeChild(null,t,n,r)}function Au(e,t,n){e.setAttribute(t,`style`,n)}function ju(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function Mu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Qc(e,t,r),i!==null&&ju(e,t,i),a!==null&&Au(e,t,a)}function Nu(e){let t=Pu();return t?t.sanitize(ro.URL,e)||``:mu(e,`URL`)?pu(e):_u(Ni(e))}function Pu(){let e=w();return e&&e[10].sanitizer}function Fu(e){return e.ownerDocument.defaultView}function Iu(e){return e.ownerDocument}function Lu(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let n=t.length;if(i+n===r||e.charCodeAt(i+n)<=32)return i}n=i+1}}var Ru=`ng-template`;function zu(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(Uu(r))return!1;o=!0}}}}}return Uu(r)||o}function Uu(e){return!(e&1)}function Wu(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!==``&&!Uu(o)&&(t+=Xu(a,i),i=``),r=o,a||=!Uu(r);n++}return i!==``&&(t+=Xu(a,i)),t}function Qu(e){return e.map(Zu).join(`,`)}function $u(e){let t=[],n=[],r=1,i=2;for(;r!1});function ad(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function od(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function sd(e){let t=od(e,`transition-property`),n=od(e,`transition-duration`),r=od(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 cd(e){let t=od(e,`animation-name`),n=od(e,`animation-delay`),r=od(e,`animation-duration`),i=od(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 ld(e,t){return e!==void 0&&e.duration>t.duration}function ud(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function dd(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 fd(e,t){let n=getComputedStyle(e),r=cd(n),i=sd(n),a=r.duration>i.duration?r:i;ld(t.get(e),a)||ud(a)&&t.set(e,a)}function pd(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?fd(e,t):md(e,t,r)}function md(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=dd(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}ld(t.get(e),r)||ud(r)&&t.set(e,r)}var hd=new Set,gd=!1,_d=1,vd=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function yd(e){return e[9].get(id,gd)}function bd(e,t,n){let r=Sd.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else Sd.set(e,{classList:t,cleanupFns:n})}function xd(e){let t=Sd.get(e);if(t){for(let e of t.cleanupFns)e();Sd.delete(e)}Cd.delete(e)}var Sd=new WeakMap,Cd=new WeakMap,wd=new WeakMap;function Td(e){return e?e[14]??e:null}var Ed=new WeakSet;function Dd(e,t,n){let r=wd.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=Td(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 Od(e,t,n){let r=Td(n),i=wd.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):wd.set(e,[{el:t,declarationView:r}])}function kd(e){let t=e[26]??={};return t.enter??=new Map}function Ad(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 jd(e){return e.composedPath?e.composedPath()[0]:e.target}function Md(e,t){let n=Cd.get(t);if(n===void 0)return!0;if(t!==jd(e))return!1;let r=e.animation;if(r){let e=dd(r);if(e!==void 0&&e+_d{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=mi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),zd=[0,1,2,3],Bd=(()=>{class e{ngZone=C(zs);scheduler=C(cc);errorHandler=C(Zs,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){C(Fd,{optional:!0})}execute(){let e=this.sequences.size>0;e&&zc(Ec.AfterRenderHooksStart),this.executing=!0;for(let e of zd)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),xo(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(Pd.AFTER_NEXT_RENDER,e):e()}static ɵprov=mi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Vd=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 Hd(e,t){let n=t?.injector??C(Ts);return Ld(`NgAfterNextRender`),Wd(e,n,t,!0)}function Ud(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Wd(e,t,n,r){let i=t.get(Rd);i.impl??=t.get(Bd);let a=t.get(Fd,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(Ds),s=t.get(oc,null,{optional:!0}),c=new Vd(i.impl,Ud(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var Gd=new xi(``,{factory:()=>{let e=C(Pa),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function Kd(e,t,n){let r=e.get(Gd);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 qd(e,t){let n=e.get(Gd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Jd(e,t){let n=e.get(Gd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Yd(e){let t=e.get(Gd);t.isScheduled||=(Hd(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Xd(e){let t=e.get(Gd);t.scheduler=Yd,t.scheduler(e)}function Zd(e,t){for(let[n,r]of t)Kd(e,r.animateFns)}function Qd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&Zd(r,i)}function $d(e,t,n,r){try{n.get(ga)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&qd(n,i.enter.get(t.index).animateFns);let a=ef(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];nf(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&hd.add(e[19]),Kd(n,()=>tf(e,t,i||void 0,a,r),i||void 0)}function ef(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 tf(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&&nf(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),af(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&hd.delete(e[19]),i(!0)})}else e&&hd.delete(e[19]),i(!1)}function nf(e,t,n){if(t.type&12){let r=e[t.index];if(Xa(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,hd.delete(e[19])),n(!0)})}function of(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;Xa(i)?c=i:Ya(i)&&(l=!0,i=i[0]);let u=ao(i);e===0&&r!==null?(Qd(s,r,a,n),o==null?Du(t,r,u):Eu(t,r,u,o||null,!0)):e===1&&r!==null?(Qd(s,r,a,n),Eu(t,r,u,o||null,!0),Dd(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Od(a,u,s),Ed.delete(u),$d(s,a,n,e=>{if(Ed.has(u)){Ed.delete(u);return}ku(t,u,l,e)})):e===3&&(Ed.delete(u),$d(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Af(t,e,n,c,a,r,o)}}function sf(e,t){lf(e,t),t[0]=null,t[5]=null}function cf(e,t,n,r,i,a){r[0]=i,r[5]=t,Ef(e,r,n,1,i,a)}function lf(e,t){t[10].changeDetectionScheduler?.notify(9),Ef(e,t,t[11],2,null,null)}function uf(e){let t=e[12];if(!t)return pf(e[1],e);for(;t;){let n=null;if(Ya(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)Ya(t)&&pf(t[1],t),t=t[3];t===null&&(t=e),Ya(t)&&pf(t[1],t),n=t&&t[4]}t=n}}function df(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function ff(e,t){if(no(t))return;let n=t[11];n.destroyNode&&Ef(e,t,n,3,null,null),uf(t)}function pf(e,t){if(no(t))return;let n=pn(null);try{t[2]&=-129,t[2]|=256,t[24]&&On(t[24]),hf(e,t),mf(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&Xa(t[3])){n!==t[3]&&df(n,t);let r=t[18];r!==null&&r.detachView(e)}Kl(t)}finally{pn(n)}}function mf(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&&Bf(e,t,27,!1),zc(o?Ec.TemplateUpdateStart:Ec.TemplateCreateStart,i,n),n(r,i)}finally{hs(a),zc(o?Ec.TemplateUpdateEnd:Ec.TemplateCreateEnd,i,n)}}function Wf(e,t,n){Zf(e,t,n),(n.flags&64)==64&&Qf(e,t,n)}function Gf(e,t,n=so){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a{xo(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function Sp(e){let t=e[24]??Object.create(Cp);return t.lView=e,t}var Cp={...hn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=wo(e.lView);for(;t&&!wp(t[1]);)t=wo(t);t&&_o(t)},consumerOnSignalRead(){this.lView[24]=this}};function wp(e){return e.type!==2}function Tp(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 Ep=100;function Dp(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Op(e,t)}finally{n.end?.()}}function Op(e,t){let n=Go();try{Ko(!0),Pp(e,t);let n=0;for(;yo(e);){if(n===Ep)throw new ii(103,!1);n++,Pp(e,1)}}finally{Ko(n)}}function kp(e,t,n,r){if(no(t))return;let i=t[2];ss(t);let a=!0,o=null,s=null;wp(e)?(s=vp(t),o=Cn(s)):mn()===null?(a=!1,s=Sp(t),o=Cn(s)):t[24]&&=(On(t[24]),null);try{go(t),Yo(e.bindingStartIndex),n!==null&&Uf(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(jp(t),Tp(t),Ap(t,0),e.contentQueries!==null&&cu(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)}Ip(e,t);let o=e.components;o!==null&&Fp(t,o,0);let s=e.viewQuery;if(s!==null&&lu(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}gp(t),t[2]&=-73}catch(e){throw xo(t),e}finally{s!==null&&(Tn(s,o),a&&bp(s)),fs()}}function Ap(e,t){for(let n=Yl(e);n!==null;n=Xl(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=oa(e,10+t);sf(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 Up(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(Hp(e,n),oa(t,n))}this._attachedToViewContainer=!1}ff(this._lView[1],this._lView)}onDestroy(e){So(this._lView,e)}markForCheck(){Lp(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){bo(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Dp(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new ii(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=to(this._lView),t=this._lView[16];t!==null&&!e&&df(t,this._lView),lf(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new ii(902,!1);this._appRef=e;let t=to(this._lView),n=this._lView[16];n!==null&&!t&&Wp(n,this._lView),bo(this._lView)}},Kp=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=qp;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 Gp(fp(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function qp(){return Jp(Ro(),w())}function Jp(e,t){return e.type&4?new Kp(t,e,Fl(e,t)):null}function Yp(e,t,n,r,i){let a=e.data[t];if(a===null)a=Xp(e,t,n,r,i),Qo()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Bo();a.injectorIndex=e===null?-1:e.injectorIndex}return Vo(a,!0),a}function Xp(e,t,n,r,i){let a=zo(),o=Ho(),s=o?a:a&&a.parent,c=e.data[t]=Qp(e,s,n,t,r,i);return Zp(e,c,a,o),c}function Zp(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 Qp(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Po()&&(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:ys(),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 $p(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?em(e,n):r.push(e);e[6]=r}function em(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,nm=()=>null;function rm(e,t){return tm(e,t)}function im(e,t,n){return nm(e,t,n)}var am=class{},om=class{},sm=(()=>{class e{static ɵprov=mi({token:e,providedIn:`root`,factory:()=>null})}return e})();function cm(e){return e.debugInfo?.className||e.type.name||null}var lm={},um=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,lm,n);return r!==lm||t===lm?r:this.parentInjector.get(e,t,n)}};function dm(e,t,n){return e[t]=n}function fm(e,t){return e[t]}function pm(e,t,n){if(n===ed)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function mm(e,t,n,r){let i=pm(e,t,n);return pm(e,t+1,r)||i}function hm(e,t,n,r,i){let a=mm(e,t,n,r);return pm(e,t+2,i)||a}function gm(e,t,n,r,i,a){let o=mm(e,t,n,r);return mm(e,t+2,i,a)||o}function _m(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&iu(i,a),Lp(Qa(e)?fo(e.index,t):t,5);let o=t[8],s=vm(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=vm(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function vm(e,t,n,r){let i=pn(null);try{return zc(Ec.OutputStart,t,n),n(r)!==!1}catch(t){return op(e,t),!1}finally{zc(Ec.OutputEnd,t,n),pn(i)}}function ym(e,t,n,r,i,a,o,s){let c=$a(e),l=!1,u=null;if(!r&&c&&(u=xm(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=so(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);bm(a)||Sm(r?t=>r(ao(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function bm(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function xm(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 Sm(e,t,n,r,i,a,o){let s=t.firstCreatePass?Eo(t):null,c=To(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function Cm(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Sm(e.index,s,t,i,a,c,!0)}var wm=Symbol(`BINDING`),Tm=new xi(``);function Em(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 Bm(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&Vf.SignalBased)!==0};return i&&(a.transform=i),a})}function Jm(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Ym(e,t,n){let r=t instanceof Pa?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new um(n,r):n}function Xm(e){let t=e.get(om,null);if(t===null)throw new ii(407,!1);return{rendererFactory:t,sanitizer:e.get(sm,null),changeDetectionScheduler:e.get(cc,null),ngReflect:!1,tracingService:e.get(Fd,null,{optional:!0})}}function Zm(e,t,n){let r=$m(e);return Tu(t,r,r===`svg`?`svg`:r===`math`?io:n)}function Qm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new ii(905,!1)}function $m(e){return(e.selectors[0][0]||`div`).toLowerCase()}var eh=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=qm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Jm(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=Qu(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){zc(Ec.DynamicComponentStart);let s=pn(null);try{let s=this.componentDef,c=Ym(s,r||this.ngModule,e),l=Xm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(cm(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{pn(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=th(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Kf(l,r,s.encapsulation,t):Zm(s,l,o??null);Qm(u);let d=t.get(Tm,null),f=nh(u,()=>t.get(Es,null)??eu());d&&d.addHost(f);let p=a?.some(ih)||i?.some(e=>typeof e!=`function`&&e.bindings.some(ih)),m=Ff(null,c,null,512|Lf(s),null,null,e,l,t,null,su(u,t,!0));d&&Gm&&f instanceof ShadowRoot&&So(m,()=>{d.removeHost(f)}),m[27]=u,ss(m);let h=null;try{let e=Hm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);Mu(l,u,e),Jl(u,m),Wf(c,m,e),uu(c,e,m),Um(c,e),n!==void 0&&oh(e,this.ngContentSelectors,n),h=fo(e.index,m),m[8]=h[8],up(c,m,null)}catch(e){throw h!==null&&Kl(h),Kl(m),e}finally{zc(Ec.DynamicComponentEnd),fs()}return new ah(this.componentType,m,!!p)}};function th(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:$u(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[wm].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 ih(e){let t=e[wm].kind;return t===`input`||t===`twoWay`}var ah=class extends am{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=co(t[1],27),this.location=Fl(this._tNode,t),this.instance=fo(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Gp(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;sp(n,r[1],r,e,t),this.previousInputValues.set(e,t),Lp(fo(n.index,r),1)}get injector(){return new kl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function oh(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=ch}return e})();function ch(){return fh(Ro(),w())}var lh=class e extends sh{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Fl(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=uh(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=rm(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,pp(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 eh(ki(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Pa,null);e&&(i=e)}let d=ki(l.componentType??{}),f=rm(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,pp(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(mo(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 Bp(o,i,a,r),t.attachToViewContainerRef(),aa(dh(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=uh(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Hp(this._lContainer,t);n&&(oa(dh(this._lContainer),t),ff(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Hp(this._lContainer,t);return n&&oa(dh(this._lContainer),t)!=null?new Gp(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function uh(e){return e[8]}function dh(e){return e[8]||=[]}function fh(e,t){let n,r=t[e.index];return Xa(r)?n=r:(n=Rp(r,t,null,e),t[e.index]=n,zf(t,n)),mh(n,t,e,r),new lh(n,e,t)}function ph(e,t){let n=e[11],r=n.createComment(``),i=so(t,e);return Eu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var mh=_h,hh=()=>!1;function gh(e,t,n){return hh(e,t,n)}function _h(e,t,n,r){if(e[7])return;let i;i=n.type&8?ao(r):ph(t,n),e[7]=i}var vh=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},yh=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 Nh(e,t,n){e.queries===null&&(e.queries=new xh),e.queries.track(new Sh(t,n))}function Ph(e,t){return e.queries.getByIndex(t)}function Fh(e,t){let n=e[1],r=Ph(n,t);return r.crossesNgTemplate?Oh(n,e,t,[]):Dh(n,e,r,t)}function Ih(e,t,n){let r,i=Pn(()=>{r._dirtyCounter();let n=Bh(r,e);if(t&&n===void 0)throw new ii(-951,!1);return n});return r=i[fn],r._dirtyCounter=O(0),r._flatValue=void 0,i}function Lh(e){return Ih(!0,!1,e)}function Rh(e){return Ih(!0,!0,e)}function zh(e,t){let n=e[fn];n._lView=w(),n._queryIndex=t,n._queryList=kh(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function Bh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:ma;let i=kh(n,r),a=Fh(n,r);return i.reset(a,Ll),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function Vh(e){return!!e&&typeof e.then==`function`}function Hh(e){return!!e&&typeof e.subscribe==`function`}var Uh=class{},Wh=class extends Uh{injector;instance=null;constructor(e){super();let t=new Fa([...e.providers,{provide:Uh,useValue:this}],e.parent||Na(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Gh(e,t,n=null){return new Wh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var Kh=(()=>{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=ba(!1,e.type),n=t.length>0?Gh([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=mi({token:e,providedIn:`environment`,factory:()=>new e(Xi(Pa))})}return e})();function A(e){return Tc(()=>{let t=Qh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Vl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(Kh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||du.Emulated,styles:e.styles||ma,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&Ld(`NgStandalone`),$h(n);let r=e.dependencies;return n.directiveDefs=eg(r,qh),n.pipeDefs=eg(r,ji),n.id=tg(n),n})}function qh(e){return ki(e)||Ai(e)}function Jh(e,t){if(e==null)return pa;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=Vf.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function Yh(e){if(e==null)return pa;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Xh(e){return Tc(()=>{let t=Qh(e);return $h(t),t})}function Zh(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 Qh(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||pa,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||ma,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Jh(e.inputs,t),outputs:Yh(e.outputs),debugInfo:null}}function $h(e){e.features?.forEach(t=>t(e))}function eg(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 tg(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 ng=new xi(``),rg=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=C(ng,{optional:!0})??[];injector=C(Ts);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Ka(this.injector,t);if(Vh(n))e.push(n);else if(Hh(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=Nl({token:e,factory:e.ɵfac})}return e})();function ig(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=tl(e.mergedAttrs,e.attrs);let t=e.tView=Mf(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),Vo(e,!1);let c=cg(n,t,e,r);xs()&&xf(n,t,c,e),Jl(c,t);let l=Rp(c,t,c,e);t[r+27]=l,zf(t,l),gh(l,e,t)}function ag(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=Yp(t,d,4,o||null,s||null),No()&&Om(t,e,f,ho(t.consts,l),ep),Vc(t,f)):f=t.data[d],ig(f,e,t,n,r,i,a,c),$a(f)&&Wf(t,e,f),l!=null&&Gf(e,f,u),f}function og(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Yp(t,d,4,o||null,s||null),l!=null){let e=ho(t.consts,l);f.localNames=[];for(let t=0;t{throw new ii(600,``)})}var pg=10,mg=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=C(Qs);afterRenderManager=C(Rd);zonelessEnabled=C(lc);rootEffectScheduler=C(dc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new $r;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=C(js);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(ni(e=>!e))}constructor(){C(Fd,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=C(Pa);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Ts.NULL){return this._injector.get(zs).run(()=>{if(zc(Ec.BootstrapComponentStart),!this._injector.get(rg).done)throw new ii(405,``);let r=ki(e),i=this._injector.get(Uh),a=new eh(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=hg(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(ug,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),gg(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(Pd.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw zc(Ec.ChangeDetectionEnd),new ii(101,!1);let e=pn(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,pn(e),this.afterTick.next(),zc(Ec.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(om,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++yo(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;gg(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(dg,[]).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),()=>gg(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new ii(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=Nl({token:e,factory:e.ɵfac})}return e})();function hg(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function gg(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function j(e,t,n,r){let i=w();return pm(i,Xo(),t)&&(Lo(),tp(gs(),i,e,t,n,r)),j}function _g(e){if(Ld(`NgAnimateEnter`),!vd)return _g;let t=w();if(yd(t))return _g;let n=Ro(),r=t[9].get(zs);return Nd(kd(t),n,()=>vg(t,n,e,r)),Xd(t[9]),Zd(t[9],kd(t)),_g}function vg(e,t,n,r){let i=so(t,e),a=e[11],o=Ad(n),s=[],c=!1,l=e=>{if(jd(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{jd(e)===i&&(Md(e,i)&&(c=!0),yg(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),bd(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(pd(i,Cd,vd),!Cd.has(i))){for(let e of o)a.removeClass(i,e);xd(i)}})})}}function yg(e,t,n){let r=Sd.get(t);if(jd(e)===t&&r&&Md(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);xd(t)}}var bg=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 xg(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Sg(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){pn(r);let c=t.length-1;for(pn(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=xg(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=xg(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),h=n(s,d),g=n(o,l);if(Object.is(g,h)){let t=n(c,f);Object.is(t,m)?(e.swap(o,s),e.updateValue(s,f),c--,s--):e.move(s,o),e.updateValue(o,l),o++;continue}if(i??=new Eg,a??=Tg(e,o,s,n),Cg(e,i,o,g))e.updateValue(o,l),o++,s++;else if(a.has(g))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)wg(e,i,n,o,t[o]),o++}else if(t!=null){pn(r);let c=t[Symbol.iterator]();pn(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=xg(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new Eg,a??=Tg(e,o,s,n);let u=n(o,r);if(Cg(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;)wg(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 Cg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function wg(e,t,n,r,i){if(Cg(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function Tg(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 Eg=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 M(e,t,n,r,i,a,o,s){Ld(`NgControlFlow`);let c=w(),l=Lo();return og(c,l,e,t,n,r,i,ho(l.consts,a),256,o,s),Dg}function Dg(e,t,n,r,i,a,o,s){Ld(`NgControlFlow`);let c=w(),l=Lo();return og(c,l,e,t,n,r,i,ho(l.consts,a),512,o,s),Dg}function N(e,t){Ld(`NgControlFlow`);let n=w(),r=Xo(),i=n[r]===ed?-1:n[r],a=i===-1?void 0:Ng(n,27+i);if(pm(n,r,e)){let r=pn(null);try{if(a!==void 0&&Vp(a,0),e!==-1){let r=27+e,i=Ng(n,r),a=Rg(n[1],r),o=im(i,a,n);Bp(i,fp(n,a,t,{dehydratedView:o}),0,pp(a,o))}}finally{pn(r)}}else if(a!==void 0){let e=zp(a,0);e!==void 0&&(e[8]=t)}}var Og=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 kg(e){return e}function Ag(e,t){return t}var jg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function P(e,t,n,r,i,a,o,s,c,l,u,d,f){Ld(`NgControlFlow`);let p=w(),m=Lo(),h=c!==void 0,g=w(),_=new jg(h,s?o.bind(g[15][8]):o);g[27+e]=_,og(p,m,e+1,t,n,r,i,ho(m.consts,a),256),h&&og(p,m,e+2,c,l,u,d,ho(m.consts,f),512)}var Mg=class extends bg{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,Bp(this.lContainer,t,e,pp(this.templateTNode,n)),Pg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,Fg(this.lContainer,e),Ig(this.lContainer,e)}create(e,t){let n=rm(this.lContainer,this.templateTNode.tView.ssrId);return fp(this.hostLView,this.templateTNode,new Og(this.lContainer,t,e),{dehydratedView:n})}destroy(e){ff(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];Jd(e,r),hd.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function Fg(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 Ig(e,t){return Hp(e,t)}function Lg(e,t){return zp(e,t)}function Rg(e,t){return co(e,t)}function I(e,t,n){let r=w();return pm(r,Xo(),t)&&(Lo(),Jf(gs(),r,e,t,r[11],n)),I}function zg(e,t,n,r,i){sp(t,e,n,i?`class`:`style`,r)}function L(e,t,n,r){let i=w(),a=i[1],o=e+27,s=a.firstCreatePass?Hm(o,i,2,t,ep,No(),n,r):a.data[o];if(Qa(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(cm(o),()=>(Bg(e,t,i,s,r),L))}}return Bg(e,t,i,s,r),L}function Bg(e,t,n,r,i){if(ip(r,n,e,t,Hg),$a(r)){let e=n[1];Wf(e,n,r),uu(e,r,n)}i!=null&&Gf(n,r)}function R(){let e=Lo(),t=ap(Ro());return e.firstCreatePass&&Um(e,t),Fo(t)&&Io(),Mo(),t.classesWithoutHost!=null&&Xc(t)&&zg(e,t,w(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Zc(t)&&zg(e,t,w(),t.stylesWithoutHost,!1),R}function z(e,t,n,r){return L(e,t,n,r),R(),z}function B(e,t,n,r){let i=w(),a=i[1],o=e+27,s=a.firstCreatePass?Wm(o,a,2,t,n,r):a.data[o];return ip(s,i,e,t,Hg),r!=null&&Gf(i,s),B}function V(){return Fo(ap(Ro()))&&Io(),Mo(),V}function Vg(e,t,n,r){return B(e,t,n,r),V(),Vg}var Hg=(e,t,n,r,i)=>(Ss(!0),Tu(t[11],r,ys()));function Ug(e,t,n){let r=w(),i=r[1],a=e+27,o=i.firstCreatePass?Hm(a,r,8,`ng-container`,ep,No(),t,n):i.data[a];if(ip(o,r,e,`ng-container`,Kg),$a(o)){let e=r[1];Wf(e,r,o),uu(e,o,r)}return n!=null&&Gf(r,o),Ug}function Wg(){let e=Lo(),t=ap(Ro());return e.firstCreatePass&&Um(e,t),Wg}function Gg(e,t,n){return Ug(e,t,n),Wg(),Gg}var Kg=(e,t,n,r,i)=>(Ss(!0),wu(t[11],``));function H(){return w()}function qg(e,t,n){let r=w();return pm(r,Xo(),t)&&(Lo(),Yf(gs(),r,e,t,r[11],n)),qg}var Jg=void 0;function Yg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var Xg=[`en`,[[`a`,`p`],[`AM`,`PM`]],[[`AM`,`PM`]],[[`S`,`M`,`T`,`W`,`T`,`F`,`S`],[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`]],Jg,[[`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`]],Jg,[[`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}`,Jg,Jg,Jg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,Yg],Zg=Object.create(null);function Qg(e){let t=t_(e),n=$g(t);if(n)return n;let r=t.split(`-`)[0];if(n=$g(r),n)return n;if(r===`en`)return Xg;throw new ii(701,!1)}function $g(e){if(!(e in Zg)){let t=Gi.ng&&Gi.ng.common&&Gi.ng.common.locales&&Gi.ng.common.locales[e];return t!==void 0&&(Zg[e]=t),t}return Zg[e]}var e_={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 t_(e){return e.toLowerCase().replace(/_/g,`-`)}var n_=`en-US`;function r_(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function U(e,t,n){let r=w(),i=Lo(),a=Ro();return i_(i,r,r[11],a,e,t,n),U}function W(e,t,n){let r=w(),i=Lo(),a=Ro();return(a.type&3||n)&&ym(a,i,r,n,r[11],e,t,_m(a,r,t)),W}function i_(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=_m(r,t,a),ym(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 m_(e){return(e&2)==2}function h_(e,t){return e&131071|t<<17}function g_(e){return e|2}function __(e){return(e&131068)>>2}function v_(e,t){return e&-131069|t<<2}function y_(e){return(e&1)==1}function b_(e){return e|1}function x_(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=p_(o),c=__(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||da(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=p_(e[s+1]);e[r+1]=f_(t,s),t!==0&&(e[t+1]=v_(e[t+1],r)),e[s+1]=h_(e[s+1],r)}else e[r+1]=f_(s,0),s!==0&&(e[s+1]=v_(e[s+1],r)),s=r}else e[r+1]=f_(c,0),s===0?s=r:e[c+1]=v_(e[c+1],r),c=r;l&&(e[r+1]=g_(e[r+1])),C_(e,u,r,!0),C_(e,u,r,!1),S_(t,u,e,r,a),o=f_(s,c),a?t.classBindings=o:t.styleBindings=o}function S_(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&da(a,t)>=0&&(n[r+1]=b_(n[r+1]))}function C_(e,t,n,r){let i=e[n+1],a=t===null,o=r?p_(i):__(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];w_(n,t)&&(s=!0,e[o+1]=r?b_(i):g_(i)),o=r?p_(i):__(i)}s&&(e[n+1]=r?g_(i):b_(i))}function w_(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?da(e,t)>=0:!1}var T_={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function E_(e){return e.substring(T_.key,T_.keyEnd)}function D_(e){return k_(e),O_(e,A_(e,0,T_.textEnd))}function O_(e,t){let n=T_.textEnd;return n===t?-1:(t=T_.keyEnd=j_(e,T_.key=t,n),A_(e,t,n))}function k_(e){T_.key=0,T_.keyEnd=0,T_.value=0,T_.valueEnd=0,T_.textEnd=e.length}function A_(e,t,n){for(;t32;)t++;return t}function K(e,t,n){return P_(e,t,n,!1),K}function q(e,t){return P_(e,t,null,!0),q}function M_(e){F_(G_,N_,e,!0)}function N_(e,t){for(let n=D_(t);n>=0;n=O_(t,n))la(e,E_(t),!0)}function P_(e,t,n,r){let i=w(),a=Lo(),o=Zo(2);if(a.firstUpdatePass&&L_(a,e,o,r),t!==ed&&pm(i,o,t)){let s=a.data[ms()];q_(a,s,i,i[11],e,i[o+1]=X_(t,n),r,o)}}function F_(e,t,n,r){let i=Lo(),a=Zo(2);i.firstUpdatePass&&L_(i,null,a,r);let o=w();if(n!==ed&&pm(o,a,n)){let s=i.data[ms()];if(Z_(s,r)&&!I_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=li(e,n||``)),zg(i,s,o,n,r)}else K_(i,s,o,o[11],o[a+1],o[a+1]=W_(e,t,n),r,a)}}function I_(e,t){return t>=e.expandoStartIndex}function L_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[ms()],o=I_(e,n);Z_(a,r)&&t===null&&!o&&(t=!1),t=R_(i,a,t,r),x_(i,a,t,n,o,r)}}function R_(e,t,n,r){let i=ns(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=H_(null,e,t,n,r),n=U_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=H_(i,e,t,n,r),a===null){let n=z_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=H_(null,e,t,n[1],r),n=U_(n,t.attrs,r),B_(e,t,r,n))}else a=V_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function z_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(__(r)!==0)return e[p_(r)]}function B_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[p_(i)]=r}function V_(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===ed&&(u=l?ma:void 0);let d=l?ua(u,r):c===r?u:void 0;if(a&&!Y_(d)&&(d=ua(t,r)),Y_(d)&&(s=d,o))return s;let f=e[i+1];i=o?p_(f):__(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=ua(e,r))}return s}function Y_(e){return e!==void 0}function X_(e,t){return e==null||e===``||(typeof t==`string`?e=pu(e)+t:typeof e==`object`&&(e=ci(pu(e)))),e}function Z_(e,t){return!!(e.flags&(t?8:16))}function J(e,t=``){let n=w(),r=Lo(),i=e+27,a=r.firstCreatePass?Yp(r,i,1,t,null):r.data[i],o=Q_(r,n,a,t);n[i]=o,xs()&&xf(r,n,o,a),Vo(a,!1)}var Q_=(e,t,n,r)=>(Ss(!0),Su(t[11],r));function $_(e,t,n,r=``){return pm(e,Xo(),n)?t+Ni(n)+r:ed}function ev(e,t,n,r,i,a=``){let o=mm(e,Jo(),n,i);return Zo(2),o?t+Ni(n)+r+Ni(i)+a:ed}function tv(e,t,n,r,i,a,o,s=``){let c=hm(e,Jo(),n,i,o);return Zo(3),c?t+Ni(n)+r+Ni(i)+a+Ni(o)+s:ed}function nv(e,t,n,r,i,a,o,s,c,l=``){let u=gm(e,Jo(),n,i,o,c);return Zo(4),u?t+Ni(n)+r+Ni(i)+a+Ni(o)+s+Ni(c)+l:ed}function Y(e){return X(``,e),Y}function X(e,t,n){let r=w(),i=$_(r,e,t,n);return i!==ed&&av(r,ms(),i),X}function Z(e,t,n,r,i){let a=w(),o=ev(a,e,t,n,r,i);return o!==ed&&av(a,ms(),o),Z}function rv(e,t,n,r,i,a,o){let s=w(),c=tv(s,e,t,n,r,i,a,o);return c!==ed&&av(s,ms(),c),rv}function iv(e,t,n,r,i,a,o,s,c){let l=w(),u=nv(l,e,t,n,r,i,a,o,s,c);return u!==ed&&av(l,ms(),u),iv}function av(e,t,n){let r=oo(t,e);Cu(e[11],r,n)}function ov(e,t,n){Sc(t)&&(t=t());let r=w();return pm(r,Xo(),t)&&(Lo(),Jf(gs(),r,e,t,r[11],n)),ov}function sv(e,t){let n=Sc(e);return n&&e.set(t),n}function cv(e,t){let n=w(),r=Lo(),i=Ro();return i_(r,n,n[11],i,e,t),cv}var lv={};function uv(e){Ld(`NgLet`);let t=Lo(),n=w(),r=e+27;return Vo(Yp(t,r,128,null,null),!1),uo(t,n,r,lv),uv}function dv(e){return uo(Lo(),w(),ms(),e),e}function fv(e){let t=lo(Wo(),27+e);if(t===lv)throw new ii(314,!1);return t}function pv(e,t,n=``){return $_(w(),e,t,n)}function mv(e,t){let n=qo()+e,r=w();return r[n]===ed?dm(r,n,t()):fm(r,n)}function hv(e,t,n){return yv(w(),qo(),e,t,n)}function gv(e,t,n,r){return bv(w(),qo(),e,t,n,r)}function _v(e,t,n,r,i){return xv(w(),qo(),e,t,n,r,i)}function vv(e,t){let n=e[t];return n===ed?void 0:n}function yv(e,t,n,r,i,a){let o=t+n;return pm(e,o,i)?dm(e,o+1,a?r.call(a,i):r(i)):vv(e,o+1)}function bv(e,t,n,r,i,a,o){let s=t+n;return mm(e,s,i,a)?dm(e,s+2,o?r.call(o,i,a):r(i,a)):vv(e,s+2)}function xv(e,t,n,r,i,a,o,s){let c=t+n;return hm(e,c,i,a,o)?dm(e,c+3,s?r.call(s,i,a,o):r(i,a,o)):vv(e,c+3)}function Sv(e,t){let n=Lo(),r,i=e+27;n.firstCreatePass?(r=Cv(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=ta(r.type,!0)),o=Ui(Dm);try{let e=cl(!1),t=a();return cl(e),uo(n,w(),i,t),t}finally{Ui(o)}}function Cv(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function wv(e,t,n){let r=e+27,i=w(),a=lo(i,r);return Ev(i,r)?yv(i,qo(),t,a.transform,n,a):a.transform(n)}function Tv(e,t,n,r){let i=e+27,a=w(),o=lo(a,i);return Ev(a,i)?bv(a,qo(),t,o.transform,n,r,o):o.transform(n,r)}function Ev(e,t){return e[1].data[t].pure}function Dv(e,t){return Jp(e,t)}var Ov=(()=>{class e{applicationErrorHandler=C(Qs);appRef=C(mg);taskService=C(js);ngZone=C(zs);zonelessEnabled=C(lc);tracing=C(Fd,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new _r;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Ls):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(C(uc,{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?Fs:Ps;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=Nl({token:e,factory:e.ɵfac})}return e})();function kv(){return[{provide:cc,useExisting:Ov},{provide:zs,useClass:qs},{provide:lc,useValue:!0}]}function Av(){return typeof $localize<`u`&&$localize.locale||`en-US`}var jv=new xi(``,{factory:()=>C(jv,{optional:!0,skipSelf:!0})||Av()}),Mv=class{destroyed=!1;listeners=null;errorHandler=C(Zs,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=C(Ds);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new ii(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(oi(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=pn(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&&Nv(this.listeners)),pn(t),this.isEmitting=!1}}};function Nv(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function Q(e,t){return Pn(e,t?.equal)}function Pv(e){return sr(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var Fv=e=>e;function Iv(e,t){return typeof e==`function`?Lv(rr(e,Fv,t?.equal),t?.debugName,t?.set):Lv(rr(e.source,e.computation,e.equal),e.debugName,e.set)}function Lv(e,t,n){let r=e[fn],i=e;if(n!==void 0){let t=e=>ir(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Pv(e)),t)}else i.set=e=>ir(r,e),i.update=e=>ar(r,e);return i.asReadonly=ec.bind(e),i}function Rv(e,t){let n=Object.create(wc);n.value=e,n.transformFn=t?.transform;function r(){if(gn(n),n.value===Cc)throw new ii(-950,null);return n.value}return r[fn]=n,r}function zv(e){return new Mv}function Bv(e,t){return Rv(e,t)}function Vv(e){return Rv(Cc,e)}var $=(Bv.required=Vv,Bv);function Hv(e,t){let n=Object.create(wc),r=new Mv;n.value=e;function i(){return gn(n),Uv(n.value),n.value}return i[fn]=n,i.asReadonly=ec.bind(i),i.set=e=>{n.equal(n.value,e)||(Kn(n,e),r.emit(e))},i.update=e=>{Uv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function Uv(e){if(e===Cc)throw new ii(952,!1)}function Wv(e,t){return Hv(e,t)}function Gv(e){return Hv(Cc,e)}var Kv=(Wv.required=Gv,Wv);function qv(e,t){return Lh(t)}function Jv(e,t){return Rh(t)}var Yv=(qv.required=Jv,qv),Xv=new xi(``),Zv=new xi(``);function Qv(e){return!e.moduleRef}function $v(e){let t=Qv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(zs);return n.run(()=>{Qv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Qs),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),Qv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(Xv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(Xv);n.add(t),e.moduleRef.onDestroy(()=>{gg(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return ty(r,n,()=>{let n=t.get(js),r=n.add(),i=t.get(rg);return i.runInitializers(),i.donePromise.then(()=>{if(r_(t.get(jv,n_)||`en-US`),!t.get(Zv,!0))return Qv(e)?t.get(mg):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Qv(e)){let n=t.get(mg);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return ey?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var ey;function ty(e,t,n){try{let r=n();return Vh(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var ny=null;function ry(e=[],t){return Ts.create({name:t,providers:[{provide:ka,useValue:`platform`},{provide:Xv,useValue:new Set([()=>ny=null])},...e]})}function iy(e=[]){if(ny)return ny;let t=ry(e);return ny=t,fg(),ay(t),t}function ay(e){let t=e.get(rc,null);Ka(e,()=>{t?.forEach(e=>e())})}function oy(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;zc(Ec.BootstrapApplicationStart);try{let e=i?.injector??iy(r);return $v({r3Injector:new Wh({providers:[kv(),$s,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{zc(Ec.BootstrapApplicationEnd)}}function sy(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var cy=Symbol(`NOT_SET`),ly=new Set,uy={...Jn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:cy,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(gn(r),r.value),r.signal[fn]=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??ly)t()}finally{On(e)}}};function fy(e,t){let n=t?.injector??C(Ts),r=n.get(cc),i=n.get(Rd),a=n.get(Fd,null,{optional:!0});i.impl??=n.get(Bd);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(oc,null,{optional:!0}),c=new dy(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var py=null;function my(){return py}function hy(e){py??=e}var gy=class{},_y=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(_y||{}),vy=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(vy||{}),yy=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(yy||{}),by={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 xy(e){return Qg(e)[e_.LocaleId]}function Sy(e,t,n){let r=Qg(e);return Ny(Ny([r[e_.DayPeriodsFormat],r[e_.DayPeriodsStandalone]],t),n)}function Cy(e,t,n){let r=Qg(e);return Ny(Ny([r[e_.DaysFormat],r[e_.DaysStandalone]],t),n)}function wy(e,t,n){let r=Qg(e);return Ny(Ny([r[e_.MonthsFormat],r[e_.MonthsStandalone]],t),n)}function Ty(e,t){let n=Qg(e)[e_.Eras];return Ny(n,t)}function Ey(e,t){return Ny(Qg(e)[e_.DateFormat],t)}function Dy(e,t){return Ny(Qg(e)[e_.TimeFormat],t)}function Oy(e,t){let n=Qg(e)[e_.DateTimeFormat];return Ny(n,t)}function ky(e,t){let n=Qg(e),r=n[e_.NumberSymbols][t];if(r===void 0){if(t===by.CurrencyDecimal)return n[e_.NumberSymbols][by.Decimal];if(t===by.CurrencyGroup)return n[e_.NumberSymbols][by.Group]}return r}function Ay(e){if(!e[e_.ExtraData])throw new ii(2303,!1)}function jy(e){let t=Qg(e);return Ay(t),(t[e_.ExtraData][2]||[]).map(e=>typeof e==`string`?Py(e):[Py(e[0]),Py(e[1])])}function My(e,t,n){let r=Qg(e);return Ay(r),Ny(Ny([r[e_.ExtraData][0],r[e_.ExtraData][1]],t)||[],n)||[]}function Ny(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new ii(2304,!1)}function Py(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Fy=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Iy=Object.create(null),Ly=/((?:[^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]*)/,Ry=256;function zy(e,t,n,r){let i=cb(e);By(t),t=Hy(n,t)||t;let a=[],o;for(;t;)if(o=Ly.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=ab(r,s),i=sb(i,r));let c=``;return a.forEach(e=>{let t=ib(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function By(e){if(e.length>Ry)throw new ii(2300,!1)}function Vy(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function Hy(e,t){let n=xy(e);if(Iy[n]??=Object.create(null),Iy[n][t])return Iy[n][t];let r=``;switch(t){case`shortDate`:r=Ey(e,yy.Short);break;case`mediumDate`:r=Ey(e,yy.Medium);break;case`longDate`:r=Ey(e,yy.Long);break;case`fullDate`:r=Ey(e,yy.Full);break;case`shortTime`:r=Dy(e,yy.Short);break;case`mediumTime`:r=Dy(e,yy.Medium);break;case`longTime`:r=Dy(e,yy.Long);break;case`fullTime`:r=Dy(e,yy.Full);break;case`short`:let t=Hy(e,`shortTime`),n=Hy(e,`shortDate`);r=Uy(Oy(e,yy.Short),[t,n]);break;case`medium`:let i=Hy(e,`mediumTime`),a=Hy(e,`mediumDate`);r=Uy(Oy(e,yy.Medium),[i,a]);break;case`long`:let o=Hy(e,`longTime`),s=Hy(e,`longDate`);r=Uy(Oy(e,yy.Long),[o,s]);break;case`full`:let c=Hy(e,`fullTime`),l=Hy(e,`fullDate`);r=Uy(Oy(e,yy.Full),[c,l])}return r&&(Iy[n][t]=r),r}function Uy(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function Wy(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 Gy(s,t);let c=ky(o,by.MinusSign);return Wy(s,t,c,r,i)}}function qy(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 ii(2301,!1)}}function Jy(e,t,n=_y.Format,r=!1){return function(i,a){return Yy(i,a,e,t,n,r)}}function Yy(e,t,n,r,i,a){switch(n){case 2:return wy(t,i,r)[e.getMonth()];case 1:return Cy(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=jy(t),a=My(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?`+`:``)+Wy(o,2,a)+Wy(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Wy(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Wy(o,2,a)+`:`+Wy(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Wy(o,2,a)+`:`+Wy(Math.abs(i%60),2,a);default:throw new ii(2310,!1)}}}var Zy=0,Qy=4;function $y(e){let t=Vy(e,Zy,1).getDay();return Vy(e,0,1+(t<=Qy?Qy:11)-t)}function eb(e){let t=e.getDay(),n=t===0?-3:Qy-t;return Vy(e.getFullYear(),e.getMonth(),e.getDate()+n)}function tb(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=eb(n),t=$y(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Wy(i,e,ky(r,by.MinusSign))}}function nb(e,t=!1){return function(n,r){return Wy(eb(n).getFullYear(),e,ky(r,by.MinusSign),t)}}var rb=Object.create(null);function ib(e){if(rb[e])return rb[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Jy(3,vy.Abbreviated);break;case`GGGG`:t=Jy(3,vy.Wide);break;case`GGGGG`:t=Jy(3,vy.Narrow);break;case`y`:t=Ky(0,1,0,!1,!0);break;case`yy`:t=Ky(0,2,0,!0,!0);break;case`yyy`:t=Ky(0,3,0,!1,!0);break;case`yyyy`:t=Ky(0,4,0,!1,!0);break;case`Y`:t=nb(1);break;case`YY`:t=nb(2,!0);break;case`YYY`:t=nb(3);break;case`YYYY`:t=nb(4);break;case`M`:case`L`:t=Ky(1,1,1);break;case`MM`:case`LL`:t=Ky(1,2,1);break;case`MMM`:t=Jy(2,vy.Abbreviated);break;case`MMMM`:t=Jy(2,vy.Wide);break;case`MMMMM`:t=Jy(2,vy.Narrow);break;case`LLL`:t=Jy(2,vy.Abbreviated,_y.Standalone);break;case`LLLL`:t=Jy(2,vy.Wide,_y.Standalone);break;case`LLLLL`:t=Jy(2,vy.Narrow,_y.Standalone);break;case`w`:t=tb(1);break;case`ww`:t=tb(2);break;case`W`:t=tb(1,!0);break;case`d`:t=Ky(2,1);break;case`dd`:t=Ky(2,2);break;case`c`:case`cc`:t=Ky(7,1);break;case`ccc`:t=Jy(1,vy.Abbreviated,_y.Standalone);break;case`cccc`:t=Jy(1,vy.Wide,_y.Standalone);break;case`ccccc`:t=Jy(1,vy.Narrow,_y.Standalone);break;case`cccccc`:t=Jy(1,vy.Short,_y.Standalone);break;case`E`:case`EE`:case`EEE`:t=Jy(1,vy.Abbreviated);break;case`EEEE`:t=Jy(1,vy.Wide);break;case`EEEEE`:t=Jy(1,vy.Narrow);break;case`EEEEEE`:t=Jy(1,vy.Short);break;case`a`:case`aa`:case`aaa`:t=Jy(0,vy.Abbreviated);break;case`aaaa`:t=Jy(0,vy.Wide);break;case`aaaaa`:t=Jy(0,vy.Narrow);break;case`b`:case`bb`:case`bbb`:t=Jy(0,vy.Abbreviated,_y.Standalone,!0);break;case`bbbb`:t=Jy(0,vy.Wide,_y.Standalone,!0);break;case`bbbbb`:t=Jy(0,vy.Narrow,_y.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Jy(0,vy.Abbreviated,_y.Format,!0);break;case`BBBB`:t=Jy(0,vy.Wide,_y.Format,!0);break;case`BBBBB`:t=Jy(0,vy.Narrow,_y.Format,!0);break;case`h`:t=Ky(3,1,-12);break;case`hh`:t=Ky(3,2,-12);break;case`H`:t=Ky(3,1);break;case`HH`:t=Ky(3,2);break;case`m`:t=Ky(4,1);break;case`mm`:t=Ky(4,2);break;case`s`:t=Ky(5,1);break;case`ss`:t=Ky(5,2);break;case`S`:t=Ky(6,1);break;case`SS`:t=Ky(6,2);break;case`SSS`:t=Ky(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Xy(0);break;case`ZZZZZ`:t=Xy(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Xy(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Xy(2);break;default:return null}return rb[e]=t,t}function ab(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function ob(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function sb(e,t,n){let r=e.getTimezoneOffset();return ob(e,-1*(ab(t,r)-r))}function cb(e){if(ub(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 Vy(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Fy))return lb(n)}let t=new Date(e);if(!ub(t))throw new ii(2311,!1);return t}function lb(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 ub(e){return e instanceof Date&&!isNaN(e.valueOf())}var db=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=C(Ts);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)(Dm(sh))};static ɵdir=Xh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[Ac]})}return e})();function fb(e,t){return new ii(2100,!1)}var pb=`mediumDate`,mb=new xi(``),hb=new xi(``),gb=(()=>{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??pb,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return zy(t,e,i||this.locale,a)}catch(t){throw fb(e,t.message)}}static ɵfac=function(t){return new(t||e)(Dm(jv,16),Dm(mb,24),Dm(hb,24))};static ɵpipe=Zh({name:`date`,type:e,pure:!0})}return e})(),_b=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=Zh({name:`json`,type:e,pure:!1})}return e})();function vb(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 yb=`browser`,bb=class{_doc;constructor(e){this._doc=e}manager},xb=(()=>{class e extends bb{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)(Xi(Es))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),Sb=new xi(``),Cb=(()=>{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 xb));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof xb);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 ii(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(Xi(Sb),Xi(zs))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),wb=`ng-app-id`;function Tb(e){for(let t of e)t.remove()}function Eb(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Db(e,t,n,r){let i=e.head?.querySelectorAll(`style[${wb}="${t}"],link[${wb}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(wb),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 Ob(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var kb=(()=>{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,Db(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,Eb);t?.forEach(e=>this.addUsage(e,this.external,Ob))}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&&(Tb(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Tb(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,Eb(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Ob(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)(Xi(Es),Xi(tc),Xi(ac,8),Xi(ic))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),Ab={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`},jb=/%COMP%/g,Mb=`%COMP%`,Nb=`_nghost-${Mb}`,Pb=`_ngcontent-${Mb}`,Fb=!0,Ib=new xi(``,{factory:()=>Fb}),Lb=new xi(``);function Rb(e){return Pb.replace(jb,e)}function zb(e){return Nb.replace(jb,e)}function Bb(e,t){return t.map(t=>t.replace(jb,e))}var Vb=(()=>{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 Hb(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 Kb?n.applyToHost(e):n instanceof Gb&&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 du.Emulated:r=new Kb(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case du.ShadowDom:return new Wb(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case du.ExperimentalIsolatedShadowDom:return new Wb(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new Gb(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)(Xi(Cb),Xi(Tm),Xi(tc),Xi(Ib),Xi(Es),Xi(zs),Xi(ac),Xi(Fd,8),Xi(Lb,8))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),Hb=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(Ab[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Ub(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=Ub(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new ii(-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 ii(-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=Ab[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Ab[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&(td.DashCase|td.Important)?e.style.setProperty(t,n,r&td.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&td.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=my().getGlobalEventTarget(this.doc,e),!e))throw new ii(-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 Ub(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var Wb=class extends Hb{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=Bb(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=Ob(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)}},Gb=class extends Hb{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?Bb(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&&hd.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Kb=class extends Gb{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=Rb(l),this.hostAttr=zb(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}},qb=class e extends gy{supportsDOMEvents=!0;static makeCurrent(){hy(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=Yb();return t==null?null:Xb(t)}resetBaseElement(){Jb=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return vb(document.cookie,e)}},Jb=null;function Yb(){return Jb||=document.head.querySelector(`base`),Jb?Jb.getAttribute(`href`):null}function Xb(e){return new URL(e,document.baseURI).pathname}var Zb=[`alt`,`control`,`meta`,`shift`],Qb={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},$b={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},ex=(()=>{class e extends bb{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(()=>my().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.`),Zb.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=Qb[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`),Zb.forEach(t=>{if(t!==n){let n=$b[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)(Xi(Es))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})();async function tx(e,t,n){return oy({rootComponent:e,...nx(t,n)})}function nx(e,t){return{platformRef:t?.platformRef,appProviders:[...sx,...e?.providers??[]],platformProviders:ox}}function rx(){qb.makeCurrent()}function ix(){return new Zs}function ax(){return $l(document),document}var ox=[{provide:ic,useValue:yb},{provide:rc,useValue:rx,multi:!0},{provide:Es,useFactory:ax}],sx=[{provide:ka,useValue:`root`},{provide:Zs,useFactory:ix},{provide:Sb,useClass:xb,multi:!0},{provide:Sb,useClass:ex,multi:!0},Vb,{provide:Tm,useClass:kb},{provide:kb,useExisting:Tm},Cb,{provide:om,useExisting:Vb},[]];function cx(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 fx({code:i,why:ux(a.why,e),fix:ux(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:ux(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function hx(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 xx=Math.random.bind(Math),Sx=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Cx(e=21){let t=``,n=e;for(;n--;)t+=Sx[xx()*64|0];return t}var wx=6e4,Tx=e=>e,Ex=Tx,{clearTimeout:Dx,setTimeout:Ox}=globalThis;function kx(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Tx,deserialize:s=Ex,resolver:c,bind:l=`rpc`,timeout:u=wx,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=bx(),_=Cx();s.i=_;let ee;async function te(n=s){return u>=0&&(ee=Ox(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof ee==`object`&&(ee=ee.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:ee,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,te,d):await te()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Dx(ee),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:te,get $closed(){return f},get $meta(){return t.meta},$close:ee,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function ee(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(ne)}function te(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function ne(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Dx(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(ne),h}function Ax(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var jx=Object.freeze({type:`object`,additionalProperties:!0});function Mx(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return jx}return jx}function Nx(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 Fx(e,t){return Px(e,t)??[e]}function Ix(e){return typeof e==`string`?`'${e}'`:new Bx().serialize(e)}var Lx=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Rx=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Lx.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function zx(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})(),Vx=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Hx=[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],Ux=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Wx=[],Gx=class{_data=new Kx;_hash=new Kx([...Vx]);_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)Wx[n]=e[t+n]|0;else{let e=Wx[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Wx[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Wx[n]=t+Wx[n-7]+i+Wx[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+Hx[n]+Wx[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=Kx.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 qx(e){return new Gx().finalize(e).toBase64()}function Jx(e){return qx(Ix(e))}function Yx(e){return Jx(e)}function Xx(){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 Zx=/^[\w+.-]{2,}:\/\//;function Qx(e){return e.endsWith(`/`)?e:`${e}/`}function $x(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function eS(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Qx(n)+e.replace(/^\.?\//,``):e);return n}function tS(e,t){if(!t||t===`/`||Zx.test(e))return e;let n=$x(t);return e.startsWith(n)?e:eS(n,e)}function nS(e,t){let n=e.match(Zx);return t+(n?e.slice(n[0].length):e)}var rS=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function iS(e=21){let t=``,n=e;for(;n--;)t+=rS[Math.random()*64|0];return t}var aS=Symbol.for(`immer-nothing`),oS=Symbol.for(`immer-draftable`),sS=Symbol.for(`immer-state`),cS=[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 lS(e,...t){{let n=cS[e],r=NS(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var uS=Object,dS=uS.getPrototypeOf,fS=`constructor`,pS=`prototype`,mS=`configurable`,hS=`enumerable`,gS=`writable`,_S=`value`,vS=e=>!!e&&!!e[sS];function yS(e){return e?SS(e)||kS(e)||!!e[oS]||!!e[fS]?.[oS]||AS(e)||jS(e):!1}var bS=uS[pS][fS].toString(),xS=new WeakMap;function SS(e){if(!e||!MS(e))return!1;let t=dS(e);if(t===null||t===uS[pS])return!0;let n=uS.hasOwnProperty.call(t,fS)&&t[fS];if(n===Object)return!0;if(!NS(n))return!1;let r=xS.get(n);return r===void 0&&(r=Function.toString.call(n),xS.set(n,r)),r===bS}function CS(e,t,n=!0){wS(e)===0?(n?Reflect.ownKeys(e):uS.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function wS(e){let t=e[sS];return t?t.type_:kS(e)?1:AS(e)?2:jS(e)?3:0}var TS=(e,t,n=wS(e))=>n===2?e.has(t):uS[pS].hasOwnProperty.call(e,t),ES=(e,t,n=wS(e))=>n===2?e.get(t):e[t],DS=(e,t,n,r=wS(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function OS(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var kS=Array.isArray,AS=e=>e instanceof Map,jS=e=>e instanceof Set,MS=e=>typeof e==`object`,NS=e=>typeof e==`function`,PS=e=>typeof e==`boolean`;function FS(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var IS=e=>MS(e)?e?.[sS]:null,LS=e=>e.copy_||e.base_,RS=e=>e.modified_?e.copy_:e.base_;function zS(e,t){if(AS(e))return new Map(e);if(jS(e))return new Set(e);if(kS(e))return Array[pS].slice.call(e);let n=SS(e);if(t===!0||t===`class_only`&&!n){let t=uS.getOwnPropertyDescriptors(e);delete t[sS];let n=Reflect.ownKeys(t);for(let r=0;r1&&uS.defineProperties(e,{set:HS,add:HS,clear:HS,delete:HS}),uS.freeze(e),t&&CS(e,(e,t)=>{BS(t,!0)},!1),e)}function VS(){lS(2)}var HS={[_S]:VS};function US(e){return e===null||!MS(e)||uS.isFrozen(e)}var WS=`MapSet`,GS=`Patches`,KS=`ArrayMethods`,qS={};function JS(e){let t=qS[e];return t||lS(0,e),t}var YS=e=>!!qS[e];function XS(e,t){qS[e]||(qS[e]=t)}var ZS,QS=()=>ZS,$S=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:YS(WS)?JS(WS):void 0,arrayMethodsPlugin_:YS(KS)?JS(KS):void 0});function eC(e,t){t&&(e.patchPlugin_=JS(GS),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function tC(e){nC(e),e.drafts_.forEach(iC),e.drafts_=null}function nC(e){e===ZS&&(ZS=e.parent_)}var rC=e=>ZS=$S(ZS,e);function iC(e){let t=e[sS];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function aC(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[sS].modified_&&(tC(t),lS(4)),yS(e)&&(e=oC(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[sS].base_,e,t)}else e=oC(t,n);return sC(t,e,!0),tC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===aS?void 0:e}function oC(e,t){if(US(t))return t;let n=t[sS];if(!n)return hC(t,e.handledSet_,e);if(!lC(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);pC(n,e)}return n.copy_}function sC(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&BS(t,n)}function cC(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var lC=(e,t)=>e.scope_===t,uC=[];function dC(e,t,n,r){let i=LS(e),a=e.type_;if(r!==void 0&&ES(i,r,a)===t){DS(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;CS(i,(e,n)=>{if(vS(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??uC;for(let e of o)DS(i,e,n,a)}function fC(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!lC(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=RS(i);dC(e,i.draft_??i,a,n),pC(i,r)})}function pC(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)}cC(e)}}function mC(e,t,n){let{scope_:r}=e;if(vS(n)){let i=n[sS];lC(i,r)&&i.callbacks_.push(function(){wC(e),dC(e,n,RS(i),t)})}else yS(n)&&e.callbacks_.push(function(){let i=LS(e);e.type_===3?i.has(n)&&hC(n,r.handledSet_,r):ES(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&hC(ES(e.copy_,t,e.type_),r.handledSet_,r)})}function hC(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||vS(e)||t.has(e)||!yS(e)||US(e)?e:(t.add(e),CS(e,(r,i)=>{if(vS(i)){let t=i[sS];lC(t,n)&&(DS(e,r,RS(t),e.type_),cC(t))}else yS(i)&&hC(i,t,n)}),e)}function gC(e,t){let n=kS(e),r={type_:+!!n,scope_:t?t.scope_:QS(),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=_C;n&&(i=[r],a=vC);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var _C={get(e,t){if(t===sS)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=LS(e);if(!TS(i,t,e.type_))return xC(e,i,t);let a=i[t];if(e.finalized_||!yS(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&FS(t))return a;if(a===yC(e.base_,t)||bC(e,t,a)){wC(e);let n=e.type_===1?+t:t,r=EC(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in LS(e)},ownKeys(e){return Reflect.ownKeys(LS(e))},set(e,t,n){let r=SC(LS(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=yC(LS(e),t),i=r?.[sS];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(OS(n,r)&&(n!==void 0||TS(e.base_,t,e.type_)))return!0;wC(e),CC(e)}return e.copy_[t]===n&&(n!==void 0||TS(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),mC(e,t,n),!0)},deleteProperty(e,t){return wC(e),yC(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),CC(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=LS(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[gS]:!0,[mS]:e.type_!==1||t!==`length`,[hS]:r[hS],[_S]:n[t]}},defineProperty(){lS(11)},getPrototypeOf(e){return dS(e.base_)},setPrototypeOf(){lS(12)}},vC={};for(let e in _C){let t=_C[e];vC[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}vC.deleteProperty=function(e,t){return isNaN(parseInt(t))&&lS(13),vC.set.call(this,e,t,void 0)},vC.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&lS(14),_C.set.call(this,e[0],t,n,e[0])};function yC(e,t){let n=e[sS];return(n?LS(n):e)[t]}function bC(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!yS(n)||n[sS]?!1:e.baseRefs_.has(n)}function xC(e,t,n){let r=SC(t,n);return r?_S in r?r[_S]:r.get?.call(e.draft_):void 0}function SC(e,t){if(!(t in e))return;let n=dS(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=dS(n)}}function CC(e){e.modified_||(e.modified_=!0,e.parent_&&CC(e.parent_))}function wC(e){e.copy_||=(e.assigned_=new Map,zS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var TC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(NS(e)&&!NS(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}NS(t)||lS(6),n!==void 0&&!NS(n)&&lS(7);let r;if(yS(e)){let i=rC(this),a=EC(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?tC(i):nC(i)}return eC(i,n),aC(r,i)}if(!e||!MS(e)){if(r=t(e),r===void 0&&(r=e),r===aS&&(r=void 0),this.autoFreeze_&&BS(r,!0),n){let t=[],i=[];JS(GS).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}lS(1,e)},this.produceWithPatches=(e,t)=>{if(NS(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]},PS(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),PS(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),PS(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){yS(e)||lS(8),vS(e)&&(e=DC(e));let t=rC(this),n=EC(t,e,void 0);return n[sS].isManual_=!0,nC(t),n}finishDraft(e,t){let n=e&&e[sS];(!n||!n.isManual_)&&lS(9);let{scope_:r}=n;return eC(r,t),aC(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=JS(GS).applyPatches_;return vS(e)?r(e,t):this.produce(e,e=>r(e,t))}};function EC(e,t,n,r){let[i,a]=AS(t)?JS(WS).proxyMap_(t,n):jS(t)?JS(WS).proxySet_(t,n):gC(t,n);return(n?.scope_??QS()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?fC(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 DC(e){return vS(e)||lS(10,e),OC(e)}function OC(e){if(!yS(e)||US(e))return e;let t=e[sS],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=zS(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=zS(e,!0);return CS(n,(e,t)=>{DS(n,e,OC(t))},r),t&&(t.finalized_=!1),n}function kC(){cS.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=IS(ES(e,n.key_)),i=ES(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||TS(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e{let u=ES(o,e,c),f=ES(s,e,c),p=l?TS(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===aS?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(jS(e))return new Set(Array.from(e).map(u));let t=Object.create(dS(e));for(let n in e)t[n]=u(e[n]);return TS(e,oS)&&(t[oS]=e[oS]),t}function d(e){return vS(e)?u(e):e}XS(GS,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var AC=new TC,jC=AC.produce,MC=AC.produceWithPatches.bind(AC),NC=AC.applyPatches.bind(AC),PC=1e3;function FC(e,t){if(e.add(t),e.size>PC){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function IC(e){let{enablePatches:t=!1}=e;t&&kC();let n=Xx(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=iS())=>{i.has(t)||(kC(),r=NC(r,e),FC(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=iS())=>{if(!i.has(a)){if(FC(i,a),t){let[t,i]=MC(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=jC(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var LC=typeof self==`object`?self:globalThis,RC=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),zC=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function BC(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=RC.has(e)?LC[e]:void 0;return n(new(r??LC.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`&&zC.has(a))return n(new LC[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function VC(e){return BC(new Map,e)(0)}var HC=``,{toString:UC}={},{keys:WC}=Object;function GC(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=UC.call(e).slice(8,-1);switch(n){case`Array`:return[1,HC];case`Object`:return[2,HC];case`Date`:return[3,HC];case`RegExp`:return[4,HC];case`Map`:return[5,HC];case`Set`:return[6,HC];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function KC([e,t]){return e===0&&(t===`function`||t===`symbol`)}function qC(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]=GC(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 WC(r))(e||!KC(GC(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||!(KC(GC(n))||KC(GC(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!KC(GC(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function JC(e,t={}){let n=[];return qC(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:YC,stringify:XC}=JSON,ZC={json:!0,lossy:!0};function QC(e){return VC(YC(e))}function $C(e){return XC(JC(e,ZC))}function ew(e){return VC(e)}function tw(e){return $C(e)}function nw(e){return QC(e)}var rw=256,iw=class extends Error{name=`StreamClosedError`};function aw(e={}){let t=e.id??iS(),n=Math.max(0,e.replayWindow??0),r=Xx(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new iw(`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=sw(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 ow(e={}){let t=e.id??iS(),n=Math.max(1,e.highWaterMark??rw),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function sw(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 cw=128;function lw(e){return e.replace(/[^\w-]+/g,`_`).slice(0,cw)}var uw=`modulepreload`,dw=function(e,t){return new URL(e,t).href},fw={},pw=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=dw(t,n),t=s(t),t in fw)return;fw[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`:uw,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)})},mw=`__connection.json`,hw=`__DEVFRAME_CONNECTION__`,gw=`x-birpc-session`,_w=`__rpc-dump/index.json`,vw=`devframe:services`,yw=`devframe_otp`,bw=`devframe_auth_token`;gx.postMessage.remoteAssetsError;var xw=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Yx(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()}},Sw=yx({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 Cw(e){if(e.agent&&e.jsonSerializable===!1)throw Sw.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function ww(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function Tw(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 Ew(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 kw(e,t){let n=e.handler;if(!n){let r=await Ow(e,t);if(!r.handler)throw Sw.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 Ew(e.name,r,t),o=await a(...n);return await Dw(e.name,i,o)}}var Aw=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 kw(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 Sw.DF0021({name:e.name});Cw(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 Sw.DF0022({name:e.name});Cw(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 kw(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw Sw.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 jw(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 Nw(t,`undefined`,r,e);return n}return i!==null&&Mw(i,r,e,t),n})}function Mw(e,t,n,r){if(typeof e==`bigint`)throw Nw(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw Nw(r,`Map`,t,n);if(e instanceof Set)throw Nw(r,`Set`,t,n);if(e instanceof Date)throw Nw(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw Nw(r,e.constructor?.name??`class instance`,t,n)}function Nw(e,t,n,r){let i=Pw(n,r);return Sw.DF0020({name:e||``,type:t,path:i})}function Pw(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var Fw=`__DEVFRAME_CONNECTION_META__`,Iw=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function Lw(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 Rw(){return Lw(hw)}function zw(){return Lw(Fw)}function Bw(e){if(e)return e;try{let e=localStorage.getItem(Iw);if(e)return e}catch{}return Lw(Iw)}function Vw(e){globalThis[hw]=e,globalThis[Fw]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&Hw(e.authToken)}function Hw(e){try{localStorage.setItem(Iw,e)}catch{}globalThis[Iw]=e;let t=Rw();t&&(globalThis[hw]={...t,authToken:e})}function Uw(e){let t=tS(mw,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function Ww(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function Gw(){let e=Rw();if(e)return Ww(e,Bw()??e.authToken??e.connectionMeta.authToken);let t=zw();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??Uw(`./`),authToken:Bw(t.authToken)}}async function Kw(e={}){if(e.connection){let t=Ww(e.connection,Bw(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return Vw(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:Uw(t[0]??`./`),authToken:Bw(e.authToken??e.connectionMeta.authToken)};return Vw(n),n}let n=Gw();if(n){let t=Ww(n,Bw(e.authToken??n.authToken??n.connectionMeta.authToken));return Vw(t),t}let r=[];for(let n of t){let t=tS(mw,n),i=Uw(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:Bw(e.authToken??r.authToken)};return Vw(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var qw=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function Jw(e=yw){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function Yw(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 Xw(e=yw){let t=Jw(e);return t&&Yw(e),t}async function Zw(e,t={}){let n=Xw(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function Qw(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(vw,{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 $w(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:gx.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:gx.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=IC({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise(t=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(gx.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var eT=new Map;function tT(e=eT){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?jw(n,r??``):`s:${tw(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?nw(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function nT(){}function rT(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 iT(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 aT(e){let{onConnected:t=nT,onError:n=nT,onDisconnected:r=nT,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${bw}=${encodeURIComponent(e.authToken)}`);let s=tT(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function h(e){l||(l=!0,p(e),n(e),r())}function g(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function _(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function ee(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=rT(r);if(!e)break;r=e.rest;let{event:t,data:n}=iT(e.frame);n.length>0&&_(t,n.join(` +`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await ee(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[gw]: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 oT(e,t){let{channel:n,rpcOptions:r={}}=t;return kx(e,{...n,timeout:-1,...r,proxify:!1})}function sT(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(gx.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new qw(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new qw(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(gx.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 qw(`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(gx.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let ee=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(gx.client.connectionError,e),m(new qw(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new qw(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=oT(a.functions,{channel:ee,rpcOptions:o});a.register({name:gx.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new qw(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(gx.client.connectionError,e),m(e),i.emit(gx.client.isTrustedUpdated,!1)}});let ne=n;async function re(e){ne=e;let t=await te.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new qw(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(gx.client.connectionError,e)}return i.emit(gx.client.isTrustedUpdated,c),t.isTrusted}async function ie(e){let t=(await te.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(ne=t,c=!0,d.resolve(!0),f(`connected`),i.emit(gx.client.isTrustedUpdated,!0)),t}async function ae(e={}){await te.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function oe(){return c?!0:re(ne??``)}async function se(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:oe,requestTrustWithToken:re,requestTrustWithCode:ie,requestAuthCode:ae,ensureTrusted:se,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(gx.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(gx.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(gx.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function cT(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 lT(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=cT(n.sse,r??`./`,location);return sT({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>aT({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 uT(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:dT(r)?uT(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function dT(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function fT(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function pT(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function mT(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function hT(e){if(e.error)throw uT(e.error);return e.output}function gT(e){return e.some(e=>e!=null)}function _T(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function vT(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?ew(e):e}function a(e,t){return i(_T(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 mT(r)?hT(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(fT(r)){if(gT(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(pT(r)){let e=Yx(n),i=r.records[e];if(i)return hT(await s(i,r.serialization));if(r.fallback)return hT(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!gT(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 yT(e){let t=vT(await e.fetchJsonFromBases(_w),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 bT=``;function xT(e,t){return`${e}${bT}${t}`}function ST(e){let t=new Map,n=new Map;e.client.register({name:gx.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(xT(e,n))?._push(r,i)}}),e.client.register({name:gx.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=xT(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:gx.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=xT(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(gx.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(bT);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=xT(n,r),o=t.get(a);if(o)return o;let s=ow({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(gx.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=xT(t,r),a=n.get(i);if(a)return a;let o=aw({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 CT(){}var wT=new Map;function TT(e){let t=e.url;e.authToken&&(t=`${t}?${bw}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=CT,onError:i=CT,onDisconnected:a=CT,definitions:o=wT}=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=tT(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 ET(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 nS(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function DT(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=ET(n.websocket,r??`./`,location);return sT({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>TT({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 OT(e){return e.includes(`:`)}function kT(e,t){return OT(t)?t:`${e}:${t}`}function AT(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function jT(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return AT(a)}function MT(e,t){return{global:jT(e,t,`global`),project:jT(e,t,`project`)}}function NT(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(OT(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(kT(t,n),...r)),callEvent:((n,...r)=>e.callEvent(kT(t,n),...r)),callOptional:((n,...r)=>e.callOptional(kT(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(kT(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(kT(t,n),r,i),upload:(n,r)=>e.streaming.upload(kT(t,n),r)}},settings:MT(e,t),scope:e.scope}}function PT(){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 FT(e,t={}){let n=t.modelContext??PT();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=lw(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=Ax(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Nx(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>IT(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 IT(e,t,n){try{let r=Fx(n,e.args?.length);return{content:[{type:`text`,text:LT(await(await kw(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:RT(e)}]}}}function LT(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function RT(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 zT(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 BT(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Xx(),a=Array.isArray(t)?t:[t],o=await Kw(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new xw({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new Aw(f),m=e.webmcp===!1?void 0:FT(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(tS(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 ee={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},te=zT(e.transport??`auto`,s),ne=te===`static`?await yT({fetchJsonFromBases:_}):te===`sse`?lT({...ee,sseOptions:e.sseOptions}):DT({...ee,wsOptions:e.wsOptions}),re;try{re=new BroadcastChannel(`devframe-auth`)}catch{}let ie,ae=!1;function oe(e){return((...t)=>ae||!ie?e(...t):ie.then(()=>e(...t)))}function se(){g=!0;try{h?.(),m?.()}finally{try{re?.close()}finally{ne.close?.()}}}let ce={events:i,get isTrusted(){return ne.isTrusted},get status(){return ne.status},get connectionError(){return ne.connectionError},get transport(){return ne.transport??te},get connection(){return o},connectionMeta:s,ensureTrusted:ne.ensureTrusted,requestTrust:ne.requestTrust,requestTrustWithToken:async e=>(Hw(e),o={...o,authToken:e},ne.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ne.requestTrustWithCode(e);if(!t)return!1;Hw(t),o={...o,authToken:t};try{re?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>ne.requestAuthCode(e),call:oe(ne.call),callEvent:oe(ne.callEvent),callOptional:oe(ne.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:se};ce.sharedState=$w(ce),ce.streaming=ST(ce),ce.services=Qw(ce);let le=new Map;ce.scope=(e=>{if(!e)return ce;let t=le.get(e);return t||(t=NT(ce,e),le.set(e,t)),t}),f.rpc=ce;function ue(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function de(){if(e.simpleAuth!==!1&&ue()&&typeof globalThis.prompt==`function`)for(await ce.requestAuthCode().catch(()=>{});!ce.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 ce.requestTrustWithCode(t))return}}async function fe(){let t=await ne.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await Zw(ce,{param:n}):!1;t||r||ce.isTrusted||await de()}return ie=fe().then(()=>{ae=!0},()=>{ae=!0}),s.mcp&&pw(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-DI-HhtpW.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(ce))}).catch(()=>{}),re&&(re.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&ce.requestTrustWithToken(e.data.authToken)}),ce}var VT=BT,HT=[`components`,`injectors`,`signals`,`ngrx`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`],UT=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function WT(e){return`pangular:${e}`}var GT=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`plugins`],KT={refreshMs:{default:3e3,min:500,max:8e3},navigations:{default:50,min:5,max:500},formTimeline:{default:200,min:10,max:2e3},httpCalls:{default:200,min:10,max:2e3},changeLog:{default:200,min:10,max:2e3},cdCycles:{default:200,min:10,max:2e3},capacitorCalls:{default:200,min:10,max:2e3},idleAfterMs:{default:6e4,min:0,max:6e5}},qT={"opted-out":`the request sets transferCache: false`,post:`POST requests are left out unless includePostRequests is set`,method:`only GET, HEAD and POST requests are cached`,"auth-headers":`it sends an Authorization, Proxy-Authorization or Cookie header`,credentials:`it sends credentials (withCredentials or credentials: include/same-origin)`,"no-cache-request":`the request asks for no-store, no-cache or private`,"no-cache-response":`the response has Cache-Control no-store, no-cache or private`,"set-cookie":`the response sets a cookie`,error:`failed responses are not stored`,mocked:`a fault rule answered before the transfer cache ran`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},JT=[[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 YT(e){return JT.some(([t])=>t===e)}var XT=/^[a-z][a-z0-9-]{0,39}$/;function ZT(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&XT.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 QT=`pangular`,$T={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},eE=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function tE(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=$T[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[...eE.filter(e=>n.has(e)),r].join(`+`)}function nE(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 rE(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 iE=[{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:`forms`,label:`Forms`,inspector:`forms`},{id:`pipes`,label:`Pipes`,inspector:`pipes`},{id:`network`,label:`SSR & HTTP`,inspector:`http`},{id:`errors`,label:`Errors`,inspector:`errors`},{id:`capacitor`,label:`Capacitor`,inspector:`capacitor`},{id:`plugins`,label:`Plugins`,inspector:`plugins`}],aE=1e4;function oE(e){return iE.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var sE={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,forms:`a form, by its id`},cE=200;function lE(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 uE(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=cE?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 dE=[{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 fE(e){let t=oE(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=dE.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function pE(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function mE(e,t){return typeof e==`boolean`?e:t}var hE=100,gE=100;function _E(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=gE);return[...new Set(t)].slice(0,hE)}function vE(e,t){let{default:n,min:r,max:i}=KT[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function yE(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function bE(e){let t=pE(e),n=pE(t.agent),r=pE(t.inspectors),i=pE(n.tools),a=pE(t.actions),o=mE(t.actions,!0),s=pE(t.redaction),c=pE(t.limits),l=yE(HT,e=>mE(r[e],!0));return{inspectors:l,agent:{readOnly:mE(n.readOnly,!1),tools:yE(HT,e=>l[e]&&mE(i[e],!0)),browserTools:mE(n.browserTools,!1)},actions:yE(GT,e=>l[e]&&mE(a[e],o)),redaction:{secretNames:_E(s.secretNames),unmask:_E(s.unmask)},limits:Object.fromEntries(Object.keys(KT).map(e=>[e,vE(c[e],e)])),popup:{hotkey:CE(pE(t.popup).hotkey)},plugins:SE(t.plugins)}}var xE=100;function SE(e){let t={};for(let[n,r]of Object.entries(pE(e)).slice(0,xE)){if(!XT.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=pE(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:mE(e.enabled,!0),tools:mE(e.tools,!0),actions:mE(e.actions,!0)})}return t}function CE(e){return e===!1?!1:tE(e)??`Alt+Shift+P`}function wE(e){let t=e?.configs;return bE(t?.[QT])}function TE(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state and dispatching actions`,http:`Changing HTTP mock rules and SSR overrides, and clearing HTTP calls`,analog:`Calling API routes and clearing server calls`,components:`Editing component properties and signals`,plugins:`Running plugin actions`}[e]} is turned off in the devtools config (actions.${e}).`}var EE={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`,plugins:`Plugins`},DE={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore and dispatch`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`,plugins:`Plugin actions`},OE={refreshMs:e=>`poll every ${e} ms`,navigations:e=>`${e} navigations`,formTimeline:e=>`${e} form events`,httpCalls:e=>`${e} HTTP calls`,changeLog:e=>`${e} NgRx changes`,cdCycles:e=>`${e} change detection cycles`,capacitorCalls:e=>`${e} Capacitor plugin calls`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function kE(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=HT.filter(t=>e.inspectors[t]);n(`Inspectors off`,HT.filter(t=>!e.inspectors[t]).map(e=>EE[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>EE[e])),n(`Blocked actions`,GT.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>DE[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(KT).filter(t=>e.limits[t]!==KT[t].default).map(t=>OE[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(`, `)})`)),t}function AE(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 jE(e){return!e.tags.length&&!e.directives.length&&!e.text}function ME(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 NE={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 PE(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function FE(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function IE(e,t){let n=FE(e),r=FE(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function LE(e,t){return e?.capabilities?.[t]===!1}function RE(e,t){let n=NE[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=PE(t);return IE(t,n.since)?`${r} in a development build; this page runs Angular ${i} without it, which usually means a production build.`:`${r}; this page runs Angular ${i}.`}var zE=`pangular-page-id`,BE=null;function VE(e){BE=e}function HE(){if(BE)return BE;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(zE)||null)}catch{return null}}function UE(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 WE(e,t){return e?t?e.pages?.[t]??null:e:null}function GE(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function KE(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function qE(e,t,n){return KE(e,t,n).then(e=>e,()=>null)}function JE(e){return e?.connectionMeta.backend===`static`}function YE(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 XE(e){return e.split(`@`)[1]??``}var ZE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},QE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},$E=qE,eD={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 tD(e){return eD[e]??e}var nD=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function rD(e,t){return await $E(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function iD(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 aD=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function oD(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(aD,(e,t)=>t??(e===`**`?``:e))}function sD(e){return wE(e?.connectionMeta)}function cD(e,t){return sD(e).actions[t]}var lD={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`,plugins:`plugins`};function uD(e){return lD[e]}var dD=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function fD(e,t){let n=lD[e];return!n||t.inspectors[n]}function pD(e,t){e&1&&(D(),Vg(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function mD(e,t){e&1&&(D(),Vg(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function hD(e,t){e&1&&(D(),Vg(0,`path`,13)(1,`path`,14))}function gD(e,t){e&1&&(D(),Vg(0,`path`,15)(1,`path`,16)(2,`path`,17))}function _D(e,t){e&1&&(D(),Vg(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function vD(e,t){e&1&&(D(),Vg(0,`path`,1))}function yD(e,t){e&1&&(D(),Vg(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function bD(e,t){e&1&&(D(),Vg(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function xD(e,t){e&1&&(D(),Vg(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function SD(e,t){e&1&&(D(),Vg(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function CD(e,t){e&1&&(D(),Vg(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function wD(e,t){e&1&&(D(),Vg(0,`circle`,39)(1,`path`,40))}function TD(e,t){e&1&&(D(),Vg(0,`circle`,32)(1,`path`,41)(2,`path`,42))}function ED(e,t){e&1&&(D(),Vg(0,`path`,2))}function DD(e,t){e&1&&(D(),Vg(0,`path`,3))}function OD(e,t){e&1&&(D(),Vg(0,`path`,4))}var kD=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:17,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`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`]],template:function(e,t){if(e&1&&(D(),B(0,`svg`,0),M(1,pD,4,0)(2,mD,4,0)(3,hD,2,0)(4,gD,3,0)(5,_D,3,0)(6,vD,1,0,`:svg:path`,1)(7,yD,4,0)(8,bD,3,0)(9,xD,4,0)(10,SD,3,0)(11,CD,5,0)(12,wD,2,0)(13,TD,3,0)(14,ED,1,0,`:svg:path`,2)(15,DD,1,0,`:svg:path`,3)(16,OD,1,0,`:svg:path`,4),V()),e&2){let e;k(),N((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===`errors`?13:e===`plugins`?14:e===`analog`?15:e===`capacitor`?16:-1)}},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-shrink: 0; -}`]})},wD=(e,t)=>t.tab,TD=(e,t)=>t.label;function ED(e,t){e&1&&J(0),e&2&&X(` `,G().meta()?.projectName,` `)}function DD(e,t){e&1&&J(0,` Project details unavailable `)}function OD(e,t){e&1&&J(0,` Loading… `)}function kD(e,t){e&1&&(J(0,` Run `),L(1,`code`),J(2,`pangular build`),R(),J(3,` again to rebuild the report. `))}function AD(e,t){e&1&&J(0,` Check that the dev server is running. `)}function jD(e,t){if(e&1){let e=H();L(0,`button`,12),U(`click`,function(){return T(e),E(G(2).loadMeta())}),J(1,`Try again`),R()}}function MD(e,t){if(e&1&&(L(0,`p`,10),M(1,kD,4,0)(2,AD,1,0),R(),M(3,jD,2,0,`button`,11)),e&2){let e=G();k(),N(e.staticReport()?1:2),k(2),N(e.staticReport()?-1:3)}}function ND(e,t){e&1&&(L(0,`li`,5)(1,`span`),J(2,`Analog`),R(),J(3),R()),e&2&&(k(3),Y(t))}function PD(e,t){e&1&&(L(0,`li`)(1,`span`),J(2,`Change detection`),R(),J(3),R()),e&2&&(k(3),Y(t))}function FD(e,t){if(e&1&&(L(0,`span`,19),J(1),R(),L(2,`span`,20),J(3),R()),e&2){let e=G().$implicit,t=G();k(),Y(t.cards()[e.tab]?.value),k(2),Y(t.cards()[e.tab]?.sub)}}function ID(e,t){e&1&&(L(0,`span`,21),J(1,`–`),R(),L(2,`span`,20),J(3,`Count unavailable`),R())}function LD(e,t){e&1&&(z(0,`span`,22),L(1,`span`,20),J(2,`Counting…`),R())}function RD(e,t){if(e&1){let e=H();L(0,`button`,13),U(`click`,function(){let t=T(e).$implicit;return E(G().navigate.emit(t.tab))}),L(1,`span`,14)(2,`span`,15),z(3,`app-tab-icon`,16),R(),L(4,`span`,17),J(5,`→`),R()(),L(6,`span`,18),J(7),R(),M(8,FD,4,2)(9,ID,4,0)(10,LD,3,0),R()}if(e&2){let e,n=t.$implicit,r=t.$index,i=G().stateOf(n.tab);K(`animation-delay`,60*r,`ms`),j(`aria-busy`,i===`loading`),k(3),I(`name`,n.tab),k(4),Y(n.label),k(),N((e=i)===`ready`?8:e===`error`?9:10)}}function zD(e,t){e&1&&(L(0,`p`),J(1,`Loading…`),R())}function BD(e,t){if(e&1&&(L(0,`div`)(1,`dt`),J(2),R(),L(3,`dd`),J(4),R()()),e&2){let e=t.$implicit;k(2),Y(e.label),k(2),Y(e.value)}}function VD(e,t){if(e&1&&(L(0,`dl`),P(1,BD,5,2,`div`,null,TD),R()),e&2){let e=G();k(),F(e.configItems())}}function HD(e,t){e&1&&(L(0,`p`),J(1,`Defaults`),R())}var UD=[{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 WD(e){return UD.filter(t=>sD(t.tab,e))}var GD={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function KD(e){return e&&Object.hasOwn(GD,e)?GD[e]:null}var qD=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),JD={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 YD(e,t,n){return`${e} ${e===1?t:n}`}function XD(e,t){for(let n of e??[])t(n),XD(n.children,t)}function ZD(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 · ${YD(t,`directive`,`directives`)}`}}function QD(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 · ${YD(t,`redirect`,`redirects`)}`}}function $D(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]=JD[e]??[e,e];return YD(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function eO(e,t){let n=e?.forms??[],r=t?n.filter(e=>GE(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 tO(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function nO(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(tO).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var rO=class e{rpc=$(null);navigate=Rv();staticReport=Q(()=>UE(this.rpc()));meta=O(null);config=Q(()=>nD(this.rpc()));stats=Q(()=>this.rpc()?WD(this.config()):[]);configItems=Q(()=>wE(this.config()));metaState=O(`loading`);states=O({});rows=O({});injectorTree=O(null);signalGraph=O(null);formsState=O(null);httpState=O(null);pageId=LE();destroyRef=C(Ds);stopLive=[];zone=Q(()=>KD(zE(this.injectorTree(),this.pageId)?.zone));liveInjectors=Q(()=>{let e=zE(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return XD(e.roots,r),XD(e.environment,r),{injectors:t,providers:n}});liveSignals=Q(()=>{let e=BE(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>qD.has(e.kind??``)).length:null});cards=Q(()=>{let e=this.rows(),t={};if(e.components&&(t.components=ZD(e.components)),e.routes&&(t.routes=QD(e.routes)),e.store&&(t.store=$D(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 · ${YD(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=eO(i,this.pageId));let a=this.httpState();return a&&(t.network=nO(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`)}))}constructor(){mc(()=>{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);let n=nD(e),r=e=>sD(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)),sD(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),sD(`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=A({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:33,vars:14,consts:[[`aria-labelledby`,`project-title`,1,`project`],[1,`project-head`],[1,`eyebrow`],[`id`,`project-title`],[1,`chips`],[1,`analog`],[1,`grid`],[`type`,`button`,1,`stat`,3,`animation-delay`],[`aria-labelledby`,`config-title`,1,`config`],[`id`,`config-title`],[1,`hint`],[`type`,`button`,1,`retry`],[`type`,`button`,1,`retry`,3,`click`],[`type`,`button`,1,`stat`,3,`click`],[1,`top`],[1,`icon`],[3,`name`],[`aria-hidden`,`true`,1,`go`],[1,`label`],[1,`big`],[1,`sub`],[1,`big`,`muted`],[`aria-hidden`,`true`,1,`big`,`skeleton`]],template:function(e,t){if(e&1&&(L(0,`section`,0)(1,`div`,1)(2,`p`,2),J(3,`Project`),R(),L(4,`h2`,3),M(5,ED,1,1)(6,DD,1,0)(7,OD,1,0),R(),M(8,MD,4,2),R(),L(9,`ul`,4)(10,`li`)(11,`span`),J(12,`Angular`),R(),J(13),R(),L(14,`li`)(15,`span`),J(16,`TypeScript`),R(),J(17),R(),L(18,`li`)(19,`span`),J(20,`SSR`),R(),J(21),R(),M(22,ND,4,1,`li`,5),M(23,PD,4,1,`li`),R()(),L(24,`div`,6),P(25,RD,11,6,`button`,7,wD),R(),L(27,`section`,8)(28,`h2`,9),J(29,`Configuration`),R(),M(30,zD,2,0,`p`)(31,VD,3,0,`dl`)(32,HD,2,0,`p`),R()),e&2){let e,n,r;j(`aria-busy`,t.metaState()===`loading`),k(4),q(`muted`,t.metaState()!==`ready`),k(),N((e=t.metaState())===`ready`?5:e===`error`?6:7),k(3),N(t.metaState()===`error`?8:-1),k(),q(`pending`,t.metaState()===`loading`),k(4),Y(t.meta()?.angularVersion??`…`),k(4),Y(t.meta()?.typescript??`…`),k(4),Y(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),k(),N((n=t.meta()?.analog)?22:-1,n),k(),N((r=t.zone())?23:-1,r),k(2),F(t.stats()),k(2),j(`aria-busy`,!t.rpc()),k(3),N(t.rpc()?t.configItems().length?31:32:30)}},dependencies:[CD],styles:[`[_nghost-%COMP%] { +}`]})},AD=(e,t)=>t.tab,jD=(e,t)=>t.label;function MD(e,t){e&1&&J(0),e&2&&X(` `,G().meta()?.projectName,` `)}function ND(e,t){e&1&&J(0,` Project details unavailable `)}function PD(e,t){e&1&&J(0,` Loading… `)}function FD(e,t){e&1&&(J(0,` Run `),L(1,`code`),J(2,`pangular build`),R(),J(3,` again to rebuild the report. `))}function ID(e,t){e&1&&J(0,` Check that the dev server is running. `)}function LD(e,t){if(e&1){let e=H();L(0,`button`,12),U(`click`,function(){return T(e),E(G(2).loadMeta())}),J(1,`Try again`),R()}}function RD(e,t){if(e&1&&(L(0,`p`,10),M(1,FD,4,0)(2,ID,1,0),R(),M(3,LD,2,0,`button`,11)),e&2){let e=G();k(),N(e.staticReport()?1:2),k(2),N(e.staticReport()?-1:3)}}function zD(e,t){e&1&&(L(0,`li`,5)(1,`span`),J(2,`Analog`),R(),J(3),R()),e&2&&(k(3),Y(t))}function BD(e,t){e&1&&(L(0,`li`)(1,`span`),J(2,`Change detection`),R(),J(3),R()),e&2&&(k(3),Y(t))}function VD(e,t){if(e&1&&(L(0,`span`,19),J(1),R(),L(2,`span`,20),J(3),R()),e&2){let e=G().$implicit,t=G();k(),Y(t.cards()[e.tab]?.value),k(2),Y(t.cards()[e.tab]?.sub)}}function HD(e,t){e&1&&(L(0,`span`,21),J(1,`–`),R(),L(2,`span`,20),J(3,`Count unavailable`),R())}function UD(e,t){e&1&&(z(0,`span`,22),L(1,`span`,20),J(2,`Counting…`),R())}function WD(e,t){if(e&1){let e=H();L(0,`button`,13),U(`click`,function(){let t=T(e).$implicit;return E(G().navigate.emit(t.tab))}),L(1,`span`,14)(2,`span`,15),z(3,`app-tab-icon`,16),R(),L(4,`span`,17),J(5,`→`),R()(),L(6,`span`,18),J(7),R(),M(8,VD,4,2)(9,HD,4,0)(10,UD,3,0),R()}if(e&2){let e,n=t.$implicit,r=t.$index,i=G().stateOf(n.tab);K(`animation-delay`,60*r,`ms`),j(`aria-busy`,i===`loading`),k(3),I(`name`,n.tab),k(4),Y(n.label),k(),N((e=i)===`ready`?8:e===`error`?9:10)}}function GD(e,t){e&1&&(L(0,`p`),J(1,`Loading…`),R())}function KD(e,t){if(e&1&&(L(0,`div`)(1,`dt`),J(2),R(),L(3,`dd`),J(4),R()()),e&2){let e=t.$implicit;k(2),Y(e.label),k(2),Y(e.value)}}function qD(e,t){if(e&1&&(L(0,`dl`),P(1,KD,5,2,`div`,null,jD),R()),e&2){let e=G();k(),F(e.configItems())}}function JD(e,t){e&1&&(L(0,`p`),J(1,`Defaults`),R())}var YD=[{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 XD(e){return YD.filter(t=>fD(t.tab,e))}var ZD={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function QD(e){return e&&Object.hasOwn(ZD,e)?ZD[e]:null}var $D=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),eO={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 tO(e,t,n){return`${e} ${e===1?t:n}`}function nO(e,t){for(let n of e??[])t(n),nO(n.children,t)}function rO(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 · ${tO(t,`directive`,`directives`)}`}}function iO(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 · ${tO(t,`redirect`,`redirects`)}`}}function aO(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]=eO[e]??[e,e];return tO(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function oO(e,t){let n=e?.forms??[],r=t?n.filter(e=>XE(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 sO(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function cO(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(sO).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var lO=class e{rpc=$(null);navigate=zv();staticReport=Q(()=>JE(this.rpc()));meta=O(null);config=Q(()=>sD(this.rpc()));stats=Q(()=>this.rpc()?XD(this.config()):[]);configItems=Q(()=>kE(this.config()));metaState=O(`loading`);states=O({});rows=O({});injectorTree=O(null);signalGraph=O(null);formsState=O(null);httpState=O(null);pageId=HE();destroyRef=C(Ds);stopLive=[];zone=Q(()=>QD(WE(this.injectorTree(),this.pageId)?.zone));liveInjectors=Q(()=>{let e=WE(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return nO(e.roots,r),nO(e.environment,r),{injectors:t,providers:n}});liveSignals=Q(()=>{let e=GE(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>$D.has(e.kind??``)).length:null});cards=Q(()=>{let e=this.rows(),t={};if(e.components&&(t.components=rO(e.components)),e.routes&&(t.routes=iO(e.routes)),e.store&&(t.store=aO(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 · ${tO(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=oO(i,this.pageId));let a=this.httpState();return a&&(t.network=cO(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`)}))}constructor(){mc(()=>{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);let n=sD(e),r=e=>fD(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)),fD(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),fD(`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=A({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:33,vars:14,consts:[[`aria-labelledby`,`project-title`,1,`project`],[1,`project-head`],[1,`eyebrow`],[`id`,`project-title`],[1,`chips`],[1,`analog`],[1,`grid`],[`type`,`button`,1,`stat`,3,`animation-delay`],[`aria-labelledby`,`config-title`,1,`config`],[`id`,`config-title`],[1,`hint`],[`type`,`button`,1,`retry`],[`type`,`button`,1,`retry`,3,`click`],[`type`,`button`,1,`stat`,3,`click`],[1,`top`],[1,`icon`],[3,`name`],[`aria-hidden`,`true`,1,`go`],[1,`label`],[1,`big`],[1,`sub`],[1,`big`,`muted`],[`aria-hidden`,`true`,1,`big`,`skeleton`]],template:function(e,t){if(e&1&&(L(0,`section`,0)(1,`div`,1)(2,`p`,2),J(3,`Project`),R(),L(4,`h2`,3),M(5,MD,1,1)(6,ND,1,0)(7,PD,1,0),R(),M(8,RD,4,2),R(),L(9,`ul`,4)(10,`li`)(11,`span`),J(12,`Angular`),R(),J(13),R(),L(14,`li`)(15,`span`),J(16,`TypeScript`),R(),J(17),R(),L(18,`li`)(19,`span`),J(20,`SSR`),R(),J(21),R(),M(22,zD,4,1,`li`,5),M(23,BD,4,1,`li`),R()(),L(24,`div`,6),P(25,WD,11,6,`button`,7,AD),R(),L(27,`section`,8)(28,`h2`,9),J(29,`Configuration`),R(),M(30,GD,2,0,`p`)(31,qD,3,0,`dl`)(32,JD,2,0,`p`),R()),e&2){let e,n,r;j(`aria-busy`,t.metaState()===`loading`),k(4),q(`muted`,t.metaState()!==`ready`),k(),N((e=t.metaState())===`ready`?5:e===`error`?6:7),k(3),N(t.metaState()===`error`?8:-1),k(),q(`pending`,t.metaState()===`loading`),k(4),Y(t.meta()?.angularVersion??`…`),k(4),Y(t.meta()?.typescript??`…`),k(4),Y(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),k(),N((n=t.meta()?.analog)?22:-1,n),k(),N((r=t.zone())?23:-1,r),k(2),F(t.stats()),k(2),j(`aria-busy`,!t.rpc()),k(3),N(t.rpc()?t.configItems().length?31:32:30)}},dependencies:[kD],styles:[`[_nghost-%COMP%] { display: block; max-width: 1200px; } @@ -325,7 +325,7 @@ h2.muted[_ngcontent-%COMP%] { .skeleton[_ngcontent-%COMP%] { animation: none; } -}`]})},iO=`pangular:panel-action-result`,aO=6e3,oO=0;function sO(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function cO(e,t=window){let n=`pa-${Date.now().toString(36)}-${++oO}`;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!==iO||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`}),aO);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var lO=class e{available=sO();reveal(e,t){return cO({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return cO({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=Nl({token:e,factory:e.ɵfac})};function uO(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function dO(e){let t=C(Ds),n=O({}),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(uO(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return mc(()=>{let t=e();t&&t!==r&&Nv(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function fO(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 pO=[`*`];function mO(e,t){if(e&1&&(B(0,`div`,1)(1,`p`,2),J(2),V(),B(3,`p`,3),J(4),s_(5),B(6,`a`,4),J(7,`Supported versions`),V()()()),e&2){let e=G();q(`compact`,e.compact()),k(2),Y(e.title()),k(2),X(` `,t,` `),k(2),qg(`href`,e.docsUrl,Nu)}}var hO=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,gO=class e{page=$(null);capability=$.required();missing=$(!1,{transform:oy});compact=$(!1,{transform:oy});docsUrl=hO;text=Q(()=>{let e=this.page();return!this.missing()&&!ME(e,this.capability())?null:NE(this.capability(),e?.version)});title=Q(()=>{let e=this.page()?.version;return e?`Not available on Angular ${kE(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:pO,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&&(o_(),M(0,mO,8,5,`div`,0)),e&2){let e;N((e=t.text())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})},uO=`pangular:panel-action-result`,dO=6e3,fO=0;function pO(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function mO(e,t=window){let n=`pa-${Date.now().toString(36)}-${++fO}`;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!==uO||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`}),dO);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var hO=class e{available=pO();reveal(e,t){return mO({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return mO({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=Nl({token:e,factory:e.ɵfac})};function gO(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function _O(e){let t=C(Ds),n=O({}),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(gO(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return mc(()=>{let t=e();t&&t!==r&&Pv(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function vO(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 yO=[`*`];function bO(e,t){if(e&1&&(B(0,`div`,1)(1,`p`,2),J(2),V(),B(3,`p`,3),J(4),s_(5),B(6,`a`,4),J(7,`Supported versions`),V()()()),e&2){let e=G();q(`compact`,e.compact()),k(2),Y(e.title()),k(2),X(` `,t,` `),k(2),qg(`href`,e.docsUrl,Nu)}}var xO=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,SO=class e{page=$(null);capability=$.required();missing=$(!1,{transform:sy});compact=$(!1,{transform:sy});docsUrl=xO;text=Q(()=>{let e=this.page();return!this.missing()&&!LE(e,this.capability())?null:RE(this.capability(),e?.version)});title=Q(()=>{let e=this.page()?.version;return e?`Not available on Angular ${PE(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:yO,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&&(o_(),M(0,bO,8,5,`div`,0)),e&2){let e;N((e=t.text())?0:-1,e)}},styles:[`[_nghost-%COMP%] { display: block; } @@ -372,7 +372,7 @@ a[_ngcontent-%COMP%] { a[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})};function _O(e){return e?.platform===`angular-native`}function vO(e){return _O(e)||e?.platform===`nativescript`}function yO(e,t){let n=Object.values(e??{}).filter(_O);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 bO=[`trigger`],xO=[`list`],SO=(e,t)=>t.value;function CO(e,t){if(e&1&&(B(0,`span`,4),J(1),V()),e&2){let e=G();k(),Y(e.current().hint)}}function wO(e,t){if(e&1&&(B(0,`span`,15),J(1),V()),e&2){let e=G().$implicit;k(),Y(e.hint)}}function TO(e,t){if(e&1){let e=H();B(0,`li`,11),W(`pointerenter`,function(){let t=T(e).$index;return E(G(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=T(e).$index;return E(G(2).choose(t))}),D(),B(1,`svg`,12),Vg(2,`path`,13),V(),_s(),B(3,`span`,14),J(4),V(),M(5,wO,2,1,`span`,15),V()}if(e&2){let e=t.$implicit,n=t.$index,r=G(2);q(`active`,n===r.active())(`selected`,e.value===r.value()),j(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),k(4),Y(e.label),k(),N(e.hint?5:-1)}}function EO(e,t){if(e&1&&(B(0,`li`,10),J(1),V()),e&2){let e=G(2);k(),Y(e.emptyText())}}function DO(e,t){if(e&1&&(B(0,`ul`,8,1),_g(`list-in`),W(`pointerdown`,function(e){return e.preventDefault()}),P(2,TO,6,9,`li`,9,SO,!1,EO,2,1,`li`,10),V()),e&2){let e=G();q(`up`,e.dropUp()),j(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),k(2),F(e.options())}}var OO=0,kO=class e{options=$.required();value=Gv(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++OO}`;open=O(!1);active=O(-1);dropUp=O(!1);current=Q(()=>this.options().find(e=>e.value===this.value())??null);host=C(Il);injector=C(Ts);trigger=Jv.required(`trigger`);list=Jv(`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=A({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&l_(t.trigger,bO,5)(t.list,xO,5),e&2&&u_(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&U(`pointerdown`,function(e){return t.onOutside(e)},Iu),e&2&&q(`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&&(B(0,`button`,2,0),W(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),B(2,`span`,3),J(3),V(),M(4,CO,2,1,`span`,4),D(),B(5,`svg`,5),Vg(6,`path`,6),V()(),M(7,DO,5,5,`ul`,7)),e&2&&(qg(`disabled`,t.disabled()),j(`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),k(2),q(`placeholder`,!t.current()),k(),X(` `,t.current()?.label??t.placeholder(),` `),k(),N(t.current()?.hint?4:-1),k(3),N(t.open()?7:-1))},styles:[`[_nghost-%COMP%] { +}`]})};function CO(e){return e?.platform===`angular-native`}function wO(e){return CO(e)||e?.platform===`nativescript`}function TO(e,t){let n=Object.values(e??{}).filter(CO);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 EO=[`trigger`],DO=[`list`],OO=(e,t)=>t.value;function kO(e,t){if(e&1&&(B(0,`span`,4),J(1),V()),e&2){let e=G();k(),Y(e.current().hint)}}function AO(e,t){if(e&1&&(B(0,`span`,15),J(1),V()),e&2){let e=G().$implicit;k(),Y(e.hint)}}function jO(e,t){if(e&1){let e=H();B(0,`li`,11),W(`pointerenter`,function(){let t=T(e).$index;return E(G(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=T(e).$index;return E(G(2).choose(t))}),D(),B(1,`svg`,12),Vg(2,`path`,13),V(),_s(),B(3,`span`,14),J(4),V(),M(5,AO,2,1,`span`,15),V()}if(e&2){let e=t.$implicit,n=t.$index,r=G(2);q(`active`,n===r.active())(`selected`,e.value===r.value()),j(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),k(4),Y(e.label),k(),N(e.hint?5:-1)}}function MO(e,t){if(e&1&&(B(0,`li`,10),J(1),V()),e&2){let e=G(2);k(),Y(e.emptyText())}}function NO(e,t){if(e&1&&(B(0,`ul`,8,1),_g(`list-in`),W(`pointerdown`,function(e){return e.preventDefault()}),P(2,jO,6,9,`li`,9,OO,!1,MO,2,1,`li`,10),V()),e&2){let e=G();q(`up`,e.dropUp()),j(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),k(2),F(e.options())}}var PO=0,FO=class e{options=$.required();value=Kv(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++PO}`;open=O(!1);active=O(-1);dropUp=O(!1);current=Q(()=>this.options().find(e=>e.value===this.value())??null);host=C(Il);injector=C(Ts);trigger=Yv.required(`trigger`);list=Yv(`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=A({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&l_(t.trigger,EO,5)(t.list,DO,5),e&2&&u_(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&U(`pointerdown`,function(e){return t.onOutside(e)},Iu),e&2&&q(`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&&(B(0,`button`,2,0),W(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),B(2,`span`,3),J(3),V(),M(4,kO,2,1,`span`,4),D(),B(5,`svg`,5),Vg(6,`path`,6),V()(),M(7,NO,5,5,`ul`,7)),e&2&&(qg(`disabled`,t.disabled()),j(`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),k(2),q(`placeholder`,!t.current()),k(),X(` `,t.current()?.label??t.placeholder(),` `),k(),N(t.current()?.hint?4:-1),k(3),N(t.open()?7:-1))},styles:[`[_nghost-%COMP%] { position: relative; display: inline-flex; min-width: 0; @@ -567,7 +567,7 @@ li.selected[_ngcontent-%COMP%] .check[_ngcontent-%COMP%] { .chevron[_ngcontent-%COMP%] { transition: none; } -}`]})};function AO(e,t){let n=TE(t);if(EE(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=DE(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function jO(e){return e.flatMap(e=>e.kind===`directive`?jO(e.children):[{...e,children:jO(e.children)}])}function MO(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var NO={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function PO(e){return NO[e]}function FO(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 IO(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 LO(e){let t=e?.components,n=e?.depth;return t&&n?`Showing the first ${t} component instances, and none nested more than ${n} elements deep. Others are not listed or searchable.`:t?`Showing the first ${t} component instances. Others are not listed or searchable.`:n?`Components nested more than ${n} elements deep are not listed or searchable.`:`The page has more components than the tree shows.`}function RO(e,t){let n=t?.detail?.id??null,r=t?.pageId??null;if(r!==e.pageId)return{pageId:r,selectedId:n,detailId:n,destroyed:null};let i=e.selectedId;return n&&n!==e.detailId&&n!==i&&(i=n),i&&t&&!t.truncated&&!zO(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function zO(e,t){return e.some(e=>e.id===t||zO(e.children,t))}function BO(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 VO=(e,t)=>t.key,HO=(e,t)=>t.id;function UO(e,t){e&1&&(B(0,`p`,2),J(1,` The HTML came from the server, but no component was hydrated, so the app rendered again on the client. Add `),B(2,`code`),J(3,`provideClientHydration()`),V(),J(4,` and use a development build to see each component's status. `),V())}function WO(e,t){if(e&1&&(B(0,`li`)(1,`span`,9),J(2),V(),J(3),V()),e&2){let e=t.$implicit;M_(`count count-`+e.key),k(2),Y(e.value),k(),X(` `,e.label,` `)}}function GO(e,t){if(e&1&&(B(0,`span`,15),J(1,`Expected `),B(2,`code`),J(3),V()()),e&2){let e=G().$implicit;k(3),Y(e.expected)}}function KO(e,t){if(e&1&&(B(0,`span`,15),J(1,`Found `),B(2,`code`),J(3),V()()),e&2){let e=G().$implicit;k(3),Y(e.actual)}}function qO(e,t){if(e&1){let e=H();B(0,`li`)(1,`button`,12),W(`click`,function(){let t=T(e).$implicit;return E(G(4).showNode.emit(t.id))})(`focus`,function(){let t=T(e).$implicit;return E(G(4).highlight.emit(t.id))})(`blur`,function(){return T(e),E(G(4).highlight.emit(null))})(`mouseenter`,function(){let t=T(e).$implicit;return E(G(4).highlight.emit(t.id))})(`mouseleave`,function(){return T(e),E(G(4).highlight.emit(null))}),B(2,`span`,13),J(3),V(),B(4,`span`,14),J(5),V(),M(6,GO,4,1,`span`,15),M(7,KO,4,1,`span`,15),V()()}if(e&2){let e=t.$implicit;k(3),Y(e.name),k(2),X(`<`,e.tag,`>`),k(),N(e.expected?6:-1),k(),N(e.actual?7:-1)}}function JO(e,t){if(e&1&&(B(0,`h3`,10),J(1,`Mismatches`),V(),B(2,`ul`,11),P(3,qO,8,4,`li`,null,HO),V()),e&2){let e=G(2);k(3),F(e.mismatches)}}function YO(e,t){if(e&1){let e=H();B(0,`div`,3)(1,`ul`,4),P(2,WO,4,4,`li`,5,VO),V(),B(4,`button`,6),W(`click`,function(){return T(e),E(G(2).toggleOverlay())}),D(),B(5,`svg`,7),Vg(6,`rect`,8),V(),J(7,` Outline on page `),V()(),M(8,JO,5,0)}if(e&2){let e=G(),t=G();k(2),F(t.counts()),k(2),j(`aria-pressed`,t.overlayOn()),k(4),N(e.mismatches.length?8:-1)}}function XO(e,t){e&1&&M(0,UO,5,0,`p`,2)(1,YO,9,2),e&2&&N(+!!t.hydrated)}function ZO(e,t){e&1&&(B(0,`p`,2),J(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),B(2,`code`),J(3,`provideClientHydration()`),V(),J(4,`, each component shows whether it was hydrated, skipped or mismatched. `),V())}var QO=class e{report=$(void 0);overlay=Rv();showNode=Rv();highlight=Rv();overlayOn=Fv(()=>this.report()?.overlay===!0);counts=Q(()=>{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=A({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&&(B(0,`section`,0)(1,`h2`,1),J(2,`Hydration`),V(),M(3,XO,2,1)(4,ZO,5,0,`p`,2),V()),e&2){let e;k(3),N((e=t.report())?3:4,e)}},styles:[`.hydration[_ngcontent-%COMP%] { +}`]})};function IO(e,t){let n=AE(t);if(jE(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=ME(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function LO(e){return e.flatMap(e=>e.kind===`directive`?LO(e.children):[{...e,children:LO(e.children)}])}function RO(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var zO={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function BO(e){return zO[e]}function VO(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 HO(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 UO(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 WO(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&&!GO(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function GO(e,t){return e.some(e=>e.id===t||GO(e.children,t))}function KO(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 qO=(e,t)=>t.key,JO=(e,t)=>t.id;function YO(e,t){e&1&&(B(0,`p`,2),J(1,` The HTML came from the server, but no component was hydrated, so the app rendered again on the client. Add `),B(2,`code`),J(3,`provideClientHydration()`),V(),J(4,` and use a development build to see each component's status. `),V())}function XO(e,t){if(e&1&&(B(0,`li`)(1,`span`,9),J(2),V(),J(3),V()),e&2){let e=t.$implicit;M_(`count count-`+e.key),k(2),Y(e.value),k(),X(` `,e.label,` `)}}function ZO(e,t){if(e&1&&(B(0,`span`,15),J(1,`Expected `),B(2,`code`),J(3),V()()),e&2){let e=G().$implicit;k(3),Y(e.expected)}}function QO(e,t){if(e&1&&(B(0,`span`,15),J(1,`Found `),B(2,`code`),J(3),V()()),e&2){let e=G().$implicit;k(3),Y(e.actual)}}function $O(e,t){if(e&1){let e=H();B(0,`li`)(1,`button`,12),W(`click`,function(){let t=T(e).$implicit;return E(G(4).showNode.emit(t.id))})(`focus`,function(){let t=T(e).$implicit;return E(G(4).highlight.emit(t.id))})(`blur`,function(){return T(e),E(G(4).highlight.emit(null))})(`mouseenter`,function(){let t=T(e).$implicit;return E(G(4).highlight.emit(t.id))})(`mouseleave`,function(){return T(e),E(G(4).highlight.emit(null))}),B(2,`span`,13),J(3),V(),B(4,`span`,14),J(5),V(),M(6,ZO,4,1,`span`,15),M(7,QO,4,1,`span`,15),V()()}if(e&2){let e=t.$implicit;k(3),Y(e.name),k(2),X(`<`,e.tag,`>`),k(),N(e.expected?6:-1),k(),N(e.actual?7:-1)}}function ek(e,t){if(e&1&&(B(0,`h3`,10),J(1,`Mismatches`),V(),B(2,`ul`,11),P(3,$O,8,4,`li`,null,JO),V()),e&2){let e=G(2);k(3),F(e.mismatches)}}function tk(e,t){if(e&1){let e=H();B(0,`div`,3)(1,`ul`,4),P(2,XO,4,4,`li`,5,qO),V(),B(4,`button`,6),W(`click`,function(){return T(e),E(G(2).toggleOverlay())}),D(),B(5,`svg`,7),Vg(6,`rect`,8),V(),J(7,` Outline on page `),V()(),M(8,ek,5,0)}if(e&2){let e=G(),t=G();k(2),F(t.counts()),k(2),j(`aria-pressed`,t.overlayOn()),k(4),N(e.mismatches.length?8:-1)}}function nk(e,t){e&1&&M(0,YO,5,0,`p`,2)(1,tk,9,2),e&2&&N(+!!t.hydrated)}function rk(e,t){e&1&&(B(0,`p`,2),J(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),B(2,`code`),J(3,`provideClientHydration()`),V(),J(4,`, each component shows whether it was hydrated, skipped or mismatched. `),V())}var ik=class e{report=$(void 0);overlay=zv();showNode=zv();highlight=zv();overlayOn=Iv(()=>this.report()?.overlay===!0);counts=Q(()=>{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=A({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&&(B(0,`section`,0)(1,`h2`,1),J(2,`Hydration`),V(),M(3,nk,2,1)(4,rk,5,0,`p`,2),V()),e&2){let e;k(3),N((e=t.report())?3:4,e)}},styles:[`.hydration[_ngcontent-%COMP%] { margin-top: 16px; } @@ -738,7 +738,7 @@ svg[_ngcontent-%COMP%] { button[_ngcontent-%COMP%] { transition: none; } -}`]})};function $O(e){return new Date(e).toLocaleTimeString()}var ek=/[ \t\n\r]/;function tk(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 ak(e){return new Date(e).toLocaleTimeString()}var ok=/[ \t\n\r]/;function sk(e){let t=e.trim(),n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n)return null;let r=``,i=0,a=()=>`\n${` `.repeat(i)}`;for(let e=0;e0?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -765,7 +765,7 @@ a[_ngcontent-%COMP%] { a[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})},ak=864e13,ok=200,sk=300,ck=100,lk=10,uk=100,dk=2e3,fk=2e3,pk=4e3,mk=1e3,hk=100,gk=3,_k=50,vk={component:`c`,hook:`h`,afterRender:`r`,output:`o`},yk=Object.values(vk),bk=e=>!!e&&typeof e==`object`&&!Array.isArray(e),xk=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,Sk=(e,t)=>typeof e==`string`?e.slice(0,t):``,Ck=e=>xk(e)>0?xk(e):void 0,wk=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function Tk(e){if(!bk(e))return null;let t=Sk(e.name,ok);return t?{name:t,checks:xk(e.checks),ms:xk(e.ms)}:null}function Ek(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>mk||typeof o!=`string`||!yk.includes(o)?null:[n,r,xk(i),a,o]}function Dk(e,t){if(!bk(e)||typeof e.id!=`number`)return null;let n=wk(e.components,lk).map(Tk).filter(e=>!!e),r=Sk(e.trigger,sk),i=wk(e.spans,40).map(e=>Ek(e,t)).filter(e=>!!e),a=Array.isArray(e.spans)?e.spans.length-40:0,o=Math.floor(xk(e.droppedSpans))+Math.max(0,a),s={t:typeof e.t==`number`?xk(e.t):void 0,hookMs:Ck(e.hookMs),afterRenderMs:Ck(e.afterRenderMs),outputMs:Ck(e.outputMs)},c=jk(e.cause),l=Ck(e.refreshed),u=Ck(e.unchanged);return{id:xk(e.id),at:xk(e.at),ms:xk(e.ms),passes:xk(e.passes),...r?{trigger:r}:{},checks:xk(e.checks),components:n,...Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0)),...i.length?{spans:i}:{},...o?{droppedSpans:o}:{},...c?{cause:c}:{},...l?{refreshed:l}:{},...u?{unchanged:u}:{}}}var Ok=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],kk={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`},Ak=e=>typeof e==`string`&&Ok.includes(e);function jk(e){if(!bk(e)||!Ak(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};Ak(e.via)&&(n.via=e.via);for(let r of t){let t=Sk(e[r],ok);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=wk(e.stack,gk).map(e=>Sk(e,sk)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(xk(e.more));return i&&(n.more=i),n}function Mk(e){if(!bk(e))return null;let t=Sk(e.name,ok);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(xk(e.refreshed)),unchanged:Math.floor(xk(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function Nk(e){if(!bk(e))return null;let t=Sk(e.name,ok),n=Sk(e.input,ok);if(!t||!n)return null;let r=Sk(e.parent,ok);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(xk(e.inPlace)),sameContents:Math.floor(xk(e.sameContents))}}function Pk(e){if(!bk(e))return null;let t=Sk(e.name,ok);if(!t)return null;let n=wk(e.tasks,3).map(e=>Sk(e,ok)).filter(Boolean);return{name:t,ticks:Math.floor(xk(e.ticks)),...n.length?{tasks:n}:{}}}function Fk(e){if(!bk(e))return;let t={};if(bk(e.causes))for(let n of Ok){let r=Math.floor(xk(e.causes[n]));r&&(t[n]=r)}let n=wk(e.components,uk).map(Mk).filter(e=>!!e),r=wk(e.inputs,_k).map(Nk).filter(e=>!!e),i=wk(e.zone,_k).map(Pk).filter(e=>!!e),a=Math.floor(xk(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 Ik(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(`${kk[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 ${kk[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 Lk(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 Rk(e){let t=Tk(e);return!t||!bk(e)?null:{...t,maxMs:xk(e.maxMs),cycles:xk(e.cycles)}}function zk(e){if(!bk(e))return null;let t=Sk(e.name,ok),n=Sk(e.hook,ck);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:xk(r),ms:xk(i),maxMs:xk(a)}}function Bk(e){if(!bk(e))return null;let t=Sk(e.name,ok);if(!t)return null;let n=Sk(e.listener,ok);return{name:t,...n?{listener:n}:{},calls:xk(e.calls),ms:xk(e.ms),maxMs:xk(e.maxMs)}}function Vk(e){if(bk(e)&&xk(e.runs))return{runs:xk(e.runs),ms:xk(e.ms),maxMs:xk(e.maxMs)}}function Hk(e,t){if(!bk(e))return null;let n=wk(e.spanNames,pk).map(e=>Sk(e,sk)),r=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,fk)).map(e=>Dk(e,n.length)).filter(e=>!!e):[],i={},a=0;if(bk(e.hosts)){let t=Object.entries(e.hosts);a=Math.max(0,t.length-dk);for(let[e,n]of t.slice(0,dk))e.length<50&&xk(n)&&(i[e]=xk(n))}let o=Array.isArray(e.components)?e.components:[],s=Math.floor(xk(e.droppedClasses))+Math.max(0,o.length-uk),c=Math.floor(xk(e.droppedHosts))+a,l=wk(e.hooks,hk).map(zk).filter(e=>!!e),u=wk(e.outputs,hk).map(Bk).filter(e=>!!e),d=Math.max(0,wk(e.hooks,1/0).length-hk)+Math.max(0,wk(e.outputs,1/0).length-hk),f=Math.floor(xk(e.droppedTimings))+d,p=Vk(e.afterRender),m=r.some(e=>e.spans?.length),h=Fk(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=ak?xk(e.startedAt):null,dropped:xk(e.dropped),cycles:r,components:o.slice(0,uk).map(Rk).filter(e=>!!e),...s?{droppedClasses:s}:{},hosts:i,...c?{droppedHosts:c}:{},...l.length?{hooks:l}:{},...u.length?{outputs:u}:{},...f?{droppedTimings:f}:{},...p?{afterRender:p}:{},...m?{spanNames:n}:{},...h?{diagnosis:h}:{}}}var Uk=`pangular-inspector/change-detection`;function Wk(e,t,n=Date.now()){return{format:Uk,version:1,exportedAt:n,pageId:t,recording:{...Hk(e,fk)??e,recording:!1,hosts:{}}}}function Gk(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(!bk(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=bk(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=Hk(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=Sk(n.pageId??r.pageId,49)||`imported`,o=Ck(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var Kk=1,qk=1,Jk=2,Yk={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},Xk=e=>Math.round(e*1e6)/1e3;function Zk(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:Kk,tid:qk,ts:Xk(e),dur:Xk(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:Ik(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===vk.output){let n=e+i;a.push({name:l,cat:Yk[d],ph:`X`,pid:Kk,tid:Jk,ts:Xk(n),dur:Xk(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=Xk((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:Kk,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l(qk,`thread_name`,`Change detection`),l(Jk,`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<=ak?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}var Qk=16.6;function $k(e){return e.ms>Qk}function eA(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function tA(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 nA(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 rA(e){let t=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(t,Qk*1.25)}function iA(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 aA={c:`component`,h:`hook`,r:`afterRender`,o:`output`};function oA(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 sA(e,t){let n=e.filter(e=>e.spans?.length);if(!n.length)return null;let r=n.map(e=>{let t=e.spans,n=Math.min(0,...t.map(e=>e[1])),r=Math.max(e.ms,...t.map(e=>e[1]+e[2]));return{cycle:e,spans:t,from:n,width:Math.max(r-n,.001)}}),i=r.reduce((e,t)=>e+t.width,0),a=[],o=[],s=0,c=0;for(let{cycle:e,spans:n,from:l,width:u}of r){o.push({id:e.id,x:s/i*100,w:u/i*100,droppedSpans:e.droppedSpans??0});let r=[...n].sort((e,t)=>e[1]-t[1]||e[3]-t[3]),d=[];for(let[n,o,u,f,p]of r){let r=t[n]??`unknown`,m=d[f-1],h=f>0&&m!==void 0&&ot.kind,lA=(e,t)=>t.name,uA=(e,t)=>t.name+`.`+t.input;function dA(e,t){e&1&&(B(0,`p`,3),J(1,` The page has no Angular change detection scheduler the overlay could find (it needs Angular 18 or later), so cycles have no cause. `),V())}function fA(e,t){if(e&1&&(B(0,`tr`)(1,`td`),J(2),V(),B(3,`td`,6),J(4),V()()),e&2){let e=t.$implicit;k(2),Y(e.label),k(2),Y(e.count)}}function pA(e,t){if(e&1&&(B(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),J(4,`Trigger`),V(),B(5,`th`,5),J(6,`Cycles`),V()()(),B(7,`tbody`),P(8,fA,5,2,`tr`,null,cA),V()()),e&2){let e=G(2);k(8),F(e.causes())}}function mA(e,t){e&1&&(B(0,`p`,3),J(1,`No cycle has a cause yet.`),V())}function hA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,7),J(2),V(),B(3,`td`,6),J(4),V(),B(5,`td`,7),J(6),V()()),e&2){let e=t.$implicit;k(2),Y(e.name),k(2),Y(e.ticks),k(2),Y(e.tasks?.join(`, `))}}function gA(e,t){if(e&1&&(B(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),J(4,`Component`),V(),B(5,`th`,5),J(6,`Zone-only ticks`),V(),B(7,`th`,4),J(8,`After`),V()()(),B(9,`tbody`),P(10,hA,7,3,`tr`,null,lA),V()()),e&2){let e=G(3);k(10),F(e.zone())}}function _A(e,t){if(e&1&&(B(0,`p`,3),J(1),V()),e&2){let e=G(3);k(),Y(e.zoneNote())}}function vA(e,t){if(e&1&&(B(0,`div`)(1,`h4`),J(2,`Depends on zone.js`),V(),M(3,gA,12,0,`table`)(4,_A,2,1,`p`,3),V()),e&2){let e=G(),t=G();k(3),N(t.zone().length?3:e.triggers?4:-1)}}function yA(e,t){e&1&&(B(0,`p`,3),J(1,`The page can't watch DOM updates, so wasted checks are not counted.`),V())}function bA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,7),J(2),V(),B(3,`td`,6),J(4),V(),B(5,`td`,6),J(6),V(),B(7,`td`),J(8),V()()),e&2){let e=t.$implicit,n=G(3);k(2),Y(e.name),k(2),Y(e.refreshed),k(2),Z(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),k(2),Y(e.strategy??`Unknown`)}}function xA(e,t){if(e&1&&(B(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),J(4,`Component`),V(),B(5,`th`,5),J(6,`Refreshed`),V(),B(7,`th`,5),J(8,`Changed nothing`),V(),B(9,`th`,4),J(10,`Strategy`),V()()(),B(11,`tbody`),P(12,bA,9,5,`tr`,null,lA),V()()),e&2){let e=G(2);k(12),F(e.wasted())}}function SA(e,t){e&1&&(B(0,`p`,3),J(1,`Every refreshed check changed something.`),V())}function CA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,7),J(2),V(),B(3,`td`,7),J(4),V(),B(5,`td`,6),J(6),V(),B(7,`td`,6),J(8),V()()),e&2){let e=t.$implicit;k(2),Z(``,e.name,`.`,e.input),k(2),Y(e.parent??`Unknown`),k(2),Y(e.inPlace),k(2),Y(e.sameContents)}}function wA(e,t){if(e&1&&(B(0,`h4`),J(1,`Inputs that break OnPush`),V(),B(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),J(6,`Input`),V(),B(7,`th`,4),J(8,`Set by`),V(),B(9,`th`,5),J(10,`Changed in place`),V(),B(11,`th`,5),J(12,`Same contents, new reference`),V()()(),B(13,`tbody`),P(14,CA,9,5,`tr`,null,uA),V()()),e&2){let e=G(2);k(14),F(e.inputs())}}function TA(e,t){if(e&1&&(B(0,`li`),J(1),V()),e&2){let e=t.$implicit;k(),Y(e.text)}}function EA(e,t){if(e&1&&(B(0,`h4`),J(1,`Hints`),V(),B(2,`ul`,8),P(3,TA,2,1,`li`,null,kg),V()),e&2){let e=G(2);k(3),F(e.hints())}}function DA(e,t){if(e&1&&(B(0,`section`,0)(1,`h3`,1),J(2,`Why it ran and what it wasted`),V(),B(3,`div`,2)(4,`div`)(5,`h4`),J(6,`What started the cycles`),V(),M(7,dA,2,0,`p`,3)(8,pA,10,0,`table`)(9,mA,2,0,`p`,3),V(),M(10,vA,5,1,`div`),V(),B(11,`h4`),J(12,`Wasted checks`),V(),M(13,yA,2,0,`p`,3)(14,xA,14,0,`table`)(15,SA,2,0,`p`,3),M(16,wA,16,0),M(17,EA,5,0),V()),e&2){let e=t,n=G();k(7),N(e.triggers?n.causes().length?8:9:7),k(3),N(n.hasZone()?10:-1),k(3),N(e.waste?n.wasted().length?14:15:13),k(3),N(n.inputs().length?16:-1),k(),N(n.hints().length?17:-1)}}var OA=10,kA=class e{page=$(null);diagnosis=Q(()=>this.page()?.diagnosis??null);causes=Q(()=>{let e=this.diagnosis()?.causes??{};return Ok.filter(t=>e[t]).map(t=>({kind:t,label:kk[t],count:e[t]}))});zone=Q(()=>(this.diagnosis()?.zone??[]).slice(0,OA));zoneTicks=Q(()=>this.diagnosis()?.causes.zone??0);hasZone=Q(()=>this.diagnosis()?.zoneJs??(this.zone().length>0||this.zoneTicks()>0));zoneNote=Q(()=>{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=Q(()=>(this.diagnosis()?.components??[]).filter(e=>e.unchanged>0).slice(0,OA));inputs=Q(()=>(this.diagnosis()?.inputs??[]).slice(0,OA));hints=Q(()=>Lk(this.diagnosis()??void 0).slice(0,OA));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({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&&M(0,DA,18,5,`section`,0),e&2){let e;N((e=t.diagnosis())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})},dk=864e13,fk=200,pk=300,mk=100,hk=10,gk=100,_k=2e3,vk=2e3,yk=4e3,bk=1e3,xk=100,Sk=3,Ck=50,wk={component:`c`,hook:`h`,afterRender:`r`,output:`o`},Tk=Object.values(wk),Ek=e=>!!e&&typeof e==`object`&&!Array.isArray(e),Dk=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,Ok=(e,t)=>typeof e==`string`?e.slice(0,t):``,kk=e=>Dk(e)>0?Dk(e):void 0,Ak=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function jk(e){if(!Ek(e))return null;let t=Ok(e.name,fk);return t?{name:t,checks:Dk(e.checks),ms:Dk(e.ms)}:null}function Mk(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>bk||typeof o!=`string`||!Tk.includes(o)?null:[n,r,Dk(i),a,o]}function Nk(e,t){if(!Ek(e)||typeof e.id!=`number`)return null;let n=Ak(e.components,hk).map(jk).filter(e=>!!e),r=Ok(e.trigger,pk),i=Ak(e.spans,40).map(e=>Mk(e,t)).filter(e=>!!e),a=Array.isArray(e.spans)?e.spans.length-40:0,o=Math.floor(Dk(e.droppedSpans))+Math.max(0,a),s={t:typeof e.t==`number`?Dk(e.t):void 0,hookMs:kk(e.hookMs),afterRenderMs:kk(e.afterRenderMs),outputMs:kk(e.outputMs)},c=Lk(e.cause),l=kk(e.refreshed),u=kk(e.unchanged);return{id:Dk(e.id),at:Dk(e.at),ms:Dk(e.ms),passes:Dk(e.passes),...r?{trigger:r}:{},checks:Dk(e.checks),components:n,...Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0)),...i.length?{spans:i}:{},...o?{droppedSpans:o}:{},...c?{cause:c}:{},...l?{refreshed:l}:{},...u?{unchanged:u}:{}}}var Pk=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],Fk={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`},Ik=e=>typeof e==`string`&&Pk.includes(e);function Lk(e){if(!Ek(e)||!Ik(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};Ik(e.via)&&(n.via=e.via);for(let r of t){let t=Ok(e[r],fk);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=Ak(e.stack,Sk).map(e=>Ok(e,pk)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(Dk(e.more));return i&&(n.more=i),n}function Rk(e){if(!Ek(e))return null;let t=Ok(e.name,fk);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(Dk(e.refreshed)),unchanged:Math.floor(Dk(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function zk(e){if(!Ek(e))return null;let t=Ok(e.name,fk),n=Ok(e.input,fk);if(!t||!n)return null;let r=Ok(e.parent,fk);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(Dk(e.inPlace)),sameContents:Math.floor(Dk(e.sameContents))}}function Bk(e){if(!Ek(e))return null;let t=Ok(e.name,fk);if(!t)return null;let n=Ak(e.tasks,3).map(e=>Ok(e,fk)).filter(Boolean);return{name:t,ticks:Math.floor(Dk(e.ticks)),...n.length?{tasks:n}:{}}}function Vk(e){if(!Ek(e))return;let t={};if(Ek(e.causes))for(let n of Pk){let r=Math.floor(Dk(e.causes[n]));r&&(t[n]=r)}let n=Ak(e.components,gk).map(Rk).filter(e=>!!e),r=Ak(e.inputs,Ck).map(zk).filter(e=>!!e),i=Ak(e.zone,Ck).map(Bk).filter(e=>!!e),a=Math.floor(Dk(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 Hk(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(`${Fk[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 ${Fk[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 Uk(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 Wk(e){let t=jk(e);return!t||!Ek(e)?null:{...t,maxMs:Dk(e.maxMs),cycles:Dk(e.cycles)}}function Gk(e){if(!Ek(e))return null;let t=Ok(e.name,fk),n=Ok(e.hook,mk);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:Dk(r),ms:Dk(i),maxMs:Dk(a)}}function Kk(e){if(!Ek(e))return null;let t=Ok(e.name,fk);if(!t)return null;let n=Ok(e.listener,fk);return{name:t,...n?{listener:n}:{},calls:Dk(e.calls),ms:Dk(e.ms),maxMs:Dk(e.maxMs)}}function qk(e){if(Ek(e)&&Dk(e.runs))return{runs:Dk(e.runs),ms:Dk(e.ms),maxMs:Dk(e.maxMs)}}function Jk(e,t){if(!Ek(e))return null;let n=Ak(e.spanNames,yk).map(e=>Ok(e,pk)),r=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,vk)).map(e=>Nk(e,n.length)).filter(e=>!!e):[],i={},a=0;if(Ek(e.hosts)){let t=Object.entries(e.hosts);a=Math.max(0,t.length-_k);for(let[e,n]of t.slice(0,_k))e.length<50&&Dk(n)&&(i[e]=Dk(n))}let o=Array.isArray(e.components)?e.components:[],s=Math.floor(Dk(e.droppedClasses))+Math.max(0,o.length-gk),c=Math.floor(Dk(e.droppedHosts))+a,l=Ak(e.hooks,xk).map(Gk).filter(e=>!!e),u=Ak(e.outputs,xk).map(Kk).filter(e=>!!e),d=Math.max(0,Ak(e.hooks,1/0).length-xk)+Math.max(0,Ak(e.outputs,1/0).length-xk),f=Math.floor(Dk(e.droppedTimings))+d,p=qk(e.afterRender),m=r.some(e=>e.spans?.length),h=Vk(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=dk?Dk(e.startedAt):null,dropped:Dk(e.dropped),cycles:r,components:o.slice(0,gk).map(Wk).filter(e=>!!e),...s?{droppedClasses:s}:{},hosts:i,...c?{droppedHosts:c}:{},...l.length?{hooks:l}:{},...u.length?{outputs:u}:{},...f?{droppedTimings:f}:{},...p?{afterRender:p}:{},...m?{spanNames:n}:{},...h?{diagnosis:h}:{}}}var Yk=`pangular-inspector/change-detection`;function Xk(e,t,n=Date.now()){return{format:Yk,version:1,exportedAt:n,pageId:t,recording:{...Jk(e,vk)??e,recording:!1,hosts:{}}}}function Zk(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(!Ek(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=Ek(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=Jk(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=Ok(n.pageId??r.pageId,49)||`imported`,o=kk(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var Qk=1,$k=1,eA=2,tA={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},nA=e=>Math.round(e*1e6)/1e3;function rA(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:Qk,tid:$k,ts:nA(e),dur:nA(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:Hk(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===wk.output){let n=e+i;a.push({name:l,cat:tA[d],ph:`X`,pid:Qk,tid:eA,ts:nA(n),dur:nA(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=nA((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:Qk,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l($k,`thread_name`,`Change detection`),l(eA,`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<=dk?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}var iA=16.6;function aA(e){return e.ms>iA}function oA(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function sA(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 cA(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 lA(e){let t=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(t,iA*1.25)}function uA(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 dA={c:`component`,h:`hook`,r:`afterRender`,o:`output`};function fA(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 pA(e,t){let n=e.filter(e=>e.spans?.length);if(!n.length)return null;let r=n.map(e=>{let t=e.spans,n=Math.min(0,...t.map(e=>e[1])),r=Math.max(e.ms,...t.map(e=>e[1]+e[2]));return{cycle:e,spans:t,from:n,width:Math.max(r-n,.001)}}),i=r.reduce((e,t)=>e+t.width,0),a=[],o=[],s=0,c=0;for(let{cycle:e,spans:n,from:l,width:u}of r){o.push({id:e.id,x:s/i*100,w:u/i*100,droppedSpans:e.droppedSpans??0});let r=[...n].sort((e,t)=>e[1]-t[1]||e[3]-t[3]),d=[];for(let[n,o,u,f,p]of r){let r=t[n]??`unknown`,m=d[f-1],h=f>0&&m!==void 0&&ot.kind,hA=(e,t)=>t.name,gA=(e,t)=>t.name+`.`+t.input;function _A(e,t){e&1&&(B(0,`p`,3),J(1,` The page has no Angular change detection scheduler the overlay could find (it needs Angular 18 or later), so cycles have no cause. `),V())}function vA(e,t){if(e&1&&(B(0,`tr`)(1,`td`),J(2),V(),B(3,`td`,6),J(4),V()()),e&2){let e=t.$implicit;k(2),Y(e.label),k(2),Y(e.count)}}function yA(e,t){if(e&1&&(B(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),J(4,`Trigger`),V(),B(5,`th`,5),J(6,`Cycles`),V()()(),B(7,`tbody`),P(8,vA,5,2,`tr`,null,mA),V()()),e&2){let e=G(2);k(8),F(e.causes())}}function bA(e,t){e&1&&(B(0,`p`,3),J(1,`No cycle has a cause yet.`),V())}function xA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,7),J(2),V(),B(3,`td`,6),J(4),V(),B(5,`td`,7),J(6),V()()),e&2){let e=t.$implicit;k(2),Y(e.name),k(2),Y(e.ticks),k(2),Y(e.tasks?.join(`, `))}}function SA(e,t){if(e&1&&(B(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),J(4,`Component`),V(),B(5,`th`,5),J(6,`Zone-only ticks`),V(),B(7,`th`,4),J(8,`After`),V()()(),B(9,`tbody`),P(10,xA,7,3,`tr`,null,hA),V()()),e&2){let e=G(3);k(10),F(e.zone())}}function CA(e,t){if(e&1&&(B(0,`p`,3),J(1),V()),e&2){let e=G(3);k(),Y(e.zoneNote())}}function wA(e,t){if(e&1&&(B(0,`div`)(1,`h4`),J(2,`Depends on zone.js`),V(),M(3,SA,12,0,`table`)(4,CA,2,1,`p`,3),V()),e&2){let e=G(),t=G();k(3),N(t.zone().length?3:e.triggers?4:-1)}}function TA(e,t){e&1&&(B(0,`p`,3),J(1,`The page can't watch DOM updates, so wasted checks are not counted.`),V())}function EA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,7),J(2),V(),B(3,`td`,6),J(4),V(),B(5,`td`,6),J(6),V(),B(7,`td`),J(8),V()()),e&2){let e=t.$implicit,n=G(3);k(2),Y(e.name),k(2),Y(e.refreshed),k(2),Z(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),k(2),Y(e.strategy??`Unknown`)}}function DA(e,t){if(e&1&&(B(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),J(4,`Component`),V(),B(5,`th`,5),J(6,`Refreshed`),V(),B(7,`th`,5),J(8,`Changed nothing`),V(),B(9,`th`,4),J(10,`Strategy`),V()()(),B(11,`tbody`),P(12,EA,9,5,`tr`,null,hA),V()()),e&2){let e=G(2);k(12),F(e.wasted())}}function OA(e,t){e&1&&(B(0,`p`,3),J(1,`Every refreshed check changed something.`),V())}function kA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,7),J(2),V(),B(3,`td`,7),J(4),V(),B(5,`td`,6),J(6),V(),B(7,`td`,6),J(8),V()()),e&2){let e=t.$implicit;k(2),Z(``,e.name,`.`,e.input),k(2),Y(e.parent??`Unknown`),k(2),Y(e.inPlace),k(2),Y(e.sameContents)}}function AA(e,t){if(e&1&&(B(0,`h4`),J(1,`Inputs that break OnPush`),V(),B(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),J(6,`Input`),V(),B(7,`th`,4),J(8,`Set by`),V(),B(9,`th`,5),J(10,`Changed in place`),V(),B(11,`th`,5),J(12,`Same contents, new reference`),V()()(),B(13,`tbody`),P(14,kA,9,5,`tr`,null,gA),V()()),e&2){let e=G(2);k(14),F(e.inputs())}}function jA(e,t){if(e&1&&(B(0,`li`),J(1),V()),e&2){let e=t.$implicit;k(),Y(e.text)}}function MA(e,t){if(e&1&&(B(0,`h4`),J(1,`Hints`),V(),B(2,`ul`,8),P(3,jA,2,1,`li`,null,kg),V()),e&2){let e=G(2);k(3),F(e.hints())}}function NA(e,t){if(e&1&&(B(0,`section`,0)(1,`h3`,1),J(2,`Why it ran and what it wasted`),V(),B(3,`div`,2)(4,`div`)(5,`h4`),J(6,`What started the cycles`),V(),M(7,_A,2,0,`p`,3)(8,yA,10,0,`table`)(9,bA,2,0,`p`,3),V(),M(10,wA,5,1,`div`),V(),B(11,`h4`),J(12,`Wasted checks`),V(),M(13,TA,2,0,`p`,3)(14,DA,14,0,`table`)(15,OA,2,0,`p`,3),M(16,AA,16,0),M(17,MA,5,0),V()),e&2){let e=t,n=G();k(7),N(e.triggers?n.causes().length?8:9:7),k(3),N(n.hasZone()?10:-1),k(3),N(e.waste?n.wasted().length?14:15:13),k(3),N(n.inputs().length?16:-1),k(),N(n.hints().length?17:-1)}}var PA=10,FA=class e{page=$(null);diagnosis=Q(()=>this.page()?.diagnosis??null);causes=Q(()=>{let e=this.diagnosis()?.causes??{};return Pk.filter(t=>e[t]).map(t=>({kind:t,label:Fk[t],count:e[t]}))});zone=Q(()=>(this.diagnosis()?.zone??[]).slice(0,PA));zoneTicks=Q(()=>this.diagnosis()?.causes.zone??0);hasZone=Q(()=>this.diagnosis()?.zoneJs??(this.zone().length>0||this.zoneTicks()>0));zoneNote=Q(()=>{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=Q(()=>(this.diagnosis()?.components??[]).filter(e=>e.unchanged>0).slice(0,PA));inputs=Q(()=>(this.diagnosis()?.inputs??[]).slice(0,PA));hints=Q(()=>Uk(this.diagnosis()??void 0).slice(0,PA));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({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&&M(0,NA,18,5,`section`,0),e&2){let e;N((e=t.diagnosis())?0:-1,e)}},styles:[`[_nghost-%COMP%] { display: block; } @@ -844,7 +844,7 @@ td.mono[_ngcontent-%COMP%] { .hints[_ngcontent-%COMP%] li[_ngcontent-%COMP%] + li[_ngcontent-%COMP%] { margin-top: 4px; -}`]})},AA=(e,t)=>t.cycle.id,jA=(e,t)=>t.id;function MA(e,t){if(e&1){let e=H();B(0,`button`,27),W(`click`,function(){return T(e),E(G().showAll())}),J(1,`Show all cycles`),V()}}function NA(e,t){if(e&1&&Vg(0,`div`,28),e&2){let e=t;K(`left`,e.left,`%`)(`width`,e.width,`%`)}}function PA(e,t){if(e&1&&(B(0,`div`,29),Vg(1,`span`,30),V()),e&2){let e=t.$implicit,n=G();q(`over`,e.over)(`out`,!n.inRange(e.index)&&!!n.range())(`active`,n.focused()&&n.active()===e.index),qg(`id`,n.optionId(e.index)),j(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),k(),K(`height`,e.height,`%`)}}function FA(e,t){e&1&&(B(0,`span`,33),J(1,`over budget`),V())}function IA(e,t){if(e&1&&(B(0,`p`),J(1,` after `),B(2,`span`,35),J(3),V()()),e&2){let e=G();k(3),Y(e.cycle.trigger)}}function LA(e,t){if(e&1&&(B(0,`p`,34)(1,`span`,36),J(2),V(),B(3,`span`),J(4),V()()),e&2){let e=t.$implicit,n=G(2);k(2),Y(e.name),k(2),Y(n.fmt(e.ms))}}function RA(e,t){if(e&1&&(B(0,`div`,31)(1,`p`,32)(2,`strong`),J(3),V(),B(4,`span`),J(5),V(),M(6,FA,2,0,`span`,33),V(),M(7,IA,4,1,`p`),B(8,`p`),J(9),V(),P(10,LA,5,2,`p`,34,kg),V()),e&2){let e=t,n=G();K(`left`,e.left)(`right`,e.right),k(3),Y(n.fmt(e.cycle.ms)),k(2),X(`cycle `,e.cycle.id),k(),N(e.over?6:-1),k(),N(e.cycle.trigger?7:-1),k(2),iv(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),k(),F(e.top)}}function zA(e,t){if(e&1&&Vg(0,`span`),e&2){let e=t.$implicit;q(`over`,e.over)}}function BA(e,t){if(e&1&&J(0),e&2){let e=t,n=G(2);Z(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function VA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,37),J(2),V(),B(3,`td`,37),J(4),V(),B(5,`td`),J(6),V(),B(7,`td`,37),J(8),V(),B(9,`td`,37),J(10),V(),B(11,`td`,35),J(12),V(),B(13,`td`,35),M(14,BA,1,2),V()()),e&2){let e,n=t.$implicit,r=G();k(2),Y(n.id),k(2),Y(r.fmt(n.ms)),k(2),Y(r.isOver(n)?`Over`:`Within`),k(2),Y(n.checks),k(2),Y(n.passes),k(2),Y(n.trigger??``),k(2),N((e=n.components[0])?14:-1,e)}}var HA=0,UA=80,WA=10,GA=class e{cycles=$([]);range=Gv(null);gapUntil=UA;budgetLabel=`${Qk} ms budget`;uid=`cd-chart-${HA++}`;hintId=`${this.uid}-hint`;active=O(null);anchor=null;dragging=!1;hover=O(null);focused=O(!1);max=Q(()=>rA(this.cycles()));budgetAt=Q(()=>Qk/this.max()*100);bars=Q(()=>{let e=this.max();return this.cycles().map((t,n)=>({cycle:t,index:n,height:t.ms/e*100,over:$k(t),label:this.describe(t)}))});firstId=Q(()=>this.cycles()[0]?.id??0);lastId=Q(()=>this.cycles().at(-1)?.id??0);span=Q(()=>{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||atA(this.cycles(),this.range()));startId=Q(()=>this.selected()[0]?.id??``);endId=Q(()=>this.selected().at(-1)?.id??``);band=Q(()=>{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=Q(()=>{let e=this.selected(),t=e.filter($k).length;return`${this.span()?e.length===1?`Cycle ${e[0].id}`:`Cycles ${e[0].id} to ${e.at(-1).id} (${e.length})`:`All ${e.length} ${e.length===1?`cycle`:`cycles`}`}. ${t} over the ${Qk} ms budget.`});tableLabel=Q(()=>this.span()?`Picked cycles, ${this.summary()}`:`All recorded cycles`);activeOptionId=Q(()=>{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:$k(t),top:t.components.slice(0,3),...this.tipSide(e)}});tipSide(e){let t=this.cycles().length;return e+.5=t.start&&e<=t.end}describe(e){let t=[`Cycle ${e.id}`,eA(e.ms)];$k(e)&&t.push(`over budget`),e.trigger&&t.push(`after ${e.trigger}`),t.push(`${e.checks} ${e.checks===1?`check`:`checks`}`);let n=e.components[0];return n&&t.push(`slowest ${n.name} ${eA(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+WA;break;case`PageUp`:r=n-WA;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=A({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&U(`pointerup`,function(){return t.endDrag()},Fu)(`pointercancel`,function(){return t.endDrag()},Fu)},inputs:{cycles:[1,`cycles`],range:[1,`range`]},outputs:{range:`rangeChange`},decls:69,vars:25,consts:[[1,`range`],[`type`,`number`,`inputmode`,`numeric`,3,`change`,`min`,`max`,`value`],[`type`,`button`],[1,`summary`],[1,`hint`,3,`id`],[1,`plot`],[`aria-hidden`,`true`,1,`axis`],[1,`tick`,`top`],[1,`tick`,`zero`],[1,`area`],[`aria-hidden`,`true`,1,`band`,3,`left`,`width`],[`aria-hidden`,`true`,1,`budget`],[`role`,`listbox`,`aria-multiselectable`,`true`,`aria-orientation`,`horizontal`,`tabindex`,`0`,1,`bars`,3,`keydown`,`focus`,`blur`,`pointerdown`,`pointermove`,`pointerleave`],[`role`,`option`,1,`col`,3,`id`,`over`,`out`,`active`],[`aria-hidden`,`true`,1,`tip`,3,`left`,`right`],[`aria-hidden`,`true`,1,`markers`],[3,`over`],[`aria-label`,`Chart key`,1,`legend`],[`aria-hidden`,`true`,1,`key`,`ok`],[`aria-hidden`,`true`,1,`key`,`over`],[`aria-hidden`,`true`,1,`key-marker`],[`aria-hidden`,`true`,1,`key`,`line`],[1,`table`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[`type`,`button`,3,`click`],[`aria-hidden`,`true`,1,`band`],[`role`,`option`,1,`col`,3,`id`],[1,`bar`],[`aria-hidden`,`true`,1,`tip`],[1,`tip-head`],[1,`flag`],[1,`tip-row`],[1,`mono`],[1,`mono`,`name`],[1,`num`]],template:function(e,t){if(e&1&&(B(0,`div`,0)(1,`label`)(2,`span`),J(3,`Start`),V(),B(4,`input`,1),W(`change`,function(e){return t.setEnd(`from`,e)}),V()(),B(5,`label`)(6,`span`),J(7,`End`),V(),B(8,`input`,1),W(`change`,function(e){return t.setEnd(`to`,e)}),V()(),M(9,MA,2,0,`button`,2),B(10,`p`,3),J(11),V()(),B(12,`p`,4),J(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. `),V(),B(14,`div`,5)(15,`div`,6)(16,`span`,7),J(17),V(),B(18,`span`,8),J(19,`0 ms`),V()(),B(20,`div`,9),M(21,NA,1,4,`div`,10),B(22,`div`,11)(23,`span`),J(24),V()(),B(25,`div`,12),W(`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)}),P(26,PA,2,12,`div`,13,AA),V(),M(28,RA,12,12,`div`,14),V()(),B(29,`div`,15),P(30,zA,1,2,`span`,16,AA),V(),B(32,`ul`,17)(33,`li`),Vg(34,`span`,18),J(35,`Within budget`),V(),B(36,`li`),Vg(37,`span`,19)(38,`span`,20),J(39,`Over budget `),V(),B(40,`li`),Vg(41,`span`,21),J(42),V()(),B(43,`details`,22)(44,`summary`),J(45,`Show the cycles as a table`),V(),B(46,`div`,23)(47,`table`)(48,`caption`,24),J(49),V(),B(50,`thead`)(51,`tr`)(52,`th`,25),J(53,`Cycle`),V(),B(54,`th`,25),J(55,`Duration`),V(),B(56,`th`,26),J(57,`Budget`),V(),B(58,`th`,25),J(59,`Checks`),V(),B(60,`th`,25),J(61,`Passes`),V(),B(62,`th`,26),J(63,`After`),V(),B(64,`th`,26),J(65,`Slowest component`),V()()(),B(66,`tbody`),P(67,VA,15,7,`tr`,null,jA),V()()()()),e&2){let e,n;k(4),qg(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),k(4),qg(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),k(),N(t.range()?9:-1),k(2),Y(t.summary()),k(),qg(`id`,t.hintId),k(2),q(`flush`,t.bars().length>t.gapUntil),k(3),Y(t.fmt(t.max())),k(4),N((e=t.band())?21:-1,e),k(),K(`bottom`,t.budgetAt(),`%`),k(2),Y(t.budgetLabel),k(),j(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),k(),F(t.bars()),k(2),N((n=t.tip())?28:-1,n),k(),q(`flush`,t.bars().length>t.gapUntil),k(),F(t.bars()),k(12),Y(t.budgetLabel),k(4),j(`aria-label`,t.tableLabel()),k(3),X(` `,t.tableLabel(),` `),k(18),F(t.selected())}},styles:[`[_nghost-%COMP%] { +}`]})},IA=(e,t)=>t.cycle.id,LA=(e,t)=>t.id;function RA(e,t){if(e&1){let e=H();B(0,`button`,27),W(`click`,function(){return T(e),E(G().showAll())}),J(1,`Show all cycles`),V()}}function zA(e,t){if(e&1&&Vg(0,`div`,28),e&2){let e=t;K(`left`,e.left,`%`)(`width`,e.width,`%`)}}function BA(e,t){if(e&1&&(B(0,`div`,29),Vg(1,`span`,30),V()),e&2){let e=t.$implicit,n=G();q(`over`,e.over)(`out`,!n.inRange(e.index)&&!!n.range())(`active`,n.focused()&&n.active()===e.index),qg(`id`,n.optionId(e.index)),j(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),k(),K(`height`,e.height,`%`)}}function VA(e,t){e&1&&(B(0,`span`,33),J(1,`over budget`),V())}function HA(e,t){if(e&1&&(B(0,`p`),J(1,` after `),B(2,`span`,35),J(3),V()()),e&2){let e=G();k(3),Y(e.cycle.trigger)}}function UA(e,t){if(e&1&&(B(0,`p`,34)(1,`span`,36),J(2),V(),B(3,`span`),J(4),V()()),e&2){let e=t.$implicit,n=G(2);k(2),Y(e.name),k(2),Y(n.fmt(e.ms))}}function WA(e,t){if(e&1&&(B(0,`div`,31)(1,`p`,32)(2,`strong`),J(3),V(),B(4,`span`),J(5),V(),M(6,VA,2,0,`span`,33),V(),M(7,HA,4,1,`p`),B(8,`p`),J(9),V(),P(10,UA,5,2,`p`,34,kg),V()),e&2){let e=t,n=G();K(`left`,e.left)(`right`,e.right),k(3),Y(n.fmt(e.cycle.ms)),k(2),X(`cycle `,e.cycle.id),k(),N(e.over?6:-1),k(),N(e.cycle.trigger?7:-1),k(2),iv(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),k(),F(e.top)}}function GA(e,t){if(e&1&&Vg(0,`span`),e&2){let e=t.$implicit;q(`over`,e.over)}}function KA(e,t){if(e&1&&J(0),e&2){let e=t,n=G(2);Z(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function qA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,37),J(2),V(),B(3,`td`,37),J(4),V(),B(5,`td`),J(6),V(),B(7,`td`,37),J(8),V(),B(9,`td`,37),J(10),V(),B(11,`td`,35),J(12),V(),B(13,`td`,35),M(14,KA,1,2),V()()),e&2){let e,n=t.$implicit,r=G();k(2),Y(n.id),k(2),Y(r.fmt(n.ms)),k(2),Y(r.isOver(n)?`Over`:`Within`),k(2),Y(n.checks),k(2),Y(n.passes),k(2),Y(n.trigger??``),k(2),N((e=n.components[0])?14:-1,e)}}var JA=0,YA=80,XA=10,ZA=class e{cycles=$([]);range=Kv(null);gapUntil=YA;budgetLabel=`${iA} ms budget`;uid=`cd-chart-${JA++}`;hintId=`${this.uid}-hint`;active=O(null);anchor=null;dragging=!1;hover=O(null);focused=O(!1);max=Q(()=>lA(this.cycles()));budgetAt=Q(()=>iA/this.max()*100);bars=Q(()=>{let e=this.max();return this.cycles().map((t,n)=>({cycle:t,index:n,height:t.ms/e*100,over:aA(t),label:this.describe(t)}))});firstId=Q(()=>this.cycles()[0]?.id??0);lastId=Q(()=>this.cycles().at(-1)?.id??0);span=Q(()=>{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||asA(this.cycles(),this.range()));startId=Q(()=>this.selected()[0]?.id??``);endId=Q(()=>this.selected().at(-1)?.id??``);band=Q(()=>{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=Q(()=>{let e=this.selected(),t=e.filter(aA).length;return`${this.span()?e.length===1?`Cycle ${e[0].id}`:`Cycles ${e[0].id} to ${e.at(-1).id} (${e.length})`:`All ${e.length} ${e.length===1?`cycle`:`cycles`}`}. ${t} over the ${iA} ms budget.`});tableLabel=Q(()=>this.span()?`Picked cycles, ${this.summary()}`:`All recorded cycles`);activeOptionId=Q(()=>{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:aA(t),top:t.components.slice(0,3),...this.tipSide(e)}});tipSide(e){let t=this.cycles().length;return e+.5=t.start&&e<=t.end}describe(e){let t=[`Cycle ${e.id}`,oA(e.ms)];aA(e)&&t.push(`over budget`),e.trigger&&t.push(`after ${e.trigger}`),t.push(`${e.checks} ${e.checks===1?`check`:`checks`}`);let n=e.components[0];return n&&t.push(`slowest ${n.name} ${oA(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+XA;break;case`PageUp`:r=n-XA;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=A({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&U(`pointerup`,function(){return t.endDrag()},Fu)(`pointercancel`,function(){return t.endDrag()},Fu)},inputs:{cycles:[1,`cycles`],range:[1,`range`]},outputs:{range:`rangeChange`},decls:69,vars:25,consts:[[1,`range`],[`type`,`number`,`inputmode`,`numeric`,3,`change`,`min`,`max`,`value`],[`type`,`button`],[1,`summary`],[1,`hint`,3,`id`],[1,`plot`],[`aria-hidden`,`true`,1,`axis`],[1,`tick`,`top`],[1,`tick`,`zero`],[1,`area`],[`aria-hidden`,`true`,1,`band`,3,`left`,`width`],[`aria-hidden`,`true`,1,`budget`],[`role`,`listbox`,`aria-multiselectable`,`true`,`aria-orientation`,`horizontal`,`tabindex`,`0`,1,`bars`,3,`keydown`,`focus`,`blur`,`pointerdown`,`pointermove`,`pointerleave`],[`role`,`option`,1,`col`,3,`id`,`over`,`out`,`active`],[`aria-hidden`,`true`,1,`tip`,3,`left`,`right`],[`aria-hidden`,`true`,1,`markers`],[3,`over`],[`aria-label`,`Chart key`,1,`legend`],[`aria-hidden`,`true`,1,`key`,`ok`],[`aria-hidden`,`true`,1,`key`,`over`],[`aria-hidden`,`true`,1,`key-marker`],[`aria-hidden`,`true`,1,`key`,`line`],[1,`table`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[`type`,`button`,3,`click`],[`aria-hidden`,`true`,1,`band`],[`role`,`option`,1,`col`,3,`id`],[1,`bar`],[`aria-hidden`,`true`,1,`tip`],[1,`tip-head`],[1,`flag`],[1,`tip-row`],[1,`mono`],[1,`mono`,`name`],[1,`num`]],template:function(e,t){if(e&1&&(B(0,`div`,0)(1,`label`)(2,`span`),J(3,`Start`),V(),B(4,`input`,1),W(`change`,function(e){return t.setEnd(`from`,e)}),V()(),B(5,`label`)(6,`span`),J(7,`End`),V(),B(8,`input`,1),W(`change`,function(e){return t.setEnd(`to`,e)}),V()(),M(9,RA,2,0,`button`,2),B(10,`p`,3),J(11),V()(),B(12,`p`,4),J(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. `),V(),B(14,`div`,5)(15,`div`,6)(16,`span`,7),J(17),V(),B(18,`span`,8),J(19,`0 ms`),V()(),B(20,`div`,9),M(21,zA,1,4,`div`,10),B(22,`div`,11)(23,`span`),J(24),V()(),B(25,`div`,12),W(`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)}),P(26,BA,2,12,`div`,13,IA),V(),M(28,WA,12,12,`div`,14),V()(),B(29,`div`,15),P(30,GA,1,2,`span`,16,IA),V(),B(32,`ul`,17)(33,`li`),Vg(34,`span`,18),J(35,`Within budget`),V(),B(36,`li`),Vg(37,`span`,19)(38,`span`,20),J(39,`Over budget `),V(),B(40,`li`),Vg(41,`span`,21),J(42),V()(),B(43,`details`,22)(44,`summary`),J(45,`Show the cycles as a table`),V(),B(46,`div`,23)(47,`table`)(48,`caption`,24),J(49),V(),B(50,`thead`)(51,`tr`)(52,`th`,25),J(53,`Cycle`),V(),B(54,`th`,25),J(55,`Duration`),V(),B(56,`th`,26),J(57,`Budget`),V(),B(58,`th`,25),J(59,`Checks`),V(),B(60,`th`,25),J(61,`Passes`),V(),B(62,`th`,26),J(63,`After`),V(),B(64,`th`,26),J(65,`Slowest component`),V()()(),B(66,`tbody`),P(67,qA,15,7,`tr`,null,LA),V()()()()),e&2){let e,n;k(4),qg(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),k(4),qg(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),k(),N(t.range()?9:-1),k(2),Y(t.summary()),k(),qg(`id`,t.hintId),k(2),q(`flush`,t.bars().length>t.gapUntil),k(3),Y(t.fmt(t.max())),k(4),N((e=t.band())?21:-1,e),k(),K(`bottom`,t.budgetAt(),`%`),k(2),Y(t.budgetLabel),k(),j(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),k(),F(t.bars()),k(2),N((n=t.tip())?28:-1,n),k(),q(`flush`,t.bars().length>t.gapUntil),k(),F(t.bars()),k(12),Y(t.budgetLabel),k(4),j(`aria-label`,t.tableLabel()),k(3),X(` `,t.tableLabel(),` `),k(18),F(t.selected())}},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1224,7 +1224,7 @@ td.mono[_ngcontent-%COMP%] { .bar[_ngcontent-%COMP%] { transition: none; } -}`]})},KA=(e,t)=>t.id,qA=(e,t)=>t.index,JA=(e,t)=>t.kind;function YA(e,t){if(e&1&&(B(0,`p`,0),J(1),V()),e&2){let e=G(2);k(),Z(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function XA(e,t){if(e&1&&(B(0,`span`),J(1),V()),e&2){let e=t.$implicit;K(`left`,e.x,`%`)(`width`,e.w,`%`),k(),X(`cycle `,e.id)}}function ZA(e,t){if(e&1){let e=H();B(0,`button`,11),W(`focus`,function(){let t=T(e).$implicit;return E(G(3).current.set(t.index))})(`mouseenter`,function(){let t=T(e).$implicit;return E(G(3).hover.set(t.index))})(`mouseleave`,function(){return T(e),E(G(3).hover.set(null))})(`click`,function(){let t=T(e).$implicit;return E(G(3).choose(t))}),B(1,`span`,12),J(2),V()()}if(e&2){let e=t.$implicit,n=G(3);M_(pv(`block kind-`,e.kind)),K(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),q(`narrow`,e.w<4),j(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),k(2),Y(e.name)}}function QA(e,t){if(e&1&&(B(0,`li`),Vg(1,`span`,13),J(2),V()),e&2){let e=t.$implicit;k(),M_(pv(`key kind-`,e.kind)),k(),Y(e.label)}}function $A(e,t){if(e&1&&(B(0,`p`,0),J(1),V()),e&2){let e=G(3);k(),Z(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function ej(e,t){if(e&1&&(B(0,`tr`)(1,`td`,17),J(2),V(),B(3,`td`,18),J(4),V(),B(5,`td`),J(6),V(),B(7,`td`,17),J(8),V(),B(9,`td`,17),J(10),V(),B(11,`td`,17),J(12),V(),B(13,`td`,17),J(14),V()()),e&2){let e=t.$implicit,n=G(4);k(2),Y(e.cycleId),k(),K(`padding-left`,6+e.depth*8,`px`),k(),Y(e.name),k(2),Y(n.kindLabel(e)),k(2),Y(e.depth),k(2),Y(n.fmt(e.start)),k(2),Y(n.fmt(e.ms)),k(2),Y(n.fmt(e.selfMs))}}function tj(e,t){if(e&1&&(B(0,`div`,10)(1,`table`)(2,`caption`,14),J(3),V(),B(4,`thead`)(5,`tr`)(6,`th`,15),J(7,`Cycle`),V(),B(8,`th`,16),J(9,`Span`),V(),B(10,`th`,16),J(11,`Kind`),V(),B(12,`th`,15),J(13,`Depth`),V(),B(14,`th`,15),J(15,`Start`),V(),B(16,`th`,15),J(17,`Total`),V(),B(18,`th`,15),J(19,`Self`),V()()(),B(20,`tbody`),P(21,ej,15,9,`tr`,null,qA),V()()()),e&2){let e=G(),t=G(2);j(`aria-label`,t.tableLabel()),k(3),X(` `,t.tableLabel(),` `),k(18),F(e.blocks)}}function nj(e,t){if(e&1){let e=H();B(0,`div`,1),W(`keydown`,function(t){return T(e),E(G(2).onKey(t))}),B(1,`div`,2),P(2,XA,2,5,`span`,3,KA),V(),B(4,`div`,4),P(5,ZA,3,16,`button`,5,qA),V()(),B(7,`p`,6),J(8),V(),B(9,`ul`,7),P(10,QA,3,4,`li`,null,JA),V(),B(12,`p`,8),J(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. `),V(),M(14,$A,2,2,`p`,0),B(15,`details`,9),W(`toggle`,function(t){return T(e),E(G(2).onToggle(t))}),B(16,`summary`),J(17,`Show the spans as a table`),V(),M(18,tj,23,2,`div`,10),V()}if(e&2){let e=t,n=G(2);j(`aria-label`,n.label()),k(2),F(e.cycles),k(2),K(`height`,e.depth*n.row,`px`),k(),F(e.blocks),k(3),Y(n.readout()),k(2),F(n.kinds),k(4),N(n.dropped()?14:-1),k(4),N(n.tableOpen()?18:-1)}}function rj(e,t){if(e&1&&(B(0,`h3`),J(1,`Spans in the picked cycles`),V(),M(2,YA,2,2,`p`,0)(3,nj,19,6)),e&2){let e,t=G();k(2),N(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var ij=22;function aj(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]}var oj=class e{cycles=$([]);names=$([]);scope=$(`the recording`);pick=Rv();row=ij;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:aA[e]}));current=O(0);tableOpen=O(!1);hover=O(null);hasSpans=Q(()=>this.cycles().some(e=>e.spans?.length));count=Q(()=>this.cycles().length);tooMany=Q(()=>this.count()>30);graph=Q(()=>this.tooMany()?null:sA(this.cycles(),this.names()));tabStop=Q(()=>Math.min(this.current(),Math.max((this.graph()?.blocks.length??1)-1,0)));dropped=Q(()=>this.graph()?.cycles.reduce((e,t)=>e+t.droppedSpans,0)??0);label=Q(()=>`Spans in ${this.scope()} over time, nested by depth. Pick a component to show it in the tree.`);readout=Q(()=>{let e=(this.graph()?.blocks??[])[this.hover()??this.tabStop()];return e?this.describe(e):``});tableLabel=Q(()=>`Timed spans in ${this.scope()}`);fmt(e){return eA(e)}kindLabel(e){return aA[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,aA[e.kind],`${eA(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${eA(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${eA(-e.start)} before it started`:`cycle ${e.cycleId} at ${eA(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=aj(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=A({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&&M(0,rj,4,1),e&2&&N(t.hasSpans()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},QA=(e,t)=>t.id,$A=(e,t)=>t.index,ej=(e,t)=>t.kind;function tj(e,t){if(e&1&&(B(0,`p`,0),J(1),V()),e&2){let e=G(2);k(),Z(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function nj(e,t){if(e&1&&(B(0,`span`),J(1),V()),e&2){let e=t.$implicit;K(`left`,e.x,`%`)(`width`,e.w,`%`),k(),X(`cycle `,e.id)}}function rj(e,t){if(e&1){let e=H();B(0,`button`,11),W(`focus`,function(){let t=T(e).$implicit;return E(G(3).current.set(t.index))})(`mouseenter`,function(){let t=T(e).$implicit;return E(G(3).hover.set(t.index))})(`mouseleave`,function(){return T(e),E(G(3).hover.set(null))})(`click`,function(){let t=T(e).$implicit;return E(G(3).choose(t))}),B(1,`span`,12),J(2),V()()}if(e&2){let e=t.$implicit,n=G(3);M_(pv(`block kind-`,e.kind)),K(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),q(`narrow`,e.w<4),j(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),k(2),Y(e.name)}}function ij(e,t){if(e&1&&(B(0,`li`),Vg(1,`span`,13),J(2),V()),e&2){let e=t.$implicit;k(),M_(pv(`key kind-`,e.kind)),k(),Y(e.label)}}function aj(e,t){if(e&1&&(B(0,`p`,0),J(1),V()),e&2){let e=G(3);k(),Z(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function oj(e,t){if(e&1&&(B(0,`tr`)(1,`td`,17),J(2),V(),B(3,`td`,18),J(4),V(),B(5,`td`),J(6),V(),B(7,`td`,17),J(8),V(),B(9,`td`,17),J(10),V(),B(11,`td`,17),J(12),V(),B(13,`td`,17),J(14),V()()),e&2){let e=t.$implicit,n=G(4);k(2),Y(e.cycleId),k(),K(`padding-left`,6+e.depth*8,`px`),k(),Y(e.name),k(2),Y(n.kindLabel(e)),k(2),Y(e.depth),k(2),Y(n.fmt(e.start)),k(2),Y(n.fmt(e.ms)),k(2),Y(n.fmt(e.selfMs))}}function sj(e,t){if(e&1&&(B(0,`div`,10)(1,`table`)(2,`caption`,14),J(3),V(),B(4,`thead`)(5,`tr`)(6,`th`,15),J(7,`Cycle`),V(),B(8,`th`,16),J(9,`Span`),V(),B(10,`th`,16),J(11,`Kind`),V(),B(12,`th`,15),J(13,`Depth`),V(),B(14,`th`,15),J(15,`Start`),V(),B(16,`th`,15),J(17,`Total`),V(),B(18,`th`,15),J(19,`Self`),V()()(),B(20,`tbody`),P(21,oj,15,9,`tr`,null,$A),V()()()),e&2){let e=G(),t=G(2);j(`aria-label`,t.tableLabel()),k(3),X(` `,t.tableLabel(),` `),k(18),F(e.blocks)}}function cj(e,t){if(e&1){let e=H();B(0,`div`,1),W(`keydown`,function(t){return T(e),E(G(2).onKey(t))}),B(1,`div`,2),P(2,nj,2,5,`span`,3,QA),V(),B(4,`div`,4),P(5,rj,3,16,`button`,5,$A),V()(),B(7,`p`,6),J(8),V(),B(9,`ul`,7),P(10,ij,3,4,`li`,null,ej),V(),B(12,`p`,8),J(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. `),V(),M(14,aj,2,2,`p`,0),B(15,`details`,9),W(`toggle`,function(t){return T(e),E(G(2).onToggle(t))}),B(16,`summary`),J(17,`Show the spans as a table`),V(),M(18,sj,23,2,`div`,10),V()}if(e&2){let e=t,n=G(2);j(`aria-label`,n.label()),k(2),F(e.cycles),k(2),K(`height`,e.depth*n.row,`px`),k(),F(e.blocks),k(3),Y(n.readout()),k(2),F(n.kinds),k(4),N(n.dropped()?14:-1),k(4),N(n.tableOpen()?18:-1)}}function lj(e,t){if(e&1&&(B(0,`h3`),J(1,`Spans in the picked cycles`),V(),M(2,tj,2,2,`p`,0)(3,cj,19,6)),e&2){let e,t=G();k(2),N(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var uj=22;function dj(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]}var fj=class e{cycles=$([]);names=$([]);scope=$(`the recording`);pick=zv();row=uj;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:dA[e]}));current=O(0);tableOpen=O(!1);hover=O(null);hasSpans=Q(()=>this.cycles().some(e=>e.spans?.length));count=Q(()=>this.cycles().length);tooMany=Q(()=>this.count()>30);graph=Q(()=>this.tooMany()?null:pA(this.cycles(),this.names()));tabStop=Q(()=>Math.min(this.current(),Math.max((this.graph()?.blocks.length??1)-1,0)));dropped=Q(()=>this.graph()?.cycles.reduce((e,t)=>e+t.droppedSpans,0)??0);label=Q(()=>`Spans in ${this.scope()} over time, nested by depth. Pick a component to show it in the tree.`);readout=Q(()=>{let e=(this.graph()?.blocks??[])[this.hover()??this.tabStop()];return e?this.describe(e):``});tableLabel=Q(()=>`Timed spans in ${this.scope()}`);fmt(e){return oA(e)}kindLabel(e){return dA[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,dA[e.kind],`${oA(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${oA(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${oA(-e.start)} before it started`:`cycle ${e.cycleId} at ${oA(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=dj(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=A({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&&M(0,lj,4,1),e&2&&N(t.hasSpans()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1431,7 +1431,7 @@ td.mono[_ngcontent-%COMP%] { .num[_ngcontent-%COMP%] { text-align: right; font-variant-numeric: tabular-nums; -}`]})};function sj(e,t){if(e&1&&(B(0,`tr`)(1,`td`,5),J(2),V(),B(3,`td`,6),J(4),V(),B(5,`td`,6),J(6),V(),B(7,`td`,6),J(8),V()()),e&2){let e=t.$implicit,n=G(3);k(2),Z(``,e.name,`.`,e.hook),k(2),Y(e.calls),k(2),Y(n.ms(e.ms)),k(2),Y(n.ms(e.maxMs))}}function cj(e,t){if(e&1&&(B(0,`div`)(1,`h3`),J(2,`Lifecycle hooks`),V(),B(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),J(7,`Hook`),V(),B(8,`th`,4),J(9,`Calls`),V(),B(10,`th`,4),J(11,`Time`),V(),B(12,`th`,4),J(13,`Slowest`),V()()(),B(14,`tbody`),P(15,sj,9,5,`tr`,null,kg),V()()()),e&2){let e=G(2);k(15),F(e.hooks())}}function lj(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` (`,e.listener,`) `)}}function uj(e,t){if(e&1&&(B(0,`tr`)(1,`td`,5),J(2),M(3,lj,1,1),V(),B(4,`td`,6),J(5),V(),B(6,`td`,6),J(7),V(),B(8,`td`,6),J(9),V()()),e&2){let e=t.$implicit,n=G(3);k(2),X(` `,e.name,` `),k(),N(e.listener?3:-1),k(2),Y(e.calls),k(2),Y(n.ms(e.ms)),k(2),Y(n.ms(e.maxMs))}}function dj(e,t){if(e&1&&(B(0,`div`)(1,`h3`),J(2,`Output listeners`),V(),B(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),J(7,`Listener`),V(),B(8,`th`,4),J(9,`Calls`),V(),B(10,`th`,4),J(11,`Time`),V(),B(12,`th`,4),J(13,`Slowest`),V()()(),B(14,`tbody`),P(15,uj,10,5,`tr`,null,kg),V()()()),e&2){let e=G(2);k(15),F(e.outputs())}}function fj(e,t){if(e&1&&(B(0,`p`,1),J(1),V()),e&2){let e=t,n=G(2);k(),iv(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function pj(e,t){if(e&1&&(B(0,`p`,2),J(1),V()),e&2){let e=G(2);k(),Z(` `,e.dropped(),` more hook or output `,e.dropped()===1?`row is`:`rows are`,` left out. A recording lists at most 100 of each. `)}}function mj(e,t){if(e&1&&(B(0,`div`,0),M(1,cj,17,0,`div`),M(2,dj,17,0,`div`),V(),M(3,fj,2,4,`p`,1),M(4,pj,2,2,`p`,2)),e&2){let e,t=G();k(),N(t.hooks().length?1:-1),k(),N(t.outputs().length?2:-1),k(),N((e=t.afterRender())?3:-1,e),k(),N(t.dropped()?4:-1)}}var hj=10;function gj(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var _j=class e{page=$(null);hooks=Q(()=>(this.page()?.hooks??[]).slice(0,hj));outputs=Q(()=>(this.page()?.outputs??[]).slice(0,hj));afterRender=Q(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=Q(()=>this.page()?.droppedTimings??0);ms(e){return gj(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({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&&M(0,mj,5,4),e&2&&N(t.hooks().length||t.outputs().length||t.afterRender()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})};function pj(e,t){if(e&1&&(B(0,`tr`)(1,`td`,5),J(2),V(),B(3,`td`,6),J(4),V(),B(5,`td`,6),J(6),V(),B(7,`td`,6),J(8),V()()),e&2){let e=t.$implicit,n=G(3);k(2),Z(``,e.name,`.`,e.hook),k(2),Y(e.calls),k(2),Y(n.ms(e.ms)),k(2),Y(n.ms(e.maxMs))}}function mj(e,t){if(e&1&&(B(0,`div`)(1,`h3`),J(2,`Lifecycle hooks`),V(),B(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),J(7,`Hook`),V(),B(8,`th`,4),J(9,`Calls`),V(),B(10,`th`,4),J(11,`Time`),V(),B(12,`th`,4),J(13,`Slowest`),V()()(),B(14,`tbody`),P(15,pj,9,5,`tr`,null,kg),V()()()),e&2){let e=G(2);k(15),F(e.hooks())}}function hj(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` (`,e.listener,`) `)}}function gj(e,t){if(e&1&&(B(0,`tr`)(1,`td`,5),J(2),M(3,hj,1,1),V(),B(4,`td`,6),J(5),V(),B(6,`td`,6),J(7),V(),B(8,`td`,6),J(9),V()()),e&2){let e=t.$implicit,n=G(3);k(2),X(` `,e.name,` `),k(),N(e.listener?3:-1),k(2),Y(e.calls),k(2),Y(n.ms(e.ms)),k(2),Y(n.ms(e.maxMs))}}function _j(e,t){if(e&1&&(B(0,`div`)(1,`h3`),J(2,`Output listeners`),V(),B(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),J(7,`Listener`),V(),B(8,`th`,4),J(9,`Calls`),V(),B(10,`th`,4),J(11,`Time`),V(),B(12,`th`,4),J(13,`Slowest`),V()()(),B(14,`tbody`),P(15,gj,10,5,`tr`,null,kg),V()()()),e&2){let e=G(2);k(15),F(e.outputs())}}function vj(e,t){if(e&1&&(B(0,`p`,1),J(1),V()),e&2){let e=t,n=G(2);k(),iv(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function yj(e,t){if(e&1&&(B(0,`p`,2),J(1),V()),e&2){let e=G(2);k(),Z(` `,e.dropped(),` more hook or output `,e.dropped()===1?`row is`:`rows are`,` left out. A recording lists at most 100 of each. `)}}function bj(e,t){if(e&1&&(B(0,`div`,0),M(1,mj,17,0,`div`),M(2,_j,17,0,`div`),V(),M(3,vj,2,4,`p`,1),M(4,yj,2,2,`p`,2)),e&2){let e,t=G();k(),N(t.hooks().length?1:-1),k(),N(t.outputs().length?2:-1),k(),N((e=t.afterRender())?3:-1,e),k(),N(t.dropped()?4:-1)}}var xj=10;function Sj(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var Cj=class e{page=$(null);hooks=Q(()=>(this.page()?.hooks??[]).slice(0,xj));outputs=Q(()=>(this.page()?.outputs??[]).slice(0,xj));afterRender=Q(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=Q(()=>this.page()?.droppedTimings??0);ms(e){return Sj(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({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&&M(0,bj,5,4),e&2&&N(t.hooks().length||t.outputs().length||t.afterRender()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -1491,7 +1491,7 @@ td.mono[_ngcontent-%COMP%] { margin: 8px 0 0; color: var(--%NS%text-2); font-size: 12px; -}`]})};function vj(e,t){if(e&1&&(B(0,`p`,5),J(1),V()),e&2){let e=G();k(),Y(e.error())}}function yj(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 bj=class e{page=$(null);maxCycles=$(200);imported=Rv();error=O(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&yj(Wk(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&yj(Zk(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=Gk(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=A({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=H();B(0,`div`,1)(1,`button`,2),W(`click`,function(){return t.exportJson()}),J(2,`Export JSON`),V(),B(3,`button`,2),W(`click`,function(){return t.exportTrace()}),J(4,` Export trace (Perfetto) `),V(),B(5,`button`,3),W(`click`,function(){return T(e),E(d_(8).click())}),J(6,`Import`),V(),B(7,`input`,4,0),W(`change`,function(){T(e);let n=d_(8);return E(t.read(n))}),V()(),M(9,vj,2,1,`p`,5)}e&2&&(k(),qg(`disabled`,!t.hasCycles()),k(2),qg(`disabled`,!t.hasCycles()),k(6),N(t.error()?9:-1))},styles:[`[_nghost-%COMP%] { +}`]})};function wj(e,t){if(e&1&&(B(0,`p`,5),J(1),V()),e&2){let e=G();k(),Y(e.error())}}function Tj(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 Ej=class e{page=$(null);maxCycles=$(200);imported=zv();error=O(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&Tj(Xk(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&Tj(rA(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=Zk(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=A({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=H();B(0,`div`,1)(1,`button`,2),W(`click`,function(){return t.exportJson()}),J(2,`Export JSON`),V(),B(3,`button`,2),W(`click`,function(){return t.exportTrace()}),J(4,` Export trace (Perfetto) `),V(),B(5,`button`,3),W(`click`,function(){return T(e),E(d_(8).click())}),J(6,`Import`),V(),B(7,`input`,4,0),W(`change`,function(){T(e);let n=d_(8);return E(t.read(n))}),V()(),M(9,wj,2,1,`p`,5)}e&2&&(k(),qg(`disabled`,!t.hasCycles()),k(2),qg(`disabled`,!t.hasCycles()),k(6),N(t.error()?9:-1))},styles:[`[_nghost-%COMP%] { display: contents; } @@ -1533,7 +1533,7 @@ button[_ngcontent-%COMP%]:disabled { margin: 0; color: var(--%NS%danger-text); font-size: 12px; -}`]})},xj=(e,t)=>t.stat.name;function Sj(e,t){if(e&1&&(B(0,`span`,8),J(1),V()),e&2){let e=G(2).$implicit;k(),X(``,e.other,` more`)}}function Cj(e,t){if(e&1&&(B(0,`div`,6)(1,`span`,7),J(2),V(),M(3,Sj,2,1,`span`,8),V()),e&2){let e=G().$implicit;K(`--%NS%tone`,e.tone+`%`),k(2),Y(e.label),k(),N(e.roomy?3:-1)}}function wj(e,t){if(e&1&&(B(0,`span`,10),J(1),V(),B(2,`span`,11),J(3),V()),e&2){let e=G(2).$implicit,t=G(2);k(),Y(e.stat.name),k(2),Y(t.fmt(e.stat.ms))}}function Tj(e,t){if(e&1){let e=H();B(0,`button`,9),W(`focus`,function(){T(e);let t=G().$index;return E(G(2).current.set(t))})(`click`,function(){T(e);let t=G().$implicit;return E(G(2).pick.emit(t.stat.name))}),M(1,wj,4,2),V()}if(e&2){let e=G(),t=e.$implicit,n=e.$index,r=G(2);K(`--%NS%tone`,t.tone+`%`),j(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),k(),N(t.roomy?1:-1)}}function Ej(e,t){if(e&1&&(B(0,`li`),M(1,Cj,4,4,`div`,4)(2,Tj,2,6,`button`,5),V()),e&2){let e=t.$implicit;K(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),k(),N(e.other?1:2)}}function Dj(e,t){if(e&1){let e=H();B(0,`ul`,2),W(`keydown`,function(t){return T(e),E(G().onKey(t))}),P(1,Ej,3,9,`li`,3,xj),V()}if(e&2){let e=G();j(`aria-label`,e.label()),k(),F(e.cells())}}function Oj(e,t){e&1&&(B(0,`p`,1),J(1,`No component time in these cycles.`),V())}var kj=24,Aj=3,jj=class e{stats=$([]);scope=$(`the recording`);pick=Rv();current=O(0);label=Q(()=>`Self time per component in ${this.scope()}, largest first. Pick one to show it in the tree.`);cells=Q(()=>{let e=this.stats().filter(e=>e.ms>0),t=e.slice(0,kj),n=e.slice(kj),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=iA(i,e=>e.stat.ms,Aj);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, ${eA(t.ms)}, ${r}% of self time`:`${t.name}, ${eA(t.ms)} self time, ${r}%, ${t.checks} ${t.checks===1?`check`:`checks`}`}})});tabStop=Q(()=>Math.min(this.current(),Math.max(this.cells().filter(e=>!e.other).length-1,0)));fmt(e){return eA(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=A({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&&M(0,Dj,3,1,`ul`,0)(1,Oj,2,0,`p`,1),e&2&&N(+!t.cells().length)},styles:[`[_nghost-%COMP%] { +}`]})},Dj=(e,t)=>t.stat.name;function Oj(e,t){if(e&1&&(B(0,`span`,8),J(1),V()),e&2){let e=G(2).$implicit;k(),X(``,e.other,` more`)}}function kj(e,t){if(e&1&&(B(0,`div`,6)(1,`span`,7),J(2),V(),M(3,Oj,2,1,`span`,8),V()),e&2){let e=G().$implicit;K(`--%NS%tone`,e.tone+`%`),k(2),Y(e.label),k(),N(e.roomy?3:-1)}}function Aj(e,t){if(e&1&&(B(0,`span`,10),J(1),V(),B(2,`span`,11),J(3),V()),e&2){let e=G(2).$implicit,t=G(2);k(),Y(e.stat.name),k(2),Y(t.fmt(e.stat.ms))}}function jj(e,t){if(e&1){let e=H();B(0,`button`,9),W(`focus`,function(){T(e);let t=G().$index;return E(G(2).current.set(t))})(`click`,function(){T(e);let t=G().$implicit;return E(G(2).pick.emit(t.stat.name))}),M(1,Aj,4,2),V()}if(e&2){let e=G(),t=e.$implicit,n=e.$index,r=G(2);K(`--%NS%tone`,t.tone+`%`),j(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),k(),N(t.roomy?1:-1)}}function Mj(e,t){if(e&1&&(B(0,`li`),M(1,kj,4,4,`div`,4)(2,jj,2,6,`button`,5),V()),e&2){let e=t.$implicit;K(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),k(),N(e.other?1:2)}}function Nj(e,t){if(e&1){let e=H();B(0,`ul`,2),W(`keydown`,function(t){return T(e),E(G().onKey(t))}),P(1,Mj,3,9,`li`,3,Dj),V()}if(e&2){let e=G();j(`aria-label`,e.label()),k(),F(e.cells())}}function Pj(e,t){e&1&&(B(0,`p`,1),J(1,`No component time in these cycles.`),V())}var Fj=24,Ij=3,Lj=class e{stats=$([]);scope=$(`the recording`);pick=zv();current=O(0);label=Q(()=>`Self time per component in ${this.scope()}, largest first. Pick one to show it in the tree.`);cells=Q(()=>{let e=this.stats().filter(e=>e.ms>0),t=e.slice(0,Fj),n=e.slice(Fj),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=uA(i,e=>e.stat.ms,Ij);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, ${oA(t.ms)}, ${r}% of self time`:`${t.name}, ${oA(t.ms)} self time, ${r}%, ${t.checks} ${t.checks===1?`check`:`checks`}`}})});tabStop=Q(()=>Math.min(this.current(),Math.max(this.cells().filter(e=>!e.other).length-1,0)));fmt(e){return oA(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=A({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&&M(0,Nj,3,1,`ul`,0)(1,Pj,2,0,`p`,1),e&2&&N(+!t.cells().length)},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1609,7 +1609,7 @@ button.cell[_ngcontent-%COMP%]:focus-visible { .empty[_ngcontent-%COMP%] { margin: 8px 0; color: var(--%NS%text-2); -}`]})},Mj=(e,t)=>t.id;function Nj(e,t){if(e&1){let e=H();L(0,`button`,15),U(`click`,function(){return T(e),E(G(2).clear())}),J(1,`Clear`),R()}}function Pj(e,t){if(e&1){let e=H();L(0,`button`,12),U(`click`,function(){return T(e),E(G().toggle())}),z(1,`span`,13),J(2),R(),M(3,Nj,2,0,`button`,14)}if(e&2){let e=G();q(`on`,e.recording()),I(`disabled`,!e.pageId()),k(2),X(` `,e.recording()?`Stop recording`:`Record`,` `),k(),N(e.cycles().length?3:-1)}}function Fj(e,t){if(e&1){let e=H();L(0,`p`,6)(1,`span`,16),J(2,`Imported recording`),R(),L(3,`span`,17),J(4),R(),L(5,`button`,15),U(`click`,function(){return T(e),E(G().closeImport())}),J(6,`Back to live recording`),R()()}e&2&&(k(4),Y(t.fileName))}function Ij(e,t){e&1&&z(0,`app-angular-unavailable`,8),e&2&&I(`page`,G().angularPage())}function Lj(e,t){e&1&&(L(0,`p`,10),J(1,`Angular profiling stays on until the page reloads.`),R())}function Rj(e,t){e&1&&z(0,`app-angular-unavailable`,21),e&2&&I(`page`,G(2).angularPage())}function zj(e,t){if(e&1){let e=H();L(0,`div`,18)(1,`span`,19),J(2,`Live views`),R(),L(3,`button`,20),U(`click`,function(){T(e);let t=G();return E(t.setView(`flash`,!t.views().flash))}),z(4,`span`,13),J(5,` Flash checks `),R(),L(6,`button`,20),U(`click`,function(){T(e);let t=G();return E(t.setView(`track`,!t.views().track))}),z(7,`span`,13),J(8,` Performance track `),R(),L(9,`button`,20),U(`click`,function(){return T(e),E(G().setView(`angularProfiling`,!0))}),z(10,`span`,13),J(11,` Angular profiling `),R()(),L(12,`p`,7),J(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. `),R(),M(14,Lj,2,0,`p`,10)(15,Rj,1,1,`app-angular-unavailable`,21)}if(e&2){let e=G();k(3),I(`disabled`,!e.canShowViews()),j(`aria-pressed`,e.views().flash),k(3),I(`disabled`,!e.canShowViews()),j(`aria-pressed`,e.views().track),k(3),I(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),j(`aria-pressed`,e.views().angularProfiling),k(5),N(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function Bj(e,t){if(e&1&&(L(0,`p`,10),J(1),R()),e&2){let e=t.$implicit;k(),Y(e)}}function Vj(e,t){if(e&1&&(L(0,`p`,24),J(1),R()),e&2){let e=G(2);k(),X(` `,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 Hj(e,t){e&1&&(L(0,`p`,10),J(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),R())}function Uj(e,t){if(e&1){let e=H();L(0,`h3`),J(1,`Cycles`),R(),L(2,`app-cd-cycle-chart`,22),cv(`rangeChange`,function(t){T(e);let n=G();return sv(n.range,t)||(n.range=t),E(t)}),R(),L(3,`app-cd-flame-graph`,23),U(`pick`,function(t){return T(e),E(G().showComponent.emit(t))}),R(),M(4,Vj,2,1,`p`,24),L(5,`h3`),J(6,`Self time by component`),R(),M(7,Hj,2,0,`p`,10),L(8,`app-cd-treemap`,25),U(`pick`,function(t){return T(e),E(G().showComponent.emit(t))}),R()}if(e&2){let e=G();k(2),I(`cycles`,e.cycles()),ov(`range`,e.range),k(),I(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),k(),N(e.hasSpans()?-1:4),k(3),N(e.range()?7:-1),k(),I(`stats`,e.stats())(`scope`,e.scope())}}function Wj(e,t){if(e&1&&(L(0,`tr`)(1,`td`,17),J(2),R(),L(3,`td`,31),J(4),R(),L(5,`td`,31),J(6),R(),L(7,`td`,31),J(8),R()()),e&2){let e=t.$implicit,n=G(2);k(2),Y(e.name),k(2),Y(e.checks),k(2),Y(n.ms(e.ms)),k(2),Y(n.ms(e.maxMs))}}function Gj(e,t){e&1&&(L(0,`tr`)(1,`td`,32),J(2,`No component time in the picked cycles.`),R()())}function Kj(e,t){if(e&1&&(L(0,`span`,34),J(1,`from `),L(2,`span`,17),J(3),R()()),e&2){let e=G(3);k(3),Y(e.causeText(t))}}function qj(e,t){if(e&1&&(L(0,`span`,34),J(1,`after `),L(2,`span`,17),J(3),R()()),e&2){let e=G().$implicit;k(3),Y(e.trigger)}}function Jj(e,t){if(e&1&&(L(0,`span`,35),J(1),R()),e&2){let e=G().$implicit;k(),X(``,e.unchanged,` changed nothing`)}}function Yj(e,t){if(e&1&&(L(0,`span`,35),J(1),R()),e&2){let e=G().$implicit,t=G(2);k(),X(`hooks `,t.ms(e.hookMs))}}function Xj(e,t){if(e&1&&(L(0,`span`,35),J(1),R()),e&2){let e=G().$implicit,t=G(2);k(),X(`afterRender `,t.ms(e.afterRenderMs))}}function Zj(e,t){if(e&1&&(L(0,`span`,36),J(1,` slowest `),L(2,`span`,17),J(3),R(),J(4),R()),e&2){let e=t,n=G(3);k(3),Y(e.name),k(),X(` `,n.ms(e.ms),` `)}}function Qj(e,t){if(e&1&&(L(0,`li`)(1,`span`,33),J(2),R(),L(3,`span`,17),J(4),R(),L(5,`span`),J(6),R(),M(7,Kj,4,1,`span`,34)(8,qj,4,1,`span`,34),M(9,Jj,2,1,`span`,35),M(10,Yj,2,1,`span`,35),M(11,Xj,2,1,`span`,35),M(12,Zj,5,2,`span`,36),R()),e&2){let e,n,r=t.$implicit,i=G(2);k(2),Y(i.clock(r.at)),k(2),Y(i.ms(r.ms)),k(2),iv(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),k(),N((e=r.cause)?7:r.trigger?8:-1,e),k(2),N(r.unchanged?9:-1),k(),N(r.hookMs?10:-1),k(),N(r.afterRenderMs?11:-1),k(),N((n=r.components[0])?12:-1,n)}}function $j(e,t){if(e&1&&(L(0,`div`,26)(1,`div`)(2,`h3`),J(3),R(),L(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),J(8,`Component`),R(),L(9,`th`,28),J(10,`Checks`),R(),L(11,`th`,28),J(12,`Self time`),R(),L(13,`th`,28),J(14,`Slowest`),R()()(),L(15,`tbody`),P(16,Wj,9,4,`tr`,null,kg,!1,Gj,3,0,`tr`),R()()(),L(19,`div`)(20,`h3`),J(21,`Latest cycles`),R(),L(22,`ol`,29),P(23,Qj,13,11,`li`,null,Mj),R()()(),z(25,`app-cd-timing`,30)(26,`app-cd-diagnosis`,30)),e&2){let e=G();k(3),X(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),k(13),F(e.slowest()),k(7),F(e.latest()),k(2),I(`page`,e.page()),k(),I(`page`,e.page())}}function eM(e,t){e&1&&(L(0,`p`,11),J(1,`Use the app. Cycles show up here as Angular runs change detection.`),R())}var tM=10,nM=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);angularPages=dO(()=>this.rpc());angularPage=Q(()=>fO(this.angularPages(),this.pageId()));showComponent=Rv();range=O(null);imported=O(null);page=Q(()=>this.imported()?.page??this.livePage());views=Fv(()=>this.livePage()?.options??{flash:!1,track:!1,angularProfiling:!1,angularProfilingAvailable:!0});canShowViews=Q(()=>!!this.pageId()&&this.livePage()?.supported!==!1);message=O(``);announcement=O(``);recording=Q(()=>this.page()?.recording===!0);cycles=Q(()=>this.page()?.cycles??[]);maxCycles=Q(()=>nD(this.rpc()).limits.cdCycles);picked=Q(()=>tA(this.cycles(),this.range()));hasSpans=Q(()=>this.picked().some(e=>e.spans?.length));spanNames=Q(()=>this.page()?.spanNames??[]);stats=Q(()=>this.range()?nA(this.picked()):[...this.page()?.components??[]].sort((e,t)=>t.ms-e.ms));scope=Q(()=>{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=Q(()=>this.stats().slice(0,tM));latest=Q(()=>this.cycles().slice(-30).reverse());capNotes=Q(()=>{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=Q(()=>{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 $O(e)}causeText(e){return Ik(e)}async toggle(){this.recording()?await this.send({on:!1},``,()=>{let e=this.cycles().length;return`Recording stopped. ${e} ${e===1?`cycle`:`cycles`} recorded.`}):await this.send({on:!0},`Starting…`,()=>`Recording started.`)}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`){this.message.set(t);try{if(!this.rpc())throw Error(`no client`);return await VE(this.rpc(),r,{pageId:this.pageId(),...e}),this.message.set(``),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=A({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:21,vars:12,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`],[`capability`,`profiler`,`missing`,``,`compact`,``,3,`page`],[`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`],[`role`,`group`,`aria-labelledby`,`cd-views-label`,1,`views`],[`id`,`cd-views-label`,1,`views-label`],[`type`,`button`,1,`view`,3,`click`,`disabled`],[`capability`,`angularProfiling`,`missing`,``,`compact`,``,3,`page`],[3,`rangeChange`,`cycles`,`range`],[3,`pick`,`cycles`,`names`,`scope`],[1,`spans-note`],[3,`pick`,`stats`,`scope`],[1,`cd-grid`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`aria-label`,`Latest change detection cycles, newest first`,1,`cycles`],[3,`page`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(L(0,`section`,0)(1,`div`,1)(2,`h2`,2),J(3,`Change detection`),R(),M(4,Pj,4,5),L(5,`app-cd-transfer`,3),U(`imported`,function(e){return t.showImport(e)}),R(),L(6,`p`,4),J(7),R(),L(8,`p`,5),J(9),R()(),M(10,Fj,7,1,`p`,6),L(11,`p`,7),J(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. `),R(),M(13,Ij,1,1,`app-angular-unavailable`,8),M(14,zj,16,7),z(15,`app-limit-note`,9),P(16,Bj,2,1,`p`,10,Ag),M(18,Uj,9,9),M(19,$j,27,4)(20,eM,2,0,`p`,11),R()),e&2){let e;k(4),N(t.imported()?-1:4),k(),I(`page`,t.page())(`maxCycles`,t.maxCycles()),k(2),Y(t.status()),k(2),Y(t.announcement()),k(),N((e=t.imported())?10:-1,e),k(3),N(t.page()?.supported===!1?13:-1),k(),N(t.imported()?-1:14),k(),I(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),k(),F(t.capNotes()),k(2),N(t.cycles().length?18:-1),k(),N(t.page()?.components?.length?19:t.recording()?20:-1)}},dependencies:[gO,ik,_j,kA,bj,GA,oj,jj],styles:[`[_nghost-%COMP%] { +}`]})},Rj=(e,t)=>t.id;function zj(e,t){if(e&1){let e=H();L(0,`button`,15),U(`click`,function(){return T(e),E(G(2).clear())}),J(1,`Clear`),R()}}function Bj(e,t){if(e&1){let e=H();L(0,`button`,12),U(`click`,function(){return T(e),E(G().toggle())}),z(1,`span`,13),J(2),R(),M(3,zj,2,0,`button`,14)}if(e&2){let e=G();q(`on`,e.recording()),I(`disabled`,!e.pageId()),k(2),X(` `,e.recording()?`Stop recording`:`Record`,` `),k(),N(e.cycles().length?3:-1)}}function Vj(e,t){if(e&1){let e=H();L(0,`p`,6)(1,`span`,16),J(2,`Imported recording`),R(),L(3,`span`,17),J(4),R(),L(5,`button`,15),U(`click`,function(){return T(e),E(G().closeImport())}),J(6,`Back to live recording`),R()()}e&2&&(k(4),Y(t.fileName))}function Hj(e,t){e&1&&z(0,`app-angular-unavailable`,8),e&2&&I(`page`,G().angularPage())}function Uj(e,t){e&1&&(L(0,`p`,10),J(1,`Angular profiling stays on until the page reloads.`),R())}function Wj(e,t){e&1&&z(0,`app-angular-unavailable`,21),e&2&&I(`page`,G(2).angularPage())}function Gj(e,t){if(e&1){let e=H();L(0,`div`,18)(1,`span`,19),J(2,`Live views`),R(),L(3,`button`,20),U(`click`,function(){T(e);let t=G();return E(t.setView(`flash`,!t.views().flash))}),z(4,`span`,13),J(5,` Flash checks `),R(),L(6,`button`,20),U(`click`,function(){T(e);let t=G();return E(t.setView(`track`,!t.views().track))}),z(7,`span`,13),J(8,` Performance track `),R(),L(9,`button`,20),U(`click`,function(){return T(e),E(G().setView(`angularProfiling`,!0))}),z(10,`span`,13),J(11,` Angular profiling `),R()(),L(12,`p`,7),J(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. `),R(),M(14,Uj,2,0,`p`,10)(15,Wj,1,1,`app-angular-unavailable`,21)}if(e&2){let e=G();k(3),I(`disabled`,!e.canShowViews()),j(`aria-pressed`,e.views().flash),k(3),I(`disabled`,!e.canShowViews()),j(`aria-pressed`,e.views().track),k(3),I(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),j(`aria-pressed`,e.views().angularProfiling),k(5),N(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function Kj(e,t){if(e&1&&(L(0,`p`,10),J(1),R()),e&2){let e=t.$implicit;k(),Y(e)}}function qj(e,t){if(e&1&&(L(0,`p`,24),J(1),R()),e&2){let e=G(2);k(),X(` `,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 Jj(e,t){e&1&&(L(0,`p`,10),J(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),R())}function Yj(e,t){if(e&1){let e=H();L(0,`h3`),J(1,`Cycles`),R(),L(2,`app-cd-cycle-chart`,22),cv(`rangeChange`,function(t){T(e);let n=G();return sv(n.range,t)||(n.range=t),E(t)}),R(),L(3,`app-cd-flame-graph`,23),U(`pick`,function(t){return T(e),E(G().showComponent.emit(t))}),R(),M(4,qj,2,1,`p`,24),L(5,`h3`),J(6,`Self time by component`),R(),M(7,Jj,2,0,`p`,10),L(8,`app-cd-treemap`,25),U(`pick`,function(t){return T(e),E(G().showComponent.emit(t))}),R()}if(e&2){let e=G();k(2),I(`cycles`,e.cycles()),ov(`range`,e.range),k(),I(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),k(),N(e.hasSpans()?-1:4),k(3),N(e.range()?7:-1),k(),I(`stats`,e.stats())(`scope`,e.scope())}}function Xj(e,t){if(e&1&&(L(0,`tr`)(1,`td`,17),J(2),R(),L(3,`td`,31),J(4),R(),L(5,`td`,31),J(6),R(),L(7,`td`,31),J(8),R()()),e&2){let e=t.$implicit,n=G(2);k(2),Y(e.name),k(2),Y(e.checks),k(2),Y(n.ms(e.ms)),k(2),Y(n.ms(e.maxMs))}}function Zj(e,t){e&1&&(L(0,`tr`)(1,`td`,32),J(2,`No component time in the picked cycles.`),R()())}function Qj(e,t){if(e&1&&(L(0,`span`,34),J(1,`from `),L(2,`span`,17),J(3),R()()),e&2){let e=G(3);k(3),Y(e.causeText(t))}}function $j(e,t){if(e&1&&(L(0,`span`,34),J(1,`after `),L(2,`span`,17),J(3),R()()),e&2){let e=G().$implicit;k(3),Y(e.trigger)}}function eM(e,t){if(e&1&&(L(0,`span`,35),J(1),R()),e&2){let e=G().$implicit;k(),X(``,e.unchanged,` changed nothing`)}}function tM(e,t){if(e&1&&(L(0,`span`,35),J(1),R()),e&2){let e=G().$implicit,t=G(2);k(),X(`hooks `,t.ms(e.hookMs))}}function nM(e,t){if(e&1&&(L(0,`span`,35),J(1),R()),e&2){let e=G().$implicit,t=G(2);k(),X(`afterRender `,t.ms(e.afterRenderMs))}}function rM(e,t){if(e&1&&(L(0,`span`,36),J(1,` slowest `),L(2,`span`,17),J(3),R(),J(4),R()),e&2){let e=t,n=G(3);k(3),Y(e.name),k(),X(` `,n.ms(e.ms),` `)}}function iM(e,t){if(e&1&&(L(0,`li`)(1,`span`,33),J(2),R(),L(3,`span`,17),J(4),R(),L(5,`span`),J(6),R(),M(7,Qj,4,1,`span`,34)(8,$j,4,1,`span`,34),M(9,eM,2,1,`span`,35),M(10,tM,2,1,`span`,35),M(11,nM,2,1,`span`,35),M(12,rM,5,2,`span`,36),R()),e&2){let e,n,r=t.$implicit,i=G(2);k(2),Y(i.clock(r.at)),k(2),Y(i.ms(r.ms)),k(2),iv(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),k(),N((e=r.cause)?7:r.trigger?8:-1,e),k(2),N(r.unchanged?9:-1),k(),N(r.hookMs?10:-1),k(),N(r.afterRenderMs?11:-1),k(),N((n=r.components[0])?12:-1,n)}}function aM(e,t){if(e&1&&(L(0,`div`,26)(1,`div`)(2,`h3`),J(3),R(),L(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),J(8,`Component`),R(),L(9,`th`,28),J(10,`Checks`),R(),L(11,`th`,28),J(12,`Self time`),R(),L(13,`th`,28),J(14,`Slowest`),R()()(),L(15,`tbody`),P(16,Xj,9,4,`tr`,null,kg,!1,Zj,3,0,`tr`),R()()(),L(19,`div`)(20,`h3`),J(21,`Latest cycles`),R(),L(22,`ol`,29),P(23,iM,13,11,`li`,null,Rj),R()()(),z(25,`app-cd-timing`,30)(26,`app-cd-diagnosis`,30)),e&2){let e=G();k(3),X(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),k(13),F(e.slowest()),k(7),F(e.latest()),k(2),I(`page`,e.page()),k(),I(`page`,e.page())}}function oM(e,t){e&1&&(L(0,`p`,11),J(1,`Use the app. Cycles show up here as Angular runs change detection.`),R())}var sM=10,cM=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);angularPages=_O(()=>this.rpc());angularPage=Q(()=>vO(this.angularPages(),this.pageId()));showComponent=zv();range=O(null);imported=O(null);page=Q(()=>this.imported()?.page??this.livePage());views=Iv(()=>this.livePage()?.options??{flash:!1,track:!1,angularProfiling:!1,angularProfilingAvailable:!0});canShowViews=Q(()=>!!this.pageId()&&this.livePage()?.supported!==!1);message=O(``);announcement=O(``);recording=Q(()=>this.page()?.recording===!0);cycles=Q(()=>this.page()?.cycles??[]);maxCycles=Q(()=>sD(this.rpc()).limits.cdCycles);picked=Q(()=>sA(this.cycles(),this.range()));hasSpans=Q(()=>this.picked().some(e=>e.spans?.length));spanNames=Q(()=>this.page()?.spanNames??[]);stats=Q(()=>this.range()?cA(this.picked()):[...this.page()?.components??[]].sort((e,t)=>t.ms-e.ms));scope=Q(()=>{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=Q(()=>this.stats().slice(0,sM));latest=Q(()=>this.cycles().slice(-30).reverse());capNotes=Q(()=>{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=Q(()=>{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 ak(e)}causeText(e){return Hk(e)}async toggle(){this.recording()?await this.send({on:!1},``,()=>{let e=this.cycles().length;return`Recording stopped. ${e} ${e===1?`cycle`:`cycles`} recorded.`}):await this.send({on:!0},`Starting…`,()=>`Recording started.`)}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`){this.message.set(t);try{if(!this.rpc())throw Error(`no client`);return await KE(this.rpc(),r,{pageId:this.pageId(),...e}),this.message.set(``),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=A({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:21,vars:12,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`],[`capability`,`profiler`,`missing`,``,`compact`,``,3,`page`],[`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`],[`role`,`group`,`aria-labelledby`,`cd-views-label`,1,`views`],[`id`,`cd-views-label`,1,`views-label`],[`type`,`button`,1,`view`,3,`click`,`disabled`],[`capability`,`angularProfiling`,`missing`,``,`compact`,``,3,`page`],[3,`rangeChange`,`cycles`,`range`],[3,`pick`,`cycles`,`names`,`scope`],[1,`spans-note`],[3,`pick`,`stats`,`scope`],[1,`cd-grid`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`aria-label`,`Latest change detection cycles, newest first`,1,`cycles`],[3,`page`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(L(0,`section`,0)(1,`div`,1)(2,`h2`,2),J(3,`Change detection`),R(),M(4,Bj,4,5),L(5,`app-cd-transfer`,3),U(`imported`,function(e){return t.showImport(e)}),R(),L(6,`p`,4),J(7),R(),L(8,`p`,5),J(9),R()(),M(10,Vj,7,1,`p`,6),L(11,`p`,7),J(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. `),R(),M(13,Hj,1,1,`app-angular-unavailable`,8),M(14,Gj,16,7),z(15,`app-limit-note`,9),P(16,Kj,2,1,`p`,10,Ag),M(18,Yj,9,9),M(19,aM,27,4)(20,oM,2,0,`p`,11),R()),e&2){let e;k(4),N(t.imported()?-1:4),k(),I(`page`,t.page())(`maxCycles`,t.maxCycles()),k(2),Y(t.status()),k(2),Y(t.announcement()),k(),N((e=t.imported())?10:-1,e),k(3),N(t.page()?.supported===!1?13:-1),k(),N(t.imported()?-1:14),k(),I(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),k(),F(t.capNotes()),k(2),N(t.cycles().length?18:-1),k(),N(t.page()?.components?.length?19:t.recording()?20:-1)}},dependencies:[SO,uk,Cj,FA,Ej,ZA,fj,Lj],styles:[`[_nghost-%COMP%] { display: block; margin-top: 16px; } @@ -1811,7 +1811,7 @@ td.mono[_ngcontent-%COMP%] { .trigger[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%], .top[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%] { overflow-wrap: anywhere; -}`]})},rM=[`*`];function iM(e,t){e&1&&J(0),e&2&&Y(G(2).label())}function aM(e,t){e&1&&s_(0,0,null,iM,1,1)}function oM(e,t){if(e&1&&(L(0,`span`,4),J(1),R()),e&2){let e=G(2);k(),Y(e.message())}}function sM(e,t){if(e&1){let e=H();L(0,`button`,2),U(`click`,function(){return T(e),E(G().open())}),Gg(1,3),R(),M(2,oM,2,1,`span`,4)}if(e&2){let e=G(),t=d_(1);I(`title`,`Open `+e.label()+` in your editor`),j(`aria-label`,`Open `+e.label()+` in your editor`),k(),I(`ngTemplateOutlet`,t),k(),N(e.message()?2:-1)}}function cM(e,t){if(e&1&&(L(0,`span`,1),Gg(1,3),R()),e&2){let e=G(),t=d_(1);I(`title`,e.label()),k(),I(`ngTemplateOutlet`,t)}}var lM=class e{source=O(O(null));client=Q(()=>this.source()());available=Q(()=>{let e=this.client();return!!e&&!UE(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 VE(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=Nl({token:e,factory:e.ɵfac})};function uM(e,t){return t?`${e}:${t}`:e}var dM=class e{editor=C(lM);file=$.required();line=$(void 0);label=Q(()=>uM(this.file(),this.line()));message=O(``);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=A({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:rM,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&&(o_(),sg(0,aM,2,0,`ng-template`,null,0,Ev),M(2,sM,3,4)(3,cM,2,2,`span`,1)),e&2&&(k(2),N(t.editor.available()?2:3))},dependencies:[ub],styles:[`[_nghost-%COMP%] { +}`]})},lM=[`*`];function uM(e,t){e&1&&J(0),e&2&&Y(G(2).label())}function dM(e,t){e&1&&s_(0,0,null,uM,1,1)}function fM(e,t){if(e&1&&(L(0,`span`,4),J(1),R()),e&2){let e=G(2);k(),Y(e.message())}}function pM(e,t){if(e&1){let e=H();L(0,`button`,2),U(`click`,function(){return T(e),E(G().open())}),Gg(1,3),R(),M(2,fM,2,1,`span`,4)}if(e&2){let e=G(),t=d_(1);I(`title`,`Open `+e.label()+` in your editor`),j(`aria-label`,`Open `+e.label()+` in your editor`),k(),I(`ngTemplateOutlet`,t),k(),N(e.message()?2:-1)}}function mM(e,t){if(e&1&&(L(0,`span`,1),Gg(1,3),R()),e&2){let e=G(),t=d_(1);I(`title`,e.label()),k(),I(`ngTemplateOutlet`,t)}}var hM=class e{source=O(O(null));client=Q(()=>this.source()());available=Q(()=>{let e=this.client();return!!e&&!JE(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 KE(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=Nl({token:e,factory:e.ɵfac})};function gM(e,t){return t?`${e}:${t}`:e}var _M=class e{editor=C(hM);file=$.required();line=$(void 0);label=Q(()=>gM(this.file(),this.line()));message=O(``);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=A({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:lM,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&&(o_(),sg(0,dM,2,0,`ng-template`,null,0,Dv),M(2,pM,3,4)(3,mM,2,2,`span`,1)),e&2&&(k(2),N(t.editor.available()?2:3))},dependencies:[db],styles:[`[_nghost-%COMP%] { display: inline; min-width: 0; } @@ -1846,7 +1846,7 @@ td.mono[_ngcontent-%COMP%] { color: var(--%NS%danger-text); font-family: var(--%NS%font-sans); font-size: 0.92em; -}`]})},fM=[`field`],pM=[`editButton`],mM=[`valueBox`];function hM(e,t){if(e&1){let e=H();B(0,`div`,5)(1,`label`,6),J(2),V(),B(3,`input`,7,0),W(`input`,function(t){return T(e),E(G().draft.set(t.target.value))})(`keydown.enter`,function(t){T(e);let n=G();return t.preventDefault(),E(n.apply())})(`keydown.escape`,function(t){T(e);let n=G();return t.preventDefault(),t.stopPropagation(),E(n.cancel())}),V(),B(5,`button`,8),W(`click`,function(){return T(e),E(G().apply())}),J(6,`Apply`),V(),B(7,`button`,9),W(`click`,function(){return T(e),E(G().cancel())}),J(8,`Cancel`),V()(),B(9,`p`,10),J(10),V()}if(e&2){let e=G();k(),qg(`htmlFor`,e.fieldId),k(),X(`New value of `,e.prop().name,`, as JSON`),k(),qg(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),j(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),k(2),qg(`disabled`,e.busy()),k(4),qg(`id`,e.hintId),k(),X(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function gM(e,t){if(e&1&&(B(0,`pre`,null,1),J(2),xv(3,`json`),V()),e&2){let e=G(2);j(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),k(2),Y(Cv(3,4,e.prop().value))}}function _M(e,t){if(e&1){let e=H();B(0,`button`,14,2),W(`click`,function(){return T(e),E(G(2).start())}),J(2,` Edit `),V()}if(e&2){let e=G(2);qg(`disabled`,e.busy()),j(`aria-label`,`Edit `+e.prop().name)}}function vM(e,t){if(e&1&&(B(0,`p`,13),J(1),V()),e&2){let e=G(2);k(),Y(e.prop().locked)}}function yM(e,t){if(e&1&&(B(0,`div`,11),M(1,gM,4,6,`pre`),M(2,_M,3,2,`button`,12),V(),M(3,vM,2,1,`p`,13)),e&2){let e=G();k(),N(e.bare()?-1:1),k(),N(e.editable()?2:-1),k(),N(e.writes()&&e.prop().locked?3:-1)}}function bM(e,t){if(e&1&&(B(0,`p`,3),J(1),V()),e&2){let e=G();qg(`id`,e.errorId),k(),Y(e.error())}}var xM=0;function SM(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 CM=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++xM}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=O(!1);draft=O(``);busy=O(!1);error=O(``);done=O(``);editable=Q(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=Jv(`field`);editButton=Jv(`editButton`);valueBox=Jv(`valueBox`);injector=C(Ts);scrollable=O(!1);constructor(){dy(()=>{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),Hd(()=>{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=SM(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(){Hd(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&l_(t.field,fM,5)(t.editButton,pM,5)(t.valueBox,mM,5),e&2&&u_(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&&(M(0,hM,11,11)(1,yM,4,3),M(2,bM,2,2,`p`,3),B(3,`p`,4),J(4),V()),e&2&&(N(+!t.editing()),k(2),N(t.error()?2:-1),k(2),Y(t.done()))},dependencies:[gb],styles:[`[_nghost-%COMP%] { +}`]})},vM=[`field`],yM=[`editButton`],bM=[`valueBox`];function xM(e,t){if(e&1){let e=H();B(0,`div`,5)(1,`label`,6),J(2),V(),B(3,`input`,7,0),W(`input`,function(t){return T(e),E(G().draft.set(t.target.value))})(`keydown.enter`,function(t){T(e);let n=G();return t.preventDefault(),E(n.apply())})(`keydown.escape`,function(t){T(e);let n=G();return t.preventDefault(),t.stopPropagation(),E(n.cancel())}),V(),B(5,`button`,8),W(`click`,function(){return T(e),E(G().apply())}),J(6,`Apply`),V(),B(7,`button`,9),W(`click`,function(){return T(e),E(G().cancel())}),J(8,`Cancel`),V()(),B(9,`p`,10),J(10),V()}if(e&2){let e=G();k(),qg(`htmlFor`,e.fieldId),k(),X(`New value of `,e.prop().name,`, as JSON`),k(),qg(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),j(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),k(2),qg(`disabled`,e.busy()),k(4),qg(`id`,e.hintId),k(),X(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function SM(e,t){if(e&1&&(B(0,`pre`,null,1),J(2),Sv(3,`json`),V()),e&2){let e=G(2);j(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),k(2),Y(wv(3,4,e.prop().value))}}function CM(e,t){if(e&1){let e=H();B(0,`button`,14,2),W(`click`,function(){return T(e),E(G(2).start())}),J(2,` Edit `),V()}if(e&2){let e=G(2);qg(`disabled`,e.busy()),j(`aria-label`,`Edit `+e.prop().name)}}function wM(e,t){if(e&1&&(B(0,`p`,13),J(1),V()),e&2){let e=G(2);k(),Y(e.prop().locked)}}function TM(e,t){if(e&1&&(B(0,`div`,11),M(1,SM,4,6,`pre`),M(2,CM,3,2,`button`,12),V(),M(3,wM,2,1,`p`,13)),e&2){let e=G();k(),N(e.bare()?-1:1),k(),N(e.editable()?2:-1),k(),N(e.writes()&&e.prop().locked?3:-1)}}function EM(e,t){if(e&1&&(B(0,`p`,3),J(1),V()),e&2){let e=G();qg(`id`,e.errorId),k(),Y(e.error())}}var DM=0;function OM(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 kM=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++DM}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=O(!1);draft=O(``);busy=O(!1);error=O(``);done=O(``);editable=Q(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=Yv(`field`);editButton=Yv(`editButton`);valueBox=Yv(`valueBox`);injector=C(Ts);scrollable=O(!1);constructor(){fy(()=>{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),Hd(()=>{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=OM(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(){Hd(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&l_(t.field,vM,5)(t.editButton,yM,5)(t.valueBox,bM,5),e&2&&u_(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&&(M(0,xM,11,11)(1,TM,4,3),M(2,EM,2,2,`p`,3),B(3,`p`,4),J(4),V()),e&2&&(N(+!t.editing()),k(2),N(t.error()?2:-1),k(2),Y(t.done()))},dependencies:[_b],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1969,7 +1969,7 @@ button.edit[_ngcontent-%COMP%] { .error[_ngcontent-%COMP%] { color: var(--%NS%danger-text); -}`]})},wM=1e3,TM={depth:5,limit:100},EM=`[redacted]`;function DM(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function OM(e){return DM(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function kM(e){return DM(e)&&typeof e.$collapsed==`string`&&typeof e.size==`number`&&Object.keys(e).length===2}function AM(e){return e===`Array`?`array`:e===`Map`?`map`:e===`Set`?`set`:`object`}function jM(e){return e.$type===`Map`&&Array.isArray(e.entries)}function MM(e){return e.$type===`Set`&&Array.isArray(e.values)}function NM(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function PM(e){if(!e||typeof e!=`object`)return null;if(kM(e))return e.size<=0?null:{kind:AM(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(OM(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=OM(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(jM(t)||MM(t)){let e=typeof t.size==`number`?t.size:0,n=jM(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=NM(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function FM(e){if(typeof e==`string`)return JSON.stringify(e);let t=PM(e);if(t)return RM(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function IM(e){let t=PM(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(OM(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:FM(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:NM(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function LM(e,t,n){return`${e} ${e===1?t:n}`}function RM(e){let t={array:LM(e.size,`item`,`items`),object:LM(e.size,`key`,`keys`),map:LM(e.size,`entry`,`entries`),set:LM(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function zM(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function BM(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function VM(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var HM=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function UM(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==EM&&!HM.test(e)&&!e.endsWith(`…`)}function WM(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function GM(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=zM(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of IM(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!PM(r.value))continue;let i=n(t)??(PM(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var KM=(e,t)=>t.id;function qM(e,t){if(e&1){let e=H();L(0,`button`,2),U(`click`,function(){T(e);let t=G().$implicit;return E(G(3).toggle(t))}),D(),L(1,`svg`,3),z(2,`path`,4),R(),_s(),L(3,`span`,14),J(4),R(),L(5,`span`,5),J(6),R()()}if(e&2){let e=G().$implicit;j(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),k(4),X(``,e.label,`:`),k(2),Y(e.text)}}function JM(e,t){if(e&1&&z(0,`app-prop-value`,15),e&2){let e=G(5);I(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function YM(e,t){if(e&1&&(L(0,`span`,16),J(1),R()),e&2){let e=G(2).$implicit;k(),Y(e.text)}}function XM(e,t){if(e&1&&(L(0,`span`,14),J(1),R(),M(2,JM,1,5,`app-prop-value`,15)(3,YM,2,1,`span`,16)),e&2){let e,t=G().$implicit;k(),X(``,t.label,`:`),k(),N((e=t.edit)?2:3,e)}}function ZM(e,t){if(e&1){let e=H();L(0,`button`,17),U(`click`,function(){T(e);let t=G().$implicit;return E(G(3).more(t))}),J(1),L(2,`span`,18),J(3),R()()}if(e&2){let e=G().$implicit,t=G(3);k(),X(` Show `,t.step(e),` more `),k(2),X(`(`,e.more,` not listed)`)}}function QM(e,t){e&1&&(L(0,`span`,12),J(1,`Reading from the page…`),R())}function $M(e,t){if(e&1&&(L(0,`span`,13),J(1),R()),e&2){let e=G().$implicit;k(),Y(e.text)}}function eN(e,t){if(e&1&&(L(0,`li`,9),M(1,qM,7,4,`button`,10)(2,XM,4,2)(3,ZM,4,2,`button`,11)(4,QM,2,0,`span`,12)(5,$M,2,1,`span`,13),R()),e&2){let e,n=t.$implicit;K(`padding-left`,n.depth*14,`px`),k(),N((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function tN(e,t){if(e&1&&(L(0,`ul`,7),P(1,eN,6,3,`li`,8,KM),R()),e&2){let e=G(2);I(`id`,e.listId),j(`aria-label`,e.prop().name+` entries`),k(),F(e.rows())}}function nN(e,t){if(e&1){let e=H();L(0,`div`,1)(1,`button`,2),U(`click`,function(){return T(e),E(G().toggleRoot())}),D(),L(2,`svg`,3),z(3,`path`,4),R(),_s(),L(4,`span`,5),J(5),R()(),z(6,`app-prop-value`,6),R(),M(7,tN,3,2,`ul`,7)}if(e&2){let e=t,n=G();k(),j(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),k(4),Y(n.summaryOf(e)),k(),I(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),k(),N(n.rootOpen()?7:-1)}}function rN(e,t){if(e&1&&z(0,`app-prop-value`,0),e&2){let e=G();I(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var iN=0;function aN(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function oN(e){if(Array.isArray(e))return e.every(oN);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(oN)}return UM(e)}var sN=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++iN}`;host=C(Il);pendingMore=null;constructor(){dy(()=>{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=Q(()=>[this.prop().prop]);rootValue=Q(()=>this.store().level(this.rootPath(),this.directive())??this.prop().value);root=Q(()=>PM(this.rootValue()));needle=Q(()=>this.query().trim().toLowerCase());matches=Q(()=>{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 GM(this.rootPath(),this.rootValue(),e=>n.level(e,r),e)});rootOpen=Q(()=>!!this.matches()?.length||this.store().isOpen(this.rootPath(),this.directive()));rows=Q(()=>{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(zM(e));for(let t=2;t<=e.length;t++)i.add(zM(e.slice(0,t)))}let o=this.prop(),s=this.writes()&&n===void 0,c=[],l=(e,o,d,f,p,m)=>{let{children:h,more:g}=IM(e);for(let e of h){let h=[...o,e.key],g=zM(h);if(r&&!m&&!i.has(g))continue;let _=PM(e.value),ee=zM(h,n);if(!_){let t=p&&UM(e.value)?VM(h):null;c.push({id:ee,kind:`leaf`,depth:f,path:h,label:e.label,text:aN(e.value),edit:s&&t&&p?{name:BM(h,[...d]),prop:t,value:e.value,edit:p}:void 0});continue}let te=!!r&&!m&&i.has(g)&&!a.has(g)||t.isOpen(h,n);if(c.push({id:ee,kind:`node`,depth:f,path:h,label:e.label,text:RM(_),container:_,open:te}),!te)continue;let ne=t.level(h,n)??(_.collapsed?void 0:e.value),re=[...d,_.kind];ne===void 0?t.errors().has(ee)?c.push({...u(h,f+1,`error`),text:t.errors().get(ee)}):c.push(u(h,f+1,`loading`)):l(ne,h,re,f+1,WM(p,_),m||a.has(g))}g>0&&(!r||m)&&c.push({...u(o,f,`more`),more:g,listed:h.length})},u=(e,t,r)=>({id:`${zM(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?WM(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),TM.depth,TM.limit);return e.ok?oN(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 RM(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=A({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&&M(0,nN,8,12)(1,rN,1,5,`app-prop-value`,0),e&2){let e;N((e=t.root())?0:1,e)}},dependencies:[CM],styles:[`[_nghost-%COMP%] { +}`]})},AM=1e3,jM={depth:5,limit:100},MM=`[redacted]`;function NM(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function PM(e){return NM(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function FM(e){return NM(e)&&typeof e.$collapsed==`string`&&typeof e.size==`number`&&Object.keys(e).length===2}function IM(e){return e===`Array`?`array`:e===`Map`?`map`:e===`Set`?`set`:`object`}function LM(e){return e.$type===`Map`&&Array.isArray(e.entries)}function RM(e){return e.$type===`Set`&&Array.isArray(e.values)}function zM(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function BM(e){if(!e||typeof e!=`object`)return null;if(FM(e))return e.size<=0?null:{kind:IM(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(PM(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=PM(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(LM(t)||RM(t)){let e=typeof t.size==`number`?t.size:0,n=LM(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=zM(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function VM(e){if(typeof e==`string`)return JSON.stringify(e);let t=BM(e);if(t)return WM(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function HM(e){let t=BM(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(PM(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:VM(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:zM(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function UM(e,t,n){return`${e} ${e===1?t:n}`}function WM(e){let t={array:UM(e.size,`item`,`items`),object:UM(e.size,`key`,`keys`),map:UM(e.size,`entry`,`entries`),set:UM(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function GM(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function KM(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function qM(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var JM=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function YM(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==MM&&!JM.test(e)&&!e.endsWith(`…`)}function XM(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function ZM(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=GM(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of HM(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!BM(r.value))continue;let i=n(t)??(BM(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var QM=(e,t)=>t.id;function $M(e,t){if(e&1){let e=H();L(0,`button`,2),U(`click`,function(){T(e);let t=G().$implicit;return E(G(3).toggle(t))}),D(),L(1,`svg`,3),z(2,`path`,4),R(),_s(),L(3,`span`,14),J(4),R(),L(5,`span`,5),J(6),R()()}if(e&2){let e=G().$implicit;j(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),k(4),X(``,e.label,`:`),k(2),Y(e.text)}}function eN(e,t){if(e&1&&z(0,`app-prop-value`,15),e&2){let e=G(5);I(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function tN(e,t){if(e&1&&(L(0,`span`,16),J(1),R()),e&2){let e=G(2).$implicit;k(),Y(e.text)}}function nN(e,t){if(e&1&&(L(0,`span`,14),J(1),R(),M(2,eN,1,5,`app-prop-value`,15)(3,tN,2,1,`span`,16)),e&2){let e,t=G().$implicit;k(),X(``,t.label,`:`),k(),N((e=t.edit)?2:3,e)}}function rN(e,t){if(e&1){let e=H();L(0,`button`,17),U(`click`,function(){T(e);let t=G().$implicit;return E(G(3).more(t))}),J(1),L(2,`span`,18),J(3),R()()}if(e&2){let e=G().$implicit,t=G(3);k(),X(` Show `,t.step(e),` more `),k(2),X(`(`,e.more,` not listed)`)}}function iN(e,t){e&1&&(L(0,`span`,12),J(1,`Reading from the page…`),R())}function aN(e,t){if(e&1&&(L(0,`span`,13),J(1),R()),e&2){let e=G().$implicit;k(),Y(e.text)}}function oN(e,t){if(e&1&&(L(0,`li`,9),M(1,$M,7,4,`button`,10)(2,nN,4,2)(3,rN,4,2,`button`,11)(4,iN,2,0,`span`,12)(5,aN,2,1,`span`,13),R()),e&2){let e,n=t.$implicit;K(`padding-left`,n.depth*14,`px`),k(),N((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function sN(e,t){if(e&1&&(L(0,`ul`,7),P(1,oN,6,3,`li`,8,QM),R()),e&2){let e=G(2);I(`id`,e.listId),j(`aria-label`,e.prop().name+` entries`),k(),F(e.rows())}}function cN(e,t){if(e&1){let e=H();L(0,`div`,1)(1,`button`,2),U(`click`,function(){return T(e),E(G().toggleRoot())}),D(),L(2,`svg`,3),z(3,`path`,4),R(),_s(),L(4,`span`,5),J(5),R()(),z(6,`app-prop-value`,6),R(),M(7,sN,3,2,`ul`,7)}if(e&2){let e=t,n=G();k(),j(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),k(4),Y(n.summaryOf(e)),k(),I(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),k(),N(n.rootOpen()?7:-1)}}function lN(e,t){if(e&1&&z(0,`app-prop-value`,0),e&2){let e=G();I(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var uN=0;function dN(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function fN(e){if(Array.isArray(e))return e.every(fN);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(fN)}return YM(e)}var pN=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++uN}`;host=C(Il);pendingMore=null;constructor(){fy(()=>{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=Q(()=>[this.prop().prop]);rootValue=Q(()=>this.store().level(this.rootPath(),this.directive())??this.prop().value);root=Q(()=>BM(this.rootValue()));needle=Q(()=>this.query().trim().toLowerCase());matches=Q(()=>{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 ZM(this.rootPath(),this.rootValue(),e=>n.level(e,r),e)});rootOpen=Q(()=>!!this.matches()?.length||this.store().isOpen(this.rootPath(),this.directive()));rows=Q(()=>{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(GM(e));for(let t=2;t<=e.length;t++)i.add(GM(e.slice(0,t)))}let o=this.prop(),s=this.writes()&&n===void 0,c=[],l=(e,o,d,f,p,m)=>{let{children:h,more:g}=HM(e);for(let e of h){let h=[...o,e.key],g=GM(h);if(r&&!m&&!i.has(g))continue;let _=BM(e.value),ee=GM(h,n);if(!_){let t=p&&YM(e.value)?qM(h):null;c.push({id:ee,kind:`leaf`,depth:f,path:h,label:e.label,text:dN(e.value),edit:s&&t&&p?{name:KM(h,[...d]),prop:t,value:e.value,edit:p}:void 0});continue}let te=!!r&&!m&&i.has(g)&&!a.has(g)||t.isOpen(h,n);if(c.push({id:ee,kind:`node`,depth:f,path:h,label:e.label,text:WM(_),container:_,open:te}),!te)continue;let ne=t.level(h,n)??(_.collapsed?void 0:e.value),re=[...d,_.kind];ne===void 0?t.errors().has(ee)?c.push({...u(h,f+1,`error`),text:t.errors().get(ee)}):c.push(u(h,f+1,`loading`)):l(ne,h,re,f+1,XM(p,_),m||a.has(g))}g>0&&(!r||m)&&c.push({...u(o,f,`more`),more:g,listed:h.length})},u=(e,t,r)=>({id:`${GM(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?XM(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),jM.depth,jM.limit);return e.ok?fN(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 WM(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=A({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&&M(0,cN,8,12)(1,lN,1,5,`app-prop-value`,0),e&2){let e;N((e=t.root())?0:1,e)}},dependencies:[kM],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -2091,7 +2091,7 @@ button.edit[_ngcontent-%COMP%] { .more[_ngcontent-%COMP%] { transition: none; } -}`]})};function cN(e,t){return e.length>t.length&&e.startsWith(`${t.slice(0,-1)},`)}var lN=class{target={rpc:null,pageId:null,componentId:null};fetched=O(new Map);pushed=O({});open=O(new Set);loading=O(new Set);errors=O(new Map);limits=new Map;generation=0;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=zM(e,t),r=this.pushed();return Object.hasOwn(r,n)?r[n]:this.fetched().get(n)}isOpen(e,t){return this.open().has(zM(e,t))}toggle(e,t,n){let r=zM(e,t),i=new Set(this.open());if(i.has(r)){for(let e of i)(e===r||cN(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=zM(e,t),i=Math.min(wM,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=zM(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){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 uN(e,t){if(e&1&&(B(0,`span`,1),J(1),V()),e&2){let e=G(2);k(),X(`: `,e.label())}}function dN(e,t){if(e&1&&(B(0,`span`,1),J(1),V()),e&2){let e=G(3);k(),X(`: `,e.label())}}function fN(e,t){if(e&1){let e=H();B(0,`button`,4),W(`click`,function(){return T(e),E(G(2).store(`log`))}),J(1,` Log to console `),M(2,dN,2,1,`span`,1),V()}if(e&2){let e=G(2);qg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),k(2),N(e.label()?2:-1)}}function pN(e,t){if(e&1){let e=H();B(0,`button`,0),W(`click`,function(){return T(e),E(G().store())}),J(1,` Store as global `),M(2,uN,2,1,`span`,1),V(),M(3,fN,3,2,`button`,2),B(4,`span`,3),J(5),V()}if(e&2){let e=G();qg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),k(2),N(e.label()?2:-1),k(),N(e.canLog()?3:-1),k(2),Y(e.message())}}var mN=class e{rpc=$(null);pageId=$(null);target=$.required();label=$(``);canLog=$(!1);staticReport=Q(()=>UE(this.rpc()));busy=O(!1);message=O(``);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=A({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&&M(0,pN,6,4),e&2&&N(t.staticReport()?-1:0)},styles:[`[_nghost-%COMP%] { +}`]})};function mN(e,t){return e.length>t.length&&e.startsWith(`${t.slice(0,-1)},`)}var hN=class{target={rpc:null,pageId:null,componentId:null};fetched=O(new Map);pushed=O({});open=O(new Set);loading=O(new Set);errors=O(new Map);limits=new Map;generation=0;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=GM(e,t),r=this.pushed();return Object.hasOwn(r,n)?r[n]:this.fetched().get(n)}isOpen(e,t){return this.open().has(GM(e,t))}toggle(e,t,n){let r=GM(e,t),i=new Set(this.open());if(i.has(r)){for(let e of i)(e===r||mN(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=GM(e,t),i=Math.min(AM,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=GM(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){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 gN(e,t){if(e&1&&(B(0,`span`,1),J(1),V()),e&2){let e=G(2);k(),X(`: `,e.label())}}function _N(e,t){if(e&1&&(B(0,`span`,1),J(1),V()),e&2){let e=G(3);k(),X(`: `,e.label())}}function vN(e,t){if(e&1){let e=H();B(0,`button`,4),W(`click`,function(){return T(e),E(G(2).store(`log`))}),J(1,` Log to console `),M(2,_N,2,1,`span`,1),V()}if(e&2){let e=G(2);qg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),k(2),N(e.label()?2:-1)}}function yN(e,t){if(e&1){let e=H();B(0,`button`,0),W(`click`,function(){return T(e),E(G().store())}),J(1,` Store as global `),M(2,gN,2,1,`span`,1),V(),M(3,vN,3,2,`button`,2),B(4,`span`,3),J(5),V()}if(e&2){let e=G();qg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),k(2),N(e.label()?2:-1),k(),N(e.canLog()?3:-1),k(2),Y(e.message())}}var bN=class e{rpc=$(null);pageId=$(null);target=$.required();label=$(``);canLog=$(!1);staticReport=Q(()=>JE(this.rpc()));busy=O(!1);message=O(``);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=A({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&&M(0,yN,6,4),e&2&&N(t.staticReport()?-1:0)},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-wrap: wrap; align-items: center; @@ -2111,7 +2111,7 @@ button.edit[_ngcontent-%COMP%] { .status[_ngcontent-%COMP%]:empty { display: none; -}`]})},hN=(e,t)=>t.id;function gN(e,t){if(e&1&&(L(0,`p`,4),J(1),R()),e&2){let e=G(2);k(),X(`The page has more @for blocks than the `,e.length,` listed.`)}}function _N(e,t){e&1&&(L(0,`span`,9),J(1,`@empty showing`),R())}function vN(e,t){e&1&&(L(0,`span`,10),J(1,`@empty`),R())}function yN(e,t){e&1&&(L(0,`span`,10),J(1,`renders nothing`),R())}function bN(e,t){if(e&1){let e=H();L(0,`li`)(1,`button`,6),U(`click`,function(){let t=T(e).$implicit;return E(G(3).showOwner.emit(t))})(`focus`,function(){let t=T(e).$implicit,n=G(3);return E(n.highlight.emit(n.target(t)))})(`blur`,function(){return T(e),E(G(3).highlight.emit(null))})(`mouseenter`,function(){let t=T(e).$implicit,n=G(3);return E(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return T(e),E(G(3).highlight.emit(null))}),L(2,`span`,7),J(3),R(),L(4,`span`,8),J(5),R(),M(6,_N,2,0,`span`,9)(7,vN,2,0,`span`,10)(8,yN,2,0,`span`,10),L(9,`span`,11),J(10),R()()()}if(e&2){let e=t.$implicit,n=G(3);k(),j(`aria-disabled`,e.owner?null:`true`),k(2),Y(e.owner?.name??`Unknown component`),k(2),Z(` `,e.count,` `,e.count===1?`item`:`items`,` `),k(),N(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),k(4),Y(n.trackLabel(e))}}function xN(e,t){if(e&1&&(L(0,`section`,1)(1,`h2`,2),J(2,` @for blocks `),L(3,`span`,3),J(4),R()(),M(5,gN,2,1,`p`,4),L(6,`ul`,5),P(7,bN,11,6,`li`,null,hN),R()()),e&2){let e=G(),t=G();k(4),Y(t.truncated()?e.length+`+`:e.length),k(),N(t.truncated()?5:-1),k(2),F(e)}}function SN(e,t){e&1&&M(0,xN,9,2,`section`,1),e&2&&N(t.length?0:-1)}function CN(e,t){e&1&&z(0,`app-angular-unavailable`,0),e&2&&I(`page`,G().angular())}var wN={$index:`track $index`,item:`track item`,function:`track expression`},TN=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);angular=$(null);showOwner=Rv();highlight=Rv();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?wN[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({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&&M(0,SN,1,1)(1,CN,1,1,`app-angular-unavailable`,0),e&2){let e;N((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},dependencies:[gO],styles:[`[_nghost-%COMP%] { +}`]})},xN=(e,t)=>t.id;function SN(e,t){if(e&1&&(L(0,`p`,4),J(1),R()),e&2){let e=G(2);k(),X(`The page has more @for blocks than the `,e.length,` listed.`)}}function CN(e,t){e&1&&(L(0,`span`,9),J(1,`@empty showing`),R())}function wN(e,t){e&1&&(L(0,`span`,10),J(1,`@empty`),R())}function TN(e,t){e&1&&(L(0,`span`,10),J(1,`renders nothing`),R())}function EN(e,t){if(e&1){let e=H();L(0,`li`)(1,`button`,6),U(`click`,function(){let t=T(e).$implicit;return E(G(3).showOwner.emit(t))})(`focus`,function(){let t=T(e).$implicit,n=G(3);return E(n.highlight.emit(n.target(t)))})(`blur`,function(){return T(e),E(G(3).highlight.emit(null))})(`mouseenter`,function(){let t=T(e).$implicit,n=G(3);return E(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return T(e),E(G(3).highlight.emit(null))}),L(2,`span`,7),J(3),R(),L(4,`span`,8),J(5),R(),M(6,CN,2,0,`span`,9)(7,wN,2,0,`span`,10)(8,TN,2,0,`span`,10),L(9,`span`,11),J(10),R()()()}if(e&2){let e=t.$implicit,n=G(3);k(),j(`aria-disabled`,e.owner?null:`true`),k(2),Y(e.owner?.name??`Unknown component`),k(2),Z(` `,e.count,` `,e.count===1?`item`:`items`,` `),k(),N(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),k(4),Y(n.trackLabel(e))}}function DN(e,t){if(e&1&&(L(0,`section`,1)(1,`h2`,2),J(2,` @for blocks `),L(3,`span`,3),J(4),R()(),M(5,SN,2,1,`p`,4),L(6,`ul`,5),P(7,EN,11,6,`li`,null,xN),R()()),e&2){let e=G(),t=G();k(4),Y(t.truncated()?e.length+`+`:e.length),k(),N(t.truncated()?5:-1),k(2),F(e)}}function ON(e,t){e&1&&M(0,DN,9,2,`section`,1),e&2&&N(t.length?0:-1)}function kN(e,t){e&1&&z(0,`app-angular-unavailable`,0),e&2&&I(`page`,G().angular())}var AN={$index:`track $index`,item:`track item`,function:`track expression`},jN=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);angular=$(null);showOwner=zv();highlight=zv();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?AN[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({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&&M(0,ON,1,1)(1,kN,1,1,`app-angular-unavailable`,0),e&2){let e;N((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},dependencies:[SO],styles:[`[_nghost-%COMP%] { display: block; } @@ -2229,7 +2229,7 @@ button.edit[_ngcontent-%COMP%] { min-width: 0; text-overflow: ellipsis; white-space: nowrap; -}`]})},EN=(e,t)=>t.id;function DN(e,t){if(e&1&&(L(0,`p`,11),J(1),R(),L(2,`h3`,7),J(3,`Still retained`),R(),L(4,`p`,6),J(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. `),R()),e&2){let e=G(),t=G();k(),Y(t.plural(e.navigations,`navigation`))}}function ON(e,t){e&1&&(L(0,`p`,6),J(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),R())}function kN(e,t){if(e&1&&(L(0,`span`,18),J(1),R()),e&2){let e=G().$implicit,t=G(4);k(),Y(t.plural(e.subscriptions,`open subscription`))}}function AN(e,t){if(e&1&&(L(0,`li`,13)(1,`span`,14),J(2),R(),L(3,`span`,15),J(4),R(),L(5,`span`,16),J(6),R(),L(7,`span`,17),J(8),R(),M(9,kN,2,1,`span`,18),R()),e&2){let e=t.$implicit,n=G(4);k(2),Y(e.name),k(2),Y(e.route||`/`),k(2),X(``,n.plural(e.navigations,`navigation`),` ago`),k(2),Y(n.ageOf(e)),k(),N(e.subscriptions?9:-1)}}function jN(e,t){if(e&1&&(L(0,`p`,6),J(1),R(),L(2,`ul`,12),P(3,AN,10,5,`li`,13,EN),R()),e&2){let e=G(3);k(),Z(` 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. `),k(2),F(e.retained().slice(0,e.shown))}}function MN(e,t){e&1&&(L(0,`p`,6),J(1,`No destroyed component is still in memory after a few navigations.`),R())}function NN(e,t){if(e&1&&(L(0,`p`,6),J(1),L(2,`span`,19),J(3),R(),J(4,`. Navigate a few times to see whether they stay. `),R()),e&2){let e=G(3);k(),X(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),k(2),Y(e.names(e.recent()))}}function PN(e,t){if(e&1&&(M(0,ON,2,0,`p`,6),L(1,`p`,11),J(2),R(),L(3,`h3`,7),J(4,` Still retained `),L(5,`span`,8),J(6),R()(),M(7,jN,5,2)(8,MN,2,0,`p`,6),M(9,NN,5,2,`p`,6)),e&2){let e=G(),t=G();N(e.support.retention?-1:0),k(2),rv(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),k(4),Y(t.retained().length),k(),N(t.retained().length?7:8),k(2),N(t.recent().length?9:-1)}}function FN(e,t){if(e&1&&(L(0,`p`,6),J(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),L(2,`span`,19),J(3),R(),J(4,`. `),R()),e&2){let e=G(2);k(3),Y(e.names(e.detached()))}}function IN(e,t){if(e&1&&(L(0,`span`,8),J(1),R()),e&2){let e=G();k(),Y(e.subscriptions.length)}}function LN(e,t){if(e&1&&(L(0,`span`,15),J(1),R()),e&2){let e=G().$implicit;k(),Y(e.source)}}function RN(e,t){if(e&1&&(L(0,`li`,13)(1,`span`,14),J(2),R(),L(3,`span`,16),J(4),R(),L(5,`span`,18),J(6),R(),M(7,LN,2,1,`span`,15),R()),e&2){let e=t.$implicit;k(2),Y(e.name),k(2),X(``,e.count,` open`),k(2),X(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),k(),N(e.source?7:-1)}}function zN(e,t){if(e&1&&(L(0,`p`,6),J(1,` Still open although the component that made them is gone. Tear them down with takeUntilDestroyed(), DestroyRef.onDestroy or the async pipe. `),R(),L(2,`ul`,12),P(3,RN,8,4,`li`,13,kg),R()),e&2){let e=G(2),t=G();k(3),F(e.subscriptions.slice(0,t.shown))}}function BN(e,t){e&1&&(L(0,`p`,6),J(1,`No subscription is still open after its component went away.`),R())}function VN(e,t){e&1&&(L(0,`p`,6),J(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),R())}function HN(e,t){if(e&1&&(M(0,zN,5,0)(1,BN,2,0,`p`,6),M(2,VN,2,0,`p`,6)),e&2){let e=G();N(+!e.subscriptions.length),k(2),N(e.support.instances?-1:2)}}function UN(e,t){e&1&&(L(0,`p`,9),J(1,` Tracking could not start: the page has no RxJS the overlay can load. `),R())}function WN(e,t){e&1&&(L(0,`p`,6),J(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. `),R())}function GN(e,t){e&1&&z(0,`app-angular-unavailable`,10),e&2&&I(`page`,G(2).angular())}function KN(e,t){if(e&1&&(L(0,`span`,16),J(1),R()),e&2){let e=G().$implicit,t=G(3);k(),Y(t.plural(e.subscriptions,`subscription`))}}function qN(e,t){if(e&1){let e=H();L(0,`li`)(1,`button`,20),U(`click`,function(){let t=T(e).$implicit;return E(G(3).showComponent.emit(t.id))})(`focus`,function(){let t=T(e).$implicit;return E(G(3).highlight.emit(t.id))})(`blur`,function(){return T(e),E(G(3).highlight.emit(null))})(`mouseenter`,function(){let t=T(e).$implicit;return E(G(3).highlight.emit(t.id))})(`mouseleave`,function(){return T(e),E(G(3).highlight.emit(null))}),L(2,`span`,14),J(3),R(),L(4,`span`,16),J(5),R(),M(6,KN,2,1,`span`,16),R()()}if(e&2){let e=t.$implicit,n=G(2),r=G();k(3),Y(e.name),k(2),Y(r.effectsText(e)),k(),N(n.support.subscriptions===`on`?6:-1)}}function JN(e,t){e&1&&(L(0,`p`,6),J(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. `),R())}function YN(e,t){if(e&1&&(L(0,`ul`,12),P(1,qN,7,3,`li`,null,EN),R(),M(3,JN,2,0,`p`,6)),e&2){let e=G(),t=G();k(),F(e.components.slice(0,t.shown)),k(2),N(e.components.some(t.hasShared)?3:-1)}}function XN(e,t){e&1&&(L(0,`p`,6),J(1,`No component on the page has a live effect or a tracked subscription.`),R())}function ZN(e,t){if(e&1&&(M(0,DN,6,1)(1,PN,10,7),M(2,FN,5,1,`p`,6),L(3,`h3`,7),J(4,` Open subscriptions after destroy `),M(5,IN,2,1,`span`,8),R(),M(6,HN,3,2)(7,UN,2,0,`p`,9)(8,WN,2,0,`p`,6),L(9,`h3`,7),J(10,` Live effects and subscriptions `),L(11,`span`,8),J(12),R()(),M(13,GN,1,1,`app-angular-unavailable`,10),M(14,YN,4,1)(15,XN,2,0,`p`,6)),e&2){let e,n=t,r=G();N(n.support.retention===`dev-di-debug`?0:1),k(2),N(r.detached().length?2:-1),k(3),N(n.support.subscriptions===`on`?5:-1),k(),N((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),k(6),Y(n.components.length),k(),N(n.support.effects?-1:13),k(),N(n.components.length?14:15)}}function QN(e,t){e&1&&(L(0,`p`,6),J(1,`No leak data from this page yet. It comes with the next report.`),R())}var $N=20;function eP(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 tP=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,nP=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=Rv();highlight=Rv();shown=$N;minNavigations=2;minSeconds=nE/1e3;plural=tP;busy=O(!1);announcement=O(``);tracking=Q(()=>this.report()?.support.subscriptions===`on`);split=Q(()=>{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=Q(()=>this.split().retained);recent=Q(()=>this.split().recent);detached=Q(()=>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?`${eP(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=tP(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 VE(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=A({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&&(L(0,`section`,0)(1,`div`,1)(2,`h2`,2),J(3,`Leaks`),R(),L(4,`button`,3),U(`click`,function(){return t.toggle()}),J(5,` Track subscriptions `),R(),L(6,`p`,4),J(7),R()(),L(8,`p`,5),J(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. `),R(),M(10,ZN,16,7)(11,QN,2,0,`p`,6),R()),e&2){let e;k(4),I(`disabled`,!t.pageId()||!t.report()),j(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),k(3),Y(t.announcement()),k(3),N((e=t.report())?10:11,e)}},dependencies:[gO],styles:[`[_nghost-%COMP%] { +}`]})},MN=(e,t)=>t.id;function NN(e,t){if(e&1&&(L(0,`p`,11),J(1),R(),L(2,`h3`,7),J(3,`Still retained`),R(),L(4,`p`,6),J(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. `),R()),e&2){let e=G(),t=G();k(),Y(t.plural(e.navigations,`navigation`))}}function PN(e,t){e&1&&(L(0,`p`,6),J(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),R())}function FN(e,t){if(e&1&&(L(0,`span`,18),J(1),R()),e&2){let e=G().$implicit,t=G(4);k(),Y(t.plural(e.subscriptions,`open subscription`))}}function IN(e,t){if(e&1&&(L(0,`li`,13)(1,`span`,14),J(2),R(),L(3,`span`,15),J(4),R(),L(5,`span`,16),J(6),R(),L(7,`span`,17),J(8),R(),M(9,FN,2,1,`span`,18),R()),e&2){let e=t.$implicit,n=G(4);k(2),Y(e.name),k(2),Y(e.route||`/`),k(2),X(``,n.plural(e.navigations,`navigation`),` ago`),k(2),Y(n.ageOf(e)),k(),N(e.subscriptions?9:-1)}}function LN(e,t){if(e&1&&(L(0,`p`,6),J(1),R(),L(2,`ul`,12),P(3,IN,10,5,`li`,13,MN),R()),e&2){let e=G(3);k(),Z(` 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. `),k(2),F(e.retained().slice(0,e.shown))}}function RN(e,t){e&1&&(L(0,`p`,6),J(1,`No destroyed component is still in memory after a few navigations.`),R())}function zN(e,t){if(e&1&&(L(0,`p`,6),J(1),L(2,`span`,19),J(3),R(),J(4,`. Navigate a few times to see whether they stay. `),R()),e&2){let e=G(3);k(),X(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),k(2),Y(e.names(e.recent()))}}function BN(e,t){if(e&1&&(M(0,PN,2,0,`p`,6),L(1,`p`,11),J(2),R(),L(3,`h3`,7),J(4,` Still retained `),L(5,`span`,8),J(6),R()(),M(7,LN,5,2)(8,RN,2,0,`p`,6),M(9,zN,5,2,`p`,6)),e&2){let e=G(),t=G();N(e.support.retention?-1:0),k(2),rv(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),k(4),Y(t.retained().length),k(),N(t.retained().length?7:8),k(2),N(t.recent().length?9:-1)}}function VN(e,t){if(e&1&&(L(0,`p`,6),J(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),L(2,`span`,19),J(3),R(),J(4,`. `),R()),e&2){let e=G(2);k(3),Y(e.names(e.detached()))}}function HN(e,t){if(e&1&&(L(0,`span`,8),J(1),R()),e&2){let e=G();k(),Y(e.subscriptions.length)}}function UN(e,t){if(e&1&&(L(0,`span`,15),J(1),R()),e&2){let e=G().$implicit;k(),Y(e.source)}}function WN(e,t){if(e&1&&(L(0,`li`,13)(1,`span`,14),J(2),R(),L(3,`span`,16),J(4),R(),L(5,`span`,18),J(6),R(),M(7,UN,2,1,`span`,15),R()),e&2){let e=t.$implicit;k(2),Y(e.name),k(2),X(``,e.count,` open`),k(2),X(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),k(),N(e.source?7:-1)}}function GN(e,t){if(e&1&&(L(0,`p`,6),J(1,` Still open although the component that made them is gone. Tear them down with takeUntilDestroyed(), DestroyRef.onDestroy or the async pipe. `),R(),L(2,`ul`,12),P(3,WN,8,4,`li`,13,kg),R()),e&2){let e=G(2),t=G();k(3),F(e.subscriptions.slice(0,t.shown))}}function KN(e,t){e&1&&(L(0,`p`,6),J(1,`No subscription is still open after its component went away.`),R())}function qN(e,t){e&1&&(L(0,`p`,6),J(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),R())}function JN(e,t){if(e&1&&(M(0,GN,5,0)(1,KN,2,0,`p`,6),M(2,qN,2,0,`p`,6)),e&2){let e=G();N(+!e.subscriptions.length),k(2),N(e.support.instances?-1:2)}}function YN(e,t){e&1&&(L(0,`p`,9),J(1,` Tracking could not start: the page has no RxJS the overlay can load. `),R())}function XN(e,t){e&1&&(L(0,`p`,6),J(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. `),R())}function ZN(e,t){e&1&&z(0,`app-angular-unavailable`,10),e&2&&I(`page`,G(2).angular())}function QN(e,t){if(e&1&&(L(0,`span`,16),J(1),R()),e&2){let e=G().$implicit,t=G(3);k(),Y(t.plural(e.subscriptions,`subscription`))}}function $N(e,t){if(e&1){let e=H();L(0,`li`)(1,`button`,20),U(`click`,function(){let t=T(e).$implicit;return E(G(3).showComponent.emit(t.id))})(`focus`,function(){let t=T(e).$implicit;return E(G(3).highlight.emit(t.id))})(`blur`,function(){return T(e),E(G(3).highlight.emit(null))})(`mouseenter`,function(){let t=T(e).$implicit;return E(G(3).highlight.emit(t.id))})(`mouseleave`,function(){return T(e),E(G(3).highlight.emit(null))}),L(2,`span`,14),J(3),R(),L(4,`span`,16),J(5),R(),M(6,QN,2,1,`span`,16),R()()}if(e&2){let e=t.$implicit,n=G(2),r=G();k(3),Y(e.name),k(2),Y(r.effectsText(e)),k(),N(n.support.subscriptions===`on`?6:-1)}}function eP(e,t){e&1&&(L(0,`p`,6),J(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. `),R())}function tP(e,t){if(e&1&&(L(0,`ul`,12),P(1,$N,7,3,`li`,null,MN),R(),M(3,eP,2,0,`p`,6)),e&2){let e=G(),t=G();k(),F(e.components.slice(0,t.shown)),k(2),N(e.components.some(t.hasShared)?3:-1)}}function nP(e,t){e&1&&(L(0,`p`,6),J(1,`No component on the page has a live effect or a tracked subscription.`),R())}function rP(e,t){if(e&1&&(M(0,NN,6,1)(1,BN,10,7),M(2,VN,5,1,`p`,6),L(3,`h3`,7),J(4,` Open subscriptions after destroy `),M(5,HN,2,1,`span`,8),R(),M(6,JN,3,2)(7,YN,2,0,`p`,9)(8,XN,2,0,`p`,6),L(9,`h3`,7),J(10,` Live effects and subscriptions `),L(11,`span`,8),J(12),R()(),M(13,ZN,1,1,`app-angular-unavailable`,10),M(14,tP,4,1)(15,nP,2,0,`p`,6)),e&2){let e,n=t,r=G();N(n.support.retention===`dev-di-debug`?0:1),k(2),N(r.detached().length?2:-1),k(3),N(n.support.subscriptions===`on`?5:-1),k(),N((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),k(6),Y(n.components.length),k(),N(n.support.effects?-1:13),k(),N(n.components.length?14:15)}}function iP(e,t){e&1&&(L(0,`p`,6),J(1,`No leak data from this page yet. It comes with the next report.`),R())}var aP=20;function oP(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 sP=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,cP=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=zv();highlight=zv();shown=aP;minNavigations=2;minSeconds=aE/1e3;plural=sP;busy=O(!1);announcement=O(``);tracking=Q(()=>this.report()?.support.subscriptions===`on`);split=Q(()=>{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=Q(()=>this.split().retained);recent=Q(()=>this.split().recent);detached=Q(()=>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?`${oP(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=sP(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 KE(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=A({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&&(L(0,`section`,0)(1,`div`,1)(2,`h2`,2),J(3,`Leaks`),R(),L(4,`button`,3),U(`click`,function(){return t.toggle()}),J(5,` Track subscriptions `),R(),L(6,`p`,4),J(7),R()(),L(8,`p`,5),J(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. `),R(),M(10,rP,16,7)(11,iP,2,0,`p`,6),R()),e&2){let e;k(4),I(`disabled`,!t.pageId()||!t.report()),j(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),k(3),Y(t.announcement()),k(3),N((e=t.report())?10:11,e)}},dependencies:[SO],styles:[`[_nghost-%COMP%] { display: block; } @@ -2385,7 +2385,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); -}`]})},rP=12,iP=900;function aP(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 oP=class{options;injector=C(Ts);visibleTop=O(0);viewport=O(iP);rowHeight;host=null;scroller=null;detach=null;enabled;range;padTop;padBottom;constructor(e){this.options=e,this.rowHeight=O(e.estimate);let t=e.min??300;this.enabled=Q(()=>e.count()>t),this.range=Q(()=>{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)-rP));return{start:a,end:Math.min(t,Math.max(a,Math.ceil((i+r)/n)+rP))}}),this.padTop=Q(()=>this.enabled()?this.range().start*this.rowHeight():0),this.padBottom=Q(()=>this.enabled()?(e.count()-this.range().end)*this.rowHeight():0),mc(()=>{e.count(),Hd(()=>this.update(),{injector:this.injector})}),C(Ds).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:iP)}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&&Hd(t,{injector:this.injector})}};function sP(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 cP=e=>{let t=parseFloat(e);return Number.isFinite(t)?t:0};function lP(e,t=8){let n=e.ownerDocument.defaultView;if(!n)return e.offsetHeight+t;let r=sP(e),i=r?n.getComputedStyle(r):null,a=i?cP(i.paddingTop):0,o=i?cP(i.scrollPaddingTop):0,s=cP(n.getComputedStyle(e).top);return Math.max(0,Math.ceil(a+s+e.offsetHeight+t-o))}function uP(e,t,n=8){let r=sP(e),i=t.getBoundingClientRect().bottom+n-e.getBoundingClientRect().top;i<=0||(r?r.scrollTop-=i:e.ownerDocument.defaultView?.scrollBy(0,-i))}var dP=[`filterInput`],fP=[`treeEl`],pP=[`propFilterInput`],mP=()=>[],hP=e=>({kind:`component`,id:e}),gP=(e,t)=>t.row.node.id,_P=(e,t)=>t.outlet+t.route,vP=(e,t)=>t+e,yP=(e,t)=>t.formId,bP=(e,t)=>t.name+t.index,xP=(e,t)=>t.name,SP=(e,t)=>t.token+e,CP=(e,t)=>t.id;function wP(e,t){return this.sourceKey(t)}function TP(e,t){if(e&1){let e=H();L(0,`span`,35),J(1,`Page`),R(),L(2,`app-select`,36),U(`valueChange`,function(t){return T(e),E(G(2).selectPage(t))}),R()}if(e&2){let e=G(2);k(2),I(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function EP(e,t){if(e&1){let e=H();L(0,`button`,37),U(`click`,function(){return T(e),E(G(2).toggleDirectiveHosts())}),D(),L(1,`svg`,14),z(2,`path`,38)(3,`path`,39),R(),J(4,` Directive hosts `),R()}e&2&&j(`aria-pressed`,G(2).showDirectiveHosts())}function DP(e,t){if(e&1){let e=H();L(0,`button`,40),U(`click`,function(){T(e);let t=G(2);return E(t.picking()?t.cancelPick():t.pick())}),D(),L(1,`svg`,14),z(2,`path`,41),R(),J(3),R()}if(e&2){let e=G(2);q(`on`,e.picking()),k(3),X(` `,e.picking()?`Cancel pick`:`Pick component on page`,` `)}}function OP(e,t){if(e&1&&(L(0,`p`,21),J(1),R()),e&2){let e=G(2);k(),Y(e.pickMessage())}}function kP(e,t){if(e&1&&(L(0,`p`,22),J(1),R()),e&2){let e=G(2);k(),Y(e.truncationText())}}function AP(e,t){e&1&&(L(0,`p`,43),J(1,`The filter only searches the components the tree lists.`),R())}function jP(e,t){e&1&&(L(0,`p`,43),J(1,`Directive hosts are hidden, so they are not searched.`),R())}function MP(e,t){if(e&1){let e=H();L(0,`div`,25)(1,`p`,42),J(2),R(),M(3,AP,2,0,`p`,43),M(4,jP,2,0,`p`,43),L(5,`button`,44),U(`click`,function(){return T(e),E(G(2).clearFilter())}),J(6,`Clear filter`),R()()}if(e&2){let e=G(2);k(2),X(`No components match “`,e.filter().trim(),`”`),k(),N(e.page().truncated?3:-1),k(),N(!e.showDirectiveHosts()&&e.page().directiveHostCount?4:-1)}}function NP(e,t){if(e&1&&(L(0,`p`,26),J(1),R()),e&2){let e=G(2);k(),X(` `,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 PP(e,t){if(e&1){let e=H();L(0,`span`,52),U(`click`,function(t){T(e),G();let n=fv(0);return E(G(2).toggle(n.node.id,t))}),D(),L(1,`svg`,53),z(2,`path`,54),R()()}e&2&&(G(),q(`open`,fv(0).expanded))}function FP(e,t){e&1&&z(0,`span`,47)}function IP(e,t){if(e&1&&(L(0,`span`,55),J(1),R(),L(2,`span`,56),J(3),R(),L(4,`span`,24),J(5,`directive host`),R()),e&2){G();let e=fv(0),t=G(2);k(),X(`<`,e.node.tag,`>`),k(),j(`title`,e.node.directives?.join(`, `)),k(),Y(t.hostLabel(e.node))}}function LP(e,t){if(e&1&&(L(0,`span`,57),J(1),R(),L(2,`span`,58),J(3),R()),e&2){G();let e=fv(0);k(),Y(e.node.name),k(2),X(`<`,e.node.tag,`>`)}}function RP(e,t){if(e&1&&(L(0,`span`)(1,`span`,24),J(2,`Hydration: `),R(),J(3),R()),e&2){let e=t,n=G(3);M_(`hyd hyd-`+e),k(3),Y(n.hydrationText(e))}}function zP(e,t){if(e&1&&(L(0,`span`,49),J(1),R()),e&2){let e=t.$implicit;k(),Y(e.route||`/`)}}function BP(e,t){if(e&1&&(L(0,`span`,50),J(1),L(2,`span`,24),J(3),R()()),e&2){let e=t;k(),X(` `,e),k(2),X(` `,e===1?`check`:`checks`,` while recording`)}}function VP(e,t){if(e&1&&(L(0,`span`,51),J(1),L(2,`span`,24),J(3),R()()),e&2){G();let e=fv(0);j(`title`,e.node.directives.join(`, `)),k(),X(` +`,e.node.directives.length,` `),k(2),X(` `,e.node.directives.length===1?`directive`:`directives`,` `)}}function HP(e,t){if(e&1){let e=H();uv(0),L(1,`div`,45),U(`click`,function(){T(e);let t=fv(0);return E(G(2).select(t.node.id))})(`focus`,function(){T(e);let t=fv(0),n=G(2);return n.focusId.set(t.node.id),E(n.highlight(t.node.id))})(`blur`,function(){return T(e),E(G(2).highlight(null))})(`mouseenter`,function(){T(e);let t=fv(0);return E(G(2).highlight(t.node.id))})(`mouseleave`,function(){return T(e),E(G(2).highlight(null))}),M(2,PP,3,2,`span`,46)(3,FP,1,0,`span`,47),M(4,IP,6,3)(5,LP,4,2),M(6,RP,4,3,`span`,48),P(7,zP,2,1,`span`,49,_P),M(9,BP,4,2,`span`,50),M(10,VP,4,3,`span`,51),R()}if(e&2){let e,n,r=t.$implicit,i=G(2),a=dv(r.row);k(),K(`--%NS%depth`,a.depth),q(`selected`,i.selectedId()===a.node.id)(`dir-host`,a.node.kind===`directive`),j(`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),k(),N(a.hasChildren?2:3),k(2),N(a.node.kind===`directive`?4:5),k(2),N((e=a.node.hydration)?6:-1,e),k(),F(i.routedById().get(a.node.id)??mv(20,mP)),k(2),N((n=i.cdHosts()[a.node.id])?9:-1,n),k(),N(a.node.kind!==`directive`&&a.node.directives?.length?10:-1)}}function UP(e,t){if(e&1&&(L(0,`li`,66),J(1),R()),e&2){let e=t.$implicit;k(),Y(e)}}function WP(e,t){if(e&1){let e=H();L(0,`div`,68)(1,`button`,44),U(`click`,function(){let t=T(e);return E(G(3).reveal(t.id,!0))}),J(2),R()()}e&2&&(k(2),X(` Show `,t.name,` `))}function GP(e,t){if(e&1&&(L(0,`section`,29)(1,`header`,59)(2,`span`,60),J(3,`directive host`),R(),L(4,`h2`,61),J(5),R(),L(6,`span`,62),J(7),R()(),L(8,`div`,63)(9,`h3`),J(10,` Directives `),L(11,`span`,64),J(12),R()(),L(13,`ul`,65),P(14,UP,2,1,`li`,66,vP),R()(),L(16,`div`,63)(17,`p`,67),J(18,` This element hosts directives but no component. Their inputs are bound in the template of the component that renders it. `),R(),M(19,WP,3,1,`div`,68),R()()),e&2){let e,n=t,r=G(2);k(5),X(`<`,n.tag,`>`),k(2),Y(r.hostLabel(n)),k(5),Y(n.directives?.length??0),k(2),F(n.directives??mv(4,mP)),k(5),N((e=r.ownerOf(n.id))?19:-1,e)}}function KP(e,t){if(e&1&&(L(0,`p`,69),z(1,`app-source-link`,73),R()),e&2){let e=t;k(),I(`file`,e.file)(`line`,e.line)}}function qP(e,t){if(e&1){let e=H();L(0,`div`,74)(1,`button`,44),U(`click`,function(){T(e);let t=G();return E(G(2).revealInElements(t))}),J(2,`Reveal in Elements`),R(),L(3,`button`,44),U(`click`,function(){T(e);let t=G();return E(G(2).openSource(t))}),J(4,`Open source`),R()(),L(5,`p`,75),J(6),R()}if(e&2){let e=G(3);k(6),Y(e.actionMessage())}}function JP(e,t){if(e&1){let e=H();L(0,`button`,77),U(`click`,function(){let t=T(e).$implicit;return E(G(5).showForm.emit(t.formId))}),J(1),R()}if(e&2){let e=t.$implicit;k(),X(` Show `,e.label,` in Forms `)}}function YP(e,t){if(e&1&&(L(0,`div`,70),P(1,JP,2,1,`button`,76,yP),R()),e&2){let e=G(),t=G(3);k(),F(t.formsIn(e.file))}}function XP(e,t){e&1&&M(0,YP,3,0,`div`,70),e&2&&N(G(3).formsIn(t.file).length?0:-1)}function ZP(e,t){if(e&1){let e=H();L(0,`div`,70)(1,`button`,44),U(`click`,function(){T(e);let t=G();return E(G(2).openInjector(t))}),J(2,` Show in Injectors `),L(3,`span`,24),J(4),R()()()}if(e&2){let e=G();k(4),X(`: `,e.name)}}function QP(e,t){if(e&1&&z(0,`app-store-global`,71),e&2){let e=G(),t=G(2);I(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`target`,hv(4,hP,e.id))(`label`,e.name)}}function $P(e,t){if(e&1&&(L(0,`dt`),J(1,`Routed`),R(),L(2,`dd`,79),J(3),R()),e&2){let e=t.$implicit;k(3),Z(``,e.route||`/`,` in outlet `,e.outlet)}}function eF(e,t){if(e&1&&(L(0,`span`,11),J(1),R()),e&2){let e=G(4);k(),Z(``,e.shownValues()?.count??0,` of `,e.valueTotal())}}function tF(e,t){if(e&1){let e=H();L(0,`div`,83)(1,`p`,42),J(2),R(),L(3,`p`,43),J(4,` The filter searches names, and the nested keys of values you opened. `),R(),L(5,`button`,44),U(`click`,function(){return T(e),E(G(5).clearPropFilter())}),J(6,`Clear filter`),R()()}if(e&2){let e=G(5);k(2),X(` No inputs, outputs or properties match “`,e.propFilter().trim(),`” `)}}function nF(e,t){if(e&1&&(L(0,`span`,87),J(1),R()),e&2){let e=G().$implicit;k(),X(`(`,e.prop,`)`)}}function rF(e,t){if(e&1&&(L(0,`li`,85)(1,`span`,86),J(2),M(3,nF,2,1,`span`,87),R(),z(4,`app-value-tree`,88),R()),e&2){let e=t.$implicit,n=G(4),r=G(3);k(2),X(` `,e.name,` `),k(),N(e.prop===e.name?-1:3),k(),I(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function iF(e,t){if(e&1&&(L(0,`ul`,84),P(1,rF,5,9,`li`,85,xP),R()),e&2){let e=G(2);k(),F(e.inputs)}}function aF(e,t){e&1&&(L(0,`p`,67),J(1,`No inputs.`),R())}function oF(e,t){if(e&1&&(L(0,`div`,63)(1,`h3`),J(2,` Inputs `),L(3,`span`,64),J(4),R()(),M(5,iF,3,0,`ul`,84)(6,aF,2,0,`p`,67),R()),e&2){let e=G();k(4),Y(e.inputs.length),k(),N(e.inputs.length?5:6)}}function sF(e,t){if(e&1&&(L(0,`li`,90)(1,`span`,79),J(2),R(),L(3,`span`,91),J(4),R()()),e&2){let e=t.$implicit;q(`on`,e.listened),k(2),Y(e.name),k(2),Y(e.listened?`listened`:`no listener`)}}function cF(e,t){if(e&1&&(L(0,`ul`,65),P(1,sF,5,4,`li`,89,xP),R()),e&2){let e=G(2);k(),F(e.outputs)}}function lF(e,t){e&1&&(L(0,`p`,67),J(1,`No outputs.`),R())}function uF(e,t){if(e&1&&(L(0,`div`,63)(1,`h3`),J(2,` Outputs `),L(3,`span`,64),J(4),R()(),M(5,cF,3,0,`ul`,65)(6,lF,2,0,`p`,67),R()),e&2){let e=G();k(4),Y(e.outputs.length),k(),N(e.outputs.length?5:6)}}function dF(e,t){if(e&1&&(L(0,`span`,92),J(1),R()),e&2){let e=G().$implicit;k(),Y(e.kind)}}function fF(e,t){if(e&1&&(L(0,`li`,85)(1,`span`,86),J(2),M(3,dF,2,1,`span`,92),R(),z(4,`app-value-tree`,88),R()),e&2){let e=t.$implicit,n=G(4),r=G(3);k(2),X(` `,e.name,` `),k(),N(e.kind?3:-1),k(),I(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function pF(e,t){if(e&1&&(L(0,`ul`,84),P(1,fF,5,9,`li`,85,xP),R()),e&2){let e=G(2);k(),F(e.properties)}}function mF(e,t){e&1&&(L(0,`p`,67),J(1,`No other properties.`),R())}function hF(e,t){if(e&1&&(L(0,`div`,63)(1,`h3`),J(2,` Properties `),L(3,`span`,64),J(4),R()(),M(5,pF,3,0,`ul`,84)(6,mF,2,0,`p`,67),R()),e&2){let e=G();k(4),Y(e.properties.length),k(),N(e.properties.length?5:6)}}function gF(e,t){if(e&1&&(L(0,`li`,66),J(1),R()),e&2){let e=t.$implicit;k(),Y(e)}}function _F(e,t){if(e&1&&(L(0,`div`,63)(1,`h3`),J(2,` DOM listeners `),L(3,`span`,64),J(4),R()(),L(5,`ul`,65),P(6,gF,2,1,`li`,66,Ag),R()()),e&2){let e=G(2);k(4),Y(e.listeners.length),k(2),F(e.listeners)}}function vF(e,t){if(e&1&&(L(0,`li`,85)(1,`span`,86),J(2),R(),z(3,`app-value-tree`,93),R()),e&2){let e=t.$implicit,n=G(2).$implicit,r=G(2),i=G(3);k(2),Y(e.name),k(),I(`prop`,e)(`store`,i.values)(`query`,i.propFilter())(`directive`,n.index)(`componentId`,r.id)(`pageId`,i.page()?.pageId??null)(`rpc`,i.rpc())}}function yF(e,t){if(e&1&&(L(0,`ul`,84),P(1,vF,4,8,`li`,85,xP),R()),e&2){let e=G().$implicit;k(),F(e.inputs)}}function bF(e,t){if(e&1&&(L(0,`li`,90)(1,`span`,79),J(2),R(),L(3,`span`,91),J(4),R()()),e&2){let e=t.$implicit;q(`on`,e.listened),k(2),Y(e.name),k(2),Y(e.listened?`listened`:`no listener`)}}function xF(e,t){if(e&1&&(L(0,`ul`,65),P(1,bF,5,4,`li`,89,xP),R()),e&2){let e=G().$implicit;k(),F(e.outputs)}}function SF(e,t){e&1&&(L(0,`p`,67),J(1,`No inputs or outputs.`),R())}function CF(e,t){if(e&1&&(L(0,`div`,63)(1,`h3`)(2,`span`,79),J(3),R(),L(4,`span`,92),J(5,`directive on host`),R()(),M(6,yF,3,0,`ul`,84),M(7,xF,3,0,`ul`,65),M(8,SF,2,0,`p`,67),R()),e&2){let e=t.$implicit;k(3),Y(e.name),k(3),N(e.inputs.length?6:-1),k(),N(e.outputs.length?7:-1),k(),N(!e.inputs.length&&!e.outputs.length?8:-1)}}function wF(e,t){if(e&1&&(M(0,tF,7,1,`div`,83),M(1,oF,7,2,`div`,63),M(2,uF,7,2,`div`,63),M(3,hF,7,2,`div`,63),M(4,_F,8,1,`div`,63),P(5,CF,9,4,`div`,63,bP)),e&2){let e=t,n=G(),r=G(3);N(r.propQuery()&&!e.count?0:-1),k(),N(!r.propQuery()||e.inputs.length?1:-1),k(),N(!r.propQuery()||e.outputs.length?2:-1),k(),N(!r.propQuery()||e.properties.length?3:-1),k(),N(!r.propQuery()&&n.listeners.length?4:-1),k(),F(e.directives)}}function TF(e,t){if(e&1&&(L(0,`span`,92),J(1),R()),e&2){let e=t.$implicit;k(),Y(e)}}function EF(e,t){if(e&1&&(L(0,`span`,96),J(1,`from `),L(2,`span`,79),J(3),R()()),e&2){let e=G().$implicit;k(3),Y(e.providedByName??`an injector`)}}function DF(e,t){e&1&&(L(0,`span`,97),J(1,`not provided`),R())}function OF(e,t){if(e&1&&(L(0,`li`,94)(1,`span`,95),J(2),R(),P(3,TF,2,1,`span`,92,Ag),M(5,EF,4,1,`span`,96)(6,DF,2,0,`span`,97),R()),e&2){let e=t.$implicit;k(2),Y(e.token),k(),F(e.flags),k(2),N(e.providedBy?5:6)}}function kF(e,t){if(e&1&&(L(0,`ul`,82),P(1,OF,7,2,`li`,94,SP),R()),e&2){let e=G();k(),F(e.dependencies)}}function AF(e,t){e&1&&(L(0,`p`,67),J(1,`Nothing is injected through the constructor or inject().`),R())}function jF(e,t){if(e&1){let e=H();L(0,`dl`,78)(1,`dt`),J(2,`Change detection`),R(),L(3,`dd`),J(4),R(),L(5,`dt`),J(6,`Encapsulation`),R(),L(7,`dd`),J(8),R(),L(9,`dt`),J(10,`Host path`),R(),L(11,`dd`,79),J(12),R(),P(13,$P,4,2,null,null,_P),R(),L(15,`div`,80)(16,`div`,5),D(),L(17,`svg`,6),z(18,`circle`,7)(19,`path`,8),R(),_s(),L(20,`input`,81,2),U(`input`,function(t){return T(e),E(G(3).propFilter.set(t.target.value))})(`keydown.escape`,function(t){return T(e),E(G(3).clearPropFilter(t))}),R()(),M(22,eF,2,2,`span`,11),L(23,`p`,20),J(24),R()(),M(25,wF,7,5),L(26,`div`,63)(27,`h3`),J(28,` Injected `),L(29,`span`,64),J(30),R()(),M(31,kF,3,0,`ul`,82)(32,AF,2,0,`p`,67),R()}if(e&2){let e,n=t,r=G(),i=G(2);k(4),Y(n.changeDetection??`Unknown`),k(4),Y(n.encapsulation??`Unknown`),k(4),Y(n.path),k(),F(i.routedById().get(r.id)??mv(9,mP)),k(7),I(`value`,i.propFilter()),k(2),N(i.propQuery()?22:-1),k(2),Y(i.propFilterStatus()),k(),N((e=i.shownValues())?25:-1,e),k(5),Y(n.dependencies.length),k(),N(n.dependencies.length?31:32)}}function MF(e,t){e&1&&(L(0,`div`,72),z(1,`span`,98),L(2,`p`,43),J(3,`Reading live values from the page…`),R()())}function NF(e,t){if(e&1&&(L(0,`section`,29)(1,`header`,59)(2,`span`,60),J(3,`component`),R(),L(4,`h2`,61),J(5),R(),L(6,`span`,62),J(7),R(),M(8,KP,2,2,`p`,69),M(9,qP,7,1),M(10,XP,1,1),M(11,ZP,5,1,`div`,70),M(12,QP,1,6,`app-store-global`,71),R(),M(13,jF,33,10)(14,MF,4,0,`div`,72),R()),e&2){let e,n,r,i=t,a=G(2);k(5),Y(i.name),k(2),X(`<`,i.tag,`>`),k(),N((e=a.whereOf(i))?8:-1,e),k(),N(a.devtoolsActions()?9:-1),k(),N((n=a.sourceFor(i))?10:-1,n),k(),N(a.canShowInjector()&&!a.staticReport()?11:-1),k(),N(!a.staticReport()&&!a.native()?12:-1),k(),N((r=a.detail())?13:14,r)}}function PF(e,t){e&1&&(L(0,`p`,42),J(1,`The selected component was destroyed`),R(),L(2,`p`,43)(3,`span`,79),J(4),R(),J(5,` is no longer on the page. Select another component to see its live values. `),R()),e&2&&(k(4),Y(t))}function FF(e,t){e&1&&(L(0,`p`,43),J(1,` Select a component to see its live inputs, properties, outputs, change detection and injected services. `),R())}function IF(e,t){if(e&1&&(L(0,`div`,30),M(1,PF,6,1)(2,FF,2,0,`p`,43),R()),e&2){let e,t=G(2);k(),N((e=t.destroyed())?1:2,e)}}function LF(e,t){e&1&&(L(0,`span`,92),J(1,`hydrate never`),R())}function RF(e,t){if(e&1&&(L(0,`span`,92),J(1),R()),e&2){let e=G().$implicit;k(),Y(e.hydration)}}function zF(e,t){if(e&1){let e=H();L(0,`li`)(1,`button`,101),U(`click`,function(){let t=T(e).$implicit;return E(G(3).showOwner(t))})(`focus`,function(){let t=T(e).$implicit;return E(G(3).highlightBlock(t))})(`blur`,function(){return T(e),E(G(3).highlight(null))})(`mouseenter`,function(){let t=T(e).$implicit;return E(G(3).highlightBlock(t))})(`mouseleave`,function(){return T(e),E(G(3).highlight(null))}),L(2,`span`,57),J(3),R(),L(4,`span`,102),J(5),R(),M(6,LF,2,0,`span`,92)(7,RF,2,1,`span`,92),L(8,`span`,103),J(9),R()()()}if(e&2){let e=t.$implicit;k(),j(`aria-disabled`,e.owner?null:`true`),k(2),Y(e.owner?.name??`Unknown component`),k(),M_(`defer-state-`+e.state),k(),Y(e.state),k(),N(e.hydrateNever?6:e.hydration===`not-configured`?-1:7),k(3),Y(e.triggers.join(`, `)||`no triggers`)}}function BF(e,t){if(e&1&&(L(0,`section`,31)(1,`h2`,99),J(2,` Defer blocks `),L(3,`span`,64),J(4),R()(),L(5,`ul`,100),P(6,zF,10,7,`li`,null,CP),R()()),e&2){let e=G(2);k(4),Y(e.deferCount()),k(2),F(e.deferBlocks())}}function VF(e,t){e&1&&z(0,`app-angular-unavailable`,32),e&2&&I(`page`,G(2).angularPage())}function HF(e,t){if(e&1){let e=H();L(0,`app-hydration-section`,104),U(`overlay`,function(t){return T(e),E(G(2).setHydrationOverlay(t))})(`showNode`,function(t){return T(e),E(G(2).revealNode(t))})(`highlight`,function(t){return T(e),E(G(2).highlight(t))}),R()}e&2&&I(`report`,G(2).page()?.hydration)}function UF(e,t){if(e&1){let e=H();L(0,`app-cd-recording`,105),U(`showComponent`,function(t){return T(e),E(G(2).showCdComponent(t))}),R(),L(1,`app-leaks-section`,106),U(`showComponent`,function(t){return T(e),E(G(2).showLeakComponent(t))})(`highlight`,function(t){return T(e),E(G(2).highlight(t))}),R()}if(e&2){let e=G(2);I(`page`,e.cdPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc()),k(),I(`report`,e.leaksPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`angular`,e.angularPage())}}function WF(e,t){if(e&1){let e=H();L(0,`p`,3),J(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. `),R(),L(2,`div`,4)(3,`div`,5),D(),L(4,`svg`,6),z(5,`circle`,7)(6,`path`,8),R(),_s(),L(7,`input`,9,0),U(`input`,function(t){return T(e),E(G().setFilter(t.target.value))})(`keydown.escape`,function(){return T(e),E(G().setFilter(``))}),R(),L(9,`span`,10),J(10,` Type plain text, a tag such as