@ethlete/query-devtools 1.0.0-next.3 → 1.0.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/fesm2022/ethlete-query-devtools-toggle.mjs +7 -2
- package/fesm2022/ethlete-query-devtools-toggle.mjs.map +1 -1
- package/fesm2022/ethlete-query-devtools.mjs +1 -1
- package/fesm2022/ethlete-query-devtools.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ethlete-query-devtools.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ethlete-query-devtools.mjs","sources":["../../../../libs/query-devtools/src/lib/query-devtools-about.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-about.component.html","../../../../libs/query-devtools/src/lib/query-devtools-copy-menu-styles.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-copy-menu.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-diff.ts","../../../../libs/query-devtools/src/lib/query-devtools-exotic.ts","../../../../libs/query-devtools/src/lib/query-devtools-json-styles.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-clipboard.ts","../../../../libs/query-devtools/src/lib/query-devtools-override-menu-styles.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-override-menu.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-override-menu.component.html","../../../../libs/query-devtools/src/lib/query-devtools-json.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-host.ts","../../../../libs/query-devtools/src/lib/query-devtools-settings.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-settings.component.html","../../../../libs/query-devtools/src/lib/query-devtools-timeline-styles.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-features.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-auth-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-auth-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-types.ts","../../../../libs/query-devtools/src/lib/query-devtools-cache-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-cache-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-curl.ts","../../../../libs/query-devtools/src/lib/query-devtools-override-set-menu.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-override-set-menu.component.html","../../../../libs/query-devtools/src/lib/query-devtools-route.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-detail.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-detail.component.html","../../../../libs/query-devtools/src/lib/query-devtools-drawer.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-drawer.component.html","../../../../libs/query-devtools/src/lib/query-devtools-events-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-events-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-mock-designer.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-mock-designer.component.html","../../../../libs/query-devtools/src/lib/query-devtools-openapi.ts","../../../../libs/query-devtools/src/lib/query-devtools-typescript.ts","../../../../libs/query-devtools/src/lib/query-devtools-yaml.ts","../../../../libs/query-devtools/src/lib/query-devtools-mocks-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-mocks-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-faults-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-faults-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-forms-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-forms-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-locks-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-locks-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-locks.ts","../../../../libs/query-devtools/src/lib/version.ts","../../../../libs/query-devtools/src/lib/query-devtools-insomnia.ts","../../../../libs/query-devtools/src/lib/query-devtools-query-tree.ts","../../../../libs/query-devtools/src/lib/query-devtools-queries-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-queries-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-step-styles.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-batches-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-batches-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-sequences-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-sequences-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-sockets-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-sockets-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-stacks-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-stacks-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-timeline-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-timeline-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-session.ts","../../../../libs/query-devtools/src/lib/query-devtools.component.ts","../../../../libs/query-devtools/src/lib/query-devtools.component.html","../../../../libs/query-devtools/src/lib/query-devtools.imports.ts","../../../../libs/query-devtools/src/ethlete-query-devtools.ts"],"sourcesContent":["import { Component, ViewEncapsulation, signal } from '@angular/core';\nimport { copyToClipboard } from '@ethlete/core';\nimport { queryDevtoolsAbout } from '@ethlete/query';\nimport { tap } from 'rxjs';\n\ntype AboutRow = { label: string; value: string };\ntype AboutGroup = { title: string; rows: AboutRow[] };\n\nconst groupsOf = (): AboutGroup[] => {\n const about = queryDevtoolsAbout();\n\n const groups: AboutGroup[] = [\n {\n title: 'Ethlete',\n rows: Object.entries(about.ethlete).map(([name, version]) => ({ label: `@ethlete/${name}`, value: version })),\n },\n { title: 'Runtime', rows: [{ label: 'Angular', value: about.angular }] },\n ];\n\n if (about.app) {\n groups.push({\n title: 'Application',\n rows: Object.entries(about.app).map(([label, value]) => ({ label, value: String(value) })),\n });\n }\n\n return groups;\n};\n\n/**\n * What is running: the loaded `@ethlete/*` versions, the Angular version and whatever the app handed to\n * `provideQueryDevtools({ about })`. A section rather than a tab body, so it can be shown anywhere.\n */\n@Component({\n selector: 'et-query-devtools-about',\n templateUrl: './query-devtools-about.component.html',\n styleUrl: './query-devtools-about.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsAboutComponent {\n protected readonly groups = groupsOf();\n\n protected copied = signal(false);\n\n protected copy() {\n const text = this.groups\n .map((group) => [group.title, ...group.rows.map((row) => ` ${row.label}: ${row.value}`)].join('\\n'))\n .join('\\n\\n');\n\n copyToClipboard(text)\n .pipe(tap((ok) => this.copied.set(ok)))\n .subscribe();\n }\n}\n","<div class=\"et-query-devtools-scroll\">\n <div class=\"et-query-devtools-toolbar et-query-devtools-about-toolbar\">\n <p class=\"et-query-devtools-hint\">\n What is running, and what a bug report should carry. Also in the <strong>⤓ Session</strong> export and on\n <code class=\"et-query-devtools-mono\">window.ethlete</code>.\n </p>\n <button (click)=\"copy()\" class=\"et-query-devtools-btn\" type=\"button\">\n <span aria-hidden=\"true\">⧉</span>\n {{ copied() ? 'Copied' : 'Copy' }}\n </button>\n </div>\n\n @for (group of groups; track group.title) {\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>{{ group.title }}</strong>\n </div>\n <dl class=\"et-query-devtools-about-list\">\n @for (row of group.rows; track row.label) {\n <div class=\"et-query-devtools-about-row\">\n <dt class=\"et-query-devtools-mono\">{{ row.label }}</dt>\n <dd class=\"et-query-devtools-mono\">{{ row.value }}</dd>\n </div>\n }\n </dl>\n </div>\n }\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n/**\n * The copy menu's caret chrome, as a styles-only component the menu mounts itself - a session that\n * never opens a value explorer does not inject it.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-copy-menu-styles',\n template: '',\n styleUrl: './query-devtools-copy-menu-styles.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsCopyMenuStylesComponent {}\n","import { Component, computed, input, output, ViewEncapsulation } from '@angular/core';\nimport { injectStyleManager } from '@ethlete/core';\nimport { MenuComponent, MenuDirective, MenuItemComponent } from '@ethlete/components';\nimport { MenuSurfaceDirective, MenuTriggerDirective } from '@ethlete/components';\nimport { QueryDevtoolsCopyMenuStylesComponent } from './query-devtools-copy-menu-styles.component';\nimport { JsonKind } from './query-devtools-json.component';\n\n/** Which of a node's four pasteable forms a copy action asks for. */\nexport type QueryDevtoolsCopyPayload = 'value' | 'key' | 'path' | 'entry';\n\n/**\n * The caret beside the value explorer's `⧉`, offering the key and the JSONPath that button cannot\n * reach. It only picks - the explorer node owns the clipboard write and the tick, so all four\n * payloads share one implementation and one \"what landed\" readout.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-copy-menu',\n template: `\n <div class=\"et-query-devtools-json-copy-menu\" etMenu>\n <button\n class=\"et-query-devtools-json-copy-more\"\n type=\"button\"\n aria-label=\"More copy options\"\n title=\"Copy the key or the path instead of the value\"\n etMenuTrigger\n >\n ▾\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <button (activate)=\"pick.emit('value')\" et-menu-item type=\"button\">Value</button>\n @if (namedByKey()) {\n <button (activate)=\"pick.emit('key')\" et-menu-item type=\"button\">Key</button>\n }\n <button (activate)=\"pick.emit('path')\" et-menu-item type=\"button\">Path</button>\n @if (namedByKey()) {\n <button (activate)=\"pick.emit('entry')\" et-menu-item type=\"button\">\"key\": value</button>\n }\n </et-menu>\n </ng-template>\n </div>\n `,\n encapsulation: ViewEncapsulation.None,\n imports: [MenuDirective, MenuTriggerDirective, MenuSurfaceDirective, MenuComponent, MenuItemComponent],\n})\nexport class QueryDevtoolsCopyMenuComponent {\n /** The kind of the container this node sits in, or `null` at an explorer root. */\n public parentKind = input<JsonKind | null>(null);\n\n public pick = output<QueryDevtoolsCopyPayload>();\n\n /**\n * Whether the node's key is worth having on its own. An array element's key is its index, so both\n * \"Key\" and the `\"key\": value` fragment would produce `0` / `\"0\": …` - the path is the only useful\n * address there.\n */\n protected namedByKey = computed(() => this.parentKind() !== 'array');\n\n constructor() {\n injectStyleManager().mount(QueryDevtoolsCopyMenuStylesComponent);\n }\n}\n","/** Whether a path exists only in the newer value, only in the older one, or in both with a new value. */\nexport type QueryDevtoolsDiffKind = 'added' | 'removed' | 'changed';\n\n/** One difference between two values, located by the path it sits at. */\nexport type QueryDevtoolsDiffEntry = {\n /** Where the difference sits, e.g. `$.items[2].score` or `$.items[id=7].score`. */\n path: string;\n\n kind: QueryDevtoolsDiffKind;\n\n /** The older value, or `null` for an added path. */\n before: unknown;\n\n /** The newer value, or `null` for a removed path. */\n after: unknown;\n};\n\nexport type QueryDevtoolsDiff = {\n entries: QueryDevtoolsDiffEntry[];\n\n /** Whether the walk hit its cap, so {@link entries} is only part of the difference. */\n truncated: boolean;\n};\n\n/** Enough to describe what changed between two responses; past this the list stops being readable. */\nconst MAX_ENTRIES = 200;\n\n/**\n * How deep the walk descends before comparing whole subtrees at once. Guards against a self-referential\n * response, and keeps a deeply nested change reported as one entry rather than a path per level.\n */\nconst MAX_DEPTH = 12;\n\n/** Stands in for a path one side does not have, so a stored `undefined` is not mistaken for a missing key. */\nconst ABSENT = /* @__PURE__ */ Symbol('absent');\n\ntype DiffAccumulator = { entries: QueryDevtoolsDiffEntry[]; truncated: boolean };\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\nconst valueAt = (record: Record<string, unknown>, key: string): unknown => (key in record ? record[key] : ABSENT);\n\n/**\n * The `id` of every element, when an array holds records keyed by a unique primitive `id` - the shape an\n * API list almost always has. `null` for anything else, which is then compared by index.\n */\nconst recordIds = (items: unknown[]) => {\n const ids: (string | number)[] = [];\n\n for (const item of items) {\n if (!isRecord(item)) return null;\n\n const id = item['id'];\n\n if (typeof id !== 'string' && typeof id !== 'number') return null;\n\n ids.push(id);\n }\n\n return new Set(ids).size === ids.length ? ids : null;\n};\n\n/**\n * Whether two values are the same, for the leaves and for the subtrees the walk stopped descending into.\n * The serialized comparison is key-order sensitive, which only ever over-reports a difference.\n */\nconst isSameValue = (before: unknown, after: unknown) => {\n if (Object.is(before, after)) return true;\n if (!isRecord(before) && !Array.isArray(before)) return false;\n if (!isRecord(after) && !Array.isArray(after)) return false;\n\n try {\n return JSON.stringify(before) === JSON.stringify(after);\n } catch {\n return false;\n }\n};\n\nconst push = (acc: DiffAccumulator, entry: QueryDevtoolsDiffEntry) => {\n if (acc.entries.length >= MAX_ENTRIES) {\n acc.truncated = true;\n\n return;\n }\n\n acc.entries.push(entry);\n};\n\n/**\n * Appends one step to a path in the panel's canonical JSONPath format - `$.data.items[0]`, rooted at\n * `$` for the value an explorer or a diff was handed. The one place that format is written, so the\n * diff's Path column and the value explorer's \"Copy path\" cannot drift apart.\n */\nexport const appendJsonPathStep = (path: string, step: string | number) =>\n typeof step === 'number' ? `${path}[${step}]` : `${path}.${step}`;\n\n/** The same format, built from the array of steps an override op targets. */\nexport const formatJsonPath = (steps: readonly (string | number)[]) => steps.reduce(appendJsonPathStep, '$');\n\n/** One position in the walk: the two values to compare there, and how deep into them it is. */\ntype WalkStep<T = unknown> = {\n before: T;\n after: T;\n path: string;\n depth: number;\n};\n\nconst walk = ({ before, after, path, depth }: WalkStep, acc: DiffAccumulator) => {\n if (acc.truncated) return;\n\n if (before === ABSENT) {\n push(acc, { path, kind: 'added', before: null, after });\n\n return;\n }\n\n if (after === ABSENT) {\n push(acc, { path, kind: 'removed', before, after: null });\n\n return;\n }\n\n if (depth < MAX_DEPTH) {\n if (isRecord(before) && isRecord(after)) {\n for (const key of new Set([...Object.keys(before), ...Object.keys(after)])) {\n walk(\n {\n before: valueAt(before, key),\n after: valueAt(after, key),\n path: appendJsonPathStep(path, key),\n depth: depth + 1,\n },\n acc,\n );\n }\n\n return;\n }\n\n if (Array.isArray(before) && Array.isArray(after)) {\n walkArrays({ before, after, path, depth }, acc);\n\n return;\n }\n }\n\n if (!isSameValue(before, after)) push(acc, { path, kind: 'changed', before, after });\n};\n\nconst walkArrays = ({ before, after, path, depth }: WalkStep<unknown[]>, acc: DiffAccumulator) => {\n const beforeIds = recordIds(before);\n const afterIds = recordIds(after);\n const nested = depth + 1;\n\n // Matching records by their `id` keeps a list that gained or lost an item reported as that one item,\n // instead of every index after it shifting and reading as changed.\n if (beforeIds && afterIds) {\n const afterById = new Map(afterIds.map((id, index) => [id, after[index]]));\n const beforeIdSet = new Set(beforeIds);\n\n beforeIds.forEach((id, index) => {\n const paired = afterById.has(id) ? afterById.get(id) : ABSENT;\n\n walk({ before: before[index], after: paired, path: `${path}[id=${id}]`, depth: nested }, acc);\n });\n\n afterIds.forEach((id, index) => {\n if (beforeIdSet.has(id)) return;\n\n walk({ before: ABSENT, after: after[index], path: `${path}[id=${id}]`, depth: nested }, acc);\n });\n\n return;\n }\n\n for (let index = 0; index < Math.max(before.length, after.length); index++) {\n walk(\n {\n before: index < before.length ? before[index] : ABSENT,\n after: index < after.length ? after[index] : ABSENT,\n path: appendJsonPathStep(path, index),\n depth: nested,\n },\n acc,\n );\n }\n};\n\n/**\n * What changed between two responses of the same query, as a flat list of paths - the shape that answers\n * \"the list re-rendered, what changed?\" and \"did that poll return anything new?\".\n */\nexport const diffQueryDevtoolsResponses = (before: unknown, after: unknown): QueryDevtoolsDiff => {\n const acc: DiffAccumulator = { entries: [], truncated: false };\n\n walk({ before, after, path: '$', depth: 0 }, acc);\n\n return acc;\n};\n","/**\n * Values the value explorer has to read through a reader of their own, because `Object.entries` on\n * them is either `[]` or a list of private fields - so a node would claim to hold nothing while\n * holding everything. `HttpHeaders` is the case this was written for: both of its real payloads are\n * `Map`s, and `Object.entries` on a `Map` is `[]`.\n */\nexport type ExoticValue =\n /** Rendered as a container, from these entries instead of the object's own. */\n | { typeName: string; entries: { k: string; v: unknown }[]; display?: never }\n /** Rendered as a leaf, with this text in place of `String(value)`. */\n | { typeName: string; display: string; entries?: never };\n\n/** Duck-typed rather than `instanceof HttpHeaders`, so a second copy of `@angular/common/http` still reads. */\nexport const isHeadersValue = (\n value: unknown,\n): value is { keys: () => string[]; getAll: (name: string) => string[] | null } =>\n !!value &&\n typeof value === 'object' &&\n 'keys' in value &&\n typeof value.keys === 'function' &&\n 'getAll' in value &&\n typeof value.getAll === 'function' &&\n 'lazyInit' in value;\n\n/**\n * How to render `value` if it is one of the built-ins the explorer knows, or `null` for anything it\n * should keep treating as a plain object or array.\n */\nexport const exoticOf = (value: unknown): ExoticValue | null => {\n // A header provider is the case in practice; `String(fn)` would dump its whole source into the row.\n if (typeof value === 'function') return { typeName: 'fn', display: value.name || 'anonymous' };\n\n if (!value || typeof value !== 'object') return null;\n\n if (value instanceof Date) {\n return { typeName: 'Date', display: Number.isNaN(value.getTime()) ? 'Invalid Date' : value.toISOString() };\n }\n\n if (typeof File !== 'undefined' && value instanceof File) {\n return {\n typeName: 'File',\n entries: [\n { k: 'name', v: value.name },\n { k: 'size', v: value.size },\n { k: 'type', v: value.type },\n { k: 'lastModified', v: new Date(value.lastModified) },\n ],\n };\n }\n\n if (typeof Blob !== 'undefined' && value instanceof Blob) {\n return {\n typeName: 'Blob',\n entries: [\n { k: 'size', v: value.size },\n { k: 'type', v: value.type },\n ],\n };\n }\n\n if (value instanceof Map) {\n return { typeName: 'Map', entries: [...value].map(([k, v]) => ({ k: String(k), v })) };\n }\n\n if (value instanceof Set) {\n return { typeName: 'Set', entries: [...value].map((v, i) => ({ k: String(i), v })) };\n }\n\n if (typeof FormData !== 'undefined' && value instanceof FormData) {\n return { typeName: 'FormData', entries: [...value].map(([k, v]) => ({ k, v })) };\n }\n\n if (isHeadersValue(value)) {\n return { typeName: 'HttpHeaders', entries: headerEntries(value) };\n }\n\n return null;\n};\n\n/**\n * The headers an `HttpHeaders` actually holds, as `name: value` pairs. A header set more than once\n * joins on `, ` the way the wire format does.\n */\nexport const headerEntries = (headers: { keys: () => string[]; getAll: (name: string) => string[] | null }) => {\n try {\n return headers.keys().map((name) => ({ k: name, v: headers.getAll(name)?.join(', ') ?? '' }));\n } catch {\n return [];\n }\n};\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n/**\n * The value explorer's tree chrome, as a styles-only component the tree mounts itself - a session that\n * never opens a JSON view does not inject it.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-json-styles',\n template: '',\n styleUrl: './query-devtools-json-styles.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsJsonStylesComponent {}\n","/** Why a clipboard read produced nothing, phrased for the menu line that shows it. */\nexport type QueryDevtoolsClipboardFailure = 'unavailable' | 'blocked';\n\n/**\n * Reads the clipboard, distinguishing \"this browser has no `readText`\" from \"the user or the permission\n * gate said no\". Neither is recoverable here, and both leave the caller to fall back to a box that takes\n * a real paste event - a `ClipboardEvent` needs no permission anywhere.\n *\n * Part of the devtools contract. Not part of the general public contract.\n */\nexport const readQueryDevtoolsClipboard = (): Promise<\n { ok: true; text: string } | { ok: false; reason: QueryDevtoolsClipboardFailure }\n> => {\n if (!navigator.clipboard?.readText) return Promise.resolve({ ok: false as const, reason: 'unavailable' as const });\n\n return navigator.clipboard.readText().then(\n (text) => ({ ok: true as const, text }),\n () => ({ ok: false as const, reason: 'blocked' as const }),\n );\n};\n\n/**\n * The text a real paste event carries, or `null` when it holds no plain text - the fallback path for a\n * blocked {@link readQueryDevtoolsClipboard}.\n *\n * Part of the devtools contract. Not part of the general public contract.\n */\nexport const textFromQueryDevtoolsPaste = (event: ClipboardEvent) => {\n const text = event.clipboardData?.getData('text/plain');\n\n return text ? text : null;\n};\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n/**\n * The override menu's trigger chrome, as a styles-only component the menu mounts itself - a session\n * that never opens the value explorer's override menu does not inject it.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-override-menu-styles',\n template: '',\n styleUrl: './query-devtools-override-menu-styles.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsOverrideMenuStylesComponent {}\n","import { Component, computed, effect, ElementRef, input, signal, viewChild, ViewEncapsulation } from '@angular/core';\nimport { injectErrorTheme, injectStyleManager, ProvideColorDirective } from '@ethlete/core';\nimport {\n collectLeafPaths,\n detectPaginationShape,\n generateQueryDevtoolsNumberPreset,\n generateQueryDevtoolsStringPreset,\n hasQueryDevtoolsOverridesAtPath,\n isDateShapedLeaf,\n JsonPath,\n QueryDevtoolsOverridesRecorder,\n} from '@ethlete/query';\nimport {\n MenuComponent,\n MenuDirective,\n MenuItemComponent,\n MenuItemShortcutComponent,\n MenuSeparatorComponent,\n} from '@ethlete/components';\nimport { MenuSearchDirective, MenuSurfaceDirective, MenuTriggerDirective } from '@ethlete/components';\nimport { readQueryDevtoolsClipboard, textFromQueryDevtoolsPaste } from './query-devtools-clipboard';\nimport { JsonKind, kindOf } from './query-devtools-json.component';\nimport { QueryDevtoolsOverrideMenuStylesComponent } from './query-devtools-override-menu-styles.component';\n\n/**\n * The per-value action menu of the query devtools value explorer: arms a path-addressed\n * {@link OverrideOp} on the query's response so it replays on every future fetch, instead of the\n * one-shot raw-JSON edit the panel's JIT editor offers.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-override-menu',\n templateUrl: './query-devtools-override-menu.component.html',\n encapsulation: ViewEncapsulation.None,\n imports: [\n MenuDirective,\n MenuTriggerDirective,\n MenuSurfaceDirective,\n MenuSearchDirective,\n MenuComponent,\n MenuItemComponent,\n MenuItemShortcutComponent,\n MenuSeparatorComponent,\n ProvideColorDirective,\n ],\n})\nexport class QueryDevtoolsOverrideMenuComponent {\n protected errorColorTheme = injectErrorTheme();\n public value = input<unknown>();\n public path = input<JsonPath>([]);\n public parentKind = input<JsonKind | null>(null);\n public overrides = input.required<QueryDevtoolsOverridesRecorder>();\n\n private rootMenu = viewChild.required<MenuDirective>('rootMenu');\n private customInput = viewChild<ElementRef<HTMLInputElement>>('customValueInput');\n private pasteInput = viewChild<ElementRef<HTMLInputElement>>('pasteBox');\n\n protected kind = computed(() => kindOf(this.value()));\n protected isContainer = computed(() => this.kind() === 'array' || this.kind() === 'object');\n protected isEmptyValue = computed(() => this.kind() === 'null' || this.kind() === 'undefined');\n protected hasArmedOverrides = computed(() => hasQueryDevtoolsOverridesAtPath(this.overrides().list(), this.path()));\n protected isArrayElement = computed(() => this.parentKind() === 'array' && this.kind() === 'object');\n protected paginationShape = computed(() => detectPaginationShape(this.value()));\n\n /** Whether this node sits inside a container it can be removed from - the root does not. */\n protected isRemovable = computed(() => this.path().length > 0);\n protected isInArray = computed(() => this.parentKind() === 'array');\n protected hasArrayItems = computed(() => {\n const value = this.value();\n return Array.isArray(value) && value.length > 0;\n });\n protected supportsNull = computed(() => !this.isEmptyValue());\n\n protected isDate = computed(() => {\n const path = this.path();\n return this.kind() === 'string' && isDateShapedLeaf(path[path.length - 1] ?? null, this.value());\n });\n\n protected customMode = signal(false);\n protected pasteMode = signal(false);\n private pasteTarget = signal<PasteTarget>('value');\n protected pendingPaste = signal<{ value: unknown; kind: JsonKind } | null>(null);\n protected menuError = signal<string | null>(null);\n protected menuNote = signal<string | null>(null);\n\n protected supportsCustomValue = computed(() => !this.isContainer() && this.kind() !== 'boolean');\n\n protected customPlaceholder = computed(() => {\n switch (this.kind()) {\n case 'number':\n return 'A number';\n case 'string':\n return 'Any text';\n default:\n return 'JSON or plain text';\n }\n });\n\n constructor() {\n injectStyleManager().mount(QueryDevtoolsOverrideMenuStylesComponent);\n\n effect(() => this.customInput()?.nativeElement.focus());\n effect(() => this.pasteInput()?.nativeElement.focus());\n }\n\n protected applyStringPreset(preset: 'short' | 'long' | 'longWord' | 'unicode') {\n this.overrides().arm({\n type: 'stringPreset',\n path: this.path(),\n preset,\n custom: generateQueryDevtoolsStringPreset(preset),\n });\n }\n\n protected applyNumberPreset(preset: 'zero' | 'negative' | 'huge') {\n this.overrides().arm({\n type: 'numberPreset',\n path: this.path(),\n preset,\n custom: generateQueryDevtoolsNumberPreset(preset),\n });\n }\n\n protected applyDatePreset(preset: 'now' | 'plusDay' | 'minusDay' | 'farFuture' | 'farPast' | 'invalid') {\n this.overrides().arm({ type: 'datePreset', path: this.path(), preset });\n }\n\n protected setValue(value: unknown) {\n this.overrides().arm({ type: 'set', path: this.path(), value });\n }\n\n protected flipBoolean() {\n this.overrides().arm({ type: 'booleanFlip', path: this.path() });\n }\n\n protected duplicateThisItem() {\n const path = this.path();\n const parentPath = path.slice(0, -1);\n const index = Number(path[path.length - 1]);\n\n this.overrides().arm({ type: 'duplicateArrayItem', path: parentPath, index });\n }\n\n protected duplicateArray() {\n this.overrides().arm({ type: 'duplicateArray', path: this.path() });\n }\n\n protected emptyArray() {\n this.overrides().arm({ type: 'set', path: this.path(), value: [] });\n }\n\n protected deleteThis() {\n this.overrides().arm({ type: 'deleteAt', path: this.path() });\n }\n\n protected resizePagination(mode: 'shrink' | 'extend') {\n this.overrides().arm({ type: 'paginationResize', path: this.path(), mode, amount: 1 });\n }\n\n protected fillStrings(preset: 'short' | 'long' | 'longWord' | 'unicode') {\n for (const leaf of collectLeafPaths(this.value(), 'string')) {\n this.overrides().arm({\n type: 'stringPreset',\n path: [...this.path(), ...leaf],\n preset,\n custom: generateQueryDevtoolsStringPreset(preset),\n });\n }\n }\n\n protected fillNumbers(preset: 'zero' | 'negative' | 'huge') {\n for (const leaf of collectLeafPaths(this.value(), 'number')) {\n this.overrides().arm({\n type: 'numberPreset',\n path: [...this.path(), ...leaf],\n preset,\n custom: generateQueryDevtoolsNumberPreset(preset),\n });\n }\n }\n\n protected fillBooleans() {\n for (const leaf of collectLeafPaths(this.value(), 'boolean')) {\n this.overrides().arm({ type: 'booleanFlip', path: [...this.path(), ...leaf] });\n }\n }\n\n protected reset() {\n this.overrides().arm({ type: 'reset', path: this.path() });\n }\n\n protected startCustomEdit() {\n this.menuError.set(null);\n this.customMode.set(true);\n }\n\n protected commitCustomValue() {\n const raw = this.customInput()?.nativeElement.value;\n if (raw === undefined) return;\n\n const kind = this.kind();\n\n if (kind === 'number') {\n const value = Number(raw.trim());\n\n if (!raw.trim() || Number.isNaN(value)) {\n this.menuError.set('Not a number');\n\n return;\n }\n\n this.overrides().arm({ type: 'numberPreset', path: this.path(), preset: 'custom', custom: value });\n } else if (kind === 'string') {\n this.overrides().arm({ type: 'stringPreset', path: this.path(), preset: 'custom', custom: raw });\n } else {\n this.overrides().arm({ type: 'set', path: this.path(), value: parseLooseJson(raw) });\n }\n\n this.rootMenu().closeAll();\n }\n\n protected pasteValue() {\n this.startPaste('value');\n }\n\n protected pasteArrayItem() {\n this.startPaste('arrayItem');\n }\n\n protected pasteIntoBox(event: ClipboardEvent) {\n const text = textFromQueryDevtoolsPaste(event);\n if (!text) return;\n\n event.preventDefault();\n this.armPastedText(text);\n }\n\n protected commitPasteBox() {\n const raw = this.pasteInput()?.nativeElement.value;\n\n if (raw !== undefined) this.armPastedText(raw);\n }\n\n /** Arms the paste the kind guard stopped, now that the menu has said what it replaces. */\n protected confirmKindChange() {\n const pending = this.pendingPaste();\n if (!pending) return;\n\n this.pendingPaste.set(null);\n this.armValue(pending.value);\n }\n\n protected cancelKindChange() {\n this.pendingPaste.set(null);\n }\n\n protected resetEditingState(open: boolean) {\n if (!open) {\n this.customMode.set(false);\n this.pasteMode.set(false);\n this.pasteTarget.set('value');\n this.pendingPaste.set(null);\n this.menuError.set(null);\n this.menuNote.set(null);\n }\n }\n\n private startPaste(target: PasteTarget) {\n this.menuError.set(null);\n this.menuNote.set(null);\n this.pendingPaste.set(null);\n this.pasteTarget.set(target);\n\n readQueryDevtoolsClipboard().then((read) => {\n if (read.ok) {\n this.armPastedText(read.text);\n\n return;\n }\n\n this.pasteMode.set(true);\n this.menuNote.set(\n read.reason === 'unavailable'\n ? 'This browser will not hand over the clipboard - press ⌘V / Ctrl+V here instead.'\n : 'The clipboard read was blocked - press ⌘V / Ctrl+V here instead.',\n );\n });\n }\n\n private armPastedText(text: string) {\n if (!text.trim()) {\n this.menuError.set('The clipboard is empty');\n\n return;\n }\n\n let value: unknown;\n\n try {\n value = JSON.parse(text);\n } catch {\n if (this.pasteTarget() === 'value' && this.isContainer()) {\n this.menuError.set('The clipboard does not hold valid JSON');\n\n return;\n }\n\n value = text;\n }\n\n if (this.pasteTarget() === 'arrayItem') {\n this.armValue(value);\n\n return;\n }\n\n const pastedKind = kindOf(value);\n\n // The guard catches a copied *path* pasted over a body; \"this field became an array\" is worth\n // rehearsing, so it asks rather than refuses.\n if (pastedKind !== this.kind()) {\n this.pasteMode.set(false);\n this.menuError.set(null);\n this.menuNote.set(null);\n this.pendingPaste.set({ value, kind: pastedKind });\n\n return;\n }\n\n this.armValue(value);\n }\n\n private armValue(value: unknown) {\n if (this.pasteTarget() === 'arrayItem') this.overrides().arm({ type: 'pasteArrayItem', path: this.path(), value });\n else this.overrides().arm({ type: 'set', path: this.path(), value });\n\n this.rootMenu().closeAll();\n }\n}\n\n/** Whether a paste replaces the node itself or lands as a new element inside it. */\ntype PasteTarget = 'value' | 'arrayItem';\n\nconst parseLooseJson = (raw: string): unknown => {\n try {\n return JSON.parse(raw);\n } catch {\n return raw;\n }\n};\n","<div #rootMenu=\"etMenu\" (openChange)=\"resetEditingState($event)\" class=\"et-query-devtools-override-menu\" etMenu>\n <button\n class=\"et-query-devtools-override-trigger\"\n aria-label=\"Override this value\"\n title=\"Override this value\"\n etMenuTrigger\n type=\"button\"\n >\n ✎\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <ng-container ngProjectAs=\"input[etMenuSearch]\">\n @if (customMode()) {\n <input\n #customValueInput\n [error]=\"menuError()\"\n [placeholder]=\"customPlaceholder()\"\n (keydown.enter)=\"commitCustomValue()\"\n etMenuSearch\n type=\"text\"\n />\n } @else if (pasteMode()) {\n <input\n #pasteBox\n [error]=\"menuError()\"\n (paste)=\"pasteIntoBox($event)\"\n (keydown.enter)=\"commitPasteBox()\"\n etMenuSearch\n type=\"text\"\n placeholder=\"Paste here\"\n />\n }\n </ng-container>\n\n @if (customMode()) {\n <!-- eslint-disable-next-line ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <button [closeOnActivate]=\"false\" (activate)=\"commitCustomValue()\" et-menu-item type=\"button\">Apply</button>\n } @else if (pendingPaste(); as pending) {\n <p class=\"et-query-devtools-override-note\">\n This replaces {{ kind() === 'undefined' ? 'a missing value' : 'the ' + kind() }} with {{ pending.kind }}.\n </p>\n <button (activate)=\"confirmKindChange()\" et-menu-item type=\"button\">Replace anyway</button>\n <button (activate)=\"cancelKindChange()\" et-menu-item type=\"button\">Cancel</button>\n } @else if (pasteMode()) {\n <!-- eslint-disable-next-line ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <button [closeOnActivate]=\"false\" (activate)=\"commitPasteBox()\" et-menu-item type=\"button\">Apply</button>\n\n @if (menuNote(); as note) {\n <p class=\"et-query-devtools-override-note\">{{ note }}</p>\n }\n } @else {\n @switch (kind()) {\n @case ('string') {\n @if (isDate()) {\n <button (activate)=\"applyDatePreset('now')\" et-menu-item type=\"button\">Now</button>\n <button (activate)=\"applyDatePreset('plusDay')\" et-menu-item type=\"button\">+1 day</button>\n <button (activate)=\"applyDatePreset('minusDay')\" et-menu-item type=\"button\">-1 day</button>\n <button (activate)=\"applyDatePreset('farFuture')\" et-menu-item type=\"button\">Far future</button>\n <button (activate)=\"applyDatePreset('farPast')\" et-menu-item type=\"button\">Far past</button>\n <button (activate)=\"applyDatePreset('invalid')\" et-menu-item type=\"button\">Invalid date</button>\n } @else {\n <button (activate)=\"applyStringPreset('short')\" et-menu-item type=\"button\">Short text</button>\n <button (activate)=\"applyStringPreset('long')\" et-menu-item type=\"button\">Long text</button>\n <button (activate)=\"applyStringPreset('longWord')\" et-menu-item type=\"button\">Long word</button>\n <button (activate)=\"applyStringPreset('unicode')\" et-menu-item type=\"button\">Unicode / RTL sample</button>\n }\n }\n @case ('number') {\n <button (activate)=\"applyNumberPreset('zero')\" et-menu-item type=\"button\">Zero</button>\n <button (activate)=\"applyNumberPreset('negative')\" et-menu-item type=\"button\">Negative</button>\n <button (activate)=\"applyNumberPreset('huge')\" et-menu-item type=\"button\">Huge</button>\n }\n @case ('boolean') {\n <button (activate)=\"flipBoolean()\" et-menu-item type=\"button\">Flip</button>\n }\n @case ('array') {\n <button (activate)=\"duplicateArray()\" et-menu-item type=\"button\">Duplicate array</button>\n\n @if (hasArrayItems()) {\n <button (activate)=\"emptyArray()\" et-menu-item type=\"button\">Empty this array</button>\n }\n }\n }\n\n @if (supportsNull()) {\n <button (activate)=\"setValue(null)\" et-menu-item type=\"button\">Set to null</button>\n }\n\n @if (isEmptyValue()) {\n <button (activate)=\"setValue('Ab')\" et-menu-item type=\"button\">Set to text</button>\n <button (activate)=\"setValue(0)\" et-menu-item type=\"button\">Set to number</button>\n <button (activate)=\"setValue(true)\" et-menu-item type=\"button\">Set to true</button>\n <button (activate)=\"setValue({})\" et-menu-item type=\"button\">Set to empty object</button>\n <button (activate)=\"setValue([])\" et-menu-item type=\"button\">Set to empty array</button>\n }\n\n @if (supportsCustomValue()) {\n <!-- eslint-disable-next-line ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <button [closeOnActivate]=\"false\" (activate)=\"startCustomEdit()\" et-menu-item type=\"button\">Custom…</button>\n }\n\n @if (isArrayElement()) {\n <button (activate)=\"duplicateThisItem()\" et-menu-item type=\"button\">Duplicate this item</button>\n }\n\n @if (paginationShape()) {\n <button (activate)=\"resizePagination('shrink')\" et-menu-item type=\"button\">Shrink page by 1</button>\n <button (activate)=\"resizePagination('extend')\" et-menu-item type=\"button\">Extend page by 1</button>\n }\n\n <!-- eslint-disable-next-line ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <button [closeOnActivate]=\"false\" (activate)=\"pasteValue()\" et-menu-item type=\"button\">Paste value</button>\n\n @if (kind() === 'array') {\n <!-- eslint-disable-next-line ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <button [closeOnActivate]=\"false\" (activate)=\"pasteArrayItem()\" et-menu-item type=\"button\">\n Paste as new item\n </button>\n }\n\n @if (isContainer()) {\n <et-menu-separator />\n\n <div etMenu>\n <button et-menu-item etMenuTrigger type=\"button\">\n Fill every string\n <et-menu-item-shortcut>›</et-menu-item-shortcut>\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <button (activate)=\"fillStrings('short')\" et-menu-item type=\"button\">Short text</button>\n <button (activate)=\"fillStrings('long')\" et-menu-item type=\"button\">Long text</button>\n <button (activate)=\"fillStrings('longWord')\" et-menu-item type=\"button\">Long word</button>\n <button (activate)=\"fillStrings('unicode')\" et-menu-item type=\"button\">Unicode / RTL sample</button>\n </et-menu>\n </ng-template>\n </div>\n\n <div etMenu>\n <button et-menu-item etMenuTrigger type=\"button\">\n Fill every number\n <et-menu-item-shortcut>›</et-menu-item-shortcut>\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <button (activate)=\"fillNumbers('zero')\" et-menu-item type=\"button\">Zero</button>\n <button (activate)=\"fillNumbers('negative')\" et-menu-item type=\"button\">Negative</button>\n <button (activate)=\"fillNumbers('huge')\" et-menu-item type=\"button\">Huge</button>\n </et-menu>\n </ng-template>\n </div>\n\n <button (activate)=\"fillBooleans()\" et-menu-item type=\"button\">Flip every boolean</button>\n }\n\n @if (isRemovable()) {\n <et-menu-separator />\n\n <button (activate)=\"deleteThis()\" et-menu-item variant=\"destructive\" type=\"button\">\n {{ isInArray() ? 'Delete this item' : 'Delete this key' }}\n </button>\n }\n\n @if (menuError(); as err) {\n <p [etProvideColor]=\"errorColorTheme\" class=\"et-query-devtools-override-error\" role=\"alert\">{{ err }}</p>\n }\n\n @if (hasArmedOverrides()) {\n <et-menu-separator />\n\n <button (activate)=\"reset()\" et-menu-item variant=\"destructive\" type=\"button\">Reset</button>\n }\n }\n </et-menu>\n </ng-template>\n</div>\n","import { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Component, computed, input, linkedSignal, numberAttribute, signal, ViewEncapsulation } from '@angular/core';\nimport { injectStyleManager } from '@ethlete/core';\nimport { JsonPath, QueryDevtoolsOverridesRecorder } from '@ethlete/query';\nimport { Subject, switchMap, tap, timer } from 'rxjs';\nimport { QueryDevtoolsCopyMenuComponent, QueryDevtoolsCopyPayload } from './query-devtools-copy-menu.component';\nimport { formatJsonPath } from './query-devtools-diff';\nimport { exoticOf } from './query-devtools-exotic';\nimport { QueryDevtoolsJsonStylesComponent } from './query-devtools-json-styles.component';\nimport { QueryDevtoolsOverrideMenuComponent } from './query-devtools-override-menu.component';\n\n/** A JSON value's kind as the value explorer (and its per-node override menu) categorizes it. */\nexport type JsonKind = 'string' | 'number' | 'boolean' | 'null' | 'undefined' | 'array' | 'object';\n\ntype JsonEntry = { k: string; v: unknown };\n\n/** A folded slice of a container's entries, rendered as its own collapsible row. */\ntype JsonChunk = { start: number; end: number; label: string };\n\n/** How long the copy button stays ticked after a successful write. */\nconst COPIED_RESET_MS = 1200;\n\n/**\n * Containers with more entries than this are not rendered directly - their children are grouped into\n * collapsed slices of this size, so a 5000-item array costs 50 rows instead of 5000.\n */\nconst CHUNK_SIZE = 100;\n\nexport const kindOf = (value: unknown): JsonKind => {\n if (value === null) return 'null';\n if (value === undefined) return 'undefined';\n if (Array.isArray(value)) return 'array';\n return typeof value as JsonKind;\n};\n\nconst entriesOf = (value: unknown): JsonEntry[] => {\n if (Array.isArray(value)) return value.map((v, i) => ({ k: String(i), v }));\n\n const exotic = exoticOf(value);\n if (exotic) return exotic.entries ?? [];\n\n if (value && typeof value === 'object') {\n return Object.entries(value as Record<string, unknown>).map(([k, v]) => ({ k, v }));\n }\n return [];\n};\n\n/** Keeps the number of sibling slices at or below `CHUNK_SIZE` by folding recursively for huge counts. */\nconst chunkSizeFor = (count: number) => {\n let size = CHUNK_SIZE;\n while (count / size > CHUNK_SIZE) size *= CHUNK_SIZE;\n return size;\n};\n\n/**\n * A recursive, collapsible, searchable JSON tree used by the query devtools value explorer. Renders\n * the *transformed* value the app actually sees (post `transformResponse`). Self-recurses via its\n * own selector - both for child entries and for the folded slices of an oversized container, which\n * re-enter as the same component with a `chunk` window over the same value.\n */\n@Component({\n selector: 'et-query-devtools-json',\n template: `\n @if (isContainer()) {\n <div class=\"et-query-devtools-json-node\">\n <div class=\"et-query-devtools-json-row\">\n <button\n [attr.aria-expanded]=\"effectiveExpanded()\"\n (click)=\"toggle()\"\n class=\"et-query-devtools-json-toggle\"\n type=\"button\"\n >\n <span class=\"et-query-devtools-json-caret\">{{ effectiveExpanded() ? '▾' : '▸' }}</span>\n @if (chunk(); as chunk) {\n <span class=\"et-query-devtools-json-chunk\">{{ chunk.label }}</span>\n } @else if (nodeKey() !== null) {\n <span [class.et-query-devtools-json-hit]=\"keyHit()\" class=\"et-query-devtools-json-key\">{{\n nodeKey()\n }}</span>\n <span class=\"et-query-devtools-json-colon\">:</span>\n }\n <span class=\"et-query-devtools-json-preview\">{{ preview() }}</span>\n @if (annotation(); as annotation) {\n <span [title]=\"annotationTitle()\" class=\"et-query-devtools-json-type\">{{ annotation }}</span>\n }\n </button>\n <button\n [attr.aria-label]=\"copyLabel()\"\n [title]=\"copyLabel()\"\n [class.et-query-devtools-json-copy--copied]=\"copied()\"\n (click)=\"copy('value')\"\n class=\"et-query-devtools-json-copy\"\n type=\"button\"\n >\n {{ copied() ? '✓' : '⧉' }}\n </button>\n @if (addressable()) {\n <et-query-devtools-copy-menu [parentKind]=\"parentKind()\" (pick)=\"copy($event)\" />\n }\n @if (overrides(); as overrides) {\n <et-query-devtools-override-menu\n [value]=\"value()\"\n [path]=\"jsonPath()\"\n [parentKind]=\"parentKind()\"\n [overrides]=\"overrides\"\n />\n }\n </div>\n\n @if (effectiveExpanded()) {\n <div class=\"et-query-devtools-json-children\">\n @for (childChunk of childChunks(); track childChunk.start) {\n <et-query-devtools-json\n [value]=\"value()\"\n [chunk]=\"childChunk\"\n [depth]=\"depth()\"\n [path]=\"path()\"\n [jsonPath]=\"jsonPath()\"\n [parentKind]=\"parentKind()\"\n [overrides]=\"overrides()\"\n [annotations]=\"annotations()\"\n [search]=\"search()\"\n [expandedPaths]=\"expandedPaths()\"\n [collapsedPaths]=\"collapsedPaths()\"\n [toggleFn]=\"toggleFn()\"\n />\n }\n @for (entry of visibleEntries(); track entry.k) {\n <et-query-devtools-json\n [value]=\"entry.v\"\n [nodeKey]=\"entry.k\"\n [depth]=\"depth() + 1\"\n [path]=\"childPath(entry.k)\"\n [jsonPath]=\"childJsonPath(entry.k)\"\n [parentKind]=\"kind()\"\n [overrides]=\"overrides()\"\n [annotations]=\"annotations()\"\n [search]=\"search()\"\n [expandedPaths]=\"expandedPaths()\"\n [collapsedPaths]=\"collapsedPaths()\"\n [toggleFn]=\"toggleFn()\"\n />\n }\n </div>\n }\n </div>\n } @else {\n <div [attr.data-kind]=\"kind()\" class=\"et-query-devtools-json-row et-query-devtools-json-leaf\">\n @if (nodeKey() !== null) {\n <span [class.et-query-devtools-json-hit]=\"keyHit()\" class=\"et-query-devtools-json-key\">{{ nodeKey() }}</span>\n <span class=\"et-query-devtools-json-colon\">:</span>\n }\n <span [class.et-query-devtools-json-hit]=\"valueHit()\" class=\"et-query-devtools-json-value\">{{\n display()\n }}</span>\n @if (annotation(); as annotation) {\n <span [title]=\"annotationTitle()\" class=\"et-query-devtools-json-type\">{{ annotation }}</span>\n }\n <button\n [attr.aria-label]=\"copyLabel()\"\n [title]=\"copyLabel()\"\n [class.et-query-devtools-json-copy--copied]=\"copied()\"\n (click)=\"copy('value')\"\n class=\"et-query-devtools-json-copy\"\n type=\"button\"\n >\n {{ copied() ? '✓' : '⧉' }}\n </button>\n @if (addressable()) {\n <et-query-devtools-copy-menu [parentKind]=\"parentKind()\" (pick)=\"copy($event)\" />\n }\n @if (overrides(); as overrides) {\n <et-query-devtools-override-menu\n [value]=\"value()\"\n [path]=\"jsonPath()\"\n [parentKind]=\"parentKind()\"\n [overrides]=\"overrides\"\n />\n }\n </div>\n }\n `,\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsJsonComponent, QueryDevtoolsCopyMenuComponent, QueryDevtoolsOverrideMenuComponent],\n})\nexport class QueryDevtoolsJsonComponent {\n public value = input<unknown>();\n public nodeKey = input<string | null>(null);\n public depth = input(0, { transform: numberAttribute });\n /** Lowercased search term; when set, the tree auto-expands and matches are highlighted. */\n public search = input('');\n\n /**\n * When set, this node is not the value itself but a folded window over its entries. It shares the\n * container's `path` so a child's persisted expansion does not depend on where the slice borders land.\n */\n public chunk = input<JsonChunk | null>(null);\n\n /** Full path of this node from the explorer root, used as the key for persisted expansion. */\n public path = input('');\n /** Persisted paths explicitly expanded (overrides the depth default). */\n public expandedPaths = input<ReadonlySet<string> | null>(null);\n /** Persisted paths explicitly collapsed (overrides the depth default). */\n public collapsedPaths = input<ReadonlySet<string> | null>(null);\n /** When provided, expansion is externally persisted via this callback instead of local state. */\n public toggleFn = input<((path: string, expand: boolean) => void) | null>(null);\n\n /** Same node as {@link path}, but as the array-of-steps an override op targets rather than a display key. */\n public jsonPath = input<JsonPath>([]);\n /** The kind of the container holding this node, so its override menu can offer \"duplicate this item\". */\n public parentKind = input<JsonKind | null>(null);\n /** When provided, every node renders an override menu that arms/clears ops through it. */\n public overrides = input<QueryDevtoolsOverridesRecorder | null>(null);\n\n /**\n * The declared type of each field, keyed by its path with array indices as `*` (`items.*.id`) - as\n * {@link QueryDevtoolsSchemaSeed} produces it. A node with an entry labels itself with it.\n */\n public annotations = input<ReadonlyMap<string, string> | null>(null);\n\n protected kind = computed(() => kindOf(this.value()));\n private exotic = computed(() => exoticOf(this.value()));\n\n /** One annotation covers every element of an array, so the lookup path forgets which index this is. */\n private shapePath = computed(() =>\n this.path()\n .split('.')\n .map((step) => (/^\\d+$/.test(step) ? '*' : step))\n .join('.'),\n );\n\n protected annotation = computed(() => (this.chunk() ? null : (this.annotations()?.get(this.shapePath()) ?? null)));\n\n protected annotationTitle = computed(() => `Declared in the API description as ${this.annotation()}`);\n\n /** A `Date` or a `File` is object-typed but has nothing to expand into, so it renders as a leaf. */\n protected isContainer = computed(\n () => (this.kind() === 'array' || this.kind() === 'object') && !this.exotic()?.display,\n );\n\n /** The entries this node covers: the container's own, or just the window a chunk stands for. */\n public ownEntries = computed<JsonEntry[]>(() => {\n const entries = entriesOf(this.value());\n const chunk = this.chunk();\n\n return chunk ? entries.slice(chunk.start, chunk.end) : entries;\n });\n\n protected childChunks = computed(() => {\n const entries = this.ownEntries();\n if (entries.length <= CHUNK_SIZE) return [];\n\n return buildChunks(entries, { offset: this.chunk()?.start ?? 0, isArray: this.kind() === 'array' });\n });\n\n /** Entries rendered as rows - empty while they are folded into slices instead. */\n protected visibleEntries = computed(() => (this.childChunks().length ? [] : this.ownEntries()));\n\n /** Slices carry their window in the key so siblings persist independently of the container. */\n private togglePath = computed(() => {\n const chunk = this.chunk();\n\n return chunk ? `${this.path()}#${chunk.start}` : this.path();\n });\n\n private defaultExpanded = computed(() => !this.chunk() && this.depth() < 1);\n\n private localExpanded = linkedSignal(() => this.defaultExpanded());\n\n protected expanded = computed(() => {\n // Externally-persisted mode: resolve from the expanded/collapsed path sets, else the depth default.\n if (this.toggleFn()) {\n const path = this.togglePath();\n\n if (this.collapsedPaths()?.has(path)) return false;\n if (this.expandedPaths()?.has(path)) return true;\n\n return this.defaultExpanded();\n }\n\n return this.localExpanded();\n });\n\n /** Only slices that actually contain a match unfold while searching, so a filter stays cheap. */\n private chunkHasHit = computed(() => {\n const term = this.search();\n\n return !!term && this.ownEntries().some(({ k, v }) => k.toLowerCase().includes(term) || matchesDeep(v, term));\n });\n\n protected effectiveExpanded = computed(() => {\n if (!this.search()) return this.expanded();\n\n return this.chunk() ? this.chunkHasHit() : true;\n });\n\n /** What the last copy put on the clipboard, or `null` once the tick has expired. */\n protected copied = signal<QueryDevtoolsCopyPayload | null>(null);\n private copiedReset$ = new Subject<void>();\n\n /**\n * Whether this node has an address of its own to copy. An explorer root has no key, and a folded\n * slice stands for a range of entries rather than one path - neither can name itself.\n */\n protected addressable = computed(() => this.nodeKey() !== null && !this.chunk());\n\n private valueLabel = computed(() => {\n const count = this.ownEntries().length;\n\n if (this.chunk()) return `slice (${count} ${count === 1 ? 'entry' : 'entries'})`;\n\n if (this.kind() === 'array') return `array (${count} ${count === 1 ? 'item' : 'items'})`;\n\n if (this.kind() === 'object') return `object (${count} ${count === 1 ? 'key' : 'keys'})`;\n\n return 'value';\n });\n\n /**\n * Doubles as the button's `title` and its `aria-label`, and names what landed while the tick is up -\n * a bare `✓` stopped being unambiguous once the menu put four payloads behind one control.\n */\n protected copyLabel = computed(() => {\n const copied = this.copied();\n\n if (copied) return `Copied the ${copied === 'entry' ? '\"key\": value pair' : copied}`;\n\n return `Copy ${this.valueLabel()}`;\n });\n\n protected preview = computed(() => {\n const count = this.ownEntries().length;\n\n if (this.kind() === 'array') return count ? `[…] ${count}` : '[]';\n\n const typeName = this.exotic()?.typeName;\n if (typeName) return `${typeName}(${count})`;\n\n return count ? `{…} ${count}` : '{}';\n });\n\n protected display = computed(() => displayOf(this.value()));\n\n protected keyHit = computed(() => {\n const term = this.search();\n const key = this.nodeKey();\n return !!term && !!key && key.toLowerCase().includes(term);\n });\n\n protected valueHit = computed(() => {\n const term = this.search();\n return !!term && this.display().toLowerCase().includes(term);\n });\n\n constructor() {\n injectStyleManager().mount(QueryDevtoolsJsonStylesComponent);\n\n // Each copy restarts the tick countdown; switchMap drops the pending reset of the previous one.\n this.copiedReset$\n .pipe(\n switchMap(() => timer(COPIED_RESET_MS)),\n tap(() => this.copied.set(null)),\n takeUntilDestroyed(),\n )\n .subscribe();\n }\n\n protected childPath(key: string) {\n const path = this.path();\n return path ? `${path}.${key}` : key;\n }\n\n protected childJsonPath(key: string): JsonPath {\n const step: string | number = this.kind() === 'array' ? Number(key) : key;\n return [...this.jsonPath(), step];\n }\n\n protected toggle() {\n const toggleFn = this.toggleFn();\n\n if (toggleFn) {\n toggleFn(this.togglePath(), !this.expanded());\n\n return;\n }\n\n this.localExpanded.set(!this.localExpanded());\n }\n\n /**\n * Writes one of the node's four pasteable forms. All of them go through here so the tick stays a\n * single readout of what actually landed.\n */\n protected copy(payload: QueryDevtoolsCopyPayload) {\n const text = this.copyTextFor(payload);\n\n if (text === null) return;\n\n navigator.clipboard\n ?.writeText(text)\n .then(() => this.flagCopied(payload))\n .catch(() => undefined);\n }\n\n /**\n * Containers copy their whole subtree as JSON, slices only the entries they cover; leaves copy\n * something pasteable - a raw string without the display quotes, so an id or url can go straight\n * into a search box. `null` for a subtree that cannot be serialized at all.\n */\n private copyTextFor(payload: QueryDevtoolsCopyPayload): string | null {\n if (payload === 'key') return this.nodeKey();\n if (payload === 'path') return formatJsonPath(this.jsonPath());\n\n const kind = this.kind();\n const exotic = this.exotic();\n const value = this.chunk() ? this.chunkValue() : this.copyableValue();\n\n try {\n if (payload === 'entry') return `${JSON.stringify(this.nodeKey())}: ${JSON.stringify(value, null, 2)}`;\n\n if (kind === 'string') return value as string;\n if (kind === 'undefined') return 'undefined';\n if (exotic?.display) return exotic.display;\n\n return JSON.stringify(value, null, 2);\n } catch {\n // Circular references (or a BigInt / toJSON that throws) make the subtree unserializable.\n return null;\n }\n }\n\n /** An exotic container copies the entries the tree shows, not the private fields `JSON.stringify` finds. */\n private copyableValue() {\n const entries = this.exotic()?.entries;\n\n return entries ? Object.fromEntries(entries.map((entry) => [entry.k, entry.v])) : this.value();\n }\n\n private chunkValue() {\n const entries = this.ownEntries();\n\n if (this.kind() === 'array') return entries.map((entry) => entry.v);\n\n return Object.fromEntries(entries.map((entry) => [entry.k, entry.v]));\n }\n\n private flagCopied(payload: QueryDevtoolsCopyPayload) {\n this.copied.set(payload);\n this.copiedReset$.next();\n }\n}\n\n// Below the component: an interpolated template literal above an inline template breaks the Angular\n// language service for the whole template (see `ethlete/no-template-literal-before-inline-template`).\n\nconst displayOf = (value: unknown) => {\n const exotic = exoticOf(value);\n if (exotic?.display) return `${exotic.typeName}(${exotic.display})`;\n\n switch (kindOf(value)) {\n case 'string':\n return `\"${value as string}\"`;\n case 'null':\n return 'null';\n case 'undefined':\n return 'undefined';\n default:\n return String(value);\n }\n};\n\nconst buildChunks = (entries: JsonEntry[], window: { offset: number; isArray: boolean }): JsonChunk[] => {\n const size = chunkSizeFor(entries.length);\n const chunks: JsonChunk[] = [];\n\n for (let i = 0; i < entries.length; i += size) {\n const slice = entries.slice(i, i + size);\n const start = window.offset + i;\n const end = start + slice.length;\n const first = window.isArray ? String(start) : (slice[0]?.k ?? '');\n const last = window.isArray ? String(end - 1) : (slice[slice.length - 1]?.k ?? '');\n\n chunks.push({ start, end, label: slice.length === 1 ? first : `${first} … ${last}` });\n }\n\n return chunks;\n};\n\n/** Whether a search term appears anywhere in a subtree - used to keep non-matching slices folded. */\nconst matchesDeep = (value: unknown, term: string): boolean => {\n if (!value || typeof value !== 'object' || exoticOf(value)?.display) {\n return displayOf(value).toLowerCase().includes(term);\n }\n\n return entriesOf(value).some(({ k, v }) => k.toLowerCase().includes(term) || matchesDeep(v, term));\n};\n","import { inject, InjectionToken, Signal, WritableSignal } from '@angular/core';\nimport {\n AnyBearerAuthProvider,\n AnyPagedQueryStack,\n AnyQueryBatch,\n AnyQuerySnapshot,\n AnyQueryStack,\n QueryClient,\n QueryDevtoolsEntry,\n QueryDevtoolsFault,\n QueryDevtoolsFeature,\n QueryDevtoolsFormHandle,\n QueryDevtoolsRun,\n QueryDevtoolsRunError,\n QueryRefreshCause,\n QueryRepository,\n QueryRepositoryCacheEntry,\n QuerySequence,\n QuerySequenceStatus,\n WebSocketDevtoolsHandle,\n WebSocketDevtoolsMessage,\n} from '@ethlete/query';\nimport { QueryDevtoolsDiff } from './query-devtools-diff';\nimport { DevtoolsLockRow } from './query-devtools-locks';\nimport {\n AnyQuery,\n BatchItemView,\n CacheView,\n DetailTab,\n DevtoolsTab,\n EventLogItem,\n PaneAxis,\n PaneTarget,\n QueryActivity,\n QueryDevtoolsChip,\n QueryDevtoolsSelection,\n QueryDevtoolsTokenLifetime,\n QueryLink,\n QueryListFacet,\n RepositoryInfo,\n RequestProgress,\n RouteSegment,\n TabBadge,\n} from './query-devtools-types';\n\n/**\n * Everything a tab or the shared detail drawer reads from - or writes back into - the always-mounted\n * `<et-query-devtools>` panel: cross-tab registries, the JIT editor, copy/export actions, the value\n * explorer and pane sizing. A tab component only ever exists while it is the active one, so anything a\n * tab needs to survive being switched away from (a drawer's own selection, the persisted panel chrome)\n * has to live here instead of on the tab itself. Every member below is named and shaped exactly like the\n * panel's own field/method it stands in for.\n *\n * @see injectQueryDevtoolsHost\n */\nexport type QueryDevtoolsHost = {\n selectTab(tab: DevtoolsTab): void;\n\n /** Jumps to the Queries tab with this query selected - the Events tab is a way in, not a dead end. */\n selectQuery(id: string): void;\n\n /** Jumps to the Forms tab with this form selected. */\n selectForm(id: string): void;\n\n queryEntries: Signal<QueryDevtoolsEntry[]>;\n stackEntries: Signal<QueryDevtoolsEntry[]>;\n sequenceEntries: Signal<QueryDevtoolsEntry[]>;\n batchEntries: Signal<QueryDevtoolsEntry[]>;\n formEntries: Signal<QueryDevtoolsEntry[]>;\n authEntries: Signal<QueryDevtoolsEntry[]>;\n wsEntries: Signal<QueryDevtoolsEntry[]>;\n repositories: Signal<RepositoryInfo[]>;\n\n /**\n * The cache per client, with every entry's size measured. Reading each response inside the computed is\n * what keeps the totals current: a cache mutation bumps `cacheVersion`, but a response landing in an\n * entry that is already there does not.\n */\n cacheView: Signal<CacheView[]>;\n refetchCacheEntry(entry: QueryRepositoryCacheEntry): void;\n evictCacheEntry(repository: QueryRepository, key: string): void;\n /** Drops every entry of one client, consumers included - the cold-start check that does not need a reload. */\n evictAllCacheEntries(repository: QueryRepository): void;\n toggleCacheValue(clientName: string, key: string): void;\n isCacheValueExpanded(clientName: string, key: string): boolean;\n cacheFreshness(entry: QueryRepositoryCacheEntry): string;\n cacheSync(entry: QueryRepositoryCacheEntry, pollStates: Record<string, unknown>): string;\n cachePersistence(entry: QueryRepositoryCacheEntry): string;\n /** How many responses this client has on disk, which is usually more than it has in memory. */\n persistedCount(client: QueryClient): number;\n clearPersistedQueries(client: QueryClient): void;\n /** The features of the client behind a cache tab card, or `null` for a client without any. */\n clientFeatures(client: QueryClient | null | undefined): QueryDevtoolsFeature[] | null;\n\n /**\n * Every Web Lock held or queued across this origin, decoded, or `null` in a browser without the Web\n * Locks API. Empty while the Locks tab has not read its first snapshot - it polls, because Web Locks\n * has no change event to listen to.\n */\n lockRows: Signal<DevtoolsLockRow[] | null>;\n /** Where this tab stands on one lock, as a chip: whether it holds it, waits for it, or is not in it. */\n lockStanding(row: DevtoolsLockRow): QueryDevtoolsChip;\n\n /** Unique client names present across queries and auth providers, for the Queries/Timeline pickers. */\n clientNames: Signal<string[]>;\n\n /** What each tab holds - also drives the tab bar's own badges, so it lives here rather than per-tab. */\n tabBadges: Signal<Record<DevtoolsTab, TabBadge>>;\n\n /**\n * Every client the Faults tab can arm, with the fault it currently carries. Also feeds the\n * cross-tab \"Faults armed\" banner and the session export, so it lives here rather than on the tab.\n */\n faultClients: Signal<{ name: string; baseUrl: string; fault: QueryDevtoolsFault; armed: boolean }[]>;\n\n /**\n * The queries in scope before the Queries tab's own search box and status chips narrow them further:\n * either the picked client's, or exactly the inspected element's. Also what the Timeline tab scopes\n * its runs to, which is why this lives here rather than on the Queries tab alone.\n */\n scopedQueries: Signal<QueryDevtoolsEntry[]>;\n\n /** 1-second tick driving every countdown/freshness readout across tabs. */\n clock: Signal<number>;\n\n findQuery(id: string | null): QueryDevtoolsSelection | null;\n queryLinkFor(entry: QueryDevtoolsEntry | undefined, query?: AnyQuery): QueryLink;\n\n asStack(entry: QueryDevtoolsEntry): AnyQueryStack;\n asPagedStack(entry: QueryDevtoolsEntry): AnyPagedQueryStack;\n asSequence(entry: QueryDevtoolsEntry): QuerySequence<unknown[]>;\n asBatch(entry: QueryDevtoolsEntry): AnyQueryBatch;\n asAuth(entry: QueryDevtoolsEntry): AnyBearerAuthProvider;\n asWs(entry: QueryDevtoolsEntry): WebSocketDevtoolsHandle;\n asForm(entry: QueryDevtoolsEntry): QueryDevtoolsFormHandle;\n\n authTokenPayload(auth: AnyBearerAuthProvider): Record<string, unknown> | null;\n authQueryKeys(auth: AnyBearerAuthProvider): string[];\n /** The access-token expiry the app acts on, plus the lifetime the panel has armed over it. */\n authTokenLifetime(entry: QueryDevtoolsEntry): QueryDevtoolsTokenLifetime;\n /** The multi-tab leadership chip, or `null` for a provider without `withBearerAuthMultiTabSync`. */\n authLeadership(auth: AnyBearerAuthProvider): QueryDevtoolsChip | null;\n\n queryStatus(query: AnyQuery): 'idle' | 'loading' | 'success' | 'error';\n isStale(query: AnyQuery): boolean;\n /** Whether an entry is showing an armed response override or a devtools-faulted outcome. */\n isTampered(entry: QueryDevtoolsEntry): boolean;\n /** Whether armed response overrides are stored and replayed on the next load. */\n overridesPersist(): boolean;\n toggleOverridesPersist(): void;\n /** Where they are kept, named for a title or a hint (`sessionStorage`, `localStorage`, `not kept`). */\n overridesScopeLabel(): string;\n /** Puts the panel's layout, filters, pins and stored overrides back to defaults, keeping the settings. */\n resetDevtools(): void;\n requestProgress(query: AnyQuery): RequestProgress | null;\n retryCause(status: number): string;\n requestUrl(query: AnyQuery): string | null;\n requestPath(url: string): string;\n queryArgs(query: AnyQuery): unknown;\n routeSegments(entry: QueryDevtoolsEntry | undefined, query: AnyQuery): RouteSegment[];\n queryActivity(entry: QueryDevtoolsEntry): QueryActivity;\n linkActivity(link: QueryLink): QueryActivity;\n stackActivity(stack: AnyQueryStack | AnyPagedQueryStack): QueryActivity;\n sequenceActivity(sequence: QuerySequence<unknown[]>): QueryActivity;\n queriesForStack(stack: AnyQueryStack | AnyPagedQueryStack): QueryLink[];\n queriesForSequence(sequence: QuerySequence<unknown[]>): QueryLink[];\n /**\n * The queries a form feeds, discovered from the reads its `value()` recorded while their args were\n * built - so a form that nothing consumes yet reads as exactly that.\n */\n queriesDrivenByForm(entry: QueryDevtoolsEntry): QueryLink[];\n sequenceStepStatus(sequence: QuerySequence<unknown[]>, index: number): QuerySequenceStatus;\n stepSnapshot(sequence: QuerySequence<unknown[]>, index: number): AnyQuerySnapshot | null;\n /** Whether a sequence step's in/out detail (`<entryId>:<stepIndex>`) is expanded - persisted. */\n isStepExpanded(entryId: string, index: number): boolean;\n toggleStep(entryId: string, index: number): void;\n\n /** A batch's route with its path params left as `:name` - a batch fills them in per item, not once. */\n batchRouteSegments(entry: QueryDevtoolsEntry): RouteSegment[];\n\n /**\n * The batch entry that created a query, or `null` for a query no batch did. What lets the Queries list\n * fold a bulk run's items under one row instead of listing whatever it has in flight.\n */\n batchOf(entry: QueryDevtoolsEntry): QueryDevtoolsEntry | null;\n\n /**\n * The item queries a batch has in flight. Only those: a batch destroys each item's query the moment\n * that item settles, so a settled item is read from {@link batchItems} instead.\n */\n queriesForBatch(entry: QueryDevtoolsEntry): QueryLink[];\n\n /** A batch's settled items, failures first and capped - see {@link BatchItemView}. */\n batchItems(entry: QueryDevtoolsEntry): BatchItemView;\n\n /**\n * The registry entry of one of a batch's items, or `null` once it has fallen out of the batch's capped\n * tombstone tail - which is what makes an item row openable only while its query is still kept.\n */\n batchItemQueryId(entry: QueryDevtoolsEntry, index: number): string | null;\n\n /** An item's throughput line (`12.4 items/s · ~8s left`), or `null` before there is a rate to show. */\n batchThroughput(batch: AnyQueryBatch): string | null;\n\n /** Whether a batch item's args/response detail (`<entryId>:<itemIndex>`) is expanded - persisted. */\n isBatchItemExpanded(entryId: string, index: number): boolean;\n toggleBatchItem(entryId: string, index: number): void;\n /** Keys of the Queries-list groups of identical rows the user opened - persisted. */\n expandedQueryGroups: Signal<ReadonlySet<string>>;\n toggleQueryGroup(key: string): void;\n expandQueryGroup(key: string): void;\n /** Which way the Queries list sorts by last-executed time - persisted. */\n queryRecentFirst: WritableSignal<boolean>;\n /** Whether the Queries list is arranged as a tree of route paths instead of a flat list - persisted. */\n queryTreeView: WritableSignal<boolean>;\n /** The path folders the user closed. Collapsed, not expanded - a tree opens open. */\n collapsedQueryPaths: Signal<ReadonlySet<string>>;\n toggleQueryPath(key: string): void;\n /** The element a query was created in, or `null` for one created outside a component/directive. */\n locatableElement(entry: QueryDevtoolsEntry): HTMLElement | null;\n locateQuery(entry: QueryDevtoolsEntry): void;\n locateState: Signal<'idle' | 'located' | 'offscreen'>;\n resetStats(entry: QueryDevtoolsEntry): void;\n executeQuery(selection: QueryDevtoolsSelection, allowCache: boolean): void;\n resetQuery(query: AnyQuery): void;\n\n formatDuration(ms: number | null): string;\n formatBytes(bytes: number): string;\n formatTransferred(bytes: number, isEstimated: boolean): string;\n formatSpeed(bytesPerSecond: number): string;\n formatPercent(percentage: number): string;\n formatCountdown(ms: number | null): string;\n formatTime(timestamp: number | null): string;\n gqlDocument(doc: string): string;\n inlineValue(value: unknown): string;\n featureLabel(type: string): string;\n featureSummary(feature: QueryDevtoolsFeature): string;\n\n // --- Shared detail drawer state (one instance across every tab's drawer - see the type doc) ---\n\n detailTab: WritableSignal<DetailTab>;\n\n editorMode: WritableSignal<'none' | 'response' | 'args'>;\n responseDraft: WritableSignal<string>;\n argsDraft: WritableSignal<string>;\n /** The text the currently open editor was seeded with - not a signal, see the field's own doc. */\n editorSeed: string;\n editError: Signal<string | null>;\n openResponseEditor(query: AnyQuery): void;\n openArgsEditor(selection: QueryDevtoolsSelection): void;\n applyResponse(query: AnyQuery): void;\n applyArgs(query: AnyQuery): void;\n cancelEditor(): void;\n\n forceLoading(query: AnyQuery): void;\n forceError(query: AnyQuery): void;\n forceEmpty(query: AnyQuery): void;\n clearForced(query: AnyQuery): void;\n\n diffRunIndex: WritableSignal<number | null>;\n\n /** The run the diff compares against, or `null` to derive it - see the panel's own field. */\n diffBaseRunIndex: WritableSignal<number | null>;\n\n toggleRunDiff(entry: QueryDevtoolsEntry, run: QueryDevtoolsRun): void;\n /** Which end of the open diff a run is, or `null` if it is not one of the two. */\n diffRunRole(entry: QueryDevtoolsEntry, run: QueryDevtoolsRun): 'base' | 'compare' | null;\n responseDiff(\n entry: QueryDevtoolsEntry,\n ): { before: QueryDevtoolsRun; after: QueryDevtoolsRun; diff: QueryDevtoolsDiff } | null;\n canDiffRun(entry: QueryDevtoolsEntry, run: QueryDevtoolsRun): boolean;\n queryRuns(entry: QueryDevtoolsEntry): QueryDevtoolsRun[];\n runStatus(run: QueryDevtoolsRun): string;\n\n /** How many bodies a query retains, which is what bounds how far back a diff can reach. */\n retainedResponseCount: Signal<number>;\n\n /** Moves the whole response diff one run older or newer, from the diff header. */\n canStepRunDiff(entry: QueryDevtoolsEntry, older: boolean): boolean;\n stepRunDiff(entry: QueryDevtoolsEntry, older: boolean): void;\n\n errorRunIndex: WritableSignal<number | null>;\n toggleRunError(run: QueryDevtoolsRun): void;\n pickedRunError(entry: QueryDevtoolsEntry): { run: QueryDevtoolsRun; error: QueryDevtoolsRunError } | null;\n\n copiedReport: Signal<boolean>;\n copiedInsomnia: Signal<boolean>;\n copiedCurl: Signal<boolean>;\n copiedGql: Signal<boolean>;\n copiedRoute: Signal<boolean>;\n copyReport(entry: QueryDevtoolsEntry, query: AnyQuery): void;\n copyInsomniaRequest(entry: QueryDevtoolsEntry, query: AnyQuery): void;\n copyCurlRequest(entry: QueryDevtoolsEntry, query: AnyQuery): void;\n copyGqlDocument(doc: string): void;\n /** The absolute URL of the last request, or the rendered route for a query that has not run. */\n copyableRoute(entry: QueryDevtoolsEntry, query: AnyQuery): string;\n copyableRouteTitle(entry: QueryDevtoolsEntry, query: AnyQuery): string;\n copyRoute(entry: QueryDevtoolsEntry, query: AnyQuery): void;\n\n refreshesFor(entryId: string): { id: number; timestamp: number; label: string }[];\n /** What asked for a refresh, on one line - shared by the drawer's \"Refetched by\" and the Events tab. */\n causeLabel(cause: QueryRefreshCause): string;\n formsDrivingQuery(entry: QueryDevtoolsEntry): QueryDevtoolsEntry[];\n\n /** Shared value-explorer search term, read (and set) from every drawer's Data sub-tab. */\n jsonSearch: WritableSignal<string>;\n jsonSearchTerm: Signal<string>;\n jsonExpandedPaths: Signal<ReadonlySet<string>>;\n jsonCollapsedPaths: Signal<ReadonlySet<string>>;\n toggleJsonPath(path: string, expand: boolean): void;\n\n // --- Queries tab state (persisted, so it has to survive the tab being switched away from) ---\n\n selectedClientName: WritableSignal<string | null>;\n selectedQueryId: WritableSignal<string | null>;\n selectedQuery: Signal<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>;\n queryFilter: WritableSignal<string>;\n queryFacets: WritableSignal<ReadonlySet<QueryListFacet>>;\n\n /** The entry ids sorted to the top of the Queries list. Persisted apart from the rest - see the panel. */\n pinnedQueryIds: Signal<ReadonlySet<string>>;\n isQueryPinned(entry: QueryDevtoolsEntry): boolean;\n toggleQueryPin(entry: QueryDevtoolsEntry): void;\n\n /** When set (via inspect), the Queries list is filtered to exactly these entry ids. */\n inspectFilterIds: WritableSignal<string[] | null>;\n\n selectClient(name: string | null): void;\n clearInspectFilter(): void;\n toggleFacet(facet: QueryListFacet): void;\n /** Drops the search term and the status chips, keeping the client / inspection scope. */\n clearQueryFilters(): void;\n\n /**\n * Downloads the given queries (already scoped/filtered by the caller) as one Insomnia collection,\n * filed into a folder per query client.\n */\n downloadInsomniaCollection(items: { entry: QueryDevtoolsEntry; query: AnyQuery }[], clientLabel: string | null): void;\n\n /** Downloads a file a tab generated. The panel does it because the panel owns the download injector. */\n downloadTextFile(file: { name: string; content: string; type: string }): void;\n\n // --- Per-tab drawer selections (deliberately not shared with each other, but each has to survive its\n // own tab being switched away from, so - like the Queries tab's selection above - they live here) ---\n\n stackSelectedQueryId: WritableSignal<string | null>;\n stackSelectedQuery: Signal<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>;\n sequenceSelectedQueryId: WritableSignal<string | null>;\n sequenceSelectedQuery: Signal<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>;\n batchSelectedQueryId: WritableSignal<string | null>;\n batchSelectedQuery: Signal<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>;\n eventSelectedQueryId: WritableSignal<string | null>;\n eventSelectedQuery: Signal<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>;\n formSelectedQueryId: WritableSignal<string | null>;\n formSelectedQuery: Signal<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>;\n\n /** The form whose detail the Forms tab has expanded - persisted. */\n selectedFormId: WritableSignal<string | null>;\n\n /** The rolling event log - persisted only in the sense that it survives a tab switch, not a reload. */\n eventLog: WritableSignal<EventLogItem[]>;\n /** The client (by base URL) the event log is scoped to, or `null` for all of them - persisted. */\n eventClient: WritableSignal<string | null>;\n /** Whether the event log is narrowed to failures - persisted. */\n eventErrorsOnly: WritableSignal<boolean>;\n\n /** Free-text narrowing of every socket's message log - persisted. */\n socketFilter: WritableSignal<string>;\n socketMessages(ws: WebSocketDevtoolsHandle): WebSocketDevtoolsMessage[];\n socketDirectionLabel(message: WebSocketDevtoolsMessage): string;\n emitSocketMessage(options: { entry: QueryDevtoolsEntry; event: string; data: string }): void;\n /** The message an emit box last failed with, if this is the socket it failed on. */\n socketEmitErrorFor(entryId: string): string | null;\n timelineSelectedQueryId: WritableSignal<string | null>;\n timelineSelectedQuery: Signal<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>;\n\n // --- Two-pane tab sizing (the divider between a tab's list and its drawer) ---\n\n paneAxis: Signal<PaneAxis>;\n listWidth: Signal<number | null>;\n drawerWidth: Signal<number | null>;\n listHeight: Signal<number | null>;\n drawerHeight: Signal<number | null>;\n startPaneResize(event: PointerEvent, target: { pane: PaneTarget; container: HTMLElement }): void;\n resetPaneSize(pane: PaneTarget): void;\n};\n\nexport const QUERY_DEVTOOLS_HOST = new InjectionToken<QueryDevtoolsHost>('QUERY_DEVTOOLS_HOST');\n\n/** Injects the panel a tab or the detail drawer is rendered inside of. @see QueryDevtoolsHost */\nexport const injectQueryDevtoolsHost = (): QueryDevtoolsHost => inject(QUERY_DEVTOOLS_HOST);\n","import { Component, computed, signal, ViewEncapsulation } from '@angular/core';\nimport {\n armAllQueryDevtoolsMocks,\n clearQueryDevtoolsArmedMocks,\n clearQueryDevtoolsFaults,\n queryDevtoolsArmedMocks,\n queryDevtoolsMocks,\n queryDevtoolsResponseHistory,\n queryDevtoolsSettings,\n QueryDevtoolsStorageScope,\n setQueryDevtoolsArmedMocksScope,\n setQueryDevtoolsFaultsScope,\n setQueryDevtoolsOverridesScope,\n setQueryDevtoolsSettings,\n} from '@ethlete/query';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\n\ntype ScopeKey = 'viewState' | 'pins' | 'overrides' | 'mocks' | 'armedMocks' | 'armedFaults';\n\ntype ScopeRow = {\n key: ScopeKey;\n label: string;\n\n /** What is kept, and what `none` costs - the one thing a scope picker cannot show on its own. */\n hint: string;\n\n /**\n * What to say on the scopes that let this state outlive the page that armed it - a picker cannot show\n * that an app is about to start lying to itself before anyone opens the panel.\n */\n warn?: { scopes: QueryDevtoolsStorageScope[]; text: string };\n};\n\ntype LimitKey = 'maxEvents' | 'maxDroppedCacheEntries';\n\ntype LimitRow = { key: LimitKey; label: string; min: number; max: number; step: number; hint: string };\n\nconst SCOPE_ROWS: ScopeRow[] = [\n {\n key: 'viewState',\n label: 'Panel view state',\n hint: 'Where the panel sits, how big it is, the open tab, every filter and the selected query. Set none to forget all of it on each reload.',\n },\n {\n key: 'pins',\n label: 'Pinned queries',\n hint: 'Which queries sort to the top of the list. Local outlives the tab, because a pin says what you are working on rather than what you are looking at.',\n },\n {\n key: 'overrides',\n label: 'Response overrides',\n hint: 'Armed edits, replayed as queries register - before their first fetch. None is the default: a reload is how the app stops being lied to.',\n warn: {\n scopes: ['local'],\n text: 'Armed overrides now outlive closing the tab. An app that stays tampered with across days is hours of debugging the wrong thing - the bar above the tabs says when they came back.',\n },\n },\n {\n key: 'mocks',\n label: 'Designed mocks',\n hint: 'The library you authored, not whether any of it is armed - arming has its own scope below.',\n },\n {\n key: 'armedMocks',\n label: 'Armed mocks',\n hint: 'Which of the library is served. None is the default: a reload is how the app goes back to talking to the API.',\n warn: {\n scopes: ['session', 'local'],\n text: 'The next page load starts serving these routes from the panel, before anyone opens it. The bar above the tabs says when they came back.',\n },\n },\n {\n key: 'armedFaults',\n label: 'Armed faults',\n hint: 'The latency and failures injected per client, budgets included. None is the default, for the same reason as armed mocks.',\n warn: {\n scopes: ['session', 'local'],\n text: 'The next page load starts injecting these failures on its own, so an app that looks broken may only be armed. The bar above the tabs says when they came back.',\n },\n },\n];\n\nconst SCOPES: { value: QueryDevtoolsStorageScope; label: string }[] = [\n { value: 'none', label: 'none' },\n { value: 'session', label: 'session' },\n { value: 'local', label: 'local' },\n];\n\n/**\n * Why IndexedDB - the one store with the quota for a large library of designed data - is not on offer.\n * These are read synchronously: view state and pins in a field initializer of the panel, and overrides\n * inside query registration, before the first request. An async store cannot answer either in time, and a\n * scope that silently arrives late is worse than one that is missing. The mock library is the one that\n * could tolerate arriving late, since nothing is served until a mock is armed by hand.\n */\nconst INDEXED_DB_TITLE =\n 'Unavailable: these are read synchronously - view state before the first render, overrides before the first fetch - and IndexedDB cannot answer in time. Only the mock library could tolerate an async store, and it is not wired to one yet.';\n\nconst LIMIT_ROWS: LimitRow[] = [\n {\n key: 'maxEvents',\n label: 'Events log',\n min: 10,\n max: 1000,\n step: 10,\n hint: 'rows the Events tab keeps. Lowering it trims the log now.',\n },\n {\n key: 'maxDroppedCacheEntries',\n label: 'Dropped cache entries',\n min: 0,\n max: 200,\n step: 5,\n hint: 'per client, remembered so the Cache tab can say why an entry went away. Applies as entries are dropped.',\n },\n];\n\n/**\n * Every panel-wide switch in one place - the storage each kind of state uses, the limits the panel would\n * otherwise hold as constants, and the toggles their own tabs also carry.\n */\n@Component({\n selector: 'et-query-devtools-settings',\n templateUrl: './query-devtools-settings.component.html',\n styleUrl: './query-devtools-settings.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsSettingsComponent {\n protected host = injectQueryDevtoolsHost();\n\n protected readonly SCOPE_ROWS = SCOPE_ROWS;\n protected readonly SCOPES = SCOPES;\n protected readonly INDEXED_DB_TITLE = INDEXED_DB_TITLE;\n protected readonly LIMIT_ROWS = LIMIT_ROWS;\n\n protected readonly ARM_ALL_MOCKS = armAllQueryDevtoolsMocks;\n protected readonly DISARM_ALL_MOCKS = clearQueryDevtoolsArmedMocks;\n protected readonly DISARM_ALL_FAULTS = clearQueryDevtoolsFaults;\n\n /** What queries actually retain, which is the application's value unless this panel raised it. */\n protected responseHistory = computed(queryDevtoolsResponseHistory);\n\n protected mockCount = computed(() => queryDevtoolsMocks().length);\n protected armedMockCount = computed(() => queryDevtoolsArmedMocks().size);\n protected armedFaultCount = computed(() => this.host.faultClients().filter((client) => client.armed).length);\n\n protected resetConfirming = signal(false);\n\n protected settings() {\n return queryDevtoolsSettings();\n }\n\n protected scopeOf(key: ScopeKey) {\n return this.settings()[key];\n }\n\n protected limitOf(key: LimitKey) {\n return this.settings()[key];\n }\n\n /** What the picked scope means beyond where the state is kept, or `null` while it means nothing extra. */\n protected warningFor(row: ScopeRow, scope: QueryDevtoolsStorageScope) {\n return row.warn?.scopes.includes(scope) ? row.warn.text : null;\n }\n\n protected setScope(key: ScopeKey, scope: QueryDevtoolsStorageScope) {\n // Everything armed goes through its own module: changing the scope moves an existing store and\n // captures whatever is armed right now, so the choice reads as \"keep these\".\n if (key === 'overrides') return setQueryDevtoolsOverridesScope(scope);\n if (key === 'armedMocks') return setQueryDevtoolsArmedMocksScope(scope);\n if (key === 'armedFaults') return setQueryDevtoolsFaultsScope(scope);\n\n setQueryDevtoolsSettings(\n key === 'viewState' ? { viewState: scope } : key === 'pins' ? { pins: scope } : { mocks: scope },\n );\n }\n\n protected setLimit(key: LimitKey, value: string) {\n const count = Number(value);\n\n setQueryDevtoolsSettings(key === 'maxEvents' ? { maxEvents: count } : { maxDroppedCacheEntries: count });\n }\n\n protected setResponseHistory(value: string) {\n setQueryDevtoolsSettings({ responseHistory: Number(value) });\n }\n\n /** Hands retention back to `provideQueryDevtools({ responseHistory })`. */\n protected clearResponseHistory() {\n setQueryDevtoolsSettings({ responseHistory: null });\n }\n\n protected reset() {\n this.host.resetDevtools();\n this.resetConfirming.set(false);\n }\n\n protected toggleGoneQueries() {\n this.host.toggleFacet('gone');\n }\n\n protected showsGoneQueries() {\n return this.host.queryFacets().has('gone');\n }\n}\n","<div class=\"et-query-devtools-scroll\">\n <div class=\"et-query-devtools-toolbar et-query-devtools-settings-toolbar\">\n <p class=\"et-query-devtools-hint\">\n Panel-wide, and kept in <code class=\"et-query-devtools-mono\">localStorage</code> whatever the scopes below say -\n so a scope of <em>none</em> does not erase the choice that set it. Every switch under <strong>Mirrored</strong> is\n the same one its own tab carries.\n </p>\n </div>\n\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>Storage</strong>\n <span class=\"et-query-devtools-count\">what survives a reload, and how long</span>\n </div>\n\n @for (row of SCOPE_ROWS; track row.key) {\n @let scope = scopeOf(row.key);\n <div class=\"et-query-devtools-settings-row\">\n <div class=\"et-query-devtools-settings-row-head\">\n <span>{{ row.label }}</span>\n <div class=\"et-query-devtools-btn-group\">\n @for (option of SCOPES; track option.value) {\n <button\n [class.et-query-devtools-btn--active]=\"scope === option.value\"\n [attr.aria-pressed]=\"scope === option.value\"\n (click)=\"setScope(row.key, option.value)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n {{ option.label }}\n </button>\n }\n <button [title]=\"INDEXED_DB_TITLE\" class=\"et-query-devtools-btn\" type=\"button\" disabled>IndexedDB</button>\n </div>\n </div>\n <small>{{ row.hint }}</small>\n @if (warningFor(row, scope); as warning) {\n <p class=\"et-query-devtools-settings-warn\">\n <span aria-hidden=\"true\">⚠</span>\n {{ warning }}\n </p>\n }\n </div>\n }\n\n <div class=\"et-query-devtools-settings-row\">\n <div class=\"et-query-devtools-settings-row-head\">\n <span>Reset devtools</span>\n @if (resetConfirming()) {\n <div class=\"et-query-devtools-btn-group\">\n <button (click)=\"reset()\" class=\"et-query-devtools-btn et-query-devtools-btn--danger\" type=\"button\">\n Reset everything\n </button>\n <button (click)=\"resetConfirming.set(false)\" class=\"et-query-devtools-btn\" type=\"button\">Cancel</button>\n </div>\n } @else {\n <button (click)=\"resetConfirming.set(true)\" class=\"et-query-devtools-btn\" type=\"button\">Reset…</button>\n }\n </div>\n <small>\n Clears every one of these keys from both stores, whatever the scopes above say, and puts the panel back where it\n ships - layout, filters, selections and pins. The settings on this tab stay.\n </small>\n </div>\n </div>\n\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>Limits</strong>\n <span class=\"et-query-devtools-count\">how much the panel keeps in memory</span>\n </div>\n\n <div class=\"et-query-devtools-settings-fields\">\n @for (row of LIMIT_ROWS; track row.key) {\n <label class=\"et-query-devtools-field\">\n <span>{{ row.label }}</span>\n <input\n #limitInput\n [value]=\"limitOf(row.key)\"\n [min]=\"row.min\"\n [max]=\"row.max\"\n [step]=\"row.step\"\n (change)=\"setLimit(row.key, limitInput.value)\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n />\n <small>{{ row.hint }}</small>\n </label>\n }\n\n <label class=\"et-query-devtools-field\">\n <span>Response history</span>\n <input\n #responseHistoryInput\n [value]=\"responseHistory()\"\n (change)=\"setResponseHistory(responseHistoryInput.value)\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"1\"\n max=\"50\"\n step=\"1\"\n />\n <small>\n bodies each query keeps, which is how far back a response diff can reach. Bodies dominate what the run buffer\n retains, so this is the one limit that costs real memory. Applies to runs from now on.\n @if (settings().responseHistory !== null) {\n <button (click)=\"clearResponseHistory()\" class=\"et-query-devtools-btn\" type=\"button\">\n Back to the app's own value\n </button>\n }\n </small>\n </label>\n </div>\n </div>\n\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>Mirrored</strong>\n <span class=\"et-query-devtools-count\">the same switches their tabs carry</span>\n </div>\n\n <div class=\"et-query-devtools-settings-row\">\n <div class=\"et-query-devtools-settings-row-head\">\n <span>Queries</span>\n <div class=\"et-query-devtools-btn-group\">\n @let recentFirst = host.queryRecentFirst();\n <button\n [class.et-query-devtools-btn--active]=\"recentFirst\"\n [attr.aria-pressed]=\"recentFirst\"\n (click)=\"host.queryRecentFirst.set(!recentFirst)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n recent first\n </button>\n @let treeView = host.queryTreeView();\n <button\n [class.et-query-devtools-btn--active]=\"treeView\"\n [attr.aria-pressed]=\"treeView\"\n (click)=\"host.queryTreeView.set(!treeView)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n tree view\n </button>\n @let gone = showsGoneQueries();\n <button\n [class.et-query-devtools-btn--active]=\"gone\"\n [attr.aria-pressed]=\"gone\"\n (click)=\"toggleGoneQueries()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n list gone\n </button>\n </div>\n </div>\n <small>Sort order, whether the list groups by route path, and whether destroyed queries are listed at all.</small>\n </div>\n\n <div class=\"et-query-devtools-settings-row\">\n <div class=\"et-query-devtools-settings-row-head\">\n <span>Events</span>\n <div class=\"et-query-devtools-settings-controls\">\n @let errorsOnly = host.eventErrorsOnly();\n <button\n [class.et-query-devtools-btn--active]=\"errorsOnly\"\n [attr.aria-pressed]=\"errorsOnly\"\n (click)=\"host.eventErrorsOnly.set(!errorsOnly)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n failures only\n </button>\n <select\n #eventClientSelect\n [value]=\"host.eventClient() ?? ''\"\n (change)=\"host.eventClient.set(eventClientSelect.value || null)\"\n class=\"et-query-devtools-select\"\n aria-label=\"Event log client\"\n >\n <option value=\"\">All clients</option>\n @for (name of host.clientNames(); track name) {\n <option [value]=\"name\">{{ name }}</option>\n }\n </select>\n </div>\n </div>\n <small>What the event log is narrowed to. The log itself always holds every client's traffic.</small>\n </div>\n\n <div class=\"et-query-devtools-settings-row\">\n <div class=\"et-query-devtools-settings-row-head\">\n <span>Response overrides</span>\n @let persist = host.overridesPersist();\n <button\n [class.et-query-devtools-btn--active]=\"persist\"\n [attr.aria-pressed]=\"persist\"\n (click)=\"host.toggleOverridesPersist()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n Keep across reloads\n </button>\n </div>\n <small>\n The drawer's own toggle, which is the Storage scope above - currently\n <span class=\"et-query-devtools-mono\">{{ host.overridesScopeLabel() }}</span\n >.\n </small>\n </div>\n\n <div class=\"et-query-devtools-settings-row\">\n <div class=\"et-query-devtools-settings-row-head\">\n <span>Armed</span>\n <div class=\"et-query-devtools-settings-controls\">\n <button\n [disabled]=\"!mockCount() || armedMockCount() === mockCount()\"\n (click)=\"ARM_ALL_MOCKS()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n Arm every mock ({{ mockCount() }})\n </button>\n <button\n [disabled]=\"!armedMockCount()\"\n (click)=\"DISARM_ALL_MOCKS()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n Disarm mocks ({{ armedMockCount() }})\n </button>\n <button\n [disabled]=\"!armedFaultCount()\"\n (click)=\"DISARM_ALL_FAULTS()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n Disarm faults ({{ armedFaultCount() }})\n </button>\n </div>\n </div>\n <small>\n The Mocks and Faults tabs' own buttons. Whether either survives a reload is the two <em>Armed</em> scopes above,\n both <em>none</em> unless they were changed.\n </small>\n </div>\n </div>\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n/**\n * The waterfall's grid, axis and bars, as a styles-only component the panel mounts when the Timeline tab\n * is first opened.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-timeline-styles',\n template: '',\n styleUrl: './query-devtools-timeline-styles.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsTimelineStylesComponent {}\n","import { Component, input, ViewEncapsulation } from '@angular/core';\nimport { QueryDevtoolsFeature } from '@ethlete/query';\n\n/** A feature list: the feature's name, followed by the options it was configured with. */\n@Component({\n selector: 'et-query-devtools-features',\n template: `\n <ul class=\"et-query-devtools-features\">\n @for (feature of features(); track feature.type) {\n <li class=\"et-query-devtools-feature\">\n <span class=\"et-query-devtools-chip\">{{ featureLabel(feature.type) }}</span>\n <!-- Always rendered: the list is one grid, so a feature without options still needs its cell\n for the next row's chip to stay in the same column. -->\n <span class=\"et-query-devtools-feature-details\">\n @for (detail of feature.details; track detail.label) {\n <span class=\"et-query-devtools-feature-detail\">\n <span class=\"et-query-devtools-feature-label\">{{ detail.label }}</span>\n <span class=\"et-query-devtools-feature-value\">{{ detail.value }}</span>\n </span>\n }\n </span>\n </li>\n }\n </ul>\n `,\n styleUrl: './query-devtools-features.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsFeaturesComponent {\n public features = input.required<QueryDevtoolsFeature[]>();\n\n protected featureLabel(type: string) {\n return type\n .replace(/^WITH_/, '')\n .replace(/_/g, ' ')\n .toLowerCase();\n }\n}\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport {\n clearQueryDevtoolsTokenTtl,\n QUERY_DEVTOOLS_TOKEN_TTL_LIMIT,\n QueryDevtoolsEntry,\n setQueryDevtoolsTokenTtl,\n} from '@ethlete/query';\nimport { QueryDevtoolsFeaturesComponent } from './query-devtools-features.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\n\n/** The Auth tab: registered bearer auth providers, their tokens and their internal queries. */\n@Component({\n selector: 'et-query-devtools-auth-tab',\n templateUrl: './query-devtools-auth-tab.component.html',\n styleUrl: './query-devtools-auth-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsFeaturesComponent, QueryDevtoolsJsonComponent],\n})\nexport class QueryDevtoolsAuthTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n protected readonly TTL_LIMIT = QUERY_DEVTOOLS_TOKEN_TTL_LIMIT;\n\n /**\n * Arms an access-token lifetime from the input's raw value, or disarms on an empty one. Clamped here\n * rather than left to the input's `min`/`max`, which a typed-in (or pasted) value ignores.\n */\n protected armTokenTtl(options: { entry: QueryDevtoolsEntry; value: string }) {\n const { entry, value } = options;\n\n if (value.trim() === '') {\n this.clearTokenTtl(entry);\n\n return;\n }\n\n setQueryDevtoolsTokenTtl({ providerName: this.providerName(entry), seconds: Number(value) });\n }\n\n /** Presents the current token as long expired, which is what makes a refresh happen at once. */\n protected expireTokenNow(entry: QueryDevtoolsEntry) {\n setQueryDevtoolsTokenTtl({ providerName: this.providerName(entry), seconds: 0 });\n }\n\n protected clearTokenTtl(entry: QueryDevtoolsEntry) {\n clearQueryDevtoolsTokenTtl(this.providerName(entry));\n }\n\n private providerName(entry: QueryDevtoolsEntry) {\n return entry.meta.name ?? '';\n }\n}\n","<div class=\"et-query-devtools-scroll\">\n @for (entry of host.authEntries(); track entry.id) {\n @let auth = host.asAuth(entry);\n @let lifetime = host.authTokenLifetime(entry);\n <div [class.et-query-devtools-card--armed]=\"lifetime.ttlSeconds !== null\" class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>{{ entry.meta.name || 'auth provider' }}</strong>\n <span\n [class.et-query-devtools-chip--success]=\"auth.isAuthenticated()\"\n [class.et-query-devtools-chip--muted]=\"!auth.isAuthenticated()\"\n class=\"et-query-devtools-chip\"\n >\n {{ auth.isAuthenticated() ? 'authenticated' : 'anonymous' }}\n </span>\n @if (lifetime.ttlSeconds !== null) {\n <span\n [title]=\"\n 'This provider\\'s access token is presented as living ' +\n lifetime.ttlSeconds +\n 's from the moment it was issued, so the refresh happens on that lifetime instead of the real one.'\n \"\n class=\"et-query-devtools-chip et-query-devtools-chip--error\"\n >\n lifetime {{ lifetime.ttlSeconds }}s\n </span>\n }\n @if (host.authLeadership(auth); as leadership) {\n <span\n [class.et-query-devtools-chip--success]=\"leadership.tone === 'success'\"\n [class.et-query-devtools-chip--muted]=\"leadership.tone === 'muted'\"\n [title]=\"leadership.title\"\n class=\"et-query-devtools-chip\"\n >\n {{ leadership.label }}\n </span>\n }\n </div>\n <dl class=\"et-query-devtools-meta\">\n <dt>Base URL</dt>\n <dd class=\"et-query-devtools-mono\">{{ entry.meta.clientBaseUrl || entry.meta.clientName || '—' }}</dd>\n <dt>Access token</dt>\n <dd>{{ auth.accessToken() ? 'present' : 'none' }}</dd>\n <dt>Refresh token</dt>\n <dd>{{ auth.refreshToken() ? 'present' : 'none' }}</dd>\n @if (lifetime.expiresIn; as expiry) {\n <dt>Token expires in</dt>\n <dd>\n {{ expiry }}\n @if (lifetime.realExpiresIn; as real) {\n <small class=\"et-query-devtools-auth-real-expiry\">really {{ real }}</small>\n }\n </dd>\n }\n @if (auth.executionState(); as state) {\n <dt>Execution state</dt>\n <dd>{{ state.type }} · {{ state.state }}</dd>\n }\n @if (host.authQueryKeys(auth).length) {\n <dt>Queries</dt>\n <dd>\n <div class=\"et-query-devtools-chips\">\n @for (key of host.authQueryKeys(auth); track key) {\n <span class=\"et-query-devtools-chip\">{{ key }}</span>\n }\n </div>\n </dd>\n }\n @if (entry.meta.features?.length) {\n <dt>Features</dt>\n <dd>\n <et-query-devtools-features [features]=\"entry.meta.features ?? []\" />\n </dd>\n }\n </dl>\n\n @if (auth.accessToken()) {\n <h4 class=\"et-query-devtools-section\">Token lifetime</h4>\n @if (lifetime.overridable) {\n <div class=\"et-query-devtools-auth-ttl\">\n <div class=\"et-query-devtools-auth-ttl-row\">\n <label class=\"et-query-devtools-field\">\n <span>Override</span>\n <input\n #ttlInput\n [value]=\"lifetime.ttlSeconds ?? ''\"\n [max]=\"TTL_LIMIT\"\n (change)=\"armTokenTtl({ entry: entry, value: ttlInput.value })\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"0\"\n step=\"30\"\n />\n <small>seconds, or empty for the lifetime the token was issued with</small>\n </label>\n <div class=\"et-query-devtools-auth-ttl-actions\">\n <button (click)=\"expireTokenNow(entry)\" class=\"et-query-devtools-btn\" type=\"button\">Expire now</button>\n @if (lifetime.ttlSeconds !== null) {\n <button (click)=\"clearTokenTtl(entry)\" class=\"et-query-devtools-btn\" type=\"button\">Clear</button>\n }\n </div>\n </div>\n <p class=\"et-query-devtools-hint\">\n Measured from the token's own <code>iat</code>, so this is a lifetime and not a remaining time - a short\n one on a token issued a while ago refreshes at once, and the token that comes back lives the full\n lifetime. It is what the whole app acts on: the proactive refresh, the expiration warning and the\n countdown above all read it. Never persisted - a reload puts this provider back on its real lifetime.\n </p>\n </div>\n } @else {\n <p class=\"et-query-devtools-hint\">\n This access token carries no <code>exp</code> claim to replace, or no <code>iat</code>/<code>nbf</code> to\n measure a new lifetime from, so it cannot be overridden.\n </p>\n }\n }\n\n @if (host.authTokenPayload(auth); as payload) {\n <h4 class=\"et-query-devtools-section\">Access token payload</h4>\n <et-query-devtools-json [value]=\"payload\" />\n }\n\n @if (auth.latestNonInternalQuery(); as latest) {\n <h4 class=\"et-query-devtools-section\">Latest auth query · {{ latest.key }}</h4>\n <et-query-devtools-json [value]=\"latest.snapshot.response()\" />\n }\n </div>\n } @empty {\n <p class=\"et-query-devtools-empty\">No auth providers registered.</p>\n }\n</div>\n","import {\n AnyPagedQueryStack,\n AnyQueryBatchItemResult,\n AnyQueryStack,\n HttpRequestLoadingProgressState,\n HttpRequestRetryState,\n Query,\n QueryClient,\n QueryDevtoolsEntry,\n QueryDevtoolsRun,\n QueryDevtoolsStats,\n QueryDevtoolsStatsHandle,\n QueryKeyLockState,\n QueryRefreshCause,\n QueryRepository,\n QueryRepositoryCacheEntry,\n QueryRepositoryEntryDestroyedCause,\n} from '@ethlete/query';\n\n// The registry stores queries type-erased; the panel reads them structurally.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type AnyQuery = Query<any>;\n\n/** The query a detail pane is showing, together with the registry entry it was registered as. */\nexport type QueryDevtoolsSelection = { entry: QueryDevtoolsEntry; query: AnyQuery };\n\n/**\n * A body the panel can show. Every one of them but `settings` is a tab in the bar: Settings holds nothing\n * to count, so the badge/overflow logic would push it behind **More** - it is reached from the header's\n * gear instead.\n */\nexport type DevtoolsTab =\n | 'queries'\n | 'stacks'\n | 'sequences'\n | 'batches'\n | 'forms'\n | 'auth'\n | 'ws'\n | 'cache'\n | 'locks'\n | 'timeline'\n | 'events'\n | 'faults'\n | 'mocks'\n | 'about'\n | 'settings';\n\n/**\n * The sections of the query detail drawer. The head and its actions stay pinned above them - the detail\n * holds more than fits a column, and everything below the actions is reading material.\n */\nexport type DetailTab = 'overview' | 'history' | 'data';\n\n/**\n * Which pane of a two-pane tab a divider drag sizes: the Queries tab's list, or the drawer every\n * split view opens a query in.\n */\nexport type PaneTarget = 'list' | 'drawer';\n\n/** The axis a two-pane tab splits along: the panes sit side by side, or stack in a side dock. */\nexport type PaneAxis = 'inline' | 'block';\n\nexport type QueryStatus = 'idle' | 'loading' | 'success' | 'error';\n\n/**\n * A facet the Queries list can be narrowed to. The first four describe live state; `gone` is the odd\n * one out - it is the only way a destroyed query's tombstone enters the list at all, which is why it\n * is off by default rather than just another filter over what is already shown.\n */\nexport type QueryListFacet = 'error' | 'loading' | 'stale' | 'idle' | 'gone';\n\n/** The fault fields the panel arms from a number input, as opposed to the status it picks from a list. */\nexport type NumericFaultField = 'latencyMs' | 'failNext' | 'failRate';\n\n/**\n * A chunk of a route as rendered: literal path text, a path param (`name` is the param it fills in) or\n * the query string of the request that ran. The kind becomes the segment's class.\n */\nexport type RouteSegment = { text: string; kind: 'static' | 'param' | 'query'; name?: string };\n\n/**\n * A one-line verdict the panel renders as a chip - which tab refreshes an auth provider's tokens, where\n * this tab stands on a lock. `title` carries the caveats the label has no room for: why every tab reads\n * as the leader, or how approximate a tab count is.\n */\nexport type QueryDevtoolsChip = { label: string; tone: 'success' | 'muted'; title: string };\n\n/** An auth provider's access-token expiry as the auth tab renders it, armed override included. */\nexport type QueryDevtoolsTokenLifetime = {\n /** Countdown to the expiry the app currently acts on, overridden or not. */\n expiresIn: string | null;\n\n /** Countdown to the token's own `exp`, and only set while an override is making it read differently. */\n realExpiresIn: string | null;\n\n /** The armed lifetime in seconds, or `null` while the token is on the one it was issued with. */\n ttlSeconds: number | null;\n\n /** Whether an override can be applied at all - the token needs an `exp` plus an `iat` or `nbf`. */\n overridable: boolean;\n};\n\n/** A query reachable from a stack or sequence card, rendered as a row that opens the detail drawer. */\nexport type QueryLink = {\n id: string;\n query: AnyQuery;\n method: string;\n segments: RouteSegment[];\n clientBaseUrl: string;\n stats?: QueryDevtoolsStatsHandle;\n};\n\n/** One settled item of a query batch, with the route the args it was sent with resolve to. */\nexport type BatchItemRow = { result: AnyQueryBatchItemResult; segments: RouteSegment[] };\n\n/**\n * A batch's settled items as its card lists them. Capped, and `hidden` says by how much - a bulk run\n * settles more items than a list can hold, and a truncated one must not read as the whole run.\n */\nexport type BatchItemView = { rows: BatchItemRow[]; total: number; hidden: number };\n\n/**\n * Query stats plus the numbers the panel derives from them rather than storing: an execution that never\n * reached the network was answered from the cache, and the averages come from the running totals.\n */\nexport type QueryActivity = {\n stats: QueryDevtoolsStats;\n cacheServed: number;\n avgDurationMs: number | null;\n avgResponseBytes: number | null;\n hasActivity: boolean;\n};\n\n/**\n * What a query's request is doing beyond `loading`: which attempt it is on, the backoff it is waiting\n * out, and how much of the payload has moved. Without it a request retried three times behind a 4s\n * backoff and a plain slow one are the same yellow dot.\n */\nexport type RequestProgress = {\n /** @see HttpRequestSubtle.attempts */\n attempts: number;\n\n retry: HttpRequestRetryState | null;\n\n /** How much of the pending backoff is left, or `null` when none is pending. */\n retryInMs: number | null;\n\n progress: HttpRequestLoadingProgressState | null;\n};\n\n/**\n * One run of one query, placed on the timeline's shared axis. `leftPct` / `widthPct` are percentages of\n * the window every row is laid out against, which is what makes overlapping runs visible as overlap.\n */\nexport type TimelineRow = {\n key: string;\n entryId: string;\n method: string;\n path: string;\n run: QueryDevtoolsRun;\n leftPct: number;\n widthPct: number;\n\n /** How long the run took, or `null` while it is still in flight. */\n durationMs: number | null;\n};\n\nexport type Timeline = {\n rows: TimelineRow[];\n\n /** The start of the window the rows are laid out against. */\n startedAt: number;\n\n /** How long that window is - the axis every bar is a fraction of. */\n windowMs: number;\n\n /** How many older runs the view left out, so a capped timeline does not read as a complete one. */\n hidden: number;\n};\n\n/**\n * One request a refresh re-executed, as an event row lists it. A cache key is shared by every query\n * bound to it, so the row carries all of their ids - one to open, and the rest so each of those queries\n * can still find the refresh under \"Refetched by\". Empty for a request no registered query holds.\n */\nexport type RefreshedRequest = {\n queryIds: string[];\n method: string;\n path: string;\n};\n\nexport type EventLogItem = {\n id: number;\n timestamp: number;\n client: string;\n type:\n | 'entry-created'\n | 'request-success'\n | 'request-error'\n | 'entry-destroyed'\n | 'unbind-all-secure'\n | 'queries-refreshed';\n\n /** `null` for events that are not about a single request, e.g. the logout-wide secure unbind. */\n method: string | null;\n url: string | null;\n isSecure: boolean;\n status: number | null;\n\n /**\n * The registered query the request belonged to when the event fired, so the row can open it. Resolved\n * here rather than at click time so the log holds an id instead of a reference to the request itself.\n */\n queryId: string | null;\n\n /** What asked for a refresh, for a `queries-refreshed` row. `null` for every other type. */\n cause: QueryRefreshCause | null;\n\n /** Why a cache entry was torn down, for an `entry-destroyed` row. `null` for every other type. */\n destroyCause: QueryRepositoryEntryDestroyedCause | null;\n\n /** The requests that refresh re-executed - the fan-out the panel could not show before. */\n refreshed: RefreshedRequest[] | null;\n\n /**\n * How long the request took and how big its response was, read off the request as the event fired.\n * Both `null` for an event that is not one request settling, and the size also for a failure - an\n * error body is not a payload worth a column.\n */\n durationMs: number | null;\n bytes: number | null;\n\n /** @see QueryDevtoolsStats.hasEstimatedBytes */\n isEstimatedBytes: boolean;\n};\n\n/**\n * A cache entry that is gone, as the Cache tab still lists it. Deliberately not a {@link CacheRow}: a\n * destroyed entry has no consumers, no size, no freshness and nothing to act on, so a full row would be\n * seven columns of dashes. What is left worth showing is what it was and why it went.\n */\nexport type DroppedCacheEntry = {\n client: string;\n method: string;\n url: string;\n cause: QueryRepositoryEntryDestroyedCause;\n at: number;\n};\n\n/** How the panel spells a teardown cause out - the same wording in the Events tab and the Cache tab. */\nexport const DESTROY_CAUSE_LABELS: Record<QueryRepositoryEntryDestroyedCause, string> = {\n unbind: 'last consumer gone',\n expired: 'unused window over',\n 'unused-cap': 'unused entry cap',\n logout: 'logout',\n manual: 'evicted',\n};\n\n/** One cache entry as the Cache tab lists it: the repository's own snapshot plus its measured size. */\nexport type CacheRow = {\n entry: QueryRepositoryCacheEntry;\n bytes: number;\n isEstimatedBytes: boolean;\n};\n\n/** A repository the panel found, together with the client name/base URL it was registered under. */\nexport type RepositoryInfo = { repository: QueryRepository; name: string; baseUrl: string; client: QueryClient | null };\n\n/** One client's cache, as the Cache tab lists it - every entry measured, with the client's poll states. */\nexport type CacheView = {\n name: string;\n baseUrl: string;\n repository: QueryRepository;\n rows: CacheRow[];\n bytes: number;\n isEstimatedBytes: boolean;\n unused: number;\n pollStates: Record<string, QueryKeyLockState>;\n client: QueryClient | null;\n\n /** The entries this client has lost since the panel was loaded, newest first. */\n dropped: DroppedCacheEntry[];\n};\n\n/** What each tab holds, as its badge reports it: how many entries, and how many of them are failing. */\nexport type TabBadge = { count: number; errors: number; errorNoun?: string };\n\nexport type { AnyPagedQueryStack, AnyQueryStack };\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { QueryRepositoryEntryDestroyedCause } from '@ethlete/query';\nimport { QueryDevtoolsFeaturesComponent } from './query-devtools-features.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\nimport { DESTROY_CAUSE_LABELS } from './query-devtools-types';\n\n/** The Cache tab: every client's cache entries, their freshness, sync status and disk persistence. */\n@Component({\n selector: 'et-query-devtools-cache-tab',\n templateUrl: './query-devtools-cache-tab.component.html',\n styleUrl: './query-devtools-cache-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsFeaturesComponent, QueryDevtoolsJsonComponent],\n})\nexport class QueryDevtoolsCacheTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n protected dropCauseLabel(cause: QueryRepositoryEntryDestroyedCause) {\n return DESTROY_CAUSE_LABELS[cause];\n }\n}\n","<div class=\"et-query-devtools-scroll\">\n @for (client of host.cacheView(); track client.name) {\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong class=\"et-query-devtools-mono\">{{ client.baseUrl || client.name }}</strong>\n <span class=\"et-query-devtools-count\">{{ client.rows.length }} entries</span>\n @if (client.rows.length) {\n <span\n class=\"et-query-devtools-count\"\n title=\"The measured size of every cached response. Sizes are read from the decoded bodies, so they ignore transport compression.\"\n >\n {{ host.formatTransferred(client.bytes, client.isEstimatedBytes) }}\n </span>\n }\n @if (client.unused) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"Entries with no consumer left. They are waiting out their keepUnusedFor window, not leaking.\"\n >\n {{ client.unused }} collectible\n </span>\n }\n @if (client.client?.subtle?.persistence) {\n <span class=\"et-query-devtools-count\">{{ host.persistedCount(client.client!) }} on disk</span>\n <button (click)=\"host.clearPersistedQueries(client.client!)\" class=\"et-query-devtools-btn\" type=\"button\">\n Clear disk\n </button>\n }\n <button\n [disabled]=\"!client.rows.length\"\n (click)=\"host.evictAllCacheEntries(client.repository)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Drop every entry of this client, consumers included - the cold-start check without a reload\"\n >\n Evict all\n </button>\n </div>\n @if (host.clientFeatures(client.client); as features) {\n <et-query-devtools-features [features]=\"features\" />\n }\n <div class=\"et-query-devtools-table-scroll\">\n <table class=\"et-query-devtools-table\">\n <thead>\n <tr>\n <th>Request</th>\n <th>Consumers</th>\n <th>Size</th>\n <th>Secure</th>\n <th>Freshness</th>\n <th>Sync</th>\n <th>Disk</th>\n <th>Actions</th>\n </tr>\n </thead>\n <tbody>\n @for (row of client.rows; track row.entry.key) {\n @let cacheEntry = row.entry;\n @let expanded = host.isCacheValueExpanded(client.name, cacheEntry.key);\n <tr>\n <td [title]=\"cacheEntry.request.method + ' ' + cacheEntry.request.url\">\n <span class=\"et-query-devtools-method\">{{ cacheEntry.request.method }}</span>\n <span class=\"et-query-devtools-url\">{{ host.requestPath(cacheEntry.request.url) }}</span>\n </td>\n <td>\n {{ cacheEntry.consumerCount }}\n <!-- An entry nothing holds any more is the one row worth explaining: it looks\n like a leak and is in fact a keepUnusedFor window running out. -->\n @if (cacheEntry.isUnused) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"No consumer left - kept for its keepUnusedFor window, then collected\"\n >\n collectible\n </span>\n }\n </td>\n <td>{{ row.bytes ? host.formatTransferred(row.bytes, row.isEstimatedBytes) : '—' }}</td>\n <td>{{ cacheEntry.isSecure ? 'yes' : 'no' }}</td>\n <td>{{ host.cacheFreshness(cacheEntry) }}</td>\n <td>{{ host.cacheSync(cacheEntry, client.pollStates) }}</td>\n <td>{{ host.cachePersistence(cacheEntry) }}</td>\n <td>\n <span class=\"et-query-devtools-cell-actions\">\n <button\n [class.et-query-devtools-btn--active]=\"expanded\"\n [attr.aria-expanded]=\"expanded\"\n (click)=\"host.toggleCacheValue(client.name, cacheEntry.key)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Show the response held under this key\"\n >\n Value\n </button>\n <button (click)=\"host.refetchCacheEntry(cacheEntry)\" class=\"et-query-devtools-btn\" type=\"button\">\n Refetch\n </button>\n <button\n (click)=\"host.evictCacheEntry(client.repository, cacheEntry.key)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n Evict\n </button>\n </span>\n </td>\n </tr>\n @if (expanded) {\n <tr>\n <td class=\"et-query-devtools-cell-value\" colspan=\"8\">\n <et-query-devtools-json [value]=\"cacheEntry.request.response()\" />\n </td>\n </tr>\n }\n } @empty {\n <tr>\n <td class=\"et-query-devtools-empty\" colspan=\"8\">Cache empty.</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n @if (client.dropped.length) {\n <h4 class=\"et-query-devtools-section\">Dropped</h4>\n <ul class=\"et-query-devtools-dropped\">\n @for (entry of client.dropped; track entry.at) {\n <li>\n <span class=\"et-query-devtools-method\">{{ entry.method }}</span>\n <span class=\"et-query-devtools-url\">{{ host.requestPath(entry.url) }}</span>\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">{{\n dropCauseLabel(entry.cause)\n }}</span>\n <span class=\"et-query-devtools-count\">{{ host.formatTime(entry.at) }}</span>\n </li>\n }\n </ul>\n }\n </div>\n } @empty {\n <p class=\"et-query-devtools-empty\">No clients with a cache yet.</p>\n }\n</div>\n","/**\n * One request to render as a `curl` command. The same shape the Insomnia export takes its requests in,\n * so both exports describe a request the one way the panel resolves it.\n */\nexport type CurlRequestInput = {\n method: string;\n url: string;\n headers: { name: string; value: string }[];\n\n /** The request body, or `null` for a request that sends none. */\n body: unknown;\n\n /** The GraphQL document, for a GraphQL query - sent as `{ query, variables }` the way the client does. */\n gqlQuery?: string | null;\n};\n\nconst jsonBody = (body: unknown) => {\n try {\n return JSON.stringify(body);\n } catch {\n // A body holding a circular reference or a throwing `toJSON` cannot be written out.\n return null;\n }\n};\n\n/**\n * Wraps a value in single quotes for a POSIX shell, which is the one quoting that leaves everything\n * inside untouched - `$`, backticks and backslashes included. A single quote cannot be escaped inside\n * such a string, so each one ends the quoting, emits an escaped quote and opens it again.\n */\nconst shellQuote = (value: string) => `'${value.replace(/'/g, `'\\\\''`)}'`;\n\nconst bodyOf = (request: CurlRequestInput) => {\n if (request.gqlQuery) {\n const variables = (request.body as { variables?: unknown } | null)?.variables ?? {};\n\n return jsonBody({ query: request.gqlQuery, variables });\n }\n\n if (request.body === null || request.body === undefined) return null;\n if (typeof request.body === 'string') return request.body;\n\n return jsonBody(request.body);\n};\n\n/**\n * Renders a request as a copy-pasteable `curl` command, one option per line so a long one stays\n * readable in a terminal, a ticket or a chat message.\n *\n * Angular's `HttpClient` labels an object body `application/json` on its own, so the header is spelled\n * out here for a body that has one - without it the request reaches the endpoint differently than the\n * app sent it. Headers whose value the panel could not resolve (a secure query's `Authorization`\n * without an access token) are left out, so what is emitted is only what was known.\n */\nexport const buildCurlCommand = (request: CurlRequestInput) => {\n const body = bodyOf(request);\n const headers = request.headers.filter((header) => header.value !== '');\n const hasContentType = headers.some((header) => header.name.toLowerCase() === 'content-type');\n const withContentType =\n body === null || hasContentType ? headers : [...headers, { name: 'Content-Type', value: 'application/json' }];\n\n const lines = [`curl ${shellQuote(request.url)}`];\n\n // GET is curl's default, so spelling it out only adds noise to the common case.\n if (request.method.toUpperCase() !== 'GET') lines.push(`-X ${request.method.toUpperCase()}`);\n\n for (const header of withContentType) lines.push(`-H ${shellQuote(`${header.name}: ${header.value}`)}`);\n\n // `--data-raw`, not `-d`: the latter strips newlines and would mangle a GraphQL document, and it also\n // rewrites the method to POST behind your back.\n if (body !== null) lines.push(`--data-raw ${shellQuote(body)}`);\n\n return lines.join(' \\\\\\n ');\n};\n","import { Component, computed, effect, ElementRef, input, signal, viewChild, ViewEncapsulation } from '@angular/core';\nimport { injectErrorTheme, injectStyleManager, ProvideColorDirective } from '@ethlete/core';\nimport {\n armQueryDevtoolsOverrideTransfer,\n countUnresolvedQueryDevtoolsOverrides,\n parseQueryDevtoolsOverrideTransfer,\n QueryDevtoolsOverridesRecorder,\n serializeQueryDevtoolsOverrideTransfer,\n} from '@ethlete/query';\nimport { MenuComponent, MenuDirective, MenuItemComponent, MenuItemShortcutComponent } from '@ethlete/components';\nimport { MenuSearchDirective, MenuSurfaceDirective, MenuTriggerDirective } from '@ethlete/components';\nimport { readQueryDevtoolsClipboard, textFromQueryDevtoolsPaste } from './query-devtools-clipboard';\nimport { QueryDevtoolsOverrideMenuStylesComponent } from './query-devtools-override-menu-styles.component';\n\n/**\n * Copies the whole set of response overrides armed on one query to the clipboard, and pastes one back -\n * onto this query or any other. The payload is the same JSON the override store persists, so a set can\n * also go into a ticket and come back from one.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-override-set-menu',\n templateUrl: './query-devtools-override-set-menu.component.html',\n encapsulation: ViewEncapsulation.None,\n imports: [\n MenuDirective,\n MenuTriggerDirective,\n MenuSurfaceDirective,\n MenuSearchDirective,\n MenuComponent,\n MenuItemComponent,\n MenuItemShortcutComponent,\n ProvideColorDirective,\n ],\n})\nexport class QueryDevtoolsOverrideSetMenuComponent {\n protected errorColorTheme = injectErrorTheme();\n\n public overrides = input.required<QueryDevtoolsOverridesRecorder>();\n\n /** The response a pasted set is measured against, to report the ops that land on nothing. */\n public response = input<unknown>();\n\n /** Where the set came from, carried into the payload for whoever reads it next. */\n public source = input<{ id?: string; url?: string }>();\n\n private pasteInput = viewChild<ElementRef<HTMLInputElement>>('pasteBox');\n\n protected armedCount = computed(() => this.overrides().list().length);\n\n protected pasteMode = signal(false);\n protected error = signal<string | null>(null);\n protected note = signal<string | null>(null);\n protected copied = signal(false);\n\n constructor() {\n injectStyleManager().mount(QueryDevtoolsOverrideMenuStylesComponent);\n\n effect(() => this.pasteInput()?.nativeElement.focus());\n }\n\n protected copySet() {\n const text = serializeQueryDevtoolsOverrideTransfer(this.overrides().list(), this.source());\n\n navigator.clipboard?.writeText(text).then(\n () => this.copied.set(true),\n () => this.error.set('The clipboard write was blocked'),\n );\n }\n\n protected pasteSet() {\n this.reset();\n\n readQueryDevtoolsClipboard().then((read) => {\n if (read.ok) {\n this.armText(read.text);\n\n return;\n }\n\n this.pasteMode.set(true);\n this.note.set(\n read.reason === 'unavailable'\n ? 'This browser will not hand over the clipboard - press ⌘V / Ctrl+V here instead.'\n : 'The clipboard read was blocked - press ⌘V / Ctrl+V here instead.',\n );\n });\n }\n\n protected pasteIntoBox(event: ClipboardEvent) {\n const text = textFromQueryDevtoolsPaste(event);\n if (!text) return;\n\n event.preventDefault();\n this.armText(text);\n }\n\n protected commitPasteBox() {\n const raw = this.pasteInput()?.nativeElement.value;\n\n if (raw !== undefined) this.armText(raw);\n }\n\n protected resetOnClose(open: boolean) {\n if (!open) {\n this.pasteMode.set(false);\n this.copied.set(false);\n this.reset();\n }\n }\n\n private reset() {\n this.error.set(null);\n this.note.set(null);\n }\n\n private armText(text: string) {\n const parsed = parseQueryDevtoolsOverrideTransfer(text);\n\n if (!parsed.ok) {\n this.error.set(parsed.reason);\n\n return;\n }\n\n armQueryDevtoolsOverrideTransfer(this.overrides(), parsed.ops);\n\n const unresolved = countUnresolvedQueryDevtoolsOverrides(parsed.ops, this.response());\n const parts = [`Armed ${parsed.ops.length} ${parsed.ops.length === 1 ? 'op' : 'ops'}`];\n\n if (unresolved) parts.push(`${unresolved} of them do not resolve against this response`);\n if (parsed.skipped) parts.push(`${parsed.skipped} unknown to this build were dropped`);\n\n this.pasteMode.set(false);\n this.error.set(null);\n this.note.set(`${parts.join('; ')}.`);\n }\n}\n","<div (openChange)=\"resetOnClose($event)\" class=\"et-query-devtools-override-set-menu\" etMenu>\n <button\n et-menu-item\n title=\"Copy every response override armed on this query, or paste a set copied off another one.\"\n type=\"button\"\n etMenuTrigger\n >\n Override set\n <et-menu-item-shortcut>›</et-menu-item-shortcut>\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <ng-container ngProjectAs=\"input[etMenuSearch]\">\n @if (pasteMode()) {\n <input\n #pasteBox\n [error]=\"error()\"\n (paste)=\"pasteIntoBox($event)\"\n (keydown.enter)=\"commitPasteBox()\"\n etMenuSearch\n type=\"text\"\n placeholder=\"Paste a copied set here\"\n />\n }\n </ng-container>\n\n @if (armedCount()) {\n <!-- eslint-disable-next-line ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <button [closeOnActivate]=\"false\" (activate)=\"copySet()\" et-menu-item type=\"button\">\n {{ copied() ? '✓ Copied' : 'Copy ' + armedCount() + (armedCount() === 1 ? ' armed op' : ' armed ops') }}\n </button>\n }\n\n <!-- eslint-disable-next-line ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <button [closeOnActivate]=\"false\" (activate)=\"pasteSet()\" et-menu-item type=\"button\">\n Paste a set{{ armedCount() ? ' on top' : '' }}\n </button>\n\n @if (error(); as err) {\n <p [etProvideColor]=\"errorColorTheme\" class=\"et-query-devtools-override-error\" role=\"alert\">{{ err }}</p>\n } @else if (note(); as text) {\n <p class=\"et-query-devtools-override-note\" role=\"status\">{{ text }}</p>\n }\n </et-menu>\n </ng-template>\n</div>\n","import { Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { RouteSegment } from './query-devtools-types';\n\n/**\n * Drops a leading path prefix from a route's segments, splitting whichever segment the prefix ends\n * inside. `null` when the route does not start with the prefix - a caller then shows the whole route\n * rather than a tail that would start mid-token and read as a different endpoint.\n */\nexport const trimRouteSegments = (segments: readonly RouteSegment[], prefix: string): RouteSegment[] | null => {\n if (!prefix) return null;\n if (\n !segments\n .map((segment) => segment.text)\n .join('')\n .startsWith(prefix)\n )\n return null;\n\n let remaining = prefix.length;\n\n const trimmed: RouteSegment[] = [];\n\n for (const segment of segments) {\n if (remaining <= 0) {\n trimmed.push(segment);\n continue;\n }\n\n if (segment.text.length <= remaining) {\n remaining -= segment.text.length;\n continue;\n }\n\n trimmed.push({ ...segment, text: segment.text.slice(remaining) });\n remaining = 0;\n }\n\n return trimmed.length ? trimmed : null;\n};\n\n/**\n * A route with its path params and query string picked out from the static path. The segments render\n * element-only: a text node between them would render as a space inside the route.\n */\n@Component({\n selector: 'et-query-devtools-route',\n template: `\n @if (trimmed(); as trimmed) {\n <span [attr.title]=\"trimTitle()\" class=\"et-query-devtools-route-trimmed\">…</span>\n @for (segment of trimmed; track $index) {\n <span [class]=\"'et-query-devtools-route-' + segment.kind\" [attr.title]=\"segment.name\">{{ segment.text }}</span>\n }\n } @else {\n @for (segment of segments(); track $index) {\n <span [class]=\"'et-query-devtools-route-' + segment.kind\" [attr.title]=\"segment.name\">{{ segment.text }}</span>\n } @empty {\n {{ fallback() }}\n }\n }\n `,\n styleUrl: './query-devtools-route.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsRouteComponent {\n public segments = input.required<RouteSegment[]>();\n public fallback = input('—');\n\n /**\n * A leading path the row's surroundings already state - the tree's folder heading. Rendering it again\n * on every child is noise, so it is replaced by a `…` that carries the full route in its `title`.\n */\n public trimPrefix = input('');\n\n protected trimmed = computed(() => trimRouteSegments(this.segments(), this.trimPrefix()));\n\n protected trimTitle = computed(\n () =>\n `${this.trimPrefix()}… — ${this.segments()\n .map((s) => s.text)\n .join('')}`,\n );\n}\n","import { Component, computed, input, signal, ViewEncapsulation } from '@angular/core';\nimport { MenuComponent, MenuItemComponent, MenuSeparatorComponent } from '@ethlete/components';\nimport { MenuDirective, MenuSurfaceDirective, MenuTriggerDirective } from '@ethlete/components';\nimport { QueryDevtoolsFeaturesComponent } from './query-devtools-features.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\nimport { QueryDevtoolsOverrideSetMenuComponent } from './query-devtools-override-set-menu.component';\nimport { QueryDevtoolsRouteComponent } from './query-devtools-route.component';\nimport { DetailTab, QueryDevtoolsSelection } from './query-devtools-types';\n\n/**\n * The query detail: head, live progress, run/edit/force actions and the overview/history/data\n * sub-tabs. Rendered inline by the Queries tab and wrapped in `<et-query-devtools-drawer>` by every\n * other tab's split view - both read/write the same {@link QueryDevtoolsHost.detailTab} and JIT editor\n * state, so switching sub-tab in one instance is switching it everywhere, exactly as when this was one\n * component holding everything.\n */\n@Component({\n selector: 'et-query-devtools-detail',\n templateUrl: './query-devtools-detail.component.html',\n styleUrl: './query-devtools-detail.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [\n MenuComponent,\n MenuDirective,\n MenuItemComponent,\n MenuSeparatorComponent,\n MenuSurfaceDirective,\n MenuTriggerDirective,\n QueryDevtoolsFeaturesComponent,\n QueryDevtoolsJsonComponent,\n QueryDevtoolsOverrideSetMenuComponent,\n QueryDevtoolsRouteComponent,\n ],\n})\nexport class QueryDevtoolsDetailComponent {\n protected host = injectQueryDevtoolsHost();\n\n public sel = input.required<QueryDevtoolsSelection>();\n\n /** Whether any of the three exports behind the Copy menu has just landed on the clipboard. */\n protected copied = computed(() => this.host.copiedReport() || this.host.copiedCurl() || this.host.copiedInsomnia());\n\n protected overrideSetSource = computed(() => {\n const sel = this.sel();\n const url = this.host.requestUrl(sel.query);\n\n return { id: sel.entry.id, ...(url ? { url } : {}) };\n });\n\n /**\n * Whether this is a tombstone. Everything that would run, edit or force the query is hidden for one -\n * its handle is a frozen snapshot, so those actions have nothing to act on.\n */\n protected isGone = computed(() => !!this.sel().entry.destroyedAt);\n\n protected readonly detailTabs = [\n { id: 'overview', label: 'Overview' },\n { id: 'history', label: 'History' },\n { id: 'data', label: 'Data' },\n ] satisfies { id: DetailTab; label: string }[];\n\n /** Whether the tail of runs that can no longer be diffed is unfolded. */\n protected foldedRunsOpen = signal(false);\n\n /**\n * The runs split at the last one that still holds a body. Only the newest few can ever be an end of a\n * diff (`setQueryDevtoolsResponseHistory`, five by default) while the run log keeps twenty-five, so\n * without this the diff sits under twenty rows reading `body no longer held` and the pair and its\n * result never fit on one screen.\n *\n * Split, not filtered: a dead row *between* two live ones stays where it is, so the log keeps its order.\n */\n protected runSections = computed(() => {\n const runs = this.host.queryRuns(this.sel().entry);\n const isActionable = (run: (typeof runs)[number]) => run.hasResponse || !!run.error?.hasBody;\n\n let lastActionable = -1;\n runs.forEach((run, index) => {\n if (isActionable(run)) lastActionable = index;\n });\n\n return { listed: runs.slice(0, lastActionable + 1), folded: runs.slice(lastActionable + 1) };\n });\n\n /** What a run's Diff button reads as at each end of the comparison. */\n protected readonly diffRoles = {\n base: {\n label: 'Base',\n title: 'The older end of the comparison - click another run to set the newer one, or this one to clear it',\n },\n compare: { label: 'Compare', title: 'The newer end of the comparison - click to clear it' },\n } satisfies Record<'base' | 'compare', { label: string; title: string }>;\n}\n","@let s = sel();\n\n<div class=\"et-query-devtools-detail-head\">\n <span class=\"et-query-devtools-method\">{{ s.entry.meta.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"host.routeSegments(s.entry, s.query)\" />\n </span>\n <button\n [attr.aria-label]=\"host.copyableRouteTitle(s.entry, s.query)\"\n [title]=\"host.copyableRouteTitle(s.entry, s.query)\"\n [class.et-query-devtools-route-copy--copied]=\"host.copiedRoute()\"\n (click)=\"host.copyRoute(s.entry, s.query)\"\n class=\"et-query-devtools-route-copy\"\n type=\"button\"\n >\n {{ host.copiedRoute() ? '✓' : '⧉' }}\n </button>\n @if (host.isTampered(s.entry)) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--error\"\n title=\"Showing an armed response override or a devtools-injected failure, not what the server actually sent\"\n >\n tampered\n </span>\n }\n @if (isGone()) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">gone</span>\n }\n</div>\n\n@if (s.entry.destroyedAt; as destroyedAt) {\n <p class=\"et-query-devtools-gone-note\">\n Destroyed at {{ host.formatTime(destroyedAt) }}. This is the last state the query held - nothing here updates, and\n it cannot be run again.\n </p>\n}\n\n@if (host.requestProgress(s.query); as live) {\n <div class=\"et-query-devtools-live\">\n @if (live.retry; as retry) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--loading\"\n title=\"The retry policy is backing off before it tries again. A query stuck loading with this chip is waiting, not slow.\"\n >\n <span class=\"et-query-devtools-retry-glyph\" aria-hidden=\"true\">⟳</span>\n attempt {{ retry.attempt }} in {{ host.formatCountdown(live.retryInMs) }}\n </span>\n <span class=\"et-query-devtools-live-note\">\n {{ host.retryCause(retry.status) }} · backing off {{ host.formatDuration(retry.delayMs) }}\n </span>\n } @else if (live.attempts > 1) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--loading\"\n title=\"How many HTTP attempts the last execution took - the retry policy fired for the rest\"\n >\n <span class=\"et-query-devtools-retry-glyph\" aria-hidden=\"true\">⟳</span>\n {{ live.attempts }} attempts\n </span>\n }\n\n @if (live.progress; as progress) {\n <span\n [attr.aria-valuenow]=\"progress.percentage\"\n class=\"et-query-devtools-progress\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-label=\"Transfer progress\"\n >\n <span [style.inline-size.%]=\"progress.percentage\" class=\"et-query-devtools-progress-bar\"></span>\n </span>\n <span class=\"et-query-devtools-live-note\">\n {{ host.formatPercent(progress.percentage) }} · {{ host.formatBytes(progress.loaded) }} of\n {{ host.formatBytes(progress.total) }}\n @if (progress.speed !== null) {\n · {{ host.formatSpeed(progress.speed) }}\n }\n @if (progress.remainingTime !== null) {\n · {{ host.formatDuration(progress.remainingTime) }} left\n }\n </span>\n }\n </div>\n}\n\n<!-- One row, one primary action. Everything a query can be *made* to do lives behind Override, and\n everything that leaves the panel behind Copy - a flat row of all twelve read as a wall of equal\n buttons in which Execute was no easier to find than Clear. -->\n<div class=\"et-query-devtools-actions\">\n @if (!isGone()) {\n <div class=\"et-query-devtools-btn-group\">\n <button\n (click)=\"host.executeQuery(s, false)\"\n class=\"et-query-devtools-btn et-query-devtools-btn--primary\"\n type=\"button\"\n title=\"Run the query again, ignoring the cache\"\n >\n <span aria-hidden=\"true\">▶</span>\n Execute\n </button>\n <button\n (click)=\"host.executeQuery(s, true)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Run it the way the app would - a fresh enough cached response is used instead of a request\"\n >\n Cached\n </button>\n <button\n (click)=\"host.resetQuery(s.query)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Drop this query's state back to idle\"\n >\n Reset\n </button>\n </div>\n }\n @let locatable = host.locatableElement(s.entry);\n <button\n [disabled]=\"!locatable\"\n [class.et-query-devtools-btn--active]=\"host.locateState() === 'located'\"\n [title]=\"\n locatable\n ? 'Scroll to and outline the element this query was created in. That is where it was created, not necessarily where its data is rendered.'\n : 'This query was created outside a component or directive - a root service, a resolver or a guard - so it has no element to point at.'\n \"\n (click)=\"host.locateQuery(s.entry)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n <span aria-hidden=\"true\">⌖</span>\n @switch (host.locateState()) {\n @case ('located') {\n Created here\n }\n @case ('offscreen') {\n Not on screen\n }\n @default {\n Locate\n }\n }\n </button>\n\n <!-- The tick has to live on the trigger: the menu closes on the pick, so a confirmation inside it\n would be gone before it could be read. -->\n <div class=\"et-query-devtools-menu\" etMenu>\n <button class=\"et-query-devtools-btn\" title=\"Take this request somewhere else\" type=\"button\" etMenuTrigger>\n <span class=\"et-query-devtools-menu-glyph\" aria-hidden=\"true\">{{ copied() ? '✓' : '⧉' }}</span>\n {{ copied() ? 'Copied' : 'Copy' }}\n <span class=\"et-query-devtools-menu-caret\" aria-hidden=\"true\">▾</span>\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <button (activate)=\"host.copyReport(s.entry, s.query)\" et-menu-item type=\"button\">\n Copy report\n <span class=\"et-query-devtools-menu-item-note\">Everything the panel knows, as markdown</span>\n </button>\n <button (activate)=\"host.copyCurlRequest(s.entry, s.query)\" et-menu-item type=\"button\">\n Copy as cURL\n <span class=\"et-query-devtools-menu-item-note\">URL, resolved headers and body</span>\n </button>\n <button (activate)=\"host.copyInsomniaRequest(s.entry, s.query)\" et-menu-item type=\"button\">\n Copy for Insomnia\n <span class=\"et-query-devtools-menu-item-note\">A collection to import from the clipboard</span>\n </button>\n </et-menu>\n </ng-template>\n </div>\n\n @if (!isGone()) {\n <div class=\"et-query-devtools-menu\" etMenu>\n <button\n [class.et-query-devtools-btn--tampered]=\"host.isTampered(s.entry)\"\n class=\"et-query-devtools-btn\"\n title=\"Make this query answer with something other than what the API sent\"\n type=\"button\"\n etMenuTrigger\n >\n <span class=\"et-query-devtools-menu-glyph\" aria-hidden=\"true\">✎</span>\n Override\n <span class=\"et-query-devtools-menu-caret\" aria-hidden=\"true\">▾</span>\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <button (activate)=\"host.openResponseEditor(s.query)\" et-menu-item type=\"button\">Edit response…</button>\n <button (activate)=\"host.openArgsEditor(s)\" et-menu-item type=\"button\">Replay with edited args…</button>\n <et-menu-separator />\n <button (activate)=\"host.forceLoading(s.query)\" et-menu-item type=\"button\">Force loading</button>\n <button (activate)=\"host.forceError(s.query)\" et-menu-item type=\"button\">Force error</button>\n <button (activate)=\"host.forceEmpty(s.query)\" et-menu-item type=\"button\">Force empty</button>\n <et-menu-separator />\n <button (activate)=\"host.clearForced(s.query)\" et-menu-item type=\"button\">Clear forced state</button>\n\n @if (s.entry.overrides; as overrides) {\n <et-menu-separator />\n <et-query-devtools-override-set-menu\n [overrides]=\"overrides\"\n [response]=\"s.query.response()\"\n [source]=\"overrideSetSource()\"\n />\n }\n </et-menu>\n </ng-template>\n </div>\n }\n</div>\n\n@if (!isGone() && host.editorMode() !== 'none') {\n <div class=\"et-query-devtools-editor\">\n @if (host.editorMode() === 'response') {\n <h4 class=\"et-query-devtools-section\">Edit response → setResponse()</h4>\n <textarea\n #respArea\n [value]=\"host.editorSeed\"\n (input)=\"host.responseDraft.set(respArea.value)\"\n class=\"et-query-devtools-textarea\"\n spellcheck=\"false\"\n ></textarea>\n <div class=\"et-query-devtools-actions\">\n <button (click)=\"host.applyResponse(s.query)\" class=\"et-query-devtools-btn\" type=\"button\">Apply</button>\n <button (click)=\"host.cancelEditor()\" class=\"et-query-devtools-btn\" type=\"button\">Cancel</button>\n </div>\n } @else {\n <h4 class=\"et-query-devtools-section\">Replay with edited args → execute()</h4>\n <textarea\n #argsArea\n [value]=\"host.editorSeed\"\n (input)=\"host.argsDraft.set(argsArea.value)\"\n class=\"et-query-devtools-textarea\"\n spellcheck=\"false\"\n ></textarea>\n <div class=\"et-query-devtools-actions\">\n <button (click)=\"host.applyArgs(s.query)\" class=\"et-query-devtools-btn\" type=\"button\">Execute</button>\n <button (click)=\"host.cancelEditor()\" class=\"et-query-devtools-btn\" type=\"button\">Cancel</button>\n </div>\n }\n @if (host.editError(); as err) {\n <p class=\"et-query-devtools-editor-error\">{{ err }}</p>\n }\n </div>\n}\n\n@let detailRuns = host.queryRuns(s.entry);\n<nav class=\"et-query-devtools-subtabs\" role=\"tablist\">\n @for (tab of detailTabs; track tab.id) {\n <button\n [class.et-query-devtools-subtab--active]=\"host.detailTab() === tab.id\"\n [attr.aria-selected]=\"host.detailTab() === tab.id\"\n (click)=\"host.detailTab.set(tab.id)\"\n class=\"et-query-devtools-subtab\"\n type=\"button\"\n role=\"tab\"\n >\n {{ tab.label }}\n @if (tab.id === 'history' && detailRuns.length) {\n <span class=\"et-query-devtools-tab-badge\">{{ detailRuns.length }}</span>\n }\n <!-- The error body lives under Data, so the tab has to say so - a failure must not hide\n behind a tab that is not open. -->\n @if (tab.id === 'data' && s.query.error()) {\n <span class=\"et-query-devtools-tab-badge et-query-devtools-tab-badge--error\">!</span>\n }\n </button>\n }\n</nav>\n\n@switch (host.detailTab()) {\n @case ('overview') {\n <dl class=\"et-query-devtools-meta\">\n <dt>Base URL</dt>\n <dd class=\"et-query-devtools-mono\">\n {{ s.entry.meta.clientBaseUrl || s.entry.meta.clientName || '—' }}\n </dd>\n <dt>Route</dt>\n <dd class=\"et-query-devtools-mono\">{{ s.entry.meta.route || '—' }}</dd>\n <dt>Request URL</dt>\n <dd class=\"et-query-devtools-mono\">{{ host.requestUrl(s.query) || '—' }}</dd>\n <dt>Status</dt>\n <dd>{{ host.queryStatus(s.query) }}</dd>\n <dt>Cache key</dt>\n <dd class=\"et-query-devtools-mono\">{{ s.query.id() || '—' }}</dd>\n <dt>Last executed</dt>\n <dd>{{ host.formatTime(s.query.lastTimeExecutedAt()) }}</dd>\n <dt>Triggered by</dt>\n <dd>{{ s.query.triggeredBy() || 'user' }}</dd>\n @let refreshes = host.refreshesFor(s.entry.id);\n @if (refreshes.length) {\n <dt title=\"Invalidations and mutation refreshes that re-executed this query, as far back as the event log goes\">\n Refetched by\n </dt>\n <dd>\n <div class=\"et-query-devtools-chips\">\n @for (refresh of refreshes.slice(0, 5); track refresh.id) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">\n {{ host.formatTime(refresh.timestamp) }} · {{ refresh.label }}\n </span>\n }\n @if (refreshes.length > 5) {\n <span class=\"et-query-devtools-hint\">+{{ refreshes.length - 5 }} earlier</span>\n }\n </div>\n </dd>\n }\n @let drivers = host.formsDrivingQuery(s.entry);\n @if (drivers.length) {\n <dt>Args from</dt>\n <dd>\n <div class=\"et-query-devtools-chips\">\n @for (driver of drivers; track driver.id) {\n <button\n (click)=\"host.selectForm(driver.id)\"\n class=\"et-query-devtools-chip et-query-devtools-chip--button\"\n type=\"button\"\n title=\"Open the query form in the Forms tab\"\n >\n {{ driver.meta.name }}\n </button>\n }\n </div>\n </dd>\n }\n @if (s.entry.meta.features?.length) {\n <dt>Features</dt>\n <dd>\n <et-query-devtools-features [features]=\"s.entry.meta.features ?? []\" />\n </dd>\n }\n </dl>\n\n @let activity = host.queryActivity(s.entry);\n <div class=\"et-query-devtools-section-row\">\n <h4 class=\"et-query-devtools-section\">Activity</h4>\n <button\n [disabled]=\"!activity.hasActivity\"\n (click)=\"host.resetStats(s.entry)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Clear the counters and the run history, so the next interaction can be measured on its own\"\n >\n ⟲ Reset\n </button>\n </div>\n\n <dl class=\"et-query-devtools-stats\">\n <div class=\"et-query-devtools-stat\" title=\"Every time the query ran, cache hits included\">\n <dt>Refreshes</dt>\n <dd>{{ activity.stats.executions }}</dd>\n @if (activity.cacheServed) {\n <span class=\"et-query-devtools-stat-sub\">{{ activity.cacheServed }} without a request</span>\n }\n </div>\n <div class=\"et-query-devtools-stat\" title=\"Executions that started a request, and how they ended\">\n <dt>Requests</dt>\n <dd>{{ activity.stats.requests }}</dd>\n <span class=\"et-query-devtools-stat-sub\">\n {{ activity.stats.responses }} ok\n @if (activity.stats.errors) {\n · {{ activity.stats.errors }} failed\n }\n </span>\n </div>\n <div\n class=\"et-query-devtools-stat\"\n title=\"Total response payload received. Sizes without a content-length header are measured from the decoded body, so they ignore compression.\"\n >\n <dt>Received</dt>\n <dd>{{ host.formatTransferred(activity.stats.receivedBytes, activity.stats.hasEstimatedBytes) }}</dd>\n @if (activity.avgResponseBytes !== null) {\n <span class=\"et-query-devtools-stat-sub\">{{ host.formatBytes(activity.avgResponseBytes) }} per response</span>\n }\n </div>\n @if (activity.stats.sentBytes) {\n <div class=\"et-query-devtools-stat\" title=\"Total request body sent (headers not counted)\">\n <dt>Sent</dt>\n <dd>{{ host.formatTransferred(activity.stats.sentBytes, activity.stats.hasEstimatedBytes) }}</dd>\n </div>\n }\n @if (activity.stats.retries) {\n <div\n class=\"et-query-devtools-stat\"\n title=\"Attempts the retry policy added on top of the first one. Which run they belong to is under History.\"\n >\n <dt>Retries</dt>\n <dd>{{ activity.stats.retries }}</dd>\n </div>\n }\n <div class=\"et-query-devtools-stat\" title=\"Measured from the execution that preceded each response\">\n <dt>Duration</dt>\n <dd>{{ host.formatDuration(activity.stats.lastDurationMs) }}</dd>\n @if (activity.avgDurationMs !== null) {\n <span class=\"et-query-devtools-stat-sub\">{{ host.formatDuration(activity.avgDurationMs) }} on average</span>\n }\n </div>\n <div class=\"et-query-devtools-stat\">\n <dt>Last response</dt>\n <dd class=\"et-query-devtools-stat-value--sm\">{{ host.formatTime(activity.stats.lastResponseAt) }}</dd>\n @if (activity.stats.firstExecutedAt !== null) {\n <span class=\"et-query-devtools-stat-sub\"\n >first ran {{ host.formatTime(activity.stats.firstExecutedAt) }}</span\n >\n }\n </div>\n </dl>\n }\n @case ('history') {\n <div class=\"et-query-devtools-section-row\">\n <h4 class=\"et-query-devtools-section\">Runs</h4>\n <button\n [disabled]=\"!detailRuns.length\"\n (click)=\"host.resetStats(s.entry)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Clear the run history and the counters, so the next interaction can be measured on its own\"\n >\n ⟲ Reset\n </button>\n </div>\n @if (detailRuns.length) {\n <table class=\"et-query-devtools-table\">\n <thead>\n <tr>\n <th>Run</th>\n <th>Started</th>\n <th>Duration</th>\n <th>Received</th>\n <th>Body</th>\n </tr>\n </thead>\n <tbody>\n @for (run of runSections().listed.concat(foldedRunsOpen() ? runSections().folded : []); track run.index) {\n <tr [attr.data-status]=\"run.status === 'error' ? 'error' : null\">\n <td>\n <span class=\"et-query-devtools-run-cell\">\n <span\n [attr.data-status]=\"host.runStatus(run)\"\n [title]=\"run.status\"\n class=\"et-query-devtools-status\"\n ></span>\n #{{ run.index }}\n @if (run.attempts > 1) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--loading\"\n title=\"Took {{\n run.attempts\n }} attempts - the duration next to it covers every one of them, backoff included\"\n >\n <span class=\"et-query-devtools-retry-glyph\" aria-hidden=\"true\">⟳</span>\n {{ run.attempts }}\n </span>\n }\n @if (!run.didRequest) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"Arrived without a request of this query's own - a poll, another consumer of the same cache entry, or another tab\"\n >\n shared\n </span>\n }\n @if (run.error; as error) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--error\"\n title=\"{{ error.messages.join(' · ') || 'The failure carried no message' }}\"\n >\n {{ error.code || 'failed' }}\n </span>\n }\n </span>\n </td>\n <td>{{ host.formatTime(run.startedAt) }}</td>\n <td>\n @if (run.endedAt === null) {\n in flight\n } @else {\n {{ host.formatDuration(run.endedAt - run.startedAt) }}\n }\n </td>\n <td>{{ run.receivedBytes ? host.formatBytes(run.receivedBytes) : '—' }}</td>\n <td>\n <span class=\"et-query-devtools-cell-actions\">\n @if (host.canDiffRun(s.entry, run)) {\n @let role = host.diffRunRole(s.entry, run);\n @let armed = role ? diffRoles[role] : null;\n <button\n [class.et-query-devtools-btn--active]=\"!!armed\"\n [title]=\"\n armed?.title ?? 'Compare this response against another run - click a second row to pick which'\n \"\n (click)=\"host.toggleRunDiff(s.entry, run)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n {{ armed?.label ?? 'Diff' }}\n </button>\n } @else if (run.error?.hasBody) {\n <button\n [class.et-query-devtools-btn--active]=\"host.errorRunIndex() === run.index\"\n (click)=\"host.toggleRunError(run)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Show the body this failure came with\"\n >\n Error\n </button>\n } @else if (run.hasResponse) {\n <span class=\"et-query-devtools-count\">the only body held</span>\n } @else if (run.status === 'success' || run.error) {\n <span\n class=\"et-query-devtools-count\"\n title=\"Only the newest {{\n host.retainedResponseCount()\n }} bodies of a query are kept, so this run can no longer be an end of a diff\"\n >\n body no longer held\n </span>\n } @else {\n <span class=\"et-query-devtools-count\">—</span>\n }\n </span>\n </td>\n </tr>\n }\n </tbody>\n </table>\n @let foldedRuns = runSections().folded.length;\n @if (foldedRuns) {\n <button\n [attr.aria-expanded]=\"foldedRunsOpen()\"\n (click)=\"foldedRunsOpen.set(!foldedRunsOpen())\"\n class=\"et-query-devtools-btn et-query-devtools-runs-fold\"\n type=\"button\"\n title=\"Only the newest {{\n host.retainedResponseCount()\n }} bodies of a query are kept, so none of these older runs can be an end of a diff\"\n >\n <span aria-hidden=\"true\">{{ foldedRunsOpen() ? '▾' : '▸' }}</span>\n {{ foldedRunsOpen() ? 'Hide' : 'Show' }} {{ foldedRuns }} older run{{ foldedRuns === 1 ? '' : 's' }} with no\n body\n </button>\n }\n\n @if (host.pickedRunError(s.entry); as failure) {\n <div class=\"et-query-devtools-section-row\">\n <h5 class=\"et-query-devtools-section\">\n Error body · run #{{ failure.run.index }} · {{ failure.error.code || 'no status' }}\n </h5>\n </div>\n @for (message of failure.error.messages; track message) {\n <p class=\"et-query-devtools-count\">{{ message }}</p>\n }\n <et-query-devtools-json\n [value]=\"failure.error.body\"\n [search]=\"host.jsonSearchTerm()\"\n [expandedPaths]=\"host.jsonExpandedPaths()\"\n [collapsedPaths]=\"host.jsonCollapsedPaths()\"\n [toggleFn]=\"host.toggleJsonPath\"\n path=\"runError\"\n />\n }\n\n @if (host.responseDiff(s.entry); as comparison) {\n <div class=\"et-query-devtools-section-row\">\n <h5 class=\"et-query-devtools-section\">\n Response diff · run #{{ comparison.before.index }} → #{{ comparison.after.index }}\n </h5>\n <span class=\"et-query-devtools-diff-step\">\n <button\n [disabled]=\"!host.canStepRunDiff(s.entry, true)\"\n (click)=\"host.stepRunDiff(s.entry, true)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Compare the pair one run older, without going back to the table\"\n >\n ◂ Older\n </button>\n <button\n [disabled]=\"!host.canStepRunDiff(s.entry, false)\"\n (click)=\"host.stepRunDiff(s.entry, false)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Compare the pair one run newer, without going back to the table\"\n >\n Newer ▸\n </button>\n </span>\n <span class=\"et-query-devtools-count\">\n @if (host.diffBaseRunIndex() === null) {\n <span\n title=\"Nothing is picked to compare against, so this is the nearest older run that still holds a body - click another run's Diff to pick one\"\n >\n nearest older\n </span>\n ·\n }\n @if (comparison.diff.entries.length) {\n {{ comparison.diff.entries.length }} path{{ comparison.diff.entries.length === 1 ? '' : 's' }}\n @if (comparison.diff.truncated) {\n (capped)\n }\n } @else {\n identical\n }\n </span>\n </div>\n @if (comparison.diff.entries.length) {\n <table class=\"et-query-devtools-table et-query-devtools-diff\">\n <thead>\n <tr>\n <th>Path</th>\n <th>Before</th>\n <th>After</th>\n </tr>\n </thead>\n <tbody>\n @for (change of comparison.diff.entries; track change.path) {\n <tr [attr.data-kind]=\"change.kind\">\n <td class=\"et-query-devtools-mono\">{{ change.path }}</td>\n <td class=\"et-query-devtools-mono et-query-devtools-diff-before\">\n {{ change.kind === 'added' ? '—' : host.inlineValue(change.before) }}\n </td>\n <td class=\"et-query-devtools-mono et-query-devtools-diff-after\">\n {{ change.kind === 'removed' ? '—' : host.inlineValue(change.after) }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n } @else {\n <p class=\"et-query-devtools-empty\">The two responses are identical.</p>\n }\n }\n } @else {\n <p class=\"et-query-devtools-empty\">No runs recorded yet.</p>\n }\n }\n @case ('data') {\n @if (s.entry.meta.gqlQuery; as gqlQuery) {\n <div class=\"et-query-devtools-section-row\">\n <h5 class=\"et-query-devtools-section\">GraphQL document</h5>\n <button\n (click)=\"host.copyGqlDocument(gqlQuery)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Copy the GraphQL document\"\n >\n {{ host.copiedGql() ? '✓ Copied' : '⧉ Copy' }}\n </button>\n </div>\n <pre class=\"et-query-devtools-code\">{{ host.gqlDocument(gqlQuery) }}</pre>\n }\n\n <div class=\"et-query-devtools-section-row\">\n <h4 class=\"et-query-devtools-section\">Value explorer</h4>\n <input\n #jsonSearchInput\n [value]=\"host.jsonSearch()\"\n (input)=\"host.jsonSearch.set(jsonSearchInput.value)\"\n class=\"et-query-devtools-search\"\n type=\"search\"\n placeholder=\"filter keys / values…\"\n />\n </div>\n\n <h5 class=\"et-query-devtools-section\">Args</h5>\n <et-query-devtools-json\n [value]=\"host.queryArgs(s.query)\"\n [search]=\"host.jsonSearchTerm()\"\n [expandedPaths]=\"host.jsonExpandedPaths()\"\n [collapsedPaths]=\"host.jsonCollapsedPaths()\"\n [toggleFn]=\"host.toggleJsonPath\"\n path=\"args\"\n />\n\n @if (s.query.error(); as error) {\n <h5 class=\"et-query-devtools-section\">Error ({{ error.raw.status }})</h5>\n <et-query-devtools-json\n [value]=\"error.isList ? error.errors : error.error\"\n [search]=\"host.jsonSearchTerm()\"\n [expandedPaths]=\"host.jsonExpandedPaths()\"\n [collapsedPaths]=\"host.jsonCollapsedPaths()\"\n [toggleFn]=\"host.toggleJsonPath\"\n path=\"error\"\n />\n } @else {\n <div class=\"et-query-devtools-section-row\">\n <h5 class=\"et-query-devtools-section\">Response</h5>\n @if (s.entry.overrides?.list()?.length || host.overridesPersist()) {\n <button\n [class.et-query-devtools-btn--active]=\"host.overridesPersist()\"\n [attr.aria-pressed]=\"host.overridesPersist()\"\n (click)=\"host.toggleOverridesPersist()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"{{\n host.overridesPersist()\n ? 'Panel-wide: every armed response override is kept in ' +\n host.overridesScopeLabel() +\n ' and replayed on the next load.'\n : 'Panel-wide: keep every armed response override and replay it on the next load.'\n }} Settings ⚙ chooses the scope. Armed faults are never kept.\"\n >\n Keep across reloads\n </button>\n }\n @if (s.entry.overrides?.list()?.length) {\n <button (click)=\"s.entry.overrides?.clearAll()\" class=\"et-query-devtools-btn\" type=\"button\">\n Reset all overrides ({{ s.entry.overrides?.list()?.length }})\n </button>\n }\n </div>\n <et-query-devtools-json\n [value]=\"s.query.response()\"\n [search]=\"host.jsonSearchTerm()\"\n [expandedPaths]=\"host.jsonExpandedPaths()\"\n [collapsedPaths]=\"host.jsonCollapsedPaths()\"\n [toggleFn]=\"host.toggleJsonPath\"\n [overrides]=\"s.entry.overrides ?? null\"\n path=\"response\"\n />\n }\n }\n}\n","import { Component, input, output, ViewEncapsulation } from '@angular/core';\nimport { QueryDevtoolsEntry } from '@ethlete/query';\nimport { QueryDevtoolsDetailComponent } from './query-devtools-detail.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { AnyQuery } from './query-devtools-types';\n\n/**\n * The split-view drawer every two-pane tab (stacks/sequences/forms/timeline) opens a query in - the\n * resize handle, the `<aside>` chrome and the close button around a `<et-query-devtools-detail>`. The\n * Queries tab renders that same detail component inline instead, without this wrapper, since it has no\n * separate list/drawer split to close.\n */\n@Component({\n selector: 'et-query-devtools-drawer',\n templateUrl: './query-devtools-drawer.component.html',\n styleUrl: './query-devtools-drawer.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsDetailComponent],\n})\nexport class QueryDevtoolsDrawerComponent {\n protected host = injectQueryDevtoolsHost();\n\n public sel = input<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>(null);\n public container = input.required<HTMLElement>();\n\n public dismiss = output<void>();\n}\n","@if (sel(); as selected) {\n <div\n (pointerdown)=\"host.startPaneResize($event, { pane: 'drawer', container: container() })\"\n (dblclick)=\"host.resetPaneSize('drawer')\"\n class=\"et-query-devtools-pane-resize\"\n title=\"Drag to resize, double-click to reset\"\n aria-hidden=\"true\"\n ></div>\n\n <aside class=\"et-query-devtools-drawer\">\n <div class=\"et-query-devtools-drawer-head\">\n <span>Query detail</span>\n <button (click)=\"dismiss.emit()\" class=\"et-query-devtools-close\" type=\"button\" title=\"Close detail\">✕</button>\n </div>\n <et-query-devtools-detail [sel]=\"selected\" />\n </aside>\n}\n","import { Component, computed, ViewEncapsulation } from '@angular/core';\nimport { QueryDevtoolsDrawerComponent } from './query-devtools-drawer.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { DESTROY_CAUSE_LABELS, EventLogItem } from './query-devtools-types';\n\n/** The Events tab: the rolling log of repository traffic, refreshes and secure unbinds. */\n@Component({\n selector: 'et-query-devtools-events-tab',\n templateUrl: './query-devtools-events-tab.component.html',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsDrawerComponent],\n})\nexport class QueryDevtoolsEventsTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n /**\n * The event rows the log shows: the client picker and the errors-only toggle applied. Kept apart from\n * the full log so \"Refetched by\" and the session export keep reading all of it.\n */\n protected filteredEvents = computed(() => {\n const client = this.host.eventClient();\n const errorsOnly = this.host.eventErrorsOnly();\n const events = this.host.eventLog();\n\n if (!client && !errorsOnly) return events;\n\n return events.filter(\n (event) => (!client || event.client === client) && (!errorsOnly || event.type === 'request-error'),\n );\n });\n\n /** The clients the event log has rows from, as its picker offers them. */\n protected eventClients = computed(() => {\n const names = new Set(this.host.repositories().map(({ name, baseUrl }) => baseUrl || name));\n\n return Array.from(names).sort();\n });\n\n protected isEventLogNarrowed = computed(() => !!this.host.eventClient() || this.host.eventErrorsOnly());\n\n protected clearEvents() {\n this.host.eventLog.set([]);\n }\n\n protected toggleEventErrorsOnly() {\n this.host.eventErrorsOnly.update((v) => !v);\n }\n\n protected clearEventFilters() {\n this.host.eventClient.set(null);\n this.host.eventErrorsOnly.set(false);\n }\n\n /**\n * Opens the query a row belongs to in this tab's own drawer, rather than jumping to the Queries tab -\n * the log is read by walking rows, and a jump ends that walk on every click.\n */\n protected selectEventRow(item: EventLogItem) {\n if (item.queryId) this.host.eventSelectedQueryId.set(item.queryId);\n }\n\n /**\n * Whether a row's query can still be opened. An id alone does not say so: a query batch destroys each\n * item's query as that item settles and leaves no tombstone behind, so a bulk run's rows would\n * otherwise all render as links that open nothing.\n */\n protected canOpenEventRow(id: string | null) {\n return !!id && !!this.host.findQuery(id);\n }\n\n /** Only a request settling is a success or a failure; a teardown or a refresh is neither. */\n protected eventRowStatus(event: EventLogItem) {\n if (event.type === 'request-error') return 'error';\n if (event.type === 'request-success') return 'success';\n\n return null;\n }\n\n protected eventTypeLabel(event: EventLogItem) {\n if (event.type === 'unbind-all-secure') return 'logout';\n if (event.type === 'queries-refreshed') return `refetch ×${event.refreshed?.length ?? 0}`;\n if (event.type === 'entry-destroyed') return `dropped · ${DESTROY_CAUSE_LABELS[event.destroyCause ?? 'unbind']}`;\n\n return event.type === 'request-error' ? `error ${event.status}` : 'success';\n }\n}\n","<div #panes class=\"et-query-devtools-split\">\n <div class=\"et-query-devtools-pane\">\n <div class=\"et-query-devtools-toolbar\">\n <div class=\"et-query-devtools-toolbar-row\">\n @if (eventClients().length > 1) {\n <label class=\"et-query-devtools-field\">\n <span>Client</span>\n <select\n #eventClientSelect\n [value]=\"host.eventClient() ?? ''\"\n (change)=\"host.eventClient.set(eventClientSelect.value || null)\"\n class=\"et-query-devtools-select\"\n >\n <option value=\"\">All clients</option>\n @for (name of eventClients(); track name) {\n <option [value]=\"name\">{{ name }}</option>\n }\n </select>\n </label>\n }\n @let errorsOnly = host.eventErrorsOnly();\n <button\n [class.et-query-devtools-facet--active]=\"errorsOnly\"\n [attr.aria-pressed]=\"errorsOnly\"\n (click)=\"toggleEventErrorsOnly()\"\n class=\"et-query-devtools-chip et-query-devtools-facet\"\n type=\"button\"\n title=\"Show only the requests that failed\"\n >\n Errors only\n <span class=\"et-query-devtools-facet-count\">{{ host.tabBadges().events.errors }}</span>\n </button>\n <span class=\"et-query-devtools-count\">\n @if (isEventLogNarrowed()) {\n {{ filteredEvents().length }} of {{ host.eventLog().length }} events\n } @else {\n {{ host.eventLog().length }} events\n }\n </span>\n @if (isEventLogNarrowed()) {\n <button\n (click)=\"clearEventFilters()\"\n class=\"et-query-devtools-filter-clear\"\n type=\"button\"\n title=\"Clear the client scope and the errors-only toggle\"\n aria-label=\"Clear filters\"\n >\n <span aria-hidden=\"true\">✕</span>\n </button>\n }\n <button (click)=\"clearEvents()\" class=\"et-query-devtools-btn et-query-devtools-toolbar-btn\" type=\"button\">\n Clear\n </button>\n </div>\n </div>\n <div class=\"et-query-devtools-scroll\">\n <table class=\"et-query-devtools-table\">\n <thead>\n <tr>\n <th>Time</th>\n <th class=\"et-query-devtools-cell-origin\">Base URL</th>\n <th>Type</th>\n <th>Request</th>\n <th>Duration</th>\n <th>Size</th>\n </tr>\n </thead>\n <tbody>\n @for (event of filteredEvents(); track event.id) {\n <tr\n [attr.data-status]=\"eventRowStatus(event)\"\n [class.et-query-devtools-row--active]=\"!!event.queryId && host.eventSelectedQueryId() === event.queryId\"\n >\n <td>{{ host.formatTime(event.timestamp) }}</td>\n <td [title]=\"event.client\" class=\"et-query-devtools-mono et-query-devtools-cell-origin\">\n {{ event.client }}\n </td>\n <td>\n {{ eventTypeLabel(event) }}\n @if (event.isSecure) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">secure</span>\n }\n </td>\n @if (event.cause; as cause) {\n <td>\n <span class=\"et-query-devtools-url\">{{ host.causeLabel(cause) }}</span>\n @if (event.refreshed?.length) {\n <div class=\"et-query-devtools-chips\">\n @for (refreshed of event.refreshed; track $index) {\n @if (\n canOpenEventRow(refreshed.queryIds[0] ?? null) ? refreshed.queryIds[0] : null;\n as queryId\n ) {\n <button\n (click)=\"host.eventSelectedQueryId.set(queryId)\"\n class=\"et-query-devtools-chip et-query-devtools-chip--button\"\n type=\"button\"\n title=\"Open {{ refreshed.method }} {{ refreshed.path }}\"\n >\n {{ refreshed.method }} {{ refreshed.path }}\n <!-- One request, several queries on the same cache key. Spelling the count\n out beats repeating an identical row per consumer. -->\n @if (refreshed.queryIds.length > 1) {\n <small>×{{ refreshed.queryIds.length }}</small>\n }\n </button>\n } @else {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"No registered query holds this cache entry any more\"\n >\n {{ refreshed.method }} {{ refreshed.path }}\n </span>\n }\n }\n </div>\n } @else {\n <span class=\"et-query-devtools-hint\">matched no query in use</span>\n }\n </td>\n } @else if (event.url; as url) {\n <td>\n @if (canOpenEventRow(event.queryId)) {\n <button\n (click)=\"selectEventRow(event)\"\n class=\"et-query-devtools-row-link\"\n type=\"button\"\n title=\"Open {{ event.method }} {{ url }}\"\n >\n <span class=\"et-query-devtools-method\">{{ event.method }}</span>\n <span class=\"et-query-devtools-url\">{{ host.requestPath(url) }}</span>\n </button>\n } @else {\n <span [title]=\"event.method + ' ' + url\">\n <span class=\"et-query-devtools-method\">{{ event.method }}</span>\n <span class=\"et-query-devtools-url\">{{ host.requestPath(url) }}</span>\n </span>\n }\n </td>\n } @else {\n <td class=\"et-query-devtools-url\">all secure entries dropped</td>\n }\n <td>{{ host.formatDuration(event.durationMs) }}</td>\n <td>{{ event.bytes === null ? '—' : host.formatTransferred(event.bytes, event.isEstimatedBytes) }}</td>\n </tr>\n } @empty {\n <tr>\n @if (host.eventLog().length) {\n <td class=\"et-query-devtools-empty\" colspan=\"6\">\n No event matches the filter · {{ host.eventLog().length }} in the log.\n </td>\n } @else {\n <td class=\"et-query-devtools-empty\" colspan=\"6\">No events captured yet.</td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n </div>\n\n <et-query-devtools-drawer\n [sel]=\"host.eventSelectedQuery()\"\n [container]=\"panes\"\n (dismiss)=\"host.eventSelectedQueryId.set(null)\"\n />\n</div>\n","import { Component, computed, input, linkedSignal, output, signal, ViewEncapsulation } from '@angular/core';\nimport { applyQueryDevtoolsOverrides, createQueryDevtoolsOverrides } from '@ethlete/query';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\n\n/** Which editor the designed body is being changed through. */\ntype DesignerMode = 'design' | 'json';\n\n/**\n * The body editor of a designed mock: the value explorer's per-node override menu - presets,\n * fill-recursively, duplicate, pagination resize, paste, delete - pointed at a draft instead of at a live\n * response, so the same vocabulary that tampers with real data authors fake data.\n *\n * Edits accumulate as override ops and are flattened into a plain body on save, which is what makes\n * \"undo all\" free and keeps the stored mock a value rather than a recipe.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-mock-designer',\n templateUrl: './query-devtools-mock-designer.component.html',\n styleUrl: './query-devtools-mock-designer.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsJsonComponent],\n})\nexport class QueryDevtoolsMockDesignerComponent {\n /** The body the session starts from. Changing it restarts the session, dropping any unsaved edits. */\n public body = input<unknown>();\n\n /** The declared type of each field, as a seed from the API description produces it. */\n public annotations = input<ReadonlyMap<string, string> | null>(null);\n\n /** What the description had to guess or could not read, shown under the body it seeded. */\n public notes = input<readonly string[]>([]);\n\n public save = output<unknown>();\n public dismiss = output<void>();\n\n /** A fresh recorder per body, so reopening the designer never replays the last session's ops. */\n protected recorder = linkedSignal<unknown, ReturnType<typeof createQueryDevtoolsOverrides>>({\n source: () => this.body(),\n computation: () => createQueryDevtoolsOverrides(),\n });\n\n protected mode = signal<DesignerMode>('design');\n protected jsonError = signal<string | null>(null);\n\n protected editCount = computed(() => this.recorder().list().length);\n\n /** The body as it now reads: every armed op replayed against the one the session started from. */\n protected designed = computed(() => applyQueryDevtoolsOverrides(this.recorder().list(), this.body()).value);\n\n /** The raw editor's text, re-seeded from the designed body whenever that changes underneath it. */\n protected jsonDraft = linkedSignal(() => safeStringify(this.designed()));\n\n protected undoAll() {\n this.recorder().clearAll();\n this.jsonError.set(null);\n }\n\n /**\n * Leaving the raw editor carries whatever was typed there into the tree as one root-level edit, so the\n * two editors are two views of one draft rather than two drafts.\n */\n protected showDesign() {\n const text = this.jsonDraft();\n\n if (text !== safeStringify(this.designed())) {\n let value: unknown;\n\n try {\n value = JSON.parse(text || 'null');\n } catch (error) {\n this.jsonError.set(error instanceof Error ? error.message : String(error));\n\n return;\n }\n\n this.recorder().arm({ type: 'set', path: [], value });\n }\n\n this.mode.set('design');\n this.jsonError.set(null);\n }\n\n protected showJson() {\n this.mode.set('json');\n this.jsonError.set(null);\n }\n\n protected apply() {\n if (this.mode() === 'design') {\n this.save.emit(this.designed());\n\n return;\n }\n\n try {\n this.save.emit(JSON.parse(this.jsonDraft() || 'null'));\n } catch (error) {\n this.jsonError.set(error instanceof Error ? error.message : String(error));\n }\n }\n}\n\nconst safeStringify = (value: unknown) => {\n try {\n return JSON.stringify(value, null, 2) ?? 'null';\n } catch {\n return 'null';\n }\n};\n","<div class=\"et-query-devtools-designer\">\n <div class=\"et-query-devtools-designer-head\">\n <span class=\"et-query-devtools-section\">Body</span>\n <div class=\"et-query-devtools-designer-modes\">\n <button\n [attr.aria-pressed]=\"mode() === 'design'\"\n [class.et-query-devtools-btn--primary]=\"mode() === 'design'\"\n (click)=\"showDesign()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Edit field by field, with the same menu the value explorer tampers with a real response through\"\n >\n Design\n </button>\n <button\n [attr.aria-pressed]=\"mode() === 'json'\"\n [class.et-query-devtools-btn--primary]=\"mode() === 'json'\"\n (click)=\"showJson()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Edit the whole body as raw JSON\"\n >\n JSON\n </button>\n </div>\n @if (editCount()) {\n <span class=\"et-query-devtools-count\">{{ editCount() }} {{ editCount() === 1 ? 'edit' : 'edits' }}</span>\n <button (click)=\"undoAll()\" class=\"et-query-devtools-btn\" type=\"button\">Undo all</button>\n }\n </div>\n\n @if (mode() === 'design') {\n <div class=\"et-query-devtools-designer-tree\">\n <et-query-devtools-json [value]=\"designed()\" [overrides]=\"recorder()\" [annotations]=\"annotations()\" />\n </div>\n } @else {\n <textarea\n #jsonInput\n [value]=\"jsonDraft()\"\n (input)=\"jsonDraft.set(jsonInput.value)\"\n class=\"et-query-devtools-input et-query-devtools-mock-textarea\"\n rows=\"12\"\n spellcheck=\"false\"\n aria-label=\"The designed body as JSON\"\n ></textarea>\n }\n\n @if (jsonError(); as error) {\n <p class=\"et-query-devtools-settings-warn\">{{ error }}</p>\n }\n\n @if (notes().length) {\n <ul class=\"et-query-devtools-designer-notes\">\n @for (note of notes(); track note) {\n <li>{{ note }}</li>\n }\n </ul>\n }\n\n <div class=\"et-query-devtools-mock-head\">\n <button (click)=\"apply()\" class=\"et-query-devtools-btn et-query-devtools-btn--primary\" type=\"button\">Apply</button>\n <button (click)=\"dismiss.emit()\" class=\"et-query-devtools-btn\" type=\"button\">Cancel</button>\n </div>\n</div>\n","/**\n * How deep a designed body is walked before a nested value is inferred as an unconstrained schema. A\n * body nested deeper than this is not a shape anyone merges into a specification.\n */\nconst MAX_DEPTH = 10;\n\n/** An ISO date-time, strictly enough that nothing else is mistaken for one. */\nconst DATE_TIME = /^\\d{4}-\\d{2}-\\d{2}[Tt]\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?([Zz]|[+-]\\d{2}:\\d{2})$/;\n\nconst UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n\n/** One designed mock, as the export reads it. */\nexport type QueryDevtoolsOpenApiMock = {\n /** Which query client serves it - the operation's tag, since a document has no other place for it. */\n clientName: string;\n\n method: string;\n\n /** The route with its path params as `:name`; the document writes them as `{name}`. */\n pattern: string;\n\n /** Query parameters the mock declares, as a query string (`page=2&limit=10`). */\n query: string;\n\n status: number;\n\n body: unknown;\n\n /**\n * The named schema the body was seeded from. When the export carries that schema, the response\n * references it instead of an anonymous shape inferred from the body.\n */\n schemaName?: string | null;\n\n /** Set when the body came from a real response rather than being written by hand. */\n capturedAt?: number | null;\n};\n\nexport type BuildQueryDevtoolsOpenApiOptions = {\n mocks: readonly QueryDevtoolsOpenApiMock[];\n\n /**\n * Named schemas lifted out of the application's own API description, keyed as `components.schemas`\n * wants them - `collectQueryDevtoolsSchemaComponents` in `@ethlete/query` produces them.\n */\n schemas?: Record<string, unknown>;\n\n /** Wall-clock time of the export - passed in so the builder stays pure. */\n now: number;\n\n title?: string;\n};\n\n/** An OpenAPI 3.1 document, as far as this export writes one. */\nexport type QueryDevtoolsOpenApiDocument = {\n openapi: '3.1.0';\n info: { title: string; version: string; description: string };\n paths: Record<string, Record<string, unknown>>;\n components?: { schemas: Record<string, unknown> };\n};\n\nexport type QueryDevtoolsOpenApiExport<TDocument> = {\n document: TDocument;\n\n /** What had to be guessed or dropped, so the document is never taken for the contract. */\n notes: readonly string[];\n};\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n !!value && typeof value === 'object' && !Array.isArray(value);\n\n/** `/matches/:id` is how a mock writes a route; a document writes it `/matches/{id}`. */\nconst toBracePattern = (pattern: string) => pattern.replace(/:([^/]+)/g, '{$1}');\n\nconst pathParamsOf = (pattern: string) =>\n pattern\n .split('/')\n .filter((segment) => segment.startsWith(':'))\n .map((segment) => segment.slice(1));\n\n/**\n * The schema of one sample value. **Inferred from a single example**, so every property the example held\n * is listed as required, nothing is nullable, and a `null` carries no type at all - what the example\n * proves and not one claim more. The document's own description says so.\n */\nexport const inferQueryDevtoolsOpenApiSchema = (value: unknown, depth = 0): Record<string, unknown> => {\n if (depth >= MAX_DEPTH) return {};\n\n // One example cannot say what a null-valued property is when it holds something, so it says nothing.\n if (value === null || value === undefined) return {};\n\n switch (typeof value) {\n case 'string':\n if (DATE_TIME.test(value)) return { type: 'string', format: 'date-time' };\n if (UUID.test(value)) return { type: 'string', format: 'uuid' };\n\n return { type: 'string' };\n case 'number':\n if (!Number.isFinite(value)) return { type: 'number' };\n\n return { type: Number.isInteger(value) ? 'integer' : 'number' };\n case 'boolean':\n return { type: 'boolean' };\n default:\n break;\n }\n\n if (Array.isArray(value)) return { type: 'array', items: itemsOf(value, depth) };\n\n if (isPlainObject(value)) {\n const entries = Object.entries(value);\n\n if (!entries.length) return { type: 'object' };\n\n return {\n type: 'object',\n properties: Object.fromEntries(\n entries.map(([key, entry]) => [key, inferQueryDevtoolsOpenApiSchema(entry, depth + 1)]),\n ),\n required: entries.map(([key]) => key),\n };\n }\n\n return {};\n};\n\n/**\n * The element schema of an array: the one its members agree on, or a `oneOf` of the shapes they do not.\n * An empty array says nothing about its elements, so it constrains nothing.\n */\nconst itemsOf = (value: readonly unknown[], depth: number): Record<string, unknown> => {\n const members = new Map<string, Record<string, unknown>>();\n\n for (const entry of value) {\n const schema = inferQueryDevtoolsOpenApiSchema(entry, depth + 1);\n\n members.set(JSON.stringify(schema), schema);\n }\n\n const distinct = [...members.values()];\n\n if (!distinct.length) return {};\n if (distinct.length === 1) return distinct[0] as Record<string, unknown>;\n\n return { oneOf: distinct };\n};\n\n/** `page=2` is an integer and `draft=true` a boolean, the same reading the TypeScript snippet takes. */\nconst queryParamSchema = (value: string): Record<string, unknown> => {\n if (value === 'true' || value === 'false') return { type: 'boolean' };\n if (value !== '' && Number.isFinite(Number(value))) {\n return { type: Number.isInteger(Number(value)) ? 'integer' : 'number' };\n }\n\n return { type: 'string' };\n};\n\n/** `GET /posts/:id/comments` becomes `getPostsComments` - the verb, then every literal segment. */\nconst operationIdOf = (mock: Pick<QueryDevtoolsOpenApiMock, 'method' | 'pattern'>) => {\n const words = mock.pattern\n .split('/')\n .filter((segment) => segment && !segment.startsWith(':'))\n .flatMap((segment) => segment.split(/[^A-Za-z0-9]+/))\n .filter(Boolean);\n\n const name = [mock.method.toLowerCase(), ...words.map((word) => word[0]?.toUpperCase() + word.slice(1))].join('');\n\n return /^[A-Za-z_$]/.test(name) ? name : `operation${name}`;\n};\n\nconst parametersOf = (mocks: readonly QueryDevtoolsOpenApiMock[]) => {\n const first = mocks[0] as QueryDevtoolsOpenApiMock;\n const parameters: Record<string, unknown>[] = pathParamsOf(first.pattern).map((name) => ({\n name,\n in: 'path',\n required: true,\n schema: { type: 'string' },\n }));\n\n const seen = new Set<string>();\n\n for (const mock of mocks) {\n for (const [name, value] of new URLSearchParams(mock.query)) {\n if (seen.has(name)) continue;\n\n seen.add(name);\n // A mock declares what a request must carry for *it* to answer, which says nothing about whether\n // the endpoint requires it - so an exported query parameter is never marked required.\n parameters.push({ name, in: 'query', required: false, schema: queryParamSchema(value), example: value });\n }\n }\n\n return parameters;\n};\n\n/** A `?page=2` mock and a plain one are two examples of one response; the query string names them apart. */\nconst exampleNameOf = (mock: QueryDevtoolsOpenApiMock, taken: Set<string>) => {\n const base = mock.query || mock.clientName || 'designed';\n let name = base;\n\n for (let attempt = 2; taken.has(name); attempt++) name = `${base} (${attempt})`;\n\n taken.add(name);\n\n return name;\n};\n\nconst responseDescription = (mocks: readonly QueryDevtoolsOpenApiMock[], status: number) => {\n const clients = [...new Set(mocks.map((mock) => mock.clientName).filter(Boolean))];\n const served = clients.length ? ` served for ${clients.join(', ')}` : '';\n const captured = mocks.some((mock) => mock.capturedAt) ? ' Captured from a real response.' : '';\n\n return `${status >= 400 ? 'A designed failure' : 'The designed response'}${served}.${captured}`;\n};\n\ntype ResponseContext = {\n /** Named schemas the export carries, so a seeded response can reference one rather than infer it. */\n schemas: Record<string, unknown>;\n notes: Set<string>;\n};\n\nconst responseSchema = (mock: QueryDevtoolsOpenApiMock, ctx: ResponseContext): Record<string, unknown> => {\n const name = mock.schemaName;\n\n if (name && name in ctx.schemas) return { $ref: `#/components/schemas/${name}` };\n\n if (name) {\n ctx.notes.add(\n `${mock.method} ${mock.pattern} was seeded from ${name}, which is not in this export - its schema was inferred from the body instead.`,\n );\n }\n\n return inferQueryDevtoolsOpenApiSchema(mock.body);\n};\n\nconst responsesOf = (mocks: readonly QueryDevtoolsOpenApiMock[], ctx: ResponseContext) => {\n const byStatus = new Map<number, QueryDevtoolsOpenApiMock[]>();\n\n for (const mock of mocks) {\n const list = byStatus.get(mock.status);\n\n if (list) list.push(mock);\n else byStatus.set(mock.status, [mock]);\n }\n\n const responses: Record<string, unknown> = {};\n\n for (const [status, list] of [...byStatus.entries()].sort(([a], [b]) => a - b)) {\n const first = list[0] as QueryDevtoolsOpenApiMock;\n const schema = responseSchema(first, ctx);\n\n if (list.length > 1) {\n ctx.notes.add(\n `${first.method} ${first.pattern} has ${list.length} designed ${status} responses - the first one's schema was exported, and all of them as examples.`,\n );\n }\n\n const taken = new Set<string>();\n const examples =\n list.length === 1\n ? { example: first.body }\n : {\n examples: Object.fromEntries(\n list.map((mock) => [exampleNameOf(mock, taken), { value: mock.body }] as const),\n ),\n };\n\n responses[String(status)] = {\n description: responseDescription(list, status),\n content: { 'application/json': { schema, ...examples } },\n };\n }\n\n return responses;\n};\n\n/** The methods a designed request body would belong to, so the export says it does not have one. */\nconst SENDS_BODY: ReadonlySet<string> = /* @__PURE__ */ new Set(['POST', 'PUT', 'PATCH']);\n\nconst operationDescription = (mocks: readonly QueryDevtoolsOpenApiMock[], ctx: ResponseContext) => {\n const first = mocks[0] as QueryDevtoolsOpenApiMock;\n const named = mocks.map((mock) => mock.schemaName).find((name) => !!name && name in ctx.schemas);\n const lines = [\n named\n ? `The response is this description's own ${named}, which the mock was seeded from.`\n : \"The response schema was inferred from the designed body - see this document's description.\",\n ];\n\n if (SENDS_BODY.has(first.method.toUpperCase())) {\n lines.push('The devtools design a response only, so no request body is declared here.');\n }\n\n return lines.join(' ');\n};\n\nconst operationOf = (mocks: readonly QueryDevtoolsOpenApiMock[], ctx: ResponseContext) => {\n const first = mocks[0] as QueryDevtoolsOpenApiMock;\n const path = toBracePattern(first.pattern);\n const tags = [...new Set(mocks.map((mock) => mock.clientName).filter(Boolean))];\n const parameters = parametersOf(mocks);\n\n return {\n ...(tags.length ? { tags } : {}),\n summary: `Designed response for ${first.method.toUpperCase()} ${path}`,\n description: operationDescription(mocks, ctx),\n operationId: operationIdOf(first),\n ...(parameters.length ? { parameters } : {}),\n responses: responsesOf(mocks, ctx),\n };\n};\n\n/**\n * Groups mocks into `paths` entries - one path item per route, one operation per method, one response\n * per status. Operation ids are made unique inside the document, since two clients can serve one route.\n */\nconst pathsOf = (mocks: readonly QueryDevtoolsOpenApiMock[], ctx: ResponseContext) => {\n const groups = new Map<string, QueryDevtoolsOpenApiMock[]>();\n\n for (const mock of mocks) {\n const key = `${toBracePattern(mock.pattern)}|${mock.method.toLowerCase()}`;\n const group = groups.get(key);\n\n if (group) group.push(mock);\n else groups.set(key, [mock]);\n }\n\n const paths: Record<string, Record<string, unknown>> = {};\n const ids = new Set<string>();\n\n for (const group of groups.values()) {\n const first = group[0] as QueryDevtoolsOpenApiMock;\n const path = toBracePattern(first.pattern);\n const operation = operationOf(group, ctx);\n\n let id = operation.operationId;\n\n for (let attempt = 2; ids.has(id); attempt++) id = `${operation.operationId}${attempt}`;\n\n ids.add(id);\n paths[path] = { ...paths[path], [first.method.toLowerCase()]: { ...operation, operationId: id } };\n }\n\n return paths;\n};\n\nconst INFO_DESCRIPTION = /* @__PURE__ */ [\n 'Responses designed in the @ethlete/query devtools and served to the application in place of real requests.',\n '',\n 'Every schema here was inferred from one example, so it says what that example held and nothing more:',\n 'each property the example carried is listed as required, no property is marked nullable, and one whose',\n 'example was null carries no type at all. A route seeded from a named schema references that schema',\n 'instead, and the schema is copied in unchanged.',\n].join('\\n');\n\n/**\n * Builds an OpenAPI 3.1 document from a set of designed mocks - the response side of what the Insomnia\n * and cURL exports do for the request side, and the artefact an API team can merge.\n */\nexport const buildQueryDevtoolsOpenApiDocument = (\n options: BuildQueryDevtoolsOpenApiOptions,\n): QueryDevtoolsOpenApiExport<QueryDevtoolsOpenApiDocument> => {\n const ctx: ResponseContext = { schemas: options.schemas ?? {}, notes: new Set() };\n const paths = pathsOf(options.mocks, ctx);\n const used = referencedSchemas(paths, ctx.schemas);\n\n return {\n document: {\n openapi: '3.1.0',\n info: {\n title: options.title ?? 'Designed mocks',\n version: new Date(options.now).toISOString().slice(0, 10),\n description: INFO_DESCRIPTION,\n },\n paths,\n ...(Object.keys(used).length ? { components: { schemas: used } } : {}),\n },\n notes: [...ctx.notes],\n };\n};\n\n/**\n * Builds the `paths` entry for one mock, so a single route can be pasted under an existing document's\n * `paths`. A response seeded from a named schema keeps its `$ref`: the fragment is merged into the\n * description that declares it, so carrying a copy of the schema along would only conflict with it.\n */\nexport const buildQueryDevtoolsOpenApiPathItem = (\n options: Pick<BuildQueryDevtoolsOpenApiOptions, 'mocks' | 'schemas'>,\n): QueryDevtoolsOpenApiExport<Record<string, Record<string, unknown>>> => {\n const ctx: ResponseContext = { schemas: options.schemas ?? {}, notes: new Set() };\n const paths = pathsOf(options.mocks, ctx);\n // Only what the fragment itself points at: whatever declares those already resolves the rest.\n const referenced = [...collectRefNames(paths)].filter((name) => name in ctx.schemas);\n\n if (referenced.length) {\n ctx.notes.add(\n `This fragment references ${referenced.join(', ')} - paste it into the description that declares ${referenced.length > 1 ? 'them' : 'it'}.`,\n );\n }\n\n return { document: paths, notes: [...ctx.notes] };\n};\n\n/** Only the named schemas the exported paths actually reference, plus what those reference in turn. */\nconst referencedSchemas = (paths: unknown, schemas: Record<string, unknown>) => {\n const used: Record<string, unknown> = {};\n const pending = [...collectRefNames(paths)];\n\n while (pending.length) {\n const name = pending.shift() as string;\n\n if (name in used || !(name in schemas)) continue;\n\n used[name] = schemas[name];\n pending.push(...collectRefNames(schemas[name]));\n }\n\n return used;\n};\n\nconst REF_PREFIX = '#/components/schemas/';\n\nconst collectRefNames = (value: unknown, into = new Set<string>()) => {\n if (Array.isArray(value)) {\n for (const entry of value) collectRefNames(entry, into);\n\n return into;\n }\n\n if (!isPlainObject(value)) return into;\n\n for (const [key, entry] of Object.entries(value)) {\n if (key === '$ref' && typeof entry === 'string' && entry.startsWith(REF_PREFIX)) {\n into.add(entry.slice(REF_PREFIX.length));\n\n continue;\n }\n\n collectRefNames(entry, into);\n }\n\n return into;\n};\n","/**\n * How deep a sample is walked before a nested value is given up on as `unknown`. A body nested deeper\n * than this is not a type anyone pastes into their code.\n */\nconst MAX_DEPTH = 8;\n\nconst INDENT = ' ';\n\n/** A key that can be written bare in a type literal; anything else is quoted. */\nconst isSafeKey = (key: string) => /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(key);\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n !!value && typeof value === 'object' && !Array.isArray(value);\n\n/**\n * The TypeScript type of one sample value. **Inferred from a single example**, so it says what that\n * example held and nothing about what is optional or nullable - the snippet says so in a comment rather\n * than guessing.\n */\nexport const inferTypeScriptType = (value: unknown, depth = 0): string => {\n if (value === null) return 'null';\n if (depth >= MAX_DEPTH) return 'unknown';\n\n switch (typeof value) {\n case 'string':\n return 'string';\n case 'number':\n return 'number';\n case 'boolean':\n return 'boolean';\n default:\n break;\n }\n\n if (Array.isArray(value)) {\n const members = [...new Set(value.map((item) => inferTypeScriptType(item, depth + 1)))];\n\n if (!members.length) return 'unknown[]';\n if (members.length === 1) return `${members[0]}[]`;\n\n return `(${members.join(' | ')})[]`;\n }\n\n if (isPlainObject(value)) {\n const entries = Object.entries(value);\n\n if (!entries.length) return 'Record<string, unknown>';\n\n const pad = INDENT.repeat(depth + 1);\n const lines = entries.map(\n ([key, item]) => `${pad}${isSafeKey(key) ? key : JSON.stringify(key)}: ${inferTypeScriptType(item, depth + 1)};`,\n );\n\n return `{\\n${lines.join('\\n')}\\n${INDENT.repeat(depth)}}`;\n }\n\n return 'unknown';\n};\n\n/** The type a declared query-parameter value is written as - `page=2` is a number, `draft=true` a boolean. */\nconst queryParamType = (value: string) => {\n if (value === 'true' || value === 'false') return 'boolean';\n if (value !== '' && Number.isFinite(Number(value))) return 'number';\n\n return 'string';\n};\n\n/** `GET /posts/:id/comments` becomes `getPostsComments`: the verb, then every literal segment. */\nconst nameOf = (method: string, pattern: string) => {\n const words = pattern\n .split('/')\n .filter((segment) => segment && !segment.startsWith(':'))\n .flatMap((segment) => segment.split(/[^A-Za-z0-9]+/))\n .filter(Boolean);\n\n const parts = [method.toLowerCase(), ...words.map((word) => word[0]?.toUpperCase() + word.slice(1))];\n const name = parts.join('');\n\n return /^[A-Za-z_$]/.test(name) ? name : `query${name}`;\n};\n\nconst pascal = (name: string) => name[0]?.toUpperCase() + name.slice(1);\n\n/** The route as a creator takes it: a template literal function when the path has params, else the path. */\nconst routeOf = (pattern: string, params: string[]) => {\n if (!params.length) return `'${pattern}'`;\n\n const interpolated = pattern\n .split('/')\n .map((segment) => (segment.startsWith(':') ? `\\${p.${segment.slice(1)}}` : segment))\n .join('/');\n\n return `(p) => \\`${interpolated}\\``;\n};\n\nexport type QueryDefinitionSnippetOptions = {\n method: string;\n\n /** The route with its path params as `:name`. */\n pattern: string;\n\n /** Query parameters as a query string (`page=2&limit=10`), or empty for none. */\n query: string;\n\n /** A sample response the types are inferred from. */\n body: unknown;\n};\n\n/**\n * A pasteable `@ethlete/query` definition for one route: the response type inferred from a sample body,\n * the `TArgs` contract (path params, query params) and the creator call.\n *\n * The types come from one example, so everything in it reads as required and non-nullable. The snippet\n * says that in a comment rather than pretending otherwise.\n */\nexport const buildQueryDefinitionSnippet = (options: QueryDefinitionSnippetOptions) => {\n const { method, pattern, query, body } = options;\n\n const name = nameOf(method, pattern);\n const typeName = pascal(name);\n const params = pattern\n .split('/')\n .filter((segment) => segment.startsWith(':'))\n .map((segment) => segment.slice(1));\n\n const queryParams = [...new URLSearchParams(query)];\n\n const argFields = [`${INDENT}response: ${typeName}Response;`];\n\n if (params.length) {\n argFields.push(`${INDENT}pathParams: { ${params.map((param) => `${param}: string`).join('; ')} };`);\n }\n\n if (queryParams.length) {\n const fields = queryParams.map(([key, value]) => `${key}: ${queryParamType(value)}`).join('; ');\n argFields.push(`${INDENT}queryParams: { ${fields} };`);\n }\n\n const factory = `${method.toLowerCase()}Query`;\n\n return [\n `// Inferred from one example: every field reads as required and non-nullable.`,\n `// \\`${factory}\\` is \\`create${pascal(method.toLowerCase())}Query(client)\\`.`,\n `type ${typeName}Response = ${inferTypeScriptType(body)};`,\n ``,\n `type ${typeName}QueryArgs = {`,\n ...argFields,\n `};`,\n ``,\n `export const ${name} = ${factory}<${typeName}QueryArgs>(${routeOf(pattern, params)});`,\n ``,\n ].join('\\n');\n};\n","/**\n * The slice of YAML a generated OpenAPI document needs: block mappings, block sequences, and scalars\n * that are either plain or double-quoted. JSON is a subset of YAML, so this writes the same tree the\n * JSON export writes - it is a second spelling of one document, not a second document.\n */\n\nconst INDENT = ' ';\n\n/** How deep the tree is written before a branch is given up on, so a cyclic body cannot spin forever. */\nconst MAX_DEPTH = 64;\n\n/**\n * A scalar YAML would read back as this exact string: it starts with a letter, `_` or `$`, so nothing\n * numeric or date-shaped gets through, and it holds none of `:#,[]{}&*!|>'\"%@\\`` that starts a construct.\n */\nconst PLAIN = /^[A-Za-z_$][A-Za-z0-9_$ ./+-]*$/;\n\n/** Words YAML 1.1 readers still take for booleans or null, whatever case they are written in. */\nconst RESERVED: ReadonlySet<string> = /* @__PURE__ */ new Set([\n 'true',\n 'false',\n 'null',\n 'yes',\n 'no',\n 'on',\n 'off',\n 'y',\n 'n',\n]);\n\nconst isPlainSafe = (value: string) => PLAIN.test(value) && !value.endsWith(' ') && !RESERVED.has(value.toLowerCase());\n\n/**\n * Whether a multi-line string can be written as a `|-` block. A line starting with a space would need an\n * explicit indentation indicator, and a trailing newline or a `\\r` would not survive the round trip, so\n * those fall back to one quoted line.\n */\nconst isBlockSafe = (value: string) =>\n value.includes('\\n') &&\n !value.endsWith('\\n') &&\n !/[\\r\\t]/.test(value) &&\n value.split('\\n').every((line) => !line.startsWith(' ') && !line.endsWith(' '));\n\nconst blockScalar = (value: string, indent: string) =>\n `|-\\n${value\n .split('\\n')\n .map((line) => (line ? `${indent}${line}` : ''))\n .join('\\n')}`;\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n !!value && typeof value === 'object' && !Array.isArray(value);\n\n/** A scalar, or `null` when the value is one of the containers {@link write} handles itself. */\nconst scalarOf = (value: unknown, indent: string): string | null => {\n if (value === null || value === undefined) return 'null';\n\n switch (typeof value) {\n case 'boolean':\n return value ? 'true' : 'false';\n case 'number':\n // `JSON.stringify` writes a non-finite number as `null`; both exports agree on that rather than\n // one of them emitting YAML's `.nan`, which no JSON reader takes back.\n return Number.isFinite(value) ? String(value) : 'null';\n case 'string':\n if (isBlockSafe(value)) return blockScalar(value, indent);\n\n return isPlainSafe(value) ? value : JSON.stringify(value);\n default:\n break;\n }\n\n if (Array.isArray(value) || isPlainObject(value)) return null;\n\n return 'null';\n};\n\nconst write = (value: unknown, depth: number): string => {\n const indent = INDENT.repeat(depth);\n const scalar = scalarOf(value, indent);\n\n if (scalar !== null) return scalar;\n\n if (depth >= MAX_DEPTH) return 'null';\n\n if (Array.isArray(value)) {\n if (!value.length) return '[]';\n\n return `\\n${value\n .map((entry) => {\n const written = write(entry, depth + 1);\n\n // A container under a `-` continues on the dash line: the `- ` occupies the first two columns of\n // its child's own indentation, so the child's first line has to shed exactly that much.\n return `${indent}- ${written.startsWith('\\n') ? written.slice(depth * 2 + INDENT.length + 1) : written}`;\n })\n .join('\\n')}`;\n }\n\n const entries = Object.entries(value as Record<string, unknown>).filter(([, entry]) => entry !== undefined);\n\n if (!entries.length) return '{}';\n\n return `\\n${entries\n .map(([key, entry]) => {\n const written = write(entry, depth + 1);\n // A block already leads with its own newline; only a scalar needs the space after the colon.\n const rendered = written.startsWith('\\n') ? written : ` ${written}`;\n\n return `${indent}${isPlainSafe(key) ? key : JSON.stringify(key)}:${rendered}`;\n })\n .join('\\n')}`;\n};\n\n/**\n * Writes a JSON-shaped tree as YAML. `undefined` members are dropped the way `JSON.stringify` drops\n * them; anything that is not a plain object, array or primitive is written as `null`.\n */\nexport const toQueryDevtoolsYaml = (value: unknown) => `${write(value, 0).replace(/^\\n/, '')}\\n`;\n","import { Component, computed, effect, signal, ViewEncapsulation } from '@angular/core';\nimport { SelectComponent, SelectOptionData, SelectSearchDirective } from '@ethlete/components';\nimport { copyToClipboard } from '@ethlete/core';\nimport {\n armAllQueryDevtoolsMocks,\n armQueryDevtoolsMock,\n clearQueryDevtoolsArmedMocks,\n collectQueryDevtoolsSchemaComponents,\n deleteQueryDevtoolsMock,\n loadQueryDevtoolsSchema,\n measureQueryDevtoolsPayload,\n QueryDevtoolsEntry,\n QueryDevtoolsMock,\n queryDevtoolsArmedMocks,\n queryDevtoolsMockId,\n queryDevtoolsMocks,\n queryDevtoolsSchemaNames,\n queryDevtoolsSchemaRoutes,\n queryDevtoolsSchemaState,\n QueryDevtoolsSchemaSeed,\n QueryDevtoolsSeedStyle,\n saveQueryDevtoolsMock,\n seedQueryDevtoolsSchemaBody,\n seedQueryDevtoolsSchemaRoute,\n} from '@ethlete/query';\nimport { tap } from 'rxjs';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsMockDesignerComponent } from './query-devtools-mock-designer.component';\nimport { buildQueryDevtoolsOpenApiDocument, buildQueryDevtoolsOpenApiPathItem } from './query-devtools-openapi';\nimport { buildQueryDefinitionSnippet } from './query-devtools-typescript';\nimport { AnyQuery } from './query-devtools-types';\nimport { toQueryDevtoolsYaml } from './query-devtools-yaml';\n\n/** A designed mock as the list renders it: the stored mock plus what only the live registry knows. */\ntype MockRow = {\n mock: QueryDevtoolsMock;\n armed: boolean;\n\n /** Serialized size of the body, so a library that is about to hit a quota reads as one. */\n bytes: number;\n\n /**\n * Whether a live query on this route authenticates. A mock replaces the request, so the interceptor\n * chain never runs and the token flow is not exercised - which has to be visible on the row.\n */\n isSecure: boolean;\n};\n\n/** A live query whose last response can be captured as the seed of a mock. */\ntype CaptureRow = {\n entry: QueryDevtoolsEntry;\n clientName: string;\n method: string;\n pattern: string;\n bytes: number;\n\n /** Whether the library already holds a mock for this route, so the button says `Re-capture`. */\n exists: boolean;\n\n /** How many other live queries share this route, since a mock answers the route rather than a query. */\n shared: number;\n};\n\n/** The new-mock form's fields, as text - a body is JSON only once it parses. */\ntype MockDraft = {\n clientName: string;\n method: string;\n pattern: string;\n query: string;\n status: string;\n latencyMs: string;\n body: string;\n};\n\nconst METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS'];\n\n/** What a seeded body was generated from, so changing the style can re-roll it without asking again. */\ntype SeedSource = { kind: 'route'; method: string; pattern: string } | { kind: 'schema'; name: string };\n\nconst SEED_STYLES: { value: QueryDevtoolsSeedStyle; label: string; hint: string }[] = [\n {\n value: 'placeholder',\n label: 'Placeholder values',\n hint: 'Every field named after itself - a body nobody mistakes for real data.',\n },\n {\n value: 'realistic',\n label: 'Realistic values',\n hint: 'Varied sample values, and array elements generated one by one - a list of three different rows.',\n },\n {\n value: 'stress',\n label: 'Stress values',\n hint: 'Long text, unbreakable words, unicode and huge numbers - what a layout breaks on. Declared formats, enums and bounds are still honoured.',\n },\n];\n\n/** Which spelling of the exported document is written - the same tree either way. */\ntype SpecFormat = 'yaml' | 'json';\n\nconst SPEC_FORMATS: { value: SpecFormat; label: string }[] = [\n { value: 'yaml', label: 'YAML' },\n { value: 'json', label: 'JSON' },\n];\n\nconst SPEC_MEDIA_TYPES: Record<SpecFormat, string> = {\n yaml: 'application/yaml',\n json: 'application/json',\n};\n\nconst EMPTY_DRAFT: MockDraft = {\n clientName: '',\n method: 'GET',\n pattern: '',\n query: '',\n status: '200',\n latencyMs: '0',\n body: '{}',\n};\n\n/**\n * A mock matches on method + path, and every GraphQL query POSTs the same route - so one armed for a\n * `GQL QUERY` would either match nothing or answer every operation on the endpoint. Matching a document\n * is its own feature; until then GraphQL queries are left out of the capture list rather than offered as\n * something that silently does not fire.\n */\nconst isMockableMethod = (method: string) => !method.includes(' ');\n\n/**\n * The Mocks tab: responses served in place of a request, either designed by hand for a route nothing has\n * ever called or captured from one that has. The library is persisted; whether a mock is armed is not, so\n * a reload always stops serving them.\n */\n@Component({\n selector: 'et-query-devtools-mocks-tab',\n templateUrl: './query-devtools-mocks-tab.component.html',\n styleUrl: './query-devtools-mocks-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsMockDesignerComponent, SelectComponent, SelectSearchDirective],\n})\nexport class QueryDevtoolsMocksTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n protected readonly ARM_ALL = armAllQueryDevtoolsMocks;\n protected readonly DISARM_ALL = clearQueryDevtoolsArmedMocks;\n protected readonly METHODS = METHODS;\n protected readonly SPEC_FORMATS = SPEC_FORMATS;\n protected readonly SEED_STYLES = SEED_STYLES;\n\n /** The new-mock form, or `null` while it is closed. */\n protected draft = signal<MockDraft | null>(null);\n\n /** Which client the form is designing for - every description below is that client's, not the app's. */\n private draftClient = computed(() => this.draft()?.clientName ?? '');\n\n private schemaNames = computed(() => queryDevtoolsSchemaNames(this.draftClient()));\n private schemaRoutes = computed(() => queryDevtoolsSchemaRoutes(this.draftClient()));\n\n /**\n * A description declares hundreds of routes and named types, so both pickers are handed their options\n * as data: the select then windows the rows and filters the full set from its own search box.\n */\n protected routeOptions = computed<SelectOptionData[]>(() =>\n this.schemaRoutes().map((route) => {\n const target = `${route.method} ${route.pattern}`;\n\n return { value: target, label: route.summary ? `${target} — ${route.summary}` : target };\n }),\n );\n\n protected schemaNameOptions = computed<SelectOptionData[]>(() =>\n this.schemaNames().map((name) => ({ value: name, label: name })),\n );\n\n private schemaState = computed(() => queryDevtoolsSchemaState(this.draftClient()));\n\n /** Whether the application handed this client's API description in - nothing below shows without one. */\n protected hasSchema = computed(() => this.schemaState().status !== 'unavailable');\n protected isSchemaReady = computed(() => this.schemaState().status === 'ready');\n\n protected schemaError = computed(() => {\n const state = this.schemaState();\n\n return state.status === 'error' ? state.message : null;\n });\n\n protected draftError = signal<string | null>(null);\n\n /** What the description said about the draft's body, kept so the designer can label its fields. */\n protected draftSeed = signal<QueryDevtoolsSchemaSeed | null>(null);\n\n /** How lifelike the next seed comes out. The shape is the description's either way. */\n protected seedStyle = signal<QueryDevtoolsSeedStyle>('placeholder');\n\n private seedSource = signal<SeedSource | null>(null);\n\n protected seedStyleHint = computed(() => SEED_STYLES.find((style) => style.value === this.seedStyle())?.hint ?? '');\n\n /** The named schema picked in the form, which is not the same thing as the one a body came from. */\n protected pickedSchema = signal('');\n\n /**\n * The type annotations of each seeded body, by mock id. A mock only stores the *name* it was seeded\n * from, so this is what labels a body the description could not name - for as long as the panel is open.\n */\n private seededTypes = signal<Record<string, ReadonlyMap<string, string>>>({});\n\n /** The mock whose body is open in the designer. */\n protected editingId = signal<string | null>(null);\n\n /** The mock whose definition was last copied, so the button can confirm it. */\n protected copiedId = signal<string | null>(null);\n\n /** The mock whose path item was last copied - a second button needs its own confirmation. */\n protected copiedSpecId = signal<string | null>(null);\n\n /** Which spelling the OpenAPI export is written in. YAML is what a specification repository takes. */\n protected specFormat = signal<SpecFormat>('yaml');\n\n /** What the last export had to guess or could not resolve, shown under the library it came from. */\n protected specNotes = signal<readonly string[]>([]);\n\n protected rows = computed<MockRow[]>(() => {\n const armed = queryDevtoolsArmedMocks();\n const entries = this.host.queryEntries();\n\n return queryDevtoolsMocks().map((mock) => ({\n mock,\n armed: armed.has(mock.id),\n bytes: measureQueryDevtoolsPayload({ body: mock.body }).bytes,\n isSecure: entries.some((entry) => !!entry.meta.isSecure && this.idOf(entry) === mock.id),\n }));\n });\n\n protected armedCount = computed(() => this.rows().filter((row) => row.armed).length);\n\n private editingRow = computed(() => this.rows().find((row) => row.mock.id === this.editingId()) ?? null);\n\n /**\n * What to label the open body's fields with: the seed it was authored from this session, or - after a\n * reload - the schema the mock remembers being seeded from.\n */\n protected editingAnnotations = computed(() => {\n const row = this.editingRow();\n\n if (!row) return null;\n\n const seeded = this.seededTypes()[row.mock.id];\n\n if (seeded) return seeded;\n\n const name = row.mock.schemaName;\n\n return name ? (seedQueryDevtoolsSchemaBody(row.mock.clientName, name)?.types ?? null) : null;\n });\n\n /**\n * Every route a live response can seed a mock from - one row per route, not per query: several queries\n * on the same route would all capture into the same mock, so listing each of them offers the same\n * button three times.\n */\n protected captureRows = computed<CaptureRow[]>(() => {\n const known = new Set(queryDevtoolsMocks().map((mock) => mock.id));\n const rows = new Map<string, CaptureRow>();\n\n for (const entry of this.host.queryEntries()) {\n if (entry.destroyedAt || !entry.meta.route) continue;\n if (!isMockableMethod(entry.meta.method ?? 'GET')) continue;\n if ((entry.handle as AnyQuery).response() === null) continue;\n\n const id = this.idOf(entry);\n const existing = rows.get(id);\n\n if (existing) {\n existing.shared++;\n\n continue;\n }\n\n rows.set(id, {\n entry,\n clientName: entry.meta.clientName ?? '',\n method: entry.meta.method ?? 'GET',\n pattern: entry.meta.route ?? '',\n bytes: measureQueryDevtoolsPayload({ body: (entry.handle as AnyQuery).response() }).bytes,\n exists: known.has(id),\n shared: 1,\n });\n }\n\n return [...rows.values()];\n });\n\n constructor() {\n // A description is only worth fetching once someone is designing a mock against that client, so an\n // application that hands several in still ships each as its own lazy chunk, loaded one at a time.\n effect(() => {\n const client = this.draftClient() || this.editingRow()?.mock.clientName;\n\n if (client) loadQueryDevtoolsSchema(client);\n });\n }\n\n protected openDraft() {\n this.draftError.set(null);\n this.draftSeed.set(null);\n this.seedSource.set(null);\n this.draft.set({ ...EMPTY_DRAFT, clientName: this.host.clientNames()[0] ?? '' });\n }\n\n protected closeDraft() {\n this.draft.set(null);\n this.draftError.set(null);\n this.draftSeed.set(null);\n this.seedSource.set(null);\n }\n\n protected patchDraft(patch: Partial<MockDraft>) {\n this.draft.update((current) => (current ? { ...current, ...patch } : current));\n }\n\n /** Switches which API the form is designing against, dropping what the previous one's seed named. */\n protected pickClient(clientName: string) {\n this.patchDraft({ clientName });\n this.pickedSchema.set('');\n this.seedSource.set(null);\n this.draftSeed.set(null);\n this.draftError.set(null);\n }\n\n /** Fills the form from a route the description declares, whether or not the app has ever called it. */\n protected pickRoute(value: unknown) {\n const [method, pattern] = typeof value === 'string' ? value.split(' ') : [];\n\n if (!method || !pattern) return;\n\n this.patchDraft({ method, pattern });\n this.seedFromRoute({ method, pattern });\n }\n\n /** Seeds the body from the description's success response for the route the form names. */\n protected seedFromDraftRoute() {\n const draft = this.draft();\n\n if (draft) this.seedFromRoute({ method: draft.method, pattern: draft.pattern.trim() });\n }\n\n protected pickSchema(value: unknown) {\n this.pickedSchema.set(typeof value === 'string' ? value : '');\n }\n\n /** Seeds the body from one named schema, so a route the description does not declare still starts real. */\n protected seedFromSchema() {\n const name = this.pickedSchema();\n\n if (!name) return;\n\n this.applySeed({ kind: 'schema', name });\n }\n\n /** Re-rolls whatever the body was seeded from, so the picked style is what the form already shows. */\n protected pickSeedStyle(value: string) {\n const style = SEED_STYLES.find((entry) => entry.value === value);\n\n if (!style) return;\n\n this.seedStyle.set(style.value);\n\n const source = this.seedSource();\n\n if (source) this.applySeed(source);\n }\n\n /**\n * Saves the form as a designed mock and opens the designer on it. Nothing is checked against the\n * registry - a route no query has ever called is the point - only that the path is a path and the body\n * is JSON.\n */\n protected saveDraft() {\n const draft = this.draft();\n\n if (!draft) return;\n\n const pattern = draft.pattern.trim();\n\n if (!pattern.startsWith('/')) {\n this.draftError.set('The path has to start with a \"/\" — it is matched against the request path.');\n\n return;\n }\n\n let body: unknown;\n\n try {\n body = JSON.parse(draft.body || 'null');\n } catch (error) {\n this.draftError.set(error instanceof Error ? error.message : String(error));\n\n return;\n }\n\n const identity = {\n clientName: draft.clientName,\n method: draft.method,\n pattern,\n query: draft.query.trim().replace(/^\\?/, ''),\n };\n\n const id = queryDevtoolsMockId(identity);\n const seed = this.draftSeed();\n\n saveQueryDevtoolsMock({\n ...identity,\n id,\n status: this.countOf(draft.status, 200),\n latencyMs: this.countOf(draft.latencyMs, 0),\n body,\n capturedAt: null,\n schemaName: seed?.schemaName ?? null,\n });\n\n if (seed) this.seededTypes.update((current) => ({ ...current, [id]: seed.types }));\n\n this.closeDraft();\n this.editingId.set(id);\n }\n\n /** Captures the query's current response as a designed mock, replacing an earlier capture of the route. */\n protected capture(row: CaptureRow) {\n saveQueryDevtoolsMock({\n id: this.idOf(row.entry),\n clientName: row.clientName,\n method: row.method,\n pattern: row.pattern,\n query: '',\n status: 200,\n body: (row.entry.handle as AnyQuery).response(),\n latencyMs: 0,\n capturedAt: Date.now(),\n });\n }\n\n protected pickSpecFormat(value: string) {\n const format = SPEC_FORMATS.find((entry) => entry.value === value);\n\n if (format) this.specFormat.set(format.value);\n }\n\n protected toggleArmed(row: MockRow) {\n armQueryDevtoolsMock(row.mock.id, !row.armed);\n }\n\n protected remove(row: MockRow) {\n deleteQueryDevtoolsMock(row.mock.id);\n }\n\n protected setStatus(row: MockRow, value: string) {\n saveQueryDevtoolsMock({ ...row.mock, status: this.countOf(value, row.mock.status) });\n }\n\n protected setLatency(row: MockRow, value: string) {\n saveQueryDevtoolsMock({ ...row.mock, latencyMs: this.countOf(value, row.mock.latencyMs) });\n }\n\n /**\n * Copies the route as a `@ethlete/query` definition - the response type inferred from the designed body,\n * the args contract and the creator call - so a mocked route can be pasted into the app it was designed\n * for.\n */\n protected copyDefinition(row: MockRow) {\n const snippet = buildQueryDefinitionSnippet({\n method: row.mock.method,\n pattern: row.mock.pattern,\n query: row.mock.query,\n body: row.mock.body,\n });\n\n copyToClipboard(snippet)\n .pipe(tap((ok) => this.copiedId.set(ok ? row.mock.id : null)))\n .subscribe();\n }\n\n /**\n * Copies one route as an OpenAPI `paths` entry, ready to be pasted under an existing description's\n * `paths`. A route seeded from a named schema keeps its `$ref`, since it is merged back into the\n * document that declares it.\n */\n protected copyPathItem(row: MockRow) {\n const schemas = this.schemasFor([row.mock]);\n const built = buildQueryDevtoolsOpenApiPathItem({ mocks: [row.mock], schemas: schemas.schemas });\n\n this.specNotes.set([...schemas.notes, ...built.notes]);\n\n copyToClipboard(this.write(built.document))\n .pipe(tap((ok) => this.copiedSpecId.set(ok ? row.mock.id : null)))\n .subscribe();\n }\n\n /**\n * Downloads the whole library as one OpenAPI 3.1 document - the deliverable the API team merges. Every\n * designed mock is in it, armed or not: the library is the design work, and arming is only what this\n * page load happens to be serving.\n */\n protected exportLibrary() {\n const mocks = this.rows().map((row) => row.mock);\n\n if (!mocks.length) return;\n\n const schemas = this.schemasFor(mocks);\n const built = buildQueryDevtoolsOpenApiDocument({ mocks, schemas: schemas.schemas, now: Date.now() });\n const format = this.specFormat();\n\n this.specNotes.set([...schemas.notes, ...built.notes]);\n this.host.downloadTextFile({\n name: `openapi-designed-mocks-${new Date().toISOString().slice(0, 10)}.${format}`,\n content: this.write(built.document),\n type: SPEC_MEDIA_TYPES[format],\n });\n }\n\n protected editBody(row: MockRow) {\n this.editingId.set(row.mock.id);\n }\n\n protected cancelBody() {\n this.editingId.set(null);\n }\n\n protected saveBody(row: MockRow, body: unknown) {\n saveQueryDevtoolsMock({ ...row.mock, body });\n this.cancelBody();\n }\n\n /**\n * The declared schemas the given mocks were seeded from, so their responses can reference them. Each\n * client is asked its own description, and a name two of them both declare keeps the first - one\n * exported document cannot hold two `MatchView`s.\n */\n private schemasFor(mocks: readonly QueryDevtoolsMock[]) {\n const byClient = new Map<string, Set<string>>();\n\n for (const mock of mocks) {\n if (!mock.schemaName) continue;\n\n const names = byClient.get(mock.clientName) ?? new Set<string>();\n\n names.add(mock.schemaName);\n byClient.set(mock.clientName, names);\n }\n\n const schemas: Record<string, unknown> = {};\n const notes = new Set<string>();\n const owners = new Map<string, string>();\n\n for (const [clientName, names] of byClient) {\n const collected = collectQueryDevtoolsSchemaComponents(clientName, [...names]);\n\n for (const note of collected.notes) notes.add(note);\n\n for (const [name, schema] of Object.entries(collected.schemas)) {\n const owner = owners.get(name);\n\n if (owner !== undefined) {\n if (JSON.stringify(schemas[name]) !== JSON.stringify(schema)) {\n notes.add(`${name} is declared by both ${owner} and ${clientName} - the one from ${owner} was kept.`);\n }\n\n continue;\n }\n\n owners.set(name, clientName);\n schemas[name] = schema;\n }\n }\n\n return { schemas, notes: [...notes] };\n }\n\n private write(document: unknown) {\n if (this.specFormat() === 'yaml') return toQueryDevtoolsYaml(document);\n\n return `${JSON.stringify(document, null, 2)}\\n`;\n }\n\n private seedFromRoute(target: { method: string; pattern: string }) {\n if (!target.pattern) {\n this.draftError.set('Name the path first - the seed comes from what the description says it returns.');\n\n return;\n }\n\n this.applySeed({ kind: 'route', ...target });\n }\n\n private applySeed(source: SeedSource) {\n const style = this.seedStyle();\n const client = this.draftClient();\n const seed =\n source.kind === 'schema'\n ? seedQueryDevtoolsSchemaBody(client, source.name, style)\n : seedQueryDevtoolsSchemaRoute({ clientName: client, method: source.method, pattern: source.pattern }, style);\n\n if (!seed) {\n this.draftSeed.set(null);\n this.seedSource.set(null);\n this.draftError.set(\n source.kind === 'schema'\n ? `The description does not name ${source.name}.`\n : `The description declares no JSON response for ${source.method} ${source.pattern}.`,\n );\n\n return;\n }\n\n this.seedSource.set(source);\n this.draftSeed.set(seed);\n this.draftError.set(null);\n this.patchDraft({ body: JSON.stringify(seed.body, null, 2) });\n }\n\n private countOf(value: string, fallback: number) {\n const count = Math.trunc(Number(value));\n\n return Number.isFinite(count) ? count : fallback;\n }\n\n private idOf(entry: QueryDevtoolsEntry) {\n return queryDevtoolsMockId({\n clientName: entry.meta.clientName ?? '',\n method: entry.meta.method ?? 'GET',\n pattern: entry.meta.route ?? '',\n });\n }\n}\n","<div class=\"et-query-devtools-scroll\">\n <div class=\"et-query-devtools-toolbar et-query-devtools-mocks-toolbar\">\n <p class=\"et-query-devtools-hint\">\n A mock replaces the request, so it answers a route that has never run - or does not exist yet. It bypasses the\n interceptor chain by construction, so a mocked secure route never exercises the token flow. The library is kept;\n whether a mock is <strong>armed</strong> is not, so a reload always stops serving them. GraphQL queries are not\n offered: they all POST one route, so matching them needs the document rather than the path.\n </p>\n <div class=\"et-query-devtools-settings-controls\">\n @if (rows().length && armedCount() < rows().length) {\n <button\n (click)=\"ARM_ALL()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Serve every mock in the library - the whole screen off the network at once\"\n >\n Arm all ({{ rows().length }})\n </button>\n }\n @if (armedCount()) {\n <button (click)=\"DISARM_ALL()\" class=\"et-query-devtools-btn\" type=\"button\">\n Disarm all ({{ armedCount() }})\n </button>\n }\n <button (click)=\"openDraft()\" class=\"et-query-devtools-btn et-query-devtools-btn--primary\" type=\"button\">\n <span aria-hidden=\"true\">+</span>\n New mock\n </button>\n </div>\n </div>\n\n @if (draft(); as form) {\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>New mock</strong>\n <span class=\"et-query-devtools-count\">for any route, whether a query has ever called it or not</span>\n </div>\n\n <div class=\"et-query-devtools-mock-fields\">\n <label class=\"et-query-devtools-field\">\n <span>Client</span>\n <select #clientSelect (change)=\"pickClient(clientSelect.value)\" class=\"et-query-devtools-select\">\n @for (name of host.clientNames(); track name) {\n <option [value]=\"name\" [selected]=\"name === form.clientName\">{{ name }}</option>\n }\n </select>\n <small>a mock answers one client, matched by name</small>\n </label>\n\n <label class=\"et-query-devtools-field\">\n <span>Method</span>\n <select #methodSelect (change)=\"patchDraft({ method: methodSelect.value })\" class=\"et-query-devtools-select\">\n @for (method of METHODS; track method) {\n <option [value]=\"method\" [selected]=\"method === form.method\">{{ method }}</option>\n }\n </select>\n <small>matched exactly</small>\n </label>\n\n <label class=\"et-query-devtools-field et-query-devtools-field--wide\">\n <span>Path</span>\n <input\n #patternInput\n [value]=\"form.pattern\"\n (input)=\"patchDraft({ pattern: patternInput.value })\"\n class=\"et-query-devtools-input\"\n type=\"text\"\n placeholder=\"/posts/:id/comments\"\n />\n <small><code>:name</code> matches any one segment, so the route is mocked rather than one URL</small>\n </label>\n\n <label class=\"et-query-devtools-field et-query-devtools-field--wide\">\n <span>Query</span>\n <input\n #queryInput\n [value]=\"form.query\"\n (input)=\"patchDraft({ query: queryInput.value })\"\n class=\"et-query-devtools-input\"\n type=\"text\"\n placeholder=\"page=2&limit=10\"\n />\n <small>\n parameters the request must carry; anything else it asks for is ignored. Empty answers whatever the query\n string is - and a mock naming parameters wins over one that does not\n </small>\n </label>\n\n <label class=\"et-query-devtools-field\">\n <span>Status</span>\n <input\n #statusDraftInput\n [value]=\"form.status\"\n (input)=\"patchDraft({ status: statusDraftInput.value })\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"100\"\n max=\"599\"\n step=\"1\"\n />\n <small>400 and above arrive as a real error</small>\n </label>\n\n <label class=\"et-query-devtools-field\">\n <span>Latency</span>\n <input\n #latencyDraftInput\n [value]=\"form.latencyMs\"\n (input)=\"patchDraft({ latencyMs: latencyDraftInput.value })\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"0\"\n max=\"60000\"\n step=\"100\"\n />\n <small>ms before it settles</small>\n </label>\n </div>\n\n @if (hasSchema()) {\n <div class=\"et-query-devtools-seed\">\n <span class=\"et-query-devtools-section\">Seed</span>\n @if (isSchemaReady()) {\n <div class=\"et-query-devtools-seed-pick\">\n <et-select\n [options]=\"routeOptions()\"\n (pickOption)=\"pickRoute($event)\"\n class=\"et-query-devtools-combobox\"\n mirrorPanelWidth=\"false\"\n pickOnly\n >\n <input etSelectSearch placeholder=\"search the routes it declares…\" />\n </et-select>\n <button\n (click)=\"seedFromDraftRoute()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Generate a body from what the description says this path returns\"\n >\n From this path\n </button>\n </div>\n <div class=\"et-query-devtools-seed-pick\">\n <et-select\n [value]=\"pickedSchema()\"\n [options]=\"schemaNameOptions()\"\n (valueChange)=\"pickSchema($event)\"\n class=\"et-query-devtools-combobox\"\n mirrorPanelWidth=\"false\"\n >\n <input etSelectSearch placeholder=\"search its named types…\" />\n </et-select>\n <button\n [disabled]=\"!pickedSchema()\"\n (click)=\"seedFromSchema()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n From this type\n </button>\n </div>\n <select\n #stylePick\n (change)=\"pickSeedStyle(stylePick.value)\"\n class=\"et-query-devtools-select\"\n title=\"How lifelike the generated values are\"\n >\n @for (style of SEED_STYLES; track style.value) {\n <option [value]=\"style.value\" [selected]=\"style.value === seedStyle()\">{{ style.label }}</option>\n }\n </select>\n <small class=\"et-query-devtools-hint et-query-devtools-seed-hint\">{{ seedStyleHint() }}</small>\n } @else if (schemaError(); as error) {\n <span class=\"et-query-devtools-settings-warn\">The API description could not be loaded: {{ error }}</span>\n } @else {\n <span class=\"et-query-devtools-count\">Loading the API description…</span>\n }\n </div>\n }\n\n <label class=\"et-query-devtools-mock-body\">\n <span class=\"et-query-devtools-section\">Body</span>\n <textarea\n #bodyInput\n [value]=\"form.body\"\n (input)=\"patchDraft({ body: bodyInput.value })\"\n class=\"et-query-devtools-input et-query-devtools-mock-textarea\"\n rows=\"8\"\n spellcheck=\"false\"\n ></textarea>\n </label>\n\n @if (draftSeed(); as seed) {\n <p class=\"et-query-devtools-hint\">\n Generated from the API description{{ seed.schemaName ? ' as ' + seed.schemaName : '' }} - a starting point,\n not the contract. Saving opens the designer on it.\n </p>\n @if (seed.notes.length) {\n <ul class=\"et-query-devtools-designer-notes\">\n @for (note of seed.notes; track note) {\n <li>{{ note }}</li>\n }\n </ul>\n }\n }\n\n @if (draftError(); as error) {\n <p class=\"et-query-devtools-settings-warn\">{{ error }}</p>\n }\n\n <div class=\"et-query-devtools-mock-head\">\n <button (click)=\"saveDraft()\" class=\"et-query-devtools-btn et-query-devtools-btn--primary\" type=\"button\">\n Save to the library\n </button>\n <button (click)=\"closeDraft()\" class=\"et-query-devtools-btn\" type=\"button\">Cancel</button>\n </div>\n </div>\n }\n\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>Designed</strong>\n <span class=\"et-query-devtools-count\">{{ rows().length }} in the library</span>\n @if (rows().length) {\n <div class=\"et-query-devtools-spec-export\">\n <select #formatPick (change)=\"pickSpecFormat(formatPick.value)\" class=\"et-query-devtools-select\">\n @for (format of SPEC_FORMATS; track format.value) {\n <option [value]=\"format.value\" [selected]=\"format.value === specFormat()\">{{ format.label }}</option>\n }\n </select>\n <button\n (click)=\"exportLibrary()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Download every designed route as one OpenAPI 3.1 document - the response schemas inferred from the designed bodies, each body as an example\"\n >\n <span aria-hidden=\"true\">⇩</span>\n Export OpenAPI\n </button>\n </div>\n }\n </div>\n\n @for (row of rows(); track row.mock.id) {\n <div [class.et-query-devtools-mock-row--armed]=\"row.armed\" class=\"et-query-devtools-mock-row\">\n <div class=\"et-query-devtools-mock-head\">\n <button\n [class.et-query-devtools-btn--tampered]=\"row.armed\"\n [attr.aria-pressed]=\"row.armed\"\n (click)=\"toggleArmed(row)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"{{ row.armed ? 'Stop serving this response' : 'Serve this response instead of the request' }}\"\n >\n {{ row.armed ? 'Armed' : 'Arm' }}\n </button>\n <span class=\"et-query-devtools-method\">{{ row.mock.method }}</span>\n <span class=\"et-query-devtools-route et-query-devtools-mono\">{{ row.mock.pattern }}</span>\n @if (row.mock.query) {\n <span class=\"et-query-devtools-url\">?{{ row.mock.query }}</span>\n }\n <span class=\"et-query-devtools-url\">{{ row.mock.clientName }}</span>\n @if (row.mock.capturedAt) {\n <span class=\"et-query-devtools-chip\">captured</span>\n }\n @if (row.mock.schemaName; as schemaName) {\n <span class=\"et-query-devtools-chip\" title=\"Seeded from the API description\">{{ schemaName }}</span>\n }\n @if (row.isSecure) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--error\"\n title=\"A mock sends nothing, so no token is attached and the auth flow is never exercised\"\n >\n no auth\n </span>\n }\n <span class=\"et-query-devtools-count\">{{ host.formatBytes(row.bytes) }}</span>\n <button (click)=\"editBody(row)\" class=\"et-query-devtools-btn\" type=\"button\">Body</button>\n <button\n (click)=\"copyDefinition(row)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Copy this route as a @ethlete/query definition - the response type inferred from the body, the args contract and the creator call\"\n >\n <span aria-hidden=\"true\">⧉</span>\n {{ copiedId() === row.mock.id ? 'Copied' : 'TS' }}\n </button>\n <button\n (click)=\"copyPathItem(row)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Copy this route as an OpenAPI paths entry, ready to paste under an existing description\"\n >\n <span aria-hidden=\"true\">⧉</span>\n {{ copiedSpecId() === row.mock.id ? 'Copied' : 'OAS' }}\n </button>\n <button (click)=\"remove(row)\" class=\"et-query-devtools-btn et-query-devtools-btn--danger\" type=\"button\">\n Delete\n </button>\n </div>\n\n <div class=\"et-query-devtools-mock-fields\">\n <label class=\"et-query-devtools-field\">\n <span>Status</span>\n <input\n #statusInput\n [value]=\"row.mock.status\"\n (change)=\"setStatus(row, statusInput.value)\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"100\"\n max=\"599\"\n step=\"1\"\n />\n <small>400 and above arrive as a real error, body and all</small>\n </label>\n <label class=\"et-query-devtools-field\">\n <span>Latency</span>\n <input\n #latencyInput\n [value]=\"row.mock.latencyMs\"\n (change)=\"setLatency(row, latencyInput.value)\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"0\"\n max=\"60000\"\n step=\"100\"\n />\n <small>ms before it settles, so the route still has a loading state</small>\n </label>\n </div>\n\n @if (editingId() === row.mock.id) {\n <et-query-devtools-mock-designer\n [body]=\"row.mock.body\"\n [annotations]=\"editingAnnotations()\"\n (save)=\"saveBody(row, $event)\"\n (dismiss)=\"cancelBody()\"\n />\n }\n </div>\n } @empty {\n <p class=\"et-query-devtools-empty\">\n Nothing designed yet. <strong>New mock</strong> writes one from scratch; capturing below seeds one from\n something that actually happened.\n </p>\n }\n\n @if (specNotes().length) {\n <ul class=\"et-query-devtools-designer-notes\">\n @for (note of specNotes(); track note) {\n <li>{{ note }}</li>\n }\n </ul>\n }\n </div>\n\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>Capture</strong>\n <span class=\"et-query-devtools-count\">live queries holding a response</span>\n </div>\n\n @for (row of captureRows(); track row.entry.id) {\n <div class=\"et-query-devtools-mock-head\">\n <span class=\"et-query-devtools-method\">{{ row.method }}</span>\n <button\n (click)=\"host.selectQuery(row.entry.id)\"\n class=\"et-query-devtools-route et-query-devtools-mono et-query-devtools-row-link\"\n type=\"button\"\n title=\"Open this query\"\n >\n {{ row.pattern }}\n </button>\n <span class=\"et-query-devtools-url\">{{ row.clientName }}</span>\n @if (row.shared > 1) {\n <span class=\"et-query-devtools-count\" title=\"A mock answers the route, so it answers all of them\">\n {{ row.shared }} queries\n </span>\n }\n <span class=\"et-query-devtools-count\">{{ host.formatBytes(row.bytes) }}</span>\n <button (click)=\"capture(row)\" class=\"et-query-devtools-btn\" type=\"button\">\n {{ row.exists ? 'Re-capture' : 'Capture' }}\n </button>\n </div>\n } @empty {\n <p class=\"et-query-devtools-empty\">No live query has a response yet.</p>\n }\n </div>\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { clamp } from '@ethlete/core';\nimport { clearQueryDevtoolsFaults, QUERY_DEVTOOLS_FAULT_STATUSES, setQueryDevtoolsFault } from '@ethlete/query';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { NumericFaultField } from './query-devtools-types';\n\n/** The Faults tab: arms latency/failure injection per client - in-memory only, not persisted. */\n@Component({\n selector: 'et-query-devtools-faults-tab',\n templateUrl: './query-devtools-faults-tab.component.html',\n styleUrl: './query-devtools-faults-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsFaultsTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n protected readonly FAULT_STATUSES = QUERY_DEVTOOLS_FAULT_STATUSES;\n protected readonly CLEAR_FAULTS = clearQueryDevtoolsFaults;\n\n /** The ceiling each numeric fault field is clamped to. */\n private readonly FAULT_LIMITS: Record<NumericFaultField, number> = {\n latencyMs: 60_000,\n failNext: 99,\n failRate: 100,\n };\n\n /**\n * Arms one numeric field of a client's fault from an input's raw value. Clamped here rather than left\n * to the input's `min`/`max`, which a typed-in (or pasted) value ignores.\n */\n protected armFaultValue(options: { clientName: string; field: NumericFaultField; value: string }) {\n const { clientName, field, value } = options;\n const parsed = clamp(Math.trunc(Number(value) || 0), 0, this.FAULT_LIMITS[field]);\n\n setQueryDevtoolsFault({ clientName, patch: { [field]: parsed } });\n }\n\n protected armFaultStatus(options: { clientName: string; value: string }) {\n setQueryDevtoolsFault({ clientName: options.clientName, patch: { status: Number(options.value) } });\n }\n\n /** Whether the default retry policy retries the status a client is armed to fail with. */\n protected isFaultStatusRetryable(status: number) {\n return QUERY_DEVTOOLS_FAULT_STATUSES.find((entry) => entry.status === status)?.retryable ?? false;\n }\n}\n","<div class=\"et-query-devtools-scroll\">\n <div class=\"et-query-devtools-toolbar\">\n <p class=\"et-query-devtools-hint\">\n Faults are injected into the request pipeline, so retries, error handling features and the cache see them exactly\n as they would see a real one. Unlike the rest of the panel, what you arm here is not persisted - a page reload\n disarms every client.\n </p>\n </div>\n\n @for (client of host.faultClients(); track client.name) {\n @let fault = client.fault;\n <div [class.et-query-devtools-card--armed]=\"client.armed\" class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong class=\"et-query-devtools-mono\">{{ client.name }}</strong>\n <span class=\"et-query-devtools-url\">{{ client.baseUrl }}</span>\n @if (client.armed) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--error\">armed</span>\n <button (click)=\"CLEAR_FAULTS(client.name)\" class=\"et-query-devtools-btn\" type=\"button\">Disarm</button>\n }\n </div>\n\n <div class=\"et-query-devtools-faults\">\n <label class=\"et-query-devtools-field\">\n <span>Latency</span>\n <input\n #latencyInput\n [value]=\"fault.latencyMs\"\n (change)=\"armFaultValue({ clientName: client.name, field: 'latencyMs', value: latencyInput.value })\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"0\"\n max=\"60000\"\n step=\"100\"\n />\n <small>ms before every attempt starts</small>\n </label>\n\n <label class=\"et-query-devtools-field\">\n <span>Fail next</span>\n <input\n #failNextInput\n [value]=\"fault.failNext\"\n (change)=\"armFaultValue({ clientName: client.name, field: 'failNext', value: failNextInput.value })\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"0\"\n max=\"99\"\n step=\"1\"\n />\n <small>attempts, counted down as they are spent</small>\n </label>\n\n <label class=\"et-query-devtools-field\">\n <span>Fail rate</span>\n <input\n #failRateInput\n [value]=\"fault.failRate\"\n (change)=\"armFaultValue({ clientName: client.name, field: 'failRate', value: failRateInput.value })\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"0\"\n max=\"100\"\n step=\"5\"\n />\n <small>% of attempts, rolled per attempt</small>\n </label>\n\n <label class=\"et-query-devtools-field\">\n <span>Status</span>\n <select\n #statusSelect\n (change)=\"armFaultStatus({ clientName: client.name, value: statusSelect.value })\"\n class=\"et-query-devtools-select\"\n >\n @for (option of FAULT_STATUSES; track option.status) {\n <!-- `selected` on the option, not `value` on the select: the select's value is\n applied before its options exist, so it would fall back to the first one. -->\n <option [value]=\"option.status\" [selected]=\"option.status === fault.status\">\n {{ option.status }} · {{ option.label }}\n </option>\n }\n </select>\n <small>\n @if (isFaultStatusRetryable(fault.status)) {\n the default retry policy retries this\n } @else {\n the default retry policy gives up on this\n }\n </small>\n </label>\n </div>\n </div>\n } @empty {\n <p class=\"et-query-devtools-empty\">No query clients registered yet.</p>\n }\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { QueryDevtoolsDrawerComponent } from './query-devtools-drawer.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\nimport { QueryDevtoolsRouteComponent } from './query-devtools-route.component';\n\n/** The Forms tab: registered `defineQueryForm()` handles, each expandable to its field table. */\n@Component({\n selector: 'et-query-devtools-forms-tab',\n templateUrl: './query-devtools-forms-tab.component.html',\n styleUrl: './query-devtools-forms-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsDrawerComponent, QueryDevtoolsJsonComponent, QueryDevtoolsRouteComponent],\n})\nexport class QueryDevtoolsFormsTabComponent {\n protected host = injectQueryDevtoolsHost();\n}\n","<div #panes class=\"et-query-devtools-split\">\n <div class=\"et-query-devtools-scroll\">\n @for (entry of host.formEntries(); track entry.id) {\n @let form = host.asForm(entry);\n @let expanded = host.selectedFormId() === entry.id;\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <button\n [attr.aria-expanded]=\"expanded\"\n (click)=\"host.selectedFormId.set(expanded ? null : entry.id)\"\n class=\"et-query-devtools-row-link\"\n type=\"button\"\n >\n <span class=\"et-query-devtools-caret\">{{ expanded ? '▾' : '▸' }}</span>\n <strong>{{ entry.meta.name || 'query form' }}</strong>\n </button>\n @if (form.activeFilterCount(); as count) {\n <span class=\"et-query-devtools-chip\">{{ count }} active</span>\n } @else {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">at defaults</span>\n }\n @if (form.isCommitPending()) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--loading\">debouncing</span>\n }\n @if (!form.isObserving()) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"observe() has not been called, so nothing syncs with the URL\"\n >\n not observing\n </span>\n }\n <button\n [disabled]=\"form.isAtDefaults()\"\n (click)=\"form.resetAll()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n ⟲ Reset all\n </button>\n </div>\n\n @let driven = host.queriesDrivenByForm(entry);\n <dl class=\"et-query-devtools-meta\">\n <dt>Drives</dt>\n <dd>\n @if (driven.length) {\n <div class=\"et-query-devtools-inner-queries\">\n @for (link of driven; track link.id) {\n <button\n [class.et-query-devtools-inner-row--active]=\"host.formSelectedQueryId() === link.id\"\n [disabled]=\"!link.id\"\n (click)=\"host.formSelectedQueryId.set(link.id)\"\n class=\"et-query-devtools-inner-row\"\n type=\"button\"\n >\n <span [attr.data-status]=\"host.queryStatus(link.query)\" class=\"et-query-devtools-status\"></span>\n <span class=\"et-query-devtools-method\">{{ link.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"link.segments\" [fallback]=\"link.query.id() || 'query'\" />\n </span>\n </button>\n }\n </div>\n } @else {\n <span class=\"et-query-devtools-hint\">\n No query has read this form's value yet. A query picks it up the first time its\n <code>withArgs</code> reads <code>value()</code>.\n </span>\n }\n </dd>\n </dl>\n\n @if (expanded) {\n <table class=\"et-query-devtools-table\">\n <thead>\n <tr>\n <th>Field</th>\n <th>Value</th>\n <th>Default</th>\n <th>URL param</th>\n <th>Rules</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n @for (field of form.fields(); track field.key) {\n <tr [attr.data-status]=\"field.isDefault ? null : 'success'\">\n <td class=\"et-query-devtools-mono\">{{ field.key }}</td>\n <td class=\"et-query-devtools-mono\">\n {{ host.inlineValue(field.value) }}\n <!-- The live value only differs while a debounce is pending, which is exactly\n when \"the input says X but the query asked for Y\" needs explaining. -->\n @if (field.liveValue !== field.value) {\n <span class=\"et-query-devtools-stat-sub\">typing {{ host.inlineValue(field.liveValue) }}</span>\n }\n </td>\n <td class=\"et-query-devtools-mono\">{{ host.inlineValue(field.defaultValue) }}</td>\n <td class=\"et-query-devtools-mono\">\n @if (field.queryParam === undefined) {\n <span class=\"et-query-devtools-hint\">—</span>\n } @else {\n {{ field.paramKey }}={{ host.inlineValue(field.queryParam) }}\n }\n </td>\n <td>\n <div class=\"et-query-devtools-chips\">\n @if (field.debounceMs !== null) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">\n {{ field.debounceMs }}ms\n </span>\n }\n @if (field.isResetBy.length) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"Reset to its default whenever one of these changes\"\n >\n reset by {{ field.isResetBy.join(', ') }}\n </span>\n }\n @if (!field.countsAsFilter) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"Not counted by activeFilterCount\"\n >\n not a filter\n </span>\n }\n </div>\n </td>\n <td>\n <button\n [disabled]=\"field.isDefault\"\n (click)=\"form.resetField(field.key)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n ⟲\n </button>\n </td>\n </tr>\n }\n </tbody>\n </table>\n\n <h4 class=\"et-query-devtools-section\">Committed value</h4>\n <et-query-devtools-json [value]=\"form.value()\" />\n }\n </div>\n } @empty {\n <p class=\"et-query-devtools-empty\">\n No query forms registered. A form created with <code>defineQueryForm()</code> registers itself.\n </p>\n }\n </div>\n\n <et-query-devtools-drawer\n [sel]=\"host.formSelectedQuery()\"\n [container]=\"panes\"\n (dismiss)=\"host.formSelectedQueryId.set(null)\"\n />\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { DevtoolsLockKind } from './query-devtools-locks';\n\nconst KIND_LABELS: Record<DevtoolsLockKind, string> = {\n auth: 'Auth',\n poll: 'Polling',\n other: 'Other',\n};\n\n/**\n * The Locks tab: the Web Locks held across this origin, which is the one view in the panel that shows\n * something outside its own tab.\n */\n@Component({\n selector: 'et-query-devtools-locks-tab',\n templateUrl: './query-devtools-locks-tab.component.html',\n styleUrl: './query-devtools-locks-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsLocksTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n protected kindLabel(kind: DevtoolsLockKind) {\n return KIND_LABELS[kind];\n }\n}\n","<div class=\"et-query-devtools-scroll\">\n <div class=\"et-query-devtools-toolbar\">\n <p class=\"et-query-devtools-hint et-query-devtools-locks-hint\">\n The\n <a href=\"https://developer.mozilla.org/docs/Web/API/Web_Locks_API\" target=\"_blank\" rel=\"noreferrer\">Web Locks</a>\n held across this whole origin - every other tab, worker and service worker included, which is the one thing in\n this panel that is not about this tab alone. Read only: a tab cannot release another tab's lock. Polled once a\n second while this tab is open and the page is visible.\n </p>\n </div>\n\n @if (host.lockRows(); as rows) {\n <table class=\"et-query-devtools-table\">\n <thead>\n <tr>\n <th>Lock</th>\n <th>Kind</th>\n <th>Taking part</th>\n <th>This tab</th>\n </tr>\n </thead>\n <tbody>\n @for (row of rows; track row.name) {\n <tr>\n <td [title]=\"row.name\">\n <span class=\"et-query-devtools-lock-name\">\n <span class=\"et-query-devtools-url\">{{ row.label }}</span>\n @if (row.channel) {\n <span class=\"et-query-devtools-count\">{{ row.channel }}</span>\n }\n </span>\n </td>\n <td>{{ kindLabel(row.kind) }}</td>\n <td>{{ row.tabs }}</td>\n <td>\n @let standing = host.lockStanding(row);\n <span\n [class.et-query-devtools-chip--success]=\"standing.tone === 'success'\"\n [class.et-query-devtools-chip--muted]=\"standing.tone === 'muted'\"\n [title]=\"standing.title\"\n class=\"et-query-devtools-chip\"\n >\n {{ standing.label }}\n </span>\n </td>\n </tr>\n } @empty {\n <tr>\n <td class=\"et-query-devtools-empty\" colspan=\"4\">\n Nothing holds a lock on this origin. Multi-tab auth sync and cache polling both take one - without either,\n there is nothing to coordinate.\n </td>\n </tr>\n }\n </tbody>\n </table>\n } @else {\n <p class=\"et-query-devtools-empty\">\n This browser has no Web Locks API, so nothing is coordinated across tabs at all: every tab refreshes its own\n tokens and polls its own cache keys.\n </p>\n }\n</div>\n","/**\n * Namespace of the probe lock the panel holds while the Locks tab is open. `LockInfo` carries a\n * `clientId` but there is no API for \"my own\", so a lock under a name only this tab can have produced is\n * the only way to learn it - and without it every row would say _some tab_ rather than _this tab_.\n */\nexport const DEVTOOLS_PROBE_NAMESPACE = 'ethlete-devtools';\n\nexport const devtoolsProbeLockKey = (id: string) => `probe:${id}`;\n\nexport const devtoolsProbeLockName = (id: string) => `${DEVTOOLS_PROBE_NAMESPACE}:${devtoolsProbeLockKey(id)}`;\n\nconst PROBE_PREFIX = `${DEVTOOLS_PROBE_NAMESPACE}:probe:`;\nconst AUTH_PREFIX = 'ethlete-auth:leader:';\nconst POLL_PREFIX = 'et-query-poll:';\n\n/** Which SDK feature a lock name belongs to, or `other` for one the panel did not put there. */\nexport type DevtoolsLockKind = 'auth' | 'poll' | 'other';\n\n/** Where the tab the panel is open in stands on one lock. */\nexport type DevtoolsLockStanding = 'holder' | 'queued' | 'absent' | 'unknown';\n\n/** One lock name, with every client that holds or waits for it folded into a single row. */\nexport type DevtoolsLockRow = {\n /** The raw name, so a lock the panel cannot decode is still greppable from the row. */\n name: string;\n\n /** What the name means: the provider for an auth lock, the cache key for a poll lock. */\n label: string;\n\n kind: DevtoolsLockKind;\n\n /** The sync channel a poll lock belongs to, or `null` for a name that carries no such part. */\n channel: string | null;\n\n /**\n * Held plus queued on this name. Every participant requests the same lock and exactly one gets it, so\n * this is the number of tabs, workers and service workers taking part - the same arithmetic the auth\n * provider's own `instanceCount` does.\n */\n tabs: number;\n\n standing: DevtoolsLockStanding;\n\n /** This tab's 1-based place in the queue, or `null` unless {@link standing} is `queued`. */\n queuePlace: number | null;\n};\n\nconst decode = (name: string): Pick<DevtoolsLockRow, 'kind' | 'label' | 'channel'> => {\n if (name.startsWith(AUTH_PREFIX)) return { kind: 'auth', label: name.slice(AUTH_PREFIX.length), channel: null };\n\n if (name.startsWith(POLL_PREFIX)) {\n const rest = name.slice(POLL_PREFIX.length);\n const separator = rest.indexOf(':');\n\n return separator === -1\n ? { kind: 'poll', label: rest, channel: null }\n : { kind: 'poll', label: rest.slice(separator + 1), channel: rest.slice(0, separator) };\n }\n\n return { kind: 'other', label: name, channel: null };\n};\n\nconst KIND_ORDER: Record<DevtoolsLockKind, number> = { auth: 0, poll: 1, other: 2 };\n\n/** The `clientId` of the tab the panel is open in, read off the probe lock it holds under `probeName`. */\nexport const probeClientId = (snapshot: LockManagerSnapshot, probeName: string): string | null =>\n snapshot.held?.find((info) => info.name === probeName)?.clientId ?? null;\n\n/**\n * Folds an origin-wide `navigator.locks.query()` snapshot into one row per lock name, decoded to the\n * feature that took it and marked with where this tab stands on it.\n *\n * Probe locks are dropped from the result - every open panel on the origin holds one, and they describe\n * the inspector rather than the app it inspects.\n */\nexport const summarizeLocks = (options: {\n snapshot: LockManagerSnapshot;\n /** This tab's client id, or `null` while the probe has not been granted - see {@link DevtoolsLockStanding}. */\n clientId: string | null;\n}): DevtoolsLockRow[] => {\n const { snapshot, clientId } = options;\n\n const held = (snapshot.held ?? []).filter((info) => !info.name?.startsWith(PROBE_PREFIX));\n const pending = (snapshot.pending ?? []).filter((info) => !info.name?.startsWith(PROBE_PREFIX));\n\n const names = [...new Set([...held, ...pending].map((info) => info.name ?? ''))];\n\n const rows = names.map((name): DevtoolsLockRow => {\n const holders = held.filter((info) => info.name === name);\n const queue = pending.filter((info) => info.name === name);\n const place = queue.findIndex((info) => info.clientId === clientId) + 1;\n const isHolder = holders.some((info) => info.clientId === clientId);\n\n const standing: DevtoolsLockStanding =\n clientId === null ? 'unknown' : isHolder ? 'holder' : place > 0 ? 'queued' : 'absent';\n\n return {\n name,\n ...decode(name),\n tabs: holders.length + queue.length,\n standing,\n queuePlace: standing === 'queued' ? place : null,\n };\n });\n\n return rows.sort((a, b) => KIND_ORDER[a.kind] - KIND_ORDER[b.kind] || a.label.localeCompare(b.label));\n};\n","// Generated from package.json by tools/scripts/generate-version.js - do not edit.\n\n/** The version of `@ethlete/query-devtools` this build was cut from. */\nexport const QUERY_DEVTOOLS_VERSION = '1.0.0-next.3';\n","/* eslint-disable @typescript-eslint/naming-convention -- the `__export_*` keys are Insomnia's file format */\n\n/**\n * One request to export. Values are what the query actually sent (or would send), already resolved -\n * no `:param` placeholders unless the query has no args yet, in which case Insomnia picks them up as\n * its own path params.\n */\nexport type InsomniaRequestInput = {\n name: string;\n method: string;\n url: string;\n headers: { name: string; value: string }[];\n\n /** The request body, or `null` for a request that sends none. */\n body: unknown;\n\n /** The GraphQL document, for a GraphQL query - switches Insomnia's body editor to GraphQL. */\n gqlQuery?: string | null;\n\n /** Name of the folder to file the request under, usually the query client's. */\n group?: string | null;\n\n /**\n * The {@link InsomniaTokenRefreshInput.id} of the token refresh this request authenticates with.\n * Its `Authorization` header then reads the access token out of the refresh response instead of\n * carrying the one the app happened to hold at export time.\n */\n secureBy?: string | null;\n};\n\n/**\n * The token refresh of a bearer auth provider, exported as a request of its own so the collection can\n * mint its own access tokens instead of shipping one that expires within the hour.\n */\nexport type InsomniaTokenRefreshInput = {\n /** What a request's {@link InsomniaRequestInput.secureBy} points at, usually the provider's name. */\n id: string;\n\n name: string;\n method: string;\n url: string;\n headers: { name: string; value: string }[];\n\n /** The body that carries the refresh token, e.g. `{ token: '…' }`. */\n body: unknown;\n\n group?: string | null;\n\n /** JSONPath of the access token in the refresh response, e.g. `$.accessToken`. */\n accessTokenPath: string;\n\n /**\n * How long Insomnia may reuse a stored refresh response before sending the request again. Set from\n * the access token's own lifetime, so the chain refreshes about as often as the app does.\n */\n maxAgeSeconds: number;\n};\n\nexport type BuildInsomniaExportOptions = {\n /** Name of the exported collection, shown in Insomnia's sidebar. */\n name: string;\n requests: InsomniaRequestInput[];\n\n /** The token refreshes the exported requests authenticate with, at most one per auth provider. */\n tokenRefreshes?: InsomniaTokenRefreshInput[];\n\n /** Wall-clock time of the export - passed in so the builder stays pure. */\n now: number;\n};\n\ntype InsomniaResource = Record<string, unknown>;\n\n/** Insomnia's own export envelope. Version 4 is what Insomnia 8/9/10 read and write. */\nexport type InsomniaExport = {\n _type: 'export';\n __export_format: 4;\n __export_date: string;\n __export_source: string;\n resources: InsomniaResource[];\n};\n\nconst WORKSPACE_ID = 'wrk_ethlete_query_devtools';\n\nconst jsonBody = (body: unknown) => {\n try {\n return JSON.stringify(body, null, 2);\n } catch {\n // A body holding a circular reference or a throwing `toJSON` cannot be exported.\n return null;\n }\n};\n\n/**\n * Insomnia's GraphQL body editor stores `{ query, variables }` as its text, so a GraphQL request is\n * exported with the document and its variables rather than the serialized POST body.\n */\nconst graphqlBody = (gqlQuery: string, body: unknown) => {\n const variables = (body as { variables?: unknown } | null)?.variables ?? {};\n\n return jsonBody({ query: gqlQuery, variables });\n};\n\nconst bodyOf = (request: Pick<InsomniaRequestInput, 'body' | 'gqlQuery'>) => {\n if (request.gqlQuery) {\n const text = graphqlBody(request.gqlQuery, request.body);\n\n return text === null ? {} : { mimeType: 'graphql', text };\n }\n\n if (request.body === null || request.body === undefined) return {};\n\n const text = jsonBody(request.body);\n\n return text === null ? {} : { mimeType: 'application/json', text };\n};\n\n/**\n * Angular's `HttpClient` labels an object body `application/json` on its own, so a replay outside the\n * app needs the header spelled out to reach the same endpoint the same way.\n */\nconst headersOf = (input: { headers: { name: string; value: string }[] }, hasBody: boolean) => {\n const headers = input.headers.filter((header) => header.value !== '');\n const hasContentType = headers.some((header) => header.name.toLowerCase() === 'content-type');\n\n if (!hasBody || hasContentType) return headers;\n\n return [...headers, { name: 'Content-Type', value: 'application/json' }];\n};\n\nconst AUTH_HEADER = 'Authorization';\n\n/**\n * Insomnia's template tag for reading a value out of another request's response. `when-expired` plus a\n * max age is what makes the chain maintain itself: once the stored refresh response is older than\n * `maxAgeSeconds`, sending a request that reads from it re-sends the refresh first.\n */\nconst responseTag = (requestId: string, refresh: InsomniaTokenRefreshInput) =>\n `{% response 'body', '${requestId}', '${refresh.accessTokenPath}', 'when-expired', ${refresh.maxAgeSeconds} %}`;\n\n/** Replaces whatever `Authorization` the export resolved with the token the refresh chain yields. */\nconst withChainedAuth = (headers: { name: string; value: string }[], value: string) => [\n { name: AUTH_HEADER, value },\n ...headers.filter((header) => header.name.toLowerCase() !== AUTH_HEADER.toLowerCase()),\n];\n\n/**\n * Builds an Insomnia v4 collection from a set of requests, ready to be imported via Insomnia's\n * `Import > From File / Clipboard`. Requests are filed into a folder per query client, and a request\n * naming a token refresh gets its bearer token from that refresh's response rather than from a\n * literal token frozen at export time.\n */\nexport const buildInsomniaExport = (options: BuildInsomniaExportOptions): InsomniaExport => {\n const groups = new Map<string, string>();\n const resources: InsomniaResource[] = [\n {\n _id: WORKSPACE_ID,\n _type: 'workspace',\n parentId: null,\n name: options.name,\n description: 'Exported from the @ethlete/query devtools.',\n scope: 'collection',\n created: options.now,\n modified: options.now,\n },\n ];\n\n const groupIdFor = (name: string | null | undefined) => {\n if (!name) return WORKSPACE_ID;\n\n const existing = groups.get(name);\n if (existing) return existing;\n\n const id = `fld_${groups.size}`;\n groups.set(name, id);\n\n resources.push({\n _id: id,\n _type: 'request_group',\n parentId: WORKSPACE_ID,\n name,\n environment: {},\n // Insomnia sorts ascending, so the counter keeps folders in the order they were added.\n metaSortKey: groups.size,\n created: options.now,\n modified: options.now,\n });\n\n return id;\n };\n\n const requestResource = (resource: InsomniaResource) => {\n resources.push({\n _type: 'request',\n description: '',\n parameters: [],\n authentication: {},\n isPrivate: false,\n settingStoreCookies: true,\n settingSendCookies: true,\n settingEncodeUrl: true,\n settingRebuildPath: true,\n settingFollowRedirects: 'global',\n created: options.now,\n modified: options.now,\n ...resource,\n });\n };\n\n /** The `Authorization` value a request chained to a given token refresh gets, keyed by refresh id. */\n const chainedAuth = new Map<string, string>();\n\n // Emitted first so every chained `Authorization` below already has a request id to point at.\n options.tokenRefreshes?.forEach((refresh, index) => {\n const id = `req_refresh_${index}`;\n const body = bodyOf(refresh);\n\n chainedAuth.set(refresh.id, `Bearer ${responseTag(id, refresh)}`);\n\n requestResource({\n _id: id,\n parentId: groupIdFor(refresh.group),\n name: refresh.name,\n description:\n 'Mints the access token every secure request in this collection reads. Insomnia re-sends it on ' +\n `its own once the stored response is older than ${refresh.maxAgeSeconds}s. The refresh token in ` +\n 'the body is the one the app held at export time - re-export once it is spent.',\n method: refresh.method,\n url: refresh.url,\n body,\n headers: headersOf(refresh, 'text' in body),\n // Insomnia sorts ascending and the exported requests start at 0, so the refresh stays on top.\n metaSortKey: index - (options.tokenRefreshes?.length ?? 0),\n });\n });\n\n options.requests.forEach((request, index) => {\n const body = bodyOf(request);\n const headers = headersOf(request, 'text' in body);\n const auth = request.secureBy ? chainedAuth.get(request.secureBy) : undefined;\n\n requestResource({\n _id: `req_${index}`,\n parentId: groupIdFor(request.group),\n name: request.name,\n method: request.method,\n url: request.url,\n body,\n headers: auth ? withChainedAuth(headers, auth) : headers,\n metaSortKey: index,\n });\n });\n\n return {\n _type: 'export',\n __export_format: 4,\n __export_date: new Date(options.now).toISOString(),\n __export_source: 'ethlete.query:devtools',\n resources,\n };\n};\n","/** One folder in the Queries list's path tree, or the tree's own root. */\nexport type QueryPathNode<T> = {\n /** The full path this node stands for, `/`-prefixed - the stable key its collapsed state is stored under. */\n key: string;\n\n /** What the row shows. After chain compression this can be several segments, e.g. `api/v1`. */\n label: string;\n\n /** Rows whose path ends exactly here. */\n items: T[];\n\n children: QueryPathNode<T>[];\n\n /** Rows at or below this node, which is what the folder row counts. */\n count: number;\n};\n\n/** The tree's root: rows with no path of their own, plus the top-level folders. */\nexport type QueryPathTree<T> = { items: T[]; children: QueryPathNode<T>[] };\n\n/** Path segments of a route, with the query string left attached to the segment it belongs to. */\nexport const queryRoutePathSegments = (route: string) => route.split('/').filter(Boolean);\n\ntype Building<T> = { key: string; segments: string[]; items: T[]; children: Map<string, Building<T>> };\n\nconst node = <T>(key: string, segment: string): Building<T> => ({\n key,\n segments: [segment],\n items: [],\n children: new Map(),\n});\n\n/**\n * Folds a node that only exists to hold one child into that child - `api` → `v1` → `teams` becomes one\n * `api/v1/teams` row. Without this a tree of REST routes is mostly rows that say nothing and cost a\n * level of indentation each, which is strictly worse than the flat list it replaced.\n */\nconst compress = <T>(current: Building<T>): Building<T> => {\n let folded = current;\n\n while (folded.items.length === 0 && folded.children.size === 1) {\n const [child] = [...folded.children.values()] as [Building<T>];\n\n folded = { ...child, segments: [...folded.segments, ...child.segments] };\n }\n\n return {\n ...folded,\n children: new Map([...folded.children].map(([segment, child]) => [segment, compress(child)])),\n };\n};\n\nconst countOf = <T>(current: Building<T>): number =>\n current.items.length + [...current.children.values()].reduce((sum, child) => sum + countOf(child), 0);\n\nconst finalize = <T>(current: Building<T>): QueryPathNode<T> => ({\n key: current.key,\n label: current.segments.join('/'),\n items: current.items,\n children: [...current.children.values()].map(finalize),\n count: countOf(current),\n});\n\n/**\n * Arranges rows into a tree by their route path, keeping the order they arrive in - which is the order\n * the flat list already sorted them into, so pinning and the recent-first sort still decide what is near\n * the top. A row whose route has no segments at all sits at the root rather than inventing a folder.\n */\nexport const buildQueryPathTree = <T>(rows: readonly { path: string[]; item: T }[]): QueryPathTree<T> => {\n const root = node<T>('', '');\n\n for (const { path, item } of rows) {\n let current = root;\n\n for (const segment of path) {\n const existing = current.children.get(segment);\n\n if (existing) {\n current = existing;\n continue;\n }\n\n const child = node<T>(`${current.key}/${segment}`, segment);\n current.children.set(segment, child);\n current = child;\n }\n\n current.items.push(item);\n }\n\n return {\n items: root.items,\n children: [...root.children.values()].map((child) => finalize(compress(child))),\n };\n};\n\n/** One line of the rendered tree: a folder, or a row at the depth its path put it. */\nexport type QueryTreeRow<T> =\n | { kind: 'folder'; key: string; label: string; depth: number; count: number; collapsed: boolean }\n | {\n kind: 'row';\n key: string;\n depth: number;\n item: T;\n\n /** The path of the folder this row sits under, which the row may leave off its own label. */\n parentPath: string;\n };\n\n/**\n * Flattens the tree into the lines to render, skipping everything under a collapsed folder. A flat list\n * is what the template iterates: one `@for`, and a folder's rows track independently of it.\n *\n * **A node nothing branches off gets no folder row.** A row already shows its whole route, so a `/flaky`\n * heading above one `GET /flaky` costs a line and a level of indentation to repeat what is on the line\n * below it - and a tree made mostly of those is worse than the flat list it replaced. Only a node that\n * actually splits the list earns a heading.\n */\nexport const flattenQueryPathTree = <T>(\n tree: QueryPathTree<T>,\n options: { isCollapsed: (key: string) => boolean; keyOf: (item: T) => string },\n): QueryTreeRow<T>[] => {\n const rows: QueryTreeRow<T>[] = [];\n\n const walk = (nodes: QueryPathNode<T>[], at: { depth: number; parentPath: string }) => {\n const { depth, parentPath } = at;\n\n for (const child of nodes) {\n if (!child.children.length) {\n for (const item of child.items) {\n rows.push({ kind: 'row', key: options.keyOf(item), depth, item, parentPath });\n }\n\n continue;\n }\n\n const collapsed = options.isCollapsed(child.key);\n\n rows.push({ kind: 'folder', key: child.key, label: child.label, depth, count: child.count, collapsed });\n\n if (collapsed) continue;\n\n for (const item of child.items) {\n rows.push({ kind: 'row', key: options.keyOf(item), depth: depth + 1, item, parentPath: child.key });\n }\n\n walk(child.children, { depth: depth + 1, parentPath: child.key });\n }\n };\n\n for (const item of tree.items) {\n rows.push({ kind: 'row', key: options.keyOf(item), depth: 0, item, parentPath: '' });\n }\n\n walk(tree.children, { depth: 0, parentPath: '' });\n\n return rows;\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport { Component, computed, effect, untracked, ViewEncapsulation } from '@angular/core';\nimport { clearQueryDevtoolsTombstones, QueryDevtoolsEntry } from '@ethlete/query';\nimport { QueryDevtoolsDetailComponent } from './query-devtools-detail.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { buildQueryPathTree, flattenQueryPathTree, queryRoutePathSegments } from './query-devtools-query-tree';\nimport { QueryDevtoolsRouteComponent } from './query-devtools-route.component';\nimport { AnyQuery, QueryListFacet, QueryStatus } from './query-devtools-types';\n\n/** One query as the Queries list renders it: the registry entry plus the handle it was registered with. */\ntype QueryRow = { entry: QueryDevtoolsEntry; query: AnyQuery };\n\n/**\n * Rows the list folds into one line. `head` is the row the collapsed line renders from - every row in\n * `items` looks the same, which is what put them in one group.\n */\ntype QueryRowGroup = { key: string; head: QueryRow; items: QueryRow[] };\n\n/** The Queries tab: every registered query, filterable by client/search/status, with an inline detail. */\n@Component({\n selector: 'et-query-devtools-queries-tab',\n templateUrl: './query-devtools-queries-tab.component.html',\n styleUrl: './query-devtools-queries-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet, QueryDevtoolsDetailComponent, QueryDevtoolsRouteComponent],\n})\nexport class QueryDevtoolsQueriesTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n /** The status chips above the list, in the order a problem is usually looked for. */\n private readonly facets = [\n { id: 'error', label: 'Failing' },\n { id: 'loading', label: 'Loading' },\n { id: 'stale', label: 'Stale' },\n { id: 'idle', label: 'Idle' },\n { id: 'gone', label: 'Gone' },\n ] satisfies { id: QueryListFacet; label: string }[];\n\n private searchedQueries = computed(() => {\n const items = this.host.scopedQueries().map((entry) => ({ entry, query: entry.handle as AnyQuery }));\n const terms = this.host.queryFilter().trim().toLowerCase().split(/\\s+/).filter(Boolean);\n\n if (!terms.length) return items;\n\n return items.filter((item) => {\n const haystack = this.queryHaystack(item.entry, item.query);\n\n return terms.every((term) => haystack.includes(term));\n });\n });\n\n /**\n * How many queries each status chip would leave. Counted before the active chips are applied, so a\n * chip always states what picking it yields rather than what the current selection happens to show.\n */\n private facetCounts = computed(() => {\n // Staleness is a `Date.now()` comparison and deliberately not reactive, so the clock is what makes\n // the counts age with it - without it a chip would keep the number it happened to be built with.\n this.host.clock();\n\n const counts: Record<QueryListFacet, number> = { error: 0, loading: 0, stale: 0, idle: 0, gone: 0 };\n\n for (const { entry, query } of this.searchedQueries()) {\n // A tombstone's frozen state is not live state: counting it as failing or idle would put a query\n // that no longer exists into the numbers the panel is read for.\n if (entry.destroyedAt) {\n counts.gone++;\n continue;\n }\n\n const status = this.host.queryStatus(query);\n\n if (status === 'error') counts.error++;\n if (status === 'loading') counts.loading++;\n if (status === 'idle') counts.idle++;\n if (this.host.isStale(query)) counts.stale++;\n }\n\n return counts;\n });\n\n /**\n * The status chips worth rendering: the ones that would narrow the list, plus whichever are on. An\n * active chip stays even at zero - it is the only thing that says why the list is empty.\n */\n protected visibleFacets = computed(() => {\n const counts = this.facetCounts();\n const active = this.host.queryFacets();\n\n return this.facets\n .map((facet) => ({ ...facet, count: counts[facet.id], active: active.has(facet.id) }))\n .filter((facet) => facet.count > 0 || facet.active);\n });\n\n protected filteredQueries = computed(() => {\n const facets = this.host.queryFacets();\n\n // Same reason as in `facetCounts`: a list narrowed to stale queries has to re-evaluate as they age.\n if (facets.has('stale')) this.host.clock();\n\n const items = this.searchedQueries().filter((item) =>\n item.entry.destroyedAt\n ? this.listsTombstone(item.entry, facets)\n : !facets.size || this.matchesFacets(item, facets),\n );\n\n return this.pinnedFirst(this.byLastExecuted(items));\n });\n\n /**\n * The list as it is rendered: rows that would be indistinguishable from each other - same method, same\n * resolved route, same live-or-gone - folded into one group. One query used by several consumers is one\n * entry per consumer by design (the ids have to stay per-instance for the detail, pins and tombstones),\n * and this is where that stops being N identical lines.\n *\n * Grouping on what the row *shows* rather than on the registry's descriptor is deliberate: the\n * descriptor is the route template, so `/post/1` and `/post/2` share it while being different data.\n * Folding only what looks the same can never hide a distinction the list was making.\n */\n protected queryGroups = computed(() => {\n const groups = new Map<string, QueryRowGroup>();\n\n for (const item of this.filteredQueries()) {\n const key = this.groupKey(item);\n const group = groups.get(key);\n\n if (group) {\n group.items.push(item);\n continue;\n }\n\n groups.set(key, { key, head: item, items: [item] });\n }\n\n return [...groups.values()];\n });\n\n /**\n * The same groups, arranged by route path. Built from what a row *shows* (the resolved route), the way\n * {@link groupKey} is - so `/post/1` and `/post/2` are two leaves under `post` rather than one, which\n * is what makes the tree answer \"which ids did this screen fetch\".\n */\n protected queryTree = computed(() =>\n flattenQueryPathTree(\n buildQueryPathTree(\n this.queryGroups().map((group) => ({ path: queryRoutePathSegments(this.groupPathRoute(group)), item: group })),\n ),\n {\n isCollapsed: (key) => this.host.collapsedQueryPaths().has(key),\n keyOf: (group) => group.key,\n },\n ),\n );\n\n /**\n * The fold the selected query sits in, or `null` while it is not in the list. Keyed the way\n * {@link groupKey} keys the fold, so it moves with the query when regrouping moves it.\n */\n private selectedGroupKey = computed(() => {\n const id = this.host.selectedQueryId();\n\n if (!id) return null;\n\n const item = this.filteredQueries().find((item) => item.entry.id === id);\n\n return item ? this.groupKey(item) : null;\n });\n\n /**\n * Whether the selected query is the very row a collapsed fold renders. A boolean rather than the group\n * itself on purpose: the effect below reads it, and a fresh object every time the list re-evaluates\n * would re-run it - which is exactly what it must not do.\n */\n private selectedIsFoldHead = computed(() => {\n const key = this.selectedGroupKey();\n\n if (!key) return false;\n\n return this.queryGroups().find((group) => group.key === key)?.head.entry.id === this.host.selectedQueryId();\n });\n\n /** How many queries the list would hold with the search box empty, which is what the count compares to. */\n protected scopedQueryCount = computed(() => {\n const facets = this.host.queryFacets();\n\n return this.host.scopedQueries().filter((entry) => !entry.destroyedAt || this.listsTombstone(entry, facets)).length;\n });\n\n protected goneQueryCount = computed(() => this.host.scopedQueries().filter((entry) => !!entry.destroyedAt).length);\n\n /** The tombstones Forget would drop: the ones the list is showing, never the whole registry. */\n protected listedGoneQueries = computed(() =>\n this.host.queryFacets().has('gone') ? this.filteredQueries().filter((item) => item.entry.destroyedAt) : [],\n );\n\n /** Whether the search box or a status chip is narrowing the list beyond its scope. */\n protected isQueryListNarrowed = computed(() => !!this.host.queryFilter().trim() || this.host.queryFacets().size > 0);\n\n constructor() {\n // Opens the fold when the selection lands on a member it does not render, so the detail pane always\n // has a row to match - a selection arriving from the Events tab has to say *which* consumer it is.\n // Selecting the fold's own head leaves it shut: the collapsed row already stands for that query.\n //\n // Only *opens*, never closes, and `untracked` is what keeps that true: `expandQueryGroup` reads the\n // expanded set to decide whether it has anything to do, and a tracked read of it would make\n // collapsing the fold re-run this and open it straight back up.\n effect(() => {\n const key = this.selectedGroupKey();\n\n if (key && !this.selectedIsFoldHead()) untracked(() => this.host.expandQueryGroup(key));\n });\n }\n\n /** Whether the selected query is one of this fold's - the row stands in for it while it is collapsed. */\n protected holdsSelection(group: QueryRowGroup) {\n return this.selectedGroupKey() === group.key;\n }\n\n /**\n * Opens the detail on the fold without expanding it. Every row in it is the same request, so the head\n * answers for all of them - and a fold already showing one of its own keeps that one selected.\n */\n protected selectGroup(group: QueryRowGroup) {\n if (this.holdsSelection(group)) return;\n\n this.host.selectedQueryId.set(group.head.entry.id);\n }\n\n /**\n * What tells one consumer of a folded query from another. They share a method, a route and a response -\n * what differs is where each was created, so the element it was created in is the only thing on a nested\n * row worth reading. The ordinal carries the ones created outside a component, and the ones several\n * instances of the same component created.\n */\n protected consumerLabel(item: QueryRow) {\n return this.host.locatableElement(item.entry)?.localName ?? null;\n }\n\n /**\n * The batch that created a fold's queries, or `null` for a fold of ordinary ones. Every query in a\n * batch fold has the same one, so the head answers for all of them.\n */\n protected batchEntryOf(group: QueryRowGroup) {\n return this.host.batchOf(group.head.entry);\n }\n\n /** The worst state in a folded group, so a collapsed row cannot hide the one instance that is failing. */\n protected groupStatus(group: QueryRowGroup): QueryStatus {\n const statuses = group.items.map((item) => this.host.queryStatus(item.query));\n\n if (statuses.includes('error')) return 'error';\n if (statuses.includes('loading')) return 'loading';\n if (statuses.includes('success')) return 'success';\n\n return 'idle';\n }\n\n protected isGroupStale(group: QueryRowGroup) {\n return group.items.some((item) => this.host.isStale(item.query));\n }\n\n protected isGroupTampered(group: QueryRowGroup) {\n return group.items.some((item) => this.host.isTampered(item.entry));\n }\n\n protected isGroupExpanded(group: QueryRowGroup) {\n return this.host.expandedQueryGroups().has(group.key);\n }\n\n protected forgetGoneQueries() {\n clearQueryDevtoolsTombstones(this.listedGoneQueries().map((item) => item.entry.id));\n // Left lit, the chip would narrow the list to the tombstones that were just dropped - an empty list.\n this.host.toggleFacet('gone');\n }\n\n protected downloadInsomniaCollection() {\n this.host.downloadInsomniaCollection(this.filteredQueries(), this.host.selectedClientName());\n }\n\n /**\n * When a query last ran, or `null` for one that never has. A tombstone's is frozen at whatever it held\n * when it died, so `destroyedAt` is the tiebreak that keeps gone entries ordered among themselves.\n */\n protected lastExecutedAt(item: QueryRow) {\n return item.query.lastTimeExecutedAt() ?? item.entry.destroyedAt ?? null;\n }\n\n /**\n * A tombstone is the last state a query held, not a state it is in, so the list leaves one out unless the\n * Gone chip asks for it - or the detail is showing it, so a query dying under the detail keeps its row.\n */\n private listsTombstone(entry: QueryDevtoolsEntry, facets: ReadonlySet<QueryListFacet>) {\n // A batch's settled items are the exception: the batch destroys each query the moment its item lands,\n // so every row of a finished run is a tombstone and the fold would vanish the moment it completed.\n // What the row stands for is the batch - which is still registered - not a query that is gone.\n if (this.host.batchOf(entry)) return true;\n\n return facets.has('gone') || (!facets.size && entry.id === this.host.selectedQueryId());\n }\n\n /**\n * Newest or oldest run first. A query that has **never** executed has no place on a time axis, so it\n * sinks to the bottom in *both* directions rather than piling up at whichever end `null` sorts to -\n * flipping the arrow must not turn the list into the queries that have not run yet.\n */\n private byLastExecuted(items: QueryRow[]) {\n const recentFirst = this.host.queryRecentFirst();\n\n // Copied first: `items` came out of a computed and `sort` is in place.\n return items.slice().sort((a, b) => {\n const left = this.lastExecutedAt(a);\n const right = this.lastExecutedAt(b);\n\n if (left === null || right === null) return Number(left === null) - Number(right === null);\n\n return recentFirst ? right - left : left - right;\n });\n }\n\n /**\n * Pinned queries first, everything else in {@link byLastExecuted} order. A chip could not do this job:\n * {@link matchesFacets} widens, so a Pinned chip would mean \"pinned or failing\" and never both.\n */\n private pinnedFirst(items: QueryRow[]) {\n if (!this.host.pinnedQueryIds().size) return items;\n\n // Copied first: `items` is a computed's cached array, and `sort` is in place.\n return items\n .slice()\n .sort((a, b) => Number(this.host.isQueryPinned(b.entry)) - Number(this.host.isQueryPinned(a.entry)));\n }\n\n /** A live query matches the chips if it is in any of the picked states - chips widen, they don't intersect. */\n private matchesFacets(item: QueryRow, facets: ReadonlySet<QueryListFacet>) {\n const status = this.host.queryStatus(item.query);\n\n return (\n (facets.has('error') && status === 'error') ||\n (facets.has('loading') && status === 'loading') ||\n (facets.has('idle') && status === 'idle') ||\n (facets.has('stale') && this.host.isStale(item.query))\n );\n }\n\n /** The route a row renders, as one string - what both the fold key and the path tree are built from. */\n private groupRoute(item: QueryRow) {\n return this.host\n .routeSegments(item.entry, item.query)\n .map((segment) => segment.text)\n .join('');\n }\n\n /**\n * The route a whole fold sits under in the path tree. A batch's is its route *template*, not the\n * resolved route of whichever item happens to be the head - the items differ in every path param, so\n * the head's route would put the run under a different leaf on every re-render.\n */\n private groupPathRoute(group: QueryRowGroup) {\n const batch = this.batchEntryOf(group);\n\n return batch ? (batch.meta.route ?? '') : this.groupRoute(group.head);\n }\n\n /** What makes two rows indistinguishable on screen. A tombstone never folds into a live query. */\n private groupKey(item: QueryRow) {\n const batch = this.host.batchOf(item.entry);\n\n // A batch's items fold by the run that created them rather than by what the row shows: they differ\n // in every path param, so nothing else would fold them, and a run only ever has `concurrency` of\n // them alive at a time - so an unfolded list is a handful of rows churning through the same slot.\n if (batch) return `batch|${batch.id}`;\n\n return `${item.entry.destroyedAt ? 'gone' : 'live'}|${item.entry.meta.method ?? ''}|${this.groupRoute(item)}`;\n }\n\n /**\n * What the search box matches against: what the row shows, plus the path of the request that ran for a\n * query whose template differs from it.\n *\n * Deliberately not the origin or the client name - both repeat across most entries, so a short term\n * (\"p\") would match nearly everything through the host name. Scoping to a client is the picker's job.\n */\n private queryHaystack(entry: QueryDevtoolsEntry, query: AnyQuery) {\n const url = this.host.requestUrl(query);\n const route = this.host\n .routeSegments(entry, query)\n .map((segment) => segment.text)\n .join('');\n const parts = [entry.meta.method, route, url ? this.host.requestPath(url) : null];\n\n return parts.join(' ').toLowerCase();\n }\n}\n","<div #panes class=\"et-query-devtools-master-detail\">\n <div class=\"et-query-devtools-list\">\n <div [class.et-query-devtools-toolbar--filtered]=\"!!host.inspectFilterIds()\" class=\"et-query-devtools-toolbar\">\n <!-- Search leads: it is what the list is narrowed with most of the time. The scope controls sit\n after it, and the count reads as the search's result rather than as one more control. -->\n <div class=\"et-query-devtools-toolbar-row\">\n <input\n #queryFilterInput\n [value]=\"host.queryFilter()\"\n (input)=\"host.queryFilter.set(queryFilterInput.value)\"\n class=\"et-query-devtools-search\"\n type=\"search\"\n placeholder=\"filter method / route / url…\"\n aria-label=\"Filter queries\"\n />\n @if (host.inspectFilterIds(); as ids) {\n <span class=\"et-query-devtools-filter-chip\">\n <span class=\"et-query-devtools-filter-icon\" aria-hidden=\"true\">⌖</span>\n Inspected element\n <span class=\"et-query-devtools-filter-count\">{{ ids.length }}</span>\n </span>\n <button\n (click)=\"host.clearInspectFilter()\"\n class=\"et-query-devtools-filter-clear\"\n type=\"button\"\n title=\"Clear the inspection filter and show all queries\"\n >\n <span aria-hidden=\"true\">✕</span>\n Clear\n </button>\n } @else {\n <select\n #clientSelect\n [value]=\"host.selectedClientName() ?? ''\"\n (change)=\"host.selectClient(clientSelect.value || null)\"\n class=\"et-query-devtools-select\"\n aria-label=\"Client\"\n >\n <option value=\"\">All clients</option>\n @for (name of host.clientNames(); track name) {\n <option [value]=\"name\">{{ name }}</option>\n }\n </select>\n }\n <span class=\"et-query-devtools-count\">\n @if (isQueryListNarrowed()) {\n {{ filteredQueries().length }} of {{ scopedQueryCount() }}\n } @else {\n {{ scopedQueryCount() }}\n }\n </span>\n <button\n [disabled]=\"!filteredQueries().length\"\n (click)=\"downloadInsomniaCollection()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Download the listed queries as an Insomnia collection, with the auth provider's token refresh\"\n >\n <span aria-hidden=\"true\">⤓</span>\n Insomnia\n </button>\n </div>\n\n <div class=\"et-query-devtools-toolbar-row\">\n @let recentFirst = host.queryRecentFirst();\n <div class=\"et-query-devtools-btn-group\">\n <button\n [title]=\"\n (recentFirst ? 'Newest run first.' : 'Oldest run first.') +\n ' Click to reverse. Queries that have never run stay at the bottom either way.'\n \"\n (click)=\"host.queryRecentFirst.set(!recentFirst)\"\n class=\"et-query-devtools-btn et-query-devtools-sort\"\n type=\"button\"\n >\n recent <span aria-hidden=\"true\">{{ recentFirst ? '↓' : '↑' }}</span>\n </button>\n @let treeView = host.queryTreeView();\n <button\n [class.et-query-devtools-btn--active]=\"treeView\"\n [attr.aria-pressed]=\"treeView\"\n [title]=\"\n treeView\n ? 'Grouped by route path. Click for the flat list.'\n : 'Flat list. Click to group by route path - segments nothing branches off are folded into one row.'\n \"\n (click)=\"host.queryTreeView.set(!treeView)\"\n class=\"et-query-devtools-btn et-query-devtools-sort\"\n type=\"button\"\n >\n <span aria-hidden=\"true\">⑂</span> tree\n </button>\n </div>\n <!-- Only the statuses something is actually in. Five chips, four of them reading `0`, were four\n controls that could not be pressed taking up the row that says what is wrong. -->\n @for (facet of visibleFacets(); track facet.id) {\n <button\n [class.et-query-devtools-facet--active]=\"facet.active\"\n [attr.aria-pressed]=\"facet.active\"\n (click)=\"host.toggleFacet(facet.id)\"\n class=\"et-query-devtools-chip et-query-devtools-facet\"\n type=\"button\"\n >\n {{ facet.label }}\n <span class=\"et-query-devtools-facet-count\">{{ facet.count }}</span>\n </button>\n }\n @let goneListed = listedGoneQueries().length;\n @if (goneListed) {\n <button\n (click)=\"forgetGoneQueries()\"\n class=\"et-query-devtools-forget\"\n type=\"button\"\n title=\"Drop the {{ goneListed }} destroyed queries listed below - they cannot be brought back\"\n >\n Forget {{ goneListed }}\n </button>\n }\n @if (isQueryListNarrowed()) {\n <button\n (click)=\"host.clearQueryFilters()\"\n class=\"et-query-devtools-filter-clear\"\n type=\"button\"\n title=\"Clear the search term and the status chips\"\n aria-label=\"Clear filters\"\n >\n <span aria-hidden=\"true\">✕</span>\n </button>\n }\n </div>\n </div>\n\n @if (host.queryTreeView()) {\n @for (row of queryTree(); track row.key) {\n @if (row.kind === 'folder') {\n <div [style.--_et-qdt-tree-depth]=\"row.depth\" class=\"et-query-devtools-row et-query-devtools-row--folder\">\n <button\n [attr.aria-expanded]=\"!row.collapsed\"\n [title]=\"\n (row.collapsed ? 'Expand' : 'Collapse') + ' /' + row.label + ' - ' + row.count + ' queries below it'\n \"\n (click)=\"host.toggleQueryPath(row.key)\"\n class=\"et-query-devtools-row-select\"\n type=\"button\"\n >\n <span class=\"et-query-devtools-row-caret\" aria-hidden=\"true\">{{ row.collapsed ? '▸' : '▾' }}</span>\n <span class=\"et-query-devtools-folder\">/{{ row.label }}</span>\n <span class=\"et-query-devtools-row-count\">{{ row.count }}</span>\n </button>\n </div>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"queryGroupBlock\"\n [ngTemplateOutletContext]=\"{ group: row.item, depth: row.depth, trim: row.parentPath }\"\n />\n }\n } @empty {\n <ng-container [ngTemplateOutlet]=\"emptyList\" />\n }\n } @else {\n @for (group of queryGroups(); track group.key) {\n <ng-container [ngTemplateOutlet]=\"queryGroupBlock\" [ngTemplateOutletContext]=\"{ group, depth: 0, trim: '' }\" />\n } @empty {\n <ng-container [ngTemplateOutlet]=\"emptyList\" />\n }\n }\n\n <!-- An empty scope is a different problem from a filter that matches nothing, and only the\n latter is the user's own doing - so it names the way out. -->\n <ng-template #emptyList>\n @if (scopedQueryCount()) {\n <p class=\"et-query-devtools-empty\">No query matches the filter · {{ scopedQueryCount() }} in scope.</p>\n } @else if (goneQueryCount()) {\n <p class=\"et-query-devtools-empty\">\n No query in scope still exists · pick Gone to list the {{ goneQueryCount() }} destroyed.\n </p>\n } @else if (host.inspectFilterIds()) {\n <p class=\"et-query-devtools-empty\">\n The inspected element's queries are no longer registered. Clear the filter.\n </p>\n } @else {\n <p class=\"et-query-devtools-empty\">No queries registered.</p>\n }\n </ng-template>\n\n <ng-template #queryGroupBlock let-group=\"group\" let-depth=\"depth\" let-trim=\"trim\">\n @if (batchEntryOf(group); as batchEntry) {\n <ng-container\n [ngTemplateOutlet]=\"batchGroupBlock\"\n [ngTemplateOutletContext]=\"{ group, batchEntry, depth, trim }\"\n />\n } @else if (group.items.length === 1) {\n <ng-container [ngTemplateOutlet]=\"queryRow\" [ngTemplateOutletContext]=\"{ item: group.head, depth, trim }\" />\n } @else {\n @let expanded = isGroupExpanded(group);\n @let head = group.head;\n @let groupGone = !!head.entry.destroyedAt;\n <div\n [style.--_et-qdt-tree-depth]=\"depth\"\n [class.et-query-devtools-row--active]=\"holdsSelection(group)\"\n class=\"et-query-devtools-row et-query-devtools-row--group\"\n >\n <!-- The caret is its own control: every row in the fold is the same request, so opening the\n fold and inspecting what it holds are two different intentions. -->\n <button\n [attr.aria-expanded]=\"expanded\"\n [attr.aria-label]=\"\n (expanded ? 'Collapse' : 'Expand') +\n ' the ' +\n group.items.length +\n ' consumers of this query - one registry entry each'\n \"\n [title]=\"\n (expanded ? 'Collapse' : 'Expand') +\n ' the ' +\n group.items.length +\n ' consumers of this query - one registry entry each'\n \"\n (click)=\"host.toggleQueryGroup(group.key)\"\n class=\"et-query-devtools-row-caret-btn\"\n type=\"button\"\n >\n <span class=\"et-query-devtools-row-caret\" aria-hidden=\"true\">{{ expanded ? '▾' : '▸' }}</span>\n </button>\n <button\n (click)=\"selectGroup(group)\"\n class=\"et-query-devtools-row-select\"\n type=\"button\"\n title=\"Inspect this request - all {{\n group.items.length\n }} consumers share it, so any of them answers for it\"\n >\n <span\n [attr.data-status]=\"groupGone ? null : groupStatus(group)\"\n [title]=\"groupGone ? 'destroyed' : groupStatus(group)\"\n class=\"et-query-devtools-status\"\n ></span>\n <span class=\"et-query-devtools-method\">{{ head.entry.meta.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"host.routeSegments(head.entry, head.query)\" [trimPrefix]=\"trim\" />\n </span>\n @if (groupGone) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"These queries no longer exist - what you see is the last state they held, frozen\"\n >\n gone\n </span>\n }\n @if (!groupGone && isGroupStale(group)) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">stale</span>\n }\n @if (isGroupTampered(group)) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--error\"\n title=\"At least one of these is showing an armed response override or a devtools-injected failure\"\n >\n tampered\n </span>\n }\n <span class=\"et-query-devtools-row-count\" title=\"Consumers of this one request\">\n ×{{ group.items.length }}\n </span>\n <span class=\"et-query-devtools-row-time\">{{ host.formatTime(lastExecutedAt(head)) }}</span>\n </button>\n </div>\n @if (expanded) {\n @for (item of group.items; track item.entry.id) {\n <ng-container\n [ngTemplateOutlet]=\"queryRow\"\n [ngTemplateOutletContext]=\"{ item, nested: true, ordinal: $index + 1, depth, trim }\"\n />\n }\n }\n }\n </ng-template>\n\n <!-- A bulk run's items, folded under the run rather than under what a row shows. They only exist\n while in flight - the batch destroys each item's query as it settles - so this row stands for\n the whole run, and the Batches tab is where its settled items are. -->\n <ng-template #batchGroupBlock let-group=\"group\" let-batchEntry=\"batchEntry\" let-depth=\"depth\" let-trim=\"trim\">\n @let batch = host.asBatch(batchEntry);\n @let expanded = isGroupExpanded(group);\n @let toggleLabel =\n (expanded ? 'Collapse' : 'Expand') + ' the ' + group.items.length + ' requests this batch has in flight';\n <div\n [style.--_et-qdt-tree-depth]=\"depth\"\n [class.et-query-devtools-row--active]=\"holdsSelection(group)\"\n class=\"et-query-devtools-row et-query-devtools-row--group\"\n >\n <button\n [attr.aria-expanded]=\"expanded\"\n [attr.aria-label]=\"toggleLabel\"\n [title]=\"toggleLabel\"\n (click)=\"host.toggleQueryGroup(group.key)\"\n class=\"et-query-devtools-row-caret-btn\"\n type=\"button\"\n >\n <span class=\"et-query-devtools-row-caret\" aria-hidden=\"true\">{{ expanded ? '▾' : '▸' }}</span>\n </button>\n <button\n (click)=\"selectGroup(group)\"\n class=\"et-query-devtools-row-select\"\n type=\"button\"\n title=\"One item of a batch run - {{ batch.completed() }} of {{\n batch.total()\n }} settled. The Batches tab has the whole run.\"\n >\n <span\n [attr.data-status]=\"groupStatus(group)\"\n [title]=\"groupStatus(group)\"\n class=\"et-query-devtools-status\"\n ></span>\n <span class=\"et-query-devtools-method\">{{ batchEntry.meta.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"host.batchRouteSegments(batchEntry)\" [trimPrefix]=\"trim\" />\n </span>\n <span\n class=\"et-query-devtools-chip\"\n title=\"Registered by createQueryBatch - inspect the run on the Batches tab\"\n >\n batch {{ batch.completed() }}/{{ batch.total() }}\n </span>\n @if (batch.failed()) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--error\">{{ batch.failed() }} failed</span>\n }\n <span class=\"et-query-devtools-row-count\" title=\"Requests this batch has in flight\">\n ×{{ group.items.length }}\n </span>\n <span class=\"et-query-devtools-row-time\">{{ host.formatTime(lastExecutedAt(group.head)) }}</span>\n </button>\n </div>\n @if (expanded) {\n @for (item of group.items; track item.entry.id) {\n <ng-container\n [ngTemplateOutlet]=\"queryRow\"\n [ngTemplateOutletContext]=\"{ item, nested: true, showRoute: true, depth, trim }\"\n />\n }\n }\n </ng-template>\n\n <ng-template\n #queryRow\n let-item=\"item\"\n let-nested=\"nested\"\n let-showRoute=\"showRoute\"\n let-ordinal=\"ordinal\"\n let-depth=\"depth\"\n let-trim=\"trim\"\n >\n @let isGone = !!item.entry.destroyedAt;\n @let isPinned = host.isQueryPinned(item.entry);\n @let pinLabel = isPinned ? 'Unpin this query' : 'Pin this query to the top of the list';\n <div\n [style.--_et-qdt-tree-depth]=\"depth\"\n [class.et-query-devtools-row--active]=\"host.selectedQueryId() === item.entry.id\"\n [class.et-query-devtools-row--gone]=\"isGone\"\n [class.et-query-devtools-row--nested]=\"nested\"\n class=\"et-query-devtools-row\"\n >\n <button (click)=\"host.selectedQueryId.set(item.entry.id)\" class=\"et-query-devtools-row-select\" type=\"button\">\n <span class=\"et-query-devtools-row-caret\" aria-hidden=\"true\"></span>\n <span\n [attr.data-status]=\"isGone ? null : host.queryStatus(item.query)\"\n [title]=\"isGone ? 'destroyed' : host.queryStatus(item.query)\"\n class=\"et-query-devtools-status\"\n ></span>\n <span class=\"et-query-devtools-method\">{{ item.entry.meta.method }}</span>\n <!-- Inside a fold the route is the fold's own head, repeated once per consumer. Where the query\n was created is the only thing that differs, so that is what the row says instead. A batch\n fold is the exception: its items differ in the route, which is why `showRoute` is set. -->\n @if (nested && !showRoute) {\n <span class=\"et-query-devtools-consumer\">\n @if (consumerLabel(item); as consumer) {\n <{{ consumer }}>\n } @else {\n created outside a component\n }\n </span>\n <span class=\"et-query-devtools-row-count\">#{{ ordinal }}</span>\n } @else {\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"host.routeSegments(item.entry, item.query)\" [trimPrefix]=\"trim\" />\n </span>\n }\n @if (isGone) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"This query no longer exists - what you see is the last state it held, frozen\"\n >\n gone\n </span>\n }\n <!-- A retry is the one thing a loading dot actively misrepresents: it reads as a request\n on its way when nothing is in flight at all. -->\n @if (!isGone && host.requestProgress(item.query)?.retry; as retry) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--loading\"\n title=\"Waiting out a retry backoff before attempt {{ retry.attempt }}\"\n >\n <span class=\"et-query-devtools-retry-glyph\" aria-hidden=\"true\">⟳</span>\n {{ retry.attempt }}\n </span>\n }\n @if (!isGone && host.isStale(item.query)) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">stale</span>\n }\n @if (host.isTampered(item.entry)) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--error\"\n title=\"Showing an armed response override or a devtools-injected failure, not what the server actually sent\"\n >\n tampered\n </span>\n }\n <span class=\"et-query-devtools-row-time\">{{ host.formatTime(lastExecutedAt(item)) }}</span>\n </button>\n <button\n [class.et-query-devtools-row-pin--active]=\"isPinned\"\n [title]=\"pinLabel\"\n [attr.aria-label]=\"pinLabel\"\n [attr.aria-pressed]=\"isPinned\"\n (click)=\"host.toggleQueryPin(item.entry)\"\n class=\"et-query-devtools-row-pin\"\n type=\"button\"\n >\n <span aria-hidden=\"true\">{{ isPinned ? '★' : '☆' }}</span>\n </button>\n </div>\n </ng-template>\n </div>\n\n <div\n (pointerdown)=\"host.startPaneResize($event, { pane: 'list', container: panes })\"\n (dblclick)=\"host.resetPaneSize('list')\"\n class=\"et-query-devtools-pane-resize\"\n title=\"Drag to resize, double-click to reset\"\n aria-hidden=\"true\"\n ></div>\n\n <div class=\"et-query-devtools-detail\">\n @if (host.selectedQuery(); as sel) {\n <et-query-devtools-detail [sel]=\"sel\" />\n } @else {\n <p class=\"et-query-devtools-empty\">Select a query to inspect it.</p>\n }\n </div>\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n/**\n * The expandable step/item row shared by the Sequences and Batches tabs, as a styles-only component each\n * of them mounts. It cannot live in either tab's own stylesheet: a tab's CSS is injected when that tab is\n * first opened, so the Batches tab would render unstyled rows until Sequences had been visited.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-step-styles',\n template: '',\n styleUrl: './query-devtools-step-styles.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsStepStylesComponent {}\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { injectStyleManager } from '@ethlete/core';\nimport { AnyQueryBatchItemResult } from '@ethlete/query';\nimport { QueryDevtoolsDrawerComponent } from './query-devtools-drawer.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\nimport { QueryDevtoolsRouteComponent } from './query-devtools-route.component';\nimport { QueryDevtoolsStepStylesComponent } from './query-devtools-step-styles.component';\n\n/** The Batches tab: registered `createQueryBatch` runs, their progress and every item's outcome. */\n@Component({\n selector: 'et-query-devtools-batches-tab',\n templateUrl: './query-devtools-batches-tab.component.html',\n styleUrl: './query-devtools-batches-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsDrawerComponent, QueryDevtoolsJsonComponent, QueryDevtoolsRouteComponent],\n})\nexport class QueryDevtoolsBatchesTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n constructor() {\n injectStyleManager().mount(QueryDevtoolsStepStylesComponent);\n }\n\n /**\n * The dot an item's outcome gets. Skipped and not-attempted items share the neutral one: neither\n * reached the API, and a red dot for either would read as something the run has to recover from.\n */\n protected itemStatus(result: AnyQueryBatchItemResult) {\n return result.status === 'success' || result.status === 'error' ? result.status : null;\n }\n\n /** Whether the item was actually sent, which is what decides it has an in/out worth rendering. */\n protected wasSent(result: AnyQueryBatchItemResult) {\n return result.status === 'success' || result.status === 'error';\n }\n\n protected itemArgs(result: AnyQueryBatchItemResult) {\n return this.wasSent(result) ? (result as { args: unknown }).args : null;\n }\n\n protected itemResponse(result: AnyQueryBatchItemResult) {\n return result.status === 'success' ? result.response : null;\n }\n\n /** The error body of a failed item, as the value explorer wants it. */\n protected itemError(result: AnyQueryBatchItemResult) {\n if (result.status !== 'error') return null;\n\n return { status: result.error.raw.status, body: result.error.isList ? result.error.errors : result.error.error };\n }\n}\n","<div #panes class=\"et-query-devtools-split\">\n <div class=\"et-query-devtools-scroll\">\n @for (entry of host.batchEntries(); track entry.id) {\n @let batch = host.asBatch(entry);\n @if (batch) {\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <span class=\"et-query-devtools-chip\">batch</span>\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">{{ batch.status() }}</span>\n <span class=\"et-query-devtools-method\">{{ entry.meta.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"host.batchRouteSegments(entry)\" fallback=\"no route\" />\n </span>\n <span class=\"et-query-devtools-count\">{{ batch.completed() }} / {{ batch.total() }}</span>\n </div>\n\n <div class=\"et-query-devtools-batch-bar\" role=\"presentation\">\n <!-- Coloured by the run, not by whether an item failed: a bar filled red end to end reads as\n \"nothing landed\", which is the opposite of what a partial run means. -->\n <span\n [style.inline-size.%]=\"batch.progress()\"\n [attr.data-status]=\"batch.status()\"\n class=\"et-query-devtools-batch-bar-fill\"\n ></span>\n </div>\n\n <dl class=\"et-query-devtools-meta\">\n <dt>Outcomes</dt>\n <dd>\n @if (batch.total()) {\n {{ batch.succeeded() }} ok\n @if (batch.failed()) {\n · <span class=\"et-query-devtools-batch-failed\">{{ batch.failed() }} failed</span>\n }\n @if (batch.skipped()) {\n · {{ batch.skipped() }} skipped\n }\n @let notAttempted = batch.total() - batch.completed();\n @if (!batch.running() && notAttempted) {\n · {{ notAttempted }} not attempted\n }\n } @else {\n — never run\n }\n </dd>\n\n <dt>Throughput</dt>\n <dd>\n @if (host.batchThroughput(batch); as throughput) {\n {{ throughput }}\n } @else if (batch.running()) {\n measuring…\n } @else if (batch.total()) {\n <span title=\"A rate needs the first `concurrency` items and a couple of seconds of run time\">\n run too short to measure\n </span>\n } @else {\n —\n }\n </dd>\n\n <dt>In flight</dt>\n <dd>\n {{ batch.inFlight() }} of {{ entry.meta.concurrency }} concurrent\n @if (entry.meta.stopOnError) {\n · stops on the first failure\n }\n </dd>\n </dl>\n\n <!-- Only what is in flight: the batch destroys an item's query the moment it settles, so a\n settled item is in the list below instead of here. -->\n @let inFlight = host.queriesForBatch(entry);\n @if (inFlight.length) {\n <h5 class=\"et-query-devtools-section\">In flight</h5>\n <ul class=\"et-query-devtools-step-list\">\n @for (link of inFlight; track link.id) {\n <li>\n <button\n [class.et-query-devtools-inner-row--active]=\"host.batchSelectedQueryId() === link.id\"\n (click)=\"host.batchSelectedQueryId.set(link.id)\"\n class=\"et-query-devtools-inner-row\"\n type=\"button\"\n >\n <span class=\"et-query-devtools-status\" data-status=\"loading\"></span>\n <span class=\"et-query-devtools-method\">{{ link.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"link.segments\" fallback=\"in flight\" />\n </span>\n </button>\n </li>\n }\n </ul>\n }\n\n @let items = host.batchItems(entry);\n @if (items.rows.length) {\n <h5 class=\"et-query-devtools-section\">\n Items\n @if (items.hidden) {\n <span class=\"et-query-devtools-count\" title=\"Failures are listed first, so the cap never drops one\">\n {{ items.rows.length }} of {{ items.total }} · {{ items.hidden }} not listed\n </span>\n } @else {\n <span class=\"et-query-devtools-count\">{{ items.total }}</span>\n }\n </h5>\n\n <ol class=\"et-query-devtools-step-list\">\n @for (row of items.rows; track row.result.index) {\n @let result = row.result;\n @let expanded = host.isBatchItemExpanded(entry.id, result.index);\n @let itemQueryId = host.batchItemQueryId(entry, result.index);\n <li [attr.data-status]=\"itemStatus(result)\" class=\"et-query-devtools-step-item\">\n <div class=\"et-query-devtools-step-head\">\n <!-- The row opens the item's own query in the drawer, the way a sequence step does.\n Disabled once that query has fallen out of the batch's capped tombstone tail -\n the caret below still has this item's args and outcome either way. -->\n <button\n [class.et-query-devtools-inner-row--active]=\"\n !!itemQueryId && host.batchSelectedQueryId() === itemQueryId\n \"\n [disabled]=\"!itemQueryId\"\n [title]=\"\n itemQueryId\n ? 'Inspect this item\\'s request'\n : 'This item\\'s query is no longer kept - open the row for its args and outcome'\n \"\n (click)=\"host.batchSelectedQueryId.set(itemQueryId)\"\n class=\"et-query-devtools-inner-row\"\n type=\"button\"\n >\n <span\n [attr.data-status]=\"itemStatus(result)\"\n [title]=\"result.status\"\n class=\"et-query-devtools-status\"\n ></span>\n <span class=\"et-query-devtools-method\">#{{ result.index }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"row.segments\" fallback=\"not sent\" />\n </span>\n <!-- The dot already says success or error; only an item that never went out needs\n a word, since a neutral dot alone cannot tell the two reasons apart. -->\n @if (!wasSent(result)) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">{{ result.status }}</span>\n }\n </button>\n <button\n [attr.aria-expanded]=\"expanded\"\n (click)=\"host.toggleBatchItem(entry.id, result.index)\"\n class=\"et-query-devtools-step-caret-btn\"\n type=\"button\"\n title=\"Toggle in / out\"\n >\n {{ expanded ? '▾' : '▸' }}\n </button>\n </div>\n\n @if (expanded) {\n <div class=\"et-query-devtools-step-io\">\n <h5 class=\"et-query-devtools-section\">Item</h5>\n <et-query-devtools-json [value]=\"result.item\" />\n\n @if (wasSent(result)) {\n <h5 class=\"et-query-devtools-section\">In · args</h5>\n <et-query-devtools-json [value]=\"itemArgs(result)\" />\n\n @if (itemError(result); as error) {\n <h5 class=\"et-query-devtools-section\">Out · error ({{ error.status }})</h5>\n <et-query-devtools-json [value]=\"error.body\" />\n } @else {\n <h5 class=\"et-query-devtools-section\">Out · response</h5>\n <et-query-devtools-json [value]=\"itemResponse(result)\" />\n }\n } @else {\n <p class=\"et-query-devtools-empty\">\n @if (result.status === 'skipped') {\n The args function returned null, so nothing was sent.\n } @else {\n Still queued when the run stopped - nothing was sent.\n }\n </p>\n }\n </div>\n }\n </li>\n }\n </ol>\n }\n </div>\n }\n } @empty {\n <p class=\"et-query-devtools-empty\">No batches registered.</p>\n }\n </div>\n\n <et-query-devtools-drawer\n [sel]=\"host.batchSelectedQuery()\"\n [container]=\"panes\"\n (dismiss)=\"host.batchSelectedQueryId.set(null)\"\n />\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { injectStyleManager } from '@ethlete/core';\nimport { QueryDevtoolsDrawerComponent } from './query-devtools-drawer.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\nimport { QueryDevtoolsRouteComponent } from './query-devtools-route.component';\nimport { QueryDevtoolsStepStylesComponent } from './query-devtools-step-styles.component';\n\n/** The Sequences tab: registered `QuerySequence` instances, step-by-step, with a split-view drawer. */\n@Component({\n selector: 'et-query-devtools-sequences-tab',\n templateUrl: './query-devtools-sequences-tab.component.html',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsDrawerComponent, QueryDevtoolsJsonComponent, QueryDevtoolsRouteComponent],\n})\nexport class QueryDevtoolsSequencesTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n constructor() {\n injectStyleManager().mount(QueryDevtoolsStepStylesComponent);\n }\n}\n","<div #panes class=\"et-query-devtools-split\">\n <div class=\"et-query-devtools-scroll\">\n @for (entry of host.sequenceEntries(); track entry.id) {\n @let sequence = host.asSequence(entry);\n @if (sequence) {\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <span class=\"et-query-devtools-chip\">sequence</span>\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">{{ sequence.status() }}</span>\n <span class=\"et-query-devtools-count\">step {{ sequence.currentStep() }} / {{ sequence.total }}</span>\n </div>\n\n <dl class=\"et-query-devtools-meta\">\n <dt>Traffic</dt>\n <dd>\n @let activity = host.sequenceActivity(sequence);\n @if (activity.hasActivity) {\n {{ activity.stats.requests }} request{{ activity.stats.requests === 1 ? '' : 's' }} · ↓\n {{ host.formatTransferred(activity.stats.receivedBytes, activity.stats.hasEstimatedBytes) }}\n @if (activity.stats.sentBytes) {\n · ↑ {{ host.formatTransferred(activity.stats.sentBytes, activity.stats.hasEstimatedBytes) }}\n }\n @if (activity.cacheServed) {\n · {{ activity.cacheServed }} from cache\n }\n @if (activity.stats.errors) {\n · {{ activity.stats.errors }} failed\n }\n } @else {\n —\n }\n </dd>\n </dl>\n\n <ol class=\"et-query-devtools-step-list\">\n @for (link of host.queriesForSequence(sequence); track $index; let i = $index) {\n <li [attr.data-status]=\"host.sequenceStepStatus(sequence, i)\" class=\"et-query-devtools-step-item\">\n <div class=\"et-query-devtools-step-head\">\n <button\n [class.et-query-devtools-inner-row--active]=\"host.sequenceSelectedQueryId() === link.id\"\n [disabled]=\"!link.id\"\n (click)=\"host.sequenceSelectedQueryId.set(link.id)\"\n class=\"et-query-devtools-inner-row\"\n type=\"button\"\n >\n <span\n [attr.data-status]=\"host.sequenceStepStatus(sequence, i)\"\n class=\"et-query-devtools-status\"\n ></span>\n <span class=\"et-query-devtools-method\">{{ i + 1 }}. {{ link.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"link.segments\" [fallback]=\"'step ' + (i + 1)\" />\n </span>\n </button>\n <button\n [attr.aria-expanded]=\"host.isStepExpanded(entry.id, i)\"\n (click)=\"host.toggleStep(entry.id, i)\"\n class=\"et-query-devtools-step-caret-btn\"\n type=\"button\"\n title=\"Toggle in / out\"\n >\n {{ host.isStepExpanded(entry.id, i) ? '▾' : '▸' }}\n </button>\n </div>\n\n @if (host.isStepExpanded(entry.id, i)) {\n @let snap = host.stepSnapshot(sequence, i);\n <div class=\"et-query-devtools-step-io\">\n <h5 class=\"et-query-devtools-section\">In · args</h5>\n @if (sequence.stepArgs().length > i) {\n <et-query-devtools-json [value]=\"sequence.stepArgs()[i]\" />\n } @else {\n <p class=\"et-query-devtools-empty\">Not run yet.</p>\n }\n\n @if (snap?.error(); as error) {\n <h5 class=\"et-query-devtools-section\">Out · error ({{ error.raw.status }})</h5>\n <et-query-devtools-json [value]=\"error.isList ? error.errors : error.error\" />\n } @else {\n <h5 class=\"et-query-devtools-section\">Out · response</h5>\n @if (snap) {\n <et-query-devtools-json [value]=\"snap.response()\" />\n } @else {\n <p class=\"et-query-devtools-empty\">Not run yet.</p>\n }\n }\n </div>\n }\n </li>\n }\n </ol>\n </div>\n }\n } @empty {\n <p class=\"et-query-devtools-empty\">No sequences registered.</p>\n }\n </div>\n\n <et-query-devtools-drawer\n [sel]=\"host.sequenceSelectedQuery()\"\n [container]=\"panes\"\n (dismiss)=\"host.sequenceSelectedQueryId.set(null)\"\n />\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\n\n/** The Sockets tab: registered `WebSocketDevtoolsHandle`s, their rooms, and a message log per client. */\n@Component({\n selector: 'et-query-devtools-sockets-tab',\n templateUrl: './query-devtools-sockets-tab.component.html',\n styleUrl: './query-devtools-sockets-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsJsonComponent],\n})\nexport class QueryDevtoolsSocketsTabComponent {\n protected host = injectQueryDevtoolsHost();\n}\n","<div class=\"et-query-devtools-scroll\">\n @if (host.wsEntries().length) {\n <div class=\"et-query-devtools-toolbar\">\n <div class=\"et-query-devtools-toolbar-row\">\n <input\n #socketFilterInput\n [value]=\"host.socketFilter()\"\n (input)=\"host.socketFilter.set(socketFilterInput.value)\"\n class=\"et-query-devtools-search\"\n type=\"search\"\n placeholder=\"filter event / room / direction…\"\n aria-label=\"Filter socket messages\"\n />\n @if (host.socketFilter()) {\n <button\n (click)=\"host.socketFilter.set('')\"\n class=\"et-query-devtools-filter-clear\"\n type=\"button\"\n title=\"Clear the message filter\"\n aria-label=\"Clear the message filter\"\n >\n <span aria-hidden=\"true\">✕</span>\n </button>\n }\n </div>\n </div>\n }\n\n @for (entry of host.wsEntries(); track entry.id) {\n @let ws = host.asWs(entry);\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>{{ entry.meta.name || 'socket' }}</strong>\n <span\n [class.et-query-devtools-chip--success]=\"ws.connected()\"\n [class.et-query-devtools-chip--muted]=\"!ws.connected()\"\n class=\"et-query-devtools-chip\"\n >\n {{ ws.connected() ? 'connected' : 'disconnected' }}\n </span>\n </div>\n <dl class=\"et-query-devtools-meta\">\n <dt>URL</dt>\n <dd class=\"et-query-devtools-mono\">{{ entry.meta.url }}</dd>\n <dt>Rooms</dt>\n <dd>\n @if (ws.rooms().length) {\n <div class=\"et-query-devtools-chips\">\n @for (room of ws.rooms(); track room) {\n <span class=\"et-query-devtools-chip\">{{ room }}</span>\n }\n </div>\n } @else {\n none\n }\n </dd>\n </dl>\n\n <div class=\"et-query-devtools-section-row\">\n <h5 class=\"et-query-devtools-section\">Emit</h5>\n <span class=\"et-query-devtools-hint\">\n Sends as the app would, so a server that only answers a client that asked can be provoked from here.\n </span>\n </div>\n <div class=\"et-query-devtools-emit\">\n <input #emitEvent class=\"et-query-devtools-input\" type=\"text\" placeholder=\"event\" aria-label=\"Event to emit\" />\n <input\n #emitData\n class=\"et-query-devtools-input\"\n type=\"text\"\n placeholder=\"JSON payload (optional)\"\n aria-label=\"Payload to emit\"\n />\n <button\n (click)=\"host.emitSocketMessage({ entry, event: emitEvent.value, data: emitData.value })\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n ↑ Send\n </button>\n </div>\n @if (host.socketEmitErrorFor(entry.id); as emitError) {\n <p class=\"et-query-devtools-editor-error\">{{ emitError }}</p>\n }\n\n @let messages = host.socketMessages(ws);\n <div class=\"et-query-devtools-section-row\">\n <h5 class=\"et-query-devtools-section\">Messages</h5>\n <span class=\"et-query-devtools-count\">\n @if (host.socketFilter()) {\n {{ messages.length }} of {{ ws.messages().length }}\n } @else {\n {{ messages.length }}\n }\n </span>\n </div>\n @for (message of messages; track message.id) {\n <div [attr.data-direction]=\"message.direction\" class=\"et-query-devtools-ws-message\">\n <div class=\"et-query-devtools-card-head\">\n <span class=\"et-query-devtools-count\">{{ host.formatTime(message.timestamp) }}</span>\n <span class=\"et-query-devtools-ws-direction\">{{ host.socketDirectionLabel(message) }}</span>\n @if (message.room) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">{{ message.room }}</span>\n }\n <span class=\"et-query-devtools-method\">{{ message.event }}</span>\n </div>\n @if (message.data !== undefined) {\n <et-query-devtools-json [value]=\"message.data\" />\n }\n </div>\n } @empty {\n @if (ws.messages().length) {\n <p class=\"et-query-devtools-empty\">No message matches the filter · {{ ws.messages().length }} in the log.</p>\n } @else {\n <p class=\"et-query-devtools-empty\">Nothing sent or received yet.</p>\n }\n }\n </div>\n } @empty {\n <p class=\"et-query-devtools-empty\">No web socket clients registered.</p>\n }\n</div>\n","import { NgTemplateOutlet } from '@angular/common';\nimport { Component, ViewEncapsulation } from '@angular/core';\nimport { AnyPagedQueryStack, AnyQueryStack } from '@ethlete/query';\nimport { QueryDevtoolsDrawerComponent } from './query-devtools-drawer.component';\nimport { QueryDevtoolsFeaturesComponent } from './query-devtools-features.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsRouteComponent } from './query-devtools-route.component';\n\n/** The Stacks tab: registered `QueryStack`/`PagedQueryStack` instances, each with a split-view drawer. */\n@Component({\n selector: 'et-query-devtools-stacks-tab',\n templateUrl: './query-devtools-stacks-tab.component.html',\n styleUrl: './query-devtools-stacks-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [\n NgTemplateOutlet,\n QueryDevtoolsDrawerComponent,\n QueryDevtoolsFeaturesComponent,\n QueryDevtoolsRouteComponent,\n ],\n})\nexport class QueryDevtoolsStacksTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n /** Identifying info for a stack, derived from its (uniform) inner queries. */\n protected stackIdentity(stack: AnyQueryStack | AnyPagedQueryStack) {\n const first = this.host.queriesForStack(stack)[0];\n\n return { method: first?.method ?? '', segments: first?.segments ?? [], baseUrl: first?.clientBaseUrl ?? '' };\n }\n}\n","<div #panes class=\"et-query-devtools-split\">\n <div class=\"et-query-devtools-scroll\">\n @for (entry of host.stackEntries(); track entry.id) {\n @if (entry.kind === 'paged-query-stack') {\n @let paged = host.asPagedStack(entry);\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <span class=\"et-query-devtools-chip\">paged stack</span>\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">{{ paged.direction() }}</span>\n @if (paged.loading()) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--loading\">loading</span>\n }\n </div>\n\n @let pagedId = stackIdentity(paged);\n <div class=\"et-query-devtools-card-title\">\n <span class=\"et-query-devtools-method\">{{ pagedId.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"pagedId.segments\" />\n </span>\n </div>\n <div class=\"et-query-devtools-card-sub et-query-devtools-mono\">{{ pagedId.baseUrl }}</div>\n @if (entry.meta.features?.length) {\n <et-query-devtools-features [features]=\"entry.meta.features ?? []\" />\n }\n\n <dl class=\"et-query-devtools-meta\">\n <dt>Pages loaded</dt>\n <dd>{{ paged.queries().length }}</dd>\n <dt>Items</dt>\n <dd>{{ paged.items().length }}</dd>\n <dt>First page loaded</dt>\n <dd>{{ paged.isFirstPageLoaded() }}</dd>\n <dt>Last page loaded</dt>\n <dd>{{ paged.isLastPageLoaded() }}</dd>\n <ng-container *ngTemplateOutlet=\"activityRow; context: { activity: host.stackActivity(paged) }\" />\n </dl>\n <ng-container *ngTemplateOutlet=\"innerQueries; context: { links: host.queriesForStack(paged) }\" />\n </div>\n } @else {\n @let stack = host.asStack(entry);\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <span class=\"et-query-devtools-chip\">stack</span>\n @if (stack.anyLoading()) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--loading\">loading</span>\n }\n @if (stack.anyError()) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--error\">error</span>\n }\n </div>\n\n @let stackId = stackIdentity(stack);\n <div class=\"et-query-devtools-card-title\">\n <span class=\"et-query-devtools-method\">{{ stackId.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"stackId.segments\" />\n </span>\n </div>\n <div class=\"et-query-devtools-card-sub et-query-devtools-mono\">{{ stackId.baseUrl }}</div>\n @if (entry.meta.features?.length) {\n <et-query-devtools-features [features]=\"entry.meta.features ?? []\" />\n }\n\n <dl class=\"et-query-devtools-meta\">\n <dt>Queries</dt>\n <dd>{{ stack.queries().length }}</dd>\n <dt>Loading</dt>\n <dd>{{ stack.loadingProgress().loaded }} / {{ stack.loadingProgress().total }}</dd>\n <dt>Errors</dt>\n <dd>{{ stack.errors().length }}</dd>\n <ng-container *ngTemplateOutlet=\"activityRow; context: { activity: host.stackActivity(stack) }\" />\n </dl>\n <ng-container *ngTemplateOutlet=\"innerQueries; context: { links: host.queriesForStack(stack) }\" />\n </div>\n }\n } @empty {\n <p class=\"et-query-devtools-empty\">No stacks registered.</p>\n }\n </div>\n\n <et-query-devtools-drawer\n [sel]=\"host.stackSelectedQuery()\"\n [container]=\"panes\"\n (dismiss)=\"host.stackSelectedQueryId.set(null)\"\n />\n</div>\n\n<!-- Reusable dt/dd pair for a card's `et-query-devtools-meta` list: what its queries ran and moved. -->\n<ng-template #activityRow let-activity=\"activity\">\n <dt>Traffic</dt>\n <dd>\n @if (activity.hasActivity) {\n {{ activity.stats.requests }} request{{ activity.stats.requests === 1 ? '' : 's' }} · ↓\n {{ host.formatTransferred(activity.stats.receivedBytes, activity.stats.hasEstimatedBytes) }}\n @if (activity.stats.sentBytes) {\n · ↑ {{ host.formatTransferred(activity.stats.sentBytes, activity.stats.hasEstimatedBytes) }}\n }\n @if (activity.cacheServed) {\n · {{ activity.cacheServed }} from cache\n }\n @if (activity.stats.errors) {\n · {{ activity.stats.errors }} failed\n }\n } @else {\n —\n }\n </dd>\n</ng-template>\n\n<!-- Reusable inner-query list — clicking opens the split-view drawer, not a tab switch. -->\n<ng-template #innerQueries let-links=\"links\">\n <div class=\"et-query-devtools-inner-queries\">\n @for (link of links; track $index) {\n <button\n [class.et-query-devtools-inner-row--active]=\"host.stackSelectedQueryId() === link.id\"\n [disabled]=\"!link.id\"\n (click)=\"host.stackSelectedQueryId.set(link.id)\"\n class=\"et-query-devtools-inner-row\"\n type=\"button\"\n >\n <span [attr.data-status]=\"host.queryStatus(link.query)\" class=\"et-query-devtools-status\"></span>\n <span class=\"et-query-devtools-method\">{{ link.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"link.segments\" [fallback]=\"link.query.id() || 'query ' + ($index + 1)\" />\n </span>\n @let linkStats = host.linkActivity(link);\n @if (linkStats.hasActivity) {\n <span class=\"et-query-devtools-traffic\">\n {{ host.formatTransferred(linkStats.stats.receivedBytes, linkStats.stats.hasEstimatedBytes) }}\n </span>\n }\n </button>\n }\n </div>\n</ng-template>\n","import { Component, computed, ViewEncapsulation } from '@angular/core';\nimport { injectStyleManager } from '@ethlete/core';\nimport { QueryDevtoolsEntry, QueryDevtoolsRun } from '@ethlete/query';\nimport { QueryDevtoolsDrawerComponent } from './query-devtools-drawer.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsTimelineStylesComponent } from './query-devtools-timeline-styles.component';\nimport { AnyQuery, Timeline, TimelineRow } from './query-devtools-types';\n\n/** Past this many rows, the timeline keeps the newest and counts the rest instead of drawing them. */\nconst MAX_TIMELINE_ROWS = 200;\n\n/** Where the timeline's axis labels sit, as fractions of the window. */\nconst TIMELINE_TICKS = [0, 0.25, 0.5, 0.75, 1];\n\n/** The Timeline tab: every scoped query's runs laid out on one shared axis, so overlap and chains show. */\n@Component({\n selector: 'et-query-devtools-timeline-tab',\n templateUrl: './query-devtools-timeline-tab.component.html',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsDrawerComponent],\n})\nexport class QueryDevtoolsTimelineTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n /**\n * Every run the scoped queries have recorded, oldest first. The client picker and the inspection\n * filter narrow the timeline the same way they narrow the Queries list.\n */\n private scopedRuns = computed(() => {\n const collected: { entry: QueryDevtoolsEntry; run: QueryDevtoolsRun }[] = [];\n\n for (const entry of this.host.scopedQueries()) {\n for (const run of entry.stats?.runs() ?? []) collected.push({ entry, run });\n }\n\n return collected.sort((a, b) => a.run.startedAt - b.run.startedAt);\n });\n\n /**\n * Every scoped run laid out on one axis, so a stampede reads as overlapping bars and a chain as a\n * staircase - which is what the Events tab's flat list of wall-clock times cannot show.\n */\n protected timeline = computed<Timeline>(() => {\n const collected = this.scopedRuns();\n const hidden = Math.max(0, collected.length - MAX_TIMELINE_ROWS);\n const shown = hidden ? collected.slice(hidden) : collected;\n const first = shown[0];\n\n if (!first) return { rows: [], startedAt: 0, windowMs: 0, hidden: 0 };\n\n // A run in flight has no end yet, so the window has to grow with the clock - otherwise its bar would\n // freeze at the width it happened to be built with, the same trap `isStale` documents.\n if (shown.some(({ run }) => run.endedAt === null)) this.host.clock();\n\n const now = Date.now();\n const startedAt = first.run.startedAt;\n const endedAt = shown.reduce((latest, { run }) => Math.max(latest, run.endedAt ?? now), startedAt);\n const windowMs = Math.max(1, endedAt - startedAt);\n\n const rows = shown.map(({ entry, run }): TimelineRow => {\n const url = run.url ?? this.host.requestUrl(entry.handle as AnyQuery);\n\n return {\n key: `${entry.id}:${run.index}`,\n entryId: entry.id,\n method: entry.meta.method ?? '',\n path: url ? this.host.requestPath(url) : (entry.meta.route ?? ''),\n run,\n leftPct: ((run.startedAt - startedAt) / windowMs) * 100,\n // An instant run - a cache entry filled by a poll or by another consumer - still needs a sliver\n // of width to be visible at all.\n widthPct: Math.max(0.4, (((run.endedAt ?? now) - run.startedAt) / windowMs) * 100),\n durationMs: run.endedAt === null ? null : run.endedAt - run.startedAt,\n };\n });\n\n return { rows, startedAt, windowMs, hidden };\n });\n\n /** Axis labels for the timeline, as offsets from the window's start. */\n protected timelineTicks = computed(() => {\n const { windowMs, rows } = this.timeline();\n\n if (!rows.length) return [];\n\n return TIMELINE_TICKS.map((fraction) => ({\n pct: fraction * 100,\n label: this.host.formatDuration(Math.round(windowMs * fraction)),\n }));\n });\n\n constructor() {\n // The waterfall's grid lays out nothing else in the panel, so its rules arrive with the tab - and\n // this component only exists while the tab is open, so mounting unconditionally here is enough.\n injectStyleManager().mount(QueryDevtoolsTimelineStylesComponent);\n }\n\n /** The same reset the drawer's Activity section offers, for every query the timeline covers. */\n protected resetTimeline() {\n for (const entry of this.host.scopedQueries()) entry.stats?.reset();\n\n this.host.diffRunIndex.set(null);\n this.host.diffBaseRunIndex.set(null);\n }\n\n protected selectTimelineRow(row: TimelineRow) {\n this.host.timelineSelectedQueryId.set(row.entryId);\n }\n}\n","@let tl = timeline();\n<div #panes class=\"et-query-devtools-split\">\n <div class=\"et-query-devtools-pane\">\n <div class=\"et-query-devtools-toolbar\">\n <div class=\"et-query-devtools-toolbar-row\">\n @if (host.inspectFilterIds(); as ids) {\n <span class=\"et-query-devtools-filter-chip\">\n <span class=\"et-query-devtools-filter-icon\" aria-hidden=\"true\">⌖</span>\n Inspected element\n <span class=\"et-query-devtools-filter-count\">{{ ids.length }}</span>\n </span>\n } @else {\n <label class=\"et-query-devtools-field\">\n <span>Client</span>\n <select\n #timelineClientSelect\n [value]=\"host.selectedClientName() ?? ''\"\n (change)=\"host.selectClient(timelineClientSelect.value || null)\"\n class=\"et-query-devtools-select\"\n >\n <option value=\"\">All clients</option>\n @for (name of host.clientNames(); track name) {\n <option [value]=\"name\">{{ name }}</option>\n }\n </select>\n </label>\n }\n <span class=\"et-query-devtools-count\">\n {{ tl.rows.length }} run{{ tl.rows.length === 1 ? '' : 's' }}\n @if (tl.hidden) {\n · {{ tl.hidden }} older not shown\n }\n @if (tl.rows.length) {\n · over {{ host.formatDuration(tl.windowMs) }} from {{ host.formatTime(tl.startedAt) }}\n }\n </span>\n <button\n [disabled]=\"!tl.rows.length\"\n (click)=\"resetTimeline()\"\n class=\"et-query-devtools-btn et-query-devtools-toolbar-btn\"\n type=\"button\"\n title=\"Clear the run history and the counters of every listed query\"\n >\n ⟲ Reset\n </button>\n </div>\n </div>\n\n @if (tl.rows.length) {\n <div class=\"et-query-devtools-scroll\">\n <div class=\"et-query-devtools-timeline\">\n <div class=\"et-query-devtools-timeline-axis\">\n <span class=\"et-query-devtools-timeline-ticks\">\n @for (tick of timelineTicks(); track tick.pct) {\n <span [style.left.%]=\"tick.pct\" class=\"et-query-devtools-timeline-tick\">{{ tick.label }}</span>\n }\n </span>\n </div>\n\n @for (row of tl.rows; track row.key) {\n <button\n [class.et-query-devtools-timeline-row--active]=\"host.timelineSelectedQueryId() === row.entryId\"\n (click)=\"selectTimelineRow(row)\"\n class=\"et-query-devtools-timeline-row\"\n type=\"button\"\n title=\"{{ row.method }} {{ row.path }} · run {{ row.run.index }} · {{ row.run.status }}\"\n >\n <span class=\"et-query-devtools-timeline-label\">\n <span class=\"et-query-devtools-method\">{{ row.method }}</span>\n <span class=\"et-query-devtools-url\">{{ row.path }}</span>\n </span>\n <span class=\"et-query-devtools-timeline-track\">\n <span\n [attr.data-status]=\"host.runStatus(row.run)\"\n [style.left.%]=\"row.leftPct\"\n [style.width.%]=\"row.widthPct\"\n class=\"et-query-devtools-timeline-bar\"\n ></span>\n </span>\n <span class=\"et-query-devtools-timeline-duration\">\n @if (row.durationMs === null) {\n in flight\n } @else {\n {{ host.formatDuration(row.durationMs) }}\n }\n </span>\n <span class=\"et-query-devtools-timeline-size\">\n @if (row.run.receivedBytes) {\n {{ host.formatBytes(row.run.receivedBytes) }}\n }\n </span>\n <span class=\"et-query-devtools-timeline-flags\">\n @if (row.run.attempts > 1) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--loading\"\n title=\"Took {{\n row.run.attempts\n }} attempts - so this bar is mostly retry backoff, not one slow round trip\"\n >\n <span class=\"et-query-devtools-retry-glyph\" aria-hidden=\"true\">⟳</span>\n {{ row.run.attempts }}\n </span>\n }\n @if (!row.run.didRequest) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"Arrived without a request of this query's own - a poll, another consumer of the same cache entry, or another tab\"\n >\n shared\n </span>\n }\n @if (row.run.status === 'aborted') {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"The query requested again before this run's response arrived\"\n >\n aborted\n </span>\n }\n </span>\n </button>\n }\n </div>\n </div>\n } @else {\n <p class=\"et-query-devtools-empty\">\n No requests recorded yet. Every request a listed query makes shows up here as a bar.\n </p>\n }\n </div>\n\n <et-query-devtools-drawer\n [sel]=\"host.timelineSelectedQuery()\"\n [container]=\"panes\"\n (dismiss)=\"host.timelineSelectedQueryId.set(null)\"\n />\n</div>\n","import { QueryDevtoolsAbout } from '@ethlete/query';\n\n/**\n * How deep a value is walked before it is replaced by a marker, and how much of a long string or a long\n * array survives. A report is read by a person, so a 5000-item list is worth two entries and a count.\n */\nconst MAX_DEPTH = 6;\nconst MAX_STRING = 200;\nconst MAX_ARRAY_ITEMS = 2;\n\n/**\n * Slims a value for a shareable report: long strings are truncated and long arrays keep only the first\n * couple of entries, replacing the repetitive tail with a `… (N more)` marker, so a big response\n * collapses to a representative sample.\n */\nexport const slimForReport = (value: unknown, depth = 0): unknown => {\n if (typeof value === 'string') return value.length > MAX_STRING ? `${value.slice(0, MAX_STRING)}…` : value;\n if (depth > MAX_DEPTH) return '…';\n\n if (Array.isArray(value)) {\n if (value.length > MAX_ARRAY_ITEMS + 1) {\n return [\n ...value.slice(0, MAX_ARRAY_ITEMS).map((entry) => slimForReport(entry, depth + 1)),\n `… (${value.length - MAX_ARRAY_ITEMS} more)`,\n ];\n }\n\n return value.map((entry) => slimForReport(entry, depth + 1));\n }\n\n if (value && typeof value === 'object') {\n const out: Record<string, unknown> = {};\n for (const [key, entry] of Object.entries(value)) out[key] = slimForReport(entry, depth + 1);\n\n return out;\n }\n\n return value;\n};\n\n/** One query client, as the export accounts for it. */\nexport type SessionExportClient = {\n name: string;\n baseUrl: string;\n\n /** How many entries the client's repository holds, and how many of those have no consumer left. */\n cacheEntries: number;\n unusedCacheEntries: number;\n\n /** The measured size of everything in that cache. */\n cacheBytes: number;\n\n /** How many responses the client has on disk, or `null` for a client without persistence. */\n persistedEntries: number | null;\n\n features: string[];\n};\n\n/**\n * One registered entry - a query, stack, sequence, form, auth provider or socket. Everything past `kind`\n * is optional because it is filled in per kind: only a query has runs, only a socket has messages.\n */\nexport type SessionExportEntry = {\n id: string;\n kind: string;\n name?: string | null;\n client?: string | null;\n method?: string | null;\n\n /** The route template, e.g. `/post/:postId`. */\n route?: string | null;\n\n /** The URL of the request it last made. */\n url?: string | null;\n status?: string | null;\n features?: string[];\n activity?: Record<string, unknown> | null;\n runs?: Record<string, unknown>[];\n\n /** Values slimmed by {@link slimForReport} on the way out. */\n args?: unknown;\n response?: unknown;\n error?: unknown;\n\n /** Whatever else the kind carries: a stack's pages, a form's fields, a socket's rooms. */\n detail?: Record<string, unknown> | null;\n\n /**\n * The response overrides armed on this query, for a query entry - a report captured while one was\n * live has to say so, the same reason armed faults are included.\n */\n overrides?: { id: string; op: Record<string, unknown> }[];\n};\n\nexport type SessionExportEvent = {\n timestamp: string;\n client: string;\n type: string;\n method?: string | null;\n url?: string | null;\n status?: number | null;\n durationMs?: number | null;\n bytes?: number | null;\n cause?: string | null;\n refreshed?: string[] | null;\n};\n\nexport type SessionExportFault = {\n client: string;\n latencyMs: number;\n failNext: number;\n failRate: number;\n status: number;\n};\n\n/**\n * One armed mock, as a capture reports it. A session taken while a route was answered by the panel has to\n * say which routes those were, or the report sends someone looking for data the API never sent.\n */\nexport type SessionExportMock = {\n client: string;\n method: string;\n pattern: string;\n status: number;\n latencyMs: number;\n body: unknown;\n};\n\nexport type BuildSessionExportOptions = {\n /** Wall-clock time of the export - passed in so the builder stays pure. */\n now: number;\n\n /** Where the session was captured, so a report says which environment it came from. */\n location: string;\n\n /** Which SDK and application build produced the session - see `queryDevtoolsAbout()`. */\n about: QueryDevtoolsAbout;\n\n clients: SessionExportClient[];\n entries: SessionExportEntry[];\n events: SessionExportEvent[];\n faults: SessionExportFault[];\n mocks: SessionExportMock[];\n};\n\n/** The whole panel state as one attachable JSON document. */\nexport type QueryDevtoolsSessionExport = {\n _type: 'ethlete.query:devtools-session';\n exportedAt: string;\n location: string;\n about: QueryDevtoolsAbout;\n counts: {\n clients: number;\n entries: number;\n events: number;\n armedFaults: number;\n armedOverrides: number;\n armedMocks: number;\n };\n clients: SessionExportClient[];\n entries: SessionExportEntry[];\n events: SessionExportEvent[];\n faults: SessionExportFault[];\n mocks: SessionExportMock[];\n};\n\n/** Slims the free-form value fields of an entry, leaving the rest as it was collected. */\nconst slimEntry = (entry: SessionExportEntry): SessionExportEntry => ({\n ...entry,\n ...('args' in entry ? { args: slimForReport(entry.args) } : {}),\n ...('response' in entry ? { response: slimForReport(entry.response) } : {}),\n ...('error' in entry ? { error: slimForReport(entry.error) } : {}),\n ...(entry.detail ? { detail: slimForReport(entry.detail) as Record<string, unknown> } : {}),\n ...(entry.overrides?.length ? { overrides: slimForReport(entry.overrides) as SessionExportEntry['overrides'] } : {}),\n});\n\n/**\n * Builds the whole-session report: every registered entry with what it ran and what it holds, the event\n * log, the cache totals per client and anything armed in the Faults or Mocks tabs or as a response\n * override.\n *\n * Bodies are slimmed rather than dumped in full - the point is a file small enough to attach to a bug\n * report, and a 4 MB response says nothing a representative sample does not. Armed faults and overrides\n * are included because a report captured while the panel was lying to the app has to say so. Neither\n * survives past the current page - this is a snapshot for a bug report, not something the panel can\n * later import to restore a session.\n */\nexport const buildQueryDevtoolsSessionExport = (options: BuildSessionExportOptions): QueryDevtoolsSessionExport => ({\n _type: 'ethlete.query:devtools-session',\n exportedAt: new Date(options.now).toISOString(),\n location: options.location,\n about: options.about,\n counts: {\n clients: options.clients.length,\n entries: options.entries.length,\n events: options.events.length,\n armedFaults: options.faults.length,\n armedOverrides: options.entries.reduce((sum, entry) => sum + (entry.overrides?.length ?? 0), 0),\n armedMocks: options.mocks.length,\n },\n clients: options.clients,\n entries: options.entries.map(slimEntry),\n events: options.events,\n faults: options.faults,\n mocks: options.mocks,\n});\n","import { HttpErrorResponse, HttpHeaders } from '@angular/common/http';\nimport { headerEntries, isHeadersValue } from './query-devtools-exotic';\nimport { DOCUMENT } from '@angular/common';\nimport {\n booleanAttribute,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n NgZone,\n OnInit,\n signal,\n untracked,\n viewChild,\n ViewEncapsulation,\n WritableSignal,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport {\n clamp,\n createObjectUrlHandle,\n DragHandleDirective,\n DragMoveEvent,\n injectBreakpointObserver,\n injectViewportSize,\n ResizeEdge,\n ResizeHandlesComponent,\n ResizeMoveEvent,\n injectFileDownload,\n injectIsDocumentVisible,\n injectRenderer,\n injectStyleManager,\n randomId,\n signalElementDimensions,\n} from '@ethlete/core';\nimport {\n AnyBearerAuthProvider,\n AnyPagedQueryStack,\n AnyQueryBatch,\n AnyQuerySnapshot,\n AnyQueryStack,\n applyQueryDevtoolsTokenTtl,\n BearerAuthMultiTabSyncFeature,\n canOverrideQueryDevtoolsTokenTtl,\n clearQueryDevtoolsArmedMocks,\n clearQueryDevtoolsFaults,\n clearQueryDevtoolsMockStore,\n clearQueryDevtoolsOverrideStore,\n clearQueryDevtoolsStore,\n clearRestoredQueryDevtoolsOverrides,\n createQueryErrorResponse,\n createQueryKeyLockManager,\n EMPTY_QUERY_DEVTOOLS_FAULT,\n isQueryDevtoolsFaultArmed,\n measureQueryDevtoolsPayload,\n QueryClient,\n queryDevtoolsAbout,\n queryDevtoolsEntries,\n QueryDevtoolsEntry,\n queryDevtoolsArmedMocks,\n queryDevtoolsArmedMocksRestored,\n queryDevtoolsFaults,\n queryDevtoolsFaultsRestored,\n queryDevtoolsMockId,\n queryDevtoolsMocks,\n queryDevtoolsOverridePersistence,\n queryDevtoolsRestoredOverridesScope,\n queryDevtoolsSettings,\n QueryDevtoolsStorageScope,\n queryDevtoolsTokenTtls,\n readQueryDevtoolsStore,\n registerEthleteVersion,\n writeQueryDevtoolsStore,\n queryDevtoolsResponseHistory,\n QueryDevtoolsFeature,\n QueryDevtoolsFormHandle,\n QueryDevtoolsRun,\n QueryDevtoolsStatsHandle,\n sumQueryDevtoolsStats,\n QueryKeyLockHold,\n QueryKeyLockState,\n QueryRefreshCause,\n QueryRepository,\n QueryRepositoryCacheEntry,\n QueryRepositoryEvent,\n QuerySequence,\n QuerySequenceStatus,\n restoredQueryDevtoolsOverrides,\n setQueryDevtoolsOverridePersistence,\n WebSocketDevtoolsHandle,\n WebSocketDevtoolsMessage,\n} from '@ethlete/query';\nimport {\n animationFrames,\n EMPTY,\n filter,\n finalize,\n fromEvent,\n interval,\n map,\n merge,\n NEVER,\n startWith,\n Subject,\n switchMap,\n take,\n takeUntil,\n tap,\n timer,\n} from 'rxjs';\nimport {\n COMPONENTS_VERSION,\n MenuCheckboxItemComponent,\n MenuComponent,\n MenuDirective,\n MenuItemComponent,\n MenuRadioGroupComponent,\n MenuRadioItemComponent,\n MenuSeparatorComponent,\n MenuSurfaceDirective,\n MenuTriggerDirective,\n} from '@ethlete/components';\nimport { QueryDevtoolsAuthTabComponent } from './query-devtools-auth-tab.component';\nimport { QueryDevtoolsCacheTabComponent } from './query-devtools-cache-tab.component';\nimport { buildCurlCommand } from './query-devtools-curl';\nimport { QueryDevtoolsEventsTabComponent } from './query-devtools-events-tab.component';\nimport { diffQueryDevtoolsResponses } from './query-devtools-diff';\nimport { QueryDevtoolsAboutComponent } from './query-devtools-about.component';\nimport { QueryDevtoolsMocksTabComponent } from './query-devtools-mocks-tab.component';\nimport { QueryDevtoolsSettingsComponent } from './query-devtools-settings.component';\nimport { QueryDevtoolsFaultsTabComponent } from './query-devtools-faults-tab.component';\nimport { QueryDevtoolsFormsTabComponent } from './query-devtools-forms-tab.component';\nimport { QUERY_DEVTOOLS_HOST } from './query-devtools-host';\nimport { QueryDevtoolsLocksTabComponent } from './query-devtools-locks-tab.component';\nimport {\n DEVTOOLS_PROBE_NAMESPACE,\n DevtoolsLockRow,\n devtoolsProbeLockKey,\n devtoolsProbeLockName,\n probeClientId,\n summarizeLocks,\n} from './query-devtools-locks';\nimport { QUERY_DEVTOOLS_VERSION } from './version';\nimport { buildInsomniaExport, InsomniaRequestInput, InsomniaTokenRefreshInput } from './query-devtools-insomnia';\nimport { QueryDevtoolsCopyMenuStylesComponent } from './query-devtools-copy-menu-styles.component';\nimport { QueryDevtoolsJsonStylesComponent } from './query-devtools-json-styles.component';\nimport { QueryDevtoolsOverrideMenuStylesComponent } from './query-devtools-override-menu-styles.component';\nimport { QueryDevtoolsQueriesTabComponent } from './query-devtools-queries-tab.component';\nimport { QueryDevtoolsBatchesTabComponent } from './query-devtools-batches-tab.component';\nimport { QueryDevtoolsSequencesTabComponent } from './query-devtools-sequences-tab.component';\nimport { QueryDevtoolsSocketsTabComponent } from './query-devtools-sockets-tab.component';\nimport { QueryDevtoolsStacksTabComponent } from './query-devtools-stacks-tab.component';\nimport { QueryDevtoolsTimelineTabComponent } from './query-devtools-timeline-tab.component';\nimport {\n buildQueryDevtoolsSessionExport,\n SessionExportClient,\n SessionExportEntry,\n SessionExportEvent,\n SessionExportFault,\n SessionExportMock,\n slimForReport,\n} from './query-devtools-session';\nimport { QueryDevtoolsTimelineStylesComponent } from './query-devtools-timeline-styles.component';\nimport {\n AnyQuery,\n BatchItemView,\n CacheRow,\n DetailTab,\n DevtoolsTab,\n DroppedCacheEntry,\n EventLogItem,\n PaneAxis,\n PaneTarget,\n QueryActivity,\n QueryDevtoolsChip,\n QueryDevtoolsSelection,\n QueryDevtoolsTokenLifetime,\n QueryLink,\n QueryListFacet,\n QueryStatus,\n RefreshedRequest,\n RequestProgress,\n RouteSegment,\n TabBadge,\n} from './query-devtools-types';\nimport {\n QUERY_DEVTOOLS_VIEW_STATE_KEY,\n QueryDevtoolsToggleComponent,\n queryDevtoolsShortcutLabel,\n} from '@ethlete/query-devtools/toggle';\n\n/**\n * Where the panel sits: attached to an edge, or floating over the page as a window of its own. A\n * pop-out is not one of these - that is a real browser window, not a position in this document.\n */\ntype DevtoolsDock = 'bottom' | 'top' | 'left' | 'right' | 'float';\n\n/** What the layout menu offers, in the order it lists them. `popout` is a window, not a position. */\ntype DevtoolsLayout = DevtoolsDock | 'popout';\n\n/** The floating panel's position and size, in CSS px from the viewport's top-left. */\ntype FloatRect = { x: number; y: number; width: number; height: number };\n\n/**\n * A drag in progress: the panel's docked edge, the floating panel being moved or resized, or the\n * divider between a two-pane tab's panes.\n */\ntype ResizeDrag = {\n /** The document the pointer moves in - a popped-out panel lives in a window of its own. */\n doc: Document;\n} & ({ kind: 'panel' } | { kind: 'pane'; pane: PaneTarget; axis: PaneAxis; container: HTMLElement });\n\ntype PersistedState = {\n open?: boolean;\n height?: number;\n width?: number;\n listWidth?: number | null;\n drawerWidth?: number | null;\n listHeight?: number | null;\n drawerHeight?: number | null;\n dock?: DevtoolsDock;\n reservesSpace?: boolean;\n floatRect?: FloatRect;\n floatParked?: boolean;\n activeTab?: DevtoolsTab;\n detailTab?: DetailTab;\n selectedClientName?: string | null;\n selectedQueryId?: string | null;\n stackSelectedQueryId?: string | null;\n sequenceSelectedQueryId?: string | null;\n batchSelectedQueryId?: string | null;\n eventSelectedQueryId?: string | null;\n formSelectedQueryId?: string | null;\n timelineSelectedQueryId?: string | null;\n selectedFormId?: string | null;\n inspectFilterIds?: string[] | null;\n queryFilter?: string;\n queryFacets?: QueryListFacet[];\n queryRecentFirst?: boolean;\n queryTreeView?: boolean;\n collapsedQueryPaths?: string[];\n eventClient?: string | null;\n eventErrorsOnly?: boolean;\n socketFilter?: string;\n jsonSearch?: string;\n expandedSteps?: string[];\n expandedBatchItems?: string[];\n expandedQueryGroups?: string[];\n jsonExpanded?: string[];\n jsonCollapsed?: string[];\n};\n\n/** How long a copy button stays ticked after a successful write. */\nconst COPIED_RESET_MS = 1200;\n\n/**\n * How many of a batch's items its card lists. A bulk run settles thousands, and a row per item is a\n * list nobody scrolls and a render the panel pays for on every settle.\n */\nconst MAX_BATCH_ITEM_ROWS = 100;\n\n/** How long the locate box stays up. Long enough to outlast a smooth scroll and still be read. */\nconst LOCATE_HOLD_MS = 2500;\n\nconst LOCATE_MAX_DEPTH = 4;\n\n/**\n * The element to scroll to and outline for a query: the one it was created in, or the shallowest\n * descendant that renders a box when that one renders none of its own. `null` when nothing in there\n * is rendered at all - `display: none`, or an ancestor that is.\n *\n * A host carrying `display: contents` - common on Angular components - generates no box, so both\n * `checkVisibility()` and its own rect report it as absent while its content is plainly on screen.\n */\nconst renderedTarget = (element: Element, depth = 0): Element | null => {\n const rect = element.getBoundingClientRect();\n\n if (rect.width || rect.height) return element;\n if (depth >= LOCATE_MAX_DEPTH) return null;\n\n for (const child of element.children) {\n const found = renderedTarget(child, depth + 1);\n\n if (found) return found;\n }\n\n return null;\n};\n\n/**\n * Every place the panel can sit, as the layout menu lists them. A menu rather than a row of buttons:\n * six destinations do not fit in a header that already carries ten tabs, and one of them is a window.\n */\nconst DEVTOOLS_LAYOUTS = [\n { id: 'bottom', glyph: '\\u2b13', label: 'Bottom', hint: 'Dock to the bottom edge' },\n { id: 'top', glyph: '\\u2b12', label: 'Top', hint: 'Dock to the top edge' },\n { id: 'left', glyph: '\\u25e7', label: 'Left', hint: 'Dock to the left edge' },\n { id: 'right', glyph: '\\u25e8', label: 'Right', hint: 'Dock to the right edge' },\n {\n id: 'float',\n glyph: '\\u2750',\n label: 'Float',\n hint: 'A window inside the page - move it, resize it, shove it off an edge to park it',\n },\n {\n id: 'popout',\n glyph: '\\u29c9',\n label: 'Pop out',\n hint: 'Move the panel into a window of its own - the same live panel, on your other screen',\n },\n] as const satisfies readonly { id: DevtoolsLayout; glyph: string; label: string; hint: string }[];\n\nconst layoutFor = (dock: DevtoolsDock) => DEVTOOLS_LAYOUTS.find((layout) => layout.id === dock) ?? DEVTOOLS_LAYOUTS[0];\n\n/**\n * The padding a dock takes out of the page, per edge. Logical properties, because the panel's own\n * placement is: `bottom` is pinned with `inset-block-end`, `right` with `inset-inline-start: auto`.\n */\nconst DOCK_PADDING = {\n bottom: 'paddingBlockEnd',\n top: 'paddingBlockStart',\n left: 'paddingInlineStart',\n right: 'paddingInlineEnd',\n} as const satisfies Record<Exclude<DevtoolsDock, 'float'>, keyof CSSStyleDeclaration>;\n\nconst noop = () => undefined;\n\n/**\n * A devtools entry id as a person reads it. Ids are the registry's descriptor plus a per-descriptor\n * sequence number (`query|<client>|<method>|<route>#<n>`), so the parts are all there - just not in an\n * order anyone would read out loud. Used for stored overrides whose query never registered, which are\n * the one case the panel has no live entry to name.\n */\nconst describeEntryId = (id: string) => {\n const [descriptor = '', seq] = id.split('#');\n const [kind, client, method, route] = descriptor.split('|');\n\n if (kind !== 'query' || !route) return id;\n\n return `${method} ${route}${client ? ` · ${client}` : ''}${seq && seq !== '0' ? ` #${seq}` : ''}`;\n};\n\nconst STORAGE_KEY = QUERY_DEVTOOLS_VIEW_STATE_KEY;\n\n/**\n * Pinned queries, held apart from {@link STORAGE_KEY} and defaulting to `localStorage`: everything under\n * that key is view state that should die with the tab, while a pin says which query is being worked on\n * and is meant to outlive one. Folding it in would silently make pins per-tab. Both scopes are\n * `queryDevtoolsSettings()`.\n */\nconst PINS_STORAGE_KEY = 'ethlete:query:devtools:pins:v2';\n\nconst DEFAULT_HEIGHT = 360;\nconst MIN_HEIGHT = 200;\nconst DEFAULT_WIDTH = 560;\nconst MIN_WIDTH = 360;\n\n/** The floors a dragged pane divider leaves on both sides of itself, per axis. */\nconst MIN_PANE_WIDTH = 220;\nconst MIN_PANE_HEIGHT = 120;\n\n/** Where a floating panel appears the first time, before any drag - clamped into the viewport on sight. */\nconst DEFAULT_FLOAT_RECT: FloatRect = { x: 48, y: 48, width: 900, height: 520 };\n\n/**\n * The inline size a floating panel stacks its two panes below. Not the `md` breakpoint the docked\n * layouts use: a float is sized by the user, not by the viewport, so what matters is how wide the\n * panel itself was dragged. The list asks for `22rem` and the drawer for `26rem`, plus the divider.\n */\nconst FLOAT_STACK_WIDTH = 620;\n\ntype ViewportSize = { width: number; height: number };\n\n/**\n * How much of a parked float stays on screen. The title bar spans the panel's full width, so whichever\n * edge it is parked against, this much of that bar is still there to drag it back by.\n */\nconst FLOAT_PEEK = 44;\n\n/**\n * Keeps a floating rect fully inside the viewport. Three things run into this: releasing a drag that\n * did not park the panel, a window shrinking under it, and a persisted rect restored into a viewport\n * smaller than the one that stored it.\n */\nconst clampFloatRect = (rect: FloatRect, viewport: ViewportSize): FloatRect => {\n const width = clamp(rect.width, MIN_WIDTH, Math.max(MIN_WIDTH, viewport.width));\n const height = clamp(rect.height, MIN_HEIGHT, Math.max(MIN_HEIGHT, viewport.height));\n\n return {\n width,\n height,\n x: clamp(rect.x, 0, Math.max(0, viewport.width - width)),\n y: clamp(rect.y, 0, Math.max(0, viewport.height - height)),\n };\n};\n\n/**\n * The loosest a float may sit: shoved off an edge with only {@link FLOAT_PEEK} left, which is what a\n * drag and a parked panel are held to. **North is never a parking edge** - the title bar is the only\n * thing that drags the panel back, so it may never be the part that leaves.\n */\nexport const clampFloatToPeek = (rect: FloatRect, viewport: ViewportSize): FloatRect => {\n const width = clamp(rect.width, MIN_WIDTH, Math.max(MIN_WIDTH, viewport.width));\n const height = clamp(rect.height, MIN_HEIGHT, Math.max(MIN_HEIGHT, viewport.height));\n const peekX = Math.min(FLOAT_PEEK, width);\n const peekY = Math.min(FLOAT_PEEK, height);\n\n return {\n width,\n height,\n x: clamp(rect.x, peekX - width, Math.max(peekX - width, viewport.width - peekX)),\n y: clamp(rect.y, 0, Math.max(0, viewport.height - peekY)),\n };\n};\n\n/**\n * Where a float settles when the pointer is released. Dragged more than halfway off an edge, it stays\n * parked there with {@link FLOAT_PEEK} showing - the panel gets out of the way of the thing you are\n * debugging without being closed. Anything short of halfway is pulled back in, so a slightly clumsy\n * drag does not park it.\n */\nexport const settledFloatRect = (rect: FloatRect, viewport: ViewportSize): { rect: FloatRect; collapsed: boolean } => {\n const offLeft = Math.max(0, -rect.x);\n const offRight = Math.max(0, rect.x + rect.width - viewport.width);\n const offBottom = Math.max(0, rect.y + rect.height - viewport.height);\n\n const parkedX = Math.max(offLeft, offRight) > rect.width / 2;\n const parkedY = offBottom > rect.height / 2;\n\n if (!parkedX && !parkedY) return { rect: clampFloatRect(rect, viewport), collapsed: false };\n\n const peekX = Math.min(FLOAT_PEEK, rect.width);\n const peekY = Math.min(FLOAT_PEEK, rect.height);\n const inside = clampFloatRect(rect, viewport);\n\n return {\n rect: {\n ...rect,\n x: parkedX ? (offLeft > offRight ? peekX - rect.width : viewport.width - peekX) : inside.x,\n y: parkedY ? viewport.height - peekY : inside.y,\n },\n collapsed: true,\n };\n};\n\n/**\n * The rect a resize gesture from `edge` produces, given where the panel was when the gesture started.\n * A west or north drag grows away from the edge that stays pinned, so the origin follows whatever\n * size the drag settled on - including when the size hit its floor and the origin must stop with it.\n */\nexport const resizedFloatRect = (\n base: FloatRect,\n { move, viewport }: { move: ResizeMoveEvent; viewport: ViewportSize },\n): FloatRect => {\n const { edge, dx, dy } = move;\n\n const maxWidth = edge.includes('w') ? base.x + base.width : viewport.width - base.x;\n const maxHeight = edge.includes('n') ? base.y + base.height : viewport.height - base.y;\n\n const requestedWidth = edge.includes('e') ? base.width + dx : edge.includes('w') ? base.width - dx : base.width;\n const requestedHeight = edge.includes('s') ? base.height + dy : edge.includes('n') ? base.height - dy : base.height;\n\n const width = clamp(requestedWidth, MIN_WIDTH, Math.max(MIN_WIDTH, maxWidth));\n const height = clamp(requestedHeight, MIN_HEIGHT, Math.max(MIN_HEIGHT, maxHeight));\n\n return clampFloatRect(\n {\n width,\n height,\n x: edge.includes('w') ? base.x + base.width - width : base.x,\n y: edge.includes('n') ? base.y + base.height - height : base.y,\n },\n viewport,\n );\n};\n\n/** The window a pop-out opens at. Wide enough for the master/detail split the bottom dock gets. */\nconst POPOUT_FEATURES = 'popup=yes,width=1200,height=800';\n\n/**\n * The document a pop-out is opened on. The doctype and the title have to be part of it rather than set\n * afterwards - see {@link QueryDevtoolsComponent.popOut}. Everything the panel needs beyond this (the\n * app's stylesheets, its theme) is copied in once the window has loaded.\n */\nconst POPOUT_DOCUMENT = `<!doctype html>\n<html>\n <head>\n <meta charset=\"utf-8\" />\n <title>Query devtools</title>\n </head>\n <body style=\"margin: 0\"></body>\n</html>`;\n\n/**\n * Every stylesheet the panel injects after it is created rather than with itself. A pop-out copies the\n * host document's styles once, on load, so all of them have to be in the document by then - whatever the\n * user has opened so far.\n */\nconst DEFERRED_STYLES = [\n QueryDevtoolsJsonStylesComponent,\n QueryDevtoolsCopyMenuStylesComponent,\n QueryDevtoolsOverrideMenuStylesComponent,\n QueryDevtoolsTimelineStylesComponent,\n];\n\nconst readPersistedState = (): PersistedState =>\n readQueryDevtoolsStore<PersistedState>(queryDevtoolsSettings().viewState, STORAGE_KEY) ?? {};\n\nconst readPinnedQueryIds = (): string[] => {\n const parsed = readQueryDevtoolsStore<string[]>(queryDevtoolsSettings().pins, PINS_STORAGE_KEY);\n\n return Array.isArray(parsed) ? parsed : [];\n};\n\n/** How long an exported Insomnia collection reuses a refresh response whose token lifetime is unknown. */\nconst DEFAULT_TOKEN_MAX_AGE_S = 300;\n\n/** Upper bound for the same, so a token that claims a year of life still gets refreshed hourly. */\nconst MAX_TOKEN_MAX_AGE_S = 3600;\n\n/**\n * A panel action must never reach the application's `ErrorHandler` - it reports its own failure inside\n * the panel instead, and this is the text it shows.\n */\nconst actionErrorMessage = (error: unknown) => (error instanceof Error ? error.message : String(error));\n\n/**\n * What to seed the args editor with for a query that has never run and holds no args anywhere. A\n * function route cannot execute without its path params, so the editor offers them as blanks to fill.\n */\nconst emptyArgsSeed = (entry: QueryDevtoolsEntry) => {\n const params = entry.meta.routeParts?.flatMap((part) => (part.param ? [part.param] : [])) ?? [];\n\n if (!params.length) return {};\n\n return { pathParams: Object.fromEntries(params.map((name) => [name, ''])) };\n};\n\ntype HeadersRecord = Record<string, string | string[]>;\n\n/** Marks a value `editableArgs` left out of the draft, for {@link executableArgs} to put back. */\nconst DROPPED = /* @__PURE__ */ Symbol('dropped');\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n if (!value || typeof value !== 'object') return false;\n\n const proto = Object.getPrototypeOf(value);\n\n return proto === Object.prototype || proto === null;\n};\n\n/**\n * Values `JSON.stringify` cannot represent - it writes `{}`, private fields, or omits them outright. A\n * `Date` is deliberately not one: it survives as an ISO string, which is what the query would send\n * anyway, so it stays editable.\n */\nconst isUneditable = (value: unknown) =>\n typeof value === 'function' ||\n value instanceof Map ||\n value instanceof Set ||\n (typeof FormData !== 'undefined' && value instanceof FormData) ||\n (typeof Blob !== 'undefined' && value instanceof Blob) ||\n isHeadersValue(value);\n\n/**\n * Args in the shape the JSON editor can carry. `JSON.stringify` writes an `HttpHeaders` as its four\n * private fields, a `FormData` or a `Map` as `{}`, and a header provider not at all - so an unedited\n * draft used to replay values the query never had. Headers become a plain `name: value` record, since\n * one rebuilds them exactly; every other such value is left out of the draft and put back verbatim by\n * {@link executableArgs}, which beats letting the user edit an empty object over the top of it.\n */\nconst editableArgs = (args: Record<string, unknown>) => editableValue(args) as Record<string, unknown>;\n\nconst editableValue = (value: unknown): unknown => {\n if (isHeadersValue(value)) return Object.fromEntries(headerEntries(value).map(({ k, v }) => [k, v]));\n if (isUneditable(value)) return DROPPED;\n if (Array.isArray(value)) {\n // `null` rather than a hole, so the indices a user edits still line up with the ones being replayed.\n return value.map((item) => {\n const edited = editableValue(item);\n\n return edited === DROPPED ? null : edited;\n });\n }\n\n if (isPlainObject(value)) {\n const out: Record<string, unknown> = {};\n\n for (const [key, child] of Object.entries(value)) {\n const edited = editableValue(child);\n\n if (edited !== DROPPED) out[key] = edited;\n }\n\n return out;\n }\n\n return value;\n};\n\n/** The inverse of {@link editableArgs}: records become `HttpHeaders` again, dropped values come back. */\nconst executableArgs = (draft: Record<string, unknown> | null, source: Record<string, unknown> | null) =>\n draft ? (executableValue(draft, source) as Record<string, unknown>) : draft;\n\nconst executableValue = (draft: unknown, source: unknown): unknown => {\n // What the draft could not carry comes back verbatim. A key the user deleted themselves stays deleted,\n // because only a value `editableArgs` dropped is missing from the draft while present in the source.\n if (draft === undefined) return isUneditable(source) ? source : undefined;\n\n if (isHeadersValue(source) && isPlainObject(draft)) return new HttpHeaders(draft as HeadersRecord);\n\n if (isPlainObject(draft) && isPlainObject(source)) {\n const out: Record<string, unknown> = { ...draft };\n\n for (const [key, child] of Object.entries(source)) {\n const restored = executableValue(draft[key], child);\n\n if (restored !== undefined) out[key] = restored;\n }\n\n return out;\n }\n\n return draft;\n};\n\n/**\n * The JSONPath of a string value inside a response, or `null`. Used to locate the access token in an\n * auth response whose shape only the provider's `extractTokens` knows.\n */\nconst findValuePath = (value: string, node: { value: unknown; path: string; depth: number }): string | null => {\n if (node.value === value) return node.path;\n if (node.depth > 5 || !node.value || typeof node.value !== 'object') return null;\n\n for (const [key, entry] of Object.entries(node.value)) {\n const path = Array.isArray(node.value) ? `${node.path}[${key}]` : `${node.path}.${key}`;\n const found = findValuePath(value, { value: entry, path, depth: node.depth + 1 });\n\n if (found) return found;\n }\n\n return null;\n};\n\n/** A countdown to an `exp` claim in seconds-since-epoch, or `null` when there is nothing to count to. */\nconst expiryCountdown = (exp: number | null): string | null => {\n if (exp === null) return null;\n\n const seconds = Math.round((exp * 1000 - Date.now()) / 1000);\n\n if (seconds <= 0) return 'expired';\n if (seconds < 120) return `${seconds}s`;\n if (seconds > 86400) return `${Math.floor(seconds / 86400)}d`;\n\n return `${Math.floor(seconds / 60)}m ${seconds % 60}s`;\n};\n\n/** Best-effort decode of a JWT payload for the auth tab. Returns `null` for anything non-decodable. */\nconst decodeJwtPayload = (token: string | null): Record<string, unknown> | null => {\n if (!token) return null;\n\n try {\n const payload = token.split('.')[1];\n if (!payload) return null;\n\n const normalized = payload.replace(/-/g, '+').replace(/_/g, '/');\n const decoded = atob(normalized);\n const json = decodeURIComponent(\n decoded\n .split('')\n .map((c) => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))\n .join(''),\n );\n\n return JSON.parse(json) as Record<string, unknown>;\n } catch {\n return null;\n }\n};\n\n/**\n * A floating, dockable panel that inspects the live state of the signals-first `@ethlete/query`\n * system: queries, stacks, sequences, bearer auth providers, the repository cache and a rolling\n * event log.\n *\n * Requires `provideQueryDevtools()` in the application providers - without it the registry stays\n * empty and the panel shows nothing.\n */\n@Component({\n selector: 'et-query-devtools',\n templateUrl: './query-devtools.component.html',\n styleUrl: './query-devtools.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [\n QueryDevtoolsAuthTabComponent,\n QueryDevtoolsBatchesTabComponent,\n QueryDevtoolsCacheTabComponent,\n QueryDevtoolsEventsTabComponent,\n QueryDevtoolsAboutComponent,\n QueryDevtoolsSettingsComponent,\n QueryDevtoolsFaultsTabComponent,\n QueryDevtoolsFormsTabComponent,\n QueryDevtoolsLocksTabComponent,\n QueryDevtoolsMocksTabComponent,\n QueryDevtoolsQueriesTabComponent,\n QueryDevtoolsSequencesTabComponent,\n QueryDevtoolsSocketsTabComponent,\n QueryDevtoolsStacksTabComponent,\n QueryDevtoolsTimelineTabComponent,\n QueryDevtoolsToggleComponent,\n DragHandleDirective,\n MenuCheckboxItemComponent,\n MenuComponent,\n MenuDirective,\n MenuItemComponent,\n MenuRadioGroupComponent,\n MenuRadioItemComponent,\n MenuSeparatorComponent,\n MenuSurfaceDirective,\n MenuTriggerDirective,\n ResizeHandlesComponent,\n ],\n providers: [{ provide: QUERY_DEVTOOLS_HOST, useExisting: QueryDevtoolsComponent }],\n host: {\n class: 'et-query-devtools-host',\n '[attr.data-dock]': 'dock()',\n // Every overlay opened from inside the panel - its menus, its tooltips - mounts one level above\n // the panel's own z-index, which is itself above the default overlay layer. Both numbers live in\n // query-devtools.component.css; keep them in step.\n 'data-et-overlay-layer': '2147483020',\n },\n})\nexport class QueryDevtoolsComponent implements OnInit {\n private hostEl = inject<ElementRef<HTMLElement>>(ElementRef);\n private renderer = injectRenderer();\n private download = injectFileDownload();\n private styleManager = injectStyleManager();\n private zone = inject(NgZone);\n private destroyRef = inject(DestroyRef);\n private document = inject(DOCUMENT);\n\n private viewport = injectViewportSize();\n\n private isDocumentVisible = injectIsDocumentVisible();\n\n /**\n * Opens the panel as soon as it is created, whatever the stored view state says. Set by\n * `<et-query-devtools-lazy>`, which downloads the panel on the click that was meant to open it.\n */\n public startOpen = input(false, { transform: booleanAttribute });\n\n /** The panel itself, so a pop-out can move it into another window's document. */\n private panelEl = viewChild<ElementRef<HTMLElement>>('panel');\n\n private eventIdCounter = 0;\n private lastSelectionKey = '';\n\n /** Where the gear goes back to, so opening Settings does not lose the tab it was opened over. */\n private tabBeforeSettings: DevtoolsTab = 'queries';\n\n public readonly persisted = readPersistedState();\n\n protected readonly tabs = [\n { id: 'queries', label: 'Queries' },\n { id: 'stacks', label: 'Stacks' },\n { id: 'sequences', label: 'Sequences' },\n { id: 'batches', label: 'Batches' },\n { id: 'forms', label: 'Forms' },\n { id: 'auth', label: 'Auth' },\n { id: 'ws', label: 'Sockets' },\n { id: 'cache', label: 'Cache' },\n { id: 'locks', label: 'Locks' },\n { id: 'timeline', label: 'Timeline' },\n { id: 'events', label: 'Events' },\n { id: 'faults', label: 'Faults' },\n { id: 'mocks', label: 'Mocks' },\n { id: 'about', label: 'About' },\n ] satisfies { id: DevtoolsTab; label: string }[];\n\n /**\n * Tabs the bar keeps whether they hold anything or not: the one the panel opens on, and the one that\n * arms faults - which has entries to arm rather than to count.\n */\n private readonly PINNED_TABS: readonly DevtoolsTab[] = ['queries', 'faults'];\n\n protected readonly shortcut = queryDevtoolsShortcutLabel();\n\n protected readonly LAYOUTS = DEVTOOLS_LAYOUTS;\n\n protected open = signal(this.persisted.open ?? false);\n private panelHeight = signal(this.persisted.height ?? DEFAULT_HEIGHT);\n private panelWidth = signal(this.persisted.width ?? DEFAULT_WIDTH);\n protected activeTab = signal<DevtoolsTab>(this.persisted.activeTab ?? 'queries');\n\n /**\n * The dragged sizes of the two-pane tabs, in px, one pair per axis - a side dock stacks the panes, so\n * the same divider sizes them along the block axis there and a dock switch has to keep both. `null`\n * keeps the stylesheet's proportional default, which is also what a double-click on a divider restores.\n */\n protected listWidth = signal<number | null>(this.persisted.listWidth ?? null);\n protected drawerWidth = signal<number | null>(this.persisted.drawerWidth ?? null);\n protected listHeight = signal<number | null>(this.persisted.listHeight ?? null);\n protected drawerHeight = signal<number | null>(this.persisted.drawerHeight ?? null);\n\n protected drag = signal<ResizeDrag | null>(null);\n protected resizing = computed(() => !!this.drag());\n\n /** Which edge the panel is docked to, or `float` for a window of its own inside the page. */\n protected dock = signal<DevtoolsDock>(this.persisted.dock ?? 'bottom');\n\n /** The entry the layout button shows, so it names where the panel is rather than where it could go. */\n protected currentLayout = computed(() => layoutFor(this.dock()));\n\n /**\n * Whether a docked panel takes its size out of the page instead of covering it - so the last rows of a\n * long page can still be scrolled to. Only docks can: a float sits wherever it was dragged.\n */\n protected reservesSpace = signal(this.persisted.reservesSpace ?? true);\n\n /** Where the floating panel sits and how big it is. Kept while docked, so a return to float restores it. */\n private floatRect = signal<FloatRect>(this.persisted.floatRect ?? DEFAULT_FLOAT_RECT);\n\n /** The rect a resize gesture started from, or `null` outside one. */\n private floatResizeBase: FloatRect | null = null;\n\n /**\n * Whether the float is shoved off an edge with only its peek showing. Persisted with the rect, since\n * restoring the rect without it would either strand the panel off screen or silently un-park it.\n */\n protected floatParked = signal(this.persisted.floatParked ?? false);\n\n /**\n * The browser refused the last pop-out. `window.open` returns `null` with no error to catch, so\n * without this the button simply did nothing - and floating is the fallback it should have offered.\n */\n protected popOutBlocked = signal(false);\n\n /**\n * Whether the panel currently lives in a window of its own. Deliberately not persisted: a reload\n * cannot re-adopt a window the previous document opened, so it always starts docked.\n */\n protected poppedOut = signal(false);\n\n protected floating = computed(() => !this.poppedOut() && this.dock() === 'float');\n\n /**\n * Below `md` a side-by-side split cannot fit: the list alone asks for `22rem` and the drawer for\n * `26rem`, which is wider than a phone. Narrow gets the same stacked layout a right dock does.\n */\n private narrowViewport = injectBreakpointObserver().observeBreakpoint({ max: 'sm' });\n\n /** Whether the panel is docked to a side edge, which is what sizes it along the inline axis. */\n private sideDocked = computed(() => this.dock() === 'left' || this.dock() === 'right');\n\n /** Which axis the two-pane tabs split along. The stylesheet keys the stacked layout off the same value. */\n protected paneAxis = computed<PaneAxis>(() => {\n if (this.poppedOut()) return 'inline';\n if (this.floating()) return this.floatRect().width < FLOAT_STACK_WIDTH ? 'block' : 'inline';\n\n return this.sideDocked() || this.narrowViewport() ? 'block' : 'inline';\n });\n\n private popup: Window | null = null;\n\n /** Stops mirroring the host document's stylesheets into the pop-up. @see syncStylesInto */\n private popOutStyleSync: (() => void) | null = null;\n\n // Only the axis the dock edge controls is bound; the other is the stylesheet's. A float sets both,\n // and a pop-out fills its window on both.\n protected panelBlockSize = computed(() => {\n if (this.poppedOut()) return null;\n if (this.floating()) return this.floatRect().height;\n\n return this.sideDocked() ? null : this.panelHeight();\n });\n\n protected panelInlineSize = computed(() => {\n if (this.poppedOut()) return null;\n if (this.floating()) return this.floatRect().width;\n\n return this.sideDocked() ? this.panelWidth() : null;\n });\n\n /** The floating panel's offset from the viewport's top-left, or `null` while it is docked. */\n protected panelInsetBlock = computed(() => (this.floating() ? this.floatRect().y : null));\n protected panelInsetInline = computed(() => (this.floating() ? this.floatRect().x : null));\n\n /**\n * The panel's rendered size, not its dragged one - the stylesheet clamps a dock (`min-block-size`,\n * `max-block-size: 90vh`) and it is the clamped size the page has to give up.\n */\n private panelSize = signalElementDimensions(this.panelEl);\n\n /** Which padding a docked panel asks of the page and how much, or `null` when it asks for none. */\n private pageReservation = computed(() => {\n const dock = this.dock();\n\n if (dock === 'float' || this.poppedOut() || !this.open() || !this.reservesSpace()) return null;\n\n const size = this.panelSize().offset;\n\n if (!size) return null;\n\n return { padding: DOCK_PADDING[dock], px: this.sideDocked() ? size.width : size.height };\n });\n\n /** Which section of the query detail is showing. Shared by the Queries tab and both drawers. */\n public detailTab = signal<DetailTab>(this.persisted.detailTab ?? 'overview');\n public selectedClientName = signal<string | null>(this.persisted.selectedClientName ?? null);\n public selectedQueryId = signal<string | null>(this.persisted.selectedQueryId ?? null);\n\n /** The form whose detail the Forms tab has expanded. */\n public selectedFormId = signal<string | null>(this.persisted.selectedFormId ?? null);\n\n // Independent per-drawer selection so no drawer shares the Queries tab's selection - or another\n // drawer's: opening a query from the Timeline must not also change what the Forms drawer shows. Each\n // is persisted the way the Queries tab's is, so a reload puts every drawer back on what it was showing.\n public stackSelectedQueryId = signal<string | null>(this.persisted.stackSelectedQueryId ?? null);\n public sequenceSelectedQueryId = signal<string | null>(this.persisted.sequenceSelectedQueryId ?? null);\n public batchSelectedQueryId = signal<string | null>(this.persisted.batchSelectedQueryId ?? null);\n public eventSelectedQueryId = signal<string | null>(this.persisted.eventSelectedQueryId ?? null);\n public formSelectedQueryId = signal<string | null>(this.persisted.formSelectedQueryId ?? null);\n public timelineSelectedQueryId = signal<string | null>(this.persisted.timelineSelectedQueryId ?? null);\n\n /** Free-text narrowing of the Queries list. Every whitespace-separated term has to match. */\n public queryFilter = signal(this.persisted.queryFilter ?? '');\n\n /** The status facets the Queries list is narrowed to. Empty means no status narrowing. */\n public queryFacets = signal<ReadonlySet<QueryListFacet>>(new Set(this.persisted.queryFacets ?? []));\n\n /**\n * Which way the Queries list sorts by last-executed time. Only the direction is switchable - the field\n * is not, because \"which one just ran\" is the question the column exists to answer.\n */\n public queryRecentFirst = signal(this.persisted.queryRecentFirst ?? true);\n\n /**\n * Whether the Queries list is arranged as a tree of route paths. Off by default: the flat list is\n * still the right shape for \"what ran just now\", which is what the tab is opened for most of the time.\n */\n public queryTreeView = signal(this.persisted.queryTreeView ?? false);\n\n /**\n * The path folders the user closed. Collapsed rather than expanded, because a tree that opens closed\n * shows nothing but the top segment of every route - which answers no question the flat list didn't.\n */\n public collapsedQueryPaths = signal<ReadonlySet<string>>(new Set(this.persisted.collapsedQueryPaths ?? []));\n\n /**\n * The entry ids sorted to the top of the Queries list. Ids are derived from a stable descriptor plus a\n * per-descriptor sequence number, so a pin survives a reload as long as queries are created in the same\n * order - the same property the restored selection already relies on.\n */\n public pinnedQueryIds = signal<ReadonlySet<string>>(new Set(readPinnedQueryIds()));\n\n public eventLog = signal<EventLogItem[]>([]);\n\n /**\n * The cache entries that are gone, newest first. Kept here rather than in the repository, which stays\n * lean in production - it emits the teardown and forgets it.\n */\n public droppedCacheEntries = signal<DroppedCacheEntry[]>([]);\n\n /** The client (by base URL) the event log is scoped to, or `null` for all of them. */\n public eventClient = signal<string | null>(this.persisted.eventClient ?? null);\n\n /** Whether the event log is narrowed to failures - the rows a bug report is about. */\n public eventErrorsOnly = signal(this.persisted.eventErrorsOnly ?? false);\n\n /** Free-text narrowing of every socket's message log. Matches the event, the room and the direction. */\n public socketFilter = signal(this.persisted.socketFilter ?? '');\n\n /** The cache entry whose response is expanded, as `<client>|<key>`, or `null` while none is. */\n private expandedCacheKey = signal<string | null>(null);\n\n /** The socket whose emit box last failed, so the message shows on that card and no other. */\n private socketEmitError = signal<{ entryId: string; message: string } | null>(null);\n\n /** Keys (`<entryId>:<stepIndex>`) of the sequence steps whose in/out detail is expanded. */\n private expandedSteps = signal<ReadonlySet<string>>(new Set(this.persisted.expandedSteps ?? []));\n\n /** Keys (`<entryId>:<itemIndex>`) of the batch items whose args/response detail is expanded. */\n private expandedBatchItems = signal<ReadonlySet<string>>(new Set(this.persisted.expandedBatchItems ?? []));\n\n /** Keys of the Queries-list groups the user opened - the tab is rebuilt on every switch back. */\n public expandedQueryGroups = signal<ReadonlySet<string>>(new Set(this.persisted.expandedQueryGroups ?? []));\n\n /** Shared value-explorer search term. */\n public jsonSearch = signal(this.persisted.jsonSearch ?? '');\n public jsonSearchTerm = computed(() => this.jsonSearch().trim().toLowerCase());\n\n /** Path-keyed value-explorer expansion overrides (persisted so open trees survive a reload). */\n public jsonExpandedPaths = signal<ReadonlySet<string>>(new Set(this.persisted.jsonExpanded ?? []));\n public jsonCollapsedPaths = signal<ReadonlySet<string>>(new Set(this.persisted.jsonCollapsed ?? []));\n\n /** Bound callback passed into the value explorer to persist per-path expansion. Assigned in the constructor. */\n public toggleJsonPath: (path: string, expand: boolean) => void;\n\n /** The run whose response the diff is comparing, by run index, or `null` while no diff is open. */\n public diffRunIndex = signal<number | null>(null);\n\n /**\n * The run the diff compares it *against*, or `null` to derive that side - the newest older run that\n * still holds a body, which is what one click on **Diff** gives you.\n */\n public diffBaseRunIndex = signal<number | null>(null);\n\n public errorRunIndex = signal<number | null>(null);\n\n /** How many bodies a query retains, which is what bounds how far back a diff can reach. */\n public retainedResponseCount = computed(queryDevtoolsResponseHistory);\n\n /** JIT editor state (response / args editing on the selected query). */\n public editorMode = signal<'none' | 'response' | 'args'>('none');\n public responseDraft = signal('');\n public argsDraft = signal('');\n\n /**\n * The text the currently open editor was seeded with. The textareas bind `value` to this and not to\n * the live draft: a `value` binding fed by the draft is written back on every keystroke, and writing\n * a textarea's `value` puts the caret at the end.\n */\n public editorSeed = '';\n public editError = signal<string | null>(null);\n\n /** The args the open editor was seeded from, so applying can put back what the draft cannot carry. */\n private editedArgsSource: Record<string, unknown> | null = null;\n\n /** Transient \"Copied!\" feedback for the copy-report, copy-as-Insomnia / cURL and copy-document actions. */\n public copiedReport = signal(false);\n public copiedInsomnia = signal(false);\n public copiedCurl = signal(false);\n public copiedGql = signal(false);\n public copiedRoute = signal(false);\n private copiedReset$ = new Subject<void>();\n\n /** 1-second tick driving the cache freshness countdowns. */\n private clock = toSignal(interval(1000), { initialValue: 0 });\n\n /**\n * The probe lock behind every Locks row's \"this tab\" answer, and the last snapshot read through it.\n * Both only exist while the Locks tab is on screen - see the polling stream in the constructor.\n */\n private probeLocks = createQueryKeyLockManager(DEVTOOLS_PROBE_NAMESPACE);\n private probeId = randomId();\n private probeHold: QueryKeyLockHold | null = null;\n private lockSnapshot = signal<LockManagerSnapshot | null>(null);\n\n public lockRows = computed<DevtoolsLockRow[] | null>(() => {\n if (!this.probeLocks.isSupported) return null;\n\n const snapshot = this.lockSnapshot();\n\n if (!snapshot) return [];\n\n return summarizeLocks({ snapshot, clientId: probeClientId(snapshot, devtoolsProbeLockName(this.probeId)) });\n });\n\n /** \"Inspect\" mode: hover the live UI to find the query that a component created. */\n protected inspectActive = signal(false);\n protected inspectHover = signal<{ rect: DOMRect; entries: QueryDevtoolsEntry[] } | null>(null);\n\n /** Inspect run backwards: the box drawn over the element the selected query was created in. */\n protected locatedRect = signal<DOMRect | null>(null);\n public locateState = signal<'idle' | 'located' | 'offscreen'>('idle');\n private locate$ = new Subject<Element | null>();\n\n /** When set (via inspect), the Queries list is filtered to exactly these entry ids. */\n public inspectFilterIds = signal<string[] | null>(this.persisted.inspectFilterIds ?? null);\n\n private queryEntries = computed(() => queryDevtoolsEntries().filter((e) => e.kind === 'query'));\n\n /**\n * The queries that still exist. Everything that measures what the application is doing right now -\n * the tab bar's error flags, the tamper dot, the timeline, the identity match behind an event row -\n * reads this rather than {@link queryEntries}, so a tombstone never inflates a live number.\n */\n private liveQueryEntries = computed(() => this.queryEntries().filter((e) => !e.destroyedAt));\n\n protected panelTampered = computed(\n () =>\n this.liveQueryEntries().some((entry) => this.isTampered(entry)) ||\n Object.keys(queryDevtoolsTokenTtls()).length > 0,\n );\n\n public stackEntries = computed(() =>\n queryDevtoolsEntries().filter((e) => e.kind === 'query-stack' || e.kind === 'paged-query-stack'),\n );\n\n public sequenceEntries = computed(() => queryDevtoolsEntries().filter((e) => e.kind === 'query-sequence'));\n\n public batchEntries = computed(() => queryDevtoolsEntries().filter((e) => e.kind === 'query-batch'));\n\n public formEntries = computed(() => queryDevtoolsEntries().filter((e) => e.kind === 'query-form'));\n\n public authEntries = computed(() => queryDevtoolsEntries().filter((e) => e.kind === 'auth-provider'));\n\n public wsEntries = computed(() => queryDevtoolsEntries().filter((e) => e.kind === 'ws-client'));\n\n /** Unique client names present across queries and auth providers, for the Queries-tab picker. */\n public clientNames = computed(() => {\n const names = new Set<string>();\n for (const entry of queryDevtoolsEntries()) {\n if (entry.meta.clientName) names.add(entry.meta.clientName);\n }\n return Array.from(names).sort();\n });\n\n /** Unique repositories (with their client name + base URL) used by the Cache and Events tabs. */\n private repositories = computed(() => {\n const map = new Map<QueryRepository, { name: string; baseUrl: string; client: QueryClient | null }>();\n for (const entry of queryDevtoolsEntries()) {\n const repo = entry.meta.repository;\n if (repo && !map.has(repo)) {\n map.set(repo, {\n name: entry.meta.clientName ?? 'unknown',\n baseUrl: entry.meta.clientBaseUrl ?? '',\n client: entry.meta.client ?? null,\n });\n }\n }\n return Array.from(map, ([repository, info]) => ({ repository, ...info }));\n });\n\n /**\n * Every client the Faults tab can arm, with the fault it currently carries. Clients with nothing armed\n * read as {@link EMPTY_QUERY_DEVTOOLS_FAULT} so the inputs always have a value to show.\n */\n public faultClients = computed(() => {\n const faults = queryDevtoolsFaults();\n\n return this.repositories()\n .map(({ name, baseUrl }) => {\n const fault = faults[name] ?? EMPTY_QUERY_DEVTOOLS_FAULT;\n\n return { name, baseUrl, fault, armed: isQueryDevtoolsFaultArmed(fault) };\n })\n .sort((a, b) => a.name.localeCompare(b.name));\n });\n\n /**\n * The names of the clients currently carrying a fault, or `null` when none do - so a template can `@if`\n * on it. Armed faults are the one state where the panel is lying to the app on purpose, and a badge on a\n * tab that isn't open cannot say that: whichever tab you are reading, a red response has to be\n * attributable to the injection rather than to the API.\n */\n protected armedFaultClients = computed(() => {\n const armed = this.faultClients()\n .filter((client) => client.armed)\n .map((client) => client.name);\n\n return armed.length ? armed : null;\n });\n\n /**\n * The routes currently answered by a designed mock, for the shell's banner. A mocked response is a\n * stronger lie than an override - nothing was sent at all - so it is named above every tab, not just\n * badged on the one that armed it.\n */\n protected armedMockRoutes = computed(() => {\n const armed = queryDevtoolsArmedMocks();\n const routes = queryDevtoolsMocks()\n .filter((mock) => armed.has(mock.id))\n .map((mock) => `${mock.method} ${mock.pattern}`);\n\n return routes.length ? routes : null;\n });\n\n /**\n * The queries the list is scoped to before the search box and the status chips narrow them further:\n * either the picked client's, or exactly the inspected element's.\n */\n public scopedQueries = computed(() => {\n const entries = this.queryEntries();\n const inspectIds = this.inspectFilterIds();\n\n if (inspectIds) return entries.filter((e) => inspectIds.includes(e.id));\n\n const client = this.selectedClientName();\n\n return client ? entries.filter((e) => e.meta.clientName === client) : entries;\n });\n\n /** How many runs every query has recorded, for the Timeline tab's badge. */\n private runTotals = computed<TabBadge>(() => {\n let count = 0;\n let errors = 0;\n\n for (const entry of this.queryEntries()) {\n for (const run of entry.stats?.runs() ?? []) {\n count++;\n if (run.status === 'error') errors++;\n }\n }\n\n return { count, errors };\n });\n\n /** Cache entries across every client, for the Cache tab's badge. */\n private cacheEntryCount = computed(() =>\n this.repositories().reduce((total, { repository }) => {\n // Read the version signal so the badge recounts on every cache mutation.\n repository.subtle.cacheVersion();\n\n return total + repository.subtle.cacheEntries().length;\n }, 0),\n );\n\n /**\n * What each tab holds, so a failing query in a tab that is not open is still visible. Reading it\n * subscribes the tab bar to every entry's live state - which is the point of the badges.\n */\n protected tabBadges = computed<Record<DevtoolsTab, TabBadge>>(() => {\n const queries = this.liveQueryEntries();\n const stacks = this.stackEntries();\n const sequences = this.sequenceEntries();\n const batches = this.batchEntries();\n const events = this.eventLog();\n\n return {\n queries: {\n // Live queries only, so the badge and the list agree: the list leaves tombstones out until the\n // Gone chip asks for them. A frozen failure is history too, so it never sets the error flag.\n count: queries.length,\n errors: queries.filter((entry) => this.queryStatus(entry.handle as AnyQuery) === 'error').length,\n },\n stacks: {\n count: stacks.length,\n errors: stacks.filter((entry) =>\n entry.kind === 'paged-query-stack' ? !!this.asPagedStack(entry).error() : !!this.asStack(entry).anyError(),\n ).length,\n },\n sequences: {\n count: sequences.length,\n errors: sequences.filter((entry) => (this.asSequence(entry)?.failedAt() ?? null) !== null).length,\n },\n // A batch tolerates a partial failure by design, so the flag counts the runs that lost an item -\n // the number a bulk edit is judged on - rather than the batches that failed outright.\n batches: {\n count: batches.length,\n errors: batches.filter((entry) => this.asBatch(entry)?.failed() > 0).length,\n errorNoun: 'partial',\n },\n forms: { count: this.formEntries().length, errors: 0 },\n auth: { count: this.authEntries().length, errors: 0 },\n ws: { count: this.wsEntries().length, errors: 0 },\n cache: { count: this.cacheEntryCount(), errors: 0 },\n // Not a count of locks: the tab only reads them while it is open, so a badge would have to poll\n // the whole origin whenever the panel is - and the tab bar folds an uncounted tab behind \"More\".\n locks: { count: 0, errors: 0 },\n timeline: this.runTotals(),\n events: {\n count: events.length,\n errors: events.filter((event) => event.type === 'request-error').length,\n },\n // Armed faults are reported as errors rather than as a plain count: the badge is the one reminder\n // that the app is misbehaving on purpose, and it has to be impossible to read as \"all good\".\n faults: { count: 0, errors: Object.keys(queryDevtoolsFaults()).length, errorNoun: 'armed' },\n // Armed mocks are errors for the same reason armed faults are: the count that matters is how much\n // of the app is being answered by the panel, and it must be impossible to read as \"all good\".\n mocks: { count: queryDevtoolsMocks().length, errors: queryDevtoolsArmedMocks().size, errorNoun: 'armed' },\n about: { count: 0, errors: 0 },\n settings: { count: 0, errors: 0 },\n };\n });\n\n /**\n * The tabs the bar shows: the pinned ones, the one that is open, and every tab that currently holds\n * something.\n */\n protected visibleTabs = computed(() => this.tabs.filter((tab) => this.isTabPrimary(tab.id)));\n\n /** The empty tabs, which the bar offers behind \"More\" instead. */\n protected overflowTabs = computed(() => this.tabs.filter((tab) => !this.isTabPrimary(tab.id)));\n\n public selectedQuery = computed(() => this.findQuery(this.selectedQueryId()));\n public stackSelectedQuery = computed(() => this.findQuery(this.stackSelectedQueryId()));\n public sequenceSelectedQuery = computed(() => this.findQuery(this.sequenceSelectedQueryId()));\n public batchSelectedQuery = computed(() => this.findQuery(this.batchSelectedQueryId()));\n public eventSelectedQuery = computed(() => this.findQuery(this.eventSelectedQueryId()));\n public formSelectedQuery = computed(() => this.findQuery(this.formSelectedQueryId()));\n public timelineSelectedQuery = computed(() => this.findQuery(this.timelineSelectedQueryId()));\n\n /**\n * The cache per client, with every entry's size measured. Reading each response inside the computed is\n * what keeps the totals current: a cache mutation bumps `cacheVersion`, but a response landing in an\n * entry that is already there does not.\n */\n public cacheView = computed(() => {\n const dropped = this.droppedCacheEntries();\n\n return this.repositories().map(({ repository, name, baseUrl, client }) => {\n // Read the version signal so this recomputes on every cache mutation.\n repository.subtle.cacheVersion();\n\n const rows = repository.subtle.cacheEntries().map((entry): CacheRow => {\n const measured = measureQueryDevtoolsPayload({ body: entry.request.response() });\n\n return { entry, bytes: measured.bytes, isEstimatedBytes: !measured.isExact && measured.bytes > 0 };\n });\n\n return {\n name,\n baseUrl,\n repository,\n rows,\n bytes: rows.reduce((total, row) => total + row.bytes, 0),\n isEstimatedBytes: rows.some((row) => row.isEstimatedBytes),\n unused: rows.filter((row) => row.entry.isUnused).length,\n pollStates: client?.subtle.sync?.lockManager.keyStates() ?? {},\n client,\n // The event log labels a client by its base URL, falling back to its name - match the same way.\n dropped: dropped.filter((entry) => entry.client === (baseUrl || name)),\n };\n });\n });\n\n /** Map of a component's host element to the query entries it created (for the inspect tool). */\n private elementQueryMap = computed(() => {\n const map = new Map<HTMLElement, QueryDevtoolsEntry[]>();\n for (const entry of this.queryEntries()) {\n const el = entry.meta.element;\n if (!el) continue;\n const list = map.get(el);\n if (list) list.push(entry);\n else map.set(el, [entry]);\n }\n return map;\n });\n\n /** Disarms every client's fault - the shell's \"Faults armed\" banner offers this above every tab. */\n protected readonly CLEAR_FAULTS = clearQueryDevtoolsFaults;\n\n /** Whether what is armed came back from a previous page load, which is what the bars have to say. */\n protected faultsRestored = computed(queryDevtoolsFaultsRestored);\n protected mocksRestored = computed(queryDevtoolsArmedMocksRestored);\n\n /** Stops serving every designed mock - the shell's \"Mocks armed\" banner offers the same way out. */\n protected readonly DISARM_MOCKS = clearQueryDevtoolsArmedMocks;\n\n /**\n * What the previous page load left armed: how many ops came back, how many queries took them, and the\n * ids nothing claimed. `null` when this page inherited nothing, so a template can `@if` on it.\n */\n protected restoredOverrides = computed(() => {\n const groups = restoredQueryDevtoolsOverrides();\n\n if (!groups.length) return null;\n\n const armed = groups.filter((group) => group.armed);\n const orphaned = groups.filter((group) => !group.armed);\n\n return {\n queries: armed.length,\n ops: armed.reduce((sum, group) => sum + group.count, 0),\n firstId: armed[0]?.id ?? null,\n orphaned: orphaned.map((group) => describeEntryId(group.id)),\n // `local` means they outlived closing the tab, which is a different thing to have to be told.\n fromLocalStorage: queryDevtoolsRestoredOverridesScope() === 'local',\n };\n });\n\n /** Drops everything the reload re-armed, and empties the store it came from. */\n protected readonly DROP_RESTORED_OVERRIDES = clearRestoredQueryDevtoolsOverrides;\n\n /** Every edge, so a float resizes the way a window does rather than only from one corner. */\n protected readonly FLOAT_RESIZE_EDGES: ResizeEdge[] = ['n', 's', 'e', 'w', 'ne', 'nw', 'se', 'sw'];\n\n constructor() {\n // Assigned here (not as an arrow property) so `this` is bound for the value-explorer callback.\n this.toggleJsonPath = (path: string, expand: boolean) => {\n const expanded = new Set(this.jsonExpandedPaths());\n const collapsed = new Set(this.jsonCollapsedPaths());\n\n if (expand) {\n expanded.add(path);\n collapsed.delete(path);\n } else {\n collapsed.add(path);\n expanded.delete(path);\n }\n\n this.jsonExpandedPaths.set(expanded);\n this.jsonCollapsedPaths.set(collapsed);\n };\n\n // Each copy restarts the countdown; switchMap drops the pending reset of the previous one.\n this.copiedReset$\n .pipe(\n switchMap(() => timer(COPIED_RESET_MS)),\n tap(() => {\n this.copiedReport.set(false);\n this.copiedInsomnia.set(false);\n this.copiedCurl.set(false);\n this.copiedGql.set(false);\n this.copiedRoute.set(false);\n }),\n takeUntilDestroyed(),\n )\n .subscribe();\n\n // The box has to follow the element for as long as the smooth scroll is moving it, so it tracks per\n // frame rather than measuring once. Each locate cancels the previous run's frames and its timeout.\n this.locate$\n .pipe(\n switchMap((element) => {\n // `NEVER` for the not-on-screen case: there is no box to move, but the button's reason has to\n // stay up for the same beat before `finalize` clears it.\n const frames = element\n ? animationFrames().pipe(tap(() => this.locatedRect.set(element.getBoundingClientRect())))\n : NEVER;\n\n return frames.pipe(\n takeUntil(timer(LOCATE_HOLD_MS)),\n finalize(() => {\n this.locatedRect.set(null);\n this.locateState.set('idle');\n }),\n );\n }),\n takeUntilDestroyed(),\n )\n .subscribe();\n\n // Web Locks has no change event, so the Locks tab polls - but a `locks.query()` per second is not a\n // `Date.now()` read, so it only runs while that tab is the one on screen and the page is visible.\n // The probe lock is taken for the same window: it is what tells this tab's rows from another tab's.\n toObservable(\n computed(\n () => this.probeLocks.isSupported && this.open() && this.activeTab() === 'locks' && this.isDocumentVisible(),\n ),\n )\n .pipe(\n tap((inspecting) => this.holdProbeLock(inspecting)),\n switchMap((inspecting) => (inspecting ? interval(1000).pipe(startWith(0)) : EMPTY)),\n switchMap(() => navigator.locks.query()),\n tap((snapshot) => this.lockSnapshot.set(snapshot)),\n takeUntilDestroyed(),\n )\n .subscribe();\n\n // Merge every live repository's event stream into the rolling log, re-subscribing as the set of\n // repositories changes. Composed with RxJS (not a subscribe-in-effect) per the styleguide.\n toObservable(this.repositories)\n .pipe(\n switchMap((repos) =>\n merge(\n ...repos.map(({ repository, name, baseUrl }) =>\n repository.events$.pipe(map((event) => ({ event, client: baseUrl || name }))),\n ),\n ),\n ),\n tap(({ event, client }) => this.pushEvent(event, client)),\n takeUntilDestroyed(),\n )\n .subscribe();\n\n // Both persistence effects below clear the key from *both* browser stores whenever their scope\n // changes, before writing it into the store that scope now names - otherwise the copy the old scope\n // left behind would be what the next page load reads.\n let viewStateScope: QueryDevtoolsStorageScope | null = null;\n\n effect(() => {\n const scope = queryDevtoolsSettings().viewState;\n\n const state: PersistedState = {\n open: this.open(),\n height: this.panelHeight(),\n width: this.panelWidth(),\n listWidth: this.listWidth(),\n drawerWidth: this.drawerWidth(),\n listHeight: this.listHeight(),\n drawerHeight: this.drawerHeight(),\n dock: this.dock(),\n reservesSpace: this.reservesSpace(),\n floatRect: this.floatRect(),\n floatParked: this.floatParked(),\n activeTab: this.activeTab(),\n detailTab: this.detailTab(),\n selectedClientName: this.selectedClientName(),\n selectedQueryId: this.selectedQueryId(),\n stackSelectedQueryId: this.stackSelectedQueryId(),\n sequenceSelectedQueryId: this.sequenceSelectedQueryId(),\n batchSelectedQueryId: this.batchSelectedQueryId(),\n eventSelectedQueryId: this.eventSelectedQueryId(),\n formSelectedQueryId: this.formSelectedQueryId(),\n timelineSelectedQueryId: this.timelineSelectedQueryId(),\n selectedFormId: this.selectedFormId(),\n inspectFilterIds: this.inspectFilterIds(),\n queryFilter: this.queryFilter(),\n queryFacets: [...this.queryFacets()],\n queryRecentFirst: this.queryRecentFirst(),\n queryTreeView: this.queryTreeView(),\n collapsedQueryPaths: [...this.collapsedQueryPaths()],\n eventClient: this.eventClient(),\n eventErrorsOnly: this.eventErrorsOnly(),\n socketFilter: this.socketFilter(),\n jsonSearch: this.jsonSearch(),\n expandedSteps: [...this.expandedSteps()],\n expandedBatchItems: [...this.expandedBatchItems()],\n expandedQueryGroups: [...this.expandedQueryGroups()],\n jsonExpanded: [...this.jsonExpandedPaths()],\n jsonCollapsed: [...this.jsonCollapsedPaths()],\n };\n\n if (scope !== viewStateScope) {\n clearQueryDevtoolsStore(STORAGE_KEY);\n viewStateScope = scope;\n }\n\n writeQueryDevtoolsStore(scope, STORAGE_KEY, state);\n });\n\n // `border-box` is what makes the padding eat into a `height: 100%` shell instead of pushing it past\n // the edge of the window; with the root's default `auto` height it changes nothing. The cleanup runs\n // before each re-run, so the edge a dock switch left behind is always given back.\n effect((onCleanup) => {\n const reservation = this.pageReservation();\n\n if (!reservation) return;\n\n const root = this.document.documentElement;\n\n this.renderer.setStyle(root, { boxSizing: 'border-box', [reservation.padding]: `${reservation.px}px` });\n\n onCleanup(() => this.renderer.removeStyles(root, 'boxSizing', reservation.padding));\n });\n\n // A window that shrinks below the floating panel would otherwise leave it half (or wholly) off\n // screen, with no edge left to grab. Untracked on the way in so clamping cannot re-trigger itself.\n effect(() => {\n const viewport = this.viewport();\n\n if (!this.floating()) return;\n\n untracked(() =>\n this.floatRect.set(\n this.floatParked()\n ? clampFloatToPeek(this.floatRect(), viewport)\n : clampFloatRect(this.floatRect(), viewport),\n ),\n );\n });\n\n let pinsScope: QueryDevtoolsStorageScope | null = null;\n\n effect(() => {\n const scope = queryDevtoolsSettings().pins;\n const ids = [...this.pinnedQueryIds()];\n\n if (scope !== pinsScope) {\n clearQueryDevtoolsStore(PINS_STORAGE_KEY);\n pinsScope = scope;\n }\n\n writeQueryDevtoolsStore(scope, PINS_STORAGE_KEY, ids);\n });\n\n // A lowered cap has to bite now rather than at the next request, or the log it was lowered to shorten\n // stays exactly as long as it was.\n effect(() => {\n const cap = queryDevtoolsSettings().maxEvents;\n\n untracked(() => this.eventLog.update((log) => (log.length > cap ? log.slice(0, cap) : log)));\n });\n\n // Close any open JIT editor on any selection / tab change, and reset the value-explorer search\n // when the *selected query* actually changes (but not on the initial restore, so a persisted\n // search survives a reload).\n this.lastSelectionKey = this.selectionKey();\n effect(() => {\n const key = this.selectionKey();\n this.activeTab();\n\n this.editorMode.set('none');\n this.editError.set(null);\n this.copiedReport.set(false);\n this.copiedInsomnia.set(false);\n this.copiedCurl.set(false);\n this.copiedRoute.set(false);\n this.diffRunIndex.set(null);\n this.diffBaseRunIndex.set(null);\n this.errorRunIndex.set(null);\n\n if (key !== this.lastSelectionKey) {\n this.lastSelectionKey = key;\n this.jsonSearch.set('');\n }\n });\n\n registerEthleteVersion('components', COMPONENTS_VERSION);\n registerEthleteVersion('query-devtools', QUERY_DEVTOOLS_VERSION);\n\n // A pop-out holds the panel element; leaving its window open would leave a dead panel on screen.\n this.destroyRef.onDestroy(() => this.closePopup());\n\n const doc = this.document;\n\n // Angular does not destroy the application when the host page unloads, so the clean-up above never\n // runs on a reload - the pop-up would outlive the document whose panel it holds and keep showing a\n // panel no signal can ever update again. `pagehide` rather than `beforeunload`: the latter is\n // unreliable and keeps the page out of the back/forward cache.\n const view = doc.defaultView;\n\n if (view) {\n fromEvent(view, 'pagehide')\n .pipe(\n tap(() => this.closePopup()),\n takeUntilDestroyed(),\n )\n .subscribe();\n }\n\n // Global toggle shortcut: Ctrl/Cmd + Alt + Q (\"Q\" for Query) - uncommon, no browser/OS conflict.\n // Matched on `code` (the physical key), not `key`: on macOS, Option rewrites `key` to the layout's\n // alternate glyph (Option+Q is \"œ\" on a US layout), so a `key === 'q'` test never fires there.\n fromEvent<KeyboardEvent>(doc, 'keydown')\n .pipe(\n filter((e) => (e.ctrlKey || e.metaKey) && e.altKey && (e.code === 'KeyQ' || e.key.toLowerCase() === 'q')),\n tap((e) => {\n e.preventDefault();\n this.toggleOpen();\n }),\n takeUntilDestroyed(),\n )\n .subscribe();\n\n // Drag-to-resize: while a resize is in progress, track pointer movement on the document. A pointer\n // released outside the window never reports its `pointerup`, so a move that arrives with no button\n // held ends the drag instead of resizing - otherwise the panel would keep following the pointer.\n toObservable(this.drag)\n .pipe(\n switchMap((active) =>\n active\n ? merge(\n fromEvent<PointerEvent>(active.doc, 'pointermove').pipe(\n tap((e) => (e.buttons === 0 ? this.drag.set(null) : this.applyResize(active, e))),\n ),\n merge(\n fromEvent<PointerEvent>(active.doc, 'pointerup'),\n fromEvent<PointerEvent>(active.doc, 'pointercancel'),\n ).pipe(tap(() => this.drag.set(null))),\n )\n : EMPTY,\n ),\n takeUntilDestroyed(),\n )\n .subscribe();\n\n // Inspect mode: while active, listen on the document to map the hovered element to a query.\n const capture = { capture: true };\n toObservable(this.inspectActive)\n .pipe(\n tap((active) => {\n if (!active) this.inspectHover.set(null);\n }),\n switchMap((active) =>\n active\n ? merge(\n fromEvent<MouseEvent>(doc, 'mousemove', capture).pipe(tap((e) => this.updateInspectHover(e))),\n fromEvent<MouseEvent>(doc, 'click', capture).pipe(tap((e) => this.selectInspectedQuery(e))),\n fromEvent<KeyboardEvent>(doc, 'keydown', capture).pipe(\n tap((e) => {\n if (e.key === 'Escape') this.inspectActive.set(false);\n }),\n ),\n )\n : EMPTY,\n ),\n takeUntilDestroyed(),\n )\n .subscribe();\n }\n\n public ngOnInit() {\n if (this.startOpen()) this.open.set(true);\n }\n\n /** @see queryDevtoolsOverridePersistence */\n public overridesPersist() {\n return queryDevtoolsOverridePersistence();\n }\n\n public toggleOverridesPersist() {\n setQueryDevtoolsOverridePersistence(!this.overridesPersist());\n }\n\n /** Where armed overrides are kept, as the drawer's toggle and the Settings picker both name it. */\n public overridesScopeLabel() {\n const scope = queryDevtoolsSettings().overrides;\n\n return scope === 'none' ? 'not kept' : `${scope}Storage`;\n }\n\n /**\n * Puts the panel back the way it ships: layout, filters, selections, pins and the stored overrides.\n * The settings themselves stay - a panel behaving oddly is a reason to reset its state, not to lose the\n * scopes and limits that were chosen deliberately.\n *\n * Resetting the live state is the point, not just clearing the keys: the persistence effects would\n * write the current state straight back into whatever store the scopes name.\n */\n public resetDevtools() {\n clearQueryDevtoolsStore(STORAGE_KEY);\n clearQueryDevtoolsStore(PINS_STORAGE_KEY);\n clearQueryDevtoolsOverrideStore();\n clearQueryDevtoolsMockStore();\n\n this.dock.set('bottom');\n this.reservesSpace.set(true);\n this.panelHeight.set(DEFAULT_HEIGHT);\n this.panelWidth.set(DEFAULT_WIDTH);\n this.floatRect.set(DEFAULT_FLOAT_RECT);\n this.floatParked.set(false);\n this.listWidth.set(null);\n this.drawerWidth.set(null);\n this.listHeight.set(null);\n this.drawerHeight.set(null);\n\n this.activeTab.set('queries');\n this.detailTab.set('overview');\n this.pinnedQueryIds.set(new Set());\n this.inspectFilterIds.set(null);\n\n this.selectedClientName.set(null);\n this.selectedQueryId.set(null);\n this.selectedFormId.set(null);\n this.stackSelectedQueryId.set(null);\n this.sequenceSelectedQueryId.set(null);\n this.batchSelectedQueryId.set(null);\n this.eventSelectedQueryId.set(null);\n this.formSelectedQueryId.set(null);\n this.timelineSelectedQueryId.set(null);\n\n this.queryFilter.set('');\n this.queryFacets.set(new Set());\n this.queryRecentFirst.set(true);\n this.queryTreeView.set(false);\n this.collapsedQueryPaths.set(new Set());\n this.expandedQueryGroups.set(new Set());\n this.expandedSteps.set(new Set());\n this.expandedBatchItems.set(new Set());\n this.eventClient.set(null);\n this.eventErrorsOnly.set(false);\n this.socketFilter.set('');\n this.jsonSearch.set('');\n this.jsonExpandedPaths.set(new Set());\n this.jsonCollapsedPaths.set(new Set());\n }\n\n /**\n * Opens Settings over whatever tab is showing, and the same click closes it again. Settings is not in\n * the tab bar - see {@link DevtoolsTab}.\n */\n protected toggleSettings() {\n if (this.activeTab() === 'settings') {\n this.activeTab.set(this.tabBeforeSettings);\n\n return;\n }\n\n this.tabBeforeSettings = this.activeTab();\n this.activeTab.set('settings');\n }\n\n /** Opens the first query the reload re-armed, so the banner leads somewhere rather than just warning. */\n protected reviewRestoredOverrides(id: string) {\n this.activeTab.set('queries');\n this.selectedQueryId.set(id);\n this.detailTab.set('overview');\n }\n\n /**\n * Closing while popped out docks back instead: the panel a pop-out shows is the very element the\n * `@if` below would destroy, so it has to come home before it can be closed.\n */\n protected toggleOpen() {\n if (this.poppedOut()) {\n this.dockBack();\n\n return;\n }\n\n this.open.update((v) => !v);\n }\n\n protected floatPanel() {\n this.popOutBlocked.set(false);\n this.dock.set('float');\n }\n\n protected selectLayout(layout: DevtoolsLayout) {\n if (layout === 'popout') {\n this.popOut();\n\n return;\n }\n\n this.popOutBlocked.set(false);\n this.dock.set(layout);\n }\n\n /**\n * Moves the panel into a window of its own - the same element, adopted by the pop-up's document, so\n * every signal binding in it keeps updating from the app it is inspecting.\n *\n * The panel's styles are global `<style>` tags in the host document, and the theming tokens it reads\n * hang off the root element, so both are copied over; without them the pop-out renders unstyled.\n */\n public popOut() {\n const panel = this.panelEl()?.nativeElement;\n\n if (!panel || this.poppedOut()) return;\n\n // Navigated to rather than written into: a pop-up left on `about:blank` keeps its URL as the window\n // title whatever `document.title` says, and a document written into one is quirks-mode - where a\n // table ignores the font size it inherits, so the Cache and Events tables come out half again as\n // large as the panel around them. The blob carries the doctype and the title with it instead.\n const source = createObjectUrlHandle(new Blob([POPOUT_DOCUMENT], { type: 'text/html' }));\n const popup = source.url ? this.document.defaultView?.open(source.url, 'et-query-devtools', POPOUT_FEATURES) : null;\n\n if (!popup) {\n source.revoke();\n this.popOutBlocked.set(true);\n\n return;\n }\n\n this.popOutBlocked.set(false);\n\n // That navigation replaces the pop-up's document, so the panel may only be moved once the new one is\n // there - a panel appended to the initial empty document would be dropped on load.\n fromEvent(popup, 'load')\n .pipe(\n take(1),\n tap(() => {\n source.revoke();\n this.zone.run(() => this.mountPopOut(popup, panel));\n }),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe();\n }\n\n public selectClient(name: string | null) {\n this.selectedClientName.set(name);\n this.inspectFilterIds.set(null);\n }\n\n public clearInspectFilter() {\n this.inspectFilterIds.set(null);\n }\n\n public toggleFacet(facet: QueryListFacet) {\n const next = new Set(this.queryFacets());\n\n if (!next.delete(facet)) next.add(facet);\n\n this.queryFacets.set(next);\n }\n\n /** Drops the search term and the status chips, keeping the client / inspection scope. */\n public clearQueryFilters() {\n this.queryFilter.set('');\n this.queryFacets.set(new Set());\n }\n\n public isQueryPinned(entry: QueryDevtoolsEntry) {\n return this.pinnedQueryIds().has(entry.id);\n }\n\n public toggleQueryPath(key: string) {\n const next = new Set(this.collapsedQueryPaths());\n\n if (!next.delete(key)) next.add(key);\n\n this.collapsedQueryPaths.set(next);\n }\n\n public toggleQueryPin(entry: QueryDevtoolsEntry) {\n const next = new Set(this.pinnedQueryIds());\n\n if (!next.delete(entry.id)) next.add(entry.id);\n\n this.pinnedQueryIds.set(next);\n }\n\n protected toggleInspect() {\n this.inspectActive.update((v) => !v);\n }\n\n protected startResize(event: PointerEvent) {\n event.preventDefault();\n this.drag.set({ kind: 'panel', doc: this.document });\n }\n\n protected moveFloat(move: DragMoveEvent) {\n this.floatRect.update((rect) =>\n clampFloatToPeek({ ...rect, x: rect.x + move.stepX, y: rect.y + move.stepY }, this.viewport()),\n );\n }\n\n /** Parks the panel where a drag left it, or pulls it back in if the drag stopped short of an edge. */\n protected endFloatMove() {\n const settled = settledFloatRect(this.floatRect(), this.viewport());\n\n this.floatRect.set(settled.rect);\n this.floatParked.set(settled.collapsed);\n }\n\n /** A click on the title bar of a parked panel brings it back - the gesture that parked it, reversed. */\n protected restoreFloat() {\n if (!this.floatParked()) return;\n\n this.floatRect.update((rect) => clampFloatRect(rect, this.viewport()));\n this.floatParked.set(false);\n }\n\n /** A resize reports a delta from where the pointer went down, so the rect it started from is kept. */\n protected startFloatResize() {\n this.floatResizeBase = this.floatRect();\n }\n\n protected resizeFloat(move: ResizeMoveEvent) {\n this.floatRect.set(resizedFloatRect(this.floatResizeBase ?? this.floatRect(), { move, viewport: this.viewport() }));\n }\n\n protected endFloatResize() {\n this.floatResizeBase = null;\n }\n\n public startPaneResize(event: PointerEvent, target: { pane: PaneTarget; container: HTMLElement }) {\n event.preventDefault();\n this.drag.set({ kind: 'pane', ...target, axis: this.paneAxis(), doc: target.container.ownerDocument });\n }\n\n /** Hands a pane back to the stylesheet's proportional default, on the axis it is being sized along. */\n public resetPaneSize(pane: PaneTarget) {\n this.paneSize(pane, this.paneAxis()).set(null);\n }\n\n protected inspectLabel(entries: QueryDevtoolsEntry[]) {\n const first = entries[0];\n if (entries.length === 1 && first) {\n return `${first.meta.method ?? ''} ${this.queryRoute(first, first.handle as AnyQuery)}`.trim();\n }\n return `${entries.length} queries`;\n }\n\n /**\n * A query's route, split so the template can tell its static path from its path params (each carrying\n * the value the query used, or `:<name>` while it has none yet) and from the query string of the\n * request that ran - which is what tells two requests to the same endpoint apart.\n */\n public routeSegments(entry: QueryDevtoolsEntry | undefined, query: AnyQuery): RouteSegment[] {\n const path = this.renderRoute(entry, this.queryArgs(query));\n const search = query.subtle.request()?.url.split('?')[1];\n\n // Only onto a route that rendered: an entry with no route at all reads as no route, not as a bare\n // query string.\n return search && path.length ? [...path, { text: `?${search}`, kind: 'query' }] : path;\n }\n\n /** The full URL of the request a query last made, or `null` while it has not executed. */\n public requestUrl(query: AnyQuery) {\n return query.subtle.request()?.url ?? null;\n }\n\n /**\n * The args of a query. A query executed imperatively (`execute({ args })`, a sequence step, an auth\n * query) never writes them to its own `args` signal - only the `withArgs` feature does - so the args\n * its current request was built from stand in.\n */\n public queryArgs(query: AnyQuery) {\n return query.args() ?? query.subtle.request()?.args ?? null;\n }\n\n public queryStatus(query: AnyQuery): QueryStatus {\n const state = query.executionState();\n if (!state) return 'idle';\n if (state.type === 'loading') return 'loading';\n if (state.type === 'failure') return 'error';\n return 'success';\n }\n\n /**\n * A request in flight is already refreshing, so reporting it as stale on top of `loading` is noise -\n * the same precedence the cache tab's freshness column applies.\n */\n public isStale(query: AnyQuery) {\n try {\n const request = query.subtle.request();\n\n if (!request || request.loading()) return false;\n\n return request.isStale();\n } catch {\n return false;\n }\n }\n\n /**\n * Whether an entry is showing something other than what the server actually sent - an armed response\n * override, or a devtools fault that decided its last completed run. Deliberately not \"a fault is\n * armed nearby\": an armed-but-idle fault (a `failRate` under 100, say) mostly lets requests through\n * untouched, so that would over-claim for the vast majority of queries on that client.\n */\n public isTampered(entry: QueryDevtoolsEntry) {\n return (\n (entry.overrides?.list().length ?? 0) > 0 ||\n (entry.stats?.current().lastResponseWasFaulted ?? false) ||\n this.isMocked(entry)\n );\n }\n\n /** Whether a designed mock is armed for this query's own route, so nothing it shows came off the wire. */\n public isMocked(entry: QueryDevtoolsEntry) {\n if (!entry.meta.route) return false;\n\n const id = queryDevtoolsMockId({\n clientName: entry.meta.clientName ?? '',\n method: entry.meta.method ?? 'GET',\n pattern: entry.meta.route,\n });\n\n return queryDevtoolsArmedMocks().has(id);\n }\n\n /**\n * What a query's current request is doing beyond being loading, or `null` when there is nothing beyond\n * the status dot to say - so the readout only takes up room while it carries something.\n */\n public requestProgress(query: AnyQuery): RequestProgress | null {\n const request = query.subtle.request();\n\n if (!request) return null;\n\n const retry = request.subtle.retryState();\n const attempts = request.subtle.attempts();\n // The request's own loading state, not the query's: a forced loading state carries no progress, and\n // reading the query's would report the forced one as a transfer that never started.\n const progress = request.loading()?.progress ?? null;\n\n if (!retry && !progress && attempts < 2) return null;\n\n // The countdown is a `Date.now()` comparison, so the clock is what makes it tick down - the same trap\n // `isStale` documents.\n this.clock();\n\n return { attempts, retry, retryInMs: retry ? Math.max(0, retry.startsAt - Date.now()) : null, progress };\n }\n\n /** Why a retry was scheduled, as the panel spells it out. A status of 0 never reached the server. */\n public retryCause(status: number) {\n return status ? `after ${status}` : 'after a connection failure';\n }\n\n public formatPercent(percentage: number) {\n return `${Math.round(percentage)}%`;\n }\n\n /** A countdown in whole seconds, spelled out the way the cache freshness column does. */\n public formatCountdown(ms: number | null) {\n return ms === null ? '—' : `${Math.ceil(ms / 1000)}s`;\n }\n\n public queryActivity(entry: QueryDevtoolsEntry): QueryActivity {\n return this.activityOf([entry.stats]);\n }\n\n public linkActivity(link: QueryLink): QueryActivity {\n return this.activityOf([link.stats]);\n }\n\n public stackActivity(stack: AnyQueryStack | AnyPagedQueryStack): QueryActivity {\n return this.activityOf(this.queriesForStack(stack).map((link) => link.stats));\n }\n\n public sequenceActivity(sequence: QuerySequence<unknown[]>): QueryActivity {\n return this.activityOf(this.queriesForSequence(sequence).map((link) => link.stats));\n }\n\n /** Clears an entry's counters and run history, so the next interaction can be measured on its own. */\n public resetStats(entry: QueryDevtoolsEntry) {\n entry.stats?.reset();\n this.diffRunIndex.set(null);\n this.diffBaseRunIndex.set(null);\n this.errorRunIndex.set(null);\n }\n\n /** A query's runs, newest first - the order a history is read in. */\n public queryRuns(entry: QueryDevtoolsEntry): QueryDevtoolsRun[] {\n return [...(entry.stats?.runs() ?? [])].reverse();\n }\n\n /**\n * What a run's status dot and timeline bar colour by. `pending` reuses the panel's loading colour;\n * `aborted` matches no rule and so falls back to the neutral one.\n */\n public runStatus(run: QueryDevtoolsRun) {\n return run.status === 'pending' ? 'loading' : run.status;\n }\n\n /**\n * Whether a run can be an end of the diff: it still holds its body, and so does some other run of the\n * same query. Deliberately not \"an *older* run\" - a free pair means the oldest body held is pickable\n * too, as the base of a comparison against something newer.\n */\n public canDiffRun(entry: QueryDevtoolsEntry, run: QueryDevtoolsRun) {\n if (!run.hasResponse) return false;\n\n return (entry.stats?.runs() ?? []).some((other) => other.hasResponse && other.index !== run.index);\n }\n\n /**\n * Arms a run as one end of the diff, or - with one end already armed - as the other. Clicking either\n * end clears both.\n */\n public toggleRunDiff(entry: QueryDevtoolsEntry, run: QueryDevtoolsRun) {\n const ends = this.diffEnds(entry);\n\n // Nothing armed to extend, so the click starts over - which is also how the slots recover after a\n // body was trimmed out from under one of them.\n if (!ends) {\n this.diffRunIndex.set(run.index);\n this.diffBaseRunIndex.set(null);\n\n return;\n }\n\n if (run.index === ends.before.index || run.index === ends.after?.index) {\n this.diffRunIndex.set(null);\n this.diffBaseRunIndex.set(null);\n\n return;\n }\n\n this.diffBaseRunIndex.set(run.index);\n }\n\n /** Which end of the comparison a run is, so a row says so and the two ends read differently. */\n public diffRunRole(entry: QueryDevtoolsEntry, run: QueryDevtoolsRun): 'base' | 'compare' | null {\n const ends = this.diffEnds(entry);\n\n if (!ends) return null;\n if (run.index === ends.before.index) return 'base';\n\n return run.index === ends.after?.index ? 'compare' : null;\n }\n\n public responseDiff(entry: QueryDevtoolsEntry) {\n const ends = this.diffEnds(entry);\n\n if (!ends?.after) return null;\n\n return {\n before: ends.before,\n after: ends.after,\n diff: diffQueryDevtoolsResponses(ends.before.response, ends.after.response),\n };\n }\n\n /** Whether the diff header's older/newer control has a pair to move to. */\n public canStepRunDiff(entry: QueryDevtoolsEntry, older: boolean) {\n return !!this.steppedDiffPair(entry, older);\n }\n\n /**\n * Moves the whole comparison one run older or newer, so re-picking a pair does not mean scrolling back\n * up to the runs table. Within the handful of retained bodies there are only a few pairs to walk.\n */\n public stepRunDiff(entry: QueryDevtoolsEntry, older: boolean) {\n const pair = this.steppedDiffPair(entry, older);\n\n if (!pair) return;\n\n this.diffBaseRunIndex.set(pair.before.index);\n this.diffRunIndex.set(pair.after.index);\n }\n\n public toggleRunError(run: QueryDevtoolsRun) {\n this.errorRunIndex.update((current) => (current === run.index ? null : run.index));\n }\n\n /**\n * The error body of the picked run. Read off the run rather than off `query.error()`, which is the\n * only other place a failure is legible and is blanked by anything that resets the query - a logout\n * resets every secure query, so a 401 is gone from there by the time it is looked for.\n */\n public pickedRunError(entry: QueryDevtoolsEntry) {\n const picked = this.errorRunIndex();\n\n if (picked === null) return null;\n\n const run = (entry.stats?.runs() ?? []).find((candidate) => candidate.index === picked);\n\n if (!run?.error?.hasBody) return null;\n\n return { run, error: run.error };\n }\n\n /** Opens a query in the Queries tab - the Events tab is a way in, not a dead end. */\n public selectQuery(id: string) {\n this.activeTab.set('queries');\n this.selectedQueryId.set(id);\n }\n\n /** A value on one line, for a diff row or a form field. The full tree would bury the row it sits in. */\n public inlineValue(value: unknown) {\n if (typeof value === 'string') return value.length > 80 ? `\"${value.slice(0, 80)}…\"` : `\"${value}\"`;\n if (value === undefined) return 'undefined';\n\n try {\n const json = JSON.stringify(value) ?? 'undefined';\n\n return json.length > 80 ? `${json.slice(0, 80)}…` : json;\n } catch {\n return '[unserializable]';\n }\n }\n\n public formatBytes(bytes: number) {\n if (bytes < 1000) return `${bytes} B`;\n if (bytes < 1_000_000) return `${(bytes / 1000).toFixed(1)} kB`;\n\n return `${(bytes / 1_000_000).toFixed(2)} MB`;\n }\n\n /**\n * A transferred size, marked `≈` when any part of it was measured from a decoded body instead of read\n * from a `content-length` header - such a size ignores transport compression.\n */\n public formatTransferred(bytes: number, isEstimated: boolean) {\n return `${isEstimated ? '≈' : ''}${this.formatBytes(bytes)}`;\n }\n\n /** A transfer rate, given in bytes per second the way `HttpRequestLoadingProgressState.speed` reports it. */\n public formatSpeed(bytesPerSecond: number) {\n return `${this.formatBytes(Math.round(bytesPerSecond))}/s`;\n }\n\n public formatDuration(ms: number | null) {\n if (ms === null) return '—';\n\n return ms < 1000 ? `${ms}ms` : `${(ms / 1000).toFixed(2)}s`;\n }\n\n /**\n * Replays a query with the args the panel is already showing. `execute()` would otherwise default to\n * `state.args()`, which only `withArgs` ever writes - so a query executed imperatively, by a sequence\n * step or as an auth query would replay with no args at all and a function route would throw.\n */\n public executeQuery(selection: QueryDevtoolsSelection, allowCache: boolean) {\n const { query } = selection;\n\n try {\n query.execute({ args: this.queryArgs(query), options: allowCache ? { allowCache: true } : undefined });\n } catch (error) {\n this.openArgsEditor(selection);\n this.editError.set(actionErrorMessage(error));\n }\n }\n\n public resetQuery(query: AnyQuery) {\n query.reset();\n }\n\n /**\n * Copies a shareable report (path, args, status, slimmed response) for handing to an API dev.\n * Writes both rich `text/html` (Slack applies formatting on paste - it does not parse markdown) and\n * a plain-text fallback.\n */\n public copyReport(entry: QueryDevtoolsEntry, query: AnyQuery) {\n const error = query.error();\n const httpStatus = error ? error.raw.status : this.responseStatus(query);\n const method = entry.meta.method ?? '';\n\n // The URL actually requested already contains the base URL and the resolved params, so the client\n // is only spelled out separately when the query has not run and only its `:param` template is known.\n const requestUrl = this.requestUrl(query);\n const route = requestUrl ?? entry.meta.route ?? '-';\n const client = requestUrl ? '' : (entry.meta.clientBaseUrl ?? entry.meta.clientName ?? '');\n const statusLine = `status: ${this.queryStatus(query)}${httpStatus !== null ? ` (${httpStatus})` : ''} · ${this.formatTime(query.lastTimeExecutedAt())}`;\n const features = entry.meta.features?.length\n ? `features: ${entry.meta.features.map((feature) => this.featureSummary(feature)).join(' | ')}`\n : null;\n const activity = this.activitySummary(this.queryActivity(entry));\n const gqlDoc = entry.meta.gqlQuery ? this.gqlDocument(entry.meta.gqlQuery) : null;\n const args = this.queryArgs(query);\n const argsLabel = gqlDoc ? 'Variables' : 'Args';\n const argsJson = args !== null && args !== undefined ? JSON.stringify(args, null, 2) : null;\n const bodyLabel = error ? `Error (${error.raw.status})` : 'Response';\n const bodyContent = error\n ? error.isList\n ? error.errors.map((e) => e.message).join('\\n')\n : error.error.message\n : JSON.stringify(slimForReport(query.response()), null, 2);\n\n const textParts = [`${method} ${route}${client ? ` - ${client}` : ''}`, statusLine];\n if (activity) textParts.push(activity);\n if (features) textParts.push(features);\n if (gqlDoc) textParts.push('', 'GraphQL document', gqlDoc);\n if (argsJson) textParts.push('', argsLabel, argsJson);\n textParts.push('', bodyLabel, bodyContent);\n const text = textParts.join('\\n');\n\n const esc = (s: string) => s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');\n const htmlParts = [\n `<b>${esc(method)}</b> <code>${esc(route)}</code>${client ? ` - <code>${esc(client)}</code>` : ''}`,\n esc(statusLine),\n ];\n if (activity) htmlParts.push(esc(activity));\n if (features) htmlParts.push(esc(features));\n if (gqlDoc) htmlParts.push('<b>GraphQL document</b>', `<pre><code>${esc(gqlDoc)}</code></pre>`);\n if (argsJson) htmlParts.push(`<b>${argsLabel}</b>`, `<pre><code>${esc(argsJson)}</code></pre>`);\n htmlParts.push(`<b>${esc(bodyLabel)}</b>`, `<pre><code>${esc(bodyContent)}</code></pre>`);\n const html = htmlParts.join('<br>');\n\n this.writeToClipboard({ html, text }, this.copiedReport);\n }\n\n // --- Insomnia export ---\n\n /** Copies one query as an Insomnia collection, for `Import > From Clipboard`. */\n public copyInsomniaRequest(entry: QueryDevtoolsEntry, query: AnyQuery) {\n const requests = [this.exportedRequest(entry, query)];\n const json = JSON.stringify(\n buildInsomniaExport({\n name: `${entry.meta.clientName ?? 'query'} · ${this.queryRoute(entry, query) || 'request'}`,\n requests,\n tokenRefreshes: this.insomniaTokenRefreshes(requests),\n now: Date.now(),\n }),\n null,\n 2,\n );\n\n this.writeToClipboard({ text: json }, this.copiedInsomnia);\n }\n\n /**\n * Copies one query as a `curl` command - what goes into a terminal, a ticket or a chat message, where\n * an Insomnia collection is too heavy to be read at all.\n */\n public copyCurlRequest(entry: QueryDevtoolsEntry, query: AnyQuery) {\n this.writeToClipboard({ text: buildCurlCommand(this.exportedRequest(entry, query)) }, this.copiedCurl);\n }\n\n /** Copies the GraphQL document as displayed — dedented, so it pastes straight into a playground. */\n public copyGqlDocument(doc: string) {\n this.writeToClipboard({ text: this.gqlDocument(doc) }, this.copiedGql);\n }\n\n /**\n * The endpoint of a query as one string: the absolute URL its last request used, or - for a query\n * that has not run - the rendered route on screen.\n */\n public copyableRoute(entry: QueryDevtoolsEntry, query: AnyQuery) {\n return this.requestUrl(query) ?? this.queryRoute(entry, query);\n }\n\n /** Names which of the two strings {@link copyableRoute} is offering, so the button says what it copies. */\n public copyableRouteTitle(entry: QueryDevtoolsEntry, query: AnyQuery) {\n const route = this.copyableRoute(entry, query);\n const kind = this.requestUrl(query) ? 'the absolute URL of the last request' : 'the rendered route';\n\n return `Copy ${kind}: ${route}`;\n }\n\n /** Copies {@link copyableRoute} - the endpoint on its own, where the exports are a whole document. */\n public copyRoute(entry: QueryDevtoolsEntry, query: AnyQuery) {\n this.writeToClipboard({ text: this.copyableRoute(entry, query) }, this.copiedRoute);\n }\n\n /**\n * Downloads the given queries (already scoped/filtered by the caller) as one Insomnia collection,\n * filed into a folder per query client.\n */\n public downloadInsomniaCollection(\n items: { entry: QueryDevtoolsEntry; query: AnyQuery }[],\n clientLabel: string | null,\n ) {\n if (!items.length) return;\n\n const requests = items.map(({ entry, query }) => this.exportedRequest(entry, query));\n const json = JSON.stringify(\n buildInsomniaExport({\n name: `${clientLabel ?? 'ethlete'} queries`,\n requests,\n tokenRefreshes: this.insomniaTokenRefreshes(requests),\n now: Date.now(),\n }),\n null,\n 2,\n );\n\n this.downloadFile(`insomnia-${clientLabel ?? 'ethlete'}-queries.json`, json);\n }\n\n // --- Session export ---\n\n /**\n * Downloads the whole panel as one JSON file: every registered entry with what it ran and what it\n * holds, the event log, the cache totals and anything armed in the Faults tab. Unlike **Copy report**\n * this is not scoped to one query - it is the attachment for a bug report about a screen.\n *\n * Deliberately unfiltered: a report is read by someone who was not there, and a dump that silently\n * left out the client you were not looking at is worse than no dump.\n */\n protected downloadSession() {\n const now = Date.now();\n const json = JSON.stringify(\n buildQueryDevtoolsSessionExport({\n now,\n location: this.document.location?.href ?? '',\n about: queryDevtoolsAbout(),\n clients: this.sessionClients(),\n entries: this.sessionEntries(),\n events: this.sessionEvents(),\n faults: this.sessionFaults(),\n mocks: this.sessionMocks(),\n }),\n null,\n 2,\n );\n\n this.downloadFile(`query-devtools-session-${now}.json`, json);\n }\n\n // --- JIT editing ---\n\n public openResponseEditor(query: AnyQuery) {\n const draft = JSON.stringify(query.response() ?? null, null, 2);\n\n this.editorSeed = draft;\n this.responseDraft.set(draft);\n this.editError.set(null);\n this.editorMode.set('response');\n }\n\n public openArgsEditor({ entry, query }: QueryDevtoolsSelection) {\n const args = this.queryArgs(query) ?? emptyArgsSeed(entry);\n const draft = JSON.stringify(editableArgs(args), null, 2);\n\n this.editedArgsSource = args;\n this.editorSeed = draft;\n this.argsDraft.set(draft);\n this.editError.set(null);\n this.editorMode.set('args');\n }\n\n public applyResponse(query: AnyQuery) {\n let response: unknown;\n\n try {\n response = JSON.parse(this.responseDraft());\n } catch {\n this.editError.set('Invalid JSON');\n\n return;\n }\n\n try {\n query.subtle.setResponse(response);\n this.editorMode.set('none');\n this.editError.set(null);\n } catch (error) {\n this.editError.set(actionErrorMessage(error));\n }\n }\n\n public applyArgs(query: AnyQuery) {\n let args: ReturnType<typeof this.queryArgs>;\n\n try {\n args = JSON.parse(this.argsDraft());\n } catch {\n this.editError.set('Invalid JSON');\n\n return;\n }\n\n try {\n query.execute({ args: executableArgs(args, this.editedArgsSource) });\n this.editorMode.set('none');\n this.editError.set(null);\n } catch (error) {\n this.editError.set(actionErrorMessage(error));\n }\n }\n\n public cancelEditor() {\n this.editorMode.set('none');\n this.editError.set(null);\n }\n\n // --- Force states ---\n\n public forceLoading(query: AnyQuery) {\n // `executionState` prioritises loading > error > response, so clear the others to switch cleanly.\n query.subtle.setError(null);\n query.subtle.setLoading({ executeTime: Date.now(), progress: null });\n }\n\n public forceError(query: AnyQuery) {\n query.subtle.setLoading(null);\n // A real failed execution also drops the response, so mirror that for consumers bound to it.\n query.subtle.setResponse(null);\n query.subtle.setError(\n createQueryErrorResponse(\n new HttpErrorResponse({\n status: 500,\n statusText: 'Forced',\n error: { message: 'Forced error (devtools)' },\n }),\n ),\n );\n }\n\n public forceEmpty(query: AnyQuery) {\n query.subtle.setLoading(null);\n query.subtle.setError(null);\n query.subtle.setResponse(null);\n }\n\n public clearForced(query: AnyQuery) {\n query.subtle.setLoading(null);\n query.subtle.setError(null);\n }\n\n // --- Cache actions ---\n\n public refetchCacheEntry(entry: QueryRepositoryCacheEntry) {\n entry.request.execute();\n }\n\n public evictCacheEntry(repository: QueryRepository, key: string) {\n repository.subtle.evict(key);\n }\n\n /**\n * Drops every entry of one client, consumers included - the cold-start check that does not need a\n * reload. A query still bound to an evicted entry requests again on its next execution.\n */\n public evictAllCacheEntries(repository: QueryRepository) {\n for (const entry of repository.subtle.cacheEntries()) repository.subtle.evict(entry.key);\n }\n\n /**\n * Expands the response held under a cache key, which is the only way to read an entry no live query is\n * bound to any more - the Queries tab has nothing to select for it.\n */\n public toggleCacheValue(clientName: string, key: string) {\n const id = `${clientName}|${key}`;\n\n this.expandedCacheKey.update((current) => (current === id ? null : id));\n }\n\n public isCacheValueExpanded(clientName: string, key: string) {\n return this.expandedCacheKey() === `${clientName}|${key}`;\n }\n\n public cacheFreshness(entry: QueryRepositoryCacheEntry) {\n this.clock();\n if (entry.request.loading()) return 'refreshing…';\n const expiresAt = entry.request.expiresAt();\n if (expiresAt === null) return 'uncacheable';\n const ms = expiresAt - Date.now();\n return ms <= 0 ? 'stale' : `${Math.ceil(ms / 1000)}s`;\n }\n\n /**\n * What multi-tab sync is doing for a cache entry: whether this tab is the one polling the key, and\n * how long ago it last took a response from another tab. Empty when the client has no sync.\n */\n public cacheSync(entry: QueryRepositoryCacheEntry, pollStates: Record<string, QueryKeyLockState>) {\n this.clock();\n\n const parts: string[] = [];\n const pollState = pollStates[entry.key];\n\n if (pollState) parts.push(pollState === 'holder' ? 'polling' : 'standby');\n\n const lastSyncedAt = entry.request.subtle.lastExternalResponseAt();\n\n if (lastSyncedAt !== null) parts.push(`synced ${Math.max(0, Math.round((Date.now() - lastSyncedAt) / 1000))}s ago`);\n\n return parts.join(' · ') || '-';\n }\n\n /**\n * Whether a cache entry is showing data that came off the disk rather than the network - the answer\n * to \"why is this here already?\" on a cold start. Empty when the client does not persist responses.\n */\n public cachePersistence(entry: QueryRepositoryCacheEntry) {\n this.clock();\n\n const hydratedAt = entry.request.subtle.lastPersistedResponseAt();\n\n if (hydratedAt === null) return '-';\n\n return `from disk ${Math.max(0, Math.round((Date.now() - hydratedAt) / 1000))}s ago`;\n }\n\n /** How many responses this client has on disk, which is usually more than it has in memory. */\n public persistedCount(client: QueryClient) {\n this.clock();\n\n return client.subtle.persistence?.indexEntries().length ?? 0;\n }\n\n public clearPersistedQueries(client: QueryClient) {\n void client.clearPersistedQueries();\n }\n\n /** The path + query of a request URL (origin stripped), for readable cache/event identifiers. */\n public requestPath(url: string) {\n try {\n const parsed = new URL(url);\n return parsed.pathname + parsed.search;\n } catch {\n return url;\n }\n }\n\n // --- Typed template accessors (entry.handle is `unknown`) ---\n\n public asStack(entry: QueryDevtoolsEntry): AnyQueryStack {\n return entry.handle as AnyQueryStack;\n }\n\n public asPagedStack(entry: QueryDevtoolsEntry): AnyPagedQueryStack {\n return entry.handle as AnyPagedQueryStack;\n }\n\n public asSequence(entry: QueryDevtoolsEntry): QuerySequence<unknown[]> {\n return (entry.handle as { current: QuerySequence<unknown[]> }).current;\n }\n\n public asBatch(entry: QueryDevtoolsEntry): AnyQueryBatch {\n return (entry.handle as { current: AnyQueryBatch }).current;\n }\n\n public asAuth(entry: QueryDevtoolsEntry): AnyBearerAuthProvider {\n return entry.handle as AnyBearerAuthProvider;\n }\n\n public asWs(entry: QueryDevtoolsEntry): WebSocketDevtoolsHandle {\n return entry.handle as WebSocketDevtoolsHandle;\n }\n\n /**\n * A socket's messages, narrowed by the filter box. Every whitespace-separated term has to match the\n * event, the room or the direction, so `out join` finds the room joins the client sent.\n */\n public socketMessages(ws: WebSocketDevtoolsHandle) {\n const messages = ws.messages();\n const terms = this.socketFilter().trim().toLowerCase().split(/\\s+/).filter(Boolean);\n\n if (!terms.length) return messages;\n\n return messages.filter((message) => {\n const haystack = `${message.direction} ${message.event} ${message.room}`.toLowerCase();\n\n return terms.every((term) => haystack.includes(term));\n });\n }\n\n /** How the message log labels a direction: what the client sent, versus what the server pushed. */\n public socketDirectionLabel(message: WebSocketDevtoolsMessage) {\n return message.direction === 'out' ? '↑ sent' : '↓ received';\n }\n\n /**\n * Sends a message as the app would, so a server that only answers a client that asked can be provoked\n * from the panel. An empty payload sends nothing rather than `\"\"` - a plain event is a valid message.\n */\n public emitSocketMessage(options: { entry: QueryDevtoolsEntry; event: string; data: string }) {\n const { entry, event, data } = options;\n const name = event.trim();\n\n if (!name) {\n this.socketEmitError.set({ entryId: entry.id, message: 'An event name is required.' });\n\n return;\n }\n\n const payload = data.trim();\n\n try {\n this.asWs(entry).emit({ event: name, data: payload ? JSON.parse(payload) : undefined });\n this.socketEmitError.set(null);\n } catch {\n this.socketEmitError.set({ entryId: entry.id, message: 'Invalid JSON' });\n }\n }\n\n public socketEmitErrorFor(entryId: string) {\n const error = this.socketEmitError();\n\n return error?.entryId === entryId ? error.message : null;\n }\n\n public asForm(entry: QueryDevtoolsEntry): QueryDevtoolsFormHandle {\n return entry.handle as QueryDevtoolsFormHandle;\n }\n\n /**\n * The queries a form feeds, discovered from the reads its `value()` recorded while their args were\n * built - so a form that nothing consumes yet reads as exactly that.\n */\n public queriesDrivenByForm(entry: QueryDevtoolsEntry): QueryLink[] {\n return this.queryEntries()\n .filter((candidate) => candidate.formLinks?.ids().includes(entry.id))\n .map((candidate) => this.queryLinkFor(candidate));\n }\n\n /** The reverse: the forms whose value a query's args read. */\n public formsDrivingQuery(entry: QueryDevtoolsEntry): QueryDevtoolsEntry[] {\n const ids = entry.formLinks?.ids() ?? [];\n\n return this.formEntries().filter((form) => ids.includes(form.id));\n }\n\n public selectForm(id: string) {\n this.activeTab.set('forms');\n this.selectedFormId.set(id);\n }\n\n /**\n * The refreshes that re-executed a query, newest first - the answer to \"why did this refetch?\". Read\n * off the event log, so it goes back exactly as far as the log does.\n */\n public refreshesFor(entryId: string) {\n return this.eventLog()\n .filter((item) => item.cause && item.refreshed?.some((refreshed) => refreshed.queryIds.includes(entryId)))\n .map((item) => ({\n id: item.id,\n timestamp: item.timestamp,\n label: this.causeLabel(item.cause as QueryRefreshCause),\n }));\n }\n\n /** What asked for a refresh, on one line. */\n public causeLabel(cause: QueryRefreshCause) {\n const scope = cause.url ? this.requestPath(cause.url) : 'everything in use';\n const what =\n cause.type === 'invalidation'\n ? `invalidated ${scope}`\n : cause.type === 'mutation'\n ? `mutation on ${scope}`\n : `refreshed ${scope}`;\n\n return cause.otherTab ? `${what} · another tab` : what;\n }\n\n /** Derives the per-step status of a sequence step from its live progress signals. */\n public sequenceStepStatus(sequence: QuerySequence<unknown[]>, index: number): QuerySequenceStatus {\n const failedAt = sequence.failedAt();\n if (failedAt !== null && index === failedAt) return 'error';\n\n const current = sequence.currentStep();\n const running = sequence.running();\n\n if (index < current - 1) return 'success';\n if (index === current - 1 && running) return 'running';\n if (sequence.status() === 'success') return 'success';\n\n return 'idle';\n }\n\n public authTokenPayload(auth: AnyBearerAuthProvider): Record<string, unknown> | null {\n return decodeJwtPayload(auth.accessToken());\n }\n\n public queriesForStack(stack: AnyQueryStack | AnyPagedQueryStack): QueryLink[] {\n const inner = stack.queries();\n const queryEntries = this.queryEntries();\n\n return inner.map((query) =>\n this.queryLinkFor(\n queryEntries.find((e) => e.handle === query),\n query as AnyQuery,\n ),\n );\n }\n\n public authQueryKeys(auth: AnyBearerAuthProvider): string[] {\n return Object.keys(auth.queries ?? {});\n }\n\n /** Where this tab stands on one lock, as a chip. @see lockRows */\n public lockStanding(row: DevtoolsLockRow): QueryDevtoolsChip {\n switch (row.standing) {\n case 'holder':\n return { label: 'holds it', tone: 'success', title: 'This tab is the one doing the work this lock guards.' };\n case 'queued':\n return {\n label: `waiting · #${row.queuePlace}`,\n tone: 'muted',\n title: `Another tab holds this lock. This one is number ${row.queuePlace} in line and takes over as soon as the tabs ahead of it release it - by closing, crashing or navigating away.`,\n };\n case 'absent':\n return {\n label: 'not taking part',\n tone: 'muted',\n title: 'Another tab holds this lock and this one never asked for it.',\n };\n case 'unknown':\n return {\n label: 'unknown',\n tone: 'muted',\n title:\n 'The probe lock this tab identifies itself with has not been granted yet - the next poll should resolve it.',\n };\n }\n }\n\n /**\n * Which tab refreshes this provider's tokens, as a chip: whether it is this one, how many tabs are\n * in the election, and - when there is no election - why every tab reads as the leader.\n */\n public authLeadership(auth: AnyBearerAuthProvider): QueryDevtoolsChip | null {\n const sync = (auth.features as { multiTabSync?: BearerAuthMultiTabSyncFeature } | undefined)?.multiTabSync;\n if (!sync) return null;\n\n if (sync.leadership !== 'election') {\n const reason =\n sync.leadership === 'off'\n ? 'Leader election is off, so every tab refreshes its own tokens - this one included.'\n : 'This browser has no Web Locks API, so the election cannot run and every tab refreshes its own tokens.';\n\n return { label: 'every tab refreshes', tone: 'muted', title: reason };\n }\n\n const tabs = sync.instanceCount();\n const isLeader = sync.isLeader();\n // The count is recounted on announce, goodbye and takeover rather than on a timer, so a tab that\n // crashed as a follower is still in it. Presenting it as exact would turn that into a bug report.\n const title = `${isLeader ? 'This tab performs the automatic token refresh.' : 'Another tab performs the automatic token refresh.'} ${tabs} tab${tabs === 1 ? '' : 's'} in the election, counted on the last announce - a tab that crashed as a follower is still counted.`;\n\n return {\n label: `${isLeader ? 'leader' : 'follower'} · ~${tabs} tab${tabs === 1 ? '' : 's'}`,\n tone: isLeader ? 'success' : 'muted',\n title,\n };\n }\n\n /**\n * The access token's expiry as the app sees it, plus whatever the panel is doing to it: an armed\n * lifetime replaces the countdown, and the token's own is reported next to it so the card never claims\n * a refresh is due at a time the API would disagree with.\n */\n public authTokenLifetime(entry: QueryDevtoolsEntry): QueryDevtoolsTokenLifetime {\n this.clock();\n\n const providerName = entry.meta.name ?? '';\n const payload = decodeJwtPayload(this.asAuth(entry).accessToken());\n const ttlSeconds = queryDevtoolsTokenTtls()[providerName] ?? null;\n const realExp = typeof payload?.['exp'] === 'number' ? payload['exp'] : null;\n const overridden = applyQueryDevtoolsTokenTtl({ payload, providerName });\n const exp = typeof overridden?.['exp'] === 'number' ? overridden['exp'] : null;\n\n return {\n expiresIn: expiryCountdown(exp),\n realExpiresIn: exp === realExp ? null : expiryCountdown(realExp),\n ttlSeconds,\n overridable: canOverrideQueryDevtoolsTokenTtl({ payload }),\n };\n }\n\n public queriesForSequence(sequence: QuerySequence<unknown[]>): QueryLink[] {\n const queryEntries = this.queryEntries();\n\n return sequence.queries.map((query) =>\n this.queryLinkFor(\n queryEntries.find((e) => e.handle === query),\n query as AnyQuery,\n ),\n );\n }\n\n /** The snapshot of a sequence step, once it has run (holds the args in and the response/error out). */\n public stepSnapshot(sequence: QuerySequence<unknown[]>, index: number): AnyQuerySnapshot | null {\n return sequence.snapshots()[index] ?? null;\n }\n\n public toggleQueryGroup(key: string) {\n const next = new Set(this.expandedQueryGroups());\n if (next.has(key)) {\n next.delete(key);\n } else {\n next.add(key);\n }\n this.expandedQueryGroups.set(next);\n }\n\n public expandQueryGroup(key: string) {\n if (this.expandedQueryGroups().has(key)) return;\n\n this.expandedQueryGroups.set(new Set(this.expandedQueryGroups()).add(key));\n }\n\n public isStepExpanded(entryId: string, index: number) {\n return this.expandedSteps().has(this.stepKey(entryId, index));\n }\n\n public toggleStep(entryId: string, index: number) {\n const key = this.stepKey(entryId, index);\n const next = new Set(this.expandedSteps());\n if (next.has(key)) {\n next.delete(key);\n } else {\n next.add(key);\n }\n this.expandedSteps.set(next);\n }\n\n /** A batch's route with its path params left as `:name` - a batch fills them in per item, not once. */\n public batchRouteSegments(entry: QueryDevtoolsEntry): RouteSegment[] {\n return this.renderRoute(entry, null);\n }\n\n public batchOf(entry: QueryDevtoolsEntry): QueryDevtoolsEntry | null {\n const handle = entry.meta.batch;\n\n return handle ? (this.batchEntries().find((e) => e.handle === handle) ?? null) : null;\n }\n\n public queriesForBatch(entry: QueryDevtoolsEntry): QueryLink[] {\n return this.queryEntries()\n .filter((e) => e.meta.batch === entry.handle && !e.destroyedAt)\n .map((e) => this.queryLinkFor(e, e.handle as AnyQuery));\n }\n\n /**\n * The registry entry of one of a batch's items, or `null` once it has fallen out of the batch's capped\n * tombstone tail - which is what makes an item row openable only while its query is still kept.\n */\n public batchItemQueryId(entry: QueryDevtoolsEntry, index: number): string | null {\n const item = this.queryEntries().find((e) => e.meta.batch === entry.handle && e.meta.batchItemIndex === index);\n\n return item?.id ?? null;\n }\n\n public batchItems(entry: QueryDevtoolsEntry): BatchItemView {\n const results = this.asBatch(entry).results();\n\n // Failures first: a bulk edit is read for the items it could not apply, and those are the ones a\n // cap must never be what drops. Everything else keeps input order.\n const ordered = [\n ...results.filter((result) => result.status === 'error'),\n ...results.filter((result) => result.status !== 'error'),\n ];\n\n return {\n rows: ordered.slice(0, MAX_BATCH_ITEM_ROWS).map((result) => ({\n result,\n segments: this.argsRouteSegments(entry, 'args' in result ? result.args : null),\n })),\n total: results.length,\n hidden: Math.max(0, results.length - MAX_BATCH_ITEM_ROWS),\n };\n }\n\n public batchThroughput(batch: AnyQueryBatch): string | null {\n const rate = batch.itemsPerSecond();\n\n if (rate === null) return null;\n\n const remaining = batch.remainingTime();\n const perSecond = `${rate.toFixed(rate < 10 ? 1 : 0)} items/s`;\n\n return remaining === null ? perSecond : `${perSecond} · ~${this.formatDuration(remaining)} left`;\n }\n\n public isBatchItemExpanded(entryId: string, index: number) {\n return this.expandedBatchItems().has(this.stepKey(entryId, index));\n }\n\n public toggleBatchItem(entryId: string, index: number) {\n const key = this.stepKey(entryId, index);\n const next = new Set(this.expandedBatchItems());\n if (next.has(key)) {\n next.delete(key);\n } else {\n next.add(key);\n }\n this.expandedBatchItems.set(next);\n }\n\n /** Dedents a GraphQL document (template-literal indentation) for readable display. */\n public gqlDocument(doc: string) {\n const lines = doc.replace(/\\t/g, ' ').split('\\n');\n while (lines.length && !lines[0]?.trim()) lines.shift();\n while (lines.length && !lines[lines.length - 1]?.trim()) lines.pop();\n const indents = lines.filter((l) => l.trim()).map((l) => l.match(/^ */)?.[0].length ?? 0);\n const min = indents.length ? Math.min(...indents) : 0;\n return lines.map((l) => l.slice(min)).join('\\n');\n }\n\n public featureLabel(type: string) {\n return type\n .replace(/^WITH_/, '')\n .replace(/_/g, ' ')\n .toLowerCase();\n }\n\n /** A feature and its options on one line, for a report or a chip's tooltip. */\n public featureSummary(feature: QueryDevtoolsFeature) {\n const details = feature.details.map((detail) => `${detail.label} ${detail.value}`);\n\n return [this.featureLabel(feature.type), ...details].join(' · ');\n }\n\n /** The features of the client behind a cache tab card, or `null` for a client without any. */\n public clientFeatures(client: QueryClient | null | undefined) {\n const features = client?.subtle.devtoolsFeatures ?? [];\n\n return features.length ? features : null;\n }\n\n public formatTime(timestamp: number | null) {\n if (!timestamp) return '-';\n return new Date(timestamp).toLocaleTimeString(undefined, { hour12: false });\n }\n\n /**\n * The element a query was created in, which is what {@link locateQuery} can point at. `null` for a\n * query created outside a component or directive injector - a root service, a resolver, a guard.\n */\n public locatableElement(entry: QueryDevtoolsEntry) {\n return entry.meta.element ?? null;\n }\n\n /**\n * Scrolls the element the selected query was created in into view and draws the inspect box over it -\n * inspect run backwards. Where a query was *created* is not necessarily where its data is rendered,\n * which is what the button's \"created here\" wording is for.\n */\n public locateQuery(entry: QueryDevtoolsEntry) {\n const element = this.locatableElement(entry);\n if (!element) return;\n\n const target = element.isConnected ? renderedTarget(element) : null;\n\n // Detached, `display: none`, or inside a collapsed panel: scrolling to it lands nowhere and the box\n // would be drawn over an unrelated strip of the page.\n if (!target) {\n this.locatedRect.set(null);\n this.locateState.set('offscreen');\n this.locate$.next(null);\n\n return;\n }\n\n target.scrollIntoView({ block: 'center', inline: 'nearest', behavior: 'smooth' });\n this.locateState.set('located');\n this.locate$.next(target);\n }\n\n /** Downloads a file a tab generated. @see QueryDevtoolsHost.downloadTextFile */\n public downloadTextFile(file: { name: string; content: string; type: string }) {\n this.download({ content: file.content, filename: file.name, type: file.type });\n }\n\n /**\n * The same route rendered from a set of args rather than from a query, which is what a batch item leaves\n * behind: the batch destroys its query the moment the item settles.\n */\n private argsRouteSegments(entry: QueryDevtoolsEntry, args: unknown): RouteSegment[] {\n return this.renderRoute(entry, args as Record<string, unknown> | null);\n }\n\n private renderRoute(\n entry: QueryDevtoolsEntry | undefined,\n args: Record<string, unknown> | null | undefined,\n ): RouteSegment[] {\n const parts = entry?.meta.routeParts;\n\n if (!parts?.length) {\n return entry?.meta.route ? [{ text: entry.meta.route, kind: 'static' }] : [];\n }\n\n const pathParams = args?.['pathParams'] as Record<string, unknown> | undefined;\n\n return parts.map(({ text, param }): RouteSegment => {\n if (!param) return { text, kind: 'static' };\n\n const value = pathParams?.[param];\n\n return { text: value === undefined || value === null ? `:${param}` : String(value), kind: 'param', name: param };\n });\n }\n\n /**\n * Takes - or gives back - the lock whose name only this tab can have produced. Its `clientId` in the\n * snapshot is what tells this tab's rows from another tab's: `LockInfo` carries no tab identity, and\n * the platform offers no way to ask for one's own client id.\n */\n private holdProbeLock(inspecting: boolean) {\n if (inspecting) {\n this.probeHold ??= this.probeLocks.hold(devtoolsProbeLockKey(this.probeId));\n\n return;\n }\n\n this.probeHold?.release();\n this.probeHold = null;\n // A snapshot outlives the probe that made it readable, so keeping it would have every row claim it\n // belongs to some other tab the next time the tab is opened.\n this.lockSnapshot.set(null);\n }\n\n /**\n * The two runs the diff compares, oldest first - normalised by run index, so picking a pair in either\n * order reads the same way round as the `#before → #after` header prints it.\n *\n * `null` unless a run is picked, so a closed diff costs nothing to walk.\n */\n /**\n * The two runs the comparison spans, oldest first - normalised by run index, so picking a pair in\n * either order reads the same way round as the `#before → #after` header prints it. With only one end\n * armed, `after` is absent unless an older body-holding run can stand in for the base.\n *\n * `null` unless a run is armed, so a closed diff costs nothing to walk.\n */\n /**\n * The pair one step older or newer than the current comparison, keeping whatever gap it has, or `null`\n * at either end of the retained bodies.\n */\n private steppedDiffPair(entry: QueryDevtoolsEntry, older: boolean) {\n const comparison = this.responseDiff(entry);\n\n if (!comparison) return null;\n\n // `stats.runs()` is oldest-first, so one step older is one index down.\n const held = (entry.stats?.runs() ?? []).filter((run) => run.hasResponse);\n const shift = older ? -1 : 1;\n const before = held[held.findIndex((run) => run.index === comparison.before.index) + shift];\n const after = held[held.findIndex((run) => run.index === comparison.after.index) + shift];\n\n return before && after ? { before, after } : null;\n }\n\n private diffEnds(entry: QueryDevtoolsEntry) {\n const runs = entry.stats?.runs() ?? [];\n const held = (index: number | null) =>\n index === null ? undefined : runs.find((run) => run.index === index && run.hasResponse);\n\n // An armed run whose body has since been trimmed counts as unarmed. Quietly re-deriving the other end\n // instead would show a different comparison under a header still naming the one that was picked.\n const picked = held(this.diffRunIndex());\n\n if (!picked) return null;\n\n const other = held(this.diffBaseRunIndex());\n\n if (other && other.index !== picked.index) {\n const [before, after] = other.index < picked.index ? [other, picked] : [picked, other];\n\n return { before, after };\n }\n\n for (let index = runs.indexOf(picked) - 1; index >= 0; index--) {\n const before = runs[index];\n\n if (before?.hasResponse) return { before, after: picked };\n }\n\n // Armed with nothing older holding a body, so this is one end of a pair still to be completed rather\n // than a comparison. Reporting it as an end anyway is what keeps the pick from being thrown away.\n return { before: picked, after: undefined };\n }\n\n private isTabPrimary(tab: DevtoolsTab) {\n const badge = this.tabBadges()[tab];\n\n return this.PINNED_TABS.includes(tab) || this.activeTab() === tab || !!badge.count || !!badge.errors;\n }\n\n /** Moves the panel into a pop-up whose document has finished loading. @see popOut */\n private mountPopOut(popup: Window, panel: HTMLElement) {\n const doc = popup.document;\n const renderer = this.renderer;\n\n renderer.setAttribute(doc.documentElement, 'class', this.document.documentElement.className);\n renderer.setAttribute(doc.documentElement, 'style', this.document.documentElement.getAttribute('style') ?? '');\n renderer.setAttribute(doc.body, 'class', this.document.body.className);\n\n // Inserted before the stylesheets it applies to: a blob document's own base URL is the blob, so a\n // copied `<link href=\"styles.css\">` - and every relative `url()` inside a copied `<style>` - would\n // resolve against nothing and silently fail to load.\n const base = renderer.createElement('base');\n\n renderer.setAttribute(base, 'href', this.document.baseURI);\n renderer.appendChild(doc.head, base);\n\n for (const styles of DEFERRED_STYLES) this.styleManager.mount(styles);\n\n this.popOutStyleSync = this.syncStylesInto(doc);\n\n // The panel's chrome tokens (`--_et-qdt-*`) are declared on the host element and inherited from it,\n // so a panel appended straight to the pop-up's body would lose every background, border and chip\n // fill that resolves one. It gets a host of its own instead.\n const shell = renderer.createElement('div');\n\n renderer.setAttribute(shell, 'class', 'et-query-devtools-host');\n renderer.setAttribute(shell, 'data-dock', 'popout');\n\n renderer.setCssProperties(shell, this.chromeTokens());\n renderer.appendChild(doc.body, shell);\n renderer.appendChild(shell, panel);\n\n // The pop-up is a realm of its own, so zone.js never patched its listeners - without the explicit\n // `run` the dock-back would write its signals outside Angular and nothing would re-render.\n fromEvent(popup, 'pagehide')\n .pipe(\n tap(() => this.zone.run(() => this.dockBack())),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe();\n\n this.popup = popup;\n this.poppedOut.set(true);\n }\n\n /**\n * The panel's chrome tokens as the app currently resolves them, so a pop-out keeps the surface it was\n * docked in. Its own CSS resolves them from the host app's theme, and that theme is set on an ancestor\n * the pop-out does not have - inherited afresh over there, the panel would take the document's theme\n * (usually the light one) rather than the one it was just being read against.\n *\n * Empty on a browser that does not enumerate custom properties, which leaves the tokens to be\n * inherited as before.\n */\n private chromeTokens() {\n const styles = this.document.defaultView?.getComputedStyle(this.hostEl.nativeElement);\n const tokens: Record<string, string> = {};\n\n for (const property of Array.from(styles ?? [])) {\n if (property.startsWith('--_et-qdt-')) tokens[property] = styles?.getPropertyValue(property) ?? '';\n }\n\n return tokens;\n }\n\n /** Whether a `<head>` child carries CSS the pop-out needs a copy of. */\n private isStyleNode(node: Element) {\n if (node.tagName === 'STYLE') return true;\n\n return node.tagName === 'LINK' && (node.getAttribute('rel') ?? '').includes('stylesheet');\n }\n\n /**\n * Copies the host document's stylesheets into the pop-up and keeps mirroring them while it is\n * open. Styles keep arriving after the move: Angular inserts a component's CSS and the style\n * manager mounts overlay strategy CSS the first time each is used - e.g. the first menu opened\n * over there - so a one-time copy would leave everything first used after the pop-out unstyled.\n */\n private syncStylesInto(doc: Document) {\n const copies = new Map<Element, Element>();\n\n const copy = (node: Node) => {\n if (!(node instanceof Element) || !this.isStyleNode(node) || copies.has(node)) return;\n\n const clone = doc.importNode(node, true);\n\n copies.set(node, clone);\n this.renderer.appendChild(doc.head, clone);\n };\n\n const drop = (node: Node) => {\n if (!(node instanceof Element)) return;\n\n copies.get(node)?.remove();\n copies.delete(node);\n };\n\n for (const node of Array.from(this.document.head.children)) copy(node);\n\n // eslint-disable-next-line ethlete/no-native-observers -- signalElementMutations reports only the first record of a batch (styles often arrive several per task), and this observer lives with the pop-out, not the component\n const observer = new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n mutation.removedNodes.forEach(drop);\n mutation.addedNodes.forEach(copy);\n }\n });\n\n observer.observe(this.document.head, { childList: true });\n\n return () => observer.disconnect();\n }\n\n /** Brings the panel back into the host element and closes the window it was living in. */\n private dockBack() {\n const panel = this.panelEl()?.nativeElement;\n\n if (panel) this.renderer.appendChild(this.hostEl.nativeElement, panel);\n\n this.poppedOut.set(false);\n this.closePopup();\n }\n\n /** A registered query as a row that opens the detail drawer. */\n private queryLinkFor(entry: QueryDevtoolsEntry | undefined, query = entry?.handle as AnyQuery): QueryLink {\n return {\n id: entry?.id ?? '',\n query,\n method: entry?.meta.method ?? '',\n segments: this.routeSegments(entry, query),\n clientBaseUrl: entry?.meta.clientBaseUrl ?? '',\n stats: entry?.stats,\n };\n }\n\n /** The activity of one entry, or the total of a group of them (a stack's queries, a whole tab). */\n private activityOf(handles: readonly (QueryDevtoolsStatsHandle | undefined)[]): QueryActivity {\n const stats = sumQueryDevtoolsStats(handles);\n\n return {\n stats,\n cacheServed: Math.max(0, stats.executions - stats.requests),\n avgDurationMs: stats.responses ? Math.round(stats.totalDurationMs / stats.responses) : null,\n avgResponseBytes: stats.responses ? Math.round(stats.receivedBytes / stats.responses) : null,\n hasActivity: stats.executions > 0,\n };\n }\n\n /** An activity summary on one line, for a report. `null` for a query that has not run. */\n private activitySummary(activity: QueryActivity) {\n if (!activity.hasActivity) return null;\n\n const { stats } = activity;\n const parts = [\n `${stats.executions} execution${stats.executions === 1 ? '' : 's'}`,\n `${stats.requests} request${stats.requests === 1 ? '' : 's'}`,\n `↓ ${this.formatTransferred(stats.receivedBytes, stats.hasEstimatedBytes)}`,\n ];\n\n if (stats.sentBytes) parts.push(`↑ ${this.formatTransferred(stats.sentBytes, stats.hasEstimatedBytes)}`);\n if (stats.errors) parts.push(`${stats.errors} failed`);\n if (stats.retries) parts.push(`${stats.retries} retr${stats.retries === 1 ? 'y' : 'ies'}`);\n if (activity.avgDurationMs !== null) parts.push(`avg ${this.formatDuration(activity.avgDurationMs)}`);\n\n return `activity: ${parts.join(' · ')}`;\n }\n\n /** {@link routeSegments} as a plain string, for the places that cannot render markup. */\n private queryRoute(entry: QueryDevtoolsEntry | undefined, query: AnyQuery) {\n return this.routeSegments(entry, query)\n .map((segment) => segment.text)\n .join('');\n }\n\n /**\n * Describes a query the way a replay outside the app needs it: the URL, headers and body of the\n * request it last made, or - for a query that has not run - what its current args would send.\n */\n private exportedRequest(entry: QueryDevtoolsEntry, query: AnyQuery): InsomniaRequestInput {\n const request = query.subtle.request();\n const args = this.queryArgs(query) as { body?: unknown; headers?: unknown } | null;\n const route = this.queryRoute(entry, query);\n\n return {\n // A GraphQL query has no HTTP method of its own until it runs; its transport is POST unless the\n // creator says otherwise, which is only knowable from the request.\n method: request?.method ?? (entry.meta.gqlQuery ? 'POST' : (entry.meta.method ?? 'GET')),\n url: request?.url ?? `${entry.meta.clientBaseUrl ?? ''}${route}`,\n // Query params are part of the name so that several requests to the same endpoint (the pages of a\n // stack, a search) stay tellable apart in Insomnia's sidebar.\n name: `${entry.meta.method ?? ''} ${request ? this.requestPath(request.url) : route || query.id() || 'request'}`.trim(),\n headers: this.insomniaHeaders(request, args),\n body: args?.body ?? null,\n gqlQuery: entry.meta.gqlQuery ? this.gqlDocument(entry.meta.gqlQuery) : null,\n group: entry.meta.clientName ?? null,\n secureBy: entry.meta.isSecure ? (entry.meta.authProviderName ?? null) : null,\n };\n }\n\n /**\n * The token refreshes the given requests authenticate with - one per auth provider they name, and\n * only for a provider that is logged in, since a refresh request without a refresh token has\n * nothing to send.\n */\n private insomniaTokenRefreshes(requests: InsomniaRequestInput[]) {\n const names = new Set(\n requests.map((request) => request.secureBy).filter((name): name is string => typeof name === 'string'),\n );\n\n return Array.from(names)\n .map((name) => this.insomniaTokenRefresh(name))\n .filter((refresh): refresh is InsomniaTokenRefreshInput => refresh !== null);\n }\n\n private insomniaTokenRefresh(providerName: string): InsomniaTokenRefreshInput | null {\n const entry = this.authEntries().find((candidate) => candidate.meta.name === providerName);\n const refresh = entry?.meta.authQueries?.find((authQuery) => authQuery.kind === 'token-refresh');\n\n if (!entry || !refresh) return null;\n\n const provider = entry.handle as AnyBearerAuthProvider;\n const refreshToken = provider.refreshToken();\n\n if (!refreshToken) return null;\n\n return {\n id: providerName,\n name: `${refresh.method} ${refresh.route} (token refresh)`,\n method: refresh.method,\n url: `${entry.meta.clientBaseUrl ?? ''}${refresh.route}`,\n headers: [],\n body: refresh.buildArgs?.(refreshToken).body ?? null,\n group: entry.meta.clientName ?? null,\n accessTokenPath: this.accessTokenPath(provider),\n maxAgeSeconds: this.accessTokenMaxAge(provider),\n };\n }\n\n /**\n * Where the access token sits in the refresh response. A provider's `extractTokens` can pull it out\n * of any shape, so the path is recovered by finding the live token in the last auth response - with\n * the default extractor's `$.accessToken` as the fallback.\n */\n private accessTokenPath(provider: AnyBearerAuthProvider) {\n const token = provider.accessToken();\n const response = provider.latestExecutedQuery()?.snapshot.response();\n\n const path = token && response ? findValuePath(token, { value: response, path: '$', depth: 0 }) : null;\n\n return path ?? '$.accessToken';\n }\n\n /**\n * How long Insomnia may reuse a stored refresh response: the access token's own lifetime with a\n * margin, so the chain refreshes shortly before the token it hands out would expire. Capped at an\n * hour - a long-lived (or bogus) `exp` should still hand out a token minted this session.\n */\n private accessTokenMaxAge(provider: AnyBearerAuthProvider) {\n const payload = decodeJwtPayload(provider.accessToken());\n const exp = payload?.['exp'];\n const iat = payload?.['iat'];\n\n if (typeof exp !== 'number') return DEFAULT_TOKEN_MAX_AGE_S;\n\n const lifetime = exp - (typeof iat === 'number' ? iat : Math.floor(Date.now() / 1000));\n\n if (lifetime <= 0) return DEFAULT_TOKEN_MAX_AGE_S;\n\n return Math.min(MAX_TOKEN_MAX_AGE_S, Math.max(60, Math.round(lifetime * 0.9)));\n }\n\n /**\n * The headers a replay needs, including the ones the query client adds. Header providers can throw\n * (a secure query's needs an access token), in which case the request is exported without them.\n */\n private insomniaHeaders(\n request: { subtle: { resolveHeaders: () => HttpHeaders | undefined } } | null | undefined,\n args: { headers?: unknown } | null,\n ) {\n try {\n const headers = request\n ? request.subtle.resolveHeaders()\n : typeof args?.headers === 'function'\n ? (args.headers as () => HttpHeaders)()\n : (args?.headers as HttpHeaders | undefined);\n\n return (headers?.keys() ?? []).map((name) => ({ name, value: headers?.getAll(name)?.join(', ') ?? '' }));\n } catch {\n return [];\n }\n }\n\n private sessionClients(): SessionExportClient[] {\n return this.cacheView().map((client) => ({\n name: client.name,\n baseUrl: client.baseUrl,\n cacheEntries: client.rows.length,\n unusedCacheEntries: client.unused,\n cacheBytes: client.bytes,\n persistedEntries: client.client?.subtle.persistence ? this.persistedCount(client.client) : null,\n features: (client.client?.subtle.devtoolsFeatures ?? []).map((feature) => this.featureSummary(feature)),\n }));\n }\n\n /** Every registered entry, described by whatever its kind carries. */\n private sessionEntries(): SessionExportEntry[] {\n return queryDevtoolsEntries().map((entry) => {\n const base: SessionExportEntry = {\n id: entry.id,\n kind: entry.kind,\n name: entry.meta.name ?? null,\n client: entry.meta.clientBaseUrl ?? entry.meta.clientName ?? null,\n features: entry.meta.features?.map((feature) => this.featureSummary(feature)) ?? [],\n };\n\n if (entry.kind === 'query') return { ...base, ...this.sessionQuery(entry) };\n if (entry.kind === 'query-stack' || entry.kind === 'paged-query-stack') {\n const stack = entry.kind === 'paged-query-stack' ? this.asPagedStack(entry) : this.asStack(entry);\n\n return { ...base, activity: this.sessionActivity(this.stackActivity(stack)) };\n }\n if (entry.kind === 'query-sequence') return { ...base, detail: this.sessionSequence(entry) };\n if (entry.kind === 'query-batch')\n return { ...base, method: entry.meta.method ?? null, detail: this.sessionBatch(entry) };\n if (entry.kind === 'query-form') return { ...base, detail: this.sessionForm(entry) };\n if (entry.kind === 'auth-provider') return { ...base, detail: this.sessionAuth(entry) };\n if (entry.kind === 'ws-client') return { ...base, detail: this.sessionSocket(entry) };\n\n return base;\n });\n }\n\n private sessionQuery(entry: QueryDevtoolsEntry): Partial<SessionExportEntry> {\n const query = entry.handle as AnyQuery;\n const error = query.error();\n\n return {\n method: entry.meta.method ?? null,\n route: entry.meta.route ?? null,\n url: this.requestUrl(query),\n status: this.queryStatus(query),\n activity: this.sessionActivity(this.queryActivity(entry)),\n runs: (entry.stats?.runs() ?? []).map((run) => ({\n index: run.index,\n startedAt: new Date(run.startedAt).toISOString(),\n durationMs: run.endedAt === null ? null : run.endedAt - run.startedAt,\n status: run.status,\n attempts: run.attempts,\n didRequest: run.didRequest,\n receivedBytes: run.receivedBytes,\n url: run.url,\n })),\n args: this.queryArgs(query),\n response: query.response() ?? null,\n error: error ? { status: error.raw.status, body: error.isList ? error.errors : error.error } : null,\n overrides: (entry.overrides?.list() ?? []).map((override) => ({ id: override.id, op: override.op })),\n };\n }\n\n private sessionActivity(activity: QueryActivity): Record<string, unknown> {\n return { ...activity.stats, cacheServed: activity.cacheServed, avgDurationMs: activity.avgDurationMs };\n }\n\n private sessionSequence(entry: QueryDevtoolsEntry): Record<string, unknown> {\n const sequence = this.asSequence(entry);\n\n return {\n status: sequence.status(),\n currentStep: sequence.currentStep(),\n total: sequence.total,\n failedAt: sequence.failedAt(),\n steps: this.queriesForSequence(sequence).map((link, index) => ({\n method: link.method,\n route: link.segments.map((segment) => segment.text).join(''),\n status: this.sequenceStepStatus(sequence, index),\n args: sequence.stepArgs()[index] ?? null,\n response: this.stepSnapshot(sequence, index)?.response() ?? null,\n })),\n };\n }\n\n private sessionBatch(entry: QueryDevtoolsEntry): Record<string, unknown> {\n const batch = this.asBatch(entry);\n const items = this.batchItems(entry);\n\n return {\n route: entry.meta.route ?? null,\n status: batch.status(),\n concurrency: entry.meta.concurrency ?? null,\n stopOnError: entry.meta.stopOnError ?? null,\n total: batch.total(),\n completed: batch.completed(),\n inFlight: batch.inFlight(),\n succeeded: batch.succeeded(),\n failed: batch.failed(),\n skipped: batch.skipped(),\n itemsPerSecond: batch.itemsPerSecond(),\n remainingTimeMs: batch.remainingTime(),\n // Capped the way the card is, and reported the same way, so an export cannot read as the whole run.\n listedItems: items.rows.length,\n hiddenItems: items.hidden,\n items: items.rows.map((row) => {\n const error = row.result.status === 'error' ? row.result.error : null;\n\n return {\n index: row.result.index,\n status: row.result.status,\n route: row.segments.map((segment) => segment.text).join(''),\n error: error\n ? { status: error.raw.status, body: slimForReport(error.isList ? error.errors : error.error) }\n : null,\n };\n }),\n };\n }\n\n private sessionForm(entry: QueryDevtoolsEntry): Record<string, unknown> {\n const form = this.asForm(entry);\n\n return {\n activeFilterCount: form.activeFilterCount(),\n isAtDefaults: form.isAtDefaults(),\n isObserving: form.isObserving(),\n isCommitPending: form.isCommitPending(),\n value: form.value(),\n fields: form.fields().map((field) => ({\n key: field.key,\n value: field.value,\n defaultValue: field.defaultValue,\n paramKey: field.paramKey,\n queryParam: field.queryParam ?? null,\n isDefault: field.isDefault,\n })),\n drives: this.queriesDrivenByForm(entry).map((link) => link.id),\n };\n }\n\n /**\n * An auth provider without its tokens. A session report is a file that gets attached to a ticket, and\n * the access token is the one thing in the panel that must never travel with it - which is why only\n * its presence and its remaining lifetime are exported.\n */\n private sessionAuth(entry: QueryDevtoolsEntry): Record<string, unknown> {\n const auth = this.asAuth(entry);\n const lifetime = this.authTokenLifetime(entry);\n\n return {\n isAuthenticated: auth.isAuthenticated(),\n hasAccessToken: !!auth.accessToken(),\n hasRefreshToken: !!auth.refreshToken(),\n expiresIn: lifetime.expiresIn,\n overriddenTokenTtlSeconds: lifetime.ttlSeconds,\n queries: this.authQueryKeys(auth),\n };\n }\n\n private sessionSocket(entry: QueryDevtoolsEntry): Record<string, unknown> {\n const ws = this.asWs(entry);\n\n return {\n url: entry.meta.url ?? null,\n connected: ws.connected(),\n rooms: ws.rooms(),\n messages: ws.messages().map((message) => ({\n timestamp: new Date(message.timestamp).toISOString(),\n direction: message.direction,\n room: message.room,\n event: message.event,\n data: message.data,\n })),\n };\n }\n\n private sessionEvents(): SessionExportEvent[] {\n return this.eventLog().map((event) => ({\n timestamp: new Date(event.timestamp).toISOString(),\n client: event.client,\n type: event.type,\n method: event.method,\n url: event.url,\n status: event.status,\n durationMs: event.durationMs,\n bytes: event.bytes,\n cause: event.cause ? this.causeLabel(event.cause) : null,\n refreshed: event.refreshed?.map((refreshed) => `${refreshed.method} ${refreshed.path}`) ?? null,\n }));\n }\n\n private sessionFaults(): SessionExportFault[] {\n return this.faultClients()\n .filter((client) => client.armed)\n .map((client) => ({ client: client.name, ...client.fault }));\n }\n\n /** Only the armed ones: a capture taken while the panel was answering requests has to say which. */\n private sessionMocks(): SessionExportMock[] {\n const armed = queryDevtoolsArmedMocks();\n\n return queryDevtoolsMocks()\n .filter((mock) => armed.has(mock.id))\n .map((mock) => ({\n client: mock.clientName,\n method: mock.method,\n pattern: mock.pattern,\n status: mock.status,\n latencyMs: mock.latencyMs,\n body: slimForReport(mock.body),\n }));\n }\n\n private downloadFile(fileName: string, content: string) {\n this.downloadTextFile({ name: fileName, content, type: 'application/json' });\n }\n\n private stepKey(entryId: string, index: number) {\n return `${entryId}:${index}`;\n }\n\n private paneSize(pane: PaneTarget, axis: PaneAxis) {\n if (axis === 'block') return pane === 'list' ? this.listHeight : this.drawerHeight;\n\n return pane === 'list' ? this.listWidth : this.drawerWidth;\n }\n\n /** The panel's size is the distance from the pointer to the edge it is docked to. */\n private applyResize(drag: ResizeDrag, event: PointerEvent) {\n if (drag.kind === 'pane') {\n this.applyPaneResize(drag, event);\n\n return;\n }\n\n const root = this.document.documentElement;\n const dock = this.dock();\n\n // The size is the distance from the pointer to the edge the panel is attached to, which is the\n // pointer's own coordinate for a leading edge and the viewport minus it for a trailing one.\n if (this.sideDocked()) {\n const viewport = root.clientWidth;\n const size = dock === 'right' ? viewport - event.clientX : event.clientX;\n\n this.panelWidth.set(clamp(size, MIN_WIDTH, Math.round(viewport * 0.9)));\n\n return;\n }\n\n const viewport = root.clientHeight;\n const size = dock === 'bottom' ? viewport - event.clientY : event.clientY;\n\n this.panelHeight.set(clamp(size, MIN_HEIGHT, Math.round(viewport * 0.9)));\n }\n\n /** A pane's size is the distance from the pointer to the container edge that pane sits against. */\n private applyPaneResize(drag: Extract<ResizeDrag, { kind: 'pane' }>, event: PointerEvent) {\n const rect = drag.container.getBoundingClientRect();\n const leading = drag.pane === 'list';\n\n if (drag.axis === 'block') {\n const height = leading ? event.clientY - rect.top : rect.bottom - event.clientY;\n const max = Math.max(MIN_PANE_HEIGHT, Math.round(rect.height) - MIN_PANE_HEIGHT);\n\n this.paneSize(drag.pane, 'block').set(clamp(Math.round(height), MIN_PANE_HEIGHT, max));\n\n return;\n }\n\n const width = leading ? event.clientX - rect.left : rect.right - event.clientX;\n const max = Math.max(MIN_PANE_WIDTH, Math.round(rect.width) - MIN_PANE_WIDTH);\n\n this.paneSize(drag.pane, 'inline').set(clamp(Math.round(width), MIN_PANE_WIDTH, max));\n }\n\n private closePopup() {\n const popup = this.popup;\n\n this.popup = null;\n this.popOutStyleSync?.();\n this.popOutStyleSync = null;\n popup?.close();\n }\n\n private updateInspectHover(event: MouseEvent) {\n const host = this.hostEl.nativeElement;\n const map = this.elementQueryMap();\n let node = event.target as HTMLElement | null;\n\n // Ignore the devtools UI itself.\n if (node && host.contains(node)) {\n this.inspectHover.set(null);\n\n return;\n }\n\n while (node) {\n const entries = map.get(node);\n\n if (entries) {\n this.inspectHover.set({ rect: node.getBoundingClientRect(), entries });\n\n return;\n }\n\n node = node.parentElement;\n }\n\n this.inspectHover.set(null);\n }\n\n private selectInspectedQuery(event: MouseEvent) {\n const hover = this.inspectHover();\n const first = hover?.entries[0];\n\n if (!hover || !first) return;\n\n event.preventDefault();\n event.stopPropagation();\n\n const ids = hover.entries.map((e) => e.id);\n\n this.open.set(true);\n this.activeTab.set('queries');\n this.selectedClientName.set(null);\n this.inspectFilterIds.set(ids);\n // Auto-select when the element owns a single query, otherwise let the user pick from the filtered list.\n this.selectedQueryId.set(ids.length === 1 ? first.id : null);\n this.inspectActive.set(false);\n }\n\n private selectionKey() {\n return [\n this.selectedQueryId(),\n this.stackSelectedQueryId(),\n this.sequenceSelectedQueryId(),\n this.batchSelectedQueryId(),\n this.eventSelectedQueryId(),\n this.formSelectedQueryId(),\n this.timelineSelectedQueryId(),\n ].join('|');\n }\n\n /** Writes to the clipboard and ticks `copied` on success. `html` is omitted for plain-text payloads. */\n private writeToClipboard(payload: { text: string; html?: string }, copied: WritableSignal<boolean>) {\n const clipboard = navigator.clipboard;\n const { text, html } = payload;\n if (!clipboard) return;\n\n const flag = () => {\n copied.set(true);\n this.copiedReset$.next();\n };\n\n // Prefer rich HTML (Slack keeps the formatting on paste); fall back to plain text.\n if (html !== undefined && 'write' in clipboard && typeof ClipboardItem !== 'undefined') {\n const item = new ClipboardItem({\n 'text/html': new Blob([html], { type: 'text/html' }),\n 'text/plain': new Blob([text], { type: 'text/plain' }),\n });\n clipboard\n .write([item])\n .then(flag)\n .catch(() => clipboard.writeText(text).then(flag).catch(noop));\n\n return;\n }\n\n clipboard.writeText(text).then(flag).catch(noop);\n }\n\n private responseStatus(query: AnyQuery): number | null {\n const event = query.latestHttpEvent() as { status?: number } | null;\n return typeof event?.status === 'number' ? event.status : null;\n }\n\n private findQuery(id: string | null) {\n if (!id) return null;\n const entry = this.queryEntries().find((e) => e.id === id);\n return entry ? { entry, query: entry.handle as AnyQuery } : null;\n }\n\n private pushEvent(event: QueryRepositoryEvent, client: string) {\n // The log is about traffic. A cache entry being created is always followed by the request it made,\n // so a row for it would only ever duplicate the next one.\n if (event.type === 'entry-created') return;\n\n const base = {\n id: this.eventIdCounter++,\n timestamp: Date.now(),\n client,\n type: event.type,\n cause: null,\n destroyCause: null,\n refreshed: null,\n durationMs: null,\n bytes: null,\n isEstimatedBytes: false,\n };\n\n // Why an entry went away is otherwise unanswerable: it is gone from the cache view with nothing to\n // say whether a logout, its freshness window, the unused-entry cap or a manual evict took it.\n if (event.type === 'entry-destroyed') {\n this.droppedCacheEntries.update((list) => {\n const next: DroppedCacheEntry[] = [\n { client, method: event.method, url: event.url, cause: event.cause, at: base.timestamp },\n ...list,\n ];\n let kept = 0;\n\n // Per client, not in total - a client that drops a lot must not push another client's out of view.\n const cap = queryDevtoolsSettings().maxDroppedCacheEntries;\n\n return next.filter((entry) => entry.client !== client || ++kept <= cap);\n });\n\n this.pushEventItem({\n ...base,\n method: event.method,\n url: event.url,\n isSecure: event.isSecure,\n status: null,\n destroyCause: event.cause,\n queryId: this.resolveEventQueryId(event),\n });\n\n return;\n }\n\n // A logout drops every secure entry at once - worth a row of its own, since the requests that\n // disappear from the cache view are otherwise unexplained.\n if (event.type === 'unbind-all-secure') {\n this.pushEventItem({ ...base, method: null, url: null, isSecure: true, status: null, queryId: null });\n\n return;\n }\n\n // An invalidation is one row for the whole fan-out: the six queries it re-executed are listed on it\n // rather than blurring into the six request rows that follow.\n if (event.type === 'queries-refreshed') {\n this.pushEventItem({\n ...base,\n method: null,\n url: null,\n isSecure: false,\n status: null,\n queryId: null,\n cause: event.cause,\n refreshed: event.requests.map((request) => this.refreshedRequestOf(request)),\n });\n\n return;\n }\n\n // Both are read off the request as the event fires, which is the only moment they describe this\n // event: the next execution of the same request overwrites them.\n const measured = event.type === 'request-success' ? this.measureResponse(event.request) : null;\n\n this.pushEventItem({\n ...base,\n method: event.request.method,\n url: event.request.url,\n isSecure: event.isSecure,\n status: event.type === 'request-error' ? event.error.status : null,\n durationMs: event.request.subtle.lastDurationMs(),\n bytes: measured?.bytes ?? null,\n isEstimatedBytes: !!measured && !measured.isExact,\n queryId: this.resolveEventQueryId(event.request),\n });\n }\n\n /**\n * The registered query an event's request belongs to. A request is shared by every query on the same\n * cache key, so the first owner is as good as any - they all show the same response.\n *\n * The url fallback is what makes a row clickable when the query is already gone: an error that fires\n * as the component holding it is being destroyed (a `401` that redirects to login) has no live owner\n * left to match on identity, and its tombstone holds a copy of the request rather than the request.\n */\n private resolveEventQueryId(source: { url: string }) {\n const live = this.liveQueryEntries();\n const owner =\n live.find((e) => (e.handle as AnyQuery).subtle.request() === source) ??\n live.find((e) => this.requestUrl(e.handle as AnyQuery) === source.url);\n\n if (owner) return owner.id;\n\n // Youngest first: the same route destroyed twice leaves two tombstones, and the newer one is the\n // one this event belongs to.\n return (\n this.queryEntries()\n .filter((e) => e.destroyedAt && this.requestUrl(e.handle as AnyQuery) === source.url)\n .sort((a, b) => (b.destroyedAt ?? 0) - (a.destroyedAt ?? 0))[0]?.id ?? null\n );\n }\n\n /**\n * The size of a settled request's response, taken from its `content-length` when the response carried\n * one and measured from the decoded body otherwise.\n */\n private measureResponse(request: { currentEvent: () => unknown; response: () => unknown }) {\n const event = request.currentEvent();\n const headers = event && typeof event === 'object' && 'headers' in event ? (event.headers as HttpHeaders) : null;\n\n return measureQueryDevtoolsPayload({ headers, body: request.response() });\n }\n\n private refreshedRequestOf(request: { method: string; url: string }): RefreshedRequest {\n return {\n queryIds: this.liveQueryEntries()\n .filter((e) => (e.handle as AnyQuery).subtle.request() === request)\n .map((owner) => owner.id),\n method: request.method,\n path: this.requestPath(request.url),\n };\n }\n\n private pushEventItem(item: EventLogItem) {\n this.eventLog.update((log) => [item, ...log].slice(0, queryDevtoolsSettings().maxEvents));\n }\n}\n","@if (open()) {\n <section\n #panel\n [class.et-query-devtools-panel--resizing]=\"resizing()\"\n [attr.data-dock]=\"poppedOut() ? 'popout' : dock()\"\n [attr.data-pane-axis]=\"paneAxis()\"\n [attr.data-parked]=\"floatParked() ? '' : null\"\n [style.block-size.px]=\"panelBlockSize()\"\n [style.inline-size.px]=\"panelInlineSize()\"\n [style.inset-block-start.px]=\"panelInsetBlock()\"\n [style.inset-inline-start.px]=\"panelInsetInline()\"\n [style.--_et-qdt-list-width.px]=\"listWidth()\"\n [style.--_et-qdt-drawer-width.px]=\"drawerWidth()\"\n [style.--_et-qdt-list-height.px]=\"listHeight()\"\n [style.--_et-qdt-drawer-height.px]=\"drawerHeight()\"\n class=\"et-query-devtools-panel\"\n >\n <!-- A pop-out is sized by its window, so there is no edge to drag. A float is a window in the page:\n a title bar to move it and every edge to resize it, on the same `@ethlete/core` primitives the\n stream pip window uses. A dock has one edge, and it does both. -->\n @if (floating()) {\n <!-- Parked, the panel is a grab strip: the edge handles would eat most of the peek that is left\n to click, and resizing something you cannot see is not a thing to offer. -->\n <et-resize-handles\n [edges]=\"FLOAT_RESIZE_EDGES\"\n [disabled]=\"floatParked()\"\n (resizeStarted)=\"startFloatResize()\"\n (resizeMoved)=\"resizeFloat($event)\"\n (resizeEnded)=\"endFloatResize()\"\n (resizeCancelled)=\"endFloatResize()\"\n />\n <div\n (dragMoved)=\"moveFloat($event)\"\n (dragEnded)=\"endFloatMove()\"\n (dragCancelled)=\"endFloatMove()\"\n (dragTapped)=\"restoreFloat()\"\n class=\"et-query-devtools-move\"\n title=\"Drag to move — shove it off an edge to park it, click the strip to bring it back\"\n aria-hidden=\"true\"\n etDragHandle\n ></div>\n } @else if (!poppedOut()) {\n <div\n (pointerdown)=\"startResize($event)\"\n class=\"et-query-devtools-resize\"\n title=\"Drag to resize\"\n aria-hidden=\"true\"\n ></div>\n }\n <header class=\"et-query-devtools-header\">\n <nav class=\"et-query-devtools-tabs\" role=\"tablist\">\n @for (tab of visibleTabs(); track tab.id) {\n @let badge = tabBadges()[tab.id];\n <button\n [class.et-query-devtools-tab--active]=\"activeTab() === tab.id\"\n [attr.aria-selected]=\"activeTab() === tab.id\"\n (click)=\"activeTab.set(tab.id)\"\n class=\"et-query-devtools-tab\"\n type=\"button\"\n role=\"tab\"\n >\n {{ tab.label }}\n @if (badge.count) {\n <span class=\"et-query-devtools-tab-badge\">{{ badge.count }}</span>\n }\n @if (badge.errors) {\n <span\n class=\"et-query-devtools-tab-badge et-query-devtools-tab-badge--error\"\n title=\"{{ badge.errors }} {{ badge.errorNoun ?? 'failing' }}\"\n >\n {{ badge.errors }}\n </span>\n }\n </button>\n }\n\n @if (overflowTabs().length; as overflowCount) {\n <div class=\"et-query-devtools-menu\" etMenu>\n <button\n [title]=\"overflowCount + ' tabs with nothing in them'\"\n class=\"et-query-devtools-tab\"\n type=\"button\"\n etMenuTrigger\n >\n More\n <span class=\"et-query-devtools-menu-caret\" aria-hidden=\"true\">▾</span>\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n @for (tab of overflowTabs(); track tab.id) {\n <button (activate)=\"activeTab.set(tab.id)\" et-menu-item type=\"button\">{{ tab.label }}</button>\n }\n </et-menu>\n </ng-template>\n </div>\n }\n </nav>\n\n <div class=\"et-query-devtools-header-actions\">\n <button\n [class.et-query-devtools-inspect-btn--active]=\"inspectActive()\"\n [attr.aria-pressed]=\"inspectActive()\"\n (click)=\"toggleInspect()\"\n class=\"et-query-devtools-btn et-query-devtools-inspect-btn\"\n type=\"button\"\n title=\"Inspect: hover the UI to find its query\"\n >\n <svg\n class=\"et-query-devtools-inspect-icon\"\n viewBox=\"0 0 16 16\"\n width=\"14\"\n height=\"14\"\n fill=\"none\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <circle class=\"et-query-devtools-inspect-icon-ring\" cx=\"8\" cy=\"8\" r=\"4.25\" />\n <circle class=\"et-query-devtools-inspect-icon-dot\" cx=\"8\" cy=\"8\" r=\"1.15\" />\n <path d=\"M8 0.9v2.1M8 13v2.1M0.9 8h2.1M13 8h2.1\" />\n </svg>\n {{ inspectActive() ? 'Inspecting' : 'Inspect' }}\n @if (inspectActive()) {\n <kbd class=\"et-query-devtools-kbd et-query-devtools-kbd--inverse\">Esc</kbd>\n }\n </button>\n <button\n (click)=\"downloadSession()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Download every registered entry, the event log, the cache totals and anything armed as one JSON file - the attachment for a bug report\"\n >\n <span aria-hidden=\"true\">⤓</span>\n Session\n </button>\n <!-- A gear, not a tab: Settings holds nothing to count, so the badge/overflow logic would push it\n behind More - and the one control that explains a panel behaving oddly may not be hidden. -->\n <button\n [class.et-query-devtools-btn--active]=\"activeTab() === 'settings'\"\n [attr.aria-pressed]=\"activeTab() === 'settings'\"\n (click)=\"toggleSettings()\"\n class=\"et-query-devtools-btn et-query-devtools-icon-btn\"\n type=\"button\"\n title=\"Settings: where panel state is kept, and the limits it holds\"\n aria-label=\"Settings\"\n >\n <span aria-hidden=\"true\">⚙</span>\n </button>\n @if (!poppedOut()) {\n @let layout = currentLayout();\n <div class=\"et-query-devtools-menu\" etMenu placement=\"bottom-end\">\n <button class=\"et-query-devtools-btn\" title=\"Where the panel sits\" type=\"button\" etMenuTrigger>\n <span class=\"et-query-devtools-menu-glyph\" aria-hidden=\"true\">{{ layout.glyph }}</span>\n {{ layout.label }}\n <span class=\"et-query-devtools-menu-caret\" aria-hidden=\"true\">▾</span>\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <et-menu-radio-group [value]=\"dock()\">\n @for (option of LAYOUTS; track option.id) {\n <!-- eslint-disable ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <et-menu-radio-item\n [value]=\"option.id\"\n [title]=\"option.hint\"\n [closeOnActivate]=\"true\"\n (activate)=\"selectLayout(option.id)\"\n >\n <!-- eslint-enable ethlete/prefer-static-boolean-properties -->\n <span class=\"et-query-devtools-menu-item-glyph\" aria-hidden=\"true\">{{ option.glyph }}</span>\n {{ option.label }}\n </et-menu-radio-item>\n }\n </et-menu-radio-group>\n <et-menu-separator />\n <et-menu-checkbox-item\n [checked]=\"reservesSpace()\"\n [disabled]=\"floating()\"\n (checkedChange)=\"reservesSpace.set($event)\"\n title=\"The page gives up the room the panel covers, so its last rows can still be scrolled to. Docks only - a float sits wherever it was dragged.\"\n >\n Reserve page space\n </et-menu-checkbox-item>\n </et-menu>\n </ng-template>\n </div>\n }\n <span class=\"et-query-devtools-header-divider\" aria-hidden=\"true\"></span>\n <button\n (click)=\"toggleOpen()\"\n class=\"et-query-devtools-btn et-query-devtools-btn--danger\"\n type=\"button\"\n title=\"{{ poppedOut() ? 'Bring the panel back into the app window' : 'Close devtools (' + shortcut + ')' }}\"\n >\n @if (poppedOut()) {\n <span aria-hidden=\"true\">⧈</span>\n Dock back\n } @else {\n <span aria-hidden=\"true\">✕</span>\n Close\n <kbd class=\"et-query-devtools-kbd\">{{ shortcut }}</kbd>\n }\n </button>\n </div>\n </header>\n\n @if (popOutBlocked()) {\n <div class=\"et-query-devtools-notice-bar\" role=\"status\">\n <span class=\"et-query-devtools-armed-text\">\n The browser blocked the pop-up window. Allow pop-ups for this site, or float the panel over the page instead —\n a float needs no permission.\n </span>\n <button (click)=\"floatPanel()\" class=\"et-query-devtools-btn\" type=\"button\">Float instead</button>\n <button (click)=\"popOutBlocked.set(false)\" class=\"et-query-devtools-btn\" type=\"button\">Dismiss</button>\n </div>\n }\n\n @if (armedFaultClients(); as armed) {\n <div class=\"et-query-devtools-armed-bar\" role=\"status\">\n <span class=\"et-query-devtools-armed-dot\" aria-hidden=\"true\"></span>\n <span class=\"et-query-devtools-armed-text\">\n <strong>Faults armed</strong> on\n <span class=\"et-query-devtools-mono\">{{ armed.join(', ') }}</span>\n — every failure and delay you see from\n {{ armed.length === 1 ? 'this client' : 'these clients' }} is injected, not the API.\n @if (faultsRestored()) {\n They came back from your last page load — set <em>Armed faults</em> back to <em>none</em> in Settings to\n stop that.\n }\n </span>\n <button\n [disabled]=\"activeTab() === 'faults'\"\n (click)=\"activeTab.set('faults')\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n Review\n </button>\n <button (click)=\"CLEAR_FAULTS()\" class=\"et-query-devtools-btn\" type=\"button\">Disarm all</button>\n </div>\n }\n\n @if (armedMockRoutes(); as mocked) {\n <div class=\"et-query-devtools-armed-bar\" role=\"status\">\n <span class=\"et-query-devtools-armed-dot\" aria-hidden=\"true\"></span>\n <span class=\"et-query-devtools-armed-text\">\n <strong>Mocks armed</strong> on\n <span class=\"et-query-devtools-mono\">{{ mocked.join(', ') }}</span>\n — {{ mocked.length === 1 ? 'that route is' : 'those routes are' }} answered by the panel, so nothing they show\n reached the API.\n @if (mocksRestored()) {\n They came back from your last page load — set <em>Armed mocks</em> back to <em>none</em> in Settings to stop\n that.\n }\n </span>\n <button\n [disabled]=\"activeTab() === 'mocks'\"\n (click)=\"activeTab.set('mocks')\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n Review\n </button>\n <button (click)=\"DISARM_MOCKS()\" class=\"et-query-devtools-btn\" type=\"button\">Disarm all</button>\n </div>\n }\n\n @if (restoredOverrides(); as restored) {\n <div class=\"et-query-devtools-armed-bar\" role=\"status\">\n <span class=\"et-query-devtools-armed-dot\" aria-hidden=\"true\"></span>\n <span class=\"et-query-devtools-armed-text\">\n @if (restored.ops) {\n <strong>Overrides re-armed</strong> — {{ restored.ops }} {{ restored.ops === 1 ? 'edit' : 'edits' }} from\n your last page load {{ restored.ops === 1 ? 'is' : 'are' }} back on {{ restored.queries }}\n {{ restored.queries === 1 ? 'query' : 'queries' }}, so those responses are not what the API sent.\n @if (restored.fromLocalStorage) {\n They came back from <strong>localStorage</strong>, so they outlive closing this tab — clear them, or set\n overrides back to <em>session</em> in Settings.\n }\n } @else {\n <strong>Overrides could not be re-armed.</strong>\n }\n @if (restored.orphaned.length) {\n <span class=\"et-query-devtools-armed-orphans\">\n {{ restored.orphaned.length }} stored\n {{ restored.orphaned.length === 1 ? 'override' : 'overrides' }} matched no query —\n <span class=\"et-query-devtools-mono\">{{ restored.orphaned.join(', ') }}</span>\n </span>\n }\n </span>\n @if (restored.firstId; as firstId) {\n <button (click)=\"reviewRestoredOverrides(firstId)\" class=\"et-query-devtools-btn\" type=\"button\">Review</button>\n }\n <button (click)=\"DROP_RESTORED_OVERRIDES()\" class=\"et-query-devtools-btn\" type=\"button\">Drop all</button>\n </div>\n }\n\n <div class=\"et-query-devtools-body\">\n @switch (activeTab()) {\n <!-- QUERIES -->\n @case ('queries') {\n <et-query-devtools-queries-tab />\n }\n\n <!-- STACKS -->\n @case ('stacks') {\n <et-query-devtools-stacks-tab />\n }\n\n <!-- SEQUENCES -->\n @case ('sequences') {\n <et-query-devtools-sequences-tab />\n }\n\n <!-- BATCHES -->\n @case ('batches') {\n <et-query-devtools-batches-tab />\n }\n\n <!-- FORMS -->\n @case ('forms') {\n <et-query-devtools-forms-tab />\n }\n\n <!-- AUTH -->\n @case ('auth') {\n <et-query-devtools-auth-tab />\n }\n\n <!-- SOCKETS -->\n @case ('ws') {\n <et-query-devtools-sockets-tab />\n }\n\n <!-- CACHE -->\n @case ('cache') {\n <et-query-devtools-cache-tab />\n }\n\n <!-- LOCKS -->\n @case ('locks') {\n <et-query-devtools-locks-tab />\n }\n\n <!-- TIMELINE -->\n @case ('timeline') {\n <et-query-devtools-timeline-tab />\n }\n\n <!-- EVENTS -->\n @case ('events') {\n <et-query-devtools-events-tab />\n }\n\n <!-- FAULTS -->\n @case ('faults') {\n <et-query-devtools-faults-tab />\n }\n\n <!-- MOCKS -->\n @case ('mocks') {\n <et-query-devtools-mocks-tab />\n }\n\n <!-- ABOUT -->\n @case ('about') {\n <et-query-devtools-about />\n }\n\n <!-- SETTINGS -->\n @case ('settings') {\n <et-query-devtools-settings />\n }\n }\n </div>\n </section>\n}\n\n@if (!open()) {\n <et-query-devtools-toggle [tampered]=\"panelTampered()\" (openChange)=\"toggleOpen()\" />\n}\n\n@if (inspectActive() && inspectHover(); as hover) {\n <div\n [style.left.px]=\"hover.rect.left\"\n [style.top.px]=\"hover.rect.top\"\n [style.width.px]=\"hover.rect.width\"\n [style.height.px]=\"hover.rect.height\"\n class=\"et-query-devtools-inspect-box\"\n >\n <span class=\"et-query-devtools-inspect-tag\">{{ inspectLabel(hover.entries) }}</span>\n </div>\n}\n\n@if (locatedRect(); as rect) {\n <div\n [style.left.px]=\"rect.left\"\n [style.top.px]=\"rect.top\"\n [style.width.px]=\"rect.width\"\n [style.height.px]=\"rect.height\"\n class=\"et-query-devtools-inspect-box\"\n >\n <span class=\"et-query-devtools-inspect-tag\">created here</span>\n </div>\n}\n","import { QueryDevtoolsComponent } from './query-devtools.component';\n\nexport const QUERY_DEVTOOLS_IMPORTS = [QueryDevtoolsComponent] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["MAX_DEPTH","COPIED_RESET_MS","jsonBody","bodyOf","isPlainObject","INDENT","finalize"],"mappings":";;;;;;;;;;;AAQA,MAAM,QAAQ,GAAG,MAAmB;AAClC,IAAA,MAAM,KAAK,GAAG,kBAAkB,EAAE;AAElC,IAAA,MAAM,MAAM,GAAiB;AAC3B,QAAA;AACE,YAAA,KAAK,EAAE,SAAS;AAChB,YAAA,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,CAAA,SAAA,EAAY,IAAI,CAAA,CAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AAC9G,SAAA;AACD,QAAA,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,EAAE;KACzE;AAED,IAAA,IAAI,KAAK,CAAC,GAAG,EAAE;QACb,MAAM,CAAC,IAAI,CAAC;AACV,YAAA,KAAK,EAAE,aAAa;AACpB,YAAA,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAC3F,SAAA,CAAC;IACJ;AAEA,IAAA,OAAO,MAAM;AACf,C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ools-about.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-about.component.html","../../../../libs/query-devtools/src/lib/query-devtools-copy-menu-styles.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-copy-menu.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-diff.ts","../../../../libs/query-devtools/src/lib/query-devtools-exotic.ts","../../../../libs/query-devtools/src/lib/query-devtools-json-styles.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-clipboard.ts","../../../../libs/query-devtools/src/lib/query-devtools-override-menu-styles.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-override-menu.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-override-menu.component.html","../../../../libs/query-devtools/src/lib/query-devtools-json.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-host.ts","../../../../libs/query-devtools/src/lib/query-devtools-settings.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-settings.component.html","../../../../libs/query-devtools/src/lib/query-devtools-timeline-styles.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-features.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-auth-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-auth-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-types.ts","../../../../libs/query-devtools/src/lib/query-devtools-cache-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-cache-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-curl.ts","../../../../libs/query-devtools/src/lib/query-devtools-override-set-menu.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-override-set-menu.component.html","../../../../libs/query-devtools/src/lib/query-devtools-route.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-detail.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-detail.component.html","../../../../libs/query-devtools/src/lib/query-devtools-drawer.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-drawer.component.html","../../../../libs/query-devtools/src/lib/query-devtools-events-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-events-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-mock-designer.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-mock-designer.component.html","../../../../libs/query-devtools/src/lib/query-devtools-openapi.ts","../../../../libs/query-devtools/src/lib/query-devtools-typescript.ts","../../../../libs/query-devtools/src/lib/query-devtools-yaml.ts","../../../../libs/query-devtools/src/lib/query-devtools-mocks-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-mocks-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-faults-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-faults-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-forms-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-forms-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-locks-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-locks-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-locks.ts","../../../../libs/query-devtools/src/lib/version.ts","../../../../libs/query-devtools/src/lib/query-devtools-insomnia.ts","../../../../libs/query-devtools/src/lib/query-devtools-query-tree.ts","../../../../libs/query-devtools/src/lib/query-devtools-queries-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-queries-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-step-styles.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-batches-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-batches-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-sequences-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-sequences-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-sockets-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-sockets-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-stacks-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-stacks-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-timeline-tab.component.ts","../../../../libs/query-devtools/src/lib/query-devtools-timeline-tab.component.html","../../../../libs/query-devtools/src/lib/query-devtools-session.ts","../../../../libs/query-devtools/src/lib/query-devtools.component.ts","../../../../libs/query-devtools/src/lib/query-devtools.component.html","../../../../libs/query-devtools/src/lib/query-devtools.imports.ts","../../../../libs/query-devtools/src/ethlete-query-devtools.ts"],"sourcesContent":["import { Component, ViewEncapsulation, signal } from '@angular/core';\nimport { copyToClipboard } from '@ethlete/core';\nimport { queryDevtoolsAbout } from '@ethlete/query';\nimport { tap } from 'rxjs';\n\ntype AboutRow = { label: string; value: string };\ntype AboutGroup = { title: string; rows: AboutRow[] };\n\nconst groupsOf = (): AboutGroup[] => {\n const about = queryDevtoolsAbout();\n\n const groups: AboutGroup[] = [\n {\n title: 'Ethlete',\n rows: Object.entries(about.ethlete).map(([name, version]) => ({ label: `@ethlete/${name}`, value: version })),\n },\n { title: 'Runtime', rows: [{ label: 'Angular', value: about.angular }] },\n ];\n\n if (about.app) {\n groups.push({\n title: 'Application',\n rows: Object.entries(about.app).map(([label, value]) => ({ label, value: String(value) })),\n });\n }\n\n return groups;\n};\n\n/**\n * What is running: the loaded `@ethlete/*` versions, the Angular version and whatever the app handed to\n * `provideQueryDevtools({ about })`. A section rather than a tab body, so it can be shown anywhere.\n */\n@Component({\n selector: 'et-query-devtools-about',\n templateUrl: './query-devtools-about.component.html',\n styleUrl: './query-devtools-about.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsAboutComponent {\n protected readonly groups = groupsOf();\n\n protected copied = signal(false);\n\n protected copy() {\n const text = this.groups\n .map((group) => [group.title, ...group.rows.map((row) => ` ${row.label}: ${row.value}`)].join('\\n'))\n .join('\\n\\n');\n\n copyToClipboard(text)\n .pipe(tap((ok) => this.copied.set(ok)))\n .subscribe();\n }\n}\n","<div class=\"et-query-devtools-scroll\">\n <div class=\"et-query-devtools-toolbar et-query-devtools-about-toolbar\">\n <p class=\"et-query-devtools-hint\">\n What is running, and what a bug report should carry. Also in the <strong>⤓ Session</strong> export and on\n <code class=\"et-query-devtools-mono\">window.ethlete</code>.\n </p>\n <button (click)=\"copy()\" class=\"et-query-devtools-btn\" type=\"button\">\n <span aria-hidden=\"true\">⧉</span>\n {{ copied() ? 'Copied' : 'Copy' }}\n </button>\n </div>\n\n @for (group of groups; track group.title) {\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>{{ group.title }}</strong>\n </div>\n <dl class=\"et-query-devtools-about-list\">\n @for (row of group.rows; track row.label) {\n <div class=\"et-query-devtools-about-row\">\n <dt class=\"et-query-devtools-mono\">{{ row.label }}</dt>\n <dd class=\"et-query-devtools-mono\">{{ row.value }}</dd>\n </div>\n }\n </dl>\n </div>\n }\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n/**\n * The copy menu's caret chrome, as a styles-only component the menu mounts itself - a session that\n * never opens a value explorer does not inject it.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-copy-menu-styles',\n template: '',\n styleUrl: './query-devtools-copy-menu-styles.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsCopyMenuStylesComponent {}\n","import { Component, computed, input, output, ViewEncapsulation } from '@angular/core';\nimport { injectStyleManager } from '@ethlete/core';\nimport { MenuComponent, MenuDirective, MenuItemComponent } from '@ethlete/components';\nimport { MenuSurfaceDirective, MenuTriggerDirective } from '@ethlete/components';\nimport { QueryDevtoolsCopyMenuStylesComponent } from './query-devtools-copy-menu-styles.component';\nimport { JsonKind } from './query-devtools-json.component';\n\n/** Which of a node's four pasteable forms a copy action asks for. */\nexport type QueryDevtoolsCopyPayload = 'value' | 'key' | 'path' | 'entry';\n\n/**\n * The caret beside the value explorer's `⧉`, offering the key and the JSONPath that button cannot\n * reach. It only picks - the explorer node owns the clipboard write and the tick, so all four\n * payloads share one implementation and one \"what landed\" readout.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-copy-menu',\n template: `\n <div class=\"et-query-devtools-json-copy-menu\" etMenu>\n <button\n class=\"et-query-devtools-json-copy-more\"\n type=\"button\"\n aria-label=\"More copy options\"\n title=\"Copy the key or the path instead of the value\"\n etMenuTrigger\n >\n ▾\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <button (activate)=\"pick.emit('value')\" et-menu-item type=\"button\">Value</button>\n @if (namedByKey()) {\n <button (activate)=\"pick.emit('key')\" et-menu-item type=\"button\">Key</button>\n }\n <button (activate)=\"pick.emit('path')\" et-menu-item type=\"button\">Path</button>\n @if (namedByKey()) {\n <button (activate)=\"pick.emit('entry')\" et-menu-item type=\"button\">\"key\": value</button>\n }\n </et-menu>\n </ng-template>\n </div>\n `,\n encapsulation: ViewEncapsulation.None,\n imports: [MenuDirective, MenuTriggerDirective, MenuSurfaceDirective, MenuComponent, MenuItemComponent],\n})\nexport class QueryDevtoolsCopyMenuComponent {\n /** The kind of the container this node sits in, or `null` at an explorer root. */\n public parentKind = input<JsonKind | null>(null);\n\n public pick = output<QueryDevtoolsCopyPayload>();\n\n /**\n * Whether the node's key is worth having on its own. An array element's key is its index, so both\n * \"Key\" and the `\"key\": value` fragment would produce `0` / `\"0\": …` - the path is the only useful\n * address there.\n */\n protected namedByKey = computed(() => this.parentKind() !== 'array');\n\n constructor() {\n injectStyleManager().mount(QueryDevtoolsCopyMenuStylesComponent);\n }\n}\n","/** Whether a path exists only in the newer value, only in the older one, or in both with a new value. */\nexport type QueryDevtoolsDiffKind = 'added' | 'removed' | 'changed';\n\n/** One difference between two values, located by the path it sits at. */\nexport type QueryDevtoolsDiffEntry = {\n /** Where the difference sits, e.g. `$.items[2].score` or `$.items[id=7].score`. */\n path: string;\n\n kind: QueryDevtoolsDiffKind;\n\n /** The older value, or `null` for an added path. */\n before: unknown;\n\n /** The newer value, or `null` for a removed path. */\n after: unknown;\n};\n\nexport type QueryDevtoolsDiff = {\n entries: QueryDevtoolsDiffEntry[];\n\n /** Whether the walk hit its cap, so {@link entries} is only part of the difference. */\n truncated: boolean;\n};\n\n/** Enough to describe what changed between two responses; past this the list stops being readable. */\nconst MAX_ENTRIES = 200;\n\n/**\n * How deep the walk descends before comparing whole subtrees at once. Guards against a self-referential\n * response, and keeps a deeply nested change reported as one entry rather than a path per level.\n */\nconst MAX_DEPTH = 12;\n\n/** Stands in for a path one side does not have, so a stored `undefined` is not mistaken for a missing key. */\nconst ABSENT = /* @__PURE__ */ Symbol('absent');\n\ntype DiffAccumulator = { entries: QueryDevtoolsDiffEntry[]; truncated: boolean };\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\nconst valueAt = (record: Record<string, unknown>, key: string): unknown => (key in record ? record[key] : ABSENT);\n\n/**\n * The `id` of every element, when an array holds records keyed by a unique primitive `id` - the shape an\n * API list almost always has. `null` for anything else, which is then compared by index.\n */\nconst recordIds = (items: unknown[]) => {\n const ids: (string | number)[] = [];\n\n for (const item of items) {\n if (!isRecord(item)) return null;\n\n const id = item['id'];\n\n if (typeof id !== 'string' && typeof id !== 'number') return null;\n\n ids.push(id);\n }\n\n return new Set(ids).size === ids.length ? ids : null;\n};\n\n/**\n * Whether two values are the same, for the leaves and for the subtrees the walk stopped descending into.\n * The serialized comparison is key-order sensitive, which only ever over-reports a difference.\n */\nconst isSameValue = (before: unknown, after: unknown) => {\n if (Object.is(before, after)) return true;\n if (!isRecord(before) && !Array.isArray(before)) return false;\n if (!isRecord(after) && !Array.isArray(after)) return false;\n\n try {\n return JSON.stringify(before) === JSON.stringify(after);\n } catch {\n return false;\n }\n};\n\nconst push = (acc: DiffAccumulator, entry: QueryDevtoolsDiffEntry) => {\n if (acc.entries.length >= MAX_ENTRIES) {\n acc.truncated = true;\n\n return;\n }\n\n acc.entries.push(entry);\n};\n\n/**\n * Appends one step to a path in the panel's canonical JSONPath format - `$.data.items[0]`, rooted at\n * `$` for the value an explorer or a diff was handed. The one place that format is written, so the\n * diff's Path column and the value explorer's \"Copy path\" cannot drift apart.\n */\nexport const appendJsonPathStep = (path: string, step: string | number) =>\n typeof step === 'number' ? `${path}[${step}]` : `${path}.${step}`;\n\n/** The same format, built from the array of steps an override op targets. */\nexport const formatJsonPath = (steps: readonly (string | number)[]) => steps.reduce(appendJsonPathStep, '$');\n\n/** One position in the walk: the two values to compare there, and how deep into them it is. */\ntype WalkStep<T = unknown> = {\n before: T;\n after: T;\n path: string;\n depth: number;\n};\n\nconst walk = ({ before, after, path, depth }: WalkStep, acc: DiffAccumulator) => {\n if (acc.truncated) return;\n\n if (before === ABSENT) {\n push(acc, { path, kind: 'added', before: null, after });\n\n return;\n }\n\n if (after === ABSENT) {\n push(acc, { path, kind: 'removed', before, after: null });\n\n return;\n }\n\n if (depth < MAX_DEPTH) {\n if (isRecord(before) && isRecord(after)) {\n for (const key of new Set([...Object.keys(before), ...Object.keys(after)])) {\n walk(\n {\n before: valueAt(before, key),\n after: valueAt(after, key),\n path: appendJsonPathStep(path, key),\n depth: depth + 1,\n },\n acc,\n );\n }\n\n return;\n }\n\n if (Array.isArray(before) && Array.isArray(after)) {\n walkArrays({ before, after, path, depth }, acc);\n\n return;\n }\n }\n\n if (!isSameValue(before, after)) push(acc, { path, kind: 'changed', before, after });\n};\n\nconst walkArrays = ({ before, after, path, depth }: WalkStep<unknown[]>, acc: DiffAccumulator) => {\n const beforeIds = recordIds(before);\n const afterIds = recordIds(after);\n const nested = depth + 1;\n\n // Matching records by their `id` keeps a list that gained or lost an item reported as that one item,\n // instead of every index after it shifting and reading as changed.\n if (beforeIds && afterIds) {\n const afterById = new Map(afterIds.map((id, index) => [id, after[index]]));\n const beforeIdSet = new Set(beforeIds);\n\n beforeIds.forEach((id, index) => {\n const paired = afterById.has(id) ? afterById.get(id) : ABSENT;\n\n walk({ before: before[index], after: paired, path: `${path}[id=${id}]`, depth: nested }, acc);\n });\n\n afterIds.forEach((id, index) => {\n if (beforeIdSet.has(id)) return;\n\n walk({ before: ABSENT, after: after[index], path: `${path}[id=${id}]`, depth: nested }, acc);\n });\n\n return;\n }\n\n for (let index = 0; index < Math.max(before.length, after.length); index++) {\n walk(\n {\n before: index < before.length ? before[index] : ABSENT,\n after: index < after.length ? after[index] : ABSENT,\n path: appendJsonPathStep(path, index),\n depth: nested,\n },\n acc,\n );\n }\n};\n\n/**\n * What changed between two responses of the same query, as a flat list of paths - the shape that answers\n * \"the list re-rendered, what changed?\" and \"did that poll return anything new?\".\n */\nexport const diffQueryDevtoolsResponses = (before: unknown, after: unknown): QueryDevtoolsDiff => {\n const acc: DiffAccumulator = { entries: [], truncated: false };\n\n walk({ before, after, path: '$', depth: 0 }, acc);\n\n return acc;\n};\n","/**\n * Values the value explorer has to read through a reader of their own, because `Object.entries` on\n * them is either `[]` or a list of private fields - so a node would claim to hold nothing while\n * holding everything. `HttpHeaders` is the case this was written for: both of its real payloads are\n * `Map`s, and `Object.entries` on a `Map` is `[]`.\n */\nexport type ExoticValue =\n /** Rendered as a container, from these entries instead of the object's own. */\n | { typeName: string; entries: { k: string; v: unknown }[]; display?: never }\n /** Rendered as a leaf, with this text in place of `String(value)`. */\n | { typeName: string; display: string; entries?: never };\n\n/** Duck-typed rather than `instanceof HttpHeaders`, so a second copy of `@angular/common/http` still reads. */\nexport const isHeadersValue = (\n value: unknown,\n): value is { keys: () => string[]; getAll: (name: string) => string[] | null } =>\n !!value &&\n typeof value === 'object' &&\n 'keys' in value &&\n typeof value.keys === 'function' &&\n 'getAll' in value &&\n typeof value.getAll === 'function' &&\n 'lazyInit' in value;\n\n/**\n * How to render `value` if it is one of the built-ins the explorer knows, or `null` for anything it\n * should keep treating as a plain object or array.\n */\nexport const exoticOf = (value: unknown): ExoticValue | null => {\n // A header provider is the case in practice; `String(fn)` would dump its whole source into the row.\n if (typeof value === 'function') return { typeName: 'fn', display: value.name || 'anonymous' };\n\n if (!value || typeof value !== 'object') return null;\n\n if (value instanceof Date) {\n return { typeName: 'Date', display: Number.isNaN(value.getTime()) ? 'Invalid Date' : value.toISOString() };\n }\n\n if (typeof File !== 'undefined' && value instanceof File) {\n return {\n typeName: 'File',\n entries: [\n { k: 'name', v: value.name },\n { k: 'size', v: value.size },\n { k: 'type', v: value.type },\n { k: 'lastModified', v: new Date(value.lastModified) },\n ],\n };\n }\n\n if (typeof Blob !== 'undefined' && value instanceof Blob) {\n return {\n typeName: 'Blob',\n entries: [\n { k: 'size', v: value.size },\n { k: 'type', v: value.type },\n ],\n };\n }\n\n if (value instanceof Map) {\n return { typeName: 'Map', entries: [...value].map(([k, v]) => ({ k: String(k), v })) };\n }\n\n if (value instanceof Set) {\n return { typeName: 'Set', entries: [...value].map((v, i) => ({ k: String(i), v })) };\n }\n\n if (typeof FormData !== 'undefined' && value instanceof FormData) {\n return { typeName: 'FormData', entries: [...value].map(([k, v]) => ({ k, v })) };\n }\n\n if (isHeadersValue(value)) {\n return { typeName: 'HttpHeaders', entries: headerEntries(value) };\n }\n\n return null;\n};\n\n/**\n * The headers an `HttpHeaders` actually holds, as `name: value` pairs. A header set more than once\n * joins on `, ` the way the wire format does.\n */\nexport const headerEntries = (headers: { keys: () => string[]; getAll: (name: string) => string[] | null }) => {\n try {\n return headers.keys().map((name) => ({ k: name, v: headers.getAll(name)?.join(', ') ?? '' }));\n } catch {\n return [];\n }\n};\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n/**\n * The value explorer's tree chrome, as a styles-only component the tree mounts itself - a session that\n * never opens a JSON view does not inject it.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-json-styles',\n template: '',\n styleUrl: './query-devtools-json-styles.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsJsonStylesComponent {}\n","/** Why a clipboard read produced nothing, phrased for the menu line that shows it. */\nexport type QueryDevtoolsClipboardFailure = 'unavailable' | 'blocked';\n\n/**\n * Reads the clipboard, distinguishing \"this browser has no `readText`\" from \"the user or the permission\n * gate said no\". Neither is recoverable here, and both leave the caller to fall back to a box that takes\n * a real paste event - a `ClipboardEvent` needs no permission anywhere.\n *\n * Part of the devtools contract. Not part of the general public contract.\n */\nexport const readQueryDevtoolsClipboard = (): Promise<\n { ok: true; text: string } | { ok: false; reason: QueryDevtoolsClipboardFailure }\n> => {\n if (!navigator.clipboard?.readText) return Promise.resolve({ ok: false as const, reason: 'unavailable' as const });\n\n return navigator.clipboard.readText().then(\n (text) => ({ ok: true as const, text }),\n () => ({ ok: false as const, reason: 'blocked' as const }),\n );\n};\n\n/**\n * The text a real paste event carries, or `null` when it holds no plain text - the fallback path for a\n * blocked {@link readQueryDevtoolsClipboard}.\n *\n * Part of the devtools contract. Not part of the general public contract.\n */\nexport const textFromQueryDevtoolsPaste = (event: ClipboardEvent) => {\n const text = event.clipboardData?.getData('text/plain');\n\n return text ? text : null;\n};\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n/**\n * The override menu's trigger chrome, as a styles-only component the menu mounts itself - a session\n * that never opens the value explorer's override menu does not inject it.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-override-menu-styles',\n template: '',\n styleUrl: './query-devtools-override-menu-styles.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsOverrideMenuStylesComponent {}\n","import { Component, computed, effect, ElementRef, input, signal, viewChild, ViewEncapsulation } from '@angular/core';\nimport { injectErrorTheme, injectStyleManager, ProvideColorDirective } from '@ethlete/core';\nimport {\n collectLeafPaths,\n detectPaginationShape,\n generateQueryDevtoolsNumberPreset,\n generateQueryDevtoolsStringPreset,\n hasQueryDevtoolsOverridesAtPath,\n isDateShapedLeaf,\n JsonPath,\n QueryDevtoolsOverridesRecorder,\n} from '@ethlete/query';\nimport {\n MenuComponent,\n MenuDirective,\n MenuItemComponent,\n MenuItemShortcutComponent,\n MenuSeparatorComponent,\n} from '@ethlete/components';\nimport { MenuSearchDirective, MenuSurfaceDirective, MenuTriggerDirective } from '@ethlete/components';\nimport { readQueryDevtoolsClipboard, textFromQueryDevtoolsPaste } from './query-devtools-clipboard';\nimport { JsonKind, kindOf } from './query-devtools-json.component';\nimport { QueryDevtoolsOverrideMenuStylesComponent } from './query-devtools-override-menu-styles.component';\n\n/**\n * The per-value action menu of the query devtools value explorer: arms a path-addressed\n * {@link OverrideOp} on the query's response so it replays on every future fetch, instead of the\n * one-shot raw-JSON edit the panel's JIT editor offers.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-override-menu',\n templateUrl: './query-devtools-override-menu.component.html',\n encapsulation: ViewEncapsulation.None,\n imports: [\n MenuDirective,\n MenuTriggerDirective,\n MenuSurfaceDirective,\n MenuSearchDirective,\n MenuComponent,\n MenuItemComponent,\n MenuItemShortcutComponent,\n MenuSeparatorComponent,\n ProvideColorDirective,\n ],\n})\nexport class QueryDevtoolsOverrideMenuComponent {\n protected errorColorTheme = injectErrorTheme();\n public value = input<unknown>();\n public path = input<JsonPath>([]);\n public parentKind = input<JsonKind | null>(null);\n public overrides = input.required<QueryDevtoolsOverridesRecorder>();\n\n private rootMenu = viewChild.required<MenuDirective>('rootMenu');\n private customInput = viewChild<ElementRef<HTMLInputElement>>('customValueInput');\n private pasteInput = viewChild<ElementRef<HTMLInputElement>>('pasteBox');\n\n protected kind = computed(() => kindOf(this.value()));\n protected isContainer = computed(() => this.kind() === 'array' || this.kind() === 'object');\n protected isEmptyValue = computed(() => this.kind() === 'null' || this.kind() === 'undefined');\n protected hasArmedOverrides = computed(() => hasQueryDevtoolsOverridesAtPath(this.overrides().list(), this.path()));\n protected isArrayElement = computed(() => this.parentKind() === 'array' && this.kind() === 'object');\n protected paginationShape = computed(() => detectPaginationShape(this.value()));\n\n /** Whether this node sits inside a container it can be removed from - the root does not. */\n protected isRemovable = computed(() => this.path().length > 0);\n protected isInArray = computed(() => this.parentKind() === 'array');\n protected hasArrayItems = computed(() => {\n const value = this.value();\n return Array.isArray(value) && value.length > 0;\n });\n protected supportsNull = computed(() => !this.isEmptyValue());\n\n protected isDate = computed(() => {\n const path = this.path();\n return this.kind() === 'string' && isDateShapedLeaf(path[path.length - 1] ?? null, this.value());\n });\n\n protected customMode = signal(false);\n protected pasteMode = signal(false);\n private pasteTarget = signal<PasteTarget>('value');\n protected pendingPaste = signal<{ value: unknown; kind: JsonKind } | null>(null);\n protected menuError = signal<string | null>(null);\n protected menuNote = signal<string | null>(null);\n\n protected supportsCustomValue = computed(() => !this.isContainer() && this.kind() !== 'boolean');\n\n protected customPlaceholder = computed(() => {\n switch (this.kind()) {\n case 'number':\n return 'A number';\n case 'string':\n return 'Any text';\n default:\n return 'JSON or plain text';\n }\n });\n\n constructor() {\n injectStyleManager().mount(QueryDevtoolsOverrideMenuStylesComponent);\n\n effect(() => this.customInput()?.nativeElement.focus());\n effect(() => this.pasteInput()?.nativeElement.focus());\n }\n\n protected applyStringPreset(preset: 'short' | 'long' | 'longWord' | 'unicode') {\n this.overrides().arm({\n type: 'stringPreset',\n path: this.path(),\n preset,\n custom: generateQueryDevtoolsStringPreset(preset),\n });\n }\n\n protected applyNumberPreset(preset: 'zero' | 'negative' | 'huge') {\n this.overrides().arm({\n type: 'numberPreset',\n path: this.path(),\n preset,\n custom: generateQueryDevtoolsNumberPreset(preset),\n });\n }\n\n protected applyDatePreset(preset: 'now' | 'plusDay' | 'minusDay' | 'farFuture' | 'farPast' | 'invalid') {\n this.overrides().arm({ type: 'datePreset', path: this.path(), preset });\n }\n\n protected setValue(value: unknown) {\n this.overrides().arm({ type: 'set', path: this.path(), value });\n }\n\n protected flipBoolean() {\n this.overrides().arm({ type: 'booleanFlip', path: this.path() });\n }\n\n protected duplicateThisItem() {\n const path = this.path();\n const parentPath = path.slice(0, -1);\n const index = Number(path[path.length - 1]);\n\n this.overrides().arm({ type: 'duplicateArrayItem', path: parentPath, index });\n }\n\n protected duplicateArray() {\n this.overrides().arm({ type: 'duplicateArray', path: this.path() });\n }\n\n protected emptyArray() {\n this.overrides().arm({ type: 'set', path: this.path(), value: [] });\n }\n\n protected deleteThis() {\n this.overrides().arm({ type: 'deleteAt', path: this.path() });\n }\n\n protected resizePagination(mode: 'shrink' | 'extend') {\n this.overrides().arm({ type: 'paginationResize', path: this.path(), mode, amount: 1 });\n }\n\n protected fillStrings(preset: 'short' | 'long' | 'longWord' | 'unicode') {\n for (const leaf of collectLeafPaths(this.value(), 'string')) {\n this.overrides().arm({\n type: 'stringPreset',\n path: [...this.path(), ...leaf],\n preset,\n custom: generateQueryDevtoolsStringPreset(preset),\n });\n }\n }\n\n protected fillNumbers(preset: 'zero' | 'negative' | 'huge') {\n for (const leaf of collectLeafPaths(this.value(), 'number')) {\n this.overrides().arm({\n type: 'numberPreset',\n path: [...this.path(), ...leaf],\n preset,\n custom: generateQueryDevtoolsNumberPreset(preset),\n });\n }\n }\n\n protected fillBooleans() {\n for (const leaf of collectLeafPaths(this.value(), 'boolean')) {\n this.overrides().arm({ type: 'booleanFlip', path: [...this.path(), ...leaf] });\n }\n }\n\n protected reset() {\n this.overrides().arm({ type: 'reset', path: this.path() });\n }\n\n protected startCustomEdit() {\n this.menuError.set(null);\n this.customMode.set(true);\n }\n\n protected commitCustomValue() {\n const raw = this.customInput()?.nativeElement.value;\n if (raw === undefined) return;\n\n const kind = this.kind();\n\n if (kind === 'number') {\n const value = Number(raw.trim());\n\n if (!raw.trim() || Number.isNaN(value)) {\n this.menuError.set('Not a number');\n\n return;\n }\n\n this.overrides().arm({ type: 'numberPreset', path: this.path(), preset: 'custom', custom: value });\n } else if (kind === 'string') {\n this.overrides().arm({ type: 'stringPreset', path: this.path(), preset: 'custom', custom: raw });\n } else {\n this.overrides().arm({ type: 'set', path: this.path(), value: parseLooseJson(raw) });\n }\n\n this.rootMenu().closeAll();\n }\n\n protected pasteValue() {\n this.startPaste('value');\n }\n\n protected pasteArrayItem() {\n this.startPaste('arrayItem');\n }\n\n protected pasteIntoBox(event: ClipboardEvent) {\n const text = textFromQueryDevtoolsPaste(event);\n if (!text) return;\n\n event.preventDefault();\n this.armPastedText(text);\n }\n\n protected commitPasteBox() {\n const raw = this.pasteInput()?.nativeElement.value;\n\n if (raw !== undefined) this.armPastedText(raw);\n }\n\n /** Arms the paste the kind guard stopped, now that the menu has said what it replaces. */\n protected confirmKindChange() {\n const pending = this.pendingPaste();\n if (!pending) return;\n\n this.pendingPaste.set(null);\n this.armValue(pending.value);\n }\n\n protected cancelKindChange() {\n this.pendingPaste.set(null);\n }\n\n protected resetEditingState(open: boolean) {\n if (!open) {\n this.customMode.set(false);\n this.pasteMode.set(false);\n this.pasteTarget.set('value');\n this.pendingPaste.set(null);\n this.menuError.set(null);\n this.menuNote.set(null);\n }\n }\n\n private startPaste(target: PasteTarget) {\n this.menuError.set(null);\n this.menuNote.set(null);\n this.pendingPaste.set(null);\n this.pasteTarget.set(target);\n\n readQueryDevtoolsClipboard().then((read) => {\n if (read.ok) {\n this.armPastedText(read.text);\n\n return;\n }\n\n this.pasteMode.set(true);\n this.menuNote.set(\n read.reason === 'unavailable'\n ? 'This browser will not hand over the clipboard - press ⌘V / Ctrl+V here instead.'\n : 'The clipboard read was blocked - press ⌘V / Ctrl+V here instead.',\n );\n });\n }\n\n private armPastedText(text: string) {\n if (!text.trim()) {\n this.menuError.set('The clipboard is empty');\n\n return;\n }\n\n let value: unknown;\n\n try {\n value = JSON.parse(text);\n } catch {\n if (this.pasteTarget() === 'value' && this.isContainer()) {\n this.menuError.set('The clipboard does not hold valid JSON');\n\n return;\n }\n\n value = text;\n }\n\n if (this.pasteTarget() === 'arrayItem') {\n this.armValue(value);\n\n return;\n }\n\n const pastedKind = kindOf(value);\n\n // The guard catches a copied *path* pasted over a body; \"this field became an array\" is worth\n // rehearsing, so it asks rather than refuses.\n if (pastedKind !== this.kind()) {\n this.pasteMode.set(false);\n this.menuError.set(null);\n this.menuNote.set(null);\n this.pendingPaste.set({ value, kind: pastedKind });\n\n return;\n }\n\n this.armValue(value);\n }\n\n private armValue(value: unknown) {\n if (this.pasteTarget() === 'arrayItem') this.overrides().arm({ type: 'pasteArrayItem', path: this.path(), value });\n else this.overrides().arm({ type: 'set', path: this.path(), value });\n\n this.rootMenu().closeAll();\n }\n}\n\n/** Whether a paste replaces the node itself or lands as a new element inside it. */\ntype PasteTarget = 'value' | 'arrayItem';\n\nconst parseLooseJson = (raw: string): unknown => {\n try {\n return JSON.parse(raw);\n } catch {\n return raw;\n }\n};\n","<div #rootMenu=\"etMenu\" (openChange)=\"resetEditingState($event)\" class=\"et-query-devtools-override-menu\" etMenu>\n <button\n class=\"et-query-devtools-override-trigger\"\n aria-label=\"Override this value\"\n title=\"Override this value\"\n etMenuTrigger\n type=\"button\"\n >\n ✎\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <ng-container ngProjectAs=\"input[etMenuSearch]\">\n @if (customMode()) {\n <input\n #customValueInput\n [error]=\"menuError()\"\n [placeholder]=\"customPlaceholder()\"\n (keydown.enter)=\"commitCustomValue()\"\n etMenuSearch\n type=\"text\"\n />\n } @else if (pasteMode()) {\n <input\n #pasteBox\n [error]=\"menuError()\"\n (paste)=\"pasteIntoBox($event)\"\n (keydown.enter)=\"commitPasteBox()\"\n etMenuSearch\n type=\"text\"\n placeholder=\"Paste here\"\n />\n }\n </ng-container>\n\n @if (customMode()) {\n <!-- eslint-disable-next-line ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <button [closeOnActivate]=\"false\" (activate)=\"commitCustomValue()\" et-menu-item type=\"button\">Apply</button>\n } @else if (pendingPaste(); as pending) {\n <p class=\"et-query-devtools-override-note\">\n This replaces {{ kind() === 'undefined' ? 'a missing value' : 'the ' + kind() }} with {{ pending.kind }}.\n </p>\n <button (activate)=\"confirmKindChange()\" et-menu-item type=\"button\">Replace anyway</button>\n <button (activate)=\"cancelKindChange()\" et-menu-item type=\"button\">Cancel</button>\n } @else if (pasteMode()) {\n <!-- eslint-disable-next-line ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <button [closeOnActivate]=\"false\" (activate)=\"commitPasteBox()\" et-menu-item type=\"button\">Apply</button>\n\n @if (menuNote(); as note) {\n <p class=\"et-query-devtools-override-note\">{{ note }}</p>\n }\n } @else {\n @switch (kind()) {\n @case ('string') {\n @if (isDate()) {\n <button (activate)=\"applyDatePreset('now')\" et-menu-item type=\"button\">Now</button>\n <button (activate)=\"applyDatePreset('plusDay')\" et-menu-item type=\"button\">+1 day</button>\n <button (activate)=\"applyDatePreset('minusDay')\" et-menu-item type=\"button\">-1 day</button>\n <button (activate)=\"applyDatePreset('farFuture')\" et-menu-item type=\"button\">Far future</button>\n <button (activate)=\"applyDatePreset('farPast')\" et-menu-item type=\"button\">Far past</button>\n <button (activate)=\"applyDatePreset('invalid')\" et-menu-item type=\"button\">Invalid date</button>\n } @else {\n <button (activate)=\"applyStringPreset('short')\" et-menu-item type=\"button\">Short text</button>\n <button (activate)=\"applyStringPreset('long')\" et-menu-item type=\"button\">Long text</button>\n <button (activate)=\"applyStringPreset('longWord')\" et-menu-item type=\"button\">Long word</button>\n <button (activate)=\"applyStringPreset('unicode')\" et-menu-item type=\"button\">Unicode / RTL sample</button>\n }\n }\n @case ('number') {\n <button (activate)=\"applyNumberPreset('zero')\" et-menu-item type=\"button\">Zero</button>\n <button (activate)=\"applyNumberPreset('negative')\" et-menu-item type=\"button\">Negative</button>\n <button (activate)=\"applyNumberPreset('huge')\" et-menu-item type=\"button\">Huge</button>\n }\n @case ('boolean') {\n <button (activate)=\"flipBoolean()\" et-menu-item type=\"button\">Flip</button>\n }\n @case ('array') {\n <button (activate)=\"duplicateArray()\" et-menu-item type=\"button\">Duplicate array</button>\n\n @if (hasArrayItems()) {\n <button (activate)=\"emptyArray()\" et-menu-item type=\"button\">Empty this array</button>\n }\n }\n }\n\n @if (supportsNull()) {\n <button (activate)=\"setValue(null)\" et-menu-item type=\"button\">Set to null</button>\n }\n\n @if (isEmptyValue()) {\n <button (activate)=\"setValue('Ab')\" et-menu-item type=\"button\">Set to text</button>\n <button (activate)=\"setValue(0)\" et-menu-item type=\"button\">Set to number</button>\n <button (activate)=\"setValue(true)\" et-menu-item type=\"button\">Set to true</button>\n <button (activate)=\"setValue({})\" et-menu-item type=\"button\">Set to empty object</button>\n <button (activate)=\"setValue([])\" et-menu-item type=\"button\">Set to empty array</button>\n }\n\n @if (supportsCustomValue()) {\n <!-- eslint-disable-next-line ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <button [closeOnActivate]=\"false\" (activate)=\"startCustomEdit()\" et-menu-item type=\"button\">Custom…</button>\n }\n\n @if (isArrayElement()) {\n <button (activate)=\"duplicateThisItem()\" et-menu-item type=\"button\">Duplicate this item</button>\n }\n\n @if (paginationShape()) {\n <button (activate)=\"resizePagination('shrink')\" et-menu-item type=\"button\">Shrink page by 1</button>\n <button (activate)=\"resizePagination('extend')\" et-menu-item type=\"button\">Extend page by 1</button>\n }\n\n <!-- eslint-disable-next-line ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <button [closeOnActivate]=\"false\" (activate)=\"pasteValue()\" et-menu-item type=\"button\">Paste value</button>\n\n @if (kind() === 'array') {\n <!-- eslint-disable-next-line ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <button [closeOnActivate]=\"false\" (activate)=\"pasteArrayItem()\" et-menu-item type=\"button\">\n Paste as new item\n </button>\n }\n\n @if (isContainer()) {\n <et-menu-separator />\n\n <div etMenu>\n <button et-menu-item etMenuTrigger type=\"button\">\n Fill every string\n <et-menu-item-shortcut>›</et-menu-item-shortcut>\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <button (activate)=\"fillStrings('short')\" et-menu-item type=\"button\">Short text</button>\n <button (activate)=\"fillStrings('long')\" et-menu-item type=\"button\">Long text</button>\n <button (activate)=\"fillStrings('longWord')\" et-menu-item type=\"button\">Long word</button>\n <button (activate)=\"fillStrings('unicode')\" et-menu-item type=\"button\">Unicode / RTL sample</button>\n </et-menu>\n </ng-template>\n </div>\n\n <div etMenu>\n <button et-menu-item etMenuTrigger type=\"button\">\n Fill every number\n <et-menu-item-shortcut>›</et-menu-item-shortcut>\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <button (activate)=\"fillNumbers('zero')\" et-menu-item type=\"button\">Zero</button>\n <button (activate)=\"fillNumbers('negative')\" et-menu-item type=\"button\">Negative</button>\n <button (activate)=\"fillNumbers('huge')\" et-menu-item type=\"button\">Huge</button>\n </et-menu>\n </ng-template>\n </div>\n\n <button (activate)=\"fillBooleans()\" et-menu-item type=\"button\">Flip every boolean</button>\n }\n\n @if (isRemovable()) {\n <et-menu-separator />\n\n <button (activate)=\"deleteThis()\" et-menu-item variant=\"destructive\" type=\"button\">\n {{ isInArray() ? 'Delete this item' : 'Delete this key' }}\n </button>\n }\n\n @if (menuError(); as err) {\n <p [etProvideColor]=\"errorColorTheme\" class=\"et-query-devtools-override-error\" role=\"alert\">{{ err }}</p>\n }\n\n @if (hasArmedOverrides()) {\n <et-menu-separator />\n\n <button (activate)=\"reset()\" et-menu-item variant=\"destructive\" type=\"button\">Reset</button>\n }\n }\n </et-menu>\n </ng-template>\n</div>\n","import { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Component, computed, input, linkedSignal, numberAttribute, signal, ViewEncapsulation } from '@angular/core';\nimport { injectStyleManager } from '@ethlete/core';\nimport { JsonPath, QueryDevtoolsOverridesRecorder } from '@ethlete/query';\nimport { Subject, switchMap, tap, timer } from 'rxjs';\nimport { QueryDevtoolsCopyMenuComponent, QueryDevtoolsCopyPayload } from './query-devtools-copy-menu.component';\nimport { formatJsonPath } from './query-devtools-diff';\nimport { exoticOf } from './query-devtools-exotic';\nimport { QueryDevtoolsJsonStylesComponent } from './query-devtools-json-styles.component';\nimport { QueryDevtoolsOverrideMenuComponent } from './query-devtools-override-menu.component';\n\n/** A JSON value's kind as the value explorer (and its per-node override menu) categorizes it. */\nexport type JsonKind = 'string' | 'number' | 'boolean' | 'null' | 'undefined' | 'array' | 'object';\n\ntype JsonEntry = { k: string; v: unknown };\n\n/** A folded slice of a container's entries, rendered as its own collapsible row. */\ntype JsonChunk = { start: number; end: number; label: string };\n\n/** How long the copy button stays ticked after a successful write. */\nconst COPIED_RESET_MS = 1200;\n\n/**\n * Containers with more entries than this are not rendered directly - their children are grouped into\n * collapsed slices of this size, so a 5000-item array costs 50 rows instead of 5000.\n */\nconst CHUNK_SIZE = 100;\n\nexport const kindOf = (value: unknown): JsonKind => {\n if (value === null) return 'null';\n if (value === undefined) return 'undefined';\n if (Array.isArray(value)) return 'array';\n return typeof value as JsonKind;\n};\n\nconst entriesOf = (value: unknown): JsonEntry[] => {\n if (Array.isArray(value)) return value.map((v, i) => ({ k: String(i), v }));\n\n const exotic = exoticOf(value);\n if (exotic) return exotic.entries ?? [];\n\n if (value && typeof value === 'object') {\n return Object.entries(value as Record<string, unknown>).map(([k, v]) => ({ k, v }));\n }\n return [];\n};\n\n/** Keeps the number of sibling slices at or below `CHUNK_SIZE` by folding recursively for huge counts. */\nconst chunkSizeFor = (count: number) => {\n let size = CHUNK_SIZE;\n while (count / size > CHUNK_SIZE) size *= CHUNK_SIZE;\n return size;\n};\n\n/**\n * A recursive, collapsible, searchable JSON tree used by the query devtools value explorer. Renders\n * the *transformed* value the app actually sees (post `transformResponse`). Self-recurses via its\n * own selector - both for child entries and for the folded slices of an oversized container, which\n * re-enter as the same component with a `chunk` window over the same value.\n */\n@Component({\n selector: 'et-query-devtools-json',\n template: `\n @if (isContainer()) {\n <div class=\"et-query-devtools-json-node\">\n <div class=\"et-query-devtools-json-row\">\n <button\n [attr.aria-expanded]=\"effectiveExpanded()\"\n (click)=\"toggle()\"\n class=\"et-query-devtools-json-toggle\"\n type=\"button\"\n >\n <span class=\"et-query-devtools-json-caret\">{{ effectiveExpanded() ? '▾' : '▸' }}</span>\n @if (chunk(); as chunk) {\n <span class=\"et-query-devtools-json-chunk\">{{ chunk.label }}</span>\n } @else if (nodeKey() !== null) {\n <span [class.et-query-devtools-json-hit]=\"keyHit()\" class=\"et-query-devtools-json-key\">{{\n nodeKey()\n }}</span>\n <span class=\"et-query-devtools-json-colon\">:</span>\n }\n <span class=\"et-query-devtools-json-preview\">{{ preview() }}</span>\n @if (annotation(); as annotation) {\n <span [title]=\"annotationTitle()\" class=\"et-query-devtools-json-type\">{{ annotation }}</span>\n }\n </button>\n <button\n [attr.aria-label]=\"copyLabel()\"\n [title]=\"copyLabel()\"\n [class.et-query-devtools-json-copy--copied]=\"copied()\"\n (click)=\"copy('value')\"\n class=\"et-query-devtools-json-copy\"\n type=\"button\"\n >\n {{ copied() ? '✓' : '⧉' }}\n </button>\n @if (addressable()) {\n <et-query-devtools-copy-menu [parentKind]=\"parentKind()\" (pick)=\"copy($event)\" />\n }\n @if (overrides(); as overrides) {\n <et-query-devtools-override-menu\n [value]=\"value()\"\n [path]=\"jsonPath()\"\n [parentKind]=\"parentKind()\"\n [overrides]=\"overrides\"\n />\n }\n </div>\n\n @if (effectiveExpanded()) {\n <div class=\"et-query-devtools-json-children\">\n @for (childChunk of childChunks(); track childChunk.start) {\n <et-query-devtools-json\n [value]=\"value()\"\n [chunk]=\"childChunk\"\n [depth]=\"depth()\"\n [path]=\"path()\"\n [jsonPath]=\"jsonPath()\"\n [parentKind]=\"parentKind()\"\n [overrides]=\"overrides()\"\n [annotations]=\"annotations()\"\n [search]=\"search()\"\n [expandedPaths]=\"expandedPaths()\"\n [collapsedPaths]=\"collapsedPaths()\"\n [toggleFn]=\"toggleFn()\"\n />\n }\n @for (entry of visibleEntries(); track entry.k) {\n <et-query-devtools-json\n [value]=\"entry.v\"\n [nodeKey]=\"entry.k\"\n [depth]=\"depth() + 1\"\n [path]=\"childPath(entry.k)\"\n [jsonPath]=\"childJsonPath(entry.k)\"\n [parentKind]=\"kind()\"\n [overrides]=\"overrides()\"\n [annotations]=\"annotations()\"\n [search]=\"search()\"\n [expandedPaths]=\"expandedPaths()\"\n [collapsedPaths]=\"collapsedPaths()\"\n [toggleFn]=\"toggleFn()\"\n />\n }\n </div>\n }\n </div>\n } @else {\n <div [attr.data-kind]=\"kind()\" class=\"et-query-devtools-json-row et-query-devtools-json-leaf\">\n @if (nodeKey() !== null) {\n <span [class.et-query-devtools-json-hit]=\"keyHit()\" class=\"et-query-devtools-json-key\">{{ nodeKey() }}</span>\n <span class=\"et-query-devtools-json-colon\">:</span>\n }\n <span [class.et-query-devtools-json-hit]=\"valueHit()\" class=\"et-query-devtools-json-value\">{{\n display()\n }}</span>\n @if (annotation(); as annotation) {\n <span [title]=\"annotationTitle()\" class=\"et-query-devtools-json-type\">{{ annotation }}</span>\n }\n <button\n [attr.aria-label]=\"copyLabel()\"\n [title]=\"copyLabel()\"\n [class.et-query-devtools-json-copy--copied]=\"copied()\"\n (click)=\"copy('value')\"\n class=\"et-query-devtools-json-copy\"\n type=\"button\"\n >\n {{ copied() ? '✓' : '⧉' }}\n </button>\n @if (addressable()) {\n <et-query-devtools-copy-menu [parentKind]=\"parentKind()\" (pick)=\"copy($event)\" />\n }\n @if (overrides(); as overrides) {\n <et-query-devtools-override-menu\n [value]=\"value()\"\n [path]=\"jsonPath()\"\n [parentKind]=\"parentKind()\"\n [overrides]=\"overrides\"\n />\n }\n </div>\n }\n `,\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsJsonComponent, QueryDevtoolsCopyMenuComponent, QueryDevtoolsOverrideMenuComponent],\n})\nexport class QueryDevtoolsJsonComponent {\n public value = input<unknown>();\n public nodeKey = input<string | null>(null);\n public depth = input(0, { transform: numberAttribute });\n /** Lowercased search term; when set, the tree auto-expands and matches are highlighted. */\n public search = input('');\n\n /**\n * When set, this node is not the value itself but a folded window over its entries. It shares the\n * container's `path` so a child's persisted expansion does not depend on where the slice borders land.\n */\n public chunk = input<JsonChunk | null>(null);\n\n /** Full path of this node from the explorer root, used as the key for persisted expansion. */\n public path = input('');\n /** Persisted paths explicitly expanded (overrides the depth default). */\n public expandedPaths = input<ReadonlySet<string> | null>(null);\n /** Persisted paths explicitly collapsed (overrides the depth default). */\n public collapsedPaths = input<ReadonlySet<string> | null>(null);\n /** When provided, expansion is externally persisted via this callback instead of local state. */\n public toggleFn = input<((path: string, expand: boolean) => void) | null>(null);\n\n /** Same node as {@link path}, but as the array-of-steps an override op targets rather than a display key. */\n public jsonPath = input<JsonPath>([]);\n /** The kind of the container holding this node, so its override menu can offer \"duplicate this item\". */\n public parentKind = input<JsonKind | null>(null);\n /** When provided, every node renders an override menu that arms/clears ops through it. */\n public overrides = input<QueryDevtoolsOverridesRecorder | null>(null);\n\n /**\n * The declared type of each field, keyed by its path with array indices as `*` (`items.*.id`) - as\n * {@link QueryDevtoolsSchemaSeed} produces it. A node with an entry labels itself with it.\n */\n public annotations = input<ReadonlyMap<string, string> | null>(null);\n\n protected kind = computed(() => kindOf(this.value()));\n private exotic = computed(() => exoticOf(this.value()));\n\n /** One annotation covers every element of an array, so the lookup path forgets which index this is. */\n private shapePath = computed(() =>\n this.path()\n .split('.')\n .map((step) => (/^\\d+$/.test(step) ? '*' : step))\n .join('.'),\n );\n\n protected annotation = computed(() => (this.chunk() ? null : (this.annotations()?.get(this.shapePath()) ?? null)));\n\n protected annotationTitle = computed(() => `Declared in the API description as ${this.annotation()}`);\n\n /** A `Date` or a `File` is object-typed but has nothing to expand into, so it renders as a leaf. */\n protected isContainer = computed(\n () => (this.kind() === 'array' || this.kind() === 'object') && !this.exotic()?.display,\n );\n\n /** The entries this node covers: the container's own, or just the window a chunk stands for. */\n public ownEntries = computed<JsonEntry[]>(() => {\n const entries = entriesOf(this.value());\n const chunk = this.chunk();\n\n return chunk ? entries.slice(chunk.start, chunk.end) : entries;\n });\n\n protected childChunks = computed(() => {\n const entries = this.ownEntries();\n if (entries.length <= CHUNK_SIZE) return [];\n\n return buildChunks(entries, { offset: this.chunk()?.start ?? 0, isArray: this.kind() === 'array' });\n });\n\n /** Entries rendered as rows - empty while they are folded into slices instead. */\n protected visibleEntries = computed(() => (this.childChunks().length ? [] : this.ownEntries()));\n\n /** Slices carry their window in the key so siblings persist independently of the container. */\n private togglePath = computed(() => {\n const chunk = this.chunk();\n\n return chunk ? `${this.path()}#${chunk.start}` : this.path();\n });\n\n private defaultExpanded = computed(() => !this.chunk() && this.depth() < 1);\n\n private localExpanded = linkedSignal(() => this.defaultExpanded());\n\n protected expanded = computed(() => {\n // Externally-persisted mode: resolve from the expanded/collapsed path sets, else the depth default.\n if (this.toggleFn()) {\n const path = this.togglePath();\n\n if (this.collapsedPaths()?.has(path)) return false;\n if (this.expandedPaths()?.has(path)) return true;\n\n return this.defaultExpanded();\n }\n\n return this.localExpanded();\n });\n\n /** Only slices that actually contain a match unfold while searching, so a filter stays cheap. */\n private chunkHasHit = computed(() => {\n const term = this.search();\n\n return !!term && this.ownEntries().some(({ k, v }) => k.toLowerCase().includes(term) || matchesDeep(v, term));\n });\n\n protected effectiveExpanded = computed(() => {\n if (!this.search()) return this.expanded();\n\n return this.chunk() ? this.chunkHasHit() : true;\n });\n\n /** What the last copy put on the clipboard, or `null` once the tick has expired. */\n protected copied = signal<QueryDevtoolsCopyPayload | null>(null);\n private copiedReset$ = new Subject<void>();\n\n /**\n * Whether this node has an address of its own to copy. An explorer root has no key, and a folded\n * slice stands for a range of entries rather than one path - neither can name itself.\n */\n protected addressable = computed(() => this.nodeKey() !== null && !this.chunk());\n\n private valueLabel = computed(() => {\n const count = this.ownEntries().length;\n\n if (this.chunk()) return `slice (${count} ${count === 1 ? 'entry' : 'entries'})`;\n\n if (this.kind() === 'array') return `array (${count} ${count === 1 ? 'item' : 'items'})`;\n\n if (this.kind() === 'object') return `object (${count} ${count === 1 ? 'key' : 'keys'})`;\n\n return 'value';\n });\n\n /**\n * Doubles as the button's `title` and its `aria-label`, and names what landed while the tick is up -\n * a bare `✓` stopped being unambiguous once the menu put four payloads behind one control.\n */\n protected copyLabel = computed(() => {\n const copied = this.copied();\n\n if (copied) return `Copied the ${copied === 'entry' ? '\"key\": value pair' : copied}`;\n\n return `Copy ${this.valueLabel()}`;\n });\n\n protected preview = computed(() => {\n const count = this.ownEntries().length;\n\n if (this.kind() === 'array') return count ? `[…] ${count}` : '[]';\n\n const typeName = this.exotic()?.typeName;\n if (typeName) return `${typeName}(${count})`;\n\n return count ? `{…} ${count}` : '{}';\n });\n\n protected display = computed(() => displayOf(this.value()));\n\n protected keyHit = computed(() => {\n const term = this.search();\n const key = this.nodeKey();\n return !!term && !!key && key.toLowerCase().includes(term);\n });\n\n protected valueHit = computed(() => {\n const term = this.search();\n return !!term && this.display().toLowerCase().includes(term);\n });\n\n constructor() {\n injectStyleManager().mount(QueryDevtoolsJsonStylesComponent);\n\n // Each copy restarts the tick countdown; switchMap drops the pending reset of the previous one.\n this.copiedReset$\n .pipe(\n switchMap(() => timer(COPIED_RESET_MS)),\n tap(() => this.copied.set(null)),\n takeUntilDestroyed(),\n )\n .subscribe();\n }\n\n protected childPath(key: string) {\n const path = this.path();\n return path ? `${path}.${key}` : key;\n }\n\n protected childJsonPath(key: string): JsonPath {\n const step: string | number = this.kind() === 'array' ? Number(key) : key;\n return [...this.jsonPath(), step];\n }\n\n protected toggle() {\n const toggleFn = this.toggleFn();\n\n if (toggleFn) {\n toggleFn(this.togglePath(), !this.expanded());\n\n return;\n }\n\n this.localExpanded.set(!this.localExpanded());\n }\n\n /**\n * Writes one of the node's four pasteable forms. All of them go through here so the tick stays a\n * single readout of what actually landed.\n */\n protected copy(payload: QueryDevtoolsCopyPayload) {\n const text = this.copyTextFor(payload);\n\n if (text === null) return;\n\n navigator.clipboard\n ?.writeText(text)\n .then(() => this.flagCopied(payload))\n .catch(() => undefined);\n }\n\n /**\n * Containers copy their whole subtree as JSON, slices only the entries they cover; leaves copy\n * something pasteable - a raw string without the display quotes, so an id or url can go straight\n * into a search box. `null` for a subtree that cannot be serialized at all.\n */\n private copyTextFor(payload: QueryDevtoolsCopyPayload): string | null {\n if (payload === 'key') return this.nodeKey();\n if (payload === 'path') return formatJsonPath(this.jsonPath());\n\n const kind = this.kind();\n const exotic = this.exotic();\n const value = this.chunk() ? this.chunkValue() : this.copyableValue();\n\n try {\n if (payload === 'entry') return `${JSON.stringify(this.nodeKey())}: ${JSON.stringify(value, null, 2)}`;\n\n if (kind === 'string') return value as string;\n if (kind === 'undefined') return 'undefined';\n if (exotic?.display) return exotic.display;\n\n return JSON.stringify(value, null, 2);\n } catch {\n // Circular references (or a BigInt / toJSON that throws) make the subtree unserializable.\n return null;\n }\n }\n\n /** An exotic container copies the entries the tree shows, not the private fields `JSON.stringify` finds. */\n private copyableValue() {\n const entries = this.exotic()?.entries;\n\n return entries ? Object.fromEntries(entries.map((entry) => [entry.k, entry.v])) : this.value();\n }\n\n private chunkValue() {\n const entries = this.ownEntries();\n\n if (this.kind() === 'array') return entries.map((entry) => entry.v);\n\n return Object.fromEntries(entries.map((entry) => [entry.k, entry.v]));\n }\n\n private flagCopied(payload: QueryDevtoolsCopyPayload) {\n this.copied.set(payload);\n this.copiedReset$.next();\n }\n}\n\n// Below the component: an interpolated template literal above an inline template breaks the Angular\n// language service for the whole template (see `ethlete/no-template-literal-before-inline-template`).\n\nconst displayOf = (value: unknown) => {\n const exotic = exoticOf(value);\n if (exotic?.display) return `${exotic.typeName}(${exotic.display})`;\n\n switch (kindOf(value)) {\n case 'string':\n return `\"${value as string}\"`;\n case 'null':\n return 'null';\n case 'undefined':\n return 'undefined';\n default:\n return String(value);\n }\n};\n\nconst buildChunks = (entries: JsonEntry[], window: { offset: number; isArray: boolean }): JsonChunk[] => {\n const size = chunkSizeFor(entries.length);\n const chunks: JsonChunk[] = [];\n\n for (let i = 0; i < entries.length; i += size) {\n const slice = entries.slice(i, i + size);\n const start = window.offset + i;\n const end = start + slice.length;\n const first = window.isArray ? String(start) : (slice[0]?.k ?? '');\n const last = window.isArray ? String(end - 1) : (slice[slice.length - 1]?.k ?? '');\n\n chunks.push({ start, end, label: slice.length === 1 ? first : `${first} … ${last}` });\n }\n\n return chunks;\n};\n\n/** Whether a search term appears anywhere in a subtree - used to keep non-matching slices folded. */\nconst matchesDeep = (value: unknown, term: string): boolean => {\n if (!value || typeof value !== 'object' || exoticOf(value)?.display) {\n return displayOf(value).toLowerCase().includes(term);\n }\n\n return entriesOf(value).some(({ k, v }) => k.toLowerCase().includes(term) || matchesDeep(v, term));\n};\n","import { inject, InjectionToken, Signal, WritableSignal } from '@angular/core';\nimport {\n AnyBearerAuthProvider,\n AnyPagedQueryStack,\n AnyQueryBatch,\n AnyQuerySnapshot,\n AnyQueryStack,\n QueryClient,\n QueryDevtoolsEntry,\n QueryDevtoolsFault,\n QueryDevtoolsFeature,\n QueryDevtoolsFormHandle,\n QueryDevtoolsRun,\n QueryDevtoolsRunError,\n QueryRefreshCause,\n QueryRepository,\n QueryRepositoryCacheEntry,\n QuerySequence,\n QuerySequenceStatus,\n WebSocketDevtoolsHandle,\n WebSocketDevtoolsMessage,\n} from '@ethlete/query';\nimport { QueryDevtoolsDiff } from './query-devtools-diff';\nimport { DevtoolsLockRow } from './query-devtools-locks';\nimport {\n AnyQuery,\n BatchItemView,\n CacheView,\n DetailTab,\n DevtoolsTab,\n EventLogItem,\n PaneAxis,\n PaneTarget,\n QueryActivity,\n QueryDevtoolsChip,\n QueryDevtoolsSelection,\n QueryDevtoolsTokenLifetime,\n QueryLink,\n QueryListFacet,\n RepositoryInfo,\n RequestProgress,\n RouteSegment,\n TabBadge,\n} from './query-devtools-types';\n\n/**\n * Everything a tab or the shared detail drawer reads from - or writes back into - the always-mounted\n * `<et-query-devtools>` panel: cross-tab registries, the JIT editor, copy/export actions, the value\n * explorer and pane sizing. A tab component only ever exists while it is the active one, so anything a\n * tab needs to survive being switched away from (a drawer's own selection, the persisted panel chrome)\n * has to live here instead of on the tab itself. Every member below is named and shaped exactly like the\n * panel's own field/method it stands in for.\n *\n * @see injectQueryDevtoolsHost\n */\nexport type QueryDevtoolsHost = {\n selectTab(tab: DevtoolsTab): void;\n\n /** Jumps to the Queries tab with this query selected - the Events tab is a way in, not a dead end. */\n selectQuery(id: string): void;\n\n /** Jumps to the Forms tab with this form selected. */\n selectForm(id: string): void;\n\n queryEntries: Signal<QueryDevtoolsEntry[]>;\n stackEntries: Signal<QueryDevtoolsEntry[]>;\n sequenceEntries: Signal<QueryDevtoolsEntry[]>;\n batchEntries: Signal<QueryDevtoolsEntry[]>;\n formEntries: Signal<QueryDevtoolsEntry[]>;\n authEntries: Signal<QueryDevtoolsEntry[]>;\n wsEntries: Signal<QueryDevtoolsEntry[]>;\n repositories: Signal<RepositoryInfo[]>;\n\n /**\n * The cache per client, with every entry's size measured. Reading each response inside the computed is\n * what keeps the totals current: a cache mutation bumps `cacheVersion`, but a response landing in an\n * entry that is already there does not.\n */\n cacheView: Signal<CacheView[]>;\n refetchCacheEntry(entry: QueryRepositoryCacheEntry): void;\n evictCacheEntry(repository: QueryRepository, key: string): void;\n /** Drops every entry of one client, consumers included - the cold-start check that does not need a reload. */\n evictAllCacheEntries(repository: QueryRepository): void;\n toggleCacheValue(clientName: string, key: string): void;\n isCacheValueExpanded(clientName: string, key: string): boolean;\n cacheFreshness(entry: QueryRepositoryCacheEntry): string;\n cacheSync(entry: QueryRepositoryCacheEntry, pollStates: Record<string, unknown>): string;\n cachePersistence(entry: QueryRepositoryCacheEntry): string;\n /** How many responses this client has on disk, which is usually more than it has in memory. */\n persistedCount(client: QueryClient): number;\n clearPersistedQueries(client: QueryClient): void;\n /** The features of the client behind a cache tab card, or `null` for a client without any. */\n clientFeatures(client: QueryClient | null | undefined): QueryDevtoolsFeature[] | null;\n\n /**\n * Every Web Lock held or queued across this origin, decoded, or `null` in a browser without the Web\n * Locks API. Empty while the Locks tab has not read its first snapshot - it polls, because Web Locks\n * has no change event to listen to.\n */\n lockRows: Signal<DevtoolsLockRow[] | null>;\n /** Where this tab stands on one lock, as a chip: whether it holds it, waits for it, or is not in it. */\n lockStanding(row: DevtoolsLockRow): QueryDevtoolsChip;\n\n /** Unique client names present across queries and auth providers, for the Queries/Timeline pickers. */\n clientNames: Signal<string[]>;\n\n /** What each tab holds - also drives the tab bar's own badges, so it lives here rather than per-tab. */\n tabBadges: Signal<Record<DevtoolsTab, TabBadge>>;\n\n /**\n * Every client the Faults tab can arm, with the fault it currently carries. Also feeds the\n * cross-tab \"Faults armed\" banner and the session export, so it lives here rather than on the tab.\n */\n faultClients: Signal<{ name: string; baseUrl: string; fault: QueryDevtoolsFault; armed: boolean }[]>;\n\n /**\n * The queries in scope before the Queries tab's own search box and status chips narrow them further:\n * either the picked client's, or exactly the inspected element's. Also what the Timeline tab scopes\n * its runs to, which is why this lives here rather than on the Queries tab alone.\n */\n scopedQueries: Signal<QueryDevtoolsEntry[]>;\n\n /** 1-second tick driving every countdown/freshness readout across tabs. */\n clock: Signal<number>;\n\n findQuery(id: string | null): QueryDevtoolsSelection | null;\n queryLinkFor(entry: QueryDevtoolsEntry | undefined, query?: AnyQuery): QueryLink;\n\n asStack(entry: QueryDevtoolsEntry): AnyQueryStack;\n asPagedStack(entry: QueryDevtoolsEntry): AnyPagedQueryStack;\n asSequence(entry: QueryDevtoolsEntry): QuerySequence<unknown[]>;\n asBatch(entry: QueryDevtoolsEntry): AnyQueryBatch;\n asAuth(entry: QueryDevtoolsEntry): AnyBearerAuthProvider;\n asWs(entry: QueryDevtoolsEntry): WebSocketDevtoolsHandle;\n asForm(entry: QueryDevtoolsEntry): QueryDevtoolsFormHandle;\n\n authTokenPayload(auth: AnyBearerAuthProvider): Record<string, unknown> | null;\n authQueryKeys(auth: AnyBearerAuthProvider): string[];\n /** The access-token expiry the app acts on, plus the lifetime the panel has armed over it. */\n authTokenLifetime(entry: QueryDevtoolsEntry): QueryDevtoolsTokenLifetime;\n /** The multi-tab leadership chip, or `null` for a provider without `withBearerAuthMultiTabSync`. */\n authLeadership(auth: AnyBearerAuthProvider): QueryDevtoolsChip | null;\n\n queryStatus(query: AnyQuery): 'idle' | 'loading' | 'success' | 'error';\n isStale(query: AnyQuery): boolean;\n /** Whether an entry is showing an armed response override or a devtools-faulted outcome. */\n isTampered(entry: QueryDevtoolsEntry): boolean;\n /** Whether armed response overrides are stored and replayed on the next load. */\n overridesPersist(): boolean;\n toggleOverridesPersist(): void;\n /** Where they are kept, named for a title or a hint (`sessionStorage`, `localStorage`, `not kept`). */\n overridesScopeLabel(): string;\n /** Puts the panel's layout, filters, pins and stored overrides back to defaults, keeping the settings. */\n resetDevtools(): void;\n requestProgress(query: AnyQuery): RequestProgress | null;\n retryCause(status: number): string;\n requestUrl(query: AnyQuery): string | null;\n requestPath(url: string): string;\n queryArgs(query: AnyQuery): unknown;\n routeSegments(entry: QueryDevtoolsEntry | undefined, query: AnyQuery): RouteSegment[];\n queryActivity(entry: QueryDevtoolsEntry): QueryActivity;\n linkActivity(link: QueryLink): QueryActivity;\n stackActivity(stack: AnyQueryStack | AnyPagedQueryStack): QueryActivity;\n sequenceActivity(sequence: QuerySequence<unknown[]>): QueryActivity;\n queriesForStack(stack: AnyQueryStack | AnyPagedQueryStack): QueryLink[];\n queriesForSequence(sequence: QuerySequence<unknown[]>): QueryLink[];\n /**\n * The queries a form feeds, discovered from the reads its `value()` recorded while their args were\n * built - so a form that nothing consumes yet reads as exactly that.\n */\n queriesDrivenByForm(entry: QueryDevtoolsEntry): QueryLink[];\n sequenceStepStatus(sequence: QuerySequence<unknown[]>, index: number): QuerySequenceStatus;\n stepSnapshot(sequence: QuerySequence<unknown[]>, index: number): AnyQuerySnapshot | null;\n /** Whether a sequence step's in/out detail (`<entryId>:<stepIndex>`) is expanded - persisted. */\n isStepExpanded(entryId: string, index: number): boolean;\n toggleStep(entryId: string, index: number): void;\n\n /** A batch's route with its path params left as `:name` - a batch fills them in per item, not once. */\n batchRouteSegments(entry: QueryDevtoolsEntry): RouteSegment[];\n\n /**\n * The batch entry that created a query, or `null` for a query no batch did. What lets the Queries list\n * fold a bulk run's items under one row instead of listing whatever it has in flight.\n */\n batchOf(entry: QueryDevtoolsEntry): QueryDevtoolsEntry | null;\n\n /**\n * The item queries a batch has in flight. Only those: a batch destroys each item's query the moment\n * that item settles, so a settled item is read from {@link batchItems} instead.\n */\n queriesForBatch(entry: QueryDevtoolsEntry): QueryLink[];\n\n /** A batch's settled items, failures first and capped - see {@link BatchItemView}. */\n batchItems(entry: QueryDevtoolsEntry): BatchItemView;\n\n /**\n * The registry entry of one of a batch's items, or `null` once it has fallen out of the batch's capped\n * tombstone tail - which is what makes an item row openable only while its query is still kept.\n */\n batchItemQueryId(entry: QueryDevtoolsEntry, index: number): string | null;\n\n /** An item's throughput line (`12.4 items/s · ~8s left`), or `null` before there is a rate to show. */\n batchThroughput(batch: AnyQueryBatch): string | null;\n\n /** Whether a batch item's args/response detail (`<entryId>:<itemIndex>`) is expanded - persisted. */\n isBatchItemExpanded(entryId: string, index: number): boolean;\n toggleBatchItem(entryId: string, index: number): void;\n /** Keys of the Queries-list groups of identical rows the user opened - persisted. */\n expandedQueryGroups: Signal<ReadonlySet<string>>;\n toggleQueryGroup(key: string): void;\n expandQueryGroup(key: string): void;\n /** Which way the Queries list sorts by last-executed time - persisted. */\n queryRecentFirst: WritableSignal<boolean>;\n /** Whether the Queries list is arranged as a tree of route paths instead of a flat list - persisted. */\n queryTreeView: WritableSignal<boolean>;\n /** The path folders the user closed. Collapsed, not expanded - a tree opens open. */\n collapsedQueryPaths: Signal<ReadonlySet<string>>;\n toggleQueryPath(key: string): void;\n /** The element a query was created in, or `null` for one created outside a component/directive. */\n locatableElement(entry: QueryDevtoolsEntry): HTMLElement | null;\n locateQuery(entry: QueryDevtoolsEntry): void;\n locateState: Signal<'idle' | 'located' | 'offscreen'>;\n resetStats(entry: QueryDevtoolsEntry): void;\n executeQuery(selection: QueryDevtoolsSelection, allowCache: boolean): void;\n resetQuery(query: AnyQuery): void;\n\n formatDuration(ms: number | null): string;\n formatBytes(bytes: number): string;\n formatTransferred(bytes: number, isEstimated: boolean): string;\n formatSpeed(bytesPerSecond: number): string;\n formatPercent(percentage: number): string;\n formatCountdown(ms: number | null): string;\n formatTime(timestamp: number | null): string;\n gqlDocument(doc: string): string;\n inlineValue(value: unknown): string;\n featureLabel(type: string): string;\n featureSummary(feature: QueryDevtoolsFeature): string;\n\n // --- Shared detail drawer state (one instance across every tab's drawer - see the type doc) ---\n\n detailTab: WritableSignal<DetailTab>;\n\n editorMode: WritableSignal<'none' | 'response' | 'args'>;\n responseDraft: WritableSignal<string>;\n argsDraft: WritableSignal<string>;\n /** The text the currently open editor was seeded with - not a signal, see the field's own doc. */\n editorSeed: string;\n editError: Signal<string | null>;\n openResponseEditor(query: AnyQuery): void;\n openArgsEditor(selection: QueryDevtoolsSelection): void;\n applyResponse(query: AnyQuery): void;\n applyArgs(query: AnyQuery): void;\n cancelEditor(): void;\n\n forceLoading(query: AnyQuery): void;\n forceError(query: AnyQuery): void;\n forceEmpty(query: AnyQuery): void;\n clearForced(query: AnyQuery): void;\n\n diffRunIndex: WritableSignal<number | null>;\n\n /** The run the diff compares against, or `null` to derive it - see the panel's own field. */\n diffBaseRunIndex: WritableSignal<number | null>;\n\n toggleRunDiff(entry: QueryDevtoolsEntry, run: QueryDevtoolsRun): void;\n /** Which end of the open diff a run is, or `null` if it is not one of the two. */\n diffRunRole(entry: QueryDevtoolsEntry, run: QueryDevtoolsRun): 'base' | 'compare' | null;\n responseDiff(\n entry: QueryDevtoolsEntry,\n ): { before: QueryDevtoolsRun; after: QueryDevtoolsRun; diff: QueryDevtoolsDiff } | null;\n canDiffRun(entry: QueryDevtoolsEntry, run: QueryDevtoolsRun): boolean;\n queryRuns(entry: QueryDevtoolsEntry): QueryDevtoolsRun[];\n runStatus(run: QueryDevtoolsRun): string;\n\n /** How many bodies a query retains, which is what bounds how far back a diff can reach. */\n retainedResponseCount: Signal<number>;\n\n /** Moves the whole response diff one run older or newer, from the diff header. */\n canStepRunDiff(entry: QueryDevtoolsEntry, older: boolean): boolean;\n stepRunDiff(entry: QueryDevtoolsEntry, older: boolean): void;\n\n errorRunIndex: WritableSignal<number | null>;\n toggleRunError(run: QueryDevtoolsRun): void;\n pickedRunError(entry: QueryDevtoolsEntry): { run: QueryDevtoolsRun; error: QueryDevtoolsRunError } | null;\n\n copiedReport: Signal<boolean>;\n copiedInsomnia: Signal<boolean>;\n copiedCurl: Signal<boolean>;\n copiedGql: Signal<boolean>;\n copiedRoute: Signal<boolean>;\n copyReport(entry: QueryDevtoolsEntry, query: AnyQuery): void;\n copyInsomniaRequest(entry: QueryDevtoolsEntry, query: AnyQuery): void;\n copyCurlRequest(entry: QueryDevtoolsEntry, query: AnyQuery): void;\n copyGqlDocument(doc: string): void;\n /** The absolute URL of the last request, or the rendered route for a query that has not run. */\n copyableRoute(entry: QueryDevtoolsEntry, query: AnyQuery): string;\n copyableRouteTitle(entry: QueryDevtoolsEntry, query: AnyQuery): string;\n copyRoute(entry: QueryDevtoolsEntry, query: AnyQuery): void;\n\n refreshesFor(entryId: string): { id: number; timestamp: number; label: string }[];\n /** What asked for a refresh, on one line - shared by the drawer's \"Refetched by\" and the Events tab. */\n causeLabel(cause: QueryRefreshCause): string;\n formsDrivingQuery(entry: QueryDevtoolsEntry): QueryDevtoolsEntry[];\n\n /** Shared value-explorer search term, read (and set) from every drawer's Data sub-tab. */\n jsonSearch: WritableSignal<string>;\n jsonSearchTerm: Signal<string>;\n jsonExpandedPaths: Signal<ReadonlySet<string>>;\n jsonCollapsedPaths: Signal<ReadonlySet<string>>;\n toggleJsonPath(path: string, expand: boolean): void;\n\n // --- Queries tab state (persisted, so it has to survive the tab being switched away from) ---\n\n selectedClientName: WritableSignal<string | null>;\n selectedQueryId: WritableSignal<string | null>;\n selectedQuery: Signal<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>;\n queryFilter: WritableSignal<string>;\n queryFacets: WritableSignal<ReadonlySet<QueryListFacet>>;\n\n /** The entry ids sorted to the top of the Queries list. Persisted apart from the rest - see the panel. */\n pinnedQueryIds: Signal<ReadonlySet<string>>;\n isQueryPinned(entry: QueryDevtoolsEntry): boolean;\n toggleQueryPin(entry: QueryDevtoolsEntry): void;\n\n /** When set (via inspect), the Queries list is filtered to exactly these entry ids. */\n inspectFilterIds: WritableSignal<string[] | null>;\n\n selectClient(name: string | null): void;\n clearInspectFilter(): void;\n toggleFacet(facet: QueryListFacet): void;\n /** Drops the search term and the status chips, keeping the client / inspection scope. */\n clearQueryFilters(): void;\n\n /**\n * Downloads the given queries (already scoped/filtered by the caller) as one Insomnia collection,\n * filed into a folder per query client.\n */\n downloadInsomniaCollection(items: { entry: QueryDevtoolsEntry; query: AnyQuery }[], clientLabel: string | null): void;\n\n /** Downloads a file a tab generated. The panel does it because the panel owns the download injector. */\n downloadTextFile(file: { name: string; content: string; type: string }): void;\n\n // --- Per-tab drawer selections (deliberately not shared with each other, but each has to survive its\n // own tab being switched away from, so - like the Queries tab's selection above - they live here) ---\n\n stackSelectedQueryId: WritableSignal<string | null>;\n stackSelectedQuery: Signal<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>;\n sequenceSelectedQueryId: WritableSignal<string | null>;\n sequenceSelectedQuery: Signal<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>;\n batchSelectedQueryId: WritableSignal<string | null>;\n batchSelectedQuery: Signal<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>;\n eventSelectedQueryId: WritableSignal<string | null>;\n eventSelectedQuery: Signal<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>;\n formSelectedQueryId: WritableSignal<string | null>;\n formSelectedQuery: Signal<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>;\n\n /** The form whose detail the Forms tab has expanded - persisted. */\n selectedFormId: WritableSignal<string | null>;\n\n /** The rolling event log - persisted only in the sense that it survives a tab switch, not a reload. */\n eventLog: WritableSignal<EventLogItem[]>;\n /** The client (by base URL) the event log is scoped to, or `null` for all of them - persisted. */\n eventClient: WritableSignal<string | null>;\n /** Whether the event log is narrowed to failures - persisted. */\n eventErrorsOnly: WritableSignal<boolean>;\n\n /** Free-text narrowing of every socket's message log - persisted. */\n socketFilter: WritableSignal<string>;\n socketMessages(ws: WebSocketDevtoolsHandle): WebSocketDevtoolsMessage[];\n socketDirectionLabel(message: WebSocketDevtoolsMessage): string;\n emitSocketMessage(options: { entry: QueryDevtoolsEntry; event: string; data: string }): void;\n /** The message an emit box last failed with, if this is the socket it failed on. */\n socketEmitErrorFor(entryId: string): string | null;\n timelineSelectedQueryId: WritableSignal<string | null>;\n timelineSelectedQuery: Signal<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>;\n\n // --- Two-pane tab sizing (the divider between a tab's list and its drawer) ---\n\n paneAxis: Signal<PaneAxis>;\n listWidth: Signal<number | null>;\n drawerWidth: Signal<number | null>;\n listHeight: Signal<number | null>;\n drawerHeight: Signal<number | null>;\n startPaneResize(event: PointerEvent, target: { pane: PaneTarget; container: HTMLElement }): void;\n resetPaneSize(pane: PaneTarget): void;\n};\n\nexport const QUERY_DEVTOOLS_HOST = new InjectionToken<QueryDevtoolsHost>('QUERY_DEVTOOLS_HOST');\n\n/** Injects the panel a tab or the detail drawer is rendered inside of. @see QueryDevtoolsHost */\nexport const injectQueryDevtoolsHost = (): QueryDevtoolsHost => inject(QUERY_DEVTOOLS_HOST);\n","import { Component, computed, signal, ViewEncapsulation } from '@angular/core';\nimport {\n armAllQueryDevtoolsMocks,\n clearQueryDevtoolsArmedMocks,\n clearQueryDevtoolsFaults,\n queryDevtoolsArmedMocks,\n queryDevtoolsMocks,\n queryDevtoolsResponseHistory,\n queryDevtoolsSettings,\n QueryDevtoolsStorageScope,\n setQueryDevtoolsArmedMocksScope,\n setQueryDevtoolsFaultsScope,\n setQueryDevtoolsOverridesScope,\n setQueryDevtoolsSettings,\n} from '@ethlete/query';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\n\ntype ScopeKey = 'viewState' | 'pins' | 'overrides' | 'mocks' | 'armedMocks' | 'armedFaults';\n\ntype ScopeRow = {\n key: ScopeKey;\n label: string;\n\n /** What is kept, and what `none` costs - the one thing a scope picker cannot show on its own. */\n hint: string;\n\n /**\n * What to say on the scopes that let this state outlive the page that armed it - a picker cannot show\n * that an app is about to start lying to itself before anyone opens the panel.\n */\n warn?: { scopes: QueryDevtoolsStorageScope[]; text: string };\n};\n\ntype LimitKey = 'maxEvents' | 'maxDroppedCacheEntries';\n\ntype LimitRow = { key: LimitKey; label: string; min: number; max: number; step: number; hint: string };\n\nconst SCOPE_ROWS: ScopeRow[] = [\n {\n key: 'viewState',\n label: 'Panel view state',\n hint: 'Where the panel sits, how big it is, the open tab, every filter and the selected query. Set none to forget all of it on each reload.',\n },\n {\n key: 'pins',\n label: 'Pinned queries',\n hint: 'Which queries sort to the top of the list. Local outlives the tab, because a pin says what you are working on rather than what you are looking at.',\n },\n {\n key: 'overrides',\n label: 'Response overrides',\n hint: 'Armed edits, replayed as queries register - before their first fetch. None is the default: a reload is how the app stops being lied to.',\n warn: {\n scopes: ['local'],\n text: 'Armed overrides now outlive closing the tab. An app that stays tampered with across days is hours of debugging the wrong thing - the bar above the tabs says when they came back.',\n },\n },\n {\n key: 'mocks',\n label: 'Designed mocks',\n hint: 'The library you authored, not whether any of it is armed - arming has its own scope below.',\n },\n {\n key: 'armedMocks',\n label: 'Armed mocks',\n hint: 'Which of the library is served. None is the default: a reload is how the app goes back to talking to the API.',\n warn: {\n scopes: ['session', 'local'],\n text: 'The next page load starts serving these routes from the panel, before anyone opens it. The bar above the tabs says when they came back.',\n },\n },\n {\n key: 'armedFaults',\n label: 'Armed faults',\n hint: 'The latency and failures injected per client, budgets included. None is the default, for the same reason as armed mocks.',\n warn: {\n scopes: ['session', 'local'],\n text: 'The next page load starts injecting these failures on its own, so an app that looks broken may only be armed. The bar above the tabs says when they came back.',\n },\n },\n];\n\nconst SCOPES: { value: QueryDevtoolsStorageScope; label: string }[] = [\n { value: 'none', label: 'none' },\n { value: 'session', label: 'session' },\n { value: 'local', label: 'local' },\n];\n\n/**\n * Why IndexedDB - the one store with the quota for a large library of designed data - is not on offer.\n * These are read synchronously: view state and pins in a field initializer of the panel, and overrides\n * inside query registration, before the first request. An async store cannot answer either in time, and a\n * scope that silently arrives late is worse than one that is missing. The mock library is the one that\n * could tolerate arriving late, since nothing is served until a mock is armed by hand.\n */\nconst INDEXED_DB_TITLE =\n 'Unavailable: these are read synchronously - view state before the first render, overrides before the first fetch - and IndexedDB cannot answer in time. Only the mock library could tolerate an async store, and it is not wired to one yet.';\n\nconst LIMIT_ROWS: LimitRow[] = [\n {\n key: 'maxEvents',\n label: 'Events log',\n min: 10,\n max: 1000,\n step: 10,\n hint: 'rows the Events tab keeps. Lowering it trims the log now.',\n },\n {\n key: 'maxDroppedCacheEntries',\n label: 'Dropped cache entries',\n min: 0,\n max: 200,\n step: 5,\n hint: 'per client, remembered so the Cache tab can say why an entry went away. Applies as entries are dropped.',\n },\n];\n\n/**\n * Every panel-wide switch in one place - the storage each kind of state uses, the limits the panel would\n * otherwise hold as constants, and the toggles their own tabs also carry.\n */\n@Component({\n selector: 'et-query-devtools-settings',\n templateUrl: './query-devtools-settings.component.html',\n styleUrl: './query-devtools-settings.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsSettingsComponent {\n protected host = injectQueryDevtoolsHost();\n\n protected readonly SCOPE_ROWS = SCOPE_ROWS;\n protected readonly SCOPES = SCOPES;\n protected readonly INDEXED_DB_TITLE = INDEXED_DB_TITLE;\n protected readonly LIMIT_ROWS = LIMIT_ROWS;\n\n protected readonly ARM_ALL_MOCKS = armAllQueryDevtoolsMocks;\n protected readonly DISARM_ALL_MOCKS = clearQueryDevtoolsArmedMocks;\n protected readonly DISARM_ALL_FAULTS = clearQueryDevtoolsFaults;\n\n /** What queries actually retain, which is the application's value unless this panel raised it. */\n protected responseHistory = computed(queryDevtoolsResponseHistory);\n\n protected mockCount = computed(() => queryDevtoolsMocks().length);\n protected armedMockCount = computed(() => queryDevtoolsArmedMocks().size);\n protected armedFaultCount = computed(() => this.host.faultClients().filter((client) => client.armed).length);\n\n protected resetConfirming = signal(false);\n\n protected settings() {\n return queryDevtoolsSettings();\n }\n\n protected scopeOf(key: ScopeKey) {\n return this.settings()[key];\n }\n\n protected limitOf(key: LimitKey) {\n return this.settings()[key];\n }\n\n /** What the picked scope means beyond where the state is kept, or `null` while it means nothing extra. */\n protected warningFor(row: ScopeRow, scope: QueryDevtoolsStorageScope) {\n return row.warn?.scopes.includes(scope) ? row.warn.text : null;\n }\n\n protected setScope(key: ScopeKey, scope: QueryDevtoolsStorageScope) {\n // Everything armed goes through its own module: changing the scope moves an existing store and\n // captures whatever is armed right now, so the choice reads as \"keep these\".\n if (key === 'overrides') return setQueryDevtoolsOverridesScope(scope);\n if (key === 'armedMocks') return setQueryDevtoolsArmedMocksScope(scope);\n if (key === 'armedFaults') return setQueryDevtoolsFaultsScope(scope);\n\n setQueryDevtoolsSettings(\n key === 'viewState' ? { viewState: scope } : key === 'pins' ? { pins: scope } : { mocks: scope },\n );\n }\n\n protected setLimit(key: LimitKey, value: string) {\n const count = Number(value);\n\n setQueryDevtoolsSettings(key === 'maxEvents' ? { maxEvents: count } : { maxDroppedCacheEntries: count });\n }\n\n protected setResponseHistory(value: string) {\n setQueryDevtoolsSettings({ responseHistory: Number(value) });\n }\n\n /** Hands retention back to `provideQueryDevtools({ responseHistory })`. */\n protected clearResponseHistory() {\n setQueryDevtoolsSettings({ responseHistory: null });\n }\n\n protected reset() {\n this.host.resetDevtools();\n this.resetConfirming.set(false);\n }\n\n protected toggleGoneQueries() {\n this.host.toggleFacet('gone');\n }\n\n protected showsGoneQueries() {\n return this.host.queryFacets().has('gone');\n }\n}\n","<div class=\"et-query-devtools-scroll\">\n <div class=\"et-query-devtools-toolbar et-query-devtools-settings-toolbar\">\n <p class=\"et-query-devtools-hint\">\n Panel-wide, and kept in <code class=\"et-query-devtools-mono\">localStorage</code> whatever the scopes below say -\n so a scope of <em>none</em> does not erase the choice that set it. Every switch under <strong>Mirrored</strong> is\n the same one its own tab carries.\n </p>\n </div>\n\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>Storage</strong>\n <span class=\"et-query-devtools-count\">what survives a reload, and how long</span>\n </div>\n\n @for (row of SCOPE_ROWS; track row.key) {\n @let scope = scopeOf(row.key);\n <div class=\"et-query-devtools-settings-row\">\n <div class=\"et-query-devtools-settings-row-head\">\n <span>{{ row.label }}</span>\n <div class=\"et-query-devtools-btn-group\">\n @for (option of SCOPES; track option.value) {\n <button\n [class.et-query-devtools-btn--active]=\"scope === option.value\"\n [attr.aria-pressed]=\"scope === option.value\"\n (click)=\"setScope(row.key, option.value)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n {{ option.label }}\n </button>\n }\n <button [title]=\"INDEXED_DB_TITLE\" class=\"et-query-devtools-btn\" type=\"button\" disabled>IndexedDB</button>\n </div>\n </div>\n <small>{{ row.hint }}</small>\n @if (warningFor(row, scope); as warning) {\n <p class=\"et-query-devtools-settings-warn\">\n <span aria-hidden=\"true\">⚠</span>\n {{ warning }}\n </p>\n }\n </div>\n }\n\n <div class=\"et-query-devtools-settings-row\">\n <div class=\"et-query-devtools-settings-row-head\">\n <span>Reset devtools</span>\n @if (resetConfirming()) {\n <div class=\"et-query-devtools-btn-group\">\n <button (click)=\"reset()\" class=\"et-query-devtools-btn et-query-devtools-btn--danger\" type=\"button\">\n Reset everything\n </button>\n <button (click)=\"resetConfirming.set(false)\" class=\"et-query-devtools-btn\" type=\"button\">Cancel</button>\n </div>\n } @else {\n <button (click)=\"resetConfirming.set(true)\" class=\"et-query-devtools-btn\" type=\"button\">Reset…</button>\n }\n </div>\n <small>\n Clears every one of these keys from both stores, whatever the scopes above say, and puts the panel back where it\n ships - layout, filters, selections and pins. The settings on this tab stay.\n </small>\n </div>\n </div>\n\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>Limits</strong>\n <span class=\"et-query-devtools-count\">how much the panel keeps in memory</span>\n </div>\n\n <div class=\"et-query-devtools-settings-fields\">\n @for (row of LIMIT_ROWS; track row.key) {\n <label class=\"et-query-devtools-field\">\n <span>{{ row.label }}</span>\n <input\n #limitInput\n [value]=\"limitOf(row.key)\"\n [min]=\"row.min\"\n [max]=\"row.max\"\n [step]=\"row.step\"\n (change)=\"setLimit(row.key, limitInput.value)\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n />\n <small>{{ row.hint }}</small>\n </label>\n }\n\n <label class=\"et-query-devtools-field\">\n <span>Response history</span>\n <input\n #responseHistoryInput\n [value]=\"responseHistory()\"\n (change)=\"setResponseHistory(responseHistoryInput.value)\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"1\"\n max=\"50\"\n step=\"1\"\n />\n <small>\n bodies each query keeps, which is how far back a response diff can reach. Bodies dominate what the run buffer\n retains, so this is the one limit that costs real memory. Applies to runs from now on.\n @if (settings().responseHistory !== null) {\n <button (click)=\"clearResponseHistory()\" class=\"et-query-devtools-btn\" type=\"button\">\n Back to the app's own value\n </button>\n }\n </small>\n </label>\n </div>\n </div>\n\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>Mirrored</strong>\n <span class=\"et-query-devtools-count\">the same switches their tabs carry</span>\n </div>\n\n <div class=\"et-query-devtools-settings-row\">\n <div class=\"et-query-devtools-settings-row-head\">\n <span>Queries</span>\n <div class=\"et-query-devtools-btn-group\">\n @let recentFirst = host.queryRecentFirst();\n <button\n [class.et-query-devtools-btn--active]=\"recentFirst\"\n [attr.aria-pressed]=\"recentFirst\"\n (click)=\"host.queryRecentFirst.set(!recentFirst)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n recent first\n </button>\n @let treeView = host.queryTreeView();\n <button\n [class.et-query-devtools-btn--active]=\"treeView\"\n [attr.aria-pressed]=\"treeView\"\n (click)=\"host.queryTreeView.set(!treeView)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n tree view\n </button>\n @let gone = showsGoneQueries();\n <button\n [class.et-query-devtools-btn--active]=\"gone\"\n [attr.aria-pressed]=\"gone\"\n (click)=\"toggleGoneQueries()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n list gone\n </button>\n </div>\n </div>\n <small>Sort order, whether the list groups by route path, and whether destroyed queries are listed at all.</small>\n </div>\n\n <div class=\"et-query-devtools-settings-row\">\n <div class=\"et-query-devtools-settings-row-head\">\n <span>Events</span>\n <div class=\"et-query-devtools-settings-controls\">\n @let errorsOnly = host.eventErrorsOnly();\n <button\n [class.et-query-devtools-btn--active]=\"errorsOnly\"\n [attr.aria-pressed]=\"errorsOnly\"\n (click)=\"host.eventErrorsOnly.set(!errorsOnly)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n failures only\n </button>\n <select\n #eventClientSelect\n [value]=\"host.eventClient() ?? ''\"\n (change)=\"host.eventClient.set(eventClientSelect.value || null)\"\n class=\"et-query-devtools-select\"\n aria-label=\"Event log client\"\n >\n <option value=\"\">All clients</option>\n @for (name of host.clientNames(); track name) {\n <option [value]=\"name\">{{ name }}</option>\n }\n </select>\n </div>\n </div>\n <small>What the event log is narrowed to. The log itself always holds every client's traffic.</small>\n </div>\n\n <div class=\"et-query-devtools-settings-row\">\n <div class=\"et-query-devtools-settings-row-head\">\n <span>Response overrides</span>\n @let persist = host.overridesPersist();\n <button\n [class.et-query-devtools-btn--active]=\"persist\"\n [attr.aria-pressed]=\"persist\"\n (click)=\"host.toggleOverridesPersist()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n Keep across reloads\n </button>\n </div>\n <small>\n The drawer's own toggle, which is the Storage scope above - currently\n <span class=\"et-query-devtools-mono\">{{ host.overridesScopeLabel() }}</span\n >.\n </small>\n </div>\n\n <div class=\"et-query-devtools-settings-row\">\n <div class=\"et-query-devtools-settings-row-head\">\n <span>Armed</span>\n <div class=\"et-query-devtools-settings-controls\">\n <button\n [disabled]=\"!mockCount() || armedMockCount() === mockCount()\"\n (click)=\"ARM_ALL_MOCKS()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n Arm every mock ({{ mockCount() }})\n </button>\n <button\n [disabled]=\"!armedMockCount()\"\n (click)=\"DISARM_ALL_MOCKS()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n Disarm mocks ({{ armedMockCount() }})\n </button>\n <button\n [disabled]=\"!armedFaultCount()\"\n (click)=\"DISARM_ALL_FAULTS()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n Disarm faults ({{ armedFaultCount() }})\n </button>\n </div>\n </div>\n <small>\n The Mocks and Faults tabs' own buttons. Whether either survives a reload is the two <em>Armed</em> scopes above,\n both <em>none</em> unless they were changed.\n </small>\n </div>\n </div>\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n/**\n * The waterfall's grid, axis and bars, as a styles-only component the panel mounts when the Timeline tab\n * is first opened.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-timeline-styles',\n template: '',\n styleUrl: './query-devtools-timeline-styles.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsTimelineStylesComponent {}\n","import { Component, input, ViewEncapsulation } from '@angular/core';\nimport { QueryDevtoolsFeature } from '@ethlete/query';\n\n/** A feature list: the feature's name, followed by the options it was configured with. */\n@Component({\n selector: 'et-query-devtools-features',\n template: `\n <ul class=\"et-query-devtools-features\">\n @for (feature of features(); track feature.type) {\n <li class=\"et-query-devtools-feature\">\n <span class=\"et-query-devtools-chip\">{{ featureLabel(feature.type) }}</span>\n <!-- Always rendered: the list is one grid, so a feature without options still needs its cell\n for the next row's chip to stay in the same column. -->\n <span class=\"et-query-devtools-feature-details\">\n @for (detail of feature.details; track detail.label) {\n <span class=\"et-query-devtools-feature-detail\">\n <span class=\"et-query-devtools-feature-label\">{{ detail.label }}</span>\n <span class=\"et-query-devtools-feature-value\">{{ detail.value }}</span>\n </span>\n }\n </span>\n </li>\n }\n </ul>\n `,\n styleUrl: './query-devtools-features.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsFeaturesComponent {\n public features = input.required<QueryDevtoolsFeature[]>();\n\n protected featureLabel(type: string) {\n return type\n .replace(/^WITH_/, '')\n .replace(/_/g, ' ')\n .toLowerCase();\n }\n}\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport {\n clearQueryDevtoolsTokenTtl,\n QUERY_DEVTOOLS_TOKEN_TTL_LIMIT,\n QueryDevtoolsEntry,\n setQueryDevtoolsTokenTtl,\n} from '@ethlete/query';\nimport { QueryDevtoolsFeaturesComponent } from './query-devtools-features.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\n\n/** The Auth tab: registered bearer auth providers, their tokens and their internal queries. */\n@Component({\n selector: 'et-query-devtools-auth-tab',\n templateUrl: './query-devtools-auth-tab.component.html',\n styleUrl: './query-devtools-auth-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsFeaturesComponent, QueryDevtoolsJsonComponent],\n})\nexport class QueryDevtoolsAuthTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n protected readonly TTL_LIMIT = QUERY_DEVTOOLS_TOKEN_TTL_LIMIT;\n\n /**\n * Arms an access-token lifetime from the input's raw value, or disarms on an empty one. Clamped here\n * rather than left to the input's `min`/`max`, which a typed-in (or pasted) value ignores.\n */\n protected armTokenTtl(options: { entry: QueryDevtoolsEntry; value: string }) {\n const { entry, value } = options;\n\n if (value.trim() === '') {\n this.clearTokenTtl(entry);\n\n return;\n }\n\n setQueryDevtoolsTokenTtl({ providerName: this.providerName(entry), seconds: Number(value) });\n }\n\n /** Presents the current token as long expired, which is what makes a refresh happen at once. */\n protected expireTokenNow(entry: QueryDevtoolsEntry) {\n setQueryDevtoolsTokenTtl({ providerName: this.providerName(entry), seconds: 0 });\n }\n\n protected clearTokenTtl(entry: QueryDevtoolsEntry) {\n clearQueryDevtoolsTokenTtl(this.providerName(entry));\n }\n\n private providerName(entry: QueryDevtoolsEntry) {\n return entry.meta.name ?? '';\n }\n}\n","<div class=\"et-query-devtools-scroll\">\n @for (entry of host.authEntries(); track entry.id) {\n @let auth = host.asAuth(entry);\n @let lifetime = host.authTokenLifetime(entry);\n <div [class.et-query-devtools-card--armed]=\"lifetime.ttlSeconds !== null\" class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>{{ entry.meta.name || 'auth provider' }}</strong>\n <span\n [class.et-query-devtools-chip--success]=\"auth.isAuthenticated()\"\n [class.et-query-devtools-chip--muted]=\"!auth.isAuthenticated()\"\n class=\"et-query-devtools-chip\"\n >\n {{ auth.isAuthenticated() ? 'authenticated' : 'anonymous' }}\n </span>\n @if (lifetime.ttlSeconds !== null) {\n <span\n [title]=\"\n 'This provider\\'s access token is presented as living ' +\n lifetime.ttlSeconds +\n 's from the moment it was issued, so the refresh happens on that lifetime instead of the real one.'\n \"\n class=\"et-query-devtools-chip et-query-devtools-chip--error\"\n >\n lifetime {{ lifetime.ttlSeconds }}s\n </span>\n }\n @if (host.authLeadership(auth); as leadership) {\n <span\n [class.et-query-devtools-chip--success]=\"leadership.tone === 'success'\"\n [class.et-query-devtools-chip--muted]=\"leadership.tone === 'muted'\"\n [title]=\"leadership.title\"\n class=\"et-query-devtools-chip\"\n >\n {{ leadership.label }}\n </span>\n }\n </div>\n <dl class=\"et-query-devtools-meta\">\n <dt>Base URL</dt>\n <dd class=\"et-query-devtools-mono\">{{ entry.meta.clientBaseUrl || entry.meta.clientName || '—' }}</dd>\n <dt>Access token</dt>\n <dd>{{ auth.accessToken() ? 'present' : 'none' }}</dd>\n <dt>Refresh token</dt>\n <dd>{{ auth.refreshToken() ? 'present' : 'none' }}</dd>\n @if (lifetime.expiresIn; as expiry) {\n <dt>Token expires in</dt>\n <dd>\n {{ expiry }}\n @if (lifetime.realExpiresIn; as real) {\n <small class=\"et-query-devtools-auth-real-expiry\">really {{ real }}</small>\n }\n </dd>\n }\n @if (auth.executionState(); as state) {\n <dt>Execution state</dt>\n <dd>{{ state.type }} · {{ state.state }}</dd>\n }\n @if (host.authQueryKeys(auth).length) {\n <dt>Queries</dt>\n <dd>\n <div class=\"et-query-devtools-chips\">\n @for (key of host.authQueryKeys(auth); track key) {\n <span class=\"et-query-devtools-chip\">{{ key }}</span>\n }\n </div>\n </dd>\n }\n @if (entry.meta.features?.length) {\n <dt>Features</dt>\n <dd>\n <et-query-devtools-features [features]=\"entry.meta.features ?? []\" />\n </dd>\n }\n </dl>\n\n @if (auth.accessToken()) {\n <h4 class=\"et-query-devtools-section\">Token lifetime</h4>\n @if (lifetime.overridable) {\n <div class=\"et-query-devtools-auth-ttl\">\n <div class=\"et-query-devtools-auth-ttl-row\">\n <label class=\"et-query-devtools-field\">\n <span>Override</span>\n <input\n #ttlInput\n [value]=\"lifetime.ttlSeconds ?? ''\"\n [max]=\"TTL_LIMIT\"\n (change)=\"armTokenTtl({ entry: entry, value: ttlInput.value })\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"0\"\n step=\"30\"\n />\n <small>seconds, or empty for the lifetime the token was issued with</small>\n </label>\n <div class=\"et-query-devtools-auth-ttl-actions\">\n <button (click)=\"expireTokenNow(entry)\" class=\"et-query-devtools-btn\" type=\"button\">Expire now</button>\n @if (lifetime.ttlSeconds !== null) {\n <button (click)=\"clearTokenTtl(entry)\" class=\"et-query-devtools-btn\" type=\"button\">Clear</button>\n }\n </div>\n </div>\n <p class=\"et-query-devtools-hint\">\n Measured from the token's own <code>iat</code>, so this is a lifetime and not a remaining time - a short\n one on a token issued a while ago refreshes at once, and the token that comes back lives the full\n lifetime. It is what the whole app acts on: the proactive refresh, the expiration warning and the\n countdown above all read it. Never persisted - a reload puts this provider back on its real lifetime.\n </p>\n </div>\n } @else {\n <p class=\"et-query-devtools-hint\">\n This access token carries no <code>exp</code> claim to replace, or no <code>iat</code>/<code>nbf</code> to\n measure a new lifetime from, so it cannot be overridden.\n </p>\n }\n }\n\n @if (host.authTokenPayload(auth); as payload) {\n <h4 class=\"et-query-devtools-section\">Access token payload</h4>\n <et-query-devtools-json [value]=\"payload\" />\n }\n\n @if (auth.latestNonInternalQuery(); as latest) {\n <h4 class=\"et-query-devtools-section\">Latest auth query · {{ latest.key }}</h4>\n <et-query-devtools-json [value]=\"latest.snapshot.response()\" />\n }\n </div>\n } @empty {\n <p class=\"et-query-devtools-empty\">No auth providers registered.</p>\n }\n</div>\n","import {\n AnyPagedQueryStack,\n AnyQueryBatchItemResult,\n AnyQueryStack,\n HttpRequestLoadingProgressState,\n HttpRequestRetryState,\n Query,\n QueryClient,\n QueryDevtoolsEntry,\n QueryDevtoolsRun,\n QueryDevtoolsStats,\n QueryDevtoolsStatsHandle,\n QueryKeyLockState,\n QueryRefreshCause,\n QueryRepository,\n QueryRepositoryCacheEntry,\n QueryRepositoryEntryDestroyedCause,\n} from '@ethlete/query';\n\n// The registry stores queries type-erased; the panel reads them structurally.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type AnyQuery = Query<any>;\n\n/** The query a detail pane is showing, together with the registry entry it was registered as. */\nexport type QueryDevtoolsSelection = { entry: QueryDevtoolsEntry; query: AnyQuery };\n\n/**\n * A body the panel can show. Every one of them but `settings` is a tab in the bar: Settings holds nothing\n * to count, so the badge/overflow logic would push it behind **More** - it is reached from the header's\n * gear instead.\n */\nexport type DevtoolsTab =\n | 'queries'\n | 'stacks'\n | 'sequences'\n | 'batches'\n | 'forms'\n | 'auth'\n | 'ws'\n | 'cache'\n | 'locks'\n | 'timeline'\n | 'events'\n | 'faults'\n | 'mocks'\n | 'about'\n | 'settings';\n\n/**\n * The sections of the query detail drawer. The head and its actions stay pinned above them - the detail\n * holds more than fits a column, and everything below the actions is reading material.\n */\nexport type DetailTab = 'overview' | 'history' | 'data';\n\n/**\n * Which pane of a two-pane tab a divider drag sizes: the Queries tab's list, or the drawer every\n * split view opens a query in.\n */\nexport type PaneTarget = 'list' | 'drawer';\n\n/** The axis a two-pane tab splits along: the panes sit side by side, or stack in a side dock. */\nexport type PaneAxis = 'inline' | 'block';\n\nexport type QueryStatus = 'idle' | 'loading' | 'success' | 'error';\n\n/**\n * A facet the Queries list can be narrowed to. The first four describe live state; `gone` is the odd\n * one out - it is the only way a destroyed query's tombstone enters the list at all, which is why it\n * is off by default rather than just another filter over what is already shown.\n */\nexport type QueryListFacet = 'error' | 'loading' | 'stale' | 'idle' | 'gone';\n\n/** The fault fields the panel arms from a number input, as opposed to the status it picks from a list. */\nexport type NumericFaultField = 'latencyMs' | 'failNext' | 'failRate';\n\n/**\n * A chunk of a route as rendered: literal path text, a path param (`name` is the param it fills in) or\n * the query string of the request that ran. The kind becomes the segment's class.\n */\nexport type RouteSegment = { text: string; kind: 'static' | 'param' | 'query'; name?: string };\n\n/**\n * A one-line verdict the panel renders as a chip - which tab refreshes an auth provider's tokens, where\n * this tab stands on a lock. `title` carries the caveats the label has no room for: why every tab reads\n * as the leader, or how approximate a tab count is.\n */\nexport type QueryDevtoolsChip = { label: string; tone: 'success' | 'muted'; title: string };\n\n/** An auth provider's access-token expiry as the auth tab renders it, armed override included. */\nexport type QueryDevtoolsTokenLifetime = {\n /** Countdown to the expiry the app currently acts on, overridden or not. */\n expiresIn: string | null;\n\n /** Countdown to the token's own `exp`, and only set while an override is making it read differently. */\n realExpiresIn: string | null;\n\n /** The armed lifetime in seconds, or `null` while the token is on the one it was issued with. */\n ttlSeconds: number | null;\n\n /** Whether an override can be applied at all - the token needs an `exp` plus an `iat` or `nbf`. */\n overridable: boolean;\n};\n\n/** A query reachable from a stack or sequence card, rendered as a row that opens the detail drawer. */\nexport type QueryLink = {\n id: string;\n query: AnyQuery;\n method: string;\n segments: RouteSegment[];\n clientBaseUrl: string;\n stats?: QueryDevtoolsStatsHandle;\n};\n\n/** One settled item of a query batch, with the route the args it was sent with resolve to. */\nexport type BatchItemRow = { result: AnyQueryBatchItemResult; segments: RouteSegment[] };\n\n/**\n * A batch's settled items as its card lists them. Capped, and `hidden` says by how much - a bulk run\n * settles more items than a list can hold, and a truncated one must not read as the whole run.\n */\nexport type BatchItemView = { rows: BatchItemRow[]; total: number; hidden: number };\n\n/**\n * Query stats plus the numbers the panel derives from them rather than storing: an execution that never\n * reached the network was answered from the cache, and the averages come from the running totals.\n */\nexport type QueryActivity = {\n stats: QueryDevtoolsStats;\n cacheServed: number;\n avgDurationMs: number | null;\n avgResponseBytes: number | null;\n hasActivity: boolean;\n};\n\n/**\n * What a query's request is doing beyond `loading`: which attempt it is on, the backoff it is waiting\n * out, and how much of the payload has moved. Without it a request retried three times behind a 4s\n * backoff and a plain slow one are the same yellow dot.\n */\nexport type RequestProgress = {\n /** @see HttpRequestSubtle.attempts */\n attempts: number;\n\n retry: HttpRequestRetryState | null;\n\n /** How much of the pending backoff is left, or `null` when none is pending. */\n retryInMs: number | null;\n\n progress: HttpRequestLoadingProgressState | null;\n};\n\n/**\n * One run of one query, placed on the timeline's shared axis. `leftPct` / `widthPct` are percentages of\n * the window every row is laid out against, which is what makes overlapping runs visible as overlap.\n */\nexport type TimelineRow = {\n key: string;\n entryId: string;\n method: string;\n path: string;\n run: QueryDevtoolsRun;\n leftPct: number;\n widthPct: number;\n\n /** How long the run took, or `null` while it is still in flight. */\n durationMs: number | null;\n};\n\nexport type Timeline = {\n rows: TimelineRow[];\n\n /** The start of the window the rows are laid out against. */\n startedAt: number;\n\n /** How long that window is - the axis every bar is a fraction of. */\n windowMs: number;\n\n /** How many older runs the view left out, so a capped timeline does not read as a complete one. */\n hidden: number;\n};\n\n/**\n * One request a refresh re-executed, as an event row lists it. A cache key is shared by every query\n * bound to it, so the row carries all of their ids - one to open, and the rest so each of those queries\n * can still find the refresh under \"Refetched by\". Empty for a request no registered query holds.\n */\nexport type RefreshedRequest = {\n queryIds: string[];\n method: string;\n path: string;\n};\n\nexport type EventLogItem = {\n id: number;\n timestamp: number;\n client: string;\n type:\n | 'entry-created'\n | 'request-success'\n | 'request-error'\n | 'entry-destroyed'\n | 'unbind-all-secure'\n | 'queries-refreshed';\n\n /** `null` for events that are not about a single request, e.g. the logout-wide secure unbind. */\n method: string | null;\n url: string | null;\n isSecure: boolean;\n status: number | null;\n\n /**\n * The registered query the request belonged to when the event fired, so the row can open it. Resolved\n * here rather than at click time so the log holds an id instead of a reference to the request itself.\n */\n queryId: string | null;\n\n /** What asked for a refresh, for a `queries-refreshed` row. `null` for every other type. */\n cause: QueryRefreshCause | null;\n\n /** Why a cache entry was torn down, for an `entry-destroyed` row. `null` for every other type. */\n destroyCause: QueryRepositoryEntryDestroyedCause | null;\n\n /** The requests that refresh re-executed - the fan-out the panel could not show before. */\n refreshed: RefreshedRequest[] | null;\n\n /**\n * How long the request took and how big its response was, read off the request as the event fired.\n * Both `null` for an event that is not one request settling, and the size also for a failure - an\n * error body is not a payload worth a column.\n */\n durationMs: number | null;\n bytes: number | null;\n\n /** @see QueryDevtoolsStats.hasEstimatedBytes */\n isEstimatedBytes: boolean;\n};\n\n/**\n * A cache entry that is gone, as the Cache tab still lists it. Deliberately not a {@link CacheRow}: a\n * destroyed entry has no consumers, no size, no freshness and nothing to act on, so a full row would be\n * seven columns of dashes. What is left worth showing is what it was and why it went.\n */\nexport type DroppedCacheEntry = {\n client: string;\n method: string;\n url: string;\n cause: QueryRepositoryEntryDestroyedCause;\n at: number;\n};\n\n/** How the panel spells a teardown cause out - the same wording in the Events tab and the Cache tab. */\nexport const DESTROY_CAUSE_LABELS: Record<QueryRepositoryEntryDestroyedCause, string> = {\n unbind: 'last consumer gone',\n expired: 'unused window over',\n 'unused-cap': 'unused entry cap',\n logout: 'logout',\n manual: 'evicted',\n};\n\n/** One cache entry as the Cache tab lists it: the repository's own snapshot plus its measured size. */\nexport type CacheRow = {\n entry: QueryRepositoryCacheEntry;\n bytes: number;\n isEstimatedBytes: boolean;\n};\n\n/** A repository the panel found, together with the client name/base URL it was registered under. */\nexport type RepositoryInfo = { repository: QueryRepository; name: string; baseUrl: string; client: QueryClient | null };\n\n/** One client's cache, as the Cache tab lists it - every entry measured, with the client's poll states. */\nexport type CacheView = {\n name: string;\n baseUrl: string;\n repository: QueryRepository;\n rows: CacheRow[];\n bytes: number;\n isEstimatedBytes: boolean;\n unused: number;\n pollStates: Record<string, QueryKeyLockState>;\n client: QueryClient | null;\n\n /** The entries this client has lost since the panel was loaded, newest first. */\n dropped: DroppedCacheEntry[];\n};\n\n/** What each tab holds, as its badge reports it: how many entries, and how many of them are failing. */\nexport type TabBadge = { count: number; errors: number; errorNoun?: string };\n\nexport type { AnyPagedQueryStack, AnyQueryStack };\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { QueryRepositoryEntryDestroyedCause } from '@ethlete/query';\nimport { QueryDevtoolsFeaturesComponent } from './query-devtools-features.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\nimport { DESTROY_CAUSE_LABELS } from './query-devtools-types';\n\n/** The Cache tab: every client's cache entries, their freshness, sync status and disk persistence. */\n@Component({\n selector: 'et-query-devtools-cache-tab',\n templateUrl: './query-devtools-cache-tab.component.html',\n styleUrl: './query-devtools-cache-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsFeaturesComponent, QueryDevtoolsJsonComponent],\n})\nexport class QueryDevtoolsCacheTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n protected dropCauseLabel(cause: QueryRepositoryEntryDestroyedCause) {\n return DESTROY_CAUSE_LABELS[cause];\n }\n}\n","<div class=\"et-query-devtools-scroll\">\n @for (client of host.cacheView(); track client.name) {\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong class=\"et-query-devtools-mono\">{{ client.baseUrl || client.name }}</strong>\n <span class=\"et-query-devtools-count\">{{ client.rows.length }} entries</span>\n @if (client.rows.length) {\n <span\n class=\"et-query-devtools-count\"\n title=\"The measured size of every cached response. Sizes are read from the decoded bodies, so they ignore transport compression.\"\n >\n {{ host.formatTransferred(client.bytes, client.isEstimatedBytes) }}\n </span>\n }\n @if (client.unused) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"Entries with no consumer left. They are waiting out their keepUnusedFor window, not leaking.\"\n >\n {{ client.unused }} collectible\n </span>\n }\n @if (client.client?.subtle?.persistence) {\n <span class=\"et-query-devtools-count\">{{ host.persistedCount(client.client!) }} on disk</span>\n <button (click)=\"host.clearPersistedQueries(client.client!)\" class=\"et-query-devtools-btn\" type=\"button\">\n Clear disk\n </button>\n }\n <button\n [disabled]=\"!client.rows.length\"\n (click)=\"host.evictAllCacheEntries(client.repository)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Drop every entry of this client, consumers included - the cold-start check without a reload\"\n >\n Evict all\n </button>\n </div>\n @if (host.clientFeatures(client.client); as features) {\n <et-query-devtools-features [features]=\"features\" />\n }\n <div class=\"et-query-devtools-table-scroll\">\n <table class=\"et-query-devtools-table\">\n <thead>\n <tr>\n <th>Request</th>\n <th>Consumers</th>\n <th>Size</th>\n <th>Secure</th>\n <th>Freshness</th>\n <th>Sync</th>\n <th>Disk</th>\n <th>Actions</th>\n </tr>\n </thead>\n <tbody>\n @for (row of client.rows; track row.entry.key) {\n @let cacheEntry = row.entry;\n @let expanded = host.isCacheValueExpanded(client.name, cacheEntry.key);\n <tr>\n <td [title]=\"cacheEntry.request.method + ' ' + cacheEntry.request.url\">\n <span class=\"et-query-devtools-method\">{{ cacheEntry.request.method }}</span>\n <span class=\"et-query-devtools-url\">{{ host.requestPath(cacheEntry.request.url) }}</span>\n </td>\n <td>\n {{ cacheEntry.consumerCount }}\n <!-- An entry nothing holds any more is the one row worth explaining: it looks\n like a leak and is in fact a keepUnusedFor window running out. -->\n @if (cacheEntry.isUnused) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"No consumer left - kept for its keepUnusedFor window, then collected\"\n >\n collectible\n </span>\n }\n </td>\n <td>{{ row.bytes ? host.formatTransferred(row.bytes, row.isEstimatedBytes) : '—' }}</td>\n <td>{{ cacheEntry.isSecure ? 'yes' : 'no' }}</td>\n <td>{{ host.cacheFreshness(cacheEntry) }}</td>\n <td>{{ host.cacheSync(cacheEntry, client.pollStates) }}</td>\n <td>{{ host.cachePersistence(cacheEntry) }}</td>\n <td>\n <span class=\"et-query-devtools-cell-actions\">\n <button\n [class.et-query-devtools-btn--active]=\"expanded\"\n [attr.aria-expanded]=\"expanded\"\n (click)=\"host.toggleCacheValue(client.name, cacheEntry.key)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Show the response held under this key\"\n >\n Value\n </button>\n <button (click)=\"host.refetchCacheEntry(cacheEntry)\" class=\"et-query-devtools-btn\" type=\"button\">\n Refetch\n </button>\n <button\n (click)=\"host.evictCacheEntry(client.repository, cacheEntry.key)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n Evict\n </button>\n </span>\n </td>\n </tr>\n @if (expanded) {\n <tr>\n <td class=\"et-query-devtools-cell-value\" colspan=\"8\">\n <et-query-devtools-json [value]=\"cacheEntry.request.response()\" />\n </td>\n </tr>\n }\n } @empty {\n <tr>\n <td class=\"et-query-devtools-empty\" colspan=\"8\">Cache empty.</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n @if (client.dropped.length) {\n <h4 class=\"et-query-devtools-section\">Dropped</h4>\n <ul class=\"et-query-devtools-dropped\">\n @for (entry of client.dropped; track entry.at) {\n <li>\n <span class=\"et-query-devtools-method\">{{ entry.method }}</span>\n <span class=\"et-query-devtools-url\">{{ host.requestPath(entry.url) }}</span>\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">{{\n dropCauseLabel(entry.cause)\n }}</span>\n <span class=\"et-query-devtools-count\">{{ host.formatTime(entry.at) }}</span>\n </li>\n }\n </ul>\n }\n </div>\n } @empty {\n <p class=\"et-query-devtools-empty\">No clients with a cache yet.</p>\n }\n</div>\n","/**\n * One request to render as a `curl` command. The same shape the Insomnia export takes its requests in,\n * so both exports describe a request the one way the panel resolves it.\n */\nexport type CurlRequestInput = {\n method: string;\n url: string;\n headers: { name: string; value: string }[];\n\n /** The request body, or `null` for a request that sends none. */\n body: unknown;\n\n /** The GraphQL document, for a GraphQL query - sent as `{ query, variables }` the way the client does. */\n gqlQuery?: string | null;\n};\n\nconst jsonBody = (body: unknown) => {\n try {\n return JSON.stringify(body);\n } catch {\n // A body holding a circular reference or a throwing `toJSON` cannot be written out.\n return null;\n }\n};\n\n/**\n * Wraps a value in single quotes for a POSIX shell, which is the one quoting that leaves everything\n * inside untouched - `$`, backticks and backslashes included. A single quote cannot be escaped inside\n * such a string, so each one ends the quoting, emits an escaped quote and opens it again.\n */\nconst shellQuote = (value: string) => `'${value.replace(/'/g, `'\\\\''`)}'`;\n\nconst bodyOf = (request: CurlRequestInput) => {\n if (request.gqlQuery) {\n const variables = (request.body as { variables?: unknown } | null)?.variables ?? {};\n\n return jsonBody({ query: request.gqlQuery, variables });\n }\n\n if (request.body === null || request.body === undefined) return null;\n if (typeof request.body === 'string') return request.body;\n\n return jsonBody(request.body);\n};\n\n/**\n * Renders a request as a copy-pasteable `curl` command, one option per line so a long one stays\n * readable in a terminal, a ticket or a chat message.\n *\n * Angular's `HttpClient` labels an object body `application/json` on its own, so the header is spelled\n * out here for a body that has one - without it the request reaches the endpoint differently than the\n * app sent it. Headers whose value the panel could not resolve (a secure query's `Authorization`\n * without an access token) are left out, so what is emitted is only what was known.\n */\nexport const buildCurlCommand = (request: CurlRequestInput) => {\n const body = bodyOf(request);\n const headers = request.headers.filter((header) => header.value !== '');\n const hasContentType = headers.some((header) => header.name.toLowerCase() === 'content-type');\n const withContentType =\n body === null || hasContentType ? headers : [...headers, { name: 'Content-Type', value: 'application/json' }];\n\n const lines = [`curl ${shellQuote(request.url)}`];\n\n // GET is curl's default, so spelling it out only adds noise to the common case.\n if (request.method.toUpperCase() !== 'GET') lines.push(`-X ${request.method.toUpperCase()}`);\n\n for (const header of withContentType) lines.push(`-H ${shellQuote(`${header.name}: ${header.value}`)}`);\n\n // `--data-raw`, not `-d`: the latter strips newlines and would mangle a GraphQL document, and it also\n // rewrites the method to POST behind your back.\n if (body !== null) lines.push(`--data-raw ${shellQuote(body)}`);\n\n return lines.join(' \\\\\\n ');\n};\n","import { Component, computed, effect, ElementRef, input, signal, viewChild, ViewEncapsulation } from '@angular/core';\nimport { injectErrorTheme, injectStyleManager, ProvideColorDirective } from '@ethlete/core';\nimport {\n armQueryDevtoolsOverrideTransfer,\n countUnresolvedQueryDevtoolsOverrides,\n parseQueryDevtoolsOverrideTransfer,\n QueryDevtoolsOverridesRecorder,\n serializeQueryDevtoolsOverrideTransfer,\n} from '@ethlete/query';\nimport { MenuComponent, MenuDirective, MenuItemComponent, MenuItemShortcutComponent } from '@ethlete/components';\nimport { MenuSearchDirective, MenuSurfaceDirective, MenuTriggerDirective } from '@ethlete/components';\nimport { readQueryDevtoolsClipboard, textFromQueryDevtoolsPaste } from './query-devtools-clipboard';\nimport { QueryDevtoolsOverrideMenuStylesComponent } from './query-devtools-override-menu-styles.component';\n\n/**\n * Copies the whole set of response overrides armed on one query to the clipboard, and pastes one back -\n * onto this query or any other. The payload is the same JSON the override store persists, so a set can\n * also go into a ticket and come back from one.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-override-set-menu',\n templateUrl: './query-devtools-override-set-menu.component.html',\n encapsulation: ViewEncapsulation.None,\n imports: [\n MenuDirective,\n MenuTriggerDirective,\n MenuSurfaceDirective,\n MenuSearchDirective,\n MenuComponent,\n MenuItemComponent,\n MenuItemShortcutComponent,\n ProvideColorDirective,\n ],\n})\nexport class QueryDevtoolsOverrideSetMenuComponent {\n protected errorColorTheme = injectErrorTheme();\n\n public overrides = input.required<QueryDevtoolsOverridesRecorder>();\n\n /** The response a pasted set is measured against, to report the ops that land on nothing. */\n public response = input<unknown>();\n\n /** Where the set came from, carried into the payload for whoever reads it next. */\n public source = input<{ id?: string; url?: string }>();\n\n private pasteInput = viewChild<ElementRef<HTMLInputElement>>('pasteBox');\n\n protected armedCount = computed(() => this.overrides().list().length);\n\n protected pasteMode = signal(false);\n protected error = signal<string | null>(null);\n protected note = signal<string | null>(null);\n protected copied = signal(false);\n\n constructor() {\n injectStyleManager().mount(QueryDevtoolsOverrideMenuStylesComponent);\n\n effect(() => this.pasteInput()?.nativeElement.focus());\n }\n\n protected copySet() {\n const text = serializeQueryDevtoolsOverrideTransfer(this.overrides().list(), this.source());\n\n navigator.clipboard?.writeText(text).then(\n () => this.copied.set(true),\n () => this.error.set('The clipboard write was blocked'),\n );\n }\n\n protected pasteSet() {\n this.reset();\n\n readQueryDevtoolsClipboard().then((read) => {\n if (read.ok) {\n this.armText(read.text);\n\n return;\n }\n\n this.pasteMode.set(true);\n this.note.set(\n read.reason === 'unavailable'\n ? 'This browser will not hand over the clipboard - press ⌘V / Ctrl+V here instead.'\n : 'The clipboard read was blocked - press ⌘V / Ctrl+V here instead.',\n );\n });\n }\n\n protected pasteIntoBox(event: ClipboardEvent) {\n const text = textFromQueryDevtoolsPaste(event);\n if (!text) return;\n\n event.preventDefault();\n this.armText(text);\n }\n\n protected commitPasteBox() {\n const raw = this.pasteInput()?.nativeElement.value;\n\n if (raw !== undefined) this.armText(raw);\n }\n\n protected resetOnClose(open: boolean) {\n if (!open) {\n this.pasteMode.set(false);\n this.copied.set(false);\n this.reset();\n }\n }\n\n private reset() {\n this.error.set(null);\n this.note.set(null);\n }\n\n private armText(text: string) {\n const parsed = parseQueryDevtoolsOverrideTransfer(text);\n\n if (!parsed.ok) {\n this.error.set(parsed.reason);\n\n return;\n }\n\n armQueryDevtoolsOverrideTransfer(this.overrides(), parsed.ops);\n\n const unresolved = countUnresolvedQueryDevtoolsOverrides(parsed.ops, this.response());\n const parts = [`Armed ${parsed.ops.length} ${parsed.ops.length === 1 ? 'op' : 'ops'}`];\n\n if (unresolved) parts.push(`${unresolved} of them do not resolve against this response`);\n if (parsed.skipped) parts.push(`${parsed.skipped} unknown to this build were dropped`);\n\n this.pasteMode.set(false);\n this.error.set(null);\n this.note.set(`${parts.join('; ')}.`);\n }\n}\n","<div (openChange)=\"resetOnClose($event)\" class=\"et-query-devtools-override-set-menu\" etMenu>\n <button\n et-menu-item\n title=\"Copy every response override armed on this query, or paste a set copied off another one.\"\n type=\"button\"\n etMenuTrigger\n >\n Override set\n <et-menu-item-shortcut>›</et-menu-item-shortcut>\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <ng-container ngProjectAs=\"input[etMenuSearch]\">\n @if (pasteMode()) {\n <input\n #pasteBox\n [error]=\"error()\"\n (paste)=\"pasteIntoBox($event)\"\n (keydown.enter)=\"commitPasteBox()\"\n etMenuSearch\n type=\"text\"\n placeholder=\"Paste a copied set here\"\n />\n }\n </ng-container>\n\n @if (armedCount()) {\n <!-- eslint-disable-next-line ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <button [closeOnActivate]=\"false\" (activate)=\"copySet()\" et-menu-item type=\"button\">\n {{ copied() ? '✓ Copied' : 'Copy ' + armedCount() + (armedCount() === 1 ? ' armed op' : ' armed ops') }}\n </button>\n }\n\n <!-- eslint-disable-next-line ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <button [closeOnActivate]=\"false\" (activate)=\"pasteSet()\" et-menu-item type=\"button\">\n Paste a set{{ armedCount() ? ' on top' : '' }}\n </button>\n\n @if (error(); as err) {\n <p [etProvideColor]=\"errorColorTheme\" class=\"et-query-devtools-override-error\" role=\"alert\">{{ err }}</p>\n } @else if (note(); as text) {\n <p class=\"et-query-devtools-override-note\" role=\"status\">{{ text }}</p>\n }\n </et-menu>\n </ng-template>\n</div>\n","import { Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { RouteSegment } from './query-devtools-types';\n\n/**\n * Drops a leading path prefix from a route's segments, splitting whichever segment the prefix ends\n * inside. `null` when the route does not start with the prefix - a caller then shows the whole route\n * rather than a tail that would start mid-token and read as a different endpoint.\n */\nexport const trimRouteSegments = (segments: readonly RouteSegment[], prefix: string): RouteSegment[] | null => {\n if (!prefix) return null;\n if (\n !segments\n .map((segment) => segment.text)\n .join('')\n .startsWith(prefix)\n )\n return null;\n\n let remaining = prefix.length;\n\n const trimmed: RouteSegment[] = [];\n\n for (const segment of segments) {\n if (remaining <= 0) {\n trimmed.push(segment);\n continue;\n }\n\n if (segment.text.length <= remaining) {\n remaining -= segment.text.length;\n continue;\n }\n\n trimmed.push({ ...segment, text: segment.text.slice(remaining) });\n remaining = 0;\n }\n\n return trimmed.length ? trimmed : null;\n};\n\n/**\n * A route with its path params and query string picked out from the static path. The segments render\n * element-only: a text node between them would render as a space inside the route.\n */\n@Component({\n selector: 'et-query-devtools-route',\n template: `\n @if (trimmed(); as trimmed) {\n <span [attr.title]=\"trimTitle()\" class=\"et-query-devtools-route-trimmed\">…</span>\n @for (segment of trimmed; track $index) {\n <span [class]=\"'et-query-devtools-route-' + segment.kind\" [attr.title]=\"segment.name\">{{ segment.text }}</span>\n }\n } @else {\n @for (segment of segments(); track $index) {\n <span [class]=\"'et-query-devtools-route-' + segment.kind\" [attr.title]=\"segment.name\">{{ segment.text }}</span>\n } @empty {\n {{ fallback() }}\n }\n }\n `,\n styleUrl: './query-devtools-route.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsRouteComponent {\n public segments = input.required<RouteSegment[]>();\n public fallback = input('—');\n\n /**\n * A leading path the row's surroundings already state - the tree's folder heading. Rendering it again\n * on every child is noise, so it is replaced by a `…` that carries the full route in its `title`.\n */\n public trimPrefix = input('');\n\n protected trimmed = computed(() => trimRouteSegments(this.segments(), this.trimPrefix()));\n\n protected trimTitle = computed(\n () =>\n `${this.trimPrefix()}… — ${this.segments()\n .map((s) => s.text)\n .join('')}`,\n );\n}\n","import { Component, computed, input, signal, ViewEncapsulation } from '@angular/core';\nimport { MenuComponent, MenuItemComponent, MenuSeparatorComponent } from '@ethlete/components';\nimport { MenuDirective, MenuSurfaceDirective, MenuTriggerDirective } from '@ethlete/components';\nimport { QueryDevtoolsFeaturesComponent } from './query-devtools-features.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\nimport { QueryDevtoolsOverrideSetMenuComponent } from './query-devtools-override-set-menu.component';\nimport { QueryDevtoolsRouteComponent } from './query-devtools-route.component';\nimport { DetailTab, QueryDevtoolsSelection } from './query-devtools-types';\n\n/**\n * The query detail: head, live progress, run/edit/force actions and the overview/history/data\n * sub-tabs. Rendered inline by the Queries tab and wrapped in `<et-query-devtools-drawer>` by every\n * other tab's split view - both read/write the same {@link QueryDevtoolsHost.detailTab} and JIT editor\n * state, so switching sub-tab in one instance is switching it everywhere, exactly as when this was one\n * component holding everything.\n */\n@Component({\n selector: 'et-query-devtools-detail',\n templateUrl: './query-devtools-detail.component.html',\n styleUrl: './query-devtools-detail.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [\n MenuComponent,\n MenuDirective,\n MenuItemComponent,\n MenuSeparatorComponent,\n MenuSurfaceDirective,\n MenuTriggerDirective,\n QueryDevtoolsFeaturesComponent,\n QueryDevtoolsJsonComponent,\n QueryDevtoolsOverrideSetMenuComponent,\n QueryDevtoolsRouteComponent,\n ],\n})\nexport class QueryDevtoolsDetailComponent {\n protected host = injectQueryDevtoolsHost();\n\n public sel = input.required<QueryDevtoolsSelection>();\n\n /** Whether any of the three exports behind the Copy menu has just landed on the clipboard. */\n protected copied = computed(() => this.host.copiedReport() || this.host.copiedCurl() || this.host.copiedInsomnia());\n\n protected overrideSetSource = computed(() => {\n const sel = this.sel();\n const url = this.host.requestUrl(sel.query);\n\n return { id: sel.entry.id, ...(url ? { url } : {}) };\n });\n\n /**\n * Whether this is a tombstone. Everything that would run, edit or force the query is hidden for one -\n * its handle is a frozen snapshot, so those actions have nothing to act on.\n */\n protected isGone = computed(() => !!this.sel().entry.destroyedAt);\n\n protected readonly detailTabs = [\n { id: 'overview', label: 'Overview' },\n { id: 'history', label: 'History' },\n { id: 'data', label: 'Data' },\n ] satisfies { id: DetailTab; label: string }[];\n\n /** Whether the tail of runs that can no longer be diffed is unfolded. */\n protected foldedRunsOpen = signal(false);\n\n /**\n * The runs split at the last one that still holds a body. Only the newest few can ever be an end of a\n * diff (`setQueryDevtoolsResponseHistory`, five by default) while the run log keeps twenty-five, so\n * without this the diff sits under twenty rows reading `body no longer held` and the pair and its\n * result never fit on one screen.\n *\n * Split, not filtered: a dead row *between* two live ones stays where it is, so the log keeps its order.\n */\n protected runSections = computed(() => {\n const runs = this.host.queryRuns(this.sel().entry);\n const isActionable = (run: (typeof runs)[number]) => run.hasResponse || !!run.error?.hasBody;\n\n let lastActionable = -1;\n runs.forEach((run, index) => {\n if (isActionable(run)) lastActionable = index;\n });\n\n return { listed: runs.slice(0, lastActionable + 1), folded: runs.slice(lastActionable + 1) };\n });\n\n /** What a run's Diff button reads as at each end of the comparison. */\n protected readonly diffRoles = {\n base: {\n label: 'Base',\n title: 'The older end of the comparison - click another run to set the newer one, or this one to clear it',\n },\n compare: { label: 'Compare', title: 'The newer end of the comparison - click to clear it' },\n } satisfies Record<'base' | 'compare', { label: string; title: string }>;\n}\n","@let s = sel();\n\n<div class=\"et-query-devtools-detail-head\">\n <span class=\"et-query-devtools-method\">{{ s.entry.meta.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"host.routeSegments(s.entry, s.query)\" />\n </span>\n <button\n [attr.aria-label]=\"host.copyableRouteTitle(s.entry, s.query)\"\n [title]=\"host.copyableRouteTitle(s.entry, s.query)\"\n [class.et-query-devtools-route-copy--copied]=\"host.copiedRoute()\"\n (click)=\"host.copyRoute(s.entry, s.query)\"\n class=\"et-query-devtools-route-copy\"\n type=\"button\"\n >\n {{ host.copiedRoute() ? '✓' : '⧉' }}\n </button>\n @if (host.isTampered(s.entry)) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--error\"\n title=\"Showing an armed response override or a devtools-injected failure, not what the server actually sent\"\n >\n tampered\n </span>\n }\n @if (isGone()) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">gone</span>\n }\n</div>\n\n@if (s.entry.destroyedAt; as destroyedAt) {\n <p class=\"et-query-devtools-gone-note\">\n Destroyed at {{ host.formatTime(destroyedAt) }}. This is the last state the query held - nothing here updates, and\n it cannot be run again.\n </p>\n}\n\n@if (host.requestProgress(s.query); as live) {\n <div class=\"et-query-devtools-live\">\n @if (live.retry; as retry) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--loading\"\n title=\"The retry policy is backing off before it tries again. A query stuck loading with this chip is waiting, not slow.\"\n >\n <span class=\"et-query-devtools-retry-glyph\" aria-hidden=\"true\">⟳</span>\n attempt {{ retry.attempt }} in {{ host.formatCountdown(live.retryInMs) }}\n </span>\n <span class=\"et-query-devtools-live-note\">\n {{ host.retryCause(retry.status) }} · backing off {{ host.formatDuration(retry.delayMs) }}\n </span>\n } @else if (live.attempts > 1) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--loading\"\n title=\"How many HTTP attempts the last execution took - the retry policy fired for the rest\"\n >\n <span class=\"et-query-devtools-retry-glyph\" aria-hidden=\"true\">⟳</span>\n {{ live.attempts }} attempts\n </span>\n }\n\n @if (live.progress; as progress) {\n <span\n [attr.aria-valuenow]=\"progress.percentage\"\n class=\"et-query-devtools-progress\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-label=\"Transfer progress\"\n >\n <span [style.inline-size.%]=\"progress.percentage\" class=\"et-query-devtools-progress-bar\"></span>\n </span>\n <span class=\"et-query-devtools-live-note\">\n {{ host.formatPercent(progress.percentage) }} · {{ host.formatBytes(progress.loaded) }} of\n {{ host.formatBytes(progress.total) }}\n @if (progress.speed !== null) {\n · {{ host.formatSpeed(progress.speed) }}\n }\n @if (progress.remainingTime !== null) {\n · {{ host.formatDuration(progress.remainingTime) }} left\n }\n </span>\n }\n </div>\n}\n\n<!-- One row, one primary action. Everything a query can be *made* to do lives behind Override, and\n everything that leaves the panel behind Copy - a flat row of all twelve read as a wall of equal\n buttons in which Execute was no easier to find than Clear. -->\n<div class=\"et-query-devtools-actions\">\n @if (!isGone()) {\n <div class=\"et-query-devtools-btn-group\">\n <button\n (click)=\"host.executeQuery(s, false)\"\n class=\"et-query-devtools-btn et-query-devtools-btn--primary\"\n type=\"button\"\n title=\"Run the query again, ignoring the cache\"\n >\n <span aria-hidden=\"true\">▶</span>\n Execute\n </button>\n <button\n (click)=\"host.executeQuery(s, true)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Run it the way the app would - a fresh enough cached response is used instead of a request\"\n >\n Cached\n </button>\n <button\n (click)=\"host.resetQuery(s.query)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Drop this query's state back to idle\"\n >\n Reset\n </button>\n </div>\n }\n @let locatable = host.locatableElement(s.entry);\n <button\n [disabled]=\"!locatable\"\n [class.et-query-devtools-btn--active]=\"host.locateState() === 'located'\"\n [title]=\"\n locatable\n ? 'Scroll to and outline the element this query was created in. That is where it was created, not necessarily where its data is rendered.'\n : 'This query was created outside a component or directive - a root service, a resolver or a guard - so it has no element to point at.'\n \"\n (click)=\"host.locateQuery(s.entry)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n <span aria-hidden=\"true\">⌖</span>\n @switch (host.locateState()) {\n @case ('located') {\n Created here\n }\n @case ('offscreen') {\n Not on screen\n }\n @default {\n Locate\n }\n }\n </button>\n\n <!-- The tick has to live on the trigger: the menu closes on the pick, so a confirmation inside it\n would be gone before it could be read. -->\n <div class=\"et-query-devtools-menu\" etMenu>\n <button class=\"et-query-devtools-btn\" title=\"Take this request somewhere else\" type=\"button\" etMenuTrigger>\n <span class=\"et-query-devtools-menu-glyph\" aria-hidden=\"true\">{{ copied() ? '✓' : '⧉' }}</span>\n {{ copied() ? 'Copied' : 'Copy' }}\n <span class=\"et-query-devtools-menu-caret\" aria-hidden=\"true\">▾</span>\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <button (activate)=\"host.copyReport(s.entry, s.query)\" et-menu-item type=\"button\">\n Copy report\n <span class=\"et-query-devtools-menu-item-note\">Everything the panel knows, as markdown</span>\n </button>\n <button (activate)=\"host.copyCurlRequest(s.entry, s.query)\" et-menu-item type=\"button\">\n Copy as cURL\n <span class=\"et-query-devtools-menu-item-note\">URL, resolved headers and body</span>\n </button>\n <button (activate)=\"host.copyInsomniaRequest(s.entry, s.query)\" et-menu-item type=\"button\">\n Copy for Insomnia\n <span class=\"et-query-devtools-menu-item-note\">A collection to import from the clipboard</span>\n </button>\n </et-menu>\n </ng-template>\n </div>\n\n @if (!isGone()) {\n <div class=\"et-query-devtools-menu\" etMenu>\n <button\n [class.et-query-devtools-btn--tampered]=\"host.isTampered(s.entry)\"\n class=\"et-query-devtools-btn\"\n title=\"Make this query answer with something other than what the API sent\"\n type=\"button\"\n etMenuTrigger\n >\n <span class=\"et-query-devtools-menu-glyph\" aria-hidden=\"true\">✎</span>\n Override\n <span class=\"et-query-devtools-menu-caret\" aria-hidden=\"true\">▾</span>\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <button (activate)=\"host.openResponseEditor(s.query)\" et-menu-item type=\"button\">Edit response…</button>\n <button (activate)=\"host.openArgsEditor(s)\" et-menu-item type=\"button\">Replay with edited args…</button>\n <et-menu-separator />\n <button (activate)=\"host.forceLoading(s.query)\" et-menu-item type=\"button\">Force loading</button>\n <button (activate)=\"host.forceError(s.query)\" et-menu-item type=\"button\">Force error</button>\n <button (activate)=\"host.forceEmpty(s.query)\" et-menu-item type=\"button\">Force empty</button>\n <et-menu-separator />\n <button (activate)=\"host.clearForced(s.query)\" et-menu-item type=\"button\">Clear forced state</button>\n\n @if (s.entry.overrides; as overrides) {\n <et-menu-separator />\n <et-query-devtools-override-set-menu\n [overrides]=\"overrides\"\n [response]=\"s.query.response()\"\n [source]=\"overrideSetSource()\"\n />\n }\n </et-menu>\n </ng-template>\n </div>\n }\n</div>\n\n@if (!isGone() && host.editorMode() !== 'none') {\n <div class=\"et-query-devtools-editor\">\n @if (host.editorMode() === 'response') {\n <h4 class=\"et-query-devtools-section\">Edit response → setResponse()</h4>\n <textarea\n #respArea\n [value]=\"host.editorSeed\"\n (input)=\"host.responseDraft.set(respArea.value)\"\n class=\"et-query-devtools-textarea\"\n spellcheck=\"false\"\n ></textarea>\n <div class=\"et-query-devtools-actions\">\n <button (click)=\"host.applyResponse(s.query)\" class=\"et-query-devtools-btn\" type=\"button\">Apply</button>\n <button (click)=\"host.cancelEditor()\" class=\"et-query-devtools-btn\" type=\"button\">Cancel</button>\n </div>\n } @else {\n <h4 class=\"et-query-devtools-section\">Replay with edited args → execute()</h4>\n <textarea\n #argsArea\n [value]=\"host.editorSeed\"\n (input)=\"host.argsDraft.set(argsArea.value)\"\n class=\"et-query-devtools-textarea\"\n spellcheck=\"false\"\n ></textarea>\n <div class=\"et-query-devtools-actions\">\n <button (click)=\"host.applyArgs(s.query)\" class=\"et-query-devtools-btn\" type=\"button\">Execute</button>\n <button (click)=\"host.cancelEditor()\" class=\"et-query-devtools-btn\" type=\"button\">Cancel</button>\n </div>\n }\n @if (host.editError(); as err) {\n <p class=\"et-query-devtools-editor-error\">{{ err }}</p>\n }\n </div>\n}\n\n@let detailRuns = host.queryRuns(s.entry);\n<nav class=\"et-query-devtools-subtabs\" role=\"tablist\">\n @for (tab of detailTabs; track tab.id) {\n <button\n [class.et-query-devtools-subtab--active]=\"host.detailTab() === tab.id\"\n [attr.aria-selected]=\"host.detailTab() === tab.id\"\n (click)=\"host.detailTab.set(tab.id)\"\n class=\"et-query-devtools-subtab\"\n type=\"button\"\n role=\"tab\"\n >\n {{ tab.label }}\n @if (tab.id === 'history' && detailRuns.length) {\n <span class=\"et-query-devtools-tab-badge\">{{ detailRuns.length }}</span>\n }\n <!-- The error body lives under Data, so the tab has to say so - a failure must not hide\n behind a tab that is not open. -->\n @if (tab.id === 'data' && s.query.error()) {\n <span class=\"et-query-devtools-tab-badge et-query-devtools-tab-badge--error\">!</span>\n }\n </button>\n }\n</nav>\n\n@switch (host.detailTab()) {\n @case ('overview') {\n <dl class=\"et-query-devtools-meta\">\n <dt>Base URL</dt>\n <dd class=\"et-query-devtools-mono\">\n {{ s.entry.meta.clientBaseUrl || s.entry.meta.clientName || '—' }}\n </dd>\n <dt>Route</dt>\n <dd class=\"et-query-devtools-mono\">{{ s.entry.meta.route || '—' }}</dd>\n <dt>Request URL</dt>\n <dd class=\"et-query-devtools-mono\">{{ host.requestUrl(s.query) || '—' }}</dd>\n <dt>Status</dt>\n <dd>{{ host.queryStatus(s.query) }}</dd>\n <dt>Cache key</dt>\n <dd class=\"et-query-devtools-mono\">{{ s.query.id() || '—' }}</dd>\n <dt>Last executed</dt>\n <dd>{{ host.formatTime(s.query.lastTimeExecutedAt()) }}</dd>\n <dt>Triggered by</dt>\n <dd>{{ s.query.triggeredBy() || 'user' }}</dd>\n @let refreshes = host.refreshesFor(s.entry.id);\n @if (refreshes.length) {\n <dt title=\"Invalidations and mutation refreshes that re-executed this query, as far back as the event log goes\">\n Refetched by\n </dt>\n <dd>\n <div class=\"et-query-devtools-chips\">\n @for (refresh of refreshes.slice(0, 5); track refresh.id) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">\n {{ host.formatTime(refresh.timestamp) }} · {{ refresh.label }}\n </span>\n }\n @if (refreshes.length > 5) {\n <span class=\"et-query-devtools-hint\">+{{ refreshes.length - 5 }} earlier</span>\n }\n </div>\n </dd>\n }\n @let drivers = host.formsDrivingQuery(s.entry);\n @if (drivers.length) {\n <dt>Args from</dt>\n <dd>\n <div class=\"et-query-devtools-chips\">\n @for (driver of drivers; track driver.id) {\n <button\n (click)=\"host.selectForm(driver.id)\"\n class=\"et-query-devtools-chip et-query-devtools-chip--button\"\n type=\"button\"\n title=\"Open the query form in the Forms tab\"\n >\n {{ driver.meta.name }}\n </button>\n }\n </div>\n </dd>\n }\n @if (s.entry.meta.features?.length) {\n <dt>Features</dt>\n <dd>\n <et-query-devtools-features [features]=\"s.entry.meta.features ?? []\" />\n </dd>\n }\n </dl>\n\n @let activity = host.queryActivity(s.entry);\n <div class=\"et-query-devtools-section-row\">\n <h4 class=\"et-query-devtools-section\">Activity</h4>\n <button\n [disabled]=\"!activity.hasActivity\"\n (click)=\"host.resetStats(s.entry)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Clear the counters and the run history, so the next interaction can be measured on its own\"\n >\n ⟲ Reset\n </button>\n </div>\n\n <dl class=\"et-query-devtools-stats\">\n <div class=\"et-query-devtools-stat\" title=\"Every time the query ran, cache hits included\">\n <dt>Refreshes</dt>\n <dd>{{ activity.stats.executions }}</dd>\n @if (activity.cacheServed) {\n <span class=\"et-query-devtools-stat-sub\">{{ activity.cacheServed }} without a request</span>\n }\n </div>\n <div class=\"et-query-devtools-stat\" title=\"Executions that started a request, and how they ended\">\n <dt>Requests</dt>\n <dd>{{ activity.stats.requests }}</dd>\n <span class=\"et-query-devtools-stat-sub\">\n {{ activity.stats.responses }} ok\n @if (activity.stats.errors) {\n · {{ activity.stats.errors }} failed\n }\n </span>\n </div>\n <div\n class=\"et-query-devtools-stat\"\n title=\"Total response payload received. Sizes without a content-length header are measured from the decoded body, so they ignore compression.\"\n >\n <dt>Received</dt>\n <dd>{{ host.formatTransferred(activity.stats.receivedBytes, activity.stats.hasEstimatedBytes) }}</dd>\n @if (activity.avgResponseBytes !== null) {\n <span class=\"et-query-devtools-stat-sub\">{{ host.formatBytes(activity.avgResponseBytes) }} per response</span>\n }\n </div>\n @if (activity.stats.sentBytes) {\n <div class=\"et-query-devtools-stat\" title=\"Total request body sent (headers not counted)\">\n <dt>Sent</dt>\n <dd>{{ host.formatTransferred(activity.stats.sentBytes, activity.stats.hasEstimatedBytes) }}</dd>\n </div>\n }\n @if (activity.stats.retries) {\n <div\n class=\"et-query-devtools-stat\"\n title=\"Attempts the retry policy added on top of the first one. Which run they belong to is under History.\"\n >\n <dt>Retries</dt>\n <dd>{{ activity.stats.retries }}</dd>\n </div>\n }\n <div class=\"et-query-devtools-stat\" title=\"Measured from the execution that preceded each response\">\n <dt>Duration</dt>\n <dd>{{ host.formatDuration(activity.stats.lastDurationMs) }}</dd>\n @if (activity.avgDurationMs !== null) {\n <span class=\"et-query-devtools-stat-sub\">{{ host.formatDuration(activity.avgDurationMs) }} on average</span>\n }\n </div>\n <div class=\"et-query-devtools-stat\">\n <dt>Last response</dt>\n <dd class=\"et-query-devtools-stat-value--sm\">{{ host.formatTime(activity.stats.lastResponseAt) }}</dd>\n @if (activity.stats.firstExecutedAt !== null) {\n <span class=\"et-query-devtools-stat-sub\"\n >first ran {{ host.formatTime(activity.stats.firstExecutedAt) }}</span\n >\n }\n </div>\n </dl>\n }\n @case ('history') {\n <div class=\"et-query-devtools-section-row\">\n <h4 class=\"et-query-devtools-section\">Runs</h4>\n <button\n [disabled]=\"!detailRuns.length\"\n (click)=\"host.resetStats(s.entry)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Clear the run history and the counters, so the next interaction can be measured on its own\"\n >\n ⟲ Reset\n </button>\n </div>\n @if (detailRuns.length) {\n <table class=\"et-query-devtools-table\">\n <thead>\n <tr>\n <th>Run</th>\n <th>Started</th>\n <th>Duration</th>\n <th>Received</th>\n <th>Body</th>\n </tr>\n </thead>\n <tbody>\n @for (run of runSections().listed.concat(foldedRunsOpen() ? runSections().folded : []); track run.index) {\n <tr [attr.data-status]=\"run.status === 'error' ? 'error' : null\">\n <td>\n <span class=\"et-query-devtools-run-cell\">\n <span\n [attr.data-status]=\"host.runStatus(run)\"\n [title]=\"run.status\"\n class=\"et-query-devtools-status\"\n ></span>\n #{{ run.index }}\n @if (run.attempts > 1) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--loading\"\n title=\"Took {{\n run.attempts\n }} attempts - the duration next to it covers every one of them, backoff included\"\n >\n <span class=\"et-query-devtools-retry-glyph\" aria-hidden=\"true\">⟳</span>\n {{ run.attempts }}\n </span>\n }\n @if (!run.didRequest) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"Arrived without a request of this query's own - a poll, another consumer of the same cache entry, or another tab\"\n >\n shared\n </span>\n }\n @if (run.error; as error) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--error\"\n title=\"{{ error.messages.join(' · ') || 'The failure carried no message' }}\"\n >\n {{ error.code || 'failed' }}\n </span>\n }\n </span>\n </td>\n <td>{{ host.formatTime(run.startedAt) }}</td>\n <td>\n @if (run.endedAt === null) {\n in flight\n } @else {\n {{ host.formatDuration(run.endedAt - run.startedAt) }}\n }\n </td>\n <td>{{ run.receivedBytes ? host.formatBytes(run.receivedBytes) : '—' }}</td>\n <td>\n <span class=\"et-query-devtools-cell-actions\">\n @if (host.canDiffRun(s.entry, run)) {\n @let role = host.diffRunRole(s.entry, run);\n @let armed = role ? diffRoles[role] : null;\n <button\n [class.et-query-devtools-btn--active]=\"!!armed\"\n [title]=\"\n armed?.title ?? 'Compare this response against another run - click a second row to pick which'\n \"\n (click)=\"host.toggleRunDiff(s.entry, run)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n {{ armed?.label ?? 'Diff' }}\n </button>\n } @else if (run.error?.hasBody) {\n <button\n [class.et-query-devtools-btn--active]=\"host.errorRunIndex() === run.index\"\n (click)=\"host.toggleRunError(run)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Show the body this failure came with\"\n >\n Error\n </button>\n } @else if (run.hasResponse) {\n <span class=\"et-query-devtools-count\">the only body held</span>\n } @else if (run.status === 'success' || run.error) {\n <span\n class=\"et-query-devtools-count\"\n title=\"Only the newest {{\n host.retainedResponseCount()\n }} bodies of a query are kept, so this run can no longer be an end of a diff\"\n >\n body no longer held\n </span>\n } @else {\n <span class=\"et-query-devtools-count\">—</span>\n }\n </span>\n </td>\n </tr>\n }\n </tbody>\n </table>\n @let foldedRuns = runSections().folded.length;\n @if (foldedRuns) {\n <button\n [attr.aria-expanded]=\"foldedRunsOpen()\"\n (click)=\"foldedRunsOpen.set(!foldedRunsOpen())\"\n class=\"et-query-devtools-btn et-query-devtools-runs-fold\"\n type=\"button\"\n title=\"Only the newest {{\n host.retainedResponseCount()\n }} bodies of a query are kept, so none of these older runs can be an end of a diff\"\n >\n <span aria-hidden=\"true\">{{ foldedRunsOpen() ? '▾' : '▸' }}</span>\n {{ foldedRunsOpen() ? 'Hide' : 'Show' }} {{ foldedRuns }} older run{{ foldedRuns === 1 ? '' : 's' }} with no\n body\n </button>\n }\n\n @if (host.pickedRunError(s.entry); as failure) {\n <div class=\"et-query-devtools-section-row\">\n <h5 class=\"et-query-devtools-section\">\n Error body · run #{{ failure.run.index }} · {{ failure.error.code || 'no status' }}\n </h5>\n </div>\n @for (message of failure.error.messages; track message) {\n <p class=\"et-query-devtools-count\">{{ message }}</p>\n }\n <et-query-devtools-json\n [value]=\"failure.error.body\"\n [search]=\"host.jsonSearchTerm()\"\n [expandedPaths]=\"host.jsonExpandedPaths()\"\n [collapsedPaths]=\"host.jsonCollapsedPaths()\"\n [toggleFn]=\"host.toggleJsonPath\"\n path=\"runError\"\n />\n }\n\n @if (host.responseDiff(s.entry); as comparison) {\n <div class=\"et-query-devtools-section-row\">\n <h5 class=\"et-query-devtools-section\">\n Response diff · run #{{ comparison.before.index }} → #{{ comparison.after.index }}\n </h5>\n <span class=\"et-query-devtools-diff-step\">\n <button\n [disabled]=\"!host.canStepRunDiff(s.entry, true)\"\n (click)=\"host.stepRunDiff(s.entry, true)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Compare the pair one run older, without going back to the table\"\n >\n ◂ Older\n </button>\n <button\n [disabled]=\"!host.canStepRunDiff(s.entry, false)\"\n (click)=\"host.stepRunDiff(s.entry, false)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Compare the pair one run newer, without going back to the table\"\n >\n Newer ▸\n </button>\n </span>\n <span class=\"et-query-devtools-count\">\n @if (host.diffBaseRunIndex() === null) {\n <span\n title=\"Nothing is picked to compare against, so this is the nearest older run that still holds a body - click another run's Diff to pick one\"\n >\n nearest older\n </span>\n ·\n }\n @if (comparison.diff.entries.length) {\n {{ comparison.diff.entries.length }} path{{ comparison.diff.entries.length === 1 ? '' : 's' }}\n @if (comparison.diff.truncated) {\n (capped)\n }\n } @else {\n identical\n }\n </span>\n </div>\n @if (comparison.diff.entries.length) {\n <table class=\"et-query-devtools-table et-query-devtools-diff\">\n <thead>\n <tr>\n <th>Path</th>\n <th>Before</th>\n <th>After</th>\n </tr>\n </thead>\n <tbody>\n @for (change of comparison.diff.entries; track change.path) {\n <tr [attr.data-kind]=\"change.kind\">\n <td class=\"et-query-devtools-mono\">{{ change.path }}</td>\n <td class=\"et-query-devtools-mono et-query-devtools-diff-before\">\n {{ change.kind === 'added' ? '—' : host.inlineValue(change.before) }}\n </td>\n <td class=\"et-query-devtools-mono et-query-devtools-diff-after\">\n {{ change.kind === 'removed' ? '—' : host.inlineValue(change.after) }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n } @else {\n <p class=\"et-query-devtools-empty\">The two responses are identical.</p>\n }\n }\n } @else {\n <p class=\"et-query-devtools-empty\">No runs recorded yet.</p>\n }\n }\n @case ('data') {\n @if (s.entry.meta.gqlQuery; as gqlQuery) {\n <div class=\"et-query-devtools-section-row\">\n <h5 class=\"et-query-devtools-section\">GraphQL document</h5>\n <button\n (click)=\"host.copyGqlDocument(gqlQuery)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Copy the GraphQL document\"\n >\n {{ host.copiedGql() ? '✓ Copied' : '⧉ Copy' }}\n </button>\n </div>\n <pre class=\"et-query-devtools-code\">{{ host.gqlDocument(gqlQuery) }}</pre>\n }\n\n <div class=\"et-query-devtools-section-row\">\n <h4 class=\"et-query-devtools-section\">Value explorer</h4>\n <input\n #jsonSearchInput\n [value]=\"host.jsonSearch()\"\n (input)=\"host.jsonSearch.set(jsonSearchInput.value)\"\n class=\"et-query-devtools-search\"\n type=\"search\"\n placeholder=\"filter keys / values…\"\n />\n </div>\n\n <h5 class=\"et-query-devtools-section\">Args</h5>\n <et-query-devtools-json\n [value]=\"host.queryArgs(s.query)\"\n [search]=\"host.jsonSearchTerm()\"\n [expandedPaths]=\"host.jsonExpandedPaths()\"\n [collapsedPaths]=\"host.jsonCollapsedPaths()\"\n [toggleFn]=\"host.toggleJsonPath\"\n path=\"args\"\n />\n\n @if (s.query.error(); as error) {\n <h5 class=\"et-query-devtools-section\">Error ({{ error.raw.status }})</h5>\n <et-query-devtools-json\n [value]=\"error.isList ? error.errors : error.error\"\n [search]=\"host.jsonSearchTerm()\"\n [expandedPaths]=\"host.jsonExpandedPaths()\"\n [collapsedPaths]=\"host.jsonCollapsedPaths()\"\n [toggleFn]=\"host.toggleJsonPath\"\n path=\"error\"\n />\n } @else {\n <div class=\"et-query-devtools-section-row\">\n <h5 class=\"et-query-devtools-section\">Response</h5>\n @if (s.entry.overrides?.list()?.length || host.overridesPersist()) {\n <button\n [class.et-query-devtools-btn--active]=\"host.overridesPersist()\"\n [attr.aria-pressed]=\"host.overridesPersist()\"\n (click)=\"host.toggleOverridesPersist()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"{{\n host.overridesPersist()\n ? 'Panel-wide: every armed response override is kept in ' +\n host.overridesScopeLabel() +\n ' and replayed on the next load.'\n : 'Panel-wide: keep every armed response override and replay it on the next load.'\n }} Settings ⚙ chooses the scope. Armed faults are never kept.\"\n >\n Keep across reloads\n </button>\n }\n @if (s.entry.overrides?.list()?.length) {\n <button (click)=\"s.entry.overrides?.clearAll()\" class=\"et-query-devtools-btn\" type=\"button\">\n Reset all overrides ({{ s.entry.overrides?.list()?.length }})\n </button>\n }\n </div>\n <et-query-devtools-json\n [value]=\"s.query.response()\"\n [search]=\"host.jsonSearchTerm()\"\n [expandedPaths]=\"host.jsonExpandedPaths()\"\n [collapsedPaths]=\"host.jsonCollapsedPaths()\"\n [toggleFn]=\"host.toggleJsonPath\"\n [overrides]=\"s.entry.overrides ?? null\"\n path=\"response\"\n />\n }\n }\n}\n","import { Component, input, output, ViewEncapsulation } from '@angular/core';\nimport { QueryDevtoolsEntry } from '@ethlete/query';\nimport { QueryDevtoolsDetailComponent } from './query-devtools-detail.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { AnyQuery } from './query-devtools-types';\n\n/**\n * The split-view drawer every two-pane tab (stacks/sequences/forms/timeline) opens a query in - the\n * resize handle, the `<aside>` chrome and the close button around a `<et-query-devtools-detail>`. The\n * Queries tab renders that same detail component inline instead, without this wrapper, since it has no\n * separate list/drawer split to close.\n */\n@Component({\n selector: 'et-query-devtools-drawer',\n templateUrl: './query-devtools-drawer.component.html',\n styleUrl: './query-devtools-drawer.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsDetailComponent],\n})\nexport class QueryDevtoolsDrawerComponent {\n protected host = injectQueryDevtoolsHost();\n\n public sel = input<{ entry: QueryDevtoolsEntry; query: AnyQuery } | null>(null);\n public container = input.required<HTMLElement>();\n\n public dismiss = output<void>();\n}\n","@if (sel(); as selected) {\n <div\n (pointerdown)=\"host.startPaneResize($event, { pane: 'drawer', container: container() })\"\n (dblclick)=\"host.resetPaneSize('drawer')\"\n class=\"et-query-devtools-pane-resize\"\n title=\"Drag to resize, double-click to reset\"\n aria-hidden=\"true\"\n ></div>\n\n <aside class=\"et-query-devtools-drawer\">\n <div class=\"et-query-devtools-drawer-head\">\n <span>Query detail</span>\n <button (click)=\"dismiss.emit()\" class=\"et-query-devtools-close\" type=\"button\" title=\"Close detail\">✕</button>\n </div>\n <et-query-devtools-detail [sel]=\"selected\" />\n </aside>\n}\n","import { Component, computed, ViewEncapsulation } from '@angular/core';\nimport { QueryDevtoolsDrawerComponent } from './query-devtools-drawer.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { DESTROY_CAUSE_LABELS, EventLogItem } from './query-devtools-types';\n\n/** The Events tab: the rolling log of repository traffic, refreshes and secure unbinds. */\n@Component({\n selector: 'et-query-devtools-events-tab',\n templateUrl: './query-devtools-events-tab.component.html',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsDrawerComponent],\n})\nexport class QueryDevtoolsEventsTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n /**\n * The event rows the log shows: the client picker and the errors-only toggle applied. Kept apart from\n * the full log so \"Refetched by\" and the session export keep reading all of it.\n */\n protected filteredEvents = computed(() => {\n const client = this.host.eventClient();\n const errorsOnly = this.host.eventErrorsOnly();\n const events = this.host.eventLog();\n\n if (!client && !errorsOnly) return events;\n\n return events.filter(\n (event) => (!client || event.client === client) && (!errorsOnly || event.type === 'request-error'),\n );\n });\n\n /** The clients the event log has rows from, as its picker offers them. */\n protected eventClients = computed(() => {\n const names = new Set(this.host.repositories().map(({ name, baseUrl }) => baseUrl || name));\n\n return Array.from(names).sort();\n });\n\n protected isEventLogNarrowed = computed(() => !!this.host.eventClient() || this.host.eventErrorsOnly());\n\n protected clearEvents() {\n this.host.eventLog.set([]);\n }\n\n protected toggleEventErrorsOnly() {\n this.host.eventErrorsOnly.update((v) => !v);\n }\n\n protected clearEventFilters() {\n this.host.eventClient.set(null);\n this.host.eventErrorsOnly.set(false);\n }\n\n /**\n * Opens the query a row belongs to in this tab's own drawer, rather than jumping to the Queries tab -\n * the log is read by walking rows, and a jump ends that walk on every click.\n */\n protected selectEventRow(item: EventLogItem) {\n if (item.queryId) this.host.eventSelectedQueryId.set(item.queryId);\n }\n\n /**\n * Whether a row's query can still be opened. An id alone does not say so: a query batch destroys each\n * item's query as that item settles and leaves no tombstone behind, so a bulk run's rows would\n * otherwise all render as links that open nothing.\n */\n protected canOpenEventRow(id: string | null) {\n return !!id && !!this.host.findQuery(id);\n }\n\n /** Only a request settling is a success or a failure; a teardown or a refresh is neither. */\n protected eventRowStatus(event: EventLogItem) {\n if (event.type === 'request-error') return 'error';\n if (event.type === 'request-success') return 'success';\n\n return null;\n }\n\n protected eventTypeLabel(event: EventLogItem) {\n if (event.type === 'unbind-all-secure') return 'logout';\n if (event.type === 'queries-refreshed') return `refetch ×${event.refreshed?.length ?? 0}`;\n if (event.type === 'entry-destroyed') return `dropped · ${DESTROY_CAUSE_LABELS[event.destroyCause ?? 'unbind']}`;\n\n return event.type === 'request-error' ? `error ${event.status}` : 'success';\n }\n}\n","<div #panes class=\"et-query-devtools-split\">\n <div class=\"et-query-devtools-pane\">\n <div class=\"et-query-devtools-toolbar\">\n <div class=\"et-query-devtools-toolbar-row\">\n @if (eventClients().length > 1) {\n <label class=\"et-query-devtools-field\">\n <span>Client</span>\n <select\n #eventClientSelect\n [value]=\"host.eventClient() ?? ''\"\n (change)=\"host.eventClient.set(eventClientSelect.value || null)\"\n class=\"et-query-devtools-select\"\n >\n <option value=\"\">All clients</option>\n @for (name of eventClients(); track name) {\n <option [value]=\"name\">{{ name }}</option>\n }\n </select>\n </label>\n }\n @let errorsOnly = host.eventErrorsOnly();\n <button\n [class.et-query-devtools-facet--active]=\"errorsOnly\"\n [attr.aria-pressed]=\"errorsOnly\"\n (click)=\"toggleEventErrorsOnly()\"\n class=\"et-query-devtools-chip et-query-devtools-facet\"\n type=\"button\"\n title=\"Show only the requests that failed\"\n >\n Errors only\n <span class=\"et-query-devtools-facet-count\">{{ host.tabBadges().events.errors }}</span>\n </button>\n <span class=\"et-query-devtools-count\">\n @if (isEventLogNarrowed()) {\n {{ filteredEvents().length }} of {{ host.eventLog().length }} events\n } @else {\n {{ host.eventLog().length }} events\n }\n </span>\n @if (isEventLogNarrowed()) {\n <button\n (click)=\"clearEventFilters()\"\n class=\"et-query-devtools-filter-clear\"\n type=\"button\"\n title=\"Clear the client scope and the errors-only toggle\"\n aria-label=\"Clear filters\"\n >\n <span aria-hidden=\"true\">✕</span>\n </button>\n }\n <button (click)=\"clearEvents()\" class=\"et-query-devtools-btn et-query-devtools-toolbar-btn\" type=\"button\">\n Clear\n </button>\n </div>\n </div>\n <div class=\"et-query-devtools-scroll\">\n <table class=\"et-query-devtools-table\">\n <thead>\n <tr>\n <th>Time</th>\n <th class=\"et-query-devtools-cell-origin\">Base URL</th>\n <th>Type</th>\n <th>Request</th>\n <th>Duration</th>\n <th>Size</th>\n </tr>\n </thead>\n <tbody>\n @for (event of filteredEvents(); track event.id) {\n <tr\n [attr.data-status]=\"eventRowStatus(event)\"\n [class.et-query-devtools-row--active]=\"!!event.queryId && host.eventSelectedQueryId() === event.queryId\"\n >\n <td>{{ host.formatTime(event.timestamp) }}</td>\n <td [title]=\"event.client\" class=\"et-query-devtools-mono et-query-devtools-cell-origin\">\n {{ event.client }}\n </td>\n <td>\n {{ eventTypeLabel(event) }}\n @if (event.isSecure) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">secure</span>\n }\n </td>\n @if (event.cause; as cause) {\n <td>\n <span class=\"et-query-devtools-url\">{{ host.causeLabel(cause) }}</span>\n @if (event.refreshed?.length) {\n <div class=\"et-query-devtools-chips\">\n @for (refreshed of event.refreshed; track $index) {\n @if (\n canOpenEventRow(refreshed.queryIds[0] ?? null) ? refreshed.queryIds[0] : null;\n as queryId\n ) {\n <button\n (click)=\"host.eventSelectedQueryId.set(queryId)\"\n class=\"et-query-devtools-chip et-query-devtools-chip--button\"\n type=\"button\"\n title=\"Open {{ refreshed.method }} {{ refreshed.path }}\"\n >\n {{ refreshed.method }} {{ refreshed.path }}\n <!-- One request, several queries on the same cache key. Spelling the count\n out beats repeating an identical row per consumer. -->\n @if (refreshed.queryIds.length > 1) {\n <small>×{{ refreshed.queryIds.length }}</small>\n }\n </button>\n } @else {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"No registered query holds this cache entry any more\"\n >\n {{ refreshed.method }} {{ refreshed.path }}\n </span>\n }\n }\n </div>\n } @else {\n <span class=\"et-query-devtools-hint\">matched no query in use</span>\n }\n </td>\n } @else if (event.url; as url) {\n <td>\n @if (canOpenEventRow(event.queryId)) {\n <button\n (click)=\"selectEventRow(event)\"\n class=\"et-query-devtools-row-link\"\n type=\"button\"\n title=\"Open {{ event.method }} {{ url }}\"\n >\n <span class=\"et-query-devtools-method\">{{ event.method }}</span>\n <span class=\"et-query-devtools-url\">{{ host.requestPath(url) }}</span>\n </button>\n } @else {\n <span [title]=\"event.method + ' ' + url\">\n <span class=\"et-query-devtools-method\">{{ event.method }}</span>\n <span class=\"et-query-devtools-url\">{{ host.requestPath(url) }}</span>\n </span>\n }\n </td>\n } @else {\n <td class=\"et-query-devtools-url\">all secure entries dropped</td>\n }\n <td>{{ host.formatDuration(event.durationMs) }}</td>\n <td>{{ event.bytes === null ? '—' : host.formatTransferred(event.bytes, event.isEstimatedBytes) }}</td>\n </tr>\n } @empty {\n <tr>\n @if (host.eventLog().length) {\n <td class=\"et-query-devtools-empty\" colspan=\"6\">\n No event matches the filter · {{ host.eventLog().length }} in the log.\n </td>\n } @else {\n <td class=\"et-query-devtools-empty\" colspan=\"6\">No events captured yet.</td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n </div>\n\n <et-query-devtools-drawer\n [sel]=\"host.eventSelectedQuery()\"\n [container]=\"panes\"\n (dismiss)=\"host.eventSelectedQueryId.set(null)\"\n />\n</div>\n","import { Component, computed, input, linkedSignal, output, signal, ViewEncapsulation } from '@angular/core';\nimport { applyQueryDevtoolsOverrides, createQueryDevtoolsOverrides } from '@ethlete/query';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\n\n/** Which editor the designed body is being changed through. */\ntype DesignerMode = 'design' | 'json';\n\n/**\n * The body editor of a designed mock: the value explorer's per-node override menu - presets,\n * fill-recursively, duplicate, pagination resize, paste, delete - pointed at a draft instead of at a live\n * response, so the same vocabulary that tampers with real data authors fake data.\n *\n * Edits accumulate as override ops and are flattened into a plain body on save, which is what makes\n * \"undo all\" free and keeps the stored mock a value rather than a recipe.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-mock-designer',\n templateUrl: './query-devtools-mock-designer.component.html',\n styleUrl: './query-devtools-mock-designer.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsJsonComponent],\n})\nexport class QueryDevtoolsMockDesignerComponent {\n /** The body the session starts from. Changing it restarts the session, dropping any unsaved edits. */\n public body = input<unknown>();\n\n /** The declared type of each field, as a seed from the API description produces it. */\n public annotations = input<ReadonlyMap<string, string> | null>(null);\n\n /** What the description had to guess or could not read, shown under the body it seeded. */\n public notes = input<readonly string[]>([]);\n\n public save = output<unknown>();\n public dismiss = output<void>();\n\n /** A fresh recorder per body, so reopening the designer never replays the last session's ops. */\n protected recorder = linkedSignal<unknown, ReturnType<typeof createQueryDevtoolsOverrides>>({\n source: () => this.body(),\n computation: () => createQueryDevtoolsOverrides(),\n });\n\n protected mode = signal<DesignerMode>('design');\n protected jsonError = signal<string | null>(null);\n\n protected editCount = computed(() => this.recorder().list().length);\n\n /** The body as it now reads: every armed op replayed against the one the session started from. */\n protected designed = computed(() => applyQueryDevtoolsOverrides(this.recorder().list(), this.body()).value);\n\n /** The raw editor's text, re-seeded from the designed body whenever that changes underneath it. */\n protected jsonDraft = linkedSignal(() => safeStringify(this.designed()));\n\n protected undoAll() {\n this.recorder().clearAll();\n this.jsonError.set(null);\n }\n\n /**\n * Leaving the raw editor carries whatever was typed there into the tree as one root-level edit, so the\n * two editors are two views of one draft rather than two drafts.\n */\n protected showDesign() {\n const text = this.jsonDraft();\n\n if (text !== safeStringify(this.designed())) {\n let value: unknown;\n\n try {\n value = JSON.parse(text || 'null');\n } catch (error) {\n this.jsonError.set(error instanceof Error ? error.message : String(error));\n\n return;\n }\n\n this.recorder().arm({ type: 'set', path: [], value });\n }\n\n this.mode.set('design');\n this.jsonError.set(null);\n }\n\n protected showJson() {\n this.mode.set('json');\n this.jsonError.set(null);\n }\n\n protected apply() {\n if (this.mode() === 'design') {\n this.save.emit(this.designed());\n\n return;\n }\n\n try {\n this.save.emit(JSON.parse(this.jsonDraft() || 'null'));\n } catch (error) {\n this.jsonError.set(error instanceof Error ? error.message : String(error));\n }\n }\n}\n\nconst safeStringify = (value: unknown) => {\n try {\n return JSON.stringify(value, null, 2) ?? 'null';\n } catch {\n return 'null';\n }\n};\n","<div class=\"et-query-devtools-designer\">\n <div class=\"et-query-devtools-designer-head\">\n <span class=\"et-query-devtools-section\">Body</span>\n <div class=\"et-query-devtools-designer-modes\">\n <button\n [attr.aria-pressed]=\"mode() === 'design'\"\n [class.et-query-devtools-btn--primary]=\"mode() === 'design'\"\n (click)=\"showDesign()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Edit field by field, with the same menu the value explorer tampers with a real response through\"\n >\n Design\n </button>\n <button\n [attr.aria-pressed]=\"mode() === 'json'\"\n [class.et-query-devtools-btn--primary]=\"mode() === 'json'\"\n (click)=\"showJson()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Edit the whole body as raw JSON\"\n >\n JSON\n </button>\n </div>\n @if (editCount()) {\n <span class=\"et-query-devtools-count\">{{ editCount() }} {{ editCount() === 1 ? 'edit' : 'edits' }}</span>\n <button (click)=\"undoAll()\" class=\"et-query-devtools-btn\" type=\"button\">Undo all</button>\n }\n </div>\n\n @if (mode() === 'design') {\n <div class=\"et-query-devtools-designer-tree\">\n <et-query-devtools-json [value]=\"designed()\" [overrides]=\"recorder()\" [annotations]=\"annotations()\" />\n </div>\n } @else {\n <textarea\n #jsonInput\n [value]=\"jsonDraft()\"\n (input)=\"jsonDraft.set(jsonInput.value)\"\n class=\"et-query-devtools-input et-query-devtools-mock-textarea\"\n rows=\"12\"\n spellcheck=\"false\"\n aria-label=\"The designed body as JSON\"\n ></textarea>\n }\n\n @if (jsonError(); as error) {\n <p class=\"et-query-devtools-settings-warn\">{{ error }}</p>\n }\n\n @if (notes().length) {\n <ul class=\"et-query-devtools-designer-notes\">\n @for (note of notes(); track note) {\n <li>{{ note }}</li>\n }\n </ul>\n }\n\n <div class=\"et-query-devtools-mock-head\">\n <button (click)=\"apply()\" class=\"et-query-devtools-btn et-query-devtools-btn--primary\" type=\"button\">Apply</button>\n <button (click)=\"dismiss.emit()\" class=\"et-query-devtools-btn\" type=\"button\">Cancel</button>\n </div>\n</div>\n","/**\n * How deep a designed body is walked before a nested value is inferred as an unconstrained schema. A\n * body nested deeper than this is not a shape anyone merges into a specification.\n */\nconst MAX_DEPTH = 10;\n\n/** An ISO date-time, strictly enough that nothing else is mistaken for one. */\nconst DATE_TIME = /^\\d{4}-\\d{2}-\\d{2}[Tt]\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?([Zz]|[+-]\\d{2}:\\d{2})$/;\n\nconst UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n\n/** One designed mock, as the export reads it. */\nexport type QueryDevtoolsOpenApiMock = {\n /** Which query client serves it - the operation's tag, since a document has no other place for it. */\n clientName: string;\n\n method: string;\n\n /** The route with its path params as `:name`; the document writes them as `{name}`. */\n pattern: string;\n\n /** Query parameters the mock declares, as a query string (`page=2&limit=10`). */\n query: string;\n\n status: number;\n\n body: unknown;\n\n /**\n * The named schema the body was seeded from. When the export carries that schema, the response\n * references it instead of an anonymous shape inferred from the body.\n */\n schemaName?: string | null;\n\n /** Set when the body came from a real response rather than being written by hand. */\n capturedAt?: number | null;\n};\n\nexport type BuildQueryDevtoolsOpenApiOptions = {\n mocks: readonly QueryDevtoolsOpenApiMock[];\n\n /**\n * Named schemas lifted out of the application's own API description, keyed as `components.schemas`\n * wants them - `collectQueryDevtoolsSchemaComponents` in `@ethlete/query` produces them.\n */\n schemas?: Record<string, unknown>;\n\n /** Wall-clock time of the export - passed in so the builder stays pure. */\n now: number;\n\n title?: string;\n};\n\n/** An OpenAPI 3.1 document, as far as this export writes one. */\nexport type QueryDevtoolsOpenApiDocument = {\n openapi: '3.1.0';\n info: { title: string; version: string; description: string };\n paths: Record<string, Record<string, unknown>>;\n components?: { schemas: Record<string, unknown> };\n};\n\nexport type QueryDevtoolsOpenApiExport<TDocument> = {\n document: TDocument;\n\n /** What had to be guessed or dropped, so the document is never taken for the contract. */\n notes: readonly string[];\n};\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n !!value && typeof value === 'object' && !Array.isArray(value);\n\n/** `/matches/:id` is how a mock writes a route; a document writes it `/matches/{id}`. */\nconst toBracePattern = (pattern: string) => pattern.replace(/:([^/]+)/g, '{$1}');\n\nconst pathParamsOf = (pattern: string) =>\n pattern\n .split('/')\n .filter((segment) => segment.startsWith(':'))\n .map((segment) => segment.slice(1));\n\n/**\n * The schema of one sample value. **Inferred from a single example**, so every property the example held\n * is listed as required, nothing is nullable, and a `null` carries no type at all - what the example\n * proves and not one claim more. The document's own description says so.\n */\nexport const inferQueryDevtoolsOpenApiSchema = (value: unknown, depth = 0): Record<string, unknown> => {\n if (depth >= MAX_DEPTH) return {};\n\n // One example cannot say what a null-valued property is when it holds something, so it says nothing.\n if (value === null || value === undefined) return {};\n\n switch (typeof value) {\n case 'string':\n if (DATE_TIME.test(value)) return { type: 'string', format: 'date-time' };\n if (UUID.test(value)) return { type: 'string', format: 'uuid' };\n\n return { type: 'string' };\n case 'number':\n if (!Number.isFinite(value)) return { type: 'number' };\n\n return { type: Number.isInteger(value) ? 'integer' : 'number' };\n case 'boolean':\n return { type: 'boolean' };\n default:\n break;\n }\n\n if (Array.isArray(value)) return { type: 'array', items: itemsOf(value, depth) };\n\n if (isPlainObject(value)) {\n const entries = Object.entries(value);\n\n if (!entries.length) return { type: 'object' };\n\n return {\n type: 'object',\n properties: Object.fromEntries(\n entries.map(([key, entry]) => [key, inferQueryDevtoolsOpenApiSchema(entry, depth + 1)]),\n ),\n required: entries.map(([key]) => key),\n };\n }\n\n return {};\n};\n\n/**\n * The element schema of an array: the one its members agree on, or a `oneOf` of the shapes they do not.\n * An empty array says nothing about its elements, so it constrains nothing.\n */\nconst itemsOf = (value: readonly unknown[], depth: number): Record<string, unknown> => {\n const members = new Map<string, Record<string, unknown>>();\n\n for (const entry of value) {\n const schema = inferQueryDevtoolsOpenApiSchema(entry, depth + 1);\n\n members.set(JSON.stringify(schema), schema);\n }\n\n const distinct = [...members.values()];\n\n if (!distinct.length) return {};\n if (distinct.length === 1) return distinct[0] as Record<string, unknown>;\n\n return { oneOf: distinct };\n};\n\n/** `page=2` is an integer and `draft=true` a boolean, the same reading the TypeScript snippet takes. */\nconst queryParamSchema = (value: string): Record<string, unknown> => {\n if (value === 'true' || value === 'false') return { type: 'boolean' };\n if (value !== '' && Number.isFinite(Number(value))) {\n return { type: Number.isInteger(Number(value)) ? 'integer' : 'number' };\n }\n\n return { type: 'string' };\n};\n\n/** `GET /posts/:id/comments` becomes `getPostsComments` - the verb, then every literal segment. */\nconst operationIdOf = (mock: Pick<QueryDevtoolsOpenApiMock, 'method' | 'pattern'>) => {\n const words = mock.pattern\n .split('/')\n .filter((segment) => segment && !segment.startsWith(':'))\n .flatMap((segment) => segment.split(/[^A-Za-z0-9]+/))\n .filter(Boolean);\n\n const name = [mock.method.toLowerCase(), ...words.map((word) => word[0]?.toUpperCase() + word.slice(1))].join('');\n\n return /^[A-Za-z_$]/.test(name) ? name : `operation${name}`;\n};\n\nconst parametersOf = (mocks: readonly QueryDevtoolsOpenApiMock[]) => {\n const first = mocks[0] as QueryDevtoolsOpenApiMock;\n const parameters: Record<string, unknown>[] = pathParamsOf(first.pattern).map((name) => ({\n name,\n in: 'path',\n required: true,\n schema: { type: 'string' },\n }));\n\n const seen = new Set<string>();\n\n for (const mock of mocks) {\n for (const [name, value] of new URLSearchParams(mock.query)) {\n if (seen.has(name)) continue;\n\n seen.add(name);\n // A mock declares what a request must carry for *it* to answer, which says nothing about whether\n // the endpoint requires it - so an exported query parameter is never marked required.\n parameters.push({ name, in: 'query', required: false, schema: queryParamSchema(value), example: value });\n }\n }\n\n return parameters;\n};\n\n/** A `?page=2` mock and a plain one are two examples of one response; the query string names them apart. */\nconst exampleNameOf = (mock: QueryDevtoolsOpenApiMock, taken: Set<string>) => {\n const base = mock.query || mock.clientName || 'designed';\n let name = base;\n\n for (let attempt = 2; taken.has(name); attempt++) name = `${base} (${attempt})`;\n\n taken.add(name);\n\n return name;\n};\n\nconst responseDescription = (mocks: readonly QueryDevtoolsOpenApiMock[], status: number) => {\n const clients = [...new Set(mocks.map((mock) => mock.clientName).filter(Boolean))];\n const served = clients.length ? ` served for ${clients.join(', ')}` : '';\n const captured = mocks.some((mock) => mock.capturedAt) ? ' Captured from a real response.' : '';\n\n return `${status >= 400 ? 'A designed failure' : 'The designed response'}${served}.${captured}`;\n};\n\ntype ResponseContext = {\n /** Named schemas the export carries, so a seeded response can reference one rather than infer it. */\n schemas: Record<string, unknown>;\n notes: Set<string>;\n};\n\nconst responseSchema = (mock: QueryDevtoolsOpenApiMock, ctx: ResponseContext): Record<string, unknown> => {\n const name = mock.schemaName;\n\n if (name && name in ctx.schemas) return { $ref: `#/components/schemas/${name}` };\n\n if (name) {\n ctx.notes.add(\n `${mock.method} ${mock.pattern} was seeded from ${name}, which is not in this export - its schema was inferred from the body instead.`,\n );\n }\n\n return inferQueryDevtoolsOpenApiSchema(mock.body);\n};\n\nconst responsesOf = (mocks: readonly QueryDevtoolsOpenApiMock[], ctx: ResponseContext) => {\n const byStatus = new Map<number, QueryDevtoolsOpenApiMock[]>();\n\n for (const mock of mocks) {\n const list = byStatus.get(mock.status);\n\n if (list) list.push(mock);\n else byStatus.set(mock.status, [mock]);\n }\n\n const responses: Record<string, unknown> = {};\n\n for (const [status, list] of [...byStatus.entries()].sort(([a], [b]) => a - b)) {\n const first = list[0] as QueryDevtoolsOpenApiMock;\n const schema = responseSchema(first, ctx);\n\n if (list.length > 1) {\n ctx.notes.add(\n `${first.method} ${first.pattern} has ${list.length} designed ${status} responses - the first one's schema was exported, and all of them as examples.`,\n );\n }\n\n const taken = new Set<string>();\n const examples =\n list.length === 1\n ? { example: first.body }\n : {\n examples: Object.fromEntries(\n list.map((mock) => [exampleNameOf(mock, taken), { value: mock.body }] as const),\n ),\n };\n\n responses[String(status)] = {\n description: responseDescription(list, status),\n content: { 'application/json': { schema, ...examples } },\n };\n }\n\n return responses;\n};\n\n/** The methods a designed request body would belong to, so the export says it does not have one. */\nconst SENDS_BODY: ReadonlySet<string> = /* @__PURE__ */ new Set(['POST', 'PUT', 'PATCH']);\n\nconst operationDescription = (mocks: readonly QueryDevtoolsOpenApiMock[], ctx: ResponseContext) => {\n const first = mocks[0] as QueryDevtoolsOpenApiMock;\n const named = mocks.map((mock) => mock.schemaName).find((name) => !!name && name in ctx.schemas);\n const lines = [\n named\n ? `The response is this description's own ${named}, which the mock was seeded from.`\n : \"The response schema was inferred from the designed body - see this document's description.\",\n ];\n\n if (SENDS_BODY.has(first.method.toUpperCase())) {\n lines.push('The devtools design a response only, so no request body is declared here.');\n }\n\n return lines.join(' ');\n};\n\nconst operationOf = (mocks: readonly QueryDevtoolsOpenApiMock[], ctx: ResponseContext) => {\n const first = mocks[0] as QueryDevtoolsOpenApiMock;\n const path = toBracePattern(first.pattern);\n const tags = [...new Set(mocks.map((mock) => mock.clientName).filter(Boolean))];\n const parameters = parametersOf(mocks);\n\n return {\n ...(tags.length ? { tags } : {}),\n summary: `Designed response for ${first.method.toUpperCase()} ${path}`,\n description: operationDescription(mocks, ctx),\n operationId: operationIdOf(first),\n ...(parameters.length ? { parameters } : {}),\n responses: responsesOf(mocks, ctx),\n };\n};\n\n/**\n * Groups mocks into `paths` entries - one path item per route, one operation per method, one response\n * per status. Operation ids are made unique inside the document, since two clients can serve one route.\n */\nconst pathsOf = (mocks: readonly QueryDevtoolsOpenApiMock[], ctx: ResponseContext) => {\n const groups = new Map<string, QueryDevtoolsOpenApiMock[]>();\n\n for (const mock of mocks) {\n const key = `${toBracePattern(mock.pattern)}|${mock.method.toLowerCase()}`;\n const group = groups.get(key);\n\n if (group) group.push(mock);\n else groups.set(key, [mock]);\n }\n\n const paths: Record<string, Record<string, unknown>> = {};\n const ids = new Set<string>();\n\n for (const group of groups.values()) {\n const first = group[0] as QueryDevtoolsOpenApiMock;\n const path = toBracePattern(first.pattern);\n const operation = operationOf(group, ctx);\n\n let id = operation.operationId;\n\n for (let attempt = 2; ids.has(id); attempt++) id = `${operation.operationId}${attempt}`;\n\n ids.add(id);\n paths[path] = { ...paths[path], [first.method.toLowerCase()]: { ...operation, operationId: id } };\n }\n\n return paths;\n};\n\nconst INFO_DESCRIPTION = /* @__PURE__ */ [\n 'Responses designed in the @ethlete/query devtools and served to the application in place of real requests.',\n '',\n 'Every schema here was inferred from one example, so it says what that example held and nothing more:',\n 'each property the example carried is listed as required, no property is marked nullable, and one whose',\n 'example was null carries no type at all. A route seeded from a named schema references that schema',\n 'instead, and the schema is copied in unchanged.',\n].join('\\n');\n\n/**\n * Builds an OpenAPI 3.1 document from a set of designed mocks - the response side of what the Insomnia\n * and cURL exports do for the request side, and the artefact an API team can merge.\n */\nexport const buildQueryDevtoolsOpenApiDocument = (\n options: BuildQueryDevtoolsOpenApiOptions,\n): QueryDevtoolsOpenApiExport<QueryDevtoolsOpenApiDocument> => {\n const ctx: ResponseContext = { schemas: options.schemas ?? {}, notes: new Set() };\n const paths = pathsOf(options.mocks, ctx);\n const used = referencedSchemas(paths, ctx.schemas);\n\n return {\n document: {\n openapi: '3.1.0',\n info: {\n title: options.title ?? 'Designed mocks',\n version: new Date(options.now).toISOString().slice(0, 10),\n description: INFO_DESCRIPTION,\n },\n paths,\n ...(Object.keys(used).length ? { components: { schemas: used } } : {}),\n },\n notes: [...ctx.notes],\n };\n};\n\n/**\n * Builds the `paths` entry for one mock, so a single route can be pasted under an existing document's\n * `paths`. A response seeded from a named schema keeps its `$ref`: the fragment is merged into the\n * description that declares it, so carrying a copy of the schema along would only conflict with it.\n */\nexport const buildQueryDevtoolsOpenApiPathItem = (\n options: Pick<BuildQueryDevtoolsOpenApiOptions, 'mocks' | 'schemas'>,\n): QueryDevtoolsOpenApiExport<Record<string, Record<string, unknown>>> => {\n const ctx: ResponseContext = { schemas: options.schemas ?? {}, notes: new Set() };\n const paths = pathsOf(options.mocks, ctx);\n // Only what the fragment itself points at: whatever declares those already resolves the rest.\n const referenced = [...collectRefNames(paths)].filter((name) => name in ctx.schemas);\n\n if (referenced.length) {\n ctx.notes.add(\n `This fragment references ${referenced.join(', ')} - paste it into the description that declares ${referenced.length > 1 ? 'them' : 'it'}.`,\n );\n }\n\n return { document: paths, notes: [...ctx.notes] };\n};\n\n/** Only the named schemas the exported paths actually reference, plus what those reference in turn. */\nconst referencedSchemas = (paths: unknown, schemas: Record<string, unknown>) => {\n const used: Record<string, unknown> = {};\n const pending = [...collectRefNames(paths)];\n\n while (pending.length) {\n const name = pending.shift() as string;\n\n if (name in used || !(name in schemas)) continue;\n\n used[name] = schemas[name];\n pending.push(...collectRefNames(schemas[name]));\n }\n\n return used;\n};\n\nconst REF_PREFIX = '#/components/schemas/';\n\nconst collectRefNames = (value: unknown, into = new Set<string>()) => {\n if (Array.isArray(value)) {\n for (const entry of value) collectRefNames(entry, into);\n\n return into;\n }\n\n if (!isPlainObject(value)) return into;\n\n for (const [key, entry] of Object.entries(value)) {\n if (key === '$ref' && typeof entry === 'string' && entry.startsWith(REF_PREFIX)) {\n into.add(entry.slice(REF_PREFIX.length));\n\n continue;\n }\n\n collectRefNames(entry, into);\n }\n\n return into;\n};\n","/**\n * How deep a sample is walked before a nested value is given up on as `unknown`. A body nested deeper\n * than this is not a type anyone pastes into their code.\n */\nconst MAX_DEPTH = 8;\n\nconst INDENT = ' ';\n\n/** A key that can be written bare in a type literal; anything else is quoted. */\nconst isSafeKey = (key: string) => /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(key);\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n !!value && typeof value === 'object' && !Array.isArray(value);\n\n/**\n * The TypeScript type of one sample value. **Inferred from a single example**, so it says what that\n * example held and nothing about what is optional or nullable - the snippet says so in a comment rather\n * than guessing.\n */\nexport const inferTypeScriptType = (value: unknown, depth = 0): string => {\n if (value === null) return 'null';\n if (depth >= MAX_DEPTH) return 'unknown';\n\n switch (typeof value) {\n case 'string':\n return 'string';\n case 'number':\n return 'number';\n case 'boolean':\n return 'boolean';\n default:\n break;\n }\n\n if (Array.isArray(value)) {\n const members = [...new Set(value.map((item) => inferTypeScriptType(item, depth + 1)))];\n\n if (!members.length) return 'unknown[]';\n if (members.length === 1) return `${members[0]}[]`;\n\n return `(${members.join(' | ')})[]`;\n }\n\n if (isPlainObject(value)) {\n const entries = Object.entries(value);\n\n if (!entries.length) return 'Record<string, unknown>';\n\n const pad = INDENT.repeat(depth + 1);\n const lines = entries.map(\n ([key, item]) => `${pad}${isSafeKey(key) ? key : JSON.stringify(key)}: ${inferTypeScriptType(item, depth + 1)};`,\n );\n\n return `{\\n${lines.join('\\n')}\\n${INDENT.repeat(depth)}}`;\n }\n\n return 'unknown';\n};\n\n/** The type a declared query-parameter value is written as - `page=2` is a number, `draft=true` a boolean. */\nconst queryParamType = (value: string) => {\n if (value === 'true' || value === 'false') return 'boolean';\n if (value !== '' && Number.isFinite(Number(value))) return 'number';\n\n return 'string';\n};\n\n/** `GET /posts/:id/comments` becomes `getPostsComments`: the verb, then every literal segment. */\nconst nameOf = (method: string, pattern: string) => {\n const words = pattern\n .split('/')\n .filter((segment) => segment && !segment.startsWith(':'))\n .flatMap((segment) => segment.split(/[^A-Za-z0-9]+/))\n .filter(Boolean);\n\n const parts = [method.toLowerCase(), ...words.map((word) => word[0]?.toUpperCase() + word.slice(1))];\n const name = parts.join('');\n\n return /^[A-Za-z_$]/.test(name) ? name : `query${name}`;\n};\n\nconst pascal = (name: string) => name[0]?.toUpperCase() + name.slice(1);\n\n/** The route as a creator takes it: a template literal function when the path has params, else the path. */\nconst routeOf = (pattern: string, params: string[]) => {\n if (!params.length) return `'${pattern}'`;\n\n const interpolated = pattern\n .split('/')\n .map((segment) => (segment.startsWith(':') ? `\\${p.${segment.slice(1)}}` : segment))\n .join('/');\n\n return `(p) => \\`${interpolated}\\``;\n};\n\nexport type QueryDefinitionSnippetOptions = {\n method: string;\n\n /** The route with its path params as `:name`. */\n pattern: string;\n\n /** Query parameters as a query string (`page=2&limit=10`), or empty for none. */\n query: string;\n\n /** A sample response the types are inferred from. */\n body: unknown;\n};\n\n/**\n * A pasteable `@ethlete/query` definition for one route: the response type inferred from a sample body,\n * the `TArgs` contract (path params, query params) and the creator call.\n *\n * The types come from one example, so everything in it reads as required and non-nullable. The snippet\n * says that in a comment rather than pretending otherwise.\n */\nexport const buildQueryDefinitionSnippet = (options: QueryDefinitionSnippetOptions) => {\n const { method, pattern, query, body } = options;\n\n const name = nameOf(method, pattern);\n const typeName = pascal(name);\n const params = pattern\n .split('/')\n .filter((segment) => segment.startsWith(':'))\n .map((segment) => segment.slice(1));\n\n const queryParams = [...new URLSearchParams(query)];\n\n const argFields = [`${INDENT}response: ${typeName}Response;`];\n\n if (params.length) {\n argFields.push(`${INDENT}pathParams: { ${params.map((param) => `${param}: string`).join('; ')} };`);\n }\n\n if (queryParams.length) {\n const fields = queryParams.map(([key, value]) => `${key}: ${queryParamType(value)}`).join('; ');\n argFields.push(`${INDENT}queryParams: { ${fields} };`);\n }\n\n const factory = `${method.toLowerCase()}Query`;\n\n return [\n `// Inferred from one example: every field reads as required and non-nullable.`,\n `// \\`${factory}\\` is \\`create${pascal(method.toLowerCase())}Query(client)\\`.`,\n `type ${typeName}Response = ${inferTypeScriptType(body)};`,\n ``,\n `type ${typeName}QueryArgs = {`,\n ...argFields,\n `};`,\n ``,\n `export const ${name} = ${factory}<${typeName}QueryArgs>(${routeOf(pattern, params)});`,\n ``,\n ].join('\\n');\n};\n","/**\n * The slice of YAML a generated OpenAPI document needs: block mappings, block sequences, and scalars\n * that are either plain or double-quoted. JSON is a subset of YAML, so this writes the same tree the\n * JSON export writes - it is a second spelling of one document, not a second document.\n */\n\nconst INDENT = ' ';\n\n/** How deep the tree is written before a branch is given up on, so a cyclic body cannot spin forever. */\nconst MAX_DEPTH = 64;\n\n/**\n * A scalar YAML would read back as this exact string: it starts with a letter, `_` or `$`, so nothing\n * numeric or date-shaped gets through, and it holds none of `:#,[]{}&*!|>'\"%@\\`` that starts a construct.\n */\nconst PLAIN = /^[A-Za-z_$][A-Za-z0-9_$ ./+-]*$/;\n\n/** Words YAML 1.1 readers still take for booleans or null, whatever case they are written in. */\nconst RESERVED: ReadonlySet<string> = /* @__PURE__ */ new Set([\n 'true',\n 'false',\n 'null',\n 'yes',\n 'no',\n 'on',\n 'off',\n 'y',\n 'n',\n]);\n\nconst isPlainSafe = (value: string) => PLAIN.test(value) && !value.endsWith(' ') && !RESERVED.has(value.toLowerCase());\n\n/**\n * Whether a multi-line string can be written as a `|-` block. A line starting with a space would need an\n * explicit indentation indicator, and a trailing newline or a `\\r` would not survive the round trip, so\n * those fall back to one quoted line.\n */\nconst isBlockSafe = (value: string) =>\n value.includes('\\n') &&\n !value.endsWith('\\n') &&\n !/[\\r\\t]/.test(value) &&\n value.split('\\n').every((line) => !line.startsWith(' ') && !line.endsWith(' '));\n\nconst blockScalar = (value: string, indent: string) =>\n `|-\\n${value\n .split('\\n')\n .map((line) => (line ? `${indent}${line}` : ''))\n .join('\\n')}`;\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n !!value && typeof value === 'object' && !Array.isArray(value);\n\n/** A scalar, or `null` when the value is one of the containers {@link write} handles itself. */\nconst scalarOf = (value: unknown, indent: string): string | null => {\n if (value === null || value === undefined) return 'null';\n\n switch (typeof value) {\n case 'boolean':\n return value ? 'true' : 'false';\n case 'number':\n // `JSON.stringify` writes a non-finite number as `null`; both exports agree on that rather than\n // one of them emitting YAML's `.nan`, which no JSON reader takes back.\n return Number.isFinite(value) ? String(value) : 'null';\n case 'string':\n if (isBlockSafe(value)) return blockScalar(value, indent);\n\n return isPlainSafe(value) ? value : JSON.stringify(value);\n default:\n break;\n }\n\n if (Array.isArray(value) || isPlainObject(value)) return null;\n\n return 'null';\n};\n\nconst write = (value: unknown, depth: number): string => {\n const indent = INDENT.repeat(depth);\n const scalar = scalarOf(value, indent);\n\n if (scalar !== null) return scalar;\n\n if (depth >= MAX_DEPTH) return 'null';\n\n if (Array.isArray(value)) {\n if (!value.length) return '[]';\n\n return `\\n${value\n .map((entry) => {\n const written = write(entry, depth + 1);\n\n // A container under a `-` continues on the dash line: the `- ` occupies the first two columns of\n // its child's own indentation, so the child's first line has to shed exactly that much.\n return `${indent}- ${written.startsWith('\\n') ? written.slice(depth * 2 + INDENT.length + 1) : written}`;\n })\n .join('\\n')}`;\n }\n\n const entries = Object.entries(value as Record<string, unknown>).filter(([, entry]) => entry !== undefined);\n\n if (!entries.length) return '{}';\n\n return `\\n${entries\n .map(([key, entry]) => {\n const written = write(entry, depth + 1);\n // A block already leads with its own newline; only a scalar needs the space after the colon.\n const rendered = written.startsWith('\\n') ? written : ` ${written}`;\n\n return `${indent}${isPlainSafe(key) ? key : JSON.stringify(key)}:${rendered}`;\n })\n .join('\\n')}`;\n};\n\n/**\n * Writes a JSON-shaped tree as YAML. `undefined` members are dropped the way `JSON.stringify` drops\n * them; anything that is not a plain object, array or primitive is written as `null`.\n */\nexport const toQueryDevtoolsYaml = (value: unknown) => `${write(value, 0).replace(/^\\n/, '')}\\n`;\n","import { Component, computed, effect, signal, ViewEncapsulation } from '@angular/core';\nimport { SelectComponent, SelectOptionData, SelectSearchDirective } from '@ethlete/components';\nimport { copyToClipboard } from '@ethlete/core';\nimport {\n armAllQueryDevtoolsMocks,\n armQueryDevtoolsMock,\n clearQueryDevtoolsArmedMocks,\n collectQueryDevtoolsSchemaComponents,\n deleteQueryDevtoolsMock,\n loadQueryDevtoolsSchema,\n measureQueryDevtoolsPayload,\n QueryDevtoolsEntry,\n QueryDevtoolsMock,\n queryDevtoolsArmedMocks,\n queryDevtoolsMockId,\n queryDevtoolsMocks,\n queryDevtoolsSchemaNames,\n queryDevtoolsSchemaRoutes,\n queryDevtoolsSchemaState,\n QueryDevtoolsSchemaSeed,\n QueryDevtoolsSeedStyle,\n saveQueryDevtoolsMock,\n seedQueryDevtoolsSchemaBody,\n seedQueryDevtoolsSchemaRoute,\n} from '@ethlete/query';\nimport { tap } from 'rxjs';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsMockDesignerComponent } from './query-devtools-mock-designer.component';\nimport { buildQueryDevtoolsOpenApiDocument, buildQueryDevtoolsOpenApiPathItem } from './query-devtools-openapi';\nimport { buildQueryDefinitionSnippet } from './query-devtools-typescript';\nimport { AnyQuery } from './query-devtools-types';\nimport { toQueryDevtoolsYaml } from './query-devtools-yaml';\n\n/** A designed mock as the list renders it: the stored mock plus what only the live registry knows. */\ntype MockRow = {\n mock: QueryDevtoolsMock;\n armed: boolean;\n\n /** Serialized size of the body, so a library that is about to hit a quota reads as one. */\n bytes: number;\n\n /**\n * Whether a live query on this route authenticates. A mock replaces the request, so the interceptor\n * chain never runs and the token flow is not exercised - which has to be visible on the row.\n */\n isSecure: boolean;\n};\n\n/** A live query whose last response can be captured as the seed of a mock. */\ntype CaptureRow = {\n entry: QueryDevtoolsEntry;\n clientName: string;\n method: string;\n pattern: string;\n bytes: number;\n\n /** Whether the library already holds a mock for this route, so the button says `Re-capture`. */\n exists: boolean;\n\n /** How many other live queries share this route, since a mock answers the route rather than a query. */\n shared: number;\n};\n\n/** The new-mock form's fields, as text - a body is JSON only once it parses. */\ntype MockDraft = {\n clientName: string;\n method: string;\n pattern: string;\n query: string;\n status: string;\n latencyMs: string;\n body: string;\n};\n\nconst METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS'];\n\n/** What a seeded body was generated from, so changing the style can re-roll it without asking again. */\ntype SeedSource = { kind: 'route'; method: string; pattern: string } | { kind: 'schema'; name: string };\n\nconst SEED_STYLES: { value: QueryDevtoolsSeedStyle; label: string; hint: string }[] = [\n {\n value: 'placeholder',\n label: 'Placeholder values',\n hint: 'Every field named after itself - a body nobody mistakes for real data.',\n },\n {\n value: 'realistic',\n label: 'Realistic values',\n hint: 'Varied sample values, and array elements generated one by one - a list of three different rows.',\n },\n {\n value: 'stress',\n label: 'Stress values',\n hint: 'Long text, unbreakable words, unicode and huge numbers - what a layout breaks on. Declared formats, enums and bounds are still honoured.',\n },\n];\n\n/** Which spelling of the exported document is written - the same tree either way. */\ntype SpecFormat = 'yaml' | 'json';\n\nconst SPEC_FORMATS: { value: SpecFormat; label: string }[] = [\n { value: 'yaml', label: 'YAML' },\n { value: 'json', label: 'JSON' },\n];\n\nconst SPEC_MEDIA_TYPES: Record<SpecFormat, string> = {\n yaml: 'application/yaml',\n json: 'application/json',\n};\n\nconst EMPTY_DRAFT: MockDraft = {\n clientName: '',\n method: 'GET',\n pattern: '',\n query: '',\n status: '200',\n latencyMs: '0',\n body: '{}',\n};\n\n/**\n * A mock matches on method + path, and every GraphQL query POSTs the same route - so one armed for a\n * `GQL QUERY` would either match nothing or answer every operation on the endpoint. Matching a document\n * is its own feature; until then GraphQL queries are left out of the capture list rather than offered as\n * something that silently does not fire.\n */\nconst isMockableMethod = (method: string) => !method.includes(' ');\n\n/**\n * The Mocks tab: responses served in place of a request, either designed by hand for a route nothing has\n * ever called or captured from one that has. The library is persisted; whether a mock is armed is not, so\n * a reload always stops serving them.\n */\n@Component({\n selector: 'et-query-devtools-mocks-tab',\n templateUrl: './query-devtools-mocks-tab.component.html',\n styleUrl: './query-devtools-mocks-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsMockDesignerComponent, SelectComponent, SelectSearchDirective],\n})\nexport class QueryDevtoolsMocksTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n protected readonly ARM_ALL = armAllQueryDevtoolsMocks;\n protected readonly DISARM_ALL = clearQueryDevtoolsArmedMocks;\n protected readonly METHODS = METHODS;\n protected readonly SPEC_FORMATS = SPEC_FORMATS;\n protected readonly SEED_STYLES = SEED_STYLES;\n\n /** The new-mock form, or `null` while it is closed. */\n protected draft = signal<MockDraft | null>(null);\n\n /** Which client the form is designing for - every description below is that client's, not the app's. */\n private draftClient = computed(() => this.draft()?.clientName ?? '');\n\n private schemaNames = computed(() => queryDevtoolsSchemaNames(this.draftClient()));\n private schemaRoutes = computed(() => queryDevtoolsSchemaRoutes(this.draftClient()));\n\n /**\n * A description declares hundreds of routes and named types, so both pickers are handed their options\n * as data: the select then windows the rows and filters the full set from its own search box.\n */\n protected routeOptions = computed<SelectOptionData[]>(() =>\n this.schemaRoutes().map((route) => {\n const target = `${route.method} ${route.pattern}`;\n\n return { value: target, label: route.summary ? `${target} — ${route.summary}` : target };\n }),\n );\n\n protected schemaNameOptions = computed<SelectOptionData[]>(() =>\n this.schemaNames().map((name) => ({ value: name, label: name })),\n );\n\n private schemaState = computed(() => queryDevtoolsSchemaState(this.draftClient()));\n\n /** Whether the application handed this client's API description in - nothing below shows without one. */\n protected hasSchema = computed(() => this.schemaState().status !== 'unavailable');\n protected isSchemaReady = computed(() => this.schemaState().status === 'ready');\n\n protected schemaError = computed(() => {\n const state = this.schemaState();\n\n return state.status === 'error' ? state.message : null;\n });\n\n protected draftError = signal<string | null>(null);\n\n /** What the description said about the draft's body, kept so the designer can label its fields. */\n protected draftSeed = signal<QueryDevtoolsSchemaSeed | null>(null);\n\n /** How lifelike the next seed comes out. The shape is the description's either way. */\n protected seedStyle = signal<QueryDevtoolsSeedStyle>('placeholder');\n\n private seedSource = signal<SeedSource | null>(null);\n\n protected seedStyleHint = computed(() => SEED_STYLES.find((style) => style.value === this.seedStyle())?.hint ?? '');\n\n /** The named schema picked in the form, which is not the same thing as the one a body came from. */\n protected pickedSchema = signal('');\n\n /**\n * The type annotations of each seeded body, by mock id. A mock only stores the *name* it was seeded\n * from, so this is what labels a body the description could not name - for as long as the panel is open.\n */\n private seededTypes = signal<Record<string, ReadonlyMap<string, string>>>({});\n\n /** The mock whose body is open in the designer. */\n protected editingId = signal<string | null>(null);\n\n /** The mock whose definition was last copied, so the button can confirm it. */\n protected copiedId = signal<string | null>(null);\n\n /** The mock whose path item was last copied - a second button needs its own confirmation. */\n protected copiedSpecId = signal<string | null>(null);\n\n /** Which spelling the OpenAPI export is written in. YAML is what a specification repository takes. */\n protected specFormat = signal<SpecFormat>('yaml');\n\n /** What the last export had to guess or could not resolve, shown under the library it came from. */\n protected specNotes = signal<readonly string[]>([]);\n\n protected rows = computed<MockRow[]>(() => {\n const armed = queryDevtoolsArmedMocks();\n const entries = this.host.queryEntries();\n\n return queryDevtoolsMocks().map((mock) => ({\n mock,\n armed: armed.has(mock.id),\n bytes: measureQueryDevtoolsPayload({ body: mock.body }).bytes,\n isSecure: entries.some((entry) => !!entry.meta.isSecure && this.idOf(entry) === mock.id),\n }));\n });\n\n protected armedCount = computed(() => this.rows().filter((row) => row.armed).length);\n\n private editingRow = computed(() => this.rows().find((row) => row.mock.id === this.editingId()) ?? null);\n\n /**\n * What to label the open body's fields with: the seed it was authored from this session, or - after a\n * reload - the schema the mock remembers being seeded from.\n */\n protected editingAnnotations = computed(() => {\n const row = this.editingRow();\n\n if (!row) return null;\n\n const seeded = this.seededTypes()[row.mock.id];\n\n if (seeded) return seeded;\n\n const name = row.mock.schemaName;\n\n return name ? (seedQueryDevtoolsSchemaBody(row.mock.clientName, name)?.types ?? null) : null;\n });\n\n /**\n * Every route a live response can seed a mock from - one row per route, not per query: several queries\n * on the same route would all capture into the same mock, so listing each of them offers the same\n * button three times.\n */\n protected captureRows = computed<CaptureRow[]>(() => {\n const known = new Set(queryDevtoolsMocks().map((mock) => mock.id));\n const rows = new Map<string, CaptureRow>();\n\n for (const entry of this.host.queryEntries()) {\n if (entry.destroyedAt || !entry.meta.route) continue;\n if (!isMockableMethod(entry.meta.method ?? 'GET')) continue;\n if ((entry.handle as AnyQuery).response() === null) continue;\n\n const id = this.idOf(entry);\n const existing = rows.get(id);\n\n if (existing) {\n existing.shared++;\n\n continue;\n }\n\n rows.set(id, {\n entry,\n clientName: entry.meta.clientName ?? '',\n method: entry.meta.method ?? 'GET',\n pattern: entry.meta.route ?? '',\n bytes: measureQueryDevtoolsPayload({ body: (entry.handle as AnyQuery).response() }).bytes,\n exists: known.has(id),\n shared: 1,\n });\n }\n\n return [...rows.values()];\n });\n\n constructor() {\n // A description is only worth fetching once someone is designing a mock against that client, so an\n // application that hands several in still ships each as its own lazy chunk, loaded one at a time.\n effect(() => {\n const client = this.draftClient() || this.editingRow()?.mock.clientName;\n\n if (client) loadQueryDevtoolsSchema(client);\n });\n }\n\n protected openDraft() {\n this.draftError.set(null);\n this.draftSeed.set(null);\n this.seedSource.set(null);\n this.draft.set({ ...EMPTY_DRAFT, clientName: this.host.clientNames()[0] ?? '' });\n }\n\n protected closeDraft() {\n this.draft.set(null);\n this.draftError.set(null);\n this.draftSeed.set(null);\n this.seedSource.set(null);\n }\n\n protected patchDraft(patch: Partial<MockDraft>) {\n this.draft.update((current) => (current ? { ...current, ...patch } : current));\n }\n\n /** Switches which API the form is designing against, dropping what the previous one's seed named. */\n protected pickClient(clientName: string) {\n this.patchDraft({ clientName });\n this.pickedSchema.set('');\n this.seedSource.set(null);\n this.draftSeed.set(null);\n this.draftError.set(null);\n }\n\n /** Fills the form from a route the description declares, whether or not the app has ever called it. */\n protected pickRoute(value: unknown) {\n const [method, pattern] = typeof value === 'string' ? value.split(' ') : [];\n\n if (!method || !pattern) return;\n\n this.patchDraft({ method, pattern });\n this.seedFromRoute({ method, pattern });\n }\n\n /** Seeds the body from the description's success response for the route the form names. */\n protected seedFromDraftRoute() {\n const draft = this.draft();\n\n if (draft) this.seedFromRoute({ method: draft.method, pattern: draft.pattern.trim() });\n }\n\n protected pickSchema(value: unknown) {\n this.pickedSchema.set(typeof value === 'string' ? value : '');\n }\n\n /** Seeds the body from one named schema, so a route the description does not declare still starts real. */\n protected seedFromSchema() {\n const name = this.pickedSchema();\n\n if (!name) return;\n\n this.applySeed({ kind: 'schema', name });\n }\n\n /** Re-rolls whatever the body was seeded from, so the picked style is what the form already shows. */\n protected pickSeedStyle(value: string) {\n const style = SEED_STYLES.find((entry) => entry.value === value);\n\n if (!style) return;\n\n this.seedStyle.set(style.value);\n\n const source = this.seedSource();\n\n if (source) this.applySeed(source);\n }\n\n /**\n * Saves the form as a designed mock and opens the designer on it. Nothing is checked against the\n * registry - a route no query has ever called is the point - only that the path is a path and the body\n * is JSON.\n */\n protected saveDraft() {\n const draft = this.draft();\n\n if (!draft) return;\n\n const pattern = draft.pattern.trim();\n\n if (!pattern.startsWith('/')) {\n this.draftError.set('The path has to start with a \"/\" — it is matched against the request path.');\n\n return;\n }\n\n let body: unknown;\n\n try {\n body = JSON.parse(draft.body || 'null');\n } catch (error) {\n this.draftError.set(error instanceof Error ? error.message : String(error));\n\n return;\n }\n\n const identity = {\n clientName: draft.clientName,\n method: draft.method,\n pattern,\n query: draft.query.trim().replace(/^\\?/, ''),\n };\n\n const id = queryDevtoolsMockId(identity);\n const seed = this.draftSeed();\n\n saveQueryDevtoolsMock({\n ...identity,\n id,\n status: this.countOf(draft.status, 200),\n latencyMs: this.countOf(draft.latencyMs, 0),\n body,\n capturedAt: null,\n schemaName: seed?.schemaName ?? null,\n });\n\n if (seed) this.seededTypes.update((current) => ({ ...current, [id]: seed.types }));\n\n this.closeDraft();\n this.editingId.set(id);\n }\n\n /** Captures the query's current response as a designed mock, replacing an earlier capture of the route. */\n protected capture(row: CaptureRow) {\n saveQueryDevtoolsMock({\n id: this.idOf(row.entry),\n clientName: row.clientName,\n method: row.method,\n pattern: row.pattern,\n query: '',\n status: 200,\n body: (row.entry.handle as AnyQuery).response(),\n latencyMs: 0,\n capturedAt: Date.now(),\n });\n }\n\n protected pickSpecFormat(value: string) {\n const format = SPEC_FORMATS.find((entry) => entry.value === value);\n\n if (format) this.specFormat.set(format.value);\n }\n\n protected toggleArmed(row: MockRow) {\n armQueryDevtoolsMock(row.mock.id, !row.armed);\n }\n\n protected remove(row: MockRow) {\n deleteQueryDevtoolsMock(row.mock.id);\n }\n\n protected setStatus(row: MockRow, value: string) {\n saveQueryDevtoolsMock({ ...row.mock, status: this.countOf(value, row.mock.status) });\n }\n\n protected setLatency(row: MockRow, value: string) {\n saveQueryDevtoolsMock({ ...row.mock, latencyMs: this.countOf(value, row.mock.latencyMs) });\n }\n\n /**\n * Copies the route as a `@ethlete/query` definition - the response type inferred from the designed body,\n * the args contract and the creator call - so a mocked route can be pasted into the app it was designed\n * for.\n */\n protected copyDefinition(row: MockRow) {\n const snippet = buildQueryDefinitionSnippet({\n method: row.mock.method,\n pattern: row.mock.pattern,\n query: row.mock.query,\n body: row.mock.body,\n });\n\n copyToClipboard(snippet)\n .pipe(tap((ok) => this.copiedId.set(ok ? row.mock.id : null)))\n .subscribe();\n }\n\n /**\n * Copies one route as an OpenAPI `paths` entry, ready to be pasted under an existing description's\n * `paths`. A route seeded from a named schema keeps its `$ref`, since it is merged back into the\n * document that declares it.\n */\n protected copyPathItem(row: MockRow) {\n const schemas = this.schemasFor([row.mock]);\n const built = buildQueryDevtoolsOpenApiPathItem({ mocks: [row.mock], schemas: schemas.schemas });\n\n this.specNotes.set([...schemas.notes, ...built.notes]);\n\n copyToClipboard(this.write(built.document))\n .pipe(tap((ok) => this.copiedSpecId.set(ok ? row.mock.id : null)))\n .subscribe();\n }\n\n /**\n * Downloads the whole library as one OpenAPI 3.1 document - the deliverable the API team merges. Every\n * designed mock is in it, armed or not: the library is the design work, and arming is only what this\n * page load happens to be serving.\n */\n protected exportLibrary() {\n const mocks = this.rows().map((row) => row.mock);\n\n if (!mocks.length) return;\n\n const schemas = this.schemasFor(mocks);\n const built = buildQueryDevtoolsOpenApiDocument({ mocks, schemas: schemas.schemas, now: Date.now() });\n const format = this.specFormat();\n\n this.specNotes.set([...schemas.notes, ...built.notes]);\n this.host.downloadTextFile({\n name: `openapi-designed-mocks-${new Date().toISOString().slice(0, 10)}.${format}`,\n content: this.write(built.document),\n type: SPEC_MEDIA_TYPES[format],\n });\n }\n\n protected editBody(row: MockRow) {\n this.editingId.set(row.mock.id);\n }\n\n protected cancelBody() {\n this.editingId.set(null);\n }\n\n protected saveBody(row: MockRow, body: unknown) {\n saveQueryDevtoolsMock({ ...row.mock, body });\n this.cancelBody();\n }\n\n /**\n * The declared schemas the given mocks were seeded from, so their responses can reference them. Each\n * client is asked its own description, and a name two of them both declare keeps the first - one\n * exported document cannot hold two `MatchView`s.\n */\n private schemasFor(mocks: readonly QueryDevtoolsMock[]) {\n const byClient = new Map<string, Set<string>>();\n\n for (const mock of mocks) {\n if (!mock.schemaName) continue;\n\n const names = byClient.get(mock.clientName) ?? new Set<string>();\n\n names.add(mock.schemaName);\n byClient.set(mock.clientName, names);\n }\n\n const schemas: Record<string, unknown> = {};\n const notes = new Set<string>();\n const owners = new Map<string, string>();\n\n for (const [clientName, names] of byClient) {\n const collected = collectQueryDevtoolsSchemaComponents(clientName, [...names]);\n\n for (const note of collected.notes) notes.add(note);\n\n for (const [name, schema] of Object.entries(collected.schemas)) {\n const owner = owners.get(name);\n\n if (owner !== undefined) {\n if (JSON.stringify(schemas[name]) !== JSON.stringify(schema)) {\n notes.add(`${name} is declared by both ${owner} and ${clientName} - the one from ${owner} was kept.`);\n }\n\n continue;\n }\n\n owners.set(name, clientName);\n schemas[name] = schema;\n }\n }\n\n return { schemas, notes: [...notes] };\n }\n\n private write(document: unknown) {\n if (this.specFormat() === 'yaml') return toQueryDevtoolsYaml(document);\n\n return `${JSON.stringify(document, null, 2)}\\n`;\n }\n\n private seedFromRoute(target: { method: string; pattern: string }) {\n if (!target.pattern) {\n this.draftError.set('Name the path first - the seed comes from what the description says it returns.');\n\n return;\n }\n\n this.applySeed({ kind: 'route', ...target });\n }\n\n private applySeed(source: SeedSource) {\n const style = this.seedStyle();\n const client = this.draftClient();\n const seed =\n source.kind === 'schema'\n ? seedQueryDevtoolsSchemaBody(client, source.name, style)\n : seedQueryDevtoolsSchemaRoute({ clientName: client, method: source.method, pattern: source.pattern }, style);\n\n if (!seed) {\n this.draftSeed.set(null);\n this.seedSource.set(null);\n this.draftError.set(\n source.kind === 'schema'\n ? `The description does not name ${source.name}.`\n : `The description declares no JSON response for ${source.method} ${source.pattern}.`,\n );\n\n return;\n }\n\n this.seedSource.set(source);\n this.draftSeed.set(seed);\n this.draftError.set(null);\n this.patchDraft({ body: JSON.stringify(seed.body, null, 2) });\n }\n\n private countOf(value: string, fallback: number) {\n const count = Math.trunc(Number(value));\n\n return Number.isFinite(count) ? count : fallback;\n }\n\n private idOf(entry: QueryDevtoolsEntry) {\n return queryDevtoolsMockId({\n clientName: entry.meta.clientName ?? '',\n method: entry.meta.method ?? 'GET',\n pattern: entry.meta.route ?? '',\n });\n }\n}\n","<div class=\"et-query-devtools-scroll\">\n <div class=\"et-query-devtools-toolbar et-query-devtools-mocks-toolbar\">\n <p class=\"et-query-devtools-hint\">\n A mock replaces the request, so it answers a route that has never run - or does not exist yet. It bypasses the\n interceptor chain by construction, so a mocked secure route never exercises the token flow. The library is kept;\n whether a mock is <strong>armed</strong> is not, so a reload always stops serving them. GraphQL queries are not\n offered: they all POST one route, so matching them needs the document rather than the path.\n </p>\n <div class=\"et-query-devtools-settings-controls\">\n @if (rows().length && armedCount() < rows().length) {\n <button\n (click)=\"ARM_ALL()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Serve every mock in the library - the whole screen off the network at once\"\n >\n Arm all ({{ rows().length }})\n </button>\n }\n @if (armedCount()) {\n <button (click)=\"DISARM_ALL()\" class=\"et-query-devtools-btn\" type=\"button\">\n Disarm all ({{ armedCount() }})\n </button>\n }\n <button (click)=\"openDraft()\" class=\"et-query-devtools-btn et-query-devtools-btn--primary\" type=\"button\">\n <span aria-hidden=\"true\">+</span>\n New mock\n </button>\n </div>\n </div>\n\n @if (draft(); as form) {\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>New mock</strong>\n <span class=\"et-query-devtools-count\">for any route, whether a query has ever called it or not</span>\n </div>\n\n <div class=\"et-query-devtools-mock-fields\">\n <label class=\"et-query-devtools-field\">\n <span>Client</span>\n <select #clientSelect (change)=\"pickClient(clientSelect.value)\" class=\"et-query-devtools-select\">\n @for (name of host.clientNames(); track name) {\n <option [value]=\"name\" [selected]=\"name === form.clientName\">{{ name }}</option>\n }\n </select>\n <small>a mock answers one client, matched by name</small>\n </label>\n\n <label class=\"et-query-devtools-field\">\n <span>Method</span>\n <select #methodSelect (change)=\"patchDraft({ method: methodSelect.value })\" class=\"et-query-devtools-select\">\n @for (method of METHODS; track method) {\n <option [value]=\"method\" [selected]=\"method === form.method\">{{ method }}</option>\n }\n </select>\n <small>matched exactly</small>\n </label>\n\n <label class=\"et-query-devtools-field et-query-devtools-field--wide\">\n <span>Path</span>\n <input\n #patternInput\n [value]=\"form.pattern\"\n (input)=\"patchDraft({ pattern: patternInput.value })\"\n class=\"et-query-devtools-input\"\n type=\"text\"\n placeholder=\"/posts/:id/comments\"\n />\n <small><code>:name</code> matches any one segment, so the route is mocked rather than one URL</small>\n </label>\n\n <label class=\"et-query-devtools-field et-query-devtools-field--wide\">\n <span>Query</span>\n <input\n #queryInput\n [value]=\"form.query\"\n (input)=\"patchDraft({ query: queryInput.value })\"\n class=\"et-query-devtools-input\"\n type=\"text\"\n placeholder=\"page=2&limit=10\"\n />\n <small>\n parameters the request must carry; anything else it asks for is ignored. Empty answers whatever the query\n string is - and a mock naming parameters wins over one that does not\n </small>\n </label>\n\n <label class=\"et-query-devtools-field\">\n <span>Status</span>\n <input\n #statusDraftInput\n [value]=\"form.status\"\n (input)=\"patchDraft({ status: statusDraftInput.value })\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"100\"\n max=\"599\"\n step=\"1\"\n />\n <small>400 and above arrive as a real error</small>\n </label>\n\n <label class=\"et-query-devtools-field\">\n <span>Latency</span>\n <input\n #latencyDraftInput\n [value]=\"form.latencyMs\"\n (input)=\"patchDraft({ latencyMs: latencyDraftInput.value })\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"0\"\n max=\"60000\"\n step=\"100\"\n />\n <small>ms before it settles</small>\n </label>\n </div>\n\n @if (hasSchema()) {\n <div class=\"et-query-devtools-seed\">\n <span class=\"et-query-devtools-section\">Seed</span>\n @if (isSchemaReady()) {\n <div class=\"et-query-devtools-seed-pick\">\n <et-select\n [options]=\"routeOptions()\"\n (pickOption)=\"pickRoute($event)\"\n class=\"et-query-devtools-combobox\"\n mirrorPanelWidth=\"false\"\n pickOnly\n >\n <input etSelectSearch placeholder=\"search the routes it declares…\" />\n </et-select>\n <button\n (click)=\"seedFromDraftRoute()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Generate a body from what the description says this path returns\"\n >\n From this path\n </button>\n </div>\n <div class=\"et-query-devtools-seed-pick\">\n <et-select\n [value]=\"pickedSchema()\"\n [options]=\"schemaNameOptions()\"\n (valueChange)=\"pickSchema($event)\"\n class=\"et-query-devtools-combobox\"\n mirrorPanelWidth=\"false\"\n >\n <input etSelectSearch placeholder=\"search its named types…\" />\n </et-select>\n <button\n [disabled]=\"!pickedSchema()\"\n (click)=\"seedFromSchema()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n From this type\n </button>\n </div>\n <select\n #stylePick\n (change)=\"pickSeedStyle(stylePick.value)\"\n class=\"et-query-devtools-select\"\n title=\"How lifelike the generated values are\"\n >\n @for (style of SEED_STYLES; track style.value) {\n <option [value]=\"style.value\" [selected]=\"style.value === seedStyle()\">{{ style.label }}</option>\n }\n </select>\n <small class=\"et-query-devtools-hint et-query-devtools-seed-hint\">{{ seedStyleHint() }}</small>\n } @else if (schemaError(); as error) {\n <span class=\"et-query-devtools-settings-warn\">The API description could not be loaded: {{ error }}</span>\n } @else {\n <span class=\"et-query-devtools-count\">Loading the API description…</span>\n }\n </div>\n }\n\n <label class=\"et-query-devtools-mock-body\">\n <span class=\"et-query-devtools-section\">Body</span>\n <textarea\n #bodyInput\n [value]=\"form.body\"\n (input)=\"patchDraft({ body: bodyInput.value })\"\n class=\"et-query-devtools-input et-query-devtools-mock-textarea\"\n rows=\"8\"\n spellcheck=\"false\"\n ></textarea>\n </label>\n\n @if (draftSeed(); as seed) {\n <p class=\"et-query-devtools-hint\">\n Generated from the API description{{ seed.schemaName ? ' as ' + seed.schemaName : '' }} - a starting point,\n not the contract. Saving opens the designer on it.\n </p>\n @if (seed.notes.length) {\n <ul class=\"et-query-devtools-designer-notes\">\n @for (note of seed.notes; track note) {\n <li>{{ note }}</li>\n }\n </ul>\n }\n }\n\n @if (draftError(); as error) {\n <p class=\"et-query-devtools-settings-warn\">{{ error }}</p>\n }\n\n <div class=\"et-query-devtools-mock-head\">\n <button (click)=\"saveDraft()\" class=\"et-query-devtools-btn et-query-devtools-btn--primary\" type=\"button\">\n Save to the library\n </button>\n <button (click)=\"closeDraft()\" class=\"et-query-devtools-btn\" type=\"button\">Cancel</button>\n </div>\n </div>\n }\n\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>Designed</strong>\n <span class=\"et-query-devtools-count\">{{ rows().length }} in the library</span>\n @if (rows().length) {\n <div class=\"et-query-devtools-spec-export\">\n <select #formatPick (change)=\"pickSpecFormat(formatPick.value)\" class=\"et-query-devtools-select\">\n @for (format of SPEC_FORMATS; track format.value) {\n <option [value]=\"format.value\" [selected]=\"format.value === specFormat()\">{{ format.label }}</option>\n }\n </select>\n <button\n (click)=\"exportLibrary()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Download every designed route as one OpenAPI 3.1 document - the response schemas inferred from the designed bodies, each body as an example\"\n >\n <span aria-hidden=\"true\">⇩</span>\n Export OpenAPI\n </button>\n </div>\n }\n </div>\n\n @for (row of rows(); track row.mock.id) {\n <div [class.et-query-devtools-mock-row--armed]=\"row.armed\" class=\"et-query-devtools-mock-row\">\n <div class=\"et-query-devtools-mock-head\">\n <button\n [class.et-query-devtools-btn--tampered]=\"row.armed\"\n [attr.aria-pressed]=\"row.armed\"\n (click)=\"toggleArmed(row)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"{{ row.armed ? 'Stop serving this response' : 'Serve this response instead of the request' }}\"\n >\n {{ row.armed ? 'Armed' : 'Arm' }}\n </button>\n <span class=\"et-query-devtools-method\">{{ row.mock.method }}</span>\n <span class=\"et-query-devtools-route et-query-devtools-mono\">{{ row.mock.pattern }}</span>\n @if (row.mock.query) {\n <span class=\"et-query-devtools-url\">?{{ row.mock.query }}</span>\n }\n <span class=\"et-query-devtools-url\">{{ row.mock.clientName }}</span>\n @if (row.mock.capturedAt) {\n <span class=\"et-query-devtools-chip\">captured</span>\n }\n @if (row.mock.schemaName; as schemaName) {\n <span class=\"et-query-devtools-chip\" title=\"Seeded from the API description\">{{ schemaName }}</span>\n }\n @if (row.isSecure) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--error\"\n title=\"A mock sends nothing, so no token is attached and the auth flow is never exercised\"\n >\n no auth\n </span>\n }\n <span class=\"et-query-devtools-count\">{{ host.formatBytes(row.bytes) }}</span>\n <button (click)=\"editBody(row)\" class=\"et-query-devtools-btn\" type=\"button\">Body</button>\n <button\n (click)=\"copyDefinition(row)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Copy this route as a @ethlete/query definition - the response type inferred from the body, the args contract and the creator call\"\n >\n <span aria-hidden=\"true\">⧉</span>\n {{ copiedId() === row.mock.id ? 'Copied' : 'TS' }}\n </button>\n <button\n (click)=\"copyPathItem(row)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Copy this route as an OpenAPI paths entry, ready to paste under an existing description\"\n >\n <span aria-hidden=\"true\">⧉</span>\n {{ copiedSpecId() === row.mock.id ? 'Copied' : 'OAS' }}\n </button>\n <button (click)=\"remove(row)\" class=\"et-query-devtools-btn et-query-devtools-btn--danger\" type=\"button\">\n Delete\n </button>\n </div>\n\n <div class=\"et-query-devtools-mock-fields\">\n <label class=\"et-query-devtools-field\">\n <span>Status</span>\n <input\n #statusInput\n [value]=\"row.mock.status\"\n (change)=\"setStatus(row, statusInput.value)\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"100\"\n max=\"599\"\n step=\"1\"\n />\n <small>400 and above arrive as a real error, body and all</small>\n </label>\n <label class=\"et-query-devtools-field\">\n <span>Latency</span>\n <input\n #latencyInput\n [value]=\"row.mock.latencyMs\"\n (change)=\"setLatency(row, latencyInput.value)\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"0\"\n max=\"60000\"\n step=\"100\"\n />\n <small>ms before it settles, so the route still has a loading state</small>\n </label>\n </div>\n\n @if (editingId() === row.mock.id) {\n <et-query-devtools-mock-designer\n [body]=\"row.mock.body\"\n [annotations]=\"editingAnnotations()\"\n (save)=\"saveBody(row, $event)\"\n (dismiss)=\"cancelBody()\"\n />\n }\n </div>\n } @empty {\n <p class=\"et-query-devtools-empty\">\n Nothing designed yet. <strong>New mock</strong> writes one from scratch; capturing below seeds one from\n something that actually happened.\n </p>\n }\n\n @if (specNotes().length) {\n <ul class=\"et-query-devtools-designer-notes\">\n @for (note of specNotes(); track note) {\n <li>{{ note }}</li>\n }\n </ul>\n }\n </div>\n\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>Capture</strong>\n <span class=\"et-query-devtools-count\">live queries holding a response</span>\n </div>\n\n @for (row of captureRows(); track row.entry.id) {\n <div class=\"et-query-devtools-mock-head\">\n <span class=\"et-query-devtools-method\">{{ row.method }}</span>\n <button\n (click)=\"host.selectQuery(row.entry.id)\"\n class=\"et-query-devtools-route et-query-devtools-mono et-query-devtools-row-link\"\n type=\"button\"\n title=\"Open this query\"\n >\n {{ row.pattern }}\n </button>\n <span class=\"et-query-devtools-url\">{{ row.clientName }}</span>\n @if (row.shared > 1) {\n <span class=\"et-query-devtools-count\" title=\"A mock answers the route, so it answers all of them\">\n {{ row.shared }} queries\n </span>\n }\n <span class=\"et-query-devtools-count\">{{ host.formatBytes(row.bytes) }}</span>\n <button (click)=\"capture(row)\" class=\"et-query-devtools-btn\" type=\"button\">\n {{ row.exists ? 'Re-capture' : 'Capture' }}\n </button>\n </div>\n } @empty {\n <p class=\"et-query-devtools-empty\">No live query has a response yet.</p>\n }\n </div>\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { clamp } from '@ethlete/core';\nimport { clearQueryDevtoolsFaults, QUERY_DEVTOOLS_FAULT_STATUSES, setQueryDevtoolsFault } from '@ethlete/query';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { NumericFaultField } from './query-devtools-types';\n\n/** The Faults tab: arms latency/failure injection per client - in-memory only, not persisted. */\n@Component({\n selector: 'et-query-devtools-faults-tab',\n templateUrl: './query-devtools-faults-tab.component.html',\n styleUrl: './query-devtools-faults-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsFaultsTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n protected readonly FAULT_STATUSES = QUERY_DEVTOOLS_FAULT_STATUSES;\n protected readonly CLEAR_FAULTS = clearQueryDevtoolsFaults;\n\n /** The ceiling each numeric fault field is clamped to. */\n private readonly FAULT_LIMITS: Record<NumericFaultField, number> = {\n latencyMs: 60_000,\n failNext: 99,\n failRate: 100,\n };\n\n /**\n * Arms one numeric field of a client's fault from an input's raw value. Clamped here rather than left\n * to the input's `min`/`max`, which a typed-in (or pasted) value ignores.\n */\n protected armFaultValue(options: { clientName: string; field: NumericFaultField; value: string }) {\n const { clientName, field, value } = options;\n const parsed = clamp(Math.trunc(Number(value) || 0), 0, this.FAULT_LIMITS[field]);\n\n setQueryDevtoolsFault({ clientName, patch: { [field]: parsed } });\n }\n\n protected armFaultStatus(options: { clientName: string; value: string }) {\n setQueryDevtoolsFault({ clientName: options.clientName, patch: { status: Number(options.value) } });\n }\n\n /** Whether the default retry policy retries the status a client is armed to fail with. */\n protected isFaultStatusRetryable(status: number) {\n return QUERY_DEVTOOLS_FAULT_STATUSES.find((entry) => entry.status === status)?.retryable ?? false;\n }\n}\n","<div class=\"et-query-devtools-scroll\">\n <div class=\"et-query-devtools-toolbar\">\n <p class=\"et-query-devtools-hint\">\n Faults are injected into the request pipeline, so retries, error handling features and the cache see them exactly\n as they would see a real one. Unlike the rest of the panel, what you arm here is not persisted - a page reload\n disarms every client.\n </p>\n </div>\n\n @for (client of host.faultClients(); track client.name) {\n @let fault = client.fault;\n <div [class.et-query-devtools-card--armed]=\"client.armed\" class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong class=\"et-query-devtools-mono\">{{ client.name }}</strong>\n <span class=\"et-query-devtools-url\">{{ client.baseUrl }}</span>\n @if (client.armed) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--error\">armed</span>\n <button (click)=\"CLEAR_FAULTS(client.name)\" class=\"et-query-devtools-btn\" type=\"button\">Disarm</button>\n }\n </div>\n\n <div class=\"et-query-devtools-faults\">\n <label class=\"et-query-devtools-field\">\n <span>Latency</span>\n <input\n #latencyInput\n [value]=\"fault.latencyMs\"\n (change)=\"armFaultValue({ clientName: client.name, field: 'latencyMs', value: latencyInput.value })\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"0\"\n max=\"60000\"\n step=\"100\"\n />\n <small>ms before every attempt starts</small>\n </label>\n\n <label class=\"et-query-devtools-field\">\n <span>Fail next</span>\n <input\n #failNextInput\n [value]=\"fault.failNext\"\n (change)=\"armFaultValue({ clientName: client.name, field: 'failNext', value: failNextInput.value })\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"0\"\n max=\"99\"\n step=\"1\"\n />\n <small>attempts, counted down as they are spent</small>\n </label>\n\n <label class=\"et-query-devtools-field\">\n <span>Fail rate</span>\n <input\n #failRateInput\n [value]=\"fault.failRate\"\n (change)=\"armFaultValue({ clientName: client.name, field: 'failRate', value: failRateInput.value })\"\n class=\"et-query-devtools-input et-query-devtools-input--number\"\n type=\"number\"\n min=\"0\"\n max=\"100\"\n step=\"5\"\n />\n <small>% of attempts, rolled per attempt</small>\n </label>\n\n <label class=\"et-query-devtools-field\">\n <span>Status</span>\n <select\n #statusSelect\n (change)=\"armFaultStatus({ clientName: client.name, value: statusSelect.value })\"\n class=\"et-query-devtools-select\"\n >\n @for (option of FAULT_STATUSES; track option.status) {\n <!-- `selected` on the option, not `value` on the select: the select's value is\n applied before its options exist, so it would fall back to the first one. -->\n <option [value]=\"option.status\" [selected]=\"option.status === fault.status\">\n {{ option.status }} · {{ option.label }}\n </option>\n }\n </select>\n <small>\n @if (isFaultStatusRetryable(fault.status)) {\n the default retry policy retries this\n } @else {\n the default retry policy gives up on this\n }\n </small>\n </label>\n </div>\n </div>\n } @empty {\n <p class=\"et-query-devtools-empty\">No query clients registered yet.</p>\n }\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { QueryDevtoolsDrawerComponent } from './query-devtools-drawer.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\nimport { QueryDevtoolsRouteComponent } from './query-devtools-route.component';\n\n/** The Forms tab: registered `defineQueryForm()` handles, each expandable to its field table. */\n@Component({\n selector: 'et-query-devtools-forms-tab',\n templateUrl: './query-devtools-forms-tab.component.html',\n styleUrl: './query-devtools-forms-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsDrawerComponent, QueryDevtoolsJsonComponent, QueryDevtoolsRouteComponent],\n})\nexport class QueryDevtoolsFormsTabComponent {\n protected host = injectQueryDevtoolsHost();\n}\n","<div #panes class=\"et-query-devtools-split\">\n <div class=\"et-query-devtools-scroll\">\n @for (entry of host.formEntries(); track entry.id) {\n @let form = host.asForm(entry);\n @let expanded = host.selectedFormId() === entry.id;\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <button\n [attr.aria-expanded]=\"expanded\"\n (click)=\"host.selectedFormId.set(expanded ? null : entry.id)\"\n class=\"et-query-devtools-row-link\"\n type=\"button\"\n >\n <span class=\"et-query-devtools-caret\">{{ expanded ? '▾' : '▸' }}</span>\n <strong>{{ entry.meta.name || 'query form' }}</strong>\n </button>\n @if (form.activeFilterCount(); as count) {\n <span class=\"et-query-devtools-chip\">{{ count }} active</span>\n } @else {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">at defaults</span>\n }\n @if (form.isCommitPending()) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--loading\">debouncing</span>\n }\n @if (!form.isObserving()) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"observe() has not been called, so nothing syncs with the URL\"\n >\n not observing\n </span>\n }\n <button\n [disabled]=\"form.isAtDefaults()\"\n (click)=\"form.resetAll()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n ⟲ Reset all\n </button>\n </div>\n\n @let driven = host.queriesDrivenByForm(entry);\n <dl class=\"et-query-devtools-meta\">\n <dt>Drives</dt>\n <dd>\n @if (driven.length) {\n <div class=\"et-query-devtools-inner-queries\">\n @for (link of driven; track link.id) {\n <button\n [class.et-query-devtools-inner-row--active]=\"host.formSelectedQueryId() === link.id\"\n [disabled]=\"!link.id\"\n (click)=\"host.formSelectedQueryId.set(link.id)\"\n class=\"et-query-devtools-inner-row\"\n type=\"button\"\n >\n <span [attr.data-status]=\"host.queryStatus(link.query)\" class=\"et-query-devtools-status\"></span>\n <span class=\"et-query-devtools-method\">{{ link.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"link.segments\" [fallback]=\"link.query.id() || 'query'\" />\n </span>\n </button>\n }\n </div>\n } @else {\n <span class=\"et-query-devtools-hint\">\n No query has read this form's value yet. A query picks it up the first time its\n <code>withArgs</code> reads <code>value()</code>.\n </span>\n }\n </dd>\n </dl>\n\n @if (expanded) {\n <table class=\"et-query-devtools-table\">\n <thead>\n <tr>\n <th>Field</th>\n <th>Value</th>\n <th>Default</th>\n <th>URL param</th>\n <th>Rules</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n @for (field of form.fields(); track field.key) {\n <tr [attr.data-status]=\"field.isDefault ? null : 'success'\">\n <td class=\"et-query-devtools-mono\">{{ field.key }}</td>\n <td class=\"et-query-devtools-mono\">\n {{ host.inlineValue(field.value) }}\n <!-- The live value only differs while a debounce is pending, which is exactly\n when \"the input says X but the query asked for Y\" needs explaining. -->\n @if (field.liveValue !== field.value) {\n <span class=\"et-query-devtools-stat-sub\">typing {{ host.inlineValue(field.liveValue) }}</span>\n }\n </td>\n <td class=\"et-query-devtools-mono\">{{ host.inlineValue(field.defaultValue) }}</td>\n <td class=\"et-query-devtools-mono\">\n @if (field.queryParam === undefined) {\n <span class=\"et-query-devtools-hint\">—</span>\n } @else {\n {{ field.paramKey }}={{ host.inlineValue(field.queryParam) }}\n }\n </td>\n <td>\n <div class=\"et-query-devtools-chips\">\n @if (field.debounceMs !== null) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">\n {{ field.debounceMs }}ms\n </span>\n }\n @if (field.isResetBy.length) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"Reset to its default whenever one of these changes\"\n >\n reset by {{ field.isResetBy.join(', ') }}\n </span>\n }\n @if (!field.countsAsFilter) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"Not counted by activeFilterCount\"\n >\n not a filter\n </span>\n }\n </div>\n </td>\n <td>\n <button\n [disabled]=\"field.isDefault\"\n (click)=\"form.resetField(field.key)\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n ⟲\n </button>\n </td>\n </tr>\n }\n </tbody>\n </table>\n\n <h4 class=\"et-query-devtools-section\">Committed value</h4>\n <et-query-devtools-json [value]=\"form.value()\" />\n }\n </div>\n } @empty {\n <p class=\"et-query-devtools-empty\">\n No query forms registered. A form created with <code>defineQueryForm()</code> registers itself.\n </p>\n }\n </div>\n\n <et-query-devtools-drawer\n [sel]=\"host.formSelectedQuery()\"\n [container]=\"panes\"\n (dismiss)=\"host.formSelectedQueryId.set(null)\"\n />\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { DevtoolsLockKind } from './query-devtools-locks';\n\nconst KIND_LABELS: Record<DevtoolsLockKind, string> = {\n auth: 'Auth',\n poll: 'Polling',\n other: 'Other',\n};\n\n/**\n * The Locks tab: the Web Locks held across this origin, which is the one view in the panel that shows\n * something outside its own tab.\n */\n@Component({\n selector: 'et-query-devtools-locks-tab',\n templateUrl: './query-devtools-locks-tab.component.html',\n styleUrl: './query-devtools-locks-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsLocksTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n protected kindLabel(kind: DevtoolsLockKind) {\n return KIND_LABELS[kind];\n }\n}\n","<div class=\"et-query-devtools-scroll\">\n <div class=\"et-query-devtools-toolbar\">\n <p class=\"et-query-devtools-hint et-query-devtools-locks-hint\">\n The\n <a href=\"https://developer.mozilla.org/docs/Web/API/Web_Locks_API\" target=\"_blank\" rel=\"noreferrer\">Web Locks</a>\n held across this whole origin - every other tab, worker and service worker included, which is the one thing in\n this panel that is not about this tab alone. Read only: a tab cannot release another tab's lock. Polled once a\n second while this tab is open and the page is visible.\n </p>\n </div>\n\n @if (host.lockRows(); as rows) {\n <table class=\"et-query-devtools-table\">\n <thead>\n <tr>\n <th>Lock</th>\n <th>Kind</th>\n <th>Taking part</th>\n <th>This tab</th>\n </tr>\n </thead>\n <tbody>\n @for (row of rows; track row.name) {\n <tr>\n <td [title]=\"row.name\">\n <span class=\"et-query-devtools-lock-name\">\n <span class=\"et-query-devtools-url\">{{ row.label }}</span>\n @if (row.channel) {\n <span class=\"et-query-devtools-count\">{{ row.channel }}</span>\n }\n </span>\n </td>\n <td>{{ kindLabel(row.kind) }}</td>\n <td>{{ row.tabs }}</td>\n <td>\n @let standing = host.lockStanding(row);\n <span\n [class.et-query-devtools-chip--success]=\"standing.tone === 'success'\"\n [class.et-query-devtools-chip--muted]=\"standing.tone === 'muted'\"\n [title]=\"standing.title\"\n class=\"et-query-devtools-chip\"\n >\n {{ standing.label }}\n </span>\n </td>\n </tr>\n } @empty {\n <tr>\n <td class=\"et-query-devtools-empty\" colspan=\"4\">\n Nothing holds a lock on this origin. Multi-tab auth sync and cache polling both take one - without either,\n there is nothing to coordinate.\n </td>\n </tr>\n }\n </tbody>\n </table>\n } @else {\n <p class=\"et-query-devtools-empty\">\n This browser has no Web Locks API, so nothing is coordinated across tabs at all: every tab refreshes its own\n tokens and polls its own cache keys.\n </p>\n }\n</div>\n","/**\n * Namespace of the probe lock the panel holds while the Locks tab is open. `LockInfo` carries a\n * `clientId` but there is no API for \"my own\", so a lock under a name only this tab can have produced is\n * the only way to learn it - and without it every row would say _some tab_ rather than _this tab_.\n */\nexport const DEVTOOLS_PROBE_NAMESPACE = 'ethlete-devtools';\n\nexport const devtoolsProbeLockKey = (id: string) => `probe:${id}`;\n\nexport const devtoolsProbeLockName = (id: string) => `${DEVTOOLS_PROBE_NAMESPACE}:${devtoolsProbeLockKey(id)}`;\n\nconst PROBE_PREFIX = `${DEVTOOLS_PROBE_NAMESPACE}:probe:`;\nconst AUTH_PREFIX = 'ethlete-auth:leader:';\nconst POLL_PREFIX = 'et-query-poll:';\n\n/** Which SDK feature a lock name belongs to, or `other` for one the panel did not put there. */\nexport type DevtoolsLockKind = 'auth' | 'poll' | 'other';\n\n/** Where the tab the panel is open in stands on one lock. */\nexport type DevtoolsLockStanding = 'holder' | 'queued' | 'absent' | 'unknown';\n\n/** One lock name, with every client that holds or waits for it folded into a single row. */\nexport type DevtoolsLockRow = {\n /** The raw name, so a lock the panel cannot decode is still greppable from the row. */\n name: string;\n\n /** What the name means: the provider for an auth lock, the cache key for a poll lock. */\n label: string;\n\n kind: DevtoolsLockKind;\n\n /** The sync channel a poll lock belongs to, or `null` for a name that carries no such part. */\n channel: string | null;\n\n /**\n * Held plus queued on this name. Every participant requests the same lock and exactly one gets it, so\n * this is the number of tabs, workers and service workers taking part - the same arithmetic the auth\n * provider's own `instanceCount` does.\n */\n tabs: number;\n\n standing: DevtoolsLockStanding;\n\n /** This tab's 1-based place in the queue, or `null` unless {@link standing} is `queued`. */\n queuePlace: number | null;\n};\n\nconst decode = (name: string): Pick<DevtoolsLockRow, 'kind' | 'label' | 'channel'> => {\n if (name.startsWith(AUTH_PREFIX)) return { kind: 'auth', label: name.slice(AUTH_PREFIX.length), channel: null };\n\n if (name.startsWith(POLL_PREFIX)) {\n const rest = name.slice(POLL_PREFIX.length);\n const separator = rest.indexOf(':');\n\n return separator === -1\n ? { kind: 'poll', label: rest, channel: null }\n : { kind: 'poll', label: rest.slice(separator + 1), channel: rest.slice(0, separator) };\n }\n\n return { kind: 'other', label: name, channel: null };\n};\n\nconst KIND_ORDER: Record<DevtoolsLockKind, number> = { auth: 0, poll: 1, other: 2 };\n\n/** The `clientId` of the tab the panel is open in, read off the probe lock it holds under `probeName`. */\nexport const probeClientId = (snapshot: LockManagerSnapshot, probeName: string): string | null =>\n snapshot.held?.find((info) => info.name === probeName)?.clientId ?? null;\n\n/**\n * Folds an origin-wide `navigator.locks.query()` snapshot into one row per lock name, decoded to the\n * feature that took it and marked with where this tab stands on it.\n *\n * Probe locks are dropped from the result - every open panel on the origin holds one, and they describe\n * the inspector rather than the app it inspects.\n */\nexport const summarizeLocks = (options: {\n snapshot: LockManagerSnapshot;\n /** This tab's client id, or `null` while the probe has not been granted - see {@link DevtoolsLockStanding}. */\n clientId: string | null;\n}): DevtoolsLockRow[] => {\n const { snapshot, clientId } = options;\n\n const held = (snapshot.held ?? []).filter((info) => !info.name?.startsWith(PROBE_PREFIX));\n const pending = (snapshot.pending ?? []).filter((info) => !info.name?.startsWith(PROBE_PREFIX));\n\n const names = [...new Set([...held, ...pending].map((info) => info.name ?? ''))];\n\n const rows = names.map((name): DevtoolsLockRow => {\n const holders = held.filter((info) => info.name === name);\n const queue = pending.filter((info) => info.name === name);\n const place = queue.findIndex((info) => info.clientId === clientId) + 1;\n const isHolder = holders.some((info) => info.clientId === clientId);\n\n const standing: DevtoolsLockStanding =\n clientId === null ? 'unknown' : isHolder ? 'holder' : place > 0 ? 'queued' : 'absent';\n\n return {\n name,\n ...decode(name),\n tabs: holders.length + queue.length,\n standing,\n queuePlace: standing === 'queued' ? place : null,\n };\n });\n\n return rows.sort((a, b) => KIND_ORDER[a.kind] - KIND_ORDER[b.kind] || a.label.localeCompare(b.label));\n};\n","// Generated from package.json by tools/scripts/generate-version.js - do not edit.\n\n/** The version of `@ethlete/query-devtools` this build was cut from. */\nexport const QUERY_DEVTOOLS_VERSION = '1.0.0-next.4';\n","/* eslint-disable @typescript-eslint/naming-convention -- the `__export_*` keys are Insomnia's file format */\n\n/**\n * One request to export. Values are what the query actually sent (or would send), already resolved -\n * no `:param` placeholders unless the query has no args yet, in which case Insomnia picks them up as\n * its own path params.\n */\nexport type InsomniaRequestInput = {\n name: string;\n method: string;\n url: string;\n headers: { name: string; value: string }[];\n\n /** The request body, or `null` for a request that sends none. */\n body: unknown;\n\n /** The GraphQL document, for a GraphQL query - switches Insomnia's body editor to GraphQL. */\n gqlQuery?: string | null;\n\n /** Name of the folder to file the request under, usually the query client's. */\n group?: string | null;\n\n /**\n * The {@link InsomniaTokenRefreshInput.id} of the token refresh this request authenticates with.\n * Its `Authorization` header then reads the access token out of the refresh response instead of\n * carrying the one the app happened to hold at export time.\n */\n secureBy?: string | null;\n};\n\n/**\n * The token refresh of a bearer auth provider, exported as a request of its own so the collection can\n * mint its own access tokens instead of shipping one that expires within the hour.\n */\nexport type InsomniaTokenRefreshInput = {\n /** What a request's {@link InsomniaRequestInput.secureBy} points at, usually the provider's name. */\n id: string;\n\n name: string;\n method: string;\n url: string;\n headers: { name: string; value: string }[];\n\n /** The body that carries the refresh token, e.g. `{ token: '…' }`. */\n body: unknown;\n\n group?: string | null;\n\n /** JSONPath of the access token in the refresh response, e.g. `$.accessToken`. */\n accessTokenPath: string;\n\n /**\n * How long Insomnia may reuse a stored refresh response before sending the request again. Set from\n * the access token's own lifetime, so the chain refreshes about as often as the app does.\n */\n maxAgeSeconds: number;\n};\n\nexport type BuildInsomniaExportOptions = {\n /** Name of the exported collection, shown in Insomnia's sidebar. */\n name: string;\n requests: InsomniaRequestInput[];\n\n /** The token refreshes the exported requests authenticate with, at most one per auth provider. */\n tokenRefreshes?: InsomniaTokenRefreshInput[];\n\n /** Wall-clock time of the export - passed in so the builder stays pure. */\n now: number;\n};\n\ntype InsomniaResource = Record<string, unknown>;\n\n/** Insomnia's own export envelope. Version 4 is what Insomnia 8/9/10 read and write. */\nexport type InsomniaExport = {\n _type: 'export';\n __export_format: 4;\n __export_date: string;\n __export_source: string;\n resources: InsomniaResource[];\n};\n\nconst WORKSPACE_ID = 'wrk_ethlete_query_devtools';\n\nconst jsonBody = (body: unknown) => {\n try {\n return JSON.stringify(body, null, 2);\n } catch {\n // A body holding a circular reference or a throwing `toJSON` cannot be exported.\n return null;\n }\n};\n\n/**\n * Insomnia's GraphQL body editor stores `{ query, variables }` as its text, so a GraphQL request is\n * exported with the document and its variables rather than the serialized POST body.\n */\nconst graphqlBody = (gqlQuery: string, body: unknown) => {\n const variables = (body as { variables?: unknown } | null)?.variables ?? {};\n\n return jsonBody({ query: gqlQuery, variables });\n};\n\nconst bodyOf = (request: Pick<InsomniaRequestInput, 'body' | 'gqlQuery'>) => {\n if (request.gqlQuery) {\n const text = graphqlBody(request.gqlQuery, request.body);\n\n return text === null ? {} : { mimeType: 'graphql', text };\n }\n\n if (request.body === null || request.body === undefined) return {};\n\n const text = jsonBody(request.body);\n\n return text === null ? {} : { mimeType: 'application/json', text };\n};\n\n/**\n * Angular's `HttpClient` labels an object body `application/json` on its own, so a replay outside the\n * app needs the header spelled out to reach the same endpoint the same way.\n */\nconst headersOf = (input: { headers: { name: string; value: string }[] }, hasBody: boolean) => {\n const headers = input.headers.filter((header) => header.value !== '');\n const hasContentType = headers.some((header) => header.name.toLowerCase() === 'content-type');\n\n if (!hasBody || hasContentType) return headers;\n\n return [...headers, { name: 'Content-Type', value: 'application/json' }];\n};\n\nconst AUTH_HEADER = 'Authorization';\n\n/**\n * Insomnia's template tag for reading a value out of another request's response. `when-expired` plus a\n * max age is what makes the chain maintain itself: once the stored refresh response is older than\n * `maxAgeSeconds`, sending a request that reads from it re-sends the refresh first.\n */\nconst responseTag = (requestId: string, refresh: InsomniaTokenRefreshInput) =>\n `{% response 'body', '${requestId}', '${refresh.accessTokenPath}', 'when-expired', ${refresh.maxAgeSeconds} %}`;\n\n/** Replaces whatever `Authorization` the export resolved with the token the refresh chain yields. */\nconst withChainedAuth = (headers: { name: string; value: string }[], value: string) => [\n { name: AUTH_HEADER, value },\n ...headers.filter((header) => header.name.toLowerCase() !== AUTH_HEADER.toLowerCase()),\n];\n\n/**\n * Builds an Insomnia v4 collection from a set of requests, ready to be imported via Insomnia's\n * `Import > From File / Clipboard`. Requests are filed into a folder per query client, and a request\n * naming a token refresh gets its bearer token from that refresh's response rather than from a\n * literal token frozen at export time.\n */\nexport const buildInsomniaExport = (options: BuildInsomniaExportOptions): InsomniaExport => {\n const groups = new Map<string, string>();\n const resources: InsomniaResource[] = [\n {\n _id: WORKSPACE_ID,\n _type: 'workspace',\n parentId: null,\n name: options.name,\n description: 'Exported from the @ethlete/query devtools.',\n scope: 'collection',\n created: options.now,\n modified: options.now,\n },\n ];\n\n const groupIdFor = (name: string | null | undefined) => {\n if (!name) return WORKSPACE_ID;\n\n const existing = groups.get(name);\n if (existing) return existing;\n\n const id = `fld_${groups.size}`;\n groups.set(name, id);\n\n resources.push({\n _id: id,\n _type: 'request_group',\n parentId: WORKSPACE_ID,\n name,\n environment: {},\n // Insomnia sorts ascending, so the counter keeps folders in the order they were added.\n metaSortKey: groups.size,\n created: options.now,\n modified: options.now,\n });\n\n return id;\n };\n\n const requestResource = (resource: InsomniaResource) => {\n resources.push({\n _type: 'request',\n description: '',\n parameters: [],\n authentication: {},\n isPrivate: false,\n settingStoreCookies: true,\n settingSendCookies: true,\n settingEncodeUrl: true,\n settingRebuildPath: true,\n settingFollowRedirects: 'global',\n created: options.now,\n modified: options.now,\n ...resource,\n });\n };\n\n /** The `Authorization` value a request chained to a given token refresh gets, keyed by refresh id. */\n const chainedAuth = new Map<string, string>();\n\n // Emitted first so every chained `Authorization` below already has a request id to point at.\n options.tokenRefreshes?.forEach((refresh, index) => {\n const id = `req_refresh_${index}`;\n const body = bodyOf(refresh);\n\n chainedAuth.set(refresh.id, `Bearer ${responseTag(id, refresh)}`);\n\n requestResource({\n _id: id,\n parentId: groupIdFor(refresh.group),\n name: refresh.name,\n description:\n 'Mints the access token every secure request in this collection reads. Insomnia re-sends it on ' +\n `its own once the stored response is older than ${refresh.maxAgeSeconds}s. The refresh token in ` +\n 'the body is the one the app held at export time - re-export once it is spent.',\n method: refresh.method,\n url: refresh.url,\n body,\n headers: headersOf(refresh, 'text' in body),\n // Insomnia sorts ascending and the exported requests start at 0, so the refresh stays on top.\n metaSortKey: index - (options.tokenRefreshes?.length ?? 0),\n });\n });\n\n options.requests.forEach((request, index) => {\n const body = bodyOf(request);\n const headers = headersOf(request, 'text' in body);\n const auth = request.secureBy ? chainedAuth.get(request.secureBy) : undefined;\n\n requestResource({\n _id: `req_${index}`,\n parentId: groupIdFor(request.group),\n name: request.name,\n method: request.method,\n url: request.url,\n body,\n headers: auth ? withChainedAuth(headers, auth) : headers,\n metaSortKey: index,\n });\n });\n\n return {\n _type: 'export',\n __export_format: 4,\n __export_date: new Date(options.now).toISOString(),\n __export_source: 'ethlete.query:devtools',\n resources,\n };\n};\n","/** One folder in the Queries list's path tree, or the tree's own root. */\nexport type QueryPathNode<T> = {\n /** The full path this node stands for, `/`-prefixed - the stable key its collapsed state is stored under. */\n key: string;\n\n /** What the row shows. After chain compression this can be several segments, e.g. `api/v1`. */\n label: string;\n\n /** Rows whose path ends exactly here. */\n items: T[];\n\n children: QueryPathNode<T>[];\n\n /** Rows at or below this node, which is what the folder row counts. */\n count: number;\n};\n\n/** The tree's root: rows with no path of their own, plus the top-level folders. */\nexport type QueryPathTree<T> = { items: T[]; children: QueryPathNode<T>[] };\n\n/** Path segments of a route, with the query string left attached to the segment it belongs to. */\nexport const queryRoutePathSegments = (route: string) => route.split('/').filter(Boolean);\n\ntype Building<T> = { key: string; segments: string[]; items: T[]; children: Map<string, Building<T>> };\n\nconst node = <T>(key: string, segment: string): Building<T> => ({\n key,\n segments: [segment],\n items: [],\n children: new Map(),\n});\n\n/**\n * Folds a node that only exists to hold one child into that child - `api` → `v1` → `teams` becomes one\n * `api/v1/teams` row. Without this a tree of REST routes is mostly rows that say nothing and cost a\n * level of indentation each, which is strictly worse than the flat list it replaced.\n */\nconst compress = <T>(current: Building<T>): Building<T> => {\n let folded = current;\n\n while (folded.items.length === 0 && folded.children.size === 1) {\n const [child] = [...folded.children.values()] as [Building<T>];\n\n folded = { ...child, segments: [...folded.segments, ...child.segments] };\n }\n\n return {\n ...folded,\n children: new Map([...folded.children].map(([segment, child]) => [segment, compress(child)])),\n };\n};\n\nconst countOf = <T>(current: Building<T>): number =>\n current.items.length + [...current.children.values()].reduce((sum, child) => sum + countOf(child), 0);\n\nconst finalize = <T>(current: Building<T>): QueryPathNode<T> => ({\n key: current.key,\n label: current.segments.join('/'),\n items: current.items,\n children: [...current.children.values()].map(finalize),\n count: countOf(current),\n});\n\n/**\n * Arranges rows into a tree by their route path, keeping the order they arrive in - which is the order\n * the flat list already sorted them into, so pinning and the recent-first sort still decide what is near\n * the top. A row whose route has no segments at all sits at the root rather than inventing a folder.\n */\nexport const buildQueryPathTree = <T>(rows: readonly { path: string[]; item: T }[]): QueryPathTree<T> => {\n const root = node<T>('', '');\n\n for (const { path, item } of rows) {\n let current = root;\n\n for (const segment of path) {\n const existing = current.children.get(segment);\n\n if (existing) {\n current = existing;\n continue;\n }\n\n const child = node<T>(`${current.key}/${segment}`, segment);\n current.children.set(segment, child);\n current = child;\n }\n\n current.items.push(item);\n }\n\n return {\n items: root.items,\n children: [...root.children.values()].map((child) => finalize(compress(child))),\n };\n};\n\n/** One line of the rendered tree: a folder, or a row at the depth its path put it. */\nexport type QueryTreeRow<T> =\n | { kind: 'folder'; key: string; label: string; depth: number; count: number; collapsed: boolean }\n | {\n kind: 'row';\n key: string;\n depth: number;\n item: T;\n\n /** The path of the folder this row sits under, which the row may leave off its own label. */\n parentPath: string;\n };\n\n/**\n * Flattens the tree into the lines to render, skipping everything under a collapsed folder. A flat list\n * is what the template iterates: one `@for`, and a folder's rows track independently of it.\n *\n * **A node nothing branches off gets no folder row.** A row already shows its whole route, so a `/flaky`\n * heading above one `GET /flaky` costs a line and a level of indentation to repeat what is on the line\n * below it - and a tree made mostly of those is worse than the flat list it replaced. Only a node that\n * actually splits the list earns a heading.\n */\nexport const flattenQueryPathTree = <T>(\n tree: QueryPathTree<T>,\n options: { isCollapsed: (key: string) => boolean; keyOf: (item: T) => string },\n): QueryTreeRow<T>[] => {\n const rows: QueryTreeRow<T>[] = [];\n\n const walk = (nodes: QueryPathNode<T>[], at: { depth: number; parentPath: string }) => {\n const { depth, parentPath } = at;\n\n for (const child of nodes) {\n if (!child.children.length) {\n for (const item of child.items) {\n rows.push({ kind: 'row', key: options.keyOf(item), depth, item, parentPath });\n }\n\n continue;\n }\n\n const collapsed = options.isCollapsed(child.key);\n\n rows.push({ kind: 'folder', key: child.key, label: child.label, depth, count: child.count, collapsed });\n\n if (collapsed) continue;\n\n for (const item of child.items) {\n rows.push({ kind: 'row', key: options.keyOf(item), depth: depth + 1, item, parentPath: child.key });\n }\n\n walk(child.children, { depth: depth + 1, parentPath: child.key });\n }\n };\n\n for (const item of tree.items) {\n rows.push({ kind: 'row', key: options.keyOf(item), depth: 0, item, parentPath: '' });\n }\n\n walk(tree.children, { depth: 0, parentPath: '' });\n\n return rows;\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport { Component, computed, effect, untracked, ViewEncapsulation } from '@angular/core';\nimport { clearQueryDevtoolsTombstones, QueryDevtoolsEntry } from '@ethlete/query';\nimport { QueryDevtoolsDetailComponent } from './query-devtools-detail.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { buildQueryPathTree, flattenQueryPathTree, queryRoutePathSegments } from './query-devtools-query-tree';\nimport { QueryDevtoolsRouteComponent } from './query-devtools-route.component';\nimport { AnyQuery, QueryListFacet, QueryStatus } from './query-devtools-types';\n\n/** One query as the Queries list renders it: the registry entry plus the handle it was registered with. */\ntype QueryRow = { entry: QueryDevtoolsEntry; query: AnyQuery };\n\n/**\n * Rows the list folds into one line. `head` is the row the collapsed line renders from - every row in\n * `items` looks the same, which is what put them in one group.\n */\ntype QueryRowGroup = { key: string; head: QueryRow; items: QueryRow[] };\n\n/** The Queries tab: every registered query, filterable by client/search/status, with an inline detail. */\n@Component({\n selector: 'et-query-devtools-queries-tab',\n templateUrl: './query-devtools-queries-tab.component.html',\n styleUrl: './query-devtools-queries-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet, QueryDevtoolsDetailComponent, QueryDevtoolsRouteComponent],\n})\nexport class QueryDevtoolsQueriesTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n /** The status chips above the list, in the order a problem is usually looked for. */\n private readonly facets = [\n { id: 'error', label: 'Failing' },\n { id: 'loading', label: 'Loading' },\n { id: 'stale', label: 'Stale' },\n { id: 'idle', label: 'Idle' },\n { id: 'gone', label: 'Gone' },\n ] satisfies { id: QueryListFacet; label: string }[];\n\n private searchedQueries = computed(() => {\n const items = this.host.scopedQueries().map((entry) => ({ entry, query: entry.handle as AnyQuery }));\n const terms = this.host.queryFilter().trim().toLowerCase().split(/\\s+/).filter(Boolean);\n\n if (!terms.length) return items;\n\n return items.filter((item) => {\n const haystack = this.queryHaystack(item.entry, item.query);\n\n return terms.every((term) => haystack.includes(term));\n });\n });\n\n /**\n * How many queries each status chip would leave. Counted before the active chips are applied, so a\n * chip always states what picking it yields rather than what the current selection happens to show.\n */\n private facetCounts = computed(() => {\n // Staleness is a `Date.now()` comparison and deliberately not reactive, so the clock is what makes\n // the counts age with it - without it a chip would keep the number it happened to be built with.\n this.host.clock();\n\n const counts: Record<QueryListFacet, number> = { error: 0, loading: 0, stale: 0, idle: 0, gone: 0 };\n\n for (const { entry, query } of this.searchedQueries()) {\n // A tombstone's frozen state is not live state: counting it as failing or idle would put a query\n // that no longer exists into the numbers the panel is read for.\n if (entry.destroyedAt) {\n counts.gone++;\n continue;\n }\n\n const status = this.host.queryStatus(query);\n\n if (status === 'error') counts.error++;\n if (status === 'loading') counts.loading++;\n if (status === 'idle') counts.idle++;\n if (this.host.isStale(query)) counts.stale++;\n }\n\n return counts;\n });\n\n /**\n * The status chips worth rendering: the ones that would narrow the list, plus whichever are on. An\n * active chip stays even at zero - it is the only thing that says why the list is empty.\n */\n protected visibleFacets = computed(() => {\n const counts = this.facetCounts();\n const active = this.host.queryFacets();\n\n return this.facets\n .map((facet) => ({ ...facet, count: counts[facet.id], active: active.has(facet.id) }))\n .filter((facet) => facet.count > 0 || facet.active);\n });\n\n protected filteredQueries = computed(() => {\n const facets = this.host.queryFacets();\n\n // Same reason as in `facetCounts`: a list narrowed to stale queries has to re-evaluate as they age.\n if (facets.has('stale')) this.host.clock();\n\n const items = this.searchedQueries().filter((item) =>\n item.entry.destroyedAt\n ? this.listsTombstone(item.entry, facets)\n : !facets.size || this.matchesFacets(item, facets),\n );\n\n return this.pinnedFirst(this.byLastExecuted(items));\n });\n\n /**\n * The list as it is rendered: rows that would be indistinguishable from each other - same method, same\n * resolved route, same live-or-gone - folded into one group. One query used by several consumers is one\n * entry per consumer by design (the ids have to stay per-instance for the detail, pins and tombstones),\n * and this is where that stops being N identical lines.\n *\n * Grouping on what the row *shows* rather than on the registry's descriptor is deliberate: the\n * descriptor is the route template, so `/post/1` and `/post/2` share it while being different data.\n * Folding only what looks the same can never hide a distinction the list was making.\n */\n protected queryGroups = computed(() => {\n const groups = new Map<string, QueryRowGroup>();\n\n for (const item of this.filteredQueries()) {\n const key = this.groupKey(item);\n const group = groups.get(key);\n\n if (group) {\n group.items.push(item);\n continue;\n }\n\n groups.set(key, { key, head: item, items: [item] });\n }\n\n return [...groups.values()];\n });\n\n /**\n * The same groups, arranged by route path. Built from what a row *shows* (the resolved route), the way\n * {@link groupKey} is - so `/post/1` and `/post/2` are two leaves under `post` rather than one, which\n * is what makes the tree answer \"which ids did this screen fetch\".\n */\n protected queryTree = computed(() =>\n flattenQueryPathTree(\n buildQueryPathTree(\n this.queryGroups().map((group) => ({ path: queryRoutePathSegments(this.groupPathRoute(group)), item: group })),\n ),\n {\n isCollapsed: (key) => this.host.collapsedQueryPaths().has(key),\n keyOf: (group) => group.key,\n },\n ),\n );\n\n /**\n * The fold the selected query sits in, or `null` while it is not in the list. Keyed the way\n * {@link groupKey} keys the fold, so it moves with the query when regrouping moves it.\n */\n private selectedGroupKey = computed(() => {\n const id = this.host.selectedQueryId();\n\n if (!id) return null;\n\n const item = this.filteredQueries().find((item) => item.entry.id === id);\n\n return item ? this.groupKey(item) : null;\n });\n\n /**\n * Whether the selected query is the very row a collapsed fold renders. A boolean rather than the group\n * itself on purpose: the effect below reads it, and a fresh object every time the list re-evaluates\n * would re-run it - which is exactly what it must not do.\n */\n private selectedIsFoldHead = computed(() => {\n const key = this.selectedGroupKey();\n\n if (!key) return false;\n\n return this.queryGroups().find((group) => group.key === key)?.head.entry.id === this.host.selectedQueryId();\n });\n\n /** How many queries the list would hold with the search box empty, which is what the count compares to. */\n protected scopedQueryCount = computed(() => {\n const facets = this.host.queryFacets();\n\n return this.host.scopedQueries().filter((entry) => !entry.destroyedAt || this.listsTombstone(entry, facets)).length;\n });\n\n protected goneQueryCount = computed(() => this.host.scopedQueries().filter((entry) => !!entry.destroyedAt).length);\n\n /** The tombstones Forget would drop: the ones the list is showing, never the whole registry. */\n protected listedGoneQueries = computed(() =>\n this.host.queryFacets().has('gone') ? this.filteredQueries().filter((item) => item.entry.destroyedAt) : [],\n );\n\n /** Whether the search box or a status chip is narrowing the list beyond its scope. */\n protected isQueryListNarrowed = computed(() => !!this.host.queryFilter().trim() || this.host.queryFacets().size > 0);\n\n constructor() {\n // Opens the fold when the selection lands on a member it does not render, so the detail pane always\n // has a row to match - a selection arriving from the Events tab has to say *which* consumer it is.\n // Selecting the fold's own head leaves it shut: the collapsed row already stands for that query.\n //\n // Only *opens*, never closes, and `untracked` is what keeps that true: `expandQueryGroup` reads the\n // expanded set to decide whether it has anything to do, and a tracked read of it would make\n // collapsing the fold re-run this and open it straight back up.\n effect(() => {\n const key = this.selectedGroupKey();\n\n if (key && !this.selectedIsFoldHead()) untracked(() => this.host.expandQueryGroup(key));\n });\n }\n\n /** Whether the selected query is one of this fold's - the row stands in for it while it is collapsed. */\n protected holdsSelection(group: QueryRowGroup) {\n return this.selectedGroupKey() === group.key;\n }\n\n /**\n * Opens the detail on the fold without expanding it. Every row in it is the same request, so the head\n * answers for all of them - and a fold already showing one of its own keeps that one selected.\n */\n protected selectGroup(group: QueryRowGroup) {\n if (this.holdsSelection(group)) return;\n\n this.host.selectedQueryId.set(group.head.entry.id);\n }\n\n /**\n * What tells one consumer of a folded query from another. They share a method, a route and a response -\n * what differs is where each was created, so the element it was created in is the only thing on a nested\n * row worth reading. The ordinal carries the ones created outside a component, and the ones several\n * instances of the same component created.\n */\n protected consumerLabel(item: QueryRow) {\n return this.host.locatableElement(item.entry)?.localName ?? null;\n }\n\n /**\n * The batch that created a fold's queries, or `null` for a fold of ordinary ones. Every query in a\n * batch fold has the same one, so the head answers for all of them.\n */\n protected batchEntryOf(group: QueryRowGroup) {\n return this.host.batchOf(group.head.entry);\n }\n\n /** The worst state in a folded group, so a collapsed row cannot hide the one instance that is failing. */\n protected groupStatus(group: QueryRowGroup): QueryStatus {\n const statuses = group.items.map((item) => this.host.queryStatus(item.query));\n\n if (statuses.includes('error')) return 'error';\n if (statuses.includes('loading')) return 'loading';\n if (statuses.includes('success')) return 'success';\n\n return 'idle';\n }\n\n protected isGroupStale(group: QueryRowGroup) {\n return group.items.some((item) => this.host.isStale(item.query));\n }\n\n protected isGroupTampered(group: QueryRowGroup) {\n return group.items.some((item) => this.host.isTampered(item.entry));\n }\n\n protected isGroupExpanded(group: QueryRowGroup) {\n return this.host.expandedQueryGroups().has(group.key);\n }\n\n protected forgetGoneQueries() {\n clearQueryDevtoolsTombstones(this.listedGoneQueries().map((item) => item.entry.id));\n // Left lit, the chip would narrow the list to the tombstones that were just dropped - an empty list.\n this.host.toggleFacet('gone');\n }\n\n protected downloadInsomniaCollection() {\n this.host.downloadInsomniaCollection(this.filteredQueries(), this.host.selectedClientName());\n }\n\n /**\n * When a query last ran, or `null` for one that never has. A tombstone's is frozen at whatever it held\n * when it died, so `destroyedAt` is the tiebreak that keeps gone entries ordered among themselves.\n */\n protected lastExecutedAt(item: QueryRow) {\n return item.query.lastTimeExecutedAt() ?? item.entry.destroyedAt ?? null;\n }\n\n /**\n * A tombstone is the last state a query held, not a state it is in, so the list leaves one out unless the\n * Gone chip asks for it - or the detail is showing it, so a query dying under the detail keeps its row.\n */\n private listsTombstone(entry: QueryDevtoolsEntry, facets: ReadonlySet<QueryListFacet>) {\n // A batch's settled items are the exception: the batch destroys each query the moment its item lands,\n // so every row of a finished run is a tombstone and the fold would vanish the moment it completed.\n // What the row stands for is the batch - which is still registered - not a query that is gone.\n if (this.host.batchOf(entry)) return true;\n\n return facets.has('gone') || (!facets.size && entry.id === this.host.selectedQueryId());\n }\n\n /**\n * Newest or oldest run first. A query that has **never** executed has no place on a time axis, so it\n * sinks to the bottom in *both* directions rather than piling up at whichever end `null` sorts to -\n * flipping the arrow must not turn the list into the queries that have not run yet.\n */\n private byLastExecuted(items: QueryRow[]) {\n const recentFirst = this.host.queryRecentFirst();\n\n // Copied first: `items` came out of a computed and `sort` is in place.\n return items.slice().sort((a, b) => {\n const left = this.lastExecutedAt(a);\n const right = this.lastExecutedAt(b);\n\n if (left === null || right === null) return Number(left === null) - Number(right === null);\n\n return recentFirst ? right - left : left - right;\n });\n }\n\n /**\n * Pinned queries first, everything else in {@link byLastExecuted} order. A chip could not do this job:\n * {@link matchesFacets} widens, so a Pinned chip would mean \"pinned or failing\" and never both.\n */\n private pinnedFirst(items: QueryRow[]) {\n if (!this.host.pinnedQueryIds().size) return items;\n\n // Copied first: `items` is a computed's cached array, and `sort` is in place.\n return items\n .slice()\n .sort((a, b) => Number(this.host.isQueryPinned(b.entry)) - Number(this.host.isQueryPinned(a.entry)));\n }\n\n /** A live query matches the chips if it is in any of the picked states - chips widen, they don't intersect. */\n private matchesFacets(item: QueryRow, facets: ReadonlySet<QueryListFacet>) {\n const status = this.host.queryStatus(item.query);\n\n return (\n (facets.has('error') && status === 'error') ||\n (facets.has('loading') && status === 'loading') ||\n (facets.has('idle') && status === 'idle') ||\n (facets.has('stale') && this.host.isStale(item.query))\n );\n }\n\n /** The route a row renders, as one string - what both the fold key and the path tree are built from. */\n private groupRoute(item: QueryRow) {\n return this.host\n .routeSegments(item.entry, item.query)\n .map((segment) => segment.text)\n .join('');\n }\n\n /**\n * The route a whole fold sits under in the path tree. A batch's is its route *template*, not the\n * resolved route of whichever item happens to be the head - the items differ in every path param, so\n * the head's route would put the run under a different leaf on every re-render.\n */\n private groupPathRoute(group: QueryRowGroup) {\n const batch = this.batchEntryOf(group);\n\n return batch ? (batch.meta.route ?? '') : this.groupRoute(group.head);\n }\n\n /** What makes two rows indistinguishable on screen. A tombstone never folds into a live query. */\n private groupKey(item: QueryRow) {\n const batch = this.host.batchOf(item.entry);\n\n // A batch's items fold by the run that created them rather than by what the row shows: they differ\n // in every path param, so nothing else would fold them, and a run only ever has `concurrency` of\n // them alive at a time - so an unfolded list is a handful of rows churning through the same slot.\n if (batch) return `batch|${batch.id}`;\n\n return `${item.entry.destroyedAt ? 'gone' : 'live'}|${item.entry.meta.method ?? ''}|${this.groupRoute(item)}`;\n }\n\n /**\n * What the search box matches against: what the row shows, plus the path of the request that ran for a\n * query whose template differs from it.\n *\n * Deliberately not the origin or the client name - both repeat across most entries, so a short term\n * (\"p\") would match nearly everything through the host name. Scoping to a client is the picker's job.\n */\n private queryHaystack(entry: QueryDevtoolsEntry, query: AnyQuery) {\n const url = this.host.requestUrl(query);\n const route = this.host\n .routeSegments(entry, query)\n .map((segment) => segment.text)\n .join('');\n const parts = [entry.meta.method, route, url ? this.host.requestPath(url) : null];\n\n return parts.join(' ').toLowerCase();\n }\n}\n","<div #panes class=\"et-query-devtools-master-detail\">\n <div class=\"et-query-devtools-list\">\n <div [class.et-query-devtools-toolbar--filtered]=\"!!host.inspectFilterIds()\" class=\"et-query-devtools-toolbar\">\n <!-- Search leads: it is what the list is narrowed with most of the time. The scope controls sit\n after it, and the count reads as the search's result rather than as one more control. -->\n <div class=\"et-query-devtools-toolbar-row\">\n <input\n #queryFilterInput\n [value]=\"host.queryFilter()\"\n (input)=\"host.queryFilter.set(queryFilterInput.value)\"\n class=\"et-query-devtools-search\"\n type=\"search\"\n placeholder=\"filter method / route / url…\"\n aria-label=\"Filter queries\"\n />\n @if (host.inspectFilterIds(); as ids) {\n <span class=\"et-query-devtools-filter-chip\">\n <span class=\"et-query-devtools-filter-icon\" aria-hidden=\"true\">⌖</span>\n Inspected element\n <span class=\"et-query-devtools-filter-count\">{{ ids.length }}</span>\n </span>\n <button\n (click)=\"host.clearInspectFilter()\"\n class=\"et-query-devtools-filter-clear\"\n type=\"button\"\n title=\"Clear the inspection filter and show all queries\"\n >\n <span aria-hidden=\"true\">✕</span>\n Clear\n </button>\n } @else {\n <select\n #clientSelect\n [value]=\"host.selectedClientName() ?? ''\"\n (change)=\"host.selectClient(clientSelect.value || null)\"\n class=\"et-query-devtools-select\"\n aria-label=\"Client\"\n >\n <option value=\"\">All clients</option>\n @for (name of host.clientNames(); track name) {\n <option [value]=\"name\">{{ name }}</option>\n }\n </select>\n }\n <span class=\"et-query-devtools-count\">\n @if (isQueryListNarrowed()) {\n {{ filteredQueries().length }} of {{ scopedQueryCount() }}\n } @else {\n {{ scopedQueryCount() }}\n }\n </span>\n <button\n [disabled]=\"!filteredQueries().length\"\n (click)=\"downloadInsomniaCollection()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Download the listed queries as an Insomnia collection, with the auth provider's token refresh\"\n >\n <span aria-hidden=\"true\">⤓</span>\n Insomnia\n </button>\n </div>\n\n <div class=\"et-query-devtools-toolbar-row\">\n @let recentFirst = host.queryRecentFirst();\n <div class=\"et-query-devtools-btn-group\">\n <button\n [title]=\"\n (recentFirst ? 'Newest run first.' : 'Oldest run first.') +\n ' Click to reverse. Queries that have never run stay at the bottom either way.'\n \"\n (click)=\"host.queryRecentFirst.set(!recentFirst)\"\n class=\"et-query-devtools-btn et-query-devtools-sort\"\n type=\"button\"\n >\n recent <span aria-hidden=\"true\">{{ recentFirst ? '↓' : '↑' }}</span>\n </button>\n @let treeView = host.queryTreeView();\n <button\n [class.et-query-devtools-btn--active]=\"treeView\"\n [attr.aria-pressed]=\"treeView\"\n [title]=\"\n treeView\n ? 'Grouped by route path. Click for the flat list.'\n : 'Flat list. Click to group by route path - segments nothing branches off are folded into one row.'\n \"\n (click)=\"host.queryTreeView.set(!treeView)\"\n class=\"et-query-devtools-btn et-query-devtools-sort\"\n type=\"button\"\n >\n <span aria-hidden=\"true\">⑂</span> tree\n </button>\n </div>\n <!-- Only the statuses something is actually in. Five chips, four of them reading `0`, were four\n controls that could not be pressed taking up the row that says what is wrong. -->\n @for (facet of visibleFacets(); track facet.id) {\n <button\n [class.et-query-devtools-facet--active]=\"facet.active\"\n [attr.aria-pressed]=\"facet.active\"\n (click)=\"host.toggleFacet(facet.id)\"\n class=\"et-query-devtools-chip et-query-devtools-facet\"\n type=\"button\"\n >\n {{ facet.label }}\n <span class=\"et-query-devtools-facet-count\">{{ facet.count }}</span>\n </button>\n }\n @let goneListed = listedGoneQueries().length;\n @if (goneListed) {\n <button\n (click)=\"forgetGoneQueries()\"\n class=\"et-query-devtools-forget\"\n type=\"button\"\n title=\"Drop the {{ goneListed }} destroyed queries listed below - they cannot be brought back\"\n >\n Forget {{ goneListed }}\n </button>\n }\n @if (isQueryListNarrowed()) {\n <button\n (click)=\"host.clearQueryFilters()\"\n class=\"et-query-devtools-filter-clear\"\n type=\"button\"\n title=\"Clear the search term and the status chips\"\n aria-label=\"Clear filters\"\n >\n <span aria-hidden=\"true\">✕</span>\n </button>\n }\n </div>\n </div>\n\n @if (host.queryTreeView()) {\n @for (row of queryTree(); track row.key) {\n @if (row.kind === 'folder') {\n <div [style.--_et-qdt-tree-depth]=\"row.depth\" class=\"et-query-devtools-row et-query-devtools-row--folder\">\n <button\n [attr.aria-expanded]=\"!row.collapsed\"\n [title]=\"\n (row.collapsed ? 'Expand' : 'Collapse') + ' /' + row.label + ' - ' + row.count + ' queries below it'\n \"\n (click)=\"host.toggleQueryPath(row.key)\"\n class=\"et-query-devtools-row-select\"\n type=\"button\"\n >\n <span class=\"et-query-devtools-row-caret\" aria-hidden=\"true\">{{ row.collapsed ? '▸' : '▾' }}</span>\n <span class=\"et-query-devtools-folder\">/{{ row.label }}</span>\n <span class=\"et-query-devtools-row-count\">{{ row.count }}</span>\n </button>\n </div>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"queryGroupBlock\"\n [ngTemplateOutletContext]=\"{ group: row.item, depth: row.depth, trim: row.parentPath }\"\n />\n }\n } @empty {\n <ng-container [ngTemplateOutlet]=\"emptyList\" />\n }\n } @else {\n @for (group of queryGroups(); track group.key) {\n <ng-container [ngTemplateOutlet]=\"queryGroupBlock\" [ngTemplateOutletContext]=\"{ group, depth: 0, trim: '' }\" />\n } @empty {\n <ng-container [ngTemplateOutlet]=\"emptyList\" />\n }\n }\n\n <!-- An empty scope is a different problem from a filter that matches nothing, and only the\n latter is the user's own doing - so it names the way out. -->\n <ng-template #emptyList>\n @if (scopedQueryCount()) {\n <p class=\"et-query-devtools-empty\">No query matches the filter · {{ scopedQueryCount() }} in scope.</p>\n } @else if (goneQueryCount()) {\n <p class=\"et-query-devtools-empty\">\n No query in scope still exists · pick Gone to list the {{ goneQueryCount() }} destroyed.\n </p>\n } @else if (host.inspectFilterIds()) {\n <p class=\"et-query-devtools-empty\">\n The inspected element's queries are no longer registered. Clear the filter.\n </p>\n } @else {\n <p class=\"et-query-devtools-empty\">No queries registered.</p>\n }\n </ng-template>\n\n <ng-template #queryGroupBlock let-group=\"group\" let-depth=\"depth\" let-trim=\"trim\">\n @if (batchEntryOf(group); as batchEntry) {\n <ng-container\n [ngTemplateOutlet]=\"batchGroupBlock\"\n [ngTemplateOutletContext]=\"{ group, batchEntry, depth, trim }\"\n />\n } @else if (group.items.length === 1) {\n <ng-container [ngTemplateOutlet]=\"queryRow\" [ngTemplateOutletContext]=\"{ item: group.head, depth, trim }\" />\n } @else {\n @let expanded = isGroupExpanded(group);\n @let head = group.head;\n @let groupGone = !!head.entry.destroyedAt;\n <div\n [style.--_et-qdt-tree-depth]=\"depth\"\n [class.et-query-devtools-row--active]=\"holdsSelection(group)\"\n class=\"et-query-devtools-row et-query-devtools-row--group\"\n >\n <!-- The caret is its own control: every row in the fold is the same request, so opening the\n fold and inspecting what it holds are two different intentions. -->\n <button\n [attr.aria-expanded]=\"expanded\"\n [attr.aria-label]=\"\n (expanded ? 'Collapse' : 'Expand') +\n ' the ' +\n group.items.length +\n ' consumers of this query - one registry entry each'\n \"\n [title]=\"\n (expanded ? 'Collapse' : 'Expand') +\n ' the ' +\n group.items.length +\n ' consumers of this query - one registry entry each'\n \"\n (click)=\"host.toggleQueryGroup(group.key)\"\n class=\"et-query-devtools-row-caret-btn\"\n type=\"button\"\n >\n <span class=\"et-query-devtools-row-caret\" aria-hidden=\"true\">{{ expanded ? '▾' : '▸' }}</span>\n </button>\n <button\n (click)=\"selectGroup(group)\"\n class=\"et-query-devtools-row-select\"\n type=\"button\"\n title=\"Inspect this request - all {{\n group.items.length\n }} consumers share it, so any of them answers for it\"\n >\n <span\n [attr.data-status]=\"groupGone ? null : groupStatus(group)\"\n [title]=\"groupGone ? 'destroyed' : groupStatus(group)\"\n class=\"et-query-devtools-status\"\n ></span>\n <span class=\"et-query-devtools-method\">{{ head.entry.meta.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"host.routeSegments(head.entry, head.query)\" [trimPrefix]=\"trim\" />\n </span>\n @if (groupGone) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"These queries no longer exist - what you see is the last state they held, frozen\"\n >\n gone\n </span>\n }\n @if (!groupGone && isGroupStale(group)) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">stale</span>\n }\n @if (isGroupTampered(group)) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--error\"\n title=\"At least one of these is showing an armed response override or a devtools-injected failure\"\n >\n tampered\n </span>\n }\n <span class=\"et-query-devtools-row-count\" title=\"Consumers of this one request\">\n ×{{ group.items.length }}\n </span>\n <span class=\"et-query-devtools-row-time\">{{ host.formatTime(lastExecutedAt(head)) }}</span>\n </button>\n </div>\n @if (expanded) {\n @for (item of group.items; track item.entry.id) {\n <ng-container\n [ngTemplateOutlet]=\"queryRow\"\n [ngTemplateOutletContext]=\"{ item, nested: true, ordinal: $index + 1, depth, trim }\"\n />\n }\n }\n }\n </ng-template>\n\n <!-- A bulk run's items, folded under the run rather than under what a row shows. They only exist\n while in flight - the batch destroys each item's query as it settles - so this row stands for\n the whole run, and the Batches tab is where its settled items are. -->\n <ng-template #batchGroupBlock let-group=\"group\" let-batchEntry=\"batchEntry\" let-depth=\"depth\" let-trim=\"trim\">\n @let batch = host.asBatch(batchEntry);\n @let expanded = isGroupExpanded(group);\n @let toggleLabel =\n (expanded ? 'Collapse' : 'Expand') + ' the ' + group.items.length + ' requests this batch has in flight';\n <div\n [style.--_et-qdt-tree-depth]=\"depth\"\n [class.et-query-devtools-row--active]=\"holdsSelection(group)\"\n class=\"et-query-devtools-row et-query-devtools-row--group\"\n >\n <button\n [attr.aria-expanded]=\"expanded\"\n [attr.aria-label]=\"toggleLabel\"\n [title]=\"toggleLabel\"\n (click)=\"host.toggleQueryGroup(group.key)\"\n class=\"et-query-devtools-row-caret-btn\"\n type=\"button\"\n >\n <span class=\"et-query-devtools-row-caret\" aria-hidden=\"true\">{{ expanded ? '▾' : '▸' }}</span>\n </button>\n <button\n (click)=\"selectGroup(group)\"\n class=\"et-query-devtools-row-select\"\n type=\"button\"\n title=\"One item of a batch run - {{ batch.completed() }} of {{\n batch.total()\n }} settled. The Batches tab has the whole run.\"\n >\n <span\n [attr.data-status]=\"groupStatus(group)\"\n [title]=\"groupStatus(group)\"\n class=\"et-query-devtools-status\"\n ></span>\n <span class=\"et-query-devtools-method\">{{ batchEntry.meta.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"host.batchRouteSegments(batchEntry)\" [trimPrefix]=\"trim\" />\n </span>\n <span\n class=\"et-query-devtools-chip\"\n title=\"Registered by createQueryBatch - inspect the run on the Batches tab\"\n >\n batch {{ batch.completed() }}/{{ batch.total() }}\n </span>\n @if (batch.failed()) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--error\">{{ batch.failed() }} failed</span>\n }\n <span class=\"et-query-devtools-row-count\" title=\"Requests this batch has in flight\">\n ×{{ group.items.length }}\n </span>\n <span class=\"et-query-devtools-row-time\">{{ host.formatTime(lastExecutedAt(group.head)) }}</span>\n </button>\n </div>\n @if (expanded) {\n @for (item of group.items; track item.entry.id) {\n <ng-container\n [ngTemplateOutlet]=\"queryRow\"\n [ngTemplateOutletContext]=\"{ item, nested: true, showRoute: true, depth, trim }\"\n />\n }\n }\n </ng-template>\n\n <ng-template\n #queryRow\n let-item=\"item\"\n let-nested=\"nested\"\n let-showRoute=\"showRoute\"\n let-ordinal=\"ordinal\"\n let-depth=\"depth\"\n let-trim=\"trim\"\n >\n @let isGone = !!item.entry.destroyedAt;\n @let isPinned = host.isQueryPinned(item.entry);\n @let pinLabel = isPinned ? 'Unpin this query' : 'Pin this query to the top of the list';\n <div\n [style.--_et-qdt-tree-depth]=\"depth\"\n [class.et-query-devtools-row--active]=\"host.selectedQueryId() === item.entry.id\"\n [class.et-query-devtools-row--gone]=\"isGone\"\n [class.et-query-devtools-row--nested]=\"nested\"\n class=\"et-query-devtools-row\"\n >\n <button (click)=\"host.selectedQueryId.set(item.entry.id)\" class=\"et-query-devtools-row-select\" type=\"button\">\n <span class=\"et-query-devtools-row-caret\" aria-hidden=\"true\"></span>\n <span\n [attr.data-status]=\"isGone ? null : host.queryStatus(item.query)\"\n [title]=\"isGone ? 'destroyed' : host.queryStatus(item.query)\"\n class=\"et-query-devtools-status\"\n ></span>\n <span class=\"et-query-devtools-method\">{{ item.entry.meta.method }}</span>\n <!-- Inside a fold the route is the fold's own head, repeated once per consumer. Where the query\n was created is the only thing that differs, so that is what the row says instead. A batch\n fold is the exception: its items differ in the route, which is why `showRoute` is set. -->\n @if (nested && !showRoute) {\n <span class=\"et-query-devtools-consumer\">\n @if (consumerLabel(item); as consumer) {\n <{{ consumer }}>\n } @else {\n created outside a component\n }\n </span>\n <span class=\"et-query-devtools-row-count\">#{{ ordinal }}</span>\n } @else {\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"host.routeSegments(item.entry, item.query)\" [trimPrefix]=\"trim\" />\n </span>\n }\n @if (isGone) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"This query no longer exists - what you see is the last state it held, frozen\"\n >\n gone\n </span>\n }\n <!-- A retry is the one thing a loading dot actively misrepresents: it reads as a request\n on its way when nothing is in flight at all. -->\n @if (!isGone && host.requestProgress(item.query)?.retry; as retry) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--loading\"\n title=\"Waiting out a retry backoff before attempt {{ retry.attempt }}\"\n >\n <span class=\"et-query-devtools-retry-glyph\" aria-hidden=\"true\">⟳</span>\n {{ retry.attempt }}\n </span>\n }\n @if (!isGone && host.isStale(item.query)) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">stale</span>\n }\n @if (host.isTampered(item.entry)) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--error\"\n title=\"Showing an armed response override or a devtools-injected failure, not what the server actually sent\"\n >\n tampered\n </span>\n }\n <span class=\"et-query-devtools-row-time\">{{ host.formatTime(lastExecutedAt(item)) }}</span>\n </button>\n <button\n [class.et-query-devtools-row-pin--active]=\"isPinned\"\n [title]=\"pinLabel\"\n [attr.aria-label]=\"pinLabel\"\n [attr.aria-pressed]=\"isPinned\"\n (click)=\"host.toggleQueryPin(item.entry)\"\n class=\"et-query-devtools-row-pin\"\n type=\"button\"\n >\n <span aria-hidden=\"true\">{{ isPinned ? '★' : '☆' }}</span>\n </button>\n </div>\n </ng-template>\n </div>\n\n <div\n (pointerdown)=\"host.startPaneResize($event, { pane: 'list', container: panes })\"\n (dblclick)=\"host.resetPaneSize('list')\"\n class=\"et-query-devtools-pane-resize\"\n title=\"Drag to resize, double-click to reset\"\n aria-hidden=\"true\"\n ></div>\n\n <div class=\"et-query-devtools-detail\">\n @if (host.selectedQuery(); as sel) {\n <et-query-devtools-detail [sel]=\"sel\" />\n } @else {\n <p class=\"et-query-devtools-empty\">Select a query to inspect it.</p>\n }\n </div>\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n/**\n * The expandable step/item row shared by the Sequences and Batches tabs, as a styles-only component each\n * of them mounts. It cannot live in either tab's own stylesheet: a tab's CSS is injected when that tab is\n * first opened, so the Batches tab would render unstyled rows until Sequences had been visited.\n *\n * @internal\n */\n@Component({\n selector: 'et-query-devtools-step-styles',\n template: '',\n styleUrl: './query-devtools-step-styles.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class QueryDevtoolsStepStylesComponent {}\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { injectStyleManager } from '@ethlete/core';\nimport { AnyQueryBatchItemResult } from '@ethlete/query';\nimport { QueryDevtoolsDrawerComponent } from './query-devtools-drawer.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\nimport { QueryDevtoolsRouteComponent } from './query-devtools-route.component';\nimport { QueryDevtoolsStepStylesComponent } from './query-devtools-step-styles.component';\n\n/** The Batches tab: registered `createQueryBatch` runs, their progress and every item's outcome. */\n@Component({\n selector: 'et-query-devtools-batches-tab',\n templateUrl: './query-devtools-batches-tab.component.html',\n styleUrl: './query-devtools-batches-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsDrawerComponent, QueryDevtoolsJsonComponent, QueryDevtoolsRouteComponent],\n})\nexport class QueryDevtoolsBatchesTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n constructor() {\n injectStyleManager().mount(QueryDevtoolsStepStylesComponent);\n }\n\n /**\n * The dot an item's outcome gets. Skipped and not-attempted items share the neutral one: neither\n * reached the API, and a red dot for either would read as something the run has to recover from.\n */\n protected itemStatus(result: AnyQueryBatchItemResult) {\n return result.status === 'success' || result.status === 'error' ? result.status : null;\n }\n\n /** Whether the item was actually sent, which is what decides it has an in/out worth rendering. */\n protected wasSent(result: AnyQueryBatchItemResult) {\n return result.status === 'success' || result.status === 'error';\n }\n\n protected itemArgs(result: AnyQueryBatchItemResult) {\n return this.wasSent(result) ? (result as { args: unknown }).args : null;\n }\n\n protected itemResponse(result: AnyQueryBatchItemResult) {\n return result.status === 'success' ? result.response : null;\n }\n\n /** The error body of a failed item, as the value explorer wants it. */\n protected itemError(result: AnyQueryBatchItemResult) {\n if (result.status !== 'error') return null;\n\n return { status: result.error.raw.status, body: result.error.isList ? result.error.errors : result.error.error };\n }\n}\n","<div #panes class=\"et-query-devtools-split\">\n <div class=\"et-query-devtools-scroll\">\n @for (entry of host.batchEntries(); track entry.id) {\n @let batch = host.asBatch(entry);\n @if (batch) {\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <span class=\"et-query-devtools-chip\">batch</span>\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">{{ batch.status() }}</span>\n <span class=\"et-query-devtools-method\">{{ entry.meta.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"host.batchRouteSegments(entry)\" fallback=\"no route\" />\n </span>\n <span class=\"et-query-devtools-count\">{{ batch.completed() }} / {{ batch.total() }}</span>\n </div>\n\n <div class=\"et-query-devtools-batch-bar\" role=\"presentation\">\n <!-- Coloured by the run, not by whether an item failed: a bar filled red end to end reads as\n \"nothing landed\", which is the opposite of what a partial run means. -->\n <span\n [style.inline-size.%]=\"batch.progress()\"\n [attr.data-status]=\"batch.status()\"\n class=\"et-query-devtools-batch-bar-fill\"\n ></span>\n </div>\n\n <dl class=\"et-query-devtools-meta\">\n <dt>Outcomes</dt>\n <dd>\n @if (batch.total()) {\n {{ batch.succeeded() }} ok\n @if (batch.failed()) {\n · <span class=\"et-query-devtools-batch-failed\">{{ batch.failed() }} failed</span>\n }\n @if (batch.skipped()) {\n · {{ batch.skipped() }} skipped\n }\n @let notAttempted = batch.total() - batch.completed();\n @if (!batch.running() && notAttempted) {\n · {{ notAttempted }} not attempted\n }\n } @else {\n — never run\n }\n </dd>\n\n <dt>Throughput</dt>\n <dd>\n @if (host.batchThroughput(batch); as throughput) {\n {{ throughput }}\n } @else if (batch.running()) {\n measuring…\n } @else if (batch.total()) {\n <span title=\"A rate needs the first `concurrency` items and a couple of seconds of run time\">\n run too short to measure\n </span>\n } @else {\n —\n }\n </dd>\n\n <dt>In flight</dt>\n <dd>\n {{ batch.inFlight() }} of {{ entry.meta.concurrency }} concurrent\n @if (entry.meta.stopOnError) {\n · stops on the first failure\n }\n </dd>\n </dl>\n\n <!-- Only what is in flight: the batch destroys an item's query the moment it settles, so a\n settled item is in the list below instead of here. -->\n @let inFlight = host.queriesForBatch(entry);\n @if (inFlight.length) {\n <h5 class=\"et-query-devtools-section\">In flight</h5>\n <ul class=\"et-query-devtools-step-list\">\n @for (link of inFlight; track link.id) {\n <li>\n <button\n [class.et-query-devtools-inner-row--active]=\"host.batchSelectedQueryId() === link.id\"\n (click)=\"host.batchSelectedQueryId.set(link.id)\"\n class=\"et-query-devtools-inner-row\"\n type=\"button\"\n >\n <span class=\"et-query-devtools-status\" data-status=\"loading\"></span>\n <span class=\"et-query-devtools-method\">{{ link.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"link.segments\" fallback=\"in flight\" />\n </span>\n </button>\n </li>\n }\n </ul>\n }\n\n @let items = host.batchItems(entry);\n @if (items.rows.length) {\n <h5 class=\"et-query-devtools-section\">\n Items\n @if (items.hidden) {\n <span class=\"et-query-devtools-count\" title=\"Failures are listed first, so the cap never drops one\">\n {{ items.rows.length }} of {{ items.total }} · {{ items.hidden }} not listed\n </span>\n } @else {\n <span class=\"et-query-devtools-count\">{{ items.total }}</span>\n }\n </h5>\n\n <ol class=\"et-query-devtools-step-list\">\n @for (row of items.rows; track row.result.index) {\n @let result = row.result;\n @let expanded = host.isBatchItemExpanded(entry.id, result.index);\n @let itemQueryId = host.batchItemQueryId(entry, result.index);\n <li [attr.data-status]=\"itemStatus(result)\" class=\"et-query-devtools-step-item\">\n <div class=\"et-query-devtools-step-head\">\n <!-- The row opens the item's own query in the drawer, the way a sequence step does.\n Disabled once that query has fallen out of the batch's capped tombstone tail -\n the caret below still has this item's args and outcome either way. -->\n <button\n [class.et-query-devtools-inner-row--active]=\"\n !!itemQueryId && host.batchSelectedQueryId() === itemQueryId\n \"\n [disabled]=\"!itemQueryId\"\n [title]=\"\n itemQueryId\n ? 'Inspect this item\\'s request'\n : 'This item\\'s query is no longer kept - open the row for its args and outcome'\n \"\n (click)=\"host.batchSelectedQueryId.set(itemQueryId)\"\n class=\"et-query-devtools-inner-row\"\n type=\"button\"\n >\n <span\n [attr.data-status]=\"itemStatus(result)\"\n [title]=\"result.status\"\n class=\"et-query-devtools-status\"\n ></span>\n <span class=\"et-query-devtools-method\">#{{ result.index }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"row.segments\" fallback=\"not sent\" />\n </span>\n <!-- The dot already says success or error; only an item that never went out needs\n a word, since a neutral dot alone cannot tell the two reasons apart. -->\n @if (!wasSent(result)) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">{{ result.status }}</span>\n }\n </button>\n <button\n [attr.aria-expanded]=\"expanded\"\n (click)=\"host.toggleBatchItem(entry.id, result.index)\"\n class=\"et-query-devtools-step-caret-btn\"\n type=\"button\"\n title=\"Toggle in / out\"\n >\n {{ expanded ? '▾' : '▸' }}\n </button>\n </div>\n\n @if (expanded) {\n <div class=\"et-query-devtools-step-io\">\n <h5 class=\"et-query-devtools-section\">Item</h5>\n <et-query-devtools-json [value]=\"result.item\" />\n\n @if (wasSent(result)) {\n <h5 class=\"et-query-devtools-section\">In · args</h5>\n <et-query-devtools-json [value]=\"itemArgs(result)\" />\n\n @if (itemError(result); as error) {\n <h5 class=\"et-query-devtools-section\">Out · error ({{ error.status }})</h5>\n <et-query-devtools-json [value]=\"error.body\" />\n } @else {\n <h5 class=\"et-query-devtools-section\">Out · response</h5>\n <et-query-devtools-json [value]=\"itemResponse(result)\" />\n }\n } @else {\n <p class=\"et-query-devtools-empty\">\n @if (result.status === 'skipped') {\n The args function returned null, so nothing was sent.\n } @else {\n Still queued when the run stopped - nothing was sent.\n }\n </p>\n }\n </div>\n }\n </li>\n }\n </ol>\n }\n </div>\n }\n } @empty {\n <p class=\"et-query-devtools-empty\">No batches registered.</p>\n }\n </div>\n\n <et-query-devtools-drawer\n [sel]=\"host.batchSelectedQuery()\"\n [container]=\"panes\"\n (dismiss)=\"host.batchSelectedQueryId.set(null)\"\n />\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { injectStyleManager } from '@ethlete/core';\nimport { QueryDevtoolsDrawerComponent } from './query-devtools-drawer.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\nimport { QueryDevtoolsRouteComponent } from './query-devtools-route.component';\nimport { QueryDevtoolsStepStylesComponent } from './query-devtools-step-styles.component';\n\n/** The Sequences tab: registered `QuerySequence` instances, step-by-step, with a split-view drawer. */\n@Component({\n selector: 'et-query-devtools-sequences-tab',\n templateUrl: './query-devtools-sequences-tab.component.html',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsDrawerComponent, QueryDevtoolsJsonComponent, QueryDevtoolsRouteComponent],\n})\nexport class QueryDevtoolsSequencesTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n constructor() {\n injectStyleManager().mount(QueryDevtoolsStepStylesComponent);\n }\n}\n","<div #panes class=\"et-query-devtools-split\">\n <div class=\"et-query-devtools-scroll\">\n @for (entry of host.sequenceEntries(); track entry.id) {\n @let sequence = host.asSequence(entry);\n @if (sequence) {\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <span class=\"et-query-devtools-chip\">sequence</span>\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">{{ sequence.status() }}</span>\n <span class=\"et-query-devtools-count\">step {{ sequence.currentStep() }} / {{ sequence.total }}</span>\n </div>\n\n <dl class=\"et-query-devtools-meta\">\n <dt>Traffic</dt>\n <dd>\n @let activity = host.sequenceActivity(sequence);\n @if (activity.hasActivity) {\n {{ activity.stats.requests }} request{{ activity.stats.requests === 1 ? '' : 's' }} · ↓\n {{ host.formatTransferred(activity.stats.receivedBytes, activity.stats.hasEstimatedBytes) }}\n @if (activity.stats.sentBytes) {\n · ↑ {{ host.formatTransferred(activity.stats.sentBytes, activity.stats.hasEstimatedBytes) }}\n }\n @if (activity.cacheServed) {\n · {{ activity.cacheServed }} from cache\n }\n @if (activity.stats.errors) {\n · {{ activity.stats.errors }} failed\n }\n } @else {\n —\n }\n </dd>\n </dl>\n\n <ol class=\"et-query-devtools-step-list\">\n @for (link of host.queriesForSequence(sequence); track $index; let i = $index) {\n <li [attr.data-status]=\"host.sequenceStepStatus(sequence, i)\" class=\"et-query-devtools-step-item\">\n <div class=\"et-query-devtools-step-head\">\n <button\n [class.et-query-devtools-inner-row--active]=\"host.sequenceSelectedQueryId() === link.id\"\n [disabled]=\"!link.id\"\n (click)=\"host.sequenceSelectedQueryId.set(link.id)\"\n class=\"et-query-devtools-inner-row\"\n type=\"button\"\n >\n <span\n [attr.data-status]=\"host.sequenceStepStatus(sequence, i)\"\n class=\"et-query-devtools-status\"\n ></span>\n <span class=\"et-query-devtools-method\">{{ i + 1 }}. {{ link.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"link.segments\" [fallback]=\"'step ' + (i + 1)\" />\n </span>\n </button>\n <button\n [attr.aria-expanded]=\"host.isStepExpanded(entry.id, i)\"\n (click)=\"host.toggleStep(entry.id, i)\"\n class=\"et-query-devtools-step-caret-btn\"\n type=\"button\"\n title=\"Toggle in / out\"\n >\n {{ host.isStepExpanded(entry.id, i) ? '▾' : '▸' }}\n </button>\n </div>\n\n @if (host.isStepExpanded(entry.id, i)) {\n @let snap = host.stepSnapshot(sequence, i);\n <div class=\"et-query-devtools-step-io\">\n <h5 class=\"et-query-devtools-section\">In · args</h5>\n @if (sequence.stepArgs().length > i) {\n <et-query-devtools-json [value]=\"sequence.stepArgs()[i]\" />\n } @else {\n <p class=\"et-query-devtools-empty\">Not run yet.</p>\n }\n\n @if (snap?.error(); as error) {\n <h5 class=\"et-query-devtools-section\">Out · error ({{ error.raw.status }})</h5>\n <et-query-devtools-json [value]=\"error.isList ? error.errors : error.error\" />\n } @else {\n <h5 class=\"et-query-devtools-section\">Out · response</h5>\n @if (snap) {\n <et-query-devtools-json [value]=\"snap.response()\" />\n } @else {\n <p class=\"et-query-devtools-empty\">Not run yet.</p>\n }\n }\n </div>\n }\n </li>\n }\n </ol>\n </div>\n }\n } @empty {\n <p class=\"et-query-devtools-empty\">No sequences registered.</p>\n }\n </div>\n\n <et-query-devtools-drawer\n [sel]=\"host.sequenceSelectedQuery()\"\n [container]=\"panes\"\n (dismiss)=\"host.sequenceSelectedQueryId.set(null)\"\n />\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsJsonComponent } from './query-devtools-json.component';\n\n/** The Sockets tab: registered `WebSocketDevtoolsHandle`s, their rooms, and a message log per client. */\n@Component({\n selector: 'et-query-devtools-sockets-tab',\n templateUrl: './query-devtools-sockets-tab.component.html',\n styleUrl: './query-devtools-sockets-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsJsonComponent],\n})\nexport class QueryDevtoolsSocketsTabComponent {\n protected host = injectQueryDevtoolsHost();\n}\n","<div class=\"et-query-devtools-scroll\">\n @if (host.wsEntries().length) {\n <div class=\"et-query-devtools-toolbar\">\n <div class=\"et-query-devtools-toolbar-row\">\n <input\n #socketFilterInput\n [value]=\"host.socketFilter()\"\n (input)=\"host.socketFilter.set(socketFilterInput.value)\"\n class=\"et-query-devtools-search\"\n type=\"search\"\n placeholder=\"filter event / room / direction…\"\n aria-label=\"Filter socket messages\"\n />\n @if (host.socketFilter()) {\n <button\n (click)=\"host.socketFilter.set('')\"\n class=\"et-query-devtools-filter-clear\"\n type=\"button\"\n title=\"Clear the message filter\"\n aria-label=\"Clear the message filter\"\n >\n <span aria-hidden=\"true\">✕</span>\n </button>\n }\n </div>\n </div>\n }\n\n @for (entry of host.wsEntries(); track entry.id) {\n @let ws = host.asWs(entry);\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <strong>{{ entry.meta.name || 'socket' }}</strong>\n <span\n [class.et-query-devtools-chip--success]=\"ws.connected()\"\n [class.et-query-devtools-chip--muted]=\"!ws.connected()\"\n class=\"et-query-devtools-chip\"\n >\n {{ ws.connected() ? 'connected' : 'disconnected' }}\n </span>\n </div>\n <dl class=\"et-query-devtools-meta\">\n <dt>URL</dt>\n <dd class=\"et-query-devtools-mono\">{{ entry.meta.url }}</dd>\n <dt>Rooms</dt>\n <dd>\n @if (ws.rooms().length) {\n <div class=\"et-query-devtools-chips\">\n @for (room of ws.rooms(); track room) {\n <span class=\"et-query-devtools-chip\">{{ room }}</span>\n }\n </div>\n } @else {\n none\n }\n </dd>\n </dl>\n\n <div class=\"et-query-devtools-section-row\">\n <h5 class=\"et-query-devtools-section\">Emit</h5>\n <span class=\"et-query-devtools-hint\">\n Sends as the app would, so a server that only answers a client that asked can be provoked from here.\n </span>\n </div>\n <div class=\"et-query-devtools-emit\">\n <input #emitEvent class=\"et-query-devtools-input\" type=\"text\" placeholder=\"event\" aria-label=\"Event to emit\" />\n <input\n #emitData\n class=\"et-query-devtools-input\"\n type=\"text\"\n placeholder=\"JSON payload (optional)\"\n aria-label=\"Payload to emit\"\n />\n <button\n (click)=\"host.emitSocketMessage({ entry, event: emitEvent.value, data: emitData.value })\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n ↑ Send\n </button>\n </div>\n @if (host.socketEmitErrorFor(entry.id); as emitError) {\n <p class=\"et-query-devtools-editor-error\">{{ emitError }}</p>\n }\n\n @let messages = host.socketMessages(ws);\n <div class=\"et-query-devtools-section-row\">\n <h5 class=\"et-query-devtools-section\">Messages</h5>\n <span class=\"et-query-devtools-count\">\n @if (host.socketFilter()) {\n {{ messages.length }} of {{ ws.messages().length }}\n } @else {\n {{ messages.length }}\n }\n </span>\n </div>\n @for (message of messages; track message.id) {\n <div [attr.data-direction]=\"message.direction\" class=\"et-query-devtools-ws-message\">\n <div class=\"et-query-devtools-card-head\">\n <span class=\"et-query-devtools-count\">{{ host.formatTime(message.timestamp) }}</span>\n <span class=\"et-query-devtools-ws-direction\">{{ host.socketDirectionLabel(message) }}</span>\n @if (message.room) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">{{ message.room }}</span>\n }\n <span class=\"et-query-devtools-method\">{{ message.event }}</span>\n </div>\n @if (message.data !== undefined) {\n <et-query-devtools-json [value]=\"message.data\" />\n }\n </div>\n } @empty {\n @if (ws.messages().length) {\n <p class=\"et-query-devtools-empty\">No message matches the filter · {{ ws.messages().length }} in the log.</p>\n } @else {\n <p class=\"et-query-devtools-empty\">Nothing sent or received yet.</p>\n }\n }\n </div>\n } @empty {\n <p class=\"et-query-devtools-empty\">No web socket clients registered.</p>\n }\n</div>\n","import { NgTemplateOutlet } from '@angular/common';\nimport { Component, ViewEncapsulation } from '@angular/core';\nimport { AnyPagedQueryStack, AnyQueryStack } from '@ethlete/query';\nimport { QueryDevtoolsDrawerComponent } from './query-devtools-drawer.component';\nimport { QueryDevtoolsFeaturesComponent } from './query-devtools-features.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsRouteComponent } from './query-devtools-route.component';\n\n/** The Stacks tab: registered `QueryStack`/`PagedQueryStack` instances, each with a split-view drawer. */\n@Component({\n selector: 'et-query-devtools-stacks-tab',\n templateUrl: './query-devtools-stacks-tab.component.html',\n styleUrl: './query-devtools-stacks-tab.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [\n NgTemplateOutlet,\n QueryDevtoolsDrawerComponent,\n QueryDevtoolsFeaturesComponent,\n QueryDevtoolsRouteComponent,\n ],\n})\nexport class QueryDevtoolsStacksTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n /** Identifying info for a stack, derived from its (uniform) inner queries. */\n protected stackIdentity(stack: AnyQueryStack | AnyPagedQueryStack) {\n const first = this.host.queriesForStack(stack)[0];\n\n return { method: first?.method ?? '', segments: first?.segments ?? [], baseUrl: first?.clientBaseUrl ?? '' };\n }\n}\n","<div #panes class=\"et-query-devtools-split\">\n <div class=\"et-query-devtools-scroll\">\n @for (entry of host.stackEntries(); track entry.id) {\n @if (entry.kind === 'paged-query-stack') {\n @let paged = host.asPagedStack(entry);\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <span class=\"et-query-devtools-chip\">paged stack</span>\n <span class=\"et-query-devtools-chip et-query-devtools-chip--muted\">{{ paged.direction() }}</span>\n @if (paged.loading()) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--loading\">loading</span>\n }\n </div>\n\n @let pagedId = stackIdentity(paged);\n <div class=\"et-query-devtools-card-title\">\n <span class=\"et-query-devtools-method\">{{ pagedId.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"pagedId.segments\" />\n </span>\n </div>\n <div class=\"et-query-devtools-card-sub et-query-devtools-mono\">{{ pagedId.baseUrl }}</div>\n @if (entry.meta.features?.length) {\n <et-query-devtools-features [features]=\"entry.meta.features ?? []\" />\n }\n\n <dl class=\"et-query-devtools-meta\">\n <dt>Pages loaded</dt>\n <dd>{{ paged.queries().length }}</dd>\n <dt>Items</dt>\n <dd>{{ paged.items().length }}</dd>\n <dt>First page loaded</dt>\n <dd>{{ paged.isFirstPageLoaded() }}</dd>\n <dt>Last page loaded</dt>\n <dd>{{ paged.isLastPageLoaded() }}</dd>\n <ng-container *ngTemplateOutlet=\"activityRow; context: { activity: host.stackActivity(paged) }\" />\n </dl>\n <ng-container *ngTemplateOutlet=\"innerQueries; context: { links: host.queriesForStack(paged) }\" />\n </div>\n } @else {\n @let stack = host.asStack(entry);\n <div class=\"et-query-devtools-card\">\n <div class=\"et-query-devtools-card-head\">\n <span class=\"et-query-devtools-chip\">stack</span>\n @if (stack.anyLoading()) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--loading\">loading</span>\n }\n @if (stack.anyError()) {\n <span class=\"et-query-devtools-chip et-query-devtools-chip--error\">error</span>\n }\n </div>\n\n @let stackId = stackIdentity(stack);\n <div class=\"et-query-devtools-card-title\">\n <span class=\"et-query-devtools-method\">{{ stackId.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"stackId.segments\" />\n </span>\n </div>\n <div class=\"et-query-devtools-card-sub et-query-devtools-mono\">{{ stackId.baseUrl }}</div>\n @if (entry.meta.features?.length) {\n <et-query-devtools-features [features]=\"entry.meta.features ?? []\" />\n }\n\n <dl class=\"et-query-devtools-meta\">\n <dt>Queries</dt>\n <dd>{{ stack.queries().length }}</dd>\n <dt>Loading</dt>\n <dd>{{ stack.loadingProgress().loaded }} / {{ stack.loadingProgress().total }}</dd>\n <dt>Errors</dt>\n <dd>{{ stack.errors().length }}</dd>\n <ng-container *ngTemplateOutlet=\"activityRow; context: { activity: host.stackActivity(stack) }\" />\n </dl>\n <ng-container *ngTemplateOutlet=\"innerQueries; context: { links: host.queriesForStack(stack) }\" />\n </div>\n }\n } @empty {\n <p class=\"et-query-devtools-empty\">No stacks registered.</p>\n }\n </div>\n\n <et-query-devtools-drawer\n [sel]=\"host.stackSelectedQuery()\"\n [container]=\"panes\"\n (dismiss)=\"host.stackSelectedQueryId.set(null)\"\n />\n</div>\n\n<!-- Reusable dt/dd pair for a card's `et-query-devtools-meta` list: what its queries ran and moved. -->\n<ng-template #activityRow let-activity=\"activity\">\n <dt>Traffic</dt>\n <dd>\n @if (activity.hasActivity) {\n {{ activity.stats.requests }} request{{ activity.stats.requests === 1 ? '' : 's' }} · ↓\n {{ host.formatTransferred(activity.stats.receivedBytes, activity.stats.hasEstimatedBytes) }}\n @if (activity.stats.sentBytes) {\n · ↑ {{ host.formatTransferred(activity.stats.sentBytes, activity.stats.hasEstimatedBytes) }}\n }\n @if (activity.cacheServed) {\n · {{ activity.cacheServed }} from cache\n }\n @if (activity.stats.errors) {\n · {{ activity.stats.errors }} failed\n }\n } @else {\n —\n }\n </dd>\n</ng-template>\n\n<!-- Reusable inner-query list — clicking opens the split-view drawer, not a tab switch. -->\n<ng-template #innerQueries let-links=\"links\">\n <div class=\"et-query-devtools-inner-queries\">\n @for (link of links; track $index) {\n <button\n [class.et-query-devtools-inner-row--active]=\"host.stackSelectedQueryId() === link.id\"\n [disabled]=\"!link.id\"\n (click)=\"host.stackSelectedQueryId.set(link.id)\"\n class=\"et-query-devtools-inner-row\"\n type=\"button\"\n >\n <span [attr.data-status]=\"host.queryStatus(link.query)\" class=\"et-query-devtools-status\"></span>\n <span class=\"et-query-devtools-method\">{{ link.method }}</span>\n <span class=\"et-query-devtools-route\">\n <et-query-devtools-route [segments]=\"link.segments\" [fallback]=\"link.query.id() || 'query ' + ($index + 1)\" />\n </span>\n @let linkStats = host.linkActivity(link);\n @if (linkStats.hasActivity) {\n <span class=\"et-query-devtools-traffic\">\n {{ host.formatTransferred(linkStats.stats.receivedBytes, linkStats.stats.hasEstimatedBytes) }}\n </span>\n }\n </button>\n }\n </div>\n</ng-template>\n","import { Component, computed, ViewEncapsulation } from '@angular/core';\nimport { injectStyleManager } from '@ethlete/core';\nimport { QueryDevtoolsEntry, QueryDevtoolsRun } from '@ethlete/query';\nimport { QueryDevtoolsDrawerComponent } from './query-devtools-drawer.component';\nimport { injectQueryDevtoolsHost } from './query-devtools-host';\nimport { QueryDevtoolsTimelineStylesComponent } from './query-devtools-timeline-styles.component';\nimport { AnyQuery, Timeline, TimelineRow } from './query-devtools-types';\n\n/** Past this many rows, the timeline keeps the newest and counts the rest instead of drawing them. */\nconst MAX_TIMELINE_ROWS = 200;\n\n/** Where the timeline's axis labels sit, as fractions of the window. */\nconst TIMELINE_TICKS = [0, 0.25, 0.5, 0.75, 1];\n\n/** The Timeline tab: every scoped query's runs laid out on one shared axis, so overlap and chains show. */\n@Component({\n selector: 'et-query-devtools-timeline-tab',\n templateUrl: './query-devtools-timeline-tab.component.html',\n encapsulation: ViewEncapsulation.None,\n imports: [QueryDevtoolsDrawerComponent],\n})\nexport class QueryDevtoolsTimelineTabComponent {\n protected host = injectQueryDevtoolsHost();\n\n /**\n * Every run the scoped queries have recorded, oldest first. The client picker and the inspection\n * filter narrow the timeline the same way they narrow the Queries list.\n */\n private scopedRuns = computed(() => {\n const collected: { entry: QueryDevtoolsEntry; run: QueryDevtoolsRun }[] = [];\n\n for (const entry of this.host.scopedQueries()) {\n for (const run of entry.stats?.runs() ?? []) collected.push({ entry, run });\n }\n\n return collected.sort((a, b) => a.run.startedAt - b.run.startedAt);\n });\n\n /**\n * Every scoped run laid out on one axis, so a stampede reads as overlapping bars and a chain as a\n * staircase - which is what the Events tab's flat list of wall-clock times cannot show.\n */\n protected timeline = computed<Timeline>(() => {\n const collected = this.scopedRuns();\n const hidden = Math.max(0, collected.length - MAX_TIMELINE_ROWS);\n const shown = hidden ? collected.slice(hidden) : collected;\n const first = shown[0];\n\n if (!first) return { rows: [], startedAt: 0, windowMs: 0, hidden: 0 };\n\n // A run in flight has no end yet, so the window has to grow with the clock - otherwise its bar would\n // freeze at the width it happened to be built with, the same trap `isStale` documents.\n if (shown.some(({ run }) => run.endedAt === null)) this.host.clock();\n\n const now = Date.now();\n const startedAt = first.run.startedAt;\n const endedAt = shown.reduce((latest, { run }) => Math.max(latest, run.endedAt ?? now), startedAt);\n const windowMs = Math.max(1, endedAt - startedAt);\n\n const rows = shown.map(({ entry, run }): TimelineRow => {\n const url = run.url ?? this.host.requestUrl(entry.handle as AnyQuery);\n\n return {\n key: `${entry.id}:${run.index}`,\n entryId: entry.id,\n method: entry.meta.method ?? '',\n path: url ? this.host.requestPath(url) : (entry.meta.route ?? ''),\n run,\n leftPct: ((run.startedAt - startedAt) / windowMs) * 100,\n // An instant run - a cache entry filled by a poll or by another consumer - still needs a sliver\n // of width to be visible at all.\n widthPct: Math.max(0.4, (((run.endedAt ?? now) - run.startedAt) / windowMs) * 100),\n durationMs: run.endedAt === null ? null : run.endedAt - run.startedAt,\n };\n });\n\n return { rows, startedAt, windowMs, hidden };\n });\n\n /** Axis labels for the timeline, as offsets from the window's start. */\n protected timelineTicks = computed(() => {\n const { windowMs, rows } = this.timeline();\n\n if (!rows.length) return [];\n\n return TIMELINE_TICKS.map((fraction) => ({\n pct: fraction * 100,\n label: this.host.formatDuration(Math.round(windowMs * fraction)),\n }));\n });\n\n constructor() {\n // The waterfall's grid lays out nothing else in the panel, so its rules arrive with the tab - and\n // this component only exists while the tab is open, so mounting unconditionally here is enough.\n injectStyleManager().mount(QueryDevtoolsTimelineStylesComponent);\n }\n\n /** The same reset the drawer's Activity section offers, for every query the timeline covers. */\n protected resetTimeline() {\n for (const entry of this.host.scopedQueries()) entry.stats?.reset();\n\n this.host.diffRunIndex.set(null);\n this.host.diffBaseRunIndex.set(null);\n }\n\n protected selectTimelineRow(row: TimelineRow) {\n this.host.timelineSelectedQueryId.set(row.entryId);\n }\n}\n","@let tl = timeline();\n<div #panes class=\"et-query-devtools-split\">\n <div class=\"et-query-devtools-pane\">\n <div class=\"et-query-devtools-toolbar\">\n <div class=\"et-query-devtools-toolbar-row\">\n @if (host.inspectFilterIds(); as ids) {\n <span class=\"et-query-devtools-filter-chip\">\n <span class=\"et-query-devtools-filter-icon\" aria-hidden=\"true\">⌖</span>\n Inspected element\n <span class=\"et-query-devtools-filter-count\">{{ ids.length }}</span>\n </span>\n } @else {\n <label class=\"et-query-devtools-field\">\n <span>Client</span>\n <select\n #timelineClientSelect\n [value]=\"host.selectedClientName() ?? ''\"\n (change)=\"host.selectClient(timelineClientSelect.value || null)\"\n class=\"et-query-devtools-select\"\n >\n <option value=\"\">All clients</option>\n @for (name of host.clientNames(); track name) {\n <option [value]=\"name\">{{ name }}</option>\n }\n </select>\n </label>\n }\n <span class=\"et-query-devtools-count\">\n {{ tl.rows.length }} run{{ tl.rows.length === 1 ? '' : 's' }}\n @if (tl.hidden) {\n · {{ tl.hidden }} older not shown\n }\n @if (tl.rows.length) {\n · over {{ host.formatDuration(tl.windowMs) }} from {{ host.formatTime(tl.startedAt) }}\n }\n </span>\n <button\n [disabled]=\"!tl.rows.length\"\n (click)=\"resetTimeline()\"\n class=\"et-query-devtools-btn et-query-devtools-toolbar-btn\"\n type=\"button\"\n title=\"Clear the run history and the counters of every listed query\"\n >\n ⟲ Reset\n </button>\n </div>\n </div>\n\n @if (tl.rows.length) {\n <div class=\"et-query-devtools-scroll\">\n <div class=\"et-query-devtools-timeline\">\n <div class=\"et-query-devtools-timeline-axis\">\n <span class=\"et-query-devtools-timeline-ticks\">\n @for (tick of timelineTicks(); track tick.pct) {\n <span [style.left.%]=\"tick.pct\" class=\"et-query-devtools-timeline-tick\">{{ tick.label }}</span>\n }\n </span>\n </div>\n\n @for (row of tl.rows; track row.key) {\n <button\n [class.et-query-devtools-timeline-row--active]=\"host.timelineSelectedQueryId() === row.entryId\"\n (click)=\"selectTimelineRow(row)\"\n class=\"et-query-devtools-timeline-row\"\n type=\"button\"\n title=\"{{ row.method }} {{ row.path }} · run {{ row.run.index }} · {{ row.run.status }}\"\n >\n <span class=\"et-query-devtools-timeline-label\">\n <span class=\"et-query-devtools-method\">{{ row.method }}</span>\n <span class=\"et-query-devtools-url\">{{ row.path }}</span>\n </span>\n <span class=\"et-query-devtools-timeline-track\">\n <span\n [attr.data-status]=\"host.runStatus(row.run)\"\n [style.left.%]=\"row.leftPct\"\n [style.width.%]=\"row.widthPct\"\n class=\"et-query-devtools-timeline-bar\"\n ></span>\n </span>\n <span class=\"et-query-devtools-timeline-duration\">\n @if (row.durationMs === null) {\n in flight\n } @else {\n {{ host.formatDuration(row.durationMs) }}\n }\n </span>\n <span class=\"et-query-devtools-timeline-size\">\n @if (row.run.receivedBytes) {\n {{ host.formatBytes(row.run.receivedBytes) }}\n }\n </span>\n <span class=\"et-query-devtools-timeline-flags\">\n @if (row.run.attempts > 1) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--loading\"\n title=\"Took {{\n row.run.attempts\n }} attempts - so this bar is mostly retry backoff, not one slow round trip\"\n >\n <span class=\"et-query-devtools-retry-glyph\" aria-hidden=\"true\">⟳</span>\n {{ row.run.attempts }}\n </span>\n }\n @if (!row.run.didRequest) {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"Arrived without a request of this query's own - a poll, another consumer of the same cache entry, or another tab\"\n >\n shared\n </span>\n }\n @if (row.run.status === 'aborted') {\n <span\n class=\"et-query-devtools-chip et-query-devtools-chip--muted\"\n title=\"The query requested again before this run's response arrived\"\n >\n aborted\n </span>\n }\n </span>\n </button>\n }\n </div>\n </div>\n } @else {\n <p class=\"et-query-devtools-empty\">\n No requests recorded yet. Every request a listed query makes shows up here as a bar.\n </p>\n }\n </div>\n\n <et-query-devtools-drawer\n [sel]=\"host.timelineSelectedQuery()\"\n [container]=\"panes\"\n (dismiss)=\"host.timelineSelectedQueryId.set(null)\"\n />\n</div>\n","import { QueryDevtoolsAbout } from '@ethlete/query';\n\n/**\n * How deep a value is walked before it is replaced by a marker, and how much of a long string or a long\n * array survives. A report is read by a person, so a 5000-item list is worth two entries and a count.\n */\nconst MAX_DEPTH = 6;\nconst MAX_STRING = 200;\nconst MAX_ARRAY_ITEMS = 2;\n\n/**\n * Slims a value for a shareable report: long strings are truncated and long arrays keep only the first\n * couple of entries, replacing the repetitive tail with a `… (N more)` marker, so a big response\n * collapses to a representative sample.\n */\nexport const slimForReport = (value: unknown, depth = 0): unknown => {\n if (typeof value === 'string') return value.length > MAX_STRING ? `${value.slice(0, MAX_STRING)}…` : value;\n if (depth > MAX_DEPTH) return '…';\n\n if (Array.isArray(value)) {\n if (value.length > MAX_ARRAY_ITEMS + 1) {\n return [\n ...value.slice(0, MAX_ARRAY_ITEMS).map((entry) => slimForReport(entry, depth + 1)),\n `… (${value.length - MAX_ARRAY_ITEMS} more)`,\n ];\n }\n\n return value.map((entry) => slimForReport(entry, depth + 1));\n }\n\n if (value && typeof value === 'object') {\n const out: Record<string, unknown> = {};\n for (const [key, entry] of Object.entries(value)) out[key] = slimForReport(entry, depth + 1);\n\n return out;\n }\n\n return value;\n};\n\n/** One query client, as the export accounts for it. */\nexport type SessionExportClient = {\n name: string;\n baseUrl: string;\n\n /** How many entries the client's repository holds, and how many of those have no consumer left. */\n cacheEntries: number;\n unusedCacheEntries: number;\n\n /** The measured size of everything in that cache. */\n cacheBytes: number;\n\n /** How many responses the client has on disk, or `null` for a client without persistence. */\n persistedEntries: number | null;\n\n features: string[];\n};\n\n/**\n * One registered entry - a query, stack, sequence, form, auth provider or socket. Everything past `kind`\n * is optional because it is filled in per kind: only a query has runs, only a socket has messages.\n */\nexport type SessionExportEntry = {\n id: string;\n kind: string;\n name?: string | null;\n client?: string | null;\n method?: string | null;\n\n /** The route template, e.g. `/post/:postId`. */\n route?: string | null;\n\n /** The URL of the request it last made. */\n url?: string | null;\n status?: string | null;\n features?: string[];\n activity?: Record<string, unknown> | null;\n runs?: Record<string, unknown>[];\n\n /** Values slimmed by {@link slimForReport} on the way out. */\n args?: unknown;\n response?: unknown;\n error?: unknown;\n\n /** Whatever else the kind carries: a stack's pages, a form's fields, a socket's rooms. */\n detail?: Record<string, unknown> | null;\n\n /**\n * The response overrides armed on this query, for a query entry - a report captured while one was\n * live has to say so, the same reason armed faults are included.\n */\n overrides?: { id: string; op: Record<string, unknown> }[];\n};\n\nexport type SessionExportEvent = {\n timestamp: string;\n client: string;\n type: string;\n method?: string | null;\n url?: string | null;\n status?: number | null;\n durationMs?: number | null;\n bytes?: number | null;\n cause?: string | null;\n refreshed?: string[] | null;\n};\n\nexport type SessionExportFault = {\n client: string;\n latencyMs: number;\n failNext: number;\n failRate: number;\n status: number;\n};\n\n/**\n * One armed mock, as a capture reports it. A session taken while a route was answered by the panel has to\n * say which routes those were, or the report sends someone looking for data the API never sent.\n */\nexport type SessionExportMock = {\n client: string;\n method: string;\n pattern: string;\n status: number;\n latencyMs: number;\n body: unknown;\n};\n\nexport type BuildSessionExportOptions = {\n /** Wall-clock time of the export - passed in so the builder stays pure. */\n now: number;\n\n /** Where the session was captured, so a report says which environment it came from. */\n location: string;\n\n /** Which SDK and application build produced the session - see `queryDevtoolsAbout()`. */\n about: QueryDevtoolsAbout;\n\n clients: SessionExportClient[];\n entries: SessionExportEntry[];\n events: SessionExportEvent[];\n faults: SessionExportFault[];\n mocks: SessionExportMock[];\n};\n\n/** The whole panel state as one attachable JSON document. */\nexport type QueryDevtoolsSessionExport = {\n _type: 'ethlete.query:devtools-session';\n exportedAt: string;\n location: string;\n about: QueryDevtoolsAbout;\n counts: {\n clients: number;\n entries: number;\n events: number;\n armedFaults: number;\n armedOverrides: number;\n armedMocks: number;\n };\n clients: SessionExportClient[];\n entries: SessionExportEntry[];\n events: SessionExportEvent[];\n faults: SessionExportFault[];\n mocks: SessionExportMock[];\n};\n\n/** Slims the free-form value fields of an entry, leaving the rest as it was collected. */\nconst slimEntry = (entry: SessionExportEntry): SessionExportEntry => ({\n ...entry,\n ...('args' in entry ? { args: slimForReport(entry.args) } : {}),\n ...('response' in entry ? { response: slimForReport(entry.response) } : {}),\n ...('error' in entry ? { error: slimForReport(entry.error) } : {}),\n ...(entry.detail ? { detail: slimForReport(entry.detail) as Record<string, unknown> } : {}),\n ...(entry.overrides?.length ? { overrides: slimForReport(entry.overrides) as SessionExportEntry['overrides'] } : {}),\n});\n\n/**\n * Builds the whole-session report: every registered entry with what it ran and what it holds, the event\n * log, the cache totals per client and anything armed in the Faults or Mocks tabs or as a response\n * override.\n *\n * Bodies are slimmed rather than dumped in full - the point is a file small enough to attach to a bug\n * report, and a 4 MB response says nothing a representative sample does not. Armed faults and overrides\n * are included because a report captured while the panel was lying to the app has to say so. Neither\n * survives past the current page - this is a snapshot for a bug report, not something the panel can\n * later import to restore a session.\n */\nexport const buildQueryDevtoolsSessionExport = (options: BuildSessionExportOptions): QueryDevtoolsSessionExport => ({\n _type: 'ethlete.query:devtools-session',\n exportedAt: new Date(options.now).toISOString(),\n location: options.location,\n about: options.about,\n counts: {\n clients: options.clients.length,\n entries: options.entries.length,\n events: options.events.length,\n armedFaults: options.faults.length,\n armedOverrides: options.entries.reduce((sum, entry) => sum + (entry.overrides?.length ?? 0), 0),\n armedMocks: options.mocks.length,\n },\n clients: options.clients,\n entries: options.entries.map(slimEntry),\n events: options.events,\n faults: options.faults,\n mocks: options.mocks,\n});\n","import { HttpErrorResponse, HttpHeaders } from '@angular/common/http';\nimport { headerEntries, isHeadersValue } from './query-devtools-exotic';\nimport { DOCUMENT } from '@angular/common';\nimport {\n booleanAttribute,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n NgZone,\n OnInit,\n signal,\n untracked,\n viewChild,\n ViewEncapsulation,\n WritableSignal,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport {\n clamp,\n createObjectUrlHandle,\n DragHandleDirective,\n DragMoveEvent,\n injectBreakpointObserver,\n injectViewportSize,\n ResizeEdge,\n ResizeHandlesComponent,\n ResizeMoveEvent,\n injectFileDownload,\n injectIsDocumentVisible,\n injectRenderer,\n injectStyleManager,\n randomId,\n signalElementDimensions,\n} from '@ethlete/core';\nimport {\n AnyBearerAuthProvider,\n AnyPagedQueryStack,\n AnyQueryBatch,\n AnyQuerySnapshot,\n AnyQueryStack,\n applyQueryDevtoolsTokenTtl,\n BearerAuthMultiTabSyncFeature,\n canOverrideQueryDevtoolsTokenTtl,\n clearQueryDevtoolsArmedMocks,\n clearQueryDevtoolsFaults,\n clearQueryDevtoolsMockStore,\n clearQueryDevtoolsOverrideStore,\n clearQueryDevtoolsStore,\n clearRestoredQueryDevtoolsOverrides,\n createQueryErrorResponse,\n createQueryKeyLockManager,\n EMPTY_QUERY_DEVTOOLS_FAULT,\n isQueryDevtoolsFaultArmed,\n measureQueryDevtoolsPayload,\n QueryClient,\n queryDevtoolsAbout,\n queryDevtoolsEntries,\n QueryDevtoolsEntry,\n queryDevtoolsArmedMocks,\n queryDevtoolsArmedMocksRestored,\n queryDevtoolsFaults,\n queryDevtoolsFaultsRestored,\n queryDevtoolsMockId,\n queryDevtoolsMocks,\n queryDevtoolsOverridePersistence,\n queryDevtoolsRestoredOverridesScope,\n queryDevtoolsSettings,\n QueryDevtoolsStorageScope,\n queryDevtoolsTokenTtls,\n readQueryDevtoolsStore,\n registerEthleteVersion,\n writeQueryDevtoolsStore,\n queryDevtoolsResponseHistory,\n QueryDevtoolsFeature,\n QueryDevtoolsFormHandle,\n QueryDevtoolsRun,\n QueryDevtoolsStatsHandle,\n sumQueryDevtoolsStats,\n QueryKeyLockHold,\n QueryKeyLockState,\n QueryRefreshCause,\n QueryRepository,\n QueryRepositoryCacheEntry,\n QueryRepositoryEvent,\n QuerySequence,\n QuerySequenceStatus,\n restoredQueryDevtoolsOverrides,\n setQueryDevtoolsOverridePersistence,\n WebSocketDevtoolsHandle,\n WebSocketDevtoolsMessage,\n} from '@ethlete/query';\nimport {\n animationFrames,\n EMPTY,\n filter,\n finalize,\n fromEvent,\n interval,\n map,\n merge,\n NEVER,\n startWith,\n Subject,\n switchMap,\n take,\n takeUntil,\n tap,\n timer,\n} from 'rxjs';\nimport {\n COMPONENTS_VERSION,\n MenuCheckboxItemComponent,\n MenuComponent,\n MenuDirective,\n MenuItemComponent,\n MenuRadioGroupComponent,\n MenuRadioItemComponent,\n MenuSeparatorComponent,\n MenuSurfaceDirective,\n MenuTriggerDirective,\n} from '@ethlete/components';\nimport { QueryDevtoolsAuthTabComponent } from './query-devtools-auth-tab.component';\nimport { QueryDevtoolsCacheTabComponent } from './query-devtools-cache-tab.component';\nimport { buildCurlCommand } from './query-devtools-curl';\nimport { QueryDevtoolsEventsTabComponent } from './query-devtools-events-tab.component';\nimport { diffQueryDevtoolsResponses } from './query-devtools-diff';\nimport { QueryDevtoolsAboutComponent } from './query-devtools-about.component';\nimport { QueryDevtoolsMocksTabComponent } from './query-devtools-mocks-tab.component';\nimport { QueryDevtoolsSettingsComponent } from './query-devtools-settings.component';\nimport { QueryDevtoolsFaultsTabComponent } from './query-devtools-faults-tab.component';\nimport { QueryDevtoolsFormsTabComponent } from './query-devtools-forms-tab.component';\nimport { QUERY_DEVTOOLS_HOST } from './query-devtools-host';\nimport { QueryDevtoolsLocksTabComponent } from './query-devtools-locks-tab.component';\nimport {\n DEVTOOLS_PROBE_NAMESPACE,\n DevtoolsLockRow,\n devtoolsProbeLockKey,\n devtoolsProbeLockName,\n probeClientId,\n summarizeLocks,\n} from './query-devtools-locks';\nimport { QUERY_DEVTOOLS_VERSION } from './version';\nimport { buildInsomniaExport, InsomniaRequestInput, InsomniaTokenRefreshInput } from './query-devtools-insomnia';\nimport { QueryDevtoolsCopyMenuStylesComponent } from './query-devtools-copy-menu-styles.component';\nimport { QueryDevtoolsJsonStylesComponent } from './query-devtools-json-styles.component';\nimport { QueryDevtoolsOverrideMenuStylesComponent } from './query-devtools-override-menu-styles.component';\nimport { QueryDevtoolsQueriesTabComponent } from './query-devtools-queries-tab.component';\nimport { QueryDevtoolsBatchesTabComponent } from './query-devtools-batches-tab.component';\nimport { QueryDevtoolsSequencesTabComponent } from './query-devtools-sequences-tab.component';\nimport { QueryDevtoolsSocketsTabComponent } from './query-devtools-sockets-tab.component';\nimport { QueryDevtoolsStacksTabComponent } from './query-devtools-stacks-tab.component';\nimport { QueryDevtoolsTimelineTabComponent } from './query-devtools-timeline-tab.component';\nimport {\n buildQueryDevtoolsSessionExport,\n SessionExportClient,\n SessionExportEntry,\n SessionExportEvent,\n SessionExportFault,\n SessionExportMock,\n slimForReport,\n} from './query-devtools-session';\nimport { QueryDevtoolsTimelineStylesComponent } from './query-devtools-timeline-styles.component';\nimport {\n AnyQuery,\n BatchItemView,\n CacheRow,\n DetailTab,\n DevtoolsTab,\n DroppedCacheEntry,\n EventLogItem,\n PaneAxis,\n PaneTarget,\n QueryActivity,\n QueryDevtoolsChip,\n QueryDevtoolsSelection,\n QueryDevtoolsTokenLifetime,\n QueryLink,\n QueryListFacet,\n QueryStatus,\n RefreshedRequest,\n RequestProgress,\n RouteSegment,\n TabBadge,\n} from './query-devtools-types';\nimport {\n QUERY_DEVTOOLS_VIEW_STATE_KEY,\n QueryDevtoolsToggleComponent,\n queryDevtoolsShortcutLabel,\n} from '@ethlete/query-devtools/toggle';\n\n/**\n * Where the panel sits: attached to an edge, or floating over the page as a window of its own. A\n * pop-out is not one of these - that is a real browser window, not a position in this document.\n */\ntype DevtoolsDock = 'bottom' | 'top' | 'left' | 'right' | 'float';\n\n/** What the layout menu offers, in the order it lists them. `popout` is a window, not a position. */\ntype DevtoolsLayout = DevtoolsDock | 'popout';\n\n/** The floating panel's position and size, in CSS px from the viewport's top-left. */\ntype FloatRect = { x: number; y: number; width: number; height: number };\n\n/**\n * A drag in progress: the panel's docked edge, the floating panel being moved or resized, or the\n * divider between a two-pane tab's panes.\n */\ntype ResizeDrag = {\n /** The document the pointer moves in - a popped-out panel lives in a window of its own. */\n doc: Document;\n} & ({ kind: 'panel' } | { kind: 'pane'; pane: PaneTarget; axis: PaneAxis; container: HTMLElement });\n\ntype PersistedState = {\n open?: boolean;\n height?: number;\n width?: number;\n listWidth?: number | null;\n drawerWidth?: number | null;\n listHeight?: number | null;\n drawerHeight?: number | null;\n dock?: DevtoolsDock;\n reservesSpace?: boolean;\n floatRect?: FloatRect;\n floatParked?: boolean;\n activeTab?: DevtoolsTab;\n detailTab?: DetailTab;\n selectedClientName?: string | null;\n selectedQueryId?: string | null;\n stackSelectedQueryId?: string | null;\n sequenceSelectedQueryId?: string | null;\n batchSelectedQueryId?: string | null;\n eventSelectedQueryId?: string | null;\n formSelectedQueryId?: string | null;\n timelineSelectedQueryId?: string | null;\n selectedFormId?: string | null;\n inspectFilterIds?: string[] | null;\n queryFilter?: string;\n queryFacets?: QueryListFacet[];\n queryRecentFirst?: boolean;\n queryTreeView?: boolean;\n collapsedQueryPaths?: string[];\n eventClient?: string | null;\n eventErrorsOnly?: boolean;\n socketFilter?: string;\n jsonSearch?: string;\n expandedSteps?: string[];\n expandedBatchItems?: string[];\n expandedQueryGroups?: string[];\n jsonExpanded?: string[];\n jsonCollapsed?: string[];\n};\n\n/** How long a copy button stays ticked after a successful write. */\nconst COPIED_RESET_MS = 1200;\n\n/**\n * How many of a batch's items its card lists. A bulk run settles thousands, and a row per item is a\n * list nobody scrolls and a render the panel pays for on every settle.\n */\nconst MAX_BATCH_ITEM_ROWS = 100;\n\n/** How long the locate box stays up. Long enough to outlast a smooth scroll and still be read. */\nconst LOCATE_HOLD_MS = 2500;\n\nconst LOCATE_MAX_DEPTH = 4;\n\n/**\n * The element to scroll to and outline for a query: the one it was created in, or the shallowest\n * descendant that renders a box when that one renders none of its own. `null` when nothing in there\n * is rendered at all - `display: none`, or an ancestor that is.\n *\n * A host carrying `display: contents` - common on Angular components - generates no box, so both\n * `checkVisibility()` and its own rect report it as absent while its content is plainly on screen.\n */\nconst renderedTarget = (element: Element, depth = 0): Element | null => {\n const rect = element.getBoundingClientRect();\n\n if (rect.width || rect.height) return element;\n if (depth >= LOCATE_MAX_DEPTH) return null;\n\n for (const child of element.children) {\n const found = renderedTarget(child, depth + 1);\n\n if (found) return found;\n }\n\n return null;\n};\n\n/**\n * Every place the panel can sit, as the layout menu lists them. A menu rather than a row of buttons:\n * six destinations do not fit in a header that already carries ten tabs, and one of them is a window.\n */\nconst DEVTOOLS_LAYOUTS = [\n { id: 'bottom', glyph: '\\u2b13', label: 'Bottom', hint: 'Dock to the bottom edge' },\n { id: 'top', glyph: '\\u2b12', label: 'Top', hint: 'Dock to the top edge' },\n { id: 'left', glyph: '\\u25e7', label: 'Left', hint: 'Dock to the left edge' },\n { id: 'right', glyph: '\\u25e8', label: 'Right', hint: 'Dock to the right edge' },\n {\n id: 'float',\n glyph: '\\u2750',\n label: 'Float',\n hint: 'A window inside the page - move it, resize it, shove it off an edge to park it',\n },\n {\n id: 'popout',\n glyph: '\\u29c9',\n label: 'Pop out',\n hint: 'Move the panel into a window of its own - the same live panel, on your other screen',\n },\n] as const satisfies readonly { id: DevtoolsLayout; glyph: string; label: string; hint: string }[];\n\nconst layoutFor = (dock: DevtoolsDock) => DEVTOOLS_LAYOUTS.find((layout) => layout.id === dock) ?? DEVTOOLS_LAYOUTS[0];\n\n/**\n * The padding a dock takes out of the page, per edge. Logical properties, because the panel's own\n * placement is: `bottom` is pinned with `inset-block-end`, `right` with `inset-inline-start: auto`.\n */\nconst DOCK_PADDING = {\n bottom: 'paddingBlockEnd',\n top: 'paddingBlockStart',\n left: 'paddingInlineStart',\n right: 'paddingInlineEnd',\n} as const satisfies Record<Exclude<DevtoolsDock, 'float'>, keyof CSSStyleDeclaration>;\n\nconst noop = () => undefined;\n\n/**\n * A devtools entry id as a person reads it. Ids are the registry's descriptor plus a per-descriptor\n * sequence number (`query|<client>|<method>|<route>#<n>`), so the parts are all there - just not in an\n * order anyone would read out loud. Used for stored overrides whose query never registered, which are\n * the one case the panel has no live entry to name.\n */\nconst describeEntryId = (id: string) => {\n const [descriptor = '', seq] = id.split('#');\n const [kind, client, method, route] = descriptor.split('|');\n\n if (kind !== 'query' || !route) return id;\n\n return `${method} ${route}${client ? ` · ${client}` : ''}${seq && seq !== '0' ? ` #${seq}` : ''}`;\n};\n\nconst STORAGE_KEY = QUERY_DEVTOOLS_VIEW_STATE_KEY;\n\n/**\n * Pinned queries, held apart from {@link STORAGE_KEY} and defaulting to `localStorage`: everything under\n * that key is view state that should die with the tab, while a pin says which query is being worked on\n * and is meant to outlive one. Folding it in would silently make pins per-tab. Both scopes are\n * `queryDevtoolsSettings()`.\n */\nconst PINS_STORAGE_KEY = 'ethlete:query:devtools:pins:v2';\n\nconst DEFAULT_HEIGHT = 360;\nconst MIN_HEIGHT = 200;\nconst DEFAULT_WIDTH = 560;\nconst MIN_WIDTH = 360;\n\n/** The floors a dragged pane divider leaves on both sides of itself, per axis. */\nconst MIN_PANE_WIDTH = 220;\nconst MIN_PANE_HEIGHT = 120;\n\n/** Where a floating panel appears the first time, before any drag - clamped into the viewport on sight. */\nconst DEFAULT_FLOAT_RECT: FloatRect = { x: 48, y: 48, width: 900, height: 520 };\n\n/**\n * The inline size a floating panel stacks its two panes below. Not the `md` breakpoint the docked\n * layouts use: a float is sized by the user, not by the viewport, so what matters is how wide the\n * panel itself was dragged. The list asks for `22rem` and the drawer for `26rem`, plus the divider.\n */\nconst FLOAT_STACK_WIDTH = 620;\n\ntype ViewportSize = { width: number; height: number };\n\n/**\n * How much of a parked float stays on screen. The title bar spans the panel's full width, so whichever\n * edge it is parked against, this much of that bar is still there to drag it back by.\n */\nconst FLOAT_PEEK = 44;\n\n/**\n * Keeps a floating rect fully inside the viewport. Three things run into this: releasing a drag that\n * did not park the panel, a window shrinking under it, and a persisted rect restored into a viewport\n * smaller than the one that stored it.\n */\nconst clampFloatRect = (rect: FloatRect, viewport: ViewportSize): FloatRect => {\n const width = clamp(rect.width, MIN_WIDTH, Math.max(MIN_WIDTH, viewport.width));\n const height = clamp(rect.height, MIN_HEIGHT, Math.max(MIN_HEIGHT, viewport.height));\n\n return {\n width,\n height,\n x: clamp(rect.x, 0, Math.max(0, viewport.width - width)),\n y: clamp(rect.y, 0, Math.max(0, viewport.height - height)),\n };\n};\n\n/**\n * The loosest a float may sit: shoved off an edge with only {@link FLOAT_PEEK} left, which is what a\n * drag and a parked panel are held to. **North is never a parking edge** - the title bar is the only\n * thing that drags the panel back, so it may never be the part that leaves.\n */\nexport const clampFloatToPeek = (rect: FloatRect, viewport: ViewportSize): FloatRect => {\n const width = clamp(rect.width, MIN_WIDTH, Math.max(MIN_WIDTH, viewport.width));\n const height = clamp(rect.height, MIN_HEIGHT, Math.max(MIN_HEIGHT, viewport.height));\n const peekX = Math.min(FLOAT_PEEK, width);\n const peekY = Math.min(FLOAT_PEEK, height);\n\n return {\n width,\n height,\n x: clamp(rect.x, peekX - width, Math.max(peekX - width, viewport.width - peekX)),\n y: clamp(rect.y, 0, Math.max(0, viewport.height - peekY)),\n };\n};\n\n/**\n * Where a float settles when the pointer is released. Dragged more than halfway off an edge, it stays\n * parked there with {@link FLOAT_PEEK} showing - the panel gets out of the way of the thing you are\n * debugging without being closed. Anything short of halfway is pulled back in, so a slightly clumsy\n * drag does not park it.\n */\nexport const settledFloatRect = (rect: FloatRect, viewport: ViewportSize): { rect: FloatRect; collapsed: boolean } => {\n const offLeft = Math.max(0, -rect.x);\n const offRight = Math.max(0, rect.x + rect.width - viewport.width);\n const offBottom = Math.max(0, rect.y + rect.height - viewport.height);\n\n const parkedX = Math.max(offLeft, offRight) > rect.width / 2;\n const parkedY = offBottom > rect.height / 2;\n\n if (!parkedX && !parkedY) return { rect: clampFloatRect(rect, viewport), collapsed: false };\n\n const peekX = Math.min(FLOAT_PEEK, rect.width);\n const peekY = Math.min(FLOAT_PEEK, rect.height);\n const inside = clampFloatRect(rect, viewport);\n\n return {\n rect: {\n ...rect,\n x: parkedX ? (offLeft > offRight ? peekX - rect.width : viewport.width - peekX) : inside.x,\n y: parkedY ? viewport.height - peekY : inside.y,\n },\n collapsed: true,\n };\n};\n\n/**\n * The rect a resize gesture from `edge` produces, given where the panel was when the gesture started.\n * A west or north drag grows away from the edge that stays pinned, so the origin follows whatever\n * size the drag settled on - including when the size hit its floor and the origin must stop with it.\n */\nexport const resizedFloatRect = (\n base: FloatRect,\n { move, viewport }: { move: ResizeMoveEvent; viewport: ViewportSize },\n): FloatRect => {\n const { edge, dx, dy } = move;\n\n const maxWidth = edge.includes('w') ? base.x + base.width : viewport.width - base.x;\n const maxHeight = edge.includes('n') ? base.y + base.height : viewport.height - base.y;\n\n const requestedWidth = edge.includes('e') ? base.width + dx : edge.includes('w') ? base.width - dx : base.width;\n const requestedHeight = edge.includes('s') ? base.height + dy : edge.includes('n') ? base.height - dy : base.height;\n\n const width = clamp(requestedWidth, MIN_WIDTH, Math.max(MIN_WIDTH, maxWidth));\n const height = clamp(requestedHeight, MIN_HEIGHT, Math.max(MIN_HEIGHT, maxHeight));\n\n return clampFloatRect(\n {\n width,\n height,\n x: edge.includes('w') ? base.x + base.width - width : base.x,\n y: edge.includes('n') ? base.y + base.height - height : base.y,\n },\n viewport,\n );\n};\n\n/** The window a pop-out opens at. Wide enough for the master/detail split the bottom dock gets. */\nconst POPOUT_FEATURES = 'popup=yes,width=1200,height=800';\n\n/**\n * The document a pop-out is opened on. The doctype and the title have to be part of it rather than set\n * afterwards - see {@link QueryDevtoolsComponent.popOut}. Everything the panel needs beyond this (the\n * app's stylesheets, its theme) is copied in once the window has loaded.\n */\nconst POPOUT_DOCUMENT = `<!doctype html>\n<html>\n <head>\n <meta charset=\"utf-8\" />\n <title>Query devtools</title>\n </head>\n <body style=\"margin: 0\"></body>\n</html>`;\n\n/**\n * Every stylesheet the panel injects after it is created rather than with itself. A pop-out copies the\n * host document's styles once, on load, so all of them have to be in the document by then - whatever the\n * user has opened so far.\n */\nconst DEFERRED_STYLES = [\n QueryDevtoolsJsonStylesComponent,\n QueryDevtoolsCopyMenuStylesComponent,\n QueryDevtoolsOverrideMenuStylesComponent,\n QueryDevtoolsTimelineStylesComponent,\n];\n\nconst readPersistedState = (): PersistedState =>\n readQueryDevtoolsStore<PersistedState>(queryDevtoolsSettings().viewState, STORAGE_KEY) ?? {};\n\nconst readPinnedQueryIds = (): string[] => {\n const parsed = readQueryDevtoolsStore<string[]>(queryDevtoolsSettings().pins, PINS_STORAGE_KEY);\n\n return Array.isArray(parsed) ? parsed : [];\n};\n\n/** How long an exported Insomnia collection reuses a refresh response whose token lifetime is unknown. */\nconst DEFAULT_TOKEN_MAX_AGE_S = 300;\n\n/** Upper bound for the same, so a token that claims a year of life still gets refreshed hourly. */\nconst MAX_TOKEN_MAX_AGE_S = 3600;\n\n/**\n * A panel action must never reach the application's `ErrorHandler` - it reports its own failure inside\n * the panel instead, and this is the text it shows.\n */\nconst actionErrorMessage = (error: unknown) => (error instanceof Error ? error.message : String(error));\n\n/**\n * What to seed the args editor with for a query that has never run and holds no args anywhere. A\n * function route cannot execute without its path params, so the editor offers them as blanks to fill.\n */\nconst emptyArgsSeed = (entry: QueryDevtoolsEntry) => {\n const params = entry.meta.routeParts?.flatMap((part) => (part.param ? [part.param] : [])) ?? [];\n\n if (!params.length) return {};\n\n return { pathParams: Object.fromEntries(params.map((name) => [name, ''])) };\n};\n\ntype HeadersRecord = Record<string, string | string[]>;\n\n/** Marks a value `editableArgs` left out of the draft, for {@link executableArgs} to put back. */\nconst DROPPED = /* @__PURE__ */ Symbol('dropped');\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n if (!value || typeof value !== 'object') return false;\n\n const proto = Object.getPrototypeOf(value);\n\n return proto === Object.prototype || proto === null;\n};\n\n/**\n * Values `JSON.stringify` cannot represent - it writes `{}`, private fields, or omits them outright. A\n * `Date` is deliberately not one: it survives as an ISO string, which is what the query would send\n * anyway, so it stays editable.\n */\nconst isUneditable = (value: unknown) =>\n typeof value === 'function' ||\n value instanceof Map ||\n value instanceof Set ||\n (typeof FormData !== 'undefined' && value instanceof FormData) ||\n (typeof Blob !== 'undefined' && value instanceof Blob) ||\n isHeadersValue(value);\n\n/**\n * Args in the shape the JSON editor can carry. `JSON.stringify` writes an `HttpHeaders` as its four\n * private fields, a `FormData` or a `Map` as `{}`, and a header provider not at all - so an unedited\n * draft used to replay values the query never had. Headers become a plain `name: value` record, since\n * one rebuilds them exactly; every other such value is left out of the draft and put back verbatim by\n * {@link executableArgs}, which beats letting the user edit an empty object over the top of it.\n */\nconst editableArgs = (args: Record<string, unknown>) => editableValue(args) as Record<string, unknown>;\n\nconst editableValue = (value: unknown): unknown => {\n if (isHeadersValue(value)) return Object.fromEntries(headerEntries(value).map(({ k, v }) => [k, v]));\n if (isUneditable(value)) return DROPPED;\n if (Array.isArray(value)) {\n // `null` rather than a hole, so the indices a user edits still line up with the ones being replayed.\n return value.map((item) => {\n const edited = editableValue(item);\n\n return edited === DROPPED ? null : edited;\n });\n }\n\n if (isPlainObject(value)) {\n const out: Record<string, unknown> = {};\n\n for (const [key, child] of Object.entries(value)) {\n const edited = editableValue(child);\n\n if (edited !== DROPPED) out[key] = edited;\n }\n\n return out;\n }\n\n return value;\n};\n\n/** The inverse of {@link editableArgs}: records become `HttpHeaders` again, dropped values come back. */\nconst executableArgs = (draft: Record<string, unknown> | null, source: Record<string, unknown> | null) =>\n draft ? (executableValue(draft, source) as Record<string, unknown>) : draft;\n\nconst executableValue = (draft: unknown, source: unknown): unknown => {\n // What the draft could not carry comes back verbatim. A key the user deleted themselves stays deleted,\n // because only a value `editableArgs` dropped is missing from the draft while present in the source.\n if (draft === undefined) return isUneditable(source) ? source : undefined;\n\n if (isHeadersValue(source) && isPlainObject(draft)) return new HttpHeaders(draft as HeadersRecord);\n\n if (isPlainObject(draft) && isPlainObject(source)) {\n const out: Record<string, unknown> = { ...draft };\n\n for (const [key, child] of Object.entries(source)) {\n const restored = executableValue(draft[key], child);\n\n if (restored !== undefined) out[key] = restored;\n }\n\n return out;\n }\n\n return draft;\n};\n\n/**\n * The JSONPath of a string value inside a response, or `null`. Used to locate the access token in an\n * auth response whose shape only the provider's `extractTokens` knows.\n */\nconst findValuePath = (value: string, node: { value: unknown; path: string; depth: number }): string | null => {\n if (node.value === value) return node.path;\n if (node.depth > 5 || !node.value || typeof node.value !== 'object') return null;\n\n for (const [key, entry] of Object.entries(node.value)) {\n const path = Array.isArray(node.value) ? `${node.path}[${key}]` : `${node.path}.${key}`;\n const found = findValuePath(value, { value: entry, path, depth: node.depth + 1 });\n\n if (found) return found;\n }\n\n return null;\n};\n\n/** A countdown to an `exp` claim in seconds-since-epoch, or `null` when there is nothing to count to. */\nconst expiryCountdown = (exp: number | null): string | null => {\n if (exp === null) return null;\n\n const seconds = Math.round((exp * 1000 - Date.now()) / 1000);\n\n if (seconds <= 0) return 'expired';\n if (seconds < 120) return `${seconds}s`;\n if (seconds > 86400) return `${Math.floor(seconds / 86400)}d`;\n\n return `${Math.floor(seconds / 60)}m ${seconds % 60}s`;\n};\n\n/** Best-effort decode of a JWT payload for the auth tab. Returns `null` for anything non-decodable. */\nconst decodeJwtPayload = (token: string | null): Record<string, unknown> | null => {\n if (!token) return null;\n\n try {\n const payload = token.split('.')[1];\n if (!payload) return null;\n\n const normalized = payload.replace(/-/g, '+').replace(/_/g, '/');\n const decoded = atob(normalized);\n const json = decodeURIComponent(\n decoded\n .split('')\n .map((c) => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))\n .join(''),\n );\n\n return JSON.parse(json) as Record<string, unknown>;\n } catch {\n return null;\n }\n};\n\n/**\n * A floating, dockable panel that inspects the live state of the signals-first `@ethlete/query`\n * system: queries, stacks, sequences, bearer auth providers, the repository cache and a rolling\n * event log.\n *\n * Requires `provideQueryDevtools()` in the application providers - without it the registry stays\n * empty and the panel shows nothing.\n */\n@Component({\n selector: 'et-query-devtools',\n templateUrl: './query-devtools.component.html',\n styleUrl: './query-devtools.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [\n QueryDevtoolsAuthTabComponent,\n QueryDevtoolsBatchesTabComponent,\n QueryDevtoolsCacheTabComponent,\n QueryDevtoolsEventsTabComponent,\n QueryDevtoolsAboutComponent,\n QueryDevtoolsSettingsComponent,\n QueryDevtoolsFaultsTabComponent,\n QueryDevtoolsFormsTabComponent,\n QueryDevtoolsLocksTabComponent,\n QueryDevtoolsMocksTabComponent,\n QueryDevtoolsQueriesTabComponent,\n QueryDevtoolsSequencesTabComponent,\n QueryDevtoolsSocketsTabComponent,\n QueryDevtoolsStacksTabComponent,\n QueryDevtoolsTimelineTabComponent,\n QueryDevtoolsToggleComponent,\n DragHandleDirective,\n MenuCheckboxItemComponent,\n MenuComponent,\n MenuDirective,\n MenuItemComponent,\n MenuRadioGroupComponent,\n MenuRadioItemComponent,\n MenuSeparatorComponent,\n MenuSurfaceDirective,\n MenuTriggerDirective,\n ResizeHandlesComponent,\n ],\n providers: [{ provide: QUERY_DEVTOOLS_HOST, useExisting: QueryDevtoolsComponent }],\n host: {\n class: 'et-query-devtools-host',\n '[attr.data-dock]': 'dock()',\n // Every overlay opened from inside the panel - its menus, its tooltips - mounts one level above\n // the panel's own z-index, which is itself above the default overlay layer. Both numbers live in\n // query-devtools.component.css; keep them in step.\n 'data-et-overlay-layer': '2147483020',\n },\n})\nexport class QueryDevtoolsComponent implements OnInit {\n private hostEl = inject<ElementRef<HTMLElement>>(ElementRef);\n private renderer = injectRenderer();\n private download = injectFileDownload();\n private styleManager = injectStyleManager();\n private zone = inject(NgZone);\n private destroyRef = inject(DestroyRef);\n private document = inject(DOCUMENT);\n\n private viewport = injectViewportSize();\n\n private isDocumentVisible = injectIsDocumentVisible();\n\n /**\n * Opens the panel as soon as it is created, whatever the stored view state says. Set by\n * `<et-query-devtools-lazy>`, which downloads the panel on the click that was meant to open it.\n */\n public startOpen = input(false, { transform: booleanAttribute });\n\n /** The panel itself, so a pop-out can move it into another window's document. */\n private panelEl = viewChild<ElementRef<HTMLElement>>('panel');\n\n private eventIdCounter = 0;\n private lastSelectionKey = '';\n\n /** Where the gear goes back to, so opening Settings does not lose the tab it was opened over. */\n private tabBeforeSettings: DevtoolsTab = 'queries';\n\n public readonly persisted = readPersistedState();\n\n protected readonly tabs = [\n { id: 'queries', label: 'Queries' },\n { id: 'stacks', label: 'Stacks' },\n { id: 'sequences', label: 'Sequences' },\n { id: 'batches', label: 'Batches' },\n { id: 'forms', label: 'Forms' },\n { id: 'auth', label: 'Auth' },\n { id: 'ws', label: 'Sockets' },\n { id: 'cache', label: 'Cache' },\n { id: 'locks', label: 'Locks' },\n { id: 'timeline', label: 'Timeline' },\n { id: 'events', label: 'Events' },\n { id: 'faults', label: 'Faults' },\n { id: 'mocks', label: 'Mocks' },\n { id: 'about', label: 'About' },\n ] satisfies { id: DevtoolsTab; label: string }[];\n\n /**\n * Tabs the bar keeps whether they hold anything or not: the one the panel opens on, and the one that\n * arms faults - which has entries to arm rather than to count.\n */\n private readonly PINNED_TABS: readonly DevtoolsTab[] = ['queries', 'faults'];\n\n protected readonly shortcut = queryDevtoolsShortcutLabel();\n\n protected readonly LAYOUTS = DEVTOOLS_LAYOUTS;\n\n protected open = signal(this.persisted.open ?? false);\n private panelHeight = signal(this.persisted.height ?? DEFAULT_HEIGHT);\n private panelWidth = signal(this.persisted.width ?? DEFAULT_WIDTH);\n protected activeTab = signal<DevtoolsTab>(this.persisted.activeTab ?? 'queries');\n\n /**\n * The dragged sizes of the two-pane tabs, in px, one pair per axis - a side dock stacks the panes, so\n * the same divider sizes them along the block axis there and a dock switch has to keep both. `null`\n * keeps the stylesheet's proportional default, which is also what a double-click on a divider restores.\n */\n protected listWidth = signal<number | null>(this.persisted.listWidth ?? null);\n protected drawerWidth = signal<number | null>(this.persisted.drawerWidth ?? null);\n protected listHeight = signal<number | null>(this.persisted.listHeight ?? null);\n protected drawerHeight = signal<number | null>(this.persisted.drawerHeight ?? null);\n\n protected drag = signal<ResizeDrag | null>(null);\n protected resizing = computed(() => !!this.drag());\n\n /** Which edge the panel is docked to, or `float` for a window of its own inside the page. */\n protected dock = signal<DevtoolsDock>(this.persisted.dock ?? 'bottom');\n\n /** The entry the layout button shows, so it names where the panel is rather than where it could go. */\n protected currentLayout = computed(() => layoutFor(this.dock()));\n\n /**\n * Whether a docked panel takes its size out of the page instead of covering it - so the last rows of a\n * long page can still be scrolled to. Only docks can: a float sits wherever it was dragged.\n */\n protected reservesSpace = signal(this.persisted.reservesSpace ?? true);\n\n /** Where the floating panel sits and how big it is. Kept while docked, so a return to float restores it. */\n private floatRect = signal<FloatRect>(this.persisted.floatRect ?? DEFAULT_FLOAT_RECT);\n\n /** The rect a resize gesture started from, or `null` outside one. */\n private floatResizeBase: FloatRect | null = null;\n\n /**\n * Whether the float is shoved off an edge with only its peek showing. Persisted with the rect, since\n * restoring the rect without it would either strand the panel off screen or silently un-park it.\n */\n protected floatParked = signal(this.persisted.floatParked ?? false);\n\n /**\n * The browser refused the last pop-out. `window.open` returns `null` with no error to catch, so\n * without this the button simply did nothing - and floating is the fallback it should have offered.\n */\n protected popOutBlocked = signal(false);\n\n /**\n * Whether the panel currently lives in a window of its own. Deliberately not persisted: a reload\n * cannot re-adopt a window the previous document opened, so it always starts docked.\n */\n protected poppedOut = signal(false);\n\n protected floating = computed(() => !this.poppedOut() && this.dock() === 'float');\n\n /**\n * Below `md` a side-by-side split cannot fit: the list alone asks for `22rem` and the drawer for\n * `26rem`, which is wider than a phone. Narrow gets the same stacked layout a right dock does.\n */\n private narrowViewport = injectBreakpointObserver().observeBreakpoint({ max: 'sm' });\n\n /** Whether the panel is docked to a side edge, which is what sizes it along the inline axis. */\n private sideDocked = computed(() => this.dock() === 'left' || this.dock() === 'right');\n\n /** Which axis the two-pane tabs split along. The stylesheet keys the stacked layout off the same value. */\n protected paneAxis = computed<PaneAxis>(() => {\n if (this.poppedOut()) return 'inline';\n if (this.floating()) return this.floatRect().width < FLOAT_STACK_WIDTH ? 'block' : 'inline';\n\n return this.sideDocked() || this.narrowViewport() ? 'block' : 'inline';\n });\n\n private popup: Window | null = null;\n\n /** Stops mirroring the host document's stylesheets into the pop-up. @see syncStylesInto */\n private popOutStyleSync: (() => void) | null = null;\n\n // Only the axis the dock edge controls is bound; the other is the stylesheet's. A float sets both,\n // and a pop-out fills its window on both.\n protected panelBlockSize = computed(() => {\n if (this.poppedOut()) return null;\n if (this.floating()) return this.floatRect().height;\n\n return this.sideDocked() ? null : this.panelHeight();\n });\n\n protected panelInlineSize = computed(() => {\n if (this.poppedOut()) return null;\n if (this.floating()) return this.floatRect().width;\n\n return this.sideDocked() ? this.panelWidth() : null;\n });\n\n /** The floating panel's offset from the viewport's top-left, or `null` while it is docked. */\n protected panelInsetBlock = computed(() => (this.floating() ? this.floatRect().y : null));\n protected panelInsetInline = computed(() => (this.floating() ? this.floatRect().x : null));\n\n /**\n * The panel's rendered size, not its dragged one - the stylesheet clamps a dock (`min-block-size`,\n * `max-block-size: 90vh`) and it is the clamped size the page has to give up.\n */\n private panelSize = signalElementDimensions(this.panelEl);\n\n /** Which padding a docked panel asks of the page and how much, or `null` when it asks for none. */\n private pageReservation = computed(() => {\n const dock = this.dock();\n\n if (dock === 'float' || this.poppedOut() || !this.open() || !this.reservesSpace()) return null;\n\n const size = this.panelSize().offset;\n\n if (!size) return null;\n\n return { padding: DOCK_PADDING[dock], px: this.sideDocked() ? size.width : size.height };\n });\n\n /** Which section of the query detail is showing. Shared by the Queries tab and both drawers. */\n public detailTab = signal<DetailTab>(this.persisted.detailTab ?? 'overview');\n public selectedClientName = signal<string | null>(this.persisted.selectedClientName ?? null);\n public selectedQueryId = signal<string | null>(this.persisted.selectedQueryId ?? null);\n\n /** The form whose detail the Forms tab has expanded. */\n public selectedFormId = signal<string | null>(this.persisted.selectedFormId ?? null);\n\n // Independent per-drawer selection so no drawer shares the Queries tab's selection - or another\n // drawer's: opening a query from the Timeline must not also change what the Forms drawer shows. Each\n // is persisted the way the Queries tab's is, so a reload puts every drawer back on what it was showing.\n public stackSelectedQueryId = signal<string | null>(this.persisted.stackSelectedQueryId ?? null);\n public sequenceSelectedQueryId = signal<string | null>(this.persisted.sequenceSelectedQueryId ?? null);\n public batchSelectedQueryId = signal<string | null>(this.persisted.batchSelectedQueryId ?? null);\n public eventSelectedQueryId = signal<string | null>(this.persisted.eventSelectedQueryId ?? null);\n public formSelectedQueryId = signal<string | null>(this.persisted.formSelectedQueryId ?? null);\n public timelineSelectedQueryId = signal<string | null>(this.persisted.timelineSelectedQueryId ?? null);\n\n /** Free-text narrowing of the Queries list. Every whitespace-separated term has to match. */\n public queryFilter = signal(this.persisted.queryFilter ?? '');\n\n /** The status facets the Queries list is narrowed to. Empty means no status narrowing. */\n public queryFacets = signal<ReadonlySet<QueryListFacet>>(new Set(this.persisted.queryFacets ?? []));\n\n /**\n * Which way the Queries list sorts by last-executed time. Only the direction is switchable - the field\n * is not, because \"which one just ran\" is the question the column exists to answer.\n */\n public queryRecentFirst = signal(this.persisted.queryRecentFirst ?? true);\n\n /**\n * Whether the Queries list is arranged as a tree of route paths. Off by default: the flat list is\n * still the right shape for \"what ran just now\", which is what the tab is opened for most of the time.\n */\n public queryTreeView = signal(this.persisted.queryTreeView ?? false);\n\n /**\n * The path folders the user closed. Collapsed rather than expanded, because a tree that opens closed\n * shows nothing but the top segment of every route - which answers no question the flat list didn't.\n */\n public collapsedQueryPaths = signal<ReadonlySet<string>>(new Set(this.persisted.collapsedQueryPaths ?? []));\n\n /**\n * The entry ids sorted to the top of the Queries list. Ids are derived from a stable descriptor plus a\n * per-descriptor sequence number, so a pin survives a reload as long as queries are created in the same\n * order - the same property the restored selection already relies on.\n */\n public pinnedQueryIds = signal<ReadonlySet<string>>(new Set(readPinnedQueryIds()));\n\n public eventLog = signal<EventLogItem[]>([]);\n\n /**\n * The cache entries that are gone, newest first. Kept here rather than in the repository, which stays\n * lean in production - it emits the teardown and forgets it.\n */\n public droppedCacheEntries = signal<DroppedCacheEntry[]>([]);\n\n /** The client (by base URL) the event log is scoped to, or `null` for all of them. */\n public eventClient = signal<string | null>(this.persisted.eventClient ?? null);\n\n /** Whether the event log is narrowed to failures - the rows a bug report is about. */\n public eventErrorsOnly = signal(this.persisted.eventErrorsOnly ?? false);\n\n /** Free-text narrowing of every socket's message log. Matches the event, the room and the direction. */\n public socketFilter = signal(this.persisted.socketFilter ?? '');\n\n /** The cache entry whose response is expanded, as `<client>|<key>`, or `null` while none is. */\n private expandedCacheKey = signal<string | null>(null);\n\n /** The socket whose emit box last failed, so the message shows on that card and no other. */\n private socketEmitError = signal<{ entryId: string; message: string } | null>(null);\n\n /** Keys (`<entryId>:<stepIndex>`) of the sequence steps whose in/out detail is expanded. */\n private expandedSteps = signal<ReadonlySet<string>>(new Set(this.persisted.expandedSteps ?? []));\n\n /** Keys (`<entryId>:<itemIndex>`) of the batch items whose args/response detail is expanded. */\n private expandedBatchItems = signal<ReadonlySet<string>>(new Set(this.persisted.expandedBatchItems ?? []));\n\n /** Keys of the Queries-list groups the user opened - the tab is rebuilt on every switch back. */\n public expandedQueryGroups = signal<ReadonlySet<string>>(new Set(this.persisted.expandedQueryGroups ?? []));\n\n /** Shared value-explorer search term. */\n public jsonSearch = signal(this.persisted.jsonSearch ?? '');\n public jsonSearchTerm = computed(() => this.jsonSearch().trim().toLowerCase());\n\n /** Path-keyed value-explorer expansion overrides (persisted so open trees survive a reload). */\n public jsonExpandedPaths = signal<ReadonlySet<string>>(new Set(this.persisted.jsonExpanded ?? []));\n public jsonCollapsedPaths = signal<ReadonlySet<string>>(new Set(this.persisted.jsonCollapsed ?? []));\n\n /** Bound callback passed into the value explorer to persist per-path expansion. Assigned in the constructor. */\n public toggleJsonPath: (path: string, expand: boolean) => void;\n\n /** The run whose response the diff is comparing, by run index, or `null` while no diff is open. */\n public diffRunIndex = signal<number | null>(null);\n\n /**\n * The run the diff compares it *against*, or `null` to derive that side - the newest older run that\n * still holds a body, which is what one click on **Diff** gives you.\n */\n public diffBaseRunIndex = signal<number | null>(null);\n\n public errorRunIndex = signal<number | null>(null);\n\n /** How many bodies a query retains, which is what bounds how far back a diff can reach. */\n public retainedResponseCount = computed(queryDevtoolsResponseHistory);\n\n /** JIT editor state (response / args editing on the selected query). */\n public editorMode = signal<'none' | 'response' | 'args'>('none');\n public responseDraft = signal('');\n public argsDraft = signal('');\n\n /**\n * The text the currently open editor was seeded with. The textareas bind `value` to this and not to\n * the live draft: a `value` binding fed by the draft is written back on every keystroke, and writing\n * a textarea's `value` puts the caret at the end.\n */\n public editorSeed = '';\n public editError = signal<string | null>(null);\n\n /** The args the open editor was seeded from, so applying can put back what the draft cannot carry. */\n private editedArgsSource: Record<string, unknown> | null = null;\n\n /** Transient \"Copied!\" feedback for the copy-report, copy-as-Insomnia / cURL and copy-document actions. */\n public copiedReport = signal(false);\n public copiedInsomnia = signal(false);\n public copiedCurl = signal(false);\n public copiedGql = signal(false);\n public copiedRoute = signal(false);\n private copiedReset$ = new Subject<void>();\n\n /** 1-second tick driving the cache freshness countdowns. */\n private clock = toSignal(interval(1000), { initialValue: 0 });\n\n /**\n * The probe lock behind every Locks row's \"this tab\" answer, and the last snapshot read through it.\n * Both only exist while the Locks tab is on screen - see the polling stream in the constructor.\n */\n private probeLocks = createQueryKeyLockManager(DEVTOOLS_PROBE_NAMESPACE);\n private probeId = randomId();\n private probeHold: QueryKeyLockHold | null = null;\n private lockSnapshot = signal<LockManagerSnapshot | null>(null);\n\n public lockRows = computed<DevtoolsLockRow[] | null>(() => {\n if (!this.probeLocks.isSupported) return null;\n\n const snapshot = this.lockSnapshot();\n\n if (!snapshot) return [];\n\n return summarizeLocks({ snapshot, clientId: probeClientId(snapshot, devtoolsProbeLockName(this.probeId)) });\n });\n\n /** \"Inspect\" mode: hover the live UI to find the query that a component created. */\n protected inspectActive = signal(false);\n protected inspectHover = signal<{ rect: DOMRect; entries: QueryDevtoolsEntry[] } | null>(null);\n\n /** Inspect run backwards: the box drawn over the element the selected query was created in. */\n protected locatedRect = signal<DOMRect | null>(null);\n public locateState = signal<'idle' | 'located' | 'offscreen'>('idle');\n private locate$ = new Subject<Element | null>();\n\n /** When set (via inspect), the Queries list is filtered to exactly these entry ids. */\n public inspectFilterIds = signal<string[] | null>(this.persisted.inspectFilterIds ?? null);\n\n private queryEntries = computed(() => queryDevtoolsEntries().filter((e) => e.kind === 'query'));\n\n /**\n * The queries that still exist. Everything that measures what the application is doing right now -\n * the tab bar's error flags, the tamper dot, the timeline, the identity match behind an event row -\n * reads this rather than {@link queryEntries}, so a tombstone never inflates a live number.\n */\n private liveQueryEntries = computed(() => this.queryEntries().filter((e) => !e.destroyedAt));\n\n protected panelTampered = computed(\n () =>\n this.liveQueryEntries().some((entry) => this.isTampered(entry)) ||\n Object.keys(queryDevtoolsTokenTtls()).length > 0,\n );\n\n public stackEntries = computed(() =>\n queryDevtoolsEntries().filter((e) => e.kind === 'query-stack' || e.kind === 'paged-query-stack'),\n );\n\n public sequenceEntries = computed(() => queryDevtoolsEntries().filter((e) => e.kind === 'query-sequence'));\n\n public batchEntries = computed(() => queryDevtoolsEntries().filter((e) => e.kind === 'query-batch'));\n\n public formEntries = computed(() => queryDevtoolsEntries().filter((e) => e.kind === 'query-form'));\n\n public authEntries = computed(() => queryDevtoolsEntries().filter((e) => e.kind === 'auth-provider'));\n\n public wsEntries = computed(() => queryDevtoolsEntries().filter((e) => e.kind === 'ws-client'));\n\n /** Unique client names present across queries and auth providers, for the Queries-tab picker. */\n public clientNames = computed(() => {\n const names = new Set<string>();\n for (const entry of queryDevtoolsEntries()) {\n if (entry.meta.clientName) names.add(entry.meta.clientName);\n }\n return Array.from(names).sort();\n });\n\n /** Unique repositories (with their client name + base URL) used by the Cache and Events tabs. */\n private repositories = computed(() => {\n const map = new Map<QueryRepository, { name: string; baseUrl: string; client: QueryClient | null }>();\n for (const entry of queryDevtoolsEntries()) {\n const repo = entry.meta.repository;\n if (repo && !map.has(repo)) {\n map.set(repo, {\n name: entry.meta.clientName ?? 'unknown',\n baseUrl: entry.meta.clientBaseUrl ?? '',\n client: entry.meta.client ?? null,\n });\n }\n }\n return Array.from(map, ([repository, info]) => ({ repository, ...info }));\n });\n\n /**\n * Every client the Faults tab can arm, with the fault it currently carries. Clients with nothing armed\n * read as {@link EMPTY_QUERY_DEVTOOLS_FAULT} so the inputs always have a value to show.\n */\n public faultClients = computed(() => {\n const faults = queryDevtoolsFaults();\n\n return this.repositories()\n .map(({ name, baseUrl }) => {\n const fault = faults[name] ?? EMPTY_QUERY_DEVTOOLS_FAULT;\n\n return { name, baseUrl, fault, armed: isQueryDevtoolsFaultArmed(fault) };\n })\n .sort((a, b) => a.name.localeCompare(b.name));\n });\n\n /**\n * The names of the clients currently carrying a fault, or `null` when none do - so a template can `@if`\n * on it. Armed faults are the one state where the panel is lying to the app on purpose, and a badge on a\n * tab that isn't open cannot say that: whichever tab you are reading, a red response has to be\n * attributable to the injection rather than to the API.\n */\n protected armedFaultClients = computed(() => {\n const armed = this.faultClients()\n .filter((client) => client.armed)\n .map((client) => client.name);\n\n return armed.length ? armed : null;\n });\n\n /**\n * The routes currently answered by a designed mock, for the shell's banner. A mocked response is a\n * stronger lie than an override - nothing was sent at all - so it is named above every tab, not just\n * badged on the one that armed it.\n */\n protected armedMockRoutes = computed(() => {\n const armed = queryDevtoolsArmedMocks();\n const routes = queryDevtoolsMocks()\n .filter((mock) => armed.has(mock.id))\n .map((mock) => `${mock.method} ${mock.pattern}`);\n\n return routes.length ? routes : null;\n });\n\n /**\n * The queries the list is scoped to before the search box and the status chips narrow them further:\n * either the picked client's, or exactly the inspected element's.\n */\n public scopedQueries = computed(() => {\n const entries = this.queryEntries();\n const inspectIds = this.inspectFilterIds();\n\n if (inspectIds) return entries.filter((e) => inspectIds.includes(e.id));\n\n const client = this.selectedClientName();\n\n return client ? entries.filter((e) => e.meta.clientName === client) : entries;\n });\n\n /** How many runs every query has recorded, for the Timeline tab's badge. */\n private runTotals = computed<TabBadge>(() => {\n let count = 0;\n let errors = 0;\n\n for (const entry of this.queryEntries()) {\n for (const run of entry.stats?.runs() ?? []) {\n count++;\n if (run.status === 'error') errors++;\n }\n }\n\n return { count, errors };\n });\n\n /** Cache entries across every client, for the Cache tab's badge. */\n private cacheEntryCount = computed(() =>\n this.repositories().reduce((total, { repository }) => {\n // Read the version signal so the badge recounts on every cache mutation.\n repository.subtle.cacheVersion();\n\n return total + repository.subtle.cacheEntries().length;\n }, 0),\n );\n\n /**\n * What each tab holds, so a failing query in a tab that is not open is still visible. Reading it\n * subscribes the tab bar to every entry's live state - which is the point of the badges.\n */\n protected tabBadges = computed<Record<DevtoolsTab, TabBadge>>(() => {\n const queries = this.liveQueryEntries();\n const stacks = this.stackEntries();\n const sequences = this.sequenceEntries();\n const batches = this.batchEntries();\n const events = this.eventLog();\n\n return {\n queries: {\n // Live queries only, so the badge and the list agree: the list leaves tombstones out until the\n // Gone chip asks for them. A frozen failure is history too, so it never sets the error flag.\n count: queries.length,\n errors: queries.filter((entry) => this.queryStatus(entry.handle as AnyQuery) === 'error').length,\n },\n stacks: {\n count: stacks.length,\n errors: stacks.filter((entry) =>\n entry.kind === 'paged-query-stack' ? !!this.asPagedStack(entry).error() : !!this.asStack(entry).anyError(),\n ).length,\n },\n sequences: {\n count: sequences.length,\n errors: sequences.filter((entry) => (this.asSequence(entry)?.failedAt() ?? null) !== null).length,\n },\n // A batch tolerates a partial failure by design, so the flag counts the runs that lost an item -\n // the number a bulk edit is judged on - rather than the batches that failed outright.\n batches: {\n count: batches.length,\n errors: batches.filter((entry) => this.asBatch(entry)?.failed() > 0).length,\n errorNoun: 'partial',\n },\n forms: { count: this.formEntries().length, errors: 0 },\n auth: { count: this.authEntries().length, errors: 0 },\n ws: { count: this.wsEntries().length, errors: 0 },\n cache: { count: this.cacheEntryCount(), errors: 0 },\n // Not a count of locks: the tab only reads them while it is open, so a badge would have to poll\n // the whole origin whenever the panel is - and the tab bar folds an uncounted tab behind \"More\".\n locks: { count: 0, errors: 0 },\n timeline: this.runTotals(),\n events: {\n count: events.length,\n errors: events.filter((event) => event.type === 'request-error').length,\n },\n // Armed faults are reported as errors rather than as a plain count: the badge is the one reminder\n // that the app is misbehaving on purpose, and it has to be impossible to read as \"all good\".\n faults: { count: 0, errors: Object.keys(queryDevtoolsFaults()).length, errorNoun: 'armed' },\n // Armed mocks are errors for the same reason armed faults are: the count that matters is how much\n // of the app is being answered by the panel, and it must be impossible to read as \"all good\".\n mocks: { count: queryDevtoolsMocks().length, errors: queryDevtoolsArmedMocks().size, errorNoun: 'armed' },\n about: { count: 0, errors: 0 },\n settings: { count: 0, errors: 0 },\n };\n });\n\n /**\n * The tabs the bar shows: the pinned ones, the one that is open, and every tab that currently holds\n * something.\n */\n protected visibleTabs = computed(() => this.tabs.filter((tab) => this.isTabPrimary(tab.id)));\n\n /** The empty tabs, which the bar offers behind \"More\" instead. */\n protected overflowTabs = computed(() => this.tabs.filter((tab) => !this.isTabPrimary(tab.id)));\n\n public selectedQuery = computed(() => this.findQuery(this.selectedQueryId()));\n public stackSelectedQuery = computed(() => this.findQuery(this.stackSelectedQueryId()));\n public sequenceSelectedQuery = computed(() => this.findQuery(this.sequenceSelectedQueryId()));\n public batchSelectedQuery = computed(() => this.findQuery(this.batchSelectedQueryId()));\n public eventSelectedQuery = computed(() => this.findQuery(this.eventSelectedQueryId()));\n public formSelectedQuery = computed(() => this.findQuery(this.formSelectedQueryId()));\n public timelineSelectedQuery = computed(() => this.findQuery(this.timelineSelectedQueryId()));\n\n /**\n * The cache per client, with every entry's size measured. Reading each response inside the computed is\n * what keeps the totals current: a cache mutation bumps `cacheVersion`, but a response landing in an\n * entry that is already there does not.\n */\n public cacheView = computed(() => {\n const dropped = this.droppedCacheEntries();\n\n return this.repositories().map(({ repository, name, baseUrl, client }) => {\n // Read the version signal so this recomputes on every cache mutation.\n repository.subtle.cacheVersion();\n\n const rows = repository.subtle.cacheEntries().map((entry): CacheRow => {\n const measured = measureQueryDevtoolsPayload({ body: entry.request.response() });\n\n return { entry, bytes: measured.bytes, isEstimatedBytes: !measured.isExact && measured.bytes > 0 };\n });\n\n return {\n name,\n baseUrl,\n repository,\n rows,\n bytes: rows.reduce((total, row) => total + row.bytes, 0),\n isEstimatedBytes: rows.some((row) => row.isEstimatedBytes),\n unused: rows.filter((row) => row.entry.isUnused).length,\n pollStates: client?.subtle.sync?.lockManager.keyStates() ?? {},\n client,\n // The event log labels a client by its base URL, falling back to its name - match the same way.\n dropped: dropped.filter((entry) => entry.client === (baseUrl || name)),\n };\n });\n });\n\n /** Map of a component's host element to the query entries it created (for the inspect tool). */\n private elementQueryMap = computed(() => {\n const map = new Map<HTMLElement, QueryDevtoolsEntry[]>();\n for (const entry of this.queryEntries()) {\n const el = entry.meta.element;\n if (!el) continue;\n const list = map.get(el);\n if (list) list.push(entry);\n else map.set(el, [entry]);\n }\n return map;\n });\n\n /** Disarms every client's fault - the shell's \"Faults armed\" banner offers this above every tab. */\n protected readonly CLEAR_FAULTS = clearQueryDevtoolsFaults;\n\n /** Whether what is armed came back from a previous page load, which is what the bars have to say. */\n protected faultsRestored = computed(queryDevtoolsFaultsRestored);\n protected mocksRestored = computed(queryDevtoolsArmedMocksRestored);\n\n /** Stops serving every designed mock - the shell's \"Mocks armed\" banner offers the same way out. */\n protected readonly DISARM_MOCKS = clearQueryDevtoolsArmedMocks;\n\n /**\n * What the previous page load left armed: how many ops came back, how many queries took them, and the\n * ids nothing claimed. `null` when this page inherited nothing, so a template can `@if` on it.\n */\n protected restoredOverrides = computed(() => {\n const groups = restoredQueryDevtoolsOverrides();\n\n if (!groups.length) return null;\n\n const armed = groups.filter((group) => group.armed);\n const orphaned = groups.filter((group) => !group.armed);\n\n return {\n queries: armed.length,\n ops: armed.reduce((sum, group) => sum + group.count, 0),\n firstId: armed[0]?.id ?? null,\n orphaned: orphaned.map((group) => describeEntryId(group.id)),\n // `local` means they outlived closing the tab, which is a different thing to have to be told.\n fromLocalStorage: queryDevtoolsRestoredOverridesScope() === 'local',\n };\n });\n\n /** Drops everything the reload re-armed, and empties the store it came from. */\n protected readonly DROP_RESTORED_OVERRIDES = clearRestoredQueryDevtoolsOverrides;\n\n /** Every edge, so a float resizes the way a window does rather than only from one corner. */\n protected readonly FLOAT_RESIZE_EDGES: ResizeEdge[] = ['n', 's', 'e', 'w', 'ne', 'nw', 'se', 'sw'];\n\n constructor() {\n // Assigned here (not as an arrow property) so `this` is bound for the value-explorer callback.\n this.toggleJsonPath = (path: string, expand: boolean) => {\n const expanded = new Set(this.jsonExpandedPaths());\n const collapsed = new Set(this.jsonCollapsedPaths());\n\n if (expand) {\n expanded.add(path);\n collapsed.delete(path);\n } else {\n collapsed.add(path);\n expanded.delete(path);\n }\n\n this.jsonExpandedPaths.set(expanded);\n this.jsonCollapsedPaths.set(collapsed);\n };\n\n // Each copy restarts the countdown; switchMap drops the pending reset of the previous one.\n this.copiedReset$\n .pipe(\n switchMap(() => timer(COPIED_RESET_MS)),\n tap(() => {\n this.copiedReport.set(false);\n this.copiedInsomnia.set(false);\n this.copiedCurl.set(false);\n this.copiedGql.set(false);\n this.copiedRoute.set(false);\n }),\n takeUntilDestroyed(),\n )\n .subscribe();\n\n // The box has to follow the element for as long as the smooth scroll is moving it, so it tracks per\n // frame rather than measuring once. Each locate cancels the previous run's frames and its timeout.\n this.locate$\n .pipe(\n switchMap((element) => {\n // `NEVER` for the not-on-screen case: there is no box to move, but the button's reason has to\n // stay up for the same beat before `finalize` clears it.\n const frames = element\n ? animationFrames().pipe(tap(() => this.locatedRect.set(element.getBoundingClientRect())))\n : NEVER;\n\n return frames.pipe(\n takeUntil(timer(LOCATE_HOLD_MS)),\n finalize(() => {\n this.locatedRect.set(null);\n this.locateState.set('idle');\n }),\n );\n }),\n takeUntilDestroyed(),\n )\n .subscribe();\n\n // Web Locks has no change event, so the Locks tab polls - but a `locks.query()` per second is not a\n // `Date.now()` read, so it only runs while that tab is the one on screen and the page is visible.\n // The probe lock is taken for the same window: it is what tells this tab's rows from another tab's.\n toObservable(\n computed(\n () => this.probeLocks.isSupported && this.open() && this.activeTab() === 'locks' && this.isDocumentVisible(),\n ),\n )\n .pipe(\n tap((inspecting) => this.holdProbeLock(inspecting)),\n switchMap((inspecting) => (inspecting ? interval(1000).pipe(startWith(0)) : EMPTY)),\n switchMap(() => navigator.locks.query()),\n tap((snapshot) => this.lockSnapshot.set(snapshot)),\n takeUntilDestroyed(),\n )\n .subscribe();\n\n // Merge every live repository's event stream into the rolling log, re-subscribing as the set of\n // repositories changes. Composed with RxJS (not a subscribe-in-effect) per the styleguide.\n toObservable(this.repositories)\n .pipe(\n switchMap((repos) =>\n merge(\n ...repos.map(({ repository, name, baseUrl }) =>\n repository.events$.pipe(map((event) => ({ event, client: baseUrl || name }))),\n ),\n ),\n ),\n tap(({ event, client }) => this.pushEvent(event, client)),\n takeUntilDestroyed(),\n )\n .subscribe();\n\n // Both persistence effects below clear the key from *both* browser stores whenever their scope\n // changes, before writing it into the store that scope now names - otherwise the copy the old scope\n // left behind would be what the next page load reads.\n let viewStateScope: QueryDevtoolsStorageScope | null = null;\n\n effect(() => {\n const scope = queryDevtoolsSettings().viewState;\n\n const state: PersistedState = {\n open: this.open(),\n height: this.panelHeight(),\n width: this.panelWidth(),\n listWidth: this.listWidth(),\n drawerWidth: this.drawerWidth(),\n listHeight: this.listHeight(),\n drawerHeight: this.drawerHeight(),\n dock: this.dock(),\n reservesSpace: this.reservesSpace(),\n floatRect: this.floatRect(),\n floatParked: this.floatParked(),\n activeTab: this.activeTab(),\n detailTab: this.detailTab(),\n selectedClientName: this.selectedClientName(),\n selectedQueryId: this.selectedQueryId(),\n stackSelectedQueryId: this.stackSelectedQueryId(),\n sequenceSelectedQueryId: this.sequenceSelectedQueryId(),\n batchSelectedQueryId: this.batchSelectedQueryId(),\n eventSelectedQueryId: this.eventSelectedQueryId(),\n formSelectedQueryId: this.formSelectedQueryId(),\n timelineSelectedQueryId: this.timelineSelectedQueryId(),\n selectedFormId: this.selectedFormId(),\n inspectFilterIds: this.inspectFilterIds(),\n queryFilter: this.queryFilter(),\n queryFacets: [...this.queryFacets()],\n queryRecentFirst: this.queryRecentFirst(),\n queryTreeView: this.queryTreeView(),\n collapsedQueryPaths: [...this.collapsedQueryPaths()],\n eventClient: this.eventClient(),\n eventErrorsOnly: this.eventErrorsOnly(),\n socketFilter: this.socketFilter(),\n jsonSearch: this.jsonSearch(),\n expandedSteps: [...this.expandedSteps()],\n expandedBatchItems: [...this.expandedBatchItems()],\n expandedQueryGroups: [...this.expandedQueryGroups()],\n jsonExpanded: [...this.jsonExpandedPaths()],\n jsonCollapsed: [...this.jsonCollapsedPaths()],\n };\n\n if (scope !== viewStateScope) {\n clearQueryDevtoolsStore(STORAGE_KEY);\n viewStateScope = scope;\n }\n\n writeQueryDevtoolsStore(scope, STORAGE_KEY, state);\n });\n\n // `border-box` is what makes the padding eat into a `height: 100%` shell instead of pushing it past\n // the edge of the window; with the root's default `auto` height it changes nothing. The cleanup runs\n // before each re-run, so the edge a dock switch left behind is always given back.\n effect((onCleanup) => {\n const reservation = this.pageReservation();\n\n if (!reservation) return;\n\n const root = this.document.documentElement;\n\n this.renderer.setStyle(root, { boxSizing: 'border-box', [reservation.padding]: `${reservation.px}px` });\n\n onCleanup(() => this.renderer.removeStyles(root, 'boxSizing', reservation.padding));\n });\n\n // A window that shrinks below the floating panel would otherwise leave it half (or wholly) off\n // screen, with no edge left to grab. Untracked on the way in so clamping cannot re-trigger itself.\n effect(() => {\n const viewport = this.viewport();\n\n if (!this.floating()) return;\n\n untracked(() =>\n this.floatRect.set(\n this.floatParked()\n ? clampFloatToPeek(this.floatRect(), viewport)\n : clampFloatRect(this.floatRect(), viewport),\n ),\n );\n });\n\n let pinsScope: QueryDevtoolsStorageScope | null = null;\n\n effect(() => {\n const scope = queryDevtoolsSettings().pins;\n const ids = [...this.pinnedQueryIds()];\n\n if (scope !== pinsScope) {\n clearQueryDevtoolsStore(PINS_STORAGE_KEY);\n pinsScope = scope;\n }\n\n writeQueryDevtoolsStore(scope, PINS_STORAGE_KEY, ids);\n });\n\n // A lowered cap has to bite now rather than at the next request, or the log it was lowered to shorten\n // stays exactly as long as it was.\n effect(() => {\n const cap = queryDevtoolsSettings().maxEvents;\n\n untracked(() => this.eventLog.update((log) => (log.length > cap ? log.slice(0, cap) : log)));\n });\n\n // Close any open JIT editor on any selection / tab change, and reset the value-explorer search\n // when the *selected query* actually changes (but not on the initial restore, so a persisted\n // search survives a reload).\n this.lastSelectionKey = this.selectionKey();\n effect(() => {\n const key = this.selectionKey();\n this.activeTab();\n\n this.editorMode.set('none');\n this.editError.set(null);\n this.copiedReport.set(false);\n this.copiedInsomnia.set(false);\n this.copiedCurl.set(false);\n this.copiedRoute.set(false);\n this.diffRunIndex.set(null);\n this.diffBaseRunIndex.set(null);\n this.errorRunIndex.set(null);\n\n if (key !== this.lastSelectionKey) {\n this.lastSelectionKey = key;\n this.jsonSearch.set('');\n }\n });\n\n registerEthleteVersion('components', COMPONENTS_VERSION);\n registerEthleteVersion('query-devtools', QUERY_DEVTOOLS_VERSION);\n\n // A pop-out holds the panel element; leaving its window open would leave a dead panel on screen.\n this.destroyRef.onDestroy(() => this.closePopup());\n\n const doc = this.document;\n\n // Angular does not destroy the application when the host page unloads, so the clean-up above never\n // runs on a reload - the pop-up would outlive the document whose panel it holds and keep showing a\n // panel no signal can ever update again. `pagehide` rather than `beforeunload`: the latter is\n // unreliable and keeps the page out of the back/forward cache.\n const view = doc.defaultView;\n\n if (view) {\n fromEvent(view, 'pagehide')\n .pipe(\n tap(() => this.closePopup()),\n takeUntilDestroyed(),\n )\n .subscribe();\n }\n\n // Global toggle shortcut: Ctrl/Cmd + Alt + Q (\"Q\" for Query) - uncommon, no browser/OS conflict.\n // Matched on `code` (the physical key), not `key`: on macOS, Option rewrites `key` to the layout's\n // alternate glyph (Option+Q is \"œ\" on a US layout), so a `key === 'q'` test never fires there.\n fromEvent<KeyboardEvent>(doc, 'keydown')\n .pipe(\n filter((e) => (e.ctrlKey || e.metaKey) && e.altKey && (e.code === 'KeyQ' || e.key.toLowerCase() === 'q')),\n tap((e) => {\n e.preventDefault();\n this.toggleOpen();\n }),\n takeUntilDestroyed(),\n )\n .subscribe();\n\n // Drag-to-resize: while a resize is in progress, track pointer movement on the document. A pointer\n // released outside the window never reports its `pointerup`, so a move that arrives with no button\n // held ends the drag instead of resizing - otherwise the panel would keep following the pointer.\n toObservable(this.drag)\n .pipe(\n switchMap((active) =>\n active\n ? merge(\n fromEvent<PointerEvent>(active.doc, 'pointermove').pipe(\n tap((e) => (e.buttons === 0 ? this.drag.set(null) : this.applyResize(active, e))),\n ),\n merge(\n fromEvent<PointerEvent>(active.doc, 'pointerup'),\n fromEvent<PointerEvent>(active.doc, 'pointercancel'),\n ).pipe(tap(() => this.drag.set(null))),\n )\n : EMPTY,\n ),\n takeUntilDestroyed(),\n )\n .subscribe();\n\n // Inspect mode: while active, listen on the document to map the hovered element to a query.\n const capture = { capture: true };\n toObservable(this.inspectActive)\n .pipe(\n tap((active) => {\n if (!active) this.inspectHover.set(null);\n }),\n switchMap((active) =>\n active\n ? merge(\n fromEvent<MouseEvent>(doc, 'mousemove', capture).pipe(tap((e) => this.updateInspectHover(e))),\n fromEvent<MouseEvent>(doc, 'click', capture).pipe(tap((e) => this.selectInspectedQuery(e))),\n fromEvent<KeyboardEvent>(doc, 'keydown', capture).pipe(\n tap((e) => {\n if (e.key === 'Escape') this.inspectActive.set(false);\n }),\n ),\n )\n : EMPTY,\n ),\n takeUntilDestroyed(),\n )\n .subscribe();\n }\n\n public ngOnInit() {\n if (this.startOpen()) this.open.set(true);\n }\n\n /** @see queryDevtoolsOverridePersistence */\n public overridesPersist() {\n return queryDevtoolsOverridePersistence();\n }\n\n public toggleOverridesPersist() {\n setQueryDevtoolsOverridePersistence(!this.overridesPersist());\n }\n\n /** Where armed overrides are kept, as the drawer's toggle and the Settings picker both name it. */\n public overridesScopeLabel() {\n const scope = queryDevtoolsSettings().overrides;\n\n return scope === 'none' ? 'not kept' : `${scope}Storage`;\n }\n\n /**\n * Puts the panel back the way it ships: layout, filters, selections, pins and the stored overrides.\n * The settings themselves stay - a panel behaving oddly is a reason to reset its state, not to lose the\n * scopes and limits that were chosen deliberately.\n *\n * Resetting the live state is the point, not just clearing the keys: the persistence effects would\n * write the current state straight back into whatever store the scopes name.\n */\n public resetDevtools() {\n clearQueryDevtoolsStore(STORAGE_KEY);\n clearQueryDevtoolsStore(PINS_STORAGE_KEY);\n clearQueryDevtoolsOverrideStore();\n clearQueryDevtoolsMockStore();\n\n this.dock.set('bottom');\n this.reservesSpace.set(true);\n this.panelHeight.set(DEFAULT_HEIGHT);\n this.panelWidth.set(DEFAULT_WIDTH);\n this.floatRect.set(DEFAULT_FLOAT_RECT);\n this.floatParked.set(false);\n this.listWidth.set(null);\n this.drawerWidth.set(null);\n this.listHeight.set(null);\n this.drawerHeight.set(null);\n\n this.activeTab.set('queries');\n this.detailTab.set('overview');\n this.pinnedQueryIds.set(new Set());\n this.inspectFilterIds.set(null);\n\n this.selectedClientName.set(null);\n this.selectedQueryId.set(null);\n this.selectedFormId.set(null);\n this.stackSelectedQueryId.set(null);\n this.sequenceSelectedQueryId.set(null);\n this.batchSelectedQueryId.set(null);\n this.eventSelectedQueryId.set(null);\n this.formSelectedQueryId.set(null);\n this.timelineSelectedQueryId.set(null);\n\n this.queryFilter.set('');\n this.queryFacets.set(new Set());\n this.queryRecentFirst.set(true);\n this.queryTreeView.set(false);\n this.collapsedQueryPaths.set(new Set());\n this.expandedQueryGroups.set(new Set());\n this.expandedSteps.set(new Set());\n this.expandedBatchItems.set(new Set());\n this.eventClient.set(null);\n this.eventErrorsOnly.set(false);\n this.socketFilter.set('');\n this.jsonSearch.set('');\n this.jsonExpandedPaths.set(new Set());\n this.jsonCollapsedPaths.set(new Set());\n }\n\n /**\n * Opens Settings over whatever tab is showing, and the same click closes it again. Settings is not in\n * the tab bar - see {@link DevtoolsTab}.\n */\n protected toggleSettings() {\n if (this.activeTab() === 'settings') {\n this.activeTab.set(this.tabBeforeSettings);\n\n return;\n }\n\n this.tabBeforeSettings = this.activeTab();\n this.activeTab.set('settings');\n }\n\n /** Opens the first query the reload re-armed, so the banner leads somewhere rather than just warning. */\n protected reviewRestoredOverrides(id: string) {\n this.activeTab.set('queries');\n this.selectedQueryId.set(id);\n this.detailTab.set('overview');\n }\n\n /**\n * Closing while popped out docks back instead: the panel a pop-out shows is the very element the\n * `@if` below would destroy, so it has to come home before it can be closed.\n */\n protected toggleOpen() {\n if (this.poppedOut()) {\n this.dockBack();\n\n return;\n }\n\n this.open.update((v) => !v);\n }\n\n protected floatPanel() {\n this.popOutBlocked.set(false);\n this.dock.set('float');\n }\n\n protected selectLayout(layout: DevtoolsLayout) {\n if (layout === 'popout') {\n this.popOut();\n\n return;\n }\n\n this.popOutBlocked.set(false);\n this.dock.set(layout);\n }\n\n /**\n * Moves the panel into a window of its own - the same element, adopted by the pop-up's document, so\n * every signal binding in it keeps updating from the app it is inspecting.\n *\n * The panel's styles are global `<style>` tags in the host document, and the theming tokens it reads\n * hang off the root element, so both are copied over; without them the pop-out renders unstyled.\n */\n public popOut() {\n const panel = this.panelEl()?.nativeElement;\n\n if (!panel || this.poppedOut()) return;\n\n // Navigated to rather than written into: a pop-up left on `about:blank` keeps its URL as the window\n // title whatever `document.title` says, and a document written into one is quirks-mode - where a\n // table ignores the font size it inherits, so the Cache and Events tables come out half again as\n // large as the panel around them. The blob carries the doctype and the title with it instead.\n const source = createObjectUrlHandle(new Blob([POPOUT_DOCUMENT], { type: 'text/html' }));\n const popup = source.url ? this.document.defaultView?.open(source.url, 'et-query-devtools', POPOUT_FEATURES) : null;\n\n if (!popup) {\n source.revoke();\n this.popOutBlocked.set(true);\n\n return;\n }\n\n this.popOutBlocked.set(false);\n\n // That navigation replaces the pop-up's document, so the panel may only be moved once the new one is\n // there - a panel appended to the initial empty document would be dropped on load.\n fromEvent(popup, 'load')\n .pipe(\n take(1),\n tap(() => {\n source.revoke();\n this.zone.run(() => this.mountPopOut(popup, panel));\n }),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe();\n }\n\n public selectClient(name: string | null) {\n this.selectedClientName.set(name);\n this.inspectFilterIds.set(null);\n }\n\n public clearInspectFilter() {\n this.inspectFilterIds.set(null);\n }\n\n public toggleFacet(facet: QueryListFacet) {\n const next = new Set(this.queryFacets());\n\n if (!next.delete(facet)) next.add(facet);\n\n this.queryFacets.set(next);\n }\n\n /** Drops the search term and the status chips, keeping the client / inspection scope. */\n public clearQueryFilters() {\n this.queryFilter.set('');\n this.queryFacets.set(new Set());\n }\n\n public isQueryPinned(entry: QueryDevtoolsEntry) {\n return this.pinnedQueryIds().has(entry.id);\n }\n\n public toggleQueryPath(key: string) {\n const next = new Set(this.collapsedQueryPaths());\n\n if (!next.delete(key)) next.add(key);\n\n this.collapsedQueryPaths.set(next);\n }\n\n public toggleQueryPin(entry: QueryDevtoolsEntry) {\n const next = new Set(this.pinnedQueryIds());\n\n if (!next.delete(entry.id)) next.add(entry.id);\n\n this.pinnedQueryIds.set(next);\n }\n\n protected toggleInspect() {\n this.inspectActive.update((v) => !v);\n }\n\n protected startResize(event: PointerEvent) {\n event.preventDefault();\n this.drag.set({ kind: 'panel', doc: this.document });\n }\n\n protected moveFloat(move: DragMoveEvent) {\n this.floatRect.update((rect) =>\n clampFloatToPeek({ ...rect, x: rect.x + move.stepX, y: rect.y + move.stepY }, this.viewport()),\n );\n }\n\n /** Parks the panel where a drag left it, or pulls it back in if the drag stopped short of an edge. */\n protected endFloatMove() {\n const settled = settledFloatRect(this.floatRect(), this.viewport());\n\n this.floatRect.set(settled.rect);\n this.floatParked.set(settled.collapsed);\n }\n\n /** A click on the title bar of a parked panel brings it back - the gesture that parked it, reversed. */\n protected restoreFloat() {\n if (!this.floatParked()) return;\n\n this.floatRect.update((rect) => clampFloatRect(rect, this.viewport()));\n this.floatParked.set(false);\n }\n\n /** A resize reports a delta from where the pointer went down, so the rect it started from is kept. */\n protected startFloatResize() {\n this.floatResizeBase = this.floatRect();\n }\n\n protected resizeFloat(move: ResizeMoveEvent) {\n this.floatRect.set(resizedFloatRect(this.floatResizeBase ?? this.floatRect(), { move, viewport: this.viewport() }));\n }\n\n protected endFloatResize() {\n this.floatResizeBase = null;\n }\n\n public startPaneResize(event: PointerEvent, target: { pane: PaneTarget; container: HTMLElement }) {\n event.preventDefault();\n this.drag.set({ kind: 'pane', ...target, axis: this.paneAxis(), doc: target.container.ownerDocument });\n }\n\n /** Hands a pane back to the stylesheet's proportional default, on the axis it is being sized along. */\n public resetPaneSize(pane: PaneTarget) {\n this.paneSize(pane, this.paneAxis()).set(null);\n }\n\n protected inspectLabel(entries: QueryDevtoolsEntry[]) {\n const first = entries[0];\n if (entries.length === 1 && first) {\n return `${first.meta.method ?? ''} ${this.queryRoute(first, first.handle as AnyQuery)}`.trim();\n }\n return `${entries.length} queries`;\n }\n\n /**\n * A query's route, split so the template can tell its static path from its path params (each carrying\n * the value the query used, or `:<name>` while it has none yet) and from the query string of the\n * request that ran - which is what tells two requests to the same endpoint apart.\n */\n public routeSegments(entry: QueryDevtoolsEntry | undefined, query: AnyQuery): RouteSegment[] {\n const path = this.renderRoute(entry, this.queryArgs(query));\n const search = query.subtle.request()?.url.split('?')[1];\n\n // Only onto a route that rendered: an entry with no route at all reads as no route, not as a bare\n // query string.\n return search && path.length ? [...path, { text: `?${search}`, kind: 'query' }] : path;\n }\n\n /** The full URL of the request a query last made, or `null` while it has not executed. */\n public requestUrl(query: AnyQuery) {\n return query.subtle.request()?.url ?? null;\n }\n\n /**\n * The args of a query. A query executed imperatively (`execute({ args })`, a sequence step, an auth\n * query) never writes them to its own `args` signal - only the `withArgs` feature does - so the args\n * its current request was built from stand in.\n */\n public queryArgs(query: AnyQuery) {\n return query.args() ?? query.subtle.request()?.args ?? null;\n }\n\n public queryStatus(query: AnyQuery): QueryStatus {\n const state = query.executionState();\n if (!state) return 'idle';\n if (state.type === 'loading') return 'loading';\n if (state.type === 'failure') return 'error';\n return 'success';\n }\n\n /**\n * A request in flight is already refreshing, so reporting it as stale on top of `loading` is noise -\n * the same precedence the cache tab's freshness column applies.\n */\n public isStale(query: AnyQuery) {\n try {\n const request = query.subtle.request();\n\n if (!request || request.loading()) return false;\n\n return request.isStale();\n } catch {\n return false;\n }\n }\n\n /**\n * Whether an entry is showing something other than what the server actually sent - an armed response\n * override, or a devtools fault that decided its last completed run. Deliberately not \"a fault is\n * armed nearby\": an armed-but-idle fault (a `failRate` under 100, say) mostly lets requests through\n * untouched, so that would over-claim for the vast majority of queries on that client.\n */\n public isTampered(entry: QueryDevtoolsEntry) {\n return (\n (entry.overrides?.list().length ?? 0) > 0 ||\n (entry.stats?.current().lastResponseWasFaulted ?? false) ||\n this.isMocked(entry)\n );\n }\n\n /** Whether a designed mock is armed for this query's own route, so nothing it shows came off the wire. */\n public isMocked(entry: QueryDevtoolsEntry) {\n if (!entry.meta.route) return false;\n\n const id = queryDevtoolsMockId({\n clientName: entry.meta.clientName ?? '',\n method: entry.meta.method ?? 'GET',\n pattern: entry.meta.route,\n });\n\n return queryDevtoolsArmedMocks().has(id);\n }\n\n /**\n * What a query's current request is doing beyond being loading, or `null` when there is nothing beyond\n * the status dot to say - so the readout only takes up room while it carries something.\n */\n public requestProgress(query: AnyQuery): RequestProgress | null {\n const request = query.subtle.request();\n\n if (!request) return null;\n\n const retry = request.subtle.retryState();\n const attempts = request.subtle.attempts();\n // The request's own loading state, not the query's: a forced loading state carries no progress, and\n // reading the query's would report the forced one as a transfer that never started.\n const progress = request.loading()?.progress ?? null;\n\n if (!retry && !progress && attempts < 2) return null;\n\n // The countdown is a `Date.now()` comparison, so the clock is what makes it tick down - the same trap\n // `isStale` documents.\n this.clock();\n\n return { attempts, retry, retryInMs: retry ? Math.max(0, retry.startsAt - Date.now()) : null, progress };\n }\n\n /** Why a retry was scheduled, as the panel spells it out. A status of 0 never reached the server. */\n public retryCause(status: number) {\n return status ? `after ${status}` : 'after a connection failure';\n }\n\n public formatPercent(percentage: number) {\n return `${Math.round(percentage)}%`;\n }\n\n /** A countdown in whole seconds, spelled out the way the cache freshness column does. */\n public formatCountdown(ms: number | null) {\n return ms === null ? '—' : `${Math.ceil(ms / 1000)}s`;\n }\n\n public queryActivity(entry: QueryDevtoolsEntry): QueryActivity {\n return this.activityOf([entry.stats]);\n }\n\n public linkActivity(link: QueryLink): QueryActivity {\n return this.activityOf([link.stats]);\n }\n\n public stackActivity(stack: AnyQueryStack | AnyPagedQueryStack): QueryActivity {\n return this.activityOf(this.queriesForStack(stack).map((link) => link.stats));\n }\n\n public sequenceActivity(sequence: QuerySequence<unknown[]>): QueryActivity {\n return this.activityOf(this.queriesForSequence(sequence).map((link) => link.stats));\n }\n\n /** Clears an entry's counters and run history, so the next interaction can be measured on its own. */\n public resetStats(entry: QueryDevtoolsEntry) {\n entry.stats?.reset();\n this.diffRunIndex.set(null);\n this.diffBaseRunIndex.set(null);\n this.errorRunIndex.set(null);\n }\n\n /** A query's runs, newest first - the order a history is read in. */\n public queryRuns(entry: QueryDevtoolsEntry): QueryDevtoolsRun[] {\n return [...(entry.stats?.runs() ?? [])].reverse();\n }\n\n /**\n * What a run's status dot and timeline bar colour by. `pending` reuses the panel's loading colour;\n * `aborted` matches no rule and so falls back to the neutral one.\n */\n public runStatus(run: QueryDevtoolsRun) {\n return run.status === 'pending' ? 'loading' : run.status;\n }\n\n /**\n * Whether a run can be an end of the diff: it still holds its body, and so does some other run of the\n * same query. Deliberately not \"an *older* run\" - a free pair means the oldest body held is pickable\n * too, as the base of a comparison against something newer.\n */\n public canDiffRun(entry: QueryDevtoolsEntry, run: QueryDevtoolsRun) {\n if (!run.hasResponse) return false;\n\n return (entry.stats?.runs() ?? []).some((other) => other.hasResponse && other.index !== run.index);\n }\n\n /**\n * Arms a run as one end of the diff, or - with one end already armed - as the other. Clicking either\n * end clears both.\n */\n public toggleRunDiff(entry: QueryDevtoolsEntry, run: QueryDevtoolsRun) {\n const ends = this.diffEnds(entry);\n\n // Nothing armed to extend, so the click starts over - which is also how the slots recover after a\n // body was trimmed out from under one of them.\n if (!ends) {\n this.diffRunIndex.set(run.index);\n this.diffBaseRunIndex.set(null);\n\n return;\n }\n\n if (run.index === ends.before.index || run.index === ends.after?.index) {\n this.diffRunIndex.set(null);\n this.diffBaseRunIndex.set(null);\n\n return;\n }\n\n this.diffBaseRunIndex.set(run.index);\n }\n\n /** Which end of the comparison a run is, so a row says so and the two ends read differently. */\n public diffRunRole(entry: QueryDevtoolsEntry, run: QueryDevtoolsRun): 'base' | 'compare' | null {\n const ends = this.diffEnds(entry);\n\n if (!ends) return null;\n if (run.index === ends.before.index) return 'base';\n\n return run.index === ends.after?.index ? 'compare' : null;\n }\n\n public responseDiff(entry: QueryDevtoolsEntry) {\n const ends = this.diffEnds(entry);\n\n if (!ends?.after) return null;\n\n return {\n before: ends.before,\n after: ends.after,\n diff: diffQueryDevtoolsResponses(ends.before.response, ends.after.response),\n };\n }\n\n /** Whether the diff header's older/newer control has a pair to move to. */\n public canStepRunDiff(entry: QueryDevtoolsEntry, older: boolean) {\n return !!this.steppedDiffPair(entry, older);\n }\n\n /**\n * Moves the whole comparison one run older or newer, so re-picking a pair does not mean scrolling back\n * up to the runs table. Within the handful of retained bodies there are only a few pairs to walk.\n */\n public stepRunDiff(entry: QueryDevtoolsEntry, older: boolean) {\n const pair = this.steppedDiffPair(entry, older);\n\n if (!pair) return;\n\n this.diffBaseRunIndex.set(pair.before.index);\n this.diffRunIndex.set(pair.after.index);\n }\n\n public toggleRunError(run: QueryDevtoolsRun) {\n this.errorRunIndex.update((current) => (current === run.index ? null : run.index));\n }\n\n /**\n * The error body of the picked run. Read off the run rather than off `query.error()`, which is the\n * only other place a failure is legible and is blanked by anything that resets the query - a logout\n * resets every secure query, so a 401 is gone from there by the time it is looked for.\n */\n public pickedRunError(entry: QueryDevtoolsEntry) {\n const picked = this.errorRunIndex();\n\n if (picked === null) return null;\n\n const run = (entry.stats?.runs() ?? []).find((candidate) => candidate.index === picked);\n\n if (!run?.error?.hasBody) return null;\n\n return { run, error: run.error };\n }\n\n /** Opens a query in the Queries tab - the Events tab is a way in, not a dead end. */\n public selectQuery(id: string) {\n this.activeTab.set('queries');\n this.selectedQueryId.set(id);\n }\n\n /** A value on one line, for a diff row or a form field. The full tree would bury the row it sits in. */\n public inlineValue(value: unknown) {\n if (typeof value === 'string') return value.length > 80 ? `\"${value.slice(0, 80)}…\"` : `\"${value}\"`;\n if (value === undefined) return 'undefined';\n\n try {\n const json = JSON.stringify(value) ?? 'undefined';\n\n return json.length > 80 ? `${json.slice(0, 80)}…` : json;\n } catch {\n return '[unserializable]';\n }\n }\n\n public formatBytes(bytes: number) {\n if (bytes < 1000) return `${bytes} B`;\n if (bytes < 1_000_000) return `${(bytes / 1000).toFixed(1)} kB`;\n\n return `${(bytes / 1_000_000).toFixed(2)} MB`;\n }\n\n /**\n * A transferred size, marked `≈` when any part of it was measured from a decoded body instead of read\n * from a `content-length` header - such a size ignores transport compression.\n */\n public formatTransferred(bytes: number, isEstimated: boolean) {\n return `${isEstimated ? '≈' : ''}${this.formatBytes(bytes)}`;\n }\n\n /** A transfer rate, given in bytes per second the way `HttpRequestLoadingProgressState.speed` reports it. */\n public formatSpeed(bytesPerSecond: number) {\n return `${this.formatBytes(Math.round(bytesPerSecond))}/s`;\n }\n\n public formatDuration(ms: number | null) {\n if (ms === null) return '—';\n\n return ms < 1000 ? `${ms}ms` : `${(ms / 1000).toFixed(2)}s`;\n }\n\n /**\n * Replays a query with the args the panel is already showing. `execute()` would otherwise default to\n * `state.args()`, which only `withArgs` ever writes - so a query executed imperatively, by a sequence\n * step or as an auth query would replay with no args at all and a function route would throw.\n */\n public executeQuery(selection: QueryDevtoolsSelection, allowCache: boolean) {\n const { query } = selection;\n\n try {\n query.execute({ args: this.queryArgs(query), options: allowCache ? { allowCache: true } : undefined });\n } catch (error) {\n this.openArgsEditor(selection);\n this.editError.set(actionErrorMessage(error));\n }\n }\n\n public resetQuery(query: AnyQuery) {\n query.reset();\n }\n\n /**\n * Copies a shareable report (path, args, status, slimmed response) for handing to an API dev.\n * Writes both rich `text/html` (Slack applies formatting on paste - it does not parse markdown) and\n * a plain-text fallback.\n */\n public copyReport(entry: QueryDevtoolsEntry, query: AnyQuery) {\n const error = query.error();\n const httpStatus = error ? error.raw.status : this.responseStatus(query);\n const method = entry.meta.method ?? '';\n\n // The URL actually requested already contains the base URL and the resolved params, so the client\n // is only spelled out separately when the query has not run and only its `:param` template is known.\n const requestUrl = this.requestUrl(query);\n const route = requestUrl ?? entry.meta.route ?? '-';\n const client = requestUrl ? '' : (entry.meta.clientBaseUrl ?? entry.meta.clientName ?? '');\n const statusLine = `status: ${this.queryStatus(query)}${httpStatus !== null ? ` (${httpStatus})` : ''} · ${this.formatTime(query.lastTimeExecutedAt())}`;\n const features = entry.meta.features?.length\n ? `features: ${entry.meta.features.map((feature) => this.featureSummary(feature)).join(' | ')}`\n : null;\n const activity = this.activitySummary(this.queryActivity(entry));\n const gqlDoc = entry.meta.gqlQuery ? this.gqlDocument(entry.meta.gqlQuery) : null;\n const args = this.queryArgs(query);\n const argsLabel = gqlDoc ? 'Variables' : 'Args';\n const argsJson = args !== null && args !== undefined ? JSON.stringify(args, null, 2) : null;\n const bodyLabel = error ? `Error (${error.raw.status})` : 'Response';\n const bodyContent = error\n ? error.isList\n ? error.errors.map((e) => e.message).join('\\n')\n : error.error.message\n : JSON.stringify(slimForReport(query.response()), null, 2);\n\n const textParts = [`${method} ${route}${client ? ` - ${client}` : ''}`, statusLine];\n if (activity) textParts.push(activity);\n if (features) textParts.push(features);\n if (gqlDoc) textParts.push('', 'GraphQL document', gqlDoc);\n if (argsJson) textParts.push('', argsLabel, argsJson);\n textParts.push('', bodyLabel, bodyContent);\n const text = textParts.join('\\n');\n\n const esc = (s: string) => s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');\n const htmlParts = [\n `<b>${esc(method)}</b> <code>${esc(route)}</code>${client ? ` - <code>${esc(client)}</code>` : ''}`,\n esc(statusLine),\n ];\n if (activity) htmlParts.push(esc(activity));\n if (features) htmlParts.push(esc(features));\n if (gqlDoc) htmlParts.push('<b>GraphQL document</b>', `<pre><code>${esc(gqlDoc)}</code></pre>`);\n if (argsJson) htmlParts.push(`<b>${argsLabel}</b>`, `<pre><code>${esc(argsJson)}</code></pre>`);\n htmlParts.push(`<b>${esc(bodyLabel)}</b>`, `<pre><code>${esc(bodyContent)}</code></pre>`);\n const html = htmlParts.join('<br>');\n\n this.writeToClipboard({ html, text }, this.copiedReport);\n }\n\n // --- Insomnia export ---\n\n /** Copies one query as an Insomnia collection, for `Import > From Clipboard`. */\n public copyInsomniaRequest(entry: QueryDevtoolsEntry, query: AnyQuery) {\n const requests = [this.exportedRequest(entry, query)];\n const json = JSON.stringify(\n buildInsomniaExport({\n name: `${entry.meta.clientName ?? 'query'} · ${this.queryRoute(entry, query) || 'request'}`,\n requests,\n tokenRefreshes: this.insomniaTokenRefreshes(requests),\n now: Date.now(),\n }),\n null,\n 2,\n );\n\n this.writeToClipboard({ text: json }, this.copiedInsomnia);\n }\n\n /**\n * Copies one query as a `curl` command - what goes into a terminal, a ticket or a chat message, where\n * an Insomnia collection is too heavy to be read at all.\n */\n public copyCurlRequest(entry: QueryDevtoolsEntry, query: AnyQuery) {\n this.writeToClipboard({ text: buildCurlCommand(this.exportedRequest(entry, query)) }, this.copiedCurl);\n }\n\n /** Copies the GraphQL document as displayed — dedented, so it pastes straight into a playground. */\n public copyGqlDocument(doc: string) {\n this.writeToClipboard({ text: this.gqlDocument(doc) }, this.copiedGql);\n }\n\n /**\n * The endpoint of a query as one string: the absolute URL its last request used, or - for a query\n * that has not run - the rendered route on screen.\n */\n public copyableRoute(entry: QueryDevtoolsEntry, query: AnyQuery) {\n return this.requestUrl(query) ?? this.queryRoute(entry, query);\n }\n\n /** Names which of the two strings {@link copyableRoute} is offering, so the button says what it copies. */\n public copyableRouteTitle(entry: QueryDevtoolsEntry, query: AnyQuery) {\n const route = this.copyableRoute(entry, query);\n const kind = this.requestUrl(query) ? 'the absolute URL of the last request' : 'the rendered route';\n\n return `Copy ${kind}: ${route}`;\n }\n\n /** Copies {@link copyableRoute} - the endpoint on its own, where the exports are a whole document. */\n public copyRoute(entry: QueryDevtoolsEntry, query: AnyQuery) {\n this.writeToClipboard({ text: this.copyableRoute(entry, query) }, this.copiedRoute);\n }\n\n /**\n * Downloads the given queries (already scoped/filtered by the caller) as one Insomnia collection,\n * filed into a folder per query client.\n */\n public downloadInsomniaCollection(\n items: { entry: QueryDevtoolsEntry; query: AnyQuery }[],\n clientLabel: string | null,\n ) {\n if (!items.length) return;\n\n const requests = items.map(({ entry, query }) => this.exportedRequest(entry, query));\n const json = JSON.stringify(\n buildInsomniaExport({\n name: `${clientLabel ?? 'ethlete'} queries`,\n requests,\n tokenRefreshes: this.insomniaTokenRefreshes(requests),\n now: Date.now(),\n }),\n null,\n 2,\n );\n\n this.downloadFile(`insomnia-${clientLabel ?? 'ethlete'}-queries.json`, json);\n }\n\n // --- Session export ---\n\n /**\n * Downloads the whole panel as one JSON file: every registered entry with what it ran and what it\n * holds, the event log, the cache totals and anything armed in the Faults tab. Unlike **Copy report**\n * this is not scoped to one query - it is the attachment for a bug report about a screen.\n *\n * Deliberately unfiltered: a report is read by someone who was not there, and a dump that silently\n * left out the client you were not looking at is worse than no dump.\n */\n protected downloadSession() {\n const now = Date.now();\n const json = JSON.stringify(\n buildQueryDevtoolsSessionExport({\n now,\n location: this.document.location?.href ?? '',\n about: queryDevtoolsAbout(),\n clients: this.sessionClients(),\n entries: this.sessionEntries(),\n events: this.sessionEvents(),\n faults: this.sessionFaults(),\n mocks: this.sessionMocks(),\n }),\n null,\n 2,\n );\n\n this.downloadFile(`query-devtools-session-${now}.json`, json);\n }\n\n // --- JIT editing ---\n\n public openResponseEditor(query: AnyQuery) {\n const draft = JSON.stringify(query.response() ?? null, null, 2);\n\n this.editorSeed = draft;\n this.responseDraft.set(draft);\n this.editError.set(null);\n this.editorMode.set('response');\n }\n\n public openArgsEditor({ entry, query }: QueryDevtoolsSelection) {\n const args = this.queryArgs(query) ?? emptyArgsSeed(entry);\n const draft = JSON.stringify(editableArgs(args), null, 2);\n\n this.editedArgsSource = args;\n this.editorSeed = draft;\n this.argsDraft.set(draft);\n this.editError.set(null);\n this.editorMode.set('args');\n }\n\n public applyResponse(query: AnyQuery) {\n let response: unknown;\n\n try {\n response = JSON.parse(this.responseDraft());\n } catch {\n this.editError.set('Invalid JSON');\n\n return;\n }\n\n try {\n query.subtle.setResponse(response);\n this.editorMode.set('none');\n this.editError.set(null);\n } catch (error) {\n this.editError.set(actionErrorMessage(error));\n }\n }\n\n public applyArgs(query: AnyQuery) {\n let args: ReturnType<typeof this.queryArgs>;\n\n try {\n args = JSON.parse(this.argsDraft());\n } catch {\n this.editError.set('Invalid JSON');\n\n return;\n }\n\n try {\n query.execute({ args: executableArgs(args, this.editedArgsSource) });\n this.editorMode.set('none');\n this.editError.set(null);\n } catch (error) {\n this.editError.set(actionErrorMessage(error));\n }\n }\n\n public cancelEditor() {\n this.editorMode.set('none');\n this.editError.set(null);\n }\n\n // --- Force states ---\n\n public forceLoading(query: AnyQuery) {\n // `executionState` prioritises loading > error > response, so clear the others to switch cleanly.\n query.subtle.setError(null);\n query.subtle.setLoading({ executeTime: Date.now(), progress: null });\n }\n\n public forceError(query: AnyQuery) {\n query.subtle.setLoading(null);\n // A real failed execution also drops the response, so mirror that for consumers bound to it.\n query.subtle.setResponse(null);\n query.subtle.setError(\n createQueryErrorResponse(\n new HttpErrorResponse({\n status: 500,\n statusText: 'Forced',\n error: { message: 'Forced error (devtools)' },\n }),\n ),\n );\n }\n\n public forceEmpty(query: AnyQuery) {\n query.subtle.setLoading(null);\n query.subtle.setError(null);\n query.subtle.setResponse(null);\n }\n\n public clearForced(query: AnyQuery) {\n query.subtle.setLoading(null);\n query.subtle.setError(null);\n }\n\n // --- Cache actions ---\n\n public refetchCacheEntry(entry: QueryRepositoryCacheEntry) {\n entry.request.execute();\n }\n\n public evictCacheEntry(repository: QueryRepository, key: string) {\n repository.subtle.evict(key);\n }\n\n /**\n * Drops every entry of one client, consumers included - the cold-start check that does not need a\n * reload. A query still bound to an evicted entry requests again on its next execution.\n */\n public evictAllCacheEntries(repository: QueryRepository) {\n for (const entry of repository.subtle.cacheEntries()) repository.subtle.evict(entry.key);\n }\n\n /**\n * Expands the response held under a cache key, which is the only way to read an entry no live query is\n * bound to any more - the Queries tab has nothing to select for it.\n */\n public toggleCacheValue(clientName: string, key: string) {\n const id = `${clientName}|${key}`;\n\n this.expandedCacheKey.update((current) => (current === id ? null : id));\n }\n\n public isCacheValueExpanded(clientName: string, key: string) {\n return this.expandedCacheKey() === `${clientName}|${key}`;\n }\n\n public cacheFreshness(entry: QueryRepositoryCacheEntry) {\n this.clock();\n if (entry.request.loading()) return 'refreshing…';\n const expiresAt = entry.request.expiresAt();\n if (expiresAt === null) return 'uncacheable';\n const ms = expiresAt - Date.now();\n return ms <= 0 ? 'stale' : `${Math.ceil(ms / 1000)}s`;\n }\n\n /**\n * What multi-tab sync is doing for a cache entry: whether this tab is the one polling the key, and\n * how long ago it last took a response from another tab. Empty when the client has no sync.\n */\n public cacheSync(entry: QueryRepositoryCacheEntry, pollStates: Record<string, QueryKeyLockState>) {\n this.clock();\n\n const parts: string[] = [];\n const pollState = pollStates[entry.key];\n\n if (pollState) parts.push(pollState === 'holder' ? 'polling' : 'standby');\n\n const lastSyncedAt = entry.request.subtle.lastExternalResponseAt();\n\n if (lastSyncedAt !== null) parts.push(`synced ${Math.max(0, Math.round((Date.now() - lastSyncedAt) / 1000))}s ago`);\n\n return parts.join(' · ') || '-';\n }\n\n /**\n * Whether a cache entry is showing data that came off the disk rather than the network - the answer\n * to \"why is this here already?\" on a cold start. Empty when the client does not persist responses.\n */\n public cachePersistence(entry: QueryRepositoryCacheEntry) {\n this.clock();\n\n const hydratedAt = entry.request.subtle.lastPersistedResponseAt();\n\n if (hydratedAt === null) return '-';\n\n return `from disk ${Math.max(0, Math.round((Date.now() - hydratedAt) / 1000))}s ago`;\n }\n\n /** How many responses this client has on disk, which is usually more than it has in memory. */\n public persistedCount(client: QueryClient) {\n this.clock();\n\n return client.subtle.persistence?.indexEntries().length ?? 0;\n }\n\n public clearPersistedQueries(client: QueryClient) {\n void client.clearPersistedQueries();\n }\n\n /** The path + query of a request URL (origin stripped), for readable cache/event identifiers. */\n public requestPath(url: string) {\n try {\n const parsed = new URL(url);\n return parsed.pathname + parsed.search;\n } catch {\n return url;\n }\n }\n\n // --- Typed template accessors (entry.handle is `unknown`) ---\n\n public asStack(entry: QueryDevtoolsEntry): AnyQueryStack {\n return entry.handle as AnyQueryStack;\n }\n\n public asPagedStack(entry: QueryDevtoolsEntry): AnyPagedQueryStack {\n return entry.handle as AnyPagedQueryStack;\n }\n\n public asSequence(entry: QueryDevtoolsEntry): QuerySequence<unknown[]> {\n return (entry.handle as { current: QuerySequence<unknown[]> }).current;\n }\n\n public asBatch(entry: QueryDevtoolsEntry): AnyQueryBatch {\n return (entry.handle as { current: AnyQueryBatch }).current;\n }\n\n public asAuth(entry: QueryDevtoolsEntry): AnyBearerAuthProvider {\n return entry.handle as AnyBearerAuthProvider;\n }\n\n public asWs(entry: QueryDevtoolsEntry): WebSocketDevtoolsHandle {\n return entry.handle as WebSocketDevtoolsHandle;\n }\n\n /**\n * A socket's messages, narrowed by the filter box. Every whitespace-separated term has to match the\n * event, the room or the direction, so `out join` finds the room joins the client sent.\n */\n public socketMessages(ws: WebSocketDevtoolsHandle) {\n const messages = ws.messages();\n const terms = this.socketFilter().trim().toLowerCase().split(/\\s+/).filter(Boolean);\n\n if (!terms.length) return messages;\n\n return messages.filter((message) => {\n const haystack = `${message.direction} ${message.event} ${message.room}`.toLowerCase();\n\n return terms.every((term) => haystack.includes(term));\n });\n }\n\n /** How the message log labels a direction: what the client sent, versus what the server pushed. */\n public socketDirectionLabel(message: WebSocketDevtoolsMessage) {\n return message.direction === 'out' ? '↑ sent' : '↓ received';\n }\n\n /**\n * Sends a message as the app would, so a server that only answers a client that asked can be provoked\n * from the panel. An empty payload sends nothing rather than `\"\"` - a plain event is a valid message.\n */\n public emitSocketMessage(options: { entry: QueryDevtoolsEntry; event: string; data: string }) {\n const { entry, event, data } = options;\n const name = event.trim();\n\n if (!name) {\n this.socketEmitError.set({ entryId: entry.id, message: 'An event name is required.' });\n\n return;\n }\n\n const payload = data.trim();\n\n try {\n this.asWs(entry).emit({ event: name, data: payload ? JSON.parse(payload) : undefined });\n this.socketEmitError.set(null);\n } catch {\n this.socketEmitError.set({ entryId: entry.id, message: 'Invalid JSON' });\n }\n }\n\n public socketEmitErrorFor(entryId: string) {\n const error = this.socketEmitError();\n\n return error?.entryId === entryId ? error.message : null;\n }\n\n public asForm(entry: QueryDevtoolsEntry): QueryDevtoolsFormHandle {\n return entry.handle as QueryDevtoolsFormHandle;\n }\n\n /**\n * The queries a form feeds, discovered from the reads its `value()` recorded while their args were\n * built - so a form that nothing consumes yet reads as exactly that.\n */\n public queriesDrivenByForm(entry: QueryDevtoolsEntry): QueryLink[] {\n return this.queryEntries()\n .filter((candidate) => candidate.formLinks?.ids().includes(entry.id))\n .map((candidate) => this.queryLinkFor(candidate));\n }\n\n /** The reverse: the forms whose value a query's args read. */\n public formsDrivingQuery(entry: QueryDevtoolsEntry): QueryDevtoolsEntry[] {\n const ids = entry.formLinks?.ids() ?? [];\n\n return this.formEntries().filter((form) => ids.includes(form.id));\n }\n\n public selectForm(id: string) {\n this.activeTab.set('forms');\n this.selectedFormId.set(id);\n }\n\n /**\n * The refreshes that re-executed a query, newest first - the answer to \"why did this refetch?\". Read\n * off the event log, so it goes back exactly as far as the log does.\n */\n public refreshesFor(entryId: string) {\n return this.eventLog()\n .filter((item) => item.cause && item.refreshed?.some((refreshed) => refreshed.queryIds.includes(entryId)))\n .map((item) => ({\n id: item.id,\n timestamp: item.timestamp,\n label: this.causeLabel(item.cause as QueryRefreshCause),\n }));\n }\n\n /** What asked for a refresh, on one line. */\n public causeLabel(cause: QueryRefreshCause) {\n const scope = cause.url ? this.requestPath(cause.url) : 'everything in use';\n const what =\n cause.type === 'invalidation'\n ? `invalidated ${scope}`\n : cause.type === 'mutation'\n ? `mutation on ${scope}`\n : `refreshed ${scope}`;\n\n return cause.otherTab ? `${what} · another tab` : what;\n }\n\n /** Derives the per-step status of a sequence step from its live progress signals. */\n public sequenceStepStatus(sequence: QuerySequence<unknown[]>, index: number): QuerySequenceStatus {\n const failedAt = sequence.failedAt();\n if (failedAt !== null && index === failedAt) return 'error';\n\n const current = sequence.currentStep();\n const running = sequence.running();\n\n if (index < current - 1) return 'success';\n if (index === current - 1 && running) return 'running';\n if (sequence.status() === 'success') return 'success';\n\n return 'idle';\n }\n\n public authTokenPayload(auth: AnyBearerAuthProvider): Record<string, unknown> | null {\n return decodeJwtPayload(auth.accessToken());\n }\n\n public queriesForStack(stack: AnyQueryStack | AnyPagedQueryStack): QueryLink[] {\n const inner = stack.queries();\n const queryEntries = this.queryEntries();\n\n return inner.map((query) =>\n this.queryLinkFor(\n queryEntries.find((e) => e.handle === query),\n query as AnyQuery,\n ),\n );\n }\n\n public authQueryKeys(auth: AnyBearerAuthProvider): string[] {\n return Object.keys(auth.queries ?? {});\n }\n\n /** Where this tab stands on one lock, as a chip. @see lockRows */\n public lockStanding(row: DevtoolsLockRow): QueryDevtoolsChip {\n switch (row.standing) {\n case 'holder':\n return { label: 'holds it', tone: 'success', title: 'This tab is the one doing the work this lock guards.' };\n case 'queued':\n return {\n label: `waiting · #${row.queuePlace}`,\n tone: 'muted',\n title: `Another tab holds this lock. This one is number ${row.queuePlace} in line and takes over as soon as the tabs ahead of it release it - by closing, crashing or navigating away.`,\n };\n case 'absent':\n return {\n label: 'not taking part',\n tone: 'muted',\n title: 'Another tab holds this lock and this one never asked for it.',\n };\n case 'unknown':\n return {\n label: 'unknown',\n tone: 'muted',\n title:\n 'The probe lock this tab identifies itself with has not been granted yet - the next poll should resolve it.',\n };\n }\n }\n\n /**\n * Which tab refreshes this provider's tokens, as a chip: whether it is this one, how many tabs are\n * in the election, and - when there is no election - why every tab reads as the leader.\n */\n public authLeadership(auth: AnyBearerAuthProvider): QueryDevtoolsChip | null {\n const sync = (auth.features as { multiTabSync?: BearerAuthMultiTabSyncFeature } | undefined)?.multiTabSync;\n if (!sync) return null;\n\n if (sync.leadership !== 'election') {\n const reason =\n sync.leadership === 'off'\n ? 'Leader election is off, so every tab refreshes its own tokens - this one included.'\n : 'This browser has no Web Locks API, so the election cannot run and every tab refreshes its own tokens.';\n\n return { label: 'every tab refreshes', tone: 'muted', title: reason };\n }\n\n const tabs = sync.instanceCount();\n const isLeader = sync.isLeader();\n // The count is recounted on announce, goodbye and takeover rather than on a timer, so a tab that\n // crashed as a follower is still in it. Presenting it as exact would turn that into a bug report.\n const title = `${isLeader ? 'This tab performs the automatic token refresh.' : 'Another tab performs the automatic token refresh.'} ${tabs} tab${tabs === 1 ? '' : 's'} in the election, counted on the last announce - a tab that crashed as a follower is still counted.`;\n\n return {\n label: `${isLeader ? 'leader' : 'follower'} · ~${tabs} tab${tabs === 1 ? '' : 's'}`,\n tone: isLeader ? 'success' : 'muted',\n title,\n };\n }\n\n /**\n * The access token's expiry as the app sees it, plus whatever the panel is doing to it: an armed\n * lifetime replaces the countdown, and the token's own is reported next to it so the card never claims\n * a refresh is due at a time the API would disagree with.\n */\n public authTokenLifetime(entry: QueryDevtoolsEntry): QueryDevtoolsTokenLifetime {\n this.clock();\n\n const providerName = entry.meta.name ?? '';\n const payload = decodeJwtPayload(this.asAuth(entry).accessToken());\n const ttlSeconds = queryDevtoolsTokenTtls()[providerName] ?? null;\n const realExp = typeof payload?.['exp'] === 'number' ? payload['exp'] : null;\n const overridden = applyQueryDevtoolsTokenTtl({ payload, providerName });\n const exp = typeof overridden?.['exp'] === 'number' ? overridden['exp'] : null;\n\n return {\n expiresIn: expiryCountdown(exp),\n realExpiresIn: exp === realExp ? null : expiryCountdown(realExp),\n ttlSeconds,\n overridable: canOverrideQueryDevtoolsTokenTtl({ payload }),\n };\n }\n\n public queriesForSequence(sequence: QuerySequence<unknown[]>): QueryLink[] {\n const queryEntries = this.queryEntries();\n\n return sequence.queries.map((query) =>\n this.queryLinkFor(\n queryEntries.find((e) => e.handle === query),\n query as AnyQuery,\n ),\n );\n }\n\n /** The snapshot of a sequence step, once it has run (holds the args in and the response/error out). */\n public stepSnapshot(sequence: QuerySequence<unknown[]>, index: number): AnyQuerySnapshot | null {\n return sequence.snapshots()[index] ?? null;\n }\n\n public toggleQueryGroup(key: string) {\n const next = new Set(this.expandedQueryGroups());\n if (next.has(key)) {\n next.delete(key);\n } else {\n next.add(key);\n }\n this.expandedQueryGroups.set(next);\n }\n\n public expandQueryGroup(key: string) {\n if (this.expandedQueryGroups().has(key)) return;\n\n this.expandedQueryGroups.set(new Set(this.expandedQueryGroups()).add(key));\n }\n\n public isStepExpanded(entryId: string, index: number) {\n return this.expandedSteps().has(this.stepKey(entryId, index));\n }\n\n public toggleStep(entryId: string, index: number) {\n const key = this.stepKey(entryId, index);\n const next = new Set(this.expandedSteps());\n if (next.has(key)) {\n next.delete(key);\n } else {\n next.add(key);\n }\n this.expandedSteps.set(next);\n }\n\n /** A batch's route with its path params left as `:name` - a batch fills them in per item, not once. */\n public batchRouteSegments(entry: QueryDevtoolsEntry): RouteSegment[] {\n return this.renderRoute(entry, null);\n }\n\n public batchOf(entry: QueryDevtoolsEntry): QueryDevtoolsEntry | null {\n const handle = entry.meta.batch;\n\n return handle ? (this.batchEntries().find((e) => e.handle === handle) ?? null) : null;\n }\n\n public queriesForBatch(entry: QueryDevtoolsEntry): QueryLink[] {\n return this.queryEntries()\n .filter((e) => e.meta.batch === entry.handle && !e.destroyedAt)\n .map((e) => this.queryLinkFor(e, e.handle as AnyQuery));\n }\n\n /**\n * The registry entry of one of a batch's items, or `null` once it has fallen out of the batch's capped\n * tombstone tail - which is what makes an item row openable only while its query is still kept.\n */\n public batchItemQueryId(entry: QueryDevtoolsEntry, index: number): string | null {\n const item = this.queryEntries().find((e) => e.meta.batch === entry.handle && e.meta.batchItemIndex === index);\n\n return item?.id ?? null;\n }\n\n public batchItems(entry: QueryDevtoolsEntry): BatchItemView {\n const results = this.asBatch(entry).results();\n\n // Failures first: a bulk edit is read for the items it could not apply, and those are the ones a\n // cap must never be what drops. Everything else keeps input order.\n const ordered = [\n ...results.filter((result) => result.status === 'error'),\n ...results.filter((result) => result.status !== 'error'),\n ];\n\n return {\n rows: ordered.slice(0, MAX_BATCH_ITEM_ROWS).map((result) => ({\n result,\n segments: this.argsRouteSegments(entry, 'args' in result ? result.args : null),\n })),\n total: results.length,\n hidden: Math.max(0, results.length - MAX_BATCH_ITEM_ROWS),\n };\n }\n\n public batchThroughput(batch: AnyQueryBatch): string | null {\n const rate = batch.itemsPerSecond();\n\n if (rate === null) return null;\n\n const remaining = batch.remainingTime();\n const perSecond = `${rate.toFixed(rate < 10 ? 1 : 0)} items/s`;\n\n return remaining === null ? perSecond : `${perSecond} · ~${this.formatDuration(remaining)} left`;\n }\n\n public isBatchItemExpanded(entryId: string, index: number) {\n return this.expandedBatchItems().has(this.stepKey(entryId, index));\n }\n\n public toggleBatchItem(entryId: string, index: number) {\n const key = this.stepKey(entryId, index);\n const next = new Set(this.expandedBatchItems());\n if (next.has(key)) {\n next.delete(key);\n } else {\n next.add(key);\n }\n this.expandedBatchItems.set(next);\n }\n\n /** Dedents a GraphQL document (template-literal indentation) for readable display. */\n public gqlDocument(doc: string) {\n const lines = doc.replace(/\\t/g, ' ').split('\\n');\n while (lines.length && !lines[0]?.trim()) lines.shift();\n while (lines.length && !lines[lines.length - 1]?.trim()) lines.pop();\n const indents = lines.filter((l) => l.trim()).map((l) => l.match(/^ */)?.[0].length ?? 0);\n const min = indents.length ? Math.min(...indents) : 0;\n return lines.map((l) => l.slice(min)).join('\\n');\n }\n\n public featureLabel(type: string) {\n return type\n .replace(/^WITH_/, '')\n .replace(/_/g, ' ')\n .toLowerCase();\n }\n\n /** A feature and its options on one line, for a report or a chip's tooltip. */\n public featureSummary(feature: QueryDevtoolsFeature) {\n const details = feature.details.map((detail) => `${detail.label} ${detail.value}`);\n\n return [this.featureLabel(feature.type), ...details].join(' · ');\n }\n\n /** The features of the client behind a cache tab card, or `null` for a client without any. */\n public clientFeatures(client: QueryClient | null | undefined) {\n const features = client?.subtle.devtoolsFeatures ?? [];\n\n return features.length ? features : null;\n }\n\n public formatTime(timestamp: number | null) {\n if (!timestamp) return '-';\n return new Date(timestamp).toLocaleTimeString(undefined, { hour12: false });\n }\n\n /**\n * The element a query was created in, which is what {@link locateQuery} can point at. `null` for a\n * query created outside a component or directive injector - a root service, a resolver, a guard.\n */\n public locatableElement(entry: QueryDevtoolsEntry) {\n return entry.meta.element ?? null;\n }\n\n /**\n * Scrolls the element the selected query was created in into view and draws the inspect box over it -\n * inspect run backwards. Where a query was *created* is not necessarily where its data is rendered,\n * which is what the button's \"created here\" wording is for.\n */\n public locateQuery(entry: QueryDevtoolsEntry) {\n const element = this.locatableElement(entry);\n if (!element) return;\n\n const target = element.isConnected ? renderedTarget(element) : null;\n\n // Detached, `display: none`, or inside a collapsed panel: scrolling to it lands nowhere and the box\n // would be drawn over an unrelated strip of the page.\n if (!target) {\n this.locatedRect.set(null);\n this.locateState.set('offscreen');\n this.locate$.next(null);\n\n return;\n }\n\n target.scrollIntoView({ block: 'center', inline: 'nearest', behavior: 'smooth' });\n this.locateState.set('located');\n this.locate$.next(target);\n }\n\n /** Downloads a file a tab generated. @see QueryDevtoolsHost.downloadTextFile */\n public downloadTextFile(file: { name: string; content: string; type: string }) {\n this.download({ content: file.content, filename: file.name, type: file.type });\n }\n\n /**\n * The same route rendered from a set of args rather than from a query, which is what a batch item leaves\n * behind: the batch destroys its query the moment the item settles.\n */\n private argsRouteSegments(entry: QueryDevtoolsEntry, args: unknown): RouteSegment[] {\n return this.renderRoute(entry, args as Record<string, unknown> | null);\n }\n\n private renderRoute(\n entry: QueryDevtoolsEntry | undefined,\n args: Record<string, unknown> | null | undefined,\n ): RouteSegment[] {\n const parts = entry?.meta.routeParts;\n\n if (!parts?.length) {\n return entry?.meta.route ? [{ text: entry.meta.route, kind: 'static' }] : [];\n }\n\n const pathParams = args?.['pathParams'] as Record<string, unknown> | undefined;\n\n return parts.map(({ text, param }): RouteSegment => {\n if (!param) return { text, kind: 'static' };\n\n const value = pathParams?.[param];\n\n return { text: value === undefined || value === null ? `:${param}` : String(value), kind: 'param', name: param };\n });\n }\n\n /**\n * Takes - or gives back - the lock whose name only this tab can have produced. Its `clientId` in the\n * snapshot is what tells this tab's rows from another tab's: `LockInfo` carries no tab identity, and\n * the platform offers no way to ask for one's own client id.\n */\n private holdProbeLock(inspecting: boolean) {\n if (inspecting) {\n this.probeHold ??= this.probeLocks.hold(devtoolsProbeLockKey(this.probeId));\n\n return;\n }\n\n this.probeHold?.release();\n this.probeHold = null;\n // A snapshot outlives the probe that made it readable, so keeping it would have every row claim it\n // belongs to some other tab the next time the tab is opened.\n this.lockSnapshot.set(null);\n }\n\n /**\n * The two runs the diff compares, oldest first - normalised by run index, so picking a pair in either\n * order reads the same way round as the `#before → #after` header prints it.\n *\n * `null` unless a run is picked, so a closed diff costs nothing to walk.\n */\n /**\n * The two runs the comparison spans, oldest first - normalised by run index, so picking a pair in\n * either order reads the same way round as the `#before → #after` header prints it. With only one end\n * armed, `after` is absent unless an older body-holding run can stand in for the base.\n *\n * `null` unless a run is armed, so a closed diff costs nothing to walk.\n */\n /**\n * The pair one step older or newer than the current comparison, keeping whatever gap it has, or `null`\n * at either end of the retained bodies.\n */\n private steppedDiffPair(entry: QueryDevtoolsEntry, older: boolean) {\n const comparison = this.responseDiff(entry);\n\n if (!comparison) return null;\n\n // `stats.runs()` is oldest-first, so one step older is one index down.\n const held = (entry.stats?.runs() ?? []).filter((run) => run.hasResponse);\n const shift = older ? -1 : 1;\n const before = held[held.findIndex((run) => run.index === comparison.before.index) + shift];\n const after = held[held.findIndex((run) => run.index === comparison.after.index) + shift];\n\n return before && after ? { before, after } : null;\n }\n\n private diffEnds(entry: QueryDevtoolsEntry) {\n const runs = entry.stats?.runs() ?? [];\n const held = (index: number | null) =>\n index === null ? undefined : runs.find((run) => run.index === index && run.hasResponse);\n\n // An armed run whose body has since been trimmed counts as unarmed. Quietly re-deriving the other end\n // instead would show a different comparison under a header still naming the one that was picked.\n const picked = held(this.diffRunIndex());\n\n if (!picked) return null;\n\n const other = held(this.diffBaseRunIndex());\n\n if (other && other.index !== picked.index) {\n const [before, after] = other.index < picked.index ? [other, picked] : [picked, other];\n\n return { before, after };\n }\n\n for (let index = runs.indexOf(picked) - 1; index >= 0; index--) {\n const before = runs[index];\n\n if (before?.hasResponse) return { before, after: picked };\n }\n\n // Armed with nothing older holding a body, so this is one end of a pair still to be completed rather\n // than a comparison. Reporting it as an end anyway is what keeps the pick from being thrown away.\n return { before: picked, after: undefined };\n }\n\n private isTabPrimary(tab: DevtoolsTab) {\n const badge = this.tabBadges()[tab];\n\n return this.PINNED_TABS.includes(tab) || this.activeTab() === tab || !!badge.count || !!badge.errors;\n }\n\n /** Moves the panel into a pop-up whose document has finished loading. @see popOut */\n private mountPopOut(popup: Window, panel: HTMLElement) {\n const doc = popup.document;\n const renderer = this.renderer;\n\n renderer.setAttribute(doc.documentElement, 'class', this.document.documentElement.className);\n renderer.setAttribute(doc.documentElement, 'style', this.document.documentElement.getAttribute('style') ?? '');\n renderer.setAttribute(doc.body, 'class', this.document.body.className);\n\n // Inserted before the stylesheets it applies to: a blob document's own base URL is the blob, so a\n // copied `<link href=\"styles.css\">` - and every relative `url()` inside a copied `<style>` - would\n // resolve against nothing and silently fail to load.\n const base = renderer.createElement('base');\n\n renderer.setAttribute(base, 'href', this.document.baseURI);\n renderer.appendChild(doc.head, base);\n\n for (const styles of DEFERRED_STYLES) this.styleManager.mount(styles);\n\n this.popOutStyleSync = this.syncStylesInto(doc);\n\n // The panel's chrome tokens (`--_et-qdt-*`) are declared on the host element and inherited from it,\n // so a panel appended straight to the pop-up's body would lose every background, border and chip\n // fill that resolves one. It gets a host of its own instead.\n const shell = renderer.createElement('div');\n\n renderer.setAttribute(shell, 'class', 'et-query-devtools-host');\n renderer.setAttribute(shell, 'data-dock', 'popout');\n\n renderer.setCssProperties(shell, this.chromeTokens());\n renderer.appendChild(doc.body, shell);\n renderer.appendChild(shell, panel);\n\n // The pop-up is a realm of its own, so zone.js never patched its listeners - without the explicit\n // `run` the dock-back would write its signals outside Angular and nothing would re-render.\n fromEvent(popup, 'pagehide')\n .pipe(\n tap(() => this.zone.run(() => this.dockBack())),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe();\n\n this.popup = popup;\n this.poppedOut.set(true);\n }\n\n /**\n * The panel's chrome tokens as the app currently resolves them, so a pop-out keeps the surface it was\n * docked in. Its own CSS resolves them from the host app's theme, and that theme is set on an ancestor\n * the pop-out does not have - inherited afresh over there, the panel would take the document's theme\n * (usually the light one) rather than the one it was just being read against.\n *\n * Empty on a browser that does not enumerate custom properties, which leaves the tokens to be\n * inherited as before.\n */\n private chromeTokens() {\n const styles = this.document.defaultView?.getComputedStyle(this.hostEl.nativeElement);\n const tokens: Record<string, string> = {};\n\n for (const property of Array.from(styles ?? [])) {\n if (property.startsWith('--_et-qdt-')) tokens[property] = styles?.getPropertyValue(property) ?? '';\n }\n\n return tokens;\n }\n\n /** Whether a `<head>` child carries CSS the pop-out needs a copy of. */\n private isStyleNode(node: Element) {\n if (node.tagName === 'STYLE') return true;\n\n return node.tagName === 'LINK' && (node.getAttribute('rel') ?? '').includes('stylesheet');\n }\n\n /**\n * Copies the host document's stylesheets into the pop-up and keeps mirroring them while it is\n * open. Styles keep arriving after the move: Angular inserts a component's CSS and the style\n * manager mounts overlay strategy CSS the first time each is used - e.g. the first menu opened\n * over there - so a one-time copy would leave everything first used after the pop-out unstyled.\n */\n private syncStylesInto(doc: Document) {\n const copies = new Map<Element, Element>();\n\n const copy = (node: Node) => {\n if (!(node instanceof Element) || !this.isStyleNode(node) || copies.has(node)) return;\n\n const clone = doc.importNode(node, true);\n\n copies.set(node, clone);\n this.renderer.appendChild(doc.head, clone);\n };\n\n const drop = (node: Node) => {\n if (!(node instanceof Element)) return;\n\n copies.get(node)?.remove();\n copies.delete(node);\n };\n\n for (const node of Array.from(this.document.head.children)) copy(node);\n\n // eslint-disable-next-line ethlete/no-native-observers -- signalElementMutations reports only the first record of a batch (styles often arrive several per task), and this observer lives with the pop-out, not the component\n const observer = new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n mutation.removedNodes.forEach(drop);\n mutation.addedNodes.forEach(copy);\n }\n });\n\n observer.observe(this.document.head, { childList: true });\n\n return () => observer.disconnect();\n }\n\n /** Brings the panel back into the host element and closes the window it was living in. */\n private dockBack() {\n const panel = this.panelEl()?.nativeElement;\n\n if (panel) this.renderer.appendChild(this.hostEl.nativeElement, panel);\n\n this.poppedOut.set(false);\n this.closePopup();\n }\n\n /** A registered query as a row that opens the detail drawer. */\n private queryLinkFor(entry: QueryDevtoolsEntry | undefined, query = entry?.handle as AnyQuery): QueryLink {\n return {\n id: entry?.id ?? '',\n query,\n method: entry?.meta.method ?? '',\n segments: this.routeSegments(entry, query),\n clientBaseUrl: entry?.meta.clientBaseUrl ?? '',\n stats: entry?.stats,\n };\n }\n\n /** The activity of one entry, or the total of a group of them (a stack's queries, a whole tab). */\n private activityOf(handles: readonly (QueryDevtoolsStatsHandle | undefined)[]): QueryActivity {\n const stats = sumQueryDevtoolsStats(handles);\n\n return {\n stats,\n cacheServed: Math.max(0, stats.executions - stats.requests),\n avgDurationMs: stats.responses ? Math.round(stats.totalDurationMs / stats.responses) : null,\n avgResponseBytes: stats.responses ? Math.round(stats.receivedBytes / stats.responses) : null,\n hasActivity: stats.executions > 0,\n };\n }\n\n /** An activity summary on one line, for a report. `null` for a query that has not run. */\n private activitySummary(activity: QueryActivity) {\n if (!activity.hasActivity) return null;\n\n const { stats } = activity;\n const parts = [\n `${stats.executions} execution${stats.executions === 1 ? '' : 's'}`,\n `${stats.requests} request${stats.requests === 1 ? '' : 's'}`,\n `↓ ${this.formatTransferred(stats.receivedBytes, stats.hasEstimatedBytes)}`,\n ];\n\n if (stats.sentBytes) parts.push(`↑ ${this.formatTransferred(stats.sentBytes, stats.hasEstimatedBytes)}`);\n if (stats.errors) parts.push(`${stats.errors} failed`);\n if (stats.retries) parts.push(`${stats.retries} retr${stats.retries === 1 ? 'y' : 'ies'}`);\n if (activity.avgDurationMs !== null) parts.push(`avg ${this.formatDuration(activity.avgDurationMs)}`);\n\n return `activity: ${parts.join(' · ')}`;\n }\n\n /** {@link routeSegments} as a plain string, for the places that cannot render markup. */\n private queryRoute(entry: QueryDevtoolsEntry | undefined, query: AnyQuery) {\n return this.routeSegments(entry, query)\n .map((segment) => segment.text)\n .join('');\n }\n\n /**\n * Describes a query the way a replay outside the app needs it: the URL, headers and body of the\n * request it last made, or - for a query that has not run - what its current args would send.\n */\n private exportedRequest(entry: QueryDevtoolsEntry, query: AnyQuery): InsomniaRequestInput {\n const request = query.subtle.request();\n const args = this.queryArgs(query) as { body?: unknown; headers?: unknown } | null;\n const route = this.queryRoute(entry, query);\n\n return {\n // A GraphQL query has no HTTP method of its own until it runs; its transport is POST unless the\n // creator says otherwise, which is only knowable from the request.\n method: request?.method ?? (entry.meta.gqlQuery ? 'POST' : (entry.meta.method ?? 'GET')),\n url: request?.url ?? `${entry.meta.clientBaseUrl ?? ''}${route}`,\n // Query params are part of the name so that several requests to the same endpoint (the pages of a\n // stack, a search) stay tellable apart in Insomnia's sidebar.\n name: `${entry.meta.method ?? ''} ${request ? this.requestPath(request.url) : route || query.id() || 'request'}`.trim(),\n headers: this.insomniaHeaders(request, args),\n body: args?.body ?? null,\n gqlQuery: entry.meta.gqlQuery ? this.gqlDocument(entry.meta.gqlQuery) : null,\n group: entry.meta.clientName ?? null,\n secureBy: entry.meta.isSecure ? (entry.meta.authProviderName ?? null) : null,\n };\n }\n\n /**\n * The token refreshes the given requests authenticate with - one per auth provider they name, and\n * only for a provider that is logged in, since a refresh request without a refresh token has\n * nothing to send.\n */\n private insomniaTokenRefreshes(requests: InsomniaRequestInput[]) {\n const names = new Set(\n requests.map((request) => request.secureBy).filter((name): name is string => typeof name === 'string'),\n );\n\n return Array.from(names)\n .map((name) => this.insomniaTokenRefresh(name))\n .filter((refresh): refresh is InsomniaTokenRefreshInput => refresh !== null);\n }\n\n private insomniaTokenRefresh(providerName: string): InsomniaTokenRefreshInput | null {\n const entry = this.authEntries().find((candidate) => candidate.meta.name === providerName);\n const refresh = entry?.meta.authQueries?.find((authQuery) => authQuery.kind === 'token-refresh');\n\n if (!entry || !refresh) return null;\n\n const provider = entry.handle as AnyBearerAuthProvider;\n const refreshToken = provider.refreshToken();\n\n if (!refreshToken) return null;\n\n return {\n id: providerName,\n name: `${refresh.method} ${refresh.route} (token refresh)`,\n method: refresh.method,\n url: `${entry.meta.clientBaseUrl ?? ''}${refresh.route}`,\n headers: [],\n body: refresh.buildArgs?.(refreshToken).body ?? null,\n group: entry.meta.clientName ?? null,\n accessTokenPath: this.accessTokenPath(provider),\n maxAgeSeconds: this.accessTokenMaxAge(provider),\n };\n }\n\n /**\n * Where the access token sits in the refresh response. A provider's `extractTokens` can pull it out\n * of any shape, so the path is recovered by finding the live token in the last auth response - with\n * the default extractor's `$.accessToken` as the fallback.\n */\n private accessTokenPath(provider: AnyBearerAuthProvider) {\n const token = provider.accessToken();\n const response = provider.latestExecutedQuery()?.snapshot.response();\n\n const path = token && response ? findValuePath(token, { value: response, path: '$', depth: 0 }) : null;\n\n return path ?? '$.accessToken';\n }\n\n /**\n * How long Insomnia may reuse a stored refresh response: the access token's own lifetime with a\n * margin, so the chain refreshes shortly before the token it hands out would expire. Capped at an\n * hour - a long-lived (or bogus) `exp` should still hand out a token minted this session.\n */\n private accessTokenMaxAge(provider: AnyBearerAuthProvider) {\n const payload = decodeJwtPayload(provider.accessToken());\n const exp = payload?.['exp'];\n const iat = payload?.['iat'];\n\n if (typeof exp !== 'number') return DEFAULT_TOKEN_MAX_AGE_S;\n\n const lifetime = exp - (typeof iat === 'number' ? iat : Math.floor(Date.now() / 1000));\n\n if (lifetime <= 0) return DEFAULT_TOKEN_MAX_AGE_S;\n\n return Math.min(MAX_TOKEN_MAX_AGE_S, Math.max(60, Math.round(lifetime * 0.9)));\n }\n\n /**\n * The headers a replay needs, including the ones the query client adds. Header providers can throw\n * (a secure query's needs an access token), in which case the request is exported without them.\n */\n private insomniaHeaders(\n request: { subtle: { resolveHeaders: () => HttpHeaders | undefined } } | null | undefined,\n args: { headers?: unknown } | null,\n ) {\n try {\n const headers = request\n ? request.subtle.resolveHeaders()\n : typeof args?.headers === 'function'\n ? (args.headers as () => HttpHeaders)()\n : (args?.headers as HttpHeaders | undefined);\n\n return (headers?.keys() ?? []).map((name) => ({ name, value: headers?.getAll(name)?.join(', ') ?? '' }));\n } catch {\n return [];\n }\n }\n\n private sessionClients(): SessionExportClient[] {\n return this.cacheView().map((client) => ({\n name: client.name,\n baseUrl: client.baseUrl,\n cacheEntries: client.rows.length,\n unusedCacheEntries: client.unused,\n cacheBytes: client.bytes,\n persistedEntries: client.client?.subtle.persistence ? this.persistedCount(client.client) : null,\n features: (client.client?.subtle.devtoolsFeatures ?? []).map((feature) => this.featureSummary(feature)),\n }));\n }\n\n /** Every registered entry, described by whatever its kind carries. */\n private sessionEntries(): SessionExportEntry[] {\n return queryDevtoolsEntries().map((entry) => {\n const base: SessionExportEntry = {\n id: entry.id,\n kind: entry.kind,\n name: entry.meta.name ?? null,\n client: entry.meta.clientBaseUrl ?? entry.meta.clientName ?? null,\n features: entry.meta.features?.map((feature) => this.featureSummary(feature)) ?? [],\n };\n\n if (entry.kind === 'query') return { ...base, ...this.sessionQuery(entry) };\n if (entry.kind === 'query-stack' || entry.kind === 'paged-query-stack') {\n const stack = entry.kind === 'paged-query-stack' ? this.asPagedStack(entry) : this.asStack(entry);\n\n return { ...base, activity: this.sessionActivity(this.stackActivity(stack)) };\n }\n if (entry.kind === 'query-sequence') return { ...base, detail: this.sessionSequence(entry) };\n if (entry.kind === 'query-batch')\n return { ...base, method: entry.meta.method ?? null, detail: this.sessionBatch(entry) };\n if (entry.kind === 'query-form') return { ...base, detail: this.sessionForm(entry) };\n if (entry.kind === 'auth-provider') return { ...base, detail: this.sessionAuth(entry) };\n if (entry.kind === 'ws-client') return { ...base, detail: this.sessionSocket(entry) };\n\n return base;\n });\n }\n\n private sessionQuery(entry: QueryDevtoolsEntry): Partial<SessionExportEntry> {\n const query = entry.handle as AnyQuery;\n const error = query.error();\n\n return {\n method: entry.meta.method ?? null,\n route: entry.meta.route ?? null,\n url: this.requestUrl(query),\n status: this.queryStatus(query),\n activity: this.sessionActivity(this.queryActivity(entry)),\n runs: (entry.stats?.runs() ?? []).map((run) => ({\n index: run.index,\n startedAt: new Date(run.startedAt).toISOString(),\n durationMs: run.endedAt === null ? null : run.endedAt - run.startedAt,\n status: run.status,\n attempts: run.attempts,\n didRequest: run.didRequest,\n receivedBytes: run.receivedBytes,\n url: run.url,\n })),\n args: this.queryArgs(query),\n response: query.response() ?? null,\n error: error ? { status: error.raw.status, body: error.isList ? error.errors : error.error } : null,\n overrides: (entry.overrides?.list() ?? []).map((override) => ({ id: override.id, op: override.op })),\n };\n }\n\n private sessionActivity(activity: QueryActivity): Record<string, unknown> {\n return { ...activity.stats, cacheServed: activity.cacheServed, avgDurationMs: activity.avgDurationMs };\n }\n\n private sessionSequence(entry: QueryDevtoolsEntry): Record<string, unknown> {\n const sequence = this.asSequence(entry);\n\n return {\n status: sequence.status(),\n currentStep: sequence.currentStep(),\n total: sequence.total,\n failedAt: sequence.failedAt(),\n steps: this.queriesForSequence(sequence).map((link, index) => ({\n method: link.method,\n route: link.segments.map((segment) => segment.text).join(''),\n status: this.sequenceStepStatus(sequence, index),\n args: sequence.stepArgs()[index] ?? null,\n response: this.stepSnapshot(sequence, index)?.response() ?? null,\n })),\n };\n }\n\n private sessionBatch(entry: QueryDevtoolsEntry): Record<string, unknown> {\n const batch = this.asBatch(entry);\n const items = this.batchItems(entry);\n\n return {\n route: entry.meta.route ?? null,\n status: batch.status(),\n concurrency: entry.meta.concurrency ?? null,\n stopOnError: entry.meta.stopOnError ?? null,\n total: batch.total(),\n completed: batch.completed(),\n inFlight: batch.inFlight(),\n succeeded: batch.succeeded(),\n failed: batch.failed(),\n skipped: batch.skipped(),\n itemsPerSecond: batch.itemsPerSecond(),\n remainingTimeMs: batch.remainingTime(),\n // Capped the way the card is, and reported the same way, so an export cannot read as the whole run.\n listedItems: items.rows.length,\n hiddenItems: items.hidden,\n items: items.rows.map((row) => {\n const error = row.result.status === 'error' ? row.result.error : null;\n\n return {\n index: row.result.index,\n status: row.result.status,\n route: row.segments.map((segment) => segment.text).join(''),\n error: error\n ? { status: error.raw.status, body: slimForReport(error.isList ? error.errors : error.error) }\n : null,\n };\n }),\n };\n }\n\n private sessionForm(entry: QueryDevtoolsEntry): Record<string, unknown> {\n const form = this.asForm(entry);\n\n return {\n activeFilterCount: form.activeFilterCount(),\n isAtDefaults: form.isAtDefaults(),\n isObserving: form.isObserving(),\n isCommitPending: form.isCommitPending(),\n value: form.value(),\n fields: form.fields().map((field) => ({\n key: field.key,\n value: field.value,\n defaultValue: field.defaultValue,\n paramKey: field.paramKey,\n queryParam: field.queryParam ?? null,\n isDefault: field.isDefault,\n })),\n drives: this.queriesDrivenByForm(entry).map((link) => link.id),\n };\n }\n\n /**\n * An auth provider without its tokens. A session report is a file that gets attached to a ticket, and\n * the access token is the one thing in the panel that must never travel with it - which is why only\n * its presence and its remaining lifetime are exported.\n */\n private sessionAuth(entry: QueryDevtoolsEntry): Record<string, unknown> {\n const auth = this.asAuth(entry);\n const lifetime = this.authTokenLifetime(entry);\n\n return {\n isAuthenticated: auth.isAuthenticated(),\n hasAccessToken: !!auth.accessToken(),\n hasRefreshToken: !!auth.refreshToken(),\n expiresIn: lifetime.expiresIn,\n overriddenTokenTtlSeconds: lifetime.ttlSeconds,\n queries: this.authQueryKeys(auth),\n };\n }\n\n private sessionSocket(entry: QueryDevtoolsEntry): Record<string, unknown> {\n const ws = this.asWs(entry);\n\n return {\n url: entry.meta.url ?? null,\n connected: ws.connected(),\n rooms: ws.rooms(),\n messages: ws.messages().map((message) => ({\n timestamp: new Date(message.timestamp).toISOString(),\n direction: message.direction,\n room: message.room,\n event: message.event,\n data: message.data,\n })),\n };\n }\n\n private sessionEvents(): SessionExportEvent[] {\n return this.eventLog().map((event) => ({\n timestamp: new Date(event.timestamp).toISOString(),\n client: event.client,\n type: event.type,\n method: event.method,\n url: event.url,\n status: event.status,\n durationMs: event.durationMs,\n bytes: event.bytes,\n cause: event.cause ? this.causeLabel(event.cause) : null,\n refreshed: event.refreshed?.map((refreshed) => `${refreshed.method} ${refreshed.path}`) ?? null,\n }));\n }\n\n private sessionFaults(): SessionExportFault[] {\n return this.faultClients()\n .filter((client) => client.armed)\n .map((client) => ({ client: client.name, ...client.fault }));\n }\n\n /** Only the armed ones: a capture taken while the panel was answering requests has to say which. */\n private sessionMocks(): SessionExportMock[] {\n const armed = queryDevtoolsArmedMocks();\n\n return queryDevtoolsMocks()\n .filter((mock) => armed.has(mock.id))\n .map((mock) => ({\n client: mock.clientName,\n method: mock.method,\n pattern: mock.pattern,\n status: mock.status,\n latencyMs: mock.latencyMs,\n body: slimForReport(mock.body),\n }));\n }\n\n private downloadFile(fileName: string, content: string) {\n this.downloadTextFile({ name: fileName, content, type: 'application/json' });\n }\n\n private stepKey(entryId: string, index: number) {\n return `${entryId}:${index}`;\n }\n\n private paneSize(pane: PaneTarget, axis: PaneAxis) {\n if (axis === 'block') return pane === 'list' ? this.listHeight : this.drawerHeight;\n\n return pane === 'list' ? this.listWidth : this.drawerWidth;\n }\n\n /** The panel's size is the distance from the pointer to the edge it is docked to. */\n private applyResize(drag: ResizeDrag, event: PointerEvent) {\n if (drag.kind === 'pane') {\n this.applyPaneResize(drag, event);\n\n return;\n }\n\n const root = this.document.documentElement;\n const dock = this.dock();\n\n // The size is the distance from the pointer to the edge the panel is attached to, which is the\n // pointer's own coordinate for a leading edge and the viewport minus it for a trailing one.\n if (this.sideDocked()) {\n const viewport = root.clientWidth;\n const size = dock === 'right' ? viewport - event.clientX : event.clientX;\n\n this.panelWidth.set(clamp(size, MIN_WIDTH, Math.round(viewport * 0.9)));\n\n return;\n }\n\n const viewport = root.clientHeight;\n const size = dock === 'bottom' ? viewport - event.clientY : event.clientY;\n\n this.panelHeight.set(clamp(size, MIN_HEIGHT, Math.round(viewport * 0.9)));\n }\n\n /** A pane's size is the distance from the pointer to the container edge that pane sits against. */\n private applyPaneResize(drag: Extract<ResizeDrag, { kind: 'pane' }>, event: PointerEvent) {\n const rect = drag.container.getBoundingClientRect();\n const leading = drag.pane === 'list';\n\n if (drag.axis === 'block') {\n const height = leading ? event.clientY - rect.top : rect.bottom - event.clientY;\n const max = Math.max(MIN_PANE_HEIGHT, Math.round(rect.height) - MIN_PANE_HEIGHT);\n\n this.paneSize(drag.pane, 'block').set(clamp(Math.round(height), MIN_PANE_HEIGHT, max));\n\n return;\n }\n\n const width = leading ? event.clientX - rect.left : rect.right - event.clientX;\n const max = Math.max(MIN_PANE_WIDTH, Math.round(rect.width) - MIN_PANE_WIDTH);\n\n this.paneSize(drag.pane, 'inline').set(clamp(Math.round(width), MIN_PANE_WIDTH, max));\n }\n\n private closePopup() {\n const popup = this.popup;\n\n this.popup = null;\n this.popOutStyleSync?.();\n this.popOutStyleSync = null;\n popup?.close();\n }\n\n private updateInspectHover(event: MouseEvent) {\n const host = this.hostEl.nativeElement;\n const map = this.elementQueryMap();\n let node = event.target as HTMLElement | null;\n\n // Ignore the devtools UI itself.\n if (node && host.contains(node)) {\n this.inspectHover.set(null);\n\n return;\n }\n\n while (node) {\n const entries = map.get(node);\n\n if (entries) {\n this.inspectHover.set({ rect: node.getBoundingClientRect(), entries });\n\n return;\n }\n\n node = node.parentElement;\n }\n\n this.inspectHover.set(null);\n }\n\n private selectInspectedQuery(event: MouseEvent) {\n const hover = this.inspectHover();\n const first = hover?.entries[0];\n\n if (!hover || !first) return;\n\n event.preventDefault();\n event.stopPropagation();\n\n const ids = hover.entries.map((e) => e.id);\n\n this.open.set(true);\n this.activeTab.set('queries');\n this.selectedClientName.set(null);\n this.inspectFilterIds.set(ids);\n // Auto-select when the element owns a single query, otherwise let the user pick from the filtered list.\n this.selectedQueryId.set(ids.length === 1 ? first.id : null);\n this.inspectActive.set(false);\n }\n\n private selectionKey() {\n return [\n this.selectedQueryId(),\n this.stackSelectedQueryId(),\n this.sequenceSelectedQueryId(),\n this.batchSelectedQueryId(),\n this.eventSelectedQueryId(),\n this.formSelectedQueryId(),\n this.timelineSelectedQueryId(),\n ].join('|');\n }\n\n /** Writes to the clipboard and ticks `copied` on success. `html` is omitted for plain-text payloads. */\n private writeToClipboard(payload: { text: string; html?: string }, copied: WritableSignal<boolean>) {\n const clipboard = navigator.clipboard;\n const { text, html } = payload;\n if (!clipboard) return;\n\n const flag = () => {\n copied.set(true);\n this.copiedReset$.next();\n };\n\n // Prefer rich HTML (Slack keeps the formatting on paste); fall back to plain text.\n if (html !== undefined && 'write' in clipboard && typeof ClipboardItem !== 'undefined') {\n const item = new ClipboardItem({\n 'text/html': new Blob([html], { type: 'text/html' }),\n 'text/plain': new Blob([text], { type: 'text/plain' }),\n });\n clipboard\n .write([item])\n .then(flag)\n .catch(() => clipboard.writeText(text).then(flag).catch(noop));\n\n return;\n }\n\n clipboard.writeText(text).then(flag).catch(noop);\n }\n\n private responseStatus(query: AnyQuery): number | null {\n const event = query.latestHttpEvent() as { status?: number } | null;\n return typeof event?.status === 'number' ? event.status : null;\n }\n\n private findQuery(id: string | null) {\n if (!id) return null;\n const entry = this.queryEntries().find((e) => e.id === id);\n return entry ? { entry, query: entry.handle as AnyQuery } : null;\n }\n\n private pushEvent(event: QueryRepositoryEvent, client: string) {\n // The log is about traffic. A cache entry being created is always followed by the request it made,\n // so a row for it would only ever duplicate the next one.\n if (event.type === 'entry-created') return;\n\n const base = {\n id: this.eventIdCounter++,\n timestamp: Date.now(),\n client,\n type: event.type,\n cause: null,\n destroyCause: null,\n refreshed: null,\n durationMs: null,\n bytes: null,\n isEstimatedBytes: false,\n };\n\n // Why an entry went away is otherwise unanswerable: it is gone from the cache view with nothing to\n // say whether a logout, its freshness window, the unused-entry cap or a manual evict took it.\n if (event.type === 'entry-destroyed') {\n this.droppedCacheEntries.update((list) => {\n const next: DroppedCacheEntry[] = [\n { client, method: event.method, url: event.url, cause: event.cause, at: base.timestamp },\n ...list,\n ];\n let kept = 0;\n\n // Per client, not in total - a client that drops a lot must not push another client's out of view.\n const cap = queryDevtoolsSettings().maxDroppedCacheEntries;\n\n return next.filter((entry) => entry.client !== client || ++kept <= cap);\n });\n\n this.pushEventItem({\n ...base,\n method: event.method,\n url: event.url,\n isSecure: event.isSecure,\n status: null,\n destroyCause: event.cause,\n queryId: this.resolveEventQueryId(event),\n });\n\n return;\n }\n\n // A logout drops every secure entry at once - worth a row of its own, since the requests that\n // disappear from the cache view are otherwise unexplained.\n if (event.type === 'unbind-all-secure') {\n this.pushEventItem({ ...base, method: null, url: null, isSecure: true, status: null, queryId: null });\n\n return;\n }\n\n // An invalidation is one row for the whole fan-out: the six queries it re-executed are listed on it\n // rather than blurring into the six request rows that follow.\n if (event.type === 'queries-refreshed') {\n this.pushEventItem({\n ...base,\n method: null,\n url: null,\n isSecure: false,\n status: null,\n queryId: null,\n cause: event.cause,\n refreshed: event.requests.map((request) => this.refreshedRequestOf(request)),\n });\n\n return;\n }\n\n // Both are read off the request as the event fires, which is the only moment they describe this\n // event: the next execution of the same request overwrites them.\n const measured = event.type === 'request-success' ? this.measureResponse(event.request) : null;\n\n this.pushEventItem({\n ...base,\n method: event.request.method,\n url: event.request.url,\n isSecure: event.isSecure,\n status: event.type === 'request-error' ? event.error.status : null,\n durationMs: event.request.subtle.lastDurationMs(),\n bytes: measured?.bytes ?? null,\n isEstimatedBytes: !!measured && !measured.isExact,\n queryId: this.resolveEventQueryId(event.request),\n });\n }\n\n /**\n * The registered query an event's request belongs to. A request is shared by every query on the same\n * cache key, so the first owner is as good as any - they all show the same response.\n *\n * The url fallback is what makes a row clickable when the query is already gone: an error that fires\n * as the component holding it is being destroyed (a `401` that redirects to login) has no live owner\n * left to match on identity, and its tombstone holds a copy of the request rather than the request.\n */\n private resolveEventQueryId(source: { url: string }) {\n const live = this.liveQueryEntries();\n const owner =\n live.find((e) => (e.handle as AnyQuery).subtle.request() === source) ??\n live.find((e) => this.requestUrl(e.handle as AnyQuery) === source.url);\n\n if (owner) return owner.id;\n\n // Youngest first: the same route destroyed twice leaves two tombstones, and the newer one is the\n // one this event belongs to.\n return (\n this.queryEntries()\n .filter((e) => e.destroyedAt && this.requestUrl(e.handle as AnyQuery) === source.url)\n .sort((a, b) => (b.destroyedAt ?? 0) - (a.destroyedAt ?? 0))[0]?.id ?? null\n );\n }\n\n /**\n * The size of a settled request's response, taken from its `content-length` when the response carried\n * one and measured from the decoded body otherwise.\n */\n private measureResponse(request: { currentEvent: () => unknown; response: () => unknown }) {\n const event = request.currentEvent();\n const headers = event && typeof event === 'object' && 'headers' in event ? (event.headers as HttpHeaders) : null;\n\n return measureQueryDevtoolsPayload({ headers, body: request.response() });\n }\n\n private refreshedRequestOf(request: { method: string; url: string }): RefreshedRequest {\n return {\n queryIds: this.liveQueryEntries()\n .filter((e) => (e.handle as AnyQuery).subtle.request() === request)\n .map((owner) => owner.id),\n method: request.method,\n path: this.requestPath(request.url),\n };\n }\n\n private pushEventItem(item: EventLogItem) {\n this.eventLog.update((log) => [item, ...log].slice(0, queryDevtoolsSettings().maxEvents));\n }\n}\n","@if (open()) {\n <section\n #panel\n [class.et-query-devtools-panel--resizing]=\"resizing()\"\n [attr.data-dock]=\"poppedOut() ? 'popout' : dock()\"\n [attr.data-pane-axis]=\"paneAxis()\"\n [attr.data-parked]=\"floatParked() ? '' : null\"\n [style.block-size.px]=\"panelBlockSize()\"\n [style.inline-size.px]=\"panelInlineSize()\"\n [style.inset-block-start.px]=\"panelInsetBlock()\"\n [style.inset-inline-start.px]=\"panelInsetInline()\"\n [style.--_et-qdt-list-width.px]=\"listWidth()\"\n [style.--_et-qdt-drawer-width.px]=\"drawerWidth()\"\n [style.--_et-qdt-list-height.px]=\"listHeight()\"\n [style.--_et-qdt-drawer-height.px]=\"drawerHeight()\"\n class=\"et-query-devtools-panel\"\n >\n <!-- A pop-out is sized by its window, so there is no edge to drag. A float is a window in the page:\n a title bar to move it and every edge to resize it, on the same `@ethlete/core` primitives the\n stream pip window uses. A dock has one edge, and it does both. -->\n @if (floating()) {\n <!-- Parked, the panel is a grab strip: the edge handles would eat most of the peek that is left\n to click, and resizing something you cannot see is not a thing to offer. -->\n <et-resize-handles\n [edges]=\"FLOAT_RESIZE_EDGES\"\n [disabled]=\"floatParked()\"\n (resizeStarted)=\"startFloatResize()\"\n (resizeMoved)=\"resizeFloat($event)\"\n (resizeEnded)=\"endFloatResize()\"\n (resizeCancelled)=\"endFloatResize()\"\n />\n <div\n (dragMoved)=\"moveFloat($event)\"\n (dragEnded)=\"endFloatMove()\"\n (dragCancelled)=\"endFloatMove()\"\n (dragTapped)=\"restoreFloat()\"\n class=\"et-query-devtools-move\"\n title=\"Drag to move — shove it off an edge to park it, click the strip to bring it back\"\n aria-hidden=\"true\"\n etDragHandle\n ></div>\n } @else if (!poppedOut()) {\n <div\n (pointerdown)=\"startResize($event)\"\n class=\"et-query-devtools-resize\"\n title=\"Drag to resize\"\n aria-hidden=\"true\"\n ></div>\n }\n <header class=\"et-query-devtools-header\">\n <nav class=\"et-query-devtools-tabs\" role=\"tablist\">\n @for (tab of visibleTabs(); track tab.id) {\n @let badge = tabBadges()[tab.id];\n <button\n [class.et-query-devtools-tab--active]=\"activeTab() === tab.id\"\n [attr.aria-selected]=\"activeTab() === tab.id\"\n (click)=\"activeTab.set(tab.id)\"\n class=\"et-query-devtools-tab\"\n type=\"button\"\n role=\"tab\"\n >\n {{ tab.label }}\n @if (badge.count) {\n <span class=\"et-query-devtools-tab-badge\">{{ badge.count }}</span>\n }\n @if (badge.errors) {\n <span\n class=\"et-query-devtools-tab-badge et-query-devtools-tab-badge--error\"\n title=\"{{ badge.errors }} {{ badge.errorNoun ?? 'failing' }}\"\n >\n {{ badge.errors }}\n </span>\n }\n </button>\n }\n\n @if (overflowTabs().length; as overflowCount) {\n <div class=\"et-query-devtools-menu\" etMenu>\n <button\n [title]=\"overflowCount + ' tabs with nothing in them'\"\n class=\"et-query-devtools-tab\"\n type=\"button\"\n etMenuTrigger\n >\n More\n <span class=\"et-query-devtools-menu-caret\" aria-hidden=\"true\">▾</span>\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n @for (tab of overflowTabs(); track tab.id) {\n <button (activate)=\"activeTab.set(tab.id)\" et-menu-item type=\"button\">{{ tab.label }}</button>\n }\n </et-menu>\n </ng-template>\n </div>\n }\n </nav>\n\n <div class=\"et-query-devtools-header-actions\">\n <button\n [class.et-query-devtools-inspect-btn--active]=\"inspectActive()\"\n [attr.aria-pressed]=\"inspectActive()\"\n (click)=\"toggleInspect()\"\n class=\"et-query-devtools-btn et-query-devtools-inspect-btn\"\n type=\"button\"\n title=\"Inspect: hover the UI to find its query\"\n >\n <svg\n class=\"et-query-devtools-inspect-icon\"\n viewBox=\"0 0 16 16\"\n width=\"14\"\n height=\"14\"\n fill=\"none\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <circle class=\"et-query-devtools-inspect-icon-ring\" cx=\"8\" cy=\"8\" r=\"4.25\" />\n <circle class=\"et-query-devtools-inspect-icon-dot\" cx=\"8\" cy=\"8\" r=\"1.15\" />\n <path d=\"M8 0.9v2.1M8 13v2.1M0.9 8h2.1M13 8h2.1\" />\n </svg>\n {{ inspectActive() ? 'Inspecting' : 'Inspect' }}\n @if (inspectActive()) {\n <kbd class=\"et-query-devtools-kbd et-query-devtools-kbd--inverse\">Esc</kbd>\n }\n </button>\n <button\n (click)=\"downloadSession()\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n title=\"Download every registered entry, the event log, the cache totals and anything armed as one JSON file - the attachment for a bug report\"\n >\n <span aria-hidden=\"true\">⤓</span>\n Session\n </button>\n <!-- A gear, not a tab: Settings holds nothing to count, so the badge/overflow logic would push it\n behind More - and the one control that explains a panel behaving oddly may not be hidden. -->\n <button\n [class.et-query-devtools-btn--active]=\"activeTab() === 'settings'\"\n [attr.aria-pressed]=\"activeTab() === 'settings'\"\n (click)=\"toggleSettings()\"\n class=\"et-query-devtools-btn et-query-devtools-icon-btn\"\n type=\"button\"\n title=\"Settings: where panel state is kept, and the limits it holds\"\n aria-label=\"Settings\"\n >\n <span aria-hidden=\"true\">⚙</span>\n </button>\n @if (!poppedOut()) {\n @let layout = currentLayout();\n <div class=\"et-query-devtools-menu\" etMenu placement=\"bottom-end\">\n <button class=\"et-query-devtools-btn\" title=\"Where the panel sits\" type=\"button\" etMenuTrigger>\n <span class=\"et-query-devtools-menu-glyph\" aria-hidden=\"true\">{{ layout.glyph }}</span>\n {{ layout.label }}\n <span class=\"et-query-devtools-menu-caret\" aria-hidden=\"true\">▾</span>\n </button>\n\n <ng-template etMenuSurface>\n <et-menu>\n <et-menu-radio-group [value]=\"dock()\">\n @for (option of LAYOUTS; track option.id) {\n <!-- eslint-disable ethlete/prefer-static-boolean-properties -- closeOnActivate is tri-state (boolean | undefined); a transform would collapse its unset state -->\n <et-menu-radio-item\n [value]=\"option.id\"\n [title]=\"option.hint\"\n [closeOnActivate]=\"true\"\n (activate)=\"selectLayout(option.id)\"\n >\n <!-- eslint-enable ethlete/prefer-static-boolean-properties -->\n <span class=\"et-query-devtools-menu-item-glyph\" aria-hidden=\"true\">{{ option.glyph }}</span>\n {{ option.label }}\n </et-menu-radio-item>\n }\n </et-menu-radio-group>\n <et-menu-separator />\n <et-menu-checkbox-item\n [checked]=\"reservesSpace()\"\n [disabled]=\"floating()\"\n (checkedChange)=\"reservesSpace.set($event)\"\n title=\"The page gives up the room the panel covers, so its last rows can still be scrolled to. Docks only - a float sits wherever it was dragged.\"\n >\n Reserve page space\n </et-menu-checkbox-item>\n </et-menu>\n </ng-template>\n </div>\n }\n <span class=\"et-query-devtools-header-divider\" aria-hidden=\"true\"></span>\n <button\n (click)=\"toggleOpen()\"\n class=\"et-query-devtools-btn et-query-devtools-btn--danger\"\n type=\"button\"\n title=\"{{ poppedOut() ? 'Bring the panel back into the app window' : 'Close devtools (' + shortcut + ')' }}\"\n >\n @if (poppedOut()) {\n <span aria-hidden=\"true\">⧈</span>\n Dock back\n } @else {\n <span aria-hidden=\"true\">✕</span>\n Close\n <kbd class=\"et-query-devtools-kbd\">{{ shortcut }}</kbd>\n }\n </button>\n </div>\n </header>\n\n @if (popOutBlocked()) {\n <div class=\"et-query-devtools-notice-bar\" role=\"status\">\n <span class=\"et-query-devtools-armed-text\">\n The browser blocked the pop-up window. Allow pop-ups for this site, or float the panel over the page instead —\n a float needs no permission.\n </span>\n <button (click)=\"floatPanel()\" class=\"et-query-devtools-btn\" type=\"button\">Float instead</button>\n <button (click)=\"popOutBlocked.set(false)\" class=\"et-query-devtools-btn\" type=\"button\">Dismiss</button>\n </div>\n }\n\n @if (armedFaultClients(); as armed) {\n <div class=\"et-query-devtools-armed-bar\" role=\"status\">\n <span class=\"et-query-devtools-armed-dot\" aria-hidden=\"true\"></span>\n <span class=\"et-query-devtools-armed-text\">\n <strong>Faults armed</strong> on\n <span class=\"et-query-devtools-mono\">{{ armed.join(', ') }}</span>\n — every failure and delay you see from\n {{ armed.length === 1 ? 'this client' : 'these clients' }} is injected, not the API.\n @if (faultsRestored()) {\n They came back from your last page load — set <em>Armed faults</em> back to <em>none</em> in Settings to\n stop that.\n }\n </span>\n <button\n [disabled]=\"activeTab() === 'faults'\"\n (click)=\"activeTab.set('faults')\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n Review\n </button>\n <button (click)=\"CLEAR_FAULTS()\" class=\"et-query-devtools-btn\" type=\"button\">Disarm all</button>\n </div>\n }\n\n @if (armedMockRoutes(); as mocked) {\n <div class=\"et-query-devtools-armed-bar\" role=\"status\">\n <span class=\"et-query-devtools-armed-dot\" aria-hidden=\"true\"></span>\n <span class=\"et-query-devtools-armed-text\">\n <strong>Mocks armed</strong> on\n <span class=\"et-query-devtools-mono\">{{ mocked.join(', ') }}</span>\n — {{ mocked.length === 1 ? 'that route is' : 'those routes are' }} answered by the panel, so nothing they show\n reached the API.\n @if (mocksRestored()) {\n They came back from your last page load — set <em>Armed mocks</em> back to <em>none</em> in Settings to stop\n that.\n }\n </span>\n <button\n [disabled]=\"activeTab() === 'mocks'\"\n (click)=\"activeTab.set('mocks')\"\n class=\"et-query-devtools-btn\"\n type=\"button\"\n >\n Review\n </button>\n <button (click)=\"DISARM_MOCKS()\" class=\"et-query-devtools-btn\" type=\"button\">Disarm all</button>\n </div>\n }\n\n @if (restoredOverrides(); as restored) {\n <div class=\"et-query-devtools-armed-bar\" role=\"status\">\n <span class=\"et-query-devtools-armed-dot\" aria-hidden=\"true\"></span>\n <span class=\"et-query-devtools-armed-text\">\n @if (restored.ops) {\n <strong>Overrides re-armed</strong> — {{ restored.ops }} {{ restored.ops === 1 ? 'edit' : 'edits' }} from\n your last page load {{ restored.ops === 1 ? 'is' : 'are' }} back on {{ restored.queries }}\n {{ restored.queries === 1 ? 'query' : 'queries' }}, so those responses are not what the API sent.\n @if (restored.fromLocalStorage) {\n They came back from <strong>localStorage</strong>, so they outlive closing this tab — clear them, or set\n overrides back to <em>session</em> in Settings.\n }\n } @else {\n <strong>Overrides could not be re-armed.</strong>\n }\n @if (restored.orphaned.length) {\n <span class=\"et-query-devtools-armed-orphans\">\n {{ restored.orphaned.length }} stored\n {{ restored.orphaned.length === 1 ? 'override' : 'overrides' }} matched no query —\n <span class=\"et-query-devtools-mono\">{{ restored.orphaned.join(', ') }}</span>\n </span>\n }\n </span>\n @if (restored.firstId; as firstId) {\n <button (click)=\"reviewRestoredOverrides(firstId)\" class=\"et-query-devtools-btn\" type=\"button\">Review</button>\n }\n <button (click)=\"DROP_RESTORED_OVERRIDES()\" class=\"et-query-devtools-btn\" type=\"button\">Drop all</button>\n </div>\n }\n\n <div class=\"et-query-devtools-body\">\n @switch (activeTab()) {\n <!-- QUERIES -->\n @case ('queries') {\n <et-query-devtools-queries-tab />\n }\n\n <!-- STACKS -->\n @case ('stacks') {\n <et-query-devtools-stacks-tab />\n }\n\n <!-- SEQUENCES -->\n @case ('sequences') {\n <et-query-devtools-sequences-tab />\n }\n\n <!-- BATCHES -->\n @case ('batches') {\n <et-query-devtools-batches-tab />\n }\n\n <!-- FORMS -->\n @case ('forms') {\n <et-query-devtools-forms-tab />\n }\n\n <!-- AUTH -->\n @case ('auth') {\n <et-query-devtools-auth-tab />\n }\n\n <!-- SOCKETS -->\n @case ('ws') {\n <et-query-devtools-sockets-tab />\n }\n\n <!-- CACHE -->\n @case ('cache') {\n <et-query-devtools-cache-tab />\n }\n\n <!-- LOCKS -->\n @case ('locks') {\n <et-query-devtools-locks-tab />\n }\n\n <!-- TIMELINE -->\n @case ('timeline') {\n <et-query-devtools-timeline-tab />\n }\n\n <!-- EVENTS -->\n @case ('events') {\n <et-query-devtools-events-tab />\n }\n\n <!-- FAULTS -->\n @case ('faults') {\n <et-query-devtools-faults-tab />\n }\n\n <!-- MOCKS -->\n @case ('mocks') {\n <et-query-devtools-mocks-tab />\n }\n\n <!-- ABOUT -->\n @case ('about') {\n <et-query-devtools-about />\n }\n\n <!-- SETTINGS -->\n @case ('settings') {\n <et-query-devtools-settings />\n }\n }\n </div>\n </section>\n}\n\n@if (!open()) {\n <et-query-devtools-toggle [tampered]=\"panelTampered()\" (openChange)=\"toggleOpen()\" />\n}\n\n@if (inspectActive() && inspectHover(); as hover) {\n <div\n [style.left.px]=\"hover.rect.left\"\n [style.top.px]=\"hover.rect.top\"\n [style.width.px]=\"hover.rect.width\"\n [style.height.px]=\"hover.rect.height\"\n class=\"et-query-devtools-inspect-box\"\n >\n <span class=\"et-query-devtools-inspect-tag\">{{ inspectLabel(hover.entries) }}</span>\n </div>\n}\n\n@if (locatedRect(); as rect) {\n <div\n [style.left.px]=\"rect.left\"\n [style.top.px]=\"rect.top\"\n [style.width.px]=\"rect.width\"\n [style.height.px]=\"rect.height\"\n class=\"et-query-devtools-inspect-box\"\n >\n <span class=\"et-query-devtools-inspect-tag\">created here</span>\n </div>\n}\n","import { QueryDevtoolsComponent } from './query-devtools.component';\n\nexport const QUERY_DEVTOOLS_IMPORTS = [QueryDevtoolsComponent] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["MAX_DEPTH","COPIED_RESET_MS","jsonBody","bodyOf","isPlainObject","INDENT","finalize"],"mappings":";;;;;;;;;;;AAQA,MAAM,QAAQ,GAAG,MAAmB;AAClC,IAAA,MAAM,KAAK,GAAG,kBAAkB,EAAE;AAElC,IAAA,MAAM,MAAM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