From e173f2ee14bb2e4ca4d463e532dc51d10210f7b7 Mon Sep 17 00:00:00 2001 From: erKam Date: Sun, 8 Nov 2026 09:20:40 +0000 Subject: [PATCH 1/7] refactor(ui): split the network page into section components The Network page was one 3,140 line component holding every section, its state and its styles. Split it into one component per section under `app/src/pages/network/` (SSR requests, HTTP timeline, response preview, fault rules, SSR overrides, hydration, TransferState payload), three page-scoped state services (`NetworkState`, `RuleState`, `OverrideState`), the data types and pure helpers in `http-model.ts`, and the shared section styles in `styles/_network.scss`. The sections are attribute components on the page's own `
` elements, so the DOM, labels, ARIA and keyboard behaviour stay the same, and the page keeps the members its tests read. The package test that renders the page in JIT stubs the dropdown in every section that has one and adds the signal input metadata for the response preview. Fixes #369 --- app/src/pages/network-inspector.ts | 3027 +---------------- app/src/pages/network/call-timeline.ts | 389 +++ app/src/pages/network/fault-rules.ts | 262 ++ app/src/pages/network/http-model.ts | 365 ++ app/src/pages/network/hydration-stats.ts | 148 + app/src/pages/network/network-state.ts | 399 +++ app/src/pages/network/override-state.ts | 174 + app/src/pages/network/response-preview.ts | 120 + app/src/pages/network/rule-state.ts | 199 ++ app/src/pages/network/ssr-overrides.ts | 199 ++ app/src/pages/network/ssr-requests.ts | 265 ++ app/src/pages/network/transfer-payload.ts | 241 ++ app/src/styles/_network.scss | 612 ++++ lint-baseline.json | 3 - .../src/__tests__/network-inspector.test.ts | 18 +- 15 files changed, 3504 insertions(+), 2917 deletions(-) create mode 100644 app/src/pages/network/call-timeline.ts create mode 100644 app/src/pages/network/fault-rules.ts create mode 100644 app/src/pages/network/http-model.ts create mode 100644 app/src/pages/network/hydration-stats.ts create mode 100644 app/src/pages/network/network-state.ts create mode 100644 app/src/pages/network/override-state.ts create mode 100644 app/src/pages/network/response-preview.ts create mode 100644 app/src/pages/network/rule-state.ts create mode 100644 app/src/pages/network/ssr-overrides.ts create mode 100644 app/src/pages/network/ssr-requests.ts create mode 100644 app/src/pages/network/transfer-payload.ts create mode 100644 app/src/styles/_network.scss diff --git a/app/src/pages/network-inspector.ts b/app/src/pages/network-inspector.ts index d7c110c1..d7038aa9 100644 --- a/app/src/pages/network-inspector.ts +++ b/app/src/pages/network-inspector.ts @@ -1,356 +1,47 @@ -import { - Component, - DestroyRef, - ElementRef, - Injector, - afterNextRender, - computed, - effect, - inject, - input, - linkedSignal, - signal, - untracked, - viewChild, -} from '@angular/core'; -import { JsonPipe } from '@angular/common'; +import { Component, effect, inject, input } from '@angular/core'; import type { DevframeRpcClient } from 'devframe/client'; -import { hostPageId } from '../page-id'; -import { rpcCall as call } from '../rpc'; -import { actionAllowed, actionBlockedMessage, panelConfig } from '../devtools-config'; -import { - CACHE_SKIP_TEXT, - HTTP_RULE_STATUSES, - isHttpRuleStatus, - type CacheSkip, -} from '@pangular-inspector/devtools/internal/config'; -import { prettyJson } from '../format'; -import { LimitNote } from '../ui/limit-note'; import { AppState } from '../ui/app-state'; -import { LiveControls, LiveFeed, followNewest } from '../ui/live-feed'; -import { SortHeader, sortRows, type SortState } from '../ui/sort-header'; -import { RovingList } from '../ui/roving-list'; -import { Select, type SelectOption } from '../ui/select'; -import { VirtualWindow } from '../ui/virtual-window'; -import { HttpHeadersView } from './http-headers'; -import { NetworkWaterfall } from './network-waterfall'; -import { SearchField } from '../ui/search-field'; -import { CallCopy } from './network/call-copy'; -import { CallOriginTag } from './network/call-origin'; +import { Select } from '../ui/select'; +import { rememberSelection } from '../view-memory'; +import { CallTimeline } from './network/call-timeline'; +import { FaultRules } from './network/fault-rules'; import { HarExport } from './network/har-export'; import { HttpLint } from './network/http-lint'; -import { PayloadInsights } from './network/payload-insights'; -import { RuleMatchCount } from './network/rule-match-count'; -import { RulePresets } from './network/rule-presets'; -import { presetRules } from '@pangular-inspector/devtools/internal/http-data'; -import { rememberSelection } from '../view-memory'; -import { RedactionCount } from '../ui/redaction-count'; - -type HttpSide = 'client' | 'server'; - -interface HttpRule { - id: string; - pattern: string; - method?: string; - enabled: boolean; - target: HttpSide | 'both'; - status?: number; - delayMs?: number; - body?: string; - chance?: number; -} - -interface HttpCall { - id: string; - url: string; - method: string; - status: number; - durationMs: number; - side: HttpSide; - cacheHit: boolean; - faulted: boolean; - mocked?: boolean; - delayMs?: number; - cancelled?: boolean; - ruleId?: string; - rulePattern?: string; - pageUrl?: string; - requestId?: string; - /** The Angular API that likely started the call, from a stack heuristic. */ - origin?: 'httpResource' | 'resource' | 'defer'; - cacheStored?: boolean; - cacheSkip?: CacheSkip; - at: number; - error?: string; - preview?: string; - requestHeaders?: Record; - responseHeaders?: Record; - /** Made with the page's own `fetch()`, not through `HttpClient`. */ - nativeFetch?: true; -} - -interface SsrNavigation { - url: string; - finalUrl?: string; - outcome: string; - reason?: string; - durationMs?: number; - guards?: { names: string[]; passed?: boolean; ms?: number }; - resolvers?: { names: string[]; ms?: number }; -} - -interface SsrRequest { - id: string; - method: string; - url: string; - status: number; - at: number; - durationMs: number; - renderMs: number; - bytes: number; - renderMode: 'server' | 'prerender' | 'client' | 'redirect' | 'not-rendered' | 'unknown'; - fetches: number; - fetchMs: number; - headers: Record; - navigations?: SsrNavigation[]; - overrides?: { id: string; kind: SsrOverrideKind; applied: boolean; note?: string }[]; - compressedBeforeTrace?: boolean; - aborted?: boolean; -} - -type SsrOverrideKind = 'render-error' | 'client-render' | 'state-edit'; - -interface SsrOverride { - id: string; - kind: SsrOverrideKind; - pattern: string; - enabled: boolean; - message?: string; - key?: string; - value?: string; -} - -interface OverrideDraft { - kind: SsrOverrideKind; - pattern: string; - message: string; - key: string; - value: string; -} - -const EMPTY_OVERRIDE: OverrideDraft = { - kind: 'render-error', - pattern: '', - message: '', - key: '', - value: '', -}; - -const OVERRIDE_LABEL: Record = { - 'render-error': 'Render error', - 'client-render': 'Client render', - 'state-edit': 'TransferState edit', -}; - -const RENDER_MODE_LABEL: Record = { - server: 'Server', - prerender: 'Prerender', - client: 'Client', - redirect: 'Redirect', - 'not-rendered': 'Not rendered', - unknown: 'Unknown', -}; - -interface PayloadEntry { - key: string; - http?: { url?: string; status?: number; statusText?: string; responseType?: string }; - source?: 'http' | 'analog' | 'hydration'; - fn?: { id: string; name?: string; file?: string }; - size: number; - value: unknown; -} - -interface HydrationMismatch { - component: string; - /** `component` is a class name (`ProductCard`), not a node name (`app-card`). */ - isClass?: boolean; - expected?: string; - actual?: string; -} - -interface HydrationStats { - enabled: boolean; - hydratedComponents?: number; - hydratedNodes?: number; - componentsSkippedHydration?: number; - deferBlocksWithIncrementalHydration?: number; - nodes?: { hydrated: number; skipped: number; mismatched: number }; - mismatches?: HydrationMismatch[]; - skipHydrationHosts: string[]; - warnings: string[]; - warningsCaptured?: boolean; - stableMs?: number; -} - -interface HttpPayload { - found: boolean; - size: number; - entries: PayloadEntry[]; - error?: string; - /** Set when the payload came from Refetch, not from the HTML the tab was served with. */ - refetchedAt?: number; -} - -interface HttpPage { - pageId: string; - url: string; - initialUrl?: string; - title: string; - hydration: HydrationStats | null; - calls: HttpCall[]; - dropped?: number; - ssrRequestId?: string; - firstSeenAt?: number; - reportedAt: number; -} - -interface HttpState { - serverCalls: HttpCall[]; - serverDropped?: number; - requests?: SsrRequest[]; - pages: HttpPage[]; - rules: HttpRule[]; - ssrOverrides?: SsrOverride[]; -} - -interface RuleDraft { - pattern: string; - method: string; - target: HttpRule['target']; - status: string; - delayMs: string; - body: string; - chance: string; -} - -const EMPTY_DRAFT: RuleDraft = { - pattern: '', - method: '', - target: 'both', - status: '', - delayMs: '', - body: '', - chance: '', -}; - -/** A new fault rule id, unique enough for one rule list. */ -function newRuleId(): string { - return `r${Date.now().toString(36)}${Math.random().toString(36).slice(2, 6)}`; -} - -/** The chance field as a whole percent, null when it is not one from 1 to 99, undefined when empty. */ -function chanceOf(text: string): number | null | undefined { - if (!text.trim()) return undefined; - const chance = Number(text); - return Number.isInteger(chance) && chance >= 1 && chance <= 99 ? chance : null; -} - -function pathOf(url: string): string { - try { - const parsed = new URL(url, 'http://x'); - return parsed.pathname + parsed.search; - } catch { - return url; - } -} - -const REDACTED_IN_URL = /\[redacted\]|%5Bredacted%5D/gi; - -/** - * A rule pattern for a recorded call: its path and query, without the origin, so it - * matches the relative client URL and the absolute SSR URL. A relative URL stays as - * recorded, since `api/x` never contains `/api/x`. A redacted value becomes `*`, - * because the real request carries the secret. - */ -function mockPattern(url: string): string { - const absolute = /^([a-z][a-z\d+.-]*:|\/\/)/i.test(url); - return (absolute ? pathOf(url) : url).replace(REDACTED_IN_URL, '*'); -} - -/** The preview as a mock body, when it is complete JSON (the rule form takes JSON only). */ -function jsonBody(preview: string): string | null { - const pretty = prettyJson(preview); - if (pretty !== null) return pretty; - try { - JSON.parse(preview); - return preview.trim(); - } catch { - return null; - } -} - -const STANDARD_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE']; - -/** - * The path of a page, as an SSR override pattern. The query is left out because the panel only - * has a redacted copy of it, which would not match the real request. - */ -function pagePath(url: string): string { - try { - return new URL(url, 'http://x').pathname; - } catch { - return ''; - } -} +import { + mocksOnServer, + type HttpCall, + type OverrideDraft, + type PayloadEntry, + type RuleDraft, +} from './network/http-model'; +import { HydrationStats } from './network/hydration-stats'; +import { NetworkState } from './network/network-state'; +import { OverrideState } from './network/override-state'; +import { RuleState } from './network/rule-state'; +import { SsrOverrides } from './network/ssr-overrides'; +import { SsrRequests } from './network/ssr-requests'; +import { TransferPayload } from './network/transfer-payload'; /** - * The page path as a prefilled override pattern. Patterns match anywhere in the URL, so the site - * root (`/`) would match every page; it is left empty for the user to fill in. + * The Network page: the toolbar, and one section per part of the `http` shared state. The + * sections live in `./network/` and share the page's {@link NetworkState}, {@link RuleState} and + * {@link OverrideState}; the page keeps the members its tests and the shell read on itself. */ -function pagePattern(url: string): string { - const path = pagePath(url); - return path === '/' ? '' : path; -} - -/** A part the server masked in a payload key, plain or URL-encoded. */ -const REDACTED_PART = /\[redacted\]|%5Bredacted%5D/i; - -/** The longest TransferState key `set-ssr-overrides` keeps (see `sanitizeSsrOverrides`). */ -const MAX_OVERRIDE_KEY = 200; -const MAX_RULES = 50; -const MAX_PATTERN = 500; -const MAX_BODY = 100_000; - -const HTTP_STATUS_OPTIONS: SelectOption[] = [ - { value: '', label: 'None' }, - ...HTTP_RULE_STATUSES.map(([status, reason]) => ({ - value: String(status), - label: `${status} ${reason}`, - })), -]; - @Component({ selector: 'app-network-inspector', imports: [ AppState, - LiveControls, - SortHeader, - SearchField, - CallCopy, - CallOriginTag, + CallTimeline, + FaultRules, HarExport, - JsonPipe, - HttpHeadersView, HttpLint, - LimitNote, - NetworkWaterfall, - PayloadInsights, - RedactionCount, - RovingList, - RuleMatchCount, - RulePresets, + HydrationStats, Select, + SsrOverrides, + SsrRequests, + TransferPayload, ], + providers: [NetworkState, RuleState, OverrideState], template: `

HttpClient calls made while rendering on the server and in the browser, from the live page and @@ -396,488 +87,8 @@ const HTTP_STATUS_OPTIONS: SelectOption[] = [

-
-

SSR requests ({{ requests().length }})

- @if (requests().length) { -
- - - - - - - - - - - - - @for (req of requests(); track req.id) { - - - - - - - - - } - -
RequestStatusRender modeRenderServer callsNotes
- - - {{ req.status }} - {{ renderModeLabel(req.renderMode) }}{{ req.renderMs }} ms{{ req.fetches }} ({{ req.fetchMs }} ms) -
- @if (req.id === selected()?.ssrRequestId) { - this page - } - @if (req.overrides?.length) { - overridden - } - @if (req.aborted) { - aborted - } -
-
-
- @if (selectedRequest(); as req) { -
-

- {{ req.method }} {{ req.url }} -

-
-
-
Request id
-
- {{ req.id }} -
-
-
-
Render
-
{{ req.renderMs }} ms
-
-
-
Total
-
{{ req.durationMs }} ms
-
-
-
Sent
-
{{ req.bytes }} B
-
-
-
Browser page
-
{{ requestPage()?.title || requestPage()?.url || 'not connected' }}
-
-
- @if (compressedWith(req); as encoding) { -

- The body was already compressed ({{ encoding }}) when - ssrMiddleware saw it, so the render mode can't be read and - TransferState edits can't apply. Mount ssrMiddleware after - compression(). -

- } - @if (req.overrides?.length) { -

Overrides from the panel

-

- This response was changed on purpose, so it is not what the app sends on its own. -

- @for (o of req.overrides; track o.id + o.kind) { -

- {{ overrideLabel(o.kind) }} - {{ o.applied ? 'applied' : 'not applied' }} - @if (o.note) { - {{ o.note }} - } -

- } - } - @if (req.navigations?.length) { -

Router during the render

- @for (n of req.navigations; track $index) { - - @if (n.reason) { -

{{ n.reason }}

- } - } - } -

Server calls ({{ requestCalls().length }})

- @for (c of requestCalls(); track c.id) { -

- {{ c.method }} - {{ c.url }} - {{ statusLabel(c) }} - {{ c.durationMs }} ms - @if (c.cacheStored) { - cached - } @else if (c.cacheSkip) { - not cached - } -

- @if (!c.cacheStored && c.cacheSkip) { -

Not cached: {{ skipText(c.cacheSkip) }}.

- } - } @empty { -

The render made no HttpClient calls.

- } - @if (refetched().length) { -

Fetched again in the browser ({{ refetched().length }})

-

- These calls ran on the server and again after hydration instead of reading the - transfer cache. -

- @for (c of refetched(); track c.id) { -

- {{ c.method }} - {{ c.url }} - cache miss -

- @if (refetchReason(c); as why) { -

Why: {{ why }}.

- } - } - } @else if (requestPage() && requestCalls().length) { -

No server call ran again in the browser.

- } -
- } - } @else { -
-

No SSR requests traced.

-

- Add app.use(devtools.ssrMiddleware) before the Angular handler in - server.ts, or wrap a web-standard handler with - withPangularSsr(), then load a server rendered page. -

-
- } -
- -
-

HTTP timeline ({{ timeline().length }})

- -
- - - -
- - -
- {{ countText() }} - {{ filterStatus() }} -
-
- -
- @if (visibleCalls().length && timelineView() === 'waterfall') { - - } @else if (visibleCalls().length) { - @if (callWindow.enabled()) { -

- Rows render as you scroll, so the browser's find only sees the ones near view; the - search field searches them all. -

- } -
- - - - - - - - - - - - - - @if (callWindow.padTop()) { - - - - } - @for (shown of shownCalls(); track shown.entry.side + shown.entry.id) { - @let entry = shown.entry; - - - - - - - - - - } - @if (callWindow.padBottom()) { - - - - } - -
SideMethodURLPageStatusTimeNotes
- {{ - entry.side === 'server' ? 'SSR' : 'Client' - }} - {{ entry.method }} - - - {{ entry.pageUrl ?? '' }} - - {{ statusLabel(entry) }} - {{ entry.durationMs }} ms -
- @if (entry.nativeFetch) { - fetch() - } - @if (entry.origin) { - - } - @if (entry.cacheHit) { - transfer cache - } - @if (entry.delayMs) { - delayed {{ entry.delayMs }} ms - } - @if (entry.mocked) { - mocked - } - @if (entry.faulted) { - faulted - } - @if (rulePatternOf(entry); as pattern) { - rule {{ pattern }} - } -
-
-
- } @else if (timeline().length) { -
-

No requests match.

-

- @if (callQuery().trim()) { - Nothing matches “{{ callQuery().trim() }}” with these filters. - } @else { - None of the {{ timeline().length }} requests fit these filters. - } -

-
- -
-
- } @else { -
-

No requests yet.

-

- Add withPangular() to provideHttpClient, then load a page of - the app. -

-
- } - @if (selectedCall(); as detail) { -
-
-

Response preview

-
- @if (!detail.error && detail.preview) { - - } - - @if (!detail.nativeFetch) { - - } - -
-
-

- {{ detail.method }} - {{ statusLabel(detail) }} - {{ detail.url }} -

- @if (detail.nativeFetch) { -

- Made with fetch() directly, which skips the HttpClient interceptor, so - a fault rule cannot mock it. -

- } - @if (rulePatternOf(detail); as pattern) { -

- Matched rule {{ pattern }} -

- } - - -
{{ detail.error ?? previewText(detail) ?? '(no body)' }}
- -
- } -
- +
+

HTTP lint

- -
-

Fault injection

- @if (!canWrite()) { -

{{ writesOff }}

- } - -
- - -
-
- Method - -
-
- Apply on - -
-
-
-
- Status - -
- -
- - -

{{ bodyError() }}

- @if (draftMocksOnServer()) { -

- SSR mocks are not transferred to the client: the browser requests the URL again and - gets the real response unless the rule also applies on the client. -

- } -

{{ draftHint() }}

-
- -
- - -

- Rules ({{ rules().length }}) -

-
    - @for (rule of rules(); track rule.id) { -
  • - - - - {{ targetLabel(rule.target) }} - @if (rule.status === undefined) { - passthrough - } @else if (rule.status === 0) { - network error - } @else { - {{ rule.status }} - } - @if (rule.delayMs) { - {{ rule.delayMs }} ms - } - @if (rule.body) { - mock body - } - @if (rule.chance) { - {{ rule.chance }}% of requests - } - - @if (mocksOnServer(rule)) { -

    - The SSR mock is not written to TransferState, so the browser requests this URL - again. -

    - } -
  • - } @empty { -
  • No rules. SSR rules apply on the next page load.
  • - } -
-
- -
-

SSR overrides

-

- Development only. These change what the server sends for matching pages, from the next - full page load, and the request is marked overridden. -

-
-
- Override - -
- - @switch (overrideDraft().kind) { - @case ('render-error') { -

- Throws while the server renders, so it needs providePangularHttp() and - a page the engine renders. Prerendered files served as static files skip it. -

- - } - @case ('state-edit') { - - -

{{ overrideValueError() }}

- @if (overrideFromPayload(); as from) { -

- Filled in from the TransferState payload. The value starts empty because the panel - only shows a redacted copy, so type the JSON the server should send. - @if (from === 'http') { - For a cached HTTP response this is the whole cache record, not only the response - body. - } -

- } - } - @case ('client-render') { -

- Serves index.csr.html instead of rendering. Needs - browserDistFolder in initPangularHub(). -

- } - } -
- -
-
- -

- Overrides ({{ overrides().length }}) -

-
    - @for (o of overrides(); track o.id) { -
  • - - - - @if (o.message) { - {{ o.message }} - } - @if (o.key) { - {{ o.value === undefined ? 'remove' : 'set' }} {{ o.key }} - } - -
  • - } @empty { -
  • No overrides.
  • - } -
-
- -
-

Hydration

- @if (selected()?.hydration; as h) { -
-
-
Enabled
-
- {{ - h.enabled ? 'yes' : 'no (client render only)' - }} -
-
-
-
Hydrated components
-
{{ h.hydratedComponents ?? 'n/a' }}
-
-
-
Hydrated nodes
-
{{ h.hydratedNodes ?? 'n/a' }}
-
-
-
Skipped components
-
{{ h.componentsSkippedHydration ?? 'n/a' }}
-
-
-
App stable after
-
{{ h.stableMs === undefined ? 'n/a' : h.stableMs + ' ms' }}
-
-
-
Incremental defer blocks
-
{{ h.deferBlocksWithIncrementalHydration ?? 'n/a' }}
-
- @if (h.nodes; as n) { -
-
DOM nodes hydrated
-
{{ n.hydrated }}
-
-
-
DOM nodes skipped
-
{{ n.skipped }}
-
-
-
Mismatched components
-
{{ n.mismatched }}
-
- } -
- @if (h.mismatches?.length) { -

Mismatches ({{ h.mismatches!.length }})

-
    - @for (m of h.mismatches; track $index) { -
  • - {{ m.isClass ? m.component : '<' + m.component + '>' }} - @if (m.expected) { - Expected - {{ m.expected }} - } - @if (m.actual) { - Actual {{ m.actual }} - } -
  • - } -
- } - @if (h.skipHydrationHosts.length) { -

ngSkipHydration hosts

-
    - @for (host of h.skipHydrationHosts; track $index) { -
  • - {{ host }} -
  • - } -
- } - @if (h.warningsCaptured === false) { -

Warnings

-

- Not captured: add providePangularHttp() to the app providers. -

- } @else { -

Warnings ({{ h.warnings.length }})

- @for (warning of h.warnings; track $index) { -
{{ warning }}
- } @empty { -

No hydration warnings.

- } - } - } @else { -
-

No hydration data for this page.

-

Open a server rendered page of the app to see its stats.

-
- } -
- -
-

TransferState payload

- @if (selected(); as page) { -
- - - Renders this URL again on the server, with this tab's cookies, and shows the payload - it sends now. The tab does not reload. - -
- } - @if (selectedPayload(); as payload) { - @if (!payload.found) { -
-

No TransferState script: this page was not server rendered.

-
- } @else { -

- {{ payload.entries.length }} entr{{ payload.entries.length === 1 ? 'y' : 'ies' }}, - {{ payload.size }} bytes - @if (payload.refetchedAt) { - Refetched - } -

- @if (payload.error) { - - } - - -
- @for (entry of payload.entries; track entry.key) { -
- - - @if (payloadLabel(entry); as label) { - {{ label }} - } - @if (entry.http; as http) { - HTTP {{ http.status }} - {{ http.url ?? entry.key }} - } @else { - {{ entry.key }} - } - {{ entry.size }} B - -
- Key - {{ entry.key }} -
- - @if (canEditEntry(entry)) { - - } -
-
- -
{{
-                    entry.value | json
-                  }}
-
- } -
- } - } @else { -
-

Open a page of the app to see its payload.

-
- } -
+
+
+
+
`, styles: ` @use 'mixins' as m; + @use 'network' as net; .page-intro { margin: 0 0 12px; @@ -1509,17 +187,6 @@ const HTTP_STATUS_OPTIONS: SelectOption[] = [ width: 280px; max-width: 420px; } - .field-group { - display: grid; - gap: 6px; - min-width: 0; - color: var(--text-2); - font-size: 12px; - font-weight: 500; - } - .field-group app-select { - width: 100%; - } .message { flex: 1 1 200px; min-width: 0; @@ -1545,1598 +212,138 @@ const HTTP_STATUS_OPTIONS: SelectOption[] = [ .wide { grid-column: 1 / -1; } - h2 { - @include m.label; - margin: 0 0 16px; - } - h3 { - margin: 16px 0 8px; - color: var(--text-strong); - font-size: 12px; - font-weight: 600; - } - p { - margin: 0; - } - label { - display: grid; - gap: 6px; - color: var(--text-2); - font-size: 12px; - font-weight: 500; - } - label.inline { - display: flex; - align-items: center; - gap: 8px; - min-width: 0; - color: var(--text); - cursor: pointer; - } - .hint { - color: var(--text-3); - font-weight: 400; - } - input, - select, - textarea, - button { - font: inherit; - color: var(--text); - } - input:not([type='checkbox']), - select, - textarea { - width: 100%; - min-width: 0; - padding: 0 10px; - border: 1px solid var(--control-border); - border-radius: var(--radius-sm); - background-color: var(--bg); - transition: - border-color 0.2s var(--ease), - box-shadow 0.2s var(--ease); - } - input:not([type='checkbox']), - select { - height: 34px; - } - select { - padding-right: 36px; - } - textarea { - padding: 8px 10px; - font-family: var(--font-mono); - font-size: 12px; - } - input::placeholder, - textarea::placeholder { - color: var(--text-3); - } - input:not([type='checkbox']):hover, - select:hover, - textarea:hover { - border-color: color-mix(in srgb, var(--control-border) 60%, var(--text-3)); - } - input:not([type='checkbox']):focus-visible, - select:focus-visible, - textarea:focus-visible { - @include m.field-focus; - } - textarea[aria-invalid='true'] { - border-color: color-mix(in srgb, var(--danger) 60%, transparent); - } - input[type='checkbox'] { - flex: none; - width: 16px; - height: 16px; - margin: 0; - accent-color: var(--accent); - cursor: pointer; - } - button { - display: inline-flex; - align-items: center; - justify-content: center; - height: 34px; - padding: 0 14px; - border: 1px solid var(--control-border); - border-radius: var(--radius-sm); - background: var(--surface-2); - font-weight: 500; - white-space: nowrap; - cursor: pointer; - transition: - background-color 0.2s var(--ease), - border-color 0.2s var(--ease), - color 0.2s var(--ease), - transform 0.1s var(--ease); - } - button:hover:not(:disabled) { - border-color: var(--accent-line); - background: var(--surface-3); - } - button:active:not(:disabled) { - transform: translateY(1px); - } - button[type='submit'] { - border-color: var(--accent); - background: var(--accent); - color: var(--accent-ink); - font-weight: 600; - } - button[type='submit']:hover:not(:disabled) { - border-color: var(--accent-hover); - background: var(--accent-hover); - } - button:disabled { - opacity: 0.5; - cursor: not-allowed; - } - button.ghost { - height: 28px; - padding: 0 10px; - border-color: transparent; - background: none; - color: var(--text-2); - font-size: 12px; - } - button.ghost:hover:not(:disabled) { - border-color: var(--border-strong); - background: var(--surface-2); - color: var(--text); - } - button.link { - display: inline; - height: auto; - padding: 0; - border: none; - border-radius: 4px; - background: none; - color: var(--text); - text-align: left; - } - button.link:hover:not(:disabled) { - border: none; - background: none; - color: var(--accent); - } - button.link:active:not(:disabled) { - transform: none; - } - :focus-visible { - @include m.focus-ring; - } - .muted { - color: var(--text-2); - } - .small { - font-size: 12px; - } - .bad { - color: var(--danger); - } - .empty { - display: grid; - gap: 4px; - padding: 24px 16px; - border: 1px dashed var(--border-strong); - border-radius: var(--radius-sm); - color: var(--text); - text-align: center; - line-height: 1.5; - } - .empty-actions { - display: flex; - justify-content: center; - margin-top: 8px; - } - .filters { - display: flex; - flex-wrap: wrap; - align-items: center; - gap: 8px 12px; - margin: 0 0 12px; - } - .live-row { - display: flex; - flex-wrap: wrap; - align-items: center; - gap: 8px 12px; - margin: -4px 0 12px; - } - .search { - position: relative; - flex: 1 1 220px; - 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; - } - .search:focus-within .search-icon { - stroke: var(--accent); - } - .filters input[type='search'] { - height: var(--control-h); - padding-left: 34px; - } - .filters .side-filter { - flex: 0 0 140px; - } - .failed-toggle { - flex: none; - height: var(--control-h); - font-size: 13px; - font-weight: 500; - } - .total { - flex: none; - color: var(--text-2); - font-size: 12px; - white-space: nowrap; - font-variant-numeric: tabular-nums; - } - /* "0 of 0" says nothing before the first call; the empty state below explains it. */ - .filters.no-calls .total { - display: none; - } - .table-wrap { - max-height: min(420px, 60vh); - overflow: auto; - margin: 0 -16px; - padding: 0 16px; - } - .table-wrap :focus-visible { - @include m.focus-ring(-2px); - } - thead th { - position: sticky; - top: 0; - z-index: 1; - background: var(--surface); - } - table { - width: 100%; - min-width: 560px; - border-collapse: collapse; - font-variant-numeric: tabular-nums; - } - th, - td { - height: 36px; - padding: 6px 12px; - border-bottom: 1px solid var(--border); - text-align: left; - vertical-align: middle; - white-space: nowrap; - } - th:first-child, - td:first-child { - padding-left: 8px; - } - th { - @include m.label; - height: 32px; - border-bottom-color: var(--border-strong); - } - .num { - text-align: right; - } - td.num { - color: var(--text-2); - } - tbody tr { - cursor: pointer; - } - tbody tr.spacer td { - padding: 0; - border: 0; - } - .window-note { - margin: 0 0 6px; - } - tbody td { - transition: background-color 0.15s var(--ease); - } - tbody tr:hover td { - background: var(--surface-2); - } - tr.selected td, - tr.selected:hover td { - background: var(--accent-soft); - } - tr.selected td:first-child { - box-shadow: inset 2px 0 0 var(--accent); - } - .method { - font-family: var(--font-mono); - font-size: 12px; - font-weight: 600; - color: var(--text-strong); - } - td.url { - width: 100%; - max-width: 0; - font-family: var(--font-mono); - font-size: 12px; - } - td.url button.link { - display: block; - max-width: 100%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - tr.selected td.url button.link { - color: var(--text-strong); - } - td.page-url { - max-width: 160px; - overflow: hidden; - color: var(--text-2); - font-family: var(--font-mono); - font-size: 12px; - text-overflow: ellipsis; - white-space: nowrap; - } - .rule-note { - grid-column: 1 / -1; - margin: 0; - padding-left: 24px; - color: var(--text-2); - font-size: 12px; - } - .mismatches li { - display: grid; - gap: 4px; - padding: 8px 12px; - border: 1px solid var(--border); - border-radius: var(--radius-sm); - background: var(--surface-2); - } - .mismatch-row { - display: flex; - gap: 8px; - min-width: 0; - font-size: 12px; - } - .mismatch-row code { - min-width: 0; - overflow-wrap: anywhere; - } - .mismatch-label { - flex: none; - width: 64px; - color: var(--text-2); - } - .status { - font-family: var(--font-mono); - font-size: 12px; - font-weight: 600; - color: var(--text-2); - } - .status.ok { - color: var(--ok); - } - .status.bad { - color: var(--danger); - } - .dot { - display: inline-block; - width: 6px; - height: 6px; - margin-right: 6px; - border-radius: 50%; - background: currentColor; - vertical-align: middle; - } - .notes { - display: flex; - gap: 4px; - } - .tag { - display: inline-flex; - align-items: center; - height: 20px; - padding: 0 8px; - border: 1px solid var(--border-strong); - border-radius: 99px; - background: var(--surface-3); - color: var(--text-2); - font-size: 11px; - font-weight: 600; - white-space: nowrap; - } - .tag.server { - @include m.tint(accent); - } - .tag.fault { - @include m.tint(danger); - } - .tag.mock { - @include m.tint(accent); - } - .tag.rule-ref { - gap: 4px; - max-width: 220px; - } - .tag.rule-ref code { - @include m.truncate; - font-family: var(--font-mono); - } - .tag.on { - @include m.tint(ok); - } - .tag.off-tag { - @include m.tint(warn); - } - pre { - margin: 0; - padding: 10px 12px; - max-height: 240px; - overflow: auto; - border: 1px solid var(--border); - border-radius: var(--radius-sm); - background: var(--bg); - color: var(--text-2); - font: 12px/1.5 var(--font-mono); - white-space: pre-wrap; - overflow-wrap: anywhere; - } - pre + pre { - margin-top: 8px; - } - pre.warn { - border-color: color-mix(in srgb, var(--warn) 30%, transparent); - color: var(--warn); - } - pre.error { - border-color: color-mix(in srgb, var(--danger) 30%, transparent); - color: var(--danger); - } - .view-toggle { - display: inline-flex; - border: 1px solid var(--control-border); - border-radius: var(--radius-sm); - overflow: hidden; - } - .view-toggle button { - height: calc(var(--control-h) - 2px); - padding: 0 10px; - border: 0; - border-radius: 0; - background: transparent; - color: var(--text-2); - } - .view-toggle button + button { - border-left: 1px solid var(--border-strong); - } - .view-toggle button[aria-pressed='true'] { - background: var(--accent-soft); - color: var(--text-strong); - } - .view-toggle button:focus-visible { - @include m.focus-ring(-2px); - } - .preview { - @include m.enter(0.2s); - margin-top: 16px; - } - .preview-head { - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: space-between; - gap: 4px 8px; - margin-bottom: 4px; - } - .preview-actions { - display: flex; - flex-wrap: wrap; - gap: 4px; - } - pre.preview-body { - max-height: 320px; - } - .preview-head h3 { - margin: 0; - } - .preview-meta { - display: flex; - align-items: baseline; - gap: 8px; - min-width: 0; - margin-bottom: 8px; - } - .request-call { - display: flex; - align-items: baseline; - gap: 8px; - min-width: 0; - margin: 0 0 4px; - } - .request-call .preview-url { - flex: 1 1 auto; - } - .skip-reason { - margin: 0 0 8px; - } - .nav-stats { - margin-bottom: 8px; - } - .preview-rule { - margin-bottom: 8px; - color: var(--text-2); - font-size: 12px; - } - .preview-url { - min-width: 0; - overflow: hidden; - color: var(--text-2); - font-family: var(--font-mono); - font-size: 12px; - text-overflow: ellipsis; - white-space: nowrap; - } - .rule-form { - display: grid; - gap: 12px; - } - .row { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 12px; - } - @media (max-width: 420px) { - .row { - grid-template-columns: minmax(0, 1fr); - } - } - .field-error { - margin-top: -4px; - color: var(--danger); - font-size: 12px; - } - .field-error:empty { - display: none; - } - .form-actions { - display: flex; - } - .rules-heading { - margin-top: 24px; - } - .rules, - .plain { - display: grid; - gap: 8px; - margin: 0; - padding: 0; - list-style: none; - } - .rules li { - display: grid; - grid-template-columns: minmax(0, 1fr) auto; - align-items: center; - gap: 4px 12px; - padding: 8px 12px; - border: 1px solid var(--border); - border-radius: var(--radius-sm); - background: var(--surface-2); - transition: - border-color 0.2s var(--ease), - opacity 0.2s var(--ease); - } - .rules li:hover { - border-color: var(--border-strong); - } - .rules li.off .rule-pattern { - color: var(--text-2); - text-decoration: line-through; - } - .rules li.off .rule-method, - .rules li.off .rule-meta, - .rules li.off .rule-meta .status { - color: var(--text-3); - } - .rules li.empty-rule { - display: block; - padding: 16px 12px; - border-style: dashed; - border-color: var(--border-strong); - background: none; - color: var(--text-2); - text-align: center; - } - .rule-pattern { - min-width: 0; - overflow: hidden; - color: var(--text-strong); - text-overflow: ellipsis; - white-space: nowrap; - } - .rule-method { - color: var(--accent); - font-weight: 600; - } - .rule-meta { - display: flex; - flex-wrap: wrap; - grid-column: 1 / -1; - gap: 4px 8px; - padding-left: 24px; - color: var(--text-2); - font-size: 12px; - font-variant-numeric: tabular-nums; - } - .rule-meta > span + span::before { - content: '·'; - margin-right: 8px; - color: var(--text-3); - } - .rule-meta .status { - font-size: 11px; - } - .rules button.remove { - padding: 2px 4px; - color: var(--text-2); - font-size: 12px; - } - .rules button.remove:hover:not(:disabled) { - color: var(--danger); - } - .plain li { - overflow-wrap: anywhere; - } - code { - font-family: var(--font-mono); - font-size: 12px; - } - .stats { - display: grid; - margin: 0; - } - .stats > div { - display: flex; - align-items: center; - justify-content: space-between; - gap: 16px; - min-height: 36px; - padding: 6px 0; - border-bottom: 1px solid var(--border); - } - .stats > div:last-child { - border-bottom: none; - } - dt { - color: var(--text-2); - } - dd { - margin: 0; - color: var(--text-strong); - font-weight: 600; - font-variant-numeric: tabular-nums; - text-align: right; - } - .ok-note { - color: var(--text-2); - } - .summary-line { - margin-bottom: 8px; - font-variant-numeric: tabular-nums; - } - .payload-tools { - display: flex; - flex-wrap: wrap; - align-items: center; - gap: 8px 12px; - margin-bottom: 12px; - } - .payload-tools .muted { - flex: 1 1 240px; - min-width: 0; - } - .entries { - border-top: 1px solid var(--border); - } - details { - border-bottom: 1px solid var(--border); - } - details pre { - margin: 0 0 12px; - } - summary { - display: flex; - align-items: center; - gap: 8px; - min-height: 36px; - padding: 6px 4px; - border-radius: 4px; - list-style: none; - cursor: pointer; - transition: background-color 0.15s var(--ease); - } - summary::-webkit-details-marker { - display: none; - } - summary:hover { - background: var(--surface-2); - } - .chevron { - flex: none; - width: 6px; - height: 6px; - margin: 0 4px; - border-right: 1.5px solid var(--text-3); - border-bottom: 1.5px solid var(--text-3); - transform: rotate(-45deg); - transition: transform 0.15s var(--ease); - } - details[open] .chevron { - transform: rotate(45deg); - } - .entry-key { - flex: 1 1 auto; - min-width: 0; - overflow: hidden; - font-family: var(--font-mono); - font-size: 12px; - text-overflow: ellipsis; - white-space: nowrap; - } - summary:hover .entry-key { - color: var(--accent); - } - .entry-key-row { - display: flex; - flex-wrap: wrap; - align-items: center; - gap: 4px 8px; - min-width: 0; - margin: 0 0 8px; - padding: 0 4px; - } - .entry-key-label { - @include m.label; - flex: none; - } - .entry-key-text { - flex: 1 1 200px; - min-width: 0; - color: var(--text-strong); - overflow-wrap: anywhere; - user-select: text; - } - .entry-actions { - display: flex; - flex-wrap: wrap; - gap: 4px; - } - .entry-size { - flex: none; - color: var(--text-2); - font-size: 12px; - font-variant-numeric: tabular-nums; - } - @media (max-width: 760px) { - .grid { - grid-template-columns: minmax(0, 1fr); - } - .toolbar .page-picker { - flex: 1 1 100%; - } - .toolbar app-select { - flex: 1 1 auto; - width: auto; - max-width: none; - } - .message { - text-align: left; - } + @include net.controls; + @media (max-width: 760px) { + .grid { + grid-template-columns: minmax(0, 1fr); + } + .toolbar .page-picker { + flex: 1 1 100%; + } + .toolbar app-select { + flex: 1 1 auto; + width: auto; + max-width: none; + } + .message { + text-align: left; + } } `, }) export class NetworkInspector { readonly rpc = input(null); - readonly canWrite = computed(() => actionAllowed(this.rpc(), 'http')); - protected readonly writesOff = actionBlockedMessage('http'); - - readonly loading = signal(false); - readonly failed = signal(false); - readonly serverCalls = signal([]); - readonly pages = signal([]); - readonly payloads = signal>({}); - readonly serverDropped = signal(0); - readonly requests = signal([]); - readonly rules = signal([]); - /** True while an added rule or override is being saved, so Add can't send it twice. */ - readonly addingRule = signal(false); - readonly addingOverride = signal(false); - private ruleSaves = Promise.resolve(true); - private overrideSaves = Promise.resolve(true); - readonly overrides = signal([]); - readonly overrideDraft = signal({ ...EMPTY_OVERRIDE }); - /** Set when the draft came from a TransferState entry, so the form can explain the empty value. */ - readonly overrideFromPayload = signal<'http' | 'other' | null>(null); - readonly overrideKindOptions: SelectOption[] = [ - { value: 'render-error', label: 'Render error' }, - { value: 'client-render', label: 'Force Client render' }, - { value: 'state-edit', label: 'Edit TransferState entry' }, - ]; - - readonly overrideValueError = computed(() => { - const value = this.overrideDraft().value.trim(); - if (!value) return ''; - try { - JSON.parse(value); - return ''; - } catch { - return 'The value must be valid JSON.'; - } - }); - - readonly overrideReady = computed(() => { - const d = this.overrideDraft(); - if (!d.pattern.trim() || this.overrides().length >= 20) return false; - if (d.kind === 'state-edit') return !!d.key.trim() && !this.overrideValueError(); - return true; - }); - private readonly hostPageId = hostPageId(); - readonly selectedPageId = linkedSignal({ - source: () => this.pages(), - computation: (pages, previous) => - previous?.value && pages.some((p) => p.pageId === previous.value) - ? previous.value - : (pages.find((p) => p.pageId === this.hostPageId)?.pageId ?? pages[0]?.pageId ?? null), - }); - readonly selectedCallId = signal(null); - readonly draft = signal({ ...EMPTY_DRAFT }); - readonly message = signal(''); - readonly refetching = signal(false); - readonly bodyPlaceholder = '{ "error": "Service unavailable" }'; - readonly statusOptions = HTTP_STATUS_OPTIONS; - private unsubscribe: (() => void)[] = []; - private readonly destroyRef = inject(DestroyRef); - private readonly injector = inject(Injector); - private readonly host = inject>(ElementRef); - - readonly selected = computed( - () => this.pages().find((p) => p.pageId === this.selectedPageId()) ?? null, - ); - - private readonly pageRequestId = computed(() => this.selected()?.ssrRequestId ?? null); - readonly selectedRequestId = linkedSignal(() => this.pageRequestId()); - - readonly selectedPayload = computed(() => { - const pageId = this.selectedPageId(); - return pageId ? (this.payloads()[pageId] ?? null) : null; - }); - - readonly maxCalls = computed(() => panelConfig(this.rpc()).limits.httpCalls); - - readonly droppedCalls = computed(() => (this.selected()?.dropped ?? 0) + this.serverDropped()); - - readonly pageServerCalls = computed(() => { - const initialUrl = this.selected()?.initialUrl; - if (!initialUrl) return this.serverCalls(); - return this.serverCalls().filter((c) => !c.pageUrl || c.pageUrl === initialUrl); - }); - - /** The server calls of the SSR request that served the selected page, for the HTTP lint. */ - readonly renderServerCalls = computed(() => { - const id = this.pageRequestId(); - return id ? this.serverCalls().filter((c) => c.requestId === id) : []; - }); - - /** Every call of the selected page as it arrives, newest first. */ - private readonly liveTimeline = computed(() => - [...this.pageServerCalls(), ...(this.selected()?.calls ?? [])].sort((a, b) => b.at - a.at), - ); - /** Pause holds the timeline as it is while the app keeps calling. */ - readonly callFeed = new LiveFeed({ - name: 'network', - source: this.liveTimeline, - key: (c) => `${c.side}:${c.id}`, - scope: this.selectedPageId, - }); - readonly timeline = computed(() => [...this.callFeed.items()]); - /** The column the call table is sorted by; `null` keeps newest first. */ - readonly callSort = signal(null); - - readonly callQuery = signal(''); - /** The timeline as a table of every call, or a waterfall of the client calls by navigation. */ - readonly timelineView = signal<'table' | 'waterfall'>('table'); - readonly waterfallCalls = computed(() => this.visibleCalls().filter((c) => c.side === 'client')); - readonly sideFilter = signal('all'); - readonly failedOnly = signal(false); - readonly sideOptions: SelectOption[] = [ - { value: 'all', label: 'All sides' }, - { value: 'server', label: 'SSR' }, - { value: 'client', label: 'Client' }, - ]; - - /** A long call list renders only the rows near view in its scroll box. */ - readonly callWindow = new VirtualWindow({ - count: computed(() => this.visibleCalls().length), - estimate: 37, - }); - readonly shownCalls = computed(() => { - const { start, end } = this.callWindow.range(); - return this.visibleCalls() - .slice(start, end) - .map((entry, i) => ({ entry, index: start + i })); - }); - private readonly callsBody = viewChild>('callsBody'); - - readonly visibleCalls = computed(() => { - const query = this.callQuery().trim().toLowerCase(); - const side = this.sideFilter() ?? 'all'; - const failedOnly = this.failedOnly(); - const matching = this.timeline().filter( - (c) => - (side === 'all' || c.side === side) && - (!failedOnly || this.isFailed(c)) && - (!query || - `${c.method} ${c.url}`.toLowerCase().includes(query) || - `${c.method} ${pathOf(c.url)}`.toLowerCase().includes(query)), - ); - return sortRows(matching, this.callSort(), { - method: (c) => c.method, - url: (c) => c.url, - status: (c) => (c.cancelled || !c.status ? undefined : c.status), - time: (c) => c.durationMs, - }) as HttpCall[]; - }); - - /** - * The count, announced only when a filter changes. The visible count also changes with every - * call the app makes, which would make a screen reader talk while the user uses the app. - */ - /** What the view shows out of every call: the waterfall shows only client calls. */ - readonly countText = computed(() => { - const total = this.timeline().length; - if (this.timelineView() !== 'waterfall') return `${this.visibleCalls().length} of ${total}`; - const client = this.waterfallCalls().length; - return `${client} client ${client === 1 ? 'call' : 'calls'} of ${total}`; - }); - readonly filterStatus = computed(() => { - this.callQuery(); - this.sideFilter(); - this.failedOnly(); - this.timelineView(); - // A filter change that keeps the same counts still gets announced: the text flips a - // trailing no-break space so the live region sees a change. - this.filterFlip = !this.filterFlip; - const text = untracked(() => this.countText()); - return this.filterFlip ? `${text}\u00a0` : text; - }); - private filterFlip = true; - - /** Follows the visible rows, so the preview hides while filters hide its call. */ - readonly selectedCall = computed( - () => this.visibleCalls().find((c) => c.id === this.selectedCallId()) ?? null, - ); - - /** The SSR request that served the selected page, for the HAR export. */ - readonly pageSsrRequest = computed( - () => this.requests().find((r) => r.id === this.pageRequestId()) ?? null, - ); - - readonly selectedRequest = computed( - () => this.requests().find((r) => r.id === this.selectedRequestId()) ?? null, - ); - - readonly requestCalls = computed(() => { - const id = this.selectedRequest()?.id; - return id ? this.serverCalls().filter((c) => c.requestId === id) : []; - }); - - readonly requestPage = computed(() => { - const id = this.selectedRequest()?.id; - return id ? (this.pages().find((p) => p.ssrRequestId === id) ?? null) : null; - }); - - readonly refetched = computed(() => { - const request = this.selectedRequest(); - const page = this.requestPage(); - if (!request || !page) return []; - const fetched = new Set( - this.requestCalls() - .filter((c) => c.status) - .map((c) => `${c.method} ${pathOf(c.url)}`), - ); - return page.calls.filter( - (c) => - c.side === 'client' && - // The page's own fetch() never goes through the transfer cache, so it is no cache miss. - !c.nativeFetch && - !c.cacheHit && - !c.mocked && - c.at >= request.at && - fetched.has(`${c.method} ${pathOf(c.url)}`), - ); - }); - - readonly draftMocksOnServer = computed(() => { - const rule = this.draftRule(); - return !!rule && this.mocksOnServer(rule); - }); - - readonly draftRule = computed | null>(() => { - const draft = this.draft(); - const pattern = draft.pattern.trim(); - if (!pattern || pattern.length > MAX_PATTERN || this.bodyError()) return null; - if (this.rules().length >= MAX_RULES) return null; - const body = draft.body.trim(); - const delayMs = Math.min(Math.max(Math.round(Number(draft.delayMs)) || 0, 0), 10_000); - const status = draft.status.trim() ? Number(draft.status) : body ? 200 : undefined; - if (status !== undefined && !isHttpRuleStatus(status)) return null; - if (status === undefined && !delayMs) return null; - const chance = chanceOf(draft.chance); - if (chance === null) return null; - return { - pattern, - enabled: true, - target: draft.target, - ...(draft.method ? { method: draft.method } : {}), - ...(status !== undefined ? { status } : {}), - ...(delayMs ? { delayMs } : {}), - ...(body ? { body } : {}), - ...(chance !== undefined ? { chance } : {}), - }; - }); - - readonly draftHint = computed(() => { - const draft = this.draft(); - if (this.rules().length >= MAX_RULES) { - return `You can add up to ${MAX_RULES} rules. Remove one to add another.`; - } - if (!draft.pattern.trim()) return 'Enter a URL pattern to add a rule.'; - if (draft.pattern.trim().length > MAX_PATTERN) - return `The URL pattern is limited to ${MAX_PATTERN} characters.`; - if (this.bodyError()) return ''; - if (draft.status.trim() && !isHttpRuleStatus(Number(draft.status))) - return 'Pick a status from the list.'; - if (chanceOf(draft.chance) === null) return 'Chance is a whole percent from 1 to 99.'; - if (!this.draftRule()) return 'Set a status, a delay or a mock body.'; - if (!draft.status.trim() && draft.body.trim()) - return 'With no status, the mock body returns 200.'; - return ''; - }); - - readonly bodyError = computed(() => { - const body = this.draft().body.trim(); - if (!body) return ''; - if (body.length > MAX_BODY) return `The mock body is limited to ${MAX_BODY} characters.`; - try { - JSON.parse(body); - return ''; - } catch { - return 'The mock body must be valid JSON.'; - } - }); + private readonly state = inject(NetworkState); + private readonly ruleState = inject(RuleState); + private readonly overrideState = inject(OverrideState); + + readonly canWrite = this.state.canWrite; + readonly loading = this.state.loading; + readonly failed = this.state.failed; + readonly serverCalls = this.state.serverCalls; + readonly pages = this.state.pages; + readonly payloads = this.state.payloads; + readonly requests = this.state.requests; + readonly rules = this.state.rules; + readonly overrides = this.state.overrides; + readonly message = this.state.message; + readonly selected = this.state.selected; + readonly selectedCallId = this.state.selectedCallId; + readonly selectedCall = this.state.selectedCall; + readonly selectedRequestId = this.state.selectedRequestId; + readonly refetched = this.state.refetched; + readonly timeline = this.state.timeline; + readonly sideFilter = this.state.sideFilter; + readonly failedOnly = this.state.failedOnly; + readonly pageOptions = this.state.pageOptions; + readonly pageSsrRequest = this.state.pageSsrRequest; + readonly renderServerCalls = this.state.renderServerCalls; + + readonly draft = this.ruleState.draft; + readonly draftRule = this.ruleState.draftRule; + readonly methodOptions = this.ruleState.methodOptions; + + readonly overrideDraft = this.overrideState.overrideDraft; + readonly overrideFromPayload = this.overrideState.overrideFromPayload; + readonly overrideReady = this.overrideState.overrideReady; + readonly overrideValueError = this.overrideState.overrideValueError; + + readonly mocksOnServer = mocksOnServer; constructor() { + this.state.connect(this.rpc); rememberSelection('network', this.selectedCallId); - // Newest first, so following the newest call keeps the table scrolled to the top. - followNewest(this.callFeed, () => { - if (this.callSort()) return; - // The SSR requests table comes first and has a .table-wrap too. - const wrap = this.callsBody()?.nativeElement.closest('.table-wrap'); - if (wrap) wrap.scrollTop = 0; - }); - effect(() => { - const body = this.callsBody()?.nativeElement; - if (body) this.callWindow.attach(body); - }); effect(() => { const client = this.rpc(); - if (client) this.load(client); + if (client) void this.state.load(client); }); - this.destroyRef.onDestroy(() => this.stopListening()); - } - - async load(client: DevframeRpcClient) { - this.loading.set(true); - this.failed.set(false); - try { - const rpc = client.scope('pangular').rpc; - const [state, payloads] = await Promise.all([ - rpc.sharedState('http'), - rpc.sharedState('http-payloads'), - ]); - if (this.destroyRef.destroyed) return; - const apply = (value: unknown) => { - const snapshot = value as HttpState | undefined; - this.serverCalls.set(snapshot?.serverCalls ?? []); - this.serverDropped.set(snapshot?.serverDropped ?? 0); - this.requests.set([...(snapshot?.requests ?? [])].reverse()); - this.pages.set(snapshot?.pages ?? []); - this.rules.set(snapshot?.rules ?? []); - this.overrides.set(snapshot?.ssrOverrides ?? []); - }; - const applyPayloads = (value: unknown) => - this.payloads.set( - (value as { pages?: Record } | undefined)?.pages ?? {}, - ); - apply(state.value()); - applyPayloads(payloads.value()); - this.stopListening(); - this.unsubscribe = [state.on('updated', apply), payloads.on('updated', applyPayloads)]; - } catch { - this.failed.set(true); - } finally { - this.loading.set(false); - } } retry() { - const client = this.rpc(); - if (client) void this.load(client); + this.state.retry(); } - /** A guard that returns a UrlTree reports shouldActivate false, so a redirect is not a rejection. */ - guardVerdict(nav: SsrNavigation): 'redirected' | 'rejected' | '' { - if (nav.guards?.passed !== false) return ''; - return nav.outcome === 'redirected' ? 'redirected' : 'rejected'; - } - - msLabel(ms: number | undefined): string { - return ms === undefined ? 'n/a' : `${ms} ms`; - } - - skipText(skip: CacheSkip): string { - return CACHE_SKIP_TEXT[skip] ?? ''; - } - - refetchReason(call: HttpCall): string { - const key = `${call.method} ${pathOf(call.url)}`; - const matches = this.requestCalls().filter((c) => `${c.method} ${pathOf(c.url)}` === key); - const first = matches[0]; - // Several matching server calls with different outcomes can't be paired, so name no reason. - return first?.cacheSkip && matches.every((c) => c.cacheSkip === first.cacheSkip) - ? this.skipText(first.cacheSkip) - : ''; - } - - /** The response encoding when a compression middleware ran before `ssrMiddleware` saw the body. */ - compressedWith(req: SsrRequest): string | undefined { - // The final Content-Encoding is also set when compression runs after ssrMiddleware, as it should. - if (!req.compressedBeforeTrace) return undefined; - return req.headers['content-encoding'] ?? 'unknown encoding'; - } - - renderModeLabel(mode: SsrRequest['renderMode']): string { - return RENDER_MODE_LABEL[mode] ?? 'Unknown'; - } - - statusLabel(call: HttpCall): string { - if (call.cancelled) return 'cancelled'; - return call.status ? String(call.status) : 'ERR'; - } - - callTone(call: HttpCall): 'ok' | 'redirect' | 'bad' | 'neutral' { - return call.cancelled ? 'neutral' : this.statusTone(call.status); - } - - /** A failed call has a status of 400 or more, no status (ERR) or was cancelled. */ - isFailed(call: HttpCall): boolean { - return !!call.cancelled || !call.status || call.status >= 400; - } - - clearCallFilters() { - this.callQuery.set(''); - this.sideFilter.set('all'); - this.failedOnly.set(false); - this.host.nativeElement.querySelector('#timeline-search')?.focus(); - } - - rulePatternOf(call: HttpCall): string | null { - if (call.rulePattern) return call.rulePattern; - if (!call.ruleId) return null; - return this.rules().find((rule) => rule.id === call.ruleId)?.pattern ?? null; - } - - openCall(id: string) { - this.selectedCallId.set(id); - afterNextRender( - () => this.host.nativeElement.querySelector('#preview-heading')?.focus(), - { injector: this.injector }, - ); - } - - /** The preview as shown: JSON indented by 2 spaces, other text as recorded (both already redacted). */ - previewText(call: HttpCall): string | undefined { - if (call.preview === undefined) return undefined; - return prettyJson(call.preview) ?? call.preview; - } - - async copyPreview(call: HttpCall) { - const text = this.previewText(call); - if (!text) return; - try { - await navigator.clipboard.writeText(text); - this.message.set('Copied.'); - } catch { - this.message.set('The clipboard is not available here.'); - } - } - - /** Fills the fault rule form from a recorded call and moves focus to it. Nothing is saved. */ - mockCall(call: HttpCall) { - const method = call.method.toUpperCase(); - const pattern = mockPattern(call.url); - const body = call.error || !call.preview ? null : jsonBody(call.preview); - this.draft.set({ ...EMPTY_DRAFT, pattern, method, body: body ?? '' }); - const what = `${method} ${pattern}`; - this.message.set( - body - ? `Filled in a rule for ${what} with the preview as its body. Check it, then add the rule.` - : call.preview && !call.error - ? `Filled in a rule for ${what}. The preview is not complete JSON, so it is not used as the body.` - : `Filled in a rule for ${what}. Set a status, a delay or a body, then add the rule.`, - ); - afterNextRender( - () => this.host.nativeElement.querySelector('#rule-pattern')?.focus(), - { injector: this.injector }, - ); - } - - closePreview() { - const id = this.selectedCallId(); - this.selectedCallId.set(null); - if (!id) return; - const buttons = this.host.nativeElement.querySelectorAll('button[data-call-id]'); - [...buttons].find((button) => button.dataset['callId'] === id)?.focus(); - } - - private stopListening() { - for (const stop of this.unsubscribe.splice(0)) stop(); - } - - statusTone(status: number | undefined): 'ok' | 'redirect' | 'bad' | 'neutral' { - if (status === undefined) return 'neutral'; - if (status === 0 || status >= 400) return 'bad'; - if (status >= 300) return 'redirect'; - if (status >= 200) return 'ok'; - return 'neutral'; - } - - mocksOnServer(rule: Pick): boolean { - return ( - rule.target !== 'client' && rule.status !== undefined && rule.status > 0 && rule.status < 400 - ); - } - - payloadLabel(entry: PayloadEntry): string | null { - if (entry.source === 'hydration') return 'hydration annotations'; - if (entry.fn) return `Analog server function ${entry.fn.name ?? entry.fn.id}`; - if (entry.source === 'analog') return 'Analog'; - return null; - } - - targetLabel(target: HttpRule['target']): string { - return target === 'both' ? 'SSR + client' : target === 'server' ? 'SSR only' : 'Client only'; - } - - readonly pageOptions = computed(() => - this.pages().map((page) => ({ value: page.pageId, label: page.title || page.url })), - ); - - /** The usual methods, plus the draft's own when "Mock this request" filled in another one. */ - readonly methodOptions = computed(() => { - const draft = this.draft().method; - const methods = - draft && !STANDARD_METHODS.includes(draft) ? [...STANDARD_METHODS, draft] : STANDARD_METHODS; - return [{ value: '', label: 'Any' }, ...methods.map((m) => ({ value: m, label: m }))]; - }); - - readonly targetOptions: SelectOption[] = [ - { value: 'both', label: 'SSR + client' }, - { value: 'server', label: 'SSR only' }, - { value: 'client', label: 'Client only' }, - ]; - selectPage(pageId: string | null) { - if (pageId) this.selectedPageId.set(pageId); + if (pageId) this.state.selectedPageId.set(pageId); this.selectedCallId.set(null); this.overrideFromPayload.set(null); } - setDraft(key: K, value: RuleDraft[K]) { - this.draft.update((draft) => ({ ...draft, [key]: value })); + openCall(id: string) { + this.state.openCall(id); } - patch(key: keyof RuleDraft, event: Event) { - const value = (event.target as HTMLInputElement).value; - this.draft.update((draft) => ({ ...draft, [key]: value })); + clearCalls() { + return this.state.clearCalls(); } - async addRule(event: Event) { - event.preventDefault(); - const draft = this.draftRule(); - if (!draft || this.addingRule()) return; - const rule: HttpRule = { id: newRuleId(), ...draft }; - this.addingRule.set(true); - const added = await this.saveRules((rules) => [[...rules, rule], rule], 'Rule added.'); - this.addingRule.set(false); - if (added) { - this.draft.set({ ...EMPTY_DRAFT }); - this.host.nativeElement.querySelector('#rule-pattern')?.focus(); - } + copyPreview(call: HttpCall) { + return this.state.copyPreview(call); } - /** Adds the rules of a built-in preset after the current ones. */ - async addPreset(id: string) { - const added = presetRules(id, newRuleId); - if (!added.length) return; - if (this.rules().length + added.length > MAX_RULES) { - this.message.set(`You can add up to ${MAX_RULES} rules. Remove one to add the preset.`); - return; - } - await this.saveRules( - (rules) => [[...rules, ...added], added[0]], - `Added ${added.length === 1 ? 'a rule' : `${added.length} rules`} for every browser request.`, - ); + copyKey(key: string) { + return this.state.copyKey(key); } - toggleRule(id: string) { - void this.saveRules((rules) => { - const rule = rules.find((r) => r.id === id); - if (!rule) return null; - return [rules.map((r) => (r.id === id ? { ...r, enabled: !r.enabled } : r)), rule]; - }, 'Rule updated.'); + setDraft(key: K, value: RuleDraft[K]) { + this.ruleState.setDraft(key, value); } - async removeRule(id: string) { - let index = -1; - const removed = await this.saveRules((rules) => { - index = rules.findIndex((r) => r.id === id); - return index < 0 ? null : [rules.filter((r) => r.id !== id), rules[index]]; - }, 'Rule removed.'); - if (removed) this.focusAfterRemove('[data-remove-rule]', index, '#rule-list-heading'); + addRule(event: Event) { + return this.ruleState.addRule(event); } - async clearCalls() { - try { - await call(this.rpc(), 'clear-http-calls'); - // A paused feed holds the old calls, so show the cleared list. - this.callFeed.resume(); - this.selectedCallId.set(null); - this.message.set('Timeline cleared.'); - } catch { - this.message.set('Could not clear the timeline.'); - } + toggleRule(id: string) { + this.ruleState.toggleRule(id); } - overrideLabel(kind: SsrOverrideKind): string { - return OVERRIDE_LABEL[kind] ?? kind; + removeRule(id: string) { + return this.ruleState.removeRule(id); } setOverrideDraft(key: K, value: OverrideDraft[K]) { - this.overrideDraft.update((d) => ({ ...d, [key]: value })); - // The "filled in from the payload" note only describes the entry the form was filled from. - if (key === 'kind' && value !== 'state-edit') this.overrideFromPayload.set(null); + this.overrideState.setOverrideDraft(key, value); } - patchOverride(key: keyof OverrideDraft, event: Event) { - const value = (event.target as HTMLInputElement).value; - this.overrideDraft.update((d) => ({ ...d, [key]: value })); - if (key === 'key') this.overrideFromPayload.set(null); - } - - async copyKey(key: string) { - try { - await navigator.clipboard.writeText(key); - this.message.set('Copied.'); - } catch { - this.message.set('The clipboard is not available here.'); - } - } - - /** - * The edit needs HTTP writes and a key the server keeps exactly: it trims keys and drops longer - * ones than it accepts. A key with a redacted part can never match the real one. - */ canEditEntry(entry: PayloadEntry): boolean { - const { key } = entry; - return ( - this.canWrite() && - !!key && - key === key.trim() && - key.length <= MAX_OVERRIDE_KEY && - !REDACTED_PART.test(key) - ); + return this.overrideState.canEditEntry(entry); } - /** - * Opens the SSR overrides form as a TransferState edit for this entry. The value stays empty: - * the payload the panel holds is redacted and clipped, so copying it would write masks back. - */ - editEntry(entry: PayloadEntry) { - if (!this.canEditEntry(entry)) return; - const page = this.selected(); - this.overrideDraft.set({ - ...EMPTY_OVERRIDE, - kind: 'state-edit', - pattern: page ? pagePattern(page.initialUrl ?? page.url) : '', - key: entry.key, - }); - this.overrideFromPayload.set(entry.http ? 'http' : 'other'); - this.message.set('Editing the TransferState entry in SSR overrides.'); - afterNextRender( - () => { - const host = this.host.nativeElement; - const target = host.querySelector( - this.overrideDraft().pattern ? '#override-value' : '#override-pattern', - ); - target?.scrollIntoView?.({ block: 'center' }); - target?.focus(); - }, - { injector: this.injector }, - ); - } - - async addOverride(event: Event) { - event.preventDefault(); - if (!this.overrideReady() || this.addingOverride()) return; - const d = this.overrideDraft(); - const next: SsrOverride = { - id: `o${Date.now().toString(36)}${Math.random().toString(36).slice(2, 6)}`, - kind: d.kind, - pattern: d.pattern.trim(), - enabled: true, - ...(d.kind === 'render-error' && d.message.trim() ? { message: d.message.trim() } : {}), - ...(d.kind === 'state-edit' ? { key: d.key.trim() } : {}), - ...(d.kind === 'state-edit' && d.value.trim() ? { value: d.value.trim() } : {}), - }; - this.addingOverride.set(true); - const added = await this.saveOverrides( - (overrides) => [...overrides, next], - 'Override added. Reload the page.', - ); - this.addingOverride.set(false); - if (added) { - this.overrideDraft.set({ ...EMPTY_OVERRIDE, kind: d.kind }); - this.overrideFromPayload.set(null); - this.host.nativeElement.querySelector('#override-pattern')?.focus(); - } + addOverride(event: Event) { + return this.overrideState.addOverride(event); } toggleOverride(id: string) { - void this.saveOverrides( - (overrides) => - overrides.some((o) => o.id === id) - ? overrides.map((o) => (o.id === id ? { ...o, enabled: !o.enabled } : o)) - : null, - 'Override updated. Reload the page.', - ); - } - - async removeOverride(id: string) { - let index = -1; - const removed = await this.saveOverrides((overrides) => { - index = overrides.findIndex((o) => o.id === id); - return index < 0 ? null : overrides.filter((o) => o.id !== id); - }, 'Override removed.'); - if (removed) { - this.focusAfterRemove('[data-remove-override]', index, '#override-list-heading'); - } + this.overrideState.toggleOverride(id); } - /** - * The removed row's button is gone, so focus moves to the Remove button that took its place, - * the one before it when the last row went, or the list heading when the list is empty. - */ - private focusAfterRemove(buttons: string, index: number, heading: string) { - afterNextRender( - () => { - const host = this.host.nativeElement; - const remaining = host.querySelectorAll(buttons); - const next = remaining[Math.min(index, remaining.length - 1)]; - (next ?? host.querySelector(heading))?.focus(); - }, - { injector: this.injector }, - ); - } - - /** Asks the page to render its URL again on the server and push the payload it gets. */ - async refetchPayload(pageId: string) { - if (this.refetching()) return; - this.refetching.set(true); - try { - const result = (await call(this.rpc(), 'request-http-payload-refetch', { pageId })) as - { error?: string; found?: boolean; entries?: number; status?: number } | null | undefined; - if (!result) this.announce('Could not reach the devtools server.'); - else if (result.error) this.announce(result.error); - else if (!result.found) { - this.announce(`The server answered ${result.status} without a TransferState payload.`); - } else { - const count = result.entries ?? 0; - this.announce(`Refetched: ${count} entr${count === 1 ? 'y' : 'ies'}.`); - } - } catch { - this.announce('Could not refetch the payload.'); - } finally { - this.refetching.set(false); - } + removeOverride(id: string) { + return this.overrideState.removeOverride(id); } /** Clears a repeated message first, so the live region speaks again for the same text. */ - private announce(text: string) { - if (this.message() !== text) { - this.message.set(text); - return; - } - this.message.set(''); - // A newer message set before the render wins over this restore. - afterNextRender( - () => { - if (this.message() === '') this.message.set(text); - }, - { injector: this.injector }, - ); - } - - /** - * Saves run one after another, and each change is applied to the list the previous save left, - * so two quick changes never start from the same old list. `change` returns null when its - * override is gone by then. - */ - private saveOverrides( - change: (overrides: SsrOverride[]) => SsrOverride[] | null, - done: string, - ): Promise { - const save = this.overrideSaves.then(async () => { - const next = change(this.overrides()); - if (!next) return false; - try { - const saved = await call(this.rpc(), 'set-ssr-overrides', next); - this.overrides.set(Array.isArray(saved) ? (saved as SsrOverride[]) : next); - this.announce(done); - return true; - } catch { - this.message.set('Could not save the overrides.'); - return false; - } - }); - this.overrideSaves = save; - return save; - } - - /** Like `saveOverrides`; `change` also returns the rule it changed, for the message. */ - private saveRules( - change: (rules: HttpRule[]) => [HttpRule[], HttpRule] | null, - done: string, - ): Promise { - const save = this.ruleSaves.then(async () => { - const next = change(this.rules()); - if (!next) return false; - const [rules, changed] = next; - try { - const saved = await call(this.rpc(), 'set-http-rules', rules); - this.rules.set(Array.isArray(saved) ? (saved as HttpRule[]) : rules); - this.announce( - changed.target === 'client' ? done : `${done} Reload the page to apply it to SSR.`, - ); - return true; - } catch { - this.message.set('Could not save the rules.'); - return false; - } - }); - this.ruleSaves = save; - return save; + protected announce(text: string) { + this.state.announce(text); } } diff --git a/app/src/pages/network/call-timeline.ts b/app/src/pages/network/call-timeline.ts new file mode 100644 index 00000000..927eff6c --- /dev/null +++ b/app/src/pages/network/call-timeline.ts @@ -0,0 +1,389 @@ +import { Component, ElementRef, computed, effect, inject, viewChild } from '@angular/core'; +import { LimitNote } from '../../ui/limit-note'; +import { LiveControls, followNewest } from '../../ui/live-feed'; +import { RovingList } from '../../ui/roving-list'; +import { SearchField } from '../../ui/search-field'; +import { Select } from '../../ui/select'; +import { SortHeader } from '../../ui/sort-header'; +import { VirtualWindow } from '../../ui/virtual-window'; +import { NetworkWaterfall } from '../network-waterfall'; +import { CallOriginTag } from './call-origin'; +import { callTone, statusLabel, type HttpCall } from './http-model'; +import { NetworkState } from './network-state'; +import { ResponsePreview } from './response-preview'; + +/** + * The HTTP timeline of the Network page: filters, the live controls, the call table or the + * waterfall, and the response preview of the selected call. + */ +@Component({ + selector: 'section[appCallTimeline]', + imports: [ + CallOriginTag, + LimitNote, + LiveControls, + NetworkWaterfall, + ResponsePreview, + RovingList, + SearchField, + Select, + SortHeader, + ], + template: ` +

HTTP timeline ({{ timeline().length }})

+ +
+ + + +
+ + +
+ {{ countText() }} + {{ filterStatus() }} +
+
+ +
+ @if (visibleCalls().length && timelineView() === 'waterfall') { + + } @else if (visibleCalls().length) { + @if (callWindow.enabled()) { +

+ Rows render as you scroll, so the browser's find only sees the ones near view; the search + field searches them all. +

+ } +
+ + + + + + + + + + + + + + @if (callWindow.padTop()) { + + + + } + @for (shown of shownCalls(); track shown.entry.side + shown.entry.id) { + @let entry = shown.entry; + + + + + + + + + + } + @if (callWindow.padBottom()) { + + + + } + +
SideMethodURLPageStatusTimeNotes
+ {{ + entry.side === 'server' ? 'SSR' : 'Client' + }} + {{ entry.method }} + + + {{ entry.pageUrl ?? '' }} + + {{ statusLabel(entry) }} + {{ entry.durationMs }} ms +
+ @if (entry.nativeFetch) { + fetch() + } + @if (entry.origin) { + + } + @if (entry.cacheHit) { + transfer cache + } + @if (entry.delayMs) { + delayed {{ entry.delayMs }} ms + } + @if (entry.mocked) { + mocked + } + @if (entry.faulted) { + faulted + } + @if (rulePatternOf(entry); as pattern) { + rule {{ pattern }} + } +
+
+
+ } @else if (timeline().length) { +
+

No requests match.

+

+ @if (callQuery().trim()) { + Nothing matches “{{ callQuery().trim() }}” with these filters. + } @else { + None of the {{ timeline().length }} requests fit these filters. + } +

+
+ +
+
+ } @else { +
+

No requests yet.

+

+ Add withPangular() to provideHttpClient, then load a page of the + app. +

+
+ } + @if (selectedCall(); as detail) { +
+ } + `, + styles: ` + @use 'mixins' as m; + @use 'network' as net; + + @include net.controls; + .filters { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px 12px; + margin: 0 0 12px; + } + .live-row { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px 12px; + margin: -4px 0 12px; + } + .search { + position: relative; + flex: 1 1 220px; + 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; + } + .search:focus-within .search-icon { + stroke: var(--accent); + } + .filters input[type='search'] { + height: var(--control-h); + padding-left: 34px; + } + .filters .side-filter { + flex: 0 0 140px; + } + .failed-toggle { + flex: none; + height: var(--control-h); + font-size: 13px; + font-weight: 500; + } + .total { + flex: none; + color: var(--text-2); + font-size: 12px; + white-space: nowrap; + font-variant-numeric: tabular-nums; + } + /* "0 of 0" says nothing before the first call; the empty state below explains it. */ + .filters.no-calls .total { + display: none; + } + @include net.table; + @include net.status; + .view-toggle { + display: inline-flex; + border: 1px solid var(--control-border); + border-radius: var(--radius-sm); + overflow: hidden; + } + .view-toggle button { + height: calc(var(--control-h) - 2px); + padding: 0 10px; + border: 0; + border-radius: 0; + background: transparent; + color: var(--text-2); + } + .view-toggle button + button { + border-left: 1px solid var(--border-strong); + } + .view-toggle button[aria-pressed='true'] { + background: var(--accent-soft); + color: var(--text-strong); + } + .view-toggle button:focus-visible { + @include m.focus-ring(-2px); + } + @include net.preview; + `, +}) +export class CallTimeline { + private readonly state = inject(NetworkState); + protected readonly timeline = this.state.timeline; + protected readonly droppedCalls = this.state.droppedCalls; + protected readonly maxCalls = this.state.maxCalls; + protected readonly callFeed = this.state.callFeed; + protected readonly callQuery = this.state.callQuery; + protected readonly callSort = this.state.callSort; + protected readonly sideFilter = this.state.sideFilter; + protected readonly sideOptions = this.state.sideOptions; + protected readonly failedOnly = this.state.failedOnly; + protected readonly timelineView = this.state.timelineView; + protected readonly countText = this.state.countText; + protected readonly filterStatus = this.state.filterStatus; + protected readonly visibleCalls = this.state.visibleCalls; + protected readonly waterfallCalls = this.state.waterfallCalls; + protected readonly selectedCall = this.state.selectedCall; + + protected readonly callTone = callTone; + protected readonly statusLabel = statusLabel; + + /** A long call list renders only the rows near view in its scroll box. */ + protected readonly callWindow = new VirtualWindow({ + count: computed(() => this.visibleCalls().length), + estimate: 37, + }); + protected readonly shownCalls = computed(() => { + const { start, end } = this.callWindow.range(); + return this.visibleCalls() + .slice(start, end) + .map((entry, i) => ({ entry, index: start + i })); + }); + private readonly callsBody = viewChild>('callsBody'); + + constructor() { + // Newest first, so following the newest call keeps the table scrolled to the top. + followNewest(this.callFeed, () => { + if (this.callSort()) return; + // The SSR requests table comes first and has a .table-wrap too. + const wrap = this.callsBody()?.nativeElement.closest('.table-wrap'); + if (wrap) wrap.scrollTop = 0; + }); + effect(() => { + const body = this.callsBody()?.nativeElement; + if (body) this.callWindow.attach(body); + }); + } + + protected rulePatternOf(call: HttpCall): string | null { + return this.state.rulePatternOf(call); + } + + protected openCall(id: string) { + this.state.openCall(id); + } + + protected closePreview() { + this.state.closePreview(); + } + + protected clearCallFilters() { + this.state.clearCallFilters(); + } +} diff --git a/app/src/pages/network/fault-rules.ts b/app/src/pages/network/fault-rules.ts new file mode 100644 index 00000000..daa8801f --- /dev/null +++ b/app/src/pages/network/fault-rules.ts @@ -0,0 +1,262 @@ +import { Component, inject } from '@angular/core'; +import { Select } from '../../ui/select'; +import { + HTTP_STATUS_OPTIONS, + mocksOnServer, + statusTone, + targetLabel, + type HttpRule, + type RuleDraft, +} from './http-model'; +import { NetworkState } from './network-state'; +import { RuleMatchCount } from './rule-match-count'; +import { RulePresets } from './rule-presets'; +import { RuleState } from './rule-state'; +import type { SelectOption } from '../../ui/select'; + +/** The fault injection section of the Network page: presets, the rule form and the rule list. */ +@Component({ + selector: 'section[appFaultRules]', + imports: [RuleMatchCount, RulePresets, Select], + template: ` +

Fault injection

+ @if (!canWrite()) { +

{{ writesOff }}

+ } + +
+ + +
+
+ Method + +
+
+ Apply on + +
+
+
+
+ Status + +
+ +
+ + +

{{ bodyError() }}

+ @if (draftMocksOnServer()) { +

+ SSR mocks are not transferred to the client: the browser requests the URL again and gets + the real response unless the rule also applies on the client. +

+ } +

{{ draftHint() }}

+
+ +
+ + +

Rules ({{ rules().length }})

+
    + @for (rule of rules(); track rule.id) { +
  • + + + + {{ targetLabel(rule.target) }} + @if (rule.status === undefined) { + passthrough + } @else if (rule.status === 0) { + network error + } @else { + {{ rule.status }} + } + @if (rule.delayMs) { + {{ rule.delayMs }} ms + } + @if (rule.body) { + mock body + } + @if (rule.chance) { + {{ rule.chance }}% of requests + } + + @if (mocksOnServer(rule)) { +

    + The SSR mock is not written to TransferState, so the browser requests this URL again. +

    + } +
  • + } @empty { +
  • No rules. SSR rules apply on the next page load.
  • + } +
+ `, + styles: ` + @use 'network' as net; + + @include net.controls; + @include net.status; + @include net.rule-form; + `, +}) +export class FaultRules { + private readonly state = inject(NetworkState); + private readonly ruleState = inject(RuleState); + protected readonly canWrite = this.state.canWrite; + protected readonly writesOff = this.state.writesOff; + protected readonly timeline = this.state.timeline; + protected readonly rules = this.state.rules; + protected readonly draft = this.ruleState.draft; + protected readonly draftRule = this.ruleState.draftRule; + protected readonly draftHint = this.ruleState.draftHint; + protected readonly draftMocksOnServer = this.ruleState.draftMocksOnServer; + protected readonly bodyError = this.ruleState.bodyError; + protected readonly addingRule = this.ruleState.addingRule; + protected readonly methodOptions = this.ruleState.methodOptions; + protected readonly bodyPlaceholder = '{ "error": "Service unavailable" }'; + protected readonly statusOptions = HTTP_STATUS_OPTIONS; + protected readonly targetOptions: SelectOption[] = [ + { value: 'both', label: 'SSR + client' }, + { value: 'server', label: 'SSR only' }, + { value: 'client', label: 'Client only' }, + ]; + + protected readonly mocksOnServer = mocksOnServer; + protected readonly statusTone = statusTone; + protected readonly targetLabel = targetLabel; + + protected setDraft(key: K, value: RuleDraft[K]) { + this.ruleState.setDraft(key, value); + } + + protected patch(key: keyof RuleDraft, event: Event) { + this.ruleState.patch(key, event); + } + + protected addRule(event: Event) { + void this.ruleState.addRule(event); + } + + protected addPreset(id: string) { + void this.ruleState.addPreset(id); + } + + protected toggleRule(id: string) { + this.ruleState.toggleRule(id); + } + + protected removeRule(id: string) { + void this.ruleState.removeRule(id); + } +} diff --git a/app/src/pages/network/http-model.ts b/app/src/pages/network/http-model.ts new file mode 100644 index 00000000..b89282ae --- /dev/null +++ b/app/src/pages/network/http-model.ts @@ -0,0 +1,365 @@ +/** The data the Network page shows, as the `http` shared state sends it, and pure helpers for it. */ +import { + CACHE_SKIP_TEXT, + HTTP_RULE_STATUSES, + type CacheSkip, +} from '@pangular-inspector/devtools/internal/config'; +import { prettyJson } from '../../format'; +import type { SelectOption } from '../../ui/select'; + +export type HttpSide = 'client' | 'server'; + +export interface HttpRule { + id: string; + pattern: string; + method?: string; + enabled: boolean; + target: HttpSide | 'both'; + status?: number; + delayMs?: number; + body?: string; + chance?: number; +} + +export interface HttpCall { + id: string; + url: string; + method: string; + status: number; + durationMs: number; + side: HttpSide; + cacheHit: boolean; + faulted: boolean; + mocked?: boolean; + delayMs?: number; + cancelled?: boolean; + ruleId?: string; + rulePattern?: string; + pageUrl?: string; + requestId?: string; + /** The Angular API that likely started the call, from a stack heuristic. */ + origin?: 'httpResource' | 'resource' | 'defer'; + cacheStored?: boolean; + cacheSkip?: CacheSkip; + at: number; + error?: string; + preview?: string; + requestHeaders?: Record; + responseHeaders?: Record; + /** Made with the page's own `fetch()`, not through `HttpClient`. */ + nativeFetch?: true; +} + +export interface SsrNavigation { + url: string; + finalUrl?: string; + outcome: string; + reason?: string; + durationMs?: number; + guards?: { names: string[]; passed?: boolean; ms?: number }; + resolvers?: { names: string[]; ms?: number }; +} + +export interface SsrRequest { + id: string; + method: string; + url: string; + status: number; + at: number; + durationMs: number; + renderMs: number; + bytes: number; + renderMode: 'server' | 'prerender' | 'client' | 'redirect' | 'not-rendered' | 'unknown'; + fetches: number; + fetchMs: number; + headers: Record; + navigations?: SsrNavigation[]; + overrides?: { id: string; kind: SsrOverrideKind; applied: boolean; note?: string }[]; + compressedBeforeTrace?: boolean; + aborted?: boolean; +} + +export type SsrOverrideKind = 'render-error' | 'client-render' | 'state-edit'; + +export interface SsrOverride { + id: string; + kind: SsrOverrideKind; + pattern: string; + enabled: boolean; + message?: string; + key?: string; + value?: string; +} + +export interface OverrideDraft { + kind: SsrOverrideKind; + pattern: string; + message: string; + key: string; + value: string; +} + +export const EMPTY_OVERRIDE: OverrideDraft = { + kind: 'render-error', + pattern: '', + message: '', + key: '', + value: '', +}; + +export const OVERRIDE_LABEL: Record = { + 'render-error': 'Render error', + 'client-render': 'Client render', + 'state-edit': 'TransferState edit', +}; + +export const RENDER_MODE_LABEL: Record = { + server: 'Server', + prerender: 'Prerender', + client: 'Client', + redirect: 'Redirect', + 'not-rendered': 'Not rendered', + unknown: 'Unknown', +}; + +export interface PayloadEntry { + key: string; + http?: { url?: string; status?: number; statusText?: string; responseType?: string }; + source?: 'http' | 'analog' | 'hydration'; + fn?: { id: string; name?: string; file?: string }; + size: number; + value: unknown; +} + +export interface HydrationMismatch { + component: string; + /** `component` is a class name (`ProductCard`), not a node name (`app-card`). */ + isClass?: boolean; + expected?: string; + actual?: string; +} + +export interface HydrationStats { + enabled: boolean; + hydratedComponents?: number; + hydratedNodes?: number; + componentsSkippedHydration?: number; + deferBlocksWithIncrementalHydration?: number; + nodes?: { hydrated: number; skipped: number; mismatched: number }; + mismatches?: HydrationMismatch[]; + skipHydrationHosts: string[]; + warnings: string[]; + warningsCaptured?: boolean; + stableMs?: number; +} + +export interface HttpPayload { + found: boolean; + size: number; + entries: PayloadEntry[]; + error?: string; + /** Set when the payload came from Refetch, not from the HTML the tab was served with. */ + refetchedAt?: number; +} + +export interface HttpPage { + pageId: string; + url: string; + initialUrl?: string; + title: string; + hydration: HydrationStats | null; + calls: HttpCall[]; + dropped?: number; + ssrRequestId?: string; + firstSeenAt?: number; + reportedAt: number; +} + +export interface HttpState { + serverCalls: HttpCall[]; + serverDropped?: number; + requests?: SsrRequest[]; + pages: HttpPage[]; + rules: HttpRule[]; + ssrOverrides?: SsrOverride[]; +} + +export interface RuleDraft { + pattern: string; + method: string; + target: HttpRule['target']; + status: string; + delayMs: string; + body: string; + chance: string; +} + +export const EMPTY_DRAFT: RuleDraft = { + pattern: '', + method: '', + target: 'both', + status: '', + delayMs: '', + body: '', + chance: '', +}; + +/** A new fault rule id, unique enough for one rule list. */ +export function newRuleId(): string { + return `r${Date.now().toString(36)}${Math.random().toString(36).slice(2, 6)}`; +} + +/** The chance field as a whole percent, null when it is not one from 1 to 99, undefined when empty. */ +export function chanceOf(text: string): number | null | undefined { + if (!text.trim()) return undefined; + const chance = Number(text); + return Number.isInteger(chance) && chance >= 1 && chance <= 99 ? chance : null; +} + +export function pathOf(url: string): string { + try { + const parsed = new URL(url, 'http://x'); + return parsed.pathname + parsed.search; + } catch { + return url; + } +} + +const REDACTED_IN_URL = /\[redacted\]|%5Bredacted%5D/gi; + +/** + * A rule pattern for a recorded call: its path and query, without the origin, so it + * matches the relative client URL and the absolute SSR URL. A relative URL stays as + * recorded, since `api/x` never contains `/api/x`. A redacted value becomes `*`, + * because the real request carries the secret. + */ +export function mockPattern(url: string): string { + const absolute = /^([a-z][a-z\d+.-]*:|\/\/)/i.test(url); + return (absolute ? pathOf(url) : url).replace(REDACTED_IN_URL, '*'); +} + +/** The preview as a mock body, when it is complete JSON (the rule form takes JSON only). */ +export function jsonBody(preview: string): string | null { + const pretty = prettyJson(preview); + if (pretty !== null) return pretty; + try { + JSON.parse(preview); + return preview.trim(); + } catch { + return null; + } +} + +export const STANDARD_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE']; + +/** + * The path of a page, as an SSR override pattern. The query is left out because the panel only + * has a redacted copy of it, which would not match the real request. + */ +function pagePath(url: string): string { + try { + return new URL(url, 'http://x').pathname; + } catch { + return ''; + } +} + +/** + * The page path as a prefilled override pattern. Patterns match anywhere in the URL, so the site + * root (`/`) would match every page; it is left empty for the user to fill in. + */ +export function pagePattern(url: string): string { + const path = pagePath(url); + return path === '/' ? '' : path; +} + +/** A part the server masked in a payload key, plain or URL-encoded. */ +export const REDACTED_PART = /\[redacted\]|%5Bredacted%5D/i; + +/** The longest TransferState key `set-ssr-overrides` keeps (see `sanitizeSsrOverrides`). */ +export const MAX_OVERRIDE_KEY = 200; +export const MAX_RULES = 50; +export const MAX_PATTERN = 500; +export const MAX_BODY = 100_000; + +export const HTTP_STATUS_OPTIONS: SelectOption[] = [ + { value: '', label: 'None' }, + ...HTTP_RULE_STATUSES.map(([status, reason]) => ({ + value: String(status), + label: `${status} ${reason}`, + })), +]; + +export function statusTone(status: number | undefined): 'ok' | 'redirect' | 'bad' | 'neutral' { + if (status === undefined) return 'neutral'; + if (status === 0 || status >= 400) return 'bad'; + if (status >= 300) return 'redirect'; + if (status >= 200) return 'ok'; + return 'neutral'; +} + +export function statusLabel(call: HttpCall): string { + if (call.cancelled) return 'cancelled'; + return call.status ? String(call.status) : 'ERR'; +} + +export function callTone(call: HttpCall): 'ok' | 'redirect' | 'bad' | 'neutral' { + return call.cancelled ? 'neutral' : statusTone(call.status); +} + +/** A failed call has a status of 400 or more, no status (ERR) or was cancelled. */ +export function isFailed(call: HttpCall): boolean { + return !!call.cancelled || !call.status || call.status >= 400; +} + +/** The preview as shown: JSON indented by 2 spaces, other text as recorded (both already redacted). */ +export function previewText(call: HttpCall): string | undefined { + if (call.preview === undefined) return undefined; + return prettyJson(call.preview) ?? call.preview; +} + +export function mocksOnServer(rule: Pick): boolean { + return ( + rule.target !== 'client' && rule.status !== undefined && rule.status > 0 && rule.status < 400 + ); +} + +export function targetLabel(target: HttpRule['target']): string { + return target === 'both' ? 'SSR + client' : target === 'server' ? 'SSR only' : 'Client only'; +} + +export function overrideLabel(kind: SsrOverrideKind): string { + return OVERRIDE_LABEL[kind] ?? kind; +} + +export function renderModeLabel(mode: SsrRequest['renderMode']): string { + return RENDER_MODE_LABEL[mode] ?? 'Unknown'; +} + +export function skipText(skip: CacheSkip): string { + return CACHE_SKIP_TEXT[skip] ?? ''; +} + +export function msLabel(ms: number | undefined): string { + return ms === undefined ? 'n/a' : `${ms} ms`; +} + +/** A guard that returns a UrlTree reports shouldActivate false, so a redirect is not a rejection. */ +export function guardVerdict(nav: SsrNavigation): 'redirected' | 'rejected' | '' { + if (nav.guards?.passed !== false) return ''; + return nav.outcome === 'redirected' ? 'redirected' : 'rejected'; +} + +/** The response encoding when a compression middleware ran before `ssrMiddleware` saw the body. */ +export function compressedWith(req: SsrRequest): string | undefined { + // The final Content-Encoding is also set when compression runs after ssrMiddleware, as it should. + if (!req.compressedBeforeTrace) return undefined; + return req.headers['content-encoding'] ?? 'unknown encoding'; +} + +export function payloadLabel(entry: PayloadEntry): string | null { + if (entry.source === 'hydration') return 'hydration annotations'; + if (entry.fn) return `Analog server function ${entry.fn.name ?? entry.fn.id}`; + if (entry.source === 'analog') return 'Analog'; + return null; +} diff --git a/app/src/pages/network/hydration-stats.ts b/app/src/pages/network/hydration-stats.ts new file mode 100644 index 00000000..243ef7e0 --- /dev/null +++ b/app/src/pages/network/hydration-stats.ts @@ -0,0 +1,148 @@ +import { Component, inject } from '@angular/core'; +import { NetworkState } from './network-state'; + +/** The hydration stats, mismatches and warnings of the page selected on the Network page. */ +@Component({ + selector: 'section[appHydrationStats]', + template: ` +

Hydration

+ @if (selected()?.hydration; as h) { +
+
+
Enabled
+
+ {{ + h.enabled ? 'yes' : 'no (client render only)' + }} +
+
+
+
Hydrated components
+
{{ h.hydratedComponents ?? 'n/a' }}
+
+
+
Hydrated nodes
+
{{ h.hydratedNodes ?? 'n/a' }}
+
+
+
Skipped components
+
{{ h.componentsSkippedHydration ?? 'n/a' }}
+
+
+
App stable after
+
{{ h.stableMs === undefined ? 'n/a' : h.stableMs + ' ms' }}
+
+
+
Incremental defer blocks
+
{{ h.deferBlocksWithIncrementalHydration ?? 'n/a' }}
+
+ @if (h.nodes; as n) { +
+
DOM nodes hydrated
+
{{ n.hydrated }}
+
+
+
DOM nodes skipped
+
{{ n.skipped }}
+
+
+
Mismatched components
+
{{ n.mismatched }}
+
+ } +
+ @if (h.mismatches?.length) { +

Mismatches ({{ h.mismatches!.length }})

+
    + @for (m of h.mismatches; track $index) { +
  • + {{ m.isClass ? m.component : '<' + m.component + '>' }} + @if (m.expected) { + Expected {{ m.expected }} + } + @if (m.actual) { + Actual {{ m.actual }} + } +
  • + } +
+ } + @if (h.skipHydrationHosts.length) { +

ngSkipHydration hosts

+
    + @for (host of h.skipHydrationHosts; track $index) { +
  • + {{ host }} +
  • + } +
+ } + @if (h.warningsCaptured === false) { +

Warnings

+

+ Not captured: add providePangularHttp() to the app providers. +

+ } @else { +

Warnings ({{ h.warnings.length }})

+ @for (warning of h.warnings; track $index) { +
{{ warning }}
+ } @empty { +

No hydration warnings.

+ } + } + } @else { +
+

No hydration data for this page.

+

Open a server rendered page of the app to see its stats.

+
+ } + `, + styles: ` + @use 'network' as net; + + @include net.controls; + .mismatches li { + display: grid; + gap: 4px; + padding: 8px 12px; + border: 1px solid var(--border); + border-radius: var(--radius-sm); + background: var(--surface-2); + } + .mismatch-row { + display: flex; + gap: 8px; + min-width: 0; + font-size: 12px; + } + .mismatch-row code { + min-width: 0; + overflow-wrap: anywhere; + } + .mismatch-label { + flex: none; + width: 64px; + color: var(--text-2); + } + @include net.status; + @include net.pre; + .plain { + display: grid; + gap: 8px; + margin: 0; + padding: 0; + list-style: none; + } + .plain li { + overflow-wrap: anywhere; + } + @include net.stats; + `, +}) +export class HydrationStats { + protected readonly selected = inject(NetworkState).selected; +} diff --git a/app/src/pages/network/network-state.ts b/app/src/pages/network/network-state.ts new file mode 100644 index 00000000..1ce5f40b --- /dev/null +++ b/app/src/pages/network/network-state.ts @@ -0,0 +1,399 @@ +import { + ElementRef, + Injectable, + Injector, + afterNextRender, + computed, + inject, + linkedSignal, + signal, + untracked, + type OnDestroy, + type Signal, +} from '@angular/core'; +import type { DevframeRpcClient } from 'devframe/client'; +import { hostPageId } from '../../page-id'; +import { rpcCall as call } from '../../rpc'; +import { actionAllowed, actionBlockedMessage, panelConfig } from '../../devtools-config'; +import { LiveFeed } from '../../ui/live-feed'; +import { sortRows, type SortState } from '../../ui/sort-header'; +import type { SelectOption } from '../../ui/select'; +import { + isFailed, + pathOf, + previewText, + skipText, + type HttpCall, + type HttpPage, + type HttpPayload, + type HttpRule, + type HttpSide, + type HttpState, + type SsrOverride, + type SsrRequest, +} from './http-model'; + +/** + * The state the Network page and its sections share: the `http` and `http-payloads` shared + * states, the selected page, call and SSR request, the timeline filters and the toolbar message. + * Provided by the page, so every section of one page reads the same signals. + */ +@Injectable() +export class NetworkState implements OnDestroy { + private rpcSource: Signal = signal(null); + readonly rpc = computed(() => this.rpcSource()); + readonly canWrite = computed(() => actionAllowed(this.rpc(), 'http')); + readonly writesOff = actionBlockedMessage('http'); + + readonly loading = signal(false); + readonly failed = signal(false); + readonly serverCalls = signal([]); + readonly pages = signal([]); + readonly payloads = signal>({}); + readonly serverDropped = signal(0); + readonly requests = signal([]); + readonly rules = signal([]); + readonly overrides = signal([]); + readonly message = signal(''); + readonly refetching = signal(false); + + private readonly hostPageId = hostPageId(); + readonly selectedPageId = linkedSignal({ + source: () => this.pages(), + computation: (pages, previous) => + previous?.value && pages.some((p) => p.pageId === previous.value) + ? previous.value + : (pages.find((p) => p.pageId === this.hostPageId)?.pageId ?? pages[0]?.pageId ?? null), + }); + readonly selectedCallId = signal(null); + + private unsubscribe: (() => void)[] = []; + private destroyed = false; + private readonly injector = inject(Injector); + private readonly host = inject>(ElementRef); + + readonly selected = computed( + () => this.pages().find((p) => p.pageId === this.selectedPageId()) ?? null, + ); + + private readonly pageRequestId = computed(() => this.selected()?.ssrRequestId ?? null); + readonly selectedRequestId = linkedSignal(() => this.pageRequestId()); + + readonly selectedPayload = computed(() => { + const pageId = this.selectedPageId(); + return pageId ? (this.payloads()[pageId] ?? null) : null; + }); + + readonly maxCalls = computed(() => panelConfig(this.rpc()).limits.httpCalls); + + readonly droppedCalls = computed(() => (this.selected()?.dropped ?? 0) + this.serverDropped()); + + readonly pageServerCalls = computed(() => { + const initialUrl = this.selected()?.initialUrl; + if (!initialUrl) return this.serverCalls(); + return this.serverCalls().filter((c) => !c.pageUrl || c.pageUrl === initialUrl); + }); + + /** The server calls of the SSR request that served the selected page, for the HTTP lint. */ + readonly renderServerCalls = computed(() => { + const id = this.pageRequestId(); + return id ? this.serverCalls().filter((c) => c.requestId === id) : []; + }); + + /** Every call of the selected page as it arrives, newest first. */ + private readonly liveTimeline = computed(() => + [...this.pageServerCalls(), ...(this.selected()?.calls ?? [])].sort((a, b) => b.at - a.at), + ); + /** Pause holds the timeline as it is while the app keeps calling. */ + readonly callFeed = new LiveFeed({ + name: 'network', + source: this.liveTimeline, + key: (c) => `${c.side}:${c.id}`, + scope: this.selectedPageId, + }); + readonly timeline = computed(() => [...this.callFeed.items()]); + /** The column the call table is sorted by; `null` keeps newest first. */ + readonly callSort = signal(null); + + readonly callQuery = signal(''); + /** The timeline as a table of every call, or a waterfall of the client calls by navigation. */ + readonly timelineView = signal<'table' | 'waterfall'>('table'); + readonly waterfallCalls = computed(() => this.visibleCalls().filter((c) => c.side === 'client')); + readonly sideFilter = signal('all'); + readonly failedOnly = signal(false); + readonly sideOptions: SelectOption[] = [ + { value: 'all', label: 'All sides' }, + { value: 'server', label: 'SSR' }, + { value: 'client', label: 'Client' }, + ]; + + readonly visibleCalls = computed(() => { + const query = this.callQuery().trim().toLowerCase(); + const side = this.sideFilter() ?? 'all'; + const failedOnly = this.failedOnly(); + const matching = this.timeline().filter( + (c) => + (side === 'all' || c.side === side) && + (!failedOnly || isFailed(c)) && + (!query || + `${c.method} ${c.url}`.toLowerCase().includes(query) || + `${c.method} ${pathOf(c.url)}`.toLowerCase().includes(query)), + ); + return sortRows(matching, this.callSort(), { + method: (c) => c.method, + url: (c) => c.url, + status: (c) => (c.cancelled || !c.status ? undefined : c.status), + time: (c) => c.durationMs, + }) as HttpCall[]; + }); + + /** + * The count, announced only when a filter changes. The visible count also changes with every + * call the app makes, which would make a screen reader talk while the user uses the app. + */ + /** What the view shows out of every call: the waterfall shows only client calls. */ + readonly countText = computed(() => { + const total = this.timeline().length; + if (this.timelineView() !== 'waterfall') return `${this.visibleCalls().length} of ${total}`; + const client = this.waterfallCalls().length; + return `${client} client ${client === 1 ? 'call' : 'calls'} of ${total}`; + }); + readonly filterStatus = computed(() => { + this.callQuery(); + this.sideFilter(); + this.failedOnly(); + this.timelineView(); + // A filter change that keeps the same counts still gets announced: the text flips a + // trailing no-break space so the live region sees a change. + this.filterFlip = !this.filterFlip; + const text = untracked(() => this.countText()); + return this.filterFlip ? `${text} ` : text; + }); + private filterFlip = true; + + /** Follows the visible rows, so the preview hides while filters hide its call. */ + readonly selectedCall = computed( + () => this.visibleCalls().find((c) => c.id === this.selectedCallId()) ?? null, + ); + + /** The SSR request that served the selected page, for the HAR export. */ + readonly pageSsrRequest = computed( + () => this.requests().find((r) => r.id === this.pageRequestId()) ?? null, + ); + + readonly selectedRequest = computed( + () => this.requests().find((r) => r.id === this.selectedRequestId()) ?? null, + ); + + readonly requestCalls = computed(() => { + const id = this.selectedRequest()?.id; + return id ? this.serverCalls().filter((c) => c.requestId === id) : []; + }); + + readonly requestPage = computed(() => { + const id = this.selectedRequest()?.id; + return id ? (this.pages().find((p) => p.ssrRequestId === id) ?? null) : null; + }); + + readonly refetched = computed(() => { + const request = this.selectedRequest(); + const page = this.requestPage(); + if (!request || !page) return []; + const fetched = new Set( + this.requestCalls() + .filter((c) => c.status) + .map((c) => `${c.method} ${pathOf(c.url)}`), + ); + return page.calls.filter( + (c) => + c.side === 'client' && + // The page's own fetch() never goes through the transfer cache, so it is no cache miss. + !c.nativeFetch && + !c.cacheHit && + !c.mocked && + c.at >= request.at && + fetched.has(`${c.method} ${pathOf(c.url)}`), + ); + }); + + readonly pageOptions = computed(() => + this.pages().map((page) => ({ value: page.pageId, label: page.title || page.url })), + ); + + /** Reads the RPC client from the page's `rpc` input. Called once, by the page. */ + connect(rpc: Signal) { + this.rpcSource = rpc; + } + + async load(client: DevframeRpcClient) { + this.loading.set(true); + this.failed.set(false); + try { + const rpc = client.scope('pangular').rpc; + const [state, payloads] = await Promise.all([ + rpc.sharedState('http'), + rpc.sharedState('http-payloads'), + ]); + if (this.destroyed) return; + const apply = (value: unknown) => { + const snapshot = value as HttpState | undefined; + this.serverCalls.set(snapshot?.serverCalls ?? []); + this.serverDropped.set(snapshot?.serverDropped ?? 0); + this.requests.set([...(snapshot?.requests ?? [])].reverse()); + this.pages.set(snapshot?.pages ?? []); + this.rules.set(snapshot?.rules ?? []); + this.overrides.set(snapshot?.ssrOverrides ?? []); + }; + const applyPayloads = (value: unknown) => + this.payloads.set( + (value as { pages?: Record } | undefined)?.pages ?? {}, + ); + apply(state.value()); + applyPayloads(payloads.value()); + this.stopListening(); + this.unsubscribe = [state.on('updated', apply), payloads.on('updated', applyPayloads)]; + } catch { + this.failed.set(true); + } finally { + this.loading.set(false); + } + } + + retry() { + const client = this.rpc(); + if (client) void this.load(client); + } + + ngOnDestroy() { + this.destroyed = true; + this.stopListening(); + } + + private stopListening() { + for (const stop of this.unsubscribe.splice(0)) stop(); + } + + refetchReason(call: HttpCall): string { + const key = `${call.method} ${pathOf(call.url)}`; + const matches = this.requestCalls().filter((c) => `${c.method} ${pathOf(c.url)}` === key); + const first = matches[0]; + // Several matching server calls with different outcomes can't be paired, so name no reason. + return first?.cacheSkip && matches.every((c) => c.cacheSkip === first.cacheSkip) + ? skipText(first.cacheSkip) + : ''; + } + + rulePatternOf(call: HttpCall): string | null { + if (call.rulePattern) return call.rulePattern; + if (!call.ruleId) return null; + return this.rules().find((rule) => rule.id === call.ruleId)?.pattern ?? null; + } + + clearCallFilters() { + this.callQuery.set(''); + this.sideFilter.set('all'); + this.failedOnly.set(false); + this.query('#timeline-search')?.focus(); + } + + openCall(id: string) { + this.selectedCallId.set(id); + this.afterRender(() => this.query('#preview-heading')?.focus()); + } + + closePreview() { + const id = this.selectedCallId(); + this.selectedCallId.set(null); + if (!id) return; + const buttons = this.host.nativeElement.querySelectorAll('button[data-call-id]'); + [...buttons].find((button) => button.dataset['callId'] === id)?.focus(); + } + + async copyPreview(call: HttpCall) { + const text = previewText(call); + if (!text) return; + await this.copy(text); + } + + async copyKey(key: string) { + await this.copy(key); + } + + private async copy(text: string) { + try { + await navigator.clipboard.writeText(text); + this.message.set('Copied.'); + } catch { + this.message.set('The clipboard is not available here.'); + } + } + + async clearCalls() { + try { + await call(this.rpc(), 'clear-http-calls'); + // A paused feed holds the old calls, so show the cleared list. + this.callFeed.resume(); + this.selectedCallId.set(null); + this.message.set('Timeline cleared.'); + } catch { + this.message.set('Could not clear the timeline.'); + } + } + + /** Asks the page to render its URL again on the server and push the payload it gets. */ + async refetchPayload(pageId: string) { + if (this.refetching()) return; + this.refetching.set(true); + try { + const result = (await call(this.rpc(), 'request-http-payload-refetch', { pageId })) as + { error?: string; found?: boolean; entries?: number; status?: number } | null | undefined; + if (!result) this.announce('Could not reach the devtools server.'); + else if (result.error) this.announce(result.error); + else if (!result.found) { + this.announce(`The server answered ${result.status} without a TransferState payload.`); + } else { + const count = result.entries ?? 0; + this.announce(`Refetched: ${count} entr${count === 1 ? 'y' : 'ies'}.`); + } + } catch { + this.announce('Could not refetch the payload.'); + } finally { + this.refetching.set(false); + } + } + + /** Clears a repeated message first, so the live region speaks again for the same text. */ + announce(text: string) { + if (this.message() !== text) { + this.message.set(text); + return; + } + this.message.set(''); + // A newer message set before the render wins over this restore. + this.afterRender(() => { + if (this.message() === '') this.message.set(text); + }); + } + + /** The first element of the page that matches `selector`, in any section. */ + query(selector: string): T | null { + return this.host.nativeElement.querySelector(selector); + } + + /** + * The removed row's button is gone, so focus moves to the Remove button that took its place, + * the one before it when the last row went, or the list heading when the list is empty. + */ + focusAfterRemove(buttons: string, index: number, heading: string) { + this.afterRender(() => { + const host = this.host.nativeElement; + const remaining = host.querySelectorAll(buttons); + const next = remaining[Math.min(index, remaining.length - 1)]; + (next ?? host.querySelector(heading))?.focus(); + }); + } + + afterRender(run: () => void) { + afterNextRender(run, { injector: this.injector }); + } +} diff --git a/app/src/pages/network/override-state.ts b/app/src/pages/network/override-state.ts new file mode 100644 index 00000000..3dca25d2 --- /dev/null +++ b/app/src/pages/network/override-state.ts @@ -0,0 +1,174 @@ +import { Injectable, computed, inject, signal } from '@angular/core'; +import { rpcCall as call } from '../../rpc'; +import type { SelectOption } from '../../ui/select'; +import { + EMPTY_OVERRIDE, + MAX_OVERRIDE_KEY, + REDACTED_PART, + pagePattern, + type OverrideDraft, + type PayloadEntry, + type SsrOverride, + type SsrOverrideKind, +} from './http-model'; +import { NetworkState } from './network-state'; + +/** The SSR override form and list: the draft, its checks, and the saves to the server. */ +@Injectable() +export class OverrideState { + private readonly state = inject(NetworkState); + + /** True while an added override is being saved, so Add can't send it twice. */ + readonly addingOverride = signal(false); + private overrideSaves = Promise.resolve(true); + readonly overrideDraft = signal({ ...EMPTY_OVERRIDE }); + /** Set when the draft came from a TransferState entry, so the form can explain the empty value. */ + readonly overrideFromPayload = signal<'http' | 'other' | null>(null); + readonly overrideKindOptions: SelectOption[] = [ + { value: 'render-error', label: 'Render error' }, + { value: 'client-render', label: 'Force Client render' }, + { value: 'state-edit', label: 'Edit TransferState entry' }, + ]; + + readonly overrideValueError = computed(() => { + const value = this.overrideDraft().value.trim(); + if (!value) return ''; + try { + JSON.parse(value); + return ''; + } catch { + return 'The value must be valid JSON.'; + } + }); + + readonly overrideReady = computed(() => { + const d = this.overrideDraft(); + if (!d.pattern.trim() || this.state.overrides().length >= 20) return false; + if (d.kind === 'state-edit') return !!d.key.trim() && !this.overrideValueError(); + return true; + }); + + setOverrideDraft(key: K, value: OverrideDraft[K]) { + this.overrideDraft.update((d) => ({ ...d, [key]: value })); + // The "filled in from the payload" note only describes the entry the form was filled from. + if (key === 'kind' && value !== 'state-edit') this.overrideFromPayload.set(null); + } + + patchOverride(key: keyof OverrideDraft, event: Event) { + const value = (event.target as HTMLInputElement).value; + this.overrideDraft.update((d) => ({ ...d, [key]: value })); + if (key === 'key') this.overrideFromPayload.set(null); + } + + /** + * The edit needs HTTP writes and a key the server keeps exactly: it trims keys and drops longer + * ones than it accepts. A key with a redacted part can never match the real one. + */ + canEditEntry(entry: PayloadEntry): boolean { + const { key } = entry; + return ( + this.state.canWrite() && + !!key && + key === key.trim() && + key.length <= MAX_OVERRIDE_KEY && + !REDACTED_PART.test(key) + ); + } + + /** + * Opens the SSR overrides form as a TransferState edit for this entry. The value stays empty: + * the payload the panel holds is redacted and clipped, so copying it would write masks back. + */ + editEntry(entry: PayloadEntry) { + if (!this.canEditEntry(entry)) return; + const page = this.state.selected(); + this.overrideDraft.set({ + ...EMPTY_OVERRIDE, + kind: 'state-edit', + pattern: page ? pagePattern(page.initialUrl ?? page.url) : '', + key: entry.key, + }); + this.overrideFromPayload.set(entry.http ? 'http' : 'other'); + this.state.message.set('Editing the TransferState entry in SSR overrides.'); + this.state.afterRender(() => { + const target = this.state.query( + this.overrideDraft().pattern ? '#override-value' : '#override-pattern', + ); + target?.scrollIntoView?.({ block: 'center' }); + target?.focus(); + }); + } + + async addOverride(event: Event) { + event.preventDefault(); + if (!this.overrideReady() || this.addingOverride()) return; + const d = this.overrideDraft(); + const next: SsrOverride = { + id: `o${Date.now().toString(36)}${Math.random().toString(36).slice(2, 6)}`, + kind: d.kind, + pattern: d.pattern.trim(), + enabled: true, + ...(d.kind === 'render-error' && d.message.trim() ? { message: d.message.trim() } : {}), + ...(d.kind === 'state-edit' ? { key: d.key.trim() } : {}), + ...(d.kind === 'state-edit' && d.value.trim() ? { value: d.value.trim() } : {}), + }; + this.addingOverride.set(true); + const added = await this.saveOverrides( + (overrides) => [...overrides, next], + 'Override added. Reload the page.', + ); + this.addingOverride.set(false); + if (added) { + this.overrideDraft.set({ ...EMPTY_OVERRIDE, kind: d.kind }); + this.overrideFromPayload.set(null); + this.state.query('#override-pattern')?.focus(); + } + } + + toggleOverride(id: string) { + void this.saveOverrides( + (overrides) => + overrides.some((o) => o.id === id) + ? overrides.map((o) => (o.id === id ? { ...o, enabled: !o.enabled } : o)) + : null, + 'Override updated. Reload the page.', + ); + } + + async removeOverride(id: string) { + let index = -1; + const removed = await this.saveOverrides((overrides) => { + index = overrides.findIndex((o) => o.id === id); + return index < 0 ? null : overrides.filter((o) => o.id !== id); + }, 'Override removed.'); + if (removed) { + this.state.focusAfterRemove('[data-remove-override]', index, '#override-list-heading'); + } + } + + /** + * Saves run one after another, and each change is applied to the list the previous save left, + * so two quick changes never start from the same old list. `change` returns null when its + * override is gone by then. + */ + private saveOverrides( + change: (overrides: SsrOverride[]) => SsrOverride[] | null, + done: string, + ): Promise { + const save = this.overrideSaves.then(async () => { + const next = change(this.state.overrides()); + if (!next) return false; + try { + const saved = await call(this.state.rpc(), 'set-ssr-overrides', next); + this.state.overrides.set(Array.isArray(saved) ? (saved as SsrOverride[]) : next); + this.state.announce(done); + return true; + } catch { + this.state.message.set('Could not save the overrides.'); + return false; + } + }); + this.overrideSaves = save; + return save; + } +} diff --git a/app/src/pages/network/response-preview.ts b/app/src/pages/network/response-preview.ts new file mode 100644 index 00000000..0fec762c --- /dev/null +++ b/app/src/pages/network/response-preview.ts @@ -0,0 +1,120 @@ +import { Component, inject, input } from '@angular/core'; +import { HttpHeadersView } from '../http-headers'; +import { RedactionCount } from '../../ui/redaction-count'; +import { CallCopy } from './call-copy'; +import { callTone, previewText, statusLabel, type HttpCall } from './http-model'; +import { NetworkState } from './network-state'; +import { RuleState } from './rule-state'; + +/** + * The response preview of the selected call in the HTTP timeline. The timeline gives its host the + * region role, the id the URL buttons point at and Escape to close. + */ +@Component({ + selector: 'div[appResponsePreview]', + imports: [CallCopy, HttpHeadersView, RedactionCount], + template: ` + @let detail = call(); +
+

Response preview

+
+ @if (!detail.error && detail.preview) { + + } + + @if (!detail.nativeFetch) { + + } + +
+
+

+ {{ detail.method }} + {{ statusLabel(detail) }} + {{ detail.url }} +

+ @if (detail.nativeFetch) { +

+ Made with fetch() directly, which skips the HttpClient interceptor, so a fault + rule cannot mock it. +

+ } + @if (rulePatternOf(detail); as pattern) { +

+ Matched rule {{ pattern }} +

+ } + + +
{{ detail.error ?? previewText(detail) ?? '(no body)' }}
+ + `, + styles: ` + @use 'network' as net; + + @include net.controls; + @include net.status; + @include net.pre; + @include net.preview; + `, +}) +export class ResponsePreview { + readonly call = input.required(); + + private readonly state = inject(NetworkState); + private readonly ruleState = inject(RuleState); + protected readonly canWrite = this.state.canWrite; + protected readonly message = this.state.message; + + protected readonly callTone = callTone; + protected readonly previewText = previewText; + protected readonly statusLabel = statusLabel; + + protected rulePatternOf(call: HttpCall): string | null { + return this.state.rulePatternOf(call); + } + + protected copyPreview(call: HttpCall) { + void this.state.copyPreview(call); + } + + protected mockCall(call: HttpCall) { + this.ruleState.mockCall(call); + } + + protected closePreview() { + this.state.closePreview(); + } +} diff --git a/app/src/pages/network/rule-state.ts b/app/src/pages/network/rule-state.ts new file mode 100644 index 00000000..a99d0108 --- /dev/null +++ b/app/src/pages/network/rule-state.ts @@ -0,0 +1,199 @@ +import { Injectable, computed, inject, signal } from '@angular/core'; +import { isHttpRuleStatus } from '@pangular-inspector/devtools/internal/config'; +import { presetRules } from '@pangular-inspector/devtools/internal/http-data'; +import { rpcCall as call } from '../../rpc'; +import type { SelectOption } from '../../ui/select'; +import { + EMPTY_DRAFT, + MAX_BODY, + MAX_PATTERN, + MAX_RULES, + STANDARD_METHODS, + chanceOf, + jsonBody, + mockPattern, + mocksOnServer, + newRuleId, + type HttpCall, + type HttpRule, + type RuleDraft, +} from './http-model'; +import { NetworkState } from './network-state'; + +/** The fault rule form and the rule list: the draft, its checks, and the saves to the server. */ +@Injectable() +export class RuleState { + private readonly state = inject(NetworkState); + + readonly draft = signal({ ...EMPTY_DRAFT }); + /** True while an added rule is being saved, so Add can't send it twice. */ + readonly addingRule = signal(false); + private ruleSaves = Promise.resolve(true); + + readonly draftMocksOnServer = computed(() => { + const rule = this.draftRule(); + return !!rule && mocksOnServer(rule); + }); + + readonly draftRule = computed | null>(() => { + const draft = this.draft(); + const pattern = draft.pattern.trim(); + if (!pattern || pattern.length > MAX_PATTERN || this.bodyError()) return null; + if (this.state.rules().length >= MAX_RULES) return null; + const body = draft.body.trim(); + const delayMs = Math.min(Math.max(Math.round(Number(draft.delayMs)) || 0, 0), 10_000); + const status = draft.status.trim() ? Number(draft.status) : body ? 200 : undefined; + if (status !== undefined && !isHttpRuleStatus(status)) return null; + if (status === undefined && !delayMs) return null; + const chance = chanceOf(draft.chance); + if (chance === null) return null; + return { + pattern, + enabled: true, + target: draft.target, + ...(draft.method ? { method: draft.method } : {}), + ...(status !== undefined ? { status } : {}), + ...(delayMs ? { delayMs } : {}), + ...(body ? { body } : {}), + ...(chance !== undefined ? { chance } : {}), + }; + }); + + readonly draftHint = computed(() => { + const draft = this.draft(); + if (this.state.rules().length >= MAX_RULES) { + return `You can add up to ${MAX_RULES} rules. Remove one to add another.`; + } + if (!draft.pattern.trim()) return 'Enter a URL pattern to add a rule.'; + if (draft.pattern.trim().length > MAX_PATTERN) + return `The URL pattern is limited to ${MAX_PATTERN} characters.`; + if (this.bodyError()) return ''; + if (draft.status.trim() && !isHttpRuleStatus(Number(draft.status))) + return 'Pick a status from the list.'; + if (chanceOf(draft.chance) === null) return 'Chance is a whole percent from 1 to 99.'; + if (!this.draftRule()) return 'Set a status, a delay or a mock body.'; + if (!draft.status.trim() && draft.body.trim()) + return 'With no status, the mock body returns 200.'; + return ''; + }); + + readonly bodyError = computed(() => { + const body = this.draft().body.trim(); + if (!body) return ''; + if (body.length > MAX_BODY) return `The mock body is limited to ${MAX_BODY} characters.`; + try { + JSON.parse(body); + return ''; + } catch { + return 'The mock body must be valid JSON.'; + } + }); + + /** The usual methods, plus the draft's own when "Mock this request" filled in another one. */ + readonly methodOptions = computed(() => { + const draft = this.draft().method; + const methods = + draft && !STANDARD_METHODS.includes(draft) ? [...STANDARD_METHODS, draft] : STANDARD_METHODS; + return [{ value: '', label: 'Any' }, ...methods.map((m) => ({ value: m, label: m }))]; + }); + + setDraft(key: K, value: RuleDraft[K]) { + this.draft.update((draft) => ({ ...draft, [key]: value })); + } + + patch(key: keyof RuleDraft, event: Event) { + const value = (event.target as HTMLInputElement).value; + this.draft.update((draft) => ({ ...draft, [key]: value })); + } + + /** Fills the fault rule form from a recorded call and moves focus to it. Nothing is saved. */ + mockCall(call: HttpCall) { + const method = call.method.toUpperCase(); + const pattern = mockPattern(call.url); + const body = call.error || !call.preview ? null : jsonBody(call.preview); + this.draft.set({ ...EMPTY_DRAFT, pattern, method, body: body ?? '' }); + const what = `${method} ${pattern}`; + this.state.message.set( + body + ? `Filled in a rule for ${what} with the preview as its body. Check it, then add the rule.` + : call.preview && !call.error + ? `Filled in a rule for ${what}. The preview is not complete JSON, so it is not used as the body.` + : `Filled in a rule for ${what}. Set a status, a delay or a body, then add the rule.`, + ); + this.state.afterRender(() => this.state.query('#rule-pattern')?.focus()); + } + + async addRule(event: Event) { + event.preventDefault(); + const draft = this.draftRule(); + if (!draft || this.addingRule()) return; + const rule: HttpRule = { id: newRuleId(), ...draft }; + this.addingRule.set(true); + const added = await this.saveRules((rules) => [[...rules, rule], rule], 'Rule added.'); + this.addingRule.set(false); + if (added) { + this.draft.set({ ...EMPTY_DRAFT }); + this.state.query('#rule-pattern')?.focus(); + } + } + + /** Adds the rules of a built-in preset after the current ones. */ + async addPreset(id: string) { + const added = presetRules(id, newRuleId); + if (!added.length) return; + if (this.state.rules().length + added.length > MAX_RULES) { + this.state.message.set(`You can add up to ${MAX_RULES} rules. Remove one to add the preset.`); + return; + } + await this.saveRules( + (rules) => [[...rules, ...added], added[0]], + `Added ${added.length === 1 ? 'a rule' : `${added.length} rules`} for every browser request.`, + ); + } + + toggleRule(id: string) { + void this.saveRules((rules) => { + const rule = rules.find((r) => r.id === id); + if (!rule) return null; + return [rules.map((r) => (r.id === id ? { ...r, enabled: !r.enabled } : r)), rule]; + }, 'Rule updated.'); + } + + async removeRule(id: string) { + let index = -1; + const removed = await this.saveRules((rules) => { + index = rules.findIndex((r) => r.id === id); + return index < 0 ? null : [rules.filter((r) => r.id !== id), rules[index]]; + }, 'Rule removed.'); + if (removed) this.state.focusAfterRemove('[data-remove-rule]', index, '#rule-list-heading'); + } + + /** + * Saves run one after another, and each change is applied to the list the previous save left, + * so two quick changes never start from the same old list. `change` returns null when its + * rule is gone by then, and otherwise also the rule it changed, for the message. + */ + private saveRules( + change: (rules: HttpRule[]) => [HttpRule[], HttpRule] | null, + done: string, + ): Promise { + const save = this.ruleSaves.then(async () => { + const next = change(this.state.rules()); + if (!next) return false; + const [rules, changed] = next; + try { + const saved = await call(this.state.rpc(), 'set-http-rules', rules); + this.state.rules.set(Array.isArray(saved) ? (saved as HttpRule[]) : rules); + this.state.announce( + changed.target === 'client' ? done : `${done} Reload the page to apply it to SSR.`, + ); + return true; + } catch { + this.state.message.set('Could not save the rules.'); + return false; + } + }); + this.ruleSaves = save; + return save; + } +} diff --git a/app/src/pages/network/ssr-overrides.ts b/app/src/pages/network/ssr-overrides.ts new file mode 100644 index 00000000..137f81e6 --- /dev/null +++ b/app/src/pages/network/ssr-overrides.ts @@ -0,0 +1,199 @@ +import { Component, inject } from '@angular/core'; +import { Select } from '../../ui/select'; +import { overrideLabel, type OverrideDraft } from './http-model'; +import { NetworkState } from './network-state'; +import { OverrideState } from './override-state'; + +/** The SSR overrides section of the Network page: the override form and the override list. */ +@Component({ + selector: 'section[appSsrOverrides]', + imports: [Select], + template: ` +

SSR overrides

+

+ Development only. These change what the server sends for matching pages, from the next full + page load, and the request is marked overridden. +

+
+
+ Override + +
+ + @switch (overrideDraft().kind) { + @case ('render-error') { +

+ Throws while the server renders, so it needs providePangularHttp() and a + page the engine renders. Prerendered files served as static files skip it. +

+ + } + @case ('state-edit') { + + +

{{ overrideValueError() }}

+ @if (overrideFromPayload(); as from) { +

+ Filled in from the TransferState payload. The value starts empty because the panel + only shows a redacted copy, so type the JSON the server should send. + @if (from === 'http') { + For a cached HTTP response this is the whole cache record, not only the response + body. + } +

+ } + } + @case ('client-render') { +

+ Serves index.csr.html instead of rendering. Needs + browserDistFolder in initPangularHub(). +

+ } + } +
+ +
+
+ +

+ Overrides ({{ overrides().length }}) +

+
    + @for (o of overrides(); track o.id) { +
  • + + + + @if (o.message) { + {{ o.message }} + } + @if (o.key) { + {{ o.value === undefined ? 'remove' : 'set' }} {{ o.key }} + } + +
  • + } @empty { +
  • No overrides.
  • + } +
+ `, + styles: ` + @use 'network' as net; + + @include net.controls; + @include net.rule-form; + `, +}) +export class SsrOverrides { + private readonly state = inject(NetworkState); + private readonly overrideState = inject(OverrideState); + protected readonly canWrite = this.state.canWrite; + protected readonly overrides = this.state.overrides; + protected readonly overrideDraft = this.overrideState.overrideDraft; + protected readonly overrideKindOptions = this.overrideState.overrideKindOptions; + protected readonly overrideValueError = this.overrideState.overrideValueError; + protected readonly overrideFromPayload = this.overrideState.overrideFromPayload; + protected readonly overrideReady = this.overrideState.overrideReady; + protected readonly addingOverride = this.overrideState.addingOverride; + + protected readonly overrideLabel = overrideLabel; + + protected setOverrideDraft(key: K, value: OverrideDraft[K]) { + this.overrideState.setOverrideDraft(key, value); + } + + protected patchOverride(key: keyof OverrideDraft, event: Event) { + this.overrideState.patchOverride(key, event); + } + + protected addOverride(event: Event) { + void this.overrideState.addOverride(event); + } + + protected toggleOverride(id: string) { + this.overrideState.toggleOverride(id); + } + + protected removeOverride(id: string) { + void this.overrideState.removeOverride(id); + } +} diff --git a/app/src/pages/network/ssr-requests.ts b/app/src/pages/network/ssr-requests.ts new file mode 100644 index 00000000..46a370c9 --- /dev/null +++ b/app/src/pages/network/ssr-requests.ts @@ -0,0 +1,265 @@ +import { Component, inject } from '@angular/core'; +import { RovingList } from '../../ui/roving-list'; +import { + callTone, + compressedWith, + guardVerdict, + msLabel, + overrideLabel, + renderModeLabel, + skipText, + statusLabel, + statusTone, + type HttpCall, +} from './http-model'; +import { NetworkState } from './network-state'; + +/** The SSR requests table of the Network page, with the detail of the selected request. */ +@Component({ + selector: 'section[appSsrRequests]', + imports: [RovingList], + template: ` +

SSR requests ({{ requests().length }})

+ @if (requests().length) { +
+ + + + + + + + + + + + + @for (req of requests(); track req.id) { + + + + + + + + + } + +
RequestStatusRender modeRenderServer callsNotes
+ + + {{ req.status }} + {{ renderModeLabel(req.renderMode) }}{{ req.renderMs }} ms{{ req.fetches }} ({{ req.fetchMs }} ms) +
+ @if (req.id === selected()?.ssrRequestId) { + this page + } + @if (req.overrides?.length) { + overridden + } + @if (req.aborted) { + aborted + } +
+
+
+ @if (selectedRequest(); as req) { +
+

+ {{ req.method }} {{ req.url }} +

+
+
+
Request id
+
+ {{ req.id }} +
+
+
+
Render
+
{{ req.renderMs }} ms
+
+
+
Total
+
{{ req.durationMs }} ms
+
+
+
Sent
+
{{ req.bytes }} B
+
+
+
Browser page
+
{{ requestPage()?.title || requestPage()?.url || 'not connected' }}
+
+
+ @if (compressedWith(req); as encoding) { +

+ The body was already compressed ({{ encoding }}) when ssrMiddleware saw + it, so the render mode can't be read and TransferState edits can't apply. Mount + ssrMiddleware after compression(). +

+ } + @if (req.overrides?.length) { +

Overrides from the panel

+

+ This response was changed on purpose, so it is not what the app sends on its own. +

+ @for (o of req.overrides; track o.id + o.kind) { +

+ {{ overrideLabel(o.kind) }} + {{ o.applied ? 'applied' : 'not applied' }} + @if (o.note) { + {{ o.note }} + } +

+ } + } + @if (req.navigations?.length) { +

Router during the render

+ @for (n of req.navigations; track $index) { + + @if (n.reason) { +

{{ n.reason }}

+ } + } + } +

Server calls ({{ requestCalls().length }})

+ @for (c of requestCalls(); track c.id) { +

+ {{ c.method }} + {{ c.url }} + {{ statusLabel(c) }} + {{ c.durationMs }} ms + @if (c.cacheStored) { + cached + } @else if (c.cacheSkip) { + not cached + } +

+ @if (!c.cacheStored && c.cacheSkip) { +

Not cached: {{ skipText(c.cacheSkip) }}.

+ } + } @empty { +

The render made no HttpClient calls.

+ } + @if (refetched().length) { +

Fetched again in the browser ({{ refetched().length }})

+

+ These calls ran on the server and again after hydration instead of reading the + transfer cache. +

+ @for (c of refetched(); track c.id) { +

+ {{ c.method }} + {{ c.url }} + cache miss +

+ @if (refetchReason(c); as why) { +

Why: {{ why }}.

+ } + } + } @else if (requestPage() && requestCalls().length) { +

No server call ran again in the browser.

+ } +
+ } + } @else { +
+

No SSR requests traced.

+

+ Add app.use(devtools.ssrMiddleware) before the Angular handler in + server.ts, or wrap a web-standard handler with + withPangularSsr(), then load a server rendered page. +

+
+ } + `, + styles: ` + @use 'network' as net; + + @include net.controls; + @include net.table; + @include net.status; + @include net.preview; + @include net.stats; + `, +}) +export class SsrRequests { + private readonly state = inject(NetworkState); + protected readonly requests = this.state.requests; + protected readonly selected = this.state.selected; + protected readonly selectedRequest = this.state.selectedRequest; + protected readonly selectedRequestId = this.state.selectedRequestId; + protected readonly requestCalls = this.state.requestCalls; + protected readonly requestPage = this.state.requestPage; + protected readonly refetched = this.state.refetched; + + protected readonly callTone = callTone; + protected readonly compressedWith = compressedWith; + protected readonly guardVerdict = guardVerdict; + protected readonly msLabel = msLabel; + protected readonly overrideLabel = overrideLabel; + protected readonly renderModeLabel = renderModeLabel; + protected readonly skipText = skipText; + protected readonly statusLabel = statusLabel; + protected readonly statusTone = statusTone; + + protected refetchReason(call: HttpCall): string { + return this.state.refetchReason(call); + } +} diff --git a/app/src/pages/network/transfer-payload.ts b/app/src/pages/network/transfer-payload.ts new file mode 100644 index 00000000..cbb760ce --- /dev/null +++ b/app/src/pages/network/transfer-payload.ts @@ -0,0 +1,241 @@ +import { Component, inject } from '@angular/core'; +import { JsonPipe } from '@angular/common'; +import { RedactionCount } from '../../ui/redaction-count'; +import { payloadLabel, statusTone, type PayloadEntry } from './http-model'; +import { NetworkState } from './network-state'; +import { OverrideState } from './override-state'; +import { PayloadInsights } from './payload-insights'; + +/** The TransferState payload of the page selected on the Network page, with Refetch. */ +@Component({ + selector: 'section[appTransferPayload]', + imports: [JsonPipe, PayloadInsights, RedactionCount], + template: ` +

TransferState payload

+ @if (selected(); as page) { +
+ + + Renders this URL again on the server, with this tab's cookies, and shows the payload it + sends now. The tab does not reload. + +
+ } + @if (selectedPayload(); as payload) { + @if (!payload.found) { +
+

No TransferState script: this page was not server rendered.

+
+ } @else { +

+ {{ payload.entries.length }} entr{{ payload.entries.length === 1 ? 'y' : 'ies' }}, + {{ payload.size }} bytes + @if (payload.refetchedAt) { + Refetched + } +

+ @if (payload.error) { + + } + + +
+ @for (entry of payload.entries; track entry.key) { +
+ + + @if (payloadLabel(entry); as label) { + {{ label }} + } + @if (entry.http; as http) { + HTTP {{ http.status }} + {{ http.url ?? entry.key }} + } @else { + {{ entry.key }} + } + {{ entry.size }} B + +
+ Key + {{ entry.key }} +
+ + @if (canEditEntry(entry)) { + + } +
+
+ +
{{
+                entry.value | json
+              }}
+
+ } +
+ } + } @else { +
+

Open a page of the app to see its payload.

+
+ } + `, + styles: ` + @use 'mixins' as m; + @use 'network' as net; + + @include net.controls; + @include net.status; + @include net.pre; + .summary-line { + margin-bottom: 8px; + font-variant-numeric: tabular-nums; + } + .payload-tools { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px 12px; + margin-bottom: 12px; + } + .payload-tools .muted { + flex: 1 1 240px; + min-width: 0; + } + .entries { + border-top: 1px solid var(--border); + } + details { + border-bottom: 1px solid var(--border); + } + details pre { + margin: 0 0 12px; + } + summary { + display: flex; + align-items: center; + gap: 8px; + min-height: 36px; + padding: 6px 4px; + border-radius: 4px; + list-style: none; + cursor: pointer; + transition: background-color 0.15s var(--ease); + } + summary::-webkit-details-marker { + display: none; + } + summary:hover { + background: var(--surface-2); + } + .chevron { + flex: none; + width: 6px; + height: 6px; + margin: 0 4px; + border-right: 1.5px solid var(--text-3); + border-bottom: 1.5px solid var(--text-3); + transform: rotate(-45deg); + transition: transform 0.15s var(--ease); + } + details[open] .chevron { + transform: rotate(45deg); + } + .entry-key { + flex: 1 1 auto; + min-width: 0; + overflow: hidden; + font-family: var(--font-mono); + font-size: 12px; + text-overflow: ellipsis; + white-space: nowrap; + } + summary:hover .entry-key { + color: var(--accent); + } + .entry-key-row { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 4px 8px; + min-width: 0; + margin: 0 0 8px; + padding: 0 4px; + } + .entry-key-label { + @include m.label; + flex: none; + } + .entry-key-text { + flex: 1 1 200px; + min-width: 0; + color: var(--text-strong); + overflow-wrap: anywhere; + user-select: text; + } + .entry-actions { + display: flex; + flex-wrap: wrap; + gap: 4px; + } + .entry-size { + flex: none; + color: var(--text-2); + font-size: 12px; + font-variant-numeric: tabular-nums; + } + `, +}) +export class TransferPayload { + private readonly state = inject(NetworkState); + private readonly overrideState = inject(OverrideState); + protected readonly canWrite = this.state.canWrite; + protected readonly selected = this.state.selected; + protected readonly selectedPayload = this.state.selectedPayload; + protected readonly refetching = this.state.refetching; + + protected readonly payloadLabel = payloadLabel; + protected readonly statusTone = statusTone; + + protected refetchPayload(pageId: string) { + void this.state.refetchPayload(pageId); + } + + protected copyKey(key: string) { + void this.state.copyKey(key); + } + + protected canEditEntry(entry: PayloadEntry): boolean { + return this.overrideState.canEditEntry(entry); + } + + protected editEntry(entry: PayloadEntry) { + this.overrideState.editEntry(entry); + } +} diff --git a/app/src/styles/_network.scss b/app/src/styles/_network.scss new file mode 100644 index 00000000..b2956002 --- /dev/null +++ b/app/src/styles/_network.scss @@ -0,0 +1,612 @@ +// Styles shared by the Network page's sections (`app/src/pages/network/`), in the order the page +// had them as one component, so each section looks as it did. Include the groups a section uses, +// in this order: controls, table, status, pre, preview, rule-form, stats. +@use 'mixins' as m; + +@mixin controls { + h2 { + @include m.label; + margin: 0 0 16px; + } + h3 { + margin: 16px 0 8px; + color: var(--text-strong); + font-size: 12px; + font-weight: 600; + } + p { + margin: 0; + } + label { + display: grid; + gap: 6px; + color: var(--text-2); + font-size: 12px; + font-weight: 500; + } + label.inline { + display: flex; + align-items: center; + gap: 8px; + min-width: 0; + color: var(--text); + cursor: pointer; + } + .hint { + color: var(--text-3); + font-weight: 400; + } + input, + select, + textarea, + button { + font: inherit; + color: var(--text); + } + input:not([type='checkbox']), + select, + textarea { + width: 100%; + min-width: 0; + padding: 0 10px; + border: 1px solid var(--control-border); + border-radius: var(--radius-sm); + background-color: var(--bg); + transition: + border-color 0.2s var(--ease), + box-shadow 0.2s var(--ease); + } + input:not([type='checkbox']), + select { + height: 34px; + } + select { + padding-right: 36px; + } + textarea { + padding: 8px 10px; + font-family: var(--font-mono); + font-size: 12px; + } + input::placeholder, + textarea::placeholder { + color: var(--text-3); + } + input:not([type='checkbox']):hover, + select:hover, + textarea:hover { + border-color: color-mix(in srgb, var(--control-border) 60%, var(--text-3)); + } + input:not([type='checkbox']):focus-visible, + select:focus-visible, + textarea:focus-visible { + @include m.field-focus; + } + textarea[aria-invalid='true'] { + border-color: color-mix(in srgb, var(--danger) 60%, transparent); + } + input[type='checkbox'] { + flex: none; + width: 16px; + height: 16px; + margin: 0; + accent-color: var(--accent); + cursor: pointer; + } + button { + display: inline-flex; + align-items: center; + justify-content: center; + height: 34px; + padding: 0 14px; + border: 1px solid var(--control-border); + border-radius: var(--radius-sm); + background: var(--surface-2); + font-weight: 500; + white-space: nowrap; + cursor: pointer; + transition: + background-color 0.2s var(--ease), + border-color 0.2s var(--ease), + color 0.2s var(--ease), + transform 0.1s var(--ease); + } + button:hover:not(:disabled) { + border-color: var(--accent-line); + background: var(--surface-3); + } + button:active:not(:disabled) { + transform: translateY(1px); + } + button[type='submit'] { + border-color: var(--accent); + background: var(--accent); + color: var(--accent-ink); + font-weight: 600; + } + button[type='submit']:hover:not(:disabled) { + border-color: var(--accent-hover); + background: var(--accent-hover); + } + button:disabled { + opacity: 0.5; + cursor: not-allowed; + } + button.ghost { + height: 28px; + padding: 0 10px; + border-color: transparent; + background: none; + color: var(--text-2); + font-size: 12px; + } + button.ghost:hover:not(:disabled) { + border-color: var(--border-strong); + background: var(--surface-2); + color: var(--text); + } + button.link { + display: inline; + height: auto; + padding: 0; + border: none; + border-radius: 4px; + background: none; + color: var(--text); + text-align: left; + } + button.link:hover:not(:disabled) { + border: none; + background: none; + color: var(--accent); + } + button.link:active:not(:disabled) { + transform: none; + } + :focus-visible { + @include m.focus-ring; + } + .muted { + color: var(--text-2); + } + .small { + font-size: 12px; + } + .bad { + color: var(--danger); + } + .empty { + display: grid; + gap: 4px; + padding: 24px 16px; + border: 1px dashed var(--border-strong); + border-radius: var(--radius-sm); + color: var(--text); + text-align: center; + line-height: 1.5; + } + .empty-actions { + display: flex; + justify-content: center; + margin-top: 8px; + } + code { + font-family: var(--font-mono); + font-size: 12px; + } +} + +@mixin table { + .table-wrap { + max-height: min(420px, 60vh); + overflow: auto; + margin: 0 -16px; + padding: 0 16px; + } + .table-wrap :focus-visible { + @include m.focus-ring(-2px); + } + thead th { + position: sticky; + top: 0; + z-index: 1; + background: var(--surface); + } + table { + width: 100%; + min-width: 560px; + border-collapse: collapse; + font-variant-numeric: tabular-nums; + } + th, + td { + height: 36px; + padding: 6px 12px; + border-bottom: 1px solid var(--border); + text-align: left; + vertical-align: middle; + white-space: nowrap; + } + th:first-child, + td:first-child { + padding-left: 8px; + } + th { + @include m.label; + height: 32px; + border-bottom-color: var(--border-strong); + } + .num { + text-align: right; + } + td.num { + color: var(--text-2); + } + tbody tr { + cursor: pointer; + } + tbody tr.spacer td { + padding: 0; + border: 0; + } + .window-note { + margin: 0 0 6px; + } + tbody td { + transition: background-color 0.15s var(--ease); + } + tbody tr:hover td { + background: var(--surface-2); + } + tr.selected td, + tr.selected:hover td { + background: var(--accent-soft); + } + tr.selected td:first-child { + box-shadow: inset 2px 0 0 var(--accent); + } + .method { + font-family: var(--font-mono); + font-size: 12px; + font-weight: 600; + color: var(--text-strong); + } + td.url { + width: 100%; + max-width: 0; + font-family: var(--font-mono); + font-size: 12px; + } + td.url button.link { + display: block; + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + tr.selected td.url button.link { + color: var(--text-strong); + } + td.page-url { + max-width: 160px; + overflow: hidden; + color: var(--text-2); + font-family: var(--font-mono); + font-size: 12px; + text-overflow: ellipsis; + white-space: nowrap; + } +} + +@mixin status { + .status { + font-family: var(--font-mono); + font-size: 12px; + font-weight: 600; + color: var(--text-2); + } + .status.ok { + color: var(--ok); + } + .status.bad { + color: var(--danger); + } + .dot { + display: inline-block; + width: 6px; + height: 6px; + margin-right: 6px; + border-radius: 50%; + background: currentColor; + vertical-align: middle; + } + .notes { + display: flex; + gap: 4px; + } + .tag { + display: inline-flex; + align-items: center; + height: 20px; + padding: 0 8px; + border: 1px solid var(--border-strong); + border-radius: 99px; + background: var(--surface-3); + color: var(--text-2); + font-size: 11px; + font-weight: 600; + white-space: nowrap; + } + .tag.server { + @include m.tint(accent); + } + .tag.fault { + @include m.tint(danger); + } + .tag.mock { + @include m.tint(accent); + } + .tag.rule-ref { + gap: 4px; + max-width: 220px; + } + .tag.rule-ref code { + @include m.truncate; + font-family: var(--font-mono); + } + .tag.on { + @include m.tint(ok); + } + .tag.off-tag { + @include m.tint(warn); + } +} + +@mixin pre { + pre { + margin: 0; + padding: 10px 12px; + max-height: 240px; + overflow: auto; + border: 1px solid var(--border); + border-radius: var(--radius-sm); + background: var(--bg); + color: var(--text-2); + font: 12px/1.5 var(--font-mono); + white-space: pre-wrap; + overflow-wrap: anywhere; + } + pre + pre { + margin-top: 8px; + } + pre.warn { + border-color: color-mix(in srgb, var(--warn) 30%, transparent); + color: var(--warn); + } + pre.error { + border-color: color-mix(in srgb, var(--danger) 30%, transparent); + color: var(--danger); + } +} + +@mixin preview { + .preview { + @include m.enter(0.2s); + margin-top: 16px; + } + .preview-head { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 4px 8px; + margin-bottom: 4px; + } + .preview-actions { + display: flex; + flex-wrap: wrap; + gap: 4px; + } + pre.preview-body { + max-height: 320px; + } + .preview-head h3 { + margin: 0; + } + .preview-meta { + display: flex; + align-items: baseline; + gap: 8px; + min-width: 0; + margin-bottom: 8px; + } + .request-call { + display: flex; + align-items: baseline; + gap: 8px; + min-width: 0; + margin: 0 0 4px; + } + .request-call .preview-url { + flex: 1 1 auto; + } + .skip-reason { + margin: 0 0 8px; + } + .nav-stats { + margin-bottom: 8px; + } + .preview-rule { + margin-bottom: 8px; + color: var(--text-2); + font-size: 12px; + } + .preview-url { + min-width: 0; + overflow: hidden; + color: var(--text-2); + font-family: var(--font-mono); + font-size: 12px; + text-overflow: ellipsis; + white-space: nowrap; + } +} + +@mixin rule-form { + .field-group { + display: grid; + gap: 6px; + min-width: 0; + color: var(--text-2); + font-size: 12px; + font-weight: 500; + } + .field-group app-select { + width: 100%; + } + .rule-note { + grid-column: 1 / -1; + margin: 0; + padding-left: 24px; + color: var(--text-2); + font-size: 12px; + } + .rule-form { + display: grid; + gap: 12px; + } + .row { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 12px; + } + @media (max-width: 420px) { + .row { + grid-template-columns: minmax(0, 1fr); + } + } + .field-error { + margin-top: -4px; + color: var(--danger); + font-size: 12px; + } + .field-error:empty { + display: none; + } + .form-actions { + display: flex; + } + .rules-heading { + margin-top: 24px; + } + .rules { + display: grid; + gap: 8px; + margin: 0; + padding: 0; + list-style: none; + } + .rules li { + display: grid; + grid-template-columns: minmax(0, 1fr) auto; + align-items: center; + gap: 4px 12px; + padding: 8px 12px; + border: 1px solid var(--border); + border-radius: var(--radius-sm); + background: var(--surface-2); + transition: + border-color 0.2s var(--ease), + opacity 0.2s var(--ease); + } + .rules li:hover { + border-color: var(--border-strong); + } + .rules li.off .rule-pattern { + color: var(--text-2); + text-decoration: line-through; + } + .rules li.off .rule-method, + .rules li.off .rule-meta, + .rules li.off .rule-meta .status { + color: var(--text-3); + } + .rules li.empty-rule { + display: block; + padding: 16px 12px; + border-style: dashed; + border-color: var(--border-strong); + background: none; + color: var(--text-2); + text-align: center; + } + .rule-pattern { + min-width: 0; + overflow: hidden; + color: var(--text-strong); + text-overflow: ellipsis; + white-space: nowrap; + } + .rule-method { + color: var(--accent); + font-weight: 600; + } + .rule-meta { + display: flex; + flex-wrap: wrap; + grid-column: 1 / -1; + gap: 4px 8px; + padding-left: 24px; + color: var(--text-2); + font-size: 12px; + font-variant-numeric: tabular-nums; + } + .rule-meta > span + span::before { + content: '·'; + margin-right: 8px; + color: var(--text-3); + } + .rule-meta .status { + font-size: 11px; + } + .rules button.remove { + padding: 2px 4px; + color: var(--text-2); + font-size: 12px; + } + .rules button.remove:hover:not(:disabled) { + color: var(--danger); + } +} + +@mixin stats { + .stats { + display: grid; + margin: 0; + } + .stats > div { + display: flex; + align-items: center; + justify-content: space-between; + gap: 16px; + min-height: 36px; + padding: 6px 0; + border-bottom: 1px solid var(--border); + } + .stats > div:last-child { + border-bottom: none; + } + dt { + color: var(--text-2); + } + dd { + margin: 0; + color: var(--text-strong); + font-weight: 600; + font-variant-numeric: tabular-nums; + text-align: right; + } + .ok-note { + color: var(--text-2); + } +} diff --git a/lint-baseline.json b/lint-baseline.json index 96857841..94ee5fb7 100644 --- a/lint-baseline.json +++ b/lint-baseline.json @@ -23,9 +23,6 @@ "app/src/pages/di-inspector.ts": { "pangular(max-lines)": 2742 }, - "app/src/pages/network-inspector.ts": { - "pangular(max-lines)": 3143 - }, "app/src/pages/pipes-inspector.ts": { "pangular(max-lines)": 1612 }, diff --git a/packages/devtools/src/__tests__/network-inspector.test.ts b/packages/devtools/src/__tests__/network-inspector.test.ts index b68cfc4c..5b17f4fa 100644 --- a/packages/devtools/src/__tests__/network-inspector.test.ts +++ b/packages/devtools/src/__tests__/network-inspector.test.ts @@ -7,6 +7,10 @@ import { NetworkInspector } from '../../../../app/src/pages/network-inspector.ts import { Select } from '../../../../app/src/ui/select.ts'; import { LiveControls } from '../../../../app/src/ui/live-feed.ts'; import { SortHeader } from '../../../../app/src/ui/sort-header.ts'; +import { CallTimeline } from '../../../../app/src/pages/network/call-timeline.ts'; +import { FaultRules } from '../../../../app/src/pages/network/fault-rules.ts'; +import { ResponsePreview } from '../../../../app/src/pages/network/response-preview.ts'; +import { SsrOverrides } from '../../../../app/src/pages/network/ssr-overrides.ts'; import { initAngularTestBed } from './angular-version.ts'; initAngularTestBed(); @@ -24,6 +28,9 @@ const signalInput = (name: string, alias = name, required = false) => [ column: signalInput('column', 'appSortHeader', true), sort: [...signalInput('sort'), { type: Output, args: ['sortChange'] }], }; +(ResponsePreview as unknown as { propDecorators: unknown }).propDecorators = { + call: signalInput('call', 'call', true), +}; class StubSelect { valueChange = new EventEmitter(); @@ -53,10 +60,13 @@ const call = (id: string, extra: Partial = {}): Call[number] => ({ let fixture: ComponentFixture; function mount(calls: Call = []) { - TestBed.overrideComponent(NetworkInspector, { - remove: { imports: [Select] }, - add: { imports: [StubSelect] }, - }); + // The page and the sections that show a dropdown. + for (const component of [NetworkInspector, CallTimeline, FaultRules, SsrOverrides]) { + TestBed.overrideComponent(component, { + remove: { imports: [Select] }, + add: { imports: [StubSelect] }, + }); + } fixture = TestBed.createComponent(NetworkInspector); document.body.append(fixture.nativeElement); fixture.componentInstance.serverCalls.set(calls); From 1c6a7fef310d42f3b50c997a88fdbd841c67eb4b Mon Sep 17 00:00:00 2001 From: erKam Date: Sun, 8 Nov 2026 09:33:37 +0000 Subject: [PATCH 2/7] refactor(ui): keep the method style in the network response preview The method token moved with the table styles, which the response preview does not include, so the preview showed GET in the body font. Move the rule to the status group that every section showing a method includes. --- app/src/styles/_network.scss | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/styles/_network.scss b/app/src/styles/_network.scss index b2956002..041308fa 100644 --- a/app/src/styles/_network.scss +++ b/app/src/styles/_network.scss @@ -265,12 +265,6 @@ tr.selected td:first-child { box-shadow: inset 2px 0 0 var(--accent); } - .method { - font-family: var(--font-mono); - font-size: 12px; - font-weight: 600; - color: var(--text-strong); - } td.url { width: 100%; max-width: 0; @@ -299,6 +293,12 @@ } @mixin status { + .method { + font-family: var(--font-mono); + font-size: 12px; + font-weight: 600; + color: var(--text-strong); + } .status { font-family: var(--font-mono); font-size: 12px; From 82207e51112b8f856c3cbcf55203897d1ce24f3e Mon Sep 17 00:00:00 2001 From: erKam Date: Sun, 8 Nov 2026 09:40:18 +0000 Subject: [PATCH 3/7] build(extension): rebuild the panel bundle Rebuild extension/ui from app after the network page split. --- ...=> browser-agent-rpc-KH4HHvHf-71KIsREx.js} | 2 +- .../{index-BpSgirhF.js => index-8SQHm3-i.js} | 4156 +++++++++++++---- extension/ui/index.html | 2 +- 3 files changed, 3348 insertions(+), 812 deletions(-) rename extension/ui/assets/{browser-agent-rpc-KH4HHvHf-CUsc0F99.js => browser-agent-rpc-KH4HHvHf-71KIsREx.js} (95%) rename extension/ui/assets/{index-BpSgirhF.js => index-8SQHm3-i.js} (64%) diff --git a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-CUsc0F99.js b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-71KIsREx.js similarity index 95% rename from extension/ui/assets/browser-agent-rpc-KH4HHvHf-CUsc0F99.js rename to extension/ui/assets/browser-agent-rpc-KH4HHvHf-71KIsREx.js index 8697728c..5303150f 100644 --- a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-CUsc0F99.js +++ b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-71KIsREx.js @@ -1 +1 @@ -import{t as e}from"./index-BpSgirhF.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(){let e=typeof document>`u`?void 0:document;return{url:e?.location?.href??``,title:e?.title??``,visible:!e||e.visibilityState===`visible`,focused:e?.hasFocus()??!0}}function u(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a,l()).catch(()=>{}))}))},s=a(o),u=e.events.on(`connection:status`,e=>{e===`connected`&&o()}),d=typeof window>`u`?void 0:window;return d?.addEventListener(`focus`,o),d?.addEventListener(`blur`,o),d?.document.addEventListener(`visibilitychange`,o),o(),()=>{n=!0,s(),u(),d?.removeEventListener(`focus`,o),d?.removeEventListener(`blur`,o),d?.document.removeEventListener(`visibilitychange`,o)}}export{u as setupBrowserAgentRpcBridge}; \ No newline at end of file +import{t as e}from"./index-8SQHm3-i.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(){let e=typeof document>`u`?void 0:document;return{url:e?.location?.href??``,title:e?.title??``,visible:!e||e.visibilityState===`visible`,focused:e?.hasFocus()??!0}}function u(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a,l()).catch(()=>{}))}))},s=a(o),u=e.events.on(`connection:status`,e=>{e===`connected`&&o()}),d=typeof window>`u`?void 0:window;return d?.addEventListener(`focus`,o),d?.addEventListener(`blur`,o),d?.document.addEventListener(`visibilitychange`,o),o(),()=>{n=!0,s(),u(),d?.removeEventListener(`focus`,o),d?.removeEventListener(`blur`,o),d?.document.removeEventListener(`visibilitychange`,o)}}export{u as setupBrowserAgentRpcBridge}; \ No newline at end of file diff --git a/extension/ui/assets/index-BpSgirhF.js b/extension/ui/assets/index-8SQHm3-i.js similarity index 64% rename from extension/ui/assets/index-BpSgirhF.js rename to extension/ui/assets/index-8SQHm3-i.js index 939f6758..d4df7b63 100644 --- a/extension/ui/assets/index-BpSgirhF.js +++ b/extension/ui/assets/index-8SQHm3-i.js @@ -1,14 +1,14 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Object.defineProperty,t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,i=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,a=(e,a)=>{for(var o in a||={})n.call(a,o)&&i(e,o,a[o]);if(t)for(var o of t(a))r.call(a,o)&&i(e,o,a[o]);return e},o=(e,t,n)=>(i(e,typeof t==`symbol`?t:t+``,n),n),s=globalThis;function c(e){let t=s.__Zone_symbol_prefix;return(typeof t==`string`?t:`__zone_symbol__`)+e}function l(){let e=s.performance;function t(t){e&&e.mark&&e.mark(t)}function n(t,n){e&&e.measure&&e.measure(t,n)}t(`Zone`);let r=class e{constructor(e,t){o(this,`_parent`),o(this,`_name`),o(this,`_properties`),o(this,`_zoneDelegate`),this._parent=e,this._name=t?t.name||`unnamed`:``,this._properties=t&&t.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,t)}static assertZonePatched(){if(s.Promise!==me.ZoneAwarePromise)throw Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let t=e.current;for(;t.parent;)t=t.parent;return t}static get current(){return ge.zone}static get currentTask(){return _e}static __load_patch(r,i,a=!1){if(Object.hasOwn(me,r)){let e=s[c(`forceDuplicateZoneCheck`)]===!0;if(!a&&e)throw Error(`Already loaded patch: `+r)}else if(!s[`__Zone_disable_`+r]){let a=`Zone:`+r;t(a),me[r]=i(s,e,he),n(a,a)}}get parent(){return this._parent}get name(){return this._name}get(e){let t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(Object.hasOwn(t._properties,e))return t;t=t._parent}return null}fork(e){if(!e)throw Error(`ZoneSpec required!`);return this._zoneDelegate.fork(this,e)}wrap(e,t){if(typeof e!=`function`)throw Error(`Expecting function got: `+e);let n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}}run(e,t,n,r){ge={parent:ge,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{ge=ge.parent}}runGuarded(e,t=null,n,r){ge={parent:ge,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{ge=ge.parent}}runTask(e,t,n){if(e.zone!=this)throw Error(`A task can only be run in the zone of creation! (Creation: `+(e.zone||ie).name+`; Execution: `+this.name+`)`);let r=e,{type:i,data:{isPeriodic:a=!1,isRefreshable:o=!1}={}}=e;if(e.state===ae&&(i===pe||i===fe))return;let s=e.state!=ce;s&&r._transitionTo(ce,se);let c=_e;_e=r,ge={parent:ge,zone:this};try{i==fe&&e.data&&!a&&!o&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,r,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{let t=e.state;if(t!==ae&&t!==ue){if(i==pe||a||o&&t===oe)s&&r._transitionTo(se,ce,oe);else{let e=r._zoneDelegates;this._updateTaskCount(r,-1),s&&r._transitionTo(ae,ce,ae),o&&(r._zoneDelegates=e)}}ge=ge.parent,_e=c}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(oe,ae);let t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(ue,oe,ae),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==oe&&e._transitionTo(se,oe),e}scheduleMicroTask(e,t,n,r){return this.scheduleTask(new u(de,e,t,n,r,void 0))}scheduleMacroTask(e,t,n,r,i){return this.scheduleTask(new u(fe,e,t,n,r,i))}scheduleEventTask(e,t,n,r,i){return this.scheduleTask(new u(pe,e,t,n,r,i))}cancelTask(e){if(e.zone!=this)throw Error(`A task can only be cancelled in the zone of creation! (Creation: `+(e.zone||ie).name+`; Execution: `+this.name+`)`);if(e.state===se||e.state===ce){e._transitionTo(le,se,ce);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(ue,le),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(ae,le),e.runCount=-1,e}}_updateTaskCount(e,t){let n=e._zoneDelegates;t==-1&&(e._zoneDelegates=null);for(let r=0;re.hasTask(n,r),onScheduleTask:(e,t,n,r)=>e.scheduleTask(n,r),onInvokeTask:(e,t,n,r,i,a)=>e.invokeTask(n,r,i,a),onCancelTask:(e,t,n,r)=>e.cancelTask(n,r)};class l{constructor(e,t,n){o(this,`_zone`),o(this,`_taskCounts`,{microTask:0,macroTask:0,eventTask:0}),o(this,`_forkDlgt`),o(this,`_forkZS`),o(this,`_forkCurrZone`),o(this,`_interceptDlgt`),o(this,`_interceptZS`),o(this,`_interceptCurrZone`),o(this,`_invokeDlgt`),o(this,`_invokeZS`),o(this,`_invokeCurrZone`),o(this,`_handleErrorDlgt`),o(this,`_handleErrorZS`),o(this,`_handleErrorCurrZone`),o(this,`_scheduleTaskDlgt`),o(this,`_scheduleTaskZS`),o(this,`_scheduleTaskCurrZone`),o(this,`_invokeTaskDlgt`),o(this,`_invokeTaskZS`),o(this,`_invokeTaskCurrZone`),o(this,`_cancelTaskDlgt`),o(this,`_cancelTaskZS`),o(this,`_cancelTaskCurrZone`),o(this,`_hasTaskDlgt`),o(this,`_hasTaskDlgtOwner`),o(this,`_hasTaskZS`),o(this,`_hasTaskCurrZone`),this._zone=e,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this._zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this._zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this._zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this._zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this._zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this._zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this._zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;let r=n&&n.onHasTask,i=t&&t._hasTaskZS;(r||i)&&(this._hasTaskZS=r?n:a,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,n.onScheduleTask||(this._scheduleTaskZS=a,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this._zone),n.onInvokeTask||(this._invokeTaskZS=a,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this._zone),n.onCancelTask||(this._cancelTaskZS=a,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this._zone))}get zone(){return this._zone}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new i(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,r,i){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,i):t.apply(n,r)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||=t;else if(t.scheduleFn)t.scheduleFn(t);else if(t.type==de)ne(t);else throw Error(`Task is missing scheduleFn.`);return n}invokeTask(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error(`Task is not cancelable`);n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}}_updateTaskCount(e,t){let n=this._taskCounts,r=n[e],i=n[e]=r+t;if(i<0)throw Error(`More tasks executed then were scheduled.`);if(r==0||i==0){let t={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};this.hasTask(this._zone,t)}}}class u{constructor(e,t,n,r,i,a){if(o(this,`type`),o(this,`source`),o(this,`invoke`),o(this,`callback`),o(this,`data`),o(this,`scheduleFn`),o(this,`cancelFn`),o(this,`_zone`,null),o(this,`runCount`,0),o(this,`_zoneDelegates`,null),o(this,`_state`,`notScheduled`),this.type=e,this.source=t,this.data=r,this.scheduleFn=i,this.cancelFn=a,!n)throw Error(`callback is not defined`);this.callback=n;let c=this;this.invoke=e===pe&&r&&r.useG?u.invokeTask:function(){return u.invokeTask.call(s,c,this,arguments)}}static invokeTask(e,t,n){e||=this,ve++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{try{ve===1&&!s[m]&&re()}finally{ve--}}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(ae,oe)}_transitionTo(e,t,n){if(this._state===t||this._state===n)this._state=e,e==ae&&(this._zoneDelegates=null);else throw Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?` or '`+n+`'`:``}, was '${this._state}'.`)}toString(){return this.data&&this.data.handleId!==void 0?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}let d=c(`setTimeout`),f=c(`Promise`),p=c(`then`),m=c(`enable_native_microtask_draining`),ee=[],h=!1,g;function te(e){!g&&s[f]&&(g=s[f].resolve(0)),g?(g[p]??g.then).call(g,e):s[d](e,0)}function ne(e){let t=s[m],n=t&&ee.length===0&&!h,r=!t&&ve===0&&ee.length===0;(n||r)&&te(re),e&&ee.push(e)}function re(){if(!h){h=!0;try{for(;ee.length;){let e=ee;ee=[];for(let t of e)try{t.zone.runTask(t,null,null)}catch(e){he.onUnhandledError(e)}}}finally{if(s[m])h=!1,he.microtaskDrainDone();else try{he.microtaskDrainDone()}finally{h=!1}}}}let ie={name:`NO ZONE`},ae=`notScheduled`,oe=`scheduling`,se=`scheduled`,ce=`running`,le=`canceling`,ue=`unknown`,de=`microTask`,fe=`macroTask`,pe=`eventTask`,me=Object.create(null),he={symbol:c,currentZoneFrame:()=>ge,onUnhandledError:ye,microtaskDrainDone:ye,scheduleMicroTask:ne,showUncaughtError:()=>!i[c(`ignoreConsoleErrorUncaughtError`)],patchEventTarget:()=>[],patchOnProperties:ye,patchMethod:()=>ye,bindArguments:()=>[],patchThen:()=>ye,patchMacroTask:()=>ye,patchEventPrototype:()=>ye,getGlobalObjects:()=>void 0,ObjectDefineProperty:()=>ye,ObjectGetOwnPropertyDescriptor:()=>void 0,ObjectCreate:()=>void 0,ArraySlice:()=>[],patchClass:()=>ye,wrapWithCurrentZone:()=>ye,filterProperties:()=>[],attachOriginToPatched:()=>ye,_redefineProperty:()=>ye,patchCallbacks:()=>ye,nativeScheduleMicroTask:te},ge={parent:null,zone:new i(null,null)},_e=null,ve=0;function ye(){}return n(`Zone`,`Zone`),i}function u(){let e=globalThis,t=e[c(`forceDuplicateZoneCheck`)]===!0;if(e.Zone&&(t||typeof e.Zone.__symbol__!=`function`))throw Error(`Zone already loaded.`);return e.Zone??=l(),e.Zone}var d=Object.getOwnPropertyDescriptor,f=Object.defineProperty,p=Object.getPrototypeOf,m=Object.create,ee=Array.prototype.slice,h=`addEventListener`,g=`removeEventListener`,te=c(h),ne=c(g),re=`true`,ie=`false`,ae=c(``);function oe(e,t){return Zone.current.wrap(e,t)}function se(e,t,n,r,i){return Zone.current.scheduleMacroTask(e,t,n,r,i)}var ce=c,le=typeof window<`u`,ue=le?window:void 0,de=le&&ue||globalThis,fe=`removeAttribute`;function pe(e,t){for(let n=e.length-1;n>=0;n--)typeof e[n]==`function`&&(e[n]=oe(e[n],t+`_`+n));return e}function me(e,t){let n=e.constructor.name;for(let r=0;r{let t=function(){return e.apply(this,pe(arguments,n+`.`+i))};return ke(t,e),t})(a)}}}function he(e){return e?e.writable===!1?!1:typeof e.get!=`function`||e.set!==void 0:!0}var ge=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope,_e=!(`nw`in de)&&de.process!==void 0&&de.process.toString()===`[object process]`,ve=!_e&&!ge&&!!(le&&ue.HTMLElement),ye=de.process!==void 0&&de.process.toString()===`[object process]`&&!ge&&!!(le&&ue.HTMLElement),be=Object.create(null),xe=ce(`enable_beforeunload`),Se=function(e){if(e||=de.event,!e)return;let t=be[e.type];t||=be[e.type]=ce(`ON_PROPERTY`+e.type);let n=this||e.target||de,r=n[t],i;if(ve&&n===ue&&e.type===`error`){let t=e;i=r&&r.call(this,t.message,t.filename,t.lineno,t.colno,t.error),i===!0&&e.preventDefault()}else i=r&&r.apply(this,arguments),e.type===`beforeunload`&&de[xe]&&typeof i==`string`?e.returnValue=i:i!=null&&!i&&e.preventDefault();return i};function Ce(e,t,n){let r=d(e,t);if(!r&&n&&d(n,t)&&(r={enumerable:!0,configurable:!0}),!r||!r.configurable)return;let i=ce(`on`+t+`patched`);if(Object.hasOwn(e,i)&&e[i])return;delete r.writable,delete r.value;let a=r.get,o=r.set,s=t.slice(2),c=be[s];c||=be[s]=ce(`ON_PROPERTY`+s),r.set=function(t){let n=this;!n&&e===de&&(n=de),n&&(typeof n[c]==`function`&&n.removeEventListener(s,Se),o?.call(n,null),n[c]=t,typeof t==`function`&&n.addEventListener(s,Se,!1))},r.get=function(){let n=this;if(!n&&e===de&&(n=de),!n)return null;let i=n[c];if(i)return i;if(a){let e=a.call(this);if(e)return r.set.call(this,e),typeof n[fe]==`function`&&n.removeAttribute(t),e}return null},f(e,t,r),e[i]=!0}function we(e,t,n){if(t)for(let r=0;rfunction(t,r){let a=n(t,r);return a.cbIdx>=0&&typeof r[a.cbIdx]==`function`?se(a.name,r[a.cbIdx],a,i):e.apply(t,r)})}function ke(e,t){e[ce(`OriginalDelegate`)]=t}function Ae(e){return typeof e==`function`}function je(e){return typeof e==`number`}var Me={useG:!0},Ne=Object.create(null),Pe={},Fe=RegExp(`^`+ae+`(\\w+)(true|false)$`),Ie=ce(`propagationStopped`),Le=[`capture`,`once`,`passive`,`signal`];function Re(e,t){let n=(t?t(e):e)+ie,r=(t?t(e):e)+re,i=ae+n,a=ae+r;Ne[e]={[ie]:i,[re]:a}}function ze(e,t,n,r){let i=r&&r.add||h,o=r&&r.rm||g,s=r&&r.listeners||`eventListeners`,c=r&&r.rmAll||`removeAllListeners`,l=ce(i),u=`.`+i+`:`,d=function(e,t,n){if(e.isRemoved)return;let r=e.callback;typeof r==`object`&&r.handleEvent&&(e.callback=e=>r.handleEvent(e),e.originalDelegate=r);let i;try{e.invoke(e,t,[n])}catch(e){i=e}let a=e.options;if(a&&typeof a==`object`&&a.once){let r=e.originalDelegate?e.originalDelegate:e.callback;t[o].call(t,n.type,r,a)}return i};function f(n,r,i){if(r||=e.event,!r)return;let a=n||r.target||e,o=a[Ne[r.type][i?re:ie]];if(o){let e=[];if(o.length===1){let t=d(o[0],a,r);t&&e.push(t)}else{let t=o.slice();for(let n=0;n{throw r})}}}let m=function(e){return f(this,e,!1)},ee=function(e){return f(this,e,!0)};function te(t,n){if(!t)return!1;let r=!0;n&&n.useG!==void 0&&(r=n.useG);let d=n&&n.vh,f=!0;n&&n.chkDup!==void 0&&(f=n.chkDup);let h=!1;n&&n.rt!==void 0&&(h=n.rt);let g=t;for(;g&&!Object.hasOwn(g,i);)g=p(g);if(!g&&t[i]&&(g=t),!g||g[l])return!1;let te=n&&n.eventNameToString,ne={},oe=g[l]=g[i],se=g[ce(o)]=g[o],le=g[ce(s)]=g[s],ue=g[ce(c)]=g[c],de;n&&n.prepend&&(de=g[ce(n.prepend)]=g[n.prepend]);function fe(e,t){return t?typeof e==`boolean`?{capture:e,passive:!0}:e?(typeof e==`object`&&e.passive!==!1&&(e.passive=!0),e):{passive:!0}:e}let pe=function(e){if(!ne.isExisting)return oe.call(ne.target,ne.eventName,ne.capture?ee:m,ne.options)},me=function(e){if(!e.isRemoved){let t=Ne[e.eventName],n;t&&(n=t[e.capture?re:ie]);let r=n&&e.target[n];if(r){for(let t=0;tve.zone.cancelTask(ve);t.call(g,`abort`,e,{once:!0}),ve.removeAbortListener=()=>g.removeEventListener(`abort`,e)}if(ne.target=null,ge&&(ge.taskData=null),oe&&(ne.options.once=!0),typeof ve.options!=`boolean`&&(ve.options=h),ve.target=l,ve.capture=ae,ve.eventName=u,m&&(ve.originalDelegate=p),c?ue.unshift(ve):ue.push(ve),s)return l}};return g[i]=Te(oe,u,ye,be,h),de&&(g.prependListener=Te(de,`.prependListener:`,ge,be,h,!0)),g[o]=function(){let t=this||e,r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));let i=arguments[2],a=i?typeof i==`boolean`||i.capture:!1,o=arguments[1];if(!o)return se.apply(this,arguments);if(d&&!d(se,o,t,arguments))return;let s=Ne[r],c;s&&(c=s[a?re:ie]);let l=c&&t[c];if(l)for(let e=0;efunction(t,n){t[Ie]=!0,e&&e.apply(t,n)})}function He(e,t){t.patchMethod(e,`queueMicrotask`,e=>function(e,t){Zone.current.scheduleMicroTask(`queueMicrotask`,t[0])})}var Ue=ce(`zoneTask`);function We(e,t,n,r){let i=null,a=null;t+=r,n+=r;let o={};function s(t){let n=t.data;n.args[0]=function(){return t.invoke.apply(this,arguments)};let r=i.apply(e,n.args);return je(r)?n.handleId=r:(n.handle=r,n.isRefreshable=Ae(r?.refresh)),t}function c(t){let{handle:n,handleId:r}=t.data;return a.call(e,n??r)}i=De(e,t,n=>function(i,a){if(Ae(a[0])){let e={isRefreshable:!1,isPeriodic:r===`Interval`,delay:r===`Timeout`||r===`Interval`?a[1]||0:void 0,args:a},n=a[0];a[0]=function(){try{return n.apply(this,arguments)}finally{let{handle:t,handleId:n,isPeriodic:r,isRefreshable:i}=e;!r&&!i&&(n?delete o[n]:t&&(t[Ue]=null))}};let i=se(t,a[0],e,s,c);if(!i)return i;let{handleId:l,handle:u,isRefreshable:d,isPeriodic:f}=i.data;if(l)o[l]=i;else if(u&&(u[Ue]=i,d&&!f)){let e=u.refresh;u.refresh=function(){let{zone:t,state:n}=i;return n===`notScheduled`?(i._state=`scheduled`,t._updateTaskCount(i,1)):n===`running`&&(i._state=`scheduling`),e.call(this)}}return u??l??i}return n.apply(e,a)}),a=De(e,n,t=>function(n,r){let i=r[0],a;je(i)?(a=o[i],delete o[i]):(a=i?.[Ue],a?i[Ue]=null:a=i),a?.type?a.cancelFn&&a.zone.cancelTask(a):t.apply(e,r)})}function Ge(e,t){let{isBrowser:n,isMix:r}=t.getGlobalObjects();(n||r)&&e.customElements&&`customElements`in e&&t.patchCallbacks(t,e.customElements,`customElements`,`define`,[`connectedCallback`,`disconnectedCallback`,`adoptedCallback`,`attributeChangedCallback`,`formAssociatedCallback`,`formDisabledCallback`,`formResetCallback`,`formStateRestoreCallback`])}function Ke(e,t){if(Zone[t.symbol(`patchEventTarget`)])return;let{eventNames:n,zoneSymbolEventNames:r,TRUE_STR:i,FALSE_STR:a,ZONE_SYMBOL_PREFIX:o}=t.getGlobalObjects();for(let e=0;et.target===e);if(r.length===0)return t;let i=r[0].ignoreProperties;return t.filter(e=>i.indexOf(e)===-1)}function Ye(e,t,n,r){e&&we(e,Je(e,t,n),r)}function Xe(e){return Object.getOwnPropertyNames(e).filter(e=>e.startsWith(`on`)&&e.length>2).map(e=>e.substring(2))}function eee(e,t){if(_e&&!ye||Zone[e.symbol(`patchEvents`)])return;let n=t.__Zone_ignore_on_properties,r=[];if(ve){let e=window;r=r.concat([`Document`,`SVGElement`,`Element`,`HTMLElement`,`HTMLBodyElement`,`HTMLMediaElement`,`HTMLFrameSetElement`,`HTMLFrameElement`,`HTMLIFrameElement`,`HTMLMarqueeElement`,`Worker`]),Ye(e,Xe(e),n,p(e))}r=r.concat([`XMLHttpRequest`,`XMLHttpRequestEventTarget`,`IDBIndex`,`IDBRequest`,`IDBOpenDBRequest`,`IDBDatabase`,`IDBTransaction`,`IDBCursor`,`WebSocket`]);for(let e=0;e{let t=`clear`;We(e,`set`,t,`Timeout`),We(e,`set`,t,`Interval`),We(e,`set`,t,`Immediate`)}),e.__load_patch(`requestAnimationFrame`,e=>{We(e,`request`,`cancel`,`AnimationFrame`),We(e,`mozRequest`,`mozCancel`,`AnimationFrame`),We(e,`webkitRequest`,`webkitCancel`,`AnimationFrame`)}),e.__load_patch(`blocking`,(e,t)=>{let n=[`alert`,`prompt`,`confirm`];for(let r=0;rfunction(r,a){return t.current.run(n,e,a,i)})}}),e.__load_patch(`EventTarget`,(e,t,n)=>{qe(e,n),Ke(e,n);let r=e.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(e,n,[r.prototype])}),e.__load_patch(`MutationObserver`,(e,t,n)=>{Ee(`MutationObserver`),Ee(`WebKitMutationObserver`)}),e.__load_patch(`IntersectionObserver`,(e,t,n)=>{Ee(`IntersectionObserver`)}),e.__load_patch(`FileReader`,(e,t,n)=>{Ee(`FileReader`)}),e.__load_patch(`on_property`,(e,t,n)=>{eee(n,e)}),e.__load_patch(`customElements`,(e,t,n)=>{Ge(e,n)}),e.__load_patch(`XHR`,(e,t)=>{c(e);let n=ce(`xhrTask`),r=ce(`xhrSync`),i=ce(`xhrListener`),a=ce(`xhrScheduled`),o=ce(`xhrURL`),s=ce(`xhrErrorBeforeScheduled`);function c(e){let c=e.XMLHttpRequest;if(!c)return;let l=c.prototype;function u(e){return e[n]}let d=l[te],f=l[ne];if(!d){let t=e.XMLHttpRequestEventTarget;if(t){let e=t.prototype;d=e[te],f=e[ne]}}let p=`readystatechange`,m=`scheduled`;function ee(e){let r=e.data,o=r.target;o[a]=!1,o[s]=!1;let c=o[i];d||(d=o[te],f=o[ne]),c&&f.call(o,p,c);let l=o[i]=()=>{if(o.readyState===o.DONE){if(!r.aborted&&o[a]&&e.state===m){let n=o[t.__symbol__(`loadfalse`)];if(o.status!==0&&n&&n.length>0){let i=e.invoke;e.invoke=function(){let n=o[t.__symbol__(`loadfalse`)];for(let t=0;tfunction(e,t){return e[r]=t[2]==0,e[o]=t[1],re.apply(e,t)}),ie=ce(`fetchTaskAborting`),ae=ce(`fetchTaskScheduling`),oe=De(l,`send`,()=>function(e,n){if(t.current[ae]===!0||e[r])return oe.apply(e,n);{let t={target:e,url:e[o],isPeriodic:!1,args:n,aborted:!1},r=se(`XMLHttpRequest.send`,h,t,ee,g);e&&e[s]===!0&&!t.aborted&&r.state===m&&r.invoke()}}),le=De(l,`abort`,()=>function(e,n){let r=u(e);if(r&&typeof r.type==`string`){if(r.cancelFn==null||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}else if(t.current[ie]===!0)return le.apply(e,n)})}}),e.__load_patch(`geolocation`,e=>{e.navigator&&e.navigator.geolocation&&me(e.navigator.geolocation,[`getCurrentPosition`,`watchPosition`])}),e.__load_patch(`PromiseRejectionEvent`,(e,t)=>{function n(t){return function(n){Be(e,t).forEach(r=>{let i=e.PromiseRejectionEvent;if(i){let e=new i(t,{promise:n.promise,reason:n.rejection});r.invoke(e)}})}}e.PromiseRejectionEvent&&(t[ce(`unhandledPromiseRejectionHandler`)]=n(`unhandledrejection`),t[ce(`rejectionHandledHandler`)]=n(`rejectionhandled`))}),e.__load_patch(`queueMicrotask`,(e,t,n)=>{He(e,n)})}function Ze(e){e.__load_patch(`ZoneAwarePromise`,(e,t,n)=>{let r=Object.getOwnPropertyDescriptor,i=Object.defineProperty;function a(e){return e&&e.toString===Object.prototype.toString?(e.constructor&&e.constructor.name||``)+`: `+JSON.stringify(e):e?e.toString():Object.prototype.toString.call(e)}let o=n.symbol,s=[],c=e[o(`DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION`)]!==!1,l=o(`Promise`),u=o(`then`);n.onUnhandledError=e=>{if(n.showUncaughtError()){let t=e&&e.rejection;t&&e.zone&&e.task?console.error(`Unhandled Promise rejection:`,t instanceof Error?t.message:t,`; Zone:`,e.zone.name,`; Task:`,e.task&&e.task.source,`; Value:`,t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=()=>{for(;s.length;){let e=s.shift();try{e.zone.runGuarded(()=>{throw e.throwOriginal?e.rejection:e})}catch(e){f(e)}}};let d=o(`unhandledPromiseRejectionHandler`);function f(e){n.onUnhandledError(e);try{let n=t[d];typeof n==`function`&&n.call(this,e)}catch{}}function p(e){return e&&typeof e.then==`function`}function m(e){return e}function ee(e){return pe.reject(e)}let h=o(`state`),g=o(`value`),te=o(`finally`),ne=o(`parentPromiseValue`),re=o(`parentPromiseState`);function ie(e,t){return n=>{try{se(e,t,n)}catch(t){se(e,!1,t)}}}let ae=function(){let e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},oe=o(`currentTaskTrace`);function se(e,r,o){let l=ae();if(e===o)throw TypeError(`Promise resolved with itself`);if(e[h]===null){let u=null;try{(typeof o==`object`||typeof o==`function`)&&(u=o&&o.then)}catch(t){return l(()=>{se(e,!1,t)})(),e}if(r!==!1&&o instanceof pe&&Object.hasOwn(o,h)&&Object.hasOwn(o,g)&&o[h]!==null)le(o),se(e,o[h],o[g]);else if(r!==!1&&typeof u==`function`)try{u.call(o,l(ie(e,r)),l(ie(e,!1)))}catch(t){l(()=>{se(e,!1,t)})()}else{e[h]=r;let l=e[g];if(e[g]=o,e[te]===te&&r===!0&&(e[h]=e[re],e[g]=e[ne]),r===!1&&o instanceof Error){let e=t.currentTask&&t.currentTask.data&&t.currentTask.data.__creationTrace__;e&&i(o,oe,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t{try{let r=e[g],i=!!n&&te===n[te];i&&(n[ne]=r,n[re]=a),se(n,!0,t.run(o,void 0,i&&o!==ee&&o!==m?[]:[r]))}catch(e){se(n,!1,e)}},n)}let de=function(){},fe=e.AggregateError;class pe{static toString(){return`function ZoneAwarePromise() { [native code] }`}static resolve(e){return e instanceof pe?e:se(new this(null),!0,e)}static reject(e){return se(new this(null),!1,e)}static withResolvers(){let e={};return e.promise=new pe((t,n)=>{e.resolve=t,e.reject=n}),e}static any(e){if(!e||typeof e[Symbol.iterator]!=`function`)return Promise.reject(new fe([],`All promises were rejected`));let t=[],n=0;try{for(let r of e)n++,t.push(pe.resolve(r))}catch{return Promise.reject(new fe([],`All promises were rejected`))}if(n===0)return Promise.reject(new fe([],`All promises were rejected`));let r=!1,i=[];return new pe((e,a)=>{for(let o=0;o{r||(r=!0,e(t))},e=>{i.push(e),n--,n===0&&(r=!0,a(new fe(i,`All promises were rejected`)))})})}static race(e){let t,n,r=new this((e,r)=>{t=e,n=r});function i(e){t(e)}function a(e){n(e)}for(let t of e)p(t)||(t=this.resolve(t)),t.then(i,a);return r}static all(e){return pe.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof pe?this:pe).allWithCallback(e,{thenCallback:e=>({status:`fulfilled`,value:e}),errorCallback:e=>({status:`rejected`,reason:e})})}static allWithCallback(e,t){let n,r,i=new this((e,t)=>{n=e,r=t}),a=2,o=0,s=[];for(let i of e){p(i)||(i=this.resolve(i));let e=o;try{i.then(r=>{s[e]=t?t.thenCallback(r):r,a--,a===0&&n(s)},i=>{t?(s[e]=t.errorCallback(i),a--,a===0&&n(s)):r(i)})}catch(e){r(e)}a++,o++}return a-=2,a===0&&n(s),i}constructor(e){let t=this;if(!(t instanceof pe))throw Error(`Must be an instanceof Promise.`);t[h]=null,t[g]=[];try{let n=ae();e&&e(n(ie(t,!0)),n(ie(t,!1)))}catch(e){se(t,!1,e)}}get[Symbol.toStringTag](){return`Promise`}get[Symbol.species](){return pe}then(e,n){let r=this.constructor?.[Symbol.species];(!r||typeof r!=`function`)&&(r=this.constructor||pe);let i=new r(de),a=t.current;return this[h]==null?this[g].push(a,i,e,n):ue(this,a,i,e,n),i}catch(e){return this.then(null,e)}finally(e){let n=this.constructor?.[Symbol.species];(!n||typeof n!=`function`)&&(n=pe);let r=new n(de);r[te]=te;let i=t.current;return this[h]==null?this[g].push(i,r,e,e):ue(this,i,r,e,e),r}}pe.resolve=pe.resolve,pe.reject=pe.reject,pe.race=pe.race,pe.all=pe.all;let me=e[l]=e.Promise;e.Promise=pe;let he=o(`thenPatched`);function ge(e){let t=e.prototype,n=r(t,`then`);if(n&&(n.writable===!1||!n.configurable))return;let i=t.then;t[u]=i,e.prototype.then=function(e,t){return new pe((e,t)=>{i.call(this,e,t)}).then(e,t)},e[he]=!0}n.patchThen=ge;function _e(e){return function(t,n){let r=e.apply(t,n);if(r instanceof pe)return r;let i=r.constructor;return i[he]||ge(i),r}}if(me){ge(me);let t=me.try;t&&typeof t==`function`&&(pe.try=t),De(e,`fetch`,e=>_e(e))}return Promise[t.__symbol__(`uncaughtPromiseErrors`)]=s,pe})}function Qe(e){e.__load_patch(`toString`,e=>{let t=Function.prototype.toString,n=ce(`OriginalDelegate`),r=ce(`Promise`),i=ce(`Error`),a=function(){if(typeof this==`function`){let a=this[n];if(a)return typeof a==`function`?t.call(a):Object.prototype.toString.call(a);if(this===Promise){let n=e[r];if(n)return t.call(n)}if(this===Error){let n=e[i];if(n)return t.call(n)}}return t.call(this)};a[n]=t,Function.prototype.toString=a;let o=Object.prototype.toString;Object.prototype.toString=function(){return typeof Promise==`function`&&this instanceof Promise?`[object Promise]`:o.call(this)}})}function $e(e,t,n,r,i){let a=Zone.__symbol__(r);if(t[a])return;let o=t[a]=t[r];t[r]=function(a,s,c){return s&&s.prototype&&i.forEach(function(t){let i=`${n}.${r}::`+t,a=s.prototype;try{if(Object.hasOwn(a,t)){let n=e.ObjectGetOwnPropertyDescriptor(a,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,i),e._redefineProperty(s.prototype,t,n)):a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],i))}else a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],i))}catch{}}),o.call(t,a,s,c)},e.attachOriginToPatched(t[r],o)}function et(e){e.__load_patch(`util`,(e,t,n)=>{let r=Xe(e);n.patchOnProperties=we,n.patchMethod=De,n.bindArguments=pe,n.patchMacroTask=Oe;let i=t.__symbol__(`BLACK_LISTED_EVENTS`),a=t.__symbol__(`UNPATCHED_EVENTS`);e[a]&&(e[i]=e[a]),e[i]&&(t[i]=t[a]=e[i]),n.patchEventPrototype=Ve,n.patchEventTarget=ze,n.ObjectDefineProperty=f,n.ObjectGetOwnPropertyDescriptor=d,n.ObjectCreate=m,n.ArraySlice=ee,n.patchClass=Ee,n.wrapWithCurrentZone=oe,n.filterProperties=Je,n.attachOriginToPatched=ke,n._redefineProperty=Object.defineProperty,n.patchCallbacks=$e,n.getGlobalObjects=()=>({globalSources:Pe,zoneSymbolEventNames:Ne,eventNames:r,isBrowser:ve,isMix:ye,isNode:_e,TRUE_STR:re,FALSE_STR:ie,ZONE_SYMBOL_PREFIX:ae,ADD_EVENT_LISTENER_STR:h,REMOVE_EVENT_LISTENER_STR:g})})}function tt(e){Ze(e),Qe(e),et(e)}var nt=u();tt(nt),tee(nt);var rt=(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})(rt||{}),it=(function(e){return e[e.None=0]=`None`,e[e.Const=1]=`Const`,e})(it||{}),at=class{modifiers;constructor(e=it.None){this.modifiers=e}hasModifier(e){return(this.modifiers&e)!==0}},ot=(function(e){return e[e.Dynamic=0]=`Dynamic`,e[e.Bool=1]=`Bool`,e[e.String=2]=`String`,e[e.Int=3]=`Int`,e[e.Number=4]=`Number`,e[e.Function=5]=`Function`,e[e.Inferred=6]=`Inferred`,e[e.None=7]=`None`,e})(ot||{}),st=class extends at{name;constructor(e,t){super(t),this.name=e}visitType(e,t){return e.visitBuiltinType(this,t)}};ot.Dynamic;var ct=new st(ot.Inferred);ot.Bool,ot.Int,ot.Number,ot.String,ot.Function,ot.None;var _=(function(e){return e[e.Equals=0]=`Equals`,e[e.NotEquals=1]=`NotEquals`,e[e.Assign=2]=`Assign`,e[e.Identical=3]=`Identical`,e[e.NotIdentical=4]=`NotIdentical`,e[e.Minus=5]=`Minus`,e[e.Plus=6]=`Plus`,e[e.Divide=7]=`Divide`,e[e.Multiply=8]=`Multiply`,e[e.Modulo=9]=`Modulo`,e[e.And=10]=`And`,e[e.Or=11]=`Or`,e[e.BitwiseOr=12]=`BitwiseOr`,e[e.BitwiseAnd=13]=`BitwiseAnd`,e[e.Lower=14]=`Lower`,e[e.LowerEquals=15]=`LowerEquals`,e[e.Bigger=16]=`Bigger`,e[e.BiggerEquals=17]=`BiggerEquals`,e[e.NullishCoalesce=18]=`NullishCoalesce`,e[e.Exponentiation=19]=`Exponentiation`,e[e.In=20]=`In`,e[e.InstanceOf=21]=`InstanceOf`,e[e.AdditionAssignment=22]=`AdditionAssignment`,e[e.SubtractionAssignment=23]=`SubtractionAssignment`,e[e.MultiplicationAssignment=24]=`MultiplicationAssignment`,e[e.DivisionAssignment=25]=`DivisionAssignment`,e[e.RemainderAssignment=26]=`RemainderAssignment`,e[e.ExponentiationAssignment=27]=`ExponentiationAssignment`,e[e.AndAssignment=28]=`AndAssignment`,e[e.OrAssignment=29]=`OrAssignment`,e[e.NullishCoalesceAssignment=30]=`NullishCoalesceAssignment`,e})(_||{});function lt(e,t){return e==null||t==null?e==t:e.isEquivalent(t)}function ut(e,t,n){let r=e.length;if(r!==t.length)return!1;for(let i=0;ie.isEquivalent(t))}var ft=class{leadingComments;type;sourceSpan;constructor(e,t,n){this.leadingComments=n,this.type=e||null,this.sourceSpan=t||null}prop(e,t){return new St(this,e,null,t)}key(e,t,n){return new nee(this,e,t,n)}callFn(e,t,n,r){return new ht(this,e,null,t,n,r)}instantiate(e,t,n,r){return new gt(this,e,t,n)}conditional(e,t=null,n,r){return new bt(this,e,t,null,n)}equals(e,t){return new xt(_.Equals,this,e,null,t)}notEquals(e,t){return new xt(_.NotEquals,this,e,null,t)}identical(e,t){return new xt(_.Identical,this,e,null,t)}notIdentical(e,t){return new xt(_.NotIdentical,this,e,null,t)}minus(e,t){return new xt(_.Minus,this,e,null,t)}plus(e,t){return new xt(_.Plus,this,e,null,t)}divide(e,t){return new xt(_.Divide,this,e,null,t)}multiply(e,t){return new xt(_.Multiply,this,e,null,t)}modulo(e,t){return new xt(_.Modulo,this,e,null,t)}power(e,t){return new xt(_.Exponentiation,this,e,null,t)}and(e,t){return new xt(_.And,this,e,null,t)}bitwiseOr(e,t){return new xt(_.BitwiseOr,this,e,null,t)}bitwiseAnd(e,t){return new xt(_.BitwiseAnd,this,e,null,t)}or(e,t){return new xt(_.Or,this,e,null,t)}lower(e,t){return new xt(_.Lower,this,e,null,t)}lowerEquals(e,t){return new xt(_.LowerEquals,this,e,null,t)}bigger(e,t){return new xt(_.Bigger,this,e,null,t)}biggerEquals(e,t){return new xt(_.BiggerEquals,this,e,null,t)}isBlank(e){return this.equals(see,e)}nullishCoalesce(e,t){return new xt(_.NullishCoalesce,this,e,null,t)}toStmt(e){return new lee(this,null,e)}},pt=class e extends ft{name;constructor(e,t,n,r){super(t,n,r),this.name=e}isEquivalent(t){return t instanceof e&&this.name===t.name}isConstant(){return!1}visitExpression(e,t){return e.visitReadVarExpr(this,t)}clone(){return new e(this.name,this.type,this.sourceSpan)}set(e){return new xt(_.Assign,this,e,null,this.sourceSpan)}},mt=class e extends ft{expr;constructor(e,t,n,r){super(t,n,r),this.expr=e}visitExpression(e,t){return e.visitTypeofExpr(this,t)}isEquivalent(t){return t instanceof e&&t.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new e(this.expr.clone())}},ht=class e extends ft{fn;args;pure;isOptional;constructor(e,t,n,r,i=!1,a,o=!1){super(n,r,a),this.fn=e,this.args=t,this.pure=i,this.isOptional=o}get receiver(){return this.fn}isEquivalent(t){return t instanceof e&&this.fn.isEquivalent(t.fn)&&dt(this.args,t.args)&&this.pure===t.pure}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeFunctionExpr(this,t)}clone(){return new e(this.fn.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan,this.pure,[],this.isOptional)}},gt=class e extends ft{classExpr;args;constructor(e,t,n,r,i){super(n,r,i),this.classExpr=e,this.args=t}isEquivalent(t){return t instanceof e&&this.classExpr.isEquivalent(t.classExpr)&&dt(this.args,t.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInstantiateExpr(this,t)}clone(){return new e(this.classExpr.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan)}},_t=class e extends ft{body;flags;constructor(e,t,n,r){super(null,n,r),this.body=e,this.flags=t}isEquivalent(t){return t instanceof e&&this.body===t.body&&this.flags===t.flags}isConstant(){return!0}visitExpression(e,t){return e.visitRegularExpressionLiteral(this,t)}clone(){return new e(this.body,this.flags,this.sourceSpan)}},vt=class e extends ft{value;constructor(e,t,n,r){super(t,n,r),this.value=e}isEquivalent(t){return t instanceof e&&this.value===t.value}isConstant(){return!0}visitExpression(e,t){return e.visitLiteralExpr(this,t)}clone(){return new e(this.value,this.type,this.sourceSpan)}},yt=class e extends ft{value;typeParams;constructor(e,t,n=null,r,i){super(t,r,i),this.value=e,this.typeParams=n}isEquivalent(t){return t instanceof e&&this.value.name===t.value.name&&this.value.moduleName===t.value.moduleName}isConstant(){return!1}visitExpression(e,t){return e.visitExternalExpr(this,t)}clone(){return new e(this.value,this.type,this.typeParams,this.sourceSpan)}},bt=class e extends ft{condition;falseCase;trueCase;constructor(e,t,n=null,r,i,a){super(r||t.type,i,a),this.condition=e,this.falseCase=n,this.trueCase=t}isEquivalent(t){return t instanceof e&&this.condition.isEquivalent(t.condition)&&this.trueCase.isEquivalent(t.trueCase)&<(this.falseCase,t.falseCase)}isConstant(){return!1}visitExpression(e,t){return e.visitConditionalExpr(this,t)}clone(){return new e(this.condition.clone(),this.trueCase.clone(),this.falseCase?.clone(),this.type,this.sourceSpan)}},xt=class e extends ft{operator;rhs;lhs;constructor(e,t,n,r,i,a){super(r||t.type,i,a),this.operator=e,this.rhs=n,this.lhs=t}isEquivalent(t){return t instanceof e&&this.operator===t.operator&&this.lhs.isEquivalent(t.lhs)&&this.rhs.isEquivalent(t.rhs)}isConstant(){return!1}visitExpression(e,t){return e.visitBinaryOperatorExpr(this,t)}clone(){return new e(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan)}isAssignment(){let e=this.operator;return e===_.Assign||e===_.AdditionAssignment||e===_.SubtractionAssignment||e===_.MultiplicationAssignment||e===_.DivisionAssignment||e===_.RemainderAssignment||e===_.ExponentiationAssignment||e===_.AndAssignment||e===_.OrAssignment||e===_.NullishCoalesceAssignment}},St=class e extends ft{receiver;name;isOptional;constructor(e,t,n,r,i,a=!1){super(n,r,i),this.receiver=e,this.name=t,this.isOptional=a}get index(){return this.name}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name&&this.isOptional===t.isOptional}isConstant(){return!1}visitExpression(e,t){return e.visitReadPropExpr(this,t)}set(e){return new xt(_.Assign,this.receiver.prop(this.name),e,null,this.sourceSpan)}clone(){return new e(this.receiver.clone(),this.name,this.type,this.sourceSpan,[],this.isOptional)}},nee=class e extends ft{receiver;index;isOptional;constructor(e,t,n,r,i,a=!1){super(n,r,i),this.receiver=e,this.index=t,this.isOptional=a}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)&&this.isOptional===t.isOptional}isConstant(){return!1}visitExpression(e,t){return e.visitReadKeyExpr(this,t)}set(e){return new xt(_.Assign,this.receiver.key(this.index),e,null,this.sourceSpan)}clone(){return new e(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan,[],this.isOptional)}},ree=class e extends ft{entries;constructor(e,t,n,r){super(t,n,r),this.entries=e}isConstant(){return this.entries.every(e=>e.isConstant())}isEquivalent(t){return t instanceof e&&dt(this.entries,t.entries)}visitExpression(e,t){return e.visitLiteralArrayExpr(this,t)}clone(){return new e(this.entries.map(e=>e.clone()),this.type,this.sourceSpan)}},iee=class e{expression;constructor(e){this.expression=e}isEquivalent(t){return t instanceof e&&this.expression.isEquivalent(t.expression)}clone(){return new e(this.expression.clone())}isConstant(){return this.expression.isConstant()}},aee=class e extends ft{entries;valueType=null;constructor(e,t,n,r){super(t,n,r),this.entries=e,t&&(this.valueType=t.valueType)}isEquivalent(t){return t instanceof e&&dt(this.entries,t.entries)}isConstant(){return this.entries.every(e=>e.isConstant())}visitExpression(e,t){return e.visitLiteralMapExpr(this,t)}clone(){let t=this.entries.map(e=>e.clone());return new e(t,this.type,this.sourceSpan)}},oee=class e extends ft{expression;constructor(e,t,n){super(null,t,n),this.expression=e}isEquivalent(t){return t instanceof e&&this.expression.isEquivalent(t.expression)}isConstant(){return this.expression.isConstant()}visitExpression(e,t){return e.visitSpreadElementExpr(this,t)}clone(){return new e(this.expression.clone(),this.sourceSpan)}},see=new vt(null,ct,null),Ct=(function(e){return e[e.None=0]=`None`,e[e.Final=1]=`Final`,e[e.Private=2]=`Private`,e[e.Exported=4]=`Exported`,e[e.Static=8]=`Static`,e})(Ct||{}),cee=class{modifiers;sourceSpan;leadingComments;constructor(e=Ct.None,t=null,n){this.modifiers=e,this.sourceSpan=t,this.leadingComments=n}hasModifier(e){return(this.modifiers&e)!==0}addLeadingComment(e){this.leadingComments=this.leadingComments??[],this.leadingComments.push(e)}},lee=class e extends cee{expr;constructor(e,t,n){super(Ct.None,t,n),this.expr=e}isEquivalent(t){return t instanceof e&&this.expr.isEquivalent(t.expr)}visitStatement(e,t){return e.visitExpressionStmt(this,t)}};(class e{static INSTANCE=new e;keyOf(e){if(e instanceof vt&&typeof e.value==`string`)return`"${e.value}"`;if(e instanceof vt)return String(e.value);if(e instanceof _t)return`/${e.body}/${e.flags??``}`;if(e instanceof ree){let t=[];for(let n of e.entries)t.push(this.keyOf(n));return`[${t.join(`,`)}]`}if(e instanceof aee){let t=[];for(let n of e.entries)if(n instanceof iee)t.push(`...`+this.keyOf(n.expression));else{let e=n.key;n.quoted&&(e=`"${e}"`),t.push(e+`:`+this.keyOf(n.value))}return`{${t.join(`,`)}}`}if(e instanceof yt)return`import("${e.value.moduleName}", ${e.value.name})`;if(e instanceof pt)return`read(${e.name})`;if(e instanceof mt)return`typeof(${this.keyOf(e.expr)})`;if(e instanceof oee)return`...${this.keyOf(e.expression)}`;throw Error(`${this.constructor.name} does not handle expressions of type ${e.constructor.name}`)}});var v=`@angular/core`,y=(()=>{class e{static core={name:null,moduleName:v};static namespaceHTML={name:`ɵɵnamespaceHTML`,moduleName:v};static namespaceMathML={name:`ɵɵnamespaceMathML`,moduleName:v};static namespaceSVG={name:`ɵɵnamespaceSVG`,moduleName:v};static element={name:`ɵɵelement`,moduleName:v};static elementStart={name:`ɵɵelementStart`,moduleName:v};static elementEnd={name:`ɵɵelementEnd`,moduleName:v};static foreignComponent={name:`ɵɵforeignComponent`,moduleName:v};static foreignContent={name:`ɵɵforeignContent`,moduleName:v};static foreignContentFn={name:`ɵɵforeignContentFn`,moduleName:v};static domElement={name:`ɵɵdomElement`,moduleName:v};static domElementStart={name:`ɵɵdomElementStart`,moduleName:v};static domElementEnd={name:`ɵɵdomElementEnd`,moduleName:v};static domElementContainer={name:`ɵɵdomElementContainer`,moduleName:v};static domElementContainerStart={name:`ɵɵdomElementContainerStart`,moduleName:v};static domElementContainerEnd={name:`ɵɵdomElementContainerEnd`,moduleName:v};static domTemplate={name:`ɵɵdomTemplate`,moduleName:v};static domListener={name:`ɵɵdomListener`,moduleName:v};static advance={name:`ɵɵadvance`,moduleName:v};static syntheticHostProperty={name:`ɵɵsyntheticHostProperty`,moduleName:v};static syntheticHostListener={name:`ɵɵsyntheticHostListener`,moduleName:v};static attribute={name:`ɵɵattribute`,moduleName:v};static classProp={name:`ɵɵclassProp`,moduleName:v};static elementContainerStart={name:`ɵɵelementContainerStart`,moduleName:v};static elementContainerEnd={name:`ɵɵelementContainerEnd`,moduleName:v};static elementContainer={name:`ɵɵelementContainer`,moduleName:v};static styleMap={name:`ɵɵstyleMap`,moduleName:v};static classMap={name:`ɵɵclassMap`,moduleName:v};static styleProp={name:`ɵɵstyleProp`,moduleName:v};static interpolate={name:`ɵɵinterpolate`,moduleName:v};static interpolate1={name:`ɵɵinterpolate1`,moduleName:v};static interpolate2={name:`ɵɵinterpolate2`,moduleName:v};static interpolate3={name:`ɵɵinterpolate3`,moduleName:v};static interpolate4={name:`ɵɵinterpolate4`,moduleName:v};static interpolate5={name:`ɵɵinterpolate5`,moduleName:v};static interpolate6={name:`ɵɵinterpolate6`,moduleName:v};static interpolate7={name:`ɵɵinterpolate7`,moduleName:v};static interpolate8={name:`ɵɵinterpolate8`,moduleName:v};static interpolateV={name:`ɵɵinterpolateV`,moduleName:v};static nextContext={name:`ɵɵnextContext`,moduleName:v};static resetView={name:`ɵɵresetView`,moduleName:v};static templateCreate={name:`ɵɵtemplate`,moduleName:v};static defer={name:`ɵɵdefer`,moduleName:v};static deferWhen={name:`ɵɵdeferWhen`,moduleName:v};static deferOnIdle={name:`ɵɵdeferOnIdle`,moduleName:v};static deferOnImmediate={name:`ɵɵdeferOnImmediate`,moduleName:v};static deferOnTimer={name:`ɵɵdeferOnTimer`,moduleName:v};static deferOnHover={name:`ɵɵdeferOnHover`,moduleName:v};static deferOnInteraction={name:`ɵɵdeferOnInteraction`,moduleName:v};static deferOnViewport={name:`ɵɵdeferOnViewport`,moduleName:v};static deferPrefetchWhen={name:`ɵɵdeferPrefetchWhen`,moduleName:v};static deferPrefetchOnIdle={name:`ɵɵdeferPrefetchOnIdle`,moduleName:v};static deferPrefetchOnImmediate={name:`ɵɵdeferPrefetchOnImmediate`,moduleName:v};static deferPrefetchOnTimer={name:`ɵɵdeferPrefetchOnTimer`,moduleName:v};static deferPrefetchOnHover={name:`ɵɵdeferPrefetchOnHover`,moduleName:v};static deferPrefetchOnInteraction={name:`ɵɵdeferPrefetchOnInteraction`,moduleName:v};static deferPrefetchOnViewport={name:`ɵɵdeferPrefetchOnViewport`,moduleName:v};static deferHydrateWhen={name:`ɵɵdeferHydrateWhen`,moduleName:v};static deferHydrateNever={name:`ɵɵdeferHydrateNever`,moduleName:v};static deferHydrateOnIdle={name:`ɵɵdeferHydrateOnIdle`,moduleName:v};static deferHydrateOnImmediate={name:`ɵɵdeferHydrateOnImmediate`,moduleName:v};static deferHydrateOnTimer={name:`ɵɵdeferHydrateOnTimer`,moduleName:v};static deferHydrateOnHover={name:`ɵɵdeferHydrateOnHover`,moduleName:v};static deferHydrateOnInteraction={name:`ɵɵdeferHydrateOnInteraction`,moduleName:v};static deferHydrateOnViewport={name:`ɵɵdeferHydrateOnViewport`,moduleName:v};static deferEnableTimerScheduling={name:`ɵɵdeferEnableTimerScheduling`,moduleName:v};static enableIncrementalHydrationRuntime={name:`ɵɵenableIncrementalHydrationRuntime`,moduleName:v};static conditionalCreate={name:`ɵɵconditionalCreate`,moduleName:v};static conditionalBranchCreate={name:`ɵɵconditionalBranchCreate`,moduleName:v};static conditional={name:`ɵɵconditional`,moduleName:v};static repeater={name:`ɵɵrepeater`,moduleName:v};static repeaterCreate={name:`ɵɵrepeaterCreate`,moduleName:v};static repeaterTrackByIndex={name:`ɵɵrepeaterTrackByIndex`,moduleName:v};static repeaterTrackByIdentity={name:`ɵɵrepeaterTrackByIdentity`,moduleName:v};static componentInstance={name:`ɵɵcomponentInstance`,moduleName:v};static text={name:`ɵɵtext`,moduleName:v};static enableBindings={name:`ɵɵenableBindings`,moduleName:v};static disableBindings={name:`ɵɵdisableBindings`,moduleName:v};static getCurrentView={name:`ɵɵgetCurrentView`,moduleName:v};static textInterpolate={name:`ɵɵtextInterpolate`,moduleName:v};static textInterpolate1={name:`ɵɵtextInterpolate1`,moduleName:v};static textInterpolate2={name:`ɵɵtextInterpolate2`,moduleName:v};static textInterpolate3={name:`ɵɵtextInterpolate3`,moduleName:v};static textInterpolate4={name:`ɵɵtextInterpolate4`,moduleName:v};static textInterpolate5={name:`ɵɵtextInterpolate5`,moduleName:v};static textInterpolate6={name:`ɵɵtextInterpolate6`,moduleName:v};static textInterpolate7={name:`ɵɵtextInterpolate7`,moduleName:v};static textInterpolate8={name:`ɵɵtextInterpolate8`,moduleName:v};static textInterpolateV={name:`ɵɵtextInterpolateV`,moduleName:v};static restoreView={name:`ɵɵrestoreView`,moduleName:v};static pureFunction0={name:`ɵɵpureFunction0`,moduleName:v};static pureFunction1={name:`ɵɵpureFunction1`,moduleName:v};static pureFunction2={name:`ɵɵpureFunction2`,moduleName:v};static pureFunction3={name:`ɵɵpureFunction3`,moduleName:v};static pureFunction4={name:`ɵɵpureFunction4`,moduleName:v};static pureFunction5={name:`ɵɵpureFunction5`,moduleName:v};static pureFunction6={name:`ɵɵpureFunction6`,moduleName:v};static pureFunction7={name:`ɵɵpureFunction7`,moduleName:v};static pureFunction8={name:`ɵɵpureFunction8`,moduleName:v};static pureFunctionV={name:`ɵɵpureFunctionV`,moduleName:v};static pipeBind1={name:`ɵɵpipeBind1`,moduleName:v};static pipeBind2={name:`ɵɵpipeBind2`,moduleName:v};static pipeBind3={name:`ɵɵpipeBind3`,moduleName:v};static pipeBind4={name:`ɵɵpipeBind4`,moduleName:v};static pipeBindV={name:`ɵɵpipeBindV`,moduleName:v};static domProperty={name:`ɵɵdomProperty`,moduleName:v};static ariaProperty={name:`ɵɵariaProperty`,moduleName:v};static property={name:`ɵɵproperty`,moduleName:v};static control={name:`ɵɵcontrol`,moduleName:v};static controlCreate={name:`ɵɵcontrolCreate`,moduleName:v};static animationEnterListener={name:`ɵɵanimateEnterListener`,moduleName:v};static animationLeaveListener={name:`ɵɵanimateLeaveListener`,moduleName:v};static animationEnter={name:`ɵɵanimateEnter`,moduleName:v};static animationLeave={name:`ɵɵanimateLeave`,moduleName:v};static i18n={name:`ɵɵi18n`,moduleName:v};static i18nAttributes={name:`ɵɵi18nAttributes`,moduleName:v};static i18nExp={name:`ɵɵi18nExp`,moduleName:v};static i18nStart={name:`ɵɵi18nStart`,moduleName:v};static i18nEnd={name:`ɵɵi18nEnd`,moduleName:v};static i18nApply={name:`ɵɵi18nApply`,moduleName:v};static i18nPostprocess={name:`ɵɵi18nPostprocess`,moduleName:v};static pipe={name:`ɵɵpipe`,moduleName:v};static projection={name:`ɵɵprojection`,moduleName:v};static projectionDef={name:`ɵɵprojectionDef`,moduleName:v};static reference={name:`ɵɵreference`,moduleName:v};static inject={name:`ɵɵinject`,moduleName:v};static injectAttribute={name:`ɵɵinjectAttribute`,moduleName:v};static directiveInject={name:`ɵɵdirectiveInject`,moduleName:v};static invalidFactory={name:`ɵɵinvalidFactory`,moduleName:v};static invalidFactoryDep={name:`ɵɵinvalidFactoryDep`,moduleName:v};static templateRefExtractor={name:`ɵɵtemplateRefExtractor`,moduleName:v};static forwardRef={name:`forwardRef`,moduleName:v};static resolveForwardRef={name:`resolveForwardRef`,moduleName:v};static replaceMetadata={name:`ɵɵreplaceMetadata`,moduleName:v};static getReplaceMetadataURL={name:`ɵɵgetReplaceMetadataURL`,moduleName:v};static ɵɵdefineInjectable={name:`ɵɵdefineInjectable`,moduleName:v};static declareInjectable={name:`ɵɵngDeclareInjectable`,moduleName:v};static InjectableDeclaration={name:`ɵɵInjectableDeclaration`,moduleName:v};static defineService={name:`ɵɵdefineService`,moduleName:v};static declareService={name:`ɵɵngDeclareService`,moduleName:v};static resolveWindow={name:`ɵɵresolveWindow`,moduleName:v};static resolveDocument={name:`ɵɵresolveDocument`,moduleName:v};static resolveBody={name:`ɵɵresolveBody`,moduleName:v};static getComponentDepsFactory={name:`ɵɵgetComponentDepsFactory`,moduleName:v};static defineComponent={name:`ɵɵdefineComponent`,moduleName:v};static declareComponent={name:`ɵɵngDeclareComponent`,moduleName:v};static setComponentScope={name:`ɵɵsetComponentScope`,moduleName:v};static ChangeDetectionStrategy={name:`ChangeDetectionStrategy`,moduleName:v};static ViewEncapsulation={name:`ViewEncapsulation`,moduleName:v};static ComponentDeclaration={name:`ɵɵComponentDeclaration`,moduleName:v};static FactoryDeclaration={name:`ɵɵFactoryDeclaration`,moduleName:v};static declareFactory={name:`ɵɵngDeclareFactory`,moduleName:v};static FactoryTarget={name:`ɵɵFactoryTarget`,moduleName:v};static defineDirective={name:`ɵɵdefineDirective`,moduleName:v};static declareDirective={name:`ɵɵngDeclareDirective`,moduleName:v};static DirectiveDeclaration={name:`ɵɵDirectiveDeclaration`,moduleName:v};static InjectorDef={name:`ɵɵInjectorDef`,moduleName:v};static InjectorDeclaration={name:`ɵɵInjectorDeclaration`,moduleName:v};static defineInjector={name:`ɵɵdefineInjector`,moduleName:v};static declareInjector={name:`ɵɵngDeclareInjector`,moduleName:v};static NgModuleDeclaration={name:`ɵɵNgModuleDeclaration`,moduleName:v};static ModuleWithProviders={name:`ModuleWithProviders`,moduleName:v};static defineNgModule={name:`ɵɵdefineNgModule`,moduleName:v};static declareNgModule={name:`ɵɵngDeclareNgModule`,moduleName:v};static setNgModuleScope={name:`ɵɵsetNgModuleScope`,moduleName:v};static registerNgModuleType={name:`ɵɵregisterNgModuleType`,moduleName:v};static PipeDeclaration={name:`ɵɵPipeDeclaration`,moduleName:v};static definePipe={name:`ɵɵdefinePipe`,moduleName:v};static declarePipe={name:`ɵɵngDeclarePipe`,moduleName:v};static declareClassMetadata={name:`ɵɵngDeclareClassMetadata`,moduleName:v};static declareClassMetadataAsync={name:`ɵɵngDeclareClassMetadataAsync`,moduleName:v};static setClassMetadata={name:`ɵsetClassMetadata`,moduleName:v};static setClassMetadataAsync={name:`ɵsetClassMetadataAsync`,moduleName:v};static setClassDebugInfo={name:`ɵsetClassDebugInfo`,moduleName:v};static queryRefresh={name:`ɵɵqueryRefresh`,moduleName:v};static viewQuery={name:`ɵɵviewQuery`,moduleName:v};static loadQuery={name:`ɵɵloadQuery`,moduleName:v};static contentQuery={name:`ɵɵcontentQuery`,moduleName:v};static viewQuerySignal={name:`ɵɵviewQuerySignal`,moduleName:v};static contentQuerySignal={name:`ɵɵcontentQuerySignal`,moduleName:v};static queryAdvance={name:`ɵɵqueryAdvance`,moduleName:v};static twoWayProperty={name:`ɵɵtwoWayProperty`,moduleName:v};static twoWayBindingSet={name:`ɵɵtwoWayBindingSet`,moduleName:v};static twoWayListener={name:`ɵɵtwoWayListener`,moduleName:v};static declareLet={name:`ɵɵdeclareLet`,moduleName:v};static storeLet={name:`ɵɵstoreLet`,moduleName:v};static readContextLet={name:`ɵɵreadContextLet`,moduleName:v};static arrowFunction={name:`ɵɵarrowFunction`,moduleName:v};static attachSourceLocations={name:`ɵɵattachSourceLocations`,moduleName:v};static NgOnChangesFeature={name:`ɵɵNgOnChangesFeature`,moduleName:v};static ControlFeature={name:`ɵɵControlFeature`,moduleName:v};static InheritDefinitionFeature={name:`ɵɵInheritDefinitionFeature`,moduleName:v};static ProvidersFeature={name:`ɵɵProvidersFeature`,moduleName:v};static HostDirectivesFeature={name:`ɵɵHostDirectivesFeature`,moduleName:v};static ExternalStylesFeature={name:`ɵɵExternalStylesFeature`,moduleName:v};static listener={name:`ɵɵlistener`,moduleName:v};static getInheritedFactory={name:`ɵɵgetInheritedFactory`,moduleName:v};static sanitizeHtml={name:`ɵɵsanitizeHtml`,moduleName:v};static sanitizeStyle={name:`ɵɵsanitizeStyle`,moduleName:v};static validateAttribute={name:`ɵɵvalidateAttribute`,moduleName:v};static sanitizeResourceUrl={name:`ɵɵsanitizeResourceUrl`,moduleName:v};static sanitizeScript={name:`ɵɵsanitizeScript`,moduleName:v};static sanitizeUrl={name:`ɵɵsanitizeUrl`,moduleName:v};static sanitizeUrlOrResourceUrl={name:`ɵɵsanitizeUrlOrResourceUrl`,moduleName:v};static trustConstantHtml={name:`ɵɵtrustConstantHtml`,moduleName:v};static trustConstantResourceUrl={name:`ɵɵtrustConstantResourceUrl`,moduleName:v};static inputDecorator={name:`Input`,moduleName:v};static outputDecorator={name:`Output`,moduleName:v};static viewChildDecorator={name:`ViewChild`,moduleName:v};static viewChildrenDecorator={name:`ViewChildren`,moduleName:v};static contentChildDecorator={name:`ContentChild`,moduleName:v};static contentChildrenDecorator={name:`ContentChildren`,moduleName:v};static InputSignalBrandWriteType={name:`ɵINPUT_SIGNAL_BRAND_WRITE_TYPE`,moduleName:v};static UnwrapDirectiveSignalInputs={name:`ɵUnwrapDirectiveSignalInputs`,moduleName:v};static unwrapWritableSignal={name:`ɵunwrapWritableSignal`,moduleName:v};static assertType={name:`ɵassertType`,moduleName:v}}return e})();_.And,_.Bigger,_.BiggerEquals,_.BitwiseOr,_.BitwiseAnd,_.Divide,_.Assign,_.Equals,_.Identical,_.Lower,_.LowerEquals,_.Minus,_.Modulo,_.Exponentiation,_.Multiply,_.NotEquals,_.NotIdentical,_.NullishCoalesce,_.Or,_.Plus,_.In,_.InstanceOf,_.AdditionAssignment,_.SubtractionAssignment,_.MultiplicationAssignment,_.DivisionAssignment,_.RemainderAssignment,_.ExponentiationAssignment,_.AndAssignment,_.OrAssignment,_.NullishCoalesceAssignment;var wt=class{span;sourceSpan;constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return`AST`}},Tt=class extends wt{receiver;args;argumentSpan;constructor(e,t,n,r,i){super(e,t),this.receiver=n,this.args=r,this.argumentSpan=i}visit(e,t=null){return e.visitCall(this,t)}},Et=(function(e){return e[e.Property=0]=`Property`,e[e.Attribute=1]=`Attribute`,e[e.Class=2]=`Class`,e[e.Style=3]=`Style`,e[e.LegacyAnimation=4]=`LegacyAnimation`,e[e.TwoWay=5]=`TwoWay`,e[e.Animation=6]=`Animation`,e})(Et||{}),Dt=`(:(where|is)\\()?`,Ot=`-shadowcsshost`,kt=`-shadowcsscontext`,At=`[^)(]*`,jt=String.raw`(?:\(${At}\)|${At})+?`,Mt=String.raw`(?:\(${jt}\)|${At})+?`,Nt=String.raw`(?:\((${Mt})\))`;String.raw`(:nth-[-\w]+)`+Nt,Ot+Nt+``,`${Dt}`,kt+Nt+``;var Pt=(function(e){return e[e.ListEnd=0]=`ListEnd`,e[e.Statement=1]=`Statement`,e[e.Variable=2]=`Variable`,e[e.ElementStart=3]=`ElementStart`,e[e.Element=4]=`Element`,e[e.ForeignComponent=5]=`ForeignComponent`,e[e.Template=6]=`Template`,e[e.ElementEnd=7]=`ElementEnd`,e[e.ContainerStart=8]=`ContainerStart`,e[e.Container=9]=`Container`,e[e.ContainerEnd=10]=`ContainerEnd`,e[e.DisableBindings=11]=`DisableBindings`,e[e.ConditionalCreate=12]=`ConditionalCreate`,e[e.ConditionalBranchCreate=13]=`ConditionalBranchCreate`,e[e.Conditional=14]=`Conditional`,e[e.EnableBindings=15]=`EnableBindings`,e[e.Text=16]=`Text`,e[e.Listener=17]=`Listener`,e[e.InterpolateText=18]=`InterpolateText`,e[e.Binding=19]=`Binding`,e[e.Property=20]=`Property`,e[e.StyleProp=21]=`StyleProp`,e[e.ClassProp=22]=`ClassProp`,e[e.StyleMap=23]=`StyleMap`,e[e.ClassMap=24]=`ClassMap`,e[e.Advance=25]=`Advance`,e[e.Pipe=26]=`Pipe`,e[e.Attribute=27]=`Attribute`,e[e.ExtractedAttribute=28]=`ExtractedAttribute`,e[e.Defer=29]=`Defer`,e[e.DeferOn=30]=`DeferOn`,e[e.DeferWhen=31]=`DeferWhen`,e[e.I18nMessage=32]=`I18nMessage`,e[e.DomProperty=33]=`DomProperty`,e[e.Namespace=34]=`Namespace`,e[e.ProjectionDef=35]=`ProjectionDef`,e[e.EnableIncrementalHydrationRuntime=36]=`EnableIncrementalHydrationRuntime`,e[e.Projection=37]=`Projection`,e[e.Content=38]=`Content`,e[e.RepeaterCreate=39]=`RepeaterCreate`,e[e.Repeater=40]=`Repeater`,e[e.TwoWayProperty=41]=`TwoWayProperty`,e[e.TwoWayListener=42]=`TwoWayListener`,e[e.DeclareLet=43]=`DeclareLet`,e[e.StoreLet=44]=`StoreLet`,e[e.I18nStart=45]=`I18nStart`,e[e.I18n=46]=`I18n`,e[e.I18nEnd=47]=`I18nEnd`,e[e.I18nExpression=48]=`I18nExpression`,e[e.I18nApply=49]=`I18nApply`,e[e.IcuStart=50]=`IcuStart`,e[e.IcuEnd=51]=`IcuEnd`,e[e.IcuPlaceholder=52]=`IcuPlaceholder`,e[e.I18nContext=53]=`I18nContext`,e[e.I18nAttributes=54]=`I18nAttributes`,e[e.SourceLocation=55]=`SourceLocation`,e[e.Animation=56]=`Animation`,e[e.AnimationString=57]=`AnimationString`,e[e.AnimationBinding=58]=`AnimationBinding`,e[e.AnimationListener=59]=`AnimationListener`,e[e.Control=60]=`Control`,e[e.ControlCreate=61]=`ControlCreate`,e})(Pt||{}),Ft=(function(e){return e[e.LexicalRead=0]=`LexicalRead`,e[e.Context=1]=`Context`,e[e.TrackContext=2]=`TrackContext`,e[e.ReadVariable=3]=`ReadVariable`,e[e.NextContext=4]=`NextContext`,e[e.Reference=5]=`Reference`,e[e.StoreLet=6]=`StoreLet`,e[e.ContextLetReference=7]=`ContextLetReference`,e[e.GetCurrentView=8]=`GetCurrentView`,e[e.RestoreView=9]=`RestoreView`,e[e.ResetView=10]=`ResetView`,e[e.PureFunctionExpr=11]=`PureFunctionExpr`,e[e.PureFunctionParameterExpr=12]=`PureFunctionParameterExpr`,e[e.PipeBinding=13]=`PipeBinding`,e[e.PipeBindingVariadic=14]=`PipeBindingVariadic`,e[e.SafePropertyRead=15]=`SafePropertyRead`,e[e.SafeKeyedRead=16]=`SafeKeyedRead`,e[e.SafeNavigationMigration=17]=`SafeNavigationMigration`,e[e.SafeTernaryExpr=18]=`SafeTernaryExpr`,e[e.EmptyExpr=19]=`EmptyExpr`,e[e.AssignTemporaryExpr=20]=`AssignTemporaryExpr`,e[e.ReadTemporaryExpr=21]=`ReadTemporaryExpr`,e[e.SlotLiteralExpr=22]=`SlotLiteralExpr`,e[e.ConditionalCase=23]=`ConditionalCase`,e[e.ConstCollected=24]=`ConstCollected`,e[e.TwoWayBindingSet=25]=`TwoWayBindingSet`,e[e.ForeignContent=26]=`ForeignContent`,e[e.ArrowFunction=27]=`ArrowFunction`,e})(Ft||{}),It=(function(e){return e[e.None=0]=`None`,e[e.AlwaysInline=1]=`AlwaysInline`,e})(It||{}),Lt=(function(e){return e[e.Context=0]=`Context`,e[e.Identifier=1]=`Identifier`,e[e.SavedView=2]=`SavedView`,e[e.Alias=3]=`Alias`,e})(Lt||{}),Rt=(function(e){return e[e.Attribute=0]=`Attribute`,e[e.ClassName=1]=`ClassName`,e[e.StyleProperty=2]=`StyleProperty`,e[e.Property=3]=`Property`,e[e.Template=4]=`Template`,e[e.I18n=5]=`I18n`,e[e.LegacyAnimation=6]=`LegacyAnimation`,e[e.TwoWayProperty=7]=`TwoWayProperty`,e[e.Animation=8]=`Animation`,e})(Rt||{}),zt=(function(e){return e[e.Creation=0]=`Creation`,e[e.Postproccessing=1]=`Postproccessing`,e})(zt||{}),Bt=(function(e){return e[e.I18nText=0]=`I18nText`,e[e.I18nAttribute=1]=`I18nAttribute`,e})(Bt||{}),Vt=(function(e){return e[e.None=0]=`None`,e[e.ElementTag=1]=`ElementTag`,e[e.TemplateTag=2]=`TemplateTag`,e[e.OpenTag=4]=`OpenTag`,e[e.CloseTag=8]=`CloseTag`,e[e.ExpressionIndex=16]=`ExpressionIndex`,e})(Vt||{}),Ht=(function(e){return e[e.HTML=0]=`HTML`,e[e.SVG=1]=`SVG`,e[e.Math=2]=`Math`,e})(Ht||{}),Ut=(function(e){return e[e.Idle=0]=`Idle`,e[e.Immediate=1]=`Immediate`,e[e.Timer=2]=`Timer`,e[e.Hover=3]=`Hover`,e[e.Interaction=4]=`Interaction`,e[e.Viewport=5]=`Viewport`,e[e.Never=6]=`Never`,e})(Ut||{}),Wt=(function(e){return e[e.RootI18n=0]=`RootI18n`,e[e.Icu=1]=`Icu`,e[e.Attr=2]=`Attr`,e})(Wt||{}),Gt=(function(e){return e[e.NgTemplate=0]=`NgTemplate`,e[e.Structural=1]=`Structural`,e[e.Block=2]=`Block`,e})(Gt||{}),Kt=(function(e){return e[e.None=0]=`None`,e[e.InChildOperation=1]=`InChildOperation`,e[e.InArrowFunctionOperation=2]=`InArrowFunctionOperation`,e[e.InSafeNavigationMigration=4]=`InSafeNavigationMigration`,e})(Kt||{});Pt.Element,Pt.ElementStart,Pt.Container,Pt.ContainerStart,Pt.Template,Pt.RepeaterCreate,Pt.ConditionalCreate,Pt.ConditionalBranchCreate;var b=(function(e){return e[e.Tmpl=0]=`Tmpl`,e[e.Host=1]=`Host`,e[e.Both=2]=`Both`,e})(b||{}),qt=(function(e){return e[e.Full=0]=`Full`,e[e.DomOnly=1]=`DomOnly`,e})(qt||{});y.ariaProperty,y.ariaProperty,y.attribute,y.attribute,y.classProp,y.classProp,y.element,y.element,y.elementContainer,y.elementContainer,y.elementContainerEnd,y.elementContainerEnd,y.elementContainerStart,y.elementContainerStart,y.elementEnd,y.elementEnd,y.elementStart,y.elementStart,y.domProperty,y.domProperty,y.i18nExp,y.i18nExp,y.listener,y.listener,y.listener,y.listener,y.property,y.property,y.styleProp,y.styleProp,y.syntheticHostListener,y.syntheticHostListener,y.syntheticHostProperty,y.syntheticHostProperty,y.templateCreate,y.templateCreate,y.twoWayProperty,y.twoWayProperty,y.twoWayListener,y.twoWayListener,y.declareLet,y.declareLet,y.conditionalCreate,y.conditionalBranchCreate,y.conditionalBranchCreate,y.conditionalBranchCreate,y.domElement,y.domElement,y.domElementStart,y.domElementStart,y.domElementEnd,y.domElementEnd,y.domElementContainer,y.domElementContainer,y.domElementContainerStart,y.domElementContainerStart,y.domElementContainerEnd,y.domElementContainerEnd,y.domListener,y.domListener,y.domTemplate,y.domTemplate,y.animationEnter,y.animationEnter,y.animationLeave,y.animationLeave,y.animationEnterListener,y.animationEnterListener,y.animationLeaveListener,y.animationLeaveListener,_.And,_.Bigger,_.BiggerEquals,_.BitwiseOr,_.BitwiseAnd,_.Divide,_.Assign,_.Equals,_.Identical,_.Lower,_.LowerEquals,_.Minus,_.Modulo,_.Exponentiation,_.Multiply,_.NotEquals,_.NotIdentical,_.NullishCoalesce,_.Or,_.Plus,_.In,_.InstanceOf,_.AdditionAssignment,_.SubtractionAssignment,_.MultiplicationAssignment,_.DivisionAssignment,_.RemainderAssignment,_.ExponentiationAssignment,_.AndAssignment,_.OrAssignment,_.NullishCoalesceAssignment,Pt.Property,Pt.Property,Pt.Property,Pt.Attribute,Pt.Attribute,Pt.Property,Pt.TwoWayProperty,Pt.Container,Pt.ContainerStart,Pt.ContainerEnd,Pt.Element,Pt.ElementStart,Pt.ElementEnd,Pt.Template,Pt.ElementEnd,Pt.ElementStart,Pt.Element,Pt.ContainerEnd,Pt.ContainerStart,Pt.Container,Pt.I18nEnd,Pt.I18nStart,Pt.I18n,Pt.Pipe;var Jt=` \f -\r \v ᠎ - \u2028\u2029   `;`${Jt}`,`${Jt}`;var Yt=(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})(Yt||{}),Xt=(function(e){return e[e.Plain=0]=`Plain`,e[e.TemplateLiteralPart=1]=`TemplateLiteralPart`,e[e.TemplateLiteralEnd=2]=`TemplateLiteralEnd`,e})(Xt||{});Yt.Character,Pt.StyleMap,Pt.ClassMap,Pt.StyleProp,Pt.ClassProp,Pt.Attribute,Pt.Property,Pt.Attribute,Pt.Control,Pt.DomProperty,Pt.DomProperty,Pt.Attribute,Pt.StyleMap,Pt.ClassMap,Pt.StyleProp,Pt.ClassProp,Pt.Listener,Pt.TwoWayListener,Pt.AnimationListener,Pt.StyleMap,Pt.ClassMap,Pt.StyleProp,Pt.ClassProp,Pt.Property,Pt.TwoWayProperty,Pt.DomProperty,Pt.Attribute,Pt.Animation,Pt.Control,Ut.Idle,y.deferOnIdle,y.deferPrefetchOnIdle,y.deferHydrateOnIdle,Ut.Immediate,y.deferOnImmediate,y.deferPrefetchOnImmediate,y.deferHydrateOnImmediate,Ut.Timer,y.deferOnTimer,y.deferPrefetchOnTimer,y.deferHydrateOnTimer,Ut.Hover,y.deferOnHover,y.deferPrefetchOnHover,y.deferHydrateOnHover,Ut.Interaction,y.deferOnInteraction,y.deferPrefetchOnInteraction,y.deferHydrateOnInteraction,Ut.Viewport,y.deferOnViewport,y.deferPrefetchOnViewport,y.deferHydrateOnViewport,Ut.Never,y.deferHydrateNever,y.deferHydrateNever,y.deferHydrateNever,y.pipeBind1,y.pipeBind2,y.pipeBind3,y.pipeBind4,y.textInterpolate,y.textInterpolate1,y.textInterpolate2,y.textInterpolate3,y.textInterpolate4,y.textInterpolate5,y.textInterpolate6,y.textInterpolate7,y.textInterpolate8,y.textInterpolateV,y.interpolate,y.interpolate1,y.interpolate2,y.interpolate3,y.interpolate4,y.interpolate5,y.interpolate6,y.interpolate7,y.interpolate8,y.interpolateV,y.pureFunction0,y.pureFunction1,y.pureFunction2,y.pureFunction3,y.pureFunction4,y.pureFunction5,y.pureFunction6,y.pureFunction7,y.pureFunction8,y.pureFunctionV,y.resolveWindow,y.resolveDocument,y.resolveBody,rt.HTML,y.sanitizeHtml,rt.RESOURCE_URL,y.sanitizeResourceUrl,rt.SCRIPT,y.sanitizeScript,rt.STYLE,y.sanitizeStyle,rt.URL,y.sanitizeUrl,rt.ATTRIBUTE_NO_BINDING,y.validateAttribute,rt.HTML,y.trustConstantHtml,rt.RESOURCE_URL,y.trustConstantResourceUrl;var Zt=(function(e){return e[e.None=0]=`None`,e[e.ViewContextRead=1]=`ViewContextRead`,e[e.ViewContextWrite=2]=`ViewContextWrite`,e[e.SideEffectful=4]=`SideEffectful`,e})(Zt||{});b.Tmpl,b.Tmpl,b.Both,b.Host,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Both,b.Both,b.Tmpl,b.Both,b.Both,b.Tmpl,b.Both,b.Tmpl,b.Both,b.Both,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Both,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Both,b.Both,b.Tmpl,b.Tmpl,b.Both,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Both,b.Tmpl,b.Both,b.Both,b.Both,b.Both,b.Both,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Tmpl,b.Both,b.Tmpl,b.Both,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Both,b.Both,Et.Property,Rt.Property,Et.TwoWay,Rt.TwoWayProperty,Et.Attribute,Rt.Attribute,Et.Class,Rt.ClassName,Et.Style,Rt.StyleProperty,Et.LegacyAnimation,Rt.LegacyAnimation,Et.Animation,Rt.Animation;var Qt=`%COMP%`;`${Qt}`,`${Qt}`,class e{static SINGLETON=new e;static veWillInferAnyFor(t){let n=e.SINGLETON;return t instanceof Tt?t.visit(n):t.receiver.visit(n)}visitUnary(e){return e.expr.visit(this)}visitBinary(e){return e.left.visit(this)||e.right.visit(this)}visitChain(){return!1}visitConditional(e){return e.condition.visit(this)||e.trueExp.visit(this)||e.falseExp.visit(this)}visitCall(){return!0}visitSafeCall(){return!1}visitImplicitReceiver(){return!1}visitThisReceiver(){return!1}visitInterpolation(e){return e.expressions.some(e=>e.visit(this))}visitKeyedRead(){return!1}visitLiteralArray(){return!0}visitLiteralMap(){return!0}visitLiteralPrimitive(){return!1}visitPipe(){return!0}visitPrefixNot(e){return e.expression.visit(this)}visitTypeofExpression(e){return e.expression.visit(this)}visitVoidExpression(e){return e.expression.visit(this)}visitNonNullAssert(e){return e.expression.visit(this)}visitPropertyRead(){return!1}visitSafePropertyRead(){return!1}visitSafeKeyedRead(){return!1}visitTemplateLiteral(){return!1}visitTemplateLiteralElement(){return!1}visitTaggedTemplateLiteral(){return!1}visitParenthesizedExpression(e){return e.expression.visit(this)}visitRegularExpressionLiteral(){return!1}visitSpreadElement(e){return e.expression.visit(this)}visitArrowFunction(e,t){return!1}};var $t=null,en=!1,tn=1,nn=null,rn=Symbol(`SIGNAL`);function an(e){let t=$t;return $t=e,t}function on(){return $t}var sn={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 cn(e){if(en)throw Error(``);if($t===null)return;$t.consumerOnSignalRead(e);let t=$t.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=$t.recomputing;if(r&&(n=t===void 0?$t.producers:t.nextProducer,n!==void 0&&n.producer===e)){$t.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=tn;return}let i=e.consumersTail;if(i!==void 0&&i.consumer===$t&&(!r||i.knownValidAtEpoch===tn))return;let a=Cn($t),o={producer:e,consumer:$t,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:tn,lastReadVersion:e.version,nextConsumer:void 0};$t.producersTail=o,t===void 0?$t.producers=o:t.nextProducer=o,a&&xn(e,o)}function ln(){tn++}function un(e){if((!Cn(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==tn)){if(!e.producerMustRecompute(e)&&!yn(e)){mn(e);return}e.producerRecomputeValue(e),mn(e)}}function dn(e){if(e.consumers===void 0)return;let t=en;en=!0;try{for(let t=e.consumers;t!==void 0;t=t.nextConsumer){let e=t.consumer;e.dirty||pn(e)}}finally{en=t}}function fn(){return $t?.consumerAllowSignalWrites!==!1}function pn(e){e.dirty=!0,dn(e),e.consumerMarkedDirty?.(e)}function mn(e){e.dirty=!1,e.lastCleanEpoch=tn}function hn(e){return e&&gn(e),an(e)}function gn(e){if(e.producersTail?.knownValidAtEpoch===tn){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function _n(e,t){an(t),e&&vn(e)}function vn(e){e.recomputing=!1;let t=e.producersTail,n=t===void 0?e.producers:t.nextProducer;if(n!==void 0){if(Cn(e))do n=Sn(n);while(n!==void 0);t===void 0?e.producers=void 0:t.nextProducer=void 0}}function yn(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let e=t.producer,n=t.lastReadVersion;if(n!==e.version||(un(e),n!==e.version))return!0}return!1}function bn(e){if(Cn(e)){let t=e.producers;for(;t!==void 0;)t=Sn(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function xn(e,t){let n=e.consumersTail,r=Cn(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)xn(t.producer,t)}function Sn(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,!Cn(t)){let e=t.producers;for(;e!==void 0;)e=Sn(e)}return n}function Cn(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function wn(e){nn?.(e)}function Tn(e,t){return Object.is(e,t)}function En(e,t){let n=Object.create(uee);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(un(n),cn(n),n.value===kn)throw n.error;return n.value};return r[rn]=n,wn(n),r}var Dn=Symbol(`UNSET`),On=Symbol(`COMPUTING`),kn=Symbol(`ERRORED`),uee={...sn,value:Dn,dirty:!0,error:null,equal:Tn,kind:`computed`,producerMustRecompute(e){return e.value===Dn||e.value===On},producerRecomputeValue(e){if(e.value===On)throw Error(``);let t=e.value;e.value=On;let n=hn(e),r,i=!1;try{r=e.computation(),an(null),i=t!==Dn&&t!==kn&&r!==kn&&e.equal(t,r)}catch(t){r=kn,e.error=t}finally{_n(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function dee(){throw Error()}var An=dee;function jn(e){An(e)}function fee(e){An=e}var pee=null;function mee(e,t){let n=Object.create(Pn);n.value=e,t!==void 0&&(n.equal=t);let r=()=>hee(n);return r[rn]=n,wn(n),[r,e=>Mn(n,e),e=>Nn(n,e)]}function hee(e){return cn(e),e.value}function Mn(e,t){fn()||jn(e),e.equal(e.value,t)||(e.value=t,Fn(e))}function Nn(e,t){fn()||jn(e),Mn(e,t(e.value))}var Pn={...sn,equal:Tn,value:void 0,kind:`signal`};function Fn(e){e.version++,ln(),dn(e),pee?.(e)}var In={...sn,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:`effect`};function Ln(e){if(e.dirty=!1,e.version>0&&!yn(e))return;e.version++;let t=hn(e);try{e.cleanup(),e.fn()}finally{_n(e,t)}}var Rn=void 0;function zn(){return Rn}function Bn(e){let t=Rn;return Rn=e,t}var Vn=Symbol(`NotFound`);function Hn(e){return e===Vn||e?.name===`ɵNotFound`}function Un(e,t,n){let r=Object.create(Kn);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(un(r),cn(r),r.value===kn)throw r.error;return r.value};return i[rn]=r,wn(r),i}function Wn(e,t){un(e),Mn(e,t),mn(e)}function Gn(e,t){if(un(e),e.value===kn)throw e.error;Nn(e,t),mn(e)}var Kn={...sn,value:Dn,dirty:!0,error:null,equal:Tn,kind:`linkedSignal`,producerMustRecompute(e){return e.value===Dn||e.value===On},producerRecomputeValue(e){if(e.value===On)throw Error(``);let t=e.value;e.value=On;let n=hn(e),r,i=!1;try{let n=e.source(),a=t!==Dn&&t!==kn,o=a?{source:e.sourceValue,value:t}:void 0;r=e.computation(n,o),e.sourceValue=n,an(null),i=a&&r!==kn&&e.equal(t,r)}catch(t){r=kn,e.error=t}finally{_n(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function qn(e){let t=an(null);try{return e()}finally{an(t)}}var Jn=function(e,t){return Jn=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])},Jn(e,t)};function Yn(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Jn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Xn(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function Zn(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function $n(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 er(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof tr?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function rr(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Qn==`function`?Qn(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}function ir(e){return typeof e==`function`}function ar(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var or=ar(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription: +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Object.defineProperty,t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,i=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,a=(e,a)=>{for(var o in a||={})n.call(a,o)&&i(e,o,a[o]);if(t)for(var o of t(a))r.call(a,o)&&i(e,o,a[o]);return e},o=(e,t,n)=>(i(e,typeof t==`symbol`?t:t+``,n),n),s=globalThis;function c(e){let t=s.__Zone_symbol_prefix;return(typeof t==`string`?t:`__zone_symbol__`)+e}function l(){let e=s.performance;function t(t){e&&e.mark&&e.mark(t)}function n(t,n){e&&e.measure&&e.measure(t,n)}t(`Zone`);let r=class e{constructor(e,t){o(this,`_parent`),o(this,`_name`),o(this,`_properties`),o(this,`_zoneDelegate`),this._parent=e,this._name=t?t.name||`unnamed`:``,this._properties=t&&t.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,t)}static assertZonePatched(){if(s.Promise!==me.ZoneAwarePromise)throw Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let t=e.current;for(;t.parent;)t=t.parent;return t}static get current(){return ge.zone}static get currentTask(){return _e}static __load_patch(r,i,a=!1){if(Object.hasOwn(me,r)){let e=s[c(`forceDuplicateZoneCheck`)]===!0;if(!a&&e)throw Error(`Already loaded patch: `+r)}else if(!s[`__Zone_disable_`+r]){let a=`Zone:`+r;t(a),me[r]=i(s,e,he),n(a,a)}}get parent(){return this._parent}get name(){return this._name}get(e){let t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(Object.hasOwn(t._properties,e))return t;t=t._parent}return null}fork(e){if(!e)throw Error(`ZoneSpec required!`);return this._zoneDelegate.fork(this,e)}wrap(e,t){if(typeof e!=`function`)throw Error(`Expecting function got: `+e);let n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}}run(e,t,n,r){ge={parent:ge,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{ge=ge.parent}}runGuarded(e,t=null,n,r){ge={parent:ge,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{ge=ge.parent}}runTask(e,t,n){if(e.zone!=this)throw Error(`A task can only be run in the zone of creation! (Creation: `+(e.zone||ie).name+`; Execution: `+this.name+`)`);let r=e,{type:i,data:{isPeriodic:a=!1,isRefreshable:o=!1}={}}=e;if(e.state===ae&&(i===pe||i===fe))return;let s=e.state!=ce;s&&r._transitionTo(ce,se);let c=_e;_e=r,ge={parent:ge,zone:this};try{i==fe&&e.data&&!a&&!o&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,r,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{let t=e.state;if(t!==ae&&t!==ue){if(i==pe||a||o&&t===oe)s&&r._transitionTo(se,ce,oe);else{let e=r._zoneDelegates;this._updateTaskCount(r,-1),s&&r._transitionTo(ae,ce,ae),o&&(r._zoneDelegates=e)}}ge=ge.parent,_e=c}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(oe,ae);let t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(ue,oe,ae),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==oe&&e._transitionTo(se,oe),e}scheduleMicroTask(e,t,n,r){return this.scheduleTask(new u(de,e,t,n,r,void 0))}scheduleMacroTask(e,t,n,r,i){return this.scheduleTask(new u(fe,e,t,n,r,i))}scheduleEventTask(e,t,n,r,i){return this.scheduleTask(new u(pe,e,t,n,r,i))}cancelTask(e){if(e.zone!=this)throw Error(`A task can only be cancelled in the zone of creation! (Creation: `+(e.zone||ie).name+`; Execution: `+this.name+`)`);if(e.state===se||e.state===ce){e._transitionTo(le,se,ce);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(ue,le),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(ae,le),e.runCount=-1,e}}_updateTaskCount(e,t){let n=e._zoneDelegates;t==-1&&(e._zoneDelegates=null);for(let r=0;re.hasTask(n,r),onScheduleTask:(e,t,n,r)=>e.scheduleTask(n,r),onInvokeTask:(e,t,n,r,i,a)=>e.invokeTask(n,r,i,a),onCancelTask:(e,t,n,r)=>e.cancelTask(n,r)};class l{constructor(e,t,n){o(this,`_zone`),o(this,`_taskCounts`,{microTask:0,macroTask:0,eventTask:0}),o(this,`_forkDlgt`),o(this,`_forkZS`),o(this,`_forkCurrZone`),o(this,`_interceptDlgt`),o(this,`_interceptZS`),o(this,`_interceptCurrZone`),o(this,`_invokeDlgt`),o(this,`_invokeZS`),o(this,`_invokeCurrZone`),o(this,`_handleErrorDlgt`),o(this,`_handleErrorZS`),o(this,`_handleErrorCurrZone`),o(this,`_scheduleTaskDlgt`),o(this,`_scheduleTaskZS`),o(this,`_scheduleTaskCurrZone`),o(this,`_invokeTaskDlgt`),o(this,`_invokeTaskZS`),o(this,`_invokeTaskCurrZone`),o(this,`_cancelTaskDlgt`),o(this,`_cancelTaskZS`),o(this,`_cancelTaskCurrZone`),o(this,`_hasTaskDlgt`),o(this,`_hasTaskDlgtOwner`),o(this,`_hasTaskZS`),o(this,`_hasTaskCurrZone`),this._zone=e,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this._zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this._zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this._zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this._zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this._zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this._zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this._zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;let r=n&&n.onHasTask,i=t&&t._hasTaskZS;(r||i)&&(this._hasTaskZS=r?n:a,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,n.onScheduleTask||(this._scheduleTaskZS=a,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this._zone),n.onInvokeTask||(this._invokeTaskZS=a,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this._zone),n.onCancelTask||(this._cancelTaskZS=a,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this._zone))}get zone(){return this._zone}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new i(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,r,i){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,i):t.apply(n,r)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||=t;else if(t.scheduleFn)t.scheduleFn(t);else if(t.type==de)ne(t);else throw Error(`Task is missing scheduleFn.`);return n}invokeTask(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error(`Task is not cancelable`);n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}}_updateTaskCount(e,t){let n=this._taskCounts,r=n[e],i=n[e]=r+t;if(i<0)throw Error(`More tasks executed then were scheduled.`);if(r==0||i==0){let t={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};this.hasTask(this._zone,t)}}}class u{constructor(e,t,n,r,i,a){if(o(this,`type`),o(this,`source`),o(this,`invoke`),o(this,`callback`),o(this,`data`),o(this,`scheduleFn`),o(this,`cancelFn`),o(this,`_zone`,null),o(this,`runCount`,0),o(this,`_zoneDelegates`,null),o(this,`_state`,`notScheduled`),this.type=e,this.source=t,this.data=r,this.scheduleFn=i,this.cancelFn=a,!n)throw Error(`callback is not defined`);this.callback=n;let c=this;this.invoke=e===pe&&r&&r.useG?u.invokeTask:function(){return u.invokeTask.call(s,c,this,arguments)}}static invokeTask(e,t,n){e||=this,ve++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{try{ve===1&&!s[m]&&re()}finally{ve--}}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(ae,oe)}_transitionTo(e,t,n){if(this._state===t||this._state===n)this._state=e,e==ae&&(this._zoneDelegates=null);else throw Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?` or '`+n+`'`:``}, was '${this._state}'.`)}toString(){return this.data&&this.data.handleId!==void 0?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}let d=c(`setTimeout`),f=c(`Promise`),p=c(`then`),m=c(`enable_native_microtask_draining`),ee=[],h=!1,g;function te(e){!g&&s[f]&&(g=s[f].resolve(0)),g?(g[p]??g.then).call(g,e):s[d](e,0)}function ne(e){let t=s[m],n=t&&ee.length===0&&!h,r=!t&&ve===0&&ee.length===0;(n||r)&&te(re),e&&ee.push(e)}function re(){if(!h){h=!0;try{for(;ee.length;){let e=ee;ee=[];for(let t of e)try{t.zone.runTask(t,null,null)}catch(e){he.onUnhandledError(e)}}}finally{if(s[m])h=!1,he.microtaskDrainDone();else try{he.microtaskDrainDone()}finally{h=!1}}}}let ie={name:`NO ZONE`},ae=`notScheduled`,oe=`scheduling`,se=`scheduled`,ce=`running`,le=`canceling`,ue=`unknown`,de=`microTask`,fe=`macroTask`,pe=`eventTask`,me=Object.create(null),he={symbol:c,currentZoneFrame:()=>ge,onUnhandledError:ye,microtaskDrainDone:ye,scheduleMicroTask:ne,showUncaughtError:()=>!i[c(`ignoreConsoleErrorUncaughtError`)],patchEventTarget:()=>[],patchOnProperties:ye,patchMethod:()=>ye,bindArguments:()=>[],patchThen:()=>ye,patchMacroTask:()=>ye,patchEventPrototype:()=>ye,getGlobalObjects:()=>void 0,ObjectDefineProperty:()=>ye,ObjectGetOwnPropertyDescriptor:()=>void 0,ObjectCreate:()=>void 0,ArraySlice:()=>[],patchClass:()=>ye,wrapWithCurrentZone:()=>ye,filterProperties:()=>[],attachOriginToPatched:()=>ye,_redefineProperty:()=>ye,patchCallbacks:()=>ye,nativeScheduleMicroTask:te},ge={parent:null,zone:new i(null,null)},_e=null,ve=0;function ye(){}return n(`Zone`,`Zone`),i}function u(){let e=globalThis,t=e[c(`forceDuplicateZoneCheck`)]===!0;if(e.Zone&&(t||typeof e.Zone.__symbol__!=`function`))throw Error(`Zone already loaded.`);return e.Zone??=l(),e.Zone}var d=Object.getOwnPropertyDescriptor,f=Object.defineProperty,p=Object.getPrototypeOf,m=Object.create,ee=Array.prototype.slice,h=`addEventListener`,g=`removeEventListener`,te=c(h),ne=c(g),re=`true`,ie=`false`,ae=c(``);function oe(e,t){return Zone.current.wrap(e,t)}function se(e,t,n,r,i){return Zone.current.scheduleMacroTask(e,t,n,r,i)}var ce=c,le=typeof window<`u`,ue=le?window:void 0,de=le&&ue||globalThis,fe=`removeAttribute`;function pe(e,t){for(let n=e.length-1;n>=0;n--)typeof e[n]==`function`&&(e[n]=oe(e[n],t+`_`+n));return e}function me(e,t){let n=e.constructor.name;for(let r=0;r{let t=function(){return e.apply(this,pe(arguments,n+`.`+i))};return ke(t,e),t})(a)}}}function he(e){return e?e.writable===!1?!1:typeof e.get!=`function`||e.set!==void 0:!0}var ge=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope,_e=!(`nw`in de)&&de.process!==void 0&&de.process.toString()===`[object process]`,ve=!_e&&!ge&&!!(le&&ue.HTMLElement),ye=de.process!==void 0&&de.process.toString()===`[object process]`&&!ge&&!!(le&&ue.HTMLElement),be=Object.create(null),xe=ce(`enable_beforeunload`),Se=function(e){if(e||=de.event,!e)return;let t=be[e.type];t||=be[e.type]=ce(`ON_PROPERTY`+e.type);let n=this||e.target||de,r=n[t],i;if(ve&&n===ue&&e.type===`error`){let t=e;i=r&&r.call(this,t.message,t.filename,t.lineno,t.colno,t.error),i===!0&&e.preventDefault()}else i=r&&r.apply(this,arguments),e.type===`beforeunload`&&de[xe]&&typeof i==`string`?e.returnValue=i:i!=null&&!i&&e.preventDefault();return i};function Ce(e,t,n){let r=d(e,t);if(!r&&n&&d(n,t)&&(r={enumerable:!0,configurable:!0}),!r||!r.configurable)return;let i=ce(`on`+t+`patched`);if(Object.hasOwn(e,i)&&e[i])return;delete r.writable,delete r.value;let a=r.get,o=r.set,s=t.slice(2),c=be[s];c||=be[s]=ce(`ON_PROPERTY`+s),r.set=function(t){let n=this;!n&&e===de&&(n=de),n&&(typeof n[c]==`function`&&n.removeEventListener(s,Se),o?.call(n,null),n[c]=t,typeof t==`function`&&n.addEventListener(s,Se,!1))},r.get=function(){let n=this;if(!n&&e===de&&(n=de),!n)return null;let i=n[c];if(i)return i;if(a){let e=a.call(this);if(e)return r.set.call(this,e),typeof n[fe]==`function`&&n.removeAttribute(t),e}return null},f(e,t,r),e[i]=!0}function we(e,t,n){if(t)for(let r=0;rfunction(t,r){let a=n(t,r);return a.cbIdx>=0&&typeof r[a.cbIdx]==`function`?se(a.name,r[a.cbIdx],a,i):e.apply(t,r)})}function ke(e,t){e[ce(`OriginalDelegate`)]=t}function Ae(e){return typeof e==`function`}function je(e){return typeof e==`number`}var Me={useG:!0},Ne=Object.create(null),Pe={},Fe=RegExp(`^`+ae+`(\\w+)(true|false)$`),Ie=ce(`propagationStopped`),Le=[`capture`,`once`,`passive`,`signal`];function Re(e,t){let n=(t?t(e):e)+ie,r=(t?t(e):e)+re,i=ae+n,a=ae+r;Ne[e]={[ie]:i,[re]:a}}function ze(e,t,n,r){let i=r&&r.add||h,o=r&&r.rm||g,s=r&&r.listeners||`eventListeners`,c=r&&r.rmAll||`removeAllListeners`,l=ce(i),u=`.`+i+`:`,d=function(e,t,n){if(e.isRemoved)return;let r=e.callback;typeof r==`object`&&r.handleEvent&&(e.callback=e=>r.handleEvent(e),e.originalDelegate=r);let i;try{e.invoke(e,t,[n])}catch(e){i=e}let a=e.options;if(a&&typeof a==`object`&&a.once){let r=e.originalDelegate?e.originalDelegate:e.callback;t[o].call(t,n.type,r,a)}return i};function f(n,r,i){if(r||=e.event,!r)return;let a=n||r.target||e,o=a[Ne[r.type][i?re:ie]];if(o){let e=[];if(o.length===1){let t=d(o[0],a,r);t&&e.push(t)}else{let t=o.slice();for(let n=0;n{throw r})}}}let m=function(e){return f(this,e,!1)},ee=function(e){return f(this,e,!0)};function te(t,n){if(!t)return!1;let r=!0;n&&n.useG!==void 0&&(r=n.useG);let d=n&&n.vh,f=!0;n&&n.chkDup!==void 0&&(f=n.chkDup);let h=!1;n&&n.rt!==void 0&&(h=n.rt);let g=t;for(;g&&!Object.hasOwn(g,i);)g=p(g);if(!g&&t[i]&&(g=t),!g||g[l])return!1;let te=n&&n.eventNameToString,ne={},oe=g[l]=g[i],se=g[ce(o)]=g[o],le=g[ce(s)]=g[s],ue=g[ce(c)]=g[c],de;n&&n.prepend&&(de=g[ce(n.prepend)]=g[n.prepend]);function fe(e,t){return t?typeof e==`boolean`?{capture:e,passive:!0}:e?(typeof e==`object`&&e.passive!==!1&&(e.passive=!0),e):{passive:!0}:e}let pe=function(e){if(!ne.isExisting)return oe.call(ne.target,ne.eventName,ne.capture?ee:m,ne.options)},me=function(e){if(!e.isRemoved){let t=Ne[e.eventName],n;t&&(n=t[e.capture?re:ie]);let r=n&&e.target[n];if(r){for(let t=0;tve.zone.cancelTask(ve);t.call(g,`abort`,e,{once:!0}),ve.removeAbortListener=()=>g.removeEventListener(`abort`,e)}if(ne.target=null,ge&&(ge.taskData=null),oe&&(ne.options.once=!0),typeof ve.options!=`boolean`&&(ve.options=h),ve.target=l,ve.capture=ae,ve.eventName=u,m&&(ve.originalDelegate=p),c?ue.unshift(ve):ue.push(ve),s)return l}};return g[i]=Te(oe,u,ye,be,h),de&&(g.prependListener=Te(de,`.prependListener:`,ge,be,h,!0)),g[o]=function(){let t=this||e,r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));let i=arguments[2],a=i?typeof i==`boolean`||i.capture:!1,o=arguments[1];if(!o)return se.apply(this,arguments);if(d&&!d(se,o,t,arguments))return;let s=Ne[r],c;s&&(c=s[a?re:ie]);let l=c&&t[c];if(l)for(let e=0;efunction(t,n){t[Ie]=!0,e&&e.apply(t,n)})}function He(e,t){t.patchMethod(e,`queueMicrotask`,e=>function(e,t){Zone.current.scheduleMicroTask(`queueMicrotask`,t[0])})}var Ue=ce(`zoneTask`);function We(e,t,n,r){let i=null,a=null;t+=r,n+=r;let o={};function s(t){let n=t.data;n.args[0]=function(){return t.invoke.apply(this,arguments)};let r=i.apply(e,n.args);return je(r)?n.handleId=r:(n.handle=r,n.isRefreshable=Ae(r?.refresh)),t}function c(t){let{handle:n,handleId:r}=t.data;return a.call(e,n??r)}i=De(e,t,n=>function(i,a){if(Ae(a[0])){let e={isRefreshable:!1,isPeriodic:r===`Interval`,delay:r===`Timeout`||r===`Interval`?a[1]||0:void 0,args:a},n=a[0];a[0]=function(){try{return n.apply(this,arguments)}finally{let{handle:t,handleId:n,isPeriodic:r,isRefreshable:i}=e;!r&&!i&&(n?delete o[n]:t&&(t[Ue]=null))}};let i=se(t,a[0],e,s,c);if(!i)return i;let{handleId:l,handle:u,isRefreshable:d,isPeriodic:f}=i.data;if(l)o[l]=i;else if(u&&(u[Ue]=i,d&&!f)){let e=u.refresh;u.refresh=function(){let{zone:t,state:n}=i;return n===`notScheduled`?(i._state=`scheduled`,t._updateTaskCount(i,1)):n===`running`&&(i._state=`scheduling`),e.call(this)}}return u??l??i}return n.apply(e,a)}),a=De(e,n,t=>function(n,r){let i=r[0],a;je(i)?(a=o[i],delete o[i]):(a=i?.[Ue],a?i[Ue]=null:a=i),a?.type?a.cancelFn&&a.zone.cancelTask(a):t.apply(e,r)})}function Ge(e,t){let{isBrowser:n,isMix:r}=t.getGlobalObjects();(n||r)&&e.customElements&&`customElements`in e&&t.patchCallbacks(t,e.customElements,`customElements`,`define`,[`connectedCallback`,`disconnectedCallback`,`adoptedCallback`,`attributeChangedCallback`,`formAssociatedCallback`,`formDisabledCallback`,`formResetCallback`,`formStateRestoreCallback`])}function Ke(e,t){if(Zone[t.symbol(`patchEventTarget`)])return;let{eventNames:n,zoneSymbolEventNames:r,TRUE_STR:i,FALSE_STR:a,ZONE_SYMBOL_PREFIX:o}=t.getGlobalObjects();for(let e=0;et.target===e);if(r.length===0)return t;let i=r[0].ignoreProperties;return t.filter(e=>i.indexOf(e)===-1)}function Ye(e,t,n,r){e&&we(e,Je(e,t,n),r)}function Xe(e){return Object.getOwnPropertyNames(e).filter(e=>e.startsWith(`on`)&&e.length>2).map(e=>e.substring(2))}function eee(e,t){if(_e&&!ye||Zone[e.symbol(`patchEvents`)])return;let n=t.__Zone_ignore_on_properties,r=[];if(ve){let e=window;r=r.concat([`Document`,`SVGElement`,`Element`,`HTMLElement`,`HTMLBodyElement`,`HTMLMediaElement`,`HTMLFrameSetElement`,`HTMLFrameElement`,`HTMLIFrameElement`,`HTMLMarqueeElement`,`Worker`]),Ye(e,Xe(e),n,p(e))}r=r.concat([`XMLHttpRequest`,`XMLHttpRequestEventTarget`,`IDBIndex`,`IDBRequest`,`IDBOpenDBRequest`,`IDBDatabase`,`IDBTransaction`,`IDBCursor`,`WebSocket`]);for(let e=0;e{let t=`clear`;We(e,`set`,t,`Timeout`),We(e,`set`,t,`Interval`),We(e,`set`,t,`Immediate`)}),e.__load_patch(`requestAnimationFrame`,e=>{We(e,`request`,`cancel`,`AnimationFrame`),We(e,`mozRequest`,`mozCancel`,`AnimationFrame`),We(e,`webkitRequest`,`webkitCancel`,`AnimationFrame`)}),e.__load_patch(`blocking`,(e,t)=>{let n=[`alert`,`prompt`,`confirm`];for(let r=0;rfunction(r,a){return t.current.run(n,e,a,i)})}}),e.__load_patch(`EventTarget`,(e,t,n)=>{qe(e,n),Ke(e,n);let r=e.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(e,n,[r.prototype])}),e.__load_patch(`MutationObserver`,(e,t,n)=>{Ee(`MutationObserver`),Ee(`WebKitMutationObserver`)}),e.__load_patch(`IntersectionObserver`,(e,t,n)=>{Ee(`IntersectionObserver`)}),e.__load_patch(`FileReader`,(e,t,n)=>{Ee(`FileReader`)}),e.__load_patch(`on_property`,(e,t,n)=>{eee(n,e)}),e.__load_patch(`customElements`,(e,t,n)=>{Ge(e,n)}),e.__load_patch(`XHR`,(e,t)=>{c(e);let n=ce(`xhrTask`),r=ce(`xhrSync`),i=ce(`xhrListener`),a=ce(`xhrScheduled`),o=ce(`xhrURL`),s=ce(`xhrErrorBeforeScheduled`);function c(e){let c=e.XMLHttpRequest;if(!c)return;let l=c.prototype;function u(e){return e[n]}let d=l[te],f=l[ne];if(!d){let t=e.XMLHttpRequestEventTarget;if(t){let e=t.prototype;d=e[te],f=e[ne]}}let p=`readystatechange`,m=`scheduled`;function ee(e){let r=e.data,o=r.target;o[a]=!1,o[s]=!1;let c=o[i];d||(d=o[te],f=o[ne]),c&&f.call(o,p,c);let l=o[i]=()=>{if(o.readyState===o.DONE){if(!r.aborted&&o[a]&&e.state===m){let n=o[t.__symbol__(`loadfalse`)];if(o.status!==0&&n&&n.length>0){let i=e.invoke;e.invoke=function(){let n=o[t.__symbol__(`loadfalse`)];for(let t=0;tfunction(e,t){return e[r]=t[2]==0,e[o]=t[1],re.apply(e,t)}),ie=ce(`fetchTaskAborting`),ae=ce(`fetchTaskScheduling`),oe=De(l,`send`,()=>function(e,n){if(t.current[ae]===!0||e[r])return oe.apply(e,n);{let t={target:e,url:e[o],isPeriodic:!1,args:n,aborted:!1},r=se(`XMLHttpRequest.send`,h,t,ee,g);e&&e[s]===!0&&!t.aborted&&r.state===m&&r.invoke()}}),le=De(l,`abort`,()=>function(e,n){let r=u(e);if(r&&typeof r.type==`string`){if(r.cancelFn==null||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}else if(t.current[ie]===!0)return le.apply(e,n)})}}),e.__load_patch(`geolocation`,e=>{e.navigator&&e.navigator.geolocation&&me(e.navigator.geolocation,[`getCurrentPosition`,`watchPosition`])}),e.__load_patch(`PromiseRejectionEvent`,(e,t)=>{function n(t){return function(n){Be(e,t).forEach(r=>{let i=e.PromiseRejectionEvent;if(i){let e=new i(t,{promise:n.promise,reason:n.rejection});r.invoke(e)}})}}e.PromiseRejectionEvent&&(t[ce(`unhandledPromiseRejectionHandler`)]=n(`unhandledrejection`),t[ce(`rejectionHandledHandler`)]=n(`rejectionhandled`))}),e.__load_patch(`queueMicrotask`,(e,t,n)=>{He(e,n)})}function nee(e){e.__load_patch(`ZoneAwarePromise`,(e,t,n)=>{let r=Object.getOwnPropertyDescriptor,i=Object.defineProperty;function a(e){return e&&e.toString===Object.prototype.toString?(e.constructor&&e.constructor.name||``)+`: `+JSON.stringify(e):e?e.toString():Object.prototype.toString.call(e)}let o=n.symbol,s=[],c=e[o(`DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION`)]!==!1,l=o(`Promise`),u=o(`then`);n.onUnhandledError=e=>{if(n.showUncaughtError()){let t=e&&e.rejection;t&&e.zone&&e.task?console.error(`Unhandled Promise rejection:`,t instanceof Error?t.message:t,`; Zone:`,e.zone.name,`; Task:`,e.task&&e.task.source,`; Value:`,t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=()=>{for(;s.length;){let e=s.shift();try{e.zone.runGuarded(()=>{throw e.throwOriginal?e.rejection:e})}catch(e){f(e)}}};let d=o(`unhandledPromiseRejectionHandler`);function f(e){n.onUnhandledError(e);try{let n=t[d];typeof n==`function`&&n.call(this,e)}catch{}}function p(e){return e&&typeof e.then==`function`}function m(e){return e}function ee(e){return pe.reject(e)}let h=o(`state`),g=o(`value`),te=o(`finally`),ne=o(`parentPromiseValue`),re=o(`parentPromiseState`);function ie(e,t){return n=>{try{se(e,t,n)}catch(t){se(e,!1,t)}}}let ae=function(){let e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},oe=o(`currentTaskTrace`);function se(e,r,o){let l=ae();if(e===o)throw TypeError(`Promise resolved with itself`);if(e[h]===null){let u=null;try{(typeof o==`object`||typeof o==`function`)&&(u=o&&o.then)}catch(t){return l(()=>{se(e,!1,t)})(),e}if(r!==!1&&o instanceof pe&&Object.hasOwn(o,h)&&Object.hasOwn(o,g)&&o[h]!==null)le(o),se(e,o[h],o[g]);else if(r!==!1&&typeof u==`function`)try{u.call(o,l(ie(e,r)),l(ie(e,!1)))}catch(t){l(()=>{se(e,!1,t)})()}else{e[h]=r;let l=e[g];if(e[g]=o,e[te]===te&&r===!0&&(e[h]=e[re],e[g]=e[ne]),r===!1&&o instanceof Error){let e=t.currentTask&&t.currentTask.data&&t.currentTask.data.__creationTrace__;e&&i(o,oe,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t{try{let r=e[g],i=!!n&&te===n[te];i&&(n[ne]=r,n[re]=a),se(n,!0,t.run(o,void 0,i&&o!==ee&&o!==m?[]:[r]))}catch(e){se(n,!1,e)}},n)}let de=function(){},fe=e.AggregateError;class pe{static toString(){return`function ZoneAwarePromise() { [native code] }`}static resolve(e){return e instanceof pe?e:se(new this(null),!0,e)}static reject(e){return se(new this(null),!1,e)}static withResolvers(){let e={};return e.promise=new pe((t,n)=>{e.resolve=t,e.reject=n}),e}static any(e){if(!e||typeof e[Symbol.iterator]!=`function`)return Promise.reject(new fe([],`All promises were rejected`));let t=[],n=0;try{for(let r of e)n++,t.push(pe.resolve(r))}catch{return Promise.reject(new fe([],`All promises were rejected`))}if(n===0)return Promise.reject(new fe([],`All promises were rejected`));let r=!1,i=[];return new pe((e,a)=>{for(let o=0;o{r||(r=!0,e(t))},e=>{i.push(e),n--,n===0&&(r=!0,a(new fe(i,`All promises were rejected`)))})})}static race(e){let t,n,r=new this((e,r)=>{t=e,n=r});function i(e){t(e)}function a(e){n(e)}for(let t of e)p(t)||(t=this.resolve(t)),t.then(i,a);return r}static all(e){return pe.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof pe?this:pe).allWithCallback(e,{thenCallback:e=>({status:`fulfilled`,value:e}),errorCallback:e=>({status:`rejected`,reason:e})})}static allWithCallback(e,t){let n,r,i=new this((e,t)=>{n=e,r=t}),a=2,o=0,s=[];for(let i of e){p(i)||(i=this.resolve(i));let e=o;try{i.then(r=>{s[e]=t?t.thenCallback(r):r,a--,a===0&&n(s)},i=>{t?(s[e]=t.errorCallback(i),a--,a===0&&n(s)):r(i)})}catch(e){r(e)}a++,o++}return a-=2,a===0&&n(s),i}constructor(e){let t=this;if(!(t instanceof pe))throw Error(`Must be an instanceof Promise.`);t[h]=null,t[g]=[];try{let n=ae();e&&e(n(ie(t,!0)),n(ie(t,!1)))}catch(e){se(t,!1,e)}}get[Symbol.toStringTag](){return`Promise`}get[Symbol.species](){return pe}then(e,n){let r=this.constructor?.[Symbol.species];(!r||typeof r!=`function`)&&(r=this.constructor||pe);let i=new r(de),a=t.current;return this[h]==null?this[g].push(a,i,e,n):ue(this,a,i,e,n),i}catch(e){return this.then(null,e)}finally(e){let n=this.constructor?.[Symbol.species];(!n||typeof n!=`function`)&&(n=pe);let r=new n(de);r[te]=te;let i=t.current;return this[h]==null?this[g].push(i,r,e,e):ue(this,i,r,e,e),r}}pe.resolve=pe.resolve,pe.reject=pe.reject,pe.race=pe.race,pe.all=pe.all;let me=e[l]=e.Promise;e.Promise=pe;let he=o(`thenPatched`);function ge(e){let t=e.prototype,n=r(t,`then`);if(n&&(n.writable===!1||!n.configurable))return;let i=t.then;t[u]=i,e.prototype.then=function(e,t){return new pe((e,t)=>{i.call(this,e,t)}).then(e,t)},e[he]=!0}n.patchThen=ge;function _e(e){return function(t,n){let r=e.apply(t,n);if(r instanceof pe)return r;let i=r.constructor;return i[he]||ge(i),r}}if(me){ge(me);let t=me.try;t&&typeof t==`function`&&(pe.try=t),De(e,`fetch`,e=>_e(e))}return Promise[t.__symbol__(`uncaughtPromiseErrors`)]=s,pe})}function Ze(e){e.__load_patch(`toString`,e=>{let t=Function.prototype.toString,n=ce(`OriginalDelegate`),r=ce(`Promise`),i=ce(`Error`),a=function(){if(typeof this==`function`){let a=this[n];if(a)return typeof a==`function`?t.call(a):Object.prototype.toString.call(a);if(this===Promise){let n=e[r];if(n)return t.call(n)}if(this===Error){let n=e[i];if(n)return t.call(n)}}return t.call(this)};a[n]=t,Function.prototype.toString=a;let o=Object.prototype.toString;Object.prototype.toString=function(){return typeof Promise==`function`&&this instanceof Promise?`[object Promise]`:o.call(this)}})}function Qe(e,t,n,r,i){let a=Zone.__symbol__(r);if(t[a])return;let o=t[a]=t[r];t[r]=function(a,s,c){return s&&s.prototype&&i.forEach(function(t){let i=`${n}.${r}::`+t,a=s.prototype;try{if(Object.hasOwn(a,t)){let n=e.ObjectGetOwnPropertyDescriptor(a,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,i),e._redefineProperty(s.prototype,t,n)):a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],i))}else a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],i))}catch{}}),o.call(t,a,s,c)},e.attachOriginToPatched(t[r],o)}function $e(e){e.__load_patch(`util`,(e,t,n)=>{let r=Xe(e);n.patchOnProperties=we,n.patchMethod=De,n.bindArguments=pe,n.patchMacroTask=Oe;let i=t.__symbol__(`BLACK_LISTED_EVENTS`),a=t.__symbol__(`UNPATCHED_EVENTS`);e[a]&&(e[i]=e[a]),e[i]&&(t[i]=t[a]=e[i]),n.patchEventPrototype=Ve,n.patchEventTarget=ze,n.ObjectDefineProperty=f,n.ObjectGetOwnPropertyDescriptor=d,n.ObjectCreate=m,n.ArraySlice=ee,n.patchClass=Ee,n.wrapWithCurrentZone=oe,n.filterProperties=Je,n.attachOriginToPatched=ke,n._redefineProperty=Object.defineProperty,n.patchCallbacks=Qe,n.getGlobalObjects=()=>({globalSources:Pe,zoneSymbolEventNames:Ne,eventNames:r,isBrowser:ve,isMix:ye,isNode:_e,TRUE_STR:re,FALSE_STR:ie,ZONE_SYMBOL_PREFIX:ae,ADD_EVENT_LISTENER_STR:h,REMOVE_EVENT_LISTENER_STR:g})})}function et(e){nee(e),Ze(e),$e(e)}var tt=u();et(tt),tee(tt);var nt=(function(e){return e[e.NONE=0]=`NONE`,e[e.HTML=1]=`HTML`,e[e.STYLE=2]=`STYLE`,e[e.SCRIPT=3]=`SCRIPT`,e[e.URL=4]=`URL`,e[e.RESOURCE_URL=5]=`RESOURCE_URL`,e[e.ATTRIBUTE_NO_BINDING=6]=`ATTRIBUTE_NO_BINDING`,e})(nt||{}),rt=(function(e){return e[e.None=0]=`None`,e[e.Const=1]=`Const`,e})(rt||{}),it=class{modifiers;constructor(e=rt.None){this.modifiers=e}hasModifier(e){return(this.modifiers&e)!==0}},at=(function(e){return e[e.Dynamic=0]=`Dynamic`,e[e.Bool=1]=`Bool`,e[e.String=2]=`String`,e[e.Int=3]=`Int`,e[e.Number=4]=`Number`,e[e.Function=5]=`Function`,e[e.Inferred=6]=`Inferred`,e[e.None=7]=`None`,e})(at||{}),ot=class extends it{name;constructor(e,t){super(t),this.name=e}visitType(e,t){return e.visitBuiltinType(this,t)}};at.Dynamic;var st=new ot(at.Inferred);at.Bool,at.Int,at.Number,at.String,at.Function,at.None;var _=(function(e){return e[e.Equals=0]=`Equals`,e[e.NotEquals=1]=`NotEquals`,e[e.Assign=2]=`Assign`,e[e.Identical=3]=`Identical`,e[e.NotIdentical=4]=`NotIdentical`,e[e.Minus=5]=`Minus`,e[e.Plus=6]=`Plus`,e[e.Divide=7]=`Divide`,e[e.Multiply=8]=`Multiply`,e[e.Modulo=9]=`Modulo`,e[e.And=10]=`And`,e[e.Or=11]=`Or`,e[e.BitwiseOr=12]=`BitwiseOr`,e[e.BitwiseAnd=13]=`BitwiseAnd`,e[e.Lower=14]=`Lower`,e[e.LowerEquals=15]=`LowerEquals`,e[e.Bigger=16]=`Bigger`,e[e.BiggerEquals=17]=`BiggerEquals`,e[e.NullishCoalesce=18]=`NullishCoalesce`,e[e.Exponentiation=19]=`Exponentiation`,e[e.In=20]=`In`,e[e.InstanceOf=21]=`InstanceOf`,e[e.AdditionAssignment=22]=`AdditionAssignment`,e[e.SubtractionAssignment=23]=`SubtractionAssignment`,e[e.MultiplicationAssignment=24]=`MultiplicationAssignment`,e[e.DivisionAssignment=25]=`DivisionAssignment`,e[e.RemainderAssignment=26]=`RemainderAssignment`,e[e.ExponentiationAssignment=27]=`ExponentiationAssignment`,e[e.AndAssignment=28]=`AndAssignment`,e[e.OrAssignment=29]=`OrAssignment`,e[e.NullishCoalesceAssignment=30]=`NullishCoalesceAssignment`,e})(_||{});function ct(e,t){return e==null||t==null?e==t:e.isEquivalent(t)}function lt(e,t,n){let r=e.length;if(r!==t.length)return!1;for(let i=0;ie.isEquivalent(t))}var dt=class{leadingComments;type;sourceSpan;constructor(e,t,n){this.leadingComments=n,this.type=e||null,this.sourceSpan=t||null}prop(e,t){return new xt(this,e,null,t)}key(e,t,n){return new ree(this,e,t,n)}callFn(e,t,n,r){return new mt(this,e,null,t,n,r)}instantiate(e,t,n,r){return new ht(this,e,t,n)}conditional(e,t=null,n,r){return new yt(this,e,t,null,n)}equals(e,t){return new bt(_.Equals,this,e,null,t)}notEquals(e,t){return new bt(_.NotEquals,this,e,null,t)}identical(e,t){return new bt(_.Identical,this,e,null,t)}notIdentical(e,t){return new bt(_.NotIdentical,this,e,null,t)}minus(e,t){return new bt(_.Minus,this,e,null,t)}plus(e,t){return new bt(_.Plus,this,e,null,t)}divide(e,t){return new bt(_.Divide,this,e,null,t)}multiply(e,t){return new bt(_.Multiply,this,e,null,t)}modulo(e,t){return new bt(_.Modulo,this,e,null,t)}power(e,t){return new bt(_.Exponentiation,this,e,null,t)}and(e,t){return new bt(_.And,this,e,null,t)}bitwiseOr(e,t){return new bt(_.BitwiseOr,this,e,null,t)}bitwiseAnd(e,t){return new bt(_.BitwiseAnd,this,e,null,t)}or(e,t){return new bt(_.Or,this,e,null,t)}lower(e,t){return new bt(_.Lower,this,e,null,t)}lowerEquals(e,t){return new bt(_.LowerEquals,this,e,null,t)}bigger(e,t){return new bt(_.Bigger,this,e,null,t)}biggerEquals(e,t){return new bt(_.BiggerEquals,this,e,null,t)}isBlank(e){return this.equals(cee,e)}nullishCoalesce(e,t){return new bt(_.NullishCoalesce,this,e,null,t)}toStmt(e){return new uee(this,null,e)}},ft=class e extends dt{name;constructor(e,t,n,r){super(t,n,r),this.name=e}isEquivalent(t){return t instanceof e&&this.name===t.name}isConstant(){return!1}visitExpression(e,t){return e.visitReadVarExpr(this,t)}clone(){return new e(this.name,this.type,this.sourceSpan)}set(e){return new bt(_.Assign,this,e,null,this.sourceSpan)}},pt=class e extends dt{expr;constructor(e,t,n,r){super(t,n,r),this.expr=e}visitExpression(e,t){return e.visitTypeofExpr(this,t)}isEquivalent(t){return t instanceof e&&t.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new e(this.expr.clone())}},mt=class e extends dt{fn;args;pure;isOptional;constructor(e,t,n,r,i=!1,a,o=!1){super(n,r,a),this.fn=e,this.args=t,this.pure=i,this.isOptional=o}get receiver(){return this.fn}isEquivalent(t){return t instanceof e&&this.fn.isEquivalent(t.fn)&&ut(this.args,t.args)&&this.pure===t.pure}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeFunctionExpr(this,t)}clone(){return new e(this.fn.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan,this.pure,[],this.isOptional)}},ht=class e extends dt{classExpr;args;constructor(e,t,n,r,i){super(n,r,i),this.classExpr=e,this.args=t}isEquivalent(t){return t instanceof e&&this.classExpr.isEquivalent(t.classExpr)&&ut(this.args,t.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInstantiateExpr(this,t)}clone(){return new e(this.classExpr.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan)}},gt=class e extends dt{body;flags;constructor(e,t,n,r){super(null,n,r),this.body=e,this.flags=t}isEquivalent(t){return t instanceof e&&this.body===t.body&&this.flags===t.flags}isConstant(){return!0}visitExpression(e,t){return e.visitRegularExpressionLiteral(this,t)}clone(){return new e(this.body,this.flags,this.sourceSpan)}},_t=class e extends dt{value;constructor(e,t,n,r){super(t,n,r),this.value=e}isEquivalent(t){return t instanceof e&&this.value===t.value}isConstant(){return!0}visitExpression(e,t){return e.visitLiteralExpr(this,t)}clone(){return new e(this.value,this.type,this.sourceSpan)}},vt=class e extends dt{value;typeParams;constructor(e,t,n=null,r,i){super(t,r,i),this.value=e,this.typeParams=n}isEquivalent(t){return t instanceof e&&this.value.name===t.value.name&&this.value.moduleName===t.value.moduleName}isConstant(){return!1}visitExpression(e,t){return e.visitExternalExpr(this,t)}clone(){return new e(this.value,this.type,this.typeParams,this.sourceSpan)}},yt=class e extends dt{condition;falseCase;trueCase;constructor(e,t,n=null,r,i,a){super(r||t.type,i,a),this.condition=e,this.falseCase=n,this.trueCase=t}isEquivalent(t){return t instanceof e&&this.condition.isEquivalent(t.condition)&&this.trueCase.isEquivalent(t.trueCase)&&ct(this.falseCase,t.falseCase)}isConstant(){return!1}visitExpression(e,t){return e.visitConditionalExpr(this,t)}clone(){return new e(this.condition.clone(),this.trueCase.clone(),this.falseCase?.clone(),this.type,this.sourceSpan)}},bt=class e extends dt{operator;rhs;lhs;constructor(e,t,n,r,i,a){super(r||t.type,i,a),this.operator=e,this.rhs=n,this.lhs=t}isEquivalent(t){return t instanceof e&&this.operator===t.operator&&this.lhs.isEquivalent(t.lhs)&&this.rhs.isEquivalent(t.rhs)}isConstant(){return!1}visitExpression(e,t){return e.visitBinaryOperatorExpr(this,t)}clone(){return new e(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan)}isAssignment(){let e=this.operator;return e===_.Assign||e===_.AdditionAssignment||e===_.SubtractionAssignment||e===_.MultiplicationAssignment||e===_.DivisionAssignment||e===_.RemainderAssignment||e===_.ExponentiationAssignment||e===_.AndAssignment||e===_.OrAssignment||e===_.NullishCoalesceAssignment}},xt=class e extends dt{receiver;name;isOptional;constructor(e,t,n,r,i,a=!1){super(n,r,i),this.receiver=e,this.name=t,this.isOptional=a}get index(){return this.name}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name&&this.isOptional===t.isOptional}isConstant(){return!1}visitExpression(e,t){return e.visitReadPropExpr(this,t)}set(e){return new bt(_.Assign,this.receiver.prop(this.name),e,null,this.sourceSpan)}clone(){return new e(this.receiver.clone(),this.name,this.type,this.sourceSpan,[],this.isOptional)}},ree=class e extends dt{receiver;index;isOptional;constructor(e,t,n,r,i,a=!1){super(n,r,i),this.receiver=e,this.index=t,this.isOptional=a}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)&&this.isOptional===t.isOptional}isConstant(){return!1}visitExpression(e,t){return e.visitReadKeyExpr(this,t)}set(e){return new bt(_.Assign,this.receiver.key(this.index),e,null,this.sourceSpan)}clone(){return new e(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan,[],this.isOptional)}},iee=class e extends dt{entries;constructor(e,t,n,r){super(t,n,r),this.entries=e}isConstant(){return this.entries.every(e=>e.isConstant())}isEquivalent(t){return t instanceof e&&ut(this.entries,t.entries)}visitExpression(e,t){return e.visitLiteralArrayExpr(this,t)}clone(){return new e(this.entries.map(e=>e.clone()),this.type,this.sourceSpan)}},aee=class e{expression;constructor(e){this.expression=e}isEquivalent(t){return t instanceof e&&this.expression.isEquivalent(t.expression)}clone(){return new e(this.expression.clone())}isConstant(){return this.expression.isConstant()}},oee=class e extends dt{entries;valueType=null;constructor(e,t,n,r){super(t,n,r),this.entries=e,t&&(this.valueType=t.valueType)}isEquivalent(t){return t instanceof e&&ut(this.entries,t.entries)}isConstant(){return this.entries.every(e=>e.isConstant())}visitExpression(e,t){return e.visitLiteralMapExpr(this,t)}clone(){let t=this.entries.map(e=>e.clone());return new e(t,this.type,this.sourceSpan)}},see=class e extends dt{expression;constructor(e,t,n){super(null,t,n),this.expression=e}isEquivalent(t){return t instanceof e&&this.expression.isEquivalent(t.expression)}isConstant(){return this.expression.isConstant()}visitExpression(e,t){return e.visitSpreadElementExpr(this,t)}clone(){return new e(this.expression.clone(),this.sourceSpan)}},cee=new _t(null,st,null),St=(function(e){return e[e.None=0]=`None`,e[e.Final=1]=`Final`,e[e.Private=2]=`Private`,e[e.Exported=4]=`Exported`,e[e.Static=8]=`Static`,e})(St||{}),lee=class{modifiers;sourceSpan;leadingComments;constructor(e=St.None,t=null,n){this.modifiers=e,this.sourceSpan=t,this.leadingComments=n}hasModifier(e){return(this.modifiers&e)!==0}addLeadingComment(e){this.leadingComments=this.leadingComments??[],this.leadingComments.push(e)}},uee=class e extends lee{expr;constructor(e,t,n){super(St.None,t,n),this.expr=e}isEquivalent(t){return t instanceof e&&this.expr.isEquivalent(t.expr)}visitStatement(e,t){return e.visitExpressionStmt(this,t)}};(class e{static INSTANCE=new e;keyOf(e){if(e instanceof _t&&typeof e.value==`string`)return`"${e.value}"`;if(e instanceof _t)return String(e.value);if(e instanceof gt)return`/${e.body}/${e.flags??``}`;if(e instanceof iee){let t=[];for(let n of e.entries)t.push(this.keyOf(n));return`[${t.join(`,`)}]`}if(e instanceof oee){let t=[];for(let n of e.entries)if(n instanceof aee)t.push(`...`+this.keyOf(n.expression));else{let e=n.key;n.quoted&&(e=`"${e}"`),t.push(e+`:`+this.keyOf(n.value))}return`{${t.join(`,`)}}`}if(e instanceof vt)return`import("${e.value.moduleName}", ${e.value.name})`;if(e instanceof ft)return`read(${e.name})`;if(e instanceof pt)return`typeof(${this.keyOf(e.expr)})`;if(e instanceof see)return`...${this.keyOf(e.expression)}`;throw Error(`${this.constructor.name} does not handle expressions of type ${e.constructor.name}`)}});var v=`@angular/core`,y=(()=>{class e{static core={name:null,moduleName:v};static namespaceHTML={name:`ɵɵnamespaceHTML`,moduleName:v};static namespaceMathML={name:`ɵɵnamespaceMathML`,moduleName:v};static namespaceSVG={name:`ɵɵnamespaceSVG`,moduleName:v};static element={name:`ɵɵelement`,moduleName:v};static elementStart={name:`ɵɵelementStart`,moduleName:v};static elementEnd={name:`ɵɵelementEnd`,moduleName:v};static foreignComponent={name:`ɵɵforeignComponent`,moduleName:v};static foreignContent={name:`ɵɵforeignContent`,moduleName:v};static foreignContentFn={name:`ɵɵforeignContentFn`,moduleName:v};static domElement={name:`ɵɵdomElement`,moduleName:v};static domElementStart={name:`ɵɵdomElementStart`,moduleName:v};static domElementEnd={name:`ɵɵdomElementEnd`,moduleName:v};static domElementContainer={name:`ɵɵdomElementContainer`,moduleName:v};static domElementContainerStart={name:`ɵɵdomElementContainerStart`,moduleName:v};static domElementContainerEnd={name:`ɵɵdomElementContainerEnd`,moduleName:v};static domTemplate={name:`ɵɵdomTemplate`,moduleName:v};static domListener={name:`ɵɵdomListener`,moduleName:v};static advance={name:`ɵɵadvance`,moduleName:v};static syntheticHostProperty={name:`ɵɵsyntheticHostProperty`,moduleName:v};static syntheticHostListener={name:`ɵɵsyntheticHostListener`,moduleName:v};static attribute={name:`ɵɵattribute`,moduleName:v};static classProp={name:`ɵɵclassProp`,moduleName:v};static elementContainerStart={name:`ɵɵelementContainerStart`,moduleName:v};static elementContainerEnd={name:`ɵɵelementContainerEnd`,moduleName:v};static elementContainer={name:`ɵɵelementContainer`,moduleName:v};static styleMap={name:`ɵɵstyleMap`,moduleName:v};static classMap={name:`ɵɵclassMap`,moduleName:v};static styleProp={name:`ɵɵstyleProp`,moduleName:v};static interpolate={name:`ɵɵinterpolate`,moduleName:v};static interpolate1={name:`ɵɵinterpolate1`,moduleName:v};static interpolate2={name:`ɵɵinterpolate2`,moduleName:v};static interpolate3={name:`ɵɵinterpolate3`,moduleName:v};static interpolate4={name:`ɵɵinterpolate4`,moduleName:v};static interpolate5={name:`ɵɵinterpolate5`,moduleName:v};static interpolate6={name:`ɵɵinterpolate6`,moduleName:v};static interpolate7={name:`ɵɵinterpolate7`,moduleName:v};static interpolate8={name:`ɵɵinterpolate8`,moduleName:v};static interpolateV={name:`ɵɵinterpolateV`,moduleName:v};static nextContext={name:`ɵɵnextContext`,moduleName:v};static resetView={name:`ɵɵresetView`,moduleName:v};static templateCreate={name:`ɵɵtemplate`,moduleName:v};static defer={name:`ɵɵdefer`,moduleName:v};static deferWhen={name:`ɵɵdeferWhen`,moduleName:v};static deferOnIdle={name:`ɵɵdeferOnIdle`,moduleName:v};static deferOnImmediate={name:`ɵɵdeferOnImmediate`,moduleName:v};static deferOnTimer={name:`ɵɵdeferOnTimer`,moduleName:v};static deferOnHover={name:`ɵɵdeferOnHover`,moduleName:v};static deferOnInteraction={name:`ɵɵdeferOnInteraction`,moduleName:v};static deferOnViewport={name:`ɵɵdeferOnViewport`,moduleName:v};static deferPrefetchWhen={name:`ɵɵdeferPrefetchWhen`,moduleName:v};static deferPrefetchOnIdle={name:`ɵɵdeferPrefetchOnIdle`,moduleName:v};static deferPrefetchOnImmediate={name:`ɵɵdeferPrefetchOnImmediate`,moduleName:v};static deferPrefetchOnTimer={name:`ɵɵdeferPrefetchOnTimer`,moduleName:v};static deferPrefetchOnHover={name:`ɵɵdeferPrefetchOnHover`,moduleName:v};static deferPrefetchOnInteraction={name:`ɵɵdeferPrefetchOnInteraction`,moduleName:v};static deferPrefetchOnViewport={name:`ɵɵdeferPrefetchOnViewport`,moduleName:v};static deferHydrateWhen={name:`ɵɵdeferHydrateWhen`,moduleName:v};static deferHydrateNever={name:`ɵɵdeferHydrateNever`,moduleName:v};static deferHydrateOnIdle={name:`ɵɵdeferHydrateOnIdle`,moduleName:v};static deferHydrateOnImmediate={name:`ɵɵdeferHydrateOnImmediate`,moduleName:v};static deferHydrateOnTimer={name:`ɵɵdeferHydrateOnTimer`,moduleName:v};static deferHydrateOnHover={name:`ɵɵdeferHydrateOnHover`,moduleName:v};static deferHydrateOnInteraction={name:`ɵɵdeferHydrateOnInteraction`,moduleName:v};static deferHydrateOnViewport={name:`ɵɵdeferHydrateOnViewport`,moduleName:v};static deferEnableTimerScheduling={name:`ɵɵdeferEnableTimerScheduling`,moduleName:v};static enableIncrementalHydrationRuntime={name:`ɵɵenableIncrementalHydrationRuntime`,moduleName:v};static conditionalCreate={name:`ɵɵconditionalCreate`,moduleName:v};static conditionalBranchCreate={name:`ɵɵconditionalBranchCreate`,moduleName:v};static conditional={name:`ɵɵconditional`,moduleName:v};static repeater={name:`ɵɵrepeater`,moduleName:v};static repeaterCreate={name:`ɵɵrepeaterCreate`,moduleName:v};static repeaterTrackByIndex={name:`ɵɵrepeaterTrackByIndex`,moduleName:v};static repeaterTrackByIdentity={name:`ɵɵrepeaterTrackByIdentity`,moduleName:v};static componentInstance={name:`ɵɵcomponentInstance`,moduleName:v};static text={name:`ɵɵtext`,moduleName:v};static enableBindings={name:`ɵɵenableBindings`,moduleName:v};static disableBindings={name:`ɵɵdisableBindings`,moduleName:v};static getCurrentView={name:`ɵɵgetCurrentView`,moduleName:v};static textInterpolate={name:`ɵɵtextInterpolate`,moduleName:v};static textInterpolate1={name:`ɵɵtextInterpolate1`,moduleName:v};static textInterpolate2={name:`ɵɵtextInterpolate2`,moduleName:v};static textInterpolate3={name:`ɵɵtextInterpolate3`,moduleName:v};static textInterpolate4={name:`ɵɵtextInterpolate4`,moduleName:v};static textInterpolate5={name:`ɵɵtextInterpolate5`,moduleName:v};static textInterpolate6={name:`ɵɵtextInterpolate6`,moduleName:v};static textInterpolate7={name:`ɵɵtextInterpolate7`,moduleName:v};static textInterpolate8={name:`ɵɵtextInterpolate8`,moduleName:v};static textInterpolateV={name:`ɵɵtextInterpolateV`,moduleName:v};static restoreView={name:`ɵɵrestoreView`,moduleName:v};static pureFunction0={name:`ɵɵpureFunction0`,moduleName:v};static pureFunction1={name:`ɵɵpureFunction1`,moduleName:v};static pureFunction2={name:`ɵɵpureFunction2`,moduleName:v};static pureFunction3={name:`ɵɵpureFunction3`,moduleName:v};static pureFunction4={name:`ɵɵpureFunction4`,moduleName:v};static pureFunction5={name:`ɵɵpureFunction5`,moduleName:v};static pureFunction6={name:`ɵɵpureFunction6`,moduleName:v};static pureFunction7={name:`ɵɵpureFunction7`,moduleName:v};static pureFunction8={name:`ɵɵpureFunction8`,moduleName:v};static pureFunctionV={name:`ɵɵpureFunctionV`,moduleName:v};static pipeBind1={name:`ɵɵpipeBind1`,moduleName:v};static pipeBind2={name:`ɵɵpipeBind2`,moduleName:v};static pipeBind3={name:`ɵɵpipeBind3`,moduleName:v};static pipeBind4={name:`ɵɵpipeBind4`,moduleName:v};static pipeBindV={name:`ɵɵpipeBindV`,moduleName:v};static domProperty={name:`ɵɵdomProperty`,moduleName:v};static ariaProperty={name:`ɵɵariaProperty`,moduleName:v};static property={name:`ɵɵproperty`,moduleName:v};static control={name:`ɵɵcontrol`,moduleName:v};static controlCreate={name:`ɵɵcontrolCreate`,moduleName:v};static animationEnterListener={name:`ɵɵanimateEnterListener`,moduleName:v};static animationLeaveListener={name:`ɵɵanimateLeaveListener`,moduleName:v};static animationEnter={name:`ɵɵanimateEnter`,moduleName:v};static animationLeave={name:`ɵɵanimateLeave`,moduleName:v};static i18n={name:`ɵɵi18n`,moduleName:v};static i18nAttributes={name:`ɵɵi18nAttributes`,moduleName:v};static i18nExp={name:`ɵɵi18nExp`,moduleName:v};static i18nStart={name:`ɵɵi18nStart`,moduleName:v};static i18nEnd={name:`ɵɵi18nEnd`,moduleName:v};static i18nApply={name:`ɵɵi18nApply`,moduleName:v};static i18nPostprocess={name:`ɵɵi18nPostprocess`,moduleName:v};static pipe={name:`ɵɵpipe`,moduleName:v};static projection={name:`ɵɵprojection`,moduleName:v};static projectionDef={name:`ɵɵprojectionDef`,moduleName:v};static reference={name:`ɵɵreference`,moduleName:v};static inject={name:`ɵɵinject`,moduleName:v};static injectAttribute={name:`ɵɵinjectAttribute`,moduleName:v};static directiveInject={name:`ɵɵdirectiveInject`,moduleName:v};static invalidFactory={name:`ɵɵinvalidFactory`,moduleName:v};static invalidFactoryDep={name:`ɵɵinvalidFactoryDep`,moduleName:v};static templateRefExtractor={name:`ɵɵtemplateRefExtractor`,moduleName:v};static forwardRef={name:`forwardRef`,moduleName:v};static resolveForwardRef={name:`resolveForwardRef`,moduleName:v};static replaceMetadata={name:`ɵɵreplaceMetadata`,moduleName:v};static getReplaceMetadataURL={name:`ɵɵgetReplaceMetadataURL`,moduleName:v};static ɵɵdefineInjectable={name:`ɵɵdefineInjectable`,moduleName:v};static declareInjectable={name:`ɵɵngDeclareInjectable`,moduleName:v};static InjectableDeclaration={name:`ɵɵInjectableDeclaration`,moduleName:v};static defineService={name:`ɵɵdefineService`,moduleName:v};static declareService={name:`ɵɵngDeclareService`,moduleName:v};static resolveWindow={name:`ɵɵresolveWindow`,moduleName:v};static resolveDocument={name:`ɵɵresolveDocument`,moduleName:v};static resolveBody={name:`ɵɵresolveBody`,moduleName:v};static getComponentDepsFactory={name:`ɵɵgetComponentDepsFactory`,moduleName:v};static defineComponent={name:`ɵɵdefineComponent`,moduleName:v};static declareComponent={name:`ɵɵngDeclareComponent`,moduleName:v};static setComponentScope={name:`ɵɵsetComponentScope`,moduleName:v};static ChangeDetectionStrategy={name:`ChangeDetectionStrategy`,moduleName:v};static ViewEncapsulation={name:`ViewEncapsulation`,moduleName:v};static ComponentDeclaration={name:`ɵɵComponentDeclaration`,moduleName:v};static FactoryDeclaration={name:`ɵɵFactoryDeclaration`,moduleName:v};static declareFactory={name:`ɵɵngDeclareFactory`,moduleName:v};static FactoryTarget={name:`ɵɵFactoryTarget`,moduleName:v};static defineDirective={name:`ɵɵdefineDirective`,moduleName:v};static declareDirective={name:`ɵɵngDeclareDirective`,moduleName:v};static DirectiveDeclaration={name:`ɵɵDirectiveDeclaration`,moduleName:v};static InjectorDef={name:`ɵɵInjectorDef`,moduleName:v};static InjectorDeclaration={name:`ɵɵInjectorDeclaration`,moduleName:v};static defineInjector={name:`ɵɵdefineInjector`,moduleName:v};static declareInjector={name:`ɵɵngDeclareInjector`,moduleName:v};static NgModuleDeclaration={name:`ɵɵNgModuleDeclaration`,moduleName:v};static ModuleWithProviders={name:`ModuleWithProviders`,moduleName:v};static defineNgModule={name:`ɵɵdefineNgModule`,moduleName:v};static declareNgModule={name:`ɵɵngDeclareNgModule`,moduleName:v};static setNgModuleScope={name:`ɵɵsetNgModuleScope`,moduleName:v};static registerNgModuleType={name:`ɵɵregisterNgModuleType`,moduleName:v};static PipeDeclaration={name:`ɵɵPipeDeclaration`,moduleName:v};static definePipe={name:`ɵɵdefinePipe`,moduleName:v};static declarePipe={name:`ɵɵngDeclarePipe`,moduleName:v};static declareClassMetadata={name:`ɵɵngDeclareClassMetadata`,moduleName:v};static declareClassMetadataAsync={name:`ɵɵngDeclareClassMetadataAsync`,moduleName:v};static setClassMetadata={name:`ɵsetClassMetadata`,moduleName:v};static setClassMetadataAsync={name:`ɵsetClassMetadataAsync`,moduleName:v};static setClassDebugInfo={name:`ɵsetClassDebugInfo`,moduleName:v};static queryRefresh={name:`ɵɵqueryRefresh`,moduleName:v};static viewQuery={name:`ɵɵviewQuery`,moduleName:v};static loadQuery={name:`ɵɵloadQuery`,moduleName:v};static contentQuery={name:`ɵɵcontentQuery`,moduleName:v};static viewQuerySignal={name:`ɵɵviewQuerySignal`,moduleName:v};static contentQuerySignal={name:`ɵɵcontentQuerySignal`,moduleName:v};static queryAdvance={name:`ɵɵqueryAdvance`,moduleName:v};static twoWayProperty={name:`ɵɵtwoWayProperty`,moduleName:v};static twoWayBindingSet={name:`ɵɵtwoWayBindingSet`,moduleName:v};static twoWayListener={name:`ɵɵtwoWayListener`,moduleName:v};static declareLet={name:`ɵɵdeclareLet`,moduleName:v};static storeLet={name:`ɵɵstoreLet`,moduleName:v};static readContextLet={name:`ɵɵreadContextLet`,moduleName:v};static arrowFunction={name:`ɵɵarrowFunction`,moduleName:v};static attachSourceLocations={name:`ɵɵattachSourceLocations`,moduleName:v};static NgOnChangesFeature={name:`ɵɵNgOnChangesFeature`,moduleName:v};static ControlFeature={name:`ɵɵControlFeature`,moduleName:v};static InheritDefinitionFeature={name:`ɵɵInheritDefinitionFeature`,moduleName:v};static ProvidersFeature={name:`ɵɵProvidersFeature`,moduleName:v};static HostDirectivesFeature={name:`ɵɵHostDirectivesFeature`,moduleName:v};static ExternalStylesFeature={name:`ɵɵExternalStylesFeature`,moduleName:v};static listener={name:`ɵɵlistener`,moduleName:v};static getInheritedFactory={name:`ɵɵgetInheritedFactory`,moduleName:v};static sanitizeHtml={name:`ɵɵsanitizeHtml`,moduleName:v};static sanitizeStyle={name:`ɵɵsanitizeStyle`,moduleName:v};static validateAttribute={name:`ɵɵvalidateAttribute`,moduleName:v};static sanitizeResourceUrl={name:`ɵɵsanitizeResourceUrl`,moduleName:v};static sanitizeScript={name:`ɵɵsanitizeScript`,moduleName:v};static sanitizeUrl={name:`ɵɵsanitizeUrl`,moduleName:v};static sanitizeUrlOrResourceUrl={name:`ɵɵsanitizeUrlOrResourceUrl`,moduleName:v};static trustConstantHtml={name:`ɵɵtrustConstantHtml`,moduleName:v};static trustConstantResourceUrl={name:`ɵɵtrustConstantResourceUrl`,moduleName:v};static inputDecorator={name:`Input`,moduleName:v};static outputDecorator={name:`Output`,moduleName:v};static viewChildDecorator={name:`ViewChild`,moduleName:v};static viewChildrenDecorator={name:`ViewChildren`,moduleName:v};static contentChildDecorator={name:`ContentChild`,moduleName:v};static contentChildrenDecorator={name:`ContentChildren`,moduleName:v};static InputSignalBrandWriteType={name:`ɵINPUT_SIGNAL_BRAND_WRITE_TYPE`,moduleName:v};static UnwrapDirectiveSignalInputs={name:`ɵUnwrapDirectiveSignalInputs`,moduleName:v};static unwrapWritableSignal={name:`ɵunwrapWritableSignal`,moduleName:v};static assertType={name:`ɵassertType`,moduleName:v}}return e})();_.And,_.Bigger,_.BiggerEquals,_.BitwiseOr,_.BitwiseAnd,_.Divide,_.Assign,_.Equals,_.Identical,_.Lower,_.LowerEquals,_.Minus,_.Modulo,_.Exponentiation,_.Multiply,_.NotEquals,_.NotIdentical,_.NullishCoalesce,_.Or,_.Plus,_.In,_.InstanceOf,_.AdditionAssignment,_.SubtractionAssignment,_.MultiplicationAssignment,_.DivisionAssignment,_.RemainderAssignment,_.ExponentiationAssignment,_.AndAssignment,_.OrAssignment,_.NullishCoalesceAssignment;var Ct=class{span;sourceSpan;constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return`AST`}},wt=class extends Ct{receiver;args;argumentSpan;constructor(e,t,n,r,i){super(e,t),this.receiver=n,this.args=r,this.argumentSpan=i}visit(e,t=null){return e.visitCall(this,t)}},Tt=(function(e){return e[e.Property=0]=`Property`,e[e.Attribute=1]=`Attribute`,e[e.Class=2]=`Class`,e[e.Style=3]=`Style`,e[e.LegacyAnimation=4]=`LegacyAnimation`,e[e.TwoWay=5]=`TwoWay`,e[e.Animation=6]=`Animation`,e})(Tt||{}),Et=`(:(where|is)\\()?`,Dt=`-shadowcsshost`,Ot=`-shadowcsscontext`,kt=`[^)(]*`,At=String.raw`(?:\(${kt}\)|${kt})+?`,jt=String.raw`(?:\(${At}\)|${kt})+?`,Mt=String.raw`(?:\((${jt})\))`;String.raw`(:nth-[-\w]+)`+Mt,Dt+Mt+``,`${Et}`,Ot+Mt+``;var Nt=(function(e){return e[e.ListEnd=0]=`ListEnd`,e[e.Statement=1]=`Statement`,e[e.Variable=2]=`Variable`,e[e.ElementStart=3]=`ElementStart`,e[e.Element=4]=`Element`,e[e.ForeignComponent=5]=`ForeignComponent`,e[e.Template=6]=`Template`,e[e.ElementEnd=7]=`ElementEnd`,e[e.ContainerStart=8]=`ContainerStart`,e[e.Container=9]=`Container`,e[e.ContainerEnd=10]=`ContainerEnd`,e[e.DisableBindings=11]=`DisableBindings`,e[e.ConditionalCreate=12]=`ConditionalCreate`,e[e.ConditionalBranchCreate=13]=`ConditionalBranchCreate`,e[e.Conditional=14]=`Conditional`,e[e.EnableBindings=15]=`EnableBindings`,e[e.Text=16]=`Text`,e[e.Listener=17]=`Listener`,e[e.InterpolateText=18]=`InterpolateText`,e[e.Binding=19]=`Binding`,e[e.Property=20]=`Property`,e[e.StyleProp=21]=`StyleProp`,e[e.ClassProp=22]=`ClassProp`,e[e.StyleMap=23]=`StyleMap`,e[e.ClassMap=24]=`ClassMap`,e[e.Advance=25]=`Advance`,e[e.Pipe=26]=`Pipe`,e[e.Attribute=27]=`Attribute`,e[e.ExtractedAttribute=28]=`ExtractedAttribute`,e[e.Defer=29]=`Defer`,e[e.DeferOn=30]=`DeferOn`,e[e.DeferWhen=31]=`DeferWhen`,e[e.I18nMessage=32]=`I18nMessage`,e[e.DomProperty=33]=`DomProperty`,e[e.Namespace=34]=`Namespace`,e[e.ProjectionDef=35]=`ProjectionDef`,e[e.EnableIncrementalHydrationRuntime=36]=`EnableIncrementalHydrationRuntime`,e[e.Projection=37]=`Projection`,e[e.Content=38]=`Content`,e[e.RepeaterCreate=39]=`RepeaterCreate`,e[e.Repeater=40]=`Repeater`,e[e.TwoWayProperty=41]=`TwoWayProperty`,e[e.TwoWayListener=42]=`TwoWayListener`,e[e.DeclareLet=43]=`DeclareLet`,e[e.StoreLet=44]=`StoreLet`,e[e.I18nStart=45]=`I18nStart`,e[e.I18n=46]=`I18n`,e[e.I18nEnd=47]=`I18nEnd`,e[e.I18nExpression=48]=`I18nExpression`,e[e.I18nApply=49]=`I18nApply`,e[e.IcuStart=50]=`IcuStart`,e[e.IcuEnd=51]=`IcuEnd`,e[e.IcuPlaceholder=52]=`IcuPlaceholder`,e[e.I18nContext=53]=`I18nContext`,e[e.I18nAttributes=54]=`I18nAttributes`,e[e.SourceLocation=55]=`SourceLocation`,e[e.Animation=56]=`Animation`,e[e.AnimationString=57]=`AnimationString`,e[e.AnimationBinding=58]=`AnimationBinding`,e[e.AnimationListener=59]=`AnimationListener`,e[e.Control=60]=`Control`,e[e.ControlCreate=61]=`ControlCreate`,e})(Nt||{}),Pt=(function(e){return e[e.LexicalRead=0]=`LexicalRead`,e[e.Context=1]=`Context`,e[e.TrackContext=2]=`TrackContext`,e[e.ReadVariable=3]=`ReadVariable`,e[e.NextContext=4]=`NextContext`,e[e.Reference=5]=`Reference`,e[e.StoreLet=6]=`StoreLet`,e[e.ContextLetReference=7]=`ContextLetReference`,e[e.GetCurrentView=8]=`GetCurrentView`,e[e.RestoreView=9]=`RestoreView`,e[e.ResetView=10]=`ResetView`,e[e.PureFunctionExpr=11]=`PureFunctionExpr`,e[e.PureFunctionParameterExpr=12]=`PureFunctionParameterExpr`,e[e.PipeBinding=13]=`PipeBinding`,e[e.PipeBindingVariadic=14]=`PipeBindingVariadic`,e[e.SafePropertyRead=15]=`SafePropertyRead`,e[e.SafeKeyedRead=16]=`SafeKeyedRead`,e[e.SafeNavigationMigration=17]=`SafeNavigationMigration`,e[e.SafeTernaryExpr=18]=`SafeTernaryExpr`,e[e.EmptyExpr=19]=`EmptyExpr`,e[e.AssignTemporaryExpr=20]=`AssignTemporaryExpr`,e[e.ReadTemporaryExpr=21]=`ReadTemporaryExpr`,e[e.SlotLiteralExpr=22]=`SlotLiteralExpr`,e[e.ConditionalCase=23]=`ConditionalCase`,e[e.ConstCollected=24]=`ConstCollected`,e[e.TwoWayBindingSet=25]=`TwoWayBindingSet`,e[e.ForeignContent=26]=`ForeignContent`,e[e.ArrowFunction=27]=`ArrowFunction`,e})(Pt||{}),Ft=(function(e){return e[e.None=0]=`None`,e[e.AlwaysInline=1]=`AlwaysInline`,e})(Ft||{}),It=(function(e){return e[e.Context=0]=`Context`,e[e.Identifier=1]=`Identifier`,e[e.SavedView=2]=`SavedView`,e[e.Alias=3]=`Alias`,e})(It||{}),Lt=(function(e){return e[e.Attribute=0]=`Attribute`,e[e.ClassName=1]=`ClassName`,e[e.StyleProperty=2]=`StyleProperty`,e[e.Property=3]=`Property`,e[e.Template=4]=`Template`,e[e.I18n=5]=`I18n`,e[e.LegacyAnimation=6]=`LegacyAnimation`,e[e.TwoWayProperty=7]=`TwoWayProperty`,e[e.Animation=8]=`Animation`,e})(Lt||{}),Rt=(function(e){return e[e.Creation=0]=`Creation`,e[e.Postproccessing=1]=`Postproccessing`,e})(Rt||{}),zt=(function(e){return e[e.I18nText=0]=`I18nText`,e[e.I18nAttribute=1]=`I18nAttribute`,e})(zt||{}),Bt=(function(e){return e[e.None=0]=`None`,e[e.ElementTag=1]=`ElementTag`,e[e.TemplateTag=2]=`TemplateTag`,e[e.OpenTag=4]=`OpenTag`,e[e.CloseTag=8]=`CloseTag`,e[e.ExpressionIndex=16]=`ExpressionIndex`,e})(Bt||{}),Vt=(function(e){return e[e.HTML=0]=`HTML`,e[e.SVG=1]=`SVG`,e[e.Math=2]=`Math`,e})(Vt||{}),Ht=(function(e){return e[e.Idle=0]=`Idle`,e[e.Immediate=1]=`Immediate`,e[e.Timer=2]=`Timer`,e[e.Hover=3]=`Hover`,e[e.Interaction=4]=`Interaction`,e[e.Viewport=5]=`Viewport`,e[e.Never=6]=`Never`,e})(Ht||{}),Ut=(function(e){return e[e.RootI18n=0]=`RootI18n`,e[e.Icu=1]=`Icu`,e[e.Attr=2]=`Attr`,e})(Ut||{}),Wt=(function(e){return e[e.NgTemplate=0]=`NgTemplate`,e[e.Structural=1]=`Structural`,e[e.Block=2]=`Block`,e})(Wt||{}),Gt=(function(e){return e[e.None=0]=`None`,e[e.InChildOperation=1]=`InChildOperation`,e[e.InArrowFunctionOperation=2]=`InArrowFunctionOperation`,e[e.InSafeNavigationMigration=4]=`InSafeNavigationMigration`,e})(Gt||{});Nt.Element,Nt.ElementStart,Nt.Container,Nt.ContainerStart,Nt.Template,Nt.RepeaterCreate,Nt.ConditionalCreate,Nt.ConditionalBranchCreate;var b=(function(e){return e[e.Tmpl=0]=`Tmpl`,e[e.Host=1]=`Host`,e[e.Both=2]=`Both`,e})(b||{}),Kt=(function(e){return e[e.Full=0]=`Full`,e[e.DomOnly=1]=`DomOnly`,e})(Kt||{});y.ariaProperty,y.ariaProperty,y.attribute,y.attribute,y.classProp,y.classProp,y.element,y.element,y.elementContainer,y.elementContainer,y.elementContainerEnd,y.elementContainerEnd,y.elementContainerStart,y.elementContainerStart,y.elementEnd,y.elementEnd,y.elementStart,y.elementStart,y.domProperty,y.domProperty,y.i18nExp,y.i18nExp,y.listener,y.listener,y.listener,y.listener,y.property,y.property,y.styleProp,y.styleProp,y.syntheticHostListener,y.syntheticHostListener,y.syntheticHostProperty,y.syntheticHostProperty,y.templateCreate,y.templateCreate,y.twoWayProperty,y.twoWayProperty,y.twoWayListener,y.twoWayListener,y.declareLet,y.declareLet,y.conditionalCreate,y.conditionalBranchCreate,y.conditionalBranchCreate,y.conditionalBranchCreate,y.domElement,y.domElement,y.domElementStart,y.domElementStart,y.domElementEnd,y.domElementEnd,y.domElementContainer,y.domElementContainer,y.domElementContainerStart,y.domElementContainerStart,y.domElementContainerEnd,y.domElementContainerEnd,y.domListener,y.domListener,y.domTemplate,y.domTemplate,y.animationEnter,y.animationEnter,y.animationLeave,y.animationLeave,y.animationEnterListener,y.animationEnterListener,y.animationLeaveListener,y.animationLeaveListener,_.And,_.Bigger,_.BiggerEquals,_.BitwiseOr,_.BitwiseAnd,_.Divide,_.Assign,_.Equals,_.Identical,_.Lower,_.LowerEquals,_.Minus,_.Modulo,_.Exponentiation,_.Multiply,_.NotEquals,_.NotIdentical,_.NullishCoalesce,_.Or,_.Plus,_.In,_.InstanceOf,_.AdditionAssignment,_.SubtractionAssignment,_.MultiplicationAssignment,_.DivisionAssignment,_.RemainderAssignment,_.ExponentiationAssignment,_.AndAssignment,_.OrAssignment,_.NullishCoalesceAssignment,Nt.Property,Nt.Property,Nt.Property,Nt.Attribute,Nt.Attribute,Nt.Property,Nt.TwoWayProperty,Nt.Container,Nt.ContainerStart,Nt.ContainerEnd,Nt.Element,Nt.ElementStart,Nt.ElementEnd,Nt.Template,Nt.ElementEnd,Nt.ElementStart,Nt.Element,Nt.ContainerEnd,Nt.ContainerStart,Nt.Container,Nt.I18nEnd,Nt.I18nStart,Nt.I18n,Nt.Pipe;var qt=` \f +\r \v ᠎ - \u2028\u2029   `;`${qt}`,`${qt}`;var Jt=(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})(Jt||{}),Yt=(function(e){return e[e.Plain=0]=`Plain`,e[e.TemplateLiteralPart=1]=`TemplateLiteralPart`,e[e.TemplateLiteralEnd=2]=`TemplateLiteralEnd`,e})(Yt||{});Jt.Character,Nt.StyleMap,Nt.ClassMap,Nt.StyleProp,Nt.ClassProp,Nt.Attribute,Nt.Property,Nt.Attribute,Nt.Control,Nt.DomProperty,Nt.DomProperty,Nt.Attribute,Nt.StyleMap,Nt.ClassMap,Nt.StyleProp,Nt.ClassProp,Nt.Listener,Nt.TwoWayListener,Nt.AnimationListener,Nt.StyleMap,Nt.ClassMap,Nt.StyleProp,Nt.ClassProp,Nt.Property,Nt.TwoWayProperty,Nt.DomProperty,Nt.Attribute,Nt.Animation,Nt.Control,Ht.Idle,y.deferOnIdle,y.deferPrefetchOnIdle,y.deferHydrateOnIdle,Ht.Immediate,y.deferOnImmediate,y.deferPrefetchOnImmediate,y.deferHydrateOnImmediate,Ht.Timer,y.deferOnTimer,y.deferPrefetchOnTimer,y.deferHydrateOnTimer,Ht.Hover,y.deferOnHover,y.deferPrefetchOnHover,y.deferHydrateOnHover,Ht.Interaction,y.deferOnInteraction,y.deferPrefetchOnInteraction,y.deferHydrateOnInteraction,Ht.Viewport,y.deferOnViewport,y.deferPrefetchOnViewport,y.deferHydrateOnViewport,Ht.Never,y.deferHydrateNever,y.deferHydrateNever,y.deferHydrateNever,y.pipeBind1,y.pipeBind2,y.pipeBind3,y.pipeBind4,y.textInterpolate,y.textInterpolate1,y.textInterpolate2,y.textInterpolate3,y.textInterpolate4,y.textInterpolate5,y.textInterpolate6,y.textInterpolate7,y.textInterpolate8,y.textInterpolateV,y.interpolate,y.interpolate1,y.interpolate2,y.interpolate3,y.interpolate4,y.interpolate5,y.interpolate6,y.interpolate7,y.interpolate8,y.interpolateV,y.pureFunction0,y.pureFunction1,y.pureFunction2,y.pureFunction3,y.pureFunction4,y.pureFunction5,y.pureFunction6,y.pureFunction7,y.pureFunction8,y.pureFunctionV,y.resolveWindow,y.resolveDocument,y.resolveBody,nt.HTML,y.sanitizeHtml,nt.RESOURCE_URL,y.sanitizeResourceUrl,nt.SCRIPT,y.sanitizeScript,nt.STYLE,y.sanitizeStyle,nt.URL,y.sanitizeUrl,nt.ATTRIBUTE_NO_BINDING,y.validateAttribute,nt.HTML,y.trustConstantHtml,nt.RESOURCE_URL,y.trustConstantResourceUrl;var Xt=(function(e){return e[e.None=0]=`None`,e[e.ViewContextRead=1]=`ViewContextRead`,e[e.ViewContextWrite=2]=`ViewContextWrite`,e[e.SideEffectful=4]=`SideEffectful`,e})(Xt||{});b.Tmpl,b.Tmpl,b.Both,b.Host,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Both,b.Both,b.Tmpl,b.Both,b.Both,b.Tmpl,b.Both,b.Tmpl,b.Both,b.Both,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Both,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Both,b.Both,b.Tmpl,b.Tmpl,b.Both,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Both,b.Tmpl,b.Both,b.Both,b.Both,b.Both,b.Both,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Tmpl,b.Both,b.Tmpl,b.Both,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Both,b.Both,Tt.Property,Lt.Property,Tt.TwoWay,Lt.TwoWayProperty,Tt.Attribute,Lt.Attribute,Tt.Class,Lt.ClassName,Tt.Style,Lt.StyleProperty,Tt.LegacyAnimation,Lt.LegacyAnimation,Tt.Animation,Lt.Animation;var Zt=`%COMP%`;`${Zt}`,`${Zt}`,class e{static SINGLETON=new e;static veWillInferAnyFor(t){let n=e.SINGLETON;return t instanceof wt?t.visit(n):t.receiver.visit(n)}visitUnary(e){return e.expr.visit(this)}visitBinary(e){return e.left.visit(this)||e.right.visit(this)}visitChain(){return!1}visitConditional(e){return e.condition.visit(this)||e.trueExp.visit(this)||e.falseExp.visit(this)}visitCall(){return!0}visitSafeCall(){return!1}visitImplicitReceiver(){return!1}visitThisReceiver(){return!1}visitInterpolation(e){return e.expressions.some(e=>e.visit(this))}visitKeyedRead(){return!1}visitLiteralArray(){return!0}visitLiteralMap(){return!0}visitLiteralPrimitive(){return!1}visitPipe(){return!0}visitPrefixNot(e){return e.expression.visit(this)}visitTypeofExpression(e){return e.expression.visit(this)}visitVoidExpression(e){return e.expression.visit(this)}visitNonNullAssert(e){return e.expression.visit(this)}visitPropertyRead(){return!1}visitSafePropertyRead(){return!1}visitSafeKeyedRead(){return!1}visitTemplateLiteral(){return!1}visitTemplateLiteralElement(){return!1}visitTaggedTemplateLiteral(){return!1}visitParenthesizedExpression(e){return e.expression.visit(this)}visitRegularExpressionLiteral(){return!1}visitSpreadElement(e){return e.expression.visit(this)}visitArrowFunction(e,t){return!1}};var Qt=null,$t=!1,en=1,tn=null,nn=Symbol(`SIGNAL`);function rn(e){let t=Qt;return Qt=e,t}function an(){return Qt}var on={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 sn(e){if($t)throw Error(``);if(Qt===null)return;Qt.consumerOnSignalRead(e);let t=Qt.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=Qt.recomputing;if(r&&(n=t===void 0?Qt.producers:t.nextProducer,n!==void 0&&n.producer===e)){Qt.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=en;return}let i=e.consumersTail;if(i!==void 0&&i.consumer===Qt&&(!r||i.knownValidAtEpoch===en))return;let a=Sn(Qt),o={producer:e,consumer:Qt,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:en,lastReadVersion:e.version,nextConsumer:void 0};Qt.producersTail=o,t===void 0?Qt.producers=o:t.nextProducer=o,a&&bn(e,o)}function cn(){en++}function ln(e){if((!Sn(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==en)){if(!e.producerMustRecompute(e)&&!vn(e)){pn(e);return}e.producerRecomputeValue(e),pn(e)}}function un(e){if(e.consumers===void 0)return;let t=$t;$t=!0;try{for(let t=e.consumers;t!==void 0;t=t.nextConsumer){let e=t.consumer;e.dirty||fn(e)}}finally{$t=t}}function dn(){return Qt?.consumerAllowSignalWrites!==!1}function fn(e){e.dirty=!0,un(e),e.consumerMarkedDirty?.(e)}function pn(e){e.dirty=!1,e.lastCleanEpoch=en}function mn(e){return e&&hn(e),rn(e)}function hn(e){if(e.producersTail?.knownValidAtEpoch===en){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function gn(e,t){rn(t),e&&_n(e)}function _n(e){e.recomputing=!1;let t=e.producersTail,n=t===void 0?e.producers:t.nextProducer;if(n!==void 0){if(Sn(e))do n=xn(n);while(n!==void 0);t===void 0?e.producers=void 0:t.nextProducer=void 0}}function vn(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let e=t.producer,n=t.lastReadVersion;if(n!==e.version||(ln(e),n!==e.version))return!0}return!1}function yn(e){if(Sn(e)){let t=e.producers;for(;t!==void 0;)t=xn(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function bn(e,t){let n=e.consumersTail,r=Sn(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)bn(t.producer,t)}function xn(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,!Sn(t)){let e=t.producers;for(;e!==void 0;)e=xn(e)}return n}function Sn(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function Cn(e){tn?.(e)}function wn(e,t){return Object.is(e,t)}function Tn(e,t){let n=Object.create(dee);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(ln(n),sn(n),n.value===On)throw n.error;return n.value};return r[nn]=n,Cn(n),r}var En=Symbol(`UNSET`),Dn=Symbol(`COMPUTING`),On=Symbol(`ERRORED`),dee={...on,value:En,dirty:!0,error:null,equal:wn,kind:`computed`,producerMustRecompute(e){return e.value===En||e.value===Dn},producerRecomputeValue(e){if(e.value===Dn)throw Error(``);let t=e.value;e.value=Dn;let n=mn(e),r,i=!1;try{r=e.computation(),rn(null),i=t!==En&&t!==On&&r!==On&&e.equal(t,r)}catch(t){r=On,e.error=t}finally{gn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function fee(){throw Error()}var kn=fee;function An(e){kn(e)}function pee(e){kn=e}var mee=null;function hee(e,t){let n=Object.create(Nn);n.value=e,t!==void 0&&(n.equal=t);let r=()=>gee(n);return r[nn]=n,Cn(n),[r,e=>jn(n,e),e=>Mn(n,e)]}function gee(e){return sn(e),e.value}function jn(e,t){dn()||An(e),e.equal(e.value,t)||(e.value=t,Pn(e))}function Mn(e,t){dn()||An(e),jn(e,t(e.value))}var Nn={...on,equal:wn,value:void 0,kind:`signal`};function Pn(e){e.version++,cn(),un(e),mee?.(e)}var Fn={...on,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:`effect`};function In(e){if(e.dirty=!1,e.version>0&&!vn(e))return;e.version++;let t=mn(e);try{e.cleanup(),e.fn()}finally{gn(e,t)}}var Ln=void 0;function Rn(){return Ln}function zn(e){let t=Ln;return Ln=e,t}var Bn=Symbol(`NotFound`);function Vn(e){return e===Bn||e?.name===`ɵNotFound`}function Hn(e,t,n){let r=Object.create(Gn);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(ln(r),sn(r),r.value===On)throw r.error;return r.value};return i[nn]=r,Cn(r),i}function Un(e,t){ln(e),jn(e,t),pn(e)}function Wn(e,t){if(ln(e),e.value===On)throw e.error;Mn(e,t),pn(e)}var Gn={...on,value:En,dirty:!0,error:null,equal:wn,kind:`linkedSignal`,producerMustRecompute(e){return e.value===En||e.value===Dn},producerRecomputeValue(e){if(e.value===Dn)throw Error(``);let t=e.value;e.value=Dn;let n=mn(e),r,i=!1;try{let n=e.source(),a=t!==En&&t!==On,o=a?{source:e.sourceValue,value:t}:void 0;r=e.computation(n,o),e.sourceValue=n,rn(null),i=a&&r!==On&&e.equal(t,r)}catch(t){r=On,e.error=t}finally{gn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function Kn(e){let t=rn(null);try{return e()}finally{rn(t)}}var qn=function(e,t){return qn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},qn(e,t)};function Jn(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);qn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Yn(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function Xn(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function Qn(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function $n(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof er?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function nr(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Zn==`function`?Zn(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}function rr(e){return typeof e==`function`}function ir(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var ar=ir(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription: `+t.map(function(e,t){return t+1+`) `+e.toString()}).join(` - `):``,this.name=`UnsubscriptionError`,this.errors=t}});function sr(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var cr=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=Qn(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(ir(c))try{c()}catch(e){i=e instanceof or?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Qn(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{dr(f)}catch(e){i??=[],e instanceof or?i=er(er([],$n(i)),$n(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new or(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)dr(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&sr(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&sr(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),lr=cr.EMPTY;function ur(e){return e instanceof cr||e&&`closed`in e&&ir(e.remove)&&ir(e.add)&&ir(e.unsubscribe)}function dr(e){ir(e)?e():e.unsubscribe()}var fr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},pr={setTimeout:function(e,t){var n=[...arguments].slice(2),r=pr.delegate;return r?.setTimeout?r.setTimeout.apply(r,er([e,t],$n(n))):setTimeout.apply(void 0,er([e,t],$n(n)))},clearTimeout:function(e){return(pr.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function mr(e){pr.setTimeout(function(){var t=fr.onUnhandledError;if(t)t(e);else throw e})}function hr(){}var gr=(function(){return yr(`C`,void 0,void 0)})();function _r(e){return yr(`E`,void 0,e)}function vr(e){return yr(`N`,e,void 0)}function yr(e,t,n){return{kind:e,value:t,error:n}}var br=null;function xr(e){if(fr.useDeprecatedSynchronousErrorHandling){var t=!br;if(t&&(br={errorThrown:!1,error:null}),e(),t){var n=br,r=n.errorThrown,i=n.error;if(br=null,r)throw i}}else e()}function Sr(e){fr.useDeprecatedSynchronousErrorHandling&&br&&(br.errorThrown=!0,br.error=e)}var Cr=function(e){Yn(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,ur(t)&&t.add(n)):n.destination=jr,n}return t.create=function(e,t,n){return new Dr(e,t,n)},t.prototype.next=function(e){this.isStopped?Ar(vr(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Ar(_r(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Ar(gr,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(cr),wr=Function.prototype.bind;function Tr(e,t){return wr.call(e,t)}var Er=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Or(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Or(e)}else Or(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Or(e)}},e}(),Dr=function(e){Yn(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(ir(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&fr.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&Tr(t.next,o),error:t.error&&Tr(t.error,o),complete:t.complete&&Tr(t.complete,o)}):a=t}return i.destination=new Er(a),i}return t}(Cr);function Or(e){fr.useDeprecatedSynchronousErrorHandling?Sr(e):mr(e)}function kr(e){throw e}function Ar(e,t){var n=fr.onStoppedNotification;n&&pr.setTimeout(function(){return n(e,t)})}var jr={closed:!0,next:hr,error:kr,complete:hr},Mr=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Nr(e){return e}function Pr(e){return e.length===0?Nr:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Fr=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=Rr(e)?e:new Dr(e,t,n);return xr(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=Ir(t),new t(function(t,r){var i=new Dr({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[Mr]=function(){return this},e.prototype.pipe=function(){return Pr([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Ir(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Ir(e){return e??fr.Promise??Promise}function Lr(e){return e&&ir(e.next)&&ir(e.error)&&ir(e.complete)}function Rr(e){return e&&e instanceof Cr||Lr(e)&&ur(e)}function zr(e){return ir(e?.lift)}function Br(e){return function(t){if(zr(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function Vr(e,t,n,r,i){return new Hr(e,t,n,r,i)}var Hr=function(e){Yn(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(Cr),Ur=ar(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Wr=function(e){Yn(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new Gr(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Ur},t.prototype.next=function(e){var t=this;xr(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=Qn(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;xr(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;xr(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?lr:(this.currentObservers=null,a.push(e),new cr(function(){t.currentObservers=null,sr(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 Fr;return e.source=this,e},t.create=function(e,t){return new Gr(e,t)},t}(Fr),Gr=function(e){Yn(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)??lr},t}(Wr),Kr=function(e){Yn(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}(Wr);function qr(e){return e[e.length-1]}function Jr(e){return ir(qr(e))?e.pop():void 0}var Yr=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function Xr(e){return ir(e?.then)}function Zr(e){return ir(e[Mr])}function Qr(e){return Symbol.asyncIterator&&ir(e?.[Symbol.asyncIterator])}function $r(e){return TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function ei(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var ti=ei();function ni(e){return ir(e?.[ti])}function ri(e){return nr(this,arguments,function(){var t,n,r,i;return Zn(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,tr(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,tr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,tr(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function ii(e){return ir(e?.getReader)}function ai(e){if(e instanceof Fr)return e;if(e!=null){if(Zr(e))return gee(e);if(Yr(e))return _ee(e);if(Xr(e))return vee(e);if(Qr(e))return oi(e);if(ni(e))return yee(e);if(ii(e))return bee(e)}throw $r(e)}function gee(e){return new Fr(function(t){var n=e[Mr]();if(ir(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function _ee(e){return new Fr(function(t){for(var n=0;n=0?n.slice(0,r):n}function _i(e,t){return e?t?`${e} ${t}`:e:t||``}var Hee=hi({__forward_ref__:hi});function vi(e){return e.__forward_ref__=vi,e}function yi(e){return bi(e)?e():e}function bi(e){return typeof e==`function`&&Object.hasOwn(e,Hee)&&e.__forward_ref__===vi}function xi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Si(e){return Ci(e,Ei)}function Ci(e,t){return Object.hasOwn(e,t)&&e[t]||null}function wi(e){return(e?.[Ei]??null)||null}function Ti(e){return e&&Object.hasOwn(e,Di)?e[Di]:null}var Ei=hi({ɵprov:hi}),Di=hi({ɵinj:hi}),Oi=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=xi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function ki(e){return e&&!!e.ɵproviders}var Ai=hi({ɵcmp:hi}),ji=hi({ɵdir:hi}),Mi=hi({ɵpipe:hi}),Ni=hi({ɵfac:hi}),Pi=hi({__NG_ELEMENT_ID__:hi}),Fi=hi({__NG_ENV_ID__:hi});function Ii(e){return zi(e,`@Component`),e[Ai]||null}function Li(e){return zi(e,`@Directive`),e[ji]||null}function Ri(e){return zi(e,`@Pipe`),e[Mi]||null}function zi(e,t){if(e==null)throw new pi(-919,!1)}function Bi(e){return typeof e==`string`?e:e==null?``:String(e)}var Vi=hi({ngErrorCode:hi}),Hi=hi({ngErrorMessage:hi}),Ui=hi({ngTokenPath:hi});function Wi(e,t){return Ki(``,-200,t)}function Gi(e,t){throw new pi(-201,!1)}function Ki(e,t,n){let r=new pi(t,e);return r[Vi]=t,r[Hi]=e,n&&(r[Ui]=n),r}function qi(e){return e[Vi]}var Ji;function Yi(){return Ji}function Xi(e){let t=Ji;return Ji=e,t}function Zi(e,t,n){let r=Si(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;Gi(e,``)}var Qi=globalThis,$i={},ea=`__NG_DI_FLAG__`,ta=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=ia(t)||0;try{return this.injector.get(e,n&8?null:$i,n)}catch(e){if(Hn(e))return e;throw e}}};function na(e,t=0){let n=zn();if(n===void 0)throw new pi(-203,!1);if(n===null)return Zi(e,void 0,t);{let r=aa(t),i=n.retrieve(e,r);if(Hn(i)){if(r.optional)return null;throw i}return i}}function ra(e,t=0){return(Yi()||na)(yi(e),t)}function x(e,t){return ra(e,ia(t))}function ia(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function aa(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function oa(e){let t=[];for(let n=0;nArray.isArray(e)?da(e,t):t(e))}function fa(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function pa(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function ma(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 ga(e,t,n){let r=va(e,t);return r>=0?e[r|1]=n:(r=~r,ha(e,r,t,n)),r}function _a(e,t){let n=va(e,t);if(n>=0)return e[n|1]}function va(e,t){return ya(e,t,1)}function ya(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 da(t,e=>{let t=e;ka(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Oa(i,a),n}function Oa(e,t){for(let n=0;n{t(e,r)})}}function ka(e,t,n,r){if(e=yi(e),!e)return!1;let i=null,a=Ti(e),o=!a&&Ii(e);if(!a&&!o){let t=e.ngModule;if(a=Ti(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)ka(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{da(a.imports,i=>{ka(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Oa(e,t)}if(!s){let e=ca(i)||(()=>new i);t({provide:i,useFactory:e,deps:xa},i),t({provide:wa,useValue:i,multi:!0},i),t({provide:Sa,useValue:()=>ra(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Aa(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Aa(e,t){for(let n of e)ki(n)&&(n=n.ɵproviders),Array.isArray(n)?Aa(n,t):t(n)}var ja=hi({provide:String,useValue:hi});function Ma(e){return typeof e==`object`&&!!e&&ja in e}function Na(e){return!!(e&&e.useExisting)}function Pa(e){return!!(e&&e.useFactory)}function Fa(e){return typeof e==`function`}function Ia(e){return!!e.useClass}var La=new Oi(``),Ra={},za={},Ba=void 0;function Va(){return Ba===void 0&&(Ba=new Ta),Ba}var Ha=class{},Ua=class extends Ha{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,$a(e,e=>this.processProvider(e)),this.records.set(Ca,Ya(void 0,this)),r.has(`environment`)&&this.records.set(Ha,Ya(void 0,this));let i=this.records.get(La);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(wa,xa,{self:!0}))}retrieve(e,t){let n=ia(t)||0;try{return this.get(e,$i,n)}catch(e){if(Hn(e))return e;throw e}}destroy(){Ja(this),this._destroyed=!0;let e=an(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(),an(e)}}onDestroy(e){return Ja(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ja(this);let t=Bn(this),n=Xi(void 0);try{return e()}finally{Bn(t),Xi(n)}}get(e,t=$i,n){if(Ja(this),Object.hasOwn(e,Fi))return e[Fi](this);let r=ia(n),i=Bn(this),a=Xi(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Qa(e)&&Si(e);t=n&&this.injectableDefInScope(n)?Ya(Wa(e),Ra):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Va():this.parent;return t=r&8&&t===$i?null:t,n.get(e,t)}catch(e){let t=qi(e);throw t===-200||t===-201?new pi(t,null):e}finally{Xi(a),Bn(i)}}resolveInjectorInitializers(){let e=an(null),t=Bn(this),n=Xi(void 0);try{let e=this.get(Sa,xa,{self:!0});for(let t of e)t()}finally{Bn(t),Xi(n),an(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=yi(e);let t=Fa(e)?e:yi(e&&e.provide),n=Ka(e);if(!Fa(e)&&e.multi===!0){let n=this.records.get(t);n||(n=Ya(void 0,Ra,!0),n.factory=()=>oa(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=an(null);try{if(t.value===za)throw Wi(``);return t.value===Ra&&(t.value=za,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Za(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{an(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=yi(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 Wa(e){let t=Si(e),n=t===null?ca(e):t.factory;if(n!==null)return n;if(e instanceof Oi)throw new pi(-204,!1);if(e instanceof Function)return Ga(e);throw new pi(-204,!1)}function Ga(e){if(e.length>0)throw new pi(-204,!1);let t=wi(e);return t===null?()=>new e:()=>t.factory(e)}function Ka(e){return Ma(e)?Ya(void 0,e.useValue):Ya(qa(e),Ra)}function qa(e,t,n){let r;if(Fa(e)){let t=yi(e);return ca(t)||Wa(t)}if(Ma(e))r=()=>yi(e.useValue);else if(Pa(e))r=()=>e.useFactory(...oa(e.deps||[]));else if(Na(e))r=(t,n)=>ra(yi(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=yi(e&&(e.useClass||e.provide));if(Xa(e))r=()=>new t(...oa(e.deps));else return ca(t)||Wa(t)}return r}function Ja(e){if(e.destroyed)throw new pi(-205,!1)}function Ya(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Xa(e){return!!e.deps}function Za(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Qa(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function $a(e,t){for(let n of e)Array.isArray(n)?$a(n,t):n&&ki(n)?$a(n.ɵproviders,t):t(n)}function eo(e,t){let n;e instanceof Ua?(Ja(e),n=e):n=new ta(e);let r=Bn(n),i=Xi(void 0);try{return t()}finally{Bn(r),Xi(i)}}function to(){return Yi()!==void 0||zn()!=null}var no=1;function ro(e){return Array.isArray(e)&&typeof e[no]==`object`}function io(e){return Array.isArray(e)&&e[no]===!0}function ao(e){return!!(e.flags&4)}function oo(e){return e.componentOffset>-1}function so(e){return(e.flags&1)==1}function co(e){return!!e.template}function lo(e){return!!(e[2]&512)}function uo(e){return(e[2]&256)==256}var fo=(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})(fo||{}),po=`math`;function mo(e){for(;Array.isArray(e);)e=e[0];return e}function ho(e,t){return mo(t[e])}function go(e,t){return mo(t[e.index])}function _o(e,t){return e.data[t]}function vo(e,t){return e[t]}function yo(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function bo(e,t){let n=t[e];return ro(n)?n:n[0]}function xo(e){return(e[2]&128)==128}function So(e){return io(e[3])}function Co(e,t){return t==null?null:e[t]}function wo(e){e[17]=0}function To(e){e[2]&1024||(e[2]|=1024,xo(e)&&Oo(e))}function Uee(e,t){for(;e>0;)t=t[14],e--;return t}function Eo(e){return!!(e[2]&9216||e[24]?.dirty)}function Do(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),Eo(e)&&Oo(e)}function Oo(e){e[10].changeDetectionScheduler?.notify(0);let t=Ao(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!xo(t)));)t=Ao(t)}function ko(e,t){if(uo(e))throw new pi(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Wee(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function Ao(e){let t=e[3];return io(t)?t[3]:t}function jo(e){return e[7]??=[]}function Mo(e){return e.cleanup??=[]}function Gee(e,t,n,r){let i=jo(t);i.push(n),e.firstCreatePass&&Mo(e).push(r,i.length-1)}var No={lFrame:as(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Po=!1;function Kee(){return No.lFrame.elementDepthCount}function qee(){No.lFrame.elementDepthCount++}function Fo(){No.lFrame.elementDepthCount--}function Io(){return No.bindingsEnabled}function Lo(){return No.skipHydrationRootTNode!==null}function Ro(e){return No.skipHydrationRootTNode===e}function zo(){No.skipHydrationRootTNode=null}function Bo(){return No.lFrame.lView}function Vo(){return No.lFrame.tView}function S(e){return No.lFrame.contextLView=e,e[8]}function C(e){return No.lFrame.contextLView=null,e}function Ho(){let e=Uo();for(;e!==null&&e.type===64;)e=e.parent;return e}function Uo(){return No.lFrame.currentTNode}function Jee(){let e=No.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Wo(e,t){let n=No.lFrame;n.currentTNode=e,n.isParent=t}function Go(){return No.lFrame.isParent}function Ko(){No.lFrame.isParent=!1}function qo(){return No.lFrame.contextLView}function Jo(){return Po}function Yo(e){let t=Po;return Po=e,t}function Xo(){let e=No.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Zo(){return No.lFrame.bindingIndex}function Yee(e){return No.lFrame.bindingIndex=e}function Qo(){return No.lFrame.bindingIndex++}function $o(e){let t=No.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Xee(){return No.lFrame.inI18n}function Zee(e,t){let n=No.lFrame;n.bindingIndex=n.bindingRootIndex=e,es(t)}function Qee(){return No.lFrame.currentDirectiveIndex}function es(e){No.lFrame.currentDirectiveIndex=e}function $ee(e){let t=No.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function ete(){return No.lFrame.currentQueryIndex}function ts(e){No.lFrame.currentQueryIndex=e}function tte(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function ns(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=tte(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=No.lFrame=is();return r.currentTNode=t,r.lView=e,!0}function rs(e){let t=is(),n=e[1];No.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function is(){let e=No.lFrame,t=e===null?null:e.child;return t===null?as(e):t}function as(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 os(){let e=No.lFrame;return No.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var ss=os;function cs(){let e=os();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 nte(e){return(No.lFrame.contextLView=Uee(e,No.lFrame.contextLView))[8]}function ls(){return No.lFrame.selectedIndex}function us(e){No.lFrame.selectedIndex=e}function ds(){let e=No.lFrame;return _o(e.tView,e.selectedIndex)}function w(){No.lFrame.currentNamespace=`svg`}function fs(){ps()}function ps(){No.lFrame.currentNamespace=null}function ms(){return No.lFrame.currentNamespace}var hs=!0;function gs(){return hs}function _s(e){hs=e}function vs(e,t=null,n=null,r){let i=ys(e,t,n,r);return i.resolveInjectorInitializers(),i}function ys(e,t=null,n=null,r,i=new Set){return new Ua([n||xa,Ea(e)],t||Va(),null,i)}var bs=class e{static THROW_IF_NOT_FOUND=$i;static NULL=new Ta;static create(e,t){if(Array.isArray(e))return vs({name:``},t,e,``);{let t=e.name??``;return vs({name:t},e.parent,e.providers,t)}}static ɵprov=xi({token:e,providedIn:`any`,factory:()=>ra(Ca)});static __NG_ELEMENT_ID__=-1},xs=new Oi(``),Ss=class{static __NG_ELEMENT_ID__=ws;static __NG_ENV_ID__=e=>e},Cs=class extends Ss{_lView;constructor(e){super(),this._lView=e}get destroyed(){return uo(this._lView)}onDestroy(e){let t=this._lView;return ko(t,e),()=>Wee(t,e)}};function ws(){return new Cs(Bo())}var Ts=new Oi(``),Es=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Kr(!1);debugTaskTracker=x(Ts,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Fr(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=xi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Ds=class extends Wr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,to()&&(this.destroyRef=x(Ss,{optional:!0})??void 0,this.pendingTasks=x(Es,{optional:!0})??void 0)}emit(e){let t=an(null);try{super.next(e)}finally{an(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 cr&&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 Os(...e){}function ks(e){let t,n;function r(){e=Os;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 As(e){return queueMicrotask(()=>e()),()=>{e=Os}}var js=`isAngularZone`,Ms=`isAngularZone_ID`,Ns=0,Ps=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Ds(!1);onMicrotaskEmpty=new Ds(!1);onStable=new Ds(!1);onError=new Ds(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new pi(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,Rs(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(js)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new pi(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new pi(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,Fs,Os,Os);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)}},Fs={};function Is(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 Ls(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){ks(()=>{e.callbackScheduled=!1,zs(e),e.isCheckStableRunning=!0,Is(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),zs(e)}function Rs(e){let t=()=>{Ls(e)},n=Ns++;e._inner=e._inner.fork({name:`angular`,properties:{[js]:!0,[Ms]:n,[Ms+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Us(s))return n.invokeTask(i,a,o,s);try{return Bs(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Vs(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Bs(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Ws(s)&&t(),Vs(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,zs(e),Is(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 zs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Bs(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Vs(e){e._nesting--,Is(e)}var Hs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Ds;onMicrotaskEmpty=new Ds;onStable=new Ds;onError=new Ds;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 Us(e){return Gs(e,`__ignore_ng_zone__`)}function Ws(e){return Gs(e,`__scheduler_tick__`)}function Gs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Ks=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},qs=new Oi(``,{factory:()=>{let e=x(Ps),t=x(Ha),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Ks),n.handleError(r))})}}}),Js={provide:Sa,useValue:()=>{x(Ks,{optional:!0})},multi:!0};function T(e,t){let[n,r,i]=mee(e,t?.equal),a=n;return a[rn],a.set=r,a.update=i,a.asReadonly=Ys.bind(a),a}function Ys(){let e=this[rn];if(e.readonlyFn===void 0){let t=()=>this();t[rn]=e,e.readonlyFn=t}return e.readonlyFn}var Xs=new Oi(``,{factory:()=>Zs}),Zs=`ng`,Qs=new Oi(``),$s=new Oi(``,{providedIn:`platform`,factory:()=>`unknown`}),ec=new Oi(``,{factory:()=>x(xs).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),tc=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=nc}return e})();function nc(){return new tc(Bo(),Ho())}var rc=class{},ic=new Oi(``,{factory:()=>!0}),ac=new Oi(``),oc=(()=>{class e{static ɵprov=xi({token:e,providedIn:`root`,factory:()=>new sc})}return e})(),sc=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}},cc=class{[rn];constructor(e){this[rn]=e}destroy(){this[rn].destroy()}};function E(e,t){let n=t?.injector??x(bs),r=t?.manualCleanup===!0?null:n.get(Ss),i,a=n.get(tc,null,{optional:!0}),o=n.get(rc);return a===null?i=pc(e,n.get(oc),o):(i=fc(a.view,o,e),r instanceof Cs&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new cc(i)}var lc={...In,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Yo(!1);try{Ln(this)}finally{Yo(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=an(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],an(e)}}},uc={...lc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(bn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},dc={...lc,consumerMarkedDirty(){this.view[2]|=8192,Oo(this.view),this.notifier.notify(13)},destroy(){if(bn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function fc(e,t,n){let r=Object.create(dc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=mc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function pc(e,t,n){let r=Object.create(uc);return r.fn=mc(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 mc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function hc(e){return typeof e==`function`&&e[rn]!==void 0}function gc(e){return hc(e)&&typeof e.set==`function`}var _c=Symbol(`InputSignalNode#UNSET`),vc={...Pn,transformFn:void 0,applyValueToInputSignal(e,t){Mn(e,t)}};function yc(e){return{toString:e}.toString()}var bc=(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})(bc||{}),xc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Sc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var Cc=null,wc=(()=>{Cc=Ec;let e=()=>Ec;return e.ngInherit=!0,e})();function Tc(){return Cc}function Ec(e){return e.type.prototype.ngOnChanges&&(e.setInput=Oc),Dc}function Dc(){let e=Ac(this),t=e?.current;if(t){let n=e.previous;if(n===ba)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Oc(e,t,n,r,i){let a=this.declaredInputs[r],o=Ac(e)||jc(e,{previous:ba,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new xc(l&&l.currentValue,n,c===ba),Sc(e,t,i,n)}var kc=`__ngSimpleChanges__`;function Ac(e){return Object.hasOwn(e,kc)&&e[kc]||null}function jc(e,t){return e[kc]=t}var Mc=[],Nc=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,Bc(o,a)):Bc(o,a)}var Hc=-1,Uc=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 Wc(e){return!!(e.flags&8)}function Gc(e){return!!(e.flags&16)}function Kc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function el(e,t){let n=$c(e),r=t;for(;n>0;)r=r[14],n--;return r}var tl=!0;function nl(e){let t=tl;return tl=e,t}var rl=255,il=5,al=0,ol={};function sl(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,Pi)&&(r=n[Pi]),r??=n[Pi]=al++;let i=r&rl,a=1<>il)]|=a}function cl(e,t){let n=ul(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,ll(r.data,e),ll(t,null),ll(r.blueprint,null));let i=dl(e,t),a=e.injectorIndex;if(Zc(i)){let e=Qc(i),n=el(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 ll(e,t){e.push(0,0,0,0,0,0,0,0,t)}function ul(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function dl(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=Ol(i),r===null)return Hc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Hc}function fl(e,t,n){sl(e,t,n)}function pl(e,t,n){if(n&8||e!==void 0)return e;Gi(t,`NodeInjector`)}function ml(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Xi(void 0);try{return i?i.get(t,r,n&8):Zi(t,r,n&8)}finally{Xi(a)}}return pl(r,t,n)}function hl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=Dl(e,t,n,r,ol);if(i!==ol)return i}let i=gl(e,t,n,r,ol);if(i!==ol)return i}return ml(t,n,r,i)}function gl(e,t,n,r,i){let a=bl(n);if(typeof a==`function`){if(!ns(t,e,r))return r&1?pl(i,n,r):ml(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Gi(n);else return e}finally{ss()}}else if(typeof a==`number`){let i=null,o=ul(e,t),s=Hc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?dl(e,t):t[o+8],s===Hc||!Sl(r,!1)?o=-1:(i=t[1],o=Qc(s),t=el(s,t)));o!==-1;){let e=t[1];if(xl(a,o,e.data)){let e=_l(o,t,n,i,r,c);if(e!==ol)return e}s=t[o+8],s!==Hc&&Sl(r,t[1].data[o+8]===c)&&xl(a,o,t)?(i=e,o=Qc(s),t=el(s,t)):o=-1}}return i}function _l(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=vl(s,o,n,r==null?oo(s)&&tl:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?ol:yl(t,o,c,s,i)}function vl(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&&co(e)&&e.type===n)return c}return null}function yl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Uc){let s=a;if(s.resolving)throw Wi(``);let c=nl(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Xi(s.injectImpl):null;ns(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Pc(n,o[n],t)}finally{l!==null&&Xi(l),nl(c),s.resolving=!1,ss()}}return a}function bl(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Pi)?e[Pi]:void 0;return typeof t==`number`?t>=0?t&rl:wl:t}function xl(e,t,n){let r=1<>il)]&r)}function Sl(e,t){return!(e&2)&&!(e&1&&t)}var Cl=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return hl(this._tNode,this._lView,e,ia(n),t)}};function wl(){return new Cl(Ho(),Bo())}function Tl(e){return yc(()=>{let t=e.prototype.constructor,n=t[Ni]||El(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let e=i[Ni]||El(i);if(e&&e!==n)return e;i=Object.getPrototypeOf(i)}return e=>new e})}function El(e){return bi(e)?()=>{let t=El(yi(e));return t&&t()}:ca(e)}function Dl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!lo(o);){let e=gl(a,o,n,r|2,ol);if(e!==ol)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,ol,r);if(t!==ol)return t}t=Ol(o),o=o[14]}a=t}return i}function Ol(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function kl(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Al(){return jl(Ho(),Bo())}function jl(e,t){return new Ml(go(e,t))}var Ml=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Al}return e})();function Nl(e){return e instanceof Ml?e.nativeElement:e}function Pl(){return this._results[Symbol.iterator]()}var Fl=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 Wr}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=ua(e);(this._changesDetected=!la(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]=Pl};function Il(e){return(e.flags&128)==128}var Ll=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Ll||{}),Rl=new Map,zl=0;function Bl(){return zl++}function Vl(e){Rl.set(e[19],e)}function Hl(e){Rl.delete(e[19])}var Ul=`__ngContext__`;function Wl(e,t){ro(t)?(e[Ul]=t[19],Vl(t)):e[Ul]=t}function Gl(e){return ql(e[12])}function Kl(e){return ql(e[4])}function ql(e){for(;e!==null&&!io(e);)e=e[4];return e}var Jl=void 0;function Yl(e){Jl=e}function Xl(){if(Jl!==void 0)return Jl;if(typeof document<`u`)return document;throw new pi(210,!1)}var Zl=!1,Ql=new Oi(``,{factory:()=>Zl}),$l=new WeakMap;function eu(e,t){if(typeof e!=`object`||!e)return;let n=$l.get(e);n||(n=new WeakSet,$l.set(e,n)),n.add(t)}function tu(e){return(e.flags&32)==32}var nu=()=>null;function ru(e,t,n=!1){return nu(e,t,n)}function iu(e,t){let n=e.contentQueries;if(n!==null){let r=an(null);try{for(let r=0;r|^->||--!>|)/g,gu=`​$1​`;function _u(e){return e.replace(mu,e=>e.replace(hu,gu))}function vu(e,t){return e.createText(t)}function yu(e,t,n){e.setValue(t,n)}function bu(e,t){return e.createComment(_u(t))}function xu(e,t,n){return e.createElement(t,n)}function Su(e,t,n,r,i){e.insertBefore(t,n,r,i)}function Cu(e,t,n){e.appendChild(t,n)}function wu(e,t,n,r,i){r===null?Cu(e,t,n):Su(e,t,n,r,i)}function Tu(e,t,n,r){e.removeChild(null,t,n,r)}function rte(e,t,n){e.setAttribute(t,`style`,n)}function ite(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function Eu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Kc(e,t,r),i!==null&&ite(e,t,i),a!==null&&rte(e,t,a)}function Du(e){let t=ate();return t?t.sanitize(fo.URL,e)||``:uu(e,`URL`)?lu(e):pu(Bi(e))}function ate(){let e=Bo();return e&&e[10].sanitizer}function Ou(e){return e.ownerDocument.defaultView}function ku(e){return e.ownerDocument}function ote(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let n=t.length;if(i+n===r||e.charCodeAt(i+n)<=32)return i}n=i+1}}var Au=`ng-template`;function ste(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(Mu(r))return!1;o=!0}}}}}return Mu(r)||o}function Mu(e){return!(e&1)}function ute(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!==``&&!Mu(o)&&(t+=Pu(a,i),i=``),r=o,a||=!Mu(r);n++}return i!==``&&(t+=Pu(a,i)),t}function gte(e){return e.map(hte).join(`,`)}function _te(e){let t=[],n=[],r=1,i=2;for(;r!1});function Ru(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function zu(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function bte(e){let t=zu(e,`transition-property`),n=zu(e,`transition-duration`),r=zu(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 xte(e){let t=zu(e,`animation-name`),n=zu(e,`animation-delay`),r=zu(e,`animation-duration`),i=zu(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 Bu(e,t){return e!==void 0&&e.duration>t.duration}function Vu(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function Hu(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 Ste(e,t){let n=getComputedStyle(e),r=xte(n),i=bte(n),a=r.duration>i.duration?r:i;Bu(t.get(e),a)||Vu(a)&&t.set(e,a)}function Cte(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?Ste(e,t):wte(e,t,r)}function wte(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=Hu(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}Bu(t.get(e),r)||Vu(r)&&t.set(e,r)}var Uu=new Set,Tte=!1,Ete=1,Wu=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function Dte(e){return e[9].get(yte,Tte)}function Ote(e,t,n){let r=Ku.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else Ku.set(e,{classList:t,cleanupFns:n})}function Gu(e){let t=Ku.get(e);if(t){for(let e of t.cleanupFns)e();Ku.delete(e)}qu.delete(e)}var Ku=new WeakMap,qu=new WeakMap,Ju=new WeakMap;function Yu(e){return e?e[14]??e:null}var Xu=new WeakSet;function kte(e,t,n){let r=Ju.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=Yu(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),Xu.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 Ate(e,t,n){let r=Yu(n),i=Ju.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):Ju.set(e,[{el:t,declarationView:r}])}function Zu(e){let t=e[26]??={};return t.enter??=new Map}function jte(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 Qu(e){return e.composedPath?e.composedPath()[0]:e.target}function $u(e,t){let n=qu.get(t);if(n===void 0)return!0;if(t!==Qu(e))return!1;let r=e.animation;if(r){let e=Hu(r);if(e!==void 0&&e+Ete{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=xi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),ad=[0,1,2,3],od=(()=>{class e{ngZone=x(Ps);scheduler=x(rc);errorHandler=x(Ks,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){x(td,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Nc(bc.AfterRenderHooksStart),this.executing=!0;for(let e of ad)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&&Nc(bc.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),Oo(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(ed.AFTER_NEXT_RENDER,e):e()}static ɵprov=xi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),sd=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 cd(e,t){let n=t?.injector??x(bs);return rd(`NgAfterNextRender`),Pte(e,n,t,!0)}function Nte(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Pte(e,t,n,r){let i=t.get(id);i.impl??=t.get(od);let a=t.get(td,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(Ss),s=t.get(tc,null,{optional:!0}),c=new sd(i.impl,Nte(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var ld=new Oi(``,{factory:()=>{let e=x(Ha),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function ud(e,t,n){let r=e.get(ld);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 Fte(e,t){let n=e.get(ld);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Ite(e,t){let n=e.get(ld);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Lte(e){let t=e.get(ld);t.isScheduled||=(cd(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Rte(e){let t=e.get(ld);t.scheduler=Lte,t.scheduler(e)}function dd(e,t){for(let[n,r]of t)ud(e,r.animateFns)}function fd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&dd(r,i)}function pd(e,t,n,r){try{n.get(Ca)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Fte(n,i.enter.get(t.index).animateFns);let a=zte(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];md(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Uu.add(e[19]),ud(n,()=>Bte(e,t,i||void 0,a,r),i||void 0)}function zte(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 Bte(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&&md(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),Hte(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Uu.delete(e[19]),i(!0)})}else e&&Uu.delete(e[19]),i(!1)}function md(e,t,n){if(t.type&12){let r=e[t.index];if(io(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,Uu.delete(e[19])),n(!0)})}function hd(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;io(i)?c=i:ro(i)&&(l=!0,i=i[0]);let u=mo(i);e===0&&r!==null?(fd(s,r,a,n),o==null?Cu(t,r,u):Su(t,r,u,o||null,!0)):e===1&&r!==null?(fd(s,r,a,n),Su(t,r,u,o||null,!0),kte(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Ate(a,u,s),Xu.delete(u),pd(s,a,n,e=>{if(Xu.has(u)){Xu.delete(u);return}Tu(t,u,l,e)})):e===3&&(Xu.delete(u),pd(s,a,n,()=>{t.destroyNode(u)})),c!=null&&kd(t,e,n,c,a,r,o)}}function Ute(e,t){gd(e,t),t[0]=null,t[5]=null}function Wte(e,t,n,r,i,a){r[0]=i,r[5]=t,Dd(e,r,n,1,i,a)}function gd(e,t){t[10].changeDetectionScheduler?.notify(9),Dd(e,t,t[11],2,null,null)}function Gte(e){let t=e[12];if(!t)return yd(e[1],e);for(;t;){let n=null;if(ro(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)ro(t)&&yd(t[1],t),t=t[3];t===null&&(t=e),ro(t)&&yd(t[1],t),n=t&&t[4]}t=n}}function _d(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function vd(e,t){if(uo(t))return;let n=t[11];n.destroyNode&&Dd(e,t,n,3,null,null),Gte(t)}function yd(e,t){if(uo(t))return;let n=an(null);try{t[2]&=-129,t[2]|=256,t[24]&&bn(t[24]),qte(e,t),Kte(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&io(t[3])){n!==t[3]&&_d(n,t);let r=t[18];r!==null&&r.detachView(e)}Hl(t)}finally{an(n)}}function Kte(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&&zd(e,t,27,!1),Nc(o?bc.TemplateUpdateStart:bc.TemplateCreateStart,i,n),n(r,i)}finally{us(a),Nc(o?bc.TemplateUpdateEnd:bc.TemplateCreateEnd,i,n)}}function Ud(e,t,n){Xd(e,t,n),(n.flags&64)==64&&Zd(e,t,n)}function Wd(e,t,n=go){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a=s&&i<=c){let o=t.data[i],s=r[e+1];Vd(o,n[i],s,a),l=!0}else if(i>c)break}}return o!==null&&Object.hasOwn(r.inputs,i)&&(Vd(r,n[o],i,a),l=!0),l}function lf(e,t){let n=bo(t,e),r=n[1];uf(r,n);let i=n[0];i!==null&&n[6]===null&&(n[6]=ru(i,n[9])),Nc(bc.ComponentStart);try{df(r,n,n[8])}finally{Nc(bc.ComponentEnd,n[8])}}function uf(e,t){for(let n=t.length;n{Oo(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function Cf(e){let t=e[24]??Object.create(wf);return t.lView=e,t}var wf={...sn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Ao(e.lView);for(;t&&!Tf(t[1]);)t=Ao(t);t&&To(t)},consumerOnSignalRead(){this.lView[24]=this}};function Tf(e){return e.type!==2}function Ef(e){if(e[23]===null)return;let t=!0;for(;t;){let n=!1;for(let t of e[23])if(t.dirty&&(n=!0,t.zone===null||Zone.current===t.zone?t.run():t.zone.run(()=>t.run()),e[23]===null))return;t=n&&!!(e[2]&8192)}}var Df=100;function Of(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{kf(e,t)}finally{n.end?.()}}function kf(e,t){let n=Jo();try{Yo(!0),Ff(e,t);let n=0;for(;Eo(e);){if(n===Df)throw new pi(103,!1);n++,Ff(e,1)}}finally{Yo(n)}}function Af(e,t,n,r){if(uo(t))return;let i=t[2];rs(t);let a=!0,o=null,s=null;Tf(e)?(s=yf(t),o=hn(s)):on()===null?(a=!1,s=Cf(t),o=hn(s)):t[24]&&=(bn(t[24]),null);try{wo(t),Yee(e.bindingStartIndex),n!==null&&Hd(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Ic(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Lc(t,n,0,null),Rc(t,0)}if(Mf(t),Ef(t),jf(t,0),e.contentQueries!==null&&iu(e,t),a){let n=e.contentCheckHooks;n!==null&&Ic(t,n)}else{let n=e.contentHooks;n!==null&&Lc(t,n,1),Rc(t,1)}Lf(e,t);let o=e.components;o!==null&&If(t,o,0);let s=e.viewQuery;if(s!==null&&au(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Ic(t,n)}else{let n=e.viewHooks;n!==null&&Lc(t,n,2),Rc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}_f(t),t[2]&=-73}catch(e){throw Oo(t),e}finally{s!==null&&(_n(s,o),a&&xf(s)),cs()}}function jf(e,t){for(let n=Gl(e);n!==null;n=Kl(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=pa(e,10+t);Ute(r[1],r);let o=a[18];o!==null&&o.detachView(a[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function Wf(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(Uf(e,n),pa(t,n))}this._attachedToViewContainer=!1}vd(this._lView[1],this._lView)}onDestroy(e){ko(this._lView,e)}markForCheck(){Rf(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){Do(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Of(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pi(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=lo(this._lView),t=this._lView[16];t!==null&&!e&&_d(t,this._lView),gd(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new pi(902,!1);this._appRef=e;let t=lo(this._lView),n=this._lView[16];n!==null&&!t&&Gf(n,this._lView),Do(this._lView)}},qf=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=Jf;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 Kf(pf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function Jf(){return Yf(Ho(),Bo())}function Yf(e,t){return e.type&4?new qf(t,e,jl(e,t)):null}function Xf(e,t,n,r,i){let a=e.data[t];if(a===null)a=Zf(e,t,n,r,i),Xee()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Jee();a.injectorIndex=e===null?-1:e.injectorIndex}return Wo(a,!0),a}function Zf(e,t,n,r,i){let a=Uo(),o=Go(),s=o?a:a&&a.parent,c=e.data[t]=$f(e,s,n,t,r,i);return Qf(e,c,a,o),c}function Qf(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 $f(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Lo()&&(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:ms(),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 ep(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?tp(e,n):r.push(e);e[6]=r}function tp(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,rp=()=>null;function ip(e,t){return np(e,t)}function ap(e,t,n){return rp(e,t,n)}var op=class{},sp=class{},cp=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>lp()};function lp(){let e=Bo(),t=bo(Ho().index,e);return(ro(t)?t:e)[11]}var up=(()=>{class e{static ɵprov=xi({token:e,providedIn:`root`,factory:()=>null})}return e})();function dp(e){return e.debugInfo?.className||e.type.name||null}var fp={},pp=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,fp,n);return r!==fp||t===fp?r:this.parentInjector.get(e,t,n)}};function mp(e,t,n){return e[t]=n}function hp(e,t){return e[t]}function gp(e,t,n){if(n===Fu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function _p(e,t,n,r){let i=gp(e,t,n);return gp(e,t+1,r)||i}function vp(e,t,n,r,i){let a=_p(e,t,n,r);return gp(e,t+2,i)||a}function yp(e,t,n,r,i,a){let o=_p(e,t,n,r);return _p(e,t+2,i,a)||o}function bp(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&eu(i,a),Rf(oo(e)?bo(e.index,t):t,5);let o=t[8],s=xp(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=xp(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function xp(e,t,n,r){let i=an(null);try{return Nc(bc.OutputStart,t,n),n(r)!==!1}catch(t){return of(e,t),!1}finally{Nc(bc.OutputEnd,t,n),an(i)}}function Sp(e,t,n,r,i,a,o,s){let c=so(e),l=!1,u=null;if(!r&&c&&(u=wp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=go(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);Cp(a)||Tp(r?t=>r(mo(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function Cp(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function wp(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 Tp(e,t,n,r,i,a,o){let s=t.firstCreatePass?Mo(t):null,c=jo(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function Ep(e,t,n,r,i){let a=null,o=null,s=null,c=!1,l=e.directiveToIndex.get(n.type);if(typeof l==`number`?a=l:[a,o,s]=l,o!==null&&s!==null&&e.hostDirectiveOutputs&&Object.hasOwn(e.hostDirectiveOutputs,r)){let n=e.hostDirectiveOutputs[r];for(let a=0;a=o&&l<=s)c=!0,Dp(e,t,l,n[a+1],r,i);else if(l>s)break}}return Object.hasOwn(n.outputs,r)&&(c=!0,Dp(e,t,a,r,r,i)),c}function Dp(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Tp(e.index,s,t,i,a,c,!0)}function Op(){kp()}function kp(){let e=Bo(),t=Vo(),n=Ho();if(t.firstCreatePass&&Fp(t,n),n.controlDirectiveIndex===-1)return;rd(`NgSignalForms`);let r=e[n.controlDirectiveIndex];t.data[n.controlDirectiveIndex].controlDef.create(r,new Mp(e,t,n))}function Ap(){jp()}function jp(){let e=Bo(),t=Vo(),n=ds();if(n.controlDirectiveIndex===-1)return;let r=t.data[n.controlDirectiveIndex].controlDef,i=e[n.controlDirectiveIndex];r.update(i,new Mp(e,t,n))}var Mp=class{lView;tView;tNode;hasPassThrough;constructor(e,t,n){this.lView=e,this.tView=t,this.tNode=n,this.hasPassThrough=!!(n.flags&4096)}get customControl(){return this.tNode.customControlIndex===-1?void 0:this.lView[this.tNode.customControlIndex]}get nativeElement(){return go(this.tNode,this.lView)}get descriptor(){return`<${this.tNode.value}>`}listenToCustomControlOutput(e,t){let n=this.tView.data[this.tNode.customControlIndex];Ep(this.tNode,this.lView,n,e,bp(this.tNode,this.lView,t))}listenToCustomControlModel(e){let t=this.tNode.flags&1024?`valueChange`:`checkedChange`,n=this.tView.data[this.tNode.customControlIndex];Ep(this.tNode,this.lView,n,t,bp(this.tNode,this.lView,e))}listenToDom(e,t){Sp(this.tNode,this.tView,this.lView,void 0,this.lView[11],e,t,bp(this.tNode,this.lView,t))}setInputOnDirectives(e,t,n){let r=this.tNode.inputs?.[e],i=this.tNode.hostDirectiveInputs?.[e];if(!r&&!i)return!1;let a=!1;if(r)for(let i of r){if(i===this.tNode.controlDirectiveIndex)continue;let r=this.lView[i],o=this.tView.data[i];(!n||n(Pp(r,o,e)))&&(Vd(o,r,e,t),a=!0)}if(i)for(let r=0;r0;){let e=n.shift();if(typeof e!=`function`){for(let n in e.inputs)t[e.inputs[n]]=!0;let r=Np(e.directive);r!==null&&n.push(...r);continue}for(let r of e()){if(typeof r==`function`)continue;if(r.inputs)for(let e=0;e1){t.flags|=4096;return}Ip(e,t)}function Ip(e,t){for(let n=t.directiveStart;n{let r=t.hostDirectiveInputs[e],i=t.hostDirectiveOutputs[e+`Change`];if(!r||!i)return!1;for(let e=0;e=i&&a<=o)return t.flags|=n,t.customControlIndex=r,!0}}return!1};if(e(`value`,1024)||e(`checked`,2048))return}}function Lp(e,t){return Rp(e,t)&&zp(e,t+`Change`)}function Rp(e,t){return t in e.inputs}function zp(e,t){return t in e.outputs}var Bp=Symbol(`BINDING`),Vp=new Oi(``);function Hp(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 nm(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&Bd.SignalBased)!==0};return i&&(a.transform=i),a})}function um(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function dm(e,t,n){let r=t instanceof Ha?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new pp(n,r):n}function fm(e){let t=e.get(sp,null);if(t===null)throw new pi(407,!1);return{rendererFactory:t,sanitizer:e.get(up,null),changeDetectionScheduler:e.get(rc,null),ngReflect:!1,tracingService:e.get(td,null,{optional:!0})}}function pm(e,t,n){let r=hm(e);return xu(t,r,r===`svg`?`svg`:r===`math`?po:n)}function mm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new pi(905,!1)}function hm(e){return(e.selectors[0][0]||`div`).toLowerCase()}var gm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=lm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=um(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=gte(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Nc(bc.DynamicComponentStart);let s=an(null);try{let s=this.componentDef,c=dm(s,r||this.ngModule,e),l=fm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(dp(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{an(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=_m(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Gd(l,r,s.encapsulation,t):pm(s,l,o??null);mm(u);let d=t.get(Vp,null),f=vm(u,()=>t.get(xs,null)??Xl());d&&d.addHost(f);let p=a?.some(bm)||i?.some(e=>typeof e!=`function`&&e.bindings.some(bm)),m=Pd(null,c,null,512|Id(s),null,null,e,l,t,null,ru(u,t,!0));d&&sm&&f instanceof ShadowRoot&&ko(m,()=>{d.removeHost(f)}),m[27]=u,rs(m);let ee=null;try{let e=im(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);Eu(l,u,e),Wl(u,m),Ud(c,m,e),ou(c,e,m),am(c,e),n!==void 0&&Sm(e,this.ngContentSelectors,n),ee=bo(e.index,m),m[8]=ee[8],df(c,m,null)}catch(e){throw ee!==null&&Hl(ee),Hl(m),e}finally{Nc(bc.DynamicComponentEnd),cs()}return new xm(this.componentType,m,!!p)}};function _m(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:_te(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[Bp].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 bm(e){let t=e[Bp].kind;return t===`input`||t===`twoWay`}var xm=class extends op{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=_o(t[1],27),this.location=jl(this._tNode,t),this.instance=bo(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Kf(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView;sf(n,r[1],r,e,t),this.previousInputValues.set(e,t),Rf(bo(n.index,r),1)}get injector(){return new Cl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function Sm(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=wm}return e})();function wm(){return Om(Ho(),Bo())}var Tm=class e extends Cm{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return jl(this._hostTNode,this._hostLView)}get injector(){return new Cl(this._hostTNode,this._hostLView)}get parentInjector(){let e=dl(this._hostTNode,this._hostLView);if(Zc(e)){let t=el(e,this._hostLView),n=Qc(e),r=t[1].data[n+8];return new Cl(r,t)}return new Cl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=Em(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=ip(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,mf(this._hostTNode,a)),o}createComponent(e,t,n,r,i,a,o){let s,c=t||{};s=c.index,n=c.injector,r=c.projectableNodes,i=c.environmentInjector||c.ngModuleRef,a=c.directives,o=c.bindings;let l=new gm(Ii(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Ha,null);e&&(i=e)}let d=Ii(l.componentType??{}),f=ip(this._lContainer,d?.id??null),p=f?.firstChild??null,m=l.create(u,r,p,i,a,o,this._getHostElementNamespace());return this.insertImpl(m.hostView,s,mf(this._hostTNode,f)),m}_getHostElementNamespace(){if(this._hostTNode.type&2){let e=this._hostTNode.parent??this._hostLView[5];return e!==null&&e.type&2&&typeof e.value==`string`&&e.value.toLowerCase()===`foreignobject`?null:e?.namespace??null}return this._hostTNode.namespace}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(t,n,r){let i=t._lView;if(So(i)){let n=this.indexOf(t);if(n!==-1)this.detach(n);else{let n=i[3],r=new e(n,n[5],n[3]);r.detach(r.indexOf(t))}}let a=this._adjustIndex(n),o=this._lContainer;return Vf(o,i,a,r),t.attachToViewContainerRef(),fa(Dm(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=Em(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Uf(this._lContainer,t);n&&(pa(Dm(this._lContainer),t),vd(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Uf(this._lContainer,t);return n&&pa(Dm(this._lContainer),t)!=null?new Kf(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function Em(e){return e[8]}function Dm(e){return e[8]||=[]}function Om(e,t){let n,r=t[e.index];return io(r)?n=r:(n=zf(r,t,null,e),t[e.index]=n,Rd(t,n)),Am(n,t,e,r),new Tm(n,e,t)}function km(e,t){let n=e[11],r=n.createComment(``),i=go(t,e);return Su(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var Am=Nm,jm=()=>!1;function Mm(e,t,n){return jm(e,t,n)}function Nm(e,t,n,r){if(e[7])return;let i;i=n.type&8?mo(r):km(t,n),e[7]=i}var Pm=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Fm=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 Ym(e,t,n){e.queries===null&&(e.queries=new Lm),e.queries.track(new Rm(t,n))}function Xm(e,t){return e.queries.getByIndex(t)}function Zm(e,t){let n=e[1],r=Xm(n,t);return r.crossesNgTemplate?Wm(n,e,t,[]):Um(n,e,r,t)}function Qm(e,t,n){let r,i=En(()=>{r._dirtyCounter();let n=nh(r,e);if(t&&n===void 0)throw new pi(-951,!1);return n});return r=i[rn],r._dirtyCounter=T(0),r._flatValue=void 0,i}function $m(e){return Qm(!0,!1,e)}function eh(e){return Qm(!0,!0,e)}function th(e,t){let n=e[rn];n._lView=Bo(),n._queryIndex=t,n._queryList=Gm(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function nh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:xa;let i=Gm(n,r),a=Zm(n,r);return i.reset(a,Nl),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function rh(e){return!!e&&typeof e.then==`function`}function ih(e){return!!e&&typeof e.subscribe==`function`}var ah=class{},oh=class extends ah{injector;instance=null;constructor(e){super();let t=new Ua([...e.providers,{provide:ah,useValue:this}],e.parent||Va(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function sh(e,t,n=null){return new oh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var ch=(()=>{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=Da(!1,e.type),n=t.length>0?sh([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=xi({token:e,providedIn:`environment`,factory:()=>new e(ra(Ha))})}return e})();function O(e){return yc(()=>{let t=mh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Ll.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(ch).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||su.Emulated,styles:e.styles||xa,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&rd(`NgStandalone`),hh(n);let r=e.dependencies;return n.directiveDefs=gh(r,lh),n.pipeDefs=gh(r,Ri),n.id=_h(n),n})}function lh(e){return Ii(e)||Li(e)}function uh(e,t){if(e==null)return ba;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=Bd.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function dh(e){if(e==null)return ba;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function fh(e){return yc(()=>{let t=mh(e);return hh(t),t})}function ph(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 mh(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||ba,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||xa,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:uh(e.inputs,t),outputs:dh(e.outputs),debugInfo:null}}function hh(e){e.features?.forEach(t=>t(e))}function gh(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 _h(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 vh=new Oi(``),yh=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=x(vh,{optional:!0})??[];injector=x(bs);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=eo(this.injector,t);if(rh(n))e.push(n);else if(ih(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=kl({token:e,factory:e.ɵfac})}return e})();function bh(e){return t=>{t.controlDef={create:(e,t)=>{e?.ɵngControlCreate(t)},update:(e,t)=>{e?.ɵngControlUpdate?.(t)},passThroughInput:e}}}function xh(e){return Object.getPrototypeOf(e.prototype).constructor}function Sh(e){let t=xh(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let i,a=Object.hasOwn(t,Ai)?t[Ai]:void 0,o=Object.hasOwn(t,ji)?t[ji]:void 0;if(co(e))i=a??o;else{if(a)throw new pi(903,!1);i=o}if(i){if(n){r.push(i);let t=e;t.inputs=Th(e.inputs),t.declaredInputs=Th(e.declaredInputs),t.outputs=Th(e.outputs);let n=i.hostBindings;n&&Oh(e,n);let a=i.viewQuery,o=i.contentQueries;if(a&&Eh(e,a),o&&Dh(e,o),Ch(e,i),Vee(e.outputs,i.outputs),co(i)&&i.data.animation){let t=e.data;t.animation=(t.animation||[]).concat(i.data.animation)}}let t=i.features;if(t)for(let r=0;r=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=Yc(i.hostAttrs,n=Yc(n,i.hostAttrs))}}function Th(e){return e===ba?{}:e===xa?[]:e}function Eh(e,t){let n=e.viewQuery;e.viewQuery=n?(e,r)=>{t(e,r),n(e,r)}:t}function Dh(e,t){let n=e.contentQueries;e.contentQueries=n?(e,r,i)=>{t(e,r,i),n(e,r,i)}:t}function Oh(e,t){let n=e.hostBindings;e.hostBindings=n?(e,r)=>{t(e,r),n(e,r)}:t}function kh(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=Yc(e.mergedAttrs,e.attrs);let t=e.tView=jd(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),Wo(e,!1);let c=Nh(n,t,e,r);gs()&&Sd(n,t,c,e),Wl(c,t);let l=zf(c,t,c,e);t[r+27]=l,Rd(t,l),Mm(l,e,t)}function Ah(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=Xf(t,d,4,o||null,s||null),Io()&&Wp(t,e,f,Co(t.consts,l),$d),Fc(t,f)):f=t.data[d],kh(f,e,t,n,r,i,a,c),so(f)&&Ud(t,e,f),l!=null&&Wd(e,f,u),f}function jh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Xf(t,d,4,o||null,s||null),l!=null){let e=Co(t.consts,l);f.localNames=[];for(let t=0;t{throw new pi(600,``)})}var Rh=10,zh=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=x(qs);afterRenderManager=x(id);zonelessEnabled=x(ic);rootEffectScheduler=x(oc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Wr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=x(Es);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(di(e=>!e))}constructor(){x(td,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=x(Ha);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=bs.NULL){return this._injector.get(Ps).run(()=>{if(Nc(bc.BootstrapComponentStart),!this._injector.get(yh).done)throw new pi(405,``);let r=Ii(e),i=this._injector.get(ah),a=new gm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=Bh(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Fh,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),Vh(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Nc(bc.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Nc(bc.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(ed.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Nc(bc.ChangeDetectionEnd),new pi(101,!1);let e=an(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,an(e),this.afterTick.next(),Nc(bc.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(sp,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++Eo(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;Vh(this._views,t),t.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(e){this.internalErrorHandler(e)}this.components.push(e),this._injector.get(Ih,[]).forEach(t=>t(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>Vh(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pi(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=kl({token:e,factory:e.ɵfac})}return e})();function Bh(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function Vh(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function k(e,t,n,r){let i=Bo();return gp(i,Qo(),t)&&(Vo(),ef(ds(),i,e,t,n,r)),k}function Hh(e){if(rd(`NgAnimateEnter`),!Wu)return Hh;let t=Bo();if(Dte(t))return Hh;let n=Ho(),r=t[9].get(Ps);return Mte(Zu(t),n,()=>Uh(t,n,e,r)),Rte(t[9]),dd(t[9],Zu(t)),Hh}function Uh(e,t,n,r){let i=go(t,e),a=e[11],o=jte(n),s=[],c=!1,l=e=>{if(Qu(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{Qu(e)===i&&($u(e,i)&&(c=!0),Wh(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),Ote(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(Cte(i,qu,Wu),!qu.has(i))){for(let e of o)a.removeClass(i,e);Gu(i)}})})}}function Wh(e,t,n){let r=Ku.get(t);if(Qu(e)===t&&r&&$u(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);Gu(t)}}var Gh=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 Kh(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function qh(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){an(r);let c=t.length-1;for(an(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=Kh(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=Kh(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),ee=n(s,d),h=n(o,l);if(Object.is(h,ee)){let t=n(c,f);Object.is(t,m)?(e.swap(o,s),e.updateValue(s,f),c--,s--):e.move(s,o),e.updateValue(o,l),o++;continue}if(i??=new Zh,a??=Xh(e,o,s,n),Jh(e,i,o,h))e.updateValue(o,l),o++,s++;else if(a.has(h))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)Yh(e,i,n,o,t[o]),o++}else if(t!=null){an(r);let c=t[Symbol.iterator]();an(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=Kh(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new Zh,a??=Xh(e,o,s,n);let u=n(o,r);if(Jh(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;)Yh(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 Jh(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Yh(e,t,n,r,i){if(Jh(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function Xh(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 Zh=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 A(e,t,n,r,i,a,o,s){rd(`NgControlFlow`);let c=Bo(),l=Vo();return jh(c,l,e,t,n,r,i,Co(l.consts,a),256,o,s),Qh}function Qh(e,t,n,r,i,a,o,s){rd(`NgControlFlow`);let c=Bo(),l=Vo();return jh(c,l,e,t,n,r,i,Co(l.consts,a),512,o,s),Qh}function j(e,t){rd(`NgControlFlow`);let n=Bo(),r=Qo(),i=n[r]===Fu?-1:n[r],a=i===-1?void 0:ig(n,27+i);if(gp(n,r,e)){let r=an(null);try{if(a!==void 0&&Hf(a,0),e!==-1){let r=27+e,i=ig(n,r),a=lg(n[1],r),o=ap(i,a,n);Vf(i,pf(n,a,t,{dehydratedView:o}),0,mf(a,o))}}finally{an(r)}}else if(a!==void 0){let e=Bf(a,0);e!==void 0&&(e[8]=t)}}var $h=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 eg(e){return e}function tg(e,t){return t}var ng=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function M(e,t,n,r,i,a,o,s,c,l,u,d,f){rd(`NgControlFlow`);let p=Bo(),m=Vo(),ee=c!==void 0,h=Bo(),g=new ng(ee,s?o.bind(h[15][8]):o);h[27+e]=g,jh(p,m,e+1,t,n,r,i,Co(m.consts,a),256),ee&&jh(p,m,e+2,c,l,u,d,Co(m.consts,f),512)}var rg=class extends Gh{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-10}at(e){return this.getLView(e)[8].$implicit}attach(e,t){let n=t[6];this.needsIndexUpdate||=e!==this.length,Vf(this.lContainer,t,e,mf(this.templateTNode,n)),ag(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,og(this.lContainer,e),sg(this.lContainer,e)}create(e,t){let n=ip(this.lContainer,this.templateTNode.tView.ssrId);return pf(this.hostLView,this.templateTNode,new $h(this.lContainer,t,e),{dehydratedView:n})}destroy(e){vd(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];Ite(e,r),Uu.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function og(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 sg(e,t){return Uf(e,t)}function cg(e,t){return Bf(e,t)}function lg(e,t){return _o(e,t)}function P(e,t,n){let r=Bo();return gp(r,Qo(),t)&&(Vo(),qd(ds(),r,e,t,r[11],n)),P}function ug(e,t,n,r,i){sf(t,e,n,i?`class`:`style`,r)}function F(e,t,n,r){let i=Bo(),a=i[1],o=e+27,s=a.firstCreatePass?im(o,i,2,t,$d,Io(),n,r):a.data[o];if(oo(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(dp(o),()=>(dg(e,t,i,s,r),F))}}return dg(e,t,i,s,r),F}function dg(e,t,n,r,i){if(rf(r,n,e,t,pg),so(r)){let e=n[1];Ud(e,n,r),ou(e,r,n)}i!=null&&Wd(n,r)}function I(){let e=Vo(),t=af(Ho());return e.firstCreatePass&&am(e,t),Ro(t)&&zo(),Fo(),t.classesWithoutHost!=null&&Wc(t)&&ug(e,t,Bo(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Gc(t)&&ug(e,t,Bo(),t.stylesWithoutHost,!1),I}function L(e,t,n,r){return F(e,t,n,r),I(),L}function R(e,t,n,r){let i=Bo(),a=i[1],o=e+27,s=a.firstCreatePass?om(o,a,2,t,n,r):a.data[o];return rf(s,i,e,t,pg),r!=null&&Wd(i,s),R}function z(){return Ro(af(Ho()))&&zo(),Fo(),z}function fg(e,t,n,r){return R(e,t,n,r),z(),fg}var pg=(e,t,n,r,i)=>(_s(!0),xu(t[11],r,ms()));function mg(e,t,n){let r=Bo(),i=r[1],a=e+27,o=i.firstCreatePass?im(a,r,8,`ng-container`,$d,Io(),t,n):i.data[a];if(rf(o,r,e,`ng-container`,_g),so(o)){let e=r[1];Ud(e,r,o),ou(e,o,r)}return n!=null&&Wd(r,o),mg}function hg(){let e=Vo(),t=af(Ho());return e.firstCreatePass&&am(e,t),hg}function gg(e,t,n){return mg(e,t,n),hg(),gg}var _g=(e,t,n,r,i)=>(_s(!0),bu(t[11],``));function B(){return Bo()}function V(e,t,n){let r=Bo();return gp(r,Qo(),t)&&(Vo(),Jd(ds(),r,e,t,r[11],n)),V}var vg=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 bg=[`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`]],vg,[[`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`]],vg,[[`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}`,vg,vg,vg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,yg],xg=Object.create(null);function Sg(e){let t=Tg(e),n=Cg(t);if(n)return n;let r=t.split(`-`)[0];if(n=Cg(r),n)return n;if(r===`en`)return bg;throw new pi(701,!1)}function Cg(e){if(!(e in xg)){let t=Qi.ng&&Qi.ng.common&&Qi.ng.common.locales&&Qi.ng.common.locales[e];return t!==void 0&&(xg[e]=t),t}return xg[e]}var wg={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 Tg(e){return e.toLowerCase().replace(/_/g,`-`)}var Eg=`en-US`;function Dg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function H(e,t,n){let r=Bo(),i=Vo(),a=Ho();return Og(i,r,r[11],a,e,t,n),H}function U(e,t,n){let r=Bo(),i=Vo(),a=Ho();return(a.type&3||n)&&Sp(a,i,r,n,r[11],e,t,bp(a,r,t)),U}function Og(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=bp(r,t,a),Sp(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 Rg(e){return(e&2)==2}function zg(e,t){return e&131071|t<<17}function Bg(e){return e|2}function Vg(e){return(e&131068)>>2}function Hg(e,t){return e&-131069|t<<2}function Ug(e){return(e&1)==1}function Wg(e){return e|1}function Gg(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=Lg(o),c=Vg(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||va(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=Lg(e[s+1]);e[r+1]=Ig(t,s),t!==0&&(e[t+1]=Hg(e[t+1],r)),e[s+1]=zg(e[s+1],r)}else e[r+1]=Ig(s,0),s!==0&&(e[s+1]=Hg(e[s+1],r)),s=r}else e[r+1]=Ig(c,0),s===0?s=r:e[c+1]=Hg(e[c+1],r),c=r;l&&(e[r+1]=Bg(e[r+1])),qg(e,u,r,!0),qg(e,u,r,!1),Kg(t,u,e,r,a),o=Ig(s,c),a?t.classBindings=o:t.styleBindings=o}function Kg(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&va(a,t)>=0&&(n[r+1]=Wg(n[r+1]))}function qg(e,t,n,r){let i=e[n+1],a=t===null,o=r?Lg(i):Vg(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];Jg(n,t)&&(s=!0,e[o+1]=r?Wg(i):Bg(i)),o=r?Lg(i):Vg(i)}s&&(e[n+1]=r?Bg(i):Wg(i))}function Jg(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?va(e,t)>=0:!1}var Yg={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Xg(e){return e.substring(Yg.key,Yg.keyEnd)}function Zg(e){return $g(e),Qg(e,e_(e,0,Yg.textEnd))}function Qg(e,t){let n=Yg.textEnd;return n===t?-1:(t=Yg.keyEnd=t_(e,Yg.key=t,n),e_(e,t,n))}function $g(e){Yg.key=0,Yg.keyEnd=0,Yg.value=0,Yg.valueEnd=0,Yg.textEnd=e.length}function e_(e,t,n){for(;t32;)t++;return t}function n_(e,t,n){return a_(e,t,n,!1),n_}function G(e,t){return a_(e,t,null,!0),G}function r_(e){o_(g_,i_,e,!0)}function i_(e,t){for(let n=Zg(t);n>=0;n=Qg(t,n))ga(e,Xg(t),!0)}function a_(e,t,n,r){let i=Bo(),a=Vo(),o=$o(2);if(a.firstUpdatePass&&c_(a,e,o,r),t!==Fu&&gp(i,o,t)){let s=a.data[ls()];v_(a,s,i,i[11],e,i[o+1]=x_(t,n),r,o)}}function o_(e,t,n,r){let i=Vo(),a=$o(2);i.firstUpdatePass&&c_(i,null,a,r);let o=Bo();if(n!==Fu&&gp(o,a,n)){let s=i.data[ls()];if(S_(s,r)&&!s_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=_i(e,n||``)),ug(i,s,o,n,r)}else __(i,s,o,o[11],o[a+1],o[a+1]=h_(e,t,n),r,a)}}function s_(e,t){return t>=e.expandoStartIndex}function c_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[ls()],o=s_(e,n);S_(a,r)&&t===null&&!o&&(t=!1),t=l_(i,a,t,r),Gg(i,a,t,n,o,r)}}function l_(e,t,n,r){let i=$ee(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=p_(null,e,t,n,r),n=m_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=p_(i,e,t,n,r),a===null){let n=u_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=p_(null,e,t,n[1],r),n=m_(n,t.attrs,r),d_(e,t,r,n))}else a=f_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function u_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Vg(r)!==0)return e[Lg(r)]}function d_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Lg(i)]=r}function f_(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===Fu&&(u=l?xa:void 0);let d=l?_a(u,r):c===r?u:void 0;if(a&&!b_(d)&&(d=_a(t,r)),b_(d)&&(s=d,o))return s;let f=e[i+1];i=o?Lg(f):Vg(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=_a(e,r))}return s}function b_(e){return e!==void 0}function x_(e,t){return e==null||e===``||(typeof t==`string`?e=lu(e)+t:typeof e==`object`&&(e=gi(lu(e)))),e}function S_(e,t){return!!(e.flags&(t?8:16))}function K(e,t=``){let n=Bo(),r=Vo(),i=e+27,a=r.firstCreatePass?Xf(r,i,1,t,null):r.data[i],o=C_(r,n,a,t);n[i]=o,gs()&&Sd(r,n,o,a),Wo(a,!1)}var C_=(e,t,n,r)=>(_s(!0),vu(t[11],r));function w_(e,t,n,r=``){return gp(e,Qo(),n)?t+Bi(n)+r:Fu}function T_(e,t,n,r,i,a=``){let o=_p(e,Zo(),n,i);return $o(2),o?t+Bi(n)+r+Bi(i)+a:Fu}function E_(e,t,n,r,i,a,o,s=``){let c=vp(e,Zo(),n,i,o);return $o(3),c?t+Bi(n)+r+Bi(i)+a+Bi(o)+s:Fu}function D_(e,t,n,r,i,a,o,s,c,l=``){let u=yp(e,Zo(),n,i,o,c);return $o(4),u?t+Bi(n)+r+Bi(i)+a+Bi(o)+s+Bi(c)+l:Fu}function q(e){return J(``,e),q}function J(e,t,n){let r=Bo(),i=w_(r,e,t,n);return i!==Fu&&A_(r,ls(),i),J}function Y(e,t,n,r,i){let a=Bo(),o=T_(a,e,t,n,r,i);return o!==Fu&&A_(a,ls(),o),Y}function O_(e,t,n,r,i,a,o){let s=Bo(),c=E_(s,e,t,n,r,i,a,o);return c!==Fu&&A_(s,ls(),c),O_}function k_(e,t,n,r,i,a,o,s,c){let l=Bo(),u=D_(l,e,t,n,r,i,a,o,s,c);return u!==Fu&&A_(l,ls(),u),k_}function A_(e,t,n){let r=ho(t,e);yu(e[11],r,n)}function j_(e,t,n){gc(t)&&(t=t());let r=Bo();return gp(r,Qo(),t)&&(Vo(),qd(ds(),r,e,t,r[11],n)),j_}function M_(e,t){let n=gc(e);return n&&e.set(t),n}function N_(e,t){let n=Bo(),r=Vo(),i=Ho();return Og(r,n,n[11],i,e,t),N_}var P_={};function F_(e){rd(`NgLet`);let t=Vo(),n=Bo(),r=e+27;return Wo(Xf(t,r,128,null,null),!1),yo(t,n,r,P_),F_}function I_(e){return yo(Vo(),Bo(),ls(),e),e}function L_(e){let t=vo(qo(),27+e);if(t===P_)throw new pi(314,!1);return t}function R_(e,t,n=``){return w_(Bo(),e,t,n)}function z_(e,t,n){let r=Vo();r.firstCreatePass&&B_(t,r.data,r.blueprint,co(e),n)}function B_(e,t,n,r,i){if(e=yi(e),Array.isArray(e))for(let a=0;a>20;if(Fa(e)||!e.multi){let r=new Uc(l,i,Up,null),p=U_(c,t,i?u:u+f,d);p===-1?(fl(cl(s,o),a,c),V_(a,e,t.length),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(r),o.push(r)):(n[p]=r,o[p]=r)}else{let p=U_(c,t,u+f,d),m=U_(c,t,u,u+f),ee=p>=0&&n[p],h=m>=0&&n[m];if(i&&!h||!i&&!ee){fl(cl(s,o),a,c);let u=tne(i?ene:$te,n.length,i,r,l,e);!i&&h&&(n[m].providerFactory=u),V_(a,e,t.length,0),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(u),o.push(u)}else{let t=H_(n[i?m:p],l,!i&&r);V_(a,e,p>-1?p:m,t)}!i&&r&&h&&n[m].componentProviders++}}}function V_(e,t,n,r){let i=Fa(t),a=Ia(t);if(i||a){let o=(a?yi(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||=[];if(!i&&t.multi){let e=a.indexOf(n);e===-1?a.push(n,[r,o]):a[e+1].push(r,o)}else a.push(n,o)}}}function H_(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function U_(e,t,n,r){for(let i=n;i{n.providersResolver=(t,n)=>z_(t,n?n(e):e,!1),t&&(n.viewProvidersResolver=(e,n)=>z_(e,n?n(t):t,!0))}}function K_(e,t){let n=Xo()+e,r=Bo();return r[n]===Fu?mp(r,n,t()):hp(r,n)}function q_(e,t,n){return X_(Bo(),Xo(),e,t,n)}function J_(e,t,n,r){return Z_(Bo(),Xo(),e,t,n,r)}function nne(e,t,n,r,i,a,o){return rne(Bo(),Xo(),e,t,n,r,i,a)}function Y_(e,t){let n=e[t];return n===Fu?void 0:n}function X_(e,t,n,r,i,a){let o=t+n;return gp(e,o,i)?mp(e,o+1,a?r.call(a,i):r(i)):Y_(e,o+1)}function Z_(e,t,n,r,i,a,o){let s=t+n;return _p(e,s,i,a)?mp(e,s+2,o?r.call(o,i,a):r(i,a)):Y_(e,s+2)}function rne(e,t,n,r,i,a,o,s,c){let l=t+n;return yp(e,l,i,a,o,s)?mp(e,l+4,c?r.call(c,i,a,o,s):r(i,a,o,s)):Y_(e,l+4)}function Q_(e,t){let n=Vo(),r,i=e+27;n.firstCreatePass?(r=ine(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let a=r.factory||(r.factory=ca(r.type,!0)),o=Xi(Up);try{let e=nl(!1),t=a();return nl(e),yo(n,Bo(),i,t),t}finally{Xi(o)}}function ine(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function $_(e,t,n){let r=e+27,i=Bo(),a=vo(i,r);return tv(i,r)?X_(i,Xo(),t,a.transform,n,a):a.transform(n)}function ev(e,t,n,r){let i=e+27,a=Bo(),o=vo(a,i);return tv(a,i)?Z_(a,Xo(),t,o.transform,n,r,o):o.transform(n,r)}function tv(e,t){return e[1].data[t].pure}function nv(e,t){return Yf(e,t)}var ane=(()=>{class e{applicationErrorHandler=x(qs);appRef=x(zh);taskService=x(Es);ngZone=x(Ps);zonelessEnabled=x(ic);tracing=x(td,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new cr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Ms):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(x(ac,{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?As:ks;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=kl({token:e,factory:e.ɵfac})}return e})();function one(){return[{provide:rc,useExisting:ane},{provide:Ps,useClass:Hs},{provide:ic,useValue:!0}]}function sne(){return typeof $localize<`u`&&$localize.locale||`en-US`}var rv=new Oi(``,{factory:()=>x(rv,{optional:!0,skipSelf:!0})||sne()}),iv=class{destroyed=!1;listeners=null;errorHandler=x(Ks,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=x(Ss);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new pi(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(mi(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=an(null);try{for(let t of this.listeners)try{t!==null&&t(e)}catch(e){this.errorHandler?.handleError(e)}}finally{this.hasNullListeners&&(this.hasNullListeners=!1,this.listeners&&cne(this.listeners)),an(t),this.isEmitting=!1}}};function cne(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function X(e,t){return En(e,t?.equal)}function Z(e){return qn(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var lne=e=>e;function Q(e,t){return typeof e==`function`?av(Un(e,lne,t?.equal),t?.debugName,t?.set):av(Un(e.source,e.computation,e.equal),e.debugName,e.set)}function av(e,t,n){let r=e[rn],i=e;if(n!==void 0){let t=e=>Wn(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Z(e)),t)}else i.set=e=>Wn(r,e),i.update=e=>Gn(r,e);return i.asReadonly=Ys.bind(e),i}var ov=!1;function une(){return ov}function sv(e){ov=e}function cv(e,t){let n=Object.create(vc);n.value=e,n.transformFn=t?.transform;function r(){if(cn(n),n.value===_c)throw new pi(-950,null);return n.value}return r[rn]=n,r}function lv(e){return new iv}function uv(e,t){return cv(e,t)}function dne(e){return cv(_c,e)}var $=(uv.required=dne,uv);function dv(e,t){let n=Object.create(vc),r=new iv;n.value=e;function i(){return cn(n),fv(n.value),n.value}return i[rn]=n,i.asReadonly=Ys.bind(i),i.set=e=>{n.equal(n.value,e)||(Mn(n,e),r.emit(e))},i.update=e=>{fv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function fv(e){if(e===_c)throw new pi(952,!1)}function pv(e,t){return dv(e,t)}function fne(e){return dv(_c,e)}var mv=(pv.required=fne,pv);function hv(e,t){return $m(t)}function pne(e,t){return eh(t)}var gv=(hv.required=pne,hv),mne=(()=>{class e{static __NG_ELEMENT_ID__=hne}return e})();function hne(e){return gne(Ho(),Bo(),(e&16)==16)}function gne(e,t,n){if(oo(e)&&!n){let n=bo(e.index,t);return new Kf(n,n)}if(e.type&175){let e=t[15];return new Kf(e,t)}return null}var _v=new Oi(``),_ne=new Oi(``);function vv(e){return!e.moduleRef}function vne(e){let t=vv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Ps);return n.run(()=>{vv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(qs),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),vv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(_v);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(_v);n.add(t),e.moduleRef.onDestroy(()=>{Vh(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return bne(r,n,()=>{let n=t.get(Es),r=n.add(),i=t.get(yh);return i.runInitializers(),i.donePromise.then(()=>{if(Dg(t.get(rv,Eg)||`en-US`),!t.get(_ne,!0))return vv(e)?t.get(zh):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(vv(e)){let n=t.get(zh);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return yne?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var yne;function bne(e,t,n){try{let r=n();return rh(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var yv=null;function xne(e=[],t){return bs.create({name:t,providers:[{provide:La,useValue:`platform`},{provide:_v,useValue:new Set([()=>yv=null])},...e]})}function Sne(e=[]){if(yv)return yv;let t=xne(e);return yv=t,Lh(),Cne(t),t}function Cne(e){let t=e.get(Qs,null);eo(e,()=>{t?.forEach(e=>e())})}function wne(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Nc(bc.BootstrapApplicationStart);try{let e=i?.injector??Sne(r);return vne({r3Injector:new oh({providers:[one(),Js,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Nc(bc.BootstrapApplicationEnd)}}function bv(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var xv=Symbol(`NOT_SET`),Sv=new Set,Tne={...Pn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:xv,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(cn(r),r.value),r.signal[rn]=r,r.registerCleanupFn=e=>(r.cleanup??=new Set).add(e),this.nodes[e]=r,this.hooks[e]=e=>r.phaseFn(e)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){if(this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();super.destroy();for(let e of this.nodes)if(e)try{for(let t of e.cleanup??Sv)t()}finally{bn(e)}}};function Cv(e,t){let n=t?.injector??x(bs),r=n.get(rc),i=n.get(id),a=n.get(td,null,{optional:!0});i.impl??=n.get(od);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(tc,null,{optional:!0}),c=new Ene(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var wv=null;function Tv(){return wv}function Dne(e){wv??=e}var One=class{},Ev=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(Ev||{}),Dv=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(Dv||{}),Ov=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(Ov||{}),kv={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function kne(e){return Sg(e)[wg.LocaleId]}function Ane(e,t,n){let r=Sg(e);return Fv(Fv([r[wg.DayPeriodsFormat],r[wg.DayPeriodsStandalone]],t),n)}function jne(e,t,n){let r=Sg(e);return Fv(Fv([r[wg.DaysFormat],r[wg.DaysStandalone]],t),n)}function Mne(e,t,n){let r=Sg(e);return Fv(Fv([r[wg.MonthsFormat],r[wg.MonthsStandalone]],t),n)}function Nne(e,t){let n=Sg(e)[wg.Eras];return Fv(n,t)}function Av(e,t){return Fv(Sg(e)[wg.DateFormat],t)}function jv(e,t){return Fv(Sg(e)[wg.TimeFormat],t)}function Mv(e,t){let n=Sg(e)[wg.DateTimeFormat];return Fv(n,t)}function Nv(e,t){let n=Sg(e),r=n[wg.NumberSymbols][t];if(r===void 0){if(t===kv.CurrencyDecimal)return n[wg.NumberSymbols][kv.Decimal];if(t===kv.CurrencyGroup)return n[wg.NumberSymbols][kv.Group]}return r}function Pv(e){if(!e[wg.ExtraData])throw new pi(2303,!1)}function Pne(e){let t=Sg(e);return Pv(t),(t[wg.ExtraData][2]||[]).map(e=>typeof e==`string`?Iv(e):[Iv(e[0]),Iv(e[1])])}function Fne(e,t,n){let r=Sg(e);return Pv(r),Fv(Fv([r[wg.ExtraData][0],r[wg.ExtraData][1]],t)||[],n)||[]}function Fv(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new pi(2304,!1)}function Iv(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Ine=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Lv=Object.create(null),Lne=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,Rne=256;function zne(e,t,n,r){let i=Yne(e);Bne(t),t=zv(n,t)||t;let a=[],o;for(;t;)if(o=Lne.exec(t),o){a=a.concat(o.slice(1));let e=a.pop();if(!e)break;t=e}else{a.push(t);break}let s=i.getTimezoneOffset();r&&(s=Xv(r,s),i=Jne(i,r));let c=``;return a.forEach(e=>{let t=Kne(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function Bne(e){if(e.length>Rne)throw new pi(2300,!1)}function Rv(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function zv(e,t){let n=kne(e);if(Lv[n]??=Object.create(null),Lv[n][t])return Lv[n][t];let r=``;switch(t){case`shortDate`:r=Av(e,Ov.Short);break;case`mediumDate`:r=Av(e,Ov.Medium);break;case`longDate`:r=Av(e,Ov.Long);break;case`fullDate`:r=Av(e,Ov.Full);break;case`shortTime`:r=jv(e,Ov.Short);break;case`mediumTime`:r=jv(e,Ov.Medium);break;case`longTime`:r=jv(e,Ov.Long);break;case`fullTime`:r=jv(e,Ov.Full);break;case`short`:let t=zv(e,`shortTime`),n=zv(e,`shortDate`);r=Bv(Mv(e,Ov.Short),[t,n]);break;case`medium`:let i=zv(e,`mediumTime`),a=zv(e,`mediumDate`);r=Bv(Mv(e,Ov.Medium),[i,a]);break;case`long`:let o=zv(e,`longTime`),s=zv(e,`longDate`);r=Bv(Mv(e,Ov.Long),[o,s]);break;case`full`:let c=zv(e,`fullTime`),l=zv(e,`fullDate`);r=Bv(Mv(e,Ov.Full),[c,l])}return r&&(Lv[n][t]=r),r}function Bv(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function Vv(e,t,n=`-`,r,i){let a=``;(e<0||i&&e<=0)&&(i?e=-e+1:(e=-e,a=n));let o=String(e);for(;o.length0||s>-n)&&(s+=n),e===3)s===0&&n===-12&&(s=12);else if(e===6)return Vne(s,t);let c=Nv(o,kv.MinusSign);return Vv(s,t,c,r,i)}}function Hne(e,t){switch(e){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new pi(2301,!1)}}function Uv(e,t,n=Ev.Format,r=!1){return function(i,a){return Une(i,a,e,t,n,r)}}function Une(e,t,n,r,i,a){switch(n){case 2:return Mne(t,i,r)[e.getMonth()];case 1:return jne(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Pne(t),a=Fne(t,i,r),s=e.findIndex(e=>{if(Array.isArray(e)){let[t,r]=e,i=n>=t.hours&&o>=t.minutes,a=n0?Math.floor(i/60):Math.ceil(i/60);switch(e){case 0:return(i>=0?`+`:``)+Vv(o,2,a)+Vv(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Vv(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Vv(o,2,a)+`:`+Vv(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Vv(o,2,a)+`:`+Vv(Math.abs(i%60),2,a);default:throw new pi(2310,!1)}}}var Wne=0,Gv=4;function Gne(e){let t=Rv(e,Wne,1).getDay();return Rv(e,0,1+(t<=Gv?Gv:11)-t)}function Kv(e){let t=e.getDay(),n=t===0?-3:Gv-t;return Rv(e.getFullYear(),e.getMonth(),e.getDate()+n)}function qv(e,t=!1){return function(n,r){let i;if(t){let e=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,t=n.getDate();i=1+Math.floor((t+e)/7)}else{let e=Kv(n),t=Gne(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Vv(i,e,Nv(r,kv.MinusSign))}}function Jv(e,t=!1){return function(n,r){return Vv(Kv(n).getFullYear(),e,Nv(r,kv.MinusSign),t)}}var Yv=Object.create(null);function Kne(e){if(Yv[e])return Yv[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Uv(3,Dv.Abbreviated);break;case`GGGG`:t=Uv(3,Dv.Wide);break;case`GGGGG`:t=Uv(3,Dv.Narrow);break;case`y`:t=Hv(0,1,0,!1,!0);break;case`yy`:t=Hv(0,2,0,!0,!0);break;case`yyy`:t=Hv(0,3,0,!1,!0);break;case`yyyy`:t=Hv(0,4,0,!1,!0);break;case`Y`:t=Jv(1);break;case`YY`:t=Jv(2,!0);break;case`YYY`:t=Jv(3);break;case`YYYY`:t=Jv(4);break;case`M`:case`L`:t=Hv(1,1,1);break;case`MM`:case`LL`:t=Hv(1,2,1);break;case`MMM`:t=Uv(2,Dv.Abbreviated);break;case`MMMM`:t=Uv(2,Dv.Wide);break;case`MMMMM`:t=Uv(2,Dv.Narrow);break;case`LLL`:t=Uv(2,Dv.Abbreviated,Ev.Standalone);break;case`LLLL`:t=Uv(2,Dv.Wide,Ev.Standalone);break;case`LLLLL`:t=Uv(2,Dv.Narrow,Ev.Standalone);break;case`w`:t=qv(1);break;case`ww`:t=qv(2);break;case`W`:t=qv(1,!0);break;case`d`:t=Hv(2,1);break;case`dd`:t=Hv(2,2);break;case`c`:case`cc`:t=Hv(7,1);break;case`ccc`:t=Uv(1,Dv.Abbreviated,Ev.Standalone);break;case`cccc`:t=Uv(1,Dv.Wide,Ev.Standalone);break;case`ccccc`:t=Uv(1,Dv.Narrow,Ev.Standalone);break;case`cccccc`:t=Uv(1,Dv.Short,Ev.Standalone);break;case`E`:case`EE`:case`EEE`:t=Uv(1,Dv.Abbreviated);break;case`EEEE`:t=Uv(1,Dv.Wide);break;case`EEEEE`:t=Uv(1,Dv.Narrow);break;case`EEEEEE`:t=Uv(1,Dv.Short);break;case`a`:case`aa`:case`aaa`:t=Uv(0,Dv.Abbreviated);break;case`aaaa`:t=Uv(0,Dv.Wide);break;case`aaaaa`:t=Uv(0,Dv.Narrow);break;case`b`:case`bb`:case`bbb`:t=Uv(0,Dv.Abbreviated,Ev.Standalone,!0);break;case`bbbb`:t=Uv(0,Dv.Wide,Ev.Standalone,!0);break;case`bbbbb`:t=Uv(0,Dv.Narrow,Ev.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Uv(0,Dv.Abbreviated,Ev.Format,!0);break;case`BBBB`:t=Uv(0,Dv.Wide,Ev.Format,!0);break;case`BBBBB`:t=Uv(0,Dv.Narrow,Ev.Format,!0);break;case`h`:t=Hv(3,1,-12);break;case`hh`:t=Hv(3,2,-12);break;case`H`:t=Hv(3,1);break;case`HH`:t=Hv(3,2);break;case`m`:t=Hv(4,1);break;case`mm`:t=Hv(4,2);break;case`s`:t=Hv(5,1);break;case`ss`:t=Hv(5,2);break;case`S`:t=Hv(6,1);break;case`SS`:t=Hv(6,2);break;case`SSS`:t=Hv(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Wv(0);break;case`ZZZZZ`:t=Wv(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Wv(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Wv(2);break;default:return null}return Yv[e]=t,t}function Xv(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function qne(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function Jne(e,t,n){let r=e.getTimezoneOffset();return qne(e,-1*(Xv(t,r)-r))}function Yne(e){if(Zv(e))return e;if(typeof e==`number`&&!isNaN(e))return new Date(e);if(typeof e==`string`){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[t,n=1,r=1]=e.split(`-`).map(e=>+e);return Rv(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Ine))return Xne(n)}let t=new Date(e);if(!Zv(t))throw new pi(2311,!1);return t}function Xne(e){let t=new Date(0),n=0,r=0,i=e[8]?t.setUTCFullYear:t.setFullYear,a=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),r=Number(e[9]+e[11])),i.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let o=Number(e[4]||0)-n,s=Number(e[5]||0)-r,c=Number(e[6]||0),l=Math.floor(parseFloat(`0.`+(e[7]||0))*1e3);return a.call(t,o,s,c,l),t}function Zv(e){return e instanceof Date&&!isNaN(e.valueOf())}var Qv=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=x(bs);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)(Up(Cm))};static ɵdir=fh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[wc]})}return e})();function Zne(e,t){return new pi(2100,!1)}var Qne=`mediumDate`,$ne=new Oi(``),ere=new Oi(``),$v=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(e,t,n){this.locale=e,this.defaultTimezone=t,this.defaultOptions=n}transform(t,n,r,i){if(t==null||t===``||t!==t)return null;try{let e=n??this.defaultOptions?.dateFormat??Qne,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return zne(t,e,i||this.locale,a)}catch(t){throw Zne(e,t.message)}}static ɵfac=function(t){return new(t||e)(Up(rv,16),Up($ne,24),Up(ere,24))};static ɵpipe=ph({name:`date`,type:e,pure:!0})}return e})(),ey=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=ph({name:`json`,type:e,pure:!1})}return e})();function tre(e,t){t=encodeURIComponent(t);for(let n of e.split(`;`)){let e=n.indexOf(`=`),[r,i]=e==-1?[n,``]:[n.slice(0,e),n.slice(e+1)];if(r.trim()!==t)continue;let a=i;try{a=decodeURIComponent(i)}catch{}return a.length>1&&a[0]===`"`&&a[a.length-1]===`"`&&(a=a.slice(1,-1)),a}return null}var nre=`browser`,ty=class{_doc;constructor(e){this._doc=e}manager},ny=(()=>{class e extends ty{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,n,r){return e.addEventListener(t,n,r),()=>this.removeEventListener(e,t,n,r)}removeEventListener(e,t,n,r){return e.removeEventListener(t,n,r)}static ɵfac=function(t){return new(t||e)(ra(xs))};static ɵprov=xi({token:e,factory:e.ɵfac})}return e})(),ry=new Oi(``),iy=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(e=>{e.manager=this});let n=e.filter(e=>!(e instanceof ny));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof ny);r&&this._plugins.push(r)}addEventListener(e,t,n,r){return this._findPluginFor(t).addEventListener(e,t,n,r)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(t=>t.supports(e)),!t)throw new pi(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(ra(ry),ra(Ps))};static ɵprov=xi({token:e,factory:e.ɵfac})}return e})(),ay=`ng-app-id`;function oy(e){for(let t of e)t.remove()}function sy(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function rre(e,t,n,r){let i=e.head?.querySelectorAll(`style[${ay}="${t}"],link[${ay}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(ay),e instanceof HTMLLinkElement?r.set(e.href.slice(e.href.lastIndexOf(`/`)+1),{usage:0,elements:[e]}):e.textContent&&n.set(e.textContent,{usage:0,elements:[e]});return!0}function cy(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var ly=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,n,r={}){this.doc=e,this.appId=t,this.nonce=n,rre(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,sy);t?.forEach(e=>this.addUsage(e,this.external,cy))}removeStyles(e,t){for(let t of e)this.removeUsage(t,this.inline);t?.forEach(e=>this.removeUsage(e,this.external))}addUsage(e,t,n){let r=t.get(e);r?r.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(t=>this.addElement(t,n(e,this.doc)))})}removeUsage(e,t){let n=t.get(e);n&&(n.usage--,n.usage<=0&&(oy(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])oy(e);this.hosts.clear()}addHost(e){if(!this.hosts.has(e)){this.hosts.add(e);for(let[t,{elements:n}]of this.inline)n.push(this.addElement(e,sy(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,cy(t,this.doc)))}}removeHost(e){this.hosts.delete(e);for(let t of[...this.inline.values(),...this.external.values()]){let n=[];for(let r of t.elements)r.parentNode===e?r.remove():n.push(r);t.elements=n}}addElement(e,t){return this.nonce&&t.setAttribute(`nonce`,this.nonce),e.appendChild(t)}static ɵfac=function(t){return new(t||e)(ra(xs),ra(Xs),ra(ec,8),ra($s))};static ɵprov=xi({token:e,factory:e.ɵfac})}return e})(),uy={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`,math:`http://www.w3.org/1998/Math/MathML`},dy=/%COMP%/g,fy=`%COMP%`,ire=`_nghost-${fy}`,are=`_ngcontent-${fy}`,ore=!0,sre=new Oi(``,{factory:()=>ore}),cre=new Oi(``);function lre(e){return are.replace(dy,e)}function ure(e){return ire.replace(dy,e)}function py(e,t){return t.map(t=>t.replace(dy,e))}var my=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;cssVarNamespace;constructor(e,t,n,r,i,a,o=null,s=null,c=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.removeStylesOnCompDestroy=r,this.doc=i,this.ngZone=a,this.nonce=o,this.tracingService=s,this.cssVarNamespace=c??``,this.defaultRenderer=new hy(e,i,a,this.tracingService,this.cssVarNamespace)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let n=this.getOrCreateRenderer(e,t);return n instanceof yy?n.applyToHost(e):n instanceof vy&&n.applyStyles(),n}getOrCreateRenderer(e,t){let n=this.rendererByCompId,r=n.get(t.id);if(!r){let i=this.doc,a=this.ngZone,o=this.eventManager,s=this.sharedStylesHost,c=this.removeStylesOnCompDestroy,l=this.tracingService;switch(t.encapsulation){case su.Emulated:r=new yy(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case su.ShadowDom:return new _y(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case su.ExperimentalIsolatedShadowDom:return new _y(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new vy(o,s,t,c,i,a,l,this.cssVarNamespace)}n.set(t.id,r)}return r}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static ɵfac=function(t){return new(t||e)(ra(iy),ra(Vp),ra(Xs),ra(sre),ra(xs),ra(Ps),ra(ec),ra(td,8),ra(cre,8))};static ɵprov=xi({token:e,factory:e.ɵfac})}return e})(),hy=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i=``){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(uy[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(gy(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=gy(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new pi(-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 pi(-5104,!1);return t||(n.textContent=``),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+`:`+t;let i=uy[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=uy[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){let i=t.startsWith(`--`);i&&(t=t.replace(`%NS%`,this.cssVarNamespace)),i||r&(Iu.DashCase|Iu.Important)?e.style.setProperty(t,n,r&Iu.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&Iu.DashCase?e.style.removeProperty(t):e.style[t]=``}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e==`string`&&(e=Tv().getGlobalEventTarget(this.doc,e),!e))throw new pi(-5102,!1);let i=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t===`__ngUnwrap__`)return e;e(t)===!1&&t.preventDefault()}}};function gy(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var _y=class extends hy{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,n,r,i,a,o,s,c){super(e,r,i,o,s),this.hostEl=t,this.sharedStylesHost=c,this.shadowRoot=t.attachShadow({mode:`open`}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=n.styles;l=py(n.id,l).map(e=>e.replace(/%NS%/g,s));for(let e of l){let t=document.createElement(`style`);a&&t.setAttribute(`nonce`,a),t.textContent=e,this.shadowRoot.appendChild(t)}let u=n.getExternalStyles?.();if(u)for(let e of u){let t=cy(e,r);a&&t.setAttribute(`nonce`,a),this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},vy=class extends hy{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,a,o,s,c){super(e,i,a,o,s),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let l=n.styles,u=c?py(c,l):l;this.styles=u.map(e=>e.replace(/%NS%/g,s)),this.styleUrls=n.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Uu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},yy=class extends vy{contentAttr;hostAttr;constructor(e,t,n,r,i,a,o,s,c){let l=r+`-`+n.id;super(e,t,n,i,a,o,s,c,l),this.contentAttr=lre(l),this.hostAttr=ure(l)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,``)}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,``),n}},dre=class e extends One{supportsDOMEvents=!0;static makeCurrent(){Dne(new e)}onAndCancel(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t||=this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument(`fakeTitle`)}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t===`window`?window:t===`document`?e:t===`body`?e.body:null}getBaseHref(e){let t=fre();return t==null?null:pre(t)}resetBaseElement(){by=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return tre(document.cookie,e)}},by=null;function fre(){return by||=document.head.querySelector(`base`),by?by.getAttribute(`href`):null}function pre(e){return new URL(e,document.baseURI).pathname}var xy=[`alt`,`control`,`meta`,`shift`],mre={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},hre={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},gre=(()=>{class e extends ty{constructor(e){super(e)}supports(t){return e.parseEventName(t)!=null}addEventListener(t,n,r,i){let a=e.parseEventName(n),o=e.eventCallback(a.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Tv().onAndCancel(t,a.domEventName,o,i))}static parseEventName(t){let n=t.toLowerCase().split(`.`),r=n.shift();if(n.length===0||r!==`keydown`&&r!==`keyup`)return null;let i=e._normalizeKey(n.pop()),a=``,o=n.indexOf(`code`);if(o>-1&&(n.splice(o,1),a=`code.`),xy.forEach(e=>{let t=n.indexOf(e);t>-1&&(n.splice(t,1),a+=e+`.`)}),a+=i,n.length!=0||i.length===0)return null;let s={};return s.domEventName=r,s.fullKey=a,s}static matchEventFullKeyCode(e,t){let n=mre[e.key]||e.key,r=``;return t.indexOf(`code.`)>-1&&(n=e.code,r=`code.`),n==null||!n?!1:(n=n.toLowerCase(),n===` `?n=`space`:n===`.`&&(n=`dot`),xy.forEach(t=>{if(t!==n){let n=hre[t];n(e)&&(r+=t+`.`)}}),r+=n,r===t)}static eventCallback(t,n,r){return i=>{e.matchEventFullKeyCode(i,t)&&r.runGuarded(()=>n(i))}}static _normalizeKey(e){return e===`esc`?`escape`:e}static ɵfac=function(t){return new(t||e)(ra(xs))};static ɵprov=xi({token:e,factory:e.ɵfac})}return e})();async function _re(e,t,n){return wne({rootComponent:e,...vre(t,n)})}function vre(e,t){return{platformRef:t?.platformRef,appProviders:[...Cre,...e?.providers??[]],platformProviders:Sre}}function yre(){dre.makeCurrent()}function bre(){return new Ks}function xre(){return Yl(document),document}var Sre=[{provide:$s,useValue:nre},{provide:Qs,useValue:yre,multi:!0},{provide:xs,useFactory:xre}],Cre=[{provide:La,useValue:`root`},{provide:Ks,useFactory:bre},{provide:ry,useClass:ny,multi:!0},{provide:ry,useClass:gre,multi:!0},my,{provide:Vp,useClass:ly},{provide:ly,useExisting:Vp},iy,{provide:sp,useExisting:my},[]];function Sy(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e{let r=new Ere({code:i,why:Cy(a.why,e),fix:Cy(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:Cy(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function kre(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n{e=n,t=r}),resolve:e,reject:t}}var Ty=Math.random.bind(Math),Ey=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Dy(e=21){let t=``,n=e;for(;n--;)t+=Ey[Ty()*64|0];return t}var Oy=6e4,ky=e=>e,Ay=ky,{clearTimeout:jy,setTimeout:My}=globalThis;function Ny(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=ky,deserialize:s=Ay,resolver:c,bind:l=`rpc`,timeout:u=Oy,proxify:d=!0}=t,f=!1,p=new Map,m,ee;async function h(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:h}=Nre(),g=Dy();s.i=g;let te;async function ne(n=s){return u>=0&&(te=My(()=>{try{if(t.onTimeoutError?.call(ee,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){h(e)}p.delete(g)},u),typeof te==`object`&&(te=te.unref?.())),p.set(g,{resolve:d,reject:h,timeoutId:te,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(ee,s,ne,d):await ne()}catch(e){if(t.onGeneralError?.call(ee,e)!==!0)throw e;return}finally{jy(te),p.delete(g)}return l}let g={$call:(e,...t)=>h(e,t,!1),$callOptional:(e,...t)=>h(e,t,!1,!0),$callEvent:(e,...t)=>h(e,t,!0),$callRaw:e=>h(e.method,e.args,e.event,e.optional),$rejectPendingCalls:ne,get $closed(){return f},get $meta(){return t.meta},$close:te,$functions:e};ee=d?new Proxy({},{get(t,n){if(Object.hasOwn(g,n))return g[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>h(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>h(n,e,!1);return i.asEvent=r,i}}):g;function te(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(re)}function ne(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function re(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(ee,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(ee,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?ee:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(ee,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(ee,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(ee,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(jy(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(re),ee}function Py(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Fy=Object.freeze({type:`object`,additionalProperties:!0});function Iy(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Fy}return Fy}function Ly(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 zy(e,t){return Ry(e,t)??[e]}function By(e){return typeof e==`string`?`'${e}'`:new Wy().serialize(e)}var Vy=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Hy=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Vy.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Uy(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})(),Gy=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Ky=[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],qy=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Jy=[],Yy=class{_data=new Xy;_hash=new Xy([...Gy]);_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)Jy[n]=e[t+n]|0;else{let e=Jy[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Jy[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Jy[n]=t+Jy[n-7]+i+Jy[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),ee=u+m+d+Ky[n]+Jy[n],h=p+f;u=l,l=c,c=s,s=o+ee|0,o=a,a=i,i=r,r=ee+h|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=Xy.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 Zy(e){return new Yy().finalize(e).toBase64()}function Qy(e){return Zy(By(e))}function $y(e){return Qy(e)}function eb(){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 tb=/^[\w+.-]{2,}:\/\//;function nb(e){return e.endsWith(`/`)?e:`${e}/`}function rb(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function ib(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?nb(n)+e.replace(/^\.?\//,``):e);return n}function ab(e,t){if(!t||t===`/`||tb.test(e))return e;let n=rb(t);return e.startsWith(n)?e:ib(n,e)}function ob(e,t){let n=e.match(tb);return t+(n?e.slice(n[0].length):e)}var sb=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function cb(e=21){let t=``,n=e;for(;n--;)t+=sb[Math.random()*64|0];return t}var lb=Symbol.for(`immer-nothing`),ub=Symbol.for(`immer-draftable`),db=Symbol.for(`immer-state`),fb=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function pb(e,...t){{let n=fb[e],r=Lb(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var mb=Object,hb=mb.getPrototypeOf,gb=`constructor`,_b=`prototype`,vb=`configurable`,yb=`enumerable`,bb=`writable`,xb=`value`,Sb=e=>!!e&&!!e[db];function Cb(e){return e?Eb(e)||Nb(e)||!!e[ub]||!!e[gb]?.[ub]||Pb(e)||Fb(e):!1}var wb=mb[_b][gb].toString(),Tb=new WeakMap;function Eb(e){if(!e||!Ib(e))return!1;let t=hb(e);if(t===null||t===mb[_b])return!0;let n=mb.hasOwnProperty.call(t,gb)&&t[gb];if(n===Object)return!0;if(!Lb(n))return!1;let r=Tb.get(n);return r===void 0&&(r=Function.toString.call(n),Tb.set(n,r)),r===wb}function Db(e,t,n=!0){Ob(e)===0?(n?Reflect.ownKeys(e):mb.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ob(e){let t=e[db];return t?t.type_:Nb(e)?1:Pb(e)?2:Fb(e)?3:0}var kb=(e,t,n=Ob(e))=>n===2?e.has(t):mb[_b].hasOwnProperty.call(e,t),Ab=(e,t,n=Ob(e))=>n===2?e.get(t):e[t],jb=(e,t,n,r=Ob(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Mb(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Nb=Array.isArray,Pb=e=>e instanceof Map,Fb=e=>e instanceof Set,Ib=e=>typeof e==`object`,Lb=e=>typeof e==`function`,Rb=e=>typeof e==`boolean`;function zb(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Bb=e=>Ib(e)?e?.[db]:null,Vb=e=>e.copy_||e.base_,Hb=e=>e.modified_?e.copy_:e.base_;function Ub(e,t){if(Pb(e))return new Map(e);if(Fb(e))return new Set(e);if(Nb(e))return Array[_b].slice.call(e);let n=Eb(e);if(t===!0||t===`class_only`&&!n){let t=mb.getOwnPropertyDescriptors(e);delete t[db];let n=Reflect.ownKeys(t);for(let r=0;r1&&mb.defineProperties(e,{set:Kb,add:Kb,clear:Kb,delete:Kb}),mb.freeze(e),t&&Db(e,(e,t)=>{Wb(t,!0)},!1),e)}function Gb(){pb(2)}var Kb={[xb]:Gb};function qb(e){return e===null||!Ib(e)||mb.isFrozen(e)}var Jb=`MapSet`,Yb=`Patches`,Xb=`ArrayMethods`,Zb={};function Qb(e){let t=Zb[e];return t||pb(0,e),t}var $b=e=>!!Zb[e];function ex(e,t){Zb[e]||(Zb[e]=t)}var tx,nx=()=>tx,rx=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:$b(Jb)?Qb(Jb):void 0,arrayMethodsPlugin_:$b(Xb)?Qb(Xb):void 0});function ix(e,t){t&&(e.patchPlugin_=Qb(Yb),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ax(e){ox(e),e.drafts_.forEach(cx),e.drafts_=null}function ox(e){e===tx&&(tx=e.parent_)}var sx=e=>tx=rx(tx,e);function cx(e){let t=e[db];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lx(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[db].modified_&&(ax(t),pb(4)),Cb(e)&&(e=ux(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[db].base_,e,t)}else e=ux(t,n);return dx(t,e,!0),ax(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===lb?void 0:e}function ux(e,t){if(qb(t))return t;let n=t[db];if(!n)return yx(t,e.handledSet_,e);if(!px(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);_x(n,e)}return n.copy_}function dx(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wb(t,n)}function fx(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var px=(e,t)=>e.scope_===t,mx=[];function hx(e,t,n,r){let i=Vb(e),a=e.type_;if(r!==void 0&&Ab(i,r,a)===t){jb(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Db(i,(e,n)=>{if(Sb(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??mx;for(let e of o)jb(i,e,n,a)}function gx(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!px(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Hb(i);hx(e,i.draft_??i,a,n),_x(i,r)})}function _x(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}fx(e)}}function vx(e,t,n){let{scope_:r}=e;if(Sb(n)){let i=n[db];px(i,r)&&i.callbacks_.push(function(){Ox(e),hx(e,n,Hb(i),t)})}else Cb(n)&&e.callbacks_.push(function(){let i=Vb(e);e.type_===3?i.has(n)&&yx(n,r.handledSet_,r):Ab(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&yx(Ab(e.copy_,t,e.type_),r.handledSet_,r)})}function yx(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Sb(e)||t.has(e)||!Cb(e)||qb(e)?e:(t.add(e),Db(e,(r,i)=>{if(Sb(i)){let t=i[db];px(t,n)&&(jb(e,r,Hb(t),e.type_),fx(t))}else Cb(i)&&yx(i,t,n)}),e)}function bx(e,t){let n=Nb(e),r={type_:+!!n,scope_:t?t.scope_:nx(),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=xx;n&&(i=[r],a=Sx);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var xx={get(e,t){if(t===db)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=Vb(e);if(!kb(i,t,e.type_))return Tx(e,i,t);let a=i[t];if(e.finalized_||!Cb(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&zb(t))return a;if(a===Cx(e.base_,t)||wx(e,t,a)){Ox(e);let n=e.type_===1?+t:t,r=Ax(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Vb(e)},ownKeys(e){return Reflect.ownKeys(Vb(e))},set(e,t,n){let r=Ex(Vb(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Cx(Vb(e),t),i=r?.[db];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(Mb(n,r)&&(n!==void 0||kb(e.base_,t,e.type_)))return!0;Ox(e),Dx(e)}return e.copy_[t]===n&&(n!==void 0||kb(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),vx(e,t,n),!0)},deleteProperty(e,t){return Ox(e),Cx(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Dx(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Vb(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[bb]:!0,[vb]:e.type_!==1||t!==`length`,[yb]:r[yb],[xb]:n[t]}},defineProperty(){pb(11)},getPrototypeOf(e){return hb(e.base_)},setPrototypeOf(){pb(12)}},Sx={};for(let e in xx){let t=xx[e];Sx[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Sx.deleteProperty=function(e,t){return isNaN(parseInt(t))&&pb(13),Sx.set.call(this,e,t,void 0)},Sx.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&pb(14),xx.set.call(this,e[0],t,n,e[0])};function Cx(e,t){let n=e[db];return(n?Vb(n):e)[t]}function wx(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Cb(n)||n[db]?!1:e.baseRefs_.has(n)}function Tx(e,t,n){let r=Ex(t,n);return r?xb in r?r[xb]:r.get?.call(e.draft_):void 0}function Ex(e,t){if(!(t in e))return;let n=hb(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=hb(n)}}function Dx(e){e.modified_||(e.modified_=!0,e.parent_&&Dx(e.parent_))}function Ox(e){e.copy_||=(e.assigned_=new Map,Ub(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var kx=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Lb(e)&&!Lb(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Lb(t)||pb(6),n!==void 0&&!Lb(n)&&pb(7);let r;if(Cb(e)){let i=sx(this),a=Ax(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?ax(i):ox(i)}return ix(i,n),lx(r,i)}if(!e||!Ib(e)){if(r=t(e),r===void 0&&(r=e),r===lb&&(r=void 0),this.autoFreeze_&&Wb(r,!0),n){let t=[],i=[];Qb(Yb).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}pb(1,e)},this.produceWithPatches=(e,t)=>{if(Lb(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]},Rb(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Rb(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Rb(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Cb(e)||pb(8),Sb(e)&&(e=jx(e));let t=sx(this),n=Ax(t,e,void 0);return n[db].isManual_=!0,ox(t),n}finishDraft(e,t){let n=e&&e[db];(!n||!n.isManual_)&&pb(9);let{scope_:r}=n;return ix(r,t),lx(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=Qb(Yb).applyPatches_;return Sb(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Ax(e,t,n,r){let[i,a]=Pb(t)?Qb(Jb).proxyMap_(t,n):Fb(t)?Qb(Jb).proxySet_(t,n):bx(t,n);return(n?.scope_??nx()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?gx(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 jx(e){return Sb(e)||pb(10,e),Mx(e)}function Mx(e){if(!Cb(e)||qb(e))return e;let t=e[db],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ub(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Ub(e,!0);let i=n;return Fb(n)&&(n=new Set),Db(i,(e,t)=>{jb(n,e,Mx(t))},r),t&&(t.finalized_=!1),n}function Nx(){fb.push(`Sets cannot have "replace" patches.`,function(e){return`Unsupported patch operation: `+e},function(e){return`Cannot apply patch, path doesn't resolve: `+e},`Patching reserved attributes like __proto__, prototype and constructor is not allowed`);function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=Bb(Ab(e,n.key_)),i=Ab(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||kb(e,o))||n.parent_.type_===1&&n.parent_.allIndicesReassigned_)return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e{let u=Ab(o,e,c),f=Ab(s,e,c),p=l?kb(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===lb?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(Fb(e))return new Set(Array.from(e).map(u));let t=Object.create(hb(e));for(let n in e)t[n]=u(e[n]);return kb(e,ub)&&(t[ub]=e[ub]),t}function d(e){return Sb(e)?u(e):e}ex(Yb,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var Px=new kx,Fx=Px.produce,Ix=Px.produceWithPatches.bind(Px),Lx=Px.applyPatches.bind(Px),Rx=1e3;function zx(e,t){if(e.add(t),e.size>Rx){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function Bx(e){let{enablePatches:t=!1}=e;t&&Nx();let n=eb(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=cb())=>{i.has(t)||(Nx(),r=Lx(r,e),zx(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=cb())=>{if(!i.has(a)){if(zx(i,a),t){let[t,i]=Ix(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=Fx(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var Vx=typeof self==`object`?self:globalThis,Hx=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),Ux=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function Wx(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=Hx.has(e)?Vx[e]:void 0;return n(new(r??Vx.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`&&Ux.has(a))return n(new Vx[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function Gx(e){return Wx(new Map,e)(0)}var Kx=``,{toString:qx}={},{keys:Jx}=Object;function Yx(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=qx.call(e).slice(8,-1);switch(n){case`Array`:return[1,Kx];case`Object`:return[2,Kx];case`Date`:return[3,Kx];case`RegExp`:return[4,Kx];case`Map`:return[5,Kx];case`Set`:return[6,Kx];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function Xx([e,t]){return e===0&&(t===`function`||t===`symbol`)}function Zx(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]=Yx(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 Jx(r))(e||!Xx(Yx(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||!(Xx(Yx(n))||Xx(Yx(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Xx(Yx(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function Qx(e,t={}){let n=[];return Zx(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:$x,stringify:eS}=JSON,tS={json:!0,lossy:!0};function nS(e){return Gx($x(e))}function rS(e){return eS(Qx(e,tS))}function iS(e){return Gx(e)}function aS(e){return rS(e)}function oS(e){return nS(e)}var sS=256,cS=class extends Error{name=`StreamClosedError`};function lS(e={}){let t=e.id??cb(),n=Math.max(0,e.replayWindow??0),r=eb(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new cS(`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=dS(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 uS(e={}){let t=e.id??cb(),n=Math.max(1,e.highWaterMark??sS),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function ee(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function h(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){ee()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return h()},cancel:ee,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return ee(),Promise.resolve({value:void 0,done:!0})}}}}}function dS(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var fS=128;function pS(e){return e.replace(/[^\w-]+/g,`_`).slice(0,fS)}var mS=`modulepreload`,hS=function(e,t){return new URL(e,t).href},gS={},_S=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=hS(t,n),t=s(t),t in gS)return;gS[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`:mS,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},vS=`__connection.json`,yS=`__DEVFRAME_CONNECTION__`,bS=`x-birpc-session`,xS=`__rpc-dump/index.json`,SS=`devframe:services`,CS=`devframe_otp`,wS=`devframe_auth_token`;wy.postMessage.remoteAssetsError;var TS=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>$y(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}},ES=Mre({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."},DF0043:{why:e=>`RPC function "${e.name}" received an invalid argument at position ${e.index}: ${e.issues}`,fix:"Pass a value that satisfies the `args` schema declared for this function."},DF0044:{why:e=>`RPC function "${e.name}" returned a value that failed its \`returns\` schema: ${e.issues}`,fix:"Make the handler return a value that satisfies the `returns` schema, or relax the schema."}}});function DS(e){if(e.agent&&e.jsonSerializable===!1)throw ES.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function OS(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function kS(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 AS(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 NS(e,t){let n=e.handler;if(!n){let r=await MS(e,t);if(!r.handler)throw ES.DF0024({name:e.name});n=r.handler}let r=e.args,i=e.returns;if(!r&&!i)return n;let a=n;return async(...t)=>{let n=await AS(e.name,r,t),o=await a(...n);return await jS(e.name,i,o)}}var PS=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 NS(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw ES.DF0021({name:e.name});DS(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw ES.DF0022({name:e.name});DS(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 NS(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw ES.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function FS(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 LS(t,`undefined`,r,e);return n}return i!==null&&IS(i,r,e,t),n})}function IS(e,t,n,r){if(typeof e==`bigint`)throw LS(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw LS(r,`Map`,t,n);if(e instanceof Set)throw LS(r,`Set`,t,n);if(e instanceof Date)throw LS(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw LS(r,e.constructor?.name??`class instance`,t,n)}function LS(e,t,n,r){let i=RS(n,r);return ES.DF0020({name:e||``,type:t,path:i})}function RS(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var zS=`__DEVFRAME_CONNECTION_META__`,BS=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function VS(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 HS(){return VS(yS)}function US(){return VS(zS)}function WS(e){if(e)return e;try{let e=localStorage.getItem(BS);if(e)return e}catch{}return VS(BS)}function GS(e){globalThis[yS]=e,globalThis[zS]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&KS(e.authToken)}function KS(e){try{localStorage.setItem(BS,e)}catch{}globalThis[BS]=e;let t=HS();t&&(globalThis[yS]={...t,authToken:e})}function qS(e){let t=ab(vS,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function JS(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function YS(){let e=HS();if(e)return JS(e,WS()??e.authToken??e.connectionMeta.authToken);let t=US();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??qS(`./`),authToken:WS(t.authToken)}}async function XS(e={}){if(e.connection){let t=JS(e.connection,WS(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return GS(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:qS(t[0]??`./`),authToken:WS(e.authToken??e.connectionMeta.authToken)};return GS(n),n}let n=YS();if(n){let t=JS(n,WS(e.authToken??n.authToken??n.connectionMeta.authToken));return GS(t),t}let r=[];for(let n of t){let t=ab(vS,n),i=qS(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:WS(e.authToken??r.authToken)};return GS(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var ZS=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function QS(e=CS){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function $S(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 eC(e=CS){let t=QS(e);return t&&$S(e),t}async function tC(e,t={}){let n=eC(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function nC(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(SS,{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 rC(e){let t=new Map,n=new Map,r=new Map,i=new Set,a=e.connectionMeta.backend===`static`;function o(e,t){let n=r.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}e.client.register({name:wy.broadcast.clientStateUpdated,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>o(e,n),r)}}),e.client.register({name:wy.broadcast.clientStatePatch,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.patch(n,r)}});function s(t,n){let r=[];return r.push(n.on(`updated`,(n,r,i)=>{a||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,i):e.callEvent(`devframe:rpc:server-state:set`,t,n,i))})),()=>{for(let e of r)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return i.add(e),()=>{i.delete(e)}},delete(e){let i=n.get(e);n.delete(e);let a=t.delete(e);return r.delete(e),i?.(),a},get:async(c,l)=>{if(l?.initialValue!==void 0&&r.set(c,l.initialValue),t.has(c))return t.get(c);let u=Bx({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise((t,n)=>{if(e.isTrusted)d().then(t,n);else{t(u);let n=!1;e.events.on(wy.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var iC=new Map;function aC(e=iC){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?FS(n,r??``):`s:${aS(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?oS(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function oC(){}function sC(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 cC(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 lC(e){let{onConnected:t=oC,onError:n=oC,onDisconnected:r=oC,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${wS}=${encodeURIComponent(e.authToken)}`);let s=aC(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function ee(e){l||(l=!0,p(e),n(e),r())}function h(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function g(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function te(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=sC(r);if(!e)break;r=e.rest;let{event:t,data:n}=cC(e.frame);n.length>0&&g(t,n.join(` -`))}}h()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await te(e.body)}catch(e){if(c.signal.aborted){h();return}ee(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[bS]: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 uC(e,t){let{channel:n,rpcOptions:r={}}=t;return Ny(e,{...n,timeout:-1,...r,proxify:!1})}function dC(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(wy.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function ee(){return l===`disconnected`||l===`error`?new ZS(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new ZS(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function h(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(wy.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new ZS(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(wy.client.error,n,t),r(n)})})}let g=new Map;for(let e of r.jsonSerializableMethods??[])g.set(e,{jsonSerializable:!0});let te=e.createChannel({definitions:g,onError(e){f(`error`,e),i.emit(wy.client.connectionError,e),m(new ZS(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new ZS(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),ne=uC(a.functions,{channel:te,rpcOptions:o});a.register({name:wy.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new ZS(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(wy.client.connectionError,e),m(e),i.emit(wy.client.isTrustedUpdated,!1)}});let re=n;async function ie(e){re=e;let t=await ne.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new ZS(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(wy.client.connectionError,e)}return i.emit(wy.client.isTrustedUpdated,c),t.isTrusted}async function ae(e){let t=(await ne.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(re=t,c=!0,d.resolve(!0),f(`connected`),i.emit(wy.client.isTrustedUpdated,!0)),t}async function oe(e={}){await ne.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function se(){return c?!0:ie(re??``)}async function ce(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:se,requestTrustWithToken:ie,requestTrustWithCode:ae,requestAuthCode:oe,ensureTrusted:ce,call:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(wy.client.error,n,t),Promise.reject(n)):h(ne.$call(...e),t)},callEvent:(...e)=>{let t=ee();if(t){i.emit(wy.client.error,t,String(e[0]));return}return ne.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(wy.client.error,n,t),Promise.reject(n)):h(ne.$callOptional(...e),t)},close:()=>{te.close()}}}function fC(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function pC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=fC(n.sse,r??`./`,location);return dC({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>lC({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 mC(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:hC(r)?mC(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function hC(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function gC(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function _C(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function vC(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function yC(e){if(e.error)throw mC(e.error);return e.output}function bC(e){return e.some(e=>e!=null)}function xC(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function SC(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?iS(e):e}function a(e,t){return i(xC(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return vC(r)?yC(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(gC(r)){if(bC(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(_C(r)){let e=$y(n),i=r.records[e];if(i)return yC(await s(i,r.serialization));if(r.fallback)return yC(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!bC(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 CC(e){let t=SC(await e.fetchJsonFromBases(xS),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 wC=``;function TC(e,t){return`${e}${wC}${t}`}function EC(e){let t=new Map,n=new Map;e.client.register({name:wy.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(TC(e,n))?._push(r,i)}}),e.client.register({name:wy.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=TC(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:wy.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=TC(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(wy.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(wC);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=TC(n,r),o=t.get(a);if(o)return o;let s=uS({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(wy.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=TC(t,r),a=n.get(i);if(a)return a;let o=lS({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 DC(){}var OC=new Map;function kC(e){let t=e.url;e.authToken&&(t=`${t}?${wS}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=DC,onError:i=DC,onDisconnected:a=DC,definitions:o=OC}=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=aC(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 AC(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 ob(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function jC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=AC(n.websocket,r??`./`,location);return dC({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>kC({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 MC(e){return e.includes(`:`)}function NC(e,t){return MC(t)?t:`${e}:${t}`}function PC(e){return{async get(t){return(await e()).value()?.[t]},async set(t,n){(await e()).mutate(e=>{if(e===void 0)return{[t]:n};e[t]=n})},async delete(t){(await e()).mutate(e=>{e!==void 0&&delete e[t]})},async all(){return(await e()).value()??{}},async onChange(t){return(await e()).on(`updated`,e=>t(e??{}))}}}function FC(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=(async()=>(await e.ensureTrusted(),e.sharedState.get(r)))().catch(e=>{throw i=void 0,e}),i}return PC(a)}function IC(e,t){return{global:FC(e,t,`global`),project:FC(e,t,`project`)}}function LC(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(MC(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(NC(t,n),...r)),callEvent:((n,...r)=>e.callEvent(NC(t,n),...r)),callOptional:((n,...r)=>e.callOptional(NC(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(NC(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(NC(t,n),r,i),upload:(n,r)=>e.streaming.upload(NC(t,n),r)}},settings:IC(e,t),scope:e.scope}}function RC(){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 zC(e,t={}){let n=t.modelContext??RC();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=pS(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=Py(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Ly(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>BC(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 BC(e,t,n){try{let r=zy(n,e.args?.length);return{content:[{type:`text`,text:VC(await(await NS(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:HC(e)}]}}}function VC(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function HC(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 UC(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 WC(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=eb(),a=Array.isArray(t)?t:[t],o=await XS(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new TS({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new PS(f),m=e.webmcp===!1?void 0:zC(p),ee,h=!1,g=0,te;function ne(){g++,te=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:wy.broadcast.cacheInvalidate,type:`event`,handler:ne}),i.on(wy.client.connectionStatus,ne),i.on(wy.client.isTrustedUpdated,ne));async function re(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(ab(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let ie=e.callTimeout??0,ae=ie>0?ie:1/0,oe,se={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+ae;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&oe.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new ZS(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${ie}ms`)}for(;!te&&(t(),!(h||oe.status!==`connected`));){let e=g;te=oe.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===g&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===g&&(te=void 0),t}),await te}await te,t()}let o=g;if(r&&e.i&&!h&&oe.isTrusted&&d.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);o===g&&!h&&d.apply(e,n)}else await t(e)}}},ce=UC(e.transport??`auto`,s);oe=ce===`static`?await CC({fetchJsonFromBases:re}):ce===`sse`?pC({...se,sseOptions:e.sseOptions}):jC({...se,wsOptions:e.wsOptions});let le;try{le=new BroadcastChannel(`devframe-auth`)}catch{}let ue,de=!1;function fe(e){return((...t)=>de||!ue?e(...t):ue.then(()=>e(...t)))}function pe(){h=!0,ne();try{ee?.(),m?.()}finally{try{le?.close()}finally{oe.close?.()}}}let me={events:i,get isTrusted(){return oe.isTrusted},get status(){return oe.status},get connectionError(){return oe.connectionError},get transport(){return oe.transport??ce},get connection(){return o},connectionMeta:s,ensureTrusted:oe.ensureTrusted,requestTrust:oe.requestTrust,requestTrustWithToken:async e=>(KS(e),o={...o,authToken:e},oe.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await oe.requestTrustWithCode(e);if(!t)return!1;KS(t),o={...o,authToken:t};try{le?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>oe.requestAuthCode(e),call:fe(oe.call),callEvent:fe(oe.callEvent),callOptional:fe(oe.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:pe};me.sharedState=rC(me),me.streaming=EC(me),me.services=nC(me);let he=new Map;me.scope=(e=>{if(!e)return me;let t=he.get(e);return t||(t=LC(me,e),he.set(e,t)),t}),f.rpc=me;function ge(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function _e(){if(e.simpleAuth!==!1&&ge()&&typeof globalThis.prompt==`function`)for(await me.requestAuthCode().catch(()=>{});!me.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await me.requestTrustWithCode(t))return}}async function ve(){let t=await oe.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await tC(me,{param:n}):!1;t||r||me.isTrusted||await _e()}return ue=ve().then(()=>{de=!0},()=>{de=!0}),s.mcp&&_S(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-CUsc0F99.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{h||(ee=e(me))}).catch(()=>{}),le&&(le.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&me.requestTrustWithToken(e.data.authToken)}),me}var GC=WC,KC=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`,`performance`,`build`],qC=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function JC(e){return`pangular:${e}`}var YC=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],XC={refreshMs:{default:3e3,min:500,max:8e3},navigations:{default:50,min:5,max:500},formTimeline:{default:200,min:10,max:2e3},httpCalls:{default:200,min:10,max:2e3},changeLog:{default:200,min:10,max:2e3},cdCycles:{default:200,min:10,max:2e3},cdSlowMs:{default:16,min:1,max:1e3},capacitorCalls:{default:200,min:10,max:2e3},idleAfterMs:{default:6e4,min:0,max:6e5}},ZC={"opted-out":`the request sets transferCache: false`,post:`POST requests are left out unless includePostRequests is set`,method:`only GET, HEAD and POST requests are cached`,"auth-headers":`it sends an Authorization, Proxy-Authorization or Cookie header`,credentials:`it sends credentials (withCredentials or credentials: include/same-origin)`,"no-cache-request":`the request asks for no-store, no-cache or private`,"no-cache-response":`the response has Cache-Control no-store, no-cache or private`,"set-cookie":`the response sets a cookie`,error:`failed responses are not stored`,mocked:`a fault rule answered before the transfer cache ran`,filter:`the transferCache filter passed to withPangular() left it out`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},QC=[[0,`Network error (offline)`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Content Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Content`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[499,`Client Closed Request`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[510,`Not Extended`],[511,`Network Authentication Required`],[520,`Web Server Returned an Unknown Error`],[521,`Web Server Is Down`],[522,`Connection Timed Out`],[523,`Origin Is Unreachable`],[524,`A Timeout Occurred`]];function $C(e){return QC.some(([t])=>t===e)}var ew=/^[a-z][a-z0-9-]{0,39}$/;function tw(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&ew.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 nw=`pangular`,rw={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},iw=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function aw(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=rw[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[...iw.filter(e=>n.has(e)),r].join(`+`)}function ow(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 sw(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 cw=[{id:`dashboard`,label:`Dashboard`},{id:`timeline`,label:`Timeline`},{id:`audit`,label:`Audit`},{id:`analog`,label:`Analog`,inspector:`analog`},{id:`components`,label:`Components`,inspector:`components`},{id:`routes`,label:`Routes`,inspector:`router`},{id:`signals`,label:`Signals`,inspector:`signals`},{id:`injectors`,label:`Injectors`,inspector:`injectors`},{id:`store`,label:`Store`,inspector:`ngrx`},{id:`queries`,label:`Queries`,inspector:`tanstackQuery`},{id:`forms`,label:`Forms`,inspector:`forms`},{id:`pipes`,label:`Pipes`,inspector:`pipes`},{id:`network`,label:`SSR & HTTP`,inspector:`http`},{id:`errors`,label:`Errors`,inspector:`errors`},{id:`performance`,label:`Performance`,inspector:`performance`},{id:`build`,label:`Build`,inspector:`build`},{id:`capacitor`,label:`Capacitor`,inspector:`capacitor`},{id:`plugins`,label:`Plugins`,inspector:`plugins`}],lw=1e4;function uw(e){return cw.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var dw={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,signals:`a component's signal graph, by the component's id`,forms:`a form, by its id`},fw=200;function pw(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 mw(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=fw?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 hw=[{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 gw(e){let t=uw(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=hw.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function _w(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}var vw=Object.freeze({minLength:24,threshold:4.5}),yw={min:16,max:512},bw={min:2,max:6};function xw(e){return typeof e==`number`&&Number.isInteger(e)&&e>=yw.min&&e<=yw.max}function Sw(e){return typeof e==`number`&&Number.isFinite(e)&&e>=bw.min&&e<=bw.max}function Cw(e){if(e===!0)return{...vw};if(!e||typeof e!=`object`||Array.isArray(e))return;let{minLength:t,threshold:n}=e;return{minLength:xw(t)?t:vw.minLength,threshold:Sw(n)?n:vw.threshold}}function ww(e){let t=Cw(e);return t?{entropy:t}:{}}function Tw(e,t){return typeof e==`boolean`?e:t}var Ew=100,Dw=100;function Ow(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=Dw);return[...new Set(t)].slice(0,Ew)}function kw(e,t){let{default:n,min:r,max:i}=XC[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function Aw(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function jw(e){let t=_w(e),n=_w(t.agent),r=_w(t.inspectors),i=_w(n.tools),a=_w(t.actions),o=Tw(t.actions,!0),s=_w(t.redaction),c=_w(t.limits),l=Aw(KC,e=>Tw(r[e],!0));return{inspectors:l,agent:{readOnly:Tw(n.readOnly,!1),tools:Aw(KC,e=>l[e]&&Tw(i[e],!0)),browserTools:Tw(n.browserTools,!1)},actions:Aw(YC,e=>l[e]&&Tw(a[e],o)),redaction:{secretNames:Ow(s.secretNames),unmask:Ow(s.unmask),...ww(s.entropy)},limits:Object.fromEntries(Object.keys(XC).map(e=>[e,kw(c[e],e)])),popup:{hotkey:Rw(_w(t.popup).hotkey)},plugins:Lw(t.plugins),lint:{rules:Fw(t.lint)},analog:Nw(t.analog),ngrx:{trace:Tw(_w(t.ngrx).trace,!1)}}}var Mw=500;function Nw(e){let t=_w(e).contentSchema;return typeof t==`string`&&t.trim()&&t.length<=Mw?{contentSchema:t.trim()}:{}}var Pw=200;function Fw(e){let t=_w(_w(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,Pw))typeof r==`boolean`&&(n[e]=r);return n}var Iw=100;function Lw(e){let t={};for(let[n,r]of Object.entries(_w(e)).slice(0,Iw)){if(!ew.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=_w(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:Tw(e.enabled,!0),tools:Tw(e.tools,!0),actions:Tw(e.actions,!0)})}return t}function Rw(e){return e===!1?!1:aw(e)??`Alt+Shift+P`}function zw(e){let t=e?.configs;return jw(t?.[nw])}function Bw(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state, dispatching actions and changing the Store DevTools history`,http:`Changing HTTP mock rules and SSR overrides, refetching the TransferState payload, and clearing HTTP calls`,analog:`Calling API routes, clearing server calls, running Nitro tasks and purging the Nitro cache`,components:`Editing component properties and signals`,tanstackQuery:`Invalidating and refetching TanStack queries`,plugins:`Running plugin actions`}[e]} is turned off in the devtools config (actions.${e}).`}var Vw=[`pangular:build-meta`],Hw={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,tanstackQuery:`TanStack Query`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`,plugins:`Plugins`,performance:`Performance`,build:`Build`},Uw={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore, dispatch and Store DevTools`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`,tanstackQuery:`TanStack Query invalidate and refetch`,plugins:`Plugin actions`},Ww={refreshMs:e=>`poll every ${e} ms`,navigations:e=>`${e} navigations`,formTimeline:e=>`${e} form events`,httpCalls:e=>`${e} HTTP calls`,changeLog:e=>`${e} NgRx changes`,cdCycles:e=>`${e} change detection cycles`,cdSlowMs:e=>`slow cycles over ${e} ms`,capacitorCalls:e=>`${e} Capacitor plugin calls`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function Gw(e){if(!e)return[];let t=[`On`];return e.minLength!==vw.minLength&&t.push(`${e.minLength} characters or more`),e.threshold!==vw.threshold&&t.push(`up to ${e.threshold} bits per character`),t}function Kw(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=KC.filter(t=>e.inspectors[t]);n(`Inspectors off`,KC.filter(t=>!e.inspectors[t]).map(e=>Hw[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>Hw[e])),n(`Blocked actions`,YC.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>Uw[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Entropy masking`,Gw(e.redaction.entropy)),n(`Limits`,Object.keys(XC).filter(t=>e.limits[t]!==XC[t].default).map(t=>Ww[t](e.limits[t]))),e.popup.hotkey!==`Alt+Shift+P`&&n(`Popup shortcut`,[e.popup.hotkey===!1?`Off`:e.popup.hotkey]);let i=Object.entries(e.plugins??{});return n(`Plugins off`,i.filter(([,e])=>!e.enabled).map(([e])=>e)),n(`Plugin tools or actions off`,i.filter(([,e])=>e.enabled&&(!e.tools||!e.actions)).map(([e,t])=>`${e} (${[!t.tools&&`tools`,!t.actions&&`actions`].filter(Boolean).join(`, `)})`)),n(`Lint rules off`,Object.entries(e.lint?.rules??{}).filter(([,e])=>!e).map(([e])=>e)),t}function qw(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 Jw(e){return!e.tags.length&&!e.directives.length&&!e.text}function Yw(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 Xw={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 Zw(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function Qw(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function $w(e,t){let n=Qw(e),r=Qw(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function eT(e,t){return e?.capabilities?.[t]===!1}function tT(e,t){let n=Xw[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=Zw(t);return $w(t,n.since)?`${r} in a development build; this page runs Angular ${i} without it, which usually means a production build.`:`${r}; this page runs Angular ${i}.`}function nT(e){return e.hydration===`hydrated`&&e.hydratedAt===void 0?`hydrated before inspection`:e.hydration}var rT=/^on (viewport|interaction|hover)\b/;function iT(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>rT.test(e))}function aT(e,t){let n=[],r=e.since>0?Math.max(0,Math.round((t-e.since)/1e3)):0;return e.state===`error`&&n.push({kind:`failed`,text:`failed to load`,label:`failed`}),(e.state===`placeholder`||e.state===`initial`)&&r*1e3>=1e4&&n.push(iT(e.triggers)?{kind:`waiting`,text:`waiting for its trigger for ${r}s`,label:`waiting ${r}s`,seconds:r}:{kind:`stuck`,text:`on its placeholder for ${r}s`,label:`stuck ${r}s`,seconds:r}),e.hydrateNever?n.push({kind:`hydrate-never`,text:`hydrate never: the server HTML stays static`,label:`hydrate never`}):e.hydration===`dehydrated`&&n.push({kind:`dehydrated`,text:`still dehydrated`,label:`dehydrated`}),n}var oT=`pangular-page-id`,sT=null;function cT(e){sT=e}function lT(){if(sT)return sT;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(oT)||null)}catch{return null}}function uT(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 dT(e,t){return e?t?e.pages?.[t]??null:e:null}function fT(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function pT(){return{functions:[...Vw]}}function mT(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function hT(e,t,n){return mT(e,t,n).then(e=>e,()=>null)}function gT(e){return e?.connectionMeta.backend===`static`}function _T(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 vT(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function yT(e){return e.split(`@`)[1]??``}var bT={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},xT={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},ST=hT,CT={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 wT(e){return CT[e]??e}var TT=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function ET(e,t){return await ST(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function DT(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 OT=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function kT(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(OT,(e,t)=>t??(e===`**`?``:e))}function AT(e,t){let n=Math.max(0,e-t),r=Math.ceil(n/6e4);if(r<60)return`in ${r} min`;let i=Math.round(r/60);return i<48?`in ${i} ${i===1?`hour`:`hours`}`:`in ${Math.round(i/24)} days`}function jT(e,t){return e.length?e.join(`, `):t}function MT(e,t){let n=[];if(n.push({label:`One-time code`,value:e.auth?e.oneTimeCode.state===`locked`?`Locked after too many wrong codes: run pangular token --rotate or restart the server for a new code`:e.oneTimeCode.expiresAt?`On, current code expires ${AT(e.oneTimeCode.expiresAt,t)}`:`On`:`Off: every client is trusted`}),e.auth){let{count:r,nextExpiresAt:i,lastExpiresAt:a}=e.tokens;n.push({label:`Trusted clients`,value:r?r===1||i===a?`${r} ${r===1?`token`:`tokens`}, expires ${AT(i??t,t)}`:`${r} tokens, the first expires ${AT(i??t,t)}, the last ${AT(a??t,t)}`:`None`}),e.pairingTokens&&n.push({label:`Pairing tokens`,value:`${e.pairingTokens} accepted instead of the code`})}return e.reported?(n.push({label:`Reach`,value:e.network?`This machine and other machines`:`This machine only`}),n.push({label:`Allowed origins`,value:e.originCheck?`${jT(e.allowedOrigins,`This machine and the Chrome extension`)}${e.customOrigins?`, plus a custom origin check`:``}`:`Any: the origin check is off`}),(e.allowedHosts===`any`||e.allowedHosts.length)&&n.push({label:`Allowed hosts`,value:e.allowedHosts===`any`?`Any`:e.allowedHosts.join(`, `)}),n):n}function NT(e){return zw(e?.connectionMeta)}function PT(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function FT(e,t){if(!t||typeof t!=`object`)return e;let n=PT(t.secretNames),r=PT(t.unmask);if(!n||!r)return e;let i=Cw(t.entropy);return{...e,redaction:i?{secretNames:n,unmask:r,entropy:i}:{secretNames:n,unmask:r}}}function IT(e,t){return NT(e).actions[t]}var LT={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,queries:`tanstackQuery`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`,plugins:`plugins`,performance:`performance`,build:`build`};function RT(e){return LT[e]}var zT=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function BT(e,t){let n=LT[e];return!n||t.inspectors[n]}function VT(e,t){e&1&&(w(),fg(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function HT(e,t){e&1&&(w(),fg(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function UT(e,t){e&1&&(w(),fg(0,`path`,13)(1,`path`,14))}function WT(e,t){e&1&&(w(),fg(0,`path`,15)(1,`path`,16)(2,`path`,17))}function GT(e,t){e&1&&(w(),fg(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function KT(e,t){e&1&&(w(),fg(0,`path`,1))}function qT(e,t){e&1&&(w(),fg(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function JT(e,t){e&1&&(w(),fg(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function YT(e,t){e&1&&(w(),fg(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function XT(e,t){e&1&&(w(),fg(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function ZT(e,t){e&1&&(w(),fg(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function QT(e,t){e&1&&(w(),fg(0,`circle`,39)(1,`path`,40))}function $T(e,t){e&1&&(w(),fg(0,`ellipse`,41)(1,`path`,42)(2,`path`,43)(3,`path`,44)(4,`path`,45))}function eE(e,t){e&1&&(w(),fg(0,`circle`,32)(1,`path`,46)(2,`path`,47))}function tE(e,t){e&1&&(w(),fg(0,`path`,48)(1,`path`,49))}function nE(e,t){e&1&&(w(),fg(0,`path`,50)(1,`path`,51)(2,`path`,52))}function rE(e,t){e&1&&(w(),fg(0,`path`,2))}function iE(e,t){e&1&&(w(),fg(0,`path`,3))}function aE(e,t){e&1&&(w(),fg(0,`path`,4))}var oE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:20,vars:1,consts:[[`viewBox`,`0 0 24 24`,`width`,`16`,`height`,`16`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1.8`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`,`aria-hidden`,`true`],[`d`,`M22 12h-4l-3 9L9 3l-3 9H2`],[`d`,`M10 3h4v3a2 2 0 1 0 4 0V5h1a2 2 0 0 1 2 2v4h-2a2 2 0 1 0 0 4h2v4a2 2 0 0 1-2 2h-4v-2a2 2 0 1 0-4 0v2H7a2 2 0 0 1-2-2v-4H4a2 2 0 1 1 0-4h1V7a2 2 0 0 1 2-2h3Z`],[`d`,`m8 3 4 8 5-5 5 15H2L8 3z`],[`fill`,`currentColor`,`stroke`,`none`,`transform`,`translate(1.8 1.8) scale(0.85)`,`d`,`M24 3.7l-5.766 5.766 5.725 5.736-3.713 3.712L5.073 3.742 8.786.03l5.736 5.726L20.284 0 24 3.7zM.029 8.785l3.713-3.713 15.173 15.173-3.713 3.714-5.732-5.726L3.7 24 0 20.285l5.754-5.764L.029 8.785z`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`x`,`14`,`y`,`12`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`3`,`y`,`16`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`d`,`M3 12h18`],[`cx`,`7`,`cy`,`12`,`r`,`2`],[`cx`,`14`,`cy`,`12`,`r`,`2`],[`d`,`M18 7v10`],[`d`,`M9 11l2 2 4-4`],[`d`,`M12 3 4 6v6c0 4.5 3.4 8.3 8 9 4.6-.7 8-4.5 8-9V6l-8-3Z`],[`d`,`M12 2 3 7l9 5 9-5-9-5Z`],[`d`,`m3 12 9 5 9-5`],[`d`,`m3 17 9 5 9-5`],[`cx`,`6`,`cy`,`19`,`r`,`3`],[`d`,`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`],[`cx`,`18`,`cy`,`5`,`r`,`3`],[`d`,`M12 22v-5`],[`d`,`M9 8V2`],[`d`,`M15 8V2`],[`d`,`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`],[`cx`,`12`,`cy`,`5`,`rx`,`9`,`ry`,`3`],[`d`,`M3 5v14a9 3 0 0 0 18 0V5`],[`d`,`M3 12a9 3 0 0 0 18 0`],[`x`,`3`,`y`,`4`,`width`,`18`,`height`,`16`,`rx`,`2`],[`d`,`M7 9h10`],[`d`,`M7 13h6`],[`d`,`M7 17h8`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18Z`],[`d`,`M4 7h10`],[`d`,`M4 17h6`],[`d`,`m14 13 4 4-4 4`],[`d`,`M10 17h8`],[`cx`,`18`,`cy`,`7`,`r`,`3`],[`cx`,`12`,`cy`,`12`,`r`,`3`],[`d`,`M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z`],[`cx`,`11`,`cy`,`5`,`rx`,`8`,`ry`,`3`],[`d`,`M3 5v6c0 1.66 3.58 3 8 3`],[`d`,`M3 11v6c0 1.66 3.58 3 8 3`],[`d`,`M21 14a4 4 0 1 1-1.2-2.85L21 12.3`],[`d`,`M21 9v3.3h-3.3`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`],[`d`,`M12 14l4-4`],[`d`,`M3.34 19a10 10 0 1 1 17.32 0`],[`d`,`M21 16V8l-9-5-9 5v8l9 5 9-5Z`],[`d`,`m3.3 7 8.7 5 8.7-5`],[`d`,`M12 22V12`]],template:function(e,t){if(e&1&&(w(),R(0,`svg`,0),A(1,VT,4,0)(2,HT,4,0)(3,UT,2,0)(4,WT,3,0)(5,GT,3,0)(6,KT,1,0,`:svg:path`,1)(7,qT,4,0)(8,JT,3,0)(9,YT,4,0)(10,XT,3,0)(11,ZT,5,0)(12,QT,2,0)(13,$T,5,0)(14,eE,3,0)(15,tE,2,0)(16,nE,3,0)(17,rE,1,0,`:svg:path`,2)(18,iE,1,0,`:svg:path`,3)(19,aE,1,0,`:svg:path`,4),z()),e&2){let e;D(),j((e=t.name())===`dashboard`?1:e===`timeline`?2:e===`audit`?3:e===`components`?4:e===`routes`?5:e===`signals`?6:e===`injectors`?7:e===`store`?8:e===`forms`?9:e===`network`?10:e===`pipes`?11:e===`settings`?12:e===`queries`?13:e===`errors`?14:e===`performance`?15:e===`build`?16:e===`plugins`?17:e===`analog`?18:e===`capacitor`?19:-1)}},styles:[`[_nghost-%COMP%] { + `):``,this.name=`UnsubscriptionError`,this.errors=t}});function or(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var sr=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=Zn(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(rr(c))try{c()}catch(e){i=e instanceof ar?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Zn(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{ur(f)}catch(e){i??=[],e instanceof ar?i=$n($n([],Qn(i)),Qn(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new ar(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)ur(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&or(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&or(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),cr=sr.EMPTY;function lr(e){return e instanceof sr||e&&`closed`in e&&rr(e.remove)&&rr(e.add)&&rr(e.unsubscribe)}function ur(e){rr(e)?e():e.unsubscribe()}var dr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},fr={setTimeout:function(e,t){var n=[...arguments].slice(2),r=fr.delegate;return r?.setTimeout?r.setTimeout.apply(r,$n([e,t],Qn(n))):setTimeout.apply(void 0,$n([e,t],Qn(n)))},clearTimeout:function(e){return(fr.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function pr(e){fr.setTimeout(function(){var t=dr.onUnhandledError;if(t)t(e);else throw e})}function mr(){}var hr=(function(){return vr(`C`,void 0,void 0)})();function gr(e){return vr(`E`,void 0,e)}function _r(e){return vr(`N`,e,void 0)}function vr(e,t,n){return{kind:e,value:t,error:n}}var yr=null;function br(e){if(dr.useDeprecatedSynchronousErrorHandling){var t=!yr;if(t&&(yr={errorThrown:!1,error:null}),e(),t){var n=yr,r=n.errorThrown,i=n.error;if(yr=null,r)throw i}}else e()}function xr(e){dr.useDeprecatedSynchronousErrorHandling&&yr&&(yr.errorThrown=!0,yr.error=e)}var Sr=function(e){Jn(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,lr(t)&&t.add(n)):n.destination=Ar,n}return t.create=function(e,t,n){return new Er(e,t,n)},t.prototype.next=function(e){this.isStopped?kr(_r(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?kr(gr(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?kr(hr,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(sr),Cr=Function.prototype.bind;function wr(e,t){return Cr.call(e,t)}var Tr=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Dr(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Dr(e)}else Dr(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Dr(e)}},e}(),Er=function(e){Jn(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(rr(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&dr.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&wr(t.next,o),error:t.error&&wr(t.error,o),complete:t.complete&&wr(t.complete,o)}):a=t}return i.destination=new Tr(a),i}return t}(Sr);function Dr(e){dr.useDeprecatedSynchronousErrorHandling?xr(e):pr(e)}function Or(e){throw e}function kr(e,t){var n=dr.onStoppedNotification;n&&fr.setTimeout(function(){return n(e,t)})}var Ar={closed:!0,next:mr,error:Or,complete:mr},jr=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Mr(e){return e}function Nr(e){return e.length===0?Mr:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Pr=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=Lr(e)?e:new Er(e,t,n);return br(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=Fr(t),new t(function(t,r){var i=new Er({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[jr]=function(){return this},e.prototype.pipe=function(){return Nr([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Fr(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Fr(e){return e??dr.Promise??Promise}function Ir(e){return e&&rr(e.next)&&rr(e.error)&&rr(e.complete)}function Lr(e){return e&&e instanceof Sr||Ir(e)&&lr(e)}function Rr(e){return rr(e?.lift)}function zr(e){return function(t){if(Rr(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function Br(e,t,n,r,i){return new Vr(e,t,n,r,i)}var Vr=function(e){Jn(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(Sr),Hr=ir(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Ur=function(e){Jn(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new Wr(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Hr},t.prototype.next=function(e){var t=this;br(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=Zn(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;br(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;br(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?cr:(this.currentObservers=null,a.push(e),new sr(function(){t.currentObservers=null,or(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 Pr;return e.source=this,e},t.create=function(e,t){return new Wr(e,t)},t}(Pr),Wr=function(e){Jn(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)??cr},t}(Ur),Gr=function(e){Jn(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}(Ur);function Kr(e){return e[e.length-1]}function qr(e){return rr(Kr(e))?e.pop():void 0}var Jr=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function Yr(e){return rr(e?.then)}function Xr(e){return rr(e[jr])}function Zr(e){return Symbol.asyncIterator&&rr(e?.[Symbol.asyncIterator])}function Qr(e){return TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function $r(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var ei=$r();function ti(e){return rr(e?.[ei])}function ni(e){return tr(this,arguments,function(){var t,n,r,i;return Xn(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,er(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,er(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,er(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function ri(e){return rr(e?.getReader)}function ii(e){if(e instanceof Pr)return e;if(e!=null){if(Xr(e))return _ee(e);if(Jr(e))return vee(e);if(Yr(e))return yee(e);if(Zr(e))return ai(e);if(ti(e))return bee(e);if(ri(e))return xee(e)}throw Qr(e)}function _ee(e){return new Pr(function(t){var n=e[jr]();if(rr(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function vee(e){return new Pr(function(t){for(var n=0;n=0?n.slice(0,r):n}function gi(e,t){return e?t?`${e} ${t}`:e:t||``}var Uee=mi({__forward_ref__:mi});function _i(e){return e.__forward_ref__=_i,e}function vi(e){return yi(e)?e():e}function yi(e){return typeof e==`function`&&Object.hasOwn(e,Uee)&&e.__forward_ref__===_i}function bi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function xi(e){return Si(e,Ti)}function Si(e,t){return Object.hasOwn(e,t)&&e[t]||null}function Ci(e){return(e?.[Ti]??null)||null}function wi(e){return e&&Object.hasOwn(e,Ei)?e[Ei]:null}var Ti=mi({ɵprov:mi}),Ei=mi({ɵinj:mi}),Di=class{_desc;ngMetadataName=`InjectionToken`;ɵprov;constructor(e,t){this._desc=e,this.ɵprov=void 0,typeof t==`number`?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.ɵprov=bi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Oi(e){return e&&!!e.ɵproviders}var ki=mi({ɵcmp:mi}),Ai=mi({ɵdir:mi}),ji=mi({ɵpipe:mi}),Mi=mi({ɵfac:mi}),Ni=mi({__NG_ELEMENT_ID__:mi}),Pi=mi({__NG_ENV_ID__:mi});function Fi(e){return Ri(e,`@Component`),e[ki]||null}function Ii(e){return Ri(e,`@Directive`),e[Ai]||null}function Li(e){return Ri(e,`@Pipe`),e[ji]||null}function Ri(e,t){if(e==null)throw new fi(-919,!1)}function zi(e){return typeof e==`string`?e:e==null?``:String(e)}var Bi=mi({ngErrorCode:mi}),Vi=mi({ngErrorMessage:mi}),Hi=mi({ngTokenPath:mi});function Ui(e,t){return Gi(``,-200,t)}function Wi(e,t){throw new fi(-201,!1)}function Gi(e,t,n){let r=new fi(t,e);return r[Bi]=t,r[Vi]=e,n&&(r[Hi]=n),r}function Ki(e){return e[Bi]}var qi;function Ji(){return qi}function Yi(e){let t=qi;return qi=e,t}function Xi(e,t,n){let r=xi(e);if(r&&r.providedIn==`root`)return r.value===void 0?r.value=r.factory():r.value;if(n&8)return null;if(t!==void 0)return t;Wi(e,``)}var Zi=globalThis,Qi={},$i=`__NG_DI_FLAG__`,ea=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=ra(t)||0;try{return this.injector.get(e,n&8?null:Qi,n)}catch(e){if(Vn(e))return e;throw e}}};function ta(e,t=0){let n=Rn();if(n===void 0)throw new fi(-203,!1);if(n===null)return Xi(e,void 0,t);{let r=ia(t),i=n.retrieve(e,r);if(Vn(i)){if(r.optional)return null;throw i}return i}}function na(e,t=0){return(Ji()||ta)(vi(e),t)}function x(e,t){return na(e,ra(t))}function ra(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function ia(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function aa(e){let t=[];for(let n=0;nArray.isArray(e)?ua(e,t):t(e))}function da(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function fa(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function pa(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 ha(e,t,n){let r=_a(e,t);return r>=0?e[r|1]=n:(r=~r,ma(e,r,t,n)),r}function ga(e,t){let n=_a(e,t);if(n>=0)return e[n|1]}function _a(e,t){return va(e,t,1)}function va(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 ua(t,e=>{let t=e;Oa(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Da(i,a),n}function Da(e,t){for(let n=0;n{t(e,r)})}}function Oa(e,t,n,r){if(e=vi(e),!e)return!1;let i=null,a=wi(e),o=!a&&Fi(e);if(!a&&!o){let t=e.ngModule;if(a=wi(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)Oa(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{ua(a.imports,i=>{Oa(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Da(e,t)}if(!s){let e=sa(i)||(()=>new i);t({provide:i,useFactory:e,deps:ba},i),t({provide:Ca,useValue:i,multi:!0},i),t({provide:xa,useValue:()=>na(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;ka(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function ka(e,t){for(let n of e)Oi(n)&&(n=n.ɵproviders),Array.isArray(n)?ka(n,t):t(n)}var Aa=mi({provide:String,useValue:mi});function ja(e){return typeof e==`object`&&!!e&&Aa in e}function Ma(e){return!!(e&&e.useExisting)}function Na(e){return!!(e&&e.useFactory)}function Pa(e){return typeof e==`function`}function Fa(e){return!!e.useClass}var Ia=new Di(``),La={},Ra={},za=void 0;function Ba(){return za===void 0&&(za=new wa),za}var Va=class{},Ha=class extends Va{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,Qa(e,e=>this.processProvider(e)),this.records.set(Sa,Ja(void 0,this)),r.has(`environment`)&&this.records.set(Va,Ja(void 0,this));let i=this.records.get(Ia);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Ca,ba,{self:!0}))}retrieve(e,t){let n=ra(t)||0;try{return this.get(e,Qi,n)}catch(e){if(Vn(e))return e;throw e}}destroy(){qa(this),this._destroyed=!0;let e=rn(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(),rn(e)}}onDestroy(e){return qa(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){qa(this);let t=zn(this),n=Yi(void 0);try{return e()}finally{zn(t),Yi(n)}}get(e,t=Qi,n){if(qa(this),Object.hasOwn(e,Pi))return e[Pi](this);let r=ra(n),i=zn(this),a=Yi(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Za(e)&&xi(e);t=n&&this.injectableDefInScope(n)?Ja(Ua(e),La):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Ba():this.parent;return t=r&8&&t===Qi?null:t,n.get(e,t)}catch(e){let t=Ki(e);throw t===-200||t===-201?new fi(t,null):e}finally{Yi(a),zn(i)}}resolveInjectorInitializers(){let e=rn(null),t=zn(this),n=Yi(void 0);try{let e=this.get(xa,ba,{self:!0});for(let t of e)t()}finally{zn(t),Yi(n),rn(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=vi(e);let t=Pa(e)?e:vi(e&&e.provide),n=Ga(e);if(!Pa(e)&&e.multi===!0){let n=this.records.get(t);n||(n=Ja(void 0,La,!0),n.factory=()=>aa(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=rn(null);try{if(t.value===Ra)throw Ui(``);return t.value===La&&(t.value=Ra,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Xa(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{rn(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=vi(e.providedIn);return typeof t==`string`?t===`any`||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function Ua(e){let t=xi(e),n=t===null?sa(e):t.factory;if(n!==null)return n;if(e instanceof Di)throw new fi(-204,!1);if(e instanceof Function)return Wa(e);throw new fi(-204,!1)}function Wa(e){if(e.length>0)throw new fi(-204,!1);let t=Ci(e);return t===null?()=>new e:()=>t.factory(e)}function Ga(e){return ja(e)?Ja(void 0,e.useValue):Ja(Ka(e),La)}function Ka(e,t,n){let r;if(Pa(e)){let t=vi(e);return sa(t)||Ua(t)}if(ja(e))r=()=>vi(e.useValue);else if(Na(e))r=()=>e.useFactory(...aa(e.deps||[]));else if(Ma(e))r=(t,n)=>na(vi(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=vi(e&&(e.useClass||e.provide));if(Ya(e))r=()=>new t(...aa(e.deps));else return sa(t)||Ua(t)}return r}function qa(e){if(e.destroyed)throw new fi(-205,!1)}function Ja(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Ya(e){return!!e.deps}function Xa(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Za(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Qa(e,t){for(let n of e)Array.isArray(n)?Qa(n,t):n&&Oi(n)?Qa(n.ɵproviders,t):t(n)}function $a(e,t){let n;e instanceof Ha?(qa(e),n=e):n=new ea(e);let r=zn(n),i=Yi(void 0);try{return t()}finally{zn(r),Yi(i)}}function eo(){return Ji()!==void 0||Rn()!=null}var to=1;function no(e){return Array.isArray(e)&&typeof e[to]==`object`}function ro(e){return Array.isArray(e)&&e[to]===!0}function io(e){return!!(e.flags&4)}function ao(e){return e.componentOffset>-1}function oo(e){return(e.flags&1)==1}function so(e){return!!e.template}function co(e){return!!(e[2]&512)}function lo(e){return(e[2]&256)==256}var uo=(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})(uo||{}),fo=`math`;function po(e){for(;Array.isArray(e);)e=e[0];return e}function mo(e,t){return po(t[e])}function ho(e,t){return po(t[e.index])}function go(e,t){return e.data[t]}function _o(e,t){return e[t]}function vo(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function yo(e,t){let n=t[e];return no(n)?n:n[0]}function bo(e){return(e[2]&128)==128}function xo(e){return ro(e[3])}function So(e,t){return t==null?null:e[t]}function Co(e){e[17]=0}function wo(e){e[2]&1024||(e[2]|=1024,bo(e)&&Do(e))}function Wee(e,t){for(;e>0;)t=t[14],e--;return t}function To(e){return!!(e[2]&9216||e[24]?.dirty)}function Eo(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),To(e)&&Do(e)}function Do(e){e[10].changeDetectionScheduler?.notify(0);let t=ko(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!bo(t)));)t=ko(t)}function Oo(e,t){if(lo(e))throw new fi(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Gee(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function ko(e){let t=e[3];return ro(t)?t[3]:t}function Ao(e){return e[7]??=[]}function jo(e){return e.cleanup??=[]}function Kee(e,t,n,r){let i=Ao(t);i.push(n),e.firstCreatePass&&jo(e).push(r,i.length-1)}var Mo={lFrame:is(null),bindingsEnabled:!0,skipHydrationRootTNode:null},No=!1;function qee(){return Mo.lFrame.elementDepthCount}function Jee(){Mo.lFrame.elementDepthCount++}function Po(){Mo.lFrame.elementDepthCount--}function Fo(){return Mo.bindingsEnabled}function Io(){return Mo.skipHydrationRootTNode!==null}function Lo(e){return Mo.skipHydrationRootTNode===e}function Ro(){Mo.skipHydrationRootTNode=null}function zo(){return Mo.lFrame.lView}function Bo(){return Mo.lFrame.tView}function S(e){return Mo.lFrame.contextLView=e,e[8]}function C(e){return Mo.lFrame.contextLView=null,e}function Vo(){let e=Ho();for(;e!==null&&e.type===64;)e=e.parent;return e}function Ho(){return Mo.lFrame.currentTNode}function Yee(){let e=Mo.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Uo(e,t){let n=Mo.lFrame;n.currentTNode=e,n.isParent=t}function Wo(){return Mo.lFrame.isParent}function Go(){Mo.lFrame.isParent=!1}function Ko(){return Mo.lFrame.contextLView}function qo(){return No}function Jo(e){let t=No;return No=e,t}function Yo(){let e=Mo.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Xo(){return Mo.lFrame.bindingIndex}function Xee(e){return Mo.lFrame.bindingIndex=e}function Zo(){return Mo.lFrame.bindingIndex++}function Qo(e){let t=Mo.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Zee(){return Mo.lFrame.inI18n}function Qee(e,t){let n=Mo.lFrame;n.bindingIndex=n.bindingRootIndex=e,$o(t)}function $ee(){return Mo.lFrame.currentDirectiveIndex}function $o(e){Mo.lFrame.currentDirectiveIndex=e}function ete(e){let t=Mo.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function tte(){return Mo.lFrame.currentQueryIndex}function es(e){Mo.lFrame.currentQueryIndex=e}function nte(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function ts(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=nte(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=Mo.lFrame=rs();return r.currentTNode=t,r.lView=e,!0}function ns(e){let t=rs(),n=e[1];Mo.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function rs(){let e=Mo.lFrame,t=e===null?null:e.child;return t===null?is(e):t}function is(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function as(){let e=Mo.lFrame;return Mo.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var os=as;function ss(){let e=as();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function rte(e){return(Mo.lFrame.contextLView=Wee(e,Mo.lFrame.contextLView))[8]}function cs(){return Mo.lFrame.selectedIndex}function ls(e){Mo.lFrame.selectedIndex=e}function us(){let e=Mo.lFrame;return go(e.tView,e.selectedIndex)}function w(){Mo.lFrame.currentNamespace=`svg`}function ds(){fs()}function fs(){Mo.lFrame.currentNamespace=null}function ps(){return Mo.lFrame.currentNamespace}var ms=!0;function hs(){return ms}function gs(e){ms=e}function _s(e,t=null,n=null,r){let i=vs(e,t,n,r);return i.resolveInjectorInitializers(),i}function vs(e,t=null,n=null,r,i=new Set){return new Ha([n||ba,Ta(e)],t||Ba(),null,i)}var ys=class e{static THROW_IF_NOT_FOUND=Qi;static NULL=new wa;static create(e,t){if(Array.isArray(e))return _s({name:``},t,e,``);{let t=e.name??``;return _s({name:t},e.parent,e.providers,t)}}static ɵprov=bi({token:e,providedIn:`any`,factory:()=>na(Sa)});static __NG_ELEMENT_ID__=-1},bs=new Di(``),xs=class{static __NG_ELEMENT_ID__=Cs;static __NG_ENV_ID__=e=>e},Ss=class extends xs{_lView;constructor(e){super(),this._lView=e}get destroyed(){return lo(this._lView)}onDestroy(e){let t=this._lView;return Oo(t,e),()=>Gee(t,e)}};function Cs(){return new Ss(zo())}var ws=new Di(``),Ts=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Gr(!1);debugTaskTracker=x(ws,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Pr(e=>{e.next(!1),e.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),this.debugTaskTracker?.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),this.debugTaskTracker?.remove(e),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static ɵprov=bi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Es=class extends Ur{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,eo()&&(this.destroyRef=x(xs,{optional:!0})??void 0,this.pendingTasks=x(Ts,{optional:!0})??void 0)}emit(e){let t=rn(null);try{super.next(e)}finally{rn(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 sr&&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 Ds(...e){}function Os(e){let t,n;function r(){e=Ds;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 ks(e){return queueMicrotask(()=>e()),()=>{e=Ds}}var As=`isAngularZone`,js=`isAngularZone_ID`,Ms=0,Ns=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Es(!1);onMicrotaskEmpty=new Es(!1);onStable=new Es(!1);onError=new Es(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new fi(908,!1);Zone.assertZonePatched();let a=this;a._nesting=0,a._outer=a._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(a._inner=a._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(a._inner=a._inner.fork(Zone.longStackTraceZoneSpec)),a.shouldCoalesceEventChangeDetection=!r&&n,a.shouldCoalesceRunChangeDetection=r,a.callbackScheduled=!1,a.scheduleInRootZone=i,Ls(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(As)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new fi(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new fi(909,!1)}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){let i=this._inner,a=i.scheduleEventTask(`NgZoneEvent: `+r,e,Ps,Ds,Ds);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)}},Ps={};function Fs(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 Is(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Os(()=>{e.callbackScheduled=!1,Rs(e),e.isCheckStableRunning=!0,Fs(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Rs(e)}function Ls(e){let t=()=>{Is(e)},n=Ms++;e._inner=e._inner.fork({name:`angular`,properties:{[As]:!0,[js]:n,[js+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Hs(s))return n.invokeTask(i,a,o,s);try{return zs(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Bs(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return zs(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Us(s)&&t(),Bs(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Rs(e),Fs(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 Rs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function zs(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Bs(e){e._nesting--,Fs(e)}var Vs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Es;onMicrotaskEmpty=new Es;onStable=new Es;onError=new Es;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 Hs(e){return Ws(e,`__ignore_ng_zone__`)}function Us(e){return Ws(e,`__scheduler_tick__`)}function Ws(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Gs=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},Ks=new Di(``,{factory:()=>{let e=x(Ns),t=x(Va),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Gs),n.handleError(r))})}}}),qs={provide:xa,useValue:()=>{x(Gs,{optional:!0})},multi:!0};function T(e,t){let[n,r,i]=hee(e,t?.equal),a=n;return a[nn],a.set=r,a.update=i,a.asReadonly=Js.bind(a),a}function Js(){let e=this[nn];if(e.readonlyFn===void 0){let t=()=>this();t[nn]=e,e.readonlyFn=t}return e.readonlyFn}var Ys=new Di(``,{factory:()=>Xs}),Xs=`ng`,Zs=new Di(``),Qs=new Di(``,{providedIn:`platform`,factory:()=>`unknown`}),$s=new Di(``,{factory:()=>x(bs).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),ec=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=tc}return e})();function tc(){return new ec(zo(),Vo())}var nc=class{},rc=new Di(``,{factory:()=>!0}),ic=new Di(``),ac=(()=>{class e{static ɵprov=bi({token:e,providedIn:`root`,factory:()=>new oc})}return e})(),oc=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}},sc=class{[nn];constructor(e){this[nn]=e}destroy(){this[nn].destroy()}};function E(e,t){let n=t?.injector??x(ys),r=t?.manualCleanup===!0?null:n.get(xs),i,a=n.get(ec,null,{optional:!0}),o=n.get(nc);return a===null?i=fc(e,n.get(ac),o):(i=dc(a.view,o,e),r instanceof Ss&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new sc(i)}var cc={...Fn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Jo(!1);try{In(this)}finally{Jo(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=rn(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],rn(e)}}},lc={...cc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(yn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},uc={...cc,consumerMarkedDirty(){this.view[2]|=8192,Do(this.view),this.notifier.notify(13)},destroy(){if(yn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function dc(e,t,n){let r=Object.create(uc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=pc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function fc(e,t,n){let r=Object.create(lc);return r.fn=pc(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 pc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function mc(e){return typeof e==`function`&&e[nn]!==void 0}function hc(e){return mc(e)&&typeof e.set==`function`}var gc=Symbol(`InputSignalNode#UNSET`),_c={...Nn,transformFn:void 0,applyValueToInputSignal(e,t){jn(e,t)}};function vc(e){return{toString:e}.toString()}var yc=(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})(yc||{}),bc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function xc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var Sc=null,Cc=(()=>{Sc=Tc;let e=()=>Tc;return e.ngInherit=!0,e})();function wc(){return Sc}function Tc(e){return e.type.prototype.ngOnChanges&&(e.setInput=Dc),Ec}function Ec(){let e=kc(this),t=e?.current;if(t){let n=e.previous;if(n===ya)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Dc(e,t,n,r,i){let a=this.declaredInputs[r],o=kc(e)||Ac(e,{previous:ya,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new bc(l&&l.currentValue,n,c===ya),xc(e,t,i,n)}var Oc=`__ngSimpleChanges__`;function kc(e){return Object.hasOwn(e,Oc)&&e[Oc]||null}function Ac(e,t){return e[Oc]=t}var jc=[],Mc=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,zc(o,a)):zc(o,a)}var Vc=-1,Hc=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 Uc(e){return!!(e.flags&8)}function Wc(e){return!!(e.flags&16)}function Gc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function $c(e,t){let n=Qc(e),r=t;for(;n>0;)r=r[14],n--;return r}var el=!0;function tl(e){let t=el;return el=e,t}var nl=255,rl=5,il=0,al={};function ol(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,Ni)&&(r=n[Ni]),r??=n[Ni]=il++;let i=r&nl,a=1<>rl)]|=a}function sl(e,t){let n=ll(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,cl(r.data,e),cl(t,null),cl(r.blueprint,null));let i=ul(e,t),a=e.injectorIndex;if(Xc(i)){let e=Zc(i),n=$c(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 cl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function ll(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function ul(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=Dl(i),r===null)return Vc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Vc}function dl(e,t,n){ol(e,t,n)}function fl(e,t,n){if(n&8||e!==void 0)return e;Wi(t,`NodeInjector`)}function pl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Yi(void 0);try{return i?i.get(t,r,n&8):Xi(t,r,n&8)}finally{Yi(a)}}return fl(r,t,n)}function ml(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=El(e,t,n,r,al);if(i!==al)return i}let i=hl(e,t,n,r,al);if(i!==al)return i}return pl(t,n,r,i)}function hl(e,t,n,r,i){let a=yl(n);if(typeof a==`function`){if(!ts(t,e,r))return r&1?fl(i,n,r):pl(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Wi(n);else return e}finally{os()}}else if(typeof a==`number`){let i=null,o=ll(e,t),s=Vc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?ul(e,t):t[o+8],s===Vc||!xl(r,!1)?o=-1:(i=t[1],o=Zc(s),t=$c(s,t)));o!==-1;){let e=t[1];if(bl(a,o,e.data)){let e=gl(o,t,n,i,r,c);if(e!==al)return e}s=t[o+8],s!==Vc&&xl(r,t[1].data[o+8]===c)&&bl(a,o,t)?(i=e,o=Zc(s),t=$c(s,t)):o=-1}}return i}function gl(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=_l(s,o,n,r==null?ao(s)&&el:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?al:vl(t,o,c,s,i)}function _l(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&&so(e)&&e.type===n)return c}return null}function vl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Hc){let s=a;if(s.resolving)throw Ui(``);let c=tl(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Yi(s.injectImpl):null;ts(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Nc(n,o[n],t)}finally{l!==null&&Yi(l),tl(c),s.resolving=!1,os()}}return a}function yl(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Ni)?e[Ni]:void 0;return typeof t==`number`?t>=0?t&nl:Cl:t}function bl(e,t,n){let r=1<>rl)]&r)}function xl(e,t){return!(e&2)&&!(e&1&&t)}var Sl=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return ml(this._tNode,this._lView,e,ra(n),t)}};function Cl(){return new Sl(Vo(),zo())}function wl(e){return vc(()=>{let t=e.prototype.constructor,n=t[Mi]||Tl(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let e=i[Mi]||Tl(i);if(e&&e!==n)return e;i=Object.getPrototypeOf(i)}return e=>new e})}function Tl(e){return yi(e)?()=>{let t=Tl(vi(e));return t&&t()}:sa(e)}function El(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!co(o);){let e=hl(a,o,n,r|2,al);if(e!==al)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,al,r);if(t!==al)return t}t=Dl(o),o=o[14]}a=t}return i}function Dl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Ol(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function kl(){return Al(Vo(),zo())}function Al(e,t){return new jl(ho(e,t))}var jl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=kl}return e})();function Ml(e){return e instanceof jl?e.nativeElement:e}function Nl(){return this._results[Symbol.iterator]()}var Pl=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 Ur}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=la(e);(this._changesDetected=!ca(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]=Nl};function Fl(e){return(e.flags&128)==128}var Il=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Il||{}),Ll=new Map,Rl=0;function zl(){return Rl++}function Bl(e){Ll.set(e[19],e)}function Vl(e){Ll.delete(e[19])}var Hl=`__ngContext__`;function Ul(e,t){no(t)?(e[Hl]=t[19],Bl(t)):e[Hl]=t}function Wl(e){return Kl(e[12])}function Gl(e){return Kl(e[4])}function Kl(e){for(;e!==null&&!ro(e);)e=e[4];return e}var ql=void 0;function Jl(e){ql=e}function Yl(){if(ql!==void 0)return ql;if(typeof document<`u`)return document;throw new fi(210,!1)}var Xl=!1,Zl=new Di(``,{factory:()=>Xl}),Ql=new WeakMap;function $l(e,t){if(typeof e!=`object`||!e)return;let n=Ql.get(e);n||(n=new WeakSet,Ql.set(e,n)),n.add(t)}function eu(e){return(e.flags&32)==32}var tu=()=>null;function nu(e,t,n=!1){return tu(e,t,n)}function ru(e,t){let n=e.contentQueries;if(n!==null){let r=rn(null);try{for(let r=0;r|^->||--!>|)/g,hu=`​$1​`;function gu(e){return e.replace(pu,e=>e.replace(mu,hu))}function _u(e,t){return e.createText(t)}function vu(e,t,n){e.setValue(t,n)}function yu(e,t){return e.createComment(gu(t))}function bu(e,t,n){return e.createElement(t,n)}function xu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function Su(e,t,n){e.appendChild(t,n)}function Cu(e,t,n,r,i){r===null?Su(e,t,n):xu(e,t,n,r,i)}function wu(e,t,n,r){e.removeChild(null,t,n,r)}function ite(e,t,n){e.setAttribute(t,`style`,n)}function ate(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function Tu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Gc(e,t,r),i!==null&&ate(e,t,i),a!==null&&ite(e,t,a)}function Eu(e){let t=ote();return t?t.sanitize(uo.URL,e)||``:lu(e,`URL`)?cu(e):fu(zi(e))}function ote(){let e=zo();return e&&e[10].sanitizer}function Du(e){return e.ownerDocument.defaultView}function Ou(e){return e.ownerDocument}function ste(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 ku=`ng-template`;function cte(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(ju(r))return!1;o=!0}}}}}return ju(r)||o}function ju(e){return!(e&1)}function dte(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!==``&&!ju(o)&&(t+=Nu(a,i),i=``),r=o,a||=!ju(r);n++}return i!==``&&(t+=Nu(a,i)),t}function _te(e){return e.map(gte).join(`,`)}function vte(e){let t=[],n=[],r=1,i=2;for(;r!1});function Lu(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function Ru(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function xte(e){let t=Ru(e,`transition-property`),n=Ru(e,`transition-duration`),r=Ru(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 Ste(e){let t=Ru(e,`animation-name`),n=Ru(e,`animation-delay`),r=Ru(e,`animation-duration`),i=Ru(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 zu(e,t){return e!==void 0&&e.duration>t.duration}function Bu(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function Vu(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 Cte(e,t){let n=getComputedStyle(e),r=Ste(n),i=xte(n),a=r.duration>i.duration?r:i;zu(t.get(e),a)||Bu(a)&&t.set(e,a)}function wte(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?Cte(e,t):Tte(e,t,r)}function Tte(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=Vu(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}zu(t.get(e),r)||Bu(r)&&t.set(e,r)}var Hu=new Set,Ete=!1,Dte=1,Uu=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function Ote(e){return e[9].get(bte,Ete)}function kte(e,t,n){let r=Gu.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else Gu.set(e,{classList:t,cleanupFns:n})}function Wu(e){let t=Gu.get(e);if(t){for(let e of t.cleanupFns)e();Gu.delete(e)}Ku.delete(e)}var Gu=new WeakMap,Ku=new WeakMap,qu=new WeakMap;function Ju(e){return e?e[14]??e:null}var Yu=new WeakSet;function Ate(e,t,n){let r=qu.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=Ju(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),Yu.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 jte(e,t,n){let r=Ju(n),i=qu.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):qu.set(e,[{el:t,declarationView:r}])}function Xu(e){let t=e[26]??={};return t.enter??=new Map}function Mte(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 Zu(e){return e.composedPath?e.composedPath()[0]:e.target}function Qu(e,t){let n=Ku.get(t);if(n===void 0)return!0;if(t!==Zu(e))return!1;let r=e.animation;if(r){let e=Vu(r);if(e!==void 0&&e+Dte{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=bi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),id=[0,1,2,3],ad=(()=>{class e{ngZone=x(Ns);scheduler=x(nc);errorHandler=x(Gs,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){x(ed,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Mc(yc.AfterRenderHooksStart),this.executing=!0;for(let e of id)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&&Mc(yc.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),Do(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($u.AFTER_NEXT_RENDER,e):e()}static ɵprov=bi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),od=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,a=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=a,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[25];e&&(this.view[25]=e.filter(e=>e!==this))}};function sd(e,t){let n=t?.injector??x(ys);return nd(`NgAfterNextRender`),Fte(e,n,t,!0)}function Pte(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Fte(e,t,n,r){let i=t.get(rd);i.impl??=t.get(ad);let a=t.get(ed,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(xs),s=t.get(ec,null,{optional:!0}),c=new od(i.impl,Pte(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var cd=new Di(``,{factory:()=>{let e=x(Va),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function ld(e,t,n){let r=e.get(cd);if(Array.isArray(t))for(let e of t)r.queue.add(e),n?.detachedLeaveAnimationFns?.push(e);else r.queue.add(t),n?.detachedLeaveAnimationFns?.push(t);r.scheduler&&r.scheduler(e)}function Ite(e,t){let n=e.get(cd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Lte(e,t){let n=e.get(cd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Rte(e){let t=e.get(cd);t.isScheduled||=(sd(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function zte(e){let t=e.get(cd);t.scheduler=Rte,t.scheduler(e)}function ud(e,t){for(let[n,r]of t)ld(e,r.animateFns)}function dd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&ud(r,i)}function fd(e,t,n,r){try{n.get(Sa)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Ite(n,i.enter.get(t.index).animateFns);let a=Bte(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];pd(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Hu.add(e[19]),ld(n,()=>Vte(e,t,i||void 0,a,r),i||void 0)}function Bte(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 Vte(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&&pd(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),Ute(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Hu.delete(e[19]),i(!0)})}else e&&Hu.delete(e[19]),i(!1)}function pd(e,t,n){if(t.type&12){let r=e[t.index];if(ro(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,Hu.delete(e[19])),n(!0)})}function md(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;ro(i)?c=i:no(i)&&(l=!0,i=i[0]);let u=po(i);e===0&&r!==null?(dd(s,r,a,n),o==null?Su(t,r,u):xu(t,r,u,o||null,!0)):e===1&&r!==null?(dd(s,r,a,n),xu(t,r,u,o||null,!0),Ate(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&jte(a,u,s),Yu.delete(u),fd(s,a,n,e=>{if(Yu.has(u)){Yu.delete(u);return}wu(t,u,l,e)})):e===3&&(Yu.delete(u),fd(s,a,n,()=>{t.destroyNode(u)})),c!=null&&ene(t,e,n,c,a,r,o)}}function Wte(e,t){hd(e,t),t[0]=null,t[5]=null}function Gte(e,t,n,r,i,a){r[0]=i,r[5]=t,Ed(e,r,n,1,i,a)}function hd(e,t){t[10].changeDetectionScheduler?.notify(9),Ed(e,t,t[11],2,null,null)}function Kte(e){let t=e[12];if(!t)return vd(e[1],e);for(;t;){let n=null;if(no(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)no(t)&&vd(t[1],t),t=t[3];t===null&&(t=e),no(t)&&vd(t[1],t),n=t&&t[4]}t=n}}function gd(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function _d(e,t){if(lo(t))return;let n=t[11];n.destroyNode&&Ed(e,t,n,3,null,null),Kte(t)}function vd(e,t){if(lo(t))return;let n=rn(null);try{t[2]&=-129,t[2]|=256,t[24]&&yn(t[24]),Jte(e,t),qte(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&ro(t[3])){n!==t[3]&&gd(n,t);let r=t[18];r!==null&&r.detachView(e)}Vl(t)}finally{rn(n)}}function qte(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&&Ld(e,t,27,!1),Mc(o?yc.TemplateUpdateStart:yc.TemplateCreateStart,i,n),n(r,i)}finally{ls(a),Mc(o?yc.TemplateUpdateEnd:yc.TemplateCreateEnd,i,n)}}function Vd(e,t,n){Jd(e,t,n),(n.flags&64)==64&&Yd(e,t,n)}function Hd(e,t,n=ho){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a=s&&i<=c){let o=t.data[i],s=r[e+1];zd(o,n[i],s,a),l=!0}else if(i>c)break}}return o!==null&&Object.hasOwn(r.inputs,i)&&(zd(r,n[o],i,a),l=!0),l}function sf(e,t){let n=yo(t,e),r=n[1];cf(r,n);let i=n[0];i!==null&&n[6]===null&&(n[6]=nu(i,n[9])),Mc(yc.ComponentStart);try{lf(r,n,n[8])}finally{Mc(yc.ComponentEnd,n[8])}}function cf(e,t){for(let n=t.length;n{Do(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function xf(e){let t=e[24]??Object.create(Sf);return t.lView=e,t}var Sf={...on,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=ko(e.lView);for(;t&&!Cf(t[1]);)t=ko(t);t&&wo(t)},consumerOnSignalRead(){this.lView[24]=this}};function Cf(e){return e.type!==2}function wf(e){if(e[23]===null)return;let t=!0;for(;t;){let n=!1;for(let t of e[23])if(t.dirty&&(n=!0,t.zone===null||Zone.current===t.zone?t.run():t.zone.run(()=>t.run()),e[23]===null))return;t=n&&!!(e[2]&8192)}}var Tf=100;function Ef(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Df(e,t)}finally{n.end?.()}}function Df(e,t){let n=qo();try{Jo(!0),Nf(e,t);let n=0;for(;To(e);){if(n===Tf)throw new fi(103,!1);n++,Nf(e,1)}}finally{Jo(n)}}function Of(e,t,n,r){if(lo(t))return;let i=t[2];ns(t);let a=!0,o=null,s=null;Cf(e)?(s=_f(t),o=mn(s)):an()===null?(a=!1,s=xf(t),o=mn(s)):t[24]&&=(yn(t[24]),null);try{Co(t),Xee(e.bindingStartIndex),n!==null&&Bd(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Fc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Ic(t,n,0,null),Lc(t,0)}if(Af(t),wf(t),kf(t,0),e.contentQueries!==null&&ru(e,t),a){let n=e.contentCheckHooks;n!==null&&Fc(t,n)}else{let n=e.contentHooks;n!==null&&Ic(t,n,1),Lc(t,1)}Ff(e,t);let o=e.components;o!==null&&Pf(t,o,0);let s=e.viewQuery;if(s!==null&&iu(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Fc(t,n)}else{let n=e.viewHooks;n!==null&&Ic(t,n,2),Lc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}hf(t),t[2]&=-73}catch(e){throw Do(t),e}finally{s!==null&&(gn(s,o),a&&yf(s)),ss()}}function kf(e,t){for(let n=Wl(e);n!==null;n=Gl(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=fa(e,10+t);Wte(r[1],r);let o=a[18];o!==null&&o.detachView(a[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function Hf(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(Vf(e,n),fa(t,n))}this._attachedToViewContainer=!1}_d(this._lView[1],this._lView)}onDestroy(e){Oo(this._lView,e)}markForCheck(){If(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){Eo(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Ef(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new fi(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=co(this._lView),t=this._lView[16];t!==null&&!e&&gd(t,this._lView),hd(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new fi(902,!1);this._appRef=e;let t=co(this._lView),n=this._lView[16];n!==null&&!t&&Uf(n,this._lView),Eo(this._lView)}},Gf=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=Kf;constructor(e,t,n){this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){return new Wf(df(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function Kf(){return qf(Vo(),zo())}function qf(e,t){return e.type&4?new Gf(t,e,Al(e,t)):null}function Jf(e,t,n,r,i){let a=e.data[t];if(a===null)a=Yf(e,t,n,r,i),Zee()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Yee();a.injectorIndex=e===null?-1:e.injectorIndex}return Uo(a,!0),a}function Yf(e,t,n,r,i){let a=Ho(),o=Wo(),s=o?a:a&&a.parent,c=e.data[t]=Zf(e,s,n,t,r,i);return Xf(e,c,a,o),c}function Xf(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function Zf(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Io()&&(s|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:s,providerIndexes:0,value:i,namespace:ps(),attrs:a,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function Qf(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?$f(e,n):r.push(e);e[6]=r}function $f(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,tp=()=>null;function np(e,t){return ep(e,t)}function rp(e,t,n){return tp(e,t,n)}var ip=class{},ap=class{},op=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>sp()};function sp(){let e=zo(),t=yo(Vo().index,e);return(no(t)?t:e)[11]}var cp=(()=>{class e{static ɵprov=bi({token:e,providedIn:`root`,factory:()=>null})}return e})();function lp(e){return e.debugInfo?.className||e.type.name||null}var up={},dp=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,up,n);return r!==up||t===up?r:this.parentInjector.get(e,t,n)}};function fp(e,t,n){return e[t]=n}function pp(e,t){return e[t]}function mp(e,t,n){if(n===Pu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function hp(e,t,n,r){let i=mp(e,t,n);return mp(e,t+1,r)||i}function gp(e,t,n,r,i){let a=hp(e,t,n,r);return mp(e,t+2,i)||a}function _p(e,t,n,r,i,a){let o=hp(e,t,n,r);return hp(e,t+2,i,a)||o}function vp(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&$l(i,a),If(ao(e)?yo(e.index,t):t,5);let o=t[8],s=yp(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=yp(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function yp(e,t,n,r){let i=rn(null);try{return Mc(yc.OutputStart,t,n),n(r)!==!1}catch(t){return rf(e,t),!1}finally{Mc(yc.OutputEnd,t,n),rn(i)}}function bp(e,t,n,r,i,a,o,s){let c=oo(e),l=!1,u=null;if(!r&&c&&(u=Sp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=ho(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);xp(a)||Cp(r?t=>r(po(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function xp(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function Sp(e,t,n,r){let i=e.cleanup;if(i!=null)for(let e=0;er?n[r]:null}typeof a==`string`&&(e+=2)}return null}function Cp(e,t,n,r,i,a,o){let s=t.firstCreatePass?jo(t):null,c=Ao(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function wp(e,t,n,r,i){let a=null,o=null,s=null,c=!1,l=e.directiveToIndex.get(n.type);if(typeof l==`number`?a=l:[a,o,s]=l,o!==null&&s!==null&&e.hostDirectiveOutputs&&Object.hasOwn(e.hostDirectiveOutputs,r)){let n=e.hostDirectiveOutputs[r];for(let a=0;a=o&&l<=s)c=!0,Tp(e,t,l,n[a+1],r,i);else if(l>s)break}}return Object.hasOwn(n.outputs,r)&&(c=!0,Tp(e,t,a,r,r,i)),c}function Tp(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Cp(e.index,s,t,i,a,c,!0)}function Ep(){Dp()}function Dp(){let e=zo(),t=Bo(),n=Vo();if(t.firstCreatePass&&Np(t,n),n.controlDirectiveIndex===-1)return;nd(`NgSignalForms`);let r=e[n.controlDirectiveIndex];t.data[n.controlDirectiveIndex].controlDef.create(r,new Ap(e,t,n))}function Op(){kp()}function kp(){let e=zo(),t=Bo(),n=us();if(n.controlDirectiveIndex===-1)return;let r=t.data[n.controlDirectiveIndex].controlDef,i=e[n.controlDirectiveIndex];r.update(i,new Ap(e,t,n))}var Ap=class{lView;tView;tNode;hasPassThrough;constructor(e,t,n){this.lView=e,this.tView=t,this.tNode=n,this.hasPassThrough=!!(n.flags&4096)}get customControl(){return this.tNode.customControlIndex===-1?void 0:this.lView[this.tNode.customControlIndex]}get nativeElement(){return ho(this.tNode,this.lView)}get descriptor(){return`<${this.tNode.value}>`}listenToCustomControlOutput(e,t){let n=this.tView.data[this.tNode.customControlIndex];wp(this.tNode,this.lView,n,e,vp(this.tNode,this.lView,t))}listenToCustomControlModel(e){let t=this.tNode.flags&1024?`valueChange`:`checkedChange`,n=this.tView.data[this.tNode.customControlIndex];wp(this.tNode,this.lView,n,t,vp(this.tNode,this.lView,e))}listenToDom(e,t){bp(this.tNode,this.tView,this.lView,void 0,this.lView[11],e,t,vp(this.tNode,this.lView,t))}setInputOnDirectives(e,t,n){let r=this.tNode.inputs?.[e],i=this.tNode.hostDirectiveInputs?.[e];if(!r&&!i)return!1;let a=!1;if(r)for(let i of r){if(i===this.tNode.controlDirectiveIndex)continue;let r=this.lView[i],o=this.tView.data[i];(!n||n(Mp(r,o,e)))&&(zd(o,r,e,t),a=!0)}if(i)for(let r=0;r0;){let e=n.shift();if(typeof e!=`function`){for(let n in e.inputs)t[e.inputs[n]]=!0;let r=jp(e.directive);r!==null&&n.push(...r);continue}for(let r of e()){if(typeof r==`function`)continue;if(r.inputs)for(let e=0;e1){t.flags|=4096;return}Pp(e,t)}function Pp(e,t){for(let n=t.directiveStart;n{let r=t.hostDirectiveInputs[e],i=t.hostDirectiveOutputs[e+`Change`];if(!r||!i)return!1;for(let e=0;e=i&&a<=o)return t.flags|=n,t.customControlIndex=r,!0}}return!1};if(e(`value`,1024)||e(`checked`,2048))return}}function Fp(e,t){return Ip(e,t)&&Lp(e,t+`Change`)}function Ip(e,t){return t in e.inputs}function Lp(e,t){return t in e.outputs}var Rp=Symbol(`BINDING`),zp=new Di(``);function Bp(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,a=0;if(t!==null)for(let e=0;e0&&(n.directiveToIndex=new Map);for(let c=0;c0;){let n=e[--t];if(typeof n==`number`&&n<0)return n}return 0}function em(e,t,n){if(n){if(t.exportAs)for(let r=0;r{let[n,r,i]=e[t],a={propName:n,templateName:t,isSignal:(r&Rd.SignalBased)!==0};return i&&(a.transform=i),a})}function cm(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function lm(e,t,n){let r=t instanceof Va?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new dp(n,r):n}function um(e){let t=e.get(ap,null);if(t===null)throw new fi(407,!1);return{rendererFactory:t,sanitizer:e.get(cp,null),changeDetectionScheduler:e.get(nc,null),ngReflect:!1,tracingService:e.get(ed,null,{optional:!0})}}function dm(e,t,n){let r=pm(e);return bu(t,r,r===`svg`?`svg`:r===`math`?fo:n)}function fm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new fi(905,!1)}function pm(e){return(e.selectors[0][0]||`div`).toLowerCase()}var mm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=sm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=cm(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=_te(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Mc(yc.DynamicComponentStart);let s=rn(null);try{let s=this.componentDef,c=lm(s,r||this.ngModule,e),l=um(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(lp(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{rn(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=hm(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Ud(l,r,s.encapsulation,t):dm(s,l,o??null);fm(u);let d=t.get(zp,null),f=gm(u,()=>t.get(bs,null)??Yl());d&&d.addHost(f);let p=a?.some(vm)||i?.some(e=>typeof e!=`function`&&e.bindings.some(vm)),m=Md(null,c,null,512|Pd(s),null,null,e,l,t,null,nu(u,t,!0));d&&am&&f instanceof ShadowRoot&&Oo(m,()=>{d.removeHost(f)}),m[27]=u,ns(m);let ee=null;try{let e=nm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);Tu(l,u,e),Ul(u,m),Vd(c,m,e),au(c,e,m),rm(c,e),n!==void 0&&bm(e,this.ngContentSelectors,n),ee=yo(e.index,m),m[8]=ee[8],lf(c,m,null)}catch(e){throw ee!==null&&Vl(ee),Vl(m),e}finally{Mc(yc.DynamicComponentEnd),ss()}return new ym(this.componentType,m,!!p)}};function hm(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:vte(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[Rp].requiredVars,e.create&&(e.targetIdx=0,(a??=[]).push(e)),e.update&&(e.targetIdx=0,(o??=[]).push(e));if(r)for(let e=0;e{if(n&1&&e)for(let t of e)t.create();if(n&2&&t)for(let e of t)e.update()}}function vm(e){let t=e[Rp].kind;return t===`input`||t===`twoWay`}var ym=class extends ip{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=go(t[1],27),this.location=Al(this._tNode,t),this.instance=yo(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Wf(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView;af(n,r[1],r,e,t),this.previousInputValues.set(e,t),If(yo(n.index,r),1)}get injector(){return new Sl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function bm(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=Sm}return e})();function Sm(){return Em(Vo(),zo())}var Cm=class e extends xm{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Al(this._hostTNode,this._hostLView)}get injector(){return new Sl(this._hostTNode,this._hostLView)}get parentInjector(){let e=ul(this._hostTNode,this._hostLView);if(Xc(e)){let t=$c(e,this._hostLView),n=Zc(e),r=t[1].data[n+8];return new Sl(r,t)}return new Sl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=wm(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,n){let r,i;typeof n==`number`?r=n:n!=null&&(r=n.index,i=n.injector);let a=np(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,ff(this._hostTNode,a)),o}createComponent(e,t,n,r,i,a,o){let s,c=t||{};s=c.index,n=c.injector,r=c.projectableNodes,i=c.environmentInjector||c.ngModuleRef,a=c.directives,o=c.bindings;let l=new mm(Fi(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Va,null);e&&(i=e)}let d=Fi(l.componentType??{}),f=np(this._lContainer,d?.id??null),p=f?.firstChild??null,m=l.create(u,r,p,i,a,o,this._getHostElementNamespace());return this.insertImpl(m.hostView,s,ff(this._hostTNode,f)),m}_getHostElementNamespace(){if(this._hostTNode.type&2){let e=this._hostTNode.parent??this._hostLView[5];return e!==null&&e.type&2&&typeof e.value==`string`&&e.value.toLowerCase()===`foreignobject`?null:e?.namespace??null}return this._hostTNode.namespace}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(t,n,r){let i=t._lView;if(xo(i)){let n=this.indexOf(t);if(n!==-1)this.detach(n);else{let n=i[3],r=new e(n,n[5],n[3]);r.detach(r.indexOf(t))}}let a=this._adjustIndex(n),o=this._lContainer;return zf(o,i,a,r),t.attachToViewContainerRef(),da(Tm(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=wm(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Vf(this._lContainer,t);n&&(fa(Tm(this._lContainer),t),_d(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Vf(this._lContainer,t);return n&&fa(Tm(this._lContainer),t)!=null?new Wf(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function wm(e){return e[8]}function Tm(e){return e[8]||=[]}function Em(e,t){let n,r=t[e.index];return ro(r)?n=r:(n=Lf(r,t,null,e),t[e.index]=n,Id(t,n)),Om(n,t,e,r),new Cm(n,e,t)}function Dm(e,t){let n=e[11],r=n.createComment(``),i=ho(t,e);return xu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var Om=jm,km=()=>!1;function Am(e,t,n){return km(e,t,n)}function jm(e,t,n,r){if(e[7])return;let i;i=n.type&8?po(r):Dm(t,n),e[7]=i}var Mm=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Nm=class e{queries;constructor(e=[]){this.queries=e}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries===null?n.length:t.contentQueries[0],i=[];for(let e=0;e0)r.push(o[e/2]);else{let i=a[e+1],o=t[-n];for(let e=10;ee.trim())}function qm(e,t,n){e.queries===null&&(e.queries=new Fm),e.queries.track(new Im(t,n))}function Jm(e,t){return e.queries.getByIndex(t)}function Ym(e,t){let n=e[1],r=Jm(n,t);return r.crossesNgTemplate?Hm(n,e,t,[]):Vm(n,e,r,t)}function Xm(e,t,n){let r,i=Tn(()=>{r._dirtyCounter();let n=eh(r,e);if(t&&n===void 0)throw new fi(-951,!1);return n});return r=i[nn],r._dirtyCounter=T(0),r._flatValue=void 0,i}function Zm(e){return Xm(!0,!1,e)}function Qm(e){return Xm(!0,!0,e)}function $m(e,t){let n=e[nn];n._lView=zo(),n._queryIndex=t,n._queryList=Um(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function eh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:ba;let i=Um(n,r),a=Ym(n,r);return i.reset(a,Ml),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function th(e){return!!e&&typeof e.then==`function`}function nh(e){return!!e&&typeof e.subscribe==`function`}var rh=class{},ih=class extends rh{injector;instance=null;constructor(e){super();let t=new Ha([...e.providers,{provide:rh,useValue:this}],e.parent||Ba(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function ah(e,t,n=null){return new ih({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var oh=(()=>{class e{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let t=Ea(!1,e.type),n=t.length>0?ah([t],this._injector,``):null;this.cachedInjectors.set(e,n)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static ɵprov=bi({token:e,providedIn:`environment`,factory:()=>new e(na(Va))})}return e})();function O(e){return vc(()=>{let t=fh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Il.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(oh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||ou.Emulated,styles:e.styles||ba,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&nd(`NgStandalone`),ph(n);let r=e.dependencies;return n.directiveDefs=mh(r,sh),n.pipeDefs=mh(r,Li),n.id=hh(n),n})}function sh(e){return Fi(e)||Ii(e)}function ch(e,t){if(e==null)return ya;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=Rd.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function lh(e){if(e==null)return ya;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function uh(e){return vc(()=>{let t=fh(e);return ph(t),t})}function dh(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function fh(e){let t={};return{type:e.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||ya,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||ba,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:ch(e.inputs,t),outputs:lh(e.outputs),debugInfo:null}}function ph(e){e.features?.forEach(t=>t(e))}function mh(e,t){return e?()=>{let n=typeof e==`function`?e():e,r=[];for(let e of n){let n=t(e);n!==null&&r.push(n)}return r}:null}function hh(e){let t=0,n=typeof e.consts==`function`?``:e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let e of r.join(`|`))t=Math.imul(31,t)+e.charCodeAt(0)<<0;return t+=2147483648,`c`+t}var gh=new Di(``),_h=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=x(gh,{optional:!0})??[];injector=x(ys);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=$a(this.injector,t);if(th(n))e.push(n);else if(nh(n)){let t=new Promise((e,t)=>{n.subscribe({complete:e,error:t})});e.push(t)}}let t=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{t()}).catch(e=>{this.reject(e)}),e.length===0&&t(),this.initialized=!0}static ɵfac=function(t){return new(t||e)};static ɵprov=Ol({token:e,factory:e.ɵfac})}return e})();function vh(e){return t=>{t.controlDef={create:(e,t)=>{e?.ɵngControlCreate(t)},update:(e,t)=>{e?.ɵngControlUpdate?.(t)},passThroughInput:e}}}function yh(e){return Object.getPrototypeOf(e.prototype).constructor}function bh(e){let t=yh(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let i,a=Object.hasOwn(t,ki)?t[ki]:void 0,o=Object.hasOwn(t,Ai)?t[Ai]:void 0;if(so(e))i=a??o;else{if(a)throw new fi(903,!1);i=o}if(i){if(n){r.push(i);let t=e;t.inputs=Ch(e.inputs),t.declaredInputs=Ch(e.declaredInputs),t.outputs=Ch(e.outputs);let n=i.hostBindings;n&&Eh(e,n);let a=i.viewQuery,o=i.contentQueries;if(a&&wh(e,a),o&&Th(e,o),xh(e,i),Hee(e.outputs,i.outputs),so(i)&&i.data.animation){let t=e.data;t.animation=(t.animation||[]).concat(i.data.animation)}}let t=i.features;if(t)for(let r=0;r=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=Jc(i.hostAttrs,n=Jc(n,i.hostAttrs))}}function Ch(e){return e===ya?{}:e===ba?[]:e}function wh(e,t){let n=e.viewQuery;e.viewQuery=n?(e,r)=>{t(e,r),n(e,r)}:t}function Th(e,t){let n=e.contentQueries;e.contentQueries=n?(e,r,i)=>{t(e,r,i),n(e,r,i)}:t}function Eh(e,t){let n=e.hostBindings;e.hostBindings=n?(e,r)=>{t(e,r),n(e,r)}:t}function Dh(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=Jc(e.mergedAttrs,e.attrs);let t=e.tView=kd(2,e,i,a,o,n.directiveRegistry,n.pipeRegistry,null,n.schemas,n.consts,null);n.queries!==null&&(n.queries.template(n,e),t.queries=n.queries.embeddedTView(e))}s&&(e.flags|=s),Uo(e,!1);let c=jh(n,t,e,r);hs()&&xd(n,t,c,e),Ul(c,t);let l=Lf(c,t,c,e);t[r+27]=l,Id(t,l),Am(l,e,t)}function Oh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=Jf(t,d,4,o||null,s||null),Fo()&&Hp(t,e,f,So(t.consts,l),Zd),Pc(t,f)):f=t.data[d],Dh(f,e,t,n,r,i,a,c),oo(f)&&Vd(t,e,f),l!=null&&Hd(e,f,u),f}function kh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Jf(t,d,4,o||null,s||null),l!=null){let e=So(t.consts,l);f.localNames=[];for(let t=0;t{throw new fi(600,``)})}var Ih=10,Lh=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=x(Ks);afterRenderManager=x(rd);zonelessEnabled=x(rc);rootEffectScheduler=x(ac);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Ur;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=x(Ts);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(ui(e=>!e))}constructor(){x(ed,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=x(Va);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=ys.NULL){return this._injector.get(Ns).run(()=>{if(Mc(yc.BootstrapComponentStart),!this._injector.get(_h).done)throw new fi(405,``);let r=Fi(e),i=this._injector.get(rh),a=new mm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=Rh(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Nh,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),zh(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Mc(yc.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Mc(yc.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run($u.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Mc(yc.ChangeDetectionEnd),new fi(101,!1);let e=rn(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,rn(e),this.afterTick.next(),Mc(yc.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(ap,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++To(e))){this.dirtyFlags|=2;return}this.dirtyFlags&=-8}attachView(e){let t=e;this._views.push(t),t.attachToAppRef(this)}detachView(e){let t=e;zh(this._views,t),t.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(e){this.internalErrorHandler(e)}this.components.push(e),this._injector.get(Ph,[]).forEach(t=>t(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>zh(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new fi(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static ɵfac=function(t){return new(t||e)};static ɵprov=Ol({token:e,factory:e.ɵfac})}return e})();function Rh(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function zh(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function k(e,t,n,r){let i=zo();return mp(i,Zo(),t)&&(Bo(),Qd(us(),i,e,t,n,r)),k}function Bh(e){if(nd(`NgAnimateEnter`),!Uu)return Bh;let t=zo();if(Ote(t))return Bh;let n=Vo(),r=t[9].get(Ns);return Nte(Xu(t),n,()=>Vh(t,n,e,r)),zte(t[9]),ud(t[9],Xu(t)),Bh}function Vh(e,t,n,r){let i=ho(t,e),a=e[11],o=Mte(n),s=[],c=!1,l=e=>{if(Zu(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{Zu(e)===i&&(Qu(e,i)&&(c=!0),Hh(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),kte(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(wte(i,Ku,Uu),!Ku.has(i))){for(let e of o)a.removeClass(i,e);Wu(i)}})})}}function Hh(e,t,n){let r=Gu.get(t);if(Zu(e)===t&&r&&Qu(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);Wu(t)}}var Uh=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let e=this.detach(n);this.attach(n,i),this.attach(r,e)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function Wh(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Gh(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){rn(r);let c=t.length-1;for(rn(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=Wh(o,r,o,l,n);if(u!==0){u<0&&e.updateValue(o,l),o++;continue}let d=e.at(s),f=t[c],p=Wh(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),ee=n(s,d),h=n(o,l);if(Object.is(h,ee)){let t=n(c,f);Object.is(t,m)?(e.swap(o,s),e.updateValue(s,f),c--,s--):e.move(s,o),e.updateValue(o,l),o++;continue}if(i??=new Yh,a??=Jh(e,o,s,n),Kh(e,i,o,h))e.updateValue(o,l),o++,s++;else if(a.has(h))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)qh(e,i,n,o,t[o]),o++}else if(t!=null){rn(r);let c=t[Symbol.iterator]();rn(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=Wh(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new Yh,a??=Jh(e,o,s,n);let u=n(o,r);if(Kh(e,i,o,u))e.updateValue(o,r),o++,s++,l=c.next();else if(!a.has(u))e.attach(o,e.create(o,r)),o++,s++,l=c.next();else{let r=n(o,t);i.set(r,e.detach(o)),s--}}}for(;!l.done;)qh(e,i,n,e.length,l.value),l=c.next()}for(;o<=s;)e.destroy(e.detach(s--));i?.forEach(t=>{e.destroy(t)})}function Kh(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function qh(e,t,n,r,i){if(Kh(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function Jh(e,t,n,r){let i=new Set;for(let a=t;a<=n;a++)i.add(r(a,e.at(a)));return i}var Yh=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function A(e,t,n,r,i,a,o,s){nd(`NgControlFlow`);let c=zo(),l=Bo();return kh(c,l,e,t,n,r,i,So(l.consts,a),256,o,s),Xh}function Xh(e,t,n,r,i,a,o,s){nd(`NgControlFlow`);let c=zo(),l=Bo();return kh(c,l,e,t,n,r,i,So(l.consts,a),512,o,s),Xh}function j(e,t){nd(`NgControlFlow`);let n=zo(),r=Zo(),i=n[r]===Pu?-1:n[r],a=i===-1?void 0:ng(n,27+i);if(mp(n,r,e)){let r=rn(null);try{if(a!==void 0&&Bf(a,0),e!==-1){let r=27+e,i=ng(n,r),a=sg(n[1],r),o=rp(i,a,n);zf(i,df(n,a,t,{dehydratedView:o}),0,ff(a,o))}}finally{rn(r)}}else if(a!==void 0){let e=Rf(a,0);e!==void 0&&(e[8]=t)}}var Zh=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-10}};function Qh(e){return e}function $h(e,t){return t}var eg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function M(e,t,n,r,i,a,o,s,c,l,u,d,f){nd(`NgControlFlow`);let p=zo(),m=Bo(),ee=c!==void 0,h=zo(),g=new eg(ee,s?o.bind(h[15][8]):o);h[27+e]=g,kh(p,m,e+1,t,n,r,i,So(m.consts,a),256),ee&&kh(p,m,e+2,c,l,u,d,So(m.consts,f),512)}var tg=class extends Uh{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-10}at(e){return this.getLView(e)[8].$implicit}attach(e,t){let n=t[6];this.needsIndexUpdate||=e!==this.length,zf(this.lContainer,t,e,ff(this.templateTNode,n)),rg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,ig(this.lContainer,e),ag(this.lContainer,e)}create(e,t){let n=np(this.lContainer,this.templateTNode.tView.ssrId);return df(this.hostLView,this.templateTNode,new Zh(this.lContainer,t,e),{dehydratedView:n})}destroy(e){_d(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];Lte(e,r),Hu.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function ig(e,t){if(e.length<=10)return;let n=e[10+t],r=n?n[26]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function ag(e,t){return Vf(e,t)}function og(e,t){return Rf(e,t)}function sg(e,t){return go(e,t)}function P(e,t,n){let r=zo();return mp(r,Zo(),t)&&(Bo(),Gd(us(),r,e,t,r[11],n)),P}function cg(e,t,n,r,i){af(t,e,n,i?`class`:`style`,r)}function F(e,t,n,r){let i=zo(),a=i[1],o=e+27,s=a.firstCreatePass?nm(o,i,2,t,Zd,Fo(),n,r):a.data[o];if(ao(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(lp(o),()=>(lg(e,t,i,s,r),F))}}return lg(e,t,i,s,r),F}function lg(e,t,n,r,i){if(tf(r,n,e,t,dg),oo(r)){let e=n[1];Vd(e,n,r),au(e,r,n)}i!=null&&Hd(n,r)}function I(){let e=Bo(),t=nf(Vo());return e.firstCreatePass&&rm(e,t),Lo(t)&&Ro(),Po(),t.classesWithoutHost!=null&&Uc(t)&&cg(e,t,zo(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Wc(t)&&cg(e,t,zo(),t.stylesWithoutHost,!1),I}function L(e,t,n,r){return F(e,t,n,r),I(),L}function R(e,t,n,r){let i=zo(),a=i[1],o=e+27,s=a.firstCreatePass?im(o,a,2,t,n,r):a.data[o];return tf(s,i,e,t,dg),r!=null&&Hd(i,s),R}function z(){return Lo(nf(Vo()))&&Ro(),Po(),z}function ug(e,t,n,r){return R(e,t,n,r),z(),ug}var dg=(e,t,n,r,i)=>(gs(!0),bu(t[11],r,ps()));function fg(e,t,n){let r=zo(),i=r[1],a=e+27,o=i.firstCreatePass?nm(a,r,8,`ng-container`,Zd,Fo(),t,n):i.data[a];if(tf(o,r,e,`ng-container`,hg),oo(o)){let e=r[1];Vd(e,r,o),au(e,o,r)}return n!=null&&Hd(r,o),fg}function pg(){let e=Bo(),t=nf(Vo());return e.firstCreatePass&&rm(e,t),pg}function mg(e,t,n){return fg(e,t,n),pg(),mg}var hg=(e,t,n,r,i)=>(gs(!0),yu(t[11],``));function B(){return zo()}function V(e,t,n){let r=zo();return mp(r,Zo(),t)&&(Bo(),Kd(us(),r,e,t,r[11],n)),V}var gg=void 0;function _g(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var vg=[`en`,[[`a`,`p`],[`AM`,`PM`]],[[`AM`,`PM`]],[[`S`,`M`,`T`,`W`,`T`,`F`,`S`],[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`]],gg,[[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]],gg,[[`B`,`A`],[`BC`,`AD`],[`Before Christ`,`Anno Domini`]],0,[6,0],[`M/d/yy`,`MMM d, y`,`MMMM d, y`,`EEEE, MMMM d, y`],[`h:mm a`,`h:mm:ss a`,`h:mm:ss a z`,`h:mm:ss a zzzz`],[`{1}, {0}`,gg,gg,gg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,_g],yg=Object.create(null);function bg(e){let t=Cg(e),n=xg(t);if(n)return n;let r=t.split(`-`)[0];if(n=xg(r),n)return n;if(r===`en`)return vg;throw new fi(701,!1)}function xg(e){if(!(e in yg)){let t=Zi.ng&&Zi.ng.common&&Zi.ng.common.locales&&Zi.ng.common.locales[e];return t!==void 0&&(yg[e]=t),t}return yg[e]}var Sg={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencyCode:15,CurrencySymbol:16,CurrencyName:17,Currencies:18,Directionality:19,PluralCase:20,ExtraData:21};function Cg(e){return e.toLowerCase().replace(/_/g,`-`)}var wg=`en-US`;function Tg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function H(e,t,n){let r=zo(),i=Bo(),a=Vo();return Eg(i,r,r[11],a,e,t,n),H}function U(e,t,n){let r=zo(),i=Bo(),a=Vo();return(a.type&3||n)&&bp(a,i,r,n,r[11],e,t,vp(a,r,t)),U}function Eg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=vp(r,t,a),bp(r,e,t,o,n,i,a,c)&&(s=!1)),s){let e=r.outputs?.[i],n=r.hostDirectiveOutputs?.[i];if(n&&n.length)for(let e=0;e>17&32767}function Ig(e){return(e&2)==2}function Lg(e,t){return e&131071|t<<17}function Rg(e){return e|2}function zg(e){return(e&131068)>>2}function Bg(e,t){return e&-131069|t<<2}function Vg(e){return(e&1)==1}function Hg(e){return e|1}function Ug(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=Fg(o),c=zg(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||_a(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=Fg(e[s+1]);e[r+1]=Pg(t,s),t!==0&&(e[t+1]=Bg(e[t+1],r)),e[s+1]=Lg(e[s+1],r)}else e[r+1]=Pg(s,0),s!==0&&(e[s+1]=Bg(e[s+1],r)),s=r}else e[r+1]=Pg(c,0),s===0?s=r:e[c+1]=Bg(e[c+1],r),c=r;l&&(e[r+1]=Rg(e[r+1])),Gg(e,u,r,!0),Gg(e,u,r,!1),Wg(t,u,e,r,a),o=Pg(s,c),a?t.classBindings=o:t.styleBindings=o}function Wg(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&_a(a,t)>=0&&(n[r+1]=Hg(n[r+1]))}function Gg(e,t,n,r){let i=e[n+1],a=t===null,o=r?Fg(i):zg(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];Kg(n,t)&&(s=!0,e[o+1]=r?Hg(i):Rg(i)),o=r?Fg(i):zg(i)}s&&(e[n+1]=r?Rg(i):Hg(i))}function Kg(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?_a(e,t)>=0:!1}var qg={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Jg(e){return e.substring(qg.key,qg.keyEnd)}function Yg(e){return Zg(e),Xg(e,Qg(e,0,qg.textEnd))}function Xg(e,t){let n=qg.textEnd;return n===t?-1:(t=qg.keyEnd=$g(e,qg.key=t,n),Qg(e,t,n))}function Zg(e){qg.key=0,qg.keyEnd=0,qg.value=0,qg.valueEnd=0,qg.textEnd=e.length}function Qg(e,t,n){for(;t32;)t++;return t}function e_(e,t,n){return r_(e,t,n,!1),e_}function G(e,t){return r_(e,t,null,!0),G}function t_(e){i_(m_,n_,e,!0)}function n_(e,t){for(let n=Yg(t);n>=0;n=Xg(t,n))ha(e,Jg(t),!0)}function r_(e,t,n,r){let i=zo(),a=Bo(),o=Qo(2);if(a.firstUpdatePass&&o_(a,e,o,r),t!==Pu&&mp(i,o,t)){let s=a.data[cs()];g_(a,s,i,i[11],e,i[o+1]=y_(t,n),r,o)}}function i_(e,t,n,r){let i=Bo(),a=Qo(2);i.firstUpdatePass&&o_(i,null,a,r);let o=zo();if(n!==Pu&&mp(o,a,n)){let s=i.data[cs()];if(b_(s,r)&&!a_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=gi(e,n||``)),cg(i,s,o,n,r)}else h_(i,s,o,o[11],o[a+1],o[a+1]=p_(e,t,n),r,a)}}function a_(e,t){return t>=e.expandoStartIndex}function o_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[cs()],o=a_(e,n);b_(a,r)&&t===null&&!o&&(t=!1),t=s_(i,a,t,r),Ug(i,a,t,n,o,r)}}function s_(e,t,n,r){let i=ete(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=d_(null,e,t,n,r),n=f_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=d_(i,e,t,n,r),a===null){let n=c_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=d_(null,e,t,n[1],r),n=f_(n,t.attrs,r),l_(e,t,r,n))}else a=u_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function c_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(zg(r)!==0)return e[Fg(r)]}function l_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Fg(i)]=r}function u_(e,t,n){let r,i=t.directiveEnd;for(let a=1+t.directiveStylingLast;a0;){let t=e[i],a=Array.isArray(t),c=a?t[1]:t,l=c===null,u=n[i+1];u===Pu&&(u=l?ba:void 0);let d=l?ga(u,r):c===r?u:void 0;if(a&&!v_(d)&&(d=ga(t,r)),v_(d)&&(s=d,o))return s;let f=e[i+1];i=o?Fg(f):zg(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=ga(e,r))}return s}function v_(e){return e!==void 0}function y_(e,t){return e==null||e===``||(typeof t==`string`?e=cu(e)+t:typeof e==`object`&&(e=hi(cu(e)))),e}function b_(e,t){return!!(e.flags&(t?8:16))}function K(e,t=``){let n=zo(),r=Bo(),i=e+27,a=r.firstCreatePass?Jf(r,i,1,t,null):r.data[i],o=x_(r,n,a,t);n[i]=o,hs()&&xd(r,n,o,a),Uo(a,!1)}var x_=(e,t,n,r)=>(gs(!0),_u(t[11],r));function S_(e,t,n,r=``){return mp(e,Zo(),n)?t+zi(n)+r:Pu}function C_(e,t,n,r,i,a=``){let o=hp(e,Xo(),n,i);return Qo(2),o?t+zi(n)+r+zi(i)+a:Pu}function w_(e,t,n,r,i,a,o,s=``){let c=gp(e,Xo(),n,i,o);return Qo(3),c?t+zi(n)+r+zi(i)+a+zi(o)+s:Pu}function T_(e,t,n,r,i,a,o,s,c,l=``){let u=_p(e,Xo(),n,i,o,c);return Qo(4),u?t+zi(n)+r+zi(i)+a+zi(o)+s+zi(c)+l:Pu}function q(e){return J(``,e),q}function J(e,t,n){let r=zo(),i=S_(r,e,t,n);return i!==Pu&&O_(r,cs(),i),J}function Y(e,t,n,r,i){let a=zo(),o=C_(a,e,t,n,r,i);return o!==Pu&&O_(a,cs(),o),Y}function E_(e,t,n,r,i,a,o){let s=zo(),c=w_(s,e,t,n,r,i,a,o);return c!==Pu&&O_(s,cs(),c),E_}function D_(e,t,n,r,i,a,o,s,c){let l=zo(),u=T_(l,e,t,n,r,i,a,o,s,c);return u!==Pu&&O_(l,cs(),u),D_}function O_(e,t,n){let r=mo(t,e);vu(e[11],r,n)}function k_(e,t,n){hc(t)&&(t=t());let r=zo();return mp(r,Zo(),t)&&(Bo(),Gd(us(),r,e,t,r[11],n)),k_}function A_(e,t){let n=hc(e);return n&&e.set(t),n}function j_(e,t){let n=zo(),r=Bo(),i=Vo();return Eg(r,n,n[11],i,e,t),j_}var M_={};function N_(e){nd(`NgLet`);let t=Bo(),n=zo(),r=e+27;return Uo(Jf(t,r,128,null,null),!1),vo(t,n,r,M_),N_}function P_(e){return vo(Bo(),zo(),cs(),e),e}function F_(e){let t=_o(Ko(),27+e);if(t===M_)throw new fi(314,!1);return t}function I_(e,t,n=``){return S_(zo(),e,t,n)}function L_(e,t,n){let r=Bo();r.firstCreatePass&&R_(t,r.data,r.blueprint,so(e),n)}function R_(e,t,n,r,i){if(e=vi(e),Array.isArray(e))for(let a=0;a>20;if(Pa(e)||!e.multi){let r=new Hc(l,i,Vp,null),p=V_(c,t,i?u:u+f,d);p===-1?(dl(sl(s,o),a,c),z_(a,e,t.length),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(r),o.push(r)):(n[p]=r,o[p]=r)}else{let p=V_(c,t,u+f,d),m=V_(c,t,u,u+f),ee=p>=0&&n[p],h=m>=0&&n[m];if(i&&!h||!i&&!ee){dl(sl(s,o),a,c);let u=rne(i?nne:tne,n.length,i,r,l,e);!i&&h&&(n[m].providerFactory=u),z_(a,e,t.length,0),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(u),o.push(u)}else{let t=B_(n[i?m:p],l,!i&&r);z_(a,e,p>-1?p:m,t)}!i&&r&&h&&n[m].componentProviders++}}}function z_(e,t,n,r){let i=Pa(t),a=Fa(t);if(i||a){let o=(a?vi(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||=[];if(!i&&t.multi){let e=a.indexOf(n);e===-1?a.push(n,[r,o]):a[e+1].push(r,o)}else a.push(n,o)}}}function B_(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function V_(e,t,n,r){for(let i=n;i{n.providersResolver=(t,n)=>L_(t,n?n(e):e,!1),t&&(n.viewProvidersResolver=(e,n)=>L_(e,n?n(t):t,!0))}}function W_(e,t){let n=Yo()+e,r=zo();return r[n]===Pu?fp(r,n,t()):pp(r,n)}function G_(e,t,n){return J_(zo(),Yo(),e,t,n)}function K_(e,t,n,r){return Y_(zo(),Yo(),e,t,n,r)}function ine(e,t,n,r,i,a,o){return ane(zo(),Yo(),e,t,n,r,i,a)}function q_(e,t){let n=e[t];return n===Pu?void 0:n}function J_(e,t,n,r,i,a){let o=t+n;return mp(e,o,i)?fp(e,o+1,a?r.call(a,i):r(i)):q_(e,o+1)}function Y_(e,t,n,r,i,a,o){let s=t+n;return hp(e,s,i,a)?fp(e,s+2,o?r.call(o,i,a):r(i,a)):q_(e,s+2)}function ane(e,t,n,r,i,a,o,s,c){let l=t+n;return _p(e,l,i,a,o,s)?fp(e,l+4,c?r.call(c,i,a,o,s):r(i,a,o,s)):q_(e,l+4)}function X_(e,t){let n=Bo(),r,i=e+27;n.firstCreatePass?(r=one(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=sa(r.type,!0)),o=Yi(Vp);try{let e=tl(!1),t=a();return tl(e),vo(n,zo(),i,t),t}finally{Yi(o)}}function one(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Z_(e,t,n){let r=e+27,i=zo(),a=_o(i,r);return $_(i,r)?J_(i,Yo(),t,a.transform,n,a):a.transform(n)}function Q_(e,t,n,r){let i=e+27,a=zo(),o=_o(a,i);return $_(a,i)?Y_(a,Yo(),t,o.transform,n,r,o):o.transform(n,r)}function $_(e,t){return e[1].data[t].pure}function ev(e,t){return qf(e,t)}var sne=(()=>{class e{applicationErrorHandler=x(Ks);appRef=x(Lh);taskService=x(Ts);ngZone=x(Ns);zonelessEnabled=x(rc);tracing=x(ed,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new sr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(js):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(x(ic,{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?ks:Os;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=Ol({token:e,factory:e.ɵfac})}return e})();function cne(){return[{provide:nc,useExisting:sne},{provide:Ns,useClass:Vs},{provide:rc,useValue:!0}]}function lne(){return typeof $localize<`u`&&$localize.locale||`en-US`}var tv=new Di(``,{factory:()=>x(tv,{optional:!0,skipSelf:!0})||lne()}),nv=class{destroyed=!1;listeners=null;errorHandler=x(Gs,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=x(xs);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new fi(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?this.listeners.indexOf(e):-1;t>-1&&(this.isEmitting?(this.hasNullListeners=!0,this.listeners[t]=null):this.listeners.splice(t,1))}}}emit(e){if(this.destroyed){console.warn(pi(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=rn(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&&une(this.listeners)),rn(t),this.isEmitting=!1}}};function une(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function X(e,t){return Tn(e,t?.equal)}function Z(e){return Kn(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var dne=e=>e;function Q(e,t){return typeof e==`function`?rv(Hn(e,dne,t?.equal),t?.debugName,t?.set):rv(Hn(e.source,e.computation,e.equal),e.debugName,e.set)}function rv(e,t,n){let r=e[nn],i=e;if(n!==void 0){let t=e=>Un(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Z(e)),t)}else i.set=e=>Un(r,e),i.update=e=>Wn(r,e);return i.asReadonly=Js.bind(e),i}var iv=!1;function fne(){return iv}function av(e){iv=e}function ov(e,t){let n=Object.create(_c);n.value=e,n.transformFn=t?.transform;function r(){if(sn(n),n.value===gc)throw new fi(-950,null);return n.value}return r[nn]=n,r}function sv(e){return new nv}function cv(e,t){return ov(e,t)}function pne(e){return ov(gc,e)}var $=(cv.required=pne,cv);function lv(e,t){let n=Object.create(_c),r=new nv;n.value=e;function i(){return sn(n),uv(n.value),n.value}return i[nn]=n,i.asReadonly=Js.bind(i),i.set=e=>{n.equal(n.value,e)||(jn(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===gc)throw new fi(952,!1)}function dv(e,t){return lv(e,t)}function mne(e){return lv(gc,e)}var fv=(dv.required=mne,dv);function pv(e,t){return Zm(t)}function hne(e,t){return Qm(t)}var mv=(pv.required=hne,pv),gne=(()=>{class e{static __NG_ELEMENT_ID__=_ne}return e})();function _ne(e){return vne(Vo(),zo(),(e&16)==16)}function vne(e,t,n){if(ao(e)&&!n){let n=yo(e.index,t);return new Wf(n,n)}if(e.type&175){let e=t[15];return new Wf(e,t)}return null}var hv=new Di(``),yne=new Di(``);function gv(e){return!e.moduleRef}function bne(e){let t=gv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Ns);return n.run(()=>{gv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Ks),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),gv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(hv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(hv);n.add(t),e.moduleRef.onDestroy(()=>{zh(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return Sne(r,n,()=>{let n=t.get(Ts),r=n.add(),i=t.get(_h);return i.runInitializers(),i.donePromise.then(()=>{if(Tg(t.get(tv,wg)||`en-US`),!t.get(yne,!0))return gv(e)?t.get(Lh):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(gv(e)){let n=t.get(Lh);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return xne?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var xne;function Sne(e,t,n){try{let r=n();return th(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var _v=null;function Cne(e=[],t){return ys.create({name:t,providers:[{provide:Ia,useValue:`platform`},{provide:hv,useValue:new Set([()=>_v=null])},...e]})}function wne(e=[]){if(_v)return _v;let t=Cne(e);return _v=t,Fh(),Tne(t),t}function Tne(e){let t=e.get(Zs,null);$a(e,()=>{t?.forEach(e=>e())})}function Ene(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Mc(yc.BootstrapApplicationStart);try{let e=i?.injector??wne(r);return bne({r3Injector:new ih({providers:[cne(),qs,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Mc(yc.BootstrapApplicationEnd)}}function vv(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var yv=Symbol(`NOT_SET`),bv=new Set,Dne={...Nn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:yv,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(sn(r),r.value),r.signal[nn]=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??bv)t()}finally{yn(e)}}};function xv(e,t){let n=t?.injector??x(ys),r=n.get(nc),i=n.get(rd),a=n.get(ed,null,{optional:!0});i.impl??=n.get(ad);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(ec,null,{optional:!0}),c=new One(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var Sv=null;function Cv(){return Sv}function kne(e){Sv??=e}var Ane=class{},wv=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(wv||{}),Tv=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(Tv||{}),Ev=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(Ev||{}),Dv={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 jne(e){return bg(e)[Sg.LocaleId]}function Mne(e,t,n){let r=bg(e);return Nv(Nv([r[Sg.DayPeriodsFormat],r[Sg.DayPeriodsStandalone]],t),n)}function Nne(e,t,n){let r=bg(e);return Nv(Nv([r[Sg.DaysFormat],r[Sg.DaysStandalone]],t),n)}function Pne(e,t,n){let r=bg(e);return Nv(Nv([r[Sg.MonthsFormat],r[Sg.MonthsStandalone]],t),n)}function Fne(e,t){let n=bg(e)[Sg.Eras];return Nv(n,t)}function Ov(e,t){return Nv(bg(e)[Sg.DateFormat],t)}function kv(e,t){return Nv(bg(e)[Sg.TimeFormat],t)}function Av(e,t){let n=bg(e)[Sg.DateTimeFormat];return Nv(n,t)}function jv(e,t){let n=bg(e),r=n[Sg.NumberSymbols][t];if(r===void 0){if(t===Dv.CurrencyDecimal)return n[Sg.NumberSymbols][Dv.Decimal];if(t===Dv.CurrencyGroup)return n[Sg.NumberSymbols][Dv.Group]}return r}function Mv(e){if(!e[Sg.ExtraData])throw new fi(2303,!1)}function Ine(e){let t=bg(e);return Mv(t),(t[Sg.ExtraData][2]||[]).map(e=>typeof e==`string`?Pv(e):[Pv(e[0]),Pv(e[1])])}function Lne(e,t,n){let r=bg(e);return Mv(r),Nv(Nv([r[Sg.ExtraData][0],r[Sg.ExtraData][1]],t)||[],n)||[]}function Nv(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new fi(2304,!1)}function Pv(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Rne=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Fv=Object.create(null),zne=/((?:[^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]*)/,Bne=256;function Vne(e,t,n,r){let i=Zne(e);Hne(t),t=Lv(n,t)||t;let a=[],o;for(;t;)if(o=zne.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=Jv(r,s),i=Xne(i,r));let c=``;return a.forEach(e=>{let t=Jne(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function Hne(e){if(e.length>Bne)throw new fi(2300,!1)}function Iv(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function Lv(e,t){let n=jne(e);if(Fv[n]??=Object.create(null),Fv[n][t])return Fv[n][t];let r=``;switch(t){case`shortDate`:r=Ov(e,Ev.Short);break;case`mediumDate`:r=Ov(e,Ev.Medium);break;case`longDate`:r=Ov(e,Ev.Long);break;case`fullDate`:r=Ov(e,Ev.Full);break;case`shortTime`:r=kv(e,Ev.Short);break;case`mediumTime`:r=kv(e,Ev.Medium);break;case`longTime`:r=kv(e,Ev.Long);break;case`fullTime`:r=kv(e,Ev.Full);break;case`short`:let t=Lv(e,`shortTime`),n=Lv(e,`shortDate`);r=Rv(Av(e,Ev.Short),[t,n]);break;case`medium`:let i=Lv(e,`mediumTime`),a=Lv(e,`mediumDate`);r=Rv(Av(e,Ev.Medium),[i,a]);break;case`long`:let o=Lv(e,`longTime`),s=Lv(e,`longDate`);r=Rv(Av(e,Ev.Long),[o,s]);break;case`full`:let c=Lv(e,`fullTime`),l=Lv(e,`fullDate`);r=Rv(Av(e,Ev.Full),[c,l])}return r&&(Fv[n][t]=r),r}function Rv(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function zv(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 Une(s,t);let c=jv(o,Dv.MinusSign);return zv(s,t,c,r,i)}}function Wne(e,t){switch(e){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new fi(2301,!1)}}function Vv(e,t,n=wv.Format,r=!1){return function(i,a){return Gne(i,a,e,t,n,r)}}function Gne(e,t,n,r,i,a){switch(n){case 2:return Pne(t,i,r)[e.getMonth()];case 1:return Nne(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Ine(t),a=Lne(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?`+`:``)+zv(o,2,a)+zv(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+zv(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+zv(o,2,a)+`:`+zv(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+zv(o,2,a)+`:`+zv(Math.abs(i%60),2,a);default:throw new fi(2310,!1)}}}var Kne=0,Uv=4;function qne(e){let t=Iv(e,Kne,1).getDay();return Iv(e,0,1+(t<=Uv?Uv:11)-t)}function Wv(e){let t=e.getDay(),n=t===0?-3:Uv-t;return Iv(e.getFullYear(),e.getMonth(),e.getDate()+n)}function Gv(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=Wv(n),t=qne(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return zv(i,e,jv(r,Dv.MinusSign))}}function Kv(e,t=!1){return function(n,r){return zv(Wv(n).getFullYear(),e,jv(r,Dv.MinusSign),t)}}var qv=Object.create(null);function Jne(e){if(qv[e])return qv[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Vv(3,Tv.Abbreviated);break;case`GGGG`:t=Vv(3,Tv.Wide);break;case`GGGGG`:t=Vv(3,Tv.Narrow);break;case`y`:t=Bv(0,1,0,!1,!0);break;case`yy`:t=Bv(0,2,0,!0,!0);break;case`yyy`:t=Bv(0,3,0,!1,!0);break;case`yyyy`:t=Bv(0,4,0,!1,!0);break;case`Y`:t=Kv(1);break;case`YY`:t=Kv(2,!0);break;case`YYY`:t=Kv(3);break;case`YYYY`:t=Kv(4);break;case`M`:case`L`:t=Bv(1,1,1);break;case`MM`:case`LL`:t=Bv(1,2,1);break;case`MMM`:t=Vv(2,Tv.Abbreviated);break;case`MMMM`:t=Vv(2,Tv.Wide);break;case`MMMMM`:t=Vv(2,Tv.Narrow);break;case`LLL`:t=Vv(2,Tv.Abbreviated,wv.Standalone);break;case`LLLL`:t=Vv(2,Tv.Wide,wv.Standalone);break;case`LLLLL`:t=Vv(2,Tv.Narrow,wv.Standalone);break;case`w`:t=Gv(1);break;case`ww`:t=Gv(2);break;case`W`:t=Gv(1,!0);break;case`d`:t=Bv(2,1);break;case`dd`:t=Bv(2,2);break;case`c`:case`cc`:t=Bv(7,1);break;case`ccc`:t=Vv(1,Tv.Abbreviated,wv.Standalone);break;case`cccc`:t=Vv(1,Tv.Wide,wv.Standalone);break;case`ccccc`:t=Vv(1,Tv.Narrow,wv.Standalone);break;case`cccccc`:t=Vv(1,Tv.Short,wv.Standalone);break;case`E`:case`EE`:case`EEE`:t=Vv(1,Tv.Abbreviated);break;case`EEEE`:t=Vv(1,Tv.Wide);break;case`EEEEE`:t=Vv(1,Tv.Narrow);break;case`EEEEEE`:t=Vv(1,Tv.Short);break;case`a`:case`aa`:case`aaa`:t=Vv(0,Tv.Abbreviated);break;case`aaaa`:t=Vv(0,Tv.Wide);break;case`aaaaa`:t=Vv(0,Tv.Narrow);break;case`b`:case`bb`:case`bbb`:t=Vv(0,Tv.Abbreviated,wv.Standalone,!0);break;case`bbbb`:t=Vv(0,Tv.Wide,wv.Standalone,!0);break;case`bbbbb`:t=Vv(0,Tv.Narrow,wv.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Vv(0,Tv.Abbreviated,wv.Format,!0);break;case`BBBB`:t=Vv(0,Tv.Wide,wv.Format,!0);break;case`BBBBB`:t=Vv(0,Tv.Narrow,wv.Format,!0);break;case`h`:t=Bv(3,1,-12);break;case`hh`:t=Bv(3,2,-12);break;case`H`:t=Bv(3,1);break;case`HH`:t=Bv(3,2);break;case`m`:t=Bv(4,1);break;case`mm`:t=Bv(4,2);break;case`s`:t=Bv(5,1);break;case`ss`:t=Bv(5,2);break;case`S`:t=Bv(6,1);break;case`SS`:t=Bv(6,2);break;case`SSS`:t=Bv(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Hv(0);break;case`ZZZZZ`:t=Hv(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Hv(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Hv(2);break;default:return null}return qv[e]=t,t}function Jv(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function Yne(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function Xne(e,t,n){let r=e.getTimezoneOffset();return Yne(e,-1*(Jv(t,r)-r))}function Zne(e){if(Yv(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 Iv(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Rne))return Qne(n)}let t=new Date(e);if(!Yv(t))throw new fi(2311,!1);return t}function Qne(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 Yv(e){return e instanceof Date&&!isNaN(e.valueOf())}var Xv=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=x(ys);constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let e=this._viewContainerRef;if(this._viewRef&&e.remove(e.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let t=this._createContextForwardProxy();this._viewRef=e.createEmbeddedView(this.ngTemplateOutlet,t,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector===`outlet`?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,t,n)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,t,n):!1,get:(e,t,n)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,t,n)}})}static ɵfac=function(t){return new(t||e)(Vp(xm))};static ɵdir=uh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[Cc]})}return e})();function $ne(e,t){return new fi(2100,!1)}var ere=`mediumDate`,tre=new Di(``),nre=new Di(``),Zv=(()=>{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??ere,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Vne(t,e,i||this.locale,a)}catch(t){throw $ne(e,t.message)}}static ɵfac=function(t){return new(t||e)(Vp(tv,16),Vp(tre,24),Vp(nre,24))};static ɵpipe=dh({name:`date`,type:e,pure:!0})}return e})(),Qv=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=dh({name:`json`,type:e,pure:!1})}return e})();function rre(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 ire=`browser`,$v=class{_doc;constructor(e){this._doc=e}manager},ey=(()=>{class e extends $v{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)(na(bs))};static ɵprov=bi({token:e,factory:e.ɵfac})}return e})(),ty=new Di(``),ny=(()=>{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 ey));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof ey);r&&this._plugins.push(r)}addEventListener(e,t,n,r){return this._findPluginFor(t).addEventListener(e,t,n,r)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(t=>t.supports(e)),!t)throw new fi(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(na(ty),na(Ns))};static ɵprov=bi({token:e,factory:e.ɵfac})}return e})(),ry=`ng-app-id`;function iy(e){for(let t of e)t.remove()}function ay(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function are(e,t,n,r){let i=e.head?.querySelectorAll(`style[${ry}="${t}"],link[${ry}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(ry),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 oy(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var sy=(()=>{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,are(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,ay);t?.forEach(e=>this.addUsage(e,this.external,oy))}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&&(iy(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])iy(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,ay(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,oy(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)(na(bs),na(Ys),na($s,8),na(Qs))};static ɵprov=bi({token:e,factory:e.ɵfac})}return e})(),cy={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`},ly=/%COMP%/g,uy=`%COMP%`,ore=`_nghost-${uy}`,sre=`_ngcontent-${uy}`,cre=!0,lre=new Di(``,{factory:()=>cre}),ure=new Di(``);function dre(e){return sre.replace(ly,e)}function fre(e){return ore.replace(ly,e)}function dy(e,t){return t.map(t=>t.replace(ly,e))}var fy=(()=>{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 py(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 _y?n.applyToHost(e):n instanceof gy&&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 ou.Emulated:r=new _y(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case ou.ShadowDom:return new hy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case ou.ExperimentalIsolatedShadowDom:return new hy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new gy(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)(na(ny),na(zp),na(Ys),na(lre),na(bs),na(Ns),na($s),na(ed,8),na(ure,8))};static ɵprov=bi({token:e,factory:e.ɵfac})}return e})(),py=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(cy[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(my(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=my(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new fi(-5106,!1);r.insertBefore(t,n)}}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e==`string`?this.doc.querySelector(e):e;if(!n)throw new fi(-5104,!1);return t||(n.textContent=``),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+`:`+t;let i=cy[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=cy[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){let i=t.startsWith(`--`);i&&(t=t.replace(`%NS%`,this.cssVarNamespace)),i||r&(Fu.DashCase|Fu.Important)?e.style.setProperty(t,n,r&Fu.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&Fu.DashCase?e.style.removeProperty(t):e.style[t]=``}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e==`string`&&(e=Cv().getGlobalEventTarget(this.doc,e),!e))throw new fi(-5102,!1);let i=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t===`__ngUnwrap__`)return e;e(t)===!1&&t.preventDefault()}}};function my(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var hy=class extends py{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=dy(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=oy(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)}},gy=class extends py{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?dy(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&&Hu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},_y=class extends gy{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=dre(l),this.hostAttr=fre(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}},pre=class e extends Ane{supportsDOMEvents=!0;static makeCurrent(){kne(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=mre();return t==null?null:hre(t)}resetBaseElement(){vy=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return rre(document.cookie,e)}},vy=null;function mre(){return vy||=document.head.querySelector(`base`),vy?vy.getAttribute(`href`):null}function hre(e){return new URL(e,document.baseURI).pathname}var yy=[`alt`,`control`,`meta`,`shift`],gre={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},_re={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},vre=(()=>{class e extends $v{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(()=>Cv().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.`),yy.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=gre[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`),yy.forEach(t=>{if(t!==n){let n=_re[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)(na(bs))};static ɵprov=bi({token:e,factory:e.ɵfac})}return e})();async function yre(e,t,n){return Ene({rootComponent:e,...bre(t,n)})}function bre(e,t){return{platformRef:t?.platformRef,appProviders:[...Tre,...e?.providers??[]],platformProviders:wre}}function xre(){pre.makeCurrent()}function Sre(){return new Gs}function Cre(){return Jl(document),document}var wre=[{provide:Qs,useValue:ire},{provide:Zs,useValue:xre,multi:!0},{provide:bs,useFactory:Cre}],Tre=[{provide:Ia,useValue:`root`},{provide:Gs,useFactory:Sre},{provide:ty,useClass:ey,multi:!0},{provide:ty,useClass:vre,multi:!0},fy,{provide:zp,useClass:sy},{provide:sy,useExisting:zp},ny,{provide:ap,useExisting:fy},[]];function by(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 Ore({code:i,why:xy(a.why,e),fix:xy(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:xy(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function jre(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 Ire=Math.random.bind(Math),Lre=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Rre(e=21){let t=``,n=e;for(;n--;)t+=Lre[Ire()*64|0];return t}var zre=6e4,Cy=e=>e,Bre=Cy,{clearTimeout:wy,setTimeout:Ty}=globalThis;function Ey(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Cy,deserialize:s=Bre,resolver:c,bind:l=`rpc`,timeout:u=zre,proxify:d=!0}=t,f=!1,p=new Map,m,ee;async function h(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:h}=Fre(),g=Rre();s.i=g;let te;async function ne(n=s){return u>=0&&(te=Ty(()=>{try{if(t.onTimeoutError?.call(ee,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){h(e)}p.delete(g)},u),typeof te==`object`&&(te=te.unref?.())),p.set(g,{resolve:d,reject:h,timeoutId:te,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(ee,s,ne,d):await ne()}catch(e){if(t.onGeneralError?.call(ee,e)!==!0)throw e;return}finally{wy(te),p.delete(g)}return l}let g={$call:(e,...t)=>h(e,t,!1),$callOptional:(e,...t)=>h(e,t,!1,!0),$callEvent:(e,...t)=>h(e,t,!0),$callRaw:e=>h(e.method,e.args,e.event,e.optional),$rejectPendingCalls:ne,get $closed(){return f},get $meta(){return t.meta},$close:te,$functions:e};ee=d?new Proxy({},{get(t,n){if(Object.hasOwn(g,n))return g[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>h(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>h(n,e,!1);return i.asEvent=r,i}}):g;function te(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(re)}function ne(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function re(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(ee,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(ee,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?ee:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(ee,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(ee,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(ee,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(wy(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(re),ee}function Dy(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Oy=Object.freeze({type:`object`,additionalProperties:!0});function ky(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Oy}return Oy}function Ay(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 My(e,t){return jy(e,t)??[e]}function Ny(e){return typeof e==`string`?`'${e}'`:new Ly().serialize(e)}var Py=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Fy=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Py.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Iy(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})(),Ry=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],zy=[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],By=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Vy=[],Hy=class{_data=new Uy;_hash=new Uy([...Ry]);_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)Vy[n]=e[t+n]|0;else{let e=Vy[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Vy[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Vy[n]=t+Vy[n-7]+i+Vy[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),ee=u+m+d+zy[n]+Vy[n],h=p+f;u=l,l=c,c=s,s=o+ee|0,o=a,a=i,i=r,r=ee+h|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=Uy.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function Wy(e){return new Hy().finalize(e).toBase64()}function Gy(e){return Wy(Ny(e))}function Ky(e){return Gy(e)}function qy(){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 Jy=/^[\w+.-]{2,}:\/\//;function Yy(e){return e.endsWith(`/`)?e:`${e}/`}function Xy(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function Zy(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Yy(n)+e.replace(/^\.?\//,``):e);return n}function Qy(e,t){if(!t||t===`/`||Jy.test(e))return e;let n=Xy(t);return e.startsWith(n)?e:Zy(n,e)}function $y(e,t){let n=e.match(Jy);return t+(n?e.slice(n[0].length):e)}var eb=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function tb(e=21){let t=``,n=e;for(;n--;)t+=eb[Math.random()*64|0];return t}var nb=Symbol.for(`immer-nothing`),rb=Symbol.for(`immer-draftable`),ib=Symbol.for(`immer-state`),ab=[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 ob(e,...t){{let n=ab[e],r=Ab(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var sb=Object,cb=sb.getPrototypeOf,lb=`constructor`,ub=`prototype`,db=`configurable`,fb=`enumerable`,pb=`writable`,mb=`value`,hb=e=>!!e&&!!e[ib];function gb(e){return e?yb(e)||Eb(e)||!!e[rb]||!!e[lb]?.[rb]||Db(e)||Ob(e):!1}var _b=sb[ub][lb].toString(),vb=new WeakMap;function yb(e){if(!e||!kb(e))return!1;let t=cb(e);if(t===null||t===sb[ub])return!0;let n=sb.hasOwnProperty.call(t,lb)&&t[lb];if(n===Object)return!0;if(!Ab(n))return!1;let r=vb.get(n);return r===void 0&&(r=Function.toString.call(n),vb.set(n,r)),r===_b}function bb(e,t,n=!0){xb(e)===0?(n?Reflect.ownKeys(e):sb.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function xb(e){let t=e[ib];return t?t.type_:Eb(e)?1:Db(e)?2:Ob(e)?3:0}var Sb=(e,t,n=xb(e))=>n===2?e.has(t):sb[ub].hasOwnProperty.call(e,t),Cb=(e,t,n=xb(e))=>n===2?e.get(t):e[t],wb=(e,t,n,r=xb(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Tb(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Eb=Array.isArray,Db=e=>e instanceof Map,Ob=e=>e instanceof Set,kb=e=>typeof e==`object`,Ab=e=>typeof e==`function`,jb=e=>typeof e==`boolean`;function Mb(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Nb=e=>kb(e)?e?.[ib]:null,Pb=e=>e.copy_||e.base_,Fb=e=>e.modified_?e.copy_:e.base_;function Ib(e,t){if(Db(e))return new Map(e);if(Ob(e))return new Set(e);if(Eb(e))return Array[ub].slice.call(e);let n=yb(e);if(t===!0||t===`class_only`&&!n){let t=sb.getOwnPropertyDescriptors(e);delete t[ib];let n=Reflect.ownKeys(t);for(let r=0;r1&&sb.defineProperties(e,{set:zb,add:zb,clear:zb,delete:zb}),sb.freeze(e),t&&bb(e,(e,t)=>{Lb(t,!0)},!1),e)}function Rb(){ob(2)}var zb={[mb]:Rb};function Bb(e){return e===null||!kb(e)||sb.isFrozen(e)}var Vb=`MapSet`,Hb=`Patches`,Ub=`ArrayMethods`,Wb={};function Gb(e){let t=Wb[e];return t||ob(0,e),t}var Kb=e=>!!Wb[e];function qb(e,t){Wb[e]||(Wb[e]=t)}var Jb,Yb=()=>Jb,Xb=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Kb(Vb)?Gb(Vb):void 0,arrayMethodsPlugin_:Kb(Ub)?Gb(Ub):void 0});function Zb(e,t){t&&(e.patchPlugin_=Gb(Hb),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qb(e){$b(e),e.drafts_.forEach(tx),e.drafts_=null}function $b(e){e===Jb&&(Jb=e.parent_)}var ex=e=>Jb=Xb(Jb,e);function tx(e){let t=e[ib];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function nx(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[ib].modified_&&(Qb(t),ob(4)),gb(e)&&(e=rx(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[ib].base_,e,t)}else e=rx(t,n);return ix(t,e,!0),Qb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===nb?void 0:e}function rx(e,t){if(Bb(t))return t;let n=t[ib];if(!n)return fx(t,e.handledSet_,e);if(!ox(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);ux(n,e)}return n.copy_}function ix(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Lb(t,n)}function ax(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var ox=(e,t)=>e.scope_===t,sx=[];function cx(e,t,n,r){let i=Pb(e),a=e.type_;if(r!==void 0&&Cb(i,r,a)===t){wb(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;bb(i,(e,n)=>{if(hb(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??sx;for(let e of o)wb(i,e,n,a)}function lx(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!ox(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Fb(i);cx(e,i.draft_??i,a,n),ux(i,r)})}function ux(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)}ax(e)}}function dx(e,t,n){let{scope_:r}=e;if(hb(n)){let i=n[ib];ox(i,r)&&i.callbacks_.push(function(){xx(e),cx(e,n,Fb(i),t)})}else gb(n)&&e.callbacks_.push(function(){let i=Pb(e);e.type_===3?i.has(n)&&fx(n,r.handledSet_,r):Cb(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&fx(Cb(e.copy_,t,e.type_),r.handledSet_,r)})}function fx(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||hb(e)||t.has(e)||!gb(e)||Bb(e)?e:(t.add(e),bb(e,(r,i)=>{if(hb(i)){let t=i[ib];ox(t,n)&&(wb(e,r,Fb(t),e.type_),ax(t))}else gb(i)&&fx(i,t,n)}),e)}function px(e,t){let n=Eb(e),r={type_:+!!n,scope_:t?t.scope_:Yb(),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=mx;n&&(i=[r],a=hx);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var mx={get(e,t){if(t===ib)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=Pb(e);if(!Sb(i,t,e.type_))return vx(e,i,t);let a=i[t];if(e.finalized_||!gb(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Mb(t))return a;if(a===gx(e.base_,t)||_x(e,t,a)){xx(e);let n=e.type_===1?+t:t,r=Cx(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Pb(e)},ownKeys(e){return Reflect.ownKeys(Pb(e))},set(e,t,n){let r=yx(Pb(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=gx(Pb(e),t),i=r?.[ib];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(Tb(n,r)&&(n!==void 0||Sb(e.base_,t,e.type_)))return!0;xx(e),bx(e)}return e.copy_[t]===n&&(n!==void 0||Sb(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),dx(e,t,n),!0)},deleteProperty(e,t){return xx(e),gx(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),bx(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Pb(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[pb]:!0,[db]:e.type_!==1||t!==`length`,[fb]:r[fb],[mb]:n[t]}},defineProperty(){ob(11)},getPrototypeOf(e){return cb(e.base_)},setPrototypeOf(){ob(12)}},hx={};for(let e in mx){let t=mx[e];hx[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}hx.deleteProperty=function(e,t){return isNaN(parseInt(t))&&ob(13),hx.set.call(this,e,t,void 0)},hx.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&ob(14),mx.set.call(this,e[0],t,n,e[0])};function gx(e,t){let n=e[ib];return(n?Pb(n):e)[t]}function _x(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!gb(n)||n[ib]?!1:e.baseRefs_.has(n)}function vx(e,t,n){let r=yx(t,n);return r?mb in r?r[mb]:r.get?.call(e.draft_):void 0}function yx(e,t){if(!(t in e))return;let n=cb(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=cb(n)}}function bx(e){e.modified_||(e.modified_=!0,e.parent_&&bx(e.parent_))}function xx(e){e.copy_||=(e.assigned_=new Map,Ib(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Sx=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Ab(e)&&!Ab(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Ab(t)||ob(6),n!==void 0&&!Ab(n)&&ob(7);let r;if(gb(e)){let i=ex(this),a=Cx(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Qb(i):$b(i)}return Zb(i,n),nx(r,i)}if(!e||!kb(e)){if(r=t(e),r===void 0&&(r=e),r===nb&&(r=void 0),this.autoFreeze_&&Lb(r,!0),n){let t=[],i=[];Gb(Hb).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}ob(1,e)},this.produceWithPatches=(e,t)=>{if(Ab(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]},jb(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),jb(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),jb(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){gb(e)||ob(8),hb(e)&&(e=wx(e));let t=ex(this),n=Cx(t,e,void 0);return n[ib].isManual_=!0,$b(t),n}finishDraft(e,t){let n=e&&e[ib];(!n||!n.isManual_)&&ob(9);let{scope_:r}=n;return Zb(r,t),nx(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=Gb(Hb).applyPatches_;return hb(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Cx(e,t,n,r){let[i,a]=Db(t)?Gb(Vb).proxyMap_(t,n):Ob(t)?Gb(Vb).proxySet_(t,n):px(t,n);return(n?.scope_??Yb()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?lx(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 wx(e){return hb(e)||ob(10,e),Tx(e)}function Tx(e){if(!gb(e)||Bb(e))return e;let t=e[ib],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ib(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Ib(e,!0);let i=n;return Ob(n)&&(n=new Set),bb(i,(e,t)=>{wb(n,e,Tx(t))},r),t&&(t.finalized_=!1),n}function Ex(){ab.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=Nb(Cb(e,n.key_)),i=Cb(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||Sb(e,o))||n.parent_.type_===1&&n.parent_.allIndicesReassigned_)return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e{let u=Cb(o,e,c),f=Cb(s,e,c),p=l?Sb(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===nb?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(Ob(e))return new Set(Array.from(e).map(u));let t=Object.create(cb(e));for(let n in e)t[n]=u(e[n]);return Sb(e,rb)&&(t[rb]=e[rb]),t}function d(e){return hb(e)?u(e):e}qb(Hb,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var Dx=new Sx,Ox=Dx.produce,kx=Dx.produceWithPatches.bind(Dx),Ax=Dx.applyPatches.bind(Dx),jx=1e3;function Mx(e,t){if(e.add(t),e.size>jx){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function Nx(e){let{enablePatches:t=!1}=e;t&&Ex();let n=qy(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=tb())=>{i.has(t)||(Ex(),r=Ax(r,e),Mx(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=tb())=>{if(!i.has(a)){if(Mx(i,a),t){let[t,i]=kx(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=Ox(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var Px=typeof self==`object`?self:globalThis,Fx=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),Ix=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function Lx(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=Fx.has(e)?Px[e]:void 0;return n(new(r??Px.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`&&Ix.has(a))return n(new Px[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function Rx(e){return Lx(new Map,e)(0)}var zx=``,{toString:Bx}={},{keys:Vx}=Object;function Hx(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Bx.call(e).slice(8,-1);switch(n){case`Array`:return[1,zx];case`Object`:return[2,zx];case`Date`:return[3,zx];case`RegExp`:return[4,zx];case`Map`:return[5,zx];case`Set`:return[6,zx];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function Ux([e,t]){return e===0&&(t===`function`||t===`symbol`)}function Wx(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]=Hx(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 Vx(r))(e||!Ux(Hx(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||!(Ux(Hx(n))||Ux(Hx(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Ux(Hx(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function Gx(e,t={}){let n=[];return Wx(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:Kx,stringify:qx}=JSON,Jx={json:!0,lossy:!0};function Yx(e){return Rx(Kx(e))}function Xx(e){return qx(Gx(e,Jx))}function Zx(e){return Rx(e)}function Qx(e){return Xx(e)}function $x(e){return Yx(e)}var eS=256,tS=class extends Error{name=`StreamClosedError`};function nS(e={}){let t=e.id??tb(),n=Math.max(0,e.replayWindow??0),r=qy(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new tS(`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=iS(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 rS(e={}){let t=e.id??tb(),n=Math.max(1,e.highWaterMark??eS),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function ee(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function h(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){ee()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return h()},cancel:ee,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return ee(),Promise.resolve({value:void 0,done:!0})}}}}}function iS(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 aS=128;function oS(e){return e.replace(/[^\w-]+/g,`_`).slice(0,aS)}var sS=`modulepreload`,cS=function(e,t){return new URL(e,t).href},lS={},uS=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=cS(t,n),t=s(t),t in lS)return;lS[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`:sS,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)})},dS=`__connection.json`,fS=`__DEVFRAME_CONNECTION__`,pS=`x-birpc-session`,mS=`__rpc-dump/index.json`,hS=`devframe:services`,gS=`devframe_otp`,_S=`devframe_auth_token`;Sy.postMessage.remoteAssetsError;var vS=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Ky(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}},yS=Pre({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 bS(e){if(e.agent&&e.jsonSerializable===!1)throw yS.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function xS(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function SS(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 CS(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 ES(e,t){let n=e.handler;if(!n){let r=await TS(e,t);if(!r.handler)throw yS.DF0024({name:e.name});n=r.handler}let r=e.args,i=e.returns;if(!r&&!i)return n;let a=n;return async(...t)=>{let n=await CS(e.name,r,t),o=await a(...n);return await wS(e.name,i,o)}}var DS=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 ES(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw yS.DF0021({name:e.name});bS(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw yS.DF0022({name:e.name});bS(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 ES(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw yS.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function OS(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 AS(t,`undefined`,r,e);return n}return i!==null&&kS(i,r,e,t),n})}function kS(e,t,n,r){if(typeof e==`bigint`)throw AS(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw AS(r,`Map`,t,n);if(e instanceof Set)throw AS(r,`Set`,t,n);if(e instanceof Date)throw AS(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw AS(r,e.constructor?.name??`class instance`,t,n)}function AS(e,t,n,r){let i=jS(n,r);return yS.DF0020({name:e||``,type:t,path:i})}function jS(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var MS=`__DEVFRAME_CONNECTION_META__`,NS=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function PS(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 FS(){return PS(fS)}function IS(){return PS(MS)}function LS(e){if(e)return e;try{let e=localStorage.getItem(NS);if(e)return e}catch{}return PS(NS)}function RS(e){globalThis[fS]=e,globalThis[MS]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&zS(e.authToken)}function zS(e){try{localStorage.setItem(NS,e)}catch{}globalThis[NS]=e;let t=FS();t&&(globalThis[fS]={...t,authToken:e})}function BS(e){let t=Qy(dS,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function VS(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function HS(){let e=FS();if(e)return VS(e,LS()??e.authToken??e.connectionMeta.authToken);let t=IS();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??BS(`./`),authToken:LS(t.authToken)}}async function US(e={}){if(e.connection){let t=VS(e.connection,LS(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return RS(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:BS(t[0]??`./`),authToken:LS(e.authToken??e.connectionMeta.authToken)};return RS(n),n}let n=HS();if(n){let t=VS(n,LS(e.authToken??n.authToken??n.connectionMeta.authToken));return RS(t),t}let r=[];for(let n of t){let t=Qy(dS,n),i=BS(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:LS(e.authToken??r.authToken)};return RS(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var WS=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function GS(e=gS){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function KS(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 qS(e=gS){let t=GS(e);return t&&KS(e),t}async function JS(e,t={}){let n=qS(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function YS(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(hS,{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 XS(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:Sy.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:Sy.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=Nx({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise((t,n)=>{if(e.isTrusted)d().then(t,n);else{t(u);let n=!1;e.events.on(Sy.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var ZS=new Map;function QS(e=ZS){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?OS(n,r??``):`s:${Qx(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?$x(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function $S(){}function eC(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 tC(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 nC(e){let{onConnected:t=$S,onError:n=$S,onDisconnected:r=$S,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${_S}=${encodeURIComponent(e.authToken)}`);let s=QS(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function ee(e){l||(l=!0,p(e),n(e),r())}function h(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function g(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function te(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=eC(r);if(!e)break;r=e.rest;let{event:t,data:n}=tC(e.frame);n.length>0&&g(t,n.join(` +`))}}h()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await te(e.body)}catch(e){if(c.signal.aborted){h();return}ee(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[pS]: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 rC(e,t){let{channel:n,rpcOptions:r={}}=t;return Ey(e,{...n,timeout:-1,...r,proxify:!1})}function iC(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(Sy.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function ee(){return l===`disconnected`||l===`error`?new WS(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new WS(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function h(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(Sy.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 WS(`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(Sy.client.error,n,t),r(n)})})}let g=new Map;for(let e of r.jsonSerializableMethods??[])g.set(e,{jsonSerializable:!0});let te=e.createChannel({definitions:g,onError(e){f(`error`,e),i.emit(Sy.client.connectionError,e),m(new WS(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new WS(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),ne=rC(a.functions,{channel:te,rpcOptions:o});a.register({name:Sy.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new WS(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Sy.client.connectionError,e),m(e),i.emit(Sy.client.isTrustedUpdated,!1)}});let re=n;async function ie(e){re=e;let t=await ne.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new WS(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Sy.client.connectionError,e)}return i.emit(Sy.client.isTrustedUpdated,c),t.isTrusted}async function ae(e){let t=(await ne.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(re=t,c=!0,d.resolve(!0),f(`connected`),i.emit(Sy.client.isTrustedUpdated,!0)),t}async function oe(e={}){await ne.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function se(){return c?!0:ie(re??``)}async function ce(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:se,requestTrustWithToken:ie,requestTrustWithCode:ae,requestAuthCode:oe,ensureTrusted:ce,call:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(Sy.client.error,n,t),Promise.reject(n)):h(ne.$call(...e),t)},callEvent:(...e)=>{let t=ee();if(t){i.emit(Sy.client.error,t,String(e[0]));return}return ne.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(Sy.client.error,n,t),Promise.reject(n)):h(ne.$callOptional(...e),t)},close:()=>{te.close()}}}function aC(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 oC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=aC(n.sse,r??`./`,location);return iC({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>nC({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 sC(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:cC(r)?sC(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function cC(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function lC(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function uC(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function dC(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function fC(e){if(e.error)throw sC(e.error);return e.output}function pC(e){return e.some(e=>e!=null)}function mC(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function hC(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?Zx(e):e}function a(e,t){return i(mC(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 dC(r)?fC(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(lC(r)){if(pC(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(uC(r)){let e=Ky(n),i=r.records[e];if(i)return fC(await s(i,r.serialization));if(r.fallback)return fC(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!pC(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 gC(e){let t=hC(await e.fetchJsonFromBases(mS),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 _C=``;function vC(e,t){return`${e}${_C}${t}`}function yC(e){let t=new Map,n=new Map;e.client.register({name:Sy.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(vC(e,n))?._push(r,i)}}),e.client.register({name:Sy.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=vC(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Sy.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=vC(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Sy.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(_C);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=vC(n,r),o=t.get(a);if(o)return o;let s=rS({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(Sy.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=vC(t,r),a=n.get(i);if(a)return a;let o=nS({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 bC(){}var xC=new Map;function SC(e){let t=e.url;e.authToken&&(t=`${t}?${_S}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=bC,onError:i=bC,onDisconnected:a=bC,definitions:o=xC}=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=QS(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 CC(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 $y(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function wC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=CC(n.websocket,r??`./`,location);return iC({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>SC({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 TC(e){return e.includes(`:`)}function EC(e,t){return TC(t)?t:`${e}:${t}`}function DC(e){return{async get(t){return(await e()).value()?.[t]},async set(t,n){(await e()).mutate(e=>{if(e===void 0)return{[t]:n};e[t]=n})},async delete(t){(await e()).mutate(e=>{e!==void 0&&delete e[t]})},async all(){return(await e()).value()??{}},async onChange(t){return(await e()).on(`updated`,e=>t(e??{}))}}}function OC(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=(async()=>(await e.ensureTrusted(),e.sharedState.get(r)))().catch(e=>{throw i=void 0,e}),i}return DC(a)}function kC(e,t){return{global:OC(e,t,`global`),project:OC(e,t,`project`)}}function AC(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(TC(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(EC(t,n),...r)),callEvent:((n,...r)=>e.callEvent(EC(t,n),...r)),callOptional:((n,...r)=>e.callOptional(EC(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(EC(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(EC(t,n),r,i),upload:(n,r)=>e.streaming.upload(EC(t,n),r)}},settings:kC(e,t),scope:e.scope}}function jC(){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 MC(e,t={}){let n=t.modelContext??jC();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=oS(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=Dy(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Ay(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>NC(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 NC(e,t,n){try{let r=My(n,e.args?.length);return{content:[{type:`text`,text:PC(await(await ES(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:FC(e)}]}}}function PC(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function FC(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 IC(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 LC(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=qy(),a=Array.isArray(t)?t:[t],o=await US(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new vS({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new DS(f),m=e.webmcp===!1?void 0:MC(p),ee,h=!1,g=0,te;function ne(){g++,te=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:Sy.broadcast.cacheInvalidate,type:`event`,handler:ne}),i.on(Sy.client.connectionStatus,ne),i.on(Sy.client.isTrustedUpdated,ne));async function re(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(Qy(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let ie=e.callTimeout??0,ae=ie>0?ie:1/0,oe,se={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+ae;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&oe.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new WS(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${ie}ms`)}for(;!te&&(t(),!(h||oe.status!==`connected`));){let e=g;te=oe.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===g&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===g&&(te=void 0),t}),await te}await te,t()}let o=g;if(r&&e.i&&!h&&oe.isTrusted&&d.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);o===g&&!h&&d.apply(e,n)}else await t(e)}}},ce=IC(e.transport??`auto`,s);oe=ce===`static`?await gC({fetchJsonFromBases:re}):ce===`sse`?oC({...se,sseOptions:e.sseOptions}):wC({...se,wsOptions:e.wsOptions});let le;try{le=new BroadcastChannel(`devframe-auth`)}catch{}let ue,de=!1;function fe(e){return((...t)=>de||!ue?e(...t):ue.then(()=>e(...t)))}function pe(){h=!0,ne();try{ee?.(),m?.()}finally{try{le?.close()}finally{oe.close?.()}}}let me={events:i,get isTrusted(){return oe.isTrusted},get status(){return oe.status},get connectionError(){return oe.connectionError},get transport(){return oe.transport??ce},get connection(){return o},connectionMeta:s,ensureTrusted:oe.ensureTrusted,requestTrust:oe.requestTrust,requestTrustWithToken:async e=>(zS(e),o={...o,authToken:e},oe.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await oe.requestTrustWithCode(e);if(!t)return!1;zS(t),o={...o,authToken:t};try{le?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>oe.requestAuthCode(e),call:fe(oe.call),callEvent:fe(oe.callEvent),callOptional:fe(oe.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:pe};me.sharedState=XS(me),me.streaming=yC(me),me.services=YS(me);let he=new Map;me.scope=(e=>{if(!e)return me;let t=he.get(e);return t||(t=AC(me,e),he.set(e,t)),t}),f.rpc=me;function ge(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function _e(){if(e.simpleAuth!==!1&&ge()&&typeof globalThis.prompt==`function`)for(await me.requestAuthCode().catch(()=>{});!me.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await me.requestTrustWithCode(t))return}}async function ve(){let t=await oe.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await JS(me,{param:n}):!1;t||r||me.isTrusted||await _e()}return ue=ve().then(()=>{de=!0},()=>{de=!0}),s.mcp&&uS(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-71KIsREx.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{h||(ee=e(me))}).catch(()=>{}),le&&(le.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&me.requestTrustWithToken(e.data.authToken)}),me}var RC=LC,zC=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`,`performance`,`build`],BC=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function VC(e){return`pangular:${e}`}var HC=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],UC={refreshMs:{default:3e3,min:500,max:8e3},navigations:{default:50,min:5,max:500},formTimeline:{default:200,min:10,max:2e3},httpCalls:{default:200,min:10,max:2e3},changeLog:{default:200,min:10,max:2e3},cdCycles:{default:200,min:10,max:2e3},cdSlowMs:{default:16,min:1,max:1e3},capacitorCalls:{default:200,min:10,max:2e3},idleAfterMs:{default:6e4,min:0,max:6e5}},WC={"opted-out":`the request sets transferCache: false`,post:`POST requests are left out unless includePostRequests is set`,method:`only GET, HEAD and POST requests are cached`,"auth-headers":`it sends an Authorization, Proxy-Authorization or Cookie header`,credentials:`it sends credentials (withCredentials or credentials: include/same-origin)`,"no-cache-request":`the request asks for no-store, no-cache or private`,"no-cache-response":`the response has Cache-Control no-store, no-cache or private`,"set-cookie":`the response sets a cookie`,error:`failed responses are not stored`,mocked:`a fault rule answered before the transfer cache ran`,filter:`the transferCache filter passed to withPangular() left it out`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},GC=[[0,`Network error (offline)`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Content Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Content`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[499,`Client Closed Request`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[510,`Not Extended`],[511,`Network Authentication Required`],[520,`Web Server Returned an Unknown Error`],[521,`Web Server Is Down`],[522,`Connection Timed Out`],[523,`Origin Is Unreachable`],[524,`A Timeout Occurred`]];function KC(e){return GC.some(([t])=>t===e)}var qC=/^[a-z][a-z0-9-]{0,39}$/;function JC(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&qC.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 YC=`pangular`,XC={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},ZC=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function QC(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=XC[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[...ZC.filter(e=>n.has(e)),r].join(`+`)}function $C(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 ew(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 tw=[{id:`dashboard`,label:`Dashboard`},{id:`timeline`,label:`Timeline`},{id:`audit`,label:`Audit`},{id:`analog`,label:`Analog`,inspector:`analog`},{id:`components`,label:`Components`,inspector:`components`},{id:`routes`,label:`Routes`,inspector:`router`},{id:`signals`,label:`Signals`,inspector:`signals`},{id:`injectors`,label:`Injectors`,inspector:`injectors`},{id:`store`,label:`Store`,inspector:`ngrx`},{id:`queries`,label:`Queries`,inspector:`tanstackQuery`},{id:`forms`,label:`Forms`,inspector:`forms`},{id:`pipes`,label:`Pipes`,inspector:`pipes`},{id:`network`,label:`SSR & HTTP`,inspector:`http`},{id:`errors`,label:`Errors`,inspector:`errors`},{id:`performance`,label:`Performance`,inspector:`performance`},{id:`build`,label:`Build`,inspector:`build`},{id:`capacitor`,label:`Capacitor`,inspector:`capacitor`},{id:`plugins`,label:`Plugins`,inspector:`plugins`}],nw=1e4;function rw(e){return tw.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var iw={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,signals:`a component's signal graph, by the component's id`,forms:`a form, by its id`},aw=200;function ow(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 sw(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=aw?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 cw=[{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 lw(e){let t=rw(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=cw.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function uw(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}var dw=Object.freeze({minLength:24,threshold:4.5}),fw={min:16,max:512},pw={min:2,max:6};function mw(e){return typeof e==`number`&&Number.isInteger(e)&&e>=fw.min&&e<=fw.max}function hw(e){return typeof e==`number`&&Number.isFinite(e)&&e>=pw.min&&e<=pw.max}function gw(e){if(e===!0)return{...dw};if(!e||typeof e!=`object`||Array.isArray(e))return;let{minLength:t,threshold:n}=e;return{minLength:mw(t)?t:dw.minLength,threshold:hw(n)?n:dw.threshold}}function _w(e){let t=gw(e);return t?{entropy:t}:{}}function vw(e,t){return typeof e==`boolean`?e:t}var yw=100,bw=100;function xw(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=bw);return[...new Set(t)].slice(0,yw)}function Sw(e,t){let{default:n,min:r,max:i}=UC[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function Cw(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function ww(e){let t=uw(e),n=uw(t.agent),r=uw(t.inspectors),i=uw(n.tools),a=uw(t.actions),o=vw(t.actions,!0),s=uw(t.redaction),c=uw(t.limits),l=Cw(zC,e=>vw(r[e],!0));return{inspectors:l,agent:{readOnly:vw(n.readOnly,!1),tools:Cw(zC,e=>l[e]&&vw(i[e],!0)),browserTools:vw(n.browserTools,!1)},actions:Cw(HC,e=>l[e]&&vw(a[e],o)),redaction:{secretNames:xw(s.secretNames),unmask:xw(s.unmask),..._w(s.entropy)},limits:Object.fromEntries(Object.keys(UC).map(e=>[e,Sw(c[e],e)])),popup:{hotkey:jw(uw(t.popup).hotkey)},plugins:Aw(t.plugins),lint:{rules:Ow(t.lint)},analog:Ew(t.analog),ngrx:{trace:vw(uw(t.ngrx).trace,!1)}}}var Tw=500;function Ew(e){let t=uw(e).contentSchema;return typeof t==`string`&&t.trim()&&t.length<=Tw?{contentSchema:t.trim()}:{}}var Dw=200;function Ow(e){let t=uw(uw(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,Dw))typeof r==`boolean`&&(n[e]=r);return n}var kw=100;function Aw(e){let t={};for(let[n,r]of Object.entries(uw(e)).slice(0,kw)){if(!qC.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=uw(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:vw(e.enabled,!0),tools:vw(e.tools,!0),actions:vw(e.actions,!0)})}return t}function jw(e){return e===!1?!1:QC(e)??`Alt+Shift+P`}function Mw(e){let t=e?.configs;return ww(t?.[YC])}function Nw(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state, dispatching actions and changing the Store DevTools history`,http:`Changing HTTP mock rules and SSR overrides, refetching the TransferState payload, and clearing HTTP calls`,analog:`Calling API routes, clearing server calls, running Nitro tasks and purging the Nitro cache`,components:`Editing component properties and signals`,tanstackQuery:`Invalidating and refetching TanStack queries`,plugins:`Running plugin actions`}[e]} is turned off in the devtools config (actions.${e}).`}var Pw=[`pangular:build-meta`],Fw={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,tanstackQuery:`TanStack Query`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`,plugins:`Plugins`,performance:`Performance`,build:`Build`},Iw={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore, dispatch and Store DevTools`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`,tanstackQuery:`TanStack Query invalidate and refetch`,plugins:`Plugin actions`},Lw={refreshMs:e=>`poll every ${e} ms`,navigations:e=>`${e} navigations`,formTimeline:e=>`${e} form events`,httpCalls:e=>`${e} HTTP calls`,changeLog:e=>`${e} NgRx changes`,cdCycles:e=>`${e} change detection cycles`,cdSlowMs:e=>`slow cycles over ${e} ms`,capacitorCalls:e=>`${e} Capacitor plugin calls`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function Rw(e){if(!e)return[];let t=[`On`];return e.minLength!==dw.minLength&&t.push(`${e.minLength} characters or more`),e.threshold!==dw.threshold&&t.push(`up to ${e.threshold} bits per character`),t}function zw(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=zC.filter(t=>e.inspectors[t]);n(`Inspectors off`,zC.filter(t=>!e.inspectors[t]).map(e=>Fw[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>Fw[e])),n(`Blocked actions`,HC.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>Iw[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Entropy masking`,Rw(e.redaction.entropy)),n(`Limits`,Object.keys(UC).filter(t=>e.limits[t]!==UC[t].default).map(t=>Lw[t](e.limits[t]))),e.popup.hotkey!==`Alt+Shift+P`&&n(`Popup shortcut`,[e.popup.hotkey===!1?`Off`:e.popup.hotkey]);let i=Object.entries(e.plugins??{});return n(`Plugins off`,i.filter(([,e])=>!e.enabled).map(([e])=>e)),n(`Plugin tools or actions off`,i.filter(([,e])=>e.enabled&&(!e.tools||!e.actions)).map(([e,t])=>`${e} (${[!t.tools&&`tools`,!t.actions&&`actions`].filter(Boolean).join(`, `)})`)),n(`Lint rules off`,Object.entries(e.lint?.rules??{}).filter(([,e])=>!e).map(([e])=>e)),t}function Bw(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 Vw(e){return!e.tags.length&&!e.directives.length&&!e.text}function Hw(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 Uw={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 Ww(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function Gw(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function Kw(e,t){let n=Gw(e),r=Gw(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function qw(e,t){return e?.capabilities?.[t]===!1}function Jw(e,t){let n=Uw[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=Ww(t);return Kw(t,n.since)?`${r} in a development build; this page runs Angular ${i} without it, which usually means a production build.`:`${r}; this page runs Angular ${i}.`}function Yw(e){return e.hydration===`hydrated`&&e.hydratedAt===void 0?`hydrated before inspection`:e.hydration}var Xw=/^on (viewport|interaction|hover)\b/;function Zw(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>Xw.test(e))}function Qw(e,t){let n=[],r=e.since>0?Math.max(0,Math.round((t-e.since)/1e3)):0;return e.state===`error`&&n.push({kind:`failed`,text:`failed to load`,label:`failed`}),(e.state===`placeholder`||e.state===`initial`)&&r*1e3>=1e4&&n.push(Zw(e.triggers)?{kind:`waiting`,text:`waiting for its trigger for ${r}s`,label:`waiting ${r}s`,seconds:r}:{kind:`stuck`,text:`on its placeholder for ${r}s`,label:`stuck ${r}s`,seconds:r}),e.hydrateNever?n.push({kind:`hydrate-never`,text:`hydrate never: the server HTML stays static`,label:`hydrate never`}):e.hydration===`dehydrated`&&n.push({kind:`dehydrated`,text:`still dehydrated`,label:`dehydrated`}),n}var $w=`pangular-page-id`,eT=null;function tT(e){eT=e}function nT(){if(eT)return eT;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem($w)||null)}catch{return null}}function rT(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 iT(e,t){return e?t?e.pages?.[t]??null:e:null}function aT(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function oT(){return{functions:[...Pw]}}function sT(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function cT(e,t,n){return sT(e,t,n).then(e=>e,()=>null)}function lT(e){return e?.connectionMeta.backend===`static`}function uT(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 dT(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function fT(e){return e.split(`@`)[1]??``}var pT={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},mT={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},hT=cT,gT={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 _T(e){return gT[e]??e}var vT=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function yT(e,t){return await hT(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function bT(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 xT=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function ST(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(xT,(e,t)=>t??(e===`**`?``:e))}function CT(e,t){let n=Math.max(0,e-t),r=Math.ceil(n/6e4);if(r<60)return`in ${r} min`;let i=Math.round(r/60);return i<48?`in ${i} ${i===1?`hour`:`hours`}`:`in ${Math.round(i/24)} days`}function wT(e,t){return e.length?e.join(`, `):t}function TT(e,t){let n=[];if(n.push({label:`One-time code`,value:e.auth?e.oneTimeCode.state===`locked`?`Locked after too many wrong codes: run pangular token --rotate or restart the server for a new code`:e.oneTimeCode.expiresAt?`On, current code expires ${CT(e.oneTimeCode.expiresAt,t)}`:`On`:`Off: every client is trusted`}),e.auth){let{count:r,nextExpiresAt:i,lastExpiresAt:a}=e.tokens;n.push({label:`Trusted clients`,value:r?r===1||i===a?`${r} ${r===1?`token`:`tokens`}, expires ${CT(i??t,t)}`:`${r} tokens, the first expires ${CT(i??t,t)}, the last ${CT(a??t,t)}`:`None`}),e.pairingTokens&&n.push({label:`Pairing tokens`,value:`${e.pairingTokens} accepted instead of the code`})}return e.reported?(n.push({label:`Reach`,value:e.network?`This machine and other machines`:`This machine only`}),n.push({label:`Allowed origins`,value:e.originCheck?`${wT(e.allowedOrigins,`This machine and the Chrome extension`)}${e.customOrigins?`, plus a custom origin check`:``}`:`Any: the origin check is off`}),(e.allowedHosts===`any`||e.allowedHosts.length)&&n.push({label:`Allowed hosts`,value:e.allowedHosts===`any`?`Any`:e.allowedHosts.join(`, `)}),n):n}function ET(e){return Mw(e?.connectionMeta)}function DT(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function OT(e,t){if(!t||typeof t!=`object`)return e;let n=DT(t.secretNames),r=DT(t.unmask);if(!n||!r)return e;let i=gw(t.entropy);return{...e,redaction:i?{secretNames:n,unmask:r,entropy:i}:{secretNames:n,unmask:r}}}function kT(e,t){return ET(e).actions[t]}var AT={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,queries:`tanstackQuery`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`,plugins:`plugins`,performance:`performance`,build:`build`};function jT(e){return AT[e]}var MT=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function NT(e,t){let n=AT[e];return!n||t.inspectors[n]}function PT(e,t){e&1&&(w(),ug(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function FT(e,t){e&1&&(w(),ug(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function IT(e,t){e&1&&(w(),ug(0,`path`,13)(1,`path`,14))}function LT(e,t){e&1&&(w(),ug(0,`path`,15)(1,`path`,16)(2,`path`,17))}function RT(e,t){e&1&&(w(),ug(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function zT(e,t){e&1&&(w(),ug(0,`path`,1))}function BT(e,t){e&1&&(w(),ug(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function VT(e,t){e&1&&(w(),ug(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function HT(e,t){e&1&&(w(),ug(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function UT(e,t){e&1&&(w(),ug(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function WT(e,t){e&1&&(w(),ug(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function GT(e,t){e&1&&(w(),ug(0,`circle`,39)(1,`path`,40))}function KT(e,t){e&1&&(w(),ug(0,`ellipse`,41)(1,`path`,42)(2,`path`,43)(3,`path`,44)(4,`path`,45))}function qT(e,t){e&1&&(w(),ug(0,`circle`,32)(1,`path`,46)(2,`path`,47))}function JT(e,t){e&1&&(w(),ug(0,`path`,48)(1,`path`,49))}function YT(e,t){e&1&&(w(),ug(0,`path`,50)(1,`path`,51)(2,`path`,52))}function XT(e,t){e&1&&(w(),ug(0,`path`,2))}function ZT(e,t){e&1&&(w(),ug(0,`path`,3))}function QT(e,t){e&1&&(w(),ug(0,`path`,4))}var $T=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:20,vars:1,consts:[[`viewBox`,`0 0 24 24`,`width`,`16`,`height`,`16`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1.8`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`,`aria-hidden`,`true`],[`d`,`M22 12h-4l-3 9L9 3l-3 9H2`],[`d`,`M10 3h4v3a2 2 0 1 0 4 0V5h1a2 2 0 0 1 2 2v4h-2a2 2 0 1 0 0 4h2v4a2 2 0 0 1-2 2h-4v-2a2 2 0 1 0-4 0v2H7a2 2 0 0 1-2-2v-4H4a2 2 0 1 1 0-4h1V7a2 2 0 0 1 2-2h3Z`],[`d`,`m8 3 4 8 5-5 5 15H2L8 3z`],[`fill`,`currentColor`,`stroke`,`none`,`transform`,`translate(1.8 1.8) scale(0.85)`,`d`,`M24 3.7l-5.766 5.766 5.725 5.736-3.713 3.712L5.073 3.742 8.786.03l5.736 5.726L20.284 0 24 3.7zM.029 8.785l3.713-3.713 15.173 15.173-3.713 3.714-5.732-5.726L3.7 24 0 20.285l5.754-5.764L.029 8.785z`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`x`,`14`,`y`,`12`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`3`,`y`,`16`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`d`,`M3 12h18`],[`cx`,`7`,`cy`,`12`,`r`,`2`],[`cx`,`14`,`cy`,`12`,`r`,`2`],[`d`,`M18 7v10`],[`d`,`M9 11l2 2 4-4`],[`d`,`M12 3 4 6v6c0 4.5 3.4 8.3 8 9 4.6-.7 8-4.5 8-9V6l-8-3Z`],[`d`,`M12 2 3 7l9 5 9-5-9-5Z`],[`d`,`m3 12 9 5 9-5`],[`d`,`m3 17 9 5 9-5`],[`cx`,`6`,`cy`,`19`,`r`,`3`],[`d`,`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`],[`cx`,`18`,`cy`,`5`,`r`,`3`],[`d`,`M12 22v-5`],[`d`,`M9 8V2`],[`d`,`M15 8V2`],[`d`,`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`],[`cx`,`12`,`cy`,`5`,`rx`,`9`,`ry`,`3`],[`d`,`M3 5v14a9 3 0 0 0 18 0V5`],[`d`,`M3 12a9 3 0 0 0 18 0`],[`x`,`3`,`y`,`4`,`width`,`18`,`height`,`16`,`rx`,`2`],[`d`,`M7 9h10`],[`d`,`M7 13h6`],[`d`,`M7 17h8`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18Z`],[`d`,`M4 7h10`],[`d`,`M4 17h6`],[`d`,`m14 13 4 4-4 4`],[`d`,`M10 17h8`],[`cx`,`18`,`cy`,`7`,`r`,`3`],[`cx`,`12`,`cy`,`12`,`r`,`3`],[`d`,`M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z`],[`cx`,`11`,`cy`,`5`,`rx`,`8`,`ry`,`3`],[`d`,`M3 5v6c0 1.66 3.58 3 8 3`],[`d`,`M3 11v6c0 1.66 3.58 3 8 3`],[`d`,`M21 14a4 4 0 1 1-1.2-2.85L21 12.3`],[`d`,`M21 9v3.3h-3.3`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`],[`d`,`M12 14l4-4`],[`d`,`M3.34 19a10 10 0 1 1 17.32 0`],[`d`,`M21 16V8l-9-5-9 5v8l9 5 9-5Z`],[`d`,`m3.3 7 8.7 5 8.7-5`],[`d`,`M12 22V12`]],template:function(e,t){if(e&1&&(w(),R(0,`svg`,0),A(1,PT,4,0)(2,FT,4,0)(3,IT,2,0)(4,LT,3,0)(5,RT,3,0)(6,zT,1,0,`:svg:path`,1)(7,BT,4,0)(8,VT,3,0)(9,HT,4,0)(10,UT,3,0)(11,WT,5,0)(12,GT,2,0)(13,KT,5,0)(14,qT,3,0)(15,JT,2,0)(16,YT,3,0)(17,XT,1,0,`:svg:path`,2)(18,ZT,1,0,`:svg:path`,3)(19,QT,1,0,`:svg:path`,4),z()),e&2){let e;D(),j((e=t.name())===`dashboard`?1:e===`timeline`?2:e===`audit`?3:e===`components`?4:e===`routes`?5:e===`signals`?6:e===`injectors`?7:e===`store`?8:e===`forms`?9:e===`network`?10:e===`pipes`?11:e===`settings`?12:e===`queries`?13:e===`errors`?14:e===`performance`?15:e===`build`?16:e===`plugins`?17:e===`analog`?18:e===`capacitor`?19:-1)}},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-shrink: 0; -}`]})},sE=(e,t)=>t.tab,cE=(e,t)=>t.label;function lE(e,t){e&1&&K(0),e&2&&J(` `,W().meta()?.projectName,` `)}function uE(e,t){e&1&&K(0,` Project details unavailable `)}function dE(e,t){e&1&&K(0,` Loading… `)}function fE(e,t){e&1&&(K(0,` Run `),F(1,`code`),K(2,`pangular build`),I(),K(3,` again to rebuild the report. `))}function pE(e,t){e&1&&K(0,` Check that the dev server is running. `)}function mE(e,t){if(e&1){let e=B();F(0,`button`,13),H(`click`,function(){return S(e),C(W(2).loadMeta())}),K(1,`Try again`),I()}}function hE(e,t){if(e&1&&(F(0,`p`,11),A(1,fE,4,0)(2,pE,1,0),I(),A(3,mE,2,0,`button`,12)),e&2){let e=W();D(),j(e.staticReport()?1:2),D(2),j(e.staticReport()?-1:3)}}function gE(e,t){e&1&&(F(0,`li`,5)(1,`span`),K(2,`Analog`),I(),K(3),I()),e&2&&(D(3),q(t))}function _E(e,t){e&1&&(F(0,`li`)(1,`span`),K(2,`Change detection`),I(),K(3),I()),e&2&&(D(3),q(t))}function vE(e,t){if(e&1&&(F(0,`span`,20),K(1),I(),F(2,`span`,21),K(3),I()),e&2){let e=W().$implicit,t=W();D(),q(t.cards()[e.tab]?.value),D(2),q(t.cards()[e.tab]?.sub)}}function yE(e,t){e&1&&(F(0,`span`,22),K(1,`–`),I(),F(2,`span`,21),K(3,`Count unavailable`),I())}function bE(e,t){e&1&&(L(0,`span`,23),F(1,`span`,21),K(2,`Counting…`),I())}function xE(e,t){if(e&1){let e=B();F(0,`button`,14),H(`click`,function(){let t=S(e).$implicit;return C(W().navigate.emit(t.tab))}),F(1,`span`,15)(2,`span`,16),L(3,`app-tab-icon`,17),I(),F(4,`span`,18),K(5,`→`),I()(),F(6,`span`,19),K(7),I(),A(8,vE,4,2)(9,yE,4,0)(10,bE,3,0),I()}if(e&2){let e,n=t.$implicit,r=t.$index,i=W().stateOf(n.tab);n_(`animation-delay`,60*r,`ms`),k(`aria-busy`,i===`loading`),D(3),P(`name`,n.tab),D(4),q(n.label),D(),j((e=i)===`ready`?8:e===`error`?9:10)}}function SE(e,t){e&1&&(F(0,`p`),K(1,`Loading…`),I())}function CE(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function wE(e,t){if(e&1&&(F(0,`dl`),M(1,CE,5,2,`div`,null,cE),I()),e&2){let e=W();D(),N(e.configItems())}}function TE(e,t){e&1&&(F(0,`p`),K(1,`Defaults`),I())}function EE(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function DE(e,t){e&1&&(F(0,`section`,10)(1,`h2`,24),K(2,`Security`),I(),F(3,`dl`),M(4,EE,5,2,`div`,null,cE),I()()),e&2&&(D(4),N(t))}var OE=[{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 kE(e){return OE.filter(t=>BT(t.tab,e))}var AE={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function jE(e){return e&&Object.hasOwn(AE,e)?AE[e]:null}var ME=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),NE={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 PE(e,t,n){return`${e} ${e===1?t:n}`}function FE(e,t){for(let n of e??[])t(n),FE(n.children,t)}function IE(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 · ${PE(t,`directive`,`directives`)}`}}function LE(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 · ${PE(t,`redirect`,`redirects`)}`}}function RE(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]=NE[e]??[e,e];return PE(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function zE(e,t){let n=e?.forms??[],r=t?n.filter(e=>yT(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 BE(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function VE(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(BE).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var HE=class e{rpc=$(null);navigate=lv();staticReport=X(()=>gT(this.rpc()));meta=T(null);security=T(null);redaction=T(null);config=X(()=>FT(NT(this.rpc()),this.redaction()));stats=X(()=>this.rpc()?kE(this.config()):[]);configItems=X(()=>Kw(this.config()));metaState=T(`loading`);states=T({});rows=T({});injectorTree=T(null);signalGraph=T(null);formsState=T(null);httpState=T(null);pageId=lT();destroyRef=x(Ss);stopLive=[];zone=X(()=>jE(dT(this.injectorTree(),this.pageId)?.zone));liveInjectors=X(()=>{let e=dT(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return FE(e.roots,r),FE(e.environment,r),{injectors:t,providers:n}});liveSignals=X(()=>{let e=fT(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>ME.has(e.kind??``)).length:null});cards=X(()=>{let e=this.rows(),t={};if(e.components&&(t.components=IE(e.components)),e.routes&&(t.routes=LE(e.routes)),e.store&&(t.store=RE(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 · ${PE(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=zE(i,this.pageId));let a=this.httpState();return a&&(t.network=VE(a,this.pageId)),t});loadMeta(e=this.rpc()){e&&(this.metaState.set(`loading`),e.scope(`pangular`).rpc.call(`build-meta`).then(t=>{this.rpc()===e&&(this.meta.set(t),this.metaState.set(`ready`))}).catch(()=>{this.rpc()===e&&this.metaState.set(`error`)}))}loadRedaction(e){this.redaction.set(null),!gT(e)&&mT(e,`redaction-config`).then(t=>{this.rpc()===e&&this.redaction.set(t)}).catch(()=>{})}loadSecurity(e){this.security.set(null),!gT(e)&&hT(e,`security-status`).then(t=>{this.rpc()===e&&t&&this.security.set(MT(t,Date.now()))})}constructor(){E(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`pangular`);this.states.set({}),this.rows.set({}),this.formsState.set(null),this.httpState.set(null),this.loadMeta(e),this.loadRedaction(e),this.loadSecurity(e);let n=NT(e),r=e=>BT(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)),BT(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),BT(`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=O({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:34,vars:15,consts:[[`aria-labelledby`,`project-title`,1,`project`],[1,`project-head`],[1,`eyebrow`],[`id`,`project-title`],[1,`chips`],[1,`analog`],[1,`grid`],[`type`,`button`,1,`stat`,3,`animation-delay`],[`aria-labelledby`,`config-title`,1,`config`],[`id`,`config-title`],[`aria-labelledby`,`security-title`,1,`config`],[1,`hint`],[`type`,`button`,1,`retry`],[`type`,`button`,1,`retry`,3,`click`],[`type`,`button`,1,`stat`,3,`click`],[1,`top`],[1,`icon`],[3,`name`],[`aria-hidden`,`true`,1,`go`],[1,`label`],[1,`big`],[1,`sub`],[1,`big`,`muted`],[`aria-hidden`,`true`,1,`big`,`skeleton`],[`id`,`security-title`]],template:function(e,t){if(e&1&&(F(0,`section`,0)(1,`div`,1)(2,`p`,2),K(3,`Project`),I(),F(4,`h2`,3),A(5,lE,1,1)(6,uE,1,0)(7,dE,1,0),I(),A(8,hE,4,2),I(),F(9,`ul`,4)(10,`li`)(11,`span`),K(12,`Angular`),I(),K(13),I(),F(14,`li`)(15,`span`),K(16,`TypeScript`),I(),K(17),I(),F(18,`li`)(19,`span`),K(20,`SSR`),I(),K(21),I(),A(22,gE,4,1,`li`,5),A(23,_E,4,1,`li`),I()(),F(24,`div`,6),M(25,xE,11,6,`button`,7,sE),I(),F(27,`section`,8)(28,`h2`,9),K(29,`Configuration`),I(),A(30,SE,2,0,`p`)(31,wE,3,0,`dl`)(32,TE,2,0,`p`),I(),A(33,DE,6,0,`section`,10)),e&2){let e,n,r,i;k(`aria-busy`,t.metaState()===`loading`),D(4),G(`muted`,t.metaState()!==`ready`),D(),j((e=t.metaState())===`ready`?5:e===`error`?6:7),D(3),j(t.metaState()===`error`?8:-1),D(),G(`pending`,t.metaState()===`loading`),D(4),q(t.meta()?.angularVersion??`…`),D(4),q(t.meta()?.typescript??`…`),D(4),q(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),D(),j((n=t.meta()?.analog)?22:-1,n),D(),j((r=t.zone())?23:-1,r),D(2),N(t.stats()),D(2),k(`aria-busy`,!t.rpc()),D(3),j(t.rpc()?t.configItems().length?31:32:30),D(3),j((i=t.security())?33:-1,i)}},dependencies:[oE],styles:[`[_nghost-%COMP%] { +}`]})},eE=(e,t)=>t.tab,tE=(e,t)=>t.label;function nE(e,t){e&1&&K(0),e&2&&J(` `,W().meta()?.projectName,` `)}function rE(e,t){e&1&&K(0,` Project details unavailable `)}function iE(e,t){e&1&&K(0,` Loading… `)}function aE(e,t){e&1&&(K(0,` Run `),F(1,`code`),K(2,`pangular build`),I(),K(3,` again to rebuild the report. `))}function oE(e,t){e&1&&K(0,` Check that the dev server is running. `)}function sE(e,t){if(e&1){let e=B();F(0,`button`,13),H(`click`,function(){return S(e),C(W(2).loadMeta())}),K(1,`Try again`),I()}}function cE(e,t){if(e&1&&(F(0,`p`,11),A(1,aE,4,0)(2,oE,1,0),I(),A(3,sE,2,0,`button`,12)),e&2){let e=W();D(),j(e.staticReport()?1:2),D(2),j(e.staticReport()?-1:3)}}function lE(e,t){e&1&&(F(0,`li`,5)(1,`span`),K(2,`Analog`),I(),K(3),I()),e&2&&(D(3),q(t))}function uE(e,t){e&1&&(F(0,`li`)(1,`span`),K(2,`Change detection`),I(),K(3),I()),e&2&&(D(3),q(t))}function dE(e,t){if(e&1&&(F(0,`span`,20),K(1),I(),F(2,`span`,21),K(3),I()),e&2){let e=W().$implicit,t=W();D(),q(t.cards()[e.tab]?.value),D(2),q(t.cards()[e.tab]?.sub)}}function fE(e,t){e&1&&(F(0,`span`,22),K(1,`–`),I(),F(2,`span`,21),K(3,`Count unavailable`),I())}function pE(e,t){e&1&&(L(0,`span`,23),F(1,`span`,21),K(2,`Counting…`),I())}function mE(e,t){if(e&1){let e=B();F(0,`button`,14),H(`click`,function(){let t=S(e).$implicit;return C(W().navigate.emit(t.tab))}),F(1,`span`,15)(2,`span`,16),L(3,`app-tab-icon`,17),I(),F(4,`span`,18),K(5,`→`),I()(),F(6,`span`,19),K(7),I(),A(8,dE,4,2)(9,fE,4,0)(10,pE,3,0),I()}if(e&2){let e,n=t.$implicit,r=t.$index,i=W().stateOf(n.tab);e_(`animation-delay`,60*r,`ms`),k(`aria-busy`,i===`loading`),D(3),P(`name`,n.tab),D(4),q(n.label),D(),j((e=i)===`ready`?8:e===`error`?9:10)}}function hE(e,t){e&1&&(F(0,`p`),K(1,`Loading…`),I())}function gE(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function _E(e,t){if(e&1&&(F(0,`dl`),M(1,gE,5,2,`div`,null,tE),I()),e&2){let e=W();D(),N(e.configItems())}}function vE(e,t){e&1&&(F(0,`p`),K(1,`Defaults`),I())}function yE(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function bE(e,t){e&1&&(F(0,`section`,10)(1,`h2`,24),K(2,`Security`),I(),F(3,`dl`),M(4,yE,5,2,`div`,null,tE),I()()),e&2&&(D(4),N(t))}var xE=[{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 SE(e){return xE.filter(t=>NT(t.tab,e))}var CE={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function wE(e){return e&&Object.hasOwn(CE,e)?CE[e]:null}var TE=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),EE={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 DE(e,t,n){return`${e} ${e===1?t:n}`}function OE(e,t){for(let n of e??[])t(n),OE(n.children,t)}function kE(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 · ${DE(t,`directive`,`directives`)}`}}function AE(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 · ${DE(t,`redirect`,`redirects`)}`}}function jE(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]=EE[e]??[e,e];return DE(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function ME(e,t){let n=e?.forms??[],r=t?n.filter(e=>fT(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 NE(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function PE(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(NE).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var FE=class e{rpc=$(null);navigate=sv();staticReport=X(()=>lT(this.rpc()));meta=T(null);security=T(null);redaction=T(null);config=X(()=>OT(ET(this.rpc()),this.redaction()));stats=X(()=>this.rpc()?SE(this.config()):[]);configItems=X(()=>zw(this.config()));metaState=T(`loading`);states=T({});rows=T({});injectorTree=T(null);signalGraph=T(null);formsState=T(null);httpState=T(null);pageId=nT();destroyRef=x(xs);stopLive=[];zone=X(()=>wE(iT(this.injectorTree(),this.pageId)?.zone));liveInjectors=X(()=>{let e=iT(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return OE(e.roots,r),OE(e.environment,r),{injectors:t,providers:n}});liveSignals=X(()=>{let e=aT(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>TE.has(e.kind??``)).length:null});cards=X(()=>{let e=this.rows(),t={};if(e.components&&(t.components=kE(e.components)),e.routes&&(t.routes=AE(e.routes)),e.store&&(t.store=jE(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 · ${DE(r.providers,`provider`,`providers`)}`}:e.injectors&&(t.injectors={value:e.injectors.filter(e=>e.type!==`injection`).length,sub:`provider declarations in source`});let i=this.formsState();i&&(t.forms=ME(i,this.pageId));let a=this.httpState();return a&&(t.network=PE(a,this.pageId)),t});loadMeta(e=this.rpc()){e&&(this.metaState.set(`loading`),e.scope(`pangular`).rpc.call(`build-meta`).then(t=>{this.rpc()===e&&(this.meta.set(t),this.metaState.set(`ready`))}).catch(()=>{this.rpc()===e&&this.metaState.set(`error`)}))}loadRedaction(e){this.redaction.set(null),!lT(e)&&sT(e,`redaction-config`).then(t=>{this.rpc()===e&&this.redaction.set(t)}).catch(()=>{})}loadSecurity(e){this.security.set(null),!lT(e)&&cT(e,`security-status`).then(t=>{this.rpc()===e&&t&&this.security.set(TT(t,Date.now()))})}constructor(){E(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`pangular`);this.states.set({}),this.rows.set({}),this.formsState.set(null),this.httpState.set(null),this.loadMeta(e),this.loadRedaction(e),this.loadSecurity(e);let n=ET(e),r=e=>NT(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)),NT(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),NT(`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=O({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:34,vars:15,consts:[[`aria-labelledby`,`project-title`,1,`project`],[1,`project-head`],[1,`eyebrow`],[`id`,`project-title`],[1,`chips`],[1,`analog`],[1,`grid`],[`type`,`button`,1,`stat`,3,`animation-delay`],[`aria-labelledby`,`config-title`,1,`config`],[`id`,`config-title`],[`aria-labelledby`,`security-title`,1,`config`],[1,`hint`],[`type`,`button`,1,`retry`],[`type`,`button`,1,`retry`,3,`click`],[`type`,`button`,1,`stat`,3,`click`],[1,`top`],[1,`icon`],[3,`name`],[`aria-hidden`,`true`,1,`go`],[1,`label`],[1,`big`],[1,`sub`],[1,`big`,`muted`],[`aria-hidden`,`true`,1,`big`,`skeleton`],[`id`,`security-title`]],template:function(e,t){if(e&1&&(F(0,`section`,0)(1,`div`,1)(2,`p`,2),K(3,`Project`),I(),F(4,`h2`,3),A(5,nE,1,1)(6,rE,1,0)(7,iE,1,0),I(),A(8,cE,4,2),I(),F(9,`ul`,4)(10,`li`)(11,`span`),K(12,`Angular`),I(),K(13),I(),F(14,`li`)(15,`span`),K(16,`TypeScript`),I(),K(17),I(),F(18,`li`)(19,`span`),K(20,`SSR`),I(),K(21),I(),A(22,lE,4,1,`li`,5),A(23,uE,4,1,`li`),I()(),F(24,`div`,6),M(25,mE,11,6,`button`,7,eE),I(),F(27,`section`,8)(28,`h2`,9),K(29,`Configuration`),I(),A(30,hE,2,0,`p`)(31,_E,3,0,`dl`)(32,vE,2,0,`p`),I(),A(33,bE,6,0,`section`,10)),e&2){let e,n,r,i;k(`aria-busy`,t.metaState()===`loading`),D(4),G(`muted`,t.metaState()!==`ready`),D(),j((e=t.metaState())===`ready`?5:e===`error`?6:7),D(3),j(t.metaState()===`error`?8:-1),D(),G(`pending`,t.metaState()===`loading`),D(4),q(t.meta()?.angularVersion??`…`),D(4),q(t.meta()?.typescript??`…`),D(4),q(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),D(),j((n=t.meta()?.analog)?22:-1,n),D(),j((r=t.zone())?23:-1,r),D(2),N(t.stats()),D(2),k(`aria-busy`,!t.rpc()),D(3),j(t.rpc()?t.configItems().length?31:32:30),D(3),j((i=t.security())?33:-1,i)}},dependencies:[$T],styles:[`[_nghost-%COMP%] { display: block; max-width: 1200px; } @@ -325,7 +325,7 @@ h2.muted[_ngcontent-%COMP%] { .skeleton[_ngcontent-%COMP%] { animation: none; } -}`]})},UE=`pangular:panel-action-result`,WE=6e3,GE=0;function KE(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function qE(e,t=window){let n=`pa-${Date.now().toString(36)}-${++GE}`;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!==UE||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`}),WE);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var JE=class e{available=KE();reveal(e,t){return qE({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return qE({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=kl({token:e,factory:e.ɵfac})};function YE(e){return new Date(e).toLocaleTimeString()}var XE=/[ \t\n\r]/;function ZE(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;et.name;function eD(e,t){e&1&&(R(0,`span`,11),K(1,`impure`),z())}function tD(e,t){e&1&&(R(0,`span`,11),K(1,`churning`),z())}function nD(e,t){e&1&&(R(0,`span`,11),K(1,`stale?`),z())}function rD(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W(2).$implicit,t=W(3);D(),q(t.plural(e.calls,`call`))}}function iD(e,t){if(e&1){let e=B();R(0,`button`,7),U(`click`,function(){S(e);let t=W().$implicit;return C(W(3).showPipe.emit(t.name))}),R(1,`span`,8),K(2,`Show in Pipes:`),z(),R(3,`span`,9),K(4),z(),R(5,`span`,10),K(6),z(),A(7,eD,2,0,`span`,11),A(8,tD,2,0,`span`,11),A(9,nD,2,0,`span`,11),A(10,rD,2,1,`span`,10),z()}if(e&2){let e=W().$implicit;D(4),q(e.name),D(2),J(``,e.uses,`×`),D(),j(e.isPure?-1:7),D(),j(e.churn?8:-1),D(),j(e.stale?9:-1),D(),j(e.calls===void 0?-1:10)}}function aD(e,t){e&1&&(R(0,`span`,11),K(1,`impure`),z())}function oD(e,t){if(e&1&&(R(0,`span`,6)(1,`span`,9),K(2),z(),R(3,`span`,10),K(4),z(),A(5,aD,2,0,`span`,11),z()),e&2){let e=W().$implicit;D(2),q(e.name),D(2),J(``,e.uses,`×`),D(),j(e.isPure?-1:5)}}function sD(e,t){if(e&1&&(R(0,`li`),A(1,iD,11,6,`button`,5)(2,oD,6,3,`span`,6),z()),e&2){let e=W(3);D(),j(e.canShowPipes()?1:2)}}function cD(e,t){if(e&1&&(R(0,`ul`,3),M(1,sD,3,1,`li`,null,$E),z(),R(3,`p`,4),K(4,` Call counts cover every component that uses the pipe. Record calls in the Pipes tab to see them. `),z()),e&2){let e=W(2);D(),N(e.rows())}}function lD(e,t){e&1&&(R(0,`p`,2),K(1,`No pipe is in use in the rendered part of its template.`),z())}function uD(e,t){if(e&1&&(R(0,`div`,0)(1,`h3`),K(2,` Pipes in template `),R(3,`span`,1),K(4),z()(),A(5,cD,5,0)(6,lD,2,0,`p`,2),z()),e&2){let e=W();D(4),q(e.rows().length),D(),j(e.rows().length?5:6)}}function dD(e,t,n){let r=(t?e?.pages?.find(e=>e.pageId===t):void 0)?.pipes??e?.pipes??[],i=[];for(let e of r){let t=e.components.find(e=>e.name===n);t&&i.push({name:e.name,isPure:e.isPure,uses:t.count,...e.call?{calls:e.call.callCount}:{},churn:!!e.churn,stale:!!e.stale})}return i.sort((e,t)=>e.name.localeCompare(t.name))}var fD=class e{plural=QE;destroyRef=x(Ss);rpc=$(null);pageId=$(void 0);component=$.required();canShowPipes=$(!1);showPipe=lv();snapshot=T(void 0);loaded=T(!1);rows=X(()=>dD(this.snapshot(),this.pageId(),this.component()));unsubscribe;constructor(){E(()=>{let e=this.rpc();e&&this.subscribe(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async subscribe(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`pipe-usage`);if(this.destroyRef.destroyed)return;let n=e=>{this.snapshot.set(e),this.loaded.set(!0)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-component-pipes`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],component:[1,`component`],canShowPipes:[1,`canShowPipes`]},outputs:{showPipe:`showPipe`},decls:1,vars:1,consts:[[1,`block`],[1,`pill`],[1,`empty-line`],[1,`chips`],[1,`hint`],[`type`,`button`,1,`pipe`],[1,`pipe`],[`type`,`button`,1,`pipe`,3,`click`],[1,`sr-only`],[1,`mono`],[1,`note`],[1,`flag`,`warn`]],template:function(e,t){e&1&&A(0,uD,7,2,`div`,0),e&2&&j(t.loaded()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},IE=`pangular:panel-action-result`,LE=6e3,RE=0;function zE(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function BE(e,t=window){let n=`pa-${Date.now().toString(36)}-${++RE}`;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!==IE||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`}),LE);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var VE=class e{available=zE();reveal(e,t){return BE({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return BE({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=Ol({token:e,factory:e.ɵfac})};function HE(e){return new Date(e).toLocaleTimeString()}var UE=/[ \t\n\r]/;function WE(e){let t=e.trim(),n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n)return null;let r=``,i=0,a=()=>`\n${` `.repeat(i)}`;for(let e=0;et.name;function qE(e,t){e&1&&(R(0,`span`,11),K(1,`impure`),z())}function JE(e,t){e&1&&(R(0,`span`,11),K(1,`churning`),z())}function YE(e,t){e&1&&(R(0,`span`,11),K(1,`stale?`),z())}function XE(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W(2).$implicit,t=W(3);D(),q(t.plural(e.calls,`call`))}}function ZE(e,t){if(e&1){let e=B();R(0,`button`,7),U(`click`,function(){S(e);let t=W().$implicit;return C(W(3).showPipe.emit(t.name))}),R(1,`span`,8),K(2,`Show in Pipes:`),z(),R(3,`span`,9),K(4),z(),R(5,`span`,10),K(6),z(),A(7,qE,2,0,`span`,11),A(8,JE,2,0,`span`,11),A(9,YE,2,0,`span`,11),A(10,XE,2,1,`span`,10),z()}if(e&2){let e=W().$implicit;D(4),q(e.name),D(2),J(``,e.uses,`×`),D(),j(e.isPure?-1:7),D(),j(e.churn?8:-1),D(),j(e.stale?9:-1),D(),j(e.calls===void 0?-1:10)}}function QE(e,t){e&1&&(R(0,`span`,11),K(1,`impure`),z())}function $E(e,t){if(e&1&&(R(0,`span`,6)(1,`span`,9),K(2),z(),R(3,`span`,10),K(4),z(),A(5,QE,2,0,`span`,11),z()),e&2){let e=W().$implicit;D(2),q(e.name),D(2),J(``,e.uses,`×`),D(),j(e.isPure?-1:5)}}function eD(e,t){if(e&1&&(R(0,`li`),A(1,ZE,11,6,`button`,5)(2,$E,6,3,`span`,6),z()),e&2){let e=W(3);D(),j(e.canShowPipes()?1:2)}}function tD(e,t){if(e&1&&(R(0,`ul`,3),M(1,eD,3,1,`li`,null,KE),z(),R(3,`p`,4),K(4,` Call counts cover every component that uses the pipe. Record calls in the Pipes tab to see them. `),z()),e&2){let e=W(2);D(),N(e.rows())}}function nD(e,t){e&1&&(R(0,`p`,2),K(1,`No pipe is in use in the rendered part of its template.`),z())}function rD(e,t){if(e&1&&(R(0,`div`,0)(1,`h3`),K(2,` Pipes in template `),R(3,`span`,1),K(4),z()(),A(5,tD,5,0)(6,nD,2,0,`p`,2),z()),e&2){let e=W();D(4),q(e.rows().length),D(),j(e.rows().length?5:6)}}function iD(e,t,n){let r=(t?e?.pages?.find(e=>e.pageId===t):void 0)?.pipes??e?.pipes??[],i=[];for(let e of r){let t=e.components.find(e=>e.name===n);t&&i.push({name:e.name,isPure:e.isPure,uses:t.count,...e.call?{calls:e.call.callCount}:{},churn:!!e.churn,stale:!!e.stale})}return i.sort((e,t)=>e.name.localeCompare(t.name))}var aD=class e{plural=GE;destroyRef=x(xs);rpc=$(null);pageId=$(void 0);component=$.required();canShowPipes=$(!1);showPipe=sv();snapshot=T(void 0);loaded=T(!1);rows=X(()=>iD(this.snapshot(),this.pageId(),this.component()));unsubscribe;constructor(){E(()=>{let e=this.rpc();e&&this.subscribe(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async subscribe(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`pipe-usage`);if(this.destroyRef.destroyed)return;let n=e=>{this.snapshot.set(e),this.loaded.set(!0)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-component-pipes`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],component:[1,`component`],canShowPipes:[1,`canShowPipes`]},outputs:{showPipe:`showPipe`},decls:1,vars:1,consts:[[1,`block`],[1,`pill`],[1,`empty-line`],[1,`chips`],[1,`hint`],[`type`,`button`,1,`pipe`],[1,`pipe`],[`type`,`button`,1,`pipe`,3,`click`],[1,`sr-only`],[1,`mono`],[1,`note`],[1,`flag`,`warn`]],template:function(e,t){e&1&&A(0,rD,7,2,`div`,0),e&2&&j(t.loaded()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -436,7 +436,7 @@ button.pipe[_ngcontent-%COMP%]:focus-visible { button.pipe[_ngcontent-%COMP%] { transition: none; } -}`]})};function pD(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function mD(e){let t=x(Ss),n=T({}),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(pD(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return E(()=>{let t=e();t&&t!==r&&Z(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function hD(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 gD=[`*`];function _D(e,t){if(e&1&&(R(0,`div`,1)(1,`p`,2),K(2),z(),R(3,`p`,3),K(4),jg(5),R(6,`a`,4),K(7,`Supported versions`),z()()()),e&2){let e=W();G(`compact`,e.compact()),D(2),q(e.title()),D(2),J(` `,t,` `),D(2),V(`href`,e.docsUrl,Du)}}var vD=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,yD=class e{page=$(null);capability=$.required();missing=$(!1,{transform:bv});compact=$(!1,{transform:bv});docsUrl=vD;text=X(()=>{let e=this.page();return!this.missing()&&!eT(e,this.capability())?null:tT(this.capability(),e?.version)});title=X(()=>{let e=this.page()?.version;return e?`Not available on Angular ${Zw(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:gD,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&&(Ag(),A(0,_D,8,5,`div`,0)),e&2){let e;j((e=t.text())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})};function oD(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function sD(e){let t=x(xs),n=T({}),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(oD(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return E(()=>{let t=e();t&&t!==r&&Z(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function cD(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 lD=[`*`];function uD(e,t){if(e&1&&(R(0,`div`,1)(1,`p`,2),K(2),z(),R(3,`p`,3),K(4),kg(5),R(6,`a`,4),K(7,`Supported versions`),z()()()),e&2){let e=W();G(`compact`,e.compact()),D(2),q(e.title()),D(2),J(` `,t,` `),D(2),V(`href`,e.docsUrl,Eu)}}var dD=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,fD=class e{page=$(null);capability=$.required();missing=$(!1,{transform:vv});compact=$(!1,{transform:vv});docsUrl=dD;text=X(()=>{let e=this.page();return!this.missing()&&!qw(e,this.capability())?null:Jw(this.capability(),e?.version)});title=X(()=>{let e=this.page()?.version;return e?`Not available on Angular ${Ww(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:lD,decls:1,vars:1,consts:[[`role`,`status`,1,`unavailable`,3,`compact`],[`role`,`status`,1,`unavailable`],[1,`title`],[1,`hint`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){if(e&1&&(Og(),A(0,uD,8,5,`div`,0)),e&2){let e;j((e=t.text())?0:-1,e)}},styles:[`[_nghost-%COMP%] { display: block; } @@ -483,7 +483,7 @@ a[_ngcontent-%COMP%] { a[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})};function bD(e){return e?.platform===`angular-native`}function xD(e){return bD(e)||e?.platform===`nativescript`}function SD(e,t){let n=Object.values(e??{}).filter(bD);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 CD=[`trigger`],wD=[`list`],TD=(e,t)=>t.value;function ED(e,t){if(e&1&&(R(0,`span`,4),K(1),z()),e&2){let e=W();D(),q(e.current().hint)}}function DD(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=W().$implicit;D(),q(e.hint)}}function OD(e,t){if(e&1){let e=B();R(0,`li`,11),U(`pointerenter`,function(){let t=S(e).$index;return C(W(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=S(e).$index;return C(W(2).choose(t))}),w(),R(1,`svg`,12),fg(2,`path`,13),z(),fs(),R(3,`span`,14),K(4),z(),A(5,DD,2,1,`span`,15),z()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active())(`selected`,e.value===r.value()),k(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),D(4),q(e.label),D(),j(e.hint?5:-1)}}function kD(e,t){if(e&1&&(R(0,`li`,10),K(1),z()),e&2){let e=W(2);D(),q(e.emptyText())}}function AD(e,t){if(e&1&&(R(0,`ul`,8,1),Hh(`list-in`),U(`pointerdown`,function(e){return e.preventDefault()}),M(2,OD,6,9,`li`,9,TD,!1,kD,2,1,`li`,10),z()),e&2){let e=W();G(`up`,e.dropUp()),k(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),D(2),N(e.options())}}var jD=0,MD=class e{options=$.required();value=mv(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++jD}`;open=T(!1);active=T(-1);dropUp=T(!1);current=X(()=>this.options().find(e=>e.value===this.value())??null);host=x(Ml);injector=x(bs);trigger=gv.required(`trigger`);list=gv(`list`);typed=``;typedAt=0;toggle(){this.open()?this.close():this.show()}choose(e){let t=this.options()[e];t&&!t.disabled&&(this.value.set(t.value),this.close(),this.trigger().nativeElement.focus())}onKey(e){let t=this.options(),n=this.open();switch(e.key){case`ArrowDown`:case`ArrowUp`:if(e.preventDefault(),!n){this.show();return}this.move(e.key===`ArrowDown`?1:-1);return;case`Home`:case`End`:if(!n)return;e.preventDefault(),this.setActive(e.key===`Home`?this.firstEnabled(0,1):this.firstEnabled(t.length-1,-1));return;case`Enter`:case` `:e.preventDefault(),n&&this.active()>=0?this.choose(this.active()):this.show();return;case`Escape`:if(!n)return;e.preventDefault(),e.stopPropagation(),this.close();return;case`Tab`:n&&this.close();return;default:e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&this.typeAhead(e.key)}}onBlur(e){let t=e.relatedTarget;t&&this.host.nativeElement.contains(t)||this.close()}onOutside(e){this.open()&&!this.host.nativeElement.contains(e.target)&&this.close()}show(){if(this.disabled())return;let e=this.host.nativeElement.getBoundingClientRect(),t=window.innerHeight-e.bottom;this.dropUp.set(t<220&&e.top>t);let n=this.options().findIndex(e=>e.value===this.value());this.open.set(!0),this.setActive(n>=0?n:this.firstEnabled(0,1))}close(){this.open.set(!1),this.active.set(-1)}move(e){let t=this.firstEnabled(this.active()+e,e);t>=0&&this.setActive(t)}firstEnabled(e,t){let n=this.options();for(let r=e;r>=0&&r{(this.list()?.nativeElement.querySelector(`#${this.uid}-opt-${e}`))?.scrollIntoView({block:`nearest`})},{injector:this.injector})}typeAhead(e){let t=performance.now();this.typed=t-this.typedAt>600?e.toLowerCase():this.typed+e.toLowerCase(),this.typedAt=t;let n=this.options().findIndex(e=>!e.disabled&&e.label.toLowerCase().startsWith(this.typed));n<0||(this.open()?this.setActive(n):this.value.set(this.options()[n].value))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&Ng(t.trigger,CD,5)(t.list,wD,5),e&2&&Pg(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&H(`pointerdown`,function(e){return t.onOutside(e)},ku),e&2&&G(`open`,t.open())},inputs:{options:[1,`options`],value:[1,`value`],placeholder:[1,`placeholder`],ariaLabel:[1,`ariaLabel`],labelledBy:[1,`labelledBy`],describedBy:[1,`describedBy`],disabled:[1,`disabled`],emptyText:[1,`emptyText`]},outputs:{value:`valueChange`},decls:8,vars:13,consts:[[`trigger`,``],[`list`,``],[`type`,`button`,`role`,`combobox`,`aria-haspopup`,`listbox`,1,`trigger`,3,`click`,`keydown`,`blur`,`disabled`],[1,`value`],[1,`value-hint`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m6 9 6 6 6-6`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`up`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`pointerdown`],[`role`,`option`,3,`active`,`selected`],[`role`,`option`,`aria-disabled`,`true`,1,`empty`],[`role`,`option`,3,`pointerenter`,`pointerdown`,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`check`],[`d`,`m5 12 5 5 9-10`],[1,`label`],[1,`hint`]],template:function(e,t){e&1&&(R(0,`button`,2,0),U(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),R(2,`span`,3),K(3),z(),A(4,ED,2,1,`span`,4),w(),R(5,`svg`,5),fg(6,`path`,6),z()(),A(7,AD,5,5,`ul`,7)),e&2&&(V(`disabled`,t.disabled()),k(`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),D(2),G(`placeholder`,!t.current()),D(),J(` `,t.current()?.label??t.placeholder(),` `),D(),j(t.current()?.hint?4:-1),D(3),j(t.open()?7:-1))},styles:[`[_nghost-%COMP%] { +}`]})};function pD(e){return e?.platform===`angular-native`}function mD(e){return pD(e)||e?.platform===`nativescript`}function hD(e,t){let n=Object.values(e??{}).filter(pD);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 gD=[`trigger`],_D=[`list`],vD=(e,t)=>t.value;function yD(e,t){if(e&1&&(R(0,`span`,4),K(1),z()),e&2){let e=W();D(),q(e.current().hint)}}function bD(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=W().$implicit;D(),q(e.hint)}}function xD(e,t){if(e&1){let e=B();R(0,`li`,11),U(`pointerenter`,function(){let t=S(e).$index;return C(W(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=S(e).$index;return C(W(2).choose(t))}),w(),R(1,`svg`,12),ug(2,`path`,13),z(),ds(),R(3,`span`,14),K(4),z(),A(5,bD,2,1,`span`,15),z()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active())(`selected`,e.value===r.value()),k(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),D(4),q(e.label),D(),j(e.hint?5:-1)}}function SD(e,t){if(e&1&&(R(0,`li`,10),K(1),z()),e&2){let e=W(2);D(),q(e.emptyText())}}function CD(e,t){if(e&1&&(R(0,`ul`,8,1),Bh(`list-in`),U(`pointerdown`,function(e){return e.preventDefault()}),M(2,xD,6,9,`li`,9,vD,!1,SD,2,1,`li`,10),z()),e&2){let e=W();G(`up`,e.dropUp()),k(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),D(2),N(e.options())}}var wD=0,TD=class e{options=$.required();value=fv(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++wD}`;open=T(!1);active=T(-1);dropUp=T(!1);current=X(()=>this.options().find(e=>e.value===this.value())??null);host=x(jl);injector=x(ys);trigger=mv.required(`trigger`);list=mv(`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=O({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&jg(t.trigger,gD,5)(t.list,_D,5),e&2&&Mg(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&H(`pointerdown`,function(e){return t.onOutside(e)},Ou),e&2&&G(`open`,t.open())},inputs:{options:[1,`options`],value:[1,`value`],placeholder:[1,`placeholder`],ariaLabel:[1,`ariaLabel`],labelledBy:[1,`labelledBy`],describedBy:[1,`describedBy`],disabled:[1,`disabled`],emptyText:[1,`emptyText`]},outputs:{value:`valueChange`},decls:8,vars:13,consts:[[`trigger`,``],[`list`,``],[`type`,`button`,`role`,`combobox`,`aria-haspopup`,`listbox`,1,`trigger`,3,`click`,`keydown`,`blur`,`disabled`],[1,`value`],[1,`value-hint`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m6 9 6 6 6-6`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`up`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`pointerdown`],[`role`,`option`,3,`active`,`selected`],[`role`,`option`,`aria-disabled`,`true`,1,`empty`],[`role`,`option`,3,`pointerenter`,`pointerdown`,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`check`],[`d`,`m5 12 5 5 9-10`],[1,`label`],[1,`hint`]],template:function(e,t){e&1&&(R(0,`button`,2,0),U(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),R(2,`span`,3),K(3),z(),A(4,yD,2,1,`span`,4),w(),R(5,`svg`,5),ug(6,`path`,6),z()(),A(7,CD,5,5,`ul`,7)),e&2&&(V(`disabled`,t.disabled()),k(`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),D(2),G(`placeholder`,!t.current()),D(),J(` `,t.current()?.label??t.placeholder(),` `),D(),j(t.current()?.hint?4:-1),D(3),j(t.open()?7:-1))},styles:[`[_nghost-%COMP%] { position: relative; display: inline-flex; min-width: 0; @@ -678,7 +678,7 @@ li.selected[_ngcontent-%COMP%] .check[_ngcontent-%COMP%] { .chevron[_ngcontent-%COMP%] { transition: none; } -}`]})};function ND(e,t){let n=qw(t);if(Jw(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=Yw(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function PD(e){return e.flatMap(e=>e.kind===`directive`?PD(e.children):[{...e,children:PD(e.children)}])}function FD(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var ID={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function LD(e){return ID[e]}function RD(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 zD(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 BD(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 VD(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&&!HD(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function HD(e,t){return e.some(e=>e.id===t||HD(e.children,t))}function UD(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 WD=(e,t)=>t.key,GD=(e,t)=>t.id;function KD(e,t){e&1&&(R(0,`p`,2),K(1,` The HTML came from the server, but no component was hydrated, so the app rendered again on the client. Add `),R(2,`code`),K(3,`provideClientHydration()`),z(),K(4,` and use a development build to see each component's status. `),z())}function qD(e,t){if(e&1&&(R(0,`li`)(1,`span`,9),K(2),z(),K(3),z()),e&2){let e=t.$implicit;r_(`count count-`+e.key),D(2),q(e.value),D(),J(` `,e.label,` `)}}function JD(e,t){if(e&1&&(R(0,`span`,15),K(1,`Expected `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.expected)}}function YD(e,t){if(e&1&&(R(0,`span`,15),K(1,`Found `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.actual)}}function XD(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,12),U(`click`,function(){let t=S(e).$implicit;return C(W(4).showNode.emit(t.id))})(`focus`,function(){let t=S(e).$implicit;return C(W(4).highlight.emit(t.id))})(`blur`,function(){return S(e),C(W(4).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(4).highlight.emit(t.id))})(`mouseleave`,function(){return S(e),C(W(4).highlight.emit(null))}),R(2,`span`,13),K(3),z(),R(4,`span`,14),K(5),z(),A(6,JD,4,1,`span`,15),A(7,YD,4,1,`span`,15),z()()}if(e&2){let e=t.$implicit;D(3),q(e.name),D(2),J(`<`,e.tag,`>`),D(),j(e.expected?6:-1),D(),j(e.actual?7:-1)}}function ZD(e,t){if(e&1&&(R(0,`h3`,10),K(1,`Mismatches`),z(),R(2,`ul`,11),M(3,XD,8,4,`li`,null,GD),z()),e&2){let e=W(2);D(3),N(e.mismatches)}}function QD(e,t){if(e&1){let e=B();R(0,`div`,3)(1,`ul`,4),M(2,qD,4,4,`li`,5,WD),z(),R(4,`button`,6),U(`click`,function(){return S(e),C(W(2).toggleOverlay())}),w(),R(5,`svg`,7),fg(6,`rect`,8),z(),K(7,` Outline on page `),z()(),A(8,ZD,5,0)}if(e&2){let e=W(),t=W();D(2),N(t.counts()),D(2),k(`aria-pressed`,t.overlayOn()),D(4),j(e.mismatches.length?8:-1)}}function $D(e,t){e&1&&A(0,KD,5,0,`p`,2)(1,QD,9,2),e&2&&j(+!!t.hydrated)}function eO(e,t){e&1&&(R(0,`p`,2),K(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),R(2,`code`),K(3,`provideClientHydration()`),z(),K(4,`, each component shows whether it was hydrated, skipped or mismatched. `),z())}var tO=class e{report=$(void 0);overlay=lv();showNode=lv();highlight=lv();overlayOn=Q(()=>this.report()?.overlay===!0);counts=X(()=>{let e=this.report()?.counts;return e?[{key:`hydrated`,label:`hydrated`,value:e.hydrated},{key:`skipped`,label:`skipped`,value:e.skipped},{key:`mismatched`,label:`mismatched`,value:e.mismatched},{key:`client`,label:`created on the client`,value:e.client},{key:`dehydratedBlocks`,label:e.dehydratedBlocks===1?`dehydrated @defer block`:`dehydrated @defer blocks`,value:e.dehydratedBlocks}]:[]});toggleOverlay(){let e=!this.overlayOn();this.overlayOn.set(e),this.overlay.emit(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&(R(0,`section`,0)(1,`h2`,1),K(2,`Hydration`),z(),A(3,$D,2,1)(4,eO,5,0,`p`,2),z()),e&2){let e;D(3),j((e=t.report())?3:4,e)}},styles:[`.hydration[_ngcontent-%COMP%] { +}`]})};function ED(e,t){let n=Bw(t);if(Vw(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=Hw(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function DD(e){return e.flatMap(e=>e.kind===`directive`?DD(e.children):[{...e,children:DD(e.children)}])}function OD(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var kD={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function AD(e){return kD[e]}function jD(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 MD(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 ND(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 PD(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&&!FD(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function FD(e,t){return e.some(e=>e.id===t||FD(e.children,t))}function ID(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 LD=(e,t)=>t.key,RD=(e,t)=>t.id;function zD(e,t){e&1&&(R(0,`p`,2),K(1,` The HTML came from the server, but no component was hydrated, so the app rendered again on the client. Add `),R(2,`code`),K(3,`provideClientHydration()`),z(),K(4,` and use a development build to see each component's status. `),z())}function BD(e,t){if(e&1&&(R(0,`li`)(1,`span`,9),K(2),z(),K(3),z()),e&2){let e=t.$implicit;t_(`count count-`+e.key),D(2),q(e.value),D(),J(` `,e.label,` `)}}function VD(e,t){if(e&1&&(R(0,`span`,15),K(1,`Expected `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.expected)}}function HD(e,t){if(e&1&&(R(0,`span`,15),K(1,`Found `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.actual)}}function UD(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,12),U(`click`,function(){let t=S(e).$implicit;return C(W(4).showNode.emit(t.id))})(`focus`,function(){let t=S(e).$implicit;return C(W(4).highlight.emit(t.id))})(`blur`,function(){return S(e),C(W(4).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(4).highlight.emit(t.id))})(`mouseleave`,function(){return S(e),C(W(4).highlight.emit(null))}),R(2,`span`,13),K(3),z(),R(4,`span`,14),K(5),z(),A(6,VD,4,1,`span`,15),A(7,HD,4,1,`span`,15),z()()}if(e&2){let e=t.$implicit;D(3),q(e.name),D(2),J(`<`,e.tag,`>`),D(),j(e.expected?6:-1),D(),j(e.actual?7:-1)}}function WD(e,t){if(e&1&&(R(0,`h3`,10),K(1,`Mismatches`),z(),R(2,`ul`,11),M(3,UD,8,4,`li`,null,RD),z()),e&2){let e=W(2);D(3),N(e.mismatches)}}function GD(e,t){if(e&1){let e=B();R(0,`div`,3)(1,`ul`,4),M(2,BD,4,4,`li`,5,LD),z(),R(4,`button`,6),U(`click`,function(){return S(e),C(W(2).toggleOverlay())}),w(),R(5,`svg`,7),ug(6,`rect`,8),z(),K(7,` Outline on page `),z()(),A(8,WD,5,0)}if(e&2){let e=W(),t=W();D(2),N(t.counts()),D(2),k(`aria-pressed`,t.overlayOn()),D(4),j(e.mismatches.length?8:-1)}}function KD(e,t){e&1&&A(0,zD,5,0,`p`,2)(1,GD,9,2),e&2&&j(+!!t.hydrated)}function qD(e,t){e&1&&(R(0,`p`,2),K(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),R(2,`code`),K(3,`provideClientHydration()`),z(),K(4,`, each component shows whether it was hydrated, skipped or mismatched. `),z())}var JD=class e{report=$(void 0);overlay=sv();showNode=sv();highlight=sv();overlayOn=Q(()=>this.report()?.overlay===!0);counts=X(()=>{let e=this.report()?.counts;return e?[{key:`hydrated`,label:`hydrated`,value:e.hydrated},{key:`skipped`,label:`skipped`,value:e.skipped},{key:`mismatched`,label:`mismatched`,value:e.mismatched},{key:`client`,label:`created on the client`,value:e.client},{key:`dehydratedBlocks`,label:e.dehydratedBlocks===1?`dehydrated @defer block`:`dehydrated @defer blocks`,value:e.dehydratedBlocks}]:[]});toggleOverlay(){let e=!this.overlayOn();this.overlayOn.set(e),this.overlay.emit(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&(R(0,`section`,0)(1,`h2`,1),K(2,`Hydration`),z(),A(3,KD,2,1)(4,qD,5,0,`p`,2),z()),e&2){let e;D(3),j((e=t.report())?3:4,e)}},styles:[`.hydration[_ngcontent-%COMP%] { margin-top: 16px; } @@ -849,7 +849,7 @@ svg[_ngcontent-%COMP%] { button[_ngcontent-%COMP%] { transition: none; } -}`]})};function nO(e,t){if(e&1&&(R(0,`p`,0),K(1),R(2,`code`),K(3),z(),K(4,` to keep more. `),R(5,`a`,1),K(6,`About limits`),z()()),e&2){let e=W();D(),k_(` Showing the latest `,e.max(),` `,e.what(),`. `,e.dropped(),` older `,e.dropped()===1?`entry was`:`entries were`,` dropped. Raise `),D(2),J(`limits.`,e.limit()),D(2),V(`href`,e.docsUrl,Du)}}var rO=`https://pangular-inspector.dev/getting-started/configuration/#limits`,iO=class e{dropped=$(0);max=$.required();what=$.required();limit=$.required();docsUrl=rO;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-limit-note`]],inputs:{dropped:[1,`dropped`],max:[1,`max`],what:[1,`what`],limit:[1,`limit`]},decls:1,vars:1,consts:[[1,`note`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){e&1&&A(0,nO,7,6,`p`,0),e&2&&j(t.dropped()>0?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})};function YD(e,t){if(e&1&&(R(0,`p`,0),K(1),R(2,`code`),K(3),z(),K(4,` to keep more. `),R(5,`a`,1),K(6,`About limits`),z()()),e&2){let e=W();D(),D_(` Showing the latest `,e.max(),` `,e.what(),`. `,e.dropped(),` older `,e.dropped()===1?`entry was`:`entries were`,` dropped. Raise `),D(2),J(`limits.`,e.limit()),D(2),V(`href`,e.docsUrl,Eu)}}var XD=`https://pangular-inspector.dev/getting-started/configuration/#limits`,ZD=class e{dropped=$(0);max=$.required();what=$.required();limit=$.required();docsUrl=XD;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-limit-note`]],inputs:{dropped:[1,`dropped`],max:[1,`max`],what:[1,`what`],limit:[1,`limit`]},decls:1,vars:1,consts:[[1,`note`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){e&1&&A(0,YD,7,6,`p`,0),e&2&&j(t.dropped()>0?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -876,7 +876,7 @@ a[_ngcontent-%COMP%] { a[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})},aO=1e3;function oO(e){return typeof e==`number`&&Number.isFinite(e)&&e>0&&e<=aO?e:16}var sO=864e13,cO=200,lO=300,uO=100,dO=10,fO=100,pO=2e3,mO=2e3,hO=4e3,gO=1e3,_O=100,vO=3,yO=50,bO={component:`c`,hook:`h`,afterRender:`r`,output:`o`},xO=Object.values(bO),SO=e=>!!e&&typeof e==`object`&&!Array.isArray(e),CO=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,wO=(e,t)=>typeof e==`string`?e.slice(0,t):``,TO=e=>CO(e)>0?CO(e):void 0,EO=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function DO(e){if(!SO(e))return null;let t=wO(e.name,cO);return t?{name:t,checks:CO(e.checks),ms:CO(e.ms)}:null}function OO(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>gO||typeof o!=`string`||!xO.includes(o)?null:[n,r,CO(i),a,o]}function kO(e,t,n){if(!SO(e)||typeof e.id!=`number`)return null;let r=EO(e.components,dO).map(DO).filter(e=>!!e),i=wO(e.trigger,lO),a=EO(e.spans,40).map(e=>OO(e,t)).filter(e=>!!e),o=Array.isArray(e.spans)?e.spans.length-40:0,s=Math.floor(CO(e.droppedSpans))+Math.max(0,o),c={t:typeof e.t==`number`?CO(e.t):void 0,hookMs:TO(e.hookMs),afterRenderMs:TO(e.afterRenderMs),outputMs:TO(e.outputMs)},l=NO(e.cause),u=TO(e.refreshed),d=TO(e.unchanged);return{id:CO(e.id),at:CO(e.at),ms:CO(e.ms),passes:CO(e.passes),...i?{trigger:i}:{},checks:CO(e.checks),components:r,...Object.fromEntries(Object.entries(c).filter(([,e])=>e!==void 0)),...a.length?{spans:a}:{},...s?{droppedSpans:s}:{},...l?{cause:l}:{},...u?{refreshed:u}:{},...d?{unchanged:d}:{},...CO(e.ms)>n?{slow:!0}:{}}}var AO=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],jO={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`},MO=e=>typeof e==`string`&&AO.includes(e);function NO(e){if(!SO(e)||!MO(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};MO(e.via)&&(n.via=e.via);for(let r of t){let t=wO(e[r],cO);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=EO(e.stack,vO).map(e=>wO(e,lO)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(CO(e.more));return i&&(n.more=i),n}function PO(e){if(!SO(e))return null;let t=wO(e.name,cO);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(CO(e.refreshed)),unchanged:Math.floor(CO(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function FO(e){if(!SO(e))return null;let t=wO(e.name,cO),n=wO(e.input,cO);if(!t||!n)return null;let r=wO(e.parent,cO);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(CO(e.inPlace)),sameContents:Math.floor(CO(e.sameContents))}}function IO(e){if(!SO(e))return null;let t=wO(e.name,cO);if(!t)return null;let n=EO(e.tasks,3).map(e=>wO(e,cO)).filter(Boolean);return{name:t,ticks:Math.floor(CO(e.ticks)),...n.length?{tasks:n}:{}}}function LO(e){if(!SO(e))return;let t={};if(SO(e.causes))for(let n of AO){let r=Math.floor(CO(e.causes[n]));r&&(t[n]=r)}let n=EO(e.components,fO).map(PO).filter(e=>!!e),r=EO(e.inputs,yO).map(FO).filter(e=>!!e),i=EO(e.zone,yO).map(IO).filter(e=>!!e),a=Math.floor(CO(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 RO(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(`${jO[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 ${jO[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 zO(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 BO(e){let t=DO(e);return!t||!SO(e)?null:{...t,maxMs:CO(e.maxMs),cycles:CO(e.cycles)}}function VO(e){if(!SO(e))return null;let t=wO(e.name,cO),n=wO(e.hook,uO);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:CO(r),ms:CO(i),maxMs:CO(a)}}function HO(e){if(!SO(e))return null;let t=wO(e.name,cO);if(!t)return null;let n=wO(e.listener,cO);return{name:t,...n?{listener:n}:{},calls:CO(e.calls),ms:CO(e.ms),maxMs:CO(e.maxMs)}}function UO(e){if(SO(e)&&CO(e.runs))return{runs:CO(e.runs),ms:CO(e.ms),maxMs:CO(e.maxMs)}}function WO(e,t){if(!SO(e))return null;let n=EO(e.spanNames,hO).map(e=>wO(e,lO)),r=oO(e.slowMs),i=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,mO)).map(e=>kO(e,n.length,r)).filter(e=>!!e):[],a={},o=0;if(SO(e.hosts)){let t=Object.entries(e.hosts);o=Math.max(0,t.length-pO);for(let[e,n]of t.slice(0,pO))e.length<50&&CO(n)&&(a[e]=CO(n))}let s=Array.isArray(e.components)?e.components:[],c=Math.floor(CO(e.droppedClasses))+Math.max(0,s.length-fO),l=Math.floor(CO(e.droppedHosts))+o,u=EO(e.hooks,_O).map(VO).filter(e=>!!e),d=EO(e.outputs,_O).map(HO).filter(e=>!!e),f=Math.max(0,EO(e.hooks,1/0).length-_O)+Math.max(0,EO(e.outputs,1/0).length-_O),p=Math.floor(CO(e.droppedTimings))+f,m=UO(e.afterRender),ee=i.some(e=>e.spans?.length),h=LO(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=sO?CO(e.startedAt):null,dropped:CO(e.dropped),slowMs:r,cycles:i,components:s.slice(0,fO).map(BO).filter(e=>!!e),...c?{droppedClasses:c}:{},hosts:a,...l?{droppedHosts:l}:{},...u.length?{hooks:u}:{},...d.length?{outputs:d}:{},...p?{droppedTimings:p}:{},...m?{afterRender:m}:{},...ee?{spanNames:n}:{},...h?{diagnosis:h}:{}}}var GO=`pangular-inspector/change-detection`;function KO(e,t,n=Date.now()){return{format:GO,version:1,exportedAt:n,pageId:t,recording:{...WO(e,mO)??e,recording:!1,hosts:{}}}}function qO(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(!SO(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=SO(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=WO(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=wO(n.pageId??r.pageId,49)||`imported`,o=TO(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var JO=1,YO=1,XO=2,ZO={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},QO=e=>Math.round(e*1e6)/1e3;function $O(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:JO,tid:YO,ts:QO(e),dur:QO(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:RO(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===bO.output){let n=e+i;a.push({name:l,cat:ZO[d],ph:`X`,pid:JO,tid:XO,ts:QO(n),dur:QO(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=QO((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:JO,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l(YO,`thread_name`,`Change detection`),l(XO,`thread_name`,`Outputs`),...a],displayTimeUnit:`ms`,otherData:{source:`Pangular Inspector change detection recording`,pageId:t,cycles:e.cycles.length,droppedCycles:e.dropped,spans:o,droppedSpans:s,...e.startedAt&&e.startedAt<=sO?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}function ek(e,t=16){return e.ms>t}function tk(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function nk(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 rk(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 ik(e,t=16){let n=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(n,t*1.25)}function ak(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 ok={c:`component`,h:`hook`,r:`afterRender`,o:`output`};function sk(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 ck(e,t){let n=e.filter(e=>e.spans?.length);if(!n.length)return null;let r=n.map(e=>{let t=e.spans,n=Math.min(0,...t.map(e=>e[1])),r=Math.max(e.ms,...t.map(e=>e[1]+e[2]));return{cycle:e,spans:t,from:n,width:Math.max(r-n,.001)}}),i=r.reduce((e,t)=>e+t.width,0),a=[],o=[],s=0,c=0;for(let{cycle:e,spans:n,from:l,width:u}of r){o.push({id:e.id,x:s/i*100,w:u/i*100,droppedSpans:e.droppedSpans??0});let r=[...n].sort((e,t)=>e[1]-t[1]||e[3]-t[3]),d=[];for(let[n,o,u,f,p]of r){let r=t[n]??`unknown`,m=d[f-1],ee=f>0&&m!==void 0&&ot.kind,uk=(e,t)=>t.name,dk=(e,t)=>t.name+`.`+t.input;function fk(e,t){e&1&&(R(0,`p`,3),K(1,` The page has no Angular change detection scheduler the overlay could find (it needs Angular 18 or later), so cycles have no cause. `),z())}function pk(e,t){if(e&1&&(R(0,`tr`)(1,`td`),K(2),z(),R(3,`td`,6),K(4),z()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.count)}}function mk(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Trigger`),z(),R(5,`th`,5),K(6,`Cycles`),z()()(),R(7,`tbody`),M(8,pk,5,2,`tr`,null,lk),z()()),e&2){let e=W(2);D(8),N(e.causes())}}function hk(e,t){e&1&&(R(0,`p`,3),K(1,`No cycle has a cause yet.`),z())}function gk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,7),K(6),z()()),e&2){let e=t.$implicit;D(2),q(e.name),D(2),q(e.ticks),D(2),q(e.tasks?.join(`, `))}}function _k(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),z(),R(5,`th`,5),K(6,`Zone-only ticks`),z(),R(7,`th`,4),K(8,`After`),z()()(),R(9,`tbody`),M(10,gk,7,3,`tr`,null,uk),z()()),e&2){let e=W(3);D(10),N(e.zone())}}function vk(e,t){if(e&1&&(R(0,`p`,3),K(1),z()),e&2){let e=W(3);D(),q(e.zoneNote())}}function yk(e,t){if(e&1&&(R(0,`div`)(1,`h4`),K(2,`Depends on zone.js`),z(),A(3,_k,12,0,`table`)(4,vk,2,1,`p`,3),z()),e&2){let e=W(),t=W();D(3),j(t.zone().length?3:e.triggers?4:-1)}}function bk(e,t){e&1&&(R(0,`p`,3),K(1,`The page can't watch DOM updates, so wasted checks are not counted.`),z())}function xk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`),K(8),z()()),e&2){let e=t.$implicit,n=W(3);D(2),q(e.name),D(2),q(e.refreshed),D(2),Y(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),D(2),q(e.strategy??`Unknown`)}}function Sk(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),z(),R(5,`th`,5),K(6,`Refreshed`),z(),R(7,`th`,5),K(8,`Changed nothing`),z(),R(9,`th`,4),K(10,`Strategy`),z()()(),R(11,`tbody`),M(12,xk,9,5,`tr`,null,uk),z()()),e&2){let e=W(2);D(12),N(e.wasted())}}function Ck(e,t){e&1&&(R(0,`p`,3),K(1,`Every refreshed check changed something.`),z())}function wk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,7),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`,6),K(8),z()()),e&2){let e=t.$implicit;D(2),Y(``,e.name,`.`,e.input),D(2),q(e.parent??`Unknown`),D(2),q(e.inPlace),D(2),q(e.sameContents)}}function Tk(e,t){if(e&1&&(R(0,`h4`),K(1,`Inputs that break OnPush`),z(),R(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),K(6,`Input`),z(),R(7,`th`,4),K(8,`Set by`),z(),R(9,`th`,5),K(10,`Changed in place`),z(),R(11,`th`,5),K(12,`Same contents, new reference`),z()()(),R(13,`tbody`),M(14,wk,9,5,`tr`,null,dk),z()()),e&2){let e=W(2);D(14),N(e.inputs())}}function Ek(e,t){if(e&1&&(R(0,`li`),K(1),z()),e&2){let e=t.$implicit;D(),q(e.text)}}function Dk(e,t){if(e&1&&(R(0,`h4`),K(1,`Hints`),z(),R(2,`ul`,8),M(3,Ek,2,1,`li`,null,eg),z()),e&2){let e=W(2);D(3),N(e.hints())}}function Ok(e,t){if(e&1&&(R(0,`section`,0)(1,`h3`,1),K(2,`Why it ran and what it wasted`),z(),R(3,`div`,2)(4,`div`)(5,`h4`),K(6,`What started the cycles`),z(),A(7,fk,2,0,`p`,3)(8,mk,10,0,`table`)(9,hk,2,0,`p`,3),z(),A(10,yk,5,1,`div`),z(),R(11,`h4`),K(12,`Wasted checks`),z(),A(13,bk,2,0,`p`,3)(14,Sk,14,0,`table`)(15,Ck,2,0,`p`,3),A(16,Tk,16,0),A(17,Dk,5,0),z()),e&2){let e=t,n=W();D(7),j(e.triggers?n.causes().length?8:9:7),D(3),j(n.hasZone()?10:-1),D(3),j(e.waste?n.wasted().length?14:15:13),D(3),j(n.inputs().length?16:-1),D(),j(n.hints().length?17:-1)}}var kk=10,Ak=class e{page=$(null);diagnosis=X(()=>this.page()?.diagnosis??null);causes=X(()=>{let e=this.diagnosis()?.causes??{};return AO.filter(t=>e[t]).map(t=>({kind:t,label:jO[t],count:e[t]}))});zone=X(()=>(this.diagnosis()?.zone??[]).slice(0,kk));zoneTicks=X(()=>this.diagnosis()?.causes.zone??0);hasZone=X(()=>this.diagnosis()?.zoneJs??(this.zone().length>0||this.zoneTicks()>0));zoneNote=X(()=>{let e=this.zoneTicks();return e?`${e} ${e===1?`tick`:`ticks`} came from zone.js alone, and no component changed in them.`:`No component changed in a tick only zone.js started.`});wasted=X(()=>(this.diagnosis()?.components??[]).filter(e=>e.unchanged>0).slice(0,kk));inputs=X(()=>(this.diagnosis()?.inputs??[]).slice(0,kk));hints=X(()=>zO(this.diagnosis()??void 0).slice(0,kk));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,Ok,18,5,`section`,0),e&2){let e;j((e=t.diagnosis())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})},QD=1e3;function $D(e){return typeof e==`number`&&Number.isFinite(e)&&e>0&&e<=QD?e:16}var eO=864e13,tO=200,nO=300,rO=100,iO=10,aO=100,oO=2e3,sO=2e3,cO=4e3,lO=1e3,uO=100,dO=3,fO=50,pO={component:`c`,hook:`h`,afterRender:`r`,output:`o`},mO=Object.values(pO),hO=e=>!!e&&typeof e==`object`&&!Array.isArray(e),gO=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,_O=(e,t)=>typeof e==`string`?e.slice(0,t):``,vO=e=>gO(e)>0?gO(e):void 0,yO=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function bO(e){if(!hO(e))return null;let t=_O(e.name,tO);return t?{name:t,checks:gO(e.checks),ms:gO(e.ms)}:null}function xO(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>lO||typeof o!=`string`||!mO.includes(o)?null:[n,r,gO(i),a,o]}function SO(e,t,n){if(!hO(e)||typeof e.id!=`number`)return null;let r=yO(e.components,iO).map(bO).filter(e=>!!e),i=_O(e.trigger,nO),a=yO(e.spans,40).map(e=>xO(e,t)).filter(e=>!!e),o=Array.isArray(e.spans)?e.spans.length-40:0,s=Math.floor(gO(e.droppedSpans))+Math.max(0,o),c={t:typeof e.t==`number`?gO(e.t):void 0,hookMs:vO(e.hookMs),afterRenderMs:vO(e.afterRenderMs),outputMs:vO(e.outputMs)},l=EO(e.cause),u=vO(e.refreshed),d=vO(e.unchanged);return{id:gO(e.id),at:gO(e.at),ms:gO(e.ms),passes:gO(e.passes),...i?{trigger:i}:{},checks:gO(e.checks),components:r,...Object.fromEntries(Object.entries(c).filter(([,e])=>e!==void 0)),...a.length?{spans:a}:{},...s?{droppedSpans:s}:{},...l?{cause:l}:{},...u?{refreshed:u}:{},...d?{unchanged:d}:{},...gO(e.ms)>n?{slow:!0}:{}}}var CO=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],wO={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`},TO=e=>typeof e==`string`&&CO.includes(e);function EO(e){if(!hO(e)||!TO(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};TO(e.via)&&(n.via=e.via);for(let r of t){let t=_O(e[r],tO);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=yO(e.stack,dO).map(e=>_O(e,nO)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(gO(e.more));return i&&(n.more=i),n}function DO(e){if(!hO(e))return null;let t=_O(e.name,tO);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(gO(e.refreshed)),unchanged:Math.floor(gO(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function OO(e){if(!hO(e))return null;let t=_O(e.name,tO),n=_O(e.input,tO);if(!t||!n)return null;let r=_O(e.parent,tO);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(gO(e.inPlace)),sameContents:Math.floor(gO(e.sameContents))}}function kO(e){if(!hO(e))return null;let t=_O(e.name,tO);if(!t)return null;let n=yO(e.tasks,3).map(e=>_O(e,tO)).filter(Boolean);return{name:t,ticks:Math.floor(gO(e.ticks)),...n.length?{tasks:n}:{}}}function AO(e){if(!hO(e))return;let t={};if(hO(e.causes))for(let n of CO){let r=Math.floor(gO(e.causes[n]));r&&(t[n]=r)}let n=yO(e.components,aO).map(DO).filter(e=>!!e),r=yO(e.inputs,fO).map(OO).filter(e=>!!e),i=yO(e.zone,fO).map(kO).filter(e=>!!e),a=Math.floor(gO(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 jO(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(`${wO[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 ${wO[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 MO(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 NO(e){let t=bO(e);return!t||!hO(e)?null:{...t,maxMs:gO(e.maxMs),cycles:gO(e.cycles)}}function PO(e){if(!hO(e))return null;let t=_O(e.name,tO),n=_O(e.hook,rO);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:gO(r),ms:gO(i),maxMs:gO(a)}}function FO(e){if(!hO(e))return null;let t=_O(e.name,tO);if(!t)return null;let n=_O(e.listener,tO);return{name:t,...n?{listener:n}:{},calls:gO(e.calls),ms:gO(e.ms),maxMs:gO(e.maxMs)}}function IO(e){if(hO(e)&&gO(e.runs))return{runs:gO(e.runs),ms:gO(e.ms),maxMs:gO(e.maxMs)}}function LO(e,t){if(!hO(e))return null;let n=yO(e.spanNames,cO).map(e=>_O(e,nO)),r=$D(e.slowMs),i=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,sO)).map(e=>SO(e,n.length,r)).filter(e=>!!e):[],a={},o=0;if(hO(e.hosts)){let t=Object.entries(e.hosts);o=Math.max(0,t.length-oO);for(let[e,n]of t.slice(0,oO))e.length<50&&gO(n)&&(a[e]=gO(n))}let s=Array.isArray(e.components)?e.components:[],c=Math.floor(gO(e.droppedClasses))+Math.max(0,s.length-aO),l=Math.floor(gO(e.droppedHosts))+o,u=yO(e.hooks,uO).map(PO).filter(e=>!!e),d=yO(e.outputs,uO).map(FO).filter(e=>!!e),f=Math.max(0,yO(e.hooks,1/0).length-uO)+Math.max(0,yO(e.outputs,1/0).length-uO),p=Math.floor(gO(e.droppedTimings))+f,m=IO(e.afterRender),ee=i.some(e=>e.spans?.length),h=AO(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=eO?gO(e.startedAt):null,dropped:gO(e.dropped),slowMs:r,cycles:i,components:s.slice(0,aO).map(NO).filter(e=>!!e),...c?{droppedClasses:c}:{},hosts:a,...l?{droppedHosts:l}:{},...u.length?{hooks:u}:{},...d.length?{outputs:d}:{},...p?{droppedTimings:p}:{},...m?{afterRender:m}:{},...ee?{spanNames:n}:{},...h?{diagnosis:h}:{}}}var RO=`pangular-inspector/change-detection`;function zO(e,t,n=Date.now()){return{format:RO,version:1,exportedAt:n,pageId:t,recording:{...LO(e,sO)??e,recording:!1,hosts:{}}}}function BO(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(!hO(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=hO(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=LO(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=_O(n.pageId??r.pageId,49)||`imported`,o=vO(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var VO=1,HO=1,UO=2,WO={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},GO=e=>Math.round(e*1e6)/1e3;function KO(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:VO,tid:HO,ts:GO(e),dur:GO(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:jO(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===pO.output){let n=e+i;a.push({name:l,cat:WO[d],ph:`X`,pid:VO,tid:UO,ts:GO(n),dur:GO(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=GO((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:VO,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l(HO,`thread_name`,`Change detection`),l(UO,`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<=eO?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}function qO(e,t=16){return e.ms>t}function JO(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function YO(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 XO(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 ZO(e,t=16){let n=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(n,t*1.25)}function QO(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 $O={c:`component`,h:`hook`,r:`afterRender`,o:`output`};function ek(e,t){if(t===`c`)return e||null;if(t===`h`){let t=e.lastIndexOf(`.`);return t>0?e.slice(0,t):null}if(t===`o`){let t=e.indexOf(` (`),n=t>0?e.slice(0,t):e;return n&&n!==`?`?n:null}return null}function tk(e,t){let n=e.filter(e=>e.spans?.length);if(!n.length)return null;let r=n.map(e=>{let t=e.spans,n=Math.min(0,...t.map(e=>e[1])),r=Math.max(e.ms,...t.map(e=>e[1]+e[2]));return{cycle:e,spans:t,from:n,width:Math.max(r-n,.001)}}),i=r.reduce((e,t)=>e+t.width,0),a=[],o=[],s=0,c=0;for(let{cycle:e,spans:n,from:l,width:u}of r){o.push({id:e.id,x:s/i*100,w:u/i*100,droppedSpans:e.droppedSpans??0});let r=[...n].sort((e,t)=>e[1]-t[1]||e[3]-t[3]),d=[];for(let[n,o,u,f,p]of r){let r=t[n]??`unknown`,m=d[f-1],ee=f>0&&m!==void 0&&ot.kind,rk=(e,t)=>t.name,ik=(e,t)=>t.name+`.`+t.input;function ak(e,t){e&1&&(R(0,`p`,3),K(1,` The page has no Angular change detection scheduler the overlay could find (it needs Angular 18 or later), so cycles have no cause. `),z())}function ok(e,t){if(e&1&&(R(0,`tr`)(1,`td`),K(2),z(),R(3,`td`,6),K(4),z()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.count)}}function sk(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Trigger`),z(),R(5,`th`,5),K(6,`Cycles`),z()()(),R(7,`tbody`),M(8,ok,5,2,`tr`,null,nk),z()()),e&2){let e=W(2);D(8),N(e.causes())}}function ck(e,t){e&1&&(R(0,`p`,3),K(1,`No cycle has a cause yet.`),z())}function lk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,7),K(6),z()()),e&2){let e=t.$implicit;D(2),q(e.name),D(2),q(e.ticks),D(2),q(e.tasks?.join(`, `))}}function uk(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),z(),R(5,`th`,5),K(6,`Zone-only ticks`),z(),R(7,`th`,4),K(8,`After`),z()()(),R(9,`tbody`),M(10,lk,7,3,`tr`,null,rk),z()()),e&2){let e=W(3);D(10),N(e.zone())}}function dk(e,t){if(e&1&&(R(0,`p`,3),K(1),z()),e&2){let e=W(3);D(),q(e.zoneNote())}}function fk(e,t){if(e&1&&(R(0,`div`)(1,`h4`),K(2,`Depends on zone.js`),z(),A(3,uk,12,0,`table`)(4,dk,2,1,`p`,3),z()),e&2){let e=W(),t=W();D(3),j(t.zone().length?3:e.triggers?4:-1)}}function pk(e,t){e&1&&(R(0,`p`,3),K(1,`The page can't watch DOM updates, so wasted checks are not counted.`),z())}function mk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`),K(8),z()()),e&2){let e=t.$implicit,n=W(3);D(2),q(e.name),D(2),q(e.refreshed),D(2),Y(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),D(2),q(e.strategy??`Unknown`)}}function hk(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),z(),R(5,`th`,5),K(6,`Refreshed`),z(),R(7,`th`,5),K(8,`Changed nothing`),z(),R(9,`th`,4),K(10,`Strategy`),z()()(),R(11,`tbody`),M(12,mk,9,5,`tr`,null,rk),z()()),e&2){let e=W(2);D(12),N(e.wasted())}}function gk(e,t){e&1&&(R(0,`p`,3),K(1,`Every refreshed check changed something.`),z())}function _k(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,7),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`,6),K(8),z()()),e&2){let e=t.$implicit;D(2),Y(``,e.name,`.`,e.input),D(2),q(e.parent??`Unknown`),D(2),q(e.inPlace),D(2),q(e.sameContents)}}function vk(e,t){if(e&1&&(R(0,`h4`),K(1,`Inputs that break OnPush`),z(),R(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),K(6,`Input`),z(),R(7,`th`,4),K(8,`Set by`),z(),R(9,`th`,5),K(10,`Changed in place`),z(),R(11,`th`,5),K(12,`Same contents, new reference`),z()()(),R(13,`tbody`),M(14,_k,9,5,`tr`,null,ik),z()()),e&2){let e=W(2);D(14),N(e.inputs())}}function yk(e,t){if(e&1&&(R(0,`li`),K(1),z()),e&2){let e=t.$implicit;D(),q(e.text)}}function bk(e,t){if(e&1&&(R(0,`h4`),K(1,`Hints`),z(),R(2,`ul`,8),M(3,yk,2,1,`li`,null,Qh),z()),e&2){let e=W(2);D(3),N(e.hints())}}function xk(e,t){if(e&1&&(R(0,`section`,0)(1,`h3`,1),K(2,`Why it ran and what it wasted`),z(),R(3,`div`,2)(4,`div`)(5,`h4`),K(6,`What started the cycles`),z(),A(7,ak,2,0,`p`,3)(8,sk,10,0,`table`)(9,ck,2,0,`p`,3),z(),A(10,fk,5,1,`div`),z(),R(11,`h4`),K(12,`Wasted checks`),z(),A(13,pk,2,0,`p`,3)(14,hk,14,0,`table`)(15,gk,2,0,`p`,3),A(16,vk,16,0),A(17,bk,5,0),z()),e&2){let e=t,n=W();D(7),j(e.triggers?n.causes().length?8:9:7),D(3),j(n.hasZone()?10:-1),D(3),j(e.waste?n.wasted().length?14:15:13),D(3),j(n.inputs().length?16:-1),D(),j(n.hints().length?17:-1)}}var Sk=10,Ck=class e{page=$(null);diagnosis=X(()=>this.page()?.diagnosis??null);causes=X(()=>{let e=this.diagnosis()?.causes??{};return CO.filter(t=>e[t]).map(t=>({kind:t,label:wO[t],count:e[t]}))});zone=X(()=>(this.diagnosis()?.zone??[]).slice(0,Sk));zoneTicks=X(()=>this.diagnosis()?.causes.zone??0);hasZone=X(()=>this.diagnosis()?.zoneJs??(this.zone().length>0||this.zoneTicks()>0));zoneNote=X(()=>{let e=this.zoneTicks();return e?`${e} ${e===1?`tick`:`ticks`} came from zone.js alone, and no component changed in them.`:`No component changed in a tick only zone.js started.`});wasted=X(()=>(this.diagnosis()?.components??[]).filter(e=>e.unchanged>0).slice(0,Sk));inputs=X(()=>(this.diagnosis()?.inputs??[]).slice(0,Sk));hints=X(()=>MO(this.diagnosis()??void 0).slice(0,Sk));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,xk,18,5,`section`,0),e&2){let e;j((e=t.diagnosis())?0:-1,e)}},styles:[`[_nghost-%COMP%] { display: block; } @@ -955,7 +955,7 @@ td.mono[_ngcontent-%COMP%] { .hints[_ngcontent-%COMP%] li[_ngcontent-%COMP%] + li[_ngcontent-%COMP%] { margin-top: 4px; -}`]})},jk=(e,t)=>t.cycle.id,Mk=(e,t)=>t.id;function Nk(e,t){if(e&1){let e=B();R(0,`button`,27),U(`click`,function(){return S(e),C(W().showAll())}),K(1,`Show all cycles`),z()}}function Pk(e,t){if(e&1&&fg(0,`div`,28),e&2){let e=t;n_(`left`,e.left,`%`)(`width`,e.width,`%`)}}function Fk(e,t){if(e&1&&(R(0,`div`,29),fg(1,`span`,30),z()),e&2){let e=t.$implicit,n=W();G(`over`,e.over)(`out`,!n.inRange(e.index)&&!!n.range())(`active`,n.focused()&&n.active()===e.index),V(`id`,n.optionId(e.index)),k(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),D(),n_(`height`,e.height,`%`)}}function Ik(e,t){e&1&&(R(0,`span`,33),K(1,`over budget`),z())}function Lk(e,t){if(e&1&&(R(0,`p`),K(1,` after `),R(2,`span`,35),K(3),z()()),e&2){let e=W();D(3),q(e.cycle.trigger)}}function Rk(e,t){if(e&1&&(R(0,`p`,34)(1,`span`,36),K(2),z(),R(3,`span`),K(4),z()()),e&2){let e=t.$implicit,n=W(2);D(2),q(e.name),D(2),q(n.fmt(e.ms))}}function zk(e,t){if(e&1&&(R(0,`div`,31)(1,`p`,32)(2,`strong`),K(3),z(),R(4,`span`),K(5),z(),A(6,Ik,2,0,`span`,33),z(),A(7,Lk,4,1,`p`),R(8,`p`),K(9),z(),M(10,Rk,5,2,`p`,34,eg),z()),e&2){let e=t,n=W();n_(`left`,e.left)(`right`,e.right),D(3),q(n.fmt(e.cycle.ms)),D(2),J(`cycle `,e.cycle.id),D(),j(e.over?6:-1),D(),j(e.cycle.trigger?7:-1),D(2),k_(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),D(),N(e.top)}}function Bk(e,t){if(e&1&&fg(0,`span`),e&2){let e=t.$implicit;G(`over`,e.over)}}function Vk(e,t){if(e&1&&K(0),e&2){let e=t,n=W(2);Y(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function Hk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,37),K(2),z(),R(3,`td`,37),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`,37),K(8),z(),R(9,`td`,37),K(10),z(),R(11,`td`,35),K(12),z(),R(13,`td`,35),A(14,Vk,1,2),z()()),e&2){let e,n=t.$implicit,r=W();D(2),q(n.id),D(2),q(r.fmt(n.ms)),D(2),q(r.isOver(n)?`Over`:`Within`),D(2),q(n.checks),D(2),q(n.passes),D(2),q(n.trigger??``),D(2),j((e=n.components[0])?14:-1,e)}}var Uk=0,Wk=80,Gk=10,Kk=class e{cycles=$([]);range=mv(null);slowMs=$(16);gapUntil=Wk;budgetLabel=X(()=>`${this.slowMs()} ms budget`);uid=`cd-chart-${Uk++}`;hintId=`${this.uid}-hint`;active=T(null);anchor=null;dragging=!1;hover=T(null);focused=T(!1);max=X(()=>ik(this.cycles(),this.slowMs()));budgetAt=X(()=>this.slowMs()/this.max()*100);bars=X(()=>{let e=this.max();return this.cycles().map((t,n)=>({cycle:t,index:n,height:t.ms/e*100,over:ek(t,this.slowMs()),label:this.describe(t)}))});firstId=X(()=>this.cycles()[0]?.id??0);lastId=X(()=>this.cycles().at(-1)?.id??0);span=X(()=>{let e=this.range();if(!e)return null;let t=this.cycles(),n=Math.min(e.from,e.to),r=Math.max(e.from,e.to),i=t.findIndex(e=>e.id>=n),a=-1;for(let e=t.length-1;e>=0;e--)if(t[e].id<=r){a=e;break}return i<0||ank(this.cycles(),this.range()));startId=X(()=>this.selected()[0]?.id??``);endId=X(()=>this.selected().at(-1)?.id??``);band=X(()=>{let e=this.span(),t=this.cycles().length;return!e||!t?null:{left:e.start/t*100,width:(e.end-e.start+1)/t*100}});summary=X(()=>{let e=this.selected(),t=this.slowMs(),n=e.filter(e=>ek(e,t)).length;return`${this.span()?e.length===1?`Cycle ${e[0].id}`:`Cycles ${e[0].id} to ${e.at(-1).id} (${e.length})`:`All ${e.length} ${e.length===1?`cycle`:`cycles`}`}. ${n} over the ${t} ms budget.`});tableLabel=X(()=>this.span()?`Picked cycles, ${this.summary()}`:`All recorded cycles`);activeOptionId=X(()=>{let e=this.active();return this.focused()&&e!==null&&e{let e=this.hover()??(this.focused()?this.active():null),t=e===null?void 0:this.cycles()[e];return!t||e===null?null:{cycle:t,over:ek(t,this.slowMs()),top:t.components.slice(0,3),...this.tipSide(e)}});tipSide(e){let t=this.cycles().length;return e+.5=t.start&&e<=t.end}describe(e){let t=[`Cycle ${e.id}`,tk(e.ms)];ek(e,this.slowMs())&&t.push(`over budget`),e.trigger&&t.push(`after ${e.trigger}`),t.push(`${e.checks} ${e.checks===1?`check`:`checks`}`);let n=e.components[0];return n&&t.push(`slowest ${n.name} ${tk(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+Gk;break;case`PageUp`:r=n-Gk;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=O({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&H(`pointerup`,function(){return t.endDrag()},Ou)(`pointercancel`,function(){return t.endDrag()},Ou)},inputs:{cycles:[1,`cycles`],range:[1,`range`],slowMs:[1,`slowMs`]},outputs:{range:`rangeChange`},decls:69,vars:25,consts:[[1,`range`],[`type`,`number`,`inputmode`,`numeric`,3,`change`,`min`,`max`,`value`],[`type`,`button`],[1,`summary`],[1,`hint`,3,`id`],[1,`plot`],[`aria-hidden`,`true`,1,`axis`],[1,`tick`,`top`],[1,`tick`,`zero`],[1,`area`],[`aria-hidden`,`true`,1,`band`,3,`left`,`width`],[`aria-hidden`,`true`,1,`budget`],[`role`,`listbox`,`aria-multiselectable`,`true`,`aria-orientation`,`horizontal`,`tabindex`,`0`,1,`bars`,3,`keydown`,`focus`,`blur`,`pointerdown`,`pointermove`,`pointerleave`],[`role`,`option`,1,`col`,3,`id`,`over`,`out`,`active`],[`aria-hidden`,`true`,1,`tip`,3,`left`,`right`],[`aria-hidden`,`true`,1,`markers`],[3,`over`],[`aria-label`,`Chart key`,1,`legend`],[`aria-hidden`,`true`,1,`key`,`ok`],[`aria-hidden`,`true`,1,`key`,`over`],[`aria-hidden`,`true`,1,`key-marker`],[`aria-hidden`,`true`,1,`key`,`line`],[1,`table`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[`type`,`button`,3,`click`],[`aria-hidden`,`true`,1,`band`],[`role`,`option`,1,`col`,3,`id`],[1,`bar`],[`aria-hidden`,`true`,1,`tip`],[1,`tip-head`],[1,`flag`],[1,`tip-row`],[1,`mono`],[1,`mono`,`name`],[1,`num`]],template:function(e,t){if(e&1&&(R(0,`div`,0)(1,`label`)(2,`span`),K(3,`Start`),z(),R(4,`input`,1),U(`change`,function(e){return t.setEnd(`from`,e)}),z()(),R(5,`label`)(6,`span`),K(7,`End`),z(),R(8,`input`,1),U(`change`,function(e){return t.setEnd(`to`,e)}),z()(),A(9,Nk,2,0,`button`,2),R(10,`p`,3),K(11),z()(),R(12,`p`,4),K(13,` Drag across the bars to pick a range of cycles. With the chart focused, the arrow keys move between cycles, Shift with an arrow key extends the range, Enter picks one cycle and Escape shows all cycles again. `),z(),R(14,`div`,5)(15,`div`,6)(16,`span`,7),K(17),z(),R(18,`span`,8),K(19,`0 ms`),z()(),R(20,`div`,9),A(21,Pk,1,4,`div`,10),R(22,`div`,11)(23,`span`),K(24),z()(),R(25,`div`,12),U(`keydown`,function(e){return t.onKey(e)})(`focus`,function(){return t.onFocus()})(`blur`,function(){return t.focused.set(!1)})(`pointerdown`,function(e){return t.startDrag(e)})(`pointermove`,function(e){return t.onPointerMove(e)})(`pointerleave`,function(){return t.hover.set(null)}),M(26,Fk,2,12,`div`,13,jk),z(),A(28,zk,12,12,`div`,14),z()(),R(29,`div`,15),M(30,Bk,1,2,`span`,16,jk),z(),R(32,`ul`,17)(33,`li`),fg(34,`span`,18),K(35,`Within budget`),z(),R(36,`li`),fg(37,`span`,19)(38,`span`,20),K(39,`Over budget `),z(),R(40,`li`),fg(41,`span`,21),K(42),z()(),R(43,`details`,22)(44,`summary`),K(45,`Show the cycles as a table`),z(),R(46,`div`,23)(47,`table`)(48,`caption`,24),K(49),z(),R(50,`thead`)(51,`tr`)(52,`th`,25),K(53,`Cycle`),z(),R(54,`th`,25),K(55,`Duration`),z(),R(56,`th`,26),K(57,`Budget`),z(),R(58,`th`,25),K(59,`Checks`),z(),R(60,`th`,25),K(61,`Passes`),z(),R(62,`th`,26),K(63,`After`),z(),R(64,`th`,26),K(65,`Slowest component`),z()()(),R(66,`tbody`),M(67,Hk,15,7,`tr`,null,Mk),z()()()()),e&2){let e,n;D(4),V(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),D(4),V(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),D(),j(t.range()?9:-1),D(2),q(t.summary()),D(),V(`id`,t.hintId),D(2),G(`flush`,t.bars().length>t.gapUntil),D(3),q(t.fmt(t.max())),D(4),j((e=t.band())?21:-1,e),D(),n_(`bottom`,t.budgetAt(),`%`),D(2),q(t.budgetLabel()),D(),k(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),D(),N(t.bars()),D(2),j((n=t.tip())?28:-1,n),D(),G(`flush`,t.bars().length>t.gapUntil),D(),N(t.bars()),D(12),q(t.budgetLabel()),D(4),k(`aria-label`,t.tableLabel()),D(3),J(` `,t.tableLabel(),` `),D(18),N(t.selected())}},styles:[`[_nghost-%COMP%] { +}`]})},wk=(e,t)=>t.cycle.id,Tk=(e,t)=>t.id;function Ek(e,t){if(e&1){let e=B();R(0,`button`,27),U(`click`,function(){return S(e),C(W().showAll())}),K(1,`Show all cycles`),z()}}function Dk(e,t){if(e&1&&ug(0,`div`,28),e&2){let e=t;e_(`left`,e.left,`%`)(`width`,e.width,`%`)}}function Ok(e,t){if(e&1&&(R(0,`div`,29),ug(1,`span`,30),z()),e&2){let e=t.$implicit,n=W();G(`over`,e.over)(`out`,!n.inRange(e.index)&&!!n.range())(`active`,n.focused()&&n.active()===e.index),V(`id`,n.optionId(e.index)),k(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),D(),e_(`height`,e.height,`%`)}}function kk(e,t){e&1&&(R(0,`span`,33),K(1,`over budget`),z())}function Ak(e,t){if(e&1&&(R(0,`p`),K(1,` after `),R(2,`span`,35),K(3),z()()),e&2){let e=W();D(3),q(e.cycle.trigger)}}function jk(e,t){if(e&1&&(R(0,`p`,34)(1,`span`,36),K(2),z(),R(3,`span`),K(4),z()()),e&2){let e=t.$implicit,n=W(2);D(2),q(e.name),D(2),q(n.fmt(e.ms))}}function Mk(e,t){if(e&1&&(R(0,`div`,31)(1,`p`,32)(2,`strong`),K(3),z(),R(4,`span`),K(5),z(),A(6,kk,2,0,`span`,33),z(),A(7,Ak,4,1,`p`),R(8,`p`),K(9),z(),M(10,jk,5,2,`p`,34,Qh),z()),e&2){let e=t,n=W();e_(`left`,e.left)(`right`,e.right),D(3),q(n.fmt(e.cycle.ms)),D(2),J(`cycle `,e.cycle.id),D(),j(e.over?6:-1),D(),j(e.cycle.trigger?7:-1),D(2),D_(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),D(),N(e.top)}}function Nk(e,t){if(e&1&&ug(0,`span`),e&2){let e=t.$implicit;G(`over`,e.over)}}function Pk(e,t){if(e&1&&K(0),e&2){let e=t,n=W(2);Y(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function Fk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,37),K(2),z(),R(3,`td`,37),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`,37),K(8),z(),R(9,`td`,37),K(10),z(),R(11,`td`,35),K(12),z(),R(13,`td`,35),A(14,Pk,1,2),z()()),e&2){let e,n=t.$implicit,r=W();D(2),q(n.id),D(2),q(r.fmt(n.ms)),D(2),q(r.isOver(n)?`Over`:`Within`),D(2),q(n.checks),D(2),q(n.passes),D(2),q(n.trigger??``),D(2),j((e=n.components[0])?14:-1,e)}}var Ik=0,Lk=80,Rk=10,zk=class e{cycles=$([]);range=fv(null);slowMs=$(16);gapUntil=Lk;budgetLabel=X(()=>`${this.slowMs()} ms budget`);uid=`cd-chart-${Ik++}`;hintId=`${this.uid}-hint`;active=T(null);anchor=null;dragging=!1;hover=T(null);focused=T(!1);max=X(()=>ZO(this.cycles(),this.slowMs()));budgetAt=X(()=>this.slowMs()/this.max()*100);bars=X(()=>{let e=this.max();return this.cycles().map((t,n)=>({cycle:t,index:n,height:t.ms/e*100,over:qO(t,this.slowMs()),label:this.describe(t)}))});firstId=X(()=>this.cycles()[0]?.id??0);lastId=X(()=>this.cycles().at(-1)?.id??0);span=X(()=>{let e=this.range();if(!e)return null;let t=this.cycles(),n=Math.min(e.from,e.to),r=Math.max(e.from,e.to),i=t.findIndex(e=>e.id>=n),a=-1;for(let e=t.length-1;e>=0;e--)if(t[e].id<=r){a=e;break}return i<0||aYO(this.cycles(),this.range()));startId=X(()=>this.selected()[0]?.id??``);endId=X(()=>this.selected().at(-1)?.id??``);band=X(()=>{let e=this.span(),t=this.cycles().length;return!e||!t?null:{left:e.start/t*100,width:(e.end-e.start+1)/t*100}});summary=X(()=>{let e=this.selected(),t=this.slowMs(),n=e.filter(e=>qO(e,t)).length;return`${this.span()?e.length===1?`Cycle ${e[0].id}`:`Cycles ${e[0].id} to ${e.at(-1).id} (${e.length})`:`All ${e.length} ${e.length===1?`cycle`:`cycles`}`}. ${n} over the ${t} ms budget.`});tableLabel=X(()=>this.span()?`Picked cycles, ${this.summary()}`:`All recorded cycles`);activeOptionId=X(()=>{let e=this.active();return this.focused()&&e!==null&&e{let e=this.hover()??(this.focused()?this.active():null),t=e===null?void 0:this.cycles()[e];return!t||e===null?null:{cycle:t,over:qO(t,this.slowMs()),top:t.components.slice(0,3),...this.tipSide(e)}});tipSide(e){let t=this.cycles().length;return e+.5=t.start&&e<=t.end}describe(e){let t=[`Cycle ${e.id}`,JO(e.ms)];qO(e,this.slowMs())&&t.push(`over budget`),e.trigger&&t.push(`after ${e.trigger}`),t.push(`${e.checks} ${e.checks===1?`check`:`checks`}`);let n=e.components[0];return n&&t.push(`slowest ${n.name} ${JO(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+Rk;break;case`PageUp`:r=n-Rk;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=O({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&H(`pointerup`,function(){return t.endDrag()},Du)(`pointercancel`,function(){return t.endDrag()},Du)},inputs:{cycles:[1,`cycles`],range:[1,`range`],slowMs:[1,`slowMs`]},outputs:{range:`rangeChange`},decls:69,vars:25,consts:[[1,`range`],[`type`,`number`,`inputmode`,`numeric`,3,`change`,`min`,`max`,`value`],[`type`,`button`],[1,`summary`],[1,`hint`,3,`id`],[1,`plot`],[`aria-hidden`,`true`,1,`axis`],[1,`tick`,`top`],[1,`tick`,`zero`],[1,`area`],[`aria-hidden`,`true`,1,`band`,3,`left`,`width`],[`aria-hidden`,`true`,1,`budget`],[`role`,`listbox`,`aria-multiselectable`,`true`,`aria-orientation`,`horizontal`,`tabindex`,`0`,1,`bars`,3,`keydown`,`focus`,`blur`,`pointerdown`,`pointermove`,`pointerleave`],[`role`,`option`,1,`col`,3,`id`,`over`,`out`,`active`],[`aria-hidden`,`true`,1,`tip`,3,`left`,`right`],[`aria-hidden`,`true`,1,`markers`],[3,`over`],[`aria-label`,`Chart key`,1,`legend`],[`aria-hidden`,`true`,1,`key`,`ok`],[`aria-hidden`,`true`,1,`key`,`over`],[`aria-hidden`,`true`,1,`key-marker`],[`aria-hidden`,`true`,1,`key`,`line`],[1,`table`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[`type`,`button`,3,`click`],[`aria-hidden`,`true`,1,`band`],[`role`,`option`,1,`col`,3,`id`],[1,`bar`],[`aria-hidden`,`true`,1,`tip`],[1,`tip-head`],[1,`flag`],[1,`tip-row`],[1,`mono`],[1,`mono`,`name`],[1,`num`]],template:function(e,t){if(e&1&&(R(0,`div`,0)(1,`label`)(2,`span`),K(3,`Start`),z(),R(4,`input`,1),U(`change`,function(e){return t.setEnd(`from`,e)}),z()(),R(5,`label`)(6,`span`),K(7,`End`),z(),R(8,`input`,1),U(`change`,function(e){return t.setEnd(`to`,e)}),z()(),A(9,Ek,2,0,`button`,2),R(10,`p`,3),K(11),z()(),R(12,`p`,4),K(13,` Drag across the bars to pick a range of cycles. With the chart focused, the arrow keys move between cycles, Shift with an arrow key extends the range, Enter picks one cycle and Escape shows all cycles again. `),z(),R(14,`div`,5)(15,`div`,6)(16,`span`,7),K(17),z(),R(18,`span`,8),K(19,`0 ms`),z()(),R(20,`div`,9),A(21,Dk,1,4,`div`,10),R(22,`div`,11)(23,`span`),K(24),z()(),R(25,`div`,12),U(`keydown`,function(e){return t.onKey(e)})(`focus`,function(){return t.onFocus()})(`blur`,function(){return t.focused.set(!1)})(`pointerdown`,function(e){return t.startDrag(e)})(`pointermove`,function(e){return t.onPointerMove(e)})(`pointerleave`,function(){return t.hover.set(null)}),M(26,Ok,2,12,`div`,13,wk),z(),A(28,Mk,12,12,`div`,14),z()(),R(29,`div`,15),M(30,Nk,1,2,`span`,16,wk),z(),R(32,`ul`,17)(33,`li`),ug(34,`span`,18),K(35,`Within budget`),z(),R(36,`li`),ug(37,`span`,19)(38,`span`,20),K(39,`Over budget `),z(),R(40,`li`),ug(41,`span`,21),K(42),z()(),R(43,`details`,22)(44,`summary`),K(45,`Show the cycles as a table`),z(),R(46,`div`,23)(47,`table`)(48,`caption`,24),K(49),z(),R(50,`thead`)(51,`tr`)(52,`th`,25),K(53,`Cycle`),z(),R(54,`th`,25),K(55,`Duration`),z(),R(56,`th`,26),K(57,`Budget`),z(),R(58,`th`,25),K(59,`Checks`),z(),R(60,`th`,25),K(61,`Passes`),z(),R(62,`th`,26),K(63,`After`),z(),R(64,`th`,26),K(65,`Slowest component`),z()()(),R(66,`tbody`),M(67,Fk,15,7,`tr`,null,Tk),z()()()()),e&2){let e,n;D(4),V(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),D(4),V(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),D(),j(t.range()?9:-1),D(2),q(t.summary()),D(),V(`id`,t.hintId),D(2),G(`flush`,t.bars().length>t.gapUntil),D(3),q(t.fmt(t.max())),D(4),j((e=t.band())?21:-1,e),D(),e_(`bottom`,t.budgetAt(),`%`),D(2),q(t.budgetLabel()),D(),k(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),D(),N(t.bars()),D(2),j((n=t.tip())?28:-1,n),D(),G(`flush`,t.bars().length>t.gapUntil),D(),N(t.bars()),D(12),q(t.budgetLabel()),D(4),k(`aria-label`,t.tableLabel()),D(3),J(` `,t.tableLabel(),` `),D(18),N(t.selected())}},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1335,7 +1335,7 @@ td.mono[_ngcontent-%COMP%] { .bar[_ngcontent-%COMP%] { transition: none; } -}`]})},qk=(e,t)=>t.id,Jk=(e,t)=>t.index,Yk=(e,t)=>t.kind;function Xk(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=W(2);D(),Y(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function Zk(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=t.$implicit;n_(`left`,e.x,`%`)(`width`,e.w,`%`),D(),J(`cycle `,e.id)}}function Qk(e,t){if(e&1){let e=B();R(0,`button`,11),U(`focus`,function(){let t=S(e).$implicit;return C(W(3).current.set(t.index))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(3).hover.set(t.index))})(`mouseleave`,function(){return S(e),C(W(3).hover.set(null))})(`click`,function(){let t=S(e).$implicit;return C(W(3).choose(t))}),R(1,`span`,12),K(2),z()()}if(e&2){let e=t.$implicit,n=W(3);r_(R_(`block kind-`,e.kind)),n_(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),G(`narrow`,e.w<4),k(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),D(2),q(e.name)}}function $k(e,t){if(e&1&&(R(0,`li`),fg(1,`span`,13),K(2),z()),e&2){let e=t.$implicit;D(),r_(R_(`key kind-`,e.kind)),D(),q(e.label)}}function eA(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=W(3);D(),Y(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function tA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,17),K(2),z(),R(3,`td`,18),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`,17),K(8),z(),R(9,`td`,17),K(10),z(),R(11,`td`,17),K(12),z(),R(13,`td`,17),K(14),z()()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.cycleId),D(),n_(`padding-left`,6+e.depth*8,`px`),D(),q(e.name),D(2),q(n.kindLabel(e)),D(2),q(e.depth),D(2),q(n.fmt(e.start)),D(2),q(n.fmt(e.ms)),D(2),q(n.fmt(e.selfMs))}}function nA(e,t){if(e&1&&(R(0,`div`,10)(1,`table`)(2,`caption`,14),K(3),z(),R(4,`thead`)(5,`tr`)(6,`th`,15),K(7,`Cycle`),z(),R(8,`th`,16),K(9,`Span`),z(),R(10,`th`,16),K(11,`Kind`),z(),R(12,`th`,15),K(13,`Depth`),z(),R(14,`th`,15),K(15,`Start`),z(),R(16,`th`,15),K(17,`Total`),z(),R(18,`th`,15),K(19,`Self`),z()()(),R(20,`tbody`),M(21,tA,15,9,`tr`,null,Jk),z()()()),e&2){let e=W(),t=W(2);k(`aria-label`,t.tableLabel()),D(3),J(` `,t.tableLabel(),` `),D(18),N(e.blocks)}}function rA(e,t){if(e&1){let e=B();R(0,`div`,1),U(`keydown`,function(t){return S(e),C(W(2).onKey(t))}),R(1,`div`,2),M(2,Zk,2,5,`span`,3,qk),z(),R(4,`div`,4),M(5,Qk,3,16,`button`,5,Jk),z()(),R(7,`p`,6),K(8),z(),R(9,`ul`,7),M(10,$k,3,4,`li`,null,Yk),z(),R(12,`p`,8),K(13,` Arrow keys move along a row, Up goes to the enclosing span and Down to the first nested one. Enter on a component shows it in the tree. `),z(),A(14,eA,2,2,`p`,0),R(15,`details`,9),U(`toggle`,function(t){return S(e),C(W(2).onToggle(t))}),R(16,`summary`),K(17,`Show the spans as a table`),z(),A(18,nA,23,2,`div`,10),z()}if(e&2){let e=t,n=W(2);k(`aria-label`,n.label()),D(2),N(e.cycles),D(2),n_(`height`,e.depth*n.row,`px`),D(),N(e.blocks),D(3),q(n.readout()),D(2),N(n.kinds),D(4),j(n.dropped()?14:-1),D(4),j(n.tableOpen()?18:-1)}}function iA(e,t){if(e&1&&(R(0,`h3`),K(1,`Spans in the picked cycles`),z(),A(2,Xk,2,2,`p`,0)(3,rA,19,6)),e&2){let e,t=W();D(2),j(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var aA=22;function oA(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]}var sA=class e{cycles=$([]);names=$([]);scope=$(`the recording`);pick=lv();row=aA;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:ok[e]}));current=T(0);tableOpen=T(!1);hover=T(null);hasSpans=X(()=>this.cycles().some(e=>e.spans?.length));count=X(()=>this.cycles().length);tooMany=X(()=>this.count()>30);graph=X(()=>this.tooMany()?null:ck(this.cycles(),this.names()));tabStop=X(()=>Math.min(this.current(),Math.max((this.graph()?.blocks.length??1)-1,0)));dropped=X(()=>this.graph()?.cycles.reduce((e,t)=>e+t.droppedSpans,0)??0);label=X(()=>`Spans in ${this.scope()} over time, nested by depth. Pick a component to show it in the tree.`);readout=X(()=>{let e=(this.graph()?.blocks??[])[this.hover()??this.tabStop()];return e?this.describe(e):``});tableLabel=X(()=>`Timed spans in ${this.scope()}`);fmt(e){return tk(e)}kindLabel(e){return ok[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,ok[e.kind],`${tk(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${tk(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${tk(-e.start)} before it started`:`cycle ${e.cycleId} at ${tk(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=oA(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=O({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&&A(0,iA,4,1),e&2&&j(t.hasSpans()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},Bk=(e,t)=>t.id,Vk=(e,t)=>t.index,Hk=(e,t)=>t.kind;function Uk(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=W(2);D(),Y(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function Wk(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=t.$implicit;e_(`left`,e.x,`%`)(`width`,e.w,`%`),D(),J(`cycle `,e.id)}}function Gk(e,t){if(e&1){let e=B();R(0,`button`,11),U(`focus`,function(){let t=S(e).$implicit;return C(W(3).current.set(t.index))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(3).hover.set(t.index))})(`mouseleave`,function(){return S(e),C(W(3).hover.set(null))})(`click`,function(){let t=S(e).$implicit;return C(W(3).choose(t))}),R(1,`span`,12),K(2),z()()}if(e&2){let e=t.$implicit,n=W(3);t_(I_(`block kind-`,e.kind)),e_(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),G(`narrow`,e.w<4),k(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),D(2),q(e.name)}}function Kk(e,t){if(e&1&&(R(0,`li`),ug(1,`span`,13),K(2),z()),e&2){let e=t.$implicit;D(),t_(I_(`key kind-`,e.kind)),D(),q(e.label)}}function qk(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=W(3);D(),Y(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function Jk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,17),K(2),z(),R(3,`td`,18),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`,17),K(8),z(),R(9,`td`,17),K(10),z(),R(11,`td`,17),K(12),z(),R(13,`td`,17),K(14),z()()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.cycleId),D(),e_(`padding-left`,6+e.depth*8,`px`),D(),q(e.name),D(2),q(n.kindLabel(e)),D(2),q(e.depth),D(2),q(n.fmt(e.start)),D(2),q(n.fmt(e.ms)),D(2),q(n.fmt(e.selfMs))}}function Yk(e,t){if(e&1&&(R(0,`div`,10)(1,`table`)(2,`caption`,14),K(3),z(),R(4,`thead`)(5,`tr`)(6,`th`,15),K(7,`Cycle`),z(),R(8,`th`,16),K(9,`Span`),z(),R(10,`th`,16),K(11,`Kind`),z(),R(12,`th`,15),K(13,`Depth`),z(),R(14,`th`,15),K(15,`Start`),z(),R(16,`th`,15),K(17,`Total`),z(),R(18,`th`,15),K(19,`Self`),z()()(),R(20,`tbody`),M(21,Jk,15,9,`tr`,null,Vk),z()()()),e&2){let e=W(),t=W(2);k(`aria-label`,t.tableLabel()),D(3),J(` `,t.tableLabel(),` `),D(18),N(e.blocks)}}function Xk(e,t){if(e&1){let e=B();R(0,`div`,1),U(`keydown`,function(t){return S(e),C(W(2).onKey(t))}),R(1,`div`,2),M(2,Wk,2,5,`span`,3,Bk),z(),R(4,`div`,4),M(5,Gk,3,16,`button`,5,Vk),z()(),R(7,`p`,6),K(8),z(),R(9,`ul`,7),M(10,Kk,3,4,`li`,null,Hk),z(),R(12,`p`,8),K(13,` Arrow keys move along a row, Up goes to the enclosing span and Down to the first nested one. Enter on a component shows it in the tree. `),z(),A(14,qk,2,2,`p`,0),R(15,`details`,9),U(`toggle`,function(t){return S(e),C(W(2).onToggle(t))}),R(16,`summary`),K(17,`Show the spans as a table`),z(),A(18,Yk,23,2,`div`,10),z()}if(e&2){let e=t,n=W(2);k(`aria-label`,n.label()),D(2),N(e.cycles),D(2),e_(`height`,e.depth*n.row,`px`),D(),N(e.blocks),D(3),q(n.readout()),D(2),N(n.kinds),D(4),j(n.dropped()?14:-1),D(4),j(n.tableOpen()?18:-1)}}function Zk(e,t){if(e&1&&(R(0,`h3`),K(1,`Spans in the picked cycles`),z(),A(2,Uk,2,2,`p`,0)(3,Xk,19,6)),e&2){let e,t=W();D(2),j(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var Qk=22;function $k(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]}var eA=class e{cycles=$([]);names=$([]);scope=$(`the recording`);pick=sv();row=Qk;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:$O[e]}));current=T(0);tableOpen=T(!1);hover=T(null);hasSpans=X(()=>this.cycles().some(e=>e.spans?.length));count=X(()=>this.cycles().length);tooMany=X(()=>this.count()>30);graph=X(()=>this.tooMany()?null:tk(this.cycles(),this.names()));tabStop=X(()=>Math.min(this.current(),Math.max((this.graph()?.blocks.length??1)-1,0)));dropped=X(()=>this.graph()?.cycles.reduce((e,t)=>e+t.droppedSpans,0)??0);label=X(()=>`Spans in ${this.scope()} over time, nested by depth. Pick a component to show it in the tree.`);readout=X(()=>{let e=(this.graph()?.blocks??[])[this.hover()??this.tabStop()];return e?this.describe(e):``});tableLabel=X(()=>`Timed spans in ${this.scope()}`);fmt(e){return JO(e)}kindLabel(e){return $O[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,$O[e.kind],`${JO(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${JO(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${JO(-e.start)} before it started`:`cycle ${e.cycleId} at ${JO(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=$k(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=O({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&&A(0,Zk,4,1),e&2&&j(t.hasSpans()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1542,7 +1542,7 @@ td.mono[_ngcontent-%COMP%] { .num[_ngcontent-%COMP%] { text-align: right; font-variant-numeric: tabular-nums; -}`]})};function cA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,5),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`,6),K(8),z()()),e&2){let e=t.$implicit,n=W(3);D(2),Y(``,e.name,`.`,e.hook),D(2),q(e.calls),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function lA(e,t){if(e&1&&(R(0,`div`)(1,`h3`),K(2,`Lifecycle hooks`),z(),R(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Hook`),z(),R(8,`th`,4),K(9,`Calls`),z(),R(10,`th`,4),K(11,`Time`),z(),R(12,`th`,4),K(13,`Slowest`),z()()(),R(14,`tbody`),M(15,cA,9,5,`tr`,null,eg),z()()()),e&2){let e=W(2);D(15),N(e.hooks())}}function uA(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` (`,e.listener,`) `)}}function dA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,5),K(2),A(3,uA,1,1),z(),R(4,`td`,6),K(5),z(),R(6,`td`,6),K(7),z(),R(8,`td`,6),K(9),z()()),e&2){let e=t.$implicit,n=W(3);D(2),J(` `,e.name,` `),D(),j(e.listener?3:-1),D(2),q(e.calls),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function fA(e,t){if(e&1&&(R(0,`div`)(1,`h3`),K(2,`Output listeners`),z(),R(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Listener`),z(),R(8,`th`,4),K(9,`Calls`),z(),R(10,`th`,4),K(11,`Time`),z(),R(12,`th`,4),K(13,`Slowest`),z()()(),R(14,`tbody`),M(15,dA,10,5,`tr`,null,eg),z()()()),e&2){let e=W(2);D(15),N(e.outputs())}}function pA(e,t){if(e&1&&(R(0,`p`,1),K(1),z()),e&2){let e=t,n=W(2);D(),k_(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function mA(e,t){if(e&1&&(R(0,`p`,2),K(1),z()),e&2){let e=W(2);D(),Y(` `,e.dropped(),` more hook or output `,e.dropped()===1?`row is`:`rows are`,` left out. A recording lists at most 100 of each. `)}}function hA(e,t){if(e&1&&(R(0,`div`,0),A(1,lA,17,0,`div`),A(2,fA,17,0,`div`),z(),A(3,pA,2,4,`p`,1),A(4,mA,2,2,`p`,2)),e&2){let e,t=W();D(),j(t.hooks().length?1:-1),D(),j(t.outputs().length?2:-1),D(),j((e=t.afterRender())?3:-1,e),D(),j(t.dropped()?4:-1)}}var gA=10;function _A(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var vA=class e{page=$(null);hooks=X(()=>(this.page()?.hooks??[]).slice(0,gA));outputs=X(()=>(this.page()?.outputs??[]).slice(0,gA));afterRender=X(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=X(()=>this.page()?.droppedTimings??0);ms(e){return _A(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,hA,5,4),e&2&&j(t.hooks().length||t.outputs().length||t.afterRender()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})};function tA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,5),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`,6),K(8),z()()),e&2){let e=t.$implicit,n=W(3);D(2),Y(``,e.name,`.`,e.hook),D(2),q(e.calls),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function nA(e,t){if(e&1&&(R(0,`div`)(1,`h3`),K(2,`Lifecycle hooks`),z(),R(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Hook`),z(),R(8,`th`,4),K(9,`Calls`),z(),R(10,`th`,4),K(11,`Time`),z(),R(12,`th`,4),K(13,`Slowest`),z()()(),R(14,`tbody`),M(15,tA,9,5,`tr`,null,Qh),z()()()),e&2){let e=W(2);D(15),N(e.hooks())}}function rA(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` (`,e.listener,`) `)}}function iA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,5),K(2),A(3,rA,1,1),z(),R(4,`td`,6),K(5),z(),R(6,`td`,6),K(7),z(),R(8,`td`,6),K(9),z()()),e&2){let e=t.$implicit,n=W(3);D(2),J(` `,e.name,` `),D(),j(e.listener?3:-1),D(2),q(e.calls),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function aA(e,t){if(e&1&&(R(0,`div`)(1,`h3`),K(2,`Output listeners`),z(),R(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Listener`),z(),R(8,`th`,4),K(9,`Calls`),z(),R(10,`th`,4),K(11,`Time`),z(),R(12,`th`,4),K(13,`Slowest`),z()()(),R(14,`tbody`),M(15,iA,10,5,`tr`,null,Qh),z()()()),e&2){let e=W(2);D(15),N(e.outputs())}}function oA(e,t){if(e&1&&(R(0,`p`,1),K(1),z()),e&2){let e=t,n=W(2);D(),D_(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function sA(e,t){if(e&1&&(R(0,`p`,2),K(1),z()),e&2){let e=W(2);D(),Y(` `,e.dropped(),` more hook or output `,e.dropped()===1?`row is`:`rows are`,` left out. A recording lists at most 100 of each. `)}}function cA(e,t){if(e&1&&(R(0,`div`,0),A(1,nA,17,0,`div`),A(2,aA,17,0,`div`),z(),A(3,oA,2,4,`p`,1),A(4,sA,2,2,`p`,2)),e&2){let e,t=W();D(),j(t.hooks().length?1:-1),D(),j(t.outputs().length?2:-1),D(),j((e=t.afterRender())?3:-1,e),D(),j(t.dropped()?4:-1)}}var lA=10;function uA(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var dA=class e{page=$(null);hooks=X(()=>(this.page()?.hooks??[]).slice(0,lA));outputs=X(()=>(this.page()?.outputs??[]).slice(0,lA));afterRender=X(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=X(()=>this.page()?.droppedTimings??0);ms(e){return uA(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,cA,5,4),e&2&&j(t.hooks().length||t.outputs().length||t.afterRender()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -1602,7 +1602,7 @@ td.mono[_ngcontent-%COMP%] { margin: 8px 0 0; color: var(--%NS%text-2); font-size: 12px; -}`]})};function yA(e,t){if(e&1&&(R(0,`p`,5),K(1),z()),e&2){let e=W();D(),q(e.error())}}function bA(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 xA=class e{page=$(null);maxCycles=$(200);imported=lv();error=T(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&bA(KO(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&bA($O(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=qO(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=O({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=B();R(0,`div`,1)(1,`button`,2),U(`click`,function(){return t.exportJson()}),K(2,`Export JSON`),z(),R(3,`button`,2),U(`click`,function(){return t.exportTrace()}),K(4,` Export trace (Perfetto) `),z(),R(5,`button`,3),U(`click`,function(){return S(e),C(Fg(8).click())}),K(6,`Import`),z(),R(7,`input`,4,0),U(`change`,function(){S(e);let n=Fg(8);return C(t.read(n))}),z()(),A(9,yA,2,1,`p`,5)}e&2&&(D(),V(`disabled`,!t.hasCycles()),D(2),V(`disabled`,!t.hasCycles()),D(6),j(t.error()?9:-1))},styles:[`[_nghost-%COMP%] { +}`]})};function fA(e,t){if(e&1&&(R(0,`p`,5),K(1),z()),e&2){let e=W();D(),q(e.error())}}function pA(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 mA=class e{page=$(null);maxCycles=$(200);imported=sv();error=T(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&pA(zO(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&pA(KO(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=BO(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=O({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=B();R(0,`div`,1)(1,`button`,2),U(`click`,function(){return t.exportJson()}),K(2,`Export JSON`),z(),R(3,`button`,2),U(`click`,function(){return t.exportTrace()}),K(4,` Export trace (Perfetto) `),z(),R(5,`button`,3),U(`click`,function(){return S(e),C(Ng(8).click())}),K(6,`Import`),z(),R(7,`input`,4,0),U(`change`,function(){S(e);let n=Ng(8);return C(t.read(n))}),z()(),A(9,fA,2,1,`p`,5)}e&2&&(D(),V(`disabled`,!t.hasCycles()),D(2),V(`disabled`,!t.hasCycles()),D(6),j(t.error()?9:-1))},styles:[`[_nghost-%COMP%] { display: contents; } @@ -1644,7 +1644,7 @@ button[_ngcontent-%COMP%]:disabled { margin: 0; color: var(--%NS%danger-text); font-size: 12px; -}`]})},SA=(e,t)=>t.stat.name;function CA(e,t){if(e&1&&(R(0,`span`,8),K(1),z()),e&2){let e=W(2).$implicit;D(),J(``,e.other,` more`)}}function wA(e,t){if(e&1&&(R(0,`div`,6)(1,`span`,7),K(2),z(),A(3,CA,2,1,`span`,8),z()),e&2){let e=W().$implicit;n_(`--%NS%tone`,e.tone+`%`),D(2),q(e.label),D(),j(e.roomy?3:-1)}}function TA(e,t){if(e&1&&(R(0,`span`,10),K(1),z(),R(2,`span`,11),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(),q(e.stat.name),D(2),q(t.fmt(e.stat.ms))}}function EA(e,t){if(e&1){let e=B();R(0,`button`,9),U(`focus`,function(){S(e);let t=W().$index;return C(W(2).current.set(t))})(`click`,function(){S(e);let t=W().$implicit;return C(W(2).pick.emit(t.stat.name))}),A(1,TA,4,2),z()}if(e&2){let e=W(),t=e.$implicit,n=e.$index,r=W(2);n_(`--%NS%tone`,t.tone+`%`),k(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),D(),j(t.roomy?1:-1)}}function DA(e,t){if(e&1&&(R(0,`li`),A(1,wA,4,4,`div`,4)(2,EA,2,6,`button`,5),z()),e&2){let e=t.$implicit;n_(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),D(),j(e.other?1:2)}}function OA(e,t){if(e&1){let e=B();R(0,`ul`,2),U(`keydown`,function(t){return S(e),C(W().onKey(t))}),M(1,DA,3,9,`li`,3,SA),z()}if(e&2){let e=W();k(`aria-label`,e.label()),D(),N(e.cells())}}function kA(e,t){e&1&&(R(0,`p`,1),K(1,`No component time in these cycles.`),z())}var AA=24,jA=3,MA=class e{stats=$([]);scope=$(`the recording`);pick=lv();current=T(0);label=X(()=>`Self time per component in ${this.scope()}, largest first. Pick one to show it in the tree.`);cells=X(()=>{let e=this.stats().filter(e=>e.ms>0),t=e.slice(0,AA),n=e.slice(AA),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=ak(i,e=>e.stat.ms,jA);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, ${tk(t.ms)}, ${r}% of self time`:`${t.name}, ${tk(t.ms)} self time, ${r}%, ${t.checks} ${t.checks===1?`check`:`checks`}`}})});tabStop=X(()=>Math.min(this.current(),Math.max(this.cells().filter(e=>!e.other).length-1,0)));fmt(e){return tk(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=O({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&&A(0,OA,3,1,`ul`,0)(1,kA,2,0,`p`,1),e&2&&j(+!t.cells().length)},styles:[`[_nghost-%COMP%] { +}`]})},hA=(e,t)=>t.stat.name;function gA(e,t){if(e&1&&(R(0,`span`,8),K(1),z()),e&2){let e=W(2).$implicit;D(),J(``,e.other,` more`)}}function _A(e,t){if(e&1&&(R(0,`div`,6)(1,`span`,7),K(2),z(),A(3,gA,2,1,`span`,8),z()),e&2){let e=W().$implicit;e_(`--%NS%tone`,e.tone+`%`),D(2),q(e.label),D(),j(e.roomy?3:-1)}}function vA(e,t){if(e&1&&(R(0,`span`,10),K(1),z(),R(2,`span`,11),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(),q(e.stat.name),D(2),q(t.fmt(e.stat.ms))}}function yA(e,t){if(e&1){let e=B();R(0,`button`,9),U(`focus`,function(){S(e);let t=W().$index;return C(W(2).current.set(t))})(`click`,function(){S(e);let t=W().$implicit;return C(W(2).pick.emit(t.stat.name))}),A(1,vA,4,2),z()}if(e&2){let e=W(),t=e.$implicit,n=e.$index,r=W(2);e_(`--%NS%tone`,t.tone+`%`),k(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),D(),j(t.roomy?1:-1)}}function bA(e,t){if(e&1&&(R(0,`li`),A(1,_A,4,4,`div`,4)(2,yA,2,6,`button`,5),z()),e&2){let e=t.$implicit;e_(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),D(),j(e.other?1:2)}}function xA(e,t){if(e&1){let e=B();R(0,`ul`,2),U(`keydown`,function(t){return S(e),C(W().onKey(t))}),M(1,bA,3,9,`li`,3,hA),z()}if(e&2){let e=W();k(`aria-label`,e.label()),D(),N(e.cells())}}function SA(e,t){e&1&&(R(0,`p`,1),K(1,`No component time in these cycles.`),z())}var CA=24,wA=3,TA=class e{stats=$([]);scope=$(`the recording`);pick=sv();current=T(0);label=X(()=>`Self time per component in ${this.scope()}, largest first. Pick one to show it in the tree.`);cells=X(()=>{let e=this.stats().filter(e=>e.ms>0),t=e.slice(0,CA),n=e.slice(CA),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=QO(i,e=>e.stat.ms,wA);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, ${JO(t.ms)}, ${r}% of self time`:`${t.name}, ${JO(t.ms)} self time, ${r}%, ${t.checks} ${t.checks===1?`check`:`checks`}`}})});tabStop=X(()=>Math.min(this.current(),Math.max(this.cells().filter(e=>!e.other).length-1,0)));fmt(e){return JO(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=O({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&&A(0,xA,3,1,`ul`,0)(1,SA,2,0,`p`,1),e&2&&j(+!t.cells().length)},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1720,7 +1720,7 @@ button.cell[_ngcontent-%COMP%]:focus-visible { .empty[_ngcontent-%COMP%] { margin: 8px 0; color: var(--%NS%text-2); -}`]})},NA=(e,t)=>t.id;function PA(e,t){if(e&1){let e=B();F(0,`button`,14),H(`click`,function(){return S(e),C(W(2).clear())}),K(1,`Clear`),I()}}function FA(e,t){if(e&1){let e=B();F(0,`button`,11),H(`click`,function(){return S(e),C(W().toggle())}),L(1,`span`,12),K(2),I(),A(3,PA,2,0,`button`,13)}if(e&2){let e=W();G(`on`,e.recording()),P(`disabled`,!e.pageId()),D(2),J(` `,e.recording()?`Stop recording`:`Record`,` `),D(),j(e.cycles().length?3:-1)}}function IA(e,t){if(e&1){let e=B();F(0,`p`,6)(1,`span`,15),K(2,`Imported recording`),I(),F(3,`span`,16),K(4),I(),F(5,`button`,14),H(`click`,function(){return S(e),C(W().closeImport())}),K(6,`Back to live recording`),I()()}e&2&&(D(4),q(t.fileName))}function LA(e,t){e&1&&K(0,` An app on a device has no DOM, so checks that changed nothing are not counted there. `)}function RA(e,t){e&1&&K(0,` A recording keeps running when the tab reloads, so it catches the next start of the app. The cycles from before the reload are gone with the old page. `)}function zA(e,t){e&1&&(F(0,`p`,9),K(1,` The page has Angular's profiler hook, but the recording could not attach to it yet. The page tries again on its next update while recording is on. If this stays, stop and start the recording, or reload the page. `),I())}function BA(e,t){e&1&&L(0,`app-angular-unavailable`,17),e&2&&P(`page`,W(2).angularPage())}function VA(e,t){e&1&&A(0,zA,2,0,`p`,9)(1,BA,1,1,`app-angular-unavailable`,17),e&2&&j(+!W().attachPending())}function HA(e,t){e&1&&(F(0,`p`,9),K(1,`Angular profiling stays on until the page reloads.`),I())}function UA(e,t){e&1&&L(0,`app-angular-unavailable`,21),e&2&&P(`page`,W(2).angularPage())}function WA(e,t){if(e&1){let e=B();F(0,`div`,18)(1,`span`,19),K(2,`Live views`),I(),F(3,`button`,20),H(`click`,function(){S(e);let t=W();return C(t.setView(`flash`,!t.views().flash))}),L(4,`span`,12),K(5,` Flash checks `),I(),F(6,`button`,20),H(`click`,function(){S(e);let t=W();return C(t.setView(`track`,!t.views().track))}),L(7,`span`,12),K(8,` Performance track `),I(),F(9,`button`,20),H(`click`,function(){return S(e),C(W().setView(`angularProfiling`,!0))}),L(10,`span`,12),K(11,` Angular profiling `),I()(),F(12,`p`,7),K(13,` Flash checks draws a box over each component on the page as Angular checks it, with its name and how often it was checked, fading over a second. Performance track adds a Pangular track to the Chrome Performance panel with every component check, hook and output. Angular profiling turns on Angular's own track there. `),I(),A(14,HA,2,0,`p`,9)(15,UA,1,1,`app-angular-unavailable`,21)}if(e&2){let e=W();D(3),P(`disabled`,!e.canShowViews()),k(`aria-pressed`,e.views().flash),D(3),P(`disabled`,!e.canShowViews()),k(`aria-pressed`,e.views().track),D(3),P(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),k(`aria-pressed`,e.views().angularProfiling),D(5),j(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function GA(e,t){if(e&1&&(F(0,`p`,9),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function KA(e,t){if(e&1&&(F(0,`p`,24),K(1),I()),e&2){let e=W(2);D(),J(` `,e.range()?`The picked cycles have no timed spans, so there is no flame graph for them.`:`This recording has no timed spans, so there is no flame graph. A recording from an older version, or a file saved without spans, has none.`,` `)}}function qA(e,t){e&1&&(F(0,`p`,9),K(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),I())}function JA(e,t){if(e&1){let e=B();F(0,`h3`),K(1,`Cycles`),I(),F(2,`app-cd-cycle-chart`,22),N_(`rangeChange`,function(t){S(e);let n=W();return M_(n.range,t)||(n.range=t),C(t)}),I(),F(3,`app-cd-flame-graph`,23),H(`pick`,function(t){return S(e),C(W().showComponent.emit(t))}),I(),A(4,KA,2,1,`p`,24),F(5,`h3`),K(6,`Self time by component`),I(),A(7,qA,2,0,`p`,9),F(8,`app-cd-treemap`,25),H(`pick`,function(t){return S(e),C(W().showComponent.emit(t))}),I()}if(e&2){let e=W();D(2),P(`cycles`,e.cycles())(`slowMs`,e.slowMs()),j_(`range`,e.range),D(),P(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),D(),j(e.hasSpans()?-1:4),D(3),j(e.range()?7:-1),D(),P(`stats`,e.stats())(`scope`,e.scope())}}function YA(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`,16)(2,`button`,31),H(`click`,function(){let t=S(e).$implicit;return C(W(2).showComponent.emit(t.name))}),K(3),I()(),F(4,`td`,32),K(5),I(),F(6,`td`,32),K(7),I(),F(8,`td`,32),K(9),I()()}if(e&2){let e=t.$implicit,n=W(2);D(3),J(` `,e.name,` `),D(2),q(e.checks),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function XA(e,t){e&1&&(F(0,`tr`)(1,`td`,33),K(2,`No component time in the picked cycles.`),I()())}function ZA(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`,16)(2,`button`,31),H(`click`,function(){let t=S(e).$implicit;return C(W(2).showComponent.emit(t.name))}),K(3),I()(),F(4,`td`,32),K(5),I(),F(6,`td`,32),K(7),I(),F(8,`td`,32),K(9),I()()}if(e&2){let e=t.$implicit,n=W(2);D(3),J(` `,e.name,` `),D(2),q(e.checks),D(2),q(e.cycles),D(2),q(n.ms(e.ms))}}function QA(e,t){e&1&&(F(0,`tr`)(1,`td`,33),K(2,`No component checks in the picked cycles.`),I()())}function $A(e,t){if(e&1&&(F(0,`span`,35),K(1,`from `),F(2,`span`,16),K(3),I()()),e&2){let e=W(3);D(3),q(e.causeText(t))}}function ej(e,t){if(e&1&&(F(0,`span`,35),K(1,`after `),F(2,`span`,16),K(3),I()()),e&2){let e=W().$implicit;D(3),q(e.trigger)}}function tj(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.unchanged,` changed nothing`)}}function nj(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),J(`hooks `,t.ms(e.hookMs))}}function rj(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),J(`afterRender `,t.ms(e.afterRenderMs))}}function ij(e,t){if(e&1&&(F(0,`span`,37),K(1,` slowest `),F(2,`span`,16),K(3),I(),K(4),I()),e&2){let e=t,n=W(3);D(3),q(e.name),D(),J(` `,n.ms(e.ms),` `)}}function aj(e,t){if(e&1&&(F(0,`li`)(1,`span`,34),K(2),I(),F(3,`span`,16),K(4),I(),F(5,`span`),K(6),I(),A(7,$A,4,1,`span`,35)(8,ej,4,1,`span`,35),A(9,tj,2,1,`span`,36),A(10,nj,2,1,`span`,36),A(11,rj,2,1,`span`,36),A(12,ij,5,2,`span`,37),I()),e&2){let e,n,r=t.$implicit,i=W(2);D(2),q(i.clock(r.at)),D(2),q(i.ms(r.ms)),D(2),k_(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),D(),j((e=r.cause)?7:r.trigger?8:-1,e),D(2),j(r.unchanged?9:-1),D(),j(r.hookMs?10:-1),D(),j(r.afterRenderMs?11:-1),D(),j((n=r.components[0])?12:-1,n)}}function oj(e,t){if(e&1&&(F(0,`div`,26)(1,`div`)(2,`h3`),K(3),I(),F(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),K(8,`Component`),I(),F(9,`th`,28),K(10,`Checks`),I(),F(11,`th`,28),K(12,`Self time`),I(),F(13,`th`,28),K(14,`Slowest`),I()()(),F(15,`tbody`),M(16,YA,10,4,`tr`,null,eg,!1,XA,3,0,`tr`),I()(),F(19,`h3`),K(20),I(),F(21,`table`)(22,`thead`)(23,`tr`)(24,`th`,27),K(25,`Component`),I(),F(26,`th`,28),K(27,`Checks`),I(),F(28,`th`,28),K(29,`Cycles`),I(),F(30,`th`,28),K(31,`Self time`),I()()(),F(32,`tbody`),M(33,ZA,10,4,`tr`,null,eg,!1,QA,3,0,`tr`),I()(),F(36,`p`,7),K(37,` Select a component name to show its most checked instance in the tree. `),I()(),F(38,`div`)(39,`h3`),K(40,`Latest cycles`),I(),F(41,`ol`,29),M(42,aj,13,11,`li`,null,NA),I()()(),L(44,`app-cd-timing`,30)(45,`app-cd-diagnosis`,30)),e&2){let e=W();D(3),J(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),D(13),N(e.slowest()),D(4),J(` `,e.range()?`Most often checked in the picked cycles`:`Most often checked`,` `),D(13),N(e.busiest()),D(9),N(e.latest()),D(2),P(`page`,e.page()),D(),P(`page`,e.page())}}function sj(e,t){e&1&&(F(0,`p`,10),K(1,`Use the app. Cycles show up here as Angular runs change detection.`),I())}var cj=3e3,lj=10,uj=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);native=$(!1);angularPages=mD(()=>this.rpc());angularPage=X(()=>hD(this.angularPages(),this.pageId()));attachPending=X(()=>this.angularPage()?.capabilities.profiler===!0);showComponent=lv();range=T(null);imported=T(null);page=X(()=>this.imported()?.page??this.livePage());views=Q(()=>this.livePage()?.options??{flash:!1,track:!1,angularProfiling:!1,angularProfilingAvailable:!0});canShowViews=X(()=>!!this.pageId()&&this.livePage()?.supported!==!1);message=T(``);announcement=T(``);recording=X(()=>this.page()?.recording===!0);cycles=X(()=>this.page()?.cycles??[]);slowMs=X(()=>this.page()?.slowMs??16);maxCycles=X(()=>NT(this.rpc()).limits.cdCycles);picked=X(()=>nk(this.cycles(),this.range()));hasSpans=X(()=>this.picked().some(e=>e.spans?.length));spanNames=X(()=>this.page()?.spanNames??[]);stats=X(()=>this.range()?rk(this.picked()):[...this.page()?.components??[]].sort((e,t)=>t.ms-e.ms));scope=X(()=>{let e=this.range()?this.picked():[];return e.length?e.length===1?`cycle ${e[0].id}`:`cycles ${e[0].id} to ${e.at(-1).id}`:`the recording`});slowest=X(()=>this.stats().slice(0,lj));busiest=X(()=>[...this.stats()].sort((e,t)=>t.checks-e.checks).slice(0,lj));latest=X(()=>this.cycles().slice(-30).reverse());capNotes=X(()=>{let e=this.page()?.droppedClasses??0,t=this.page()?.droppedHosts??0,n=[];return e>0&&n.push(`${e} more component ${e===1?`class was`:`classes were`} checked than a recording keeps, so ${e===1?`it is`:`they are`} left out of these totals.`),t>0&&n.push(`${t} component ${t===1?`instance was`:`instances were`} checked past the 2000 a recording counts, so ${t===1?`its tree row shows`:`their tree rows show`} no check count.`),n});status=X(()=>{if(this.message())return this.message();let e=this.cycles().length;return this.imported()?`${e} ${e===1?`cycle`:`cycles`} imported.`:this.recording()?`Recording. ${e} ${e===1?`cycle`:`cycles`} so far.`:e?`${e} ${e===1?`cycle`:`cycles`} recorded.`:``});ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}clock(e){return YE(e)}causeText(e){return RO(e)}confirming=T(null);confirmTimer;constructor(){E(()=>{let e=this.confirming();e!==null&&this.livePage()?.recording===!0===e&&Z(()=>this.confirmed(e))}),x(Ss).onDestroy(()=>clearTimeout(this.confirmTimer))}confirmed(e){clearTimeout(this.confirmTimer),this.confirming.set(null),this.message.set(``);let t=this.livePage()?.cycles.length??0;this.announce(e?`Recording started.`:`Recording stopped. ${t} ${t===1?`cycle`:`cycles`} recorded.`)}unconfirmed(e){let t=`The page did not confirm that the recording ${e?`started`:`stopped`}. The tab may be in the background, closed or reloading.`;this.message.set(t),this.announce(t)}async toggle(){let e=!this.recording();clearTimeout(this.confirmTimer),this.confirming.set(null),await this.send({on:e},e?`Starting…`:`Stopping…`,()=>``,`request-change-detection-record`,{quiet:!0,keepPending:!0})&&(this.confirming.set(e),this.confirmTimer=setTimeout(()=>{this.confirming()===e&&this.unconfirmed(e)},cj))}showImport(e){this.message.set(``),this.range.set(null),this.imported.set(e);let t=e.page.cycles.length;this.announce(`Imported ${e.fileName}: ${t} ${t===1?`cycle`:`cycles`}. Showing the imported recording.`)}closeImport(){this.imported.set(null),this.range.set(null),this.announce(`Showing the live recording.`)}async clear(){this.range.set(null),await this.send({clear:!0},``,()=>`Cleared the recorded cycles.`)}async setView(e,t){let n=this.views();this.views.set({...n,[e]:t});let r={flash:t?`Flash checks on.`:`Flash checks off.`,track:t?`Performance track on. Record in the Chrome Performance panel to see it.`:`Performance track off.`,angularProfiling:`Angular profiling on. It stays on until the page reloads.`}[e];await this.send({[e]:t},``,()=>r,`request-change-detection-options`)||this.views.set(n)}async send(e,t,n,r=`request-change-detection-record`,{quiet:i=!1,keepPending:a=!1}={}){this.message.set(t);try{if(!this.rpc())throw Error(`no client`);return await mT(this.rpc(),r,{pageId:this.pageId(),...e}),a||this.message.set(``),i||this.announce(n()),!0}catch{let e=`Could not reach the page.`;return this.message.set(e),this.announce(e),!1}}announce(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`],native:[1,`native`]},outputs:{showComponent:`showComponent`},decls:23,vars:13,consts:[[`aria-labelledby`,`cd-heading`,1,`cd`],[1,`cd-head`],[`id`,`cd-heading`],[3,`imported`,`page`,`maxCycles`],[1,`status`],[`role`,`status`,1,`sr-only`],[1,`imported`],[1,`hint`],[`what`,`cycles`,`limit`,`cdCycles`,3,`dropped`,`max`],[1,`note`],[1,`empty`],[`type`,`button`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`dot`],[`type`,`button`],[`type`,`button`,3,`click`],[1,`badge`],[1,`mono`],[`capability`,`profiler`,`missing`,``,`compact`,``,3,`page`],[`role`,`group`,`aria-labelledby`,`cd-views-label`,1,`views`],[`id`,`cd-views-label`,1,`views-label`],[`type`,`button`,1,`view`,3,`click`,`disabled`],[`capability`,`angularProfiling`,`missing`,``,`compact`,``,3,`page`],[3,`rangeChange`,`cycles`,`slowMs`,`range`],[3,`pick`,`cycles`,`names`,`scope`],[1,`spans-note`],[3,`pick`,`stats`,`scope`],[1,`cd-grid`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`aria-label`,`Latest change detection cycles, newest first`,1,`cycles`],[3,`page`],[`type`,`button`,1,`name-link`,3,`click`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(F(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Change detection`),I(),A(4,FA,4,5),F(5,`app-cd-transfer`,3),H(`imported`,function(e){return t.showImport(e)}),I(),F(6,`p`,4),K(7),I(),F(8,`p`,5),K(9),I()(),A(10,IA,7,1,`p`,6),F(11,`p`,7),K(12,` Records each change detection cycle with Angular's profiler: how long it took, how many components it checked, what started it and which checks changed nothing. Tree rows show how often each instance was checked. Times come from a development build. While it records, the page also wraps Angular's scheduler, adds a signal write hook and watches DOM updates; all of it stops with the recording. `),A(13,LA,1,0)(14,RA,1,0),I(),A(15,VA,2,1),A(16,WA,16,7),L(17,`app-limit-note`,8),M(18,GA,2,1,`p`,9,tg),A(20,JA,9,10),A(21,oj,46,6)(22,sj,2,0,`p`,10),I()),e&2){let e;D(4),j(t.imported()?-1:4),D(),P(`page`,t.page())(`maxCycles`,t.maxCycles()),D(2),q(t.status()),D(2),q(t.announcement()),D(),j((e=t.imported())?10:-1,e),D(3),j(t.native()?13:14),D(2),j(t.page()?.supported===!1?15:-1),D(),j(!t.imported()&&!t.native()?16:-1),D(),P(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),D(),N(t.capNotes()),D(2),j(t.cycles().length?20:-1),D(),j(t.page()?.components?.length?21:t.recording()?22:-1)}},dependencies:[yD,iO,vA,Ak,xA,Kk,sA,MA],styles:[`[_nghost-%COMP%] { +}`]})},EA=(e,t)=>t.id;function DA(e,t){if(e&1){let e=B();F(0,`button`,14),H(`click`,function(){return S(e),C(W(2).clear())}),K(1,`Clear`),I()}}function OA(e,t){if(e&1){let e=B();F(0,`button`,11),H(`click`,function(){return S(e),C(W().toggle())}),L(1,`span`,12),K(2),I(),A(3,DA,2,0,`button`,13)}if(e&2){let e=W();G(`on`,e.recording()),P(`disabled`,!e.pageId()),D(2),J(` `,e.recording()?`Stop recording`:`Record`,` `),D(),j(e.cycles().length?3:-1)}}function kA(e,t){if(e&1){let e=B();F(0,`p`,6)(1,`span`,15),K(2,`Imported recording`),I(),F(3,`span`,16),K(4),I(),F(5,`button`,14),H(`click`,function(){return S(e),C(W().closeImport())}),K(6,`Back to live recording`),I()()}e&2&&(D(4),q(t.fileName))}function AA(e,t){e&1&&K(0,` An app on a device has no DOM, so checks that changed nothing are not counted there. `)}function jA(e,t){e&1&&K(0,` A recording keeps running when the tab reloads, so it catches the next start of the app. The cycles from before the reload are gone with the old page. `)}function MA(e,t){e&1&&(F(0,`p`,9),K(1,` The page has Angular's profiler hook, but the recording could not attach to it yet. The page tries again on its next update while recording is on. If this stays, stop and start the recording, or reload the page. `),I())}function NA(e,t){e&1&&L(0,`app-angular-unavailable`,17),e&2&&P(`page`,W(2).angularPage())}function PA(e,t){e&1&&A(0,MA,2,0,`p`,9)(1,NA,1,1,`app-angular-unavailable`,17),e&2&&j(+!W().attachPending())}function FA(e,t){e&1&&(F(0,`p`,9),K(1,`Angular profiling stays on until the page reloads.`),I())}function IA(e,t){e&1&&L(0,`app-angular-unavailable`,21),e&2&&P(`page`,W(2).angularPage())}function LA(e,t){if(e&1){let e=B();F(0,`div`,18)(1,`span`,19),K(2,`Live views`),I(),F(3,`button`,20),H(`click`,function(){S(e);let t=W();return C(t.setView(`flash`,!t.views().flash))}),L(4,`span`,12),K(5,` Flash checks `),I(),F(6,`button`,20),H(`click`,function(){S(e);let t=W();return C(t.setView(`track`,!t.views().track))}),L(7,`span`,12),K(8,` Performance track `),I(),F(9,`button`,20),H(`click`,function(){return S(e),C(W().setView(`angularProfiling`,!0))}),L(10,`span`,12),K(11,` Angular profiling `),I()(),F(12,`p`,7),K(13,` Flash checks draws a box over each component on the page as Angular checks it, with its name and how often it was checked, fading over a second. Performance track adds a Pangular track to the Chrome Performance panel with every component check, hook and output. Angular profiling turns on Angular's own track there. `),I(),A(14,FA,2,0,`p`,9)(15,IA,1,1,`app-angular-unavailable`,21)}if(e&2){let e=W();D(3),P(`disabled`,!e.canShowViews()),k(`aria-pressed`,e.views().flash),D(3),P(`disabled`,!e.canShowViews()),k(`aria-pressed`,e.views().track),D(3),P(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),k(`aria-pressed`,e.views().angularProfiling),D(5),j(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function RA(e,t){if(e&1&&(F(0,`p`,9),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function zA(e,t){if(e&1&&(F(0,`p`,24),K(1),I()),e&2){let e=W(2);D(),J(` `,e.range()?`The picked cycles have no timed spans, so there is no flame graph for them.`:`This recording has no timed spans, so there is no flame graph. A recording from an older version, or a file saved without spans, has none.`,` `)}}function BA(e,t){e&1&&(F(0,`p`,9),K(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),I())}function VA(e,t){if(e&1){let e=B();F(0,`h3`),K(1,`Cycles`),I(),F(2,`app-cd-cycle-chart`,22),j_(`rangeChange`,function(t){S(e);let n=W();return A_(n.range,t)||(n.range=t),C(t)}),I(),F(3,`app-cd-flame-graph`,23),H(`pick`,function(t){return S(e),C(W().showComponent.emit(t))}),I(),A(4,zA,2,1,`p`,24),F(5,`h3`),K(6,`Self time by component`),I(),A(7,BA,2,0,`p`,9),F(8,`app-cd-treemap`,25),H(`pick`,function(t){return S(e),C(W().showComponent.emit(t))}),I()}if(e&2){let e=W();D(2),P(`cycles`,e.cycles())(`slowMs`,e.slowMs()),k_(`range`,e.range),D(),P(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),D(),j(e.hasSpans()?-1:4),D(3),j(e.range()?7:-1),D(),P(`stats`,e.stats())(`scope`,e.scope())}}function HA(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`,16)(2,`button`,31),H(`click`,function(){let t=S(e).$implicit;return C(W(2).showComponent.emit(t.name))}),K(3),I()(),F(4,`td`,32),K(5),I(),F(6,`td`,32),K(7),I(),F(8,`td`,32),K(9),I()()}if(e&2){let e=t.$implicit,n=W(2);D(3),J(` `,e.name,` `),D(2),q(e.checks),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function UA(e,t){e&1&&(F(0,`tr`)(1,`td`,33),K(2,`No component time in the picked cycles.`),I()())}function WA(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`,16)(2,`button`,31),H(`click`,function(){let t=S(e).$implicit;return C(W(2).showComponent.emit(t.name))}),K(3),I()(),F(4,`td`,32),K(5),I(),F(6,`td`,32),K(7),I(),F(8,`td`,32),K(9),I()()}if(e&2){let e=t.$implicit,n=W(2);D(3),J(` `,e.name,` `),D(2),q(e.checks),D(2),q(e.cycles),D(2),q(n.ms(e.ms))}}function GA(e,t){e&1&&(F(0,`tr`)(1,`td`,33),K(2,`No component checks in the picked cycles.`),I()())}function KA(e,t){if(e&1&&(F(0,`span`,35),K(1,`from `),F(2,`span`,16),K(3),I()()),e&2){let e=W(3);D(3),q(e.causeText(t))}}function qA(e,t){if(e&1&&(F(0,`span`,35),K(1,`after `),F(2,`span`,16),K(3),I()()),e&2){let e=W().$implicit;D(3),q(e.trigger)}}function JA(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.unchanged,` changed nothing`)}}function YA(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),J(`hooks `,t.ms(e.hookMs))}}function XA(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),J(`afterRender `,t.ms(e.afterRenderMs))}}function ZA(e,t){if(e&1&&(F(0,`span`,37),K(1,` slowest `),F(2,`span`,16),K(3),I(),K(4),I()),e&2){let e=t,n=W(3);D(3),q(e.name),D(),J(` `,n.ms(e.ms),` `)}}function QA(e,t){if(e&1&&(F(0,`li`)(1,`span`,34),K(2),I(),F(3,`span`,16),K(4),I(),F(5,`span`),K(6),I(),A(7,KA,4,1,`span`,35)(8,qA,4,1,`span`,35),A(9,JA,2,1,`span`,36),A(10,YA,2,1,`span`,36),A(11,XA,2,1,`span`,36),A(12,ZA,5,2,`span`,37),I()),e&2){let e,n,r=t.$implicit,i=W(2);D(2),q(i.clock(r.at)),D(2),q(i.ms(r.ms)),D(2),D_(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),D(),j((e=r.cause)?7:r.trigger?8:-1,e),D(2),j(r.unchanged?9:-1),D(),j(r.hookMs?10:-1),D(),j(r.afterRenderMs?11:-1),D(),j((n=r.components[0])?12:-1,n)}}function $A(e,t){if(e&1&&(F(0,`div`,26)(1,`div`)(2,`h3`),K(3),I(),F(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),K(8,`Component`),I(),F(9,`th`,28),K(10,`Checks`),I(),F(11,`th`,28),K(12,`Self time`),I(),F(13,`th`,28),K(14,`Slowest`),I()()(),F(15,`tbody`),M(16,HA,10,4,`tr`,null,Qh,!1,UA,3,0,`tr`),I()(),F(19,`h3`),K(20),I(),F(21,`table`)(22,`thead`)(23,`tr`)(24,`th`,27),K(25,`Component`),I(),F(26,`th`,28),K(27,`Checks`),I(),F(28,`th`,28),K(29,`Cycles`),I(),F(30,`th`,28),K(31,`Self time`),I()()(),F(32,`tbody`),M(33,WA,10,4,`tr`,null,Qh,!1,GA,3,0,`tr`),I()(),F(36,`p`,7),K(37,` Select a component name to show its most checked instance in the tree. `),I()(),F(38,`div`)(39,`h3`),K(40,`Latest cycles`),I(),F(41,`ol`,29),M(42,QA,13,11,`li`,null,EA),I()()(),L(44,`app-cd-timing`,30)(45,`app-cd-diagnosis`,30)),e&2){let e=W();D(3),J(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),D(13),N(e.slowest()),D(4),J(` `,e.range()?`Most often checked in the picked cycles`:`Most often checked`,` `),D(13),N(e.busiest()),D(9),N(e.latest()),D(2),P(`page`,e.page()),D(),P(`page`,e.page())}}function ej(e,t){e&1&&(F(0,`p`,10),K(1,`Use the app. Cycles show up here as Angular runs change detection.`),I())}var tj=3e3,nj=10,rj=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);native=$(!1);angularPages=sD(()=>this.rpc());angularPage=X(()=>cD(this.angularPages(),this.pageId()));attachPending=X(()=>this.angularPage()?.capabilities.profiler===!0);showComponent=sv();range=T(null);imported=T(null);page=X(()=>this.imported()?.page??this.livePage());views=Q(()=>this.livePage()?.options??{flash:!1,track:!1,angularProfiling:!1,angularProfilingAvailable:!0});canShowViews=X(()=>!!this.pageId()&&this.livePage()?.supported!==!1);message=T(``);announcement=T(``);recording=X(()=>this.page()?.recording===!0);cycles=X(()=>this.page()?.cycles??[]);slowMs=X(()=>this.page()?.slowMs??16);maxCycles=X(()=>ET(this.rpc()).limits.cdCycles);picked=X(()=>YO(this.cycles(),this.range()));hasSpans=X(()=>this.picked().some(e=>e.spans?.length));spanNames=X(()=>this.page()?.spanNames??[]);stats=X(()=>this.range()?XO(this.picked()):[...this.page()?.components??[]].sort((e,t)=>t.ms-e.ms));scope=X(()=>{let e=this.range()?this.picked():[];return e.length?e.length===1?`cycle ${e[0].id}`:`cycles ${e[0].id} to ${e.at(-1).id}`:`the recording`});slowest=X(()=>this.stats().slice(0,nj));busiest=X(()=>[...this.stats()].sort((e,t)=>t.checks-e.checks).slice(0,nj));latest=X(()=>this.cycles().slice(-30).reverse());capNotes=X(()=>{let e=this.page()?.droppedClasses??0,t=this.page()?.droppedHosts??0,n=[];return e>0&&n.push(`${e} more component ${e===1?`class was`:`classes were`} checked than a recording keeps, so ${e===1?`it is`:`they are`} left out of these totals.`),t>0&&n.push(`${t} component ${t===1?`instance was`:`instances were`} checked past the 2000 a recording counts, so ${t===1?`its tree row shows`:`their tree rows show`} no check count.`),n});status=X(()=>{if(this.message())return this.message();let e=this.cycles().length;return this.imported()?`${e} ${e===1?`cycle`:`cycles`} imported.`:this.recording()?`Recording. ${e} ${e===1?`cycle`:`cycles`} so far.`:e?`${e} ${e===1?`cycle`:`cycles`} recorded.`:``});ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}clock(e){return HE(e)}causeText(e){return jO(e)}confirming=T(null);confirmTimer;constructor(){E(()=>{let e=this.confirming();e!==null&&this.livePage()?.recording===!0===e&&Z(()=>this.confirmed(e))}),x(xs).onDestroy(()=>clearTimeout(this.confirmTimer))}confirmed(e){clearTimeout(this.confirmTimer),this.confirming.set(null),this.message.set(``);let t=this.livePage()?.cycles.length??0;this.announce(e?`Recording started.`:`Recording stopped. ${t} ${t===1?`cycle`:`cycles`} recorded.`)}unconfirmed(e){let t=`The page did not confirm that the recording ${e?`started`:`stopped`}. The tab may be in the background, closed or reloading.`;this.message.set(t),this.announce(t)}async toggle(){let e=!this.recording();clearTimeout(this.confirmTimer),this.confirming.set(null),await this.send({on:e},e?`Starting…`:`Stopping…`,()=>``,`request-change-detection-record`,{quiet:!0,keepPending:!0})&&(this.confirming.set(e),this.confirmTimer=setTimeout(()=>{this.confirming()===e&&this.unconfirmed(e)},tj))}showImport(e){this.message.set(``),this.range.set(null),this.imported.set(e);let t=e.page.cycles.length;this.announce(`Imported ${e.fileName}: ${t} ${t===1?`cycle`:`cycles`}. Showing the imported recording.`)}closeImport(){this.imported.set(null),this.range.set(null),this.announce(`Showing the live recording.`)}async clear(){this.range.set(null),await this.send({clear:!0},``,()=>`Cleared the recorded cycles.`)}async setView(e,t){let n=this.views();this.views.set({...n,[e]:t});let r={flash:t?`Flash checks on.`:`Flash checks off.`,track:t?`Performance track on. Record in the Chrome Performance panel to see it.`:`Performance track off.`,angularProfiling:`Angular profiling on. It stays on until the page reloads.`}[e];await this.send({[e]:t},``,()=>r,`request-change-detection-options`)||this.views.set(n)}async send(e,t,n,r=`request-change-detection-record`,{quiet:i=!1,keepPending:a=!1}={}){this.message.set(t);try{if(!this.rpc())throw Error(`no client`);return await sT(this.rpc(),r,{pageId:this.pageId(),...e}),a||this.message.set(``),i||this.announce(n()),!0}catch{let e=`Could not reach the page.`;return this.message.set(e),this.announce(e),!1}}announce(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`],native:[1,`native`]},outputs:{showComponent:`showComponent`},decls:23,vars:13,consts:[[`aria-labelledby`,`cd-heading`,1,`cd`],[1,`cd-head`],[`id`,`cd-heading`],[3,`imported`,`page`,`maxCycles`],[1,`status`],[`role`,`status`,1,`sr-only`],[1,`imported`],[1,`hint`],[`what`,`cycles`,`limit`,`cdCycles`,3,`dropped`,`max`],[1,`note`],[1,`empty`],[`type`,`button`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`dot`],[`type`,`button`],[`type`,`button`,3,`click`],[1,`badge`],[1,`mono`],[`capability`,`profiler`,`missing`,``,`compact`,``,3,`page`],[`role`,`group`,`aria-labelledby`,`cd-views-label`,1,`views`],[`id`,`cd-views-label`,1,`views-label`],[`type`,`button`,1,`view`,3,`click`,`disabled`],[`capability`,`angularProfiling`,`missing`,``,`compact`,``,3,`page`],[3,`rangeChange`,`cycles`,`slowMs`,`range`],[3,`pick`,`cycles`,`names`,`scope`],[1,`spans-note`],[3,`pick`,`stats`,`scope`],[1,`cd-grid`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`aria-label`,`Latest change detection cycles, newest first`,1,`cycles`],[3,`page`],[`type`,`button`,1,`name-link`,3,`click`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(F(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Change detection`),I(),A(4,OA,4,5),F(5,`app-cd-transfer`,3),H(`imported`,function(e){return t.showImport(e)}),I(),F(6,`p`,4),K(7),I(),F(8,`p`,5),K(9),I()(),A(10,kA,7,1,`p`,6),F(11,`p`,7),K(12,` Records each change detection cycle with Angular's profiler: how long it took, how many components it checked, what started it and which checks changed nothing. Tree rows show how often each instance was checked. Times come from a development build. While it records, the page also wraps Angular's scheduler, adds a signal write hook and watches DOM updates; all of it stops with the recording. `),A(13,AA,1,0)(14,jA,1,0),I(),A(15,PA,2,1),A(16,LA,16,7),L(17,`app-limit-note`,8),M(18,RA,2,1,`p`,9,$h),A(20,VA,9,10),A(21,$A,46,6)(22,ej,2,0,`p`,10),I()),e&2){let e;D(4),j(t.imported()?-1:4),D(),P(`page`,t.page())(`maxCycles`,t.maxCycles()),D(2),q(t.status()),D(2),q(t.announcement()),D(),j((e=t.imported())?10:-1,e),D(3),j(t.native()?13:14),D(2),j(t.page()?.supported===!1?15:-1),D(),j(!t.imported()&&!t.native()?16:-1),D(),P(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),D(),N(t.capNotes()),D(2),j(t.cycles().length?20:-1),D(),j(t.page()?.components?.length?21:t.recording()?22:-1)}},dependencies:[fD,ZD,dA,Ck,mA,zk,eA,TA],styles:[`[_nghost-%COMP%] { display: block; margin-top: 16px; } @@ -1946,7 +1946,7 @@ td.mono[_ngcontent-%COMP%] { .trigger[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%], .top[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%] { overflow-wrap: anywhere; -}`]})};function dj(e){return Object.fromEntries(e.map(e=>[e.name,e.value??null]))}function fj(e){return e.map(e=>({name:e.name,listened:!!e.listened}))}function pj(e){let t={component:e.name,tag:e.tag,hostPath:e.path};e.selector&&(t.selector=e.selector),e.source&&(t.source=e.source),e.changeDetection&&(t.changeDetection=e.changeDetection),e.encapsulation&&(t.encapsulation=e.encapsulation),t.inputs=dj(e.inputs),t.outputs=fj(e.outputs),t.properties=dj(e.properties??[]),e.listeners.length&&(t.listeners=e.listeners),e.directives.length&&(t.directives=e.directives.map(e=>({name:e.name,inputs:dj(e.inputs),outputs:fj(e.outputs)}))),t.injected=e.dependencies.map(e=>({token:e.token,providedBy:e.providedBy?e.providedByName??`an injector`:null}));try{return JSON.stringify(t,null,2)}catch{return JSON.stringify({component:e.name,tag:e.tag,hostPath:e.path})}}function mj(e){return e.selector||e.path}var hj=1e3;function gj(e,t){let n=[];for(let[r,i]of t){let t=e.get(r);t!==void 0&&t!==i&&n.push(r)}return n}function _j(e){try{return JSON.stringify(e)??`undefined`}catch{return String(e)}}var vj=class{ms;changed=T(new Set);owner=null;last=new Map;timers=new Map;constructor(e=hj){this.ms=e}update(e,t){let n=new Map([...t].map(([e,t])=>[e,_j(t)]));if(e!==this.owner){this.clear(),this.owner=e,this.last=n;return}let r=gj(this.last,n);if(this.last=n,r.length){this.changed.update(e=>new Set([...e,...r]));for(let e of r)clearTimeout(this.timers.get(e)),this.timers.set(e,setTimeout(()=>{this.timers.delete(e),this.changed.update(t=>{let n=new Set(t);return n.delete(e),n})},this.ms))}}clear(){for(let e of this.timers.values())clearTimeout(e);this.timers.clear(),this.changed().size&&this.changed.set(new Set)}};function yj(e,t,n=0){return e===`directive`?`directive:${n}:${t}`:`${e}:${t}`}var bj=[`*`];function xj(e,t){e&1&&K(0),e&2&&q(W(2).label())}function Sj(e,t){e&1&&jg(0,0,null,xj,1,1)}function Cj(e,t){if(e&1&&(F(0,`span`,4),K(1),I()),e&2){let e=W(2);D(),q(e.message())}}function wj(e,t){if(e&1){let e=B();F(0,`button`,2),H(`click`,function(){return S(e),C(W().open())}),gg(1,3),I(),A(2,Cj,2,1,`span`,4)}if(e&2){let e=W(),t=Fg(1);P(`title`,`Open `+e.label()+` in your editor`),k(`aria-label`,`Open `+e.label()+` in your editor`),D(),P(`ngTemplateOutlet`,t),D(),j(e.message()?2:-1)}}function Tj(e,t){if(e&1&&(F(0,`span`,1),gg(1,3),I()),e&2){let e=W(),t=Fg(1);P(`title`,e.label()),D(),P(`ngTemplateOutlet`,t)}}var Ej=class e{source=T(T(null));client=X(()=>this.source()());available=X(()=>{let e=this.client();return!!e&&!gT(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 mT(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=kl({token:e,factory:e.ɵfac})};function Dj(e,t){return t?`${e}:${t}`:e}var Oj=class e{editor=x(Ej);file=$.required();line=$(void 0);label=X(()=>Dj(this.file(),this.line()));message=T(``);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=O({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:bj,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&&(Ag(),Mh(0,Sj,2,0,`ng-template`,null,0,nv),A(2,wj,3,4)(3,Tj,2,2,`span`,1)),e&2&&(D(2),j(t.editor.available()?2:3))},dependencies:[Qv],styles:[`[_nghost-%COMP%] { +}`]})};function ij(e){return Object.fromEntries(e.map(e=>[e.name,e.value??null]))}function aj(e){return e.map(e=>({name:e.name,listened:!!e.listened}))}function oj(e){let t={component:e.name,tag:e.tag,hostPath:e.path};e.selector&&(t.selector=e.selector),e.source&&(t.source=e.source),e.changeDetection&&(t.changeDetection=e.changeDetection),e.encapsulation&&(t.encapsulation=e.encapsulation),t.inputs=ij(e.inputs),t.outputs=aj(e.outputs),t.properties=ij(e.properties??[]),e.listeners.length&&(t.listeners=e.listeners),e.directives.length&&(t.directives=e.directives.map(e=>({name:e.name,inputs:ij(e.inputs),outputs:aj(e.outputs)}))),t.injected=e.dependencies.map(e=>({token:e.token,providedBy:e.providedBy?e.providedByName??`an injector`:null}));try{return JSON.stringify(t,null,2)}catch{return JSON.stringify({component:e.name,tag:e.tag,hostPath:e.path})}}function sj(e){return e.selector||e.path}var cj=1e3;function lj(e,t){let n=[];for(let[r,i]of t){let t=e.get(r);t!==void 0&&t!==i&&n.push(r)}return n}function uj(e){try{return JSON.stringify(e)??`undefined`}catch{return String(e)}}var dj=class{ms;changed=T(new Set);owner=null;last=new Map;timers=new Map;constructor(e=cj){this.ms=e}update(e,t){let n=new Map([...t].map(([e,t])=>[e,uj(t)]));if(e!==this.owner){this.clear(),this.owner=e,this.last=n;return}let r=lj(this.last,n);if(this.last=n,r.length){this.changed.update(e=>new Set([...e,...r]));for(let e of r)clearTimeout(this.timers.get(e)),this.timers.set(e,setTimeout(()=>{this.timers.delete(e),this.changed.update(t=>{let n=new Set(t);return n.delete(e),n})},this.ms))}}clear(){for(let e of this.timers.values())clearTimeout(e);this.timers.clear(),this.changed().size&&this.changed.set(new Set)}};function fj(e,t,n=0){return e===`directive`?`directive:${n}:${t}`:`${e}:${t}`}var pj=[`*`];function mj(e,t){e&1&&K(0),e&2&&q(W(2).label())}function hj(e,t){e&1&&kg(0,0,null,mj,1,1)}function gj(e,t){if(e&1&&(F(0,`span`,4),K(1),I()),e&2){let e=W(2);D(),q(e.message())}}function _j(e,t){if(e&1){let e=B();F(0,`button`,2),H(`click`,function(){return S(e),C(W().open())}),mg(1,3),I(),A(2,gj,2,1,`span`,4)}if(e&2){let e=W(),t=Ng(1);P(`title`,`Open `+e.label()+` in your editor`),k(`aria-label`,`Open `+e.label()+` in your editor`),D(),P(`ngTemplateOutlet`,t),D(),j(e.message()?2:-1)}}function vj(e,t){if(e&1&&(F(0,`span`,1),mg(1,3),I()),e&2){let e=W(),t=Ng(1);P(`title`,e.label()),D(),P(`ngTemplateOutlet`,t)}}var yj=class e{source=T(T(null));client=X(()=>this.source()());available=X(()=>{let e=this.client();return!!e&&!lT(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 sT(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=Ol({token:e,factory:e.ɵfac})};function bj(e,t){return t?`${e}:${t}`:e}var xj=class e{editor=x(yj);file=$.required();line=$(void 0);label=X(()=>bj(this.file(),this.line()));message=T(``);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=O({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:pj,decls:4,vars:1,consts:[[`text`,``],[1,`source-text`,3,`title`],[`type`,`button`,1,`source-link`,3,`click`,`title`],[3,`ngTemplateOutlet`],[`role`,`alert`,1,`message`]],template:function(e,t){e&1&&(Og(),Ah(0,hj,2,0,`ng-template`,null,0,ev),A(2,_j,3,4)(3,vj,2,2,`span`,1)),e&2&&(D(2),j(t.editor.available()?2:3))},dependencies:[Xv],styles:[`[_nghost-%COMP%] { display: inline; min-width: 0; } @@ -1981,7 +1981,7 @@ td.mono[_ngcontent-%COMP%] { color: var(--%NS%danger-text); font-family: var(--%NS%font-sans); font-size: 0.92em; -}`]})},kj=[`field`],Aj=[`editButton`],jj=[`valueBox`];function Mj(e,t){if(e&1){let e=B();R(0,`div`,5)(1,`label`,6),K(2),z(),R(3,`input`,7,0),U(`input`,function(t){return S(e),C(W().draft.set(t.target.value))})(`keydown.enter`,function(t){S(e);let n=W();return t.preventDefault(),C(n.apply())})(`keydown.escape`,function(t){S(e);let n=W();return t.preventDefault(),t.stopPropagation(),C(n.cancel())}),z(),R(5,`button`,8),U(`click`,function(){return S(e),C(W().apply())}),K(6,`Apply`),z(),R(7,`button`,9),U(`click`,function(){return S(e),C(W().cancel())}),K(8,`Cancel`),z()(),R(9,`p`,10),K(10),z()}if(e&2){let e=W();D(),V(`htmlFor`,e.fieldId),D(),J(`New value of `,e.prop().name,`, as JSON`),D(),V(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),k(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),D(2),V(`disabled`,e.busy()),D(4),V(`id`,e.hintId),D(),J(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function Nj(e,t){if(e&1&&(R(0,`pre`,null,1),K(2),Q_(3,`json`),z()),e&2){let e=W(2);k(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),D(2),q($_(3,4,e.prop().value))}}function Pj(e,t){if(e&1){let e=B();R(0,`button`,14,2),U(`click`,function(){return S(e),C(W(2).start())}),K(2,` Edit `),z()}if(e&2){let e=W(2);V(`disabled`,e.busy()),k(`aria-label`,`Edit `+e.prop().name)}}function Fj(e,t){if(e&1&&(R(0,`p`,13),K(1),z()),e&2){let e=W(2);D(),q(e.prop().locked)}}function Ij(e,t){if(e&1&&(R(0,`div`,11),A(1,Nj,4,6,`pre`),A(2,Pj,3,2,`button`,12),z(),A(3,Fj,2,1,`p`,13)),e&2){let e=W();D(),j(e.bare()?-1:1),D(),j(e.editable()?2:-1),D(),j(e.writes()&&e.prop().locked?3:-1)}}function Lj(e,t){if(e&1&&(R(0,`p`,3),K(1),z()),e&2){let e=W();V(`id`,e.errorId),D(),q(e.error())}}var Rj=0;function zj(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 Bj=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++Rj}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=T(!1);draft=T(``);busy=T(!1);error=T(``);done=T(``);editable=X(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=gv(`field`);editButton=gv(`editButton`);valueBox=gv(`valueBox`);injector=x(bs);scrollable=T(!1);constructor(){Cv(()=>{this.prop();let e=this.valueBox()?.nativeElement;this.scrollable.set(!!e&&e.scrollHeight>e.clientHeight+1)})}async start(){let e=this.prop().value;this.error.set(``),this.done.set(``);let t=this.readDraft();if(t){this.busy.set(!0);let n=await t();if(this.busy.set(!1),n.error!==void 0){this.error.set(n.error);return}e=n.value}this.draft.set(e===void 0?``:JSON.stringify(e)),this.editing.set(!0),cd(()=>{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=zj(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(){cd(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&Ng(t.field,kj,5)(t.editButton,Aj,5)(t.valueBox,jj,5),e&2&&Pg(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&&(A(0,Mj,11,11)(1,Ij,4,3),A(2,Lj,2,2,`p`,3),R(3,`p`,4),K(4),z()),e&2&&(j(+!t.editing()),D(2),j(t.error()?2:-1),D(2),q(t.done()))},dependencies:[ey],styles:[`[_nghost-%COMP%] { +}`]})},Sj=[`field`],Cj=[`editButton`],wj=[`valueBox`];function Tj(e,t){if(e&1){let e=B();R(0,`div`,5)(1,`label`,6),K(2),z(),R(3,`input`,7,0),U(`input`,function(t){return S(e),C(W().draft.set(t.target.value))})(`keydown.enter`,function(t){S(e);let n=W();return t.preventDefault(),C(n.apply())})(`keydown.escape`,function(t){S(e);let n=W();return t.preventDefault(),t.stopPropagation(),C(n.cancel())}),z(),R(5,`button`,8),U(`click`,function(){return S(e),C(W().apply())}),K(6,`Apply`),z(),R(7,`button`,9),U(`click`,function(){return S(e),C(W().cancel())}),K(8,`Cancel`),z()(),R(9,`p`,10),K(10),z()}if(e&2){let e=W();D(),V(`htmlFor`,e.fieldId),D(),J(`New value of `,e.prop().name,`, as JSON`),D(),V(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),k(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),D(2),V(`disabled`,e.busy()),D(4),V(`id`,e.hintId),D(),J(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function Ej(e,t){if(e&1&&(R(0,`pre`,null,1),K(2),X_(3,`json`),z()),e&2){let e=W(2);k(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),D(2),q(Z_(3,4,e.prop().value))}}function Dj(e,t){if(e&1){let e=B();R(0,`button`,14,2),U(`click`,function(){return S(e),C(W(2).start())}),K(2,` Edit `),z()}if(e&2){let e=W(2);V(`disabled`,e.busy()),k(`aria-label`,`Edit `+e.prop().name)}}function Oj(e,t){if(e&1&&(R(0,`p`,13),K(1),z()),e&2){let e=W(2);D(),q(e.prop().locked)}}function kj(e,t){if(e&1&&(R(0,`div`,11),A(1,Ej,4,6,`pre`),A(2,Dj,3,2,`button`,12),z(),A(3,Oj,2,1,`p`,13)),e&2){let e=W();D(),j(e.bare()?-1:1),D(),j(e.editable()?2:-1),D(),j(e.writes()&&e.prop().locked?3:-1)}}function Aj(e,t){if(e&1&&(R(0,`p`,3),K(1),z()),e&2){let e=W();V(`id`,e.errorId),D(),q(e.error())}}var jj=0;function Mj(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 Nj=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++jj}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=T(!1);draft=T(``);busy=T(!1);error=T(``);done=T(``);editable=X(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=mv(`field`);editButton=mv(`editButton`);valueBox=mv(`valueBox`);injector=x(ys);scrollable=T(!1);constructor(){xv(()=>{this.prop();let e=this.valueBox()?.nativeElement;this.scrollable.set(!!e&&e.scrollHeight>e.clientHeight+1)})}async start(){let e=this.prop().value;this.error.set(``),this.done.set(``);let t=this.readDraft();if(t){this.busy.set(!0);let n=await t();if(this.busy.set(!1),n.error!==void 0){this.error.set(n.error);return}e=n.value}this.draft.set(e===void 0?``:JSON.stringify(e)),this.editing.set(!0),sd(()=>{let e=this.field()?.nativeElement;e?.focus(),e?.select()},{injector:this.injector})}cancel(){this.editing()&&(this.editing.set(!1),this.busy.set(!1),this.error.set(``),this.focusEdit())}async apply(){if(this.busy())return;let e=Mj(this.draft());if(`error`in e){this.error.set(e.error);return}let t=this.prop(),n=this.rpc(),r=this.pageId();if(!n||!r||!t.edit)return;this.busy.set(!0),this.error.set(``);let i;try{i=await n.scope(`pangular`).rpc.call(`request-component-edit`,{pageId:r,request:{id:this.componentId(),path:t.prop,value:e.value,kind:t.edit}})??{}}catch{i={error:`The devtools server did not answer. Try again.`}}this.busy.set(!1),this.editing()&&(i.ok?(this.editing.set(!1),this.done.set(`Set ${t.name}.`),this.focusEdit()):(this.error.set(i.error??`The page did not write it.`),this.field()?.nativeElement.focus()))}focusEdit(){sd(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&jg(t.field,Sj,5)(t.editButton,Cj,5)(t.valueBox,wj,5),e&2&&Mg(3)},inputs:{prop:[1,`prop`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`],bare:[1,`bare`],readDraft:[1,`readDraft`]},decls:5,vars:3,consts:[[`field`,``],[`valueBox`,``],[`editButton`,``],[`role`,`alert`,1,`error`,3,`id`],[`role`,`status`,1,`sr-only`],[1,`editor`],[1,`sr-only`,3,`for`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field`,`mono`,3,`input`,`keydown.enter`,`keydown.escape`,`id`,`value`,`readOnly`],[`type`,`button`,1,`primary`,3,`click`,`disabled`],[`type`,`button`,3,`click`],[1,`hint`,3,`id`],[1,`view`],[`type`,`button`,1,`edit`,3,`disabled`],[1,`locked`],[`type`,`button`,1,`edit`,3,`click`,`disabled`]],template:function(e,t){e&1&&(A(0,Tj,11,11)(1,kj,4,3),A(2,Aj,2,2,`p`,3),R(3,`p`,4),K(4),z()),e&2&&(j(+!t.editing()),D(2),j(t.error()?2:-1),D(2),q(t.done()))},dependencies:[Qv],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -2104,7 +2104,7 @@ button.edit[_ngcontent-%COMP%] { .error[_ngcontent-%COMP%] { color: var(--%NS%danger-text); -}`]})},Vj=1e3,Hj={depth:5,limit:100},Uj=`[redacted]`;function Wj(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Gj(e){return Wj(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function Kj(e){return Wj(e)&&typeof e.$collapsed==`string`&&typeof e.size==`number`&&Object.keys(e).length===2}function qj(e){return e===`Array`?`array`:e===`Map`?`map`:e===`Set`?`set`:`object`}function Jj(e){return e.$type===`Map`&&Array.isArray(e.entries)}function Yj(e){return e.$type===`Set`&&Array.isArray(e.values)}function Xj(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function Zj(e){if(!e||typeof e!=`object`)return null;if(Kj(e))return e.size<=0?null:{kind:qj(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(Gj(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=Gj(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(Jj(t)||Yj(t)){let e=typeof t.size==`number`?t.size:0,n=Jj(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=Xj(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function Qj(e){if(typeof e==`string`)return JSON.stringify(e);let t=Zj(e);if(t)return tM(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function $j(e){let t=Zj(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(Gj(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:Qj(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:Xj(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function eM(e,t,n){return`${e} ${e===1?t:n}`}function tM(e){let t={array:eM(e.size,`item`,`items`),object:eM(e.size,`key`,`keys`),map:eM(e.size,`entry`,`entries`),set:eM(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function nM(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function rM(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function iM(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var aM=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function oM(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==Uj&&!aM.test(e)&&!e.endsWith(`…`)}function sM(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function cM(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=nM(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of $j(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!Zj(r.value))continue;let i=n(t)??(Zj(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var lM=(e,t)=>t.id;function uM(e,t){if(e&1){let e=B();F(0,`button`,2),H(`click`,function(){S(e);let t=W().$implicit;return C(W(3).toggle(t))}),w(),F(1,`svg`,3),L(2,`path`,4),I(),fs(),F(3,`span`,14),K(4),I(),F(5,`span`,5),K(6),I()()}if(e&2){let e=W().$implicit;k(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),D(4),J(``,e.label,`:`),D(2),q(e.text)}}function dM(e,t){if(e&1&&L(0,`app-prop-value`,15),e&2){let e=W(5);P(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function fM(e,t){if(e&1&&(F(0,`span`,16),K(1),I()),e&2){let e=W(2).$implicit;D(),q(e.text)}}function pM(e,t){if(e&1&&(F(0,`span`,14),K(1),I(),A(2,dM,1,5,`app-prop-value`,15)(3,fM,2,1,`span`,16)),e&2){let e,t=W().$implicit;D(),J(``,t.label,`:`),D(),j((e=t.edit)?2:3,e)}}function mM(e,t){if(e&1){let e=B();F(0,`button`,17),H(`click`,function(){S(e);let t=W().$implicit;return C(W(3).more(t))}),K(1),F(2,`span`,18),K(3),I()()}if(e&2){let e=W().$implicit,t=W(3);D(),J(` Show `,t.step(e),` more `),D(2),J(`(`,e.more,` not listed)`)}}function hM(e,t){e&1&&(F(0,`span`,12),K(1,`Reading from the page…`),I())}function gM(e,t){if(e&1&&(F(0,`span`,13),K(1),I()),e&2){let e=W().$implicit;D(),q(e.text)}}function _M(e,t){if(e&1&&(F(0,`li`,9),A(1,uM,7,4,`button`,10)(2,pM,4,2)(3,mM,4,2,`button`,11)(4,hM,2,0,`span`,12)(5,gM,2,1,`span`,13),I()),e&2){let e,n=t.$implicit;n_(`padding-left`,n.depth*14,`px`),D(),j((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function vM(e,t){if(e&1&&(F(0,`ul`,7),M(1,_M,6,3,`li`,8,lM),I()),e&2){let e=W(2);P(`id`,e.listId),k(`aria-label`,e.prop().name+` entries`),D(),N(e.rows())}}function yM(e,t){if(e&1){let e=B();F(0,`div`,1)(1,`button`,2),H(`click`,function(){return S(e),C(W().toggleRoot())}),w(),F(2,`svg`,3),L(3,`path`,4),I(),fs(),F(4,`span`,5),K(5),I()(),L(6,`app-prop-value`,6),I(),A(7,vM,3,2,`ul`,7)}if(e&2){let e=t,n=W();D(),k(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),D(4),q(n.summaryOf(e)),D(),P(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),D(),j(n.rootOpen()?7:-1)}}function bM(e,t){if(e&1&&L(0,`app-prop-value`,0),e&2){let e=W();P(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var xM=0;function SM(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function CM(e){if(Array.isArray(e))return e.every(CM);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(CM)}return oM(e)}var wM=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++xM}`;host=x(Ml);pendingMore=null;constructor(){Cv(()=>{let e=this.rows(),t=this.pendingMore;if(!t)return;let n=e.findIndex(e=>(e.kind===`leaf`||e.kind===`node`)&&!t.has(e.id));if(n<0)return;this.pendingMore=null;let r=document.activeElement;r&&r!==document.body&&r.isConnected||this.focusNear(n)})}rootPath=X(()=>[this.prop().prop]);rootValue=X(()=>this.store().level(this.rootPath(),this.directive())??this.prop().value);root=X(()=>Zj(this.rootValue()));needle=X(()=>this.query().trim().toLowerCase());matches=X(()=>{let e=this.needle(),t=this.prop();if(!e||[t.name,t.prop].some(t=>t.toLowerCase().includes(e)))return null;let n=this.store(),r=this.directive();return cM(this.rootPath(),this.rootValue(),e=>n.level(e,r),e)});rootOpen=X(()=>!!this.matches()?.length||this.store().isOpen(this.rootPath(),this.directive()));rows=X(()=>{let e=this.root();if(!e)return[];let t=this.store(),n=this.directive(),r=this.matches(),i=new Set,a=new Set;for(let e of r??[]){a.add(nM(e));for(let t=2;t<=e.length;t++)i.add(nM(e.slice(0,t)))}let o=this.prop(),s=this.writes()&&n===void 0,c=[],l=(e,o,d,f,p,m)=>{let{children:ee,more:h}=$j(e);for(let e of ee){let ee=[...o,e.key],h=nM(ee);if(r&&!m&&!i.has(h))continue;let g=Zj(e.value),te=nM(ee,n);if(!g){let t=p&&oM(e.value)?iM(ee):null;c.push({id:te,kind:`leaf`,depth:f,path:ee,label:e.label,text:SM(e.value),edit:s&&t&&p?{name:rM(ee,[...d]),prop:t,value:e.value,edit:p}:void 0});continue}let ne=!!r&&!m&&i.has(h)&&!a.has(h)||t.isOpen(ee,n);if(c.push({id:te,kind:`node`,depth:f,path:ee,label:e.label,text:tM(g),container:g,open:ne}),!ne)continue;let re=t.level(ee,n)??(g.collapsed?void 0:e.value),ie=[...d,g.kind];re===void 0?t.errors().has(te)?c.push({...u(ee,f+1,`error`),text:t.errors().get(te)}):c.push(u(ee,f+1,`loading`)):l(re,ee,ie,f+1,sM(p,g),m||a.has(h))}h>0&&(!r||m)&&c.push({...u(o,f,`more`),more:h,listed:ee.length})},u=(e,t,r)=>({id:`${nM(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?sM(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),Hj.depth,Hj.limit);return e.ok?CM(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 tM(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=O({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&&A(0,yM,8,12)(1,bM,1,5,`app-prop-value`,0),e&2){let e;j((e=t.root())?0:1,e)}},dependencies:[Bj],styles:[`[_nghost-%COMP%] { +}`]})},Pj=1e3,Fj={depth:5,limit:100},Ij=`[redacted]`;function Lj(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Rj(e){return Lj(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function zj(e){return Lj(e)&&typeof e.$collapsed==`string`&&typeof e.size==`number`&&Object.keys(e).length===2}function Bj(e){return e===`Array`?`array`:e===`Map`?`map`:e===`Set`?`set`:`object`}function Vj(e){return e.$type===`Map`&&Array.isArray(e.entries)}function Hj(e){return e.$type===`Set`&&Array.isArray(e.values)}function Uj(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function Wj(e){if(!e||typeof e!=`object`)return null;if(zj(e))return e.size<=0?null:{kind:Bj(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(Rj(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=Rj(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(Vj(t)||Hj(t)){let e=typeof t.size==`number`?t.size:0,n=Vj(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=Uj(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function Gj(e){if(typeof e==`string`)return JSON.stringify(e);let t=Wj(e);if(t)return Jj(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function Kj(e){let t=Wj(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(Rj(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:Gj(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:Uj(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function qj(e,t,n){return`${e} ${e===1?t:n}`}function Jj(e){let t={array:qj(e.size,`item`,`items`),object:qj(e.size,`key`,`keys`),map:qj(e.size,`entry`,`entries`),set:qj(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function Yj(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function Xj(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function Zj(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var Qj=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function $j(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==Ij&&!Qj.test(e)&&!e.endsWith(`…`)}function eM(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function tM(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=Yj(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of Kj(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!Wj(r.value))continue;let i=n(t)??(Wj(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var nM=(e,t)=>t.id;function rM(e,t){if(e&1){let e=B();F(0,`button`,2),H(`click`,function(){S(e);let t=W().$implicit;return C(W(3).toggle(t))}),w(),F(1,`svg`,3),L(2,`path`,4),I(),ds(),F(3,`span`,14),K(4),I(),F(5,`span`,5),K(6),I()()}if(e&2){let e=W().$implicit;k(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),D(4),J(``,e.label,`:`),D(2),q(e.text)}}function iM(e,t){if(e&1&&L(0,`app-prop-value`,15),e&2){let e=W(5);P(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function aM(e,t){if(e&1&&(F(0,`span`,16),K(1),I()),e&2){let e=W(2).$implicit;D(),q(e.text)}}function oM(e,t){if(e&1&&(F(0,`span`,14),K(1),I(),A(2,iM,1,5,`app-prop-value`,15)(3,aM,2,1,`span`,16)),e&2){let e,t=W().$implicit;D(),J(``,t.label,`:`),D(),j((e=t.edit)?2:3,e)}}function sM(e,t){if(e&1){let e=B();F(0,`button`,17),H(`click`,function(){S(e);let t=W().$implicit;return C(W(3).more(t))}),K(1),F(2,`span`,18),K(3),I()()}if(e&2){let e=W().$implicit,t=W(3);D(),J(` Show `,t.step(e),` more `),D(2),J(`(`,e.more,` not listed)`)}}function cM(e,t){e&1&&(F(0,`span`,12),K(1,`Reading from the page…`),I())}function lM(e,t){if(e&1&&(F(0,`span`,13),K(1),I()),e&2){let e=W().$implicit;D(),q(e.text)}}function uM(e,t){if(e&1&&(F(0,`li`,9),A(1,rM,7,4,`button`,10)(2,oM,4,2)(3,sM,4,2,`button`,11)(4,cM,2,0,`span`,12)(5,lM,2,1,`span`,13),I()),e&2){let e,n=t.$implicit;e_(`padding-left`,n.depth*14,`px`),D(),j((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function dM(e,t){if(e&1&&(F(0,`ul`,7),M(1,uM,6,3,`li`,8,nM),I()),e&2){let e=W(2);P(`id`,e.listId),k(`aria-label`,e.prop().name+` entries`),D(),N(e.rows())}}function fM(e,t){if(e&1){let e=B();F(0,`div`,1)(1,`button`,2),H(`click`,function(){return S(e),C(W().toggleRoot())}),w(),F(2,`svg`,3),L(3,`path`,4),I(),ds(),F(4,`span`,5),K(5),I()(),L(6,`app-prop-value`,6),I(),A(7,dM,3,2,`ul`,7)}if(e&2){let e=t,n=W();D(),k(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),D(4),q(n.summaryOf(e)),D(),P(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),D(),j(n.rootOpen()?7:-1)}}function pM(e,t){if(e&1&&L(0,`app-prop-value`,0),e&2){let e=W();P(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var mM=0;function hM(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function gM(e){if(Array.isArray(e))return e.every(gM);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(gM)}return $j(e)}var _M=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++mM}`;host=x(jl);pendingMore=null;constructor(){xv(()=>{let e=this.rows(),t=this.pendingMore;if(!t)return;let n=e.findIndex(e=>(e.kind===`leaf`||e.kind===`node`)&&!t.has(e.id));if(n<0)return;this.pendingMore=null;let r=document.activeElement;r&&r!==document.body&&r.isConnected||this.focusNear(n)})}rootPath=X(()=>[this.prop().prop]);rootValue=X(()=>this.store().level(this.rootPath(),this.directive())??this.prop().value);root=X(()=>Wj(this.rootValue()));needle=X(()=>this.query().trim().toLowerCase());matches=X(()=>{let e=this.needle(),t=this.prop();if(!e||[t.name,t.prop].some(t=>t.toLowerCase().includes(e)))return null;let n=this.store(),r=this.directive();return tM(this.rootPath(),this.rootValue(),e=>n.level(e,r),e)});rootOpen=X(()=>!!this.matches()?.length||this.store().isOpen(this.rootPath(),this.directive()));rows=X(()=>{let e=this.root();if(!e)return[];let t=this.store(),n=this.directive(),r=this.matches(),i=new Set,a=new Set;for(let e of r??[]){a.add(Yj(e));for(let t=2;t<=e.length;t++)i.add(Yj(e.slice(0,t)))}let o=this.prop(),s=this.writes()&&n===void 0,c=[],l=(e,o,d,f,p,m)=>{let{children:ee,more:h}=Kj(e);for(let e of ee){let ee=[...o,e.key],h=Yj(ee);if(r&&!m&&!i.has(h))continue;let g=Wj(e.value),te=Yj(ee,n);if(!g){let t=p&&$j(e.value)?Zj(ee):null;c.push({id:te,kind:`leaf`,depth:f,path:ee,label:e.label,text:hM(e.value),edit:s&&t&&p?{name:Xj(ee,[...d]),prop:t,value:e.value,edit:p}:void 0});continue}let ne=!!r&&!m&&i.has(h)&&!a.has(h)||t.isOpen(ee,n);if(c.push({id:te,kind:`node`,depth:f,path:ee,label:e.label,text:Jj(g),container:g,open:ne}),!ne)continue;let re=t.level(ee,n)??(g.collapsed?void 0:e.value),ie=[...d,g.kind];re===void 0?t.errors().has(te)?c.push({...u(ee,f+1,`error`),text:t.errors().get(te)}):c.push(u(ee,f+1,`loading`)):l(re,ee,ie,f+1,eM(p,g),m||a.has(h))}h>0&&(!r||m)&&c.push({...u(o,f,`more`),more:h,listed:ee.length})},u=(e,t,r)=>({id:`${Yj(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?eM(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),Fj.depth,Fj.limit);return e.ok?gM(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 Jj(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=O({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&&A(0,fM,8,12)(1,pM,1,5,`app-prop-value`,0),e&2){let e;j((e=t.root())?0:1,e)}},dependencies:[Nj],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -2226,7 +2226,7 @@ button.edit[_ngcontent-%COMP%] { .more[_ngcontent-%COMP%] { transition: none; } -}`]})};function TM(e,t){return e.length>t.length&&e.startsWith(`${t.slice(0,-1)},`)}var EM=class{sender;target={rpc:null,pageId:null,componentId:null};fetched=T(new Map);pushed=T({});open=T(new Set);loading=T(new Set);errors=T(new Map);limits=new Map;generation=0;constructor(e){this.sender=e}follow(e,t){let n=e.componentId===this.target.componentId&&e.pageId===this.target.pageId;this.target=e,n||(this.generation++,this.fetched.set(new Map),this.open.set(new Set),this.loading.set(new Set),this.errors.set(new Map),this.limits.clear()),this.pushed.set(t??{})}level(e,t){let n=nM(e,t),r=this.pushed();return Object.hasOwn(r,n)?r[n]:this.fetched().get(n)}isOpen(e,t){return this.open().has(nM(e,t))}toggle(e,t,n){let r=nM(e,t),i=new Set(this.open());if(i.has(r)){for(let e of i)(e===r||TM(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=nM(e,t),i=Math.min(Vj,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=nM(e,t),i=this.generation;this.loading.update(e=>new Set(e).add(r));let a=await this.send({path:e,directive:t,limit:n,watch:!0});i===this.generation&&(this.loading.update(e=>{let t=new Set(e);return t.delete(r),t}),this.errors.update(e=>{let t=new Map(e);return a.ok?t.delete(r):t.set(r,a.error??`The page did not read it.`),t}),a.ok&&this.fetched.update(e=>new Map(e).set(r,a.value)))}async send(e){if(this.sender){if(e.forget)return{ok:!0};let{directive:t,watch:n,...r}=e;try{return await this.sender(r)}catch{return{error:`The devtools server did not answer. Try again.`}}}let{rpc:t,pageId:n,componentId:r}=this.target;if(!t||!n||!r)return{error:`No live page to read from.`};let{directive:i,...a}=e;try{return await t.scope(`pangular`).rpc.call(`request-component-value`,{pageId:n,request:{id:r,...a,...i===void 0?{}:{directive:i}}})??{}}catch{return{error:`The devtools server did not answer. Try again.`}}}};function DM(e,t){if(e&1&&(R(0,`span`,1),K(1),z()),e&2){let e=W(2);D(),J(`: `,e.label())}}function OM(e,t){if(e&1&&(R(0,`span`,1),K(1),z()),e&2){let e=W(3);D(),J(`: `,e.label())}}function kM(e,t){if(e&1){let e=B();R(0,`button`,4),U(`click`,function(){return S(e),C(W(2).store(`log`))}),K(1,` Log to console `),A(2,OM,2,1,`span`,1),z()}if(e&2){let e=W(2);V(`disabled`,e.busy()||!e.rpc()||!e.pageId()),D(2),j(e.label()?2:-1)}}function AM(e,t){if(e&1){let e=B();R(0,`button`,0),U(`click`,function(){return S(e),C(W().store())}),K(1,` Store as global `),A(2,DM,2,1,`span`,1),z(),A(3,kM,3,2,`button`,2),R(4,`span`,3),K(5),z()}if(e&2){let e=W();V(`disabled`,e.busy()||!e.rpc()||!e.pageId()),D(2),j(e.label()?2:-1),D(),j(e.canLog()?3:-1),D(2),q(e.message())}}var jM=class e{rpc=$(null);pageId=$(null);target=$.required();label=$(``);canLog=$(!1);staticReport=X(()=>gT(this.rpc()));busy=T(!1);message=T(``);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=O({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&&A(0,AM,6,4),e&2&&j(t.staticReport()?-1:0)},styles:[`[_nghost-%COMP%] { +}`]})};function vM(e,t){return e.length>t.length&&e.startsWith(`${t.slice(0,-1)},`)}var yM=class{sender;target={rpc:null,pageId:null,componentId:null};fetched=T(new Map);pushed=T({});open=T(new Set);loading=T(new Set);errors=T(new Map);limits=new Map;generation=0;constructor(e){this.sender=e}follow(e,t){let n=e.componentId===this.target.componentId&&e.pageId===this.target.pageId;this.target=e,n||(this.generation++,this.fetched.set(new Map),this.open.set(new Set),this.loading.set(new Set),this.errors.set(new Map),this.limits.clear()),this.pushed.set(t??{})}level(e,t){let n=Yj(e,t),r=this.pushed();return Object.hasOwn(r,n)?r[n]:this.fetched().get(n)}isOpen(e,t){return this.open().has(Yj(e,t))}toggle(e,t,n){let r=Yj(e,t),i=new Set(this.open());if(i.has(r)){for(let e of i)(e===r||vM(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=Yj(e,t),i=Math.min(Pj,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=Yj(e,t),i=this.generation;this.loading.update(e=>new Set(e).add(r));let a=await this.send({path:e,directive:t,limit:n,watch:!0});i===this.generation&&(this.loading.update(e=>{let t=new Set(e);return t.delete(r),t}),this.errors.update(e=>{let t=new Map(e);return a.ok?t.delete(r):t.set(r,a.error??`The page did not read it.`),t}),a.ok&&this.fetched.update(e=>new Map(e).set(r,a.value)))}async send(e){if(this.sender){if(e.forget)return{ok:!0};let{directive:t,watch:n,...r}=e;try{return await this.sender(r)}catch{return{error:`The devtools server did not answer. Try again.`}}}let{rpc:t,pageId:n,componentId:r}=this.target;if(!t||!n||!r)return{error:`No live page to read from.`};let{directive:i,...a}=e;try{return await t.scope(`pangular`).rpc.call(`request-component-value`,{pageId:n,request:{id:r,...a,...i===void 0?{}:{directive:i}}})??{}}catch{return{error:`The devtools server did not answer. Try again.`}}}};function bM(e,t){if(e&1&&(R(0,`span`,1),K(1),z()),e&2){let e=W(2);D(),J(`: `,e.label())}}function xM(e,t){if(e&1&&(R(0,`span`,1),K(1),z()),e&2){let e=W(3);D(),J(`: `,e.label())}}function SM(e,t){if(e&1){let e=B();R(0,`button`,4),U(`click`,function(){return S(e),C(W(2).store(`log`))}),K(1,` Log to console `),A(2,xM,2,1,`span`,1),z()}if(e&2){let e=W(2);V(`disabled`,e.busy()||!e.rpc()||!e.pageId()),D(2),j(e.label()?2:-1)}}function CM(e,t){if(e&1){let e=B();R(0,`button`,0),U(`click`,function(){return S(e),C(W().store())}),K(1,` Store as global `),A(2,bM,2,1,`span`,1),z(),A(3,SM,3,2,`button`,2),R(4,`span`,3),K(5),z()}if(e&2){let e=W();V(`disabled`,e.busy()||!e.rpc()||!e.pageId()),D(2),j(e.label()?2:-1),D(),j(e.canLog()?3:-1),D(2),q(e.message())}}var wM=class e{rpc=$(null);pageId=$(null);target=$.required();label=$(``);canLog=$(!1);staticReport=X(()=>lT(this.rpc()));busy=T(!1);message=T(``);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=O({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&&A(0,CM,6,4),e&2&&j(t.staticReport()?-1:0)},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-wrap: wrap; align-items: center; @@ -2275,7 +2275,7 @@ button.edit[_ngcontent-%COMP%] { .status[_ngcontent-%COMP%]:empty { display: none; -}`]})},MM=(e,t)=>t.block.id,NM=(e,t)=>t.kind,PM=(e,t)=>t.id;function FM(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.label,` `)}}function IM(e,t){if(e&1&&(K(0),R(1,`span`,18),K(2),z()),e&2){let e=W().$implicit;J(` `,e.kind,` `),D(2),J(``,e.seconds,`s`)}}function LM(e,t){if(e&1&&(R(0,`span`,9),A(1,FM,1,1)(2,IM,3,2),z()),e&2){let e=t.$implicit;r_(`note-`+e.kind),k(`title`,e.text),D(),j(e.seconds===void 0?1:2)}}function RM(e,t){if(e&1&&(R(0,`span`,9),K(1),z()),e&2){let e=W().$implicit;k(`title`,e.block.hydratedAt===void 0?`The block hydrated before the devtools attached to the page.`:null),D(),q(e.hydrated)}}function zM(e,t){e&1&&(R(0,`span`,9),K(1,`@error block`),z())}function BM(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W().$implicit;D(),q(e.timings)}}function VM(e,t){e&1&&(R(0,`span`,11),K(1,`mismatch`),z())}function HM(e,t){if(e&1&&(R(0,`dt`),K(1,`Template of`),z(),R(2,`dd`,19),K(3),z()),e&2){let e=t;D(3),Y(``,e.name,` <`,e.tag,`>`)}}function UM(e,t){if(e&1&&(R(0,`dt`),K(1,`In this state since`),z(),R(2,`dd`),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(3),q(t.clock(e.block.since))}}function WM(e,t){if(e&1&&(R(0,`dt`),K(1,`Hydrated`),z(),R(2,`dd`),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(3),J(` `,e.block.hydratedAt===void 0?`Before the devtools attached`:t.clock(e.block.hydratedAt),` `)}}function GM(e,t){if(e&1&&(R(0,`span`,23),K(1),z()),e&2){let e=W().$implicit;D(),q(e.hydration)}}function KM(e,t){if(e&1&&(R(0,`li`)(1,`span`,22),K(2),z(),R(3,`span`,19),K(4),z(),A(5,GM,2,1,`span`,23),z()),e&2){let e=t.$implicit,n=W(5);D(2),q(n.clock(e.at)),D(2),q(e.state),D(),j(e.hydration===`not-configured`?-1:5)}}function qM(e,t){if(e&1&&(R(0,`h3`,20),K(1,`Transitions`),z(),R(2,`ol`,21),M(3,KM,6,3,`li`,null,eg),z()),e&2){let e=W(2).$implicit;D(3),N(e.block.transitions)}}function JM(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,25),U(`click`,function(){let t=S(e).$implicit;return C(W(5).showNode.emit(t.id))}),K(2),R(3,`span`,19),K(4),z()()()}if(e&2){let e=t.$implicit;D(2),J(` Show `,e.name,` `),D(2),J(`<`,e.tag,`>`)}}function YM(e,t){if(e&1&&(R(0,`h3`,20),K(1,`Hydration mismatches`),z(),R(2,`ul`,24),M(3,JM,5,2,`li`,null,PM),z()),e&2){let e=W(2).$implicit;D(3),N(e.mismatches)}}function XM(e,t){if(e&1&&(R(0,`div`,17)(1,`dl`)(2,`dt`),K(3,`Block`),z(),R(4,`dd`,19),K(5),z(),A(6,HM,4,2),A(7,UM,4,1),A(8,WM,4,1),R(9,`dt`),K(10,`Root elements`),z(),R(11,`dd`),K(12),z(),R(13,`dt`),K(14,`Triggers`),z(),R(15,`dd`,19),K(16),z()(),A(17,qM,5,0),A(18,YM,5,0),z()),e&2){let e,t=W().$implicit;V(`id`,`defer-detail-`+t.block.id),D(5),q(t.block.id),D(),j((e=t.block.owner)?6:-1,e),D(),j(t.block.since?7:-1),D(),j(t.block.hydration===`hydrated`?8:-1),D(4),q(t.block.rootIds.length||`None rendered`),D(4),q(t.block.triggers.join(`, `)||`None`),D(),j(t.block.transitions?.length?17:-1),D(),j(t.mismatches.length?18:-1)}}function ZM(e,t){if(e&1){let e=B();R(0,`li`,4)(1,`button`,5),U(`click`,function(){let t=S(e).$implicit;return C(W(2).showOwner.emit(t.block))})(`focus`,function(){let t=S(e).$implicit;return C(W(2).highlight.emit(t.block))})(`blur`,function(){return S(e),C(W(2).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(2).highlight.emit(t.block))})(`mouseleave`,function(){return S(e),C(W(2).highlight.emit(null))}),R(2,`span`,6),K(3),z(),R(4,`span`,7),K(5),z(),M(6,LM,3,4,`span`,8,NM),A(8,RM,2,2,`span`,9),A(9,zM,2,0,`span`,9),A(10,BM,2,1,`span`,10),A(11,VM,2,0,`span`,11),R(12,`span`,12),K(13),z()(),R(14,`button`,13),U(`click`,function(){let t=S(e).$implicit;return C(W(2).toggle(t.block.id))}),w(),R(15,`svg`,14),fg(16,`path`,15),z(),fs(),R(17,`span`,16),K(18),z()(),A(19,XM,19,9,`div`,17),z()}if(e&2){let e=t.$implicit,n=W(2);D(),k(`aria-disabled`,e.block.owner?null:`true`),D(2),q(e.block.owner?.name??`Unknown component`),D(),r_(`defer-state-`+e.block.state),D(),q(e.block.state),D(),N(e.notes),D(2),j(e.hydrated?8:-1),D(),j(e.block.hasErrorBlock?9:-1),D(),j(e.timings?10:-1),D(),j(e.mismatches.length?11:-1),D(2),q(e.block.triggers.join(`, `)||`no triggers`),D(),k(`aria-expanded`,n.isOpen(e.block.id))(`aria-controls`,n.isOpen(e.block.id)?`defer-detail-`+e.block.id:null),D(4),J(`Details of the block in `,e.block.owner?.name??`an unknown component`),D(),j(n.isOpen(e.block.id)?19:-1)}}function QM(e,t){if(e&1&&(R(0,`section`,0)(1,`h2`,1),K(2,` Defer blocks `),R(3,`span`,2),K(4),z()(),R(5,`ul`,3),M(6,ZM,20,14,`li`,4,MM),z()()),e&2){let e=W();D(4),Y(``,e.rows().length,``,e.truncated()?`+`:``),D(2),N(e.rows())}}function $M(e){return e<1e3?`${e}ms`:`${Number((e/1e3).toFixed(2))}s`}function eN(e){let t=[],n=e.placeholder?.minimumTime;n!=null&&t.push(`placeholder min ${$M(n)}`);let r=[e.loading?.afterTime==null?``:`after ${$M(e.loading.afterTime)}`,e.loading?.minimumTime==null?``:`min ${$M(e.loading.minimumTime)}`].filter(Boolean);return r.length&&t.push(`loading ${r.join(`, `)}`),t.join(` · `)}var tN=class e{blocks=$([]);truncated=$(!1);clockOffset=$(0);showOwner=lv();mismatches=$([]);showNode=lv();open=T(new Set);highlight=lv();now=T(Date.now());waiting=X(()=>this.blocks().some(e=>!!e.since&&(e.state===`placeholder`||e.state===`initial`)));rows=X(()=>{let e=this.now()-this.clockOffset();return this.blocks().map(t=>({block:t,notes:aT({...t,since:t.since||e},e),timings:eN(t),mismatches:this.mismatches().filter(e=>t.rootIds.includes(e.id)),hydrated:t.hydration===`hydrated`?nT(t):``}))});isOpen(e){return this.open().has(e)}toggle(e){this.open.update(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})}clock(e){return YE(e)}constructor(){let e,t=()=>{clearInterval(e),e=void 0};E(()=>{if(!this.waiting())return t();e===void 0&&(this.now.set(Date.now()),e=setInterval(()=>this.now.set(Date.now()),1e3))}),x(Ss).onDestroy(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-defer-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],clockOffset:[1,`clockOffset`],mismatches:[1,`mismatches`]},outputs:{showOwner:`showOwner`,showNode:`showNode`,highlight:`highlight`},decls:1,vars:1,consts:[[`aria-labelledby`,`ct-defer-title`,1,`defer`],[`id`,`ct-defer-title`,1,`defer-title`],[1,`pill`],[1,`defer-list`],[1,`defer-item`],[`type`,`button`,1,`defer-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`defer-state`],[1,`flag`,3,`class`],[1,`flag`],[1,`timings`],[1,`flag`,`note-failed`],[1,`triggers`,`mono`],[`type`,`button`,1,`defer-toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m9 6 6 6-6 6`],[1,`sr-only`],[1,`defer-detail`,3,`id`],[`aria-hidden`,`true`],[1,`mono`],[1,`detail-label`],[1,`transitions`],[1,`when`],[1,`muted`],[1,`mismatch-links`],[`type`,`button`,3,`click`]],template:function(e,t){e&1&&A(0,QM,8,2,`section`,0),e&2&&j(t.rows().length?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},TM=(e,t)=>t.block.id,EM=(e,t)=>t.kind,DM=(e,t)=>t.id;function OM(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.label,` `)}}function kM(e,t){if(e&1&&(K(0),R(1,`span`,18),K(2),z()),e&2){let e=W().$implicit;J(` `,e.kind,` `),D(2),J(``,e.seconds,`s`)}}function AM(e,t){if(e&1&&(R(0,`span`,9),A(1,OM,1,1)(2,kM,3,2),z()),e&2){let e=t.$implicit;t_(`note-`+e.kind),k(`title`,e.text),D(),j(e.seconds===void 0?1:2)}}function jM(e,t){if(e&1&&(R(0,`span`,9),K(1),z()),e&2){let e=W().$implicit;k(`title`,e.block.hydratedAt===void 0?`The block hydrated before the devtools attached to the page.`:null),D(),q(e.hydrated)}}function MM(e,t){e&1&&(R(0,`span`,9),K(1,`@error block`),z())}function NM(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W().$implicit;D(),q(e.timings)}}function PM(e,t){e&1&&(R(0,`span`,11),K(1,`mismatch`),z())}function FM(e,t){if(e&1&&(R(0,`dt`),K(1,`Template of`),z(),R(2,`dd`,19),K(3),z()),e&2){let e=t;D(3),Y(``,e.name,` <`,e.tag,`>`)}}function IM(e,t){if(e&1&&(R(0,`dt`),K(1,`In this state since`),z(),R(2,`dd`),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(3),q(t.clock(e.block.since))}}function LM(e,t){if(e&1&&(R(0,`dt`),K(1,`Hydrated`),z(),R(2,`dd`),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(3),J(` `,e.block.hydratedAt===void 0?`Before the devtools attached`:t.clock(e.block.hydratedAt),` `)}}function RM(e,t){if(e&1&&(R(0,`span`,23),K(1),z()),e&2){let e=W().$implicit;D(),q(e.hydration)}}function zM(e,t){if(e&1&&(R(0,`li`)(1,`span`,22),K(2),z(),R(3,`span`,19),K(4),z(),A(5,RM,2,1,`span`,23),z()),e&2){let e=t.$implicit,n=W(5);D(2),q(n.clock(e.at)),D(2),q(e.state),D(),j(e.hydration===`not-configured`?-1:5)}}function BM(e,t){if(e&1&&(R(0,`h3`,20),K(1,`Transitions`),z(),R(2,`ol`,21),M(3,zM,6,3,`li`,null,Qh),z()),e&2){let e=W(2).$implicit;D(3),N(e.block.transitions)}}function VM(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,25),U(`click`,function(){let t=S(e).$implicit;return C(W(5).showNode.emit(t.id))}),K(2),R(3,`span`,19),K(4),z()()()}if(e&2){let e=t.$implicit;D(2),J(` Show `,e.name,` `),D(2),J(`<`,e.tag,`>`)}}function HM(e,t){if(e&1&&(R(0,`h3`,20),K(1,`Hydration mismatches`),z(),R(2,`ul`,24),M(3,VM,5,2,`li`,null,DM),z()),e&2){let e=W(2).$implicit;D(3),N(e.mismatches)}}function UM(e,t){if(e&1&&(R(0,`div`,17)(1,`dl`)(2,`dt`),K(3,`Block`),z(),R(4,`dd`,19),K(5),z(),A(6,FM,4,2),A(7,IM,4,1),A(8,LM,4,1),R(9,`dt`),K(10,`Root elements`),z(),R(11,`dd`),K(12),z(),R(13,`dt`),K(14,`Triggers`),z(),R(15,`dd`,19),K(16),z()(),A(17,BM,5,0),A(18,HM,5,0),z()),e&2){let e,t=W().$implicit;V(`id`,`defer-detail-`+t.block.id),D(5),q(t.block.id),D(),j((e=t.block.owner)?6:-1,e),D(),j(t.block.since?7:-1),D(),j(t.block.hydration===`hydrated`?8:-1),D(4),q(t.block.rootIds.length||`None rendered`),D(4),q(t.block.triggers.join(`, `)||`None`),D(),j(t.block.transitions?.length?17:-1),D(),j(t.mismatches.length?18:-1)}}function WM(e,t){if(e&1){let e=B();R(0,`li`,4)(1,`button`,5),U(`click`,function(){let t=S(e).$implicit;return C(W(2).showOwner.emit(t.block))})(`focus`,function(){let t=S(e).$implicit;return C(W(2).highlight.emit(t.block))})(`blur`,function(){return S(e),C(W(2).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(2).highlight.emit(t.block))})(`mouseleave`,function(){return S(e),C(W(2).highlight.emit(null))}),R(2,`span`,6),K(3),z(),R(4,`span`,7),K(5),z(),M(6,AM,3,4,`span`,8,EM),A(8,jM,2,2,`span`,9),A(9,MM,2,0,`span`,9),A(10,NM,2,1,`span`,10),A(11,PM,2,0,`span`,11),R(12,`span`,12),K(13),z()(),R(14,`button`,13),U(`click`,function(){let t=S(e).$implicit;return C(W(2).toggle(t.block.id))}),w(),R(15,`svg`,14),ug(16,`path`,15),z(),ds(),R(17,`span`,16),K(18),z()(),A(19,UM,19,9,`div`,17),z()}if(e&2){let e=t.$implicit,n=W(2);D(),k(`aria-disabled`,e.block.owner?null:`true`),D(2),q(e.block.owner?.name??`Unknown component`),D(),t_(`defer-state-`+e.block.state),D(),q(e.block.state),D(),N(e.notes),D(2),j(e.hydrated?8:-1),D(),j(e.block.hasErrorBlock?9:-1),D(),j(e.timings?10:-1),D(),j(e.mismatches.length?11:-1),D(2),q(e.block.triggers.join(`, `)||`no triggers`),D(),k(`aria-expanded`,n.isOpen(e.block.id))(`aria-controls`,n.isOpen(e.block.id)?`defer-detail-`+e.block.id:null),D(4),J(`Details of the block in `,e.block.owner?.name??`an unknown component`),D(),j(n.isOpen(e.block.id)?19:-1)}}function GM(e,t){if(e&1&&(R(0,`section`,0)(1,`h2`,1),K(2,` Defer blocks `),R(3,`span`,2),K(4),z()(),R(5,`ul`,3),M(6,WM,20,14,`li`,4,TM),z()()),e&2){let e=W();D(4),Y(``,e.rows().length,``,e.truncated()?`+`:``),D(2),N(e.rows())}}function KM(e){return e<1e3?`${e}ms`:`${Number((e/1e3).toFixed(2))}s`}function qM(e){let t=[],n=e.placeholder?.minimumTime;n!=null&&t.push(`placeholder min ${KM(n)}`);let r=[e.loading?.afterTime==null?``:`after ${KM(e.loading.afterTime)}`,e.loading?.minimumTime==null?``:`min ${KM(e.loading.minimumTime)}`].filter(Boolean);return r.length&&t.push(`loading ${r.join(`, `)}`),t.join(` · `)}var JM=class e{blocks=$([]);truncated=$(!1);clockOffset=$(0);showOwner=sv();mismatches=$([]);showNode=sv();open=T(new Set);highlight=sv();now=T(Date.now());waiting=X(()=>this.blocks().some(e=>!!e.since&&(e.state===`placeholder`||e.state===`initial`)));rows=X(()=>{let e=this.now()-this.clockOffset();return this.blocks().map(t=>({block:t,notes:Qw({...t,since:t.since||e},e),timings:qM(t),mismatches:this.mismatches().filter(e=>t.rootIds.includes(e.id)),hydrated:t.hydration===`hydrated`?Yw(t):``}))});isOpen(e){return this.open().has(e)}toggle(e){this.open.update(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})}clock(e){return HE(e)}constructor(){let e,t=()=>{clearInterval(e),e=void 0};E(()=>{if(!this.waiting())return t();e===void 0&&(this.now.set(Date.now()),e=setInterval(()=>this.now.set(Date.now()),1e3))}),x(xs).onDestroy(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-defer-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],clockOffset:[1,`clockOffset`],mismatches:[1,`mismatches`]},outputs:{showOwner:`showOwner`,showNode:`showNode`,highlight:`highlight`},decls:1,vars:1,consts:[[`aria-labelledby`,`ct-defer-title`,1,`defer`],[`id`,`ct-defer-title`,1,`defer-title`],[1,`pill`],[1,`defer-list`],[1,`defer-item`],[`type`,`button`,1,`defer-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`defer-state`],[1,`flag`,3,`class`],[1,`flag`],[1,`timings`],[1,`flag`,`note-failed`],[1,`triggers`,`mono`],[`type`,`button`,1,`defer-toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m9 6 6 6-6 6`],[1,`sr-only`],[1,`defer-detail`,3,`id`],[`aria-hidden`,`true`],[1,`mono`],[1,`detail-label`],[1,`transitions`],[1,`when`],[1,`muted`],[1,`mismatch-links`],[`type`,`button`,3,`click`]],template:function(e,t){e&1&&A(0,GM,8,2,`section`,0),e&2&&j(t.rows().length?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -2513,7 +2513,7 @@ button.edit[_ngcontent-%COMP%] { min-width: 0; text-overflow: ellipsis; white-space: nowrap; -}`]})},nN=(e,t)=>t.id;function rN(e,t){if(e&1&&(F(0,`p`,4),K(1),I()),e&2){let e=W(2);D(),J(`The page has more @for blocks than the `,e.length,` listed.`)}}function iN(e,t){e&1&&(F(0,`span`,9),K(1,`@empty showing`),I())}function aN(e,t){e&1&&(F(0,`span`,10),K(1,`@empty`),I())}function oN(e,t){e&1&&(F(0,`span`,10),K(1,`renders nothing`),I())}function sN(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,6),H(`click`,function(){let t=S(e).$implicit;return C(W(3).showOwner.emit(t))})(`focus`,function(){let t=S(e).$implicit,n=W(3);return C(n.highlight.emit(n.target(t)))})(`blur`,function(){return S(e),C(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit,n=W(3);return C(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return S(e),C(W(3).highlight.emit(null))}),F(2,`span`,7),K(3),I(),F(4,`span`,8),K(5),I(),A(6,iN,2,0,`span`,9)(7,aN,2,0,`span`,10)(8,oN,2,0,`span`,10),F(9,`span`,11),K(10),I()()()}if(e&2){let e=t.$implicit,n=W(3);D(),k(`aria-disabled`,e.owner?null:`true`),D(2),q(e.owner?.name??`Unknown component`),D(2),Y(` `,e.count,` `,e.count===1?`item`:`items`,` `),D(),j(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),D(4),q(n.trackLabel(e))}}function cN(e,t){if(e&1&&(F(0,`section`,1)(1,`h2`,2),K(2,` @for blocks `),F(3,`span`,3),K(4),I()(),A(5,rN,2,1,`p`,4),F(6,`ul`,5),M(7,sN,11,6,`li`,null,nN),I()()),e&2){let e=W(),t=W();D(4),q(t.truncated()?e.length+`+`:e.length),D(),j(t.truncated()?5:-1),D(2),N(e)}}function lN(e,t){e&1&&A(0,cN,9,2,`section`,1),e&2&&j(t.length?0:-1)}function uN(e,t){e&1&&L(0,`app-angular-unavailable`,0),e&2&&P(`page`,W().angular())}var dN={$index:`track $index`,item:`track item`,function:`track expression`},fN=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);angular=$(null);showOwner=lv();highlight=lv();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?dN[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,lN,1,1)(1,uN,1,1,`app-angular-unavailable`,0),e&2){let e;j((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},dependencies:[yD],styles:[`[_nghost-%COMP%] { +}`]})},YM=(e,t)=>t.id;function XM(e,t){if(e&1&&(F(0,`p`,4),K(1),I()),e&2){let e=W(2);D(),J(`The page has more @for blocks than the `,e.length,` listed.`)}}function ZM(e,t){e&1&&(F(0,`span`,9),K(1,`@empty showing`),I())}function QM(e,t){e&1&&(F(0,`span`,10),K(1,`@empty`),I())}function $M(e,t){e&1&&(F(0,`span`,10),K(1,`renders nothing`),I())}function eN(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,6),H(`click`,function(){let t=S(e).$implicit;return C(W(3).showOwner.emit(t))})(`focus`,function(){let t=S(e).$implicit,n=W(3);return C(n.highlight.emit(n.target(t)))})(`blur`,function(){return S(e),C(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit,n=W(3);return C(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return S(e),C(W(3).highlight.emit(null))}),F(2,`span`,7),K(3),I(),F(4,`span`,8),K(5),I(),A(6,ZM,2,0,`span`,9)(7,QM,2,0,`span`,10)(8,$M,2,0,`span`,10),F(9,`span`,11),K(10),I()()()}if(e&2){let e=t.$implicit,n=W(3);D(),k(`aria-disabled`,e.owner?null:`true`),D(2),q(e.owner?.name??`Unknown component`),D(2),Y(` `,e.count,` `,e.count===1?`item`:`items`,` `),D(),j(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),D(4),q(n.trackLabel(e))}}function tN(e,t){if(e&1&&(F(0,`section`,1)(1,`h2`,2),K(2,` @for blocks `),F(3,`span`,3),K(4),I()(),A(5,XM,2,1,`p`,4),F(6,`ul`,5),M(7,eN,11,6,`li`,null,YM),I()()),e&2){let e=W(),t=W();D(4),q(t.truncated()?e.length+`+`:e.length),D(),j(t.truncated()?5:-1),D(2),N(e)}}function nN(e,t){e&1&&A(0,tN,9,2,`section`,1),e&2&&j(t.length?0:-1)}function rN(e,t){e&1&&L(0,`app-angular-unavailable`,0),e&2&&P(`page`,W().angular())}var iN={$index:`track $index`,item:`track item`,function:`track expression`},aN=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);angular=$(null);showOwner=sv();highlight=sv();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?iN[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,nN,1,1)(1,rN,1,1,`app-angular-unavailable`,0),e&2){let e;j((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},dependencies:[fD],styles:[`[_nghost-%COMP%] { display: block; } @@ -2631,7 +2631,7 @@ button.edit[_ngcontent-%COMP%] { min-width: 0; text-overflow: ellipsis; white-space: nowrap; -}`]})},pN=(e,t)=>t.id;function mN(e,t){if(e&1&&(F(0,`p`,11),K(1),I(),F(2,`h3`,7),K(3,`Still retained`),I(),F(4,`p`,6),K(5,` In a development build, Angular's DI debug data keeps every destroyed component in memory, so Pangular can't tell a leak from that. Check retainers in the Chrome DevTools Memory panel: take a heap snapshot after a few navigations, search for the class and look for a retainer other than Angular's DI debug records. Open subscriptions after destroy are still tracked below. `),I()),e&2){let e=W(),t=W();D(),q(t.plural(e.navigations,`navigation`))}}function hN(e,t){e&1&&(F(0,`p`,6),K(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),I())}function gN(e,t){if(e&1&&(F(0,`span`,18),K(1),I()),e&2){let e=W().$implicit,t=W(4);D(),q(t.plural(e.subscriptions,`open subscription`))}}function _N(e,t){if(e&1&&(F(0,`li`,13)(1,`span`,14),K(2),I(),F(3,`span`,15),K(4),I(),F(5,`span`,16),K(6),I(),F(7,`span`,17),K(8),I(),A(9,gN,2,1,`span`,18),I()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.name),D(2),q(e.route||`/`),D(2),J(``,n.plural(e.navigations,`navigation`),` ago`),D(2),q(n.ageOf(e)),D(),j(e.subscriptions?9:-1)}}function vN(e,t){if(e&1&&(F(0,`p`,6),K(1),I(),F(2,`ul`,12),M(3,_N,10,5,`li`,13,pN),I()),e&2){let e=W(3);D(),Y(` Destroyed, yet still in memory after at least `,e.minNavigations,` navigations and `,e.minSeconds,` seconds. Take a heap snapshot, search for the class and read its retainers. `),D(2),N(e.retained().slice(0,e.shown))}}function yN(e,t){e&1&&(F(0,`p`,6),K(1,`No destroyed component is still in memory after a few navigations.`),I())}function bN(e,t){if(e&1&&(F(0,`p`,6),K(1),F(2,`span`,19),K(3),I(),K(4,`. Navigate a few times to see whether they stay. `),I()),e&2){let e=W(3);D(),J(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),D(2),q(e.names(e.recent()))}}function xN(e,t){if(e&1&&(A(0,hN,2,0,`p`,6),F(1,`p`,11),K(2),I(),F(3,`h3`,7),K(4,` Still retained `),F(5,`span`,8),K(6),I()(),A(7,vN,5,2)(8,yN,2,0,`p`,6),A(9,bN,5,2,`p`,6)),e&2){let e=W(),t=W();j(e.support.retention?-1:0),D(2),O_(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),D(4),q(t.retained().length),D(),j(t.retained().length?7:8),D(2),j(t.recent().length?9:-1)}}function SN(e,t){if(e&1&&(F(0,`p`,6),K(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),F(2,`span`,19),K(3),I(),K(4,`. `),I()),e&2){let e=W(2);D(3),q(e.names(e.detached()))}}function CN(e,t){if(e&1&&(F(0,`span`,8),K(1),I()),e&2){let e=W();D(),q(e.subscriptions.length)}}function wN(e,t){if(e&1&&(F(0,`span`,15),K(1),I()),e&2){let e=W().$implicit;D(),q(e.source)}}function TN(e,t){if(e&1&&(F(0,`li`,13)(1,`span`,14),K(2),I(),F(3,`span`,16),K(4),I(),F(5,`span`,18),K(6),I(),A(7,wN,2,1,`span`,15),I()),e&2){let e=t.$implicit;D(2),q(e.name),D(2),J(``,e.count,` open`),D(2),J(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),D(),j(e.source?7:-1)}}function EN(e,t){if(e&1&&(F(0,`p`,6),K(1,` Still open although the component that made them is gone. Tear them down with takeUntilDestroyed(), DestroyRef.onDestroy or the async pipe. `),I(),F(2,`ul`,12),M(3,TN,8,4,`li`,13,eg),I()),e&2){let e=W(2),t=W();D(3),N(e.subscriptions.slice(0,t.shown))}}function DN(e,t){e&1&&(F(0,`p`,6),K(1,`No subscription is still open after its component went away.`),I())}function ON(e,t){e&1&&(F(0,`p`,6),K(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),I())}function kN(e,t){if(e&1&&(A(0,EN,5,0)(1,DN,2,0,`p`,6),A(2,ON,2,0,`p`,6)),e&2){let e=W();j(+!e.subscriptions.length),D(2),j(e.support.instances?-1:2)}}function AN(e,t){e&1&&(F(0,`p`,9),K(1,` Tracking could not start: the page has no RxJS the overlay can load. `),I())}function jN(e,t){e&1&&(F(0,`p`,6),K(1,` Off. Track subscriptions wraps Observable.prototype.subscribe on the page to record which component makes each subscription, until you stop it. Subscriptions made before you start are not seen, so reload or navigate again after starting. `),I())}function MN(e,t){e&1&&L(0,`app-angular-unavailable`,10),e&2&&P(`page`,W(2).angular())}function NN(e,t){if(e&1&&(F(0,`span`,16),K(1),I()),e&2){let e=W().$implicit,t=W(3);D(),q(t.plural(e.subscriptions,`subscription`))}}function PN(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,20),H(`click`,function(){let t=S(e).$implicit;return C(W(3).showComponent.emit(t.id))})(`focus`,function(){let t=S(e).$implicit;return C(W(3).highlight.emit(t.id))})(`blur`,function(){return S(e),C(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(3).highlight.emit(t.id))})(`mouseleave`,function(){return S(e),C(W(3).highlight.emit(null))}),F(2,`span`,14),K(3),I(),F(4,`span`,16),K(5),I(),A(6,NN,2,1,`span`,16),I()()}if(e&2){let e=t.$implicit,n=W(2),r=W();D(3),q(e.name),D(2),q(r.effectsText(e)),D(),j(n.support.subscriptions===`on`?6:-1)}}function FN(e,t){e&1&&(F(0,`p`,6),K(1,` Angular files a component's effects under the template its host sits in, so effects of components side by side in one template show as shared. `),I())}function IN(e,t){if(e&1&&(F(0,`ul`,12),M(1,PN,7,3,`li`,null,pN),I(),A(3,FN,2,0,`p`,6)),e&2){let e=W(),t=W();D(),N(e.components.slice(0,t.shown)),D(2),j(e.components.some(t.hasShared)?3:-1)}}function LN(e,t){e&1&&(F(0,`p`,6),K(1,`No component on the page has a live effect or a tracked subscription.`),I())}function RN(e,t){if(e&1&&(A(0,mN,6,1)(1,xN,10,7),A(2,SN,5,1,`p`,6),F(3,`h3`,7),K(4,` Open subscriptions after destroy `),A(5,CN,2,1,`span`,8),I(),A(6,kN,3,2)(7,AN,2,0,`p`,9)(8,jN,2,0,`p`,6),F(9,`h3`,7),K(10,` Live effects and subscriptions `),F(11,`span`,8),K(12),I()(),A(13,MN,1,1,`app-angular-unavailable`,10),A(14,IN,4,1)(15,LN,2,0,`p`,6)),e&2){let e,n=t,r=W();j(n.support.retention===`dev-di-debug`?0:1),D(2),j(r.detached().length?2:-1),D(3),j(n.support.subscriptions===`on`?5:-1),D(),j((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),D(6),q(n.components.length),D(),j(n.support.effects?-1:13),D(),j(n.components.length?14:15)}}function zN(e,t){e&1&&(F(0,`p`,6),K(1,`No leak data from this page yet. It comes with the next report.`),I())}var BN=20;function VN(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 HN=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,UN=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=lv();highlight=lv();shown=BN;minNavigations=2;minSeconds=lw/1e3;plural=HN;busy=T(!1);announcement=T(``);tracking=X(()=>this.report()?.support.subscriptions===`on`);split=X(()=>{let e=this.report(),t=[],n=[],r=[];if(!e)return{retained:t,recent:n,detached:r};let i=e.support.retention===`dev-di-debug`;for(let a of e.destroyed)if(a.detached)r.push(a);else if(i)continue;else this.isRetained(e,a)?t.push(a):n.push(a);return{retained:t,recent:n,detached:r}});retained=X(()=>this.split().retained);recent=X(()=>this.split().recent);detached=X(()=>this.split().detached);ageMs(e,t){return Math.max(0,this.now()()-e.reportedAt+(e.at-t.destroyedAt))}isRetained(e,t){return t.navigations>=2&&this.ageMs(e,t)>=1e4}ageOf(e){let t=this.report();return t?`${VN(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=HN(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 mT(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=O({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&&(F(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Leaks`),I(),F(4,`button`,3),H(`click`,function(){return t.toggle()}),K(5,` Track subscriptions `),I(),F(6,`p`,4),K(7),I()(),F(8,`p`,5),K(9,` Components that left the page but are still in memory, and the live effects and RxJS subscriptions of each component. The browser collects garbage when it decides, so a retained instance is a hint: check what holds it in the Chrome DevTools Memory panel. `),I(),A(10,RN,16,7)(11,zN,2,0,`p`,6),I()),e&2){let e;D(4),P(`disabled`,!t.pageId()||!t.report()),k(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),D(3),q(t.announcement()),D(3),j((e=t.report())?10:11,e)}},dependencies:[yD],styles:[`[_nghost-%COMP%] { +}`]})},oN=(e,t)=>t.id;function sN(e,t){if(e&1&&(F(0,`p`,11),K(1),I(),F(2,`h3`,7),K(3,`Still retained`),I(),F(4,`p`,6),K(5,` In a development build, Angular's DI debug data keeps every destroyed component in memory, so Pangular can't tell a leak from that. Check retainers in the Chrome DevTools Memory panel: take a heap snapshot after a few navigations, search for the class and look for a retainer other than Angular's DI debug records. Open subscriptions after destroy are still tracked below. `),I()),e&2){let e=W(),t=W();D(),q(t.plural(e.navigations,`navigation`))}}function cN(e,t){e&1&&(F(0,`p`,6),K(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),I())}function lN(e,t){if(e&1&&(F(0,`span`,18),K(1),I()),e&2){let e=W().$implicit,t=W(4);D(),q(t.plural(e.subscriptions,`open subscription`))}}function uN(e,t){if(e&1&&(F(0,`li`,13)(1,`span`,14),K(2),I(),F(3,`span`,15),K(4),I(),F(5,`span`,16),K(6),I(),F(7,`span`,17),K(8),I(),A(9,lN,2,1,`span`,18),I()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.name),D(2),q(e.route||`/`),D(2),J(``,n.plural(e.navigations,`navigation`),` ago`),D(2),q(n.ageOf(e)),D(),j(e.subscriptions?9:-1)}}function dN(e,t){if(e&1&&(F(0,`p`,6),K(1),I(),F(2,`ul`,12),M(3,uN,10,5,`li`,13,oN),I()),e&2){let e=W(3);D(),Y(` Destroyed, yet still in memory after at least `,e.minNavigations,` navigations and `,e.minSeconds,` seconds. Take a heap snapshot, search for the class and read its retainers. `),D(2),N(e.retained().slice(0,e.shown))}}function fN(e,t){e&1&&(F(0,`p`,6),K(1,`No destroyed component is still in memory after a few navigations.`),I())}function pN(e,t){if(e&1&&(F(0,`p`,6),K(1),F(2,`span`,19),K(3),I(),K(4,`. Navigate a few times to see whether they stay. `),I()),e&2){let e=W(3);D(),J(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),D(2),q(e.names(e.recent()))}}function mN(e,t){if(e&1&&(A(0,cN,2,0,`p`,6),F(1,`p`,11),K(2),I(),F(3,`h3`,7),K(4,` Still retained `),F(5,`span`,8),K(6),I()(),A(7,dN,5,2)(8,fN,2,0,`p`,6),A(9,pN,5,2,`p`,6)),e&2){let e=W(),t=W();j(e.support.retention?-1:0),D(2),E_(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),D(4),q(t.retained().length),D(),j(t.retained().length?7:8),D(2),j(t.recent().length?9:-1)}}function hN(e,t){if(e&1&&(F(0,`p`,6),K(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),F(2,`span`,19),K(3),I(),K(4,`. `),I()),e&2){let e=W(2);D(3),q(e.names(e.detached()))}}function gN(e,t){if(e&1&&(F(0,`span`,8),K(1),I()),e&2){let e=W();D(),q(e.subscriptions.length)}}function _N(e,t){if(e&1&&(F(0,`span`,15),K(1),I()),e&2){let e=W().$implicit;D(),q(e.source)}}function vN(e,t){if(e&1&&(F(0,`li`,13)(1,`span`,14),K(2),I(),F(3,`span`,16),K(4),I(),F(5,`span`,18),K(6),I(),A(7,_N,2,1,`span`,15),I()),e&2){let e=t.$implicit;D(2),q(e.name),D(2),J(``,e.count,` open`),D(2),J(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),D(),j(e.source?7:-1)}}function yN(e,t){if(e&1&&(F(0,`p`,6),K(1,` Still open although the component that made them is gone. Tear them down with takeUntilDestroyed(), DestroyRef.onDestroy or the async pipe. `),I(),F(2,`ul`,12),M(3,vN,8,4,`li`,13,Qh),I()),e&2){let e=W(2),t=W();D(3),N(e.subscriptions.slice(0,t.shown))}}function bN(e,t){e&1&&(F(0,`p`,6),K(1,`No subscription is still open after its component went away.`),I())}function xN(e,t){e&1&&(F(0,`p`,6),K(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),I())}function SN(e,t){if(e&1&&(A(0,yN,5,0)(1,bN,2,0,`p`,6),A(2,xN,2,0,`p`,6)),e&2){let e=W();j(+!e.subscriptions.length),D(2),j(e.support.instances?-1:2)}}function CN(e,t){e&1&&(F(0,`p`,9),K(1,` Tracking could not start: the page has no RxJS the overlay can load. `),I())}function wN(e,t){e&1&&(F(0,`p`,6),K(1,` Off. Track subscriptions wraps Observable.prototype.subscribe on the page to record which component makes each subscription, until you stop it. Subscriptions made before you start are not seen, so reload or navigate again after starting. `),I())}function TN(e,t){e&1&&L(0,`app-angular-unavailable`,10),e&2&&P(`page`,W(2).angular())}function EN(e,t){if(e&1&&(F(0,`span`,16),K(1),I()),e&2){let e=W().$implicit,t=W(3);D(),q(t.plural(e.subscriptions,`subscription`))}}function DN(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,20),H(`click`,function(){let t=S(e).$implicit;return C(W(3).showComponent.emit(t.id))})(`focus`,function(){let t=S(e).$implicit;return C(W(3).highlight.emit(t.id))})(`blur`,function(){return S(e),C(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(3).highlight.emit(t.id))})(`mouseleave`,function(){return S(e),C(W(3).highlight.emit(null))}),F(2,`span`,14),K(3),I(),F(4,`span`,16),K(5),I(),A(6,EN,2,1,`span`,16),I()()}if(e&2){let e=t.$implicit,n=W(2),r=W();D(3),q(e.name),D(2),q(r.effectsText(e)),D(),j(n.support.subscriptions===`on`?6:-1)}}function ON(e,t){e&1&&(F(0,`p`,6),K(1,` Angular files a component's effects under the template its host sits in, so effects of components side by side in one template show as shared. `),I())}function kN(e,t){if(e&1&&(F(0,`ul`,12),M(1,DN,7,3,`li`,null,oN),I(),A(3,ON,2,0,`p`,6)),e&2){let e=W(),t=W();D(),N(e.components.slice(0,t.shown)),D(2),j(e.components.some(t.hasShared)?3:-1)}}function AN(e,t){e&1&&(F(0,`p`,6),K(1,`No component on the page has a live effect or a tracked subscription.`),I())}function jN(e,t){if(e&1&&(A(0,sN,6,1)(1,mN,10,7),A(2,hN,5,1,`p`,6),F(3,`h3`,7),K(4,` Open subscriptions after destroy `),A(5,gN,2,1,`span`,8),I(),A(6,SN,3,2)(7,CN,2,0,`p`,9)(8,wN,2,0,`p`,6),F(9,`h3`,7),K(10,` Live effects and subscriptions `),F(11,`span`,8),K(12),I()(),A(13,TN,1,1,`app-angular-unavailable`,10),A(14,kN,4,1)(15,AN,2,0,`p`,6)),e&2){let e,n=t,r=W();j(n.support.retention===`dev-di-debug`?0:1),D(2),j(r.detached().length?2:-1),D(3),j(n.support.subscriptions===`on`?5:-1),D(),j((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),D(6),q(n.components.length),D(),j(n.support.effects?-1:13),D(),j(n.components.length?14:15)}}function MN(e,t){e&1&&(F(0,`p`,6),K(1,`No leak data from this page yet. It comes with the next report.`),I())}var NN=20;function PN(e){let t=Math.max(0,Math.round(e/1e3));if(t<120)return`${t} s`;let n=Math.round(t/60);return n<120?`${n} min`:`${Math.round(n/60)} h`}var FN=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,IN=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=sv();highlight=sv();shown=NN;minNavigations=2;minSeconds=nw/1e3;plural=FN;busy=T(!1);announcement=T(``);tracking=X(()=>this.report()?.support.subscriptions===`on`);split=X(()=>{let e=this.report(),t=[],n=[],r=[];if(!e)return{retained:t,recent:n,detached:r};let i=e.support.retention===`dev-di-debug`;for(let a of e.destroyed)if(a.detached)r.push(a);else if(i)continue;else this.isRetained(e,a)?t.push(a):n.push(a);return{retained:t,recent:n,detached:r}});retained=X(()=>this.split().retained);recent=X(()=>this.split().recent);detached=X(()=>this.split().detached);ageMs(e,t){return Math.max(0,this.now()()-e.reportedAt+(e.at-t.destroyedAt))}isRetained(e,t){return t.navigations>=2&&this.ageMs(e,t)>=1e4}ageOf(e){let t=this.report();return t?`${PN(this.ageMs(t,e))} old`:``}names(e){let t=[...new Set(e.map(e=>e.name))];return t.length>6?`${t.slice(0,6).join(`, `)} and more`:t.join(`, `)}hasShared(e){return!!e.sharedEffects}effectsText(e){let t=FN(e.effects,`effect`);return e.sharedEffects?`${t}, ${e.sharedEffects} shared`:t}async toggle(){let e=this.pageId();if(!e||this.busy())return;let t=!this.tracking();this.busy.set(!0);try{await sT(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=O({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&&(F(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Leaks`),I(),F(4,`button`,3),H(`click`,function(){return t.toggle()}),K(5,` Track subscriptions `),I(),F(6,`p`,4),K(7),I()(),F(8,`p`,5),K(9,` Components that left the page but are still in memory, and the live effects and RxJS subscriptions of each component. The browser collects garbage when it decides, so a retained instance is a hint: check what holds it in the Chrome DevTools Memory panel. `),I(),A(10,jN,16,7)(11,MN,2,0,`p`,6),I()),e&2){let e;D(4),P(`disabled`,!t.pageId()||!t.report()),k(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),D(3),q(t.announcement()),D(3),j((e=t.report())?10:11,e)}},dependencies:[fD],styles:[`[_nghost-%COMP%] { display: block; } @@ -2787,7 +2787,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); -}`]})},WN=12,GN=900;function KN(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 qN=class{options;injector=x(bs);visibleTop=T(0);viewport=T(GN);rowHeight;host=null;scroller=null;detach=null;enabled;range;padTop;padBottom;constructor(e){this.options=e,this.rowHeight=T(e.estimate);let t=e.min??300;this.enabled=X(()=>e.count()>t),this.range=X(()=>{let t=e.count();if(!this.enabled())return{start:0,end:t};let n=this.rowHeight(),r=this.viewport(),i=Math.max(0,Math.min(this.visibleTop(),t*n-r)),a=Math.max(0,Math.min(t-1,Math.floor(i/n)-WN));return{start:a,end:Math.min(t,Math.max(a,Math.ceil((i+r)/n)+WN))}}),this.padTop=X(()=>this.enabled()?this.range().start*this.rowHeight():0),this.padBottom=X(()=>this.enabled()?(e.count()-this.range().end)*this.rowHeight():0),E(()=>{e.count(),cd(()=>this.update(),{injector:this.injector})}),x(Ss).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:GN)}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&&cd(t,{injector:this.injector})}};function JN(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 YN=e=>{let t=parseFloat(e);return Number.isFinite(t)?t:0};function XN(e,t=8){let n=e.ownerDocument.defaultView;if(!n)return e.offsetHeight+t;let r=JN(e),i=r?n.getComputedStyle(r):null,a=i?YN(i.paddingTop):0,o=i?YN(i.scrollPaddingTop):0,s=YN(n.getComputedStyle(e).top);return Math.max(0,Math.ceil(a+s+e.offsetHeight+t-o))}function ZN(e,t,n=8){let r=JN(e),i=t.getBoundingClientRect().bottom+n-e.getBoundingClientRect().top;i<=0||(r?r.scrollTop-=i:e.ownerDocument.defaultView?.scrollBy(0,-i))}var QN=[`input`];function $N(e,t){if(e&1){let e=B();R(0,`button`,9),U(`click`,function(){return S(e),C(W().save())}),w(),R(1,`svg`,10),fg(2,`path`,11),z(),fs(),R(3,`span`,12),K(4,`Save`),z()()}e&2&&k(`aria-label`,`Save filter `+W().query())}function eP(e,t){if(e&1){let e=B();R(0,`li`,14)(1,`button`,15),U(`click`,function(){let t=S(e).$implicit;return C(W(2).apply(t))}),K(2),z(),R(3,`button`,16),U(`click`,function(){let t=S(e).$implicit;return C(W(2).remove(t))}),w(),R(4,`svg`,10),fg(5,`path`,17),z()()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,e===n.query()),D(),k(`aria-pressed`,e===n.query())(`title`,e),D(),J(` `,e,` `),D(),k(`aria-label`,`Remove saved filter `+e)}}function tP(e,t){if(e&1&&(R(0,`ul`,7),M(1,eP,6,6,`li`,13,tg),z()),e&2){let e=W();D(),N(e.saved())}}function nP(e,t){if(e&1&&(R(0,`span`,8),K(1),z()),e&2){let e=W();D(),q(e.announcement())}}var rP=`pangular-pref:filters`,iP=200;function aP(e){try{let t=localStorage.getItem(`${rP}:${e}`),n=t?JSON.parse(t):[];if(!Array.isArray(n))return[];let r=n.filter(e=>typeof e==`string`&&!!e.trim()&&e.length<=iP);return[...new Set(r)].slice(-8)}catch{return[]}}function oP(e,t){try{t.length?localStorage.setItem(`${rP}:${e}`,JSON.stringify(t)):localStorage.removeItem(`${rP}:${e}`)}catch{}}var sP=class e{value=mv(``);label=$(`Filter`);placeholder=$(`Filter`);inputId=$(null);describedBy=$(null);saveKey=$(null);input=gv.required(`input`);host=x(Ml);injector=x(bs);announcement=T(``);query=X(()=>this.value().trim());saved=Q(()=>{let e=this.saveKey();return e?aP(e):[]});canSave=X(()=>{let e=this.query();return!!this.saveKey()&&!!e&&e.length<=iP&&!this.saved().includes(e)&&this.saved().length<8});focus(){this.input().nativeElement.focus()}clear(e){this.value()&&(e.preventDefault(),e.stopPropagation(),this.value.set(``))}save(){let e=this.saveKey(),t=this.query();if(!e||!this.canSave())return;let n=[...this.saved(),t];this.saved.set(n),oP(e,n),this.say(`Filter ${t} saved.`),this.focusAfterRender(`.chip:last-child .apply`)}apply(e){this.value.set(this.query()===e?``:e)}remove(e){let t=this.saveKey();if(!t)return;let n=this.saved().indexOf(e),r=this.saved().filter(t=>t!==e);if(this.saved.set(r),oP(t,r),this.say(`Saved filter ${e} removed.`),!r.length){this.focus();return}let i=Math.min(n,r.length-1)+1;this.focusAfterRender(`.chip:nth-child(${i}) .apply`)}focusAfterRender(e){cd(()=>{let t=this.host.nativeElement.querySelector(e);t?t.focus():this.focus()},{injector:this.injector})}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-search-field`]],viewQuery:function(e,t){e&1&&Ng(t.input,QN,5),e&2&&Pg()},inputs:{value:[1,`value`],label:[1,`label`],placeholder:[1,`placeholder`],inputId:[1,`inputId`],describedBy:[1,`describedBy`],saveKey:[1,`saveKey`]},outputs:{value:`valueChange`},decls:9,vars:8,consts:[[`input`,``],[1,`box`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`placeholder`,`value`],[`type`,`button`,1,`save`],[`aria-label`,`Saved filters`,1,`chips`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`save`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M6 4h12v16l-6-4-6 4z`],[1,`save-text`],[1,`chip`,3,`active`],[1,`chip`],[`type`,`button`,1,`apply`,3,`click`],[`type`,`button`,1,`remove`,3,`click`],[`d`,`M7 7l10 10M17 7 7 17`]],template:function(e,t){e&1&&(R(0,`div`,1),w(),R(1,`svg`,2),fg(2,`circle`,3)(3,`path`,4),z(),fs(),R(4,`input`,5,0),U(`input`,function(e){return t.value.set(e.target.value)})(`keydown.escape`,function(e){return t.clear(e)}),z()(),A(6,$N,5,1,`button`,6),A(7,tP,3,0,`ul`,7),A(8,nP,2,1,`span`,8)),e&2&&(D(4),V(`placeholder`,t.placeholder())(`value`,t.value()),k(`id`,t.inputId())(`aria-label`,t.label())(`aria-describedby`,t.describedBy()),D(2),j(t.canSave()?6:-1),D(),j(t.saveKey()&&t.saved().length?7:-1),D(),j(t.saveKey()?8:-1))},styles:[`[_nghost-%COMP%] { +}`]})},LN=12,RN=900;function zN(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 BN=class{options;injector=x(ys);visibleTop=T(0);viewport=T(RN);rowHeight;host=null;scroller=null;detach=null;enabled;range;padTop;padBottom;constructor(e){this.options=e,this.rowHeight=T(e.estimate);let t=e.min??300;this.enabled=X(()=>e.count()>t),this.range=X(()=>{let t=e.count();if(!this.enabled())return{start:0,end:t};let n=this.rowHeight(),r=this.viewport(),i=Math.max(0,Math.min(this.visibleTop(),t*n-r)),a=Math.max(0,Math.min(t-1,Math.floor(i/n)-LN));return{start:a,end:Math.min(t,Math.max(a,Math.ceil((i+r)/n)+LN))}}),this.padTop=X(()=>this.enabled()?this.range().start*this.rowHeight():0),this.padBottom=X(()=>this.enabled()?(e.count()-this.range().end)*this.rowHeight():0),E(()=>{e.count(),sd(()=>this.update(),{injector:this.injector})}),x(xs).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:RN)}measure(){let e=this.host?.querySelectorAll(`[data-vindex]`);if(!e||e.length<2)return;let t=e[0].getBoundingClientRect(),n=(e[e.length-1].getBoundingClientRect().bottom-t.top)/e.length;n>4&&Math.abs(n-this.rowHeight())>1&&this.rowHeight.set(n)}reveal(e,t){if(this.enabled()&&!this.rendered(e)){let t=e*this.rowHeight(),n=this.viewport(),r=Math.max(0,t-n/2);if(this.place(r,n),this.host&&this.scroller===this.host)this.host.scrollTop=r;else if(this.host){let e=this.scroller?this.scroller.getBoundingClientRect().top:0,t=this.host.getBoundingClientRect().top-e+r;this.scroller?this.scroller.scrollTop+=t:window.scrollBy(0,t)}}t&&sd(t,{injector:this.injector})}};function VN(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 HN=e=>{let t=parseFloat(e);return Number.isFinite(t)?t:0};function UN(e,t=8){let n=e.ownerDocument.defaultView;if(!n)return e.offsetHeight+t;let r=VN(e),i=r?n.getComputedStyle(r):null,a=i?HN(i.paddingTop):0,o=i?HN(i.scrollPaddingTop):0,s=HN(n.getComputedStyle(e).top);return Math.max(0,Math.ceil(a+s+e.offsetHeight+t-o))}function WN(e,t,n=8){let r=VN(e),i=t.getBoundingClientRect().bottom+n-e.getBoundingClientRect().top;i<=0||(r?r.scrollTop-=i:e.ownerDocument.defaultView?.scrollBy(0,-i))}var GN=[`input`];function KN(e,t){if(e&1){let e=B();R(0,`button`,9),U(`click`,function(){return S(e),C(W().save())}),w(),R(1,`svg`,10),ug(2,`path`,11),z(),ds(),R(3,`span`,12),K(4,`Save`),z()()}e&2&&k(`aria-label`,`Save filter `+W().query())}function qN(e,t){if(e&1){let e=B();R(0,`li`,14)(1,`button`,15),U(`click`,function(){let t=S(e).$implicit;return C(W(2).apply(t))}),K(2),z(),R(3,`button`,16),U(`click`,function(){let t=S(e).$implicit;return C(W(2).remove(t))}),w(),R(4,`svg`,10),ug(5,`path`,17),z()()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,e===n.query()),D(),k(`aria-pressed`,e===n.query())(`title`,e),D(),J(` `,e,` `),D(),k(`aria-label`,`Remove saved filter `+e)}}function JN(e,t){if(e&1&&(R(0,`ul`,7),M(1,qN,6,6,`li`,13,$h),z()),e&2){let e=W();D(),N(e.saved())}}function YN(e,t){if(e&1&&(R(0,`span`,8),K(1),z()),e&2){let e=W();D(),q(e.announcement())}}var XN=`pangular-pref:filters`,ZN=200;function QN(e){try{let t=localStorage.getItem(`${XN}:${e}`),n=t?JSON.parse(t):[];if(!Array.isArray(n))return[];let r=n.filter(e=>typeof e==`string`&&!!e.trim()&&e.length<=ZN);return[...new Set(r)].slice(-8)}catch{return[]}}function $N(e,t){try{t.length?localStorage.setItem(`${XN}:${e}`,JSON.stringify(t)):localStorage.removeItem(`${XN}:${e}`)}catch{}}var eP=class e{value=fv(``);label=$(`Filter`);placeholder=$(`Filter`);inputId=$(null);describedBy=$(null);saveKey=$(null);input=mv.required(`input`);host=x(jl);injector=x(ys);announcement=T(``);query=X(()=>this.value().trim());saved=Q(()=>{let e=this.saveKey();return e?QN(e):[]});canSave=X(()=>{let e=this.query();return!!this.saveKey()&&!!e&&e.length<=ZN&&!this.saved().includes(e)&&this.saved().length<8});focus(){this.input().nativeElement.focus()}clear(e){this.value()&&(e.preventDefault(),e.stopPropagation(),this.value.set(``))}save(){let e=this.saveKey(),t=this.query();if(!e||!this.canSave())return;let n=[...this.saved(),t];this.saved.set(n),$N(e,n),this.say(`Filter ${t} saved.`),this.focusAfterRender(`.chip:last-child .apply`)}apply(e){this.value.set(this.query()===e?``:e)}remove(e){let t=this.saveKey();if(!t)return;let n=this.saved().indexOf(e),r=this.saved().filter(t=>t!==e);if(this.saved.set(r),$N(t,r),this.say(`Saved filter ${e} removed.`),!r.length){this.focus();return}let i=Math.min(n,r.length-1)+1;this.focusAfterRender(`.chip:nth-child(${i}) .apply`)}focusAfterRender(e){sd(()=>{let t=this.host.nativeElement.querySelector(e);t?t.focus():this.focus()},{injector:this.injector})}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-search-field`]],viewQuery:function(e,t){e&1&&jg(t.input,GN,5),e&2&&Mg()},inputs:{value:[1,`value`],label:[1,`label`],placeholder:[1,`placeholder`],inputId:[1,`inputId`],describedBy:[1,`describedBy`],saveKey:[1,`saveKey`]},outputs:{value:`valueChange`},decls:9,vars:8,consts:[[`input`,``],[1,`box`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`placeholder`,`value`],[`type`,`button`,1,`save`],[`aria-label`,`Saved filters`,1,`chips`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`save`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M6 4h12v16l-6-4-6 4z`],[1,`save-text`],[1,`chip`,3,`active`],[1,`chip`],[`type`,`button`,1,`apply`,3,`click`],[`type`,`button`,1,`remove`,3,`click`],[`d`,`M7 7l10 10M17 7 7 17`]],template:function(e,t){e&1&&(R(0,`div`,1),w(),R(1,`svg`,2),ug(2,`circle`,3)(3,`path`,4),z(),ds(),R(4,`input`,5,0),U(`input`,function(e){return t.value.set(e.target.value)})(`keydown.escape`,function(e){return t.clear(e)}),z()(),A(6,KN,5,1,`button`,6),A(7,JN,3,0,`ul`,7),A(8,YN,2,1,`span`,8)),e&2&&(D(4),V(`placeholder`,t.placeholder())(`value`,t.value()),k(`id`,t.inputId())(`aria-label`,t.label())(`aria-describedby`,t.describedBy()),D(2),j(t.canSave()?6:-1),D(),j(t.saveKey()&&t.saved().length?7:-1),D(),j(t.saveKey()?8:-1))},styles:[`[_nghost-%COMP%] { display: flex; flex: 1 1 220px; flex-wrap: wrap; @@ -2955,7 +2955,7 @@ input[_ngcontent-%COMP%]:focus { .save[_ngcontent-%COMP%] { transition: none; } -}`]})},cP=[`[redacted]`,`[email]`],lP=2e4;function uP(e){let t=0;for(let n of cP)for(let r=e.indexOf(n);r>=0;r=e.indexOf(n,r+n.length))t++;return t}function dP(e,t=lP){let n=0,r=t,i=new Set,a=[e];for(;a.length;){let e=a.pop();if(typeof e==`string`){if(--r<0)return{count:n,capped:!0};n+=uP(e);continue}if(typeof e==`object`&&e&&!i.has(e)){if(i.add(e),Array.isArray(e)){for(let t of e)a.push(t);continue}for(let[t,i]of Object.entries(e)){if(--r<0)return{count:n,capped:!0};n+=uP(t),a.push(i)}}}return{count:n,capped:!1}}function fP(e,t){if(e&1&&(R(0,`p`,0),K(1),R(2,`span`,1),K(3),z()()),e&2){let e=W();D(),O_(` `,e.result().capped?`At least `:``,``,e.result().count,` `,e.result().count===1?`value`:`values`,` masked `),D(2),q(e.why())}}var pP=class e{value=$(void 0);why=$(`by redaction (secret names, tokens and emails).`);result=X(()=>dP(this.value()));static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-redaction-count`]],inputs:{value:[1,`value`],why:[1,`why`]},decls:1,vars:1,consts:[[`data-redaction-count`,``,1,`count`],[1,`why`]],template:function(e,t){e&1&&A(0,fP,4,4,`p`,0),e&2&&j(t.result().count>0?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},tP=[`[redacted]`,`[email]`],nP=2e4;function rP(e){let t=0;for(let n of tP)for(let r=e.indexOf(n);r>=0;r=e.indexOf(n,r+n.length))t++;return t}function iP(e,t=nP){let n=0,r=t,i=new Set,a=[e];for(;a.length;){let e=a.pop();if(typeof e==`string`){if(--r<0)return{count:n,capped:!0};n+=rP(e);continue}if(typeof e==`object`&&e&&!i.has(e)){if(i.add(e),Array.isArray(e)){for(let t of e)a.push(t);continue}for(let[t,i]of Object.entries(e)){if(--r<0)return{count:n,capped:!0};n+=rP(t),a.push(i)}}}return{count:n,capped:!1}}function aP(e,t){if(e&1&&(R(0,`p`,0),K(1),R(2,`span`,1),K(3),z()()),e&2){let e=W();D(),E_(` `,e.result().capped?`At least `:``,``,e.result().count,` `,e.result().count===1?`value`:`values`,` masked `),D(2),q(e.why())}}var oP=class e{value=$(void 0);why=$(`by redaction (secret names, tokens and emails).`);result=X(()=>iP(this.value()));static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-redaction-count`]],inputs:{value:[1,`value`],why:[1,`why`]},decls:1,vars:1,consts:[[`data-redaction-count`,``,1,`count`],[1,`why`]],template:function(e,t){e&1&&A(0,aP,4,4,`p`,0),e&2&&j(t.result().count>0?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -2969,7 +2969,7 @@ input[_ngcontent-%COMP%]:focus { .why[_ngcontent-%COMP%] { color: var(--%NS%text-2); -}`]})},mP=[`filterInput`],hP=[`treeEl`],gP=[`propFilterInput`],_P=()=>[],vP=e=>({$implicit:e}),yP=e=>({kind:`component`,id:e}),bP=(e,t)=>t.row.node.id,xP=(e,t)=>t.outlet+t.route,SP=(e,t)=>t+e;function CP(e,t){return this.sourceKey(t)}var wP=(e,t)=>t.formId,TP=(e,t)=>t.name+t.index,EP=(e,t)=>t.name,DP=(e,t)=>t.id,OP=(e,t)=>t.token+e;function kP(e,t){if(e&1){let e=B();F(0,`span`,38),K(1,`Page`),I(),F(2,`app-select`,39),H(`valueChange`,function(t){return S(e),C(W(2).selectPage(t))}),I()}if(e&2){let e=W(2);D(2),P(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function AP(e,t){if(e&1){let e=B();F(0,`button`,40),H(`click`,function(){return S(e),C(W(2).toggleDirectiveHosts())}),w(),F(1,`svg`,12),L(2,`path`,41)(3,`path`,42),I(),fs(),F(4,`span`,15),K(5,`Directive hosts`),I()()}e&2&&k(`aria-pressed`,W(2).showDirectiveHosts())}function jP(e,t){if(e&1&&(F(0,`p`,22),K(1),I()),e&2){let e=W(2);D(),q(e.pickMessage())}}function MP(e,t){if(e&1&&(F(0,`p`,23),K(1),I()),e&2){let e=W(2);D(),q(e.truncationText())}}function NP(e,t){e&1&&(F(0,`p`,44),K(1,`The filter only searches the components the tree lists.`),I())}function PP(e,t){e&1&&(F(0,`p`,44),K(1,`Directive hosts are hidden, so they are not searched.`),I())}function FP(e,t){if(e&1){let e=B();F(0,`div`,27)(1,`p`,43),K(2),I(),A(3,NP,2,0,`p`,44),A(4,PP,2,0,`p`,44),F(5,`button`,45),H(`click`,function(){return S(e),C(W(2).clearFilter())}),K(6,`Clear filters`),I()()}if(e&2){let e=W(2);D(2),J(`No components match “`,e.filter().trim(),`”`),D(),j(e.page().truncated?3:-1),D(),j(!e.showDirectiveHosts()&&e.page().directiveHostCount?4:-1)}}function IP(e,t){if(e&1&&(F(0,`p`,28),K(1),I()),e&2){let e=W(2);D(),J(` `,e.rows().length,` rows. Rows render as you scroll, so the browser's find only sees the ones near view; the filter above searches them all. `)}}function LP(e,t){if(e&1){let e=B();F(0,`span`,53),H(`click`,function(t){S(e),W();let n=L_(0);return C(W(2).toggle(n.node.id,t))}),w(),F(1,`svg`,54),L(2,`path`,55),I()()}e&2&&(W(),G(`open`,L_(0).expanded))}function RP(e,t){e&1&&L(0,`span`,48)}function zP(e,t){if(e&1&&(F(0,`span`,56),K(1),I(),F(2,`span`,57),K(3),I(),F(4,`span`,26),K(5,`directive host`),I()),e&2){W();let e=L_(0),t=W(2);D(),J(`<`,e.node.tag,`>`),D(),k(`title`,e.node.directives?.join(`, `)),D(),q(t.hostLabel(e.node))}}function BP(e,t){if(e&1&&(F(0,`span`,58),K(1),I(),F(2,`span`,59),K(3),I()),e&2){W();let e=L_(0);k(`title`,e.node.name),D(),q(e.node.name),D(),k(`title`,`<`+e.node.tag+`>`),D(),J(`<`,e.node.tag,`>`)}}function VP(e,t){if(e&1&&(F(0,`span`)(1,`span`,26),K(2,`Hydration: `),I(),K(3),I()),e&2){let e=t,n=W(3);r_(`hyd hyd-`+e),D(3),q(n.hydrationText(e))}}function HP(e,t){if(e&1&&(F(0,`span`,50),K(1),I()),e&2){let e=t.$implicit;D(),q(e.route||`/`)}}function UP(e,t){if(e&1&&(F(0,`span`,51),K(1),F(2,`span`,26),K(3),I()()),e&2){let e=t;D(),J(` `,e),D(2),J(` `,e===1?`check`:`checks`,` while recording`)}}function WP(e,t){if(e&1&&(F(0,`span`,52),K(1),F(2,`span`,26),K(3),I()()),e&2){W();let e=L_(0);k(`title`,e.node.directives.join(`, `)),D(),J(` +`,e.node.directives.length,` `),D(2),J(` `,e.node.directives.length===1?`directive`:`directives`,` `)}}function GP(e,t){if(e&1){let e=B();F_(0),F(1,`div`,46),H(`click`,function(){S(e);let t=L_(0);return C(W(2).select(t.node.id))})(`focus`,function(t){S(e);let n=L_(0),r=W(2);return r.focusId.set(n.node.id),r.highlight(n.node.id),C(r.showNameTip(t))})(`blur`,function(){S(e);let t=W(2);return t.highlight(null),C(t.nameTip.set(null))})(`keydown.escape`,function(){return S(e),C(W(2).nameTip.set(null))})(`mouseenter`,function(){S(e);let t=L_(0);return C(W(2).highlight(t.node.id))})(`mouseleave`,function(){return S(e),C(W(2).highlight(null))}),A(2,LP,3,2,`span`,47)(3,RP,1,0,`span`,48),A(4,zP,6,3)(5,BP,4,4),A(6,VP,4,3,`span`,49),M(7,HP,2,1,`span`,50,xP),A(9,UP,4,2,`span`,51),A(10,WP,4,3,`span`,52),I()}if(e&2){let e,n,r=t.$implicit,i=W(2),a=I_(r.row);D(),n_(`--%NS%depth`,a.depth),G(`selected`,i.selectedId()===a.node.id)(`dir-host`,a.node.kind===`directive`),k(`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),D(),j(a.hasChildren?2:3),D(2),j(a.node.kind===`directive`?4:5),D(2),j((e=a.node.hydration)?6:-1,e),D(),N(i.routedById().get(a.node.id)??K_(20,_P)),D(2),j((n=i.cdHosts()[a.node.id])?9:-1,n),D(),j(a.node.kind!==`directive`&&a.node.directives?.length?10:-1)}}function KP(e,t){if(e&1&&(F(0,`div`,60),K(1),I()),e&2){let e=t;n_(`top`,e.top,`px`),D(),J(` `,e.text,` `)}}function qP(e,t){if(e&1&&(F(0,`li`,68),K(1),gg(2,71),I()),e&2){let e=t.$implicit;W(3);let n=Fg(3);D(),J(` `,e,` `),D(),P(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,q_(3,vP,e))}}function JP(e,t){if(e&1){let e=B();F(0,`div`,70)(1,`button`,45),H(`click`,function(){let t=S(e);return C(W(3).reveal(t.id,!0))}),K(2),I()()}e&2&&(D(2),J(` Show `,t.name,` `))}function YP(e,t){if(e&1&&(F(0,`section`,32)(1,`header`,61)(2,`span`,62),K(3,`directive host`),I(),F(4,`h2`,63),K(5),I(),F(6,`span`,64),K(7),I()(),F(8,`div`,65)(9,`h3`),K(10,` Directives `),F(11,`span`,66),K(12),I()(),F(13,`ul`,67),M(14,qP,3,5,`li`,68,SP),I()(),F(16,`div`,65)(17,`p`,69),K(18,` This element hosts directives but no component. Their inputs are bound in the template of the component that renders it. `),I(),A(19,JP,3,1,`div`,70),I()()),e&2){let e,n=t,r=W(2);D(5),J(`<`,n.tag,`>`),D(2),q(r.hostLabel(n)),D(5),q(n.directives?.length??0),D(2),N(n.directives??K_(4,_P)),D(5),j((e=r.ownerOf(n.id))?19:-1,e)}}function XP(e,t){if(e&1&&(F(0,`p`,72),L(1,`app-source-link`,76),I()),e&2){let e=t;D(),P(`file`,e.file)(`line`,e.line)}}function ZP(e,t){if(e&1&&(F(0,`p`,77)(1,`span`,79),K(2,`Likely`),I(),F(3,`span`,26),K(4,`, matched by class name: `),I(),L(5,`app-source-link`,76),I()),e&2){W();let e=L_(0);P(`title`,W(3).guessTitle),D(5),P(`file`,e[0].file)(`line`,e[0].line)}}function QP(e,t){if(e&1&&(F(0,`li`),L(1,`app-source-link`,76),I()),e&2){let e=t.$implicit;D(),P(`file`,e.file)(`line`,e.line)}}function $P(e,t){if(e&1&&(F(0,`div`,78)(1,`p`,80)(2,`span`,79),K(3,`Not certain`),I(),K(4),I(),F(5,`ul`,81),M(6,QP,2,2,`li`,null,CP,!0),I()()),e&2){W();let e=L_(0),t=W(),n=W(2);P(`title`,n.guessTitle),D(4),Y(` `,e.length,` source files define `,n.bareName(t.name),`: `),D(2),N(e)}}function eF(e,t){if(e&1&&(F_(0),A(1,ZP,6,3,`p`,77)(2,$P,8,3,`div`,78)),e&2){let e=W(),t=I_(W(2).sourceCandidates(e));D(),j(t.length===1?1:t.length>1?2:-1)}}function tF(e,t){if(e&1){let e=B();F(0,`div`,82)(1,`button`,45),H(`click`,function(){S(e);let t=W();return C(W(2).revealInElements(t))}),K(2,`Reveal in Elements`),I(),F(3,`button`,45),H(`click`,function(){S(e);let t=W();return C(W(2).openSource(t))}),K(4,`Open source`),I()(),F(5,`p`,83),K(6),I()}if(e&2){let e=W(3);D(6),q(e.actionMessage())}}function nF(e,t){if(e&1){let e=B();F(0,`button`,85),H(`click`,function(){let t=S(e).$implicit;return C(W(5).showForm.emit(t.formId))}),K(1),I()}if(e&2){let e=t.$implicit;D(),J(` Show `,e.label,` in Forms `)}}function rF(e,t){if(e&1&&(F(0,`div`,73),M(1,nF,2,1,`button`,84,wP),I()),e&2){let e=W(),t=W(3);D(),N(t.formsIn(e.file))}}function iF(e,t){e&1&&A(0,rF,3,0,`div`,73),e&2&&j(W(3).formsIn(t.file).length?0:-1)}function aF(e,t){if(e&1){let e=B();F(0,`button`,45),H(`click`,function(){S(e);let t=W(2);return C(W(2).openInjector(t))}),K(1,` Show in Injectors `),F(2,`span`,26),K(3),I()()}if(e&2){let e=W(2);D(3),J(`: `,e.name)}}function oF(e,t){if(e&1){let e=B();F(0,`button`,45),H(`click`,function(){S(e);let t=W(2);return C(W(2).openSignals(t))}),K(1,` Show in Signals `),F(2,`span`,26),K(3),I()()}if(e&2){let e=W(2);D(3),J(`: `,e.name)}}function sF(e,t){if(e&1&&(F(0,`div`,73),A(1,aF,4,1,`button`,86),A(2,oF,4,1,`button`,86),I()),e&2){let e=W(3);D(),j(e.canShowInjector()?1:-1),D(),j(e.canShowSignals()?2:-1)}}function cF(e,t){if(e&1){let e=B();F(0,`div`,87)(1,`button`,45),H(`click`,function(){let t=S(e);return C(W(3).copyJson(t))}),K(2,`Copy as JSON`),I(),F(3,`button`,45),H(`click`,function(){let t=S(e);return C(W(3).copyHostPath(t))}),K(4,`Copy host path`),I()(),F(5,`p`,83),K(6),I()}if(e&2){let e=W(3);D(6),q(e.copyMessage())}}function lF(e,t){if(e&1&&L(0,`app-store-global`,74),e&2){let e=W(),t=W(2);P(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`target`,q_(4,yP,e.id))(`label`,e.name)}}function uF(e,t){if(e&1&&(F(0,`dt`),K(1,`Routed`),I(),F(2,`dd`,89),K(3),I()),e&2){let e=t.$implicit;D(3),Y(``,e.route||`/`,` in outlet `,e.outlet)}}function dF(e,t){if(e&1&&(F(0,`span`,8),K(1),I()),e&2){let e=W(4);D(),Y(``,e.shownValues()?.count??0,` of `,e.valueTotal())}}function fF(e,t){if(e&1){let e=B();F(0,`div`,95)(1,`p`,43),K(2),I(),F(3,`p`,44),K(4,` The filter searches names, and the nested keys of values you opened. `),I(),F(5,`button`,45),H(`click`,function(){return S(e),C(W(5).clearPropFilter())}),K(6,`Clear filters`),I()()}if(e&2){let e=W(5);D(2),J(` No inputs, outputs or properties match “`,e.propFilter().trim(),`” `)}}function pF(e,t){if(e&1&&(F(0,`span`,100),K(1),I()),e&2){let e=W().$implicit;D(),J(`(`,e.prop,`)`)}}function mF(e,t){if(e&1&&(F(0,`li`,98)(1,`span`,99),K(2),A(3,pF,2,1,`span`,100),I(),L(4,`app-value-tree`,101),I()),e&2){let e=t.$implicit,n=W(4),r=W(3);G(`changed`,r.flashed(`input`,e.name)),D(2),J(` `,e.name,` `),D(),j(e.prop===e.name?-1:3),D(),P(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function hF(e,t){if(e&1&&(F(0,`ul`,96),M(1,mF,5,11,`li`,97,EP),I()),e&2){let e=W(2);D(),N(e.inputs)}}function gF(e,t){e&1&&(F(0,`p`,69),K(1,`No inputs.`),I())}function _F(e,t){if(e&1&&(F(0,`div`,65)(1,`h3`),K(2,` Inputs `),F(3,`span`,66),K(4),I()(),A(5,hF,3,0,`ul`,96)(6,gF,2,0,`p`,69),I()),e&2){let e=W();D(4),q(e.inputs.length),D(),j(e.inputs.length?5:6)}}function vF(e,t){if(e&1&&(F(0,`li`,103)(1,`span`,89),K(2),I(),F(3,`span`,104),K(4),I()()),e&2){let e=t.$implicit;G(`on`,e.listened),D(2),q(e.name),D(2),q(e.listened?`listened`:`no listener`)}}function yF(e,t){if(e&1&&(F(0,`ul`,67),M(1,vF,5,4,`li`,102,EP),I()),e&2){let e=W(2);D(),N(e.outputs)}}function bF(e,t){e&1&&(F(0,`p`,69),K(1,`No outputs.`),I())}function xF(e,t){if(e&1&&(F(0,`div`,65)(1,`h3`),K(2,` Outputs `),F(3,`span`,66),K(4),I()(),A(5,yF,3,0,`ul`,67)(6,bF,2,0,`p`,69),I()),e&2){let e=W();D(4),q(e.outputs.length),D(),j(e.outputs.length?5:6)}}function SF(e,t){if(e&1&&(F(0,`span`,105),K(1),I()),e&2){let e=W().$implicit;D(),q(e.kind)}}function CF(e,t){if(e&1){let e=B();F(0,`button`,107),H(`click`,function(){S(e);let t=W().$implicit,n=W(5);return C(W(2).openSignals(n,t.prop))}),K(1,` Show in Signals`),F(2,`span`,26),K(3),I()()}if(e&2){let e=W().$implicit;D(3),J(`: `,e.name)}}function wF(e,t){if(e&1&&(F(0,`li`,98)(1,`span`,99),K(2),A(3,SF,2,1,`span`,105),A(4,CF,4,1,`button`,106),I(),L(5,`app-value-tree`,101),I()),e&2){let e=t.$implicit,n=W(4),r=W(3);G(`changed`,r.flashed(`property`,e.name)),D(2),J(` `,e.name,` `),D(),j(e.kind?3:-1),D(),j(e.kind===`signal`&&r.canShowSignals()&&!r.staticReport()?4:-1),D(),P(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function TF(e,t){if(e&1&&(F(0,`ul`,96),M(1,wF,6,12,`li`,97,EP),I()),e&2){let e=W(2);D(),N(e.properties)}}function EF(e,t){e&1&&(F(0,`p`,69),K(1,`No other properties.`),I())}function DF(e,t){if(e&1&&(F(0,`div`,65)(1,`h3`),K(2,` Properties `),F(3,`span`,66),K(4),I()(),A(5,TF,3,0,`ul`,96)(6,EF,2,0,`p`,69),I()),e&2){let e=W();D(4),q(e.properties.length),D(),j(e.properties.length?5:6)}}function OF(e,t){if(e&1&&(F(0,`li`,68),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function kF(e,t){if(e&1&&(F(0,`div`,65)(1,`h3`),K(2,` DOM listeners `),F(3,`span`,66),K(4),I()(),F(5,`ul`,67),M(6,OF,2,1,`li`,68,tg),I()()),e&2){let e=W(2);D(4),q(e.listeners.length),D(2),N(e.listeners)}}function AF(e,t){if(e&1&&(F(0,`li`,103)(1,`span`,89),K(2),I(),F(3,`span`,104),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.state),D(2),q(e.triggers.join(`, `)||`no triggers`)}}function jF(e,t){if(e&1&&(F(0,`div`,65)(1,`h3`),K(2,` Defer blocks `),F(3,`span`,66),K(4),I()(),F(5,`ul`,67),M(6,AF,5,2,`li`,103,DP),I()()),e&2){let e=W(5);D(4),q(e.ownedDeferBlocks().length),D(2),N(e.ownedDeferBlocks())}}function MF(e,t){if(e&1&&(F(0,`li`,98)(1,`span`,99),K(2),I(),L(3,`app-value-tree`,109),I()),e&2){let e=t.$implicit,n=W(2).$implicit,r=W(2),i=W(3);G(`changed`,i.flashed(`directive`,e.name,n.index)),D(2),q(e.name),D(),P(`prop`,e)(`store`,i.values)(`query`,i.propFilter())(`directive`,n.index)(`componentId`,r.id)(`pageId`,i.page()?.pageId??null)(`rpc`,i.rpc())}}function NF(e,t){if(e&1&&(F(0,`ul`,96),M(1,MF,4,10,`li`,97,EP),I()),e&2){let e=W().$implicit;D(),N(e.inputs)}}function PF(e,t){if(e&1&&(F(0,`li`,103)(1,`span`,89),K(2),I(),F(3,`span`,104),K(4),I()()),e&2){let e=t.$implicit;G(`on`,e.listened),D(2),q(e.name),D(2),q(e.listened?`listened`:`no listener`)}}function FF(e,t){if(e&1&&(F(0,`ul`,67),M(1,PF,5,4,`li`,102,EP),I()),e&2){let e=W().$implicit;D(),N(e.outputs)}}function IF(e,t){e&1&&(F(0,`p`,69),K(1,`No inputs or outputs.`),I())}function LF(e,t){if(e&1&&(F(0,`div`,65)(1,`h3`)(2,`span`,89),K(3),I(),F(4,`span`,105),K(5,`directive on host`),I()(),F(6,`p`,108),gg(7,71),I(),A(8,NF,3,0,`ul`,96),A(9,FF,3,0,`ul`,67),A(10,IF,2,0,`p`,69),I()),e&2){let e=t.$implicit;W(5);let n=Fg(3);D(3),q(e.name),D(4),P(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,q_(6,vP,e.name)),D(),j(e.inputs.length?8:-1),D(),j(e.outputs.length?9:-1),D(),j(!e.inputs.length&&!e.outputs.length?10:-1)}}function RF(e,t){if(e&1&&(L(0,`app-redaction-count`,94),A(1,fF,7,1,`div`,95),A(2,_F,7,2,`div`,65),A(3,xF,7,2,`div`,65),A(4,DF,7,2,`div`,65),A(5,kF,8,1,`div`,65),A(6,jF,8,1,`div`,65),M(7,LF,11,8,`div`,65,TP)),e&2){let e=t,n=W(),r=W(3);P(`value`,e),D(),j(r.propQuery()&&!e.count?1:-1),D(),j(!r.propQuery()||e.inputs.length?2:-1),D(),j(!r.propQuery()||e.outputs.length?3:-1),D(),j(!r.propQuery()||e.properties.length?4:-1),D(),j(!r.propQuery()&&n.listeners.length?5:-1),D(),j(!r.propQuery()&&r.ownedDeferBlocks().length?6:-1),D(),N(e.directives)}}function zF(e,t){if(e&1&&(F(0,`span`,105),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function BF(e,t){if(e&1&&(F(0,`span`,112),K(1,`from `),F(2,`span`,89),K(3),I()()),e&2){let e=W().$implicit;D(3),q(e.providedByName??`an injector`)}}function VF(e,t){e&1&&(F(0,`span`,113),K(1,`not provided`),I())}function HF(e,t){if(e&1&&(F(0,`li`,110)(1,`span`,111),K(2),I(),M(3,zF,2,1,`span`,105,tg),A(5,BF,4,1,`span`,112)(6,VF,2,0,`span`,113),I()),e&2){let e=t.$implicit;D(2),q(e.token),D(),N(e.flags),D(2),j(e.providedBy?5:6)}}function UF(e,t){if(e&1&&(F(0,`ul`,92),M(1,HF,7,2,`li`,110,OP),I()),e&2){let e=W();D(),N(e.dependencies)}}function WF(e,t){e&1&&(F(0,`p`,69),K(1,`Nothing is injected through the constructor or inject().`),I())}function GF(e,t){if(e&1){let e=B();F(0,`app-component-pipes`,114),H(`showPipe`,function(t){return S(e),C(W(4).showPipe.emit(t))}),I()}if(e&2){let e=W(2),t=W(2);P(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`component`,t.bareName(e.name))(`canShowPipes`,!t.staticReport())}}function KF(e,t){if(e&1){let e=B();F(0,`dl`,88)(1,`dt`),K(2,`Change detection`),I(),F(3,`dd`),K(4),I(),F(5,`dt`),K(6,`Encapsulation`),I(),F(7,`dd`),K(8),I(),F(9,`dt`),K(10,`Host path`),I(),F(11,`dd`,89),K(12),I(),M(13,uF,4,2,null,null,xP),I(),F(15,`div`,90)(16,`app-search-field`,91,3),N_(`valueChange`,function(t){S(e);let n=W(3);return M_(n.propFilter,t)||(n.propFilter=t),C(t)}),I(),A(18,dF,2,2,`span`,8),F(19,`p`,21),K(20),I()(),A(21,RF,9,7),F(22,`div`,65)(23,`h3`),K(24,` Injected `),F(25,`span`,66),K(26),I()(),A(27,UF,3,0,`ul`,92)(28,WF,2,0,`p`,69),I(),A(29,GF,1,4,`app-component-pipes`,93)}if(e&2){let e,n=t,r=W(),i=W(2);D(4),q(n.changeDetection??`Unknown`),D(4),q(n.encapsulation??`Unknown`),D(4),q(n.path),D(),N(i.routedById().get(r.id)??K_(10,_P)),D(3),j_(`value`,i.propFilter),D(2),j(i.propQuery()?18:-1),D(2),q(i.propFilterStatus()),D(),j((e=i.shownValues())?21:-1,e),D(5),q(n.dependencies.length),D(),j(n.dependencies.length?27:28),D(2),j(i.canShowPipes()?29:-1)}}function qF(e,t){e&1&&(F(0,`div`,75),L(1,`span`,115),F(2,`p`,44),K(3,`Reading live values from the page…`),I()())}function JF(e,t){if(e&1&&(F(0,`section`,32)(1,`header`,61)(2,`span`,62),K(3,`component`),I(),F(4,`h2`,63),K(5),I(),F(6,`span`,64),K(7),I(),A(8,XP,2,2,`p`,72)(9,eF,3,2),A(10,tF,7,1),A(11,iF,1,1),A(12,sF,3,2,`div`,73),A(13,cF,7,1),A(14,lF,1,6,`app-store-global`,74),I(),A(15,KF,30,11)(16,qF,4,0,`div`,75),I()),e&2){let e,n,r,i,a=t,o=W(2);D(5),q(a.name),D(2),J(`<`,a.tag,`>`),D(),j((e=o.detail()?.source)?8:9,e),D(2),j(o.devtoolsActions()?10:-1),D(),j((n=o.sourceFor(a))?11:-1,n),D(),j((o.canShowInjector()||o.canShowSignals())&&!o.staticReport()?12:-1),D(),j((r=o.detail())?13:-1,r),D(),j(!o.staticReport()&&!o.native()?14:-1),D(),j((i=o.detail())?15:16,i)}}function YF(e,t){e&1&&(F(0,`p`,43),K(1,`The selected component was destroyed`),I(),F(2,`p`,44)(3,`span`,89),K(4),I(),K(5,` is no longer on the page. Select another component to see its live values. `),I()),e&2&&(D(4),q(t))}function XF(e,t){e&1&&(F(0,`p`,44),K(1,` Select a component to see its live inputs, properties, outputs, change detection and injected services. `),I())}function ZF(e,t){if(e&1&&(F(0,`div`,33),A(1,YF,6,1)(2,XF,2,0,`p`,44),I()),e&2){let e,t=W(2);D(),j((e=t.destroyed())?1:2,e)}}function QF(e,t){e&1&&L(0,`app-angular-unavailable`,35),e&2&&P(`page`,W(2).angularPage())}function $F(e,t){if(e&1){let e=B();F(0,`app-hydration-section`,116),H(`overlay`,function(t){return S(e),C(W(2).setHydrationOverlay(t))})(`showNode`,function(t){return S(e),C(W(2).revealNode(t))})(`highlight`,function(t){return S(e),C(W(2).highlight(t))}),I()}e&2&&P(`report`,W(2).page()?.hydration)}function eI(e,t){if(e&1){let e=B();F(0,`app-cd-recording`,117),H(`showComponent`,function(t){return S(e),C(W(2).showCdComponent(t))}),I(),F(1,`app-leaks-section`,118),H(`showComponent`,function(t){return S(e),C(W(2).showLeakComponent(t))})(`highlight`,function(t){return S(e),C(W(2).highlight(t))}),I()}if(e&2){let e=W(2);P(`page`,e.cdPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`native`,e.native()),D(),P(`report`,e.leaksPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`angular`,e.angularPage())}}function tI(e,t){if(e&1){let e=B();F(0,`p`,4),K(1,` Every component instance on the page, in the order Angular rendered them. Hover a row to highlight its host in the page, and select it to read its live inputs, properties, outputs and injected services. `),I(),F(2,`div`,5)(3,`app-search-field`,6,1),H(`valueChange`,function(t){return S(e),C(W().setFilter(t))}),I(),F(5,`span`,7),K(6,` Type plain text, a tag such as