dsh-claude-style 0.13.2 → 0.14.0-dev.12
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 +182 -0
- package/LICENSE +0 -5
- package/README.en.md +1 -1
- package/README.md +2 -2
- package/THIRD_PARTY_NOTICES.md +282 -6
- package/docs/FEATURES.en.md +13 -14
- package/docs/FEATURES.md +13 -14
- package/docs/SETTINGS.en.md +21 -12
- package/docs/SETTINGS.md +21 -12
- package/docs/STYLE.md +151 -12
- package/lib/assets/1952ecd55916.js.br +0 -0
- package/lib/assets/3b91bf51db72.js.br +0 -0
- package/lib/assets/4ec527e58330.js.br +0 -0
- package/lib/assets/7323c8c86470.js.br +0 -0
- package/lib/assets/755d09170f37.js.br +0 -0
- package/lib/assets/c02a70a798bc.js.br +0 -0
- package/lib/assets/d8df7a57fbe3.js.br +0 -0
- package/lib/assets/manifest.json +28 -28
- package/lib/client.js +11 -8
- package/lib/host/brand.js +136 -0
- package/lib/host/http.js +74 -0
- package/lib/host/peakrate.js +7 -0
- package/lib/host/routes.js +26 -88
- package/lib/host/search.js +8 -1
- package/lib/host/settings.js +5 -0
- package/lib/model-descriptions.json +195 -43
- package/package.json +12 -4
- package/docs/decisions/D11-private-routes.md +0 -26
- package/docs/decisions/D12-fail-fast.md +0 -36
- package/docs/decisions/D14-account-surface.md +0 -26
- package/docs/decisions/D15-hdsl-contract.md +0 -24
- package/docs/decisions/D16-popover-baseline.md +0 -23
- package/docs/decisions/D17-permission-presets.md +0 -26
- package/docs/decisions/D19-host-contracts.md +0 -27
- package/docs/decisions/D20-sliding-pill.md +0 -26
- package/docs/decisions/D21-archived-list.md +0 -24
- package/docs/decisions/D22-search-panel.md +0 -30
- package/docs/decisions/D24-mascot.md +0 -32
- package/docs/decisions/D25-ban-screen-titlebar.md +0 -24
- package/docs/decisions/D26-motion-preference.md +0 -23
- package/docs/decisions/D27-context-stats.md +0 -35
- package/docs/decisions/D28-desktop-band.md +0 -23
- package/docs/decisions/D29-feature-switches.md +0 -24
- package/docs/decisions/D3-host-selectors.md +0 -28
- package/docs/decisions/D30-palette-and-typeface.md +0 -25
- package/docs/decisions/D31-windows-titlebar.md +0 -24
- package/docs/decisions/D32-chat-interactions.md +0 -33
- package/docs/decisions/D33-stylesheet-ownership.md +0 -26
- package/docs/decisions/D34-turn-navigator.md +0 -29
- package/docs/decisions/D35-selection-scope.md +0 -23
- package/docs/decisions/D36-modules-and-bundling.md +0 -35
- package/docs/decisions/D38-assets.md +0 -28
- package/docs/decisions/D39-on-demand-loading.md +0 -33
- package/docs/decisions/D4-composer-gate.md +0 -22
- package/docs/decisions/D40-observation-bus.md +0 -36
- package/docs/decisions/D41-scroll-owner.md +0 -40
- package/docs/decisions/D42-feature-manifest.md +0 -28
- package/docs/decisions/D43-overlay-and-upstream.md +0 -27
- package/docs/decisions/D44-contract-module.md +0 -36
- package/docs/decisions/D45-testing.md +0 -30
- package/docs/decisions/D46-monorepo.md +0 -31
- package/docs/decisions/D47-build-output.md +0 -30
- package/docs/decisions/D48-documentation.md +0 -28
- package/docs/decisions/D49-visual-yield.md +0 -30
- package/docs/decisions/D5-model-copy.md +0 -29
- package/docs/decisions/D50-brand.md +0 -24
- package/docs/decisions/D51-css-toolchain.md +0 -34
- package/docs/decisions/D52-header-band.md +0 -31
- package/docs/decisions/D53-usage-merge.md +0 -33
- package/docs/decisions/D54-peakrate-meter.md +0 -33
- package/docs/decisions/D58-redraw-retired.md +0 -29
- package/docs/decisions/D60-settings-transport.md +0 -31
- package/docs/decisions/D61-wallpaper-under-one-mask.md +0 -28
- package/docs/decisions/D62-file-row-merge.md +0 -28
- package/docs/decisions/D63-turn-status-retired.md +0 -29
- package/docs/decisions/D7-one-package.md +0 -23
- package/docs/decisions/D9-style-performance.md +0 -25
- package/docs/decisions/README.md +0 -86
- package/lib/assets/2c01384360ac.js.map.br +0 -0
- package/lib/assets/31253ed42440.js.br +0 -0
- package/lib/assets/5063c46824b6.js.br +0 -0
- package/lib/assets/55a6154f87b5.js.map.br +0 -0
- package/lib/assets/5e05b29d5005.js.br +0 -0
- package/lib/assets/668d06ca781b.js.map.br +0 -0
- package/lib/assets/930546669455.js.map.br +0 -0
- package/lib/assets/968fcbfc3e22.js.br +0 -0
- package/lib/assets/abf0547f08a4.js.br +0 -0
- package/lib/assets/ac9b0e625837.js.map.br +0 -0
- package/lib/assets/ad2905345a69.js.br +0 -0
- package/lib/assets/ba68f60ecc71.js.map.br +0 -0
- package/lib/assets/c52e41b4842b.js.map.br +0 -0
- package/lib/assets/e1291f79b7c9.js.br +0 -0
- package/lib/client.js.map +0 -7
package/lib/client.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../packages/client/src/entry.ts", "../packages/client/src/constants.ts", "../packages/contracts/src/prefs.ts", "../packages/contracts/src/routes.ts", "../packages/client/src/core/host.ts", "../packages/contracts/src/dom.ts", "../packages/client/src/core/prefs.ts", "../packages/client/src/features/model/copy-fallbacks.ts", "../packages/client/src/shared/notify.ts", "../packages/client/src/core/bus.ts", "../packages/client/src/shared/visual-owner.ts", "../packages/client/src/shared/dom.ts", "../packages/client/src/shared/resource.ts", "../packages/client/src/core/model-copy.ts", "../packages/client/src/core/frame.ts", "../packages/client/src/core/scheduler.ts", "generated:virtual:dsh-claude-style/generated", "../packages/client/src/core/stylesheet.ts", "../packages/client/src/shared/peer-plugin.ts", "../packages/client/src/core/desktop-band.ts", "../packages/client/src/core/feature.ts", "../packages/client/src/core/i18n.ts", "../packages/client/src/features/permissions/permission-copy.ts", "../packages/client/src/features/turn-nav/turn-nav-host.ts", "../packages/client/src/shared/format.ts", "../packages/client/src/shared/popover.ts", "../packages/client/src/shared/scroll-owner.ts", "../packages/client/src/shared/chat-dom.ts", "../packages/client/src/shared/reader-intent.ts", "../packages/client/src/shared/scroll-ease.ts", "../packages/client/src/shared/sliding-pill.ts", "chunk-modules:virtual:dsh-claude-style/chunk-modules", "../packages/client/src/core/chunks.ts", "../packages/client/src/features/selection/selection.ts", "../packages/client/src/features/composer/composer.ts", "../packages/client/src/features/home/home-layout.ts", "../packages/client/src/features/home/data.ts", "../packages/client/src/features/home/models.ts", "../packages/client/src/features/home/overview.ts", "../packages/client/src/features/home/greetings.ts", "../packages/client/src/features/copy/copy.ts", "../packages/client/src/features/permissions/permissions.ts", "../packages/client/src/features/peakrate/schedule.ts", "../packages/client/src/features/peakrate/badge.ts", "../packages/client/src/features/peakrate/live.ts", "../packages/client/src/features/peakrate/match.ts", "../packages/client/src/features/peakrate/peakrate.ts", "../packages/client/src/features/model/catalog.ts", "../packages/client/src/features/model/brand.ts", "../packages/client/src/features/model/copy-lookup.ts", "../packages/client/src/features/model/rows.ts", "../packages/client/src/features/model/model-picker.ts", "../packages/client/src/features/effort/matrix.ts", "../packages/client/src/features/effort/control.ts", "../packages/client/src/features/effort/effort-picker.ts", "../packages/client/src/features/hero-menu/hero-menu.ts", "../packages/client/src/features/settings/quick-providers.ts", "../packages/client/src/features/account/footer-mirror.ts", "../packages/client/src/features/account/host-menu.ts", "../packages/client/src/features/account/profile.ts", "../packages/client/src/features/account/rows.ts", "../packages/client/src/features/account/surface.ts", "../packages/client/src/features/account/account-footer.ts", "../packages/client/src/features/theme-flip/theme-flip.ts", "../packages/client/src/features/workspace/workspace-view.ts", "../packages/client/src/features/chat-follow/process-follow.ts", "../packages/client/src/features/chat-follow/chat-follow.ts", "../packages/client/src/features/chat-fold/fold-glide-parts.ts", "../packages/client/src/features/chat-fold/fold-toggle.ts", "../packages/client/src/features/chat-fold/fold-glide.ts", "../packages/client/src/features/chat-fold/process-fold.ts", "../packages/client/src/features/chat-fold/process-summary.ts", "../packages/client/src/features/chat-fold/reasoning-fold.ts", "../packages/client/src/features/chat-fold/reasoning-stream.ts", "../packages/client/src/features/chat-fold/chat-fold.ts", "../packages/client/src/shared/turn-activity.ts", "../packages/client/src/features/chat-wait/wait-state.ts", "../packages/client/src/features/chat-wait/chat-wait.ts", "../packages/client/src/features/chat-reveal/reveal-params.ts", "../packages/client/src/features/chat-reveal/reveal-diff.ts", "../packages/client/src/features/chat-reveal/reveal-highlights.ts", "../packages/client/src/features/chat-reveal/reveal-paint.ts", "../packages/client/src/features/chat-reveal/reveal-engine.ts", "../packages/client/src/features/chat-reveal/chat-reveal.ts", "../packages/client/src/features/chat-files/chat-files.ts", "../packages/client/src/features/chat-files/file-row-model.ts", "../packages/client/src/features/chat-files/file-row-merge.ts", "../packages/client/src/features/caret/caret-measure.ts", "../packages/client/src/features/caret/caret.ts", "../packages/client/src/features/view-tabs/view-tabs.ts", "../packages/client/src/features/header-band/header-band.ts", "features:virtual:dsh-claude-style/features"],
|
|
4
|
-
"sourcesContent": ["import { FEATURE_PREF_DEFAULTS, HANDOFF_ATTR } from './constants'\nimport { loadHdsl, loadUsername, setHostContext } from './core/host'\nimport type { HostContext } from './core/host'\nimport { loadModelCopy } from './core/model-copy'\nimport { adoptPrefs, adoptSettingsForm, clearPrefsAttributes, disposePrefsBinding, prefs, readPrefs, retireComposerRestyle, retireFooterTakeover, subscribePrefs } from './core/prefs'\nimport { installScheduler, reportFeatureFailure } from './core/scheduler'\nimport type { HandleName, Ui } from './core/scheduler'\nimport { mountStylesheet, parkForeignSheets } from './core/stylesheet'\nimport { peerPresent, subscribePeerPresence } from './shared/peer-plugin'\nimport { externalOwnerActive, subscribeExternalOwner } from './shared/visual-owner'\nimport { loadFeatureChunk } from './core/chunks'\nimport { handleName, setFeatureRegistry } from './core/feature'\nimport type { Feature, FeatureInstall } from './core/feature'\nimport { FEATURES } from 'virtual:dsh-claude-style/features'\nimport { BUILD_ID } from 'virtual:dsh-claude-style/generated'\n\n// At module scope on purpose: the sweep runs right after this factory\n// returns, so an `apply()` body would be too late. The head watch\n// (shared/peer-plugin.ts) covers the sheets that arrive later.\nparkForeignSheets()\n\n/** A feature its preference switches on and off live (a key of FEATURE_PREF_DEFAULTS). */\ntype SwitchedFeature = Feature & { pref: keyof typeof FEATURE_PREF_DEFAULTS }\n\nconst isSwitched = (feature: Feature): feature is SwitchedFeature => Object.hasOwn(FEATURE_PREF_DEFAULTS, feature.pref ?? '')\n\n/**\n * Whether a feature comes and goes during the generation: its preference is\n * a live switch, or it yields to a plugin that can arrive or leave.\n */\nconst isLive = (feature: Feature) => isSwitched(feature) || feature.yieldsTo !== undefined\n\n/**\n * Whether a live feature is wanted now: a boolean switch is on unless stored\n * as `false`, a choice switch runs under the values its manifest names\n * (`prefValues`), and no plugin it yields to is on the page.\n */\nfunction isWanted(feature: Feature) {\n if (isSwitched(feature)) {\n const value = readPrefs()[feature.pref]\n const on = feature.prefValues === undefined\n ? value !== false\n : typeof value === 'string' && feature.prefValues.includes(value)\n if (!on) return false\n }\n return feature.yieldsTo === undefined || !peerPresent(feature.yieldsTo)\n}\n\nexport function apply(ctx: HostContext) {\n const body = document.body\n const ui: Ui = { retire }\n /** Installed features in install order, as `{ id, handle, stop }`. */\n let installed: { id: string, handle: HandleName | null, stop: () => void }[] = []\n /** Features retired after failing: a preference flip never brings one back this generation. */\n const failed = new Set<string>()\n /** Unsubscribes the live features from the preferences; set once the features install. */\n let offSwitches: (() => void) | null = null\n /** Keeps the other chat plugin's presence watch alive; set once the features install. */\n let offPeerWatch: (() => void) | null = null\n /** Watches the skin center's stamp on the page; D49. */\n let offOwnerWatch: (() => void) | null = null\n /** Unmounts this generation's stylesheet; set once the sheet is mounted. */\n let stopStylesheet: (() => void) | null = null\n let disposed = false\n /** True while a skin owns the page and this theme stands down (D49). */\n let yielded = externalOwnerActive()\n\n /**\n * Give the page back, keeping the features `keep` names: run every other\n * feature's teardown and take this package's body attributes and stylesheet\n * away. A yield keeps the settings section and the preference binding: the\n * reader must still reach the plugin's own page, and another plugin taking\n * the screen uninstalls nothing of the reader's (D49).\n */\n function release(keep: string[] = []) {\n // First, so no preference flip installs a feature mid-release.\n if (offSwitches !== null) {\n offSwitches()\n offSwitches = null\n }\n const kept = []\n for (let i = installed.length - 1; i >= 0; i--) {\n if (keep.includes(installed[i].id)) {\n kept.push(installed[i])\n continue\n }\n // One teardown must not block the rest (D12); a failing one is reported.\n try { installed[i].stop() } catch (error) { reportError(error) }\n }\n installed = kept.reverse()\n // Each body attribute goes with whoever writes it: a feature's own with\n // its teardown above, the preference mirror's here, the stamps last.\n clearPrefsAttributes()\n body.removeAttribute('data-dsh-claude-style')\n body.removeAttribute(HANDOFF_ATTR)\n // This generation's own sheet, handed over rather than taken away when a\n // newer generation has mounted after it (mountStylesheet).\n if (stopStylesheet !== null) {\n stopStylesheet()\n stopStylesheet = null\n }\n }\n\n /**\n * Undo everything this generation installed. Idempotent: the host runs it\n * on dispose (the effect below), and own() runs it itself when the\n * scheduler cannot be installed.\n */\n function teardown() {\n if (disposed) return\n disposed = true\n if (offOwnerWatch !== null) {\n offOwnerWatch()\n offOwnerWatch = null\n }\n release()\n if (offPeerWatch !== null) {\n offPeerWatch()\n offPeerWatch = null\n }\n setHostContext(null)\n disposePrefsBinding()\n }\n\n // Registered before anything is installed: registered last, a feature that\n // threw half-way through left the stylesheet and every listener installed\n // so far on the page with no teardown the host could ever run.\n ctx.effect(() => teardown, 'dsh-claude-style: Claude Code desktop theme')\n\n /**\n * Switch one feature off for the rest of this generation: run its own\n * teardown, and give back the host surface it had taken over. The footer\n * takeover and the composer restyle HIDE host controls (their gates are\n * body attributes the preferences and the composer pass write), so with\n * the feature gone they must stop hiding them. The permission control's\n * own hiding rules key on the attribute its teardown removes, so it needs\n * no branch here. The scheduler calls this for a sync that keeps failing.\n *\n * `name` may be the feature's id or its handle name. The scheduler retires\n * a failing sync through the handle; a handle that differs from the install\n * name (settings → settingsNav) stops the sync alone — the failure counter\n * already refuses the next pass, and the install keeps running so the\n * settings page stays.\n */\n function retire(name: string) {\n failed.add(name)\n const index = installed.findIndex(entry => entry.id === name || entry.handle === name)\n // A handle-only match does not tear the install down.\n if (index !== -1 && installed[index].id === name) {\n const stop = installed[index].stop\n installed.splice(index, 1)\n // Retiring goes through even when the feature's own teardown fails too.\n try { stop() } catch (error) { reportError(error) }\n }\n if (name === 'footer') retireFooterTakeover()\n if (name === 'composer') retireComposerRestyle()\n }\n\n /**\n * Install one piece in isolation. One that throws is reported and retired,\n * and the rest of the skin carries on without it.\n * @param id - the failure report's label and the teardown's key.\n * @param handle - the name the piece registers on `ui`; null for the scheduler, which registers none.\n * @returns whether the piece installed.\n */\n function install(id: string, handle: HandleName | null, run: () => (() => void) | void) {\n try {\n const stop = run()\n if (typeof stop === 'function') installed.push({ id, handle, stop })\n return true\n } catch (error) {\n reportFeatureFailure(id, error)\n retire(id)\n return false\n }\n }\n\n /** The deferred features' installs that have arrived this generation, by id (D39). */\n const arrived = new Map<string, FeatureInstall>()\n /** The deferred features whose chunk is on its way. */\n const awaited = new Set<string>()\n\n /**\n * Install one feature, or, for a deferred one whose chunk has not arrived\n * yet, send for the chunk: the arrival installs it (D39).\n */\n function installFeature(feature: Feature) {\n if (feature.chunk === undefined) {\n const run = feature.install\n install(feature.id, handleName(feature), () => run(ctx, ui))\n return\n }\n const run = arrived.get(feature.id)\n if (run === undefined) awaitFeature(feature, feature.chunk)\n else install(feature.id, handleName(feature), () => run(ctx, ui))\n }\n\n /**\n * Whether a feature whose chunk just arrived still belongs on the page: the\n * page may have been given to a skin (only the settings section stays,\n * D49), the feature switched off, or the generation ended while the chunk\n * was on its way.\n */\n function belongs(feature: Feature) {\n if (disposed || failed.has(feature.id) || installed.some(entry => entry.id === feature.id)) return false\n if (yielded && feature.id !== 'settings') return false\n return !isLive(feature) || isWanted(feature)\n }\n\n /**\n * Fetch a deferred feature's chunk once and install the feature on arrival\n * if it still belongs. A chunk that cannot load is the feature failing to\n * install: reported once, and the feature retires (D12).\n */\n function awaitFeature(feature: Feature, chunk: string) {\n if (awaited.has(feature.id)) return\n awaited.add(feature.id)\n loadFeatureChunk(chunk).then((run) => {\n awaited.delete(feature.id)\n arrived.set(feature.id, run)\n if (!belongs(feature)) return\n install(feature.id, handleName(feature), () => run(ctx, ui))\n // The feature's handle joins the next pass, which nothing else asks for.\n if (typeof ui.schedule === 'function') ui.schedule()\n }, (error: unknown) => {\n awaited.delete(feature.id)\n // This generation is gone (a hot reload replaced it): reporting names a\n // feature nobody is left to install, and retiring has nothing to retire.\n if (disposed) return\n reportFeatureFailure(feature.id, error)\n retire(feature.id)\n })\n }\n\n /**\n * Bring a live feature in line with its switch and the plugins it yields to\n * (isWanted): wanted installs it, unwanted runs its teardown and drops its\n * handle, which hands its surface back to the host. Runs at startup and on\n * every preference adoption — the other plugin arriving or leaving re-runs\n * that stream too (packages/client/src/shared/peer-plugin.ts) — so neither needs a reload.\n * A feature retired after failing stays retired.\n */\n function applySwitch(feature: Feature) {\n const handle = handleName(feature)\n const wanted = isWanted(feature)\n const index = installed.findIndex(entry => entry.id === feature.id)\n if (wanted && index === -1 && !failed.has(feature.id)) {\n installFeature(feature)\n return\n }\n if (wanted || index === -1) return\n const stop = installed[index].stop\n installed.splice(index, 1)\n delete ui[handle]\n // Isolation (D12): a teardown that throws is reported, and the feature\n // stays off for the rest of the generation.\n try {\n stop()\n } catch (error) {\n reportFeatureFailure(feature.id, error)\n failed.add(feature.id)\n }\n }\n\n /**\n * Take the page: stamp, mount the sheet, install the features, schedule.\n * Idempotent over what is already installed, so taking the page back after\n * a yield leaves the settings section alone (D49); a feature retired after\n * failing stays retired (D12).\n *\n * FEATURES is the registry the build generates from the manifests (D42),\n * in install order; the scheduler's pass order is the same order. A live\n * feature follows its switch and the plugins it yields to; the rest\n * install once. A deferred feature installs when its chunk arrives, after\n * this pass and the scheduler (D39). A `pref` outside FEATURE_PREF_DEFAULTS\n * is read by the feature itself.\n */\n function own() {\n // The value is the build id (scripts/build.mjs): the stylesheet keys on\n // the attribute alone, and a live page reads which lib/client.js it runs.\n body.setAttribute('data-dsh-claude-style', BUILD_ID)\n // The handoff marker rides the live stamp: its presence is what lets the\n // skin center offer this theme as a selectable look (D49).\n body.setAttribute(HANDOFF_ATTR, BUILD_ID)\n adoptPrefs(prefs)\n // The sheet carries this package's own tags and is unmounted by\n // release(); the features install onto a page that already wears it.\n if (stopStylesheet === null) stopStylesheet = mountStylesheet()\n for (const feature of FEATURES) {\n if (failed.has(feature.id) || installed.some(entry => entry.id === feature.id)) continue\n if (isLive(feature)) applySwitch(feature)\n else installFeature(feature)\n }\n if (offSwitches === null) {\n offSwitches = subscribePrefs(() => {\n for (const feature of live) applySwitch(feature)\n if (typeof ui.schedule === 'function') ui.schedule()\n })\n }\n // Last: its passes read the `ui` handles lazily. Without it nothing syncs,\n // and a live stylesheet over overrides that never run is worse than no\n // skin at all — so if it cannot install, the whole skin rolls back.\n if (installed.some(entry => entry.id === 'scheduler')) return\n if (!install('scheduler', null, () => installScheduler(ctx, ui, handleNames))) teardown()\n }\n\n setHostContext(ctx)\n // Bind the official settings form before anything reads a preference:\n // the host serves namespaces through `ctx.configForms`. Bound once here,\n // and retried when the settings page installs.\n adoptSettingsForm(ctx)\n // The service can mount after this plugin: wait for it declaratively and\n // bind then, so the first settings change never meets an unbound store.\n if (typeof ctx.inject === 'function') ctx.inject(['configForms'], () => { adoptSettingsForm(ctx) })\n loadModelCopy()\n loadUsername()\n loadHdsl()\n // Preferences are read asynchronously from the host settings namespace;\n // applying the defaults first keeps every gated rule in a defined state\n // for the frames before that read settles, and is exactly the shipped\n // behaviour when it never does. This runs while yielded too: the reader\n // must still reach the settings page and see their own values (D49).\n adoptPrefs(prefs)\n\n setFeatureRegistry(FEATURES)\n const live = FEATURES.filter(isLive)\n const handleNames = FEATURES.map(handleName)\n // Keep the presence watch alive for the page's lifetime: another plugin\n // arriving or leaving re-runs the preference stream, which brings the\n // features that yield to it in or out (packages/client/src/shared/peer-plugin.ts). The\n // subscription itself carries no logic.\n offPeerWatch = subscribePeerPresence(() => {})\n // A skin can arrive or leave whichever way the page booted; the\n // verdict is read again on every flip rather than remembered (D49).\n offOwnerWatch = subscribeExternalOwner(active => {\n if (active === yielded) return\n yielded = active\n if (active) release(['settings'])\n else own()\n })\n\n if (yielded) {\n // A skin already has this page (D49). The settings section is the\n // one feature that stays: the reader still has to reach this theme's own\n // page. adoptPrefs mirrors nothing onto a yielded page, and the release\n // leaves the section alone, installed now or on its chunk's arrival (D39).\n installFeature(FEATURES.find(feature => feature.id === 'settings')!)\n release(['settings'])\n return\n }\n own()\n}\n", "/**\n * The constants the build reads out of the browser half: the gate attributes\n * scripts/css.mjs checks on the syntax tree, the values preferences hold with\n * the attribute names they resolve onto, and the preference defaults —\n * scripts/build.mjs evaluates this module and picks those names. The\n * stylesheets spell the attributes out; the build holds every one they read to\n * a name the browser half writes. The identity constants and the host half's\n * route re-exports live here too.\n */\nimport { PREFS_DEFAULT } from '@dsh-claude-style/contracts/prefs'\n\nexport const STYLE_ID = 'dsh-claude-style-style'\n\n/**\n * Settings identity.\n *\n * A settings namespace IS a profile entry id and its schema IS the entry's\n * Config, so the id below is what both halves address — read off the\n * running loader entry where possible, with the id `cordis.patch.yml`\n * inserts as the fallback.\n *\n * PACKAGE_NAME is the other half of the contract: a bundle's own\n * configuration is a `plugins.bundle.config` entry keyed by the bundle's\n * package name, which is what makes it render on this plugin's page.\n */\nexport const SETTINGS_ENTRY_FALLBACK = 'ui-skin-claude-style'\nexport const PACKAGE_NAME = 'dsh-claude-style'\n/**\n * The skin stylesheet's own key in the client module system's bookkeeping:\n * the sheet is mounted tagged `data-plugin=\"<PACKAGE_NAME>\"` and\n * `data-plugin-css=\"<STYLE_PLUGIN_CSS>\"`, which is what keeps the host's\n * claim sweep and every sibling package's removal off it (D33).\n */\nexport const STYLE_PLUGIN_CSS = `${PACKAGE_NAME}/client.css`\n/**\n * The tag this package gives a sibling's untagged stylesheet so the host's\n * claim sweep cannot attribute it to this package (D33). It carries a slash,\n * so it can never equal a package name — the id every removal step matches\n * on — and no package's reload takes the sheet away.\n */\nexport const FOREIGN_SHEET_TAG = `${PACKAGE_NAME}/foreign-sheet`\nexport const BUNDLE_CONFIG_SLOT = 'plugins.bundle.config'\nexport const SETTINGS_SECTION_SLOT = 'settings.section'\n/**\n * The plugin's own repository. The settings page's heading links to it, and\n * the address is read from here rather than written into the component.\n */\nexport const REPOSITORY_URL = 'https://github.com/Nwflower/dsh-claude-style'\n\n/**\n * Preferences, persisted in the profile entry's settings namespace (the\n * exported Config in packages/host/src/settings.ts declares the fields;\n * packages/client/src/core/prefs.ts reads and writes them). Each value is\n * mirrored onto the document as an attribute so the stylesheet decides what a\n * preference means, and the defaults are the shared contract\n * (packages/contracts/src/prefs.ts, D46).\n */\n\n/** Brand marks selectable from the settings page. `claude` is the default. */\nexport const BRAND_CLAUDE = 'claude'\n/**\n * The DeepSeek brand: the host's own brand area stays (no Claude variant\n * matches) and takes DeepSeek's brand blue, both palettes turn blue\n * (theme/tokens.css), the skin's Claude marks give way to DeepSeek's whale,\n * and Deepy the pixel whale takes the crab's place on the composer.\n */\nexport const BRAND_DEEPSEEK = 'deepseek'\n/** What earlier builds stored for the DeepSeek choice, when it was labelled \"Off\". */\nexport const BRAND_DEEPSEEK_LEGACY = 'off'\n/** The document attribute the stylesheet switches on. */\nexport const BRAND_ATTR = 'data-dsh-claude-brand'\n\n/**\n * The animation choice, and the document attribute it resolves onto.\n *\n * Three values in the settings page, two on the document: `system` follows\n * the operating system's own reduced-motion setting, `reduced` holds every\n * animation still whatever the system says, and `full` always plays them.\n * The resolved answer rides <body> as MOTION_ATTR (`reduced` / `full`), so\n * the mascots and the stylesheets read one value instead of asking the\n * system separately — which is the only way \"always play\" can override it.\n */\nexport const MOTION_SYSTEM = 'system'\nexport const MOTION_REDUCED = 'reduced'\nexport const MOTION_FULL = 'full'\nexport const MOTION_MODES = [MOTION_SYSTEM, MOTION_REDUCED, MOTION_FULL]\nexport const MOTION_ATTR = 'data-dsh-claude-motion'\n\n/**\n * The composer caret's motion (packages/client/src/features/caret/caret.ts): `typing`\n * transitions every move, `move` only explicit ones, `off` takes nothing\n * over at all and leaves the browser's own caret in place.\n */\nexport const CARET_MOTION_OFF = 'off'\nexport const CARET_MOTION_MOVE = 'move'\nexport const CARET_MOTION_TYPING = 'typing'\nexport const CARET_MOTIONS = [CARET_MOTION_OFF, CARET_MOTION_MOVE, CARET_MOTION_TYPING]\n\n/**\n * Who paints the colours, and who sets the type. `claude` is the skin's own\n * palette (or typefaces); `host` leaves the host's colour (or font) tokens\n * to the host and to whatever other theme plugin writes them — a wallpaper\n * plugin's glass, say — and the skin's own surfaces read those tokens\n * through its private aliases. Each choice rides <body> as its attribute,\n * and the stylesheet gates every rule that writes the host's tokens on it.\n */\nexport const PALETTE_CLAUDE = 'claude'\nexport const PALETTE_HOST = 'host'\nexport const PALETTES = [PALETTE_CLAUDE, PALETTE_HOST]\nexport const PALETTE_ATTR = 'data-dsh-claude-palette'\nexport const TYPEFACE_CLAUDE = 'claude'\nexport const TYPEFACE_HOST = 'host'\nexport const TYPEFACES = [TYPEFACE_CLAUDE, TYPEFACE_HOST]\nexport const TYPEFACE_ATTR = 'data-dsh-claude-typeface'\n\n/**\n * The mascot on the composer, chosen apart from the brand. `brand` follows\n * the brand (the crab under Claude, Deepy under DeepSeek); `crab` and\n * `deepy` pick one whatever the brand; `off` shows none. The resolved\n * mascot (`crab`, `deepy` or `off`) rides <body> as MASCOT_ATTR.\n *\n * MASCOT_SCOPES says where it stands: the home page alone, or the home page\n * and the conversation.\n */\nexport const MASCOT_BRAND = 'brand'\nexport const MASCOT_CRAB = 'crab'\nexport const MASCOT_DEEPY = 'deepy'\nexport const MASCOT_OFF = 'off'\nexport const MASCOTS = [MASCOT_BRAND, MASCOT_CRAB, MASCOT_DEEPY, MASCOT_OFF]\nexport const MASCOT_ATTR = 'data-dsh-claude-mascot'\nexport const MASCOT_SCOPE_HOME = 'home'\nexport const MASCOT_SCOPE_ALL = 'all'\nexport const MASCOT_SCOPES = [MASCOT_SCOPE_HOME, MASCOT_SCOPE_ALL]\n\n/**\n * Where the skin's search box stands, and how much of the host's own sidebar\n * search it leaves in place (packages/client/src/features/search/search.css).\n * `icon` takes the click of the host's own search button and leaves that button\n * where the host draws it; `overlay` keeps the box in the brand row, standing\n * over the brand while the pointer is over the sidebar; `standalone` gives the\n * box a row of its own under the brand row, shown always. The choice rides\n * <body> as SEARCH_STYLE_ATTR, so every rule that places the box is gated on it.\n */\nexport const SEARCH_STYLE_ICON = 'icon'\nexport const SEARCH_STYLE_OVERLAY = 'overlay'\nexport const SEARCH_STYLE_STANDALONE = 'standalone'\nexport const SEARCH_STYLES = [SEARCH_STYLE_ICON, SEARCH_STYLE_OVERLAY, SEARCH_STYLE_STANDALONE]\nexport const SEARCH_STYLE_ATTR = 'data-dsh-claude-search-style'\n\n/**\n * How much air the sidebar keeps around its own rows: `relaxed` is the\n * stylesheet as written, `compact` takes the same declarations down — the foot\n * under the top block's rows, the gap between the workspace and the rows, the\n * conversation rows' own height and the footer's padding\n * (packages/client/src/theme/sidebar.css). The choice belongs to no feature, so\n * the Sidebar tab writes the row itself, like the dock cards. It rides <body> as\n * SIDEBAR_LAYOUT_ATTR, so every rule that tightens a value is gated on it.\n */\nexport const SIDEBAR_LAYOUT_RELAXED = 'relaxed'\nexport const SIDEBAR_LAYOUT_COMPACT = 'compact'\nexport const SIDEBAR_LAYOUTS = [SIDEBAR_LAYOUT_RELAXED, SIDEBAR_LAYOUT_COMPACT]\nexport const SIDEBAR_LAYOUT_ATTR = 'data-dsh-claude-sidebar-layout'\n\n/**\n * The chat area's animation switch: on plays the ported set\n * (packages/client/src/features/chat-*), off leaves the area to the host. The\n * features share the one switch, each naming it as its `pref` (D42); a value an\n * earlier build stored under the retired Redraw choice reads as on\n * (packages/client/src/core/prefs.ts).\n */\nexport const CHAT_ANIMATIONS_OFF = 'off'\n\n/**\n * Where the session's numbers show (D27): `context` (the default) keeps them in\n * the popover the meter opens and leaves the card's bottom line to the meter\n * alone, and `inline` writes them on a line of their own under the input card,\n * with the host's meter at that line's end. The choice rides <body> as\n * STATS_POSITION_ATTR, so the composer rules that hide or overlay the host's\n * statistics row are gated on it.\n */\nexport const STATS_POSITION_INLINE = 'inline'\nexport const STATS_POSITION_CONTEXT = 'context'\nexport const STATS_POSITIONS = [STATS_POSITION_INLINE, STATS_POSITION_CONTEXT]\nexport const STATS_POSITION_ATTR = 'data-dsh-claude-stats-position'\n\n/**\n * Feature switches: one preference per feature that replaces or moves a host\n * control, on by default. Each feature's manifest names its key (`pref`, D42)\n * and, for a choice preference, the values it runs under (`prefValues`); a\n * value outside that set runs the feature's teardown, which hands its surface\n * back to the host.\n *\n * `statsPosition` is the one choice among them; `chatAnimations` is the switch\n * covering the ported chat-area effects — the follow, the automatic folding with\n * its rolling door, the text fade, the file change rows, the send flight, the\n * counted process headers and the waiting line — and belongs here rather than\n * among the live-read preferences because two of those cannot be stopped by\n * reading a preference: the file change rows take the host's two seat keys over\n * (D32), and a seat registration only comes back when the feature is torn down\n * whole. `statsPosition` answers where the session's numbers show: one value\n * writes them on a line of their own under the card, the other fills the context\n * popover with them and leaves that line to the host's meter.\n */\nexport const FEATURE_PREF_DEFAULTS = {\n permissionsControl: true,\n statsPosition: STATS_POSITION_CONTEXT,\n workspaceView: true,\n sidebarSearch: true,\n turnNav: true,\n viewTabs: true,\n headerBand: true,\n chatAnimations: true,\n peakrate: true,\n}\n\n\n/**\n * Present while the ported chat-area follow is installed\n * (packages/client/src/features/chat-follow/). One rule hangs off it: a capped process\n * group's body scrolls vertically alone, so the catch-up measures the same\n * distance the host's own smooth scroll does. Switched off, the chat area\n * is handed back untouched.\n */\nexport const CHAT_FOLLOW_ATTR = 'data-dsh-claude-chat-follow'\n/**\n * On the host's own \"back to the end\" button while the stream glide\n * (packages/client/src/features/chat-follow/chat-follow.ts) is following on the conversation\n * scroller: the glide holds the position off the end on purpose, which the\n * host reads as the reader having left, so it renders that button although\n * it is being followed. The stylesheet keeps it out of sight until the glide\n * lets go; the host's own state is not touched.\n */\nexport const STREAM_GLIDE_ATTR = 'data-dsh-claude-stream-glide'\n/**\n * On the flow column while the stream glide\n * (packages/client/src/features/chat-follow/chat-follow.ts) holds the position\n * for the reader. A position held short of the end reads to the host as a\n * reader who left the tail, and it takes its own data-chat-following-tail away\n * (D44) — the gate the waiting line's pin waits for\n * (packages/client/src/features/chat-wait/chat-wait.css). This mark stands\n * for that gate while the glide is the one moving the position.\n */\nexport const FOLLOW_HOLD_ATTR = 'data-dsh-claude-follow-hold'\n/**\n * On a container the reader has taken over with his own scrolling\n * (packages/client/src/shared/scroll-owner.ts), until he comes back to its end. The\n * waiting line's pin (packages/client/src/features/chat-wait/chat-wait.css) reads it: a\n * pin stands only while the skin's own follow is the one moving the position,\n * never over content the reader scrolled back to.\n */\nexport const READER_HOLD_ATTR = 'data-dsh-claude-reader-hold'\n/**\n * Present while the ported token reveal is installed\n * (packages/client/src/features/chat-reveal/): its step rules (reveal-rules.css) hang off it,\n * and switching the feature off leaves the page with no trace of it.\n */\nexport const CHAT_REVEAL_ATTR = 'data-dsh-claude-chat-reveal'\n/**\n * On the real message row while the send bubble's stand-in is flying\n * (packages/client/src/features/chat-send/): the stylesheet hides that row, keeping its layout\n * box so the stand-in can measure the destination from it every frame.\n */\nexport const CHAT_FLYING_ATTR = 'data-dsh-claude-send-flight'\n/**\n * On a node the skin owns purely for its own bookkeeping — the caret\n * motion's probe container and the caret it draws. The shared scheduler\n * ignores mutations against such a node (D40), so measuring or redrawing\n * never wakes a pass that no feature needs.\n */\nexport const QUIET_ATTR = 'data-dsh-claude-quiet'\n/**\n * On the element the fold glide is pressing right now (packages/client/src/features/chat-fold/\n * fold-glide.ts): while it stands, the elements inside lay out at their\n * natural height instead of being squeezed by flex (fold-motion.css).\n */\nexport const CHAT_ROLLING_ATTR = 'data-dsh-claude-rolling'\n/** On an editable surface once the caret motion has taken it over (packages/client/src/features/caret/). */\nexport const CARET_ATTR = 'data-dsh-claude-caret'\n/** The drawn caret itself. */\nexport const CARET_LAYER_ATTR = 'data-dsh-claude-caret-layer'\n/** The drawn caret is visible right now. */\nexport const CARET_VISIBLE_ATTR = 'data-dsh-claude-caret-visible'\n/** On a parent lent the positioning context the drawn caret is placed against. */\nexport const CARET_HOST_ATTR = 'data-dsh-claude-caret-host'\n/**\n * Present while the ported automatic folding is installed\n * (packages/client/src/features/chat-fold/): the stylesheet's header-summary rules hang off it,\n * and switching the feature off hands the chat area back whole.\n */\nexport const CHAT_FOLD_ATTR = 'data-dsh-claude-chat-fold'\n/** Present while the skin takes over the sidebar footer (settings area + account row). */\nexport const FOOTER_ATTR = 'data-dsh-claude-footer-takeover'\n/**\n * The language the account-hold easter egg (packages/client/src/features/ban-screen/ban-screen.ts) is\n * written in. It is its own preference rather than \"follow the shell\",\n * because the page reproduces a real Claude screen: the point is to read it\n * in the language Claude actually used, whatever the shell is set to. The\n * default is English for that reason.\n */\nexport const BAN_LOCALE_EN = 'en'\nexport const BAN_LOCALE_ZH = 'zh'\nexport const BAN_LOCALES = [BAN_LOCALE_EN, BAN_LOCALE_ZH]\n/** Present while the composer restyle applies to the page currently shown. */\nexport const COMPOSER_ATTR = 'data-dsh-claude-composer-active'\n/**\n * Present while the composer restyle applies and a conversation tab other\n * than the chat is up: the composer is chat-view-only, so the stylesheet\n * drops the whole bottom area (packages/client/src/features/composer/composer.ts).\n */\nexport const COMPOSER_HIDDEN_ATTR = 'data-dsh-claude-composer-hidden'\n/**\n * Present while the permission control is installed. The composer restyle\n * hides the host's access-mode button because this feature replaces it,\n * and that rule also requires this attribute: a permission control that is\n * switched off hands the button back while the rest of the composer\n * restyle keeps running.\n */\nexport const PERMISSIONS_ATTR = 'data-dsh-claude-permissions'\n/**\n * Present while the context statistics are installed\n * (packages/client/src/features/context-stats/context-stats.ts). The host's two stat\n * dialogs are hidden only under it: their numbers are read into the\n * context popover instead, and switched off the feature hands them back.\n */\nexport const SESSION_STATS_ATTR = 'data-dsh-claude-session-stats'\n/**\n * Stamped on the host's own account menu card while it is open (Desktop\n * 0.1.7+). That card is the host's shared Menu portal and its class names\n * are hashed, so packages/client/src/features/account/surface.ts stamps this attribute and\n * features/account/account-footer.css repaints the card, its rows and its\n * separators with the skin's popover language.\n */\nexport const ACCOUNT_MENU_ATTR = 'data-dsh-claude-account-menu'\n/**\n * Set on <body> from the moment the account row is hovered or pressed until\n * its menu closes. The card's own marker needs the menu's rows to identify\n * the card, so it lands two or three frames after the host has already\n * painted the card; an entry animation keyed on it therefore replayed from\n * transparent over a card that was already visible. This one is in place\n * before the host mounts the card, so the animation runs from its first\n * frame.\n */\nexport const ACCOUNT_ARMED_ATTR = 'data-dsh-claude-account-armed'\n/**\n * Stamped on the host's account card by packages/client/src/features/account/surface.ts once\n * the card carries the skin's rows and the host has finished placing it.\n *\n * The host mounts the card with its own rows and places it from that\n * geometry; the skin's container lands a frame later and the card grows, and\n * the host re-places it a frame after that. Revealing on the mount frame\n * fades the card in at a height and a place it is about to leave — it appears\n * low and jumps up mid-fade — so features/account/account-footer.css holds it\n * inside the armed window until this marker lands, and the entry animation\n * hangs on this marker.\n */\nexport const ACCOUNT_READY_ATTR = 'data-dsh-claude-account-ready'\n/**\n * Stamped on the host's shared menu card while it is the hero row's picker\n * (the workspace chip or the agent-preset seat opened it). The host portals\n * that card to <body> with no marker of its own, so the stylesheet cannot\n * tell it from the host's other menus; packages/client/src/features/hero-menu/hero-menu.ts stamps it\n * and features/hero-menu/hero-menu.css switches on this attribute.\n */\nexport const HERO_MENU_ATTR = 'data-dsh-claude-hero-menu'\n/**\n * Present while the browser window does NOT hold focus.\n *\n * The window's focus state is the only thing that separates the two text\n * selection paints (gray on black unfocused, blue on white focused), and no\n * selector can read it — so packages/client/src/features/selection/selection.ts mirrors it onto the\n * document and the stylesheet switches on this attribute.\n */\nexport const WINDOW_BLUR_ATTR = 'data-dsh-window-blur'\n/**\n * The handoff marker: stamped on `body` while this build is live AND able\n * to give the page back (D49). Its presence is a capability another\n * package can read without running anything: a skin that lists this theme\n * as one of its looks has to know the page can come back, and a build from\n * before D49 does not stamp it.\n */\nexport const HANDOFF_ATTR = 'data-dsh-claude-style-handoff'\n/**\n * The document attribute the skin center stamps while a skin is painting\n * (D49). It is read at boot and watched afterwards: the value is the skin\n * id, and the presence means the page belongs to a skin.\n */\nexport const SKIN_STAMP_ATTR = 'data-dsh-skin'\n/**\n * On the host's scroller around the settings page while the page is\n * mounted (packages/client/src/features/settings/settings.ts): the stylesheet keeps the\n * scrollbar's room there, so switching tabs never shifts the layout.\n */\nexport const SETTINGS_SCROLLER_ATTR = 'data-dsh-claude-settings-scroller'\n/**\n * Which home layout is in force. The stylesheet branches on it, and the two\n * layouts differ only in arrangement — the hero's own markup is the host's\n * either way, so the switch is one attribute plus the panel registration.\n */\nexport const HOME_LAYOUT_ATTR = 'data-dsh-claude-home-layout'\n/**\n * Present while the studio layout owns the page shown: the studio layout is\n * in force and the page is the new-conversation hero. Every studio rule keys\n * on it, so the host's hero-phase marker is read once per pass in JS rather\n * than repeated across the stylesheet.\n */\nexport const HOME_HERO_ATTR = 'data-dsh-claude-home-hero'\n/**\n * How the right sidebar's docked panels are drawn: `card` floats each one 8px\n * inside the column with a hairline, a 16px radius and the host's elevation\n * (packages/client/src/theme/chrome.css), while `flush` fills the column and\n * hugs its edges. The choice rides <body> as DOCK_LOOK_ATTR, and every rule\n * that draws a card is gated on the `card` value, so the flush state is the\n * host's own panel look.\n */\nexport const DOCK_LOOK_CARD = 'card'\nexport const DOCK_LOOK_FLUSH = 'flush'\nexport const DOCK_LOOK_ATTR = 'data-dsh-claude-dock-look'\n\n/**\n * The host half's private routes, under this half's own names. The paths are\n * the shared contract (packages/contracts/src/routes.ts, D46), declared once\n * for both halves.\n */\nexport {\n HDSL_PATH as HDSL_ROUTE,\n HDSL_SKIN_PATH as HDSL_SKIN_ROUTE,\n PEAKRATE_PATH as PEAKRATE_ROUTE,\n SESSION_DELETE_PATH as SESSION_DELETE_ROUTE,\n SESSION_SEARCH_PATH as SESSION_SEARCH_ROUTE,\n USAGE_PATH as USAGE_ROUTE,\n USERNAME_PATH as USERNAME_ROUTE,\n} from '@dsh-claude-style/contracts/routes'\n/**\n * Home-page layouts. `classic` is the centered hero the skin has always\n * drawn; `studio` is the dashboard form: the greeting sits at the top left,\n * the composer hugs the window's bottom edge, and the usage panel fills the\n * space between them. Studio is the default: it is Claude Code's own home.\n */\nexport const HOME_LAYOUT_CLASSIC = 'classic'\nexport const HOME_LAYOUT_STUDIO = 'studio'\nexport const HOME_LAYOUTS = [HOME_LAYOUT_CLASSIC, HOME_LAYOUT_STUDIO]\n/** Composer surfaces the restyle may cover, in settings order. */\nexport const COMPOSER_SCOPE_ALL = 'all'\nexport const COMPOSER_SCOPES = ['off', 'hero', 'conversation', COMPOSER_SCOPE_ALL]\n/**\n * How eagerly the skin's popovers open on hover: `off` is click-only,\n * `account` auto-opens the sidebar account popover alone, and `all` adds the\n * permission, model, session-stats and the host's two hero-row pickers.\n */\nexport const AUTO_POPOVER_OFF = 'off'\nexport const AUTO_POPOVER_ACCOUNT = 'account'\nexport const AUTO_POPOVER_ALL = 'all'\nexport const AUTO_POPOVER_SCOPES = [AUTO_POPOVER_OFF, AUTO_POPOVER_ACCOUNT, AUTO_POPOVER_ALL]\n\n/**\n * The preference shape the browser half reads: one field per key of the shared\n * defaults table, whose values hold until the settings form answers. A boolean\n * preference is on unless stored as an explicit `false`.\n */\nexport interface Prefs {\n brand: string\n motion: string\n collapseFooter: boolean\n autoPopover: string\n composerScope: string\n modelPicker: boolean\n peakrate: boolean\n quickProviders: string[]\n username: string\n banLocale: string\n homeLayout: string\n palette: string\n typeface: string\n mascot: string\n mascotScope: string\n caretMotion: string\n permissionsControl: boolean\n statsPosition: string\n workspaceView: boolean\n dockCards: boolean\n sidebarSearch: boolean\n searchStyle: string\n sidebarLayout: string\n turnNav: boolean\n viewTabs: boolean\n headerBand: boolean\n chatAnimations: boolean\n}\n\n/** Every preference's shipped default, from the table both halves share (packages/contracts/src/prefs.ts, D46). */\nexport const PREF_DEFAULTS: Prefs = PREFS_DEFAULT\n\n/** The preferences whose value is one of a fixed set; any other stored value reads as the default. */\nexport const PREF_CHOICES: Partial<Record<keyof Prefs, string[]>> = {\n motion: MOTION_MODES,\n composerScope: COMPOSER_SCOPES,\n banLocale: BAN_LOCALES,\n homeLayout: HOME_LAYOUTS,\n palette: PALETTES,\n typeface: TYPEFACES,\n mascot: MASCOTS,\n mascotScope: MASCOT_SCOPES,\n searchStyle: SEARCH_STYLES,\n sidebarLayout: SIDEBAR_LAYOUTS,\n caretMotion: CARET_MOTIONS,\n statsPosition: STATS_POSITIONS,\n}\n/** Longest accepted custom username; core/prefs.ts trims the stored value to it. */\nexport const USERNAME_MAX = 64\n/** Most quick-provider ids kept, and the longest id accepted; core/prefs.ts clamps to both. */\nexport const QUICK_PROVIDERS_MAX = 64\nexport const PROVIDER_ID_MAX = 128\n", "/**\n * The preference defaults, shared by both halves (D46): the host half's Config\n * is generated from this table (packages/host/src/settings.ts, D60) and the\n * browser half reads it as the value each preference holds until the settings\n * form answers.\n */\nexport const PREFS_DEFAULT = Object.freeze({\n brand: 'claude',\n motion: 'system',\n collapseFooter: true,\n autoPopover: 'all',\n composerScope: 'all',\n modelPicker: true,\n peakrate: true,\n quickProviders: [],\n username: '',\n banLocale: 'en',\n homeLayout: 'studio',\n palette: 'claude',\n typeface: 'claude',\n mascot: 'brand',\n mascotScope: 'all',\n permissionsControl: true,\n statsPosition: 'context',\n workspaceView: true,\n dockCards: true,\n sidebarSearch: true,\n searchStyle: 'overlay',\n sidebarLayout: 'relaxed',\n turnNav: true,\n viewTabs: true,\n headerBand: true,\n chatAnimations: true,\n caretMotion: 'typing',\n})\n\n", "/**\n * The plugin's private route names, shared by both halves (D46): the host half\n * registers them under this prefix and the browser half addresses them, so\n * every path is declared once.\n */\n\n/** Route prefix this plugin owns. */\nexport const ROUTE_PREFIX = '/dsh-claude-style'\n\n/** One-shot host OS user route; the browser half caches the response and never polls. */\nexport const USERNAME_PATH = `${ROUTE_PREFIX}/username`\n\n/**\n * The HDSL launcher's account metadata. The browser half cannot read a process\n * environment, so the `HDSL_`-prefixed variables the launcher publishes are\n * forwarded from here; the player's avatar bytes ride HDSL_SKIN_PATH.\n */\nexport const HDSL_PATH = `${ROUTE_PREFIX}/hdsl`\n\n/** The player's own avatar PNG, forwarded; the absolute path never leaves the host half. */\nexport const HDSL_SKIN_PATH = `${ROUTE_PREFIX}/hdsl-skin.png`\n\n/**\n * Session deletion. The harness gives the browser half no deletion API of its\n * own, so the archived row's delete button posts one session id here and the\n * host half removes the stored session directory and drops the id from the\n * workspace registry's archive set.\n */\nexport const SESSION_DELETE_PATH = `${ROUTE_PREFIX}/session-delete`\n\n/**\n * Cross-session usage roll-up for the home dashboard: the browser half cannot\n * reach the host's `sessionQuery` service or read the cost-meter ledger, so the\n * day buckets are assembled on the host half and handed over as one small JSON\n * document.\n */\nexport const USAGE_PATH = `${ROUTE_PREFIX}/usage`\n\n/**\n * Message-content search for the search palette; `?q=` is the query, and\n * without one the route only brings its message cache up to date.\n */\nexport const SESSION_SEARCH_PATH = `${ROUTE_PREFIX}/session-search`\n\n/**\n * The model peak / off-peak catalog the host half keeps. `GET` answers the\n * document it holds; `POST` makes it fetch the source first, so the browser\n * half can ask for a fresh copy without knowing the source's address.\n */\nexport const PEAKRATE_PATH = `${ROUTE_PREFIX}/peakrate`\n", "import { HDSL_ROUTE, HDSL_SKIN_ROUTE, USERNAME_MAX, USERNAME_ROUTE } from '../constants'\nimport { CHAT_FLOW_SELECTOR, COMPOSER_CARD_SELECTOR, COMPOSER_INPUT_SELECTOR, COMPOSER_PLACEHOLDER_SELECTOR, COMPOSER_SELECTOR, COMPOSER_STACK_SELECTOR, COMPOSER_STATS_SELECTOR, COMPOSER_STAT_SELECTOR, COMPOSER_VARIANT_ATTRIBUTE, CONVERSATION_SCROLL_SELECTOR, CONVERSATION_SESSION_ATTRIBUTE, CONVERSATION_SESSION_SELECTOR, FOOT_AREA_SELECTOR, PERMISSION_TRIGGER_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport type { HostAssistantStep, HostChatSnapshot, HostChatTarget, HostOutlineTurn, HostSession, HostSessionsService, HostTurn, HostUiConversationService, HostUiSessionService } from '@dsh-claude-style/contracts/services'\nimport { readPrefs } from './prefs'\nimport { closestFrom } from '../shared/dom'\nimport { createHostResource } from '../shared/resource'\n\n/**\n * The host's client context (cordis), handed to `apply` and to every feature.\n * Services come by name; their shapes are the host's own and stay untyped\n * here until the contract module types them (D44).\n */\nexport interface HostContext {\n /** The loader's fiber; its boot entry id names this plugin's settings namespace (D60). */\n readonly fiber?: { entry?: { id?: unknown } }\n /** A service by name, or undefined when the host carries none (D12). */\n get(name: string): HostValue\n /** Listen to a context event (`connection/reset`); the function it returns stops listening. */\n on?(name: string, listener: () => void): () => void\n /** Run `effect` now; the function it returns runs when the context is disposed. */\n effect(effect: () => () => void, label?: string): void\n /** Run `callback` in a scope once every named service exists; a host without it has no late services. */\n inject?(names: string[], callback: (scope: HostContext) => void): HostFiber\n}\n\n/**\n * A value read off a host service or snapshot: a session, a catalog group, a\n * chat node. Its shape is the host's own; the contract module types the ones\n * the skin reads by name (D44, `contracts/services.ts`).\n */\nexport type HostValue = any\n\n/** A host locale namespace's translate seat (`locale.bind(namespace)`): a key and its parameters to text. */\nexport type { HostText } from '@dsh-claude-style/contracts/services'\n\n/** The scope `inject` opened: disposing it runs the effects registered in it. */\nexport interface HostFiber {\n dispose(): void\n}\n\n/**\n * The host's access-mode trigger: the button its permission slot renders.\n * Every slot render site carries a `[data-slot=\"<key>\"]` wrapper (D19), and\n * the skin inserts its own buttons inside that wrapper, so those are skipped.\n */\nexport function findAccessTrigger() {\n return document.querySelector<HTMLButtonElement>(PERMISSION_TRIGGER_SELECTOR)\n}\n\n/** The sidebar footer, where the account row and the plugin footer entries live. */\nexport function findFootArea() {\n return document.querySelector<HTMLElement>(FOOT_AREA_SELECTOR)\n}\n\n/**\n * The host's composer card — the element the skin's composer rules hang on —\n * and the placeholder its editor draws. The card's variant is the skin's own\n * marking (D9); every reader goes through these, so the selectors live once.\n */\nconst COMPOSER_CARD = COMPOSER_CARD_SELECTOR\nconst COMPOSER_PLACEHOLDER = COMPOSER_PLACEHOLDER_SELECTOR\n\nexport function findComposerCards() {\n return document.querySelectorAll<HTMLElement>(COMPOSER_CARD)\n}\n\nexport function findComposerCard() {\n return document.querySelector<HTMLElement>(COMPOSER_CARD)\n}\n\n/** The composer card `node` sits in, or null; `variant` narrows it to one variant. */\nexport function closestComposerCard(node: EventTarget | null | undefined, variant?: string) {\n if (variant === undefined) return closestFrom(node, COMPOSER_CARD)\n return closestFrom(node, `${COMPOSER_CARD}[${COMPOSER_VARIANT_ATTRIBUTE}=\"${variant}\"]`)\n}\n\nexport function findComposerPlaceholders() {\n return document.querySelectorAll<HTMLElement>(COMPOSER_PLACEHOLDER)\n}\n\nexport function findComposerPlaceholder(card: Element) {\n return card.querySelector<HTMLElement>(COMPOSER_PLACEHOLDER)\n}\n\n/**\n * The host's statistics in the composer stack: the container an older client\n * marked around them, else the element the marked figures share. Null when the\n * host draws none, which every reader tolerates.\n */\nexport function findComposerStats() {\n const bar = document.querySelector<HTMLElement>(COMPOSER_STATS_SELECTOR)\n if (bar !== null) return bar\n const figure = document.querySelector<HTMLElement>(COMPOSER_STAT_SELECTOR)\n return figure === null ? null : figure.parentElement\n}\n\n/** The editable draft inside `scope`: the element the caret and the send flight read. */\nexport function findComposerInput(scope: ParentNode = document) {\n return scope.querySelector<HTMLElement>(COMPOSER_INPUT_SELECTOR)\n}\n\n/**\n * The composer seat around `scope`: a pointer or key inside it is the reader\n * typing, which the scroll owner reads as intent that is not a scroll (D41).\n */\nexport function findComposerSeat(scope: ParentNode = document) {\n return scope.querySelector<HTMLElement>(COMPOSER_SELECTOR)\n}\n\n/** The session scroller: the element the host hangs its own follow off (D41). */\nexport function findConversationScroller() {\n return document.querySelector<HTMLElement>(CONVERSATION_SCROLL_SELECTOR)\n}\n\n/** The chat columns on the page: the root every chat-area behaviour scopes to. */\nexport function findChatFlows() {\n return document.querySelectorAll<HTMLElement>(CHAT_FLOW_SELECTOR)\n}\n\n/** The shown conversation: the element carrying its session id, and the id itself. */\nconst CONVERSATION_SESSION_ATTR = CONVERSATION_SESSION_ATTRIBUTE\nconst CONVERSATION_SESSION = `[${CONVERSATION_SESSION_ATTR}]`\n\nexport function findConversationSession() {\n return document.querySelector<HTMLElement>(CONVERSATION_SESSION_SELECTOR)\n}\n\nexport function closestConversationSession(node: EventTarget | null | undefined) {\n return closestFrom(node, CONVERSATION_SESSION)\n}\n\n/** The session id `host` carries, or null when it carries none. */\nexport function conversationSessionId(host: Element | null | undefined) {\n if (host === null || host === undefined) return null\n const id = host.getAttribute(CONVERSATION_SESSION_ATTR)\n return typeof id === 'string' ? id : null\n}\n\n/**\n * The host's composer stack (ui-conversation's `.composerStack`): the composer\n * card with the cards stacked above it, and on the new-session page the hero\n * around them.\n */\nexport const COMPOSER_STACK = COMPOSER_STACK_SELECTOR\n\n/**\n * The selected session id. dsh 0.2 moved it off the list snapshot onto the\n * `uiSession` service; the legacy `list.current` is read as a fallback so\n * older hosts keep working.\n */\nexport function currentSessionId(ctx: HostContext, sessions: HostSessionsService): string | null | undefined {\n const uiSession = ctx.get('uiSession') as HostUiSessionService | undefined\n const value = uiSession?.current?.value\n if (typeof value?.key === 'string') return value.key\n return sessions.list.getSnapshot().current\n}\n\nexport function currentSession(ctx: HostContext): HostSession | null {\n const sessions = ctx.get('sessions') as HostSessionsService | undefined\n if (sessions === undefined || sessions === null) return null\n const id = currentSessionId(ctx, sessions)\n if (id === undefined || id === null) return null\n const binding = sessions.binding(id)\n if (binding === undefined || binding === null) return null\n return binding.session === undefined ? null : binding.session\n}\n\n/**\n * One session's chat target (ui-chat's `chat` target of uiConversation): the\n * loaded window's nodes, turns and turn navigation, as the host's own chat\n * view reads them. The host builds the target only for a subscriber or while\n * the shell shows that session's chat view, so a bare read on the trajectory\n * view sees nothing.\n */\nexport function findChatTarget(ctx: HostContext, sessionId: string): HostChatTarget | null {\n const conversation = ctx.get('uiConversation') as HostUiConversationService | undefined\n const sessions = ctx.get('sessions') as HostSessionsService | undefined\n if (!conversation || !sessions?.binding(sessionId)) return null\n return conversation.binding(sessionId).target('chat') ?? null\n}\n\n/**\n * What an open turn is doing, read off the host's chat snapshot: its newest\n * step's assistant output while that streams (`newest` is the kind of its\n * newest block, null before the first), else `{ kind: 'tools' }` while one of\n * the turn's tool calls runs, else null — the turn waits on the model.\n */\nexport function readTurnActivity(snapshot: HostChatSnapshot, turn: HostTurn): TurnActivity | null {\n const step = turn.steps.length === 0 ? undefined : turn.steps[turn.steps.length - 1]\n const assistant = step === undefined ? undefined : step.data.get('assistant-step')\n if (assistant !== undefined && assistant.status === 'running') {\n const blocks = assistant.blocks\n return { kind: 'assistant', assistant, newest: blocks.length === 0 ? null : blocks[blocks.length - 1].kind }\n }\n const calls = snapshot.legacy?.runningCalls ?? []\n for (let i = 0; i < calls.length; i++) {\n if (calls[i].turn === turn.turn) return { kind: 'tools' }\n }\n return null\n}\n\n/** What an open turn is doing (readTurnActivity). */\nexport type TurnActivity = { kind: 'assistant', assistant: HostAssistantStep, newest: string | null } | { kind: 'tools' }\n\nexport function currentPreset(session: HostSession): string | null {\n const snapshot = session.projections?.faceOf('permissions').getSnapshot()\n if (snapshot === undefined || snapshot === null) return null\n // dsh 0.2+ projection faces hand back the bare value; older hosts wrapped it.\n if (typeof snapshot === 'object' && 'currentValue' in snapshot) return (snapshot as { currentValue: string }).currentValue\n return typeof snapshot === 'string' ? snapshot : null\n}\n\n/**\n * One session's whole-log turn outline (the host's `turnOutline` projection):\n * `{ turn, seq, prompt, response }` per started turn, or undefined where the\n * assembly does not mount that projection. `seq` is the turn's `turn/start`\n * event, which is what the host's own jump pages history through (D34).\n */\nexport function sessionOutline(ctx: HostContext, sessionId: string): HostOutlineTurn[] | undefined {\n const face = ctx.get('sessions')?.binding(sessionId)?.session?.projections?.faceOf('turnOutline')\n return typeof face?.getSnapshot === 'function' ? face.getSnapshot() : undefined\n}\n\n/**\n * The turn holding one event seq: the latest outline entry at or before it. An\n * outline that does not reach that far answers null, and the caller leaves the\n * reading position where it is.\n */\nexport function turnForSeq(outline: HostOutlineTurn[] | undefined, seq: number): number | null {\n if (!Array.isArray(outline)) return null\n let found: number | null = null\n for (const entry of outline) {\n if (entry === null || typeof entry !== 'object') continue\n if (!Number.isSafeInteger(entry.turn) || !Number.isSafeInteger(entry.seq)) continue\n if (entry.seq > seq) continue\n if (found === null || entry.turn > found) found = entry.turn\n }\n return found\n}\n\n/**\n * The event seq a turn started at, off the same whole-log outline: what the\n * host's own jump pages history through when that turn is outside the loaded\n * window. An outline that does not hold the turn answers null.\n */\nexport function outlineSeq(outline: HostOutlineTurn[] | undefined, turn: number): number | null {\n if (!Array.isArray(outline)) return null\n for (const entry of outline) {\n if (entry === null || typeof entry !== 'object') continue\n if (entry.turn !== turn || !Number.isSafeInteger(entry.seq)) continue\n return entry.seq\n }\n return null\n}\n\n/**\n * Who the skin shows. Nickname: the custom nickname, the signed-in account's\n * name, the HDSL launcher's account name, the cached OS-user probe, the fresh\n * probe. Picture: the signed-in account's avatar, the HDSL launcher's avatar,\n * then nothing, which lets the brand mark show (D15).\n */\nexport let accountName = ''\nexport let accountAvatar = ''\n\n/** The account profile's contribution; called when its read answers. */\nexport function setAccountIdentity(name: unknown, avatar: unknown) {\n accountName = typeof name === 'string' ? name.trim() : ''\n accountAvatar = typeof avatar === 'string' ? avatar : ''\n}\n\n/**\n * The host half owns the OS user (`os.userInfo().username`); this side fetches\n * it once, caches it and mirrors the answer into local storage so a reload\n * shows the name from the first frame. No workspace parsing, no polling.\n */\nlet usernameFromHost = ''\n\n/** Last OS-user probe this browser saw; the cache that outlives the page. */\nconst PROBED_USERNAME_KEY = 'dsh-claude-style.probed-username'\nlet probedUsername = readStoredProbeUsername()\n\nfunction readStoredProbeUsername() {\n return localStorage.getItem(PROBED_USERNAME_KEY) || ''\n}\n\nfunction storeProbeUsername(value: string) {\n if (value) localStorage.setItem(PROBED_USERNAME_KEY, value)\n}\n\n/** The host half's OS user; an answer the contract does not carry is not adopted. */\nconst usernameResource = createHostResource(USERNAME_ROUTE, (data) => {\n if (!data || data.ok !== true || typeof data.username !== 'string') return undefined\n usernameFromHost = data.username.trim().slice(0, USERNAME_MAX)\n if (usernameFromHost) {\n probedUsername = usernameFromHost\n storeProbeUsername(usernameFromHost)\n }\n return usernameFromHost\n})\n\nexport function onUsernameLoaded(listener: (username: string) => void) {\n return usernameResource.onLoaded(listener)\n}\n\nexport function loadUsername() {\n usernameResource.load()\n}\n\nlet hdslContract = false\nlet hdslName = ''\nlet hdslAvatar = false\n\n/**\n * The HDSL launcher's account contract, when this instance was launched by it.\n * An answer that is no contract is not adopted, so the chain skips the\n * launcher (D15).\n */\nconst hdslResource = createHostResource(HDSL_ROUTE, (data) => {\n if (!data || data.ok !== true || data.contract !== true) return undefined\n hdslContract = true\n hdslName = typeof data.name === 'string' ? data.name.trim().slice(0, USERNAME_MAX) : ''\n hdslAvatar = data.hasSkinImage === true\n return true\n})\n\nexport function onHdslLoaded(listener: (adopted: true) => void) {\n return hdslResource.onLoaded(listener)\n}\n\nexport function loadHdsl() {\n hdslResource.load()\n}\n\n/** The nickname every skin surface shows, or '' when nothing resolved. */\nexport function resolveDisplayName() {\n const custom = readPrefs().username\n if (custom) return custom\n if (accountName) return accountName\n if (hdslName) return hdslName\n if (probedUsername) return probedUsername\n return usernameFromHost\n}\n\nexport function getUsername() {\n return resolveDisplayName() || 'User'\n}\n\n/** The picture every skin surface shows, or '' to let the brand mark show. */\nexport function resolveAvatarUrl() {\n if (accountAvatar) return accountAvatar\n if (hdslContract && hdslAvatar) return HDSL_SKIN_ROUTE\n return ''\n}\n\n/** Host context reference for services that read host state outside apply(ctx)'s call stack. */\nexport let hostCtx: HostContext | null = null\nexport function setHostContext(ctx: HostContext | null) {\n hostCtx = ctx\n // A new host context means a new OS user and a new launcher, so the next\n // apply resolves again. The probe cache survives on purpose: same machine.\n usernameResource.reset()\n usernameFromHost = ''\n hdslResource.reset()\n hdslContract = false\n hdslName = ''\n hdslAvatar = false\n accountName = ''\n accountAvatar = ''\n}\n", "/**\n * The DOM half of the host contract (D44): every selector or attribute the\n * host itself writes.\n *\n * The host's class names carry a build-time hash and change with every release,\n * so the skin keys on these instead; interface text changes with the language,\n * so it is never matched either (D3). What each literal means and what reads it\n * is the table in packages/contracts/src/table.ts; the build holds the two files\n * together, so a literal cannot appear here without an entry there.\n *\n * Everything here is a promise the host makes today and the skin relies on.\n * What the skin itself writes stays with the feature that writes it.\n */\n\n/* ---------- the chat area ---------- */\n\n/** One per flow block: a new block means this piece of the stream moved on. */\nexport const FLOW_BLOCK_SELECTOR = '[data-chat-flow-key]'\n/** The chat column. */\nexport const CHAT_FLOW_SELECTOR = '[data-chat-flow]'\n/**\n * One tool call's row. It lives inside the assistant block, so it does not\n * have to arrive as a new flow block of its own.\n */\nexport const CHAT_CALL_SELECTOR = '[data-chat-call-id]'\n/** One thinking row; its phase is its data-state attribute. */\nexport const THINK_ROW_SELECTOR = '[data-variant=\"think\"]'\n/**\n * The rendered reasoning text inside a thinking row, whatever the host's body\n * wrapper is called: the module slides it inside the window it gives that body.\n */\nexport const REASONING_TEXT_SELECTOR = '[data-markdown-variant]'\n/**\n * The phase of a row that has one: a thinking row, and a tool call's own view\n * (the page's own phase is `data-phase`, D44). The values are the host's —\n * `running` while that piece of work is under way.\n */\nexport const ROW_PHASE_ATTRIBUTE = 'data-state'\n/** The phase value while the model is still thinking, or a call is still running. */\nexport const RUNNING_STATE = 'running'\n/** The markdown layer marks the container with this while an assistant message streams. */\nexport const STREAMING_SELECTOR = '[data-streaming]'\n/** The same contract as an attribute name: the reveal watches it appearing and going. */\nexport const STREAMING_ATTRIBUTE = 'data-streaming'\n/**\n * TextShimmer's swept element: while it is attached, that piece of content\n * is still moving. Both names are read, because an older host build writes\n * the old one (data-text-shimmer).\n */\nexport const SHIMMER_ATTRIBUTE = 'data-shimmer'\nexport const SHIMMER_LEGACY_ATTRIBUTE = 'data-text-shimmer'\n/** The two shimmer attributes in selector form. */\nexport const SHIMMER_SELECTOR = `[${SHIMMER_ATTRIBUTE}], [${SHIMMER_LEGACY_ATTRIBUTE}]`\n/** The chat column's scroller; the host hangs its own follow off it. */\nexport const CONVERSATION_SCROLL_SELECTOR = '[data-conversation-scroll]'\n/** Present while the host's follow is on; its absence is how the follow reads as off. */\nexport const FOLLOWING_TAIL_ATTRIBUTE = 'data-chat-following-tail'\n/** The same contract in selector form. */\nexport const FOLLOWING_TAIL_SELECTOR = '[data-chat-following-tail]'\n/** How close to the end counts as reading the tail: the host's own threshold. */\nexport const FOLLOW_THRESHOLD_PX = 25\n/**\n * The live turn's status line — the host's \"deep diving\" row — mounted as the\n * chat flow's last row while the session runs, with its own label and its own\n * ticking clock.\n */\nexport const CHAT_RUNNING_SELECTOR = '[data-chat-running]'\n/** The composer area: a pointer or key inside it is the reader typing, not taking the scroll over. */\nexport const COMPOSER_SELECTOR = '[data-composer-seat]'\n/** The composer's editable surface (contenteditable); the caret motion is drawn for it. */\nexport const COMPOSER_INPUT_SELECTOR = '[data-composer-input]'\n/** The card the input sits in; the send flight lifts a copy of the whole card. */\nexport const COMPOSER_CARD_SELECTOR = '[data-composer-card]'\n/** The draft's own scroll area inside that card. */\nexport const COMPOSER_SCROLL_SELECTOR = '[data-input-scroll]'\n/** The echo bubble the host mounts the moment a submission goes through. */\nexport const SUBMISSION_ECHO_SELECTOR = '[data-submission-echo]'\n/**\n * A plain text box inside the composer seat: a question card's answer box\n * (under [data-question-key]) and a queued message's inline editor (under\n * [data-queue-dock]). Both are textareas, in the main session and in the\n * sidebar's subagent sessions alike.\n */\nexport const COMPOSER_TEXTAREA_SELECTOR = '[data-composer-seat] textarea'\n/** The host puts this on every process group. */\nexport const PROCESS_GROUP_SELECTOR = '[data-step-process]'\n/** The host puts this on every process group's body. */\nexport const PROCESS_BODY_SELECTOR = '[data-step-process-body]'\n/** The content layer inside a process group's body; that layer is the one that scrolls. */\nexport const PROCESS_CONTENT_SELECTOR = '[data-step-process-content]'\n/** On a process group's root while this tier does not cap the body (detailed, fully expanded). */\nexport const PROCESS_EXPANDED_MODE_ATTRIBUTE = 'data-group-expanded-mode'\n/** On every chat row: the turn the row belongs to. */\nexport const CHAT_TURN_ATTRIBUTE = 'data-chat-turn'\n/** On a settled user row; the submission hold keys on its arrival. */\nexport const USER_ROW_KIND = 'user'\n/** The kind attribute itself, whose values say what a flow row is. */\nexport const FLOW_KIND_ATTRIBUTE = 'data-chat-flow-kind'\n/** The kind of an assistant step's row: its thinking or its output. */\nexport const ASSISTANT_STEP_KIND = 'assistant-step'\n/** The kind of a tool call's row. */\nexport const TOOL_CALL_KIND = 'tool-call'\n/**\n * Which part of an assistant step a row holds: the host splits a step into its\n * thinking and its output and writes the part on the row.\n */\nexport const CHAT_GROUP_PART_ATTRIBUTE = 'data-chat-group-part'\n/** The part value of a step's thinking row. */\nexport const CHAT_GROUP_PART_REASONING = 'reasoning'\n/**\n * The words of a process group's header: the one child of the control the host\n * does not mark decorative (its icon and chevron sit in an aria-hidden span).\n */\nexport const PROCESS_HEADER_LABEL_SELECTOR = ':scope > :not([aria-hidden=\"true\"])'\n/**\n * The words of the live turn's running row: the child of its content span that\n * is not the decorative whale; the row's other spans hold no elements.\n */\nexport const CHAT_RUNNING_TEXT_SELECTOR = ':scope > span > :not([aria-hidden=\"true\"])'\n/**\n * The turn rail (ui-chat's TurnNavigator): a nav at the conversation's\n * right edge with one mark per turn, absent below two turns and hidden\n * when the conversation is narrow. It is the one nav in the chat frame.\n */\nexport const TURN_RAIL_SELECTOR = `${CONVERSATION_SCROLL_SELECTOR} nav[class*=\"_frame\"]`\n/** The rail's own scroller, its first child: the marks scroll inside it. */\nexport const TURN_RAIL_SCROLLER_SELECTOR = ':scope > [class*=\"_scroller\"]'\n/**\n * One mark: a button carrying its position in the rail's list, not its\n * turn number. The rail renders only the marks near its scroll position.\n */\nexport const TURN_RAIL_MARK_SELECTOR = 'button[data-index]'\n/** The mark of the turn at the reading position. */\nexport const TURN_RAIL_CURRENT_SELECTOR = 'button[data-index][aria-current=\"true\"]'\n/**\n * The rail's fixed pitch and its inset at each end (TurnNavigator's\n * TURN_SPACING_PX and RAIL_INSET_PX): its scroller's content is\n * `count × pitch + 2 × (inset − pitch / 2)` pixels tall.\n */\nexport const TURN_RAIL_PITCH = 10\nexport const TURN_RAIL_INSET = 6\n/** A process group's header control. */\nexport const PROCESS_ACTIVITY_SELECTOR = 'button[data-process-activity]'\n/** A fold: the host's DisclosureRow, and every other control that opens and closes something. */\nexport const DISCLOSURE_ROW_SELECTOR = '[data-disclosure-row]'\n/**\n * On a row the host lets the reader open and fold: present while it stands\n * open. A thinking row is folded when this is absent.\n */\nexport const EXPANDED_ATTRIBUTE = 'data-expanded'\nexport const FOLD_TOGGLE_SELECTOR = '[aria-expanded]'\n/** Controls whose opening is skipped whole: a turn's header and its trigger notice. */\nexport const FOLD_SKIPPED_CONTROL_SELECTOR = '[data-turn-process], [data-turn-trigger]'\n\n/* ---------- the frame around the chat ---------- */\n\n/** The shown conversation column, and the session id it carries. */\nexport const CONVERSATION_SESSION_SELECTOR = '[data-phase=\"active\"] [data-conversation-session]'\nexport const CONVERSATION_SESSION_ATTRIBUTE = 'data-conversation-session'\n/** The page's own phase: `hero` before a session is chosen, `active` once one is shown. */\nexport const PHASE_ATTRIBUTE = 'data-phase'\n/** The composer card and the stack of cards above it. */\nexport const COMPOSER_STACK_SELECTOR = '[class*=\"_composerStack\"]'\n/** The placeholder the host's own editor draws inside the draft. */\nexport const COMPOSER_PLACEHOLDER_SELECTOR = '[data-composer-placeholder]'\n/**\n * The statistics in the composer stack. Both markers are read (D3), because an\n * older host build writes only the container; the context panel repeats the\n * figures (D27).\n */\nexport const COMPOSER_STATS_SELECTOR = '[data-composer-stats]'\nexport const COMPOSER_STAT_SELECTOR = '[data-composer-stat]'\n/**\n * The statistics strip a mobile plugin draws in the same band as the host's dock\n * (dsh-pocket marks its own strip `data-mobile-nav=\"stats\"`). It is not the\n * host's, so no rule in this package hides it: the composer pass measures it and\n * lifts the dock's line above the band it took.\n */\nexport const MOBILE_STATS_SELECTOR = '[data-mobile-nav=\"stats\"]'\n/**\n * The filled arc of the context meter: the circle the host gives a dash array\n * (its track circle carries none). The skin paints it with the colour the\n * occupancy fell on (D27).\n */\nexport const CONTEXT_METER_FILL_SELECTOR = '[data-dsh-claude-context-meter] circle[stroke-dasharray]'\n/** The composer variant the host puts on the card (`hero` / `default`). */\nexport const COMPOSER_VARIANT_ATTRIBUTE = 'data-composer-variant'\n/** The host's own access-mode trigger inside its permission slot, skipping the skin's buttons. */\nexport const PERMISSION_TRIGGER_SELECTOR = '[data-slot=\"conversation.input.permission\"] button:not([class*=\"dsh-claude\"])'\n/** A host button that opens a dialog: the model and effort pickers in the composer stack. */\nexport const DIALOG_TRIGGER_SELECTOR = 'button[aria-haspopup=\"dialog\"]'\n/** The sidebar footer block; the skin's account entry lives inside it. */\nexport const FOOT_AREA_SELECTOR = '[class*=\"footArea\"]'\n/**\n * The host's own sidebar search: a button and an input in the workspace\n * section's header. The skin's box stands in for it, and the `icon` style\n * leaves the host's button in place with its click taken over, so both read\n * this slot.\n */\nexport const SIDEBAR_SEARCH_SLOT_SELECTOR = '[data-slot=\"sidebar\"] [class*=\"_searchSlot\"]'\n/** The host's own composer is replaced by a panel of its own choice; this is that panel's seat. */\nexport const CHAIN_OVERLAY_FALLBACK_ATTRIBUTE = 'data-chain-overlay-fallback'\n/** The host's own open menus and modal dialogs: the foreground the skin must not walk over. */\nexport const FOREGROUND_SELECTOR = '[role=\"dialog\"][aria-modal=\"true\"], [role=\"menu\"]'\n/** The host's menu card and its list, which the skin injects a row into. */\nexport const MENU_ROLE_SELECTOR = '[role=\"menu\"]'\nexport const MENU_LIST_SELECTOR = '[role=\"presentation\"]'\n/** The host's account trigger in the sidebar footer. */\nexport const ACCOUNT_TRIGGER_SELECTOR = '[aria-haspopup=\"menu\"][data-signed-out]'\n/** The host's settings button in the footer. */\nexport const SETTINGS_BUTTON_SELECTOR = '[class*=\"settingsArea\"] button[aria-haspopup=\"dialog\"]'\n/** The sidebar's action list, whose entries the skin mirrors into its drawer. */\nexport const FOOTER_ACTIONS_SELECTOR = '[class*=\"footerActions\"]'\n/** A slot anchor; its children are the host's real entries. */\nexport const SLOT_ANCHOR_SELECTOR = '[data-slot]'\n\n/* ---------- the conversation header's own row ---------- */\n\n/**\n * The header's title row: the line the title cluster, the utilities and the\n * corner seat share. The band placement measures against it, because the\n * title's own box moves with the placement. Rows of the same shape sit in the\n * sidebar's panels, so a reader takes the one carrying a title or the\n * utilities rather than the first match.\n */\nexport const HEADER_TITLE_ROW_SELECTOR = '[class*=\"titleRow\"]'\n/**\n * The session title's breadcrumb nav: the words themselves, not the flex\n * cluster that lays them out (the cluster stretches, so it says nothing about\n * where the title ends).\n */\nexport const HEADER_TITLE_SELECTOR = '[class*=\"_crumbs\"]'\n/** The header's utilities cluster: the workspace opener, the overflow menu, the bottom-panel toggle. */\nexport const HEADER_UTILITIES_SELECTOR = '[class*=\"headerUtilities\"]'\n/** The corner seat beside the utilities, carrying the right-sidebar toggle. */\nexport const HEADER_CORNER_SELECTOR = '[class*=\"headerCorner\"]'\n/**\n * The conversation header itself, resolved with `closest` from the title row:\n * the same substring names a dozen other bars (the sidebar's action row, the\n * background-task chip), so it is never queried document-wide.\n */\nexport const CONVERSATION_HEADER_SELECTOR = '[class*=\"_header\"]'\n/** The view-tab strip inside the header, whose box the band placement keeps clear of. */\nexport const VIEW_TABS_STRIP_SELECTOR = '[class*=\"_tabs\"]'\n\n/* ---------- the document, the shell and the browser API ---------- */\n\n/** The shell's window marks: the Windows caption row, the platform, and fullscreen. */\nexport const WINDOWS_TITLEBAR_ATTRIBUTE = 'data-windows-titlebar'\n/**\n * The desktop shell's own seat in the Windows caption row, where its native\n * menu is drawn: the row's content starts to the right of it.\n */\nexport const WINDOWS_MENU_SELECTOR = '[data-windows-menu]'\nexport const PLATFORM_ATTRIBUTE = 'data-platform'\nexport const FULLSCREEN_ATTRIBUTE = 'data-fullscreen'\n/** The host's declared caption-strip height, as a custom property on the document element. */\nexport const FRAME_TOP_CLEARANCE_PROPERTY = '--dsh-frame-top-clearance'\n/** The skin center's stamp on the document element: another skin owns the page (D49). */\nexport const SKIN_CENTER_ATTRIBUTE = 'data-dsh-skin'\n/** The host's own light/dark flip, written on `<body>`. */\nexport const DARK_THEME_ATTRIBUTE = 'data-ds-dark-theme'\n/** A sibling plugin's stylesheet in `<head>`, read to tell that plugin is on the page. */\nexport const PEER_SHEET_SELECTOR = 'style[data-plugin-css=\"dsh-plugin-msg-nav/style.css\"]'\n/** Every untagged stylesheet in `<head>`: the host's claim sweep would otherwise take a sibling's. */\nexport const UNTAGGED_SHEET_SELECTOR = 'style:not([data-plugin])'\n", "import { AUTO_POPOVER_ALL, AUTO_POPOVER_OFF, AUTO_POPOVER_SCOPES, BRAND_ATTR, BRAND_CLAUDE, BRAND_DEEPSEEK, BRAND_DEEPSEEK_LEGACY, CHAT_ANIMATIONS_OFF, COMPOSER_ATTR, DOCK_LOOK_ATTR, DOCK_LOOK_CARD, DOCK_LOOK_FLUSH, FOOTER_ATTR, MASCOT_ATTR, MASCOT_BRAND, MASCOT_CRAB, MASCOT_DEEPY, MOTION_ATTR, MOTION_FULL, MOTION_REDUCED, PACKAGE_NAME, PALETTE_ATTR, PREF_CHOICES, PREF_DEFAULTS, PROVIDER_ID_MAX, QUICK_PROVIDERS_MAX, SEARCH_STYLE_ATTR, SETTINGS_ENTRY_FALLBACK, SIDEBAR_LAYOUT_ATTR, STATS_POSITION_ATTR, TYPEFACE_ATTR, USERNAME_MAX } from '../constants'\nimport { MODEL_OFFICIAL_GROUP } from '../features/model/copy-fallbacks'\nimport type { Prefs } from '../constants'\nimport type { HostContext } from './host'\nimport type { HostConfigForm, HostConfigFormsService, HostRemoteSettings, HostSettingsDescribeAnswer } from '@dsh-claude-style/contracts/services'\nimport { notifyAll } from '../shared/notify'\nimport { externalOwnerActive } from '../shared/visual-owner'\n\n/**\n * Skin preferences: the host settings namespace is the store, and every\n * value is mirrored onto the document as an attribute so the stylesheet\n * decides what it means (D60, D11). Until the first read settles — and if\n * it fails — PREF_DEFAULTS holds.\n */\nexport let prefs = normalizePrefs({})\nconst prefsListeners: ((prefs: Prefs) => void)[] = []\n\n/** The official settings form (the host's form controller, D60); null until the service serves the namespace. */\nlet prefsForm: HostConfigForm | null = null\n/** Disposer for the bound form's own change subscription. */\nlet prefsFormUnsubscribe: (() => void) | null = null\n/** Disposer for the served-namespace directory watch, while one is open. */\nlet prefsWatchOff: (() => void) | null = null\n/** Whether the served-namespace directory is already being watched. */\nlet prefsBinding = false\n/** Disposers for the document reads a non-loopback page follows (D60); empty on a loopback page. */\nlet remoteReadOffs: (() => void)[] = []\n/** Whether this page reads the host's settings document without a form to write through (D60). */\nlet prefsReadOnly = false\n\n/** Namespaces to try, best first: loader entry id, package name, inserted id. */\nfunction settingsNamespaceCandidates(ctx: HostContext) {\n // The dynamic façade can hide the fiber; the other two candidates remain.\n const id = ctx?.fiber?.entry?.id\n const entryId = typeof id === 'string' && id !== '' ? id.slice(id.lastIndexOf(':') + 1) : null\n return [entryId, PACKAGE_NAME, SETTINGS_ENTRY_FALLBACK]\n}\n\n/**\n * The namespace the host actually serves, picked from the candidates.\n *\n * The loader mints a random id for each boot entry, so asking for our own\n * entry id hands back a controller for nobody's namespace: reads stay at the\n * defaults and every write is refused. The served list is the truth.\n */\nfunction servedNamespace<Served extends { ns?: unknown }>(namespaces: Served[] | undefined, candidates: (string | null)[]) {\n if (!namespaces) return null\n for (const candidate of candidates) {\n if (typeof candidate !== 'string' || candidate === '') continue\n const served = namespaces.find((entry) => entry?.ns === candidate)\n if (served !== undefined) return { namespace: candidate, served }\n }\n return null\n}\n\n/** Whether the host serves namespaces to the browser. */\nfunction hostConfigForms(ctx: HostContext | null): HostConfigFormsService | null {\n const forms = ctx?.get('configForms')\n return typeof forms?.get === 'function' ? forms : null\n}\n\n/** The form's current field values, or null while it is not ready. */\nfunction readFormValue(): Record<string, unknown> | null {\n const snapshot = prefsForm?.getSnapshot()\n if (snapshot?.status !== 'ready') return null\n return snapshot.value && typeof snapshot.value === 'object' ? snapshot.value as Record<string, unknown> : null\n}\n\n/** Bind one namespace the host already serves; the controller waits for its own snapshot. */\nfunction bindServedForm(forms: HostConfigFormsService, ctx: HostContext) {\n const match = servedNamespace(forms.describe?.()?.getSnapshot?.()?.view?.namespaces, settingsNamespaceCandidates(ctx))\n if (match === null) return false\n const form = forms.get(match.namespace)\n if (typeof form?.getSnapshot !== 'function') return false\n prefsForm = form\n // A form without a subscribe face leaves the reads on demand.\n if (typeof form.subscribe === 'function') prefsFormUnsubscribe = form.subscribe(loadPrefs)\n return true\n}\n\n/**\n * Watch the served-namespace directory until this plugin's namespace lands:\n * on a cold page the directory can answer after this plugin has applied.\n */\nfunction watchNamespace(forms: HostConfigFormsService, ctx: HostContext) {\n if (prefsBinding) return\n const mirror = forms.describe?.()\n if (!mirror) return\n prefsBinding = true\n const attempt = () => {\n if (prefsForm === null && !bindServedForm(forms, ctx)) return\n if (prefsWatchOff !== null) {\n prefsWatchOff()\n prefsWatchOff = null\n }\n loadPrefs()\n }\n if (typeof mirror.subscribe === 'function') prefsWatchOff = mirror.subscribe(attempt)\n if (typeof mirror.ensure === 'function') mirror.ensure()\n attempt()\n}\n\n/**\n * Follow the settings document on a page whose form service never reads it\n * (D60): the host keeps a non-loopback page's settings in memory, but its own\n * remote still answers the read the form service is built on. Read again when\n * the document changes and after a reconnect, which can miss that event.\n */\nfunction followHostDocument(ctx: HostContext) {\n if (typeof ctx.inject !== 'function') return\n prefsReadOnly = true\n const candidates = settingsNamespaceCandidates(ctx)\n // The remote's namespaces are reachable only from a scope that injected them.\n const fiber = ctx.inject(['remote.settings'], scope => {\n const settings: HostRemoteSettings = scope.get('remote.settings')\n const read = () => {\n settings.describe().then((answer: HostSettingsDescribeAnswer) => {\n if (!prefsReadOnly) return\n if (answer.ok !== true) throw new Error(`dsh-claude-style: the settings document refused the read: ${answer.error?.message}`)\n const match = servedNamespace(answer.value?.namespaces, candidates)\n if (match === null) return\n adoptPrefs(normalizePrefs(match.served.value))\n })\n }\n scope.effect(() => {\n const offs = [scope.get('remote').$on('settings/document-updated', read)]\n if (typeof scope.on === 'function') offs.push(scope.on('connection/reset', read))\n read()\n return () => { for (const off of offs) off() }\n }, 'dsh-claude-style: settings document')\n })\n remoteReadOffs.push(() => fiber.dispose())\n}\n\n/**\n * Bind the official form. Called once per install, before the first read, and\n * again when the settings page installs — the service may mount after this\n * plugin. A namespace the host does not serve yet leaves `prefsForm` null and\n * the defaults in place, so this never blocks or fails the skin. A page the\n * host keeps its settings away from reads the document instead (D60).\n */\nexport function adoptSettingsForm(ctx: HostContext) {\n if (prefsForm === null && !prefsReadOnly) {\n const forms = hostConfigForms(ctx)\n if (forms === null) return false\n if (forms.describe?.()?.getSnapshot?.()?.status === 'unavailable') {\n followHostDocument(ctx)\n return false\n }\n if (!bindServedForm(forms, ctx)) watchNamespace(forms, ctx)\n }\n if (prefsForm === null) return false\n loadPrefs()\n return true\n}\n\n/**\n * Whether the preferences on show are the host's but this page cannot save\n * them: the host keeps a non-loopback page's settings to itself (D60).\n */\nexport function prefsAreReadOnly() {\n return prefsReadOnly\n}\n\n/** Release the form, directory and document subscriptions this module opened. */\nexport function disposePrefsBinding() {\n if (prefsFormUnsubscribe !== null) {\n prefsFormUnsubscribe()\n prefsFormUnsubscribe = null\n }\n if (prefsWatchOff !== null) {\n prefsWatchOff()\n prefsWatchOff = null\n }\n for (const off of remoteReadOffs) off()\n remoteReadOffs = []\n prefsReadOnly = false\n prefsBinding = false\n prefsForm = null\n}\n\n/**\n * Runtime overrides that outrank the stored preferences: a feature retired\n * after failing hands its surface back to the host, because both of these\n * HIDE host controls and a takeover whose replacement is gone would leave\n * nothing in their place.\n */\nlet footerTakeoverRetired = false\nexport let composerRestyleRetired = false\n\n/** Give the sidebar footer back to the host for the rest of this generation. */\nexport function retireFooterTakeover() {\n footerTakeoverRetired = true\n document.body.removeAttribute(FOOTER_ATTR)\n}\n\n/** Give the composer back to the host for the rest of this generation. */\nexport function retireComposerRestyle() {\n composerRestyleRetired = true\n document.body.removeAttribute(COMPOSER_ATTR)\n}\n\n/** The current preferences (live object; treat as read-only). */\nexport function readPrefs() {\n return prefs\n}\n\n/** Observe preference changes; returns the unsubscriber. */\nexport function subscribePrefs(listener: (prefs: Prefs) => void) {\n prefsListeners.push(listener)\n return () => {\n const index = prefsListeners.indexOf(listener)\n if (index !== -1) prefsListeners.splice(index, 1)\n }\n}\n\n/**\n * Adopt a preference set: mirror it onto the document, then notify. A page a\n * skin owns carries none of this theme's attributes (D49): the set is kept, and\n * taking the page back mirrors it (entry.ts). The form answers whenever it\n * answers, and the settings section installs whenever its chunk arrives (D39),\n * so a yielded page hears adoptions too.\n */\nexport function adoptPrefs(next: Prefs) {\n prefs = next\n if (!externalOwnerActive()) {\n document.body.setAttribute(BRAND_ATTR, next.brand)\n document.body.setAttribute(PALETTE_ATTR, next.palette)\n document.body.setAttribute(TYPEFACE_ATTR, next.typeface)\n document.body.setAttribute(MASCOT_ATTR, resolveMascot(next))\n document.body.setAttribute(DOCK_LOOK_ATTR, next.dockCards ? DOCK_LOOK_CARD : DOCK_LOOK_FLUSH)\n document.body.setAttribute(SEARCH_STYLE_ATTR, next.searchStyle)\n document.body.setAttribute(SIDEBAR_LAYOUT_ATTR, next.sidebarLayout)\n document.body.setAttribute(STATS_POSITION_ATTR, next.statsPosition)\n writeMotionAttribute(next.motion)\n document.body.toggleAttribute(FOOTER_ATTR, next.collapseFooter && !footerTakeoverRetired)\n }\n notifyAll(prefsListeners, next)\n}\n\n/** Take back every attribute adoptPrefs mirrors onto the document: the page goes back to the host (entry.ts). */\nexport function clearPrefsAttributes() {\n for (const name of [BRAND_ATTR, PALETTE_ATTR, TYPEFACE_ATTR, MASCOT_ATTR, DOCK_LOOK_ATTR, SEARCH_STYLE_ATTR, SIDEBAR_LAYOUT_ATTR, STATS_POSITION_ATTR, MOTION_ATTR, FOOTER_ATTR]) document.body.removeAttribute(name)\n}\n\n/** Whether the operating system asks for reduced motion right now. */\nfunction systemPrefersReducedMotion() {\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches\n}\n\n/**\n * Resolve the animation choice onto the document. Only the two answers the\n * rest of the plugin acts on reach the attribute: a stylesheet cannot rewrite\n * its own media queries, so \"always play\" has to be a value the rules test.\n */\nfunction writeMotionAttribute(mode: string) {\n const reduced = mode === MOTION_REDUCED || (mode !== MOTION_FULL && systemPrefersReducedMotion())\n document.body.setAttribute(MOTION_ATTR, reduced ? MOTION_REDUCED : MOTION_FULL)\n}\n\n/**\n * Re-resolve the current choice when the system's own setting flips. The\n * listeners hear about it only when the resolved answer really moved, because\n * features act on that answer rather than reading it lazily (D26).\n */\nexport function refreshMotionAttribute() {\n const before = document.body.getAttribute(MOTION_ATTR)\n writeMotionAttribute(prefs.motion)\n if (document.body.getAttribute(MOTION_ATTR) !== before) notifyAll(prefsListeners, prefs)\n}\n\n/**\n * Re-run everything that asked to hear about the environment without the\n * stored preferences having changed: the other chat plugin appearing or\n * leaving (packages/client/src/shared/peer-plugin.ts, D32).\n */\nexport function notifyEnvironmentChange() {\n notifyAll(prefsListeners, prefs)\n}\n\n/**\n * Whether the skin must hold its animations still, right now. The mascots ask\n * this instead of the media query, which cannot express \"always play\".\n */\nexport function motionReduced() {\n const resolved = document.body.getAttribute(MOTION_ATTR)\n if (resolved === MOTION_REDUCED) return true\n if (resolved === MOTION_FULL) return false\n return systemPrefersReducedMotion()\n}\n\n/**\n * Read the preferences from the form, once it carries values. The form's\n * subscription calls this on every host change; the binding calls it for\n * values that were ready before the subscription settled.\n */\nexport function loadPrefs() {\n const value = readFormValue()\n if (value === null) return\n adoptPrefs(normalizePrefs(value))\n moveLocalPrefs(value)\n}\n\n/** Clamp the hover-open preference; the earlier boolean shape still lands. */\nfunction normalizeAutoPopover(value: unknown) {\n if (value === true) return AUTO_POPOVER_ALL\n if (value === false) return AUTO_POPOVER_OFF\n return typeof value === 'string' && AUTO_POPOVER_SCOPES.includes(value) ? value : PREF_DEFAULTS.autoPopover\n}\n\n/**\n * The provider ids the picker's first level carries: ids rather than names, so\n * a catalog rename does not lose the stored selection. The official service is\n * the picker's default rather than a choice, so a stored id for it is dropped.\n */\nfunction normalizeQuickProviders(value: unknown) {\n if (!Array.isArray(value)) return []\n const out: string[] = []\n for (let i = 0; i < value.length && out.length < QUICK_PROVIDERS_MAX; i++) {\n const id = value[i]\n if (typeof id !== 'string' || id === '' || id.length > PROVIDER_ID_MAX) continue\n if (id === MODEL_OFFICIAL_GROUP || out.includes(id)) continue\n out.push(id)\n }\n return out\n}\n\n/** Clamp the brand; values stored by earlier builds under older names land on their choice. */\nfunction normalizeBrand(value: unknown) {\n if (value === BRAND_DEEPSEEK) return value\n return value === BRAND_DEEPSEEK_LEGACY ? BRAND_DEEPSEEK : BRAND_CLAUDE\n}\n\n/** The mascot actually on the page: `brand` resolves through the brand. */\nexport function resolveMascot(current: Prefs) {\n if (current.mascot !== MASCOT_BRAND) return current.mascot\n return current.brand === BRAND_DEEPSEEK ? MASCOT_DEEPY : MASCOT_CRAB\n}\n\n/**\n * Clamp the chat-area animation switch. A value an earlier build stored under\n * the retired choice reads as on, except the one that meant off; an unreadable\n * value reads as the default.\n */\nfunction normalizeChatAnimations(value: unknown) {\n if (typeof value === 'boolean') return value\n if (typeof value === 'string') return value !== CHAT_ANIMATIONS_OFF\n return PREF_DEFAULTS.chatAnimations\n}\n\n/**\n * Clamp one host value into the preference shape, field by field off\n * PREF_DEFAULTS: a boolean stays on unless stored as `false`, a choice outside\n * its set reads as its default, and the five fields with a shape of their own\n * have their own clamps.\n */\nexport function normalizePrefs(value: unknown): Prefs {\n const section: Record<string, unknown> = value && typeof value === 'object' ? value as Record<string, unknown> : {}\n const out: Record<string, unknown> = {}\n for (const key of Object.keys(PREF_DEFAULTS) as (keyof Prefs)[]) {\n const fallback = PREF_DEFAULTS[key]\n const choices = PREF_CHOICES[key]\n if (typeof fallback === 'boolean') out[key] = section[key] !== false\n else if (choices !== undefined) out[key] = typeof section[key] === 'string' && choices.includes(section[key]) ? section[key] : fallback\n }\n out.brand = normalizeBrand(section.brand)\n out.autoPopover = normalizeAutoPopover(section.autoPopover)\n out.chatAnimations = normalizeChatAnimations(section.chatAnimations)\n out.quickProviders = normalizeQuickProviders(section.quickProviders)\n out.username = typeof section.username === 'string' ? section.username.trim().slice(0, USERNAME_MAX) : ''\n // Every key of PREF_DEFAULTS is set above: the booleans and the choices in\n // the loop, the five shaped fields after it.\n return out as unknown as Prefs\n}\n\n/**\n * Values an earlier build kept in this browser's local storage, by preference:\n * the first time the form carries values, each field the form does not hold\n * yet is written through the form and the local copy dropped.\n */\nconst LOCAL_PREF_KEYS: Partial<Record<keyof Prefs, string>> = {\n username: 'dsh-claude-style.username',\n banLocale: 'dsh-claude-style.banLocale',\n}\nlet localPrefsMoved = false\n\nfunction moveLocalPrefs(formValue: Record<string, unknown>) {\n if (localPrefsMoved) return\n localPrefsMoved = true\n for (const [key, storageKey] of Object.entries(LOCAL_PREF_KEYS) as [keyof Prefs, string][]) {\n const stored = localStorage.getItem(storageKey)\n if (stored === null) continue\n const held = formValue[key] !== undefined && formValue[key] !== PREF_DEFAULTS[key]\n const choices = PREF_CHOICES[key]\n const unusable = stored === '' || stored === PREF_DEFAULTS[key] || (choices !== undefined && !choices.includes(stored))\n if (held || unusable) {\n localStorage.removeItem(storageKey)\n continue\n }\n savePrefs({ [key]: stored }).then(saved => {\n if (saved !== null && saved[key] === stored) localStorage.removeItem(storageKey)\n })\n }\n}\n\n/**\n * Write a partial preference change through the official form: one `set()` per\n * field, chained, because the controller owns the write queue and takes its\n * revision fence from the last settlement.\n *\n * @returns a promise for the resolved preferences, or null when the form does\n * not carry values yet or refused the change.\n */\nexport function savePrefs(patch: Partial<Prefs>): Promise<Prefs | null> {\n const form = prefsForm\n if (readFormValue() === null || form === null) return Promise.resolve(null)\n const step = (name: keyof Prefs) => (accepted: boolean): boolean | Promise<boolean> => {\n if (accepted === false) return false\n let pending\n try {\n pending = form.set(name, patch[name])\n } catch (error) {\n // set() refuses a field path this Config does not carry by throwing\n // before anything crosses the wire: a refusal, answered with a re-read\n // (D12).\n return false\n }\n if (typeof pending === 'boolean' || pending === undefined) return typeof pending === 'boolean' ? pending : true\n return pending.then((ok: unknown) => ok === true)\n }\n let run = Promise.resolve(true)\n for (const key of Object.keys(patch) as (keyof Prefs)[]) run = run.then(step(key))\n return run.then(accepted => {\n // Refused (a stale revision, or a field this Config does not carry):\n // re-read rather than guess.\n loadPrefs()\n return accepted === false ? null : prefs\n })\n}\n", "/**\n * Model picker copy.\n *\n * The copy itself is NOT here. It ships as `model-descriptions.json` beside\n * the bundle, and the browser half fetches it at runtime (the host half\n * serves it under MODEL_COPY_ROUTE), so the model table grows without a\n * rebuild and no copy enters the bundle. The language comes from the shell's\n * own `locale` service — one line per row, in the language the rest of the\n * UI is in — never two languages stacked.\n *\n * The constants below are the neutral fallbacks painted before that document\n * arrives, and kept if it never does. They are English because a failed\n * fetch has no locale to honour.\n */\nexport const MODEL_OFFICIAL_GROUP = 'deepseek-official'\nexport const MODEL_COPY_ROUTE = '/dsh-claude-style/model-descriptions.json'\nexport const MODEL_COPY_FALLBACK_LOCALE = 'en'\nexport const MODEL_FALLBACK_LABEL = 'Select model'\nexport const MODEL_LOADING_LABEL = 'Loading models…'\nexport const MODEL_EMPTY_LABEL = 'No models available.'\nexport const MODEL_EFFORT_LABEL = 'Reasoning effort'\nexport const MODEL_EFFORT_DEFAULT = 'Default'\n/** The effort slider's two ends. Kept in English in every locale: they name\n * the axis, not a level, and the level's own name rides beside the label. */\nexport const MODEL_EFFORT_FASTER = 'Faster'\nexport const MODEL_EFFORT_SMARTER = 'Smarter'\n/** What the slider reads when the model offers no levels at all. */\nexport const MODEL_EFFORT_NONE = '—'\nexport const MODEL_MORE_LABEL = 'More models'\nexport const MODEL_TRIGGER_LABEL = 'Select model, currently {model}'\n", "/**\n * Call every listener of one change, in registration order. A listener\n * that throws is reported (`reportError`: the console and the window's\n * error event) and the rest still hear the change — one broken subscriber\n * must neither stop the others nor vanish without a trace.\n *\n * @param listeners - the subscribers; copied first, so one that\n * unsubscribes while being called does not skip its neighbour, and asked\n * again before each call, so one an earlier listener unsubscribed in this\n * round (a feature torn down by the entry's switch) is not called.\n * @param args - what each listener is called with.\n */\nexport function notifyAll<Args extends unknown[]>(listeners: ((...args: Args) => void)[], ...args: Args) {\n for (const listener of listeners.slice()) {\n if (!listeners.includes(listener)) continue\n try {\n listener(...args)\n } catch (error) {\n reportError(error)\n }\n }\n}\n", "import { QUIET_ATTR } from '../constants'\n\n/**\n * The observation bus (D40): the page has one MutationObserver and one\n * ResizeObserver registry, and every feature subscribes through them.\n *\n * Mutations: each subscription names a target and the records it wants, in\n * MutationObserver's own terms. The one observer watches every subscribed\n * target with the union of their options, and each callback batch is routed\n * back: a subscription receives exactly the records its own options select,\n * in the order the subscriptions were made — the order separate observers\n * made in that order would have been called in. The observer is attached only\n * while a subscription exists, so the head is watched only while someone asks\n * (the other chat plugin's sheet, D33's foreign sheets).\n *\n * Sizes: one ResizeObserver for every element, and a second, `afterHost`,\n * made anew each time a subscription joins it. Resize callbacks run in the\n * order the observers were made, and the host makes its own when it mounts a\n * message column; a subscription made after the mount therefore runs after\n * the host's in the same frame (D32's follow takes the host's pin back\n * before it paints).\n */\n\nexport interface MutationOptions {\n childList?: boolean\n characterData?: boolean\n characterDataOldValue?: boolean\n /** Attribute changes; `attributeFilter` alone implies them, as MutationObserver has it. */\n attributes?: boolean\n attributeFilter?: string[]\n attributeOldValue?: boolean\n subtree?: boolean\n /** Leave out the skin's own quiet writes (QUIET_ATTR): they are no page change. */\n skipQuiet?: boolean\n}\n\ninterface MutationSubscription {\n target: Node\n options: MutationOptions\n callback: (records: MutationRecord[]) => void\n}\n\n/** Every mutation subscription, in the order they were made. */\nconst mutationSubscriptions: MutationSubscription[] = []\nlet mutationObserver: MutationObserver | null = null\n\n/**\n * Whether a record is one of the skin's own quiet writes: a change inside a\n * marked container, or only marked nodes added or removed.\n */\nfunction isQuietRecord(record: MutationRecord) {\n // The target is the node the change happened on: an element for a child\n // list or an attribute, and the text node itself for a character change —\n // which is why the parent is asked as well.\n const target = record.target instanceof Element ? record.target : record.target.parentElement\n if (target !== null && target.closest('[' + QUIET_ATTR + ']') !== null) return true\n if (record.addedNodes.length === 0 && record.removedNodes.length === 0) return false\n for (const node of record.addedNodes) {\n if (!(node instanceof Element) || !node.hasAttribute(QUIET_ATTR)) return false\n }\n for (const node of record.removedNodes) {\n if (!(node instanceof Element) || !node.hasAttribute(QUIET_ATTR)) return false\n }\n return true\n}\n\n/** The page-wide targets: a node detached in the batch still reports to them, as it would to their own observer. */\nfunction pageWide(target: Node) {\n return target === document || target === document.documentElement || target === document.body\n}\n\n/** Whether a subscription's own options select this record. */\nfunction selects(subscription: MutationSubscription, record: MutationRecord) {\n const options = subscription.options\n if (record.type === 'childList' && options.childList !== true) return false\n if (record.type === 'characterData' && options.characterData !== true) return false\n if (record.type === 'attributes') {\n const filter = options.attributeFilter\n if (options.attributes !== true && filter === undefined) return false\n if (filter !== undefined && !filter.includes(record.attributeName ?? '')) return false\n }\n const target = subscription.target\n if (record.target !== target) {\n if (options.subtree !== true) return false\n if (!target.contains(record.target) && !(pageWide(target) && !record.target.isConnected)) return false\n }\n return options.skipQuiet !== true || !isQuietRecord(record)\n}\n\nfunction routeRecords(records: MutationRecord[]) {\n for (const subscription of mutationSubscriptions.slice()) {\n // A subscription an earlier callback in this batch removed hears nothing more.\n if (!mutationSubscriptions.includes(subscription)) continue\n const selected = records.filter(record => selects(subscription, record))\n if (selected.length === 0) continue\n // One subscriber's error must neither stop the others nor vanish (D12).\n try { subscription.callback(selected) } catch (error) { reportError(error) }\n }\n}\n\n/** Attach the observer to every subscribed target with the union of their options. */\nfunction refreshMutationObserver() {\n const pending = mutationObserver?.takeRecords() ?? []\n mutationObserver?.disconnect()\n if (mutationSubscriptions.length === 0) {\n mutationObserver = null\n } else {\n if (mutationObserver === null) mutationObserver = new MutationObserver(routeRecords)\n const merged = new Map<Node, MutationObserverInit>()\n for (const { target, options } of mutationSubscriptions) {\n const into = merged.get(target) ?? {}\n if (options.childList === true) into.childList = true\n if (options.characterData === true) into.characterData = true\n if (options.characterDataOldValue === true) into.characterDataOldValue = true\n if (options.subtree === true) into.subtree = true\n if (options.attributeOldValue === true) into.attributeOldValue = true\n if (options.attributes === true && options.attributeFilter === undefined) {\n into.attributes = true\n into.attributeFilter = undefined\n merged.set(target, into)\n continue\n }\n if (options.attributeFilter !== undefined && !(into.attributes === true && into.attributeFilter === undefined)) {\n into.attributeFilter = [...new Set([...(into.attributeFilter ?? []), ...options.attributeFilter])]\n }\n merged.set(target, into)\n }\n for (const [target, init] of merged) {\n if (init.attributeFilter === undefined) delete init.attributeFilter\n mutationObserver.observe(target, init)\n }\n }\n // Records the old attachment had gathered still belong to their subscribers.\n if (pending.length > 0) queueMicrotask(() => routeRecords(pending))\n}\n\n/**\n * Hear the mutations under `target` that `options` select.\n * @returns unsubscribe.\n */\nexport function subscribeMutations(target: Node, options: MutationOptions, callback: (records: MutationRecord[]) => void) {\n const subscription = { target, options, callback }\n mutationSubscriptions.push(subscription)\n refreshMutationObserver()\n return () => {\n const at = mutationSubscriptions.indexOf(subscription)\n if (at === -1) return\n mutationSubscriptions.splice(at, 1)\n refreshMutationObserver()\n }\n}\n\n/** A size subscription: the elements it watches and what hears their entries. */\ninterface SizeSubscription {\n targets: Element[]\n callback: (entries: ResizeObserverEntry[]) => void\n}\n\n/** One resize observer, its subscriptions in the order they were made, and how many watch each element. */\ninterface SizeRegistry {\n observer: ResizeObserver | null\n subscriptions: SizeSubscription[]\n watchers: Map<Element, number>\n}\n\nconst early: SizeRegistry = { observer: null, subscriptions: [], watchers: new Map() }\nconst afterHost: SizeRegistry = { observer: null, subscriptions: [], watchers: new Map() }\n\n/** Each subscription hears its own elements' entries of a batch, once per batch, in subscription order. */\nfunction makeSizeObserver(registry: SizeRegistry) {\n return new ResizeObserver(entries => {\n for (const subscription of registry.subscriptions.slice()) {\n if (!registry.subscriptions.includes(subscription)) continue\n const own = entries.filter(entry => subscription.targets.includes(entry.target))\n if (own.length === 0) continue\n // A failing subscription must not keep the rest of the batch from hearing it (D12); reportError still surfaces the failure.\n try { subscription.callback(own) } catch (error) { reportError(error) }\n }\n })\n}\n\n/**\n * Hear the sizes of `targets`, one call per resize batch with their entries.\n * Like a ResizeObserver of its own, the subscription first hears the sizes as\n * they are now. `afterHost` places it after every resize observer the host\n * made before this call.\n * @returns unsubscribe.\n */\nexport function observeSize(targets: Element | Element[], callback: (entries: ResizeObserverEntry[]) => void, options?: { afterHost?: boolean }) {\n const registry = options?.afterHost === true ? afterHost : early\n const subscription = { targets: Array.isArray(targets) ? [...targets] : [targets], callback }\n registry.subscriptions.push(subscription)\n for (const target of subscription.targets) registry.watchers.set(target, (registry.watchers.get(target) ?? 0) + 1)\n if (registry === afterHost) {\n // Made anew, so it is younger than the host's; every element is watched\n // again and reports its size once more, which a size callback takes as no change.\n registry.observer?.disconnect()\n registry.observer = makeSizeObserver(registry)\n for (const element of registry.watchers.keys()) registry.observer.observe(element)\n } else {\n if (registry.observer === null) registry.observer = makeSizeObserver(registry)\n for (const target of subscription.targets) {\n // Watched again, so the new subscription hears the current size first.\n if (registry.watchers.get(target)! > 1) registry.observer.unobserve(target)\n registry.observer.observe(target)\n }\n }\n return () => {\n const at = registry.subscriptions.indexOf(subscription)\n if (at === -1) return\n registry.subscriptions.splice(at, 1)\n for (const target of subscription.targets) {\n const count = registry.watchers.get(target)! - 1\n if (count > 0) {\n registry.watchers.set(target, count)\n continue\n }\n registry.watchers.delete(target)\n registry.observer?.unobserve(target)\n }\n if (registry.subscriptions.length > 0) return\n registry.observer?.disconnect()\n registry.observer = null\n }\n}\n", "import { SKIN_STAMP_ATTR } from '../constants'\nimport { subscribeMutations } from '../core/bus'\n\n/**\n * Whether a skin owns this page right now: the skin center stamps\n * `html[data-dsh-skin]` while a skin is painting, and injects it into the\n * served document, so the answer holds from the first frame (D49).\n *\n * The skin center does not stamp its attribute for this theme's own row:\n * selecting this theme means the page has no skin on it, which is what\n * leaves the page free for the theme to take. A wallpaper plugin is not an\n * owner: it paints behind the shell, and the theme shares the page with it.\n */\nexport function externalOwnerActive() {\n return document.documentElement.hasAttribute(SKIN_STAMP_ATTR)\n}\n\n/**\n * Watch the skin stamp, and hear when a skin arrives or leaves.\n *\n * The attribute is read; nothing is written. The callback fires only on a\n * real flip: the caller reads `externalOwnerActive()` itself at boot.\n *\n * @param listener - called with the new answer.\n * @returns unsubscribe.\n */\nexport function subscribeExternalOwner(listener: (active: boolean) => void) {\n let last = externalOwnerActive()\n return subscribeMutations(document.documentElement, { attributeFilter: [SKIN_STAMP_ATTR] }, () => {\n const next = externalOwnerActive()\n if (next === last) return\n last = next\n listener(next)\n })\n}\n", "/**\n * One element of the skin's own markup: tag, class and text in one call —\n * the builder every hand-built surface uses (rows, cards, lists).\n *\n * @param tag - element name.\n * @param className - class attribute; empty or omitted leaves it unset.\n * @param text - text content; omitted or null leaves it empty.\n * @returns the new element.\n */\nexport function buildElement<K extends keyof HTMLElementTagNameMap>(tag: K, className?: string, text?: string | null) {\n const element = document.createElement(tag)\n if (className) element.className = className\n if (text !== undefined && text !== null) element.textContent = text\n return element\n}\n\n/**\n * Write one attribute only when its value differs: re-setting the same\n * value still invalidates the element's styles, and a pass writes its\n * marks every frame. Presence-only marks use the DOM's own\n * `element.toggleAttribute(name, on)`, which writes nothing when the\n * state already matches.\n *\n * @param element - the element to mark.\n * @param name - attribute name.\n * @param value - the value it must carry.\n */\nexport function setAttributeIfChanged(element: Element, name: string, value: string) {\n if (element.getAttribute(name) !== value) element.setAttribute(name, value)\n}\n\n/**\n * `node.closest(selector)` for a node that came out of an event or a walk:\n * text nodes, the document and a detached window have no `closest`, and\n * the answer for them is \"nothing here\".\n *\n * @param node - the node to search from.\n * @param selector - the selector to match.\n * @returns the closest match, or null. Typed as `E` (an HTML element unless\n * the caller names another), as `querySelector<E>` is.\n */\nexport function closestFrom<E extends Element = HTMLElement>(node: EventTarget | null | undefined, selector: string): E | null {\n if (node === null || node === undefined || typeof (node as Partial<Element>).closest !== 'function') return null\n return (node as Element).closest<E>(selector)\n}\n\n/**\n * One host element the skin marks for its stylesheet, followed across\n * re-renders. React replaces host nodes freely, so the mark has to move\n * with the element the pass finds this time and come off the one it\n * found before; an unchanged mark writes nothing (re-setting the same\n * value still invalidates the element's styles).\n *\n * @param attr - the attribute the stylesheet keys on.\n * @returns `{ mark(element, value), current(), release() }`: `mark` moves\n * the attribute (value defaults to empty) onto `element`, or takes it off\n * when `element` is null; `current` is the marked element; `release`\n * takes the mark off for the teardown.\n */\nexport function createStamp<E extends Element = Element>(attr: string) {\n let marked: E | null = null\n\n function mark(element: E | null, value = '') {\n if (marked !== null && marked !== element) marked.removeAttribute(attr)\n marked = element\n if (element !== null) setAttributeIfChanged(element, attr, value)\n }\n\n return {\n mark,\n current: () => marked,\n release: () => mark(null),\n }\n}\n", "import { notifyAll } from './notify'\n\n/** A JSON answer from one of the host half's routes: an object whose fields the adopter checks one by one. */\nexport type HostAnswer = Record<string, unknown> | null\n\n/**\n * A one-shot JSON resource the host half serves (the model copy document,\n * the OS user, the HDSL contract): one GET per arming, the answer adopted\n * into the caller's own state, and a listener list told once that happens.\n *\n * The fetch is armed by load(); a failure means the host half did not\n * answer, and the caller's defaults simply stay (docs/decisions D12\n * — a Promise rejection that says \"the host half did not answer\"). reset()\n * re-arms the resource: a new host context is a new machine, so the next\n * load() fetches again.\n *\n * @param route - the host route to GET.\n * @param adopt - `adopt(data)` stores what the answer carries and returns\n * the value listeners are called with, or undefined when the answer is\n * not usable (nothing is adopted, no listener hears anything).\n * @returns `{ load, onLoaded, reset }`.\n */\nexport function createHostResource<T>(route: string, adopt: (data: HostAnswer) => T | undefined) {\n let requested = false\n const listeners: ((value: T) => void)[] = []\n\n function load() {\n if (requested) return\n requested = true\n fetch(route, { credentials: 'same-origin' })\n .then(response => {\n if (!response.ok) throw new Error(`HTTP ${response.status}`)\n return response.json()\n })\n .then(data => {\n const value = adopt(data)\n if (value !== undefined) notifyAll(listeners, value)\n }, () => { /* the host half did not answer: the caller's defaults stay */ })\n }\n\n /** Register a listener for the adoption; the returned call removes it. */\n function onLoaded(listener: (value: T) => void) {\n listeners.push(listener)\n return () => {\n const index = listeners.indexOf(listener)\n if (index !== -1) listeners.splice(index, 1)\n }\n }\n\n /** Re-arm: the next load() fetches again (a new host context). */\n function reset() {\n requested = false\n }\n\n return { load, onLoaded, reset }\n}\n", "import { MODEL_COPY_FALLBACK_LOCALE, MODEL_COPY_ROUTE } from '../features/model/copy-fallbacks'\nimport { createHostResource } from '../shared/resource'\nimport type { HostAnswer } from '../shared/resource'\n\n/** One `{ locale: text }` pair of the copy document. */\nexport type CopyPair = Record<string, string>\n\n/** A family or tier rule: a model-id pattern and the line every id it claims reads. */\nexport interface CopyRule {\n re: RegExp\n text?: CopyPair\n}\n\n/** The copy document, indexed for lookups (indexModelCopy). */\nexport interface ModelCopyIndex {\n ui: Record<string, CopyPair>\n settings: Record<string, CopyPair>\n ban: Record<string, CopyPair>\n fallback: string\n families: CopyRule[]\n tiers: CopyRule[]\n providerBrands: Record<string, string>\n brandRules: { re: RegExp, brand: string }[]\n}\n\n/**\n * Model & settings localized copy.\n *\n * The copy document ships as `model-descriptions.json` beside the bundle.\n * Both the model picker (packages/client/src/features/model/model-picker.ts) and the settings section\n * (packages/client/src/features/settings/settings.ts) consume this copy, so the state lives in the shared context.\n * where both zones can reach it.\n */\nexport let modelCopy: ModelCopyIndex | null = null\n\n/**\n * The model copy document the host half serves. A document that does not\n * index is not adopted: the bundle's English constants stay.\n */\nconst modelCopyResource = createHostResource(MODEL_COPY_ROUTE, (doc) => {\n const indexed = indexModelCopy(doc)\n if (indexed === null) return undefined\n modelCopy = indexed\n return modelCopy\n})\n\nexport function onModelCopyLoaded(listener: (copy: ModelCopyIndex) => void) {\n return modelCopyResource.onLoaded(listener)\n}\n\n/**\n * Fetch the model copy document the host half serves.\n */\nexport function loadModelCopy() {\n modelCopyResource.load()\n}\n\n/**\n * Compile a copy document into the shape lookups want: the rule lists with\n * their regexps built once.\n * @param doc - parsed document, as validated by the build.\n * @returns the index, or null when the document is unusable.\n */\nfunction indexModelCopy(doc: HostAnswer): ModelCopyIndex | null {\n if (!doc || typeof doc !== 'object') return null\n // The build validated the document's shape before it shipped (D5); a block\n // that is missing reads as empty.\n const table = <T>(value: unknown) => (value && typeof value === 'object' ? value : {}) as Record<string, T>\n const brands = table<any>(doc.brands)\n const index: ModelCopyIndex = {\n ui: table(doc.ui),\n settings: table(doc.settings),\n // The account-hold easter egg's page copy rides the same document\n // (packages/client/src/features/ban-screen/ban-screen.ts). Every block the document carries has to\n // be listed here: this index IS what lookups read, so an unlisted block\n // would silently fall back to the bundle's English constants.\n ban: table(doc.ban),\n fallback: typeof doc.fallback === 'string' && doc.fallback ? doc.fallback : MODEL_COPY_FALLBACK_LOCALE,\n families: [],\n tiers: [],\n providerBrands: table(brands.providers),\n brandRules: [],\n }\n const compile = (rules: any) => {\n const out: CopyRule[] = []\n for (let i = 0; i < (rules || []).length; i++) {\n const rule = rules[i]\n if (!rule || typeof rule.match !== 'string') continue\n // The build compiles every rule before it ships the document.\n out.push({ re: new RegExp(rule.match, 'i'), text: rule.text })\n }\n return out\n }\n index.families = compile(doc.families)\n index.tiers = compile(doc.tiers)\n // Brand rules carry no copy, only the mark's id; the build has already\n // checked every id against the vendored marks.\n const brandRules: ModelCopyIndex['brandRules'] = []\n for (let b = 0; b < (brands.models || []).length; b++) {\n const brandRule = brands.models[b]\n if (!brandRule || typeof brandRule.match !== 'string' || typeof brandRule.brand !== 'string') continue\n brandRules.push({ re: new RegExp(brandRule.match, 'i'), brand: brandRule.brand })\n }\n index.brandRules = brandRules\n return index\n}\n\n/** Fold case and separators so `glm-5.3-flash` and `glm-5-3-flash` agree. */\nexport function normalizeModelId(id: unknown) {\n return String(id === undefined || id === null ? '' : id).toLowerCase().replace(/[^a-z0-9]/g, '')\n}\n", "/**\n * The frame pipeline (D40): every frame callback the skin needs goes through\n * one `requestAnimationFrame`, split into a read phase and a write phase.\n * Every task's `read` runs first, then every task's `write`, so the features\n * measure the layout the frame started with and never force a layout between\n * each other's writes. A `write` may still read; it then sees the writes made\n * before it in this frame.\n *\n * A task asked for while a frame runs belongs to the next frame. A task\n * cancelled while its frame runs is not called again in that frame. A task\n * that throws is reported and the rest of the frame runs (D12).\n */\nexport interface FrameTask {\n read?(now: number): void\n write?(now: number): void\n}\n\n/** The tasks the next frame runs, in request order. */\nlet queued: FrameTask[] = []\n/** The tasks still wanted: cancelling removes a task here, so a running frame skips it. */\nconst live = new Set<FrameTask>()\nlet handle = 0\n\nfunction runFrame(now: number) {\n handle = 0\n const tasks = queued\n queued = []\n for (const task of tasks) {\n if (task.read === undefined || !live.has(task)) continue\n try { task.read(now) } catch (error) { reportError(error) }\n }\n for (const task of tasks) {\n if (!live.has(task)) continue\n live.delete(task)\n if (task.write === undefined) continue\n try { task.write(now) } catch (error) { reportError(error) }\n }\n}\n\n/**\n * Run a task on the next frame.\n * @returns cancel: the task does not run, or does not run its remaining phase.\n */\nexport function requestFrame(task: FrameTask) {\n if (live.has(task)) throw new Error('frame: this task is already requested')\n live.add(task)\n queued.push(task)\n if (handle === 0) handle = requestAnimationFrame(runFrame)\n return () => {\n live.delete(task)\n const at = queued.indexOf(task)\n if (at !== -1) queued.splice(at, 1)\n if (queued.length === 0 && handle !== 0) {\n cancelAnimationFrame(handle)\n handle = 0\n }\n }\n}\n", "import { closestComposerCard, findComposerCard, onHdslLoaded, onUsernameLoaded } from './host'\nimport { onModelCopyLoaded } from './model-copy'\nimport { loadPrefs, refreshMotionAttribute, subscribePrefs } from './prefs'\nimport type { HostContext } from './host'\nimport { observeSize, subscribeMutations } from './bus'\nimport { requestFrame } from './frame'\nimport { closestFrom } from '../shared/dom'\nimport type { FooterHandle } from '../features/account/account-footer'\nimport type { BanHandle } from '../features/ban-screen/ban-screen'\nimport type { ChatFoldHandle } from '../features/chat-fold/chat-fold'\nimport type { ComposerHandle } from '../features/composer/composer'\nimport type { ModelHandle } from '../features/model/model-picker'\nimport type { PeakRateHandle } from '../features/peakrate/peakrate'\nimport type { QuickProvidersHandle } from '../features/settings/quick-providers'\n\n/** Why the scheduler asks a feature to close. Features ignore the reasons they do not act on. */\nexport type CloseReason = 'outside' | 'escape' | 'composer'\n\n/**\n * A feature's handle on the shared `ui` registry. Every hook is optional: the\n * scheduler calls the ones a feature implements and skips the rest (D42).\n */\nexport interface FeatureHandle {\n /** Every scheduler pass, in FEATURES order. */\n sync?(): void\n /** Whether the press landed inside the feature's own DOM; a press it does not own closes it through `close('outside')`. */\n owns?(target: Node): boolean\n /** Every press. */\n onPointerDown?(target: EventTarget | null): void\n close?(reason?: CloseReason): void\n /** A composer-input event. */\n onInput?(target: EventTarget | null): void\n /** Every focusin, after the composer route. */\n onFocusIn?(target: HTMLElement): void\n /** `'viewport'` (page scroll or resize) or `'composer'` (the composer card changed size). */\n reposition?(reason: 'viewport' | 'composer'): void\n /** The locale, the preferences or the model copy changed. */\n onCopyChange?(): void\n /** Every keydown, after the Esc route; a feature that takes the key calls `event.preventDefault()` itself. */\n onKey?(event: KeyboardEvent): void\n /** The reader moved the pointer, pressed it or pressed a key (the skin's own synthetic Esc aside). */\n onActivity?(): void\n /** The feature's own teardown, for a handle that also hands it to its install. */\n teardown?(): void\n}\n\n/**\n * Every feature's handle, under the name it registers on `ui` (its manifest's\n * `handle`, or its `id`). A feature that other features read publishes a\n * handle type of its own; the others are plain scheduler hooks.\n */\nexport interface Handles {\n selection: FeatureHandle\n composer: ComposerHandle\n homeLayout: FeatureHandle\n mascot: FeatureHandle\n copy: FeatureHandle\n permissions: FeatureHandle\n contextStats: FeatureHandle\n model: ModelHandle\n peakrate: PeakRateHandle\n effort: FeatureHandle\n heroMenu: FeatureHandle\n quickProviders: QuickProvidersHandle\n footer: FooterHandle\n ban: BanHandle\n themeFlip: FeatureHandle\n workspace: FeatureHandle\n search: FeatureHandle\n turnNav: FeatureHandle\n chatFollow: FeatureHandle\n chatFold: ChatFoldHandle\n chatWait: FeatureHandle\n chatReveal: FeatureHandle\n chatFiles: FeatureHandle\n chatSend: FeatureHandle\n caret: FeatureHandle\n viewTabs: FeatureHandle\n headerBand: FeatureHandle\n settingsNav: FeatureHandle\n}\n\nexport type HandleName = keyof Handles\n\n/** The two calls on `ui` that are no feature's: entry.ts and the scheduler put them there. */\nexport interface UiCalls {\n /** Ask for a pass on the next frame (installScheduler). */\n schedule?: () => void\n /** Switch one feature off for the rest of this generation (entry.ts). */\n retire: (name: string) => void\n}\n\n/**\n * The whole registry, as entry.ts and the scheduler hold it: each installed\n * feature's handle under its handle name. A feature sees only its own part of\n * it (FeatureUi in core/feature.ts): its handle and the ones its manifest\n * `reads`.\n */\nexport type Ui = UiCalls & { [K in HandleName]?: Handles[K] }\n/** Say once, loudly, that a feature was switched off: the console line is its only trace. */\nexport function reportFeatureFailure(name: string, error: unknown) {\n console.error(`[dsh-claude-style] \"${name}\" failed and was switched off:`, error)\n}\n\n/**\n * @param features - every feature's `ui` handle name, in FEATURES order: a\n * switched feature comes and goes during the generation, so each use\n * checks whether the handle exists.\n */\nexport function installScheduler(ctx: HostContext, ui: Ui, features: HandleName[]) {\n // The pass state comes first: subscribing to the preferences below can call\n // schedule() before this function returns (a settings form that is already\n // served answers synchronously — a hot reload does exactly that).\n let scheduled = false\n /** Cancels the frame the pending pass waits on, so the teardown can cancel it. */\n let cancelPass: (() => void) | null = null\n /** Set by the teardown: no pass may be scheduled, or run, after it. */\n let stopped = false\n\n /** The handle a feature registered under `name`, while that feature is installed. */\n function handleOf(name: HandleName): FeatureHandle | undefined {\n return ui[name]\n }\n\n /** Call one hook on every feature that implements it, in FEATURES order. */\n function dispatch<K extends keyof FeatureHandle>(hook: K, ...args: Parameters<NonNullable<FeatureHandle[K]>>) {\n for (const name of features) {\n const handle = handleOf(name)\n const call = handle?.[hook] as ((...args: unknown[]) => void) | undefined\n if (handle && typeof call === 'function') call.apply(handle, args)\n }\n }\n\n /** The reader is at the page: every feature with an `onActivity` hears it. */\n function onGlobalActivity() {\n dispatch('onActivity')\n }\n\n function onGlobalPointerDown(e: PointerEvent) {\n onGlobalActivity()\n const target = e.target\n // A press a feature does not own closes it; features without an `owns`\n // keep their own dismiss route.\n for (const name of features) {\n const handle = handleOf(name)\n if (!handle || typeof handle.owns !== 'function' || typeof handle.close !== 'function') continue\n if (target instanceof Node && !handle.owns(target)) handle.close('outside')\n }\n dispatch('onPointerDown', target)\n }\n\n function onGlobalKeyDown(e: KeyboardEvent) {\n // The account footer dismisses the host's account menu with a synthetic\n // Escape addressed to the host's Menu alone (account-footer.ts). Taking it\n // for the reader's Esc would run every feature's Esc route behind it.\n if (e.__dshHostMenuEscape === true) return\n onGlobalActivity()\n if (e.key === 'Escape') dispatch('close', 'escape')\n dispatch('onKey', e)\n // Enter is deliberately not handled here: the host's composer keymap\n // already sends, picks a highlighted `/` or `@` item, holds back for IME\n // and ignores key repeat, and this listener runs before the editor.\n }\n\n // Focus moving into the composer means the reader is about to type, and every\n // popover the skin keeps open around the card is in the way there. `focusin`\n // bubbles, so one listener covers the card and everything inside it.\n function onGlobalFocusIn(e: FocusEvent) {\n // Every handler below reads `tagName` and `closest` off the target, so a\n // non-element focus target (a text node) is turned away here.\n const target = closestFrom(e.target, '*')\n if (target === null) return\n if (closestComposerCard(target) !== null) dispatch('close', 'composer')\n dispatch('onFocusIn', target)\n }\n\n function onComposerInput(e: Event) {\n // The [data-composer-input] filter stays in this event pipe; a feature is\n // only told that a composer-input event happened.\n const input = closestFrom(e.target, '[data-composer-input]')\n if (input !== null) dispatch('onInput', e.target)\n }\n\n document.addEventListener('pointerdown', onGlobalPointerDown)\n document.addEventListener('pointermove', onGlobalActivity, { passive: true })\n document.addEventListener('keydown', onGlobalKeyDown, true)\n document.addEventListener('input', onComposerInput, true)\n document.addEventListener('compositionend', onComposerInput, true)\n document.addEventListener('focusin', onGlobalFocusIn, true)\n\n // Fixed popovers are anchored to their trigger, and page scroll or a resize\n // moves that anchor, so whichever is open re-resolves it in the same frame.\n function onFixedPopoverViewportChange() {\n dispatch('reposition', 'viewport')\n }\n window.addEventListener('resize', onFixedPopoverViewportChange)\n window.addEventListener('scroll', onFixedPopoverViewportChange, true)\n\n // A locale switch has to rebuild rows a popover already painted, so the copy\n // sources subscribe here rather than being read at render time only.\n function onCopyChange() {\n dispatch('onCopyChange')\n schedule()\n }\n // Without a locale service the picker keeps the fallback language.\n const localeService = ctx.get('locale')\n const localeUnsubscribe = typeof localeService?.subscribe === 'function' ? localeService.subscribe(onCopyChange) : null\n\n // Preferences gate the stylesheet and this scheduler both. The first read\n // also arrives through here, which is what replaces the defaults with the\n // stored values.\n const prefsUnsubscribe = subscribePrefs(onCopyChange)\n loadPrefs()\n\n // Under \"follow the system\", the system's own reduced-motion flip is a\n // preference change like any other.\n const motionQuery = window.matchMedia('(prefers-reduced-motion: reduce)')\n function onSystemMotionChange() {\n refreshMotionAttribute()\n schedule()\n }\n motionQuery.addEventListener('change', onSystemMotionChange)\n\n const modelCopyUnsubscribe = onModelCopyLoaded(onCopyChange)\n\n const usernameUnsubscribe = onUsernameLoaded(() => {\n schedule()\n })\n\n // The HDSL contract lands after the first pass too, and can carry both the\n // nickname and the picture.\n const hdslUnsubscribe = onHdslLoaded(() => {\n schedule()\n })\n\n let observedCard: HTMLElement | null = null\n /** Stops watching the observed card's size. */\n let stopCardSize: (() => void) | null = null\n // The card resizing moves the anchors pinned to it with no window resize:\n // re-pin in the same frame, or a JS-pinned control trails the reflow.\n const onCardResize = () => { dispatch('reposition', 'composer') }\n\n /** Failed passes in a row after which a feature's sync is switched off. */\n const SYNC_FAILURE_LIMIT = 3\n const syncFailures: Record<string, number> = {}\n\n /**\n * Run one feature's sync in isolation: a throw is retried on the next pass,\n * and after SYNC_FAILURE_LIMIT failures in a row the feature is reported\n * once and retired while the rest of the pass carries on (D12).\n */\n function runSync(name: HandleName) {\n const feature = handleOf(name)\n if (!feature || typeof feature.sync !== 'function') return\n const failures = syncFailures[name] || 0\n if (failures >= SYNC_FAILURE_LIMIT) return\n try {\n feature.sync()\n syncFailures[name] = 0\n } catch (error) {\n syncFailures[name] = failures + 1\n if (failures + 1 < SYNC_FAILURE_LIMIT) return\n reportFeatureFailure(name, error)\n ui.retire(name)\n }\n }\n\n /** Chat streaming mutates the tree constantly; coalesce to one pass a frame. */\n function schedule() {\n if (scheduled || stopped) return\n scheduled = true\n // The pass reads and writes feature by feature, so it runs in the write\n // phase: the frame's reads have all happened before it (D40).\n cancelPass = requestFrame({\n write() {\n scheduled = false\n cancelPass = null\n if (stopped) return\n for (const name of features) runSync(name)\n const currentCard = findComposerCard()\n if (currentCard !== observedCard) {\n if (stopCardSize !== null) stopCardSize()\n stopCardSize = null\n observedCard = currentCard\n if (observedCard) stopCardSize = observeSize(observedCard, onCardResize)\n }\n },\n })\n }\n ui.schedule = schedule\n\n // Every change under <body> asks for a pass, the skin's own quiet writes\n // (QUIET_ATTR) aside: the caret motion measures through probes and redraws\n // per frame, and without this every keystroke would schedule a pass for work\n // no feature reads.\n const stopMutations = subscribeMutations(document.body, {\n childList: true,\n characterData: true,\n subtree: true,\n // Only the two attributes a paint depends on: the shipped trigger carries\n // the current preset in its aria-label, the conversation tabs the view in\n // aria-selected.\n attributeFilter: ['aria-label', 'aria-selected'],\n skipQuiet: true,\n }, schedule)\n schedule()\n\n // Copy that follows the clock (the hero greeting rolls over on the hour) has\n // no DOM change to wake a pass. The syncs skip identical writes, so this\n // cannot feed the observer.\n const clockTimer = setInterval(schedule, 60000)\n\n return () => {\n // A pass already requested would run against torn-down features and build\n // their DOM again, so it is cancelled and every later schedule() refused —\n // a feature's pending promise may still call it.\n stopped = true\n if (cancelPass !== null) cancelPass()\n cancelPass = null\n scheduled = false\n clearInterval(clockTimer)\n window.removeEventListener('resize', onFixedPopoverViewportChange)\n window.removeEventListener('scroll', onFixedPopoverViewportChange, true)\n if (localeUnsubscribe !== null) localeUnsubscribe()\n prefsUnsubscribe()\n motionQuery.removeEventListener('change', onSystemMotionChange)\n modelCopyUnsubscribe()\n usernameUnsubscribe()\n hdslUnsubscribe()\n stopMutations()\n if (stopCardSize !== null) stopCardSize()\n stopCardSize = null\n observedCard = null\n document.removeEventListener('pointerdown', onGlobalPointerDown)\n document.removeEventListener('pointermove', onGlobalActivity)\n document.removeEventListener('keydown', onGlobalKeyDown, true)\n document.removeEventListener('input', onComposerInput, true)\n document.removeEventListener('compositionend', onComposerInput, true)\n document.removeEventListener('focusin', onGlobalFocusIn, true)\n }\n}\n", "export const STYLESHEET = \"body[data-dsh-claude-style]{--dsh-claude-image-claude-mark: url(\\\"data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%20148.09%20148.18'%3E%3Cg%20transform%3D'translate(-75.96%2C-223.53)'%3E%3Cpath%20d%3D'm%20105.01%2C322.07%2029.14%2C-16.35%200.49%2C-1.42%20-0.49%2C-0.79%20h%20-1.42%20l%20-4.87%2C-0.3%20-16.65%2C-0.45%20-14.44%2C-0.6%20-13.99%2C-0.75%20-3.52%2C-0.75%20-3.3%2C-4.35%200.34%2C-2.17%202.96%2C-1.99%204.24%2C0.37%209.37%2C0.64%2014.06%2C0.97%2010.2%2C0.6%2015.11%2C1.57%20h%202.4%20l%200.34%2C-0.97%20-0.82%2C-0.6%20-0.64%2C-0.6%20-14.55%2C-9.86%20-15.75%2C-10.42%20-8.25%2C-6%20-4.46%2C-3.04%20-2.25%2C-2.85%20-0.97%2C-6.22%204.05%2C-4.46%205.44%2C0.37%201.39%2C0.37%205.51%2C4.24%2011.77%2C9.11%2015.37%2C11.32%202.25%2C1.87%200.9%2C-0.64%200.11%2C-0.45%20-1.01%2C-1.69%20-8.36%2C-15.11%20-8.92%2C-15.37%20-3.97%2C-6.37%20-1.05%2C-3.82%20c%20-0.37%2C-1.57%20-0.64%2C-2.89%20-0.64%2C-4.5%20l%204.61%2C-6.26%202.55%2C-0.82%206.15%2C0.82%202.59%2C2.25%203.82%2C8.74%206.19%2C13.76%209.6%2C18.71%202.81%2C5.55%201.5%2C5.14%200.56%2C1.57%20h%200.97%20v%20-0.9%20l%200.79%2C-10.54%201.46%2C-12.94%201.42%2C-16.65%200.49%2C-4.69%202.32%2C-5.62%204.61%2C-3.04%203.6%2C1.72%202.96%2C4.24%20-0.41%2C2.74%20-1.76%2C11.44%20-3.45%2C17.92%20-2.25%2C12%20h%201.31%20l%201.5%2C-1.5%206.07%2C-8.06%2010.2%2C-12.75%204.5%2C-5.06%205.25%2C-5.59%203.37%2C-2.66%20h%206.37%20l%204.69%2C6.97%20-2.1%2C7.2%20-6.56%2C8.32%20-5.44%2C7.05%20-7.8%2C10.5%20-4.87%2C8.4%200.45%2C0.67%201.16%2C-0.11%2017.62%2C-3.75%209.52%2C-1.72%2011.36%2C-1.95%205.14%2C2.4%200.56%2C2.44%20-2.02%2C4.99%20-12.15%2C3%20-14.25%2C2.85%20-21.22%2C5.02%20-0.26%2C0.19%200.3%2C0.37%209.56%2C0.9%204.09%2C0.22%20h%2010.01%20l%2018.64%2C1.39%204.87%2C3.22%202.92%2C3.94%20-0.49%2C3%20-7.5%2C3.82%20-10.12%2C-2.4%20-23.62%2C-5.62%20-8.1%2C-2.02%20h%20-1.12%20v%200.67%20l%206.75%2C6.6%2012.37%2C11.17%2015.49%2C14.4%200.79%2C3.56%20-1.99%2C2.81%20-2.1%2C-0.3%20-13.61%2C-10.24%20-5.25%2C-4.61%20-11.89%2C-10.01%20h%20-0.79%20v%201.05%20l%202.74%2C4.01%2014.47%2C21.75%200.75%2C6.67%20-1.05%2C2.17%20-3.75%2C1.31%20-4.12%2C-0.75%20-8.47%2C-11.89%20-8.74%2C-13.39%20-7.05%2C-12%20-0.86%2C0.49%20-4.16%2C44.81%20-1.95%2C2.29%20-4.5%2C1.72%20-3.75%2C-2.85%20-1.99%2C-4.61%201.99%2C-9.11%202.4%2C-11.89%201.95%2C-9.45%201.76%2C-11.74%201.05%2C-3.9%20-0.07%2C-0.26%20-0.86%2C0.11%20-8.85%2C12.15%20-13.46%2C18.19%20-10.65%2C11.4%20-2.55%2C1.01%20-4.42%2C-2.29%200.41%2C-4.09%202.47%2C-3.64%2014.74%2C-18.75%208.89%2C-11.62%205.74%2C-6.71%20-0.04%2C-0.97%20h%20-0.34%20l%20-39.15%2C25.42%20-6.97%2C0.9%20-3%2C-2.81%200.37%2C-4.61%201.42%2C-1.5%2011.77%2C-8.1%20-0.04%2C0.04%20z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\\\");--dsh-claude-image-claude-word: url(\\\"data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'177.76%2014.09%20512.22%20121.54'%3E%3Cg%20transform%3D'translate(-75.96%2C-223.53)'%3E%3Cpath%20d%3D'm%20317.73%2C349.33%20c%20-18.82%2C0%20-31.69%2C-10.5%20-37.76%2C-26.66%20-3.17%2C-8.42%20-4.74%2C-17.36%20-4.61%2C-26.36%200%2C-27.11%2012.15%2C-45.94%2039%2C-45.94%2018.04%2C0%2029.17%2C7.87%2035.51%2C26.66%20h%207.72%20l%20-1.05%2C-25.91%20c%20-10.8%2C-6.97%20-24.3%2C-10.5%20-40.72%2C-10.5%20-23.14%2C0%20-42.82%2C10.35%20-53.77%2C29.02%20-5.66%2C9.86%20-8.53%2C21.07%20-8.32%2C32.44%200%2C20.74%209.79%2C39.11%2028.16%2C49.31%2010.06%2C5.37%2021.34%2C8.04%2032.74%2C7.72%2017.92%2C0%2032.14%2C-3.41%2044.74%2C-9.37%20l%203.26%2C-28.57%20h%20-7.87%20c%20-4.72%2C13.05%20-10.35%2C20.89%20-19.69%2C25.05%20-4.57%2C2.06%20-10.35%2C3.11%20-17.32%2C3.11%20z%20m%2081.18%2C-98.96%200.75%2C-12.75%20h%20-5.32%20l%20-23.7%2C7.12%20v%203.86%20l%2010.5%2C4.87%20v%2089.17%20c%200%2C6.07%20-3.11%2C7.42%20-11.25%2C8.44%20v%206.52%20h%2040.31%20v%20-6.52%20c%20-8.17%2C-1.01%20-11.25%2C-2.36%20-11.25%2C-8.44%20V%20250.4%20l%20-0.04%2C-0.04%20z%20m%20160.31%2C108.75%20h%203.11%20l%2027.26%2C-5.17%20v%20-6.67%20l%20-3.82%2C-0.3%20c%20-6.37%2C-0.6%20-8.02%2C-1.91%20-8.02%2C-7.12%20v%20-47.55%20l%200.75%2C-15.26%20h%20-4.31%20l%20-25.76%2C3.71%20v%206.52%20l%202.51%2C0.45%20c%206.97%2C1.01%209.04%2C2.96%209.04%2C7.84%20v%2042.37%20c%20-6.67%2C5.17%20-13.05%2C8.44%20-20.62%2C8.44%20-8.4%2C0%20-13.61%2C-4.27%20-13.61%2C-14.25%20v%20-39.79%20l%200.75%2C-15.26%20h%20-4.42%20l%20-25.8%2C3.71%20v%206.52%20l%202.66%2C0.45%20c%206.97%2C1.01%209.04%2C2.96%209.04%2C7.84%20v%2039.11%20c%200%2C16.57%209.37%2C24.45%2024.3%2C24.45%2011.4%2C0%2020.74%2C-6.07%2027.75%2C-14.51%20l%20-0.75%2C14.51%20-0.04%2C-0.04%20z%20M%20484.3%2C306.36%20c%200%2C-21.19%20-11.25%2C-29.32%20-31.57%2C-29.32%20-17.92%2C0%20-30.94%2C7.42%20-30.94%2C19.72%200%2C3.67%201.31%2C6.49%203.97%2C8.44%20l%2013.65%2C-1.8%20c%20-0.6%2C-4.12%20-0.9%2C-6.64%20-0.9%2C-7.69%200%2C-6.97%203.71%2C-10.5%2011.25%2C-10.5%2011.14%2C0%2016.76%2C7.84%2016.76%2C20.44%20v%204.12%20l%20-28.12%2C8.44%20c%20-9.37%2C2.55%20-14.7%2C4.76%20-18.26%2C9.94%20-1.89%2C3.17%20-2.8%2C6.82%20-2.62%2C10.5%200%2C12%208.25%2C20.47%2022.35%2C20.47%2010.2%2C0%2019.24%2C-4.61%2027.11%2C-13.35%202.81%2C8.74%207.12%2C13.35%2014.81%2C13.35%206.22%2C0%2011.85%2C-2.51%2016.87%2C-7.42%20l%20-1.5%2C-5.17%20c%20-2.17%2C0.6%20-4.27%2C0.9%20-6.49%2C0.9%20-4.31%2C0%20-6.37%2C-3.41%20-6.37%2C-10.09%20v%20-30.97%20z%20m%20-36%2C40.76%20c%20-7.69%2C0%20-12.45%2C-4.46%20-12.45%2C-12.3%200%2C-5.32%202.51%2C-8.44%207.87%2C-10.24%20l%2022.8%2C-7.24%20v%2021.9%20c%20-7.27%2C5.51%20-11.55%2C7.87%20-18.22%2C7.87%20z%20m%20237.36%2C6.82%20v%20-6.67%20l%20-3.86%2C-0.3%20c%20-6.37%2C-0.6%20-7.99%2C-1.91%20-7.99%2C-7.12%20v%20-89.47%20l%200.75%2C-12.75%20h%20-5.36%20l%20-23.7%2C7.12%20v%203.86%20l%2010.5%2C4.87%20v%2029.32%20c%20-5.91%2C-4.05%20-12.98%2C-6.08%20-20.14%2C-5.77%20-23.55%2C0%20-41.92%2C17.92%20-41.92%2C44.74%200%2C22.09%2013.2%2C37.35%2034.95%2C37.35%2011.25%2C0%2021.04%2C-5.47%2027.11%2C-13.95%20l%20-0.75%2C13.95%20h%203.15%20l%2027.26%2C-5.17%20v%200%20z%20m%20-49.35%2C-68.02%20c%2011.25%2C0%2019.69%2C6.52%2019.69%2C18.52%20v%2033.75%20c%20-5.18%2C5.16%20-12.23%2C8%20-19.54%2C7.87%20-16.12%2C0%20-24.3%2C-12.75%20-24.3%2C-29.77%200%2C-19.12%209.34%2C-30.37%2024.15%2C-30.37%20z%20M%20743.3%2C302.8%20c%20-2.1%2C-9.9%20-8.17%2C-15.52%20-16.61%2C-15.52%20-12.6%2C0%20-21.34%2C9.49%20-21.34%2C23.1%200%2C20.14%2010.65%2C33.19%2027.86%2C33.19%2011.48%2C-0.12%2022.04%2C-6.33%2027.71%2C-16.31%20l%205.02%2C1.35%20c%20-2.25%2C17.47%20-18.07%2C30.52%20-37.5%2C30.52%20-22.8%2C0%20-38.51%2C-16.87%20-38.51%2C-40.87%200%2C-24%2017.06%2C-41.21%2039.86%2C-41.21%2017.02%2C0%2029.02%2C10.24%2032.89%2C28.01%20l%20-59.4%2C18.22%20v%20-8.02%20l%2040.01%2C-12.41%20v%20-0.04%20z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\\\");--dsh-claude-image-claude-mark-clay: url(\\\"data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%20148.09%20148.18'%3E%3Cg%20transform%3D'translate(-75.96%2C-223.53)'%3E%3Cpath%20fill%3D'%23D97757'%20d%3D'm%20105.01%2C322.07%2029.14%2C-16.35%200.49%2C-1.42%20-0.49%2C-0.79%20h%20-1.42%20l%20-4.87%2C-0.3%20-16.65%2C-0.45%20-14.44%2C-0.6%20-13.99%2C-0.75%20-3.52%2C-0.75%20-3.3%2C-4.35%200.34%2C-2.17%202.96%2C-1.99%204.24%2C0.37%209.37%2C0.64%2014.06%2C0.97%2010.2%2C0.6%2015.11%2C1.57%20h%202.4%20l%200.34%2C-0.97%20-0.82%2C-0.6%20-0.64%2C-0.6%20-14.55%2C-9.86%20-15.75%2C-10.42%20-8.25%2C-6%20-4.46%2C-3.04%20-2.25%2C-2.85%20-0.97%2C-6.22%204.05%2C-4.46%205.44%2C0.37%201.39%2C0.37%205.51%2C4.24%2011.77%2C9.11%2015.37%2C11.32%202.25%2C1.87%200.9%2C-0.64%200.11%2C-0.45%20-1.01%2C-1.69%20-8.36%2C-15.11%20-8.92%2C-15.37%20-3.97%2C-6.37%20-1.05%2C-3.82%20c%20-0.37%2C-1.57%20-0.64%2C-2.89%20-0.64%2C-4.5%20l%204.61%2C-6.26%202.55%2C-0.82%206.15%2C0.82%202.59%2C2.25%203.82%2C8.74%206.19%2C13.76%209.6%2C18.71%202.81%2C5.55%201.5%2C5.14%200.56%2C1.57%20h%200.97%20v%20-0.9%20l%200.79%2C-10.54%201.46%2C-12.94%201.42%2C-16.65%200.49%2C-4.69%202.32%2C-5.62%204.61%2C-3.04%203.6%2C1.72%202.96%2C4.24%20-0.41%2C2.74%20-1.76%2C11.44%20-3.45%2C17.92%20-2.25%2C12%20h%201.31%20l%201.5%2C-1.5%206.07%2C-8.06%2010.2%2C-12.75%204.5%2C-5.06%205.25%2C-5.59%203.37%2C-2.66%20h%206.37%20l%204.69%2C6.97%20-2.1%2C7.2%20-6.56%2C8.32%20-5.44%2C7.05%20-7.8%2C10.5%20-4.87%2C8.4%200.45%2C0.67%201.16%2C-0.11%2017.62%2C-3.75%209.52%2C-1.72%2011.36%2C-1.95%205.14%2C2.4%200.56%2C2.44%20-2.02%2C4.99%20-12.15%2C3%20-14.25%2C2.85%20-21.22%2C5.02%20-0.26%2C0.19%200.3%2C0.37%209.56%2C0.9%204.09%2C0.22%20h%2010.01%20l%2018.64%2C1.39%204.87%2C3.22%202.92%2C3.94%20-0.49%2C3%20-7.5%2C3.82%20-10.12%2C-2.4%20-23.62%2C-5.62%20-8.1%2C-2.02%20h%20-1.12%20v%200.67%20l%206.75%2C6.6%2012.37%2C11.17%2015.49%2C14.4%200.79%2C3.56%20-1.99%2C2.81%20-2.1%2C-0.3%20-13.61%2C-10.24%20-5.25%2C-4.61%20-11.89%2C-10.01%20h%20-0.79%20v%201.05%20l%202.74%2C4.01%2014.47%2C21.75%200.75%2C6.67%20-1.05%2C2.17%20-3.75%2C1.31%20-4.12%2C-0.75%20-8.47%2C-11.89%20-8.74%2C-13.39%20-7.05%2C-12%20-0.86%2C0.49%20-4.16%2C44.81%20-1.95%2C2.29%20-4.5%2C1.72%20-3.75%2C-2.85%20-1.99%2C-4.61%201.99%2C-9.11%202.4%2C-11.89%201.95%2C-9.45%201.76%2C-11.74%201.05%2C-3.9%20-0.07%2C-0.26%20-0.86%2C0.11%20-8.85%2C12.15%20-13.46%2C18.19%20-10.65%2C11.4%20-2.55%2C1.01%20-4.42%2C-2.29%200.41%2C-4.09%202.47%2C-3.64%2014.74%2C-18.75%208.89%2C-11.62%205.74%2C-6.71%20-0.04%2C-0.97%20h%20-0.34%20l%20-39.15%2C25.42%20-6.97%2C0.9%20-3%2C-2.81%200.37%2C-4.61%201.42%2C-1.5%2011.77%2C-8.1%20-0.04%2C0.04%20z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\\\");--dsh-claude-image-anthropic-mark: url(\\\"data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M4.709%2015.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0%2011.784l.055-.352.48-.321.686.06%201.52.103%202.278.158%201.652.097%202.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686%201.908%201.476%202.491%201.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97%202.97%200%2001-.104-.729L6.283.134%206.696%200l.996.134.42.364.62%201.414%201.002%202.229%201.555%203.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286%201.851-.559%202.903-.364%201.942h.212l.243-.242.985-1.306%201.652-2.064.73-.82.85-.904.547-.431h1.033l.76%201.129-.34%201.166-1.064%201.347-.881%201.142-1.264%201.7-.79%201.36.073.11.188-.02%202.856-.606%201.543-.28%201.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061%201.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093%201.068%202.006%201.81%202.509%202.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649%202.345%203.521.122%201.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674%207.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434%201.967-2.18%202.945-1.726%201.845-.414.164-.717-.37.067-.662.401-.589%202.388-3.036%201.44-1.882.93-1.086-.006-.158h-.055L4.132%2018.56l-1.13.146-.487-.456.061-.746.231-.243%201.908-1.312-.006.006z'%20fill%3D'%23D97757'%2F%3E%3C%2Fsvg%3E\\\");--dsh-claude-image-deepseek-mark: url(\\\"data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2023.16%2017.04'%3E%3Cpath%20fill%3D'%234D6BFE'%20d%3D'M22.9168%201.43018C22.6713%201.31018%2022.5658%201.53918%2022.4223%201.65519C22.3733%201.69269%2022.3318%201.74169%2022.2903%201.78669C21.9317%202.1697%2021.5127%202.42121%2020.9657%202.39121C20.1657%202.34621%2019.4827%202.59771%2018.8787%203.20973C18.7502%202.45521%2018.3236%202.0047%2017.6746%201.71569C17.3351%201.56568%2016.9916%201.41518%2016.7536%201.08867C16.5876%200.856163%2016.5421%200.597155%2016.4591%200.341647C16.4061%200.187643%2016.3536%200.0301382%2016.1761%200.00363739C15.9836%20-0.0263635%2015.9081%200.135141%2015.8326%200.270145C15.5306%200.822162%2015.4136%201.43018%2015.4251%202.0462C15.4516%203.43174%2016.0366%204.53527%2017.1991%205.3203C17.3311%205.4103%2017.3651%205.5003%2017.3236%205.63181C17.2441%205.90231%2017.1501%206.16482%2017.0671%206.43533C17.0141%206.60784%2016.9351%206.64584%2016.7501%206.57033C16.1121%206.30383%2015.5611%205.90931%2015.074%205.4328C14.2475%204.63328%2013.5%203.75075%2012.568%203.05973C12.349%202.89822%2012.13%202.74822%2011.9034%202.60522C10.9524%201.68169%2012.028%200.923165%2012.277%200.833162C12.5375%200.739159%2012.3675%200.41615%2011.5259%200.42015C10.6844%200.42365%209.91439%200.705658%208.93286%201.08117C8.78935%201.13767%208.63835%201.17867%208.48384%201.21267C7.59332%201.04367%206.66829%201.00617%205.70226%201.11517C3.88321%201.31768%202.43016%202.1777%201.36213%203.64575C0.0790928%205.4103%20-0.222916%207.41536%200.146595%209.50642C0.535106%2011.7105%201.66014%2013.535%203.38869%2014.9616C5.18125%2016.4406%207.24581%2017.1657%209.60138%2017.0266C11.0319%2016.9441%2012.6245%2016.7526%2014.421%2015.2321C14.874%2015.4576%2015.3496%2015.5476%2016.1381%2015.6151C16.7456%2015.6716%2017.3306%2015.5851%2017.7836%2015.4911C18.4931%2015.3411%2018.4441%2014.6841%2018.1876%2014.5636C16.1081%2013.595%2016.5646%2013.9891%2016.1496%2013.67C17.2061%2012.42%2018.8202%2010.1979%2019.3182%207.17235C19.3672%206.83834%2019.4297%206.36783%2019.4222%206.09732C19.4182%205.93231%2019.4562%205.86831%2019.6447%205.84931C20.1657%205.78931%2020.6712%205.64681%2021.1357%205.3913C22.4833%204.65528%2023.0268%203.44624%2023.1548%201.9972C23.1738%201.77569%2023.1508%201.54668%2022.9168%201.43018ZM11.1749%2014.4736C9.15936%2012.889%208.18184%2012.3675%207.77832%2012.39C7.40081%2012.4125%207.46881%2012.8445%207.55182%2013.126C7.63882%2013.404%207.75182%2013.5955%207.91033%2013.8396C8.01983%2014.0011%208.09533%2014.2411%207.80083%2014.4216C7.15181%2014.8231%206.02327%2014.2866%205.97027%2014.2601C4.65673%2013.4865%203.5587%2012.4655%202.78467%2011.069C2.03715%209.72493%201.60314%208.28289%201.53164%206.74384C1.51264%206.37233%201.62214%206.24082%201.99215%206.17332C2.47916%206.08332%202.98118%206.06432%203.46769%206.13582C5.52476%206.43633%207.27581%207.35586%208.74385%208.8129C9.58188%209.64243%2010.2159%2010.634%2010.8689%2011.6025C11.5634%2012.631%2012.3105%2013.611%2013.262%2014.4146C13.598%2014.6961%2013.866%2014.9101%2014.1225%2015.0681C13.349%2015.1546%2012.058%2015.1731%2011.1749%2014.4746L11.1749%2014.4736ZM12.141%208.25988C12.141%208.09488%2012.273%207.96338%2012.439%207.96338C12.4765%207.96338%2012.5105%207.97088%2012.541%207.98188C12.5825%207.99688%2012.6205%208.01938%2012.6505%208.05338C12.7035%208.10588%2012.7335%208.18088%2012.7335%208.25988C12.7335%208.42489%2012.6015%208.55639%2012.4355%208.55639C12.2695%208.55639%2012.141%208.42489%2012.141%208.25988ZM15.1415%209.79893C14.949%209.87793%2014.7565%209.94544%2014.5715%209.95294C14.2845%209.96794%2013.9715%209.85143%2013.8015%209.70893C13.5375%209.48742%2013.3485%209.36342%2013.2695%208.97691C13.2355%208.8119%2013.2545%208.55639%2013.2845%208.40989C13.3525%208.09438%2013.277%207.89187%2013.0545%207.70787C12.8735%207.55786%2012.643%207.51636%2012.39%207.51636C12.2955%207.51636%2012.209%207.47486%2012.1445%207.44136C12.039%207.38886%2011.9519%207.25735%2012.035%207.09585C12.0615%207.04335%2012.19%206.91584%2012.22%206.89334C12.5635%206.69784%2012.9595%206.76184%2013.326%206.90834C13.6655%207.04735%2013.9225%207.30236%2014.292%207.66287C14.6695%208.09838%2014.7375%208.21838%2014.9525%208.54539C15.1225%208.8009%2015.277%209.06341%2015.3831%209.36392C15.4471%209.55142%2015.3641%209.70493%2015.1415%209.79893Z'%2F%3E%3C%2Fsvg%3E\\\");--dsh-claude-image-github-mark: url(\\\"data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%201024%201024'%3E%3Cpath%20d%3D'M511.957333%2021.333333C241.024%2021.333333%2021.333333%20240.981333%2021.333333%20512c0%20216.832%20140.544%20400.725333%20335.573334%20465.664%2024.490667%204.394667%2032.256-10.069333%2032.256-23.082667%200-11.690667%200.256-44.245333%200-85.205333-136.448%2029.610667-164.736-64.64-164.736-64.64-22.314667-56.704-54.4-71.765333-54.4-71.765333-44.586667-30.464%203.285333-29.824%203.285333-29.824%2049.194667%203.413333%2075.178667%2050.517333%2075.178667%2050.517333%2043.776%2075.008%20114.816%2053.333333%20142.762666%2040.789333%204.522667-31.658667%2017.152-53.376%2031.189334-65.536-108.970667-12.458667-223.488-54.485333-223.488-242.602666%200-53.546667%2019.114667-97.322667%2050.517333-131.669334-5.034667-12.330667-21.930667-62.293333%204.778667-129.834666%200%200%2041.258667-13.184%20134.912%2050.346666a469.802667%20469.802667%200%200%201%20122.88-16.554666c41.642667%200.213333%2083.626667%205.632%20122.88%2016.554666%2093.653333-63.488%20134.784-50.346667%20134.784-50.346666%2026.752%2067.541333%209.898667%20117.504%204.864%20129.834666%2031.402667%2034.346667%2050.474667%2078.122667%2050.474666%20131.669334%200%20188.586667-114.730667%20230.016-224.042666%20242.090666%2017.578667%2015.232%2033.578667%2044.672%2033.578666%2090.453334v135.850666c0%2013.141333%207.936%2027.605333%2032.853334%2022.869334C862.250667%20912.597333%201002.666667%20728.746667%201002.666667%20512%201002.666667%20240.981333%20783.018667%2021.333333%20511.957333%2021.333333z'%2F%3E%3C%2Fsvg%3E\\\")}body[data-dsh-claude-style][data-dsh-claude-typeface=claude]{--dsw-font-family: \\\"Anthropic Sans Web Text\\\",\\\"Claude Style Inter\\\",\\\"Noto Sans SC\\\",\\\"Source Han Sans SC\\\",-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",\\\"PingFang SC\\\",\\\"Hiragino Sans GB\\\",\\\"Microsoft YaHei\\\",\\\"Helvetica Neue\\\",Helvetica,Arial,sans-serif;--dsh-claude-font-serif: \\\"Anthropic Serif Web Text\\\",\\\"Claude Style Noto Serif\\\",Georgia,\\\"Times New Roman\\\",\\\"Noto Sans SC\\\",\\\"Source Han Sans SC\\\",\\\"PingFang SC\\\",\\\"Hiragino Sans GB\\\",\\\"Microsoft YaHei\\\",sans-serif;--dsh-claude-font-prose: \\\"Anthropic Serif Web Text\\\",\\\"Claude Style Noto Serif\\\",Georgia,\\\"Times New Roman\\\",\\\"Noto Sans SC\\\",\\\"Source Han Sans SC\\\",\\\"PingFang SC\\\",\\\"Hiragino Sans GB\\\",\\\"Microsoft YaHei\\\",sans-serif;--dsh-claude-font-code: \\\"JetBrains Mono\\\",\\\"Noto Sans SC\\\",\\\"Source Han Sans SC\\\",\\\"PingFang SC\\\",\\\"Hiragino Sans GB\\\",\\\"Microsoft YaHei\\\",ui-monospace,\\\"SF Mono\\\",\\\"Fira Code\\\",Consolas,\\\"Liberation Mono\\\",Menlo,Courier,monospace;--dsh-claude-font-brand: \\\"Anthropic Serif Web Text\\\", var(--dsh-claude-font-serif);--dsw-font-markdown-h2: 700 calc(18px + var(--dsh-content-font-delta)) / calc(26px + var(--dsh-content-font-delta)) var(--dsh-claude-font-prose);--dsw-font-markdown-h3: 700 calc(16px + var(--dsh-content-font-delta)) / calc(24px + var(--dsh-content-font-delta)) var(--dsh-claude-font-prose)}body[data-dsh-claude-style][data-dsh-claude-typeface=host]{--dsh-claude-font-serif: var(--dsw-font-family);--dsh-claude-font-prose: var(--dsw-font-family);--dsh-claude-font-code: var(--ds-font-family-code);--dsh-claude-font-brand: var(--dsw-font-family)}body[data-dsh-claude-style][data-ds-dark-theme]{--dsh-claude-apex: #9d8ce0;--dsh-claude-apex-flash: #e6e0fb;--dsh-claude-apex-ink: #b9adf0}body[data-dsh-claude-style]:not([data-ds-dark-theme]){--dsh-claude-apex: #8b7ad0;--dsh-claude-apex-flash: #d9d2f5;--dsh-claude-apex-ink: #5f51b5}body[data-dsh-claude-style][data-dsh-claude-palette=claude][data-ds-dark-theme]{--dsw-alias-bg-base: #141413;--dsw-alias-bg-layer-1: #1c1b1a;--dsw-alias-bg-layer-2: #242320;--dsw-alias-bg-layer-3: #2e2c29;--dsw-alias-bg-overlay: #242320;--dsw-alias-border-l1: #242320;--dsw-alias-border-l2: #2e2c29;--dsw-alias-border-l3: #3a3833;--dsw-alias-brand-primary: #d97757;--dsw-alias-brand-text: #faf9f5;--dsw-alias-button-primary-fill: #d97757;--dsw-alias-button-primary-hover: #e08a6d;--dsw-alias-button-elevated-fill: #242320;--dsw-alias-button-floating-fill: #242320;--dsw-alias-button-floating-hover: #2e2c29;--dsw-alias-button-info-fill: #d97757;--dsw-alias-button-info-hover: #e08a6d;--dsw-alias-interactive-bg-active: rgba(217, 119, 87, .3);--dsh-claude-hover-bg: rgba(255, 255, 255, .08);--dsh-claude-inline-code-bg: rgba(255, 255, 255, .05);--dsh-claude-inline-code-fg: #e8a08a;--dsh-claude-link: #8ab4f8;--dsh-claude-link-underline: rgba(138, 180, 248, .6);--dsw-alias-markdown-code-block: #1c1b1a;--dsw-alias-markdown-code-block-banner: #242320;--dsw-alias-interactive-bg-hover: var(--dsh-claude-hover-bg);--dsw-alias-interactive-bg-hover-solid: #2e2c29;--dsw-alias-label-primary: #faf9f5;--dsw-alias-label-primary-bluish: #faf9f5;--dsw-alias-label-secondary: #b0aea5;--dsw-alias-label-tertiary: #8f8d84;--dsw-alias-label-caption: #6b6a65;--dsw-alias-state-business-primary: #d97757;--dsw-alias-state-business-tertiary: #3a2a22;--dsw-alias-link: #e08a6d;--dsw-shadow-lv2: 0 4px 16px rgba(0, 0, 0, .3), 0 1px 3px rgba(0, 0, 0, .14);--dsw-specific-input-major: #0f0e0d;--dsw-specific-selector: #2e2c29;--dsw-specific-sidebar-fill: #141413;--dsw-alias-brand-primary-new-colorprimary-new-color: #d97757;--dsh-claude-canvas: #141413;--dsh-claude-sidebar-canvas: #141413;--dsh-claude-raised: #1e1e1d;--dsh-claude-card: #1e1e1d;--dsh-claude-inverse-fill: #faf9f5;--dsh-claude-inverse-ink: #141413;--dsh-claude-ink-strong: #f5f4ef;--dsh-claude-session-ink: #8c8983;--dsh-claude-table-head: #242320;--dsh-claude-scrollbar: rgba(58, 56, 51, .9);--dsh-claude-scrollbar-hover: rgba(107, 106, 101, .9);--dsh-claude-link-hover: #f0a488;--dsh-claude-logo-ink: #faf9f5;--dsh-claude-meter-peak: #e2a45f;--dsh-claude-meter-valley: #8cbf96}body[data-dsh-claude-style][data-dsh-claude-palette=claude]:not([data-ds-dark-theme]){--dsw-alias-bg-base: #fcfcfb;--dsw-alias-bg-layer-1: #fcfcfb;--dsw-alias-bg-layer-2: #fbfbf9;--dsw-alias-bg-layer-3: #f9f9f6;--dsw-alias-bg-overlay: #ffffff;--dsw-alias-border-l1: #e8e6dc;--dsw-alias-border-l2: #dedcd2;--dsw-alias-border-l3: #d0cdc1;--dsw-alias-brand-primary: #d97757;--dsw-alias-brand-text: #faf9f5;--dsw-alias-button-primary-fill: #d97757;--dsw-alias-button-primary-hover: #c6613f;--dsw-alias-button-elevated-fill: #ffffff;--dsw-alias-button-floating-fill: #ffffff;--dsw-alias-button-floating-hover: #ffffff;--dsw-alias-button-info-fill: #d97757;--dsw-alias-button-info-hover: #c6613f;--dsw-alias-interactive-bg-active: rgba(217, 119, 87, .3);--dsh-claude-hover-bg: rgba(0, 0, 0, .08);--dsh-claude-inline-code-bg: rgba(0, 0, 0, .05);--dsh-claude-inline-code-fg: #943333;--dsh-claude-link: #184f95;--dsh-claude-link-underline: rgba(24, 79, 149, .6);--dsw-alias-markdown-code-block: #ffffff;--dsw-alias-markdown-code-block-banner: #ffffff;--dsw-alias-interactive-bg-hover: var(--dsh-claude-hover-bg);--dsw-alias-interactive-bg-hover-solid: #f0efe9;--dsw-alias-label-primary: #141413;--dsw-alias-label-primary-bluish: #141413;--dsw-alias-label-secondary: #6e6a60;--dsw-alias-label-tertiary: #8f8a7e;--dsw-alias-label-caption: #a6a094;--dsw-alias-state-business-primary: #d97757;--dsw-alias-state-business-tertiary: #e9dfd2;--dsw-alias-link: #c6613f;--dsw-shadow-lv2: 0 4px 18px rgba(20, 20, 19, .1), 0 1px 3px rgba(20, 20, 19, .05);--dsw-specific-input-major: #ffffff;--dsw-specific-selector: #fbfbf9;--dsw-specific-sidebar-fill: #fbfbf9;--dsw-alias-brand-primary-new-colorprimary-new-color: #d97757;--dsh-claude-canvas: #fcfcfb;--dsh-claude-sidebar-canvas: #fbfbf9;--dsh-claude-card: #fcfcfb;--dsh-claude-inverse-fill: #141413;--dsh-claude-inverse-ink: #faf9f5;--dsh-claude-table-head: #f0f0ef;--dsh-claude-scrollbar: rgba(208, 205, 193, .9);--dsh-claude-scrollbar-hover: rgba(143, 138, 126, .8);--dsh-claude-link-hover: #a94f2f;--dsh-claude-logo-ink: #141413;--dsw-specific-menu: #ffffff;--dsw-specific-bubble: var(--dsh-claude-hover-bg);--dsh-claude-chip: #f6f6f4;--dsh-claude-meter-peak: #a4621d;--dsh-claude-meter-valley: #3d7550}body[data-dsh-claude-style][data-dsh-claude-palette=claude][data-dsh-claude-brand=deepseek]:not([data-ds-dark-theme]){--dsw-alias-bg-base: #fafbff;--dsw-alias-bg-layer-1: #fafbff;--dsw-alias-bg-layer-2: #f7f9ff;--dsw-alias-bg-layer-3: #f4f7fe;--dsw-alias-border-l1: #e7ecf7;--dsw-alias-border-l2: #dde4f1;--dsw-alias-border-l3: #cfd8ea;--dsw-alias-brand-primary: #4d6bfe;--dsw-alias-brand-text: #fafbff;--dsw-alias-button-primary-fill: #4d6bfe;--dsw-alias-button-primary-hover: #3a57e8;--dsw-alias-button-info-fill: #4d6bfe;--dsw-alias-button-info-hover: #3a57e8;--dsw-alias-interactive-bg-active: rgba(77, 107, 254, .22);--dsh-claude-hover-bg: rgba(38, 49, 72, .08);--dsh-claude-inline-code-bg: rgba(38, 49, 72, .05);--dsh-claude-inline-code-fg: var(--dsw-alias-label-primary);--dsh-claude-link: #3b56d9;--dsh-claude-link-underline: rgba(59, 86, 217, .6);--dsw-alias-interactive-bg-hover-solid: #eef3fc;--dsw-alias-label-primary: #0f1115;--dsw-alias-label-primary-bluish: #0f1115;--dsw-alias-label-secondary: #61666b;--dsw-alias-label-tertiary: #81858c;--dsw-alias-label-caption: #adb2b8;--dsw-alias-state-business-primary: #4d6bfe;--dsw-alias-state-business-tertiary: #e9eeff;--dsw-alias-link: #3b56d9;--dsw-specific-selector: #f7f9ff;--dsw-specific-sidebar-fill: #f7f9ff;--dsw-alias-brand-primary-new-colorprimary-new-color: #4d6bfe;--dsh-claude-canvas: #fafbff;--dsh-claude-sidebar-canvas: #f7f9ff;--dsh-claude-card: #fafbff;--dsh-claude-table-head: #eff3fb;--dsh-claude-scrollbar: rgba(206, 216, 233, .9);--dsh-claude-scrollbar-hover: rgba(129, 133, 140, .8);--dsh-claude-link-hover: #2c43b8;--dsh-claude-logo-ink: #4d6bfe;--dsw-specific-bubble: #eaf0fe;--dsh-claude-chip: #f2f6fd;--dsh-claude-meter-peak: #9a5a1a;--dsh-claude-meter-valley: #2e7554}body[data-dsh-claude-style][data-dsh-claude-palette=claude][data-dsh-claude-brand=deepseek][data-ds-dark-theme]{--dsw-alias-bg-base: #13161d;--dsw-alias-bg-layer-1: #1a1e27;--dsw-alias-bg-layer-2: #212631;--dsw-alias-bg-layer-3: #2a303c;--dsw-alias-bg-overlay: #212631;--dsw-alias-border-l1: #212631;--dsw-alias-border-l2: #2a303c;--dsw-alias-border-l3: #363d4b;--dsw-alias-brand-primary: #4d6bfe;--dsw-alias-brand-text: #eef1f8;--dsw-alias-button-primary-fill: #4d6bfe;--dsw-alias-button-primary-hover: #6a84ff;--dsw-alias-button-elevated-fill: #212631;--dsw-alias-button-floating-fill: #212631;--dsw-alias-button-floating-hover: #2a303c;--dsw-alias-button-info-fill: #4d6bfe;--dsw-alias-button-info-hover: #6a84ff;--dsw-alias-interactive-bg-active: rgba(77, 107, 254, .3);--dsh-claude-inline-code-fg: var(--dsw-alias-label-primary);--dsh-claude-link: #8fa4ff;--dsh-claude-link-underline: rgba(143, 164, 255, .6);--dsw-alias-markdown-code-block: #1a1e27;--dsw-alias-markdown-code-block-banner: #212631;--dsw-alias-interactive-bg-hover-solid: #2a303c;--dsw-alias-label-primary: #eef1f8;--dsw-alias-label-primary-bluish: #eef1f8;--dsw-alias-label-secondary: #aeb5c4;--dsw-alias-label-tertiary: #8a92a3;--dsw-alias-label-caption: #666e7e;--dsw-alias-state-business-primary: #6a84ff;--dsw-alias-state-business-tertiary: #253056;--dsw-alias-link: #8fa4ff;--dsw-specific-input-major: #0e1117;--dsw-specific-selector: #2a303c;--dsw-specific-sidebar-fill: #13161d;--dsw-alias-brand-primary-new-colorprimary-new-color: #4d6bfe;--dsh-claude-canvas: #13161d;--dsh-claude-sidebar-canvas: #13161d;--dsh-claude-raised: #1b1f28;--dsh-claude-card: #1b1f28;--dsh-claude-ink-strong: #e9edf6;--dsh-claude-session-ink: #8a91a0;--dsh-claude-table-head: #212631;--dsh-claude-scrollbar: rgba(54, 61, 75, .9);--dsh-claude-scrollbar-hover: rgba(104, 112, 128, .9);--dsh-claude-link-hover: #b0c0ff;--dsh-claude-logo-ink: #4d6bfe;--dsw-specific-bubble: #232a3a;--dsh-claude-meter-peak: #e5ae67;--dsh-claude-meter-valley: #7cc2a0}body[data-dsh-claude-style][data-dsh-claude-palette=host]{--dsh-claude-hover-bg: var(--dsw-alias-interactive-bg-hover);--dsh-claude-inline-code-bg: var(--dsw-alias-markdown-inline-code);--dsh-claude-inline-code-fg: var(--dsw-alias-label-primary);--dsh-claude-link: var(--dsw-alias-link);--dsh-claude-link-underline: color-mix(in srgb, var(--dsw-alias-link) 60%, transparent);--dsh-claude-canvas: var(--dsw-alias-bg-base);--dsh-claude-sidebar-canvas: var(--dsw-specific-sidebar-fill);--dsh-claude-raised: var(--dsw-alias-bg-overlay);--dsh-claude-card: var(--dsw-alias-bg-overlay);--dsh-claude-inverse-fill: var(--dsw-alias-interactive-bg-hover);--dsh-claude-inverse-ink: var(--dsw-alias-label-primary);--dsh-claude-ink-strong: var(--dsw-alias-label-primary);--dsh-claude-session-ink: var(--dsw-alias-label-secondary);--dsh-claude-table-head: var(--dsw-alias-bg-layer-2);--dsh-claude-scrollbar: var(--dsw-alias-border-l2);--dsh-claude-scrollbar-hover: var(--dsw-alias-label-caption);--dsh-claude-link-hover: var(--dsw-alias-link);--dsh-claude-logo-ink: var(--dsw-alias-label-primary);--dsh-claude-chip: var(--dsw-specific-selector);--dsh-claude-meter-peak: var(--dsw-alias-state-warn-label);--dsh-claude-meter-valley: var(--dsw-alias-state-success-primary)}body[data-dsh-claude-style][data-dsh-claude-palette=claude]:not([data-ds-dark-theme]):not([data-we-wallpaper]){color:var(--dsw-alias-label-primary);background-color:var(--dsh-claude-canvas)}html:has(body[data-dsh-claude-style][data-dsh-claude-palette=claude]:not([data-ds-dark-theme])){background-color:#fcfcfb}html:has(body[data-dsh-claude-style][data-dsh-claude-palette=claude][data-dsh-claude-brand=deepseek]:not([data-ds-dark-theme])){background-color:#fafbff}body[data-dsh-claude-style][data-dsh-claude-palette=claude]:not([data-ds-dark-theme]):not([data-we-wallpaper]) #root{background-color:var(--dsh-claude-canvas)}body[data-dsh-claude-style][data-dsh-claude-palette=claude]:not([data-ds-dark-theme]):not([data-we-wallpaper]) :is([data-pane=sidebar],[class*=sidebarCol],.dshDesktopSidebarSurface){--dsw-specific-sidebar-fill: var(--dsh-claude-sidebar-canvas);background:var(--dsh-claude-sidebar-canvas)}body[data-dsh-claude-style]:not([data-ds-dark-theme]) :is([data-pane=sidebar],[class*=sidebarCol],.dshDesktopSidebarSurface){border-right:1px solid var(--dsw-alias-border-l1)}body[data-dsh-claude-style][data-dsh-claude-palette=claude]:not([data-ds-dark-theme]):not([data-we-wallpaper]) :is([data-pane=conversation],[class*=centerCol]){background:var(--dsh-claude-canvas)}body[data-dsh-claude-style]:not([data-ds-dark-theme]) a:not([class*=_linkButton]){color:var(--dsw-alias-link)}body[data-dsh-claude-style]:not([data-ds-dark-theme]) a:not([class*=_linkButton]):hover{color:var(--dsh-claude-link-hover)}body[data-dsh-claude-style]:not([data-ds-dark-theme]) button[class*=_brand],body[data-dsh-claude-style]:not([data-ds-dark-theme]) button[class*=_primary],body[data-dsh-claude-style]:not([data-ds-dark-theme]) [data-slot=\\\"sidebar.settings\\\"]>:is(button,[role=button]){background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground, #faf9f5)}body[data-dsh-claude-style]:not([data-ds-dark-theme]) button[class*=_brand]:hover,body[data-dsh-claude-style]:not([data-ds-dark-theme]) button[class*=_primary]:hover,body[data-dsh-claude-style]:not([data-ds-dark-theme]) [data-slot=\\\"sidebar.settings\\\"]>:is(button,[role=button]):hover{background:var(--dsw-alias-button-primary-hover)}body[data-dsh-claude-style]:not([data-ds-dark-theme]) blockquote{color:var(--dsw-alias-label-secondary);border-left-color:var(--dsw-alias-label-caption);background:#1414130a}body[data-dsh-claude-style]:not([data-ds-dark-theme]) pre{border-color:var(--dsw-alias-border-l1)}body[data-dsh-claude-style]:not([data-ds-dark-theme]) *{scrollbar-color:var(--dsh-claude-scrollbar) transparent}body[data-dsh-claude-style]:not([data-ds-dark-theme]) ::-webkit-scrollbar-thumb{background:var(--dsh-claude-scrollbar)}body[data-dsh-claude-style]:not([data-ds-dark-theme]) ::-webkit-scrollbar-thumb:hover{background:var(--dsh-claude-scrollbar-hover)}@font-face{font-family:JetBrains Mono;src:url(/dsh-claude-style/fonts/JetBrainsMonoVariable.ttf) format(\\\"truetype-variations\\\");font-weight:100 800;font-style:normal;font-display:swap}@font-face{font-family:JetBrains Mono;src:url(/dsh-claude-style/fonts/JetBrainsMonoItalicVariable.ttf) format(\\\"truetype-variations\\\");font-weight:100 800;font-style:italic;font-display:swap}@font-face{font-family:Anthropic Sans Web Text;src:url(/dsh-claude-style/fonts/AnthropicSansWebText.ttf) format(\\\"truetype\\\");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:\\\"Anthropic Serif Web Text\\\";src:url(/dsh-claude-style/fonts/AnthropicSerifWebText.ttf) format(\\\"truetype\\\");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:Claude Style Inter;src:url(/dsh-claude-style/fonts/InterVariable.woff2) format(\\\"woff2\\\");font-weight:100 900;font-style:normal;font-display:swap}@font-face{font-family:\\\"Claude Style Noto Serif\\\";src:url(/dsh-claude-style/fonts/NotoSerifVariable.woff2) format(\\\"woff2\\\");font-weight:100 900;font-style:normal;font-display:swap}body[data-dsh-claude-style]{font-family:var(--dsw-font-family);color:var(--dsw-alias-label-primary)}body[data-dsh-claude-style][data-dsh-claude-palette=claude]:not([data-we-wallpaper]){background-color:var(--dsh-claude-canvas)}body[data-dsh-claude-style] :is(h1,h2,h3,h4,[class*=headline],[class*=title]){font-family:var(--dsh-claude-font-serif);font-weight:500;letter-spacing:-.01em;line-height:1.25}body[data-dsh-claude-style] :is(h1,[class*=headline]){font-weight:500;letter-spacing:-.015em}body[data-dsh-claude-style] [class*=markdown]{font-family:var(--dsh-claude-font-prose);line-height:calc(23px + var(--dsh-content-font-delta, 0px))}body[data-dsh-claude-style] [class*=markdown] p{margin:12px 0}body[data-dsh-claude-style] [class*=markdown] h1{font:var(--dsw-font-markdown-h1);font-family:var(--dsh-claude-font-prose)}body[data-dsh-claude-style] [class*=markdown] h2{font:var(--dsw-font-markdown-h2);font-family:var(--dsh-claude-font-prose)}body[data-dsh-claude-style] [class*=markdown] h3{font:var(--dsw-font-markdown-h3);font-family:var(--dsh-claude-font-prose)}body[data-dsh-claude-style] [class*=markdown] h4{font:var(--dsw-font-markdown-h4);font-family:var(--dsh-claude-font-prose)}body[data-dsh-claude-style] [class*=markdown] :is(th,td){font-family:var(--dsh-claude-font-prose);font-size:var(--dsh-content-font-size, 14px)}body[data-dsh-claude-style] [class*=tableScroll] thead th,body[data-dsh-claude-style] [class*=tableScroll] thead td{background:var(--dsh-claude-table-head, #f0f0ef)!important}body[data-dsh-claude-style][data-ds-dark-theme] [class*=tableScroll] thead th,body[data-dsh-claude-style][data-ds-dark-theme] [class*=tableScroll] thead td{background:var(--dsh-claude-table-head)!important}body[data-dsh-claude-style] [class*=tableScroll]{border:.5px solid var(--dsw-alias-border-l2);border-radius:12px;padding-left:0!important;padding-right:0!important;background-clip:padding-box;width:100%!important;max-width:var(--dsh-chat-content-width, 100%)!important;margin-left:auto!important;margin-right:auto!important}body[data-dsh-claude-style] [class*=tableScroll] table{margin-left:0!important;margin-right:0!important;padding-left:0!important;padding-right:0!important;border-spacing:0!important;border-collapse:collapse!important;width:max-content!important;min-width:100%!important;max-width:max-content!important}body[data-dsh-claude-style] [class*=tableScroll] tr>:first-child{padding-left:16px!important}body[data-dsh-claude-style] [class*=tableScroll] tr>:last-child{padding-right:16px!important}body[data-dsh-claude-style] [class*=markdown] :is(h1,h2,h3){margin-top:24px;margin-bottom:12px}body[data-dsh-claude-style] [class*=markdown] :is(h1,h2,h3)+:is(h1,h2,h3){margin-top:8px}body[data-dsh-claude-style] [class*=markdown] :is(h4,h5,h6){margin-top:16px;margin-bottom:8px}body[data-dsh-claude-style] :is(pre,code,kbd,samp,[class*=mono],[class*=codeBlock],[class*=CodeBlock]){font-family:var(--dsh-claude-font-code)}body[data-dsh-claude-style] :is([class*=caption],[class*=sectionLabel]){font-size:12px;font-weight:500}body[data-dsh-claude-style] blockquote{font-family:var(--dsh-claude-font-prose);font-style:normal;color:var(--dsw-alias-label-secondary);border-left:2px solid var(--dsw-alias-label-caption);background:#faf9f50f;border-radius:0 8px 8px 0;padding:.6em 1em}body[data-dsh-claude-style] .md-code-block{border:1px solid var(--dsw-alias-border-l1);border-radius:12px}body[data-dsh-claude-style] .md-code-block{margin:12px 0}body[data-dsh-claude-style] .md-code-block pre,body[data-dsh-claude-style] .md-code-block pre code{line-height:calc(23px + var(--dsh-content-font-delta, 0px))!important;font-weight:500!important}body[data-dsh-claude-style] pre{font-size:calc(1em - 1px)!important;font-weight:500!important}body[data-dsh-claude-style] pre code{font-size:inherit!important;font-weight:500!important}body[data-dsh-claude-style] code:not(pre code){font-family:var(--dsh-claude-font-code);background:var(--dsh-claude-inline-code-bg);color:var(--dsh-claude-inline-code-fg);border:1px solid var(--dsw-alias-border-l1);border-radius:4px;padding:1px;font-size:calc(1em - 1px)!important;line-height:1.2}body[data-dsh-claude-style] [class*=linkIcon]{display:none}body[data-dsh-claude-style] :is(code:not(pre code)>[class*=_fileMention],code:not(pre code)>a){color:var(--dsh-claude-link);font-weight:500;text-decoration:underline;text-decoration-color:var(--dsh-claude-link-underline);text-decoration-thickness:1.5px;text-underline-offset:2px}body[data-dsh-claude-style] :is(code:not(pre code)>[class*=_fileMention],code:not(pre code)>a):hover,body[data-dsh-claude-style] :is(code:not(pre code)>[class*=_fileMention],code:not(pre code)>a):focus-visible{text-decoration-color:var(--dsh-claude-link)}body[data-dsh-claude-style] [class*=markdown] :is(a,a:focus){color:var(--dsh-claude-link);text-decoration:underline;text-decoration-color:var(--dsh-claude-link-underline);text-decoration-thickness:1.5px;text-underline-offset:2px}body[data-dsh-claude-style] [class*=markdown] :is(a:hover,a:focus-visible){text-decoration-color:var(--dsh-claude-link)}body[data-dsh-claude-style] hr{border:none;border-top:1px solid rgba(20,20,19,.14);margin:1.6em 0}body[data-dsh-claude-style] [role=tab]{font-weight:500}body[data-dsh-claude-style] [class*=triggerLabel],body[data-dsh-claude-style] [class*=selectLabel],body[data-dsh-claude-style] [class*=monoLabel]{font-family:var(--dsh-claude-font-code);font-size:12px;letter-spacing:0}@keyframes dsh-claude-popover-in{0%{opacity:0;transform:translateY(4px) scale(.98)}to{opacity:1;transform:none}}body[data-dsh-claude-style] .dsh-claude-popover-card{background:var(--dsw-alias-bg-overlay, #ffffff);border:1px solid var(--dsw-alias-border-l1, #e8e6dc);border-radius:12px;box-shadow:0 8px 30px #1414131f,0 2px 8px #1414130f;padding:6px;box-sizing:border-box;z-index:99999;visibility:hidden;opacity:0;pointer-events:none;transform:translateY(4px) scale(.98);transition:opacity .15s ease,transform .15s ease,visibility 0s linear .15s}body[data-dsh-claude-style] .dsh-claude-popover-card[data-open=true]{visibility:visible;transition:opacity .15s ease,transform .15s ease,visibility 0s;opacity:1;pointer-events:auto;transform:translateY(0) scale(1)}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-popover-card{background:var(--dsh-claude-raised);border-color:var(--dsw-alias-border-l2);box-shadow:0 8px 30px #00000080,0 2px 8px #0000004d}body[data-dsh-claude-style][data-dsh-claude-palette=host] .dsh-claude-popover-card{-webkit-backdrop-filter:blur(16px) saturate(1.4)!important;backdrop-filter:blur(16px) saturate(1.4)}body[data-dsh-claude-style] .dsh-claude-popover-body{display:flex;flex-direction:column;gap:3px;min-width:0}body[data-dsh-claude-style] .dsh-claude-popover-status{color:var(--dsw-alias-label-tertiary, #8f8d84)!important;font-size:12px!important;line-height:20px!important;padding:4px 8px!important}body[data-dsh-claude-style] .dsh-claude-popover-item{width:100%;min-height:32px;padding:2px 7px;border-radius:6px;border:none!important;background:transparent;color:var(--dsw-alias-label-primary, #141413);font-size:13px;font-weight:400;display:flex;align-items:center;justify-content:flex-start;gap:8px;box-shadow:none;cursor:pointer;font-family:var(--dsw-font-family);transition:background-color .12s ease;box-sizing:border-box}body[data-dsh-claude-style] .dsh-claude-popover-item:hover{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))!important;color:var(--dsw-alias-label-primary, #141413)!important}body[data-dsh-claude-style] .dsh-claude-popover-item-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;flex:none;color:var(--dsw-alias-label-secondary, #787672)}body[data-dsh-claude-style] .dsh-claude-popover-item-icon svg{width:16px;height:16px}body[data-dsh-claude-style] .dsh-claude-popover-item-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}body[data-dsh-claude-style] .dsh-claude-popover-item-col{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;text-align:left}body[data-dsh-claude-style] .dsh-claude-popover-item-col .dsh-claude-popover-item-text{font-weight:500;line-height:16px}body[data-dsh-claude-style] .dsh-claude-popover-item-desc{font-size:11px;line-height:14px;color:var(--dsw-alias-label-tertiary, #8f8d84);overflow:hidden;text-overflow:ellipsis}body[data-dsh-claude-style] .dsh-claude-popover-check{flex:none;display:inline-flex;align-items:center;color:var(--dsw-alias-brand-primary, #d97757)}body[data-dsh-claude-style] .dsh-claude-popover-check[hidden]{display:none}body[data-dsh-claude-style] .dsh-claude-popover-item-badge{margin-left:auto!important;font-size:10px!important;line-height:14px!important;padding:0 5px!important;border-radius:8px!important;background:var(--dsw-alias-interactive-bg-hover, rgba(0, 0, 0, .08))!important;color:var(--dsw-alias-label-secondary, #787672)!important}body[data-dsh-claude-style] .dsh-claude-popover-item.dsh-claude-popover-item-stale .dsh-claude-popover-item-text,body[data-dsh-claude-style] .dsh-claude-popover-item.dsh-claude-popover-item-stale .dsh-claude-popover-item-badge{color:var(--dsw-alias-label-tertiary, #8f8d84)!important}body[data-dsh-claude-style] .dsh-claude-popover-item.dsh-claude-popover-item-stale .dsh-claude-popover-item-badge{background:transparent!important}body[data-dsh-claude-style] [class*=footArea]>.dsh-claude-popover-item{display:none!important}body[data-dsh-claude-style] [data-dsh-claude-pill]:before{content:\\\"\\\";position:absolute;left:0;width:var(--dsh-claude-pill-w, 0px);transform:translate(var(--dsh-claude-pill-x, 0px));pointer-events:none;transition:transform .24s cubic-bezier(.22,.61,.36,1),width .24s cubic-bezier(.22,.61,.36,1)}body[data-dsh-claude-style] [data-dsh-claude-pill]>*{position:relative;z-index:1}body[data-dsh-claude-style][data-dsh-claude-palette=claude]:not([data-we-wallpaper]) :is([data-pane=sidebar],[class*=sidebarCol],.dshDesktopSidebarSurface){--dsw-specific-sidebar-fill: var(--dsh-claude-sidebar-canvas);background:var(--dsh-claude-sidebar-canvas)}body[data-dsh-claude-style] :is([data-pane=sidebar],[class*=sidebarCol],.dshDesktopSidebarSurface){border-right:1px solid var(--dsw-alias-border-l1)}body[data-dsh-claude-style][data-dsh-claude-palette=claude]:not([data-we-wallpaper]) :is([data-pane=conversation],[class*=centerCol]){background:var(--dsh-claude-canvas)}html[data-windows-titlebar] body[data-dsh-claude-style]:not([data-we-wallpaper]) [class*=_frame]:has(>[class*=_sidebarCol]){--dsh-windows-content-radius: 0px;background:var(--dsh-claude-canvas)!important}html[data-windows-titlebar] body[data-dsh-claude-style] [class*=_frame]:has(>[class*=_sidebarCol]):before{background:transparent!important}html[data-windows-titlebar] body[data-dsh-claude-style]>span[style*=--dsw-specific-sidebar-fill]{background-color:transparent!important}html[data-windows-titlebar] body[data-dsh-claude-style]:not([data-we-wallpaper]) [class*=_frame]>[class*=_sidebarCol]{box-shadow:0 calc(-1 * var(--dsh-windows-titlebar-height)) 0 0 var(--dsh-claude-sidebar-canvas)}html[data-windows-titlebar] body[data-dsh-claude-style]:not([data-we-wallpaper]) [class*=_frame]>[class*=_centerCol]{box-shadow:0 calc(-1 * var(--dsh-windows-titlebar-height)) 0 0 var(--dsh-claude-canvas)}html[data-windows-titlebar] body[data-dsh-claude-style] [class*=_frame]>[data-side=sidebar]:before{content:\\\"\\\";position:absolute;left:3px;bottom:100%;height:var(--dsh-windows-titlebar-height);border-left:1px solid var(--dsw-alias-border-l1);pointer-events:none}body[data-dsh-claude-style][data-dsh-claude-dock-look=card] [class*=_rightbarCol] :is([data-dockkit-empty],[data-dockkit-host=dock]>[data-dockkit-pane]){margin:8px;overflow:hidden;border:1px solid var(--dsw-alias-border-l1);border-radius:16px;box-shadow:var(--dsw-elevation-prominent)}body[data-dsh-claude-style] [class*=_rightbarCol] [class*=_guide]{justify-content:flex-start!important;overflow-y:auto!important}body[data-dsh-claude-style] [class*=_rightbarCol] [class*=_guide]>:first-child{margin-top:auto!important}body[data-dsh-claude-style] [class*=_rightbarCol] [class*=_guide]>:last-child{margin-bottom:auto!important}body[data-dsh-claude-style] a:not([class*=_linkButton]){color:var(--dsw-alias-link)}body[data-dsh-claude-style] a:not([class*=_linkButton]):hover{color:var(--dsh-claude-link-hover)}body[data-dsh-claude-style] button[class*=brand]:not([class*=dsh-claude]){color:var(--dsw-alias-brand-primary)}body[data-dsh-claude-style] button[class*=_brand],body[data-dsh-claude-style] button[class*=_primary],body[data-dsh-claude-style] [data-slot=\\\"sidebar.settings\\\"]>:is(button,[role=button]){border-radius:9999px;background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground, #faf9f5);font-weight:500}body[data-dsh-claude-style] button[class*=_brand]:hover,body[data-dsh-claude-style] button[class*=_primary]:hover,body[data-dsh-claude-style] [data-slot=\\\"sidebar.settings\\\"]>:is(button,[role=button]):hover{background:var(--dsw-alias-button-primary-hover)}body[data-dsh-claude-style]:not([data-ds-dark-theme]) button[class*=brand]:not([class*=dsh-claude]),body[data-dsh-claude-style][data-ds-dark-theme] button[class*=brand]:not([class*=dsh-claude]){background:transparent;border:none;border-radius:0}body[data-dsh-claude-style]:not([data-ds-dark-theme]) button[class*=brand]:not([class*=dsh-claude]){color:var(--dsh-claude-logo-ink)}body[data-dsh-claude-style][data-ds-dark-theme] button[class*=brand]:not([class*=dsh-claude]){color:var(--dsh-claude-logo-ink)}body[data-dsh-claude-style] :is([class*=_tagSystem],[class*=_tagUser],[class*=_tagContext],[class*=_tagMessage],[class*=_tagTool],[class*=_tagSubtool],[class*=_kindTag]:not([class*=_kindTagIcon],[class*=_kindTagLabel]),[class*=_rowTag],[class*=_optionLine]>[class*=_badge],[class*=_attemptBadge],[class*=_keyBadge]){border-radius:9999px;corner-shape:round}body[data-dsh-claude-style] *{scrollbar-width:thin;scrollbar-color:var(--dsh-claude-scrollbar) transparent}body[data-dsh-claude-style] ::-webkit-scrollbar{width:8px;height:8px}body[data-dsh-claude-style] ::-webkit-scrollbar-track{background:transparent}body[data-dsh-claude-style] ::-webkit-scrollbar-thumb{background:var(--dsh-claude-scrollbar);border-radius:9999px}body[data-dsh-claude-style] ::-webkit-scrollbar-thumb:hover{background:var(--dsh-claude-scrollbar-hover)}body[data-dsh-claude-style] :is([data-chat-flow],[data-lexical-editor]) :is(p,li,td,th,blockquote,pre,h1,h2,h3,h4,h5,h6)::selection{background-color:#3366d0!important;color:#fff!important}body[data-dsh-claude-style][data-dsh-window-blur] :is([data-chat-flow],[data-lexical-editor]) :is(p,li,td,th,blockquote,pre,h1,h2,h3,h4,h5,h6)::selection{background-color:#c7c7c6!important;color:#000!important}body[data-dsh-claude-style] [data-chat-flow] code:not(pre code)::selection{background-color:#285ece!important}body[data-dsh-claude-style][data-dsh-window-blur] [data-chat-flow] code:not(pre code)::selection{background-color:#c4c4c3!important}body[data-dsh-claude-style]:not([data-ds-dark-theme]) [data-chat-flow] code:not(pre code)::selection{background-color:#366bdb!important}body[data-dsh-claude-style]:not([data-ds-dark-theme])[data-dsh-window-blur] [data-chat-flow] code:not(pre code)::selection{background-color:#d1d1d0!important}body[data-dsh-claude-style] :is(button,input,textarea,select,[role=button],[role=tab],[role=treeitem]){outline:none}body[data-dsh-claude-style] :is(button,input,textarea,select,[role=button],[role=tab],[role=treeitem]):focus-visible{outline:2px solid rgba(20,20,19,.45);outline-offset:1px}body[data-dsh-claude-style][data-ds-dark-theme] :is(button,input,textarea,select,[role=button],[role=tab],[role=treeitem]):focus-visible{outline-color:#faf9f599}body[data-dsh-claude-style] [data-slot=\\\"conversation.session.header.actions\\\"]>*{position:relative;z-index:9}body[data-dsh-claude-style] [class*=_header]:has([class*=_tabs]){border-bottom-color:transparent;position:relative;overflow:visible}body[data-dsh-claude-style] [class*=_header]:has([class*=_tabs]):after{content:\\\"\\\";position:absolute;left:0;right:0;top:100%;height:var(--dsh-transcript-fade-h, 28px);background:linear-gradient(to bottom,var(--dsw-alias-bg-base, #FCFCFB) 0%,color-mix(in srgb,var(--dsw-alias-bg-base, #FCFCFB) 82%,transparent) 32%,color-mix(in srgb,var(--dsw-alias-bg-base, #FCFCFB) 40%,transparent) 68%,transparent 100%);pointer-events:none;z-index:1}body[data-dsh-claude-style][data-dsh-claude-motion=reduced] [class*=dsh-claude-]{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}body[data-dsh-claude-style] [data-dsh-view-tabs]{display:inline-flex;width:fit-content;max-width:100%;flex:none;align-self:flex-start;align-items:center;gap:2px;padding:2px;border-radius:7px;background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .06));justify-self:center;transform:translateY(var(--dsh-view-tabs-shift, -10px));position:relative;opacity:0;transition:opacity .16s ease}body[data-dsh-claude-style] [class*=centerCol]:hover [data-dsh-view-tabs]{opacity:1}body[data-dsh-claude-style][data-ds-dark-theme] [data-dsh-view-tabs]{background:#ffffff14}body[data-dsh-claude-style] [data-dsh-view-tabs]>[class*=_tab]{appearance:none;border:none!important;background:transparent;color:var(--dsw-alias-label-tertiary, #8f8d84);font-family:var(--dsw-font-family);font-size:12px;font-weight:500;line-height:18px;height:22px;padding:0 10px;border-radius:5px;cursor:pointer;user-select:none;-webkit-user-select:none;transition:color .2s ease}body[data-dsh-claude-style] [data-dsh-view-tabs]>[class*=_tab]:hover{color:var(--dsw-alias-label-primary, #141413)}body[data-dsh-claude-style] [data-dsh-view-tabs]>[class*=_tab][aria-selected=true],body[data-dsh-claude-style] [data-dsh-view-tabs]>[class*=_tab][class*=Active]{background:var(--dsw-alias-bg-overlay, #ffffff);color:var(--dsw-alias-label-primary, #141413);box-shadow:0 1px 2px #1414131a}body[data-dsh-claude-style][data-ds-dark-theme] [data-dsh-view-tabs]>[class*=_tab][aria-selected=true],body[data-dsh-claude-style][data-ds-dark-theme] [data-dsh-view-tabs]>[class*=_tab][class*=Active]{background:#ffffff24;color:var(--dsh-claude-ink-strong);box-shadow:none}body[data-dsh-claude-style] [data-dsh-view-tabs][data-dsh-claude-pill]:before{top:2px;bottom:2px;border-radius:5px;background:var(--dsw-alias-bg-overlay, #ffffff);box-shadow:0 1px 2px #1414131a}body[data-dsh-claude-style][data-ds-dark-theme] [data-dsh-view-tabs][data-dsh-claude-pill]:before{background:#ffffff24;box-shadow:none}body[data-dsh-claude-style] [data-dsh-view-tabs][data-dsh-claude-pill]>[class*=_tab][aria-selected=true],body[data-dsh-claude-style] [data-dsh-view-tabs][data-dsh-claude-pill]>[class*=_tab][class*=Active]{background:transparent;box-shadow:none}body[data-dsh-claude-style] [data-dsh-view-tabs]>[class*=_tab]:after{display:none}body[data-dsh-claude-style][data-dsh-titlebar-tabs] [data-dsh-view-tabs]{position:fixed!important;top:calc(var(--dsh-windows-titlebar-height, 40px) / 2)!important;left:50%!important;margin:0!important;transform:translate(-50%,-50%)!important;justify-self:auto!important;z-index:30!important;-webkit-app-region:no-drag!important;opacity:0!important;transition:opacity .3s ease!important}body[data-dsh-claude-style][data-dsh-titlebar-tabs] [data-dsh-view-tabs]:hover,body[data-dsh-claude-style][data-dsh-titlebar-tabs] [class*=centerCol]:hover [data-dsh-view-tabs]{opacity:1!important}body[data-dsh-claude-style][data-dsh-titlebar-tabs] [class*=_header]:has([class*=_tabs]){min-height:0!important;padding-bottom:10px!important}body[data-dsh-claude-style][data-dsh-claude-brand=claude] [class*=fishHitbox]>*{display:none!important}body[data-dsh-claude-style][data-dsh-claude-brand=claude] [class*=fishHitbox] svg{display:none}body[data-dsh-claude-style][data-dsh-claude-brand=claude] [class*=fishHitbox]:before{content:\\\"\\\";flex:none;width:42.5px;height:42.5px;background-repeat:no-repeat;background-position:center;background-size:contain}body[data-dsh-claude-style][data-dsh-claude-brand=claude] [class*=fishHitbox]:before{background-image:var(--dsh-claude-image-claude-mark-clay)}body[data-dsh-claude-style][data-dsh-claude-brand=deepseek] [class*=fishHitbox] svg{color:var(--dsh-claude-logo-ink)}body[data-dsh-claude-style] [class*=previewBadge]{display:none}body[data-dsh-claude-style] [class*=headline]:has([class*=fishHitbox]){font-size:44.2px;line-height:54.4px;font-weight:400}body[data-dsh-claude-style][data-dsh-header-band~=title] [data-dsh-header-title]{position:fixed!important;top:var(--dsh-header-band-title-top, calc(var(--dsh-windows-titlebar-height, 40px) / 2))!important;left:var(--dsh-header-band-left)!important;max-width:var(--dsh-header-band-max, none)!important;margin:0!important;transform:translateY(-50%)!important;z-index:30!important;-webkit-app-region:no-drag!important}body[data-dsh-claude-style][data-dsh-titlebar-tabs] [data-dsh-header-band-tabs]{left:var(--dsh-header-band-tabs-left, 50%)!important}body[data-dsh-claude-style][data-dsh-header-band~=title] [data-dsh-header-row]{position:relative!important;top:var(--dsh-header-band-row-lift, 0px)!important;-webkit-app-region:no-drag!important}body[data-dsh-claude-style][data-dsh-header-band~=title] [data-dsh-header-row] [class*=_label]{display:flex!important}body[data-dsh-claude-style][data-dsh-header-band~=actions] [data-dsh-header-actions],body[data-dsh-claude-style][data-dsh-header-band~=actions] [data-dsh-header-corner]{position:fixed!important;top:calc(var(--dsh-windows-titlebar-height, 40px) / 2)!important;right:var(--dsh-header-band-right)!important;margin:0!important;transform:translateY(-50%)!important;z-index:30!important;-webkit-app-region:no-drag!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card]{font-size:15px;border-radius:18px;border:1px solid var(--dsw-alias-border-l1);position:relative;z-index:2;gap:8px;padding-bottom:2px;min-height:0;height:auto;transition:border-color .12s ease,box-shadow .12s ease}body[data-dsh-claude-style][data-dsh-claude-composer-active] :is([class*=composerHero],[data-phase=hero]) [data-composer-input]{min-height:86px}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-input]{min-height:36px;height:auto}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=hero] [data-dsh-synthetic-placeholder]{position:absolute!important;top:4px!important;left:14px!important;right:8px!important;color:var(--dsw-alias-label-caption)!important;white-space:nowrap!important;text-overflow:ellipsis!important;overflow:hidden!important;pointer-events:none!important;user-select:none!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card] [class*=_row]{padding-bottom:2px}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) [data-composer-card]{background:var(--dsw-specific-input-major);box-shadow:0 4px 12px #1414130a,0 1px 3px #14141305}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-ds-dark-theme] [data-composer-card]{box-shadow:0 4px 12px #0000004d,0 1px 3px #00000026}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) [data-composer-card]:focus-within{border-color:#1414132e;box-shadow:0 0 0 1px #14141311,0 6px 18px #14141308,0 2px 6px #14141304}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-ds-dark-theme] [data-composer-card]:focus-within{border-color:#faf9f538;box-shadow:0 0 0 1px #faf9f517,0 6px 24px #00000038,0 2px 8px #0000001c}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) [class*=_composerStack]:focus-within>[class*=heroWorkspaceRow]:not(:focus-within){border-color:#1414132e}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-ds-dark-theme] [class*=_composerStack]:focus-within>[class*=heroWorkspaceRow]:not(:focus-within){border-color:#faf9f538}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card]:after{border-radius:18px;-webkit-mask:url(\\\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27%3E%3Crect width=%27100%25%27 height=%27100%25%27 fill=%27none%27 rx=%2718%27 ry=%2718%27 stroke=%27black%27 stroke-width=%272%27 stroke-dasharray=%274 4%27/%3E%3C/svg%3E\\\");mask:url(\\\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27%3E%3Crect width=%27100%25%27 height=%27100%25%27 fill=%27none%27 rx=%2718%27 ry=%2718%27 stroke=%27black%27 stroke-width=%272%27 stroke-dasharray=%274 4%27/%3E%3C/svg%3E\\\")}body[data-dsh-claude-style][data-dsh-claude-composer-active] button[data-dsh-claude-control=commands]{border-radius:7px}body[data-dsh-claude-style][data-dsh-claude-composer-active] :is(button[data-dsh-claude-control=send],button[data-dsh-claude-control=stop]){border-radius:7px}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) button[data-dsh-claude-control=commands]{background:transparent}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) button[data-dsh-claude-control=commands]:hover:not(:disabled){background:var(--dsh-claude-chip)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card] [class*=_trigger]{font-size:14px;border-radius:7px}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) [data-composer-card] [class*=_trigger]:hover:not(:disabled){background:var(--dsh-claude-chip)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card] [class*=_chevron]{display:none}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-dsh-claude-home-layout=studio]) [class*=_composerStack][data-composer-variant=hero]{--dsh-claude-bar-h: 96px}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-dsh-claude-home-layout=studio]) [class*=_composerStack][data-composer-variant=hero] *:has([data-composer-card]){order:1;padding-bottom:0!important}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-dsh-claude-home-layout=studio]) [class*=_composerStack][data-composer-variant=hero] [data-composer-card]{gap:8px!important;padding-bottom:2px!important;min-height:0!important;height:auto!important}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-dsh-claude-home-layout=studio]) [class*=_composerStack][data-composer-variant=hero]>[class*=heroWorkspaceRow]{order:2;position:relative;z-index:1;box-sizing:border-box;height:calc(var(--dsh-claude-bar-h) + 18px);width:calc(100% - var(--dsh-composer-side-clearance, 0px) - var(--dsh-composer-side-clearance, 0px));max-width:var(--dsh-composer-card-max-width, 100%);margin:calc(0px - var(--dsh-composer-stack-gap, 6px) - 18px) auto 0;padding:18px 16px 0;background:transparent;border-left:1px solid var(--dsw-alias-border-l1);border-right:1px solid var(--dsw-alias-border-l1);border-bottom:1px solid var(--dsw-alias-border-l1);border-top:none;border-radius:0 0 18px 18px;display:flex;align-items:center;justify-content:space-between;transition:border-color .12s ease}body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=heroWorkspaceRow] :is(button,[role=button]){font-size:13px;color:var(--dsw-alias-label-secondary);border-radius:7px}body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=heroWorkspaceRow] :is([class*=_chevron],[class*=Chevron]){display:none}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card]:not([data-has-attachments=true])[data-dsh-claude-draft-empty] button[data-dsh-claude-control=send]{box-sizing:border-box;background:transparent;color:var(--dsw-alias-label-caption);border:1px solid var(--dsw-alias-border-l2);box-shadow:none;cursor:default}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline],body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline]:focus-within,body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card]:focus-within{background:transparent;border:none!important;box-shadow:none;outline:none;padding:0;gap:0;display:flex;flex-direction:column;position:relative;width:100%;max-width:var(--dsh-composer-card-max-width, 100%);box-sizing:border-box;overflow:visible;height:auto}body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]){flex:0 0 auto;overflow:visible;height:auto;max-height:none}body[data-dsh-claude-style][data-dsh-claude-composer-active]{--dsh-composer-fade-h: 40px}body[data-dsh-claude-style][data-dsh-claude-composer-active] :is([data-phase=active],[data-content-phase=active]) [data-composer-seat]{background:var(--dsw-alias-bg-base)}body[data-dsh-claude-style][data-dsh-claude-composer-active] :is([data-phase=active],[data-content-phase=active]) [data-composer-seat]:before{content:\\\"\\\";position:absolute;left:0;right:0;bottom:100%;height:var(--dsh-composer-fade-h, 40px);background:linear-gradient(to top,var(--dsw-alias-bg-base, #FCFCFB) 0%,color-mix(in srgb,var(--dsw-alias-bg-base, #FCFCFB) 82%,transparent) 32%,color-mix(in srgb,var(--dsw-alias-bg-base, #FCFCFB) 40%,transparent) 68%,transparent 100%);pointer-events:none}body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=viewArea]{padding-bottom:var(--dsh-composer-fade-h, 40px)}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-dsh-claude-composer-hidden] [data-composer-seat]{display:none!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline]:not([data-has-attachments=true]) [class*=_rail],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card]:not([data-has-attachments=true]) [class*=_rail]{display:none!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline][data-has-attachments=true] [class*=_rail],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card][data-has-attachments=true] [class*=_rail]{background:var(--dsw-specific-input-major, #ffffff);border:1px solid var(--dsw-alias-border-l1)!important;border-bottom:none!important;border-radius:14px 14px 0 0;padding:12px 14px 10px;margin:0;width:100%;max-width:100%;box-sizing:border-box;min-height:162px;height:auto;overflow:visible;box-shadow:none;position:relative;transition:border-color .12s ease,box-shadow .12s ease}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) [data-composer-card][data-composer-variant=inline][data-has-attachments=true] [class*=_rail],body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card][data-has-attachments=true] [class*=_rail]{background:var(--dsw-specific-input-major);border-color:var(--dsw-alias-border-l1)}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) [data-composer-card][data-composer-variant=inline]:focus-within [class*=_rail],body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card]:focus-within [class*=_rail]{border-color:#1414132e!important}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-ds-dark-theme] [data-composer-card][data-composer-variant=inline]:focus-within [class*=_rail],body[data-dsh-claude-style][data-dsh-claude-composer-active][data-ds-dark-theme] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card]:focus-within [class*=_rail]{border-color:#faf9f538!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline][data-has-attachments=true] [class*=_rail] [class*=_rail],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card][data-has-attachments=true] [class*=_rail] [class*=_rail]{background:transparent;border:none!important;box-shadow:none;border-radius:0;padding:0;margin:0;min-height:140px;height:auto;display:flex;align-items:center;gap:10px;overflow-x:auto;overflow-y:hidden}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card] [class*=_rail] [data-dsh-claude-attachment]{width:140px;height:140px;min-width:140px;min-height:140px;max-width:140px;max-height:140px;border-radius:12px;border:1px solid var(--dsw-alias-border-l1);box-shadow:none;overflow:hidden;position:relative;z-index:5;flex:0 0 140px;box-sizing:border-box}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) [data-composer-card] [class*=_rail] [data-dsh-claude-attachment]{border-color:var(--dsw-alias-border-l1)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card] [class*=_rail] [data-dsh-claude-attachment] :is(img,canvas,[class*=_preview],[class*=_image]){width:100%;height:100%;max-width:100%;max-height:100%;object-fit:cover;display:block;border-radius:11px}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card] [class*=_rail] [data-dsh-claude-attachment] :is(button,[role=button],[class*=_close],[class*=_delete],[class*=_remove],[class*=badge],[class*=_tag]){position:absolute;z-index:6}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] [data-input-scroll],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] [data-input-scroll]{background:var(--dsw-specific-input-major, #ffffff);border:1px solid var(--dsw-alias-border-l1);border-radius:14px;min-height:38px;height:auto;max-height:var(--dsh-composer-text-max-height, 180px);box-sizing:border-box;display:block;width:100%;max-width:100%;overflow-y:auto;overflow-x:hidden;padding:7px 36px 7px 14px;margin:0;position:relative;z-index:2;cursor:text;box-shadow:0 1px 3px #14141308;transition:border-color .12s ease,box-shadow .12s ease}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline][data-has-attachments=true] [data-input-scroll],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card][data-has-attachments=true] [data-input-scroll]{border-top:none!important;border-radius:0 0 14px 14px;margin-top:-1px;min-height:32px;padding:8px 36px 6px 14px}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) [data-composer-card][data-composer-variant=inline] [data-input-scroll],body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] [data-input-scroll]{background:var(--dsw-specific-input-major);border-color:var(--dsw-alias-border-l1);box-shadow:0 1px 3px #14141308}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-ds-dark-theme] [data-composer-card][data-composer-variant=inline] [data-input-scroll],body[data-dsh-claude-style][data-dsh-claude-composer-active][data-ds-dark-theme] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] [data-input-scroll]{box-shadow:0 1px 3px #00000026}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline][class*=_cardWorkspaceTrigger]:after,body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card][class*=_cardWorkspaceTrigger]:after{display:none!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline][class*=_cardWorkspaceTrigger] [data-input-scroll],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card][class*=_cardWorkspaceTrigger] [data-input-scroll]{border-style:dashed!important;border-color:var(--dsw-alias-border-l4)!important;box-shadow:none!important;cursor:pointer!important;transition:border-color .1s ease!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline][class*=_cardWorkspaceTrigger]:hover [data-input-scroll],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card][class*=_cardWorkspaceTrigger]:hover [data-input-scroll]{border-color:var(--dsw-alias-state-business-primary)!important}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) [data-composer-card][data-composer-variant=inline]:focus-within [data-input-scroll],body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card]:focus-within [data-input-scroll]{border-color:#1414132e!important;box-shadow:0 0 0 1px #14141311,0 4px 12px #14141306}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-ds-dark-theme] [data-composer-card][data-composer-variant=inline]:focus-within [data-input-scroll],body[data-dsh-claude-style][data-dsh-claude-composer-active][data-ds-dark-theme] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card]:focus-within [data-input-scroll]{border-color:#faf9f538!important;box-shadow:0 0 0 1px #faf9f517,0 4px 16px #0003}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) [data-composer-card][data-composer-variant=inline][data-has-attachments=true]:focus-within [data-input-scroll],body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]) [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card][data-has-attachments=true]:focus-within [data-input-scroll]{box-shadow:0 4px 12px #14141306}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-ds-dark-theme] [data-composer-card][data-composer-variant=inline][data-has-attachments=true]:focus-within [data-input-scroll],body[data-dsh-claude-style][data-dsh-claude-composer-active][data-ds-dark-theme] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card][data-has-attachments=true]:focus-within [data-input-scroll]{box-shadow:0 4px 16px #0003}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] [data-input-scroll] [class*=_grow],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] [data-input-scroll] [class*=_grow]{width:100%;max-width:100%;min-height:24px;position:relative;display:block;box-sizing:border-box;overflow-x:hidden}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] [data-composer-input],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] [data-composer-input]{min-height:24px;height:auto;line-height:24px;padding:0;font-size:14px;width:100%;max-width:100%;box-sizing:border-box;cursor:text;outline:none;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;overflow-x:hidden}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] [data-composer-placeholder],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] [data-composer-placeholder]{line-height:24px;height:24px;position:absolute;top:0;left:0;right:0;max-width:100%;box-sizing:border-box;font-size:14px;color:var(--dsw-alias-label-caption);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;pointer-events:none;user-select:none}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] button[data-dsh-claude-control=send],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] button[data-dsh-claude-control=send]{position:absolute;inset:auto 8px 40px auto;width:26px;height:26px;min-width:26px;padding:0;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;z-index:10;box-shadow:none;background:transparent;color:var(--dsw-alias-label-caption);border:none!important;cursor:pointer;transition:color .12s ease,background-color .12s ease}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] button[data-dsh-claude-control=send] :is(svg,[class*=_chevron],span){display:none}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] button[data-dsh-claude-control=send]:after,body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] button[data-dsh-claude-control=send]:after{content:\\\"\\\";width:16px;height:16px;background:currentColor;-webkit-mask:url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='miter'%3E%3Cpath d='M8 3.75h5.25v7H3M6 7.75l-3 3 3 3'/%3E%3C/svg%3E\\\") center / contain no-repeat;mask:url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='miter'%3E%3Cpath d='M8 3.75h5.25v7H3M6 7.75l-3 3 3 3'/%3E%3C/svg%3E\\\") center / contain no-repeat}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] button[data-dsh-claude-control=send]:not(:disabled):hover,body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] button[data-dsh-claude-control=send]:not(:disabled):hover{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))!important;color:var(--dsw-alias-label-primary)!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline]:not([data-dsh-claude-draft-empty]) button[data-dsh-claude-control=send],body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline][data-has-attachments=true] button[data-dsh-claude-control=send],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card]:not([data-dsh-claude-draft-empty]) button[data-dsh-claude-control=send],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card][data-has-attachments=true] button[data-dsh-claude-control=send]{color:var(--dsw-alias-label-primary)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] button[data-dsh-claude-control=stop],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] button[data-dsh-claude-control=stop]{position:absolute;inset:auto 8px 40px auto;width:26px;height:26px;min-width:26px;padding:0;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;z-index:10;background:transparent;color:var(--dsw-alias-label-primary, #141413);border:none!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] button[data-dsh-claude-control=stop]:hover:not(:disabled),body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] button[data-dsh-claude-control=stop]:hover:not(:disabled){background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] button[data-dsh-claude-control=stop]:before,body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] button[data-dsh-claude-control=stop]:before{content:\\\"\\\";display:block;position:absolute;inset:0;margin:auto;width:16px;height:16px;box-sizing:border-box;border:1.6px solid currentColor;border-radius:50%;corner-shape:round}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] button[data-dsh-claude-control=stop] svg,body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] button[data-dsh-claude-control=stop] svg{display:block;width:7px;height:7px;border-radius:1.5px}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] button[data-dsh-claude-control=stop]:after,body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] button[data-dsh-claude-control=stop]:after{display:none}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] [class*=_row],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] [class*=_row]{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;padding:0 4px;margin:6px 0 0;background:transparent;border:none!important;box-shadow:none;min-height:28px;height:28px;width:100%;max-width:100%;box-sizing:border-box;overflow:visible;position:relative;z-index:3}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] [class*=_rows],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] [class*=_rows]{display:block!important;height:auto!important;min-height:0!important;width:auto!important;max-width:none!important;padding:0!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] [class*=_rows] [class*=_row],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] [class*=_rows] [class*=_row]{display:flex!important;height:auto!important;min-height:0!important;width:auto!important;max-width:none!important;padding:2px 0!important;margin:0!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] [class*=_tools],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] [class*=_tools]{display:flex;align-items:center;gap:8px;flex:0 0 auto;overflow:visible}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] [class*=_modes],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] [class*=_modes]{order:1;display:inline-flex;align-items:center;overflow:visible}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] button[data-dsh-claude-control=commands],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] button[data-dsh-claude-control=commands]{order:3;width:24px;height:24px;border-radius:6px;background:transparent;color:var(--dsw-alias-label-secondary);display:inline-flex;align-items:center;justify-content:center}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] button[data-dsh-claude-control=commands]:hover:not(:disabled),body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] button[data-dsh-claude-control=commands]:hover:not(:disabled){background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08));color:var(--dsw-alias-label-primary)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] [class*=_trailing],body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] [class*=_trailing]{display:flex;align-items:center;gap:8px;margin-left:auto;flex:0 0 auto}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] [data-slot=\\\"conversation.input.model\\\"]>[class*=_root]>[class*=_trigger],body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card][data-composer-variant=inline] [data-slot=\\\"conversation.input.model\\\"]>.dsh-claude-model-btn{display:inline-flex;align-items:center;font-size:13px;color:var(--dsw-alias-label-secondary);border-radius:7px;cursor:pointer;visibility:visible;opacity:1}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-model-host]{display:none}body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_trailing] .dsh-claude-model-btn{display:inline-flex;align-items:center;gap:2px;height:28px;max-width:280px;padding:0 8px;border:none!important;border-radius:7px;background:transparent;color:var(--dsw-alias-label-secondary);font-size:13px;font-weight:500;line-height:20px;cursor:pointer;box-sizing:border-box;min-width:0}body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_trailing] .dsh-claude-model-btn-label.dsh-claude-model-btn-loading{color:var(--dsw-alias-label-caption, #a6a094)!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_trailing] .dsh-claude-model-btn:hover{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08));color:var(--dsw-alias-label-primary)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_trailing] .dsh-claude-model-btn>*{background:transparent}body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_trailing] .dsh-claude-model-btn-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-dsh-claude-stats-position=context] [class*=_composerStack]:not([data-composer-variant=hero]){position:relative}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-dsh-claude-stats-position=context] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card]+[class*=_dock]{position:absolute;bottom:calc(var(--dsh-claude-meter-row-offset, 4px) + var(--dsh-claude-mobile-stats-lift, 0px));left:var(--dsh-composer-side-clearance, 0px);right:var(--dsh-composer-side-clearance, 0px);height:calc(var(--dsh-claude-meter-row-height, 28px) + var(--dsh-claude-mobile-stats-lift, 0px));margin:0 auto;padding:0 calc(160px + var(--dsh-claude-meter-room, 0px)) 0 140px;display:flex;align-items:center;justify-content:center;gap:12px;pointer-events:none;z-index:3;max-width:var(--dsh-composer-card-max-width, 100%);box-sizing:border-box}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-mobile-stats]{flex:0 0 auto;pointer-events:none}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-dsh-claude-stats-position=context] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card]+[class*=_dock]>*{pointer-events:auto}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-dsh-claude-stats-position=context] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card]+[class*=_dock]>[data-dsh-claude-context-meter]{position:absolute;top:0;bottom:0;right:4px;align-items:center}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-dsh-claude-stats-position=context] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] [class*=_row]>[class*=_trailing]{margin-right:var(--dsh-claude-meter-room, 0px)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-stats],body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-stat]{display:none}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-context-meter],body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-context-meter] button,body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack] [data-composer-stats],body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-composer-card] [class*=_row] .dsh-claude-model-btn{font-family:var(--dsw-font-family);font-size:13px;font-weight:500;line-height:20px;letter-spacing:normal;color:var(--dsw-alias-label-secondary)}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-dsh-claude-session-stats] [role=dialog]:has([data-session-stats-details]),body[data-dsh-claude-style][data-dsh-claude-composer-active][data-dsh-claude-session-stats] [role=dialog]:has([data-session-stats-usage]){display:none!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-context-panel]{animation:dsh-claude-popover-in .15s ease}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-context-panel][data-dsh-claude-context-aligned]{left:var(--dsh-claude-context-panel-left)!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-context-stats{display:flex;flex-direction:column;gap:10px;margin-top:10px;padding-top:10px;border-top:1px solid var(--dsw-alias-border-l1);min-width:0;font-family:var(--dsw-font-family)}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-context-stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px 10px;min-width:0}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-context-stats-section{color:var(--dsw-alias-label-tertiary);font-size:11px;font-weight:600;letter-spacing:.04em}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-context-stats-item{display:flex;flex-direction:column;gap:1px;min-width:0}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-context-stats-label{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-context-stats-value{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500;line-height:20px;font-variant-numeric:tabular-nums}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-inline-stats{display:inline-flex;align-items:center;gap:10px;overflow:clip;color:var(--dsw-alias-label-secondary);font-family:var(--dsw-font-family);font-size:13px;font-weight:500;line-height:20px;font-variant-numeric:tabular-nums;white-space:nowrap;cursor:pointer}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-inline-seg,body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-inline-figure{display:inline-flex;align-items:center;gap:3px;flex:none}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-inline-stats .dsh-claude-inline-seg[hidden]{display:none}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-inline-stats[data-dsh-claude-inline-probe]{position:absolute;visibility:hidden;pointer-events:none}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-inline-arrow{color:var(--dsw-alias-label-tertiary)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-context-meter][data-dsh-claude-meter-tight] button{min-height:22px}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-context-meter][data-dsh-claude-meter-tight] button>span{display:none}@keyframes dsh-claude-digit-pop-in{0%{transform:translate(calc(var(--dsh-claude-digit-distance) * var(--dsh-claude-digit-dir-x)),calc(var(--dsh-claude-digit-distance) * var(--dsh-claude-digit-dir-y)));opacity:0;filter:blur(var(--dsh-claude-digit-blur))}to{transform:translate(0);opacity:1;filter:blur(0)}}body[data-dsh-claude-style][data-dsh-claude-composer-active]{--dsh-claude-digit-dur: .5s;--dsh-claude-digit-distance: 8px;--dsh-claude-digit-stagger: 70ms;--dsh-claude-digit-blur: 2px;--dsh-claude-digit-ease: cubic-bezier(.34, 1.45, .64, 1);--dsh-claude-digit-dir-x: 0;--dsh-claude-digit-dir-y: 1}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-digit-group{display:inline-flex;align-items:baseline}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-digit{display:inline-block;animation:dsh-claude-digit-pop-in var(--dsh-claude-digit-dur) var(--dsh-claude-digit-ease) both}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-digit[data-stagger=\\\"1\\\"]{animation-delay:var(--dsh-claude-digit-stagger)}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-digit[data-stagger=\\\"2\\\"]{animation-delay:calc(var(--dsh-claude-digit-stagger) * 2)}body[data-dsh-claude-style][data-dsh-claude-composer-active]{--dsh-claude-tone-red: #f85149;--dsh-claude-tone-red-orange: #f26e3d;--dsh-claude-tone-orange: #e3873c;--dsh-claude-tone-yellow: #d29922;--dsh-claude-tone-lime: #a7cf5a;--dsh-claude-tone-green-light: #7ee787;--dsh-claude-tone-green: #3fb950}body[data-dsh-claude-style][data-dsh-claude-composer-active]:not([data-ds-dark-theme]){--dsh-claude-tone-red: #cf222e;--dsh-claude-tone-red-orange: #cd4400;--dsh-claude-tone-orange: #c76a00;--dsh-claude-tone-yellow: #9a6700;--dsh-claude-tone-lime: #699d1a;--dsh-claude-tone-green-light: #4ba95b;--dsh-claude-tone-green: #1a7f37}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-ramp=cache][data-dsh-claude-ramp-span=low]{--dsh-claude-ramp-from: var(--dsh-claude-tone-red)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-ramp=cache][data-dsh-claude-ramp-span=\\\"0\\\"]{--dsh-claude-ramp-from: var(--dsh-claude-tone-red);--dsh-claude-ramp-to: var(--dsh-claude-tone-orange)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-ramp=cache][data-dsh-claude-ramp-span=\\\"1\\\"]{--dsh-claude-ramp-from: var(--dsh-claude-tone-orange);--dsh-claude-ramp-to: var(--dsh-claude-tone-yellow)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-ramp=cache][data-dsh-claude-ramp-span=\\\"2\\\"]{--dsh-claude-ramp-from: var(--dsh-claude-tone-yellow);--dsh-claude-ramp-to: var(--dsh-claude-tone-lime)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-ramp=cache][data-dsh-claude-ramp-span=\\\"3\\\"]{--dsh-claude-ramp-from: var(--dsh-claude-tone-lime);--dsh-claude-ramp-to: var(--dsh-claude-tone-green-light)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-ramp=cache][data-dsh-claude-ramp-span=\\\"4\\\"]{--dsh-claude-ramp-from: var(--dsh-claude-tone-green-light);--dsh-claude-ramp-to: var(--dsh-claude-tone-green)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-ramp=cache][data-dsh-claude-ramp-span=high],body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-ramp=context][data-dsh-claude-ramp-span=low]{--dsh-claude-ramp-from: var(--dsh-claude-tone-green)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-ramp=context][data-dsh-claude-ramp-span=\\\"0\\\"]{--dsh-claude-ramp-from: var(--dsh-claude-tone-green);--dsh-claude-ramp-to: var(--dsh-claude-tone-green-light)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-ramp=context][data-dsh-claude-ramp-span=\\\"1\\\"]{--dsh-claude-ramp-from: var(--dsh-claude-tone-green-light);--dsh-claude-ramp-to: var(--dsh-claude-tone-yellow)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-ramp=context][data-dsh-claude-ramp-span=\\\"2\\\"]{--dsh-claude-ramp-from: var(--dsh-claude-tone-yellow);--dsh-claude-ramp-to: var(--dsh-claude-tone-orange)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-ramp=context][data-dsh-claude-ramp-span=\\\"3\\\"]{--dsh-claude-ramp-from: var(--dsh-claude-tone-orange);--dsh-claude-ramp-to: var(--dsh-claude-tone-red-orange)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-ramp=context][data-dsh-claude-ramp-span=\\\"4\\\"]{--dsh-claude-ramp-from: var(--dsh-claude-tone-red-orange);--dsh-claude-ramp-to: var(--dsh-claude-tone-red)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-ramp=context][data-dsh-claude-ramp-span=high]{--dsh-claude-ramp-from: var(--dsh-claude-tone-red)}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-inline-stats [data-dsh-claude-ramp=cache]{color:color-mix(in oklch,var(--dsh-claude-ramp-from),var(--dsh-claude-ramp-to, var(--dsh-claude-ramp-from)) var(--dsh-claude-ramp-position, 0%))}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-context-meter][data-dsh-claude-ramp=context] button>span{color:color-mix(in oklch,var(--dsh-claude-ramp-from),var(--dsh-claude-ramp-to, var(--dsh-claude-ramp-from)) var(--dsh-claude-ramp-position, 0%))}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-context-meter][data-dsh-claude-ramp=context] circle[stroke-dasharray]{stroke:color-mix(in oklch,var(--dsh-claude-ramp-from),var(--dsh-claude-ramp-to, var(--dsh-claude-ramp-from)) var(--dsh-claude-ramp-position, 0%))}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-context-stats[data-dsh-claude-context-skeleton] .dsh-claude-context-stats-item{min-height:37px!important;justify-content:center!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-context-stats-skeleton-label,body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-context-stats-skeleton-value{display:block!important;border-radius:3px!important;background:var(--dsw-alias-interactive-bg-hover-solid, rgba(0, 0, 0, .06))!important;animation:dsh-claude-context-stats-pulse 1.6s ease-in-out infinite!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-context-stats-skeleton-label{width:68%!important;height:12px!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] .dsh-claude-context-stats-skeleton-value{width:46%!important;height:14px!important}@keyframes dsh-claude-context-stats-pulse{0%,to{opacity:.55}50%{opacity:1}}@media(max-width:480px){body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_trailing] .dsh-claude-model-btn{max-width:112px}body[data-dsh-claude-style][data-dsh-claude-composer-active] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card] [class*=_row]>[class*=_trailing]{flex:0 1 auto;min-width:0;padding-right:34px}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-context-meter] button>span{display:none}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-dsh-claude-stats-position=context] [class*=_composerStack]:not([data-composer-variant=hero]) [data-composer-card]+[class*=_dock]{padding:0}}body[data-dsh-claude-style][data-dsh-claude-brand=claude] :is([class*=brandMark],[class*=railMark])>*{display:none!important}body[data-dsh-claude-style][data-dsh-claude-brand=claude] :is([class*=brandMark],[class*=railMark]):before{content:\\\"\\\";display:block;flex:none;background-color:currentColor;background-repeat:no-repeat;background-position:center;background-size:contain}body[data-dsh-claude-style][data-dsh-claude-brand=claude] :is([class*=brandMark],[class*=railMark]):before{width:18px;height:18px;-webkit-mask:var(--dsh-claude-image-claude-mark) center / contain no-repeat;mask:var(--dsh-claude-image-claude-mark) center / contain no-repeat}body[data-dsh-claude-style][data-dsh-claude-brand=claude] [class*=brandIdentity]>[class*=brandName]>*{display:none!important}body[data-dsh-claude-style][data-dsh-claude-brand=claude] [class*=brandIdentity]>[class*=brandName]:before{content:\\\"\\\";display:block;flex:none;background-color:currentColor;background-repeat:no-repeat;background-position:center;background-size:contain}body[data-dsh-claude-style][data-dsh-claude-brand=claude] [class*=brandIdentity]>[class*=brandName]:before{width:calc(18px * 512.22 / 121.54);max-width:100%;height:18px;-webkit-mask:var(--dsh-claude-image-claude-word) center / contain no-repeat;mask:var(--dsh-claude-image-claude-word) center / contain no-repeat}body[data-dsh-claude-style][data-dsh-claude-brand=deepseek] :is([class*=brandIdentity],[class*=railMark]){color:var(--dsh-claude-logo-ink)}body[data-dsh-claude-style] [class*=_frame]:not([data-sidebar-collapsed])>[class*=_sidebarCol] button[class*=newSession]{display:flex;align-items:center;justify-content:flex-start;text-align:left;width:100%;box-sizing:border-box;height:28px;line-height:28px;padding:0 8px;margin:0 0 6px;border:none!important;border-radius:6px;background:transparent;color:var(--dsw-alias-label-primary, #141413);font-family:var(--dsw-font-family);font-size:13px;font-weight:500;gap:6px;cursor:pointer;box-shadow:none;transition:background-color .12s ease}body[data-dsh-claude-style] [class*=_frame]:not([data-sidebar-collapsed])>[class*=_sidebarCol] button[class*=newSession]:hover{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))}body[data-dsh-claude-style][data-ds-dark-theme] [class*=_frame]:not([data-sidebar-collapsed])>[class*=_sidebarCol] button[class*=newSession]{color:var(--dsh-claude-ink-strong)}body[data-dsh-claude-style][data-ds-dark-theme] [class*=_frame]:not([data-sidebar-collapsed])>[class*=_sidebarCol] button[class*=newSession]:hover{background:#ffffff14!important}body[data-dsh-claude-style] [data-sidebar-collapsed] button[class*=newSession]:hover{background:transparent!important}body[data-dsh-claude-style] [data-sidebar-collapsed] button[class*=newSession] [class*=newSessionLabelMask]{display:none}body[data-dsh-claude-style] button[class*=newSession] svg{display:none}body[data-dsh-claude-style] button[class*=newSession] [class*=newSessionContent]{justify-content:flex-start}body[data-dsh-claude-style] button[class*=newSession] [class*=newSessionShortcut] kbd:not([class*=_separator]){display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;box-sizing:border-box;border:1px solid var(--dsw-alias-border-l1, #e8e6dc);border-radius:4px;background:transparent;color:var(--dsw-alias-label-secondary, #787672);font-family:var(--dsw-font-family);font-size:12px;font-weight:400;line-height:1}body[data-dsh-claude-style][data-ds-dark-theme] button[class*=newSession] [class*=newSessionShortcut] kbd:not([class*=_separator]){border-color:var(--dsw-alias-border-l3)}body[data-dsh-claude-style] button[class*=newSession] [class*=newSessionShortcut] kbd[class*=_separator]{display:none}body[data-dsh-claude-style] button[class*=newSession]:before{content:\\\"\\\";display:inline-block;width:20px;height:20px;margin-right:0;flex:none;border-radius:50%;corner-shape:round;background-color:#0000001a;background-image:url(\\\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141413' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><line x1='12' y1='6' x2='12' y2='18'></line><line x1='6' y1='12' x2='18' y2='12'></line></svg>\\\");background-repeat:no-repeat;background-position:center;background-size:12px 12px;-webkit-mask:none;mask:none}body[data-dsh-claude-style][data-ds-dark-theme] button[class*=newSession]:before{background-color:#ffffff24;background-image:url(\\\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23faf9f5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><line x1='12' y1='6' x2='12' y2='18'></line><line x1='6' y1='12' x2='18' y2='12'></line></svg>\\\")}body[data-dsh-claude-style] nav[class*=panelList]{gap:0}body[data-dsh-claude-style] button[class*=panelRow]{display:flex;align-items:center;justify-content:flex-start;text-align:left;width:100%;box-sizing:border-box;height:28px;min-height:28px;line-height:28px;padding:0 8px;margin:0 0 6px;border:none!important;border-radius:6px;background:transparent;color:var(--dsw-alias-label-primary, #141413);font-family:var(--dsw-font-family);font-size:13px;font-weight:500;gap:6px;cursor:pointer;box-shadow:none;transition:background-color .12s ease}body[data-dsh-claude-style] button[class*=panelRow]:hover{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))}body[data-dsh-claude-style][data-ds-dark-theme] button[class*=panelRow]{color:var(--dsh-claude-ink-strong)}body[data-dsh-claude-style][data-ds-dark-theme] button[class*=panelRow]:hover{background:#ffffff14!important}body[data-dsh-claude-style] button[class*=panelRow] svg{width:13px;height:13px;margin:0 3.5px;flex:none}body[data-dsh-claude-style] button[class*=newSession]:before,body[data-dsh-claude-style] button[class*=panelRow] svg{transition:transform .25s ease;transform-origin:center}body[data-dsh-claude-style] button[class*=newSession]:hover:before,body[data-dsh-claude-style] button[class*=panelRow]:hover svg{transform:rotate(90deg)}body[data-dsh-claude-style] :is([data-pane=sidebar],[class*=sidebarCol],[class*=treeBody],[role=tree]) :is([class*=title],[class*=projectText],[class*=sectionLabel],[class*=sessionRow],[class*=projectRow],[class*=_time]){font-family:var(--dsw-font-family)}body[data-dsh-claude-style] [class*=projectRow] [class*=title]{font-size:13px;line-height:18px;letter-spacing:normal}body[data-dsh-claude-style] [class*=sessionRow] [class*=title]{font-size:13px;line-height:18px;letter-spacing:normal;color:var(--dsw-alias-label-secondary, #787672);transition:color .12s ease}body[data-dsh-claude-style][data-ds-dark-theme] [class*=sessionRow] [class*=title]{color:var(--dsh-claude-session-ink)}body[data-dsh-claude-style] [class*=sessionRow]:is(:hover,[class*=_selected],[class*=_active],[class*=menuOpen],[aria-selected=true],[data-selected=true]) [class*=title]{color:var(--dsw-alias-label-primary, #141413)}body[data-dsh-claude-style][data-ds-dark-theme] [class*=sessionRow]:is(:hover,[class*=_selected],[class*=_active],[class*=menuOpen],[aria-selected=true],[data-selected=true]) [class*=title]{color:var(--dsh-claude-ink-strong)}body[data-dsh-claude-style] [class*=sessionRow] [class*=_time]{font-size:11px;line-height:16px}body[data-dsh-claude-style] [class*=sectionLabel]{font-size:12px;line-height:16px}body[data-dsh-claude-style] [class*=projectRow]{height:28px;min-height:28px;padding:0 6px;gap:4px;border-radius:6px}body[data-dsh-claude-style] [class*=sessionRow]{height:28px;min-height:28px;padding:0 6px;gap:0;border-radius:6px}body[data-dsh-claude-style] [class*=sessionRow] [class*=title]{margin:0 4px}body[data-dsh-claude-style] [class*=groupSection]>*+*{margin-top:1px}body[data-dsh-claude-style] [class*=groupSection]+[class*=groupSection]{margin-top:6px!important}body[data-dsh-claude-style] [class*=projectRow] [class*=rowActions],body[data-dsh-claude-style] [class*=sessionRow] [class*=rowActions]{gap:6px}body[data-dsh-claude-style] :is([class*=projectRow],[class*=sessionRow]) [class*=iconButton]{width:16px;height:16px}body[data-dsh-claude-style][data-dsh-claude-sidebar-layout=compact] [class*=_frame]:not([data-sidebar-collapsed])>[class*=_sidebarCol] button[class*=newSession],body[data-dsh-claude-style][data-dsh-claude-sidebar-layout=compact] button[class*=panelRow]{margin-bottom:2px}body[data-dsh-claude-style][data-dsh-claude-sidebar-layout=compact] nav[class*=panelList]{margin-bottom:2px}body[data-dsh-claude-style][data-dsh-claude-sidebar-layout=compact] [class*=sectionHeader]{margin-top:0;margin-bottom:2px}body[data-dsh-claude-style][data-dsh-claude-sidebar-layout=compact] [class*=projectRow],body[data-dsh-claude-style][data-dsh-claude-sidebar-layout=compact] [class*=sessionRow]{height:24px;min-height:24px}body[data-dsh-claude-style][data-dsh-claude-sidebar-layout=compact] [class*=groupSection]>*+*{margin-top:0}body[data-dsh-claude-style][data-dsh-claude-sidebar-layout=compact] [class*=groupSection]+[class*=groupSection]{margin-top:2px!important}body[data-dsh-claude-style][data-dsh-claude-sidebar-layout=compact] [class*=footArea]{padding-top:4px;padding-bottom:3px}body[data-dsh-claude-style][data-dsh-claude-sidebar-layout=compact] [class*=footArea] [class*=triggerRow]{margin-top:2px;margin-bottom:2px}body[data-dsh-claude-style] [class*=sessionRow]:hover,body[data-dsh-claude-style] [class*=sessionRow][class*=_selected],body[data-dsh-claude-style] [class*=sessionRow][class*=menuOpen]{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))}body[data-dsh-claude-style] [class*=projectRow],body[data-dsh-claude-style] [class*=projectRow]:hover,body[data-dsh-claude-style] [class*=projectRow][class*=menuOpen],body[data-dsh-claude-style] [class*=projectRow][class*=_selected]{background:transparent}body[data-dsh-claude-style] [class*=projectRow] [class*=title]{color:var(--dsw-alias-label-secondary, #787672);font-weight:500}body[data-dsh-claude-style] [class*=projectRow]:hover [class*=title]{color:var(--dsw-alias-label-primary, #141413)}body[data-dsh-claude-style] [class*=projectRow] [class*=folderActive]{color:inherit}body[data-dsh-claude-style] [class*=projectRow] [class*=_folder]{display:none}body[data-dsh-claude-style] [class*=projectRow]{display:flex;align-items:center}body[data-dsh-claude-style] [class*=projectRow] [class*=projectText]{order:1;flex:0 0 auto;margin-right:2px}body[data-dsh-claude-style] [class*=projectRow] [class*=_chevron]{order:2;display:none;width:14px;height:14px;align-items:center;justify-content:center;color:var(--dsw-alias-label-secondary, #787672)}body[data-dsh-claude-style] [class*=groupSection]:hover [class*=projectRow] [class*=_chevron]{display:inline-flex!important}body[data-dsh-claude-style] [class*=projectRow] [class*=rowActions]{order:3;margin-left:auto}body[data-dsh-claude-style] [class*=projectRow] [class*=_chevron] svg{display:none}body[data-dsh-claude-style] [class*=projectRow] [class*=_chevron]:after{content:\\\"\\\";display:inline-block;width:12px;height:12px;background:currentColor;-webkit-mask:url(\\\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M4 6l4 4 4-4%27/%3E%3C/svg%3E\\\") center / contain no-repeat;mask:url(\\\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M4 6l4 4 4-4%27/%3E%3C/svg%3E\\\") center / contain no-repeat;transition:transform .15s var(--ds-ease-in-out, ease)}body[data-dsh-claude-style] [class*=projectRow][aria-expanded=false] [class*=_chevron]:after{transform:rotate(-90deg)}body[data-dsh-claude-style] [class*=sessionRow] [class*=_slot]{width:14px;height:16px;display:inline-flex;align-items:center;justify-content:center}body[data-dsh-claude-style] [class*=sessionRow] [class*=_slot]:empty:after,body[data-dsh-claude-style] [class*=sessionRow] [class*=_slot]>[data-slot]:empty:after{content:\\\"\\\";display:inline-block;width:5px;height:5px;border-radius:50%;corner-shape:round;border:1.2px solid var(--dsw-alias-label-caption, #a6a094);box-sizing:border-box}body[data-dsh-claude-style]:not([data-ds-dark-theme]) svg[data-state=ongoing]{border-color:#1414131f!important}body[data-dsh-claude-style] svg[data-state=ongoing]{width:10px;height:10px;box-sizing:border-box;border-radius:50%;corner-shape:round;border:1.5px solid rgba(255,255,255,.18);border-top-color:var(--dsw-alias-label-primary);animation:.85s linear infinite dsh-claude-win11-spin;transform-origin:center center;display:inline-block;flex:none;color:transparent;fill:none;background:transparent}body[data-dsh-claude-style]:not([data-ds-dark-theme]) svg[data-state=ongoing]{border-top-color:var(--dsw-alias-label-secondary)}body[data-dsh-claude-style] svg[data-state=ongoing] *{display:none}@keyframes dsh-claude-win11-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){body[data-dsh-claude-style] svg[data-state=ongoing]{animation:.85s linear infinite dsh-claude-win11-spin!important;animation-play-state:running!important}}body[data-dsh-claude-style] .dsh-claude-ws-segments{display:inline-flex;align-items:center;gap:2px;padding:2px;border-radius:7px;background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .06));flex:none}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-ws-segments{background:#ffffff14}body[data-dsh-claude-style] [class*=sectionHeader]{position:relative}body[data-dsh-claude-style] .dsh-claude-ws-segments{position:absolute;left:0;top:50%;transform:translateY(-50%);opacity:1;visibility:visible;transition:opacity .16s ease,visibility .16s ease}body[data-dsh-claude-style] [data-dsh-claude-ws-view=active] .dsh-claude-ws-segments{opacity:0;visibility:hidden;pointer-events:none}body[data-dsh-claude-style] [data-dsh-claude-ws-view=active]:hover .dsh-claude-ws-segments,body[data-dsh-claude-style] [class*=sectionHeader]:hover .dsh-claude-ws-segments{opacity:1!important;visibility:visible!important;pointer-events:auto!important}body[data-dsh-claude-style] [class*=sectionLabel][data-dsh-claude-ws-label]{pointer-events:none;user-select:none;-webkit-user-select:none;opacity:0;transition:opacity .16s ease}body[data-dsh-claude-style] [data-dsh-claude-ws-view=active] [class*=sectionLabel][data-dsh-claude-ws-label]{opacity:1}body[data-dsh-claude-style] [data-dsh-claude-ws-view=active]:hover [class*=sectionLabel][data-dsh-claude-ws-label],body[data-dsh-claude-style] [class*=sectionHeader]:hover [class*=sectionLabel][data-dsh-claude-ws-label]{opacity:0!important}body[data-dsh-claude-style] .dsh-claude-ws-segment{user-select:none;-webkit-user-select:none;appearance:none;border:none!important;background:transparent;color:var(--dsw-alias-label-tertiary, #8f8d84);font-family:var(--dsw-font-family);font-size:12px;font-weight:500;line-height:18px;padding:0 8px;height:20px;border-radius:5px;cursor:pointer;transition:background-color .12s ease,color .12s ease}body[data-dsh-claude-style] .dsh-claude-ws-segment:hover{color:var(--dsw-alias-label-primary, #141413)!important}body[data-dsh-claude-style] .dsh-claude-ws-segment[aria-checked=true]{background:var(--dsw-alias-bg-overlay, #ffffff);color:var(--dsw-alias-label-primary, #141413);box-shadow:0 1px 2px #1414131a}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-ws-segment[aria-checked=true]{background:#ffffff24;color:var(--dsh-claude-ink-strong);box-shadow:none}body[data-dsh-claude-style] .dsh-claude-ws-segments[data-dsh-claude-pill]:before{top:2px;bottom:2px;border-radius:5px;background:var(--dsw-alias-bg-overlay, #ffffff);box-shadow:0 1px 2px #1414131a}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-ws-segments[data-dsh-claude-pill]:before{background:#ffffff24;box-shadow:none}body[data-dsh-claude-style] .dsh-claude-ws-segments[data-dsh-claude-pill]>.dsh-claude-ws-segment[aria-checked=true]{background:transparent;box-shadow:none}body[data-dsh-claude-style] [data-dsh-claude-ws-view=archived] [data-dsh-claude-ws-tree]{display:none!important}body[data-dsh-claude-style] [data-dsh-claude-ws-view=active] .dsh-claude-archive-list{display:none}body[data-dsh-claude-style] .dsh-claude-archive-list{display:flex;flex-direction:column;gap:1px;margin:0 -10px 0 -4px;padding:0 5px 0 4px;min-width:0;flex:1 1 0%;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-gutter:stable}body[data-dsh-claude-style] .dsh-claude-archive-row{flex:none!important;display:flex!important;align-items:center!important;gap:4px!important;height:28px!important;padding:0 6px!important;border-radius:6px!important;cursor:pointer!important;color:var(--dsw-alias-label-secondary, #787672)!important;font-family:var(--dsw-font-family)!important;font-size:13px!important;font-weight:400!important;transition:background-color .12s ease,color .12s ease!important}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-archive-row{color:var(--dsh-claude-session-ink)!important}body[data-dsh-claude-style] .dsh-claude-archive-row:is(:hover,:focus-visible){color:var(--dsw-alias-label-primary, #141413)!important}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-archive-row:is(:hover,:focus-visible){color:var(--dsh-claude-ink-strong)!important}body[data-dsh-claude-style] .dsh-claude-archive-row:before{content:\\\"\\\"!important;flex:none!important;width:5px!important;height:5px!important;margin:0 4.5px!important;border-radius:50%!important;corner-shape:round!important;border:1.2px solid var(--dsw-alias-label-caption, #a6a094)!important;box-sizing:border-box!important}body[data-dsh-claude-style] .dsh-claude-archive-row:hover{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .06))!important}body[data-dsh-claude-style] .dsh-claude-archive-title{flex:1 1 auto!important;min-width:0!important;overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important}body[data-dsh-claude-style] .dsh-claude-archive-time{flex:none!important;color:var(--dsw-alias-label-caption, #a6a094)!important;font-size:11px!important}body[data-dsh-claude-style] .dsh-claude-archive-row:hover .dsh-claude-archive-time,body[data-dsh-claude-style] .dsh-claude-archive-row:focus-visible .dsh-claude-archive-time{display:none!important}body[data-dsh-claude-style] .dsh-claude-archive-action{display:none!important;flex:none!important}body[data-dsh-claude-style] .dsh-claude-archive-row:hover .dsh-claude-archive-action,body[data-dsh-claude-style] .dsh-claude-archive-row:focus-visible .dsh-claude-archive-action{display:inline-flex!important}body[data-dsh-claude-style] .dsh-claude-archive-delete,body[data-dsh-claude-style] .dsh-claude-archive-restore{flex:none!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;width:22px!important;height:22px!important;padding:0!important;border:none!important;border-radius:5px!important;background:transparent!important;color:var(--dsw-alias-label-caption, #a6a094)!important;cursor:pointer!important;transition:background-color .12s ease,color .12s ease!important}body[data-dsh-claude-style] .dsh-claude-archive-restore:hover{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))!important;color:var(--dsw-alias-label-primary, #141413)!important}body[data-dsh-claude-style] .dsh-claude-archive-delete:hover{background:#c0392b1f!important;color:var(--dsw-alias-state-error-primary, #c0392b)!important}body[data-dsh-claude-style] .dsh-claude-archive-status{padding:8px;color:var(--dsw-alias-label-caption, #a6a094);font-family:var(--dsw-font-family);font-size:12px}body[data-dsh-claude-style] [data-dsh-claude-search-row]{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;height:28px;padding:0;margin-bottom:6px}body[data-dsh-claude-style] [data-dsh-claude-search-row]>:is([class*=_brand],.dsh-claude-search-trigger){grid-area:1 / 1}body[data-dsh-claude-style] [data-dsh-claude-search-row]>[class*=_brand]{transition:opacity .16s ease,visibility .16s ease}body[data-dsh-claude-style] .dsh-claude-search-trigger{display:flex;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .16s ease,visibility .16s ease;min-width:0;height:28px;margin:0;padding:0 10px;align-items:center;gap:8px;border:1px solid var(--dsw-alias-border-l1, #e8e6dc);border-radius:8px;background:var(--dsh-claude-canvas, #fcfcfb);color:var(--dsw-alias-label-tertiary, #8f8d84);font-family:var(--dsw-font-family);font-size:14px;line-height:20px;text-align:left;cursor:pointer;box-shadow:none;-webkit-app-region:no-drag}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-search-trigger{border-color:var(--dsw-alias-border-l2);background:var(--dsh-claude-raised)}body[data-dsh-claude-style] [data-slot=sidebar]:hover [data-dsh-claude-search-row]>.dsh-claude-search-trigger,body[data-dsh-claude-style] [data-dsh-claude-search-row]>.dsh-claude-search-trigger:focus-visible{opacity:1;visibility:visible;pointer-events:auto}body[data-dsh-claude-style] [data-slot=sidebar]:hover [data-dsh-claude-search-row]>[class*=_brand],body[data-dsh-claude-style] [data-dsh-claude-search-row]>[class*=_brand]:has(~.dsh-claude-search-trigger:focus-visible){opacity:0;visibility:hidden;pointer-events:none}body[data-dsh-claude-style][data-dsh-claude-search-style=standalone] .dsh-claude-search-bar{display:flex;padding:0;margin:0 0 6px}body[data-dsh-claude-style][data-dsh-claude-search-style=standalone] .dsh-claude-search-trigger{flex:1 1 auto;opacity:1;visibility:visible;pointer-events:auto}body[data-dsh-claude-style][data-dsh-claude-search-style=standalone][data-dsh-claude-sidebar-layout=compact] .dsh-claude-search-bar{margin-bottom:2px}html[data-windows-titlebar] body[data-dsh-claude-style] [data-slot=sidebar] [class*=_logoRow]{margin-top:-6px!important}html:not([data-windows-titlebar]):not([data-platform=darwin]) body[data-dsh-claude-style] [data-dsh-claude-search-row]{margin-top:8px}html:not([data-windows-titlebar]):not([data-platform=darwin]) body[data-dsh-claude-style] [data-dsh-claude-search-row]>[class*=_brand]{padding-left:8px}html[data-windows-titlebar] body[data-dsh-claude-style] [data-dsh-claude-search-row],html[data-platform=darwin] body[data-dsh-claude-style] [data-dsh-claude-search-row]{grid-template-columns:minmax(0,1fr)!important}body[data-dsh-claude-style] [data-slot=sidebar] [class*=_sectionHeader]>[class*=_sectionLabel]{margin-right:auto}body[data-dsh-claude-style]:not([data-dsh-claude-search-style=icon]) [data-slot=sidebar] [class*=_searchSlot]{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip-path:inset(50%);opacity:0;pointer-events:none}body[data-dsh-claude-style]:not([data-dsh-claude-search-style=icon]) [data-slot=sidebar] [class*=_headerActionsHidden]{opacity:1!important;visibility:visible!important;max-width:60px!important;transform:none!important;pointer-events:auto!important}body[data-dsh-claude-style] .dsh-claude-search-trigger:hover{background-image:linear-gradient(var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08)),var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08)))}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-search-trigger:hover{background-image:linear-gradient(#ffffff14,#ffffff14)!important}body[data-dsh-claude-style] .dsh-claude-search-trigger-icon{display:inline-flex;flex:none;color:var(--dsw-alias-label-secondary, #787672)}body[data-dsh-claude-style] .dsh-claude-search-trigger-label{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}body[data-dsh-claude-style] .dsh-claude-search-dialog{animation:dsh-claude-search-in .18s cubic-bezier(.22,.61,.36,1);width:min(760px,100%);max-height:100%;margin:8vh 0 auto;padding:0;gap:0;border:1px solid var(--dsw-alias-border-l1, #e8e6dc);border-radius:16px;background:var(--dsh-claude-card);box-shadow:0 16px 48px #14141324,0 2px 8px #1414130f}body[data-dsh-claude-style] [data-dsh-claude-search-closing]>.dsh-claude-search-dialog{animation:dsh-claude-search-out .14s ease forwards!important}body[data-dsh-claude-style] [data-dsh-claude-search-closing]>[class*=_mask]{animation:dsh-claude-search-mask-out .14s ease forwards!important}body[data-dsh-claude-style] [data-dsh-claude-search-closing]{pointer-events:none!important}@keyframes dsh-claude-search-in{0%{opacity:0;transform:translateY(-6px) scale(.985)}to{opacity:1;transform:none}}@keyframes dsh-claude-search-out{0%{opacity:1;transform:none}to{opacity:0;transform:translateY(-4px) scale(.985)}}@keyframes dsh-claude-search-mask-out{0%{opacity:1}to{opacity:0}}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-search-dialog{border-color:var(--dsw-alias-border-l2)!important;background:var(--dsh-claude-raised)!important;box-shadow:0 16px 48px #00000080,0 2px 8px #0000004d!important}body[data-dsh-claude-style] .dsh-claude-search{display:flex;flex-direction:column;min-height:0;font-family:var(--dsw-font-family);color:var(--dsw-alias-label-primary, #141413)}body[data-dsh-claude-style] .dsh-claude-search-head{display:flex;align-items:center;gap:8px;padding:18px 16px 10px 24px}body[data-dsh-claude-style] .dsh-claude-search-input{flex:1 1 auto;min-width:0;height:32px;padding:0;border:none!important;outline:none!important;background:transparent;box-shadow:none;color:var(--dsw-alias-label-primary, #141413);font-family:var(--dsw-font-family);font-size:17px}body[data-dsh-claude-style] .dsh-claude-search-input::placeholder{color:var(--dsw-alias-label-tertiary, #8f8d84)}body[data-dsh-claude-style] .dsh-claude-search-close{display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px;padding:0;border:none!important;border-radius:8px;background:transparent;color:var(--dsw-alias-label-secondary, #787672);cursor:pointer}body[data-dsh-claude-style] .dsh-claude-search-close:hover{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .06))!important;color:var(--dsw-alias-label-primary, #141413)!important}body[data-dsh-claude-style] .dsh-claude-search-filters{position:relative;display:flex;align-self:flex-start;flex-wrap:nowrap;gap:2px;margin:0 16px 8px 14px}body[data-dsh-claude-style] .dsh-claude-search-filters[data-dsh-claude-pill]:before{top:0;height:100%;border-radius:8px;background:#1414130f}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-search-filters[data-dsh-claude-pill]:before{background:#faf9f514!important}body[data-dsh-claude-style] .dsh-claude-search-filter{height:32px;padding:0 10px;border:none!important;border-radius:8px;background:transparent;color:var(--dsw-alias-label-tertiary, #8f8d84);font-family:var(--dsw-font-family);font-size:14px;white-space:nowrap;cursor:pointer;transition:color .12s ease;user-select:none;-webkit-user-select:none}body[data-dsh-claude-style] .dsh-claude-search-filter:hover{color:var(--dsw-alias-label-secondary, #787672)!important}body[data-dsh-claude-style] .dsh-claude-search-filter[aria-checked=true]{color:var(--dsw-alias-label-primary, #141413)}body[data-dsh-claude-style] .dsh-claude-search-filters:not([data-dsh-claude-pill]) .dsh-claude-search-filter[aria-checked=true]{background:#1414130f!important}body[data-dsh-claude-style] .dsh-claude-search-list{flex:1 1 auto;min-height:0;max-height:min(520px,62vh);overflow-y:auto;padding:4px 12px 10px;overscroll-behavior:contain}body[data-dsh-claude-style] .dsh-claude-search-section{padding:14px 12px 6px;color:var(--dsw-alias-label-tertiary, #8f8d84);font-size:13px;line-height:18px}body[data-dsh-claude-style] .dsh-claude-search-status{padding:18px 12px!important;color:var(--dsw-alias-label-tertiary, #8f8d84)!important;font-size:14px!important}body[data-dsh-claude-style] .dsh-claude-search-item{display:flex;align-items:center;gap:12px;min-height:40px;padding:6px 12px;border-radius:8px;box-sizing:border-box;cursor:pointer;font-size:15px;line-height:20px}body[data-dsh-claude-style] .dsh-claude-search-item[data-active]{background:#1414130d}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-search-item[data-active]{background:#faf9f512!important}body[data-dsh-claude-style] .dsh-claude-search-item-icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:18px;height:18px;color:var(--dsw-alias-label-secondary, #787672)}body[data-dsh-claude-style] .dsh-claude-search-item-image{width:18px!important;height:18px!important;border-radius:4px!important;object-fit:contain!important}body[data-dsh-claude-style] .dsh-claude-search-item-text{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}body[data-dsh-claude-style] .dsh-claude-search-item-line{display:flex;align-items:baseline;gap:10px;min-width:0}body[data-dsh-claude-style] .dsh-claude-search-item-name{flex:0 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}body[data-dsh-claude-style] .dsh-claude-search-item-detail,body[data-dsh-claude-style] .dsh-claude-search-item-snippet{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--dsw-alias-label-tertiary, #8f8d84);font-size:13px}body[data-dsh-claude-style] .dsh-claude-search-item-detail{flex:1 1 0}body[data-dsh-claude-style] .dsh-claude-search-item-snippet{line-height:18px!important}body[data-dsh-claude-style] .dsh-claude-search-item-match{background:none!important;color:var(--dsw-alias-label-primary)!important;font-weight:500!important}body[data-dsh-claude-style] .dsh-claude-search-item-enter{display:inline-flex;flex:none;color:var(--dsw-alias-label-tertiary, #8f8d84);visibility:hidden}body[data-dsh-claude-style] .dsh-claude-search-item[data-active] .dsh-claude-search-item-enter{visibility:visible}body[data-dsh-claude-style] .dsh-claude-search-keys{display:inline-flex;flex:none;align-items:center;gap:3px}body[data-dsh-claude-style] .dsh-claude-search-key{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;box-sizing:border-box;border:1px solid var(--dsw-alias-border-l1, #e8e6dc);border-radius:4px;background:transparent;color:var(--dsw-alias-label-secondary, #787672);font-family:var(--dsw-font-family);font-size:12px;line-height:1}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-search-key{border-color:var(--dsw-alias-border-l3)}body[data-dsh-claude-style] .dsh-claude-search-foot{display:flex;align-items:center;gap:24px;padding:12px 24px;border-top:1px solid var(--dsw-alias-border-l1, #e8e6dc);color:var(--dsw-alias-label-secondary, #787672);font-size:13px}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-search-foot{border-top-color:var(--dsw-alias-border-l2)!important}body[data-dsh-claude-style] .dsh-claude-search-hint{display:inline-flex;align-items:center;gap:8px}body[data-dsh-claude-style] [data-conversation-scroll] nav[class*=_frame][data-dsh-claude-turn-nav-replaced]{visibility:hidden;pointer-events:none}body[data-dsh-claude-style] .dsh-claude-turn-rail{--dsh-claude-turn-rail-band: calc(var(--dsh-conversation-viewport-height, 100dvh) - var(--dsh-composer-height, 152px));position:absolute;top:calc(var(--dsh-claude-turn-rail-band) / 2);right:12px;width:28px;height:var(--dsh-claude-turn-rail-height);max-height:min(max(0px,calc(var(--dsh-claude-turn-rail-band) - 64px)),240px);transform:translateY(-50%);overflow:hidden;pointer-events:auto;cursor:pointer}@container (width <= 900px){body[data-dsh-claude-style] .dsh-claude-turn-rail{display:none}}body[data-dsh-claude-style] .dsh-claude-turn-rail[data-fade-top]{mask-image:linear-gradient(transparent 0,#000 24px 100%)!important}body[data-dsh-claude-style] .dsh-claude-turn-rail[data-fade-bottom]{mask-image:linear-gradient(#000 0,#000 calc(100% - 24px),transparent 100%)!important}body[data-dsh-claude-style] .dsh-claude-turn-rail[data-fade-top][data-fade-bottom]{mask-image:linear-gradient(transparent 0,#000 24px,#000 calc(100% - 24px),transparent 100%)!important}body[data-dsh-claude-style] .dsh-claude-turn-rail-track{position:relative;transition:transform .15s ease,opacity .12s ease}body[data-dsh-claude-style] .dsh-claude-turn-rail[data-dsh-claude-turn-nav-open] .dsh-claude-turn-rail-track{opacity:0}body[data-dsh-claude-style] .dsh-claude-turn-rail-mark{position:absolute;left:0;right:0;height:24px}body[data-dsh-claude-style] .dsh-claude-turn-rail-mark:before,body[data-dsh-claude-style] .dsh-claude-turn-nav-dash{width:20px;height:2px;border-radius:2px;background:var(--dsw-alias-border-l4);transform:scaleX(.6);transform-origin:100% 50%;transition:transform .14s ease,background-color .14s ease}body[data-dsh-claude-style] .dsh-claude-turn-rail-mark:before{content:\\\"\\\";position:absolute;right:0;top:11px}body[data-dsh-claude-style] .dsh-claude-turn-rail-mark[data-unloaded]:before,body[data-dsh-claude-style] .dsh-claude-turn-nav-row[data-unloaded] .dsh-claude-turn-nav-dash{opacity:.6!important;transform:scaleX(.4)!important}body[data-dsh-claude-style] .dsh-claude-turn-nav-row:hover .dsh-claude-turn-nav-dash{background:var(--dsw-alias-label-tertiary);opacity:1;transform:scaleX(.9)}body[data-dsh-claude-style] .dsh-claude-turn-rail-mark[data-current]:before,body[data-dsh-claude-style] .dsh-claude-turn-nav-row[data-current] .dsh-claude-turn-nav-dash{background:var(--dsw-alias-label-primary);opacity:1;transform:none}body[data-dsh-claude-style] .dsh-claude-turn-nav,body[data-dsh-claude-style] .dsh-claude-turn-nav[data-open=true]{position:absolute;left:auto;width:288px;max-width:calc(100vw - 16px);transform:none;transition:opacity .12s ease}body[data-dsh-claude-style] .dsh-claude-turn-nav-list{display:flex;flex-direction:column;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}body[data-dsh-claude-style] .dsh-claude-turn-nav-list::-webkit-scrollbar{display:none!important}body[data-dsh-claude-style] .dsh-claude-turn-nav-row{flex:none;display:flex;align-items:center;gap:12px;width:100%;height:24px;padding:0 0 0 10px;border:none!important;border-radius:6px;background:transparent;box-shadow:none;color:var(--dsw-alias-label-secondary, #787672);font-family:var(--dsw-font-family);font-size:13px;font-weight:400;line-height:24px;text-align:left;cursor:pointer;transition:background-color .12s ease,color .12s ease}body[data-dsh-claude-style] .dsh-claude-turn-nav-row:hover{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08));color:var(--dsw-alias-label-primary, #141413)}body[data-dsh-claude-style] .dsh-claude-turn-nav-row:focus-visible{outline:1px solid var(--dsw-focus-ring-color, var(--dsw-alias-brand-primary, #D97757))!important;outline-offset:-1px!important}body[data-dsh-claude-style] .dsh-claude-turn-nav-row[data-current]{color:var(--dsw-alias-label-primary, #141413);font-weight:500}body[data-dsh-claude-style] .dsh-claude-turn-nav-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body[data-dsh-claude-style] .dsh-claude-turn-nav-dash{flex:none}@keyframes dsh-claude-turn-nav-landed{0%{opacity:0;transform:scaleX(.5)}25%{opacity:1;transform:scaleX(1)}70%{opacity:1;transform:scaleX(1)}to{opacity:0;transform:scaleX(1)}}body[data-dsh-claude-style] [data-dsh-claude-turn-nav-landed]{position:relative!important}body[data-dsh-claude-style] [data-dsh-claude-turn-nav-landed]:after{content:\\\"\\\"!important;position:absolute!important;left:0!important;right:0!important;top:-8px!important;height:2px!important;border-radius:1px!important;background:var(--dsw-alias-brand-primary, #D97757)!important;pointer-events:none!important;animation:dsh-claude-turn-nav-landed 1.4s ease-out forwards!important}body[data-dsh-claude-style][data-dsh-claude-motion=reduced] [data-dsh-claude-turn-nav-landed]:after{animation:none!important}body[data-dsh-claude-style][data-dsh-claude-chat-follow] [data-step-process]:not([data-group-expanded-mode]) [data-step-process-body]{overflow-x:hidden}body[data-dsh-claude-style][data-dsh-claude-chat-follow] [data-dsh-claude-stream-glide]{visibility:hidden}body[data-dsh-claude-style][data-dsh-claude-chat-follow] [data-dsh-claude-follow-tail]{position:fixed!important;left:var(--dsh-claude-follow-tail-left)!important;bottom:var(--dsh-claude-follow-tail-bottom)!important;right:auto!important;top:auto!important;transform:translate(-50%)!important;z-index:2!important}body[data-dsh-claude-style][data-dsh-claude-chat-fold] [data-step-process][data-dsh-claude-summary] button[data-process-activity]>:not([aria-hidden=true]){display:none}body[data-dsh-claude-style] .dsh-claude-process-summary{position:relative;display:inline-flex;flex:1 1 auto;align-items:baseline;min-width:0;overflow:hidden;white-space:nowrap}body[data-dsh-claude-style] .dsh-claude-process-summary-fit{position:absolute;width:max-content;visibility:hidden;white-space:nowrap;pointer-events:none}body[data-dsh-claude-style] .dsh-claude-process-summary-part{display:inline-flex;flex:none;align-items:baseline}body[data-dsh-claude-style] .dsh-claude-process-summary-words{white-space:pre}body[data-dsh-claude-style] .dsh-claude-process-summary-roll{position:relative;display:inline-flex;flex-shrink:0;justify-content:center;overflow:hidden;font-variant-numeric:tabular-nums}body[data-dsh-claude-style] .dsh-claude-process-summary-sizer{visibility:hidden}body[data-dsh-claude-style] .dsh-claude-process-summary-digit{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}body[data-dsh-claude-style] .dsh-claude-process-summary-digit[data-dsh-claude-roll=exit]{animation:dsh-claude-summary-roll-out .16s cubic-bezier(.16,1,.3,1) forwards}body[data-dsh-claude-style] .dsh-claude-process-summary-digit[data-dsh-claude-roll=enter]{animation:dsh-claude-summary-roll-in .16s cubic-bezier(.16,1,.3,1) forwards}@keyframes dsh-claude-summary-roll-out{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}@keyframes dsh-claude-summary-roll-in{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes dsh-claude-summary-shimmer{66.6667%,to{mask-position:0% center}}body[data-dsh-claude-style] .dsh-claude-process-summary[data-dsh-claude-summary-running]{mask-image:linear-gradient(90deg,#000 calc(50% - 48px),#0000007f,#000 calc(50% + 48px));mask-position:100% center;mask-repeat:no-repeat;mask-size:250% 100%;animation:dsh-claude-summary-shimmer 1.5s cubic-bezier(.33,0,.67,1) infinite}body[data-dsh-claude-style][data-dsh-claude-motion=reduced] .dsh-claude-process-summary[data-dsh-claude-summary-running]{mask-image:none;animation:none}body[data-dsh-claude-style][data-dsh-claude-motion=reduced] .dsh-claude-process-summary-digit{animation:none}body[data-dsh-claude-style]:not([data-dsh-claude-reader-hold]) [data-chat-following-tail] [data-chat-running],body[data-dsh-claude-style]:not([data-dsh-claude-reader-hold]) [data-dsh-claude-follow-hold] [data-chat-running]{position:sticky;bottom:calc(var(--dsh-composer-height, 0px) + var(--dsh-composer-fade-h, 40px) + 16px);z-index:1;background:var(--dsh-claude-canvas, var(--dsw-alias-bg-base, #FCFCFB))}body[data-dsh-claude-style] [data-chat-running][data-dsh-claude-wait]>span>:not([aria-hidden=true]):not(.dsh-claude-chat-wait){display:none}body[data-dsh-claude-style] .dsh-claude-chat-wait{display:inline-flex;align-items:center;min-width:0;font-size:14px;line-height:24px;white-space:nowrap}body[data-dsh-claude-style] .dsh-claude-chat-wait-label{--dsh-claude-wait-swap-duration: .15s;--dsh-claude-wait-swap-shift: 4px;--dsh-claude-wait-swap-blur: 2px;--dsh-claude-wait-swap-ease: ease-in-out;position:relative;display:inline-block;color:var(--dsw-alias-label-secondary);transform:translateY(0);filter:blur(0);opacity:1;transition:transform var(--dsh-claude-wait-swap-duration) var(--dsh-claude-wait-swap-ease),filter var(--dsh-claude-wait-swap-duration) var(--dsh-claude-wait-swap-ease),opacity var(--dsh-claude-wait-swap-duration) var(--dsh-claude-wait-swap-ease);will-change:transform,filter,opacity}body[data-dsh-claude-style] .dsh-claude-chat-wait-label[data-dsh-claude-wait-swap=exit]{transform:translateY(calc(var(--dsh-claude-wait-swap-shift) * -1));filter:blur(var(--dsh-claude-wait-swap-blur));opacity:0}body[data-dsh-claude-style] .dsh-claude-chat-wait-label[data-dsh-claude-wait-swap=enter]{transform:translateY(var(--dsh-claude-wait-swap-shift));filter:blur(var(--dsh-claude-wait-swap-blur));opacity:0;transition:none}body[data-dsh-claude-style][data-dsh-claude-motion=reduced] .dsh-claude-chat-wait-label{transition:none}body[data-dsh-claude-style] .dsh-claude-chat-wait-label:before{content:attr(data-text);position:absolute;inset:0;pointer-events:none;background-image:linear-gradient(90deg,transparent 0%,transparent 40%,var(--dsw-alias-label-primary) 50%,transparent 60%,transparent 100%);background-size:400% 100%;background-repeat:no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:dsh-claude-wait-shimmer 2s linear infinite}@keyframes dsh-claude-wait-shimmer{0%{background-position:100% 0}to{background-position:0% 0}}body[data-dsh-claude-style][data-dsh-claude-motion=reduced] .dsh-claude-chat-wait-label:before{content:none}body[data-dsh-claude-style] .dsh-claude-chat-wait-clock{margin-left:8px;font-size:13px;font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-caption)}body[data-dsh-claude-style] .dsh-claude-chat-wait-badge{margin-left:8px;padding:0 6px;border-radius:5px;font-size:11px;line-height:16px;color:var(--dsw-alias-state-warn-label);background:color-mix(in srgb,var(--dsw-alias-state-warn-label) 16%,transparent)}body[data-dsh-claude-style] .dsh-claude-chat-wait [hidden]{display:none}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-0),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-0){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 20%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-1),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-1){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 23.48%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-2),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-2){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 26.96%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-3),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-3){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 30.43%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-4),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-4){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 33.91%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-5),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-5){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 37.39%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-6),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-6){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 40.87%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-7),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-7){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 44.35%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-8),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-8){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 47.83%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-9),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-9){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 51.3%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-10),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-10){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 54.78%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-11),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-11){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 58.26%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-12),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-12){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 61.74%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-13),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-13){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 65.22%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-14),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-14){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 68.7%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-15),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-15){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 72.17%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-16),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-16){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 75.65%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-17),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-17){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 79.13%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-18),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-18){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 82.61%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-19),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-19){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 86.09%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-20),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-20){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 89.57%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-21),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-21){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 93.04%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-22),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-22){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 96.52%,transparent)}body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming]::highlight(dsh-claude-tok-23),body[data-dsh-claude-style][data-dsh-claude-chat-reveal] [data-streaming] ::highlight(dsh-claude-tok-23){color:color-mix(in srgb,var(--dsh-claude-run-color, currentColor) 100%,transparent)}body[data-dsh-claude-style]{--dsh-claude-diff-added: var(--dsw-alias-file-diff-added-marker);--dsh-claude-diff-deleted: var(--dsw-alias-file-diff-deleted-marker)}body[data-dsh-claude-style] .dsh-claude-file-root{display:flex;flex-direction:column}body[data-dsh-claude-style] .dsh-claude-file-leading{flex-shrink:0}body[data-dsh-claude-style] .dsh-claude-file-chevron{color:var(--dsw-alias-label-secondary)}body[data-dsh-claude-style] .dsh-claude-file-title{font-weight:400;transition:color .1s ease}body[data-dsh-claude-style] .dsh-claude-file-sep{flex:none;width:2px;height:2px;border-radius:1px;margin:0 8px;background:var(--dsw-alias-label-caption)}body[data-dsh-claude-style] .dsh-claude-file-summary{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--dsh-content-font-size-secondary, 13px);line-height:calc(24px + var(--dsh-content-font-delta, 0px));color:var(--dsw-alias-label-tertiary);transition:color .1s ease}body[data-dsh-claude-style] .dsh-claude-file-suffix{flex:none;display:inline-flex;align-items:baseline;gap:6px;margin-left:10px;white-space:nowrap}body[data-dsh-claude-style] .dsh-claude-file-stat{font-family:var(--ds-font-family-code);font-size:calc(var(--dsh-content-font-size-secondary, 13px) - 2px);line-height:calc(24px + var(--dsh-content-font-delta, 0px));transform:translateY(.5px)}body[data-dsh-claude-style] .dsh-claude-file-add{color:var(--dsh-claude-diff-added)}body[data-dsh-claude-style] .dsh-claude-file-del{color:var(--dsh-claude-diff-deleted)}body[data-dsh-claude-style] [data-dsh-claude-file-merge=gone]{display:none}body[data-dsh-claude-style] .dsh-claude-file-roll{font-variant-numeric:tabular-nums}body[data-dsh-claude-style] .dsh-claude-file-roll-digit{position:relative;display:inline-block;clip-path:inset(0);height:1em;line-height:1em;vertical-align:baseline}body[data-dsh-claude-style] .dsh-claude-file-roll-out{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;animation:dsh-claude-file-roll-out .16s cubic-bezier(.16,1,.3,1) forwards}body[data-dsh-claude-style] .dsh-claude-file-roll-moving .dsh-claude-file-roll-in{animation:dsh-claude-file-roll-in .16s cubic-bezier(.16,1,.3,1)}@keyframes dsh-claude-file-roll-out{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}@keyframes dsh-claude-file-roll-in{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}body[data-dsh-claude-style][data-dsh-claude-motion=reduced] .dsh-claude-file-roll-out,body[data-dsh-claude-style][data-dsh-claude-motion=reduced] .dsh-claude-file-roll .dsh-claude-file-roll-in{animation:none}body[data-dsh-claude-style] .dsh-claude-file-row:hover .dsh-claude-file-title,body[data-dsh-claude-style] .dsh-claude-file-row:hover .dsh-claude-file-summary:not(.dsh-claude-file-error):not(.dsh-claude-file-stopped){color:var(--dsw-alias-label-primary)}body[data-dsh-claude-style] .dsh-claude-file-link{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0;padding:0;border:none;background:none;font:inherit;text-align:left;font-size:var(--dsh-content-font-size-secondary, 13px);line-height:calc(24px + var(--dsh-content-font-delta, 0px));color:var(--dsw-alias-label-secondary);text-decoration:underline dotted;text-decoration-color:var(--dsw-alias-label-tertiary);text-decoration-thickness:1px;text-underline-offset:3px;cursor:pointer;transition:color .1s ease}body[data-dsh-claude-style] .dsh-claude-file-row:hover .dsh-claude-file-link,body[data-dsh-claude-style] .dsh-claude-file-link:hover{color:var(--dsw-alias-label-primary);text-decoration-color:currentColor}body[data-dsh-claude-style] .dsh-claude-file-error{color:var(--dsw-alias-state-error-primary)}body[data-dsh-claude-style] .dsh-claude-file-stopped{color:var(--dsw-alias-state-warn-label)}body[data-dsh-claude-style] .dsh-claude-file-body{display:flex;flex-direction:column}body[data-dsh-claude-style] .dsh-claude-file-diff,body[data-dsh-claude-style] .dsh-claude-file-io{margin:4px 0 4px 4px}body[data-dsh-claude-style] .dsh-claude-file-io{display:flex;flex-direction:column;border:.5px solid var(--dsw-alias-border-l1);border-radius:12px;background:var(--dsw-alias-markdown-code-block);font:var(--dsw-font-markdown-code-block-small)}body[data-dsh-claude-style] .dsh-claude-file-io-section{display:grid;grid-template-columns:max-content 1fr;column-gap:14px;align-items:baseline;padding:12px 16px;max-height:150px;overflow-y:auto}body[data-dsh-claude-style] .dsh-claude-file-io-divider{flex:none;height:.5px;background:var(--dsw-alias-border-l2)}body[data-dsh-claude-style] .dsh-claude-file-io-label{position:sticky;top:0;align-self:start;color:var(--dsw-alias-label-caption)}body[data-dsh-claude-style] .dsh-claude-file-io-text{min-width:0;white-space:pre-wrap;word-break:break-word;color:var(--dsw-alias-label-secondary)}body[data-dsh-claude-style] .dsh-claude-file-io-text[data-error]{color:var(--dsw-alias-state-error-primary)}body[data-dsh-claude-style] .dsh-claude-file-inspect{display:inline-flex;align-self:flex-start;align-items:center;gap:4px;margin:4px 0 2px 4px;padding:2px 8px;border:.5px solid var(--dsw-alias-border-l3);border-radius:999px;corner-shape:round;background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-secondary);font-size:11px;line-height:16px;cursor:pointer;opacity:0;transition:opacity .1s ease}body[data-dsh-claude-style] .dsh-claude-file-root:hover .dsh-claude-file-inspect,body[data-dsh-claude-style] .dsh-claude-file-inspect:focus-visible{opacity:1}body[data-dsh-claude-style] .dsh-claude-file-inspect:hover{background:var(--dsw-alias-interactive-bg-hover-solid);color:var(--dsw-alias-label-primary)}body[data-dsh-claude-style] .dsh-claude-file-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}body[data-dsh-claude-style] [data-dsh-claude-send-flight]{visibility:hidden}@starting-style{body[data-dsh-claude-style][data-dsh-claude-chat-fold] [data-chat-flow] [data-disclosure-row]~*:not([data-turn-process-member] *,[data-turn-trigger] *){opacity:0;translate:0 -2px}}body[data-dsh-claude-style][data-dsh-claude-chat-fold] [data-chat-flow] [data-disclosure-row]~*:not([data-turn-process-member] *,[data-turn-trigger] *){transition:opacity .12s ease-out,translate .12s ease-out}body[data-dsh-claude-style][data-dsh-claude-motion=reduced] [data-chat-flow] [data-disclosure-row]~*:not([data-turn-process-member] *,[data-turn-trigger] *){transition:none}body[data-dsh-claude-style] [data-dsh-claude-rolling]>*{flex:none!important}body[data-dsh-claude-style] [data-dsh-claude-reason-window]{--dsh-claude-reason-hold: .84s;--dsh-claude-reason-lines: 2;--dsh-claude-reason-window-lines: 4;--dsh-claude-reason-window-cap: 400px;--dsh-claude-reason-fade: 28px;--dsh-claude-reason-ease: cubic-bezier(.22, 1, .36, 1);overflow:hidden;height:var(--dsh-claude-reason-window-height, auto)}body[data-dsh-claude-style] [data-dsh-claude-reason-window][data-dsh-claude-reason-capped]{-webkit-mask-image:linear-gradient(transparent 0,black var(--dsh-claude-reason-fade),black calc(100% - var(--dsh-claude-reason-fade)),transparent 100%);mask-image:linear-gradient(transparent 0,black var(--dsh-claude-reason-fade),black calc(100% - var(--dsh-claude-reason-fade)),transparent 100%)}body[data-dsh-claude-style] [data-dsh-claude-reason-window]>[data-markdown-variant]{transform:translateY(0);transition:transform var(--dsh-claude-reason-step, .5s) var(--dsh-claude-reason-ease);will-change:transform}body[data-dsh-claude-style][data-dsh-claude-motion=reduced] [data-dsh-claude-reason-window]{-webkit-mask-image:none;mask-image:none}body[data-dsh-claude-style][data-dsh-claude-motion=reduced] [data-dsh-claude-reason-window]>[data-markdown-variant]{transform:none!important;transition:none}body[data-dsh-claude-style] [data-composer-input][data-dsh-claude-caret],body[data-dsh-claude-style] textarea[data-dsh-claude-caret]{caret-color:transparent}body[data-dsh-claude-style] [data-dsh-claude-caret-host]{position:relative}body[data-dsh-claude-style] [data-dsh-claude-caret-layer][data-dsh-claude-caret-layer]{position:absolute;top:0;left:0;grid-area:auto;box-sizing:content-box;width:2px;min-width:0;max-width:none;min-height:0;max-height:none;margin:0;padding:0;border:0;visibility:hidden;pointer-events:none;background:var(--dsh-claude-caret-color, var(--dsw-alias-state-business-primary, currentColor));transition:transform 80ms ease;will-change:transform;animation:dsh-claude-caret-blink 1s step-end infinite}body[data-dsh-claude-style] [data-dsh-claude-caret-layer][data-dsh-claude-caret-layer][data-dsh-claude-caret-visible]{visibility:visible}@keyframes dsh-claude-caret-blink{50%{opacity:0}}body[data-dsh-claude-style][data-dsh-claude-motion=reduced] [data-dsh-claude-caret-layer][data-dsh-claude-caret-layer]{transition:none;animation:none}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-dsh-claude-permissions] button[data-dsh-claude-control=access]{display:none}body[data-dsh-claude-style] .dsh-claude-segments{flex:none;align-items:center;gap:2px;padding:2px;border-radius:7px;background:var(--dsw-specific-selector);display:inline-flex;position:relative}body[data-dsh-claude-style]:not([data-ds-dark-theme]) .dsh-claude-segments{background:var(--dsh-claude-chip)}body[data-dsh-claude-style] .dsh-claude-segment{appearance:none;margin:0;border:0;cursor:pointer;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:14px;font-weight:500;line-height:18px;padding:3px 12px;border-radius:7px;transition:background-color .1s,color .1s}body[data-dsh-claude-style] .dsh-claude-segment:hover:not([data-active]){color:var(--dsw-alias-label-primary)}body[data-dsh-claude-style] .dsh-claude-segment[data-active]{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3)}body[data-dsh-claude-style]:not([data-ds-dark-theme]) .dsh-claude-segment[data-active]{background:var(--dsw-alias-bg-overlay);box-shadow:0 1px 2px #14141314}body[data-dsh-claude-style] .dsh-claude-segments[data-dsh-claude-pill]:before{top:2px;bottom:2px;border-radius:7px;background:var(--dsw-alias-bg-layer-3)}body[data-dsh-claude-style]:not([data-ds-dark-theme]) .dsh-claude-segments[data-dsh-claude-pill]:before{background:var(--dsw-alias-bg-overlay);box-shadow:0 1px 2px #14141314}body[data-dsh-claude-style] .dsh-claude-segments[data-dsh-claude-pill]>.dsh-claude-segment[data-active]{background:transparent;box-shadow:none}body[data-dsh-claude-style] .dsh-claude-perm-container{position:relative;display:inline-flex;z-index:20}body[data-dsh-claude-style] .dsh-claude-perm-btn{display:inline-flex;align-items:center;gap:4px;height:24px;max-width:132px;padding:0 6px;border-radius:6px;border:none!important;background:transparent;color:var(--dsw-alias-label-primary, #141413);font-family:var(--dsw-font-family);font-size:13px;font-weight:500;cursor:pointer;user-select:none;transition:background-color .12s ease}body[data-dsh-claude-style] .dsh-claude-perm-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-perm-btn{color:var(--dsw-alias-label-primary)}body[data-dsh-claude-style] .dsh-claude-perm-btn:hover,body[data-dsh-claude-style] .dsh-claude-perm-btn[data-open=true]{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))}body[data-dsh-claude-style] .dsh-claude-perm-popover{position:fixed;min-width:248px;display:flex;flex-direction:column;gap:6px;transform-origin:bottom left}body[data-dsh-claude-style] [class*=footArea]{position:relative;overflow:visible;margin:0 calc(-1 * var(--dsh-sidebar-inline-padding, 12px)) -6px;padding:8px var(--dsh-sidebar-inline-padding, 12px) 6px;border-top:1px solid var(--dsw-alias-border-l1, #e8e6dc);background:transparent;box-sizing:border-box}body[data-dsh-claude-style][data-ds-dark-theme] [class*=footArea]{border-top-color:var(--dsw-alias-border-l2)}body[data-dsh-claude-style] .dsh-claude-account-btn{display:flex;align-items:center;width:100%;height:32px;box-sizing:border-box;padding:0 8px;margin:0;border-radius:6px;cursor:pointer;user-select:none;background:transparent;transition:background-color .12s ease}body[data-dsh-claude-style] .dsh-claude-account-btn:hover,body[data-dsh-claude-style] .dsh-claude-account-btn[data-open=true]{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))}body[data-dsh-claude-style] .dsh-claude-account-avatar{width:18px;height:18px;background:var(--dsh-claude-image-anthropic-mark) center / contain no-repeat;flex:none;margin-right:8px;border-radius:50%;corner-shape:round;overflow:hidden}body[data-dsh-claude-style][data-dsh-claude-brand=deepseek] .dsh-claude-account-avatar{background-image:var(--dsh-claude-image-deepseek-mark)}body[data-dsh-claude-style] .dsh-claude-account-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:18px;font-family:var(--dsw-font-family)}body[data-dsh-claude-style] .dsh-claude-account-user{font-weight:500;color:var(--dsw-alias-label-primary)}body[data-dsh-claude-style] .dsh-claude-account-chevron{width:14px;height:14px;flex:none;color:var(--dsw-alias-label-secondary);display:inline-flex;align-items:center;justify-content:center;margin-left:auto}body[data-dsh-claude-style] .dsh-claude-account-chevron:after{content:\\\"\\\";display:inline-block;width:12px;height:12px;background:currentColor;-webkit-mask:url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E\\\") center / contain no-repeat;mask:url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E\\\") center / contain no-repeat;transition:transform .15s ease}body[data-dsh-claude-style] .dsh-claude-account-btn[data-open=true] .dsh-claude-account-chevron:after{transform:rotate(180deg)}body[data-dsh-claude-style] .dsh-claude-account-popover{position:absolute;bottom:calc(100% + 4px);left:var(--dsh-claude-account-inset-left, 0px);right:var(--dsh-claude-account-inset-right, 0px);width:auto;max-width:none;min-width:0;background:var(--dsh-claude-card);display:flex;flex-direction:column;gap:6px;transform:translateY(6px) scale(.98);transform-origin:bottom left}body[data-dsh-claude-style] .dsh-claude-account-popover:after{content:\\\"\\\";position:absolute;top:100%;left:0;right:0;height:12px;background:transparent}body[data-dsh-claude-style] .dsh-claude-account-popover-row{min-height:32px;padding:2px 7px;border-radius:6px;cursor:pointer;transition:background-color .12s ease}body[data-dsh-claude-style] .dsh-claude-account-popover-row:hover,body[data-dsh-claude-style] .dsh-claude-account-popover-row:focus-visible{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))!important;outline:none!important}body[data-dsh-claude-style] .dsh-claude-account-popover-header .dsh-claude-account-popover-divider{margin:0 -6px}body[data-dsh-claude-style] .dsh-claude-account-avatar[data-dsh-claude-photo]{position:relative!important}body[data-dsh-claude-style] .dsh-claude-account-avatar[data-dsh-claude-photo]:before{display:none!important}body[data-dsh-claude-style] .dsh-claude-account-photo{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important;border-radius:inherit!important;pointer-events:none!important}body[data-dsh-claude-style] .dsh-claude-account-photo[hidden]{display:none!important}body[data-dsh-claude-style] .dsh-claude-account-avatar[data-dsh-claude-skin]{position:relative!important;background-image:none!important;border-radius:0!important}body[data-dsh-claude-style] .dsh-claude-account-avatar[data-dsh-claude-skin]:before{display:none!important}body[data-dsh-claude-style] .dsh-claude-account-skin{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;border-radius:inherit!important;pointer-events:none!important;image-rendering:pixelated}body[data-dsh-claude-style] .dsh-claude-account-popover .dsh-claude-popover-item:hover{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))!important}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-account-popover .dsh-claude-popover-item:hover{background:#ffffff1a!important}body[data-dsh-claude-style] .dsh-claude-account-popover .dsh-claude-popover-item[aria-disabled=true]{opacity:.5!important;cursor:default!important}body[data-dsh-claude-style] [data-dsh-claude-account-host-row]{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;width:100%!important;height:32px!important;box-sizing:border-box!important;padding:0 8px!important;margin:0!important;border:none!important;border-radius:6px!important;background:transparent!important;color:var(--dsw-alias-label-primary)!important;font-size:13px!important;font-weight:500!important;font-family:var(--dsw-font-family)!important;text-align:left!important;cursor:pointer!important;transition:background-color .12s ease!important}body[data-dsh-claude-style] [data-dsh-claude-account-host-row]:hover{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))!important}body[data-dsh-claude-style] [data-dsh-claude-account-host-row] img{width:18px!important;height:18px!important;flex:none!important;border-radius:50%!important;object-fit:cover!important}body[data-dsh-claude-style] [data-dsh-claude-account-host-row]:after{content:\\\"\\\"!important;display:inline-block!important;width:12px!important;height:12px!important;flex:none!important;margin-left:auto!important;background:currentColor!important;opacity:.55!important;-webkit-mask:url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E\\\") center / contain no-repeat;mask:url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E\\\") center / contain no-repeat}body[data-dsh-claude-style] [class*=footArea] [class*=triggerRow]:has([data-dsh-claude-account-host-row]){display:flex!important;align-items:center!important;width:100%!important}body[data-dsh-claude-style] [class*=footArea] [class*=triggerRow] :has([data-dsh-claude-account-host-row]){display:flex!important;align-items:center!important;flex:1 1 auto!important;min-width:0!important}body[data-dsh-claude-style] .dsh-claude-account-inject{display:flex!important;flex-direction:column!important;gap:2px!important;padding:0!important}body[data-dsh-claude-style] [data-dsh-claude-account-menu]{width:var(--dsh-claude-account-width, 260px)!important;min-width:0!important;max-width:none!important;box-sizing:border-box!important;padding:6px!important;border:1px solid var(--dsw-alias-border-l1, #e8e6dc)!important;border-radius:12px!important;background:var(--dsh-claude-card)!important;box-shadow:0 8px 30px #1414131f,0 2px 8px #1414130f!important;font-family:var(--dsw-font-family)!important}body[data-dsh-claude-style][data-dsh-claude-palette=claude] [data-dsh-claude-account-menu]{--dsw-menu-surface-fill: var(--dsh-claude-card);--dsw-menu-backdrop-filter: none}body[data-dsh-claude-style][data-dsh-claude-account-armed] div[role=menu][data-menu-material]:not([data-dsh-claude-account-ready]){visibility:hidden!important;animation:none!important}body[data-dsh-claude-style][data-dsh-claude-account-armed] div[role=menu][data-menu-material][data-dsh-claude-account-ready]{transform-origin:bottom left!important;animation:dsh-claude-account-menu-in .15s ease!important}@keyframes dsh-claude-account-menu-in{0%{opacity:0;transform:translateY(6px) scale(.98)}to{opacity:1;transform:none}}body[data-dsh-claude-style][data-ds-dark-theme] [data-dsh-claude-account-menu]{background:var(--dsh-claude-raised)!important;border-color:var(--dsw-alias-border-l2)!important;box-shadow:0 8px 30px #00000080,0 2px 8px #0000004d!important}body[data-dsh-claude-style] [data-dsh-claude-account-menu] [class*=itemWrap]>[role=menuitem]{min-height:32px!important;padding:2px 7px!important;gap:8px!important;border-radius:6px!important;font-size:13px!important;line-height:20px!important;font-weight:400!important;color:var(--dsw-alias-label-primary, #141413)!important;transition:background-color .12s ease!important}body[data-dsh-claude-style] [data-dsh-claude-account-menu] [class*=itemWrap]>[role=menuitem]:hover:not(:disabled),body[data-dsh-claude-style] [data-dsh-claude-account-menu] [class*=itemWrap]>[role=menuitem]:focus-visible:not(:disabled){background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))!important}body[data-dsh-claude-style] [data-dsh-claude-account-menu] [class*=_selected]{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))!important}body[data-dsh-claude-style] [data-dsh-claude-account-menu] [class*=itemLabel]{font-size:13px!important;line-height:20px!important}body[data-dsh-claude-style] [data-dsh-claude-account-menu] [class*=itemIcon]{width:16px!important;height:16px!important;color:var(--dsw-alias-label-secondary, #787672)!important}body[data-dsh-claude-style] [data-dsh-claude-account-menu] [class*=itemIcon] svg{width:16px!important;height:16px!important}body[data-dsh-claude-style] [data-dsh-claude-account-menu] [role=separator]{height:1px!important;margin:2px -6px!important;background:var(--dsw-alias-border-l1, #e8e6dc)!important}body[data-dsh-claude-style] [data-dsh-claude-account-menu] [class*=_viewport]{padding:0!important;overflow-x:hidden!important}body[data-dsh-claude-style] [data-dsh-claude-account-menu] [class*=_footer]{margin-top:2px!important;padding-top:2px!important;border-top:1px solid var(--dsw-alias-border-l1, #e8e6dc)!important}body[data-dsh-claude-style] [data-dsh-claude-account-menu] .dsh-claude-account-inject{width:100%!important}body[data-dsh-claude-style] .dsh-claude-account-popover-header{padding:6px 0;display:flex;flex-direction:column;gap:2px}body[data-dsh-claude-style] .dsh-claude-account-popover-name{font-size:14px;font-weight:600;color:var(--dsw-alias-label-primary, #141413);line-height:18px;font-family:var(--dsw-font-family)}body[data-dsh-claude-style] .dsh-claude-account-popover-divider{height:1px;background:var(--dsw-alias-border-l1, #e8e6dc);margin:2px 0;flex:none}body[data-dsh-claude-style] .dsh-claude-account-popover-body{display:flex;flex-direction:column;gap:2px;max-height:360px;overflow-y:auto;overflow-x:hidden}body[data-dsh-claude-style] .dsh-claude-ban{--dsh-ban-canvas: #faf9f5;--dsh-ban-text: #141413;--dsh-ban-muted: #6e6a60;--dsh-ban-card: #ffffff;--dsh-ban-hairline: #e4e2d8;--dsh-ban-hover: rgba(20, 20, 19, .05);--dsh-ban-primary-fill: #141413;--dsh-ban-primary-text: #faf9f5;--dsh-ban-primary-hover: #2e2c29;--dsh-ban-danger: #a8412b;--dsh-ban-danger-hover: #8f3623;--dsh-ban-toast-bg: #f6e3c0;--dsh-ban-toast-border: #e6cfa1;--dsh-ban-toast-text: #7a4f12;--dsh-ban-toast-icon: #9a5a15;--dsh-ban-toast-hover: rgba(20, 20, 19, .09);--dsh-ban-mark: #d97757;--dsh-ban-word: #141413;position:fixed!important;inset:0!important;z-index:2147483000!important;margin:0!important;padding:0!important;background:var(--dsh-ban-canvas)!important;color:var(--dsh-ban-text);font-family:var(--dsw-font-family);font-size:15px;line-height:1.6;-webkit-font-smoothing:antialiased;box-sizing:border-box}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-ban{--dsh-ban-canvas: #141413;--dsh-ban-text: #faf9f5;--dsh-ban-muted: #b0aea5;--dsh-ban-card: #1c1b1a;--dsh-ban-hairline: #2e2c29;--dsh-ban-hover: rgba(255, 255, 255, .07);--dsh-ban-primary-fill: #faf9f5;--dsh-ban-primary-text: #141413;--dsh-ban-primary-hover: #e8e6dc;--dsh-ban-danger: #e08a6d;--dsh-ban-danger-hover: #eb9f84;--dsh-ban-toast-bg: #3a2a22;--dsh-ban-toast-border: #55402f;--dsh-ban-toast-text: #f0d8b8;--dsh-ban-toast-icon: #e0a86a;--dsh-ban-toast-hover: rgba(255, 255, 255, .08);--dsh-ban-word: #faf9f5}body[data-dsh-claude-style] .dsh-claude-ban *,body[data-dsh-claude-style] .dsh-claude-ban *:before,body[data-dsh-claude-style] .dsh-claude-ban *:after{box-sizing:border-box}body[data-dsh-claude-style] .dsh-claude-ban svg{display:block;width:100%;height:100%}body[data-dsh-claude-style] .dsh-claude-ban-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:40px 8px 10px 44px}body[data-dsh-claude-style] .dsh-claude-ban-brand{display:flex;align-items:center;gap:8px;color:var(--dsh-ban-word)}body[data-dsh-claude-style] .dsh-claude-ban-mark{flex:none;width:21px;height:21px;background-color:var(--dsh-ban-mark);-webkit-mask:var(--dsh-claude-image-claude-mark) center / contain no-repeat;mask:var(--dsh-claude-image-claude-mark) center / contain no-repeat}body[data-dsh-claude-style] .dsh-claude-ban-word{flex:none;width:89px;height:21px;background-color:var(--dsh-ban-word);-webkit-mask:var(--dsh-claude-image-claude-word) center / contain no-repeat;mask:var(--dsh-claude-image-claude-word) center / contain no-repeat}body[data-dsh-claude-style] .dsh-claude-ban-bar-actions{display:flex;align-items:center;gap:8px}body[data-dsh-claude-style] .dsh-claude-ban-signout{appearance:none;margin:0;border:1px solid var(--dsh-ban-hairline);border-radius:8px;background:var(--dsh-ban-card);color:var(--dsh-ban-text);padding:6px 14px;font:inherit;font-size:13px;line-height:18px;cursor:pointer;box-shadow:0 1px 2px #1414130d;transition:background-color .12s ease}body[data-dsh-claude-style] .dsh-claude-ban-signout:hover{background:var(--dsh-ban-hover)}body[data-dsh-claude-style] .dsh-claude-ban-window{display:flex;align-items:center}body[data-dsh-claude-style] .dsh-claude-ban-win{appearance:none;margin:0;border:0;background:transparent;color:var(--dsh-ban-muted);width:34px;height:28px;padding:6px;cursor:pointer;border-radius:4px;transition:background-color .12s ease}body[data-dsh-claude-style] .dsh-claude-ban-win:hover{background:var(--dsh-ban-hover);color:var(--dsh-ban-text)}body[data-dsh-claude-style] .dsh-claude-ban[data-dsh-ban-titlebar] .dsh-claude-ban-bar{height:var(--dsh-ban-caption-height, 40px)!important;padding:0 calc(var(--dsh-ban-caption-controls, 140px) + 10px) 0 44px!important;-webkit-app-region:drag}body[data-dsh-claude-style] .dsh-claude-ban[data-dsh-ban-titlebar][data-dsh-ban-controls=left] .dsh-claude-ban-bar{padding:0 10px 0 calc(var(--dsh-ban-caption-controls, 88px) + 10px)!important}body[data-dsh-claude-style] .dsh-claude-ban[data-dsh-ban-titlebar] .dsh-claude-ban-brand{position:relative;top:4px}body[data-dsh-claude-style] .dsh-claude-ban[data-dsh-ban-titlebar] .dsh-claude-ban-signout{-webkit-app-region:no-drag}body[data-dsh-claude-style] .dsh-claude-ban[data-dsh-ban-titlebar] .dsh-claude-ban-window{display:none!important}body[data-dsh-claude-style] .dsh-claude-ban[data-dsh-ban-titlebar] .dsh-claude-ban-scroll{inset:calc(var(--dsh-ban-caption-height, 40px) + 6px) 0 0 0}body[data-dsh-claude-style] .dsh-claude-ban[data-dsh-ban-titlebar] .dsh-claude-ban-toast{top:calc(var(--dsh-ban-caption-height, 40px) + 16px)}body[data-dsh-claude-style] .dsh-claude-ban-toast{position:absolute;top:94px;right:40px;display:flex;align-items:center;gap:10px;max-width:340px;padding:10px 12px;border:1px solid var(--dsh-ban-toast-border);border-radius:12px;background:var(--dsh-ban-toast-bg);color:var(--dsh-ban-toast-text);font-size:13px;line-height:18px;cursor:pointer;box-shadow:0 4px 16px #14141314;animation:dsh-claude-ban-toast-in .22s ease both}@keyframes dsh-claude-ban-toast-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}body[data-dsh-claude-style] .dsh-claude-ban-toast-icon{flex:none;width:16px;height:16px;color:var(--dsh-ban-toast-icon)}body[data-dsh-claude-style] .dsh-claude-ban-toast-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body[data-dsh-claude-style] .dsh-claude-ban-toast-close{flex:none;width:14px;height:14px;opacity:.7}body[data-dsh-claude-style] .dsh-claude-ban-toast:hover{border-color:var(--dsh-ban-toast-icon)}body[data-dsh-claude-style] .dsh-claude-ban-scroll{position:absolute;inset:86px 0 0;overflow-y:auto;overflow-x:hidden}body[data-dsh-claude-style] .dsh-claude-ban-column{width:63%;max-width:1150px;margin:0 auto;padding:70px 40px 96px}body[data-dsh-claude-style] .dsh-claude-ban-lock{display:block;width:75px;height:75px;color:var(--dsh-ban-text)}body[data-dsh-claude-style] .dsh-claude-ban-title{margin:26px 0 0;font-family:var(--dsh-claude-font-serif);font-size:31px;font-weight:500;line-height:1.2;letter-spacing:-.015em;color:var(--dsh-ban-text)}body[data-dsh-claude-style] .dsh-claude-ban-lead{margin:22px 0 0;font-size:15px;line-height:1.6;color:var(--dsh-ban-text)}body[data-dsh-claude-style] .dsh-claude-ban-lead strong{font-weight:700}body[data-dsh-claude-style] .dsh-claude-ban-next{margin:32px 0 0;font-size:15px;line-height:1.6;color:var(--dsh-ban-text)}body[data-dsh-claude-style] .dsh-claude-ban-subtitle{margin:44px 0 0;font-family:var(--dsw-font-family);font-size:17px;font-weight:600;line-height:1.4;letter-spacing:0;color:var(--dsh-ban-text)}body[data-dsh-claude-style] .dsh-claude-ban-card{margin-top:18px;border:1px solid var(--dsh-ban-hairline);border-radius:12px;background:var(--dsh-ban-card);overflow:hidden}body[data-dsh-claude-style] .dsh-claude-ban-step{display:flex;align-items:flex-start;gap:14px;padding:16px 24px}body[data-dsh-claude-style] .dsh-claude-ban-step-num{flex:none;width:24px;height:24px;margin-top:1px;border-radius:50%;corner-shape:round;background:var(--dsh-ban-hover);color:var(--dsh-ban-text);font-size:12px;line-height:24px;text-align:center}body[data-dsh-claude-style] .dsh-claude-ban-step-body{display:block;min-width:0}body[data-dsh-claude-style] .dsh-claude-ban-step-title{display:block;font-size:15px;font-weight:500;line-height:1.5;color:var(--dsh-ban-text)}body[data-dsh-claude-style] .dsh-claude-ban-step-desc{display:block;margin-top:2px;font-size:13.5px;line-height:1.5;color:var(--dsh-ban-muted)}body[data-dsh-claude-style] .dsh-claude-ban-primary{appearance:none;display:inline-block;margin:26px 0 0;border:0;border-radius:8px;background:var(--dsh-ban-primary-fill);color:var(--dsh-ban-primary-text);padding:9px 18px;font:inherit;font-size:14px;font-weight:500;line-height:20px;cursor:pointer;transition:background-color .12s ease}body[data-dsh-claude-style] .dsh-claude-ban-primary:hover{background:var(--dsh-ban-primary-hover)}body[data-dsh-claude-style] .dsh-claude-ban-actions{margin-top:18px}body[data-dsh-claude-style] .dsh-claude-ban-action{appearance:none;display:flex;align-items:flex-start;gap:16px;width:100%;margin:0;border:0;background:transparent;color:inherit;padding:18px 24px;font:inherit;text-align:left;cursor:pointer;transition:background-color .12s ease}body[data-dsh-claude-style] .dsh-claude-ban-action+.dsh-claude-ban-action{border-top:1px solid var(--dsh-ban-hairline)}body[data-dsh-claude-style] .dsh-claude-ban-action:hover{background:var(--dsh-ban-hover)}body[data-dsh-claude-style] .dsh-claude-ban-action-icon{flex:none;width:18px;height:18px;margin-top:2px;color:var(--dsh-ban-muted)}body[data-dsh-claude-style] .dsh-claude-ban-action-text{display:block;flex:1;min-width:0}body[data-dsh-claude-style] .dsh-claude-ban-action-title{display:block;font-size:15px;font-weight:500;line-height:1.5;color:var(--dsh-ban-text)}body[data-dsh-claude-style] .dsh-claude-ban-action-title-danger{color:var(--dsh-ban-danger)}body[data-dsh-claude-style] .dsh-claude-ban-action:hover .dsh-claude-ban-action-title-danger{color:var(--dsh-ban-danger-hover)}body[data-dsh-claude-style] .dsh-claude-ban-action-desc{display:block;margin-top:3px;font-size:13.5px;line-height:1.5;color:var(--dsh-ban-muted)}body[data-dsh-claude-style] .dsh-claude-ban-action-chevron{flex:none;width:18px;height:18px;margin-top:3px;color:var(--dsh-ban-muted)}@media(max-width:1000px){body[data-dsh-claude-style] .dsh-claude-ban-column{width:auto;padding:72px 32px 80px}body[data-dsh-claude-style] .dsh-claude-ban-toast{right:24px;max-width:calc(100% - 48px)}}body[data-dsh-claude-style] .dsh-claude-model-popover{position:fixed;min-width:248px;max-width:min(360px,calc(100vw - 16px));max-height:calc(100vh - 80px);overflow-y:auto;display:flex;flex-direction:column;gap:6px;transform-origin:bottom right}body[data-dsh-claude-style] .dsh-claude-model-popover:not(.dsh-claude-model-popover-sub){overflow:hidden}body[data-dsh-claude-style] .dsh-claude-model-popover:not(.dsh-claude-model-popover-sub) .dsh-claude-popover-body{flex:1 1 auto;min-height:0;overflow-y:auto}body[data-dsh-claude-style] .dsh-claude-model-footer{flex:none;display:flex;flex-direction:column;gap:2px;min-width:0}body[data-dsh-claude-style] .dsh-claude-model-popover-sub{padding-top:0}body[data-dsh-claude-style] .dsh-claude-model-group-section{position:relative!important;display:flex!important;flex-direction:column!important;gap:1px!important;min-width:0!important}body[data-dsh-claude-style] .dsh-claude-model-group-row{position:sticky!important;top:0!important;z-index:6!important;align-self:stretch!important;margin:0!important;padding:3px 7px 0!important;background:var(--dsw-alias-bg-overlay, #ffffff)!important}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-model-group-row{background:var(--dsh-claude-raised)!important}body[data-dsh-claude-style] .dsh-claude-model-group{display:inline-flex!important;align-items:center!important;gap:5px!important;margin:0!important;padding:1px 7px!important;background:var(--dsh-claude-inverse-fill)!important;color:var(--dsh-claude-inverse-ink)!important;border-radius:6px!important;font-size:11px!important;font-weight:600!important;line-height:16px!important}body[data-dsh-claude-style] .dsh-claude-model-option{display:flex;align-items:center;gap:8px;width:100%;min-height:32px;padding:2px 7px;border:none!important;border-radius:6px;background:transparent;color:var(--dsw-alias-label-primary, #141413);font-size:13px;text-align:left;cursor:pointer;box-sizing:border-box}body[data-dsh-claude-style] .dsh-claude-model-option:hover{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))!important}body[data-dsh-claude-style] .dsh-claude-model-copy{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}body[data-dsh-claude-style] .dsh-claude-model-name{font-size:13px;font-weight:500;line-height:16px}body[data-dsh-claude-style] .dsh-claude-model-option[data-brand=claude] .dsh-claude-model-name{font-family:var(--dsh-claude-font-brand)!important}body[data-dsh-claude-style] .dsh-claude-model-combine{display:inline-block;height:.72em;margin-right:.25em;vertical-align:baseline}@supports (height: 1cap){body[data-dsh-claude-style] .dsh-claude-model-combine{height:1cap}}body[data-dsh-claude-style] .dsh-claude-model-combine svg{display:block;height:100%;width:auto;overflow:visible}body[data-dsh-claude-style] .dsh-claude-model-combine .dsh-combine-mark-color:not(.dsh-combine-mark-mono){display:none}body[data-dsh-claude-style]:not([data-ds-dark-theme]) .dsh-claude-model-combine .dsh-combine-mark-color{display:block}body[data-dsh-claude-style]:not([data-ds-dark-theme]) .dsh-claude-model-combine .dsh-combine-mark-mono:not(.dsh-combine-mark-color){display:none}body[data-dsh-claude-style] .dsh-claude-model-combine-alt{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}body[data-dsh-claude-style] .dsh-claude-model-desc{font-size:11px;line-height:14px;color:var(--dsw-alias-label-tertiary, #8f8d84)}body[data-dsh-claude-style] .dsh-claude-model-divider,body[data-dsh-claude-style] .dsh-claude-model-rule:after{height:1px!important;background:var(--dsw-alias-border-l1, #e8e6dc)!important}body[data-dsh-claude-style] .dsh-claude-model-divider{margin:2px 4px!important;flex:none!important}body[data-dsh-claude-style] .dsh-claude-model-rule{display:flex!important;align-items:center!important;gap:6px!important;margin:2px 4px!important;flex:none!important}body[data-dsh-claude-style] .dsh-claude-model-rule:after{content:\\\"\\\"!important;flex:1!important}body[data-dsh-claude-style] .dsh-claude-model-rule-name{flex:none!important;font-size:11px!important;line-height:14px!important;color:var(--dsw-alias-label-caption, #a6a094)!important;letter-spacing:.02em!important}body[data-dsh-claude-style] .dsh-claude-model-cell{display:flex!important;align-items:center!important;gap:8px!important;width:100%!important;min-height:32px!important;padding:2px 7px!important;border:none!important;border-radius:6px!important;background:transparent!important;color:var(--dsw-alias-label-primary, #141413)!important;font-size:13px!important;text-align:left!important;cursor:pointer!important;box-sizing:border-box!important}body[data-dsh-claude-style] .dsh-claude-model-cell:hover{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))!important}body[data-dsh-claude-style] .dsh-claude-model-cell-label{flex:1!important;min-width:0!important}body[data-dsh-claude-style] .dsh-claude-model-cell-chevron{flex:none!important;display:inline-flex!important;align-items:center!important;color:var(--dsw-alias-label-caption, #a6a094)!important}body[data-dsh-claude-style] .dsh-claude-peakrate{flex:none;display:inline-flex;align-items:center;gap:3px;padding:1px 6px 1px 5px;border-radius:999px;background:var(--dsh-claude-hover-bg);color:var(--dsw-alias-label-secondary, #8f8d84);font-size:11px;line-height:15px;font-variant-numeric:tabular-nums;white-space:nowrap}body[data-dsh-claude-style] .dsh-claude-peakrate[data-period=peak]{color:var(--dsh-claude-meter-peak)}body[data-dsh-claude-style] .dsh-claude-peakrate[data-period=offPeak],body[data-dsh-claude-style] .dsh-claude-peakrate[data-period=campaign]{color:var(--dsh-claude-meter-valley)}body[data-dsh-claude-style] .dsh-claude-peakrate-icon{display:inline-flex;align-items:center}body[data-dsh-claude-style] .dsh-claude-peakrate-value{font-weight:600;letter-spacing:.01em}body[data-dsh-claude-style] .dsh-claude-peakrate-countdown{color:var(--dsw-alias-label-tertiary, #8f8d84);font-weight:400}body[data-dsh-claude-style] .dsh-claude-effort-popover{position:fixed;min-width:264px;max-width:min(320px,calc(100vw - 16px));transform-origin:bottom right}body[data-dsh-claude-style] .dsh-claude-effort{display:flex;flex-direction:column;gap:3px;padding:3px 7px 4px;min-width:0;user-select:none;-webkit-user-select:none}body[data-dsh-claude-style] .dsh-claude-effort-head{display:flex;align-items:baseline;gap:6px;min-width:0;position:relative}body[data-dsh-claude-style] .dsh-claude-effort-label{flex:none;font-size:13px;line-height:16px;color:var(--dsw-alias-label-secondary, #6e6a60)}body[data-dsh-claude-style] .dsh-claude-effort-value{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:16px;color:var(--dsw-alias-label-primary, #141413);transition:color .18s ease;animation:dshClaudeEffortValueIn .28s ease}body[data-dsh-claude-style] .dsh-claude-effort-value-ghost{position:absolute;left:0;top:0;white-space:nowrap;pointer-events:none;font-size:13px;line-height:16px;color:var(--dsw-alias-label-primary, #141413);opacity:0;animation:dshClaudeEffortValueOut .28s ease forwards}@keyframes dshClaudeEffortValueIn{0%{filter:blur(4px);opacity:0;transform:translateY(5px)}to{filter:blur(0);opacity:1;transform:translateY(0)}}@keyframes dshClaudeEffortValueOut{0%{filter:blur(0);opacity:1;transform:translateY(0)}to{filter:blur(4px);opacity:0;transform:translateY(-5px)}}body[data-dsh-claude-style] .dsh-claude-effort-ends{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;line-height:14px;color:var(--dsw-alias-label-caption, #a6a094)}body[data-dsh-claude-style] .dsh-claude-effort-track{position:relative;height:30px;margin-top:1px;cursor:pointer;touch-action:none}body[data-dsh-claude-style] .dsh-claude-effort-track:before{content:\\\"\\\";position:absolute;left:0;right:0;top:50%;height:26px;margin-top:-13px;border-radius:8px;corner-shape:round;background:var(--dsw-alias-interactive-bg-hover, rgba(0, 0, 0, .08))}body[data-dsh-claude-style] .dsh-claude-effort-fill{position:absolute;left:0;top:50%;height:26px;margin-top:-13px;border-radius:8px 0 0 8px;corner-shape:round;background:color-mix(in srgb,var(--dsw-alias-label-primary, #141413) 26%,transparent);transition:width .18s cubic-bezier(.22,.61,.36,1),opacity .18s ease;pointer-events:none}body[data-dsh-claude-style] .dsh-claude-effort-ticks{position:absolute;inset:0;transition:opacity .18s ease;pointer-events:none}body[data-dsh-claude-style] .dsh-claude-effort-tick{position:absolute;top:50%;width:4px;height:4px;margin-top:-2px;transform:translate(-50%);border-radius:50%;corner-shape:round;background:color-mix(in srgb,var(--dsw-alias-label-primary, #141413) 26%,transparent)}body[data-dsh-claude-style] .dsh-claude-effort-matrix{position:absolute;left:0;right:0;top:50%;height:26px;margin-top:-13px;border-radius:8px;corner-shape:round;overflow:hidden;box-sizing:border-box;display:none;pointer-events:none}body[data-dsh-claude-style] .dsh-claude-effort[data-apex] .dsh-claude-effort-matrix{display:grid!important;grid-auto-flow:row!important}body[data-dsh-claude-style] .dsh-claude-effort-matrix-cell{animation:dshClaudeEffortCellIn .15s ease both!important}@keyframes dshClaudeEffortCellIn{0%{opacity:0}to{opacity:1}}body[data-dsh-claude-style] .dsh-claude-effort-matrix-sq{width:100%!important;height:100%!important;border-radius:1px!important;background-color:var(--dsh-claude-apex, #8b7ad0);--dsh-flash-light: var(--dsh-claude-apex-flash, #d9d2f5);animation:dshClaudeEffortFlash 1.45s infinite ease-in-out!important}body[data-dsh-claude-style] .dsh-claude-effort-matrix-sq[data-tone=\\\"0\\\"]{--dsh-flash-light: color-mix(in srgb, var(--dsh-claude-apex, #8b7ad0) 62%, var(--dsh-claude-apex-flash, #d9d2f5))}body[data-dsh-claude-style] .dsh-claude-effort-matrix-sq[data-tone=\\\"1\\\"]{--dsh-flash-light: color-mix(in srgb, var(--dsh-claude-apex, #8b7ad0) 54%, var(--dsh-claude-apex-flash, #d9d2f5))}body[data-dsh-claude-style] .dsh-claude-effort-matrix-sq[data-tone=\\\"2\\\"]{--dsh-flash-light: color-mix(in srgb, var(--dsh-claude-apex, #8b7ad0) 46%, var(--dsh-claude-apex-flash, #d9d2f5))}body[data-dsh-claude-style] .dsh-claude-effort-matrix-sq[data-tone=\\\"3\\\"]{--dsh-flash-light: color-mix(in srgb, var(--dsh-claude-apex, #8b7ad0) 38%, var(--dsh-claude-apex-flash, #d9d2f5))}body[data-dsh-claude-style] .dsh-claude-effort-matrix-sq[data-tone=\\\"4\\\"]{--dsh-flash-light: color-mix(in srgb, var(--dsh-claude-apex, #8b7ad0) 30%, var(--dsh-claude-apex-flash, #d9d2f5))}body[data-dsh-claude-style] .dsh-claude-effort-matrix-sq[data-tone=\\\"5\\\"]{--dsh-flash-light: color-mix(in srgb, var(--dsh-claude-apex, #8b7ad0) 22%, var(--dsh-claude-apex-flash, #d9d2f5))}body[data-dsh-claude-style] .dsh-claude-effort-matrix-sq[data-tone=\\\"6\\\"]{--dsh-flash-light: color-mix(in srgb, var(--dsh-claude-apex, #8b7ad0) 14%, var(--dsh-claude-apex-flash, #d9d2f5))}body[data-dsh-claude-style] .dsh-claude-effort-matrix-sq[data-tone=\\\"7\\\"]{--dsh-flash-light: color-mix(in srgb, var(--dsh-claude-apex, #8b7ad0) 6%, var(--dsh-claude-apex-flash, #d9d2f5))}@keyframes dshClaudeEffortFlash{0%,17.24%{background-color:var(--dsh-claude-apex, #8b7ad0)}17.25%,50.34%{background-color:var(--dsh-flash-light, #d9d2f5)}to{background-color:var(--dsh-claude-apex, #8b7ad0)}}body[data-dsh-claude-style] .dsh-claude-effort[data-apex] .dsh-claude-effort-fill,body[data-dsh-claude-style] .dsh-claude-effort[data-apex] .dsh-claude-effort-ticks{opacity:0!important}body[data-dsh-claude-style] .dsh-claude-effort[data-apex] .dsh-claude-effort-knob{background:color-mix(in srgb,var(--dsh-claude-apex, #8b7ad0) 22%,var(--dsw-static-neutral-bluish-00, #ffffff))!important;box-shadow:0 0 10px color-mix(in srgb,var(--dsh-claude-apex, #8b7ad0) 80%,transparent),0 0 0 1px color-mix(in srgb,var(--dsh-claude-apex, #8b7ad0) 35%,transparent)!important}body[data-dsh-claude-style] .dsh-claude-effort[data-apex] .dsh-claude-effort-value{color:var(--dsh-claude-apex-ink, #5f51b5)!important}body[data-dsh-claude-style] .dsh-claude-effort-knob{position:absolute;left:0;top:50%;width:16px;height:30px;margin-top:-15px;border-radius:5px;corner-shape:round;background:var(--dsw-static-neutral-bluish-00, #ffffff);box-shadow:0 1px 3px #14141347,0 0 0 1px #1414130f;scale:1;transition:translate .18s cubic-bezier(.22,.61,.36,1),scale .12s ease,background-color .3s ease,box-shadow .3s ease;will-change:translate,scale}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-effort-knob{box-shadow:0 1px 3px #0000008c,0 0 0 1px #0006}body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-effort[data-apex] .dsh-claude-effort-knob{box-shadow:0 0 10px color-mix(in srgb,var(--dsh-claude-apex, #9d8ce0) 80%,transparent),0 0 0 1px color-mix(in srgb,var(--dsh-claude-apex, #9d8ce0) 35%,transparent)!important}body[data-dsh-claude-style] .dsh-claude-effort[data-dragging] .dsh-claude-effort-knob{scale:1.1!important;transition:scale .12s ease,background-color .3s ease,box-shadow .3s ease!important}body[data-dsh-claude-style] .dsh-claude-effort[data-dragging] .dsh-claude-effort-fill{transition:none!important}body[data-dsh-claude-style] .dsh-claude-effort-track:focus-visible{outline:2px solid var(--dsw-alias-brand-primary, #d97757)!important;outline-offset:1px!important;border-radius:10px!important}body[data-dsh-claude-style] .dsh-claude-effort[data-empty] .dsh-claude-effort-track:before{opacity:.55!important}body[data-dsh-claude-style] .dsh-claude-effort[data-empty] .dsh-claude-effort-value{color:var(--dsw-alias-label-caption, #a6a094)!important}body[data-dsh-claude-style] .dsh-claude-effort-btn{position:fixed;display:inline-flex;align-items:center;height:28px;padding:0 2px;border:none!important;border-radius:6px;background:transparent;color:var(--dsw-alias-label-secondary, #6e6a60);font-family:var(--dsw-font-family);font-size:13px;font-weight:500;line-height:20px;letter-spacing:normal;white-space:nowrap;cursor:pointer;z-index:10;transition:background-color .12s ease,color .12s ease}body[data-dsh-claude-style] .dsh-claude-effort-btn:hover{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08));color:var(--dsw-alias-label-primary, #141413)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu]{min-width:248px;max-width:min(360px,calc(100vw - 16px));max-height:min(440px,calc(100vh - 96px));left:var(--dsh-claude-hero-menu-x, 0px)!important;top:var(--dsh-claude-hero-menu-y, 0px)!important;padding:6px;gap:6px;border:1px solid var(--dsw-alias-border-l1, #e8e6dc);border-radius:12px;background:var(--dsw-alias-bg-overlay, #ffffff);box-shadow:0 8px 30px #1414131f,0 2px 8px #1414130f;z-index:99999;font-family:var(--dsw-font-family);transform-origin:bottom right;animation:dsh-claude-hero-menu-in .15s ease}@keyframes dsh-claude-hero-menu-in{0%{opacity:0;transform:translateY(4px) scale(.98)}to{opacity:1;transform:none}}body[data-dsh-claude-style][data-dsh-claude-composer-active][data-ds-dark-theme] [data-dsh-claude-hero-menu]{background:var(--dsh-claude-raised)!important;border-color:var(--dsw-alias-border-l2)!important;box-shadow:0 8px 30px #00000080,0 2px 8px #0000004d!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu] [class*=_itemWrap_]>[role=menuitem]{min-height:32px;padding:2px 7px;gap:8px;border-radius:6px;font-size:13px;line-height:20px;color:var(--dsw-alias-label-primary, #141413);transition:background-color .12s ease}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu] [class*=_itemWrap_]>[role=menuitem]:hover:not(:disabled){background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu] [class*=_itemWrap_]>[role=menuitem]:disabled{opacity:.4!important;cursor:not-allowed!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu] [class*=_itemIcon_]{width:16px;height:16px;color:var(--dsw-alias-label-secondary, #787672)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu] [class*=_itemIcon_] svg{width:16px;height:16px}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu] [class*=_itemLabel_]{font-size:13px;line-height:20px}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu] [class*=_check_]{flex:none;color:var(--dsw-alias-brand-primary, #d97757)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu] [class*=_itemName]{font-size:13px;font-weight:500;line-height:16px}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu] [class*=_itemDesc]{font-size:11px;line-height:14px;color:var(--dsw-alias-label-tertiary, #8f8d84)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu]>[class*=_viewport_]>[role=presentation]{padding:6px 7px 2px!important;font-size:11px!important;font-weight:600!important;line-height:16px!important;letter-spacing:.04em!important;text-transform:uppercase!important;color:var(--dsw-alias-label-tertiary, #8f8d84)!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu] [role=separator]{height:1px!important;margin:2px 4px!important;background:var(--dsw-alias-border-l1, #e8e6dc)!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu]>[class*=_footer_]{margin-top:4px;padding-top:4px;border-top:1px solid var(--dsw-alias-border-l1, #e8e6dc)}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu=workspace]{min-width:180px;max-width:min(280px,calc(100vw - 16px));padding:4px;gap:4px}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu=workspace] [class*=_itemWrap_]>[role=menuitem]{min-height:26px;padding:3px 10px}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu=workspace] [class*=_itemIcon_]{display:none}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu=workspace] [class*=_check_]{width:14px;height:14px}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu=workspace]>[class*=_footer_]{margin-top:0;padding-top:4px}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu] [class*=_submenu_]{bottom:-6px!important;left:calc(100% + 12px)!important}body[data-dsh-claude-style][data-dsh-claude-composer-active] [data-dsh-claude-hero-menu] [class*=_submenu_]:before{left:-12px!important;width:12px!important}body[data-dsh-claude-style][data-dsh-claude-footer-takeover] [class*=footArea]>[class*=footerActions] :is([class*=footerButtons],>button){display:none!important}body[data-dsh-claude-style][data-dsh-claude-footer-takeover] [class*=footArea] [class*=triggerRow] :is(button,[role=button],a):not([data-dsh-claude-account-host-row]){display:none}body[data-dsh-claude-style][data-dsh-claude-footer-takeover] [class*=footArea]>[class*=settingsArea]{position:static;width:0;height:0;margin:0;padding:0;overflow:visible}body[data-dsh-claude-style][data-dsh-claude-footer-takeover] [class*=footArea]>[class*=settingsArea]:has([data-dsh-claude-account-host-row]){width:100%!important;height:auto!important}body[data-dsh-claude-style][data-dsh-claude-footer-takeover] [class*=footArea]>[class*=footerActions]{position:static;width:0;height:0;margin:0;padding:0;line-height:0;font-size:0;overflow:visible}body[data-dsh-claude-style][data-dsh-claude-footer-takeover] [class*=footArea] [data-dsh-claude-footer-hidden]{display:none!important}body[data-dsh-claude-style][data-dsh-claude-footer-takeover] [class*=footArea] [data-dsh-claude-footer-entry]{width:0!important;height:0!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;border:none!important;background:transparent!important;box-shadow:none!important;overflow:visible!important}body[data-dsh-claude-style] [class*=_root][class*=_collapsed] .dsh-claude-account-btn{width:36px!important;height:36px!important;padding:0!important;justify-content:center!important}body[data-dsh-claude-style] [class*=_root][class*=_collapsed] .dsh-claude-account-avatar{margin-right:0!important}body[data-dsh-claude-style] [class*=_root][class*=_collapsed] :is(.dsh-claude-account-label,.dsh-claude-account-chevron){display:none!important}body[data-dsh-claude-style] [class*=_root][class*=_collapsed] .dsh-claude-account-popover{position:fixed!important;inset:auto!important;width:220px!important;max-width:min(220px,calc(100vw - 16px))!important;transform-origin:bottom left!important}body[data-dsh-claude-style] [class*=_root][class*=_collapsed] [data-dsh-claude-account-menu]{width:220px!important;max-width:min(220px,calc(100vw - 16px))!important}body[data-dsh-claude-style] [class*=_root][class*=_collapsed] .dsh-claude-account-popover:after{inset:0 100% 0 auto!important;width:12px!important;height:auto!important}body[data-dsh-claude-style][data-dsh-claude-footer-takeover] [class*=_root][class*=_collapsed] [class*=footArea] [class*=settingsArea] :is(button,[class*=triggerRow]):not([data-dsh-claude-account-host-row]):not(:has([data-dsh-claude-account-host-row])){display:none!important}body[data-dsh-claude-style] [class*=_root][class*=_collapsed] [data-dsh-claude-account-host-row]{width:36px!important;height:36px!important;padding:0!important;justify-content:center!important;font-size:0!important}body[data-dsh-claude-style] [class*=_root][class*=_collapsed] [data-dsh-claude-account-host-row]:after{display:none!important}body[data-dsh-claude-style] .dsh-claude-popover-embed{padding:2px 2px 6px;margin-bottom:4px;border-bottom:1px solid var(--dsw-alias-border-l2, #2e2c29);border-radius:7px}body[data-dsh-claude-style] .dsh-claude-popover-embed[data-clickable]{cursor:pointer}body[data-dsh-claude-style] .dsh-claude-popover-embed[data-clickable]:hover{background:var(--dsh-claude-hover-bg, rgba(0, 0, 0, .08))}body[data-dsh-claude-style]:not([data-ds-dark-theme]) .dsh-claude-popover-embed{border-bottom-color:var(--dsw-alias-border-l1)}body[data-dsh-claude-style] .agy-tv-header{display:flex;align-items:center;gap:8px;min-height:24px}body[data-dsh-claude-style] .agy-tv-title{font-family:var(--dsh-claude-font-code);font-weight:500;font-size:12px;letter-spacing:0;line-height:24px;color:var(--dsw-alias-label-secondary)}body[data-dsh-claude-style] .agy-tv-badge{font-family:var(--dsh-claude-font-code);font-size:11px;line-height:16px;padding:0 6px;border-radius:9999px;background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-tertiary)}body[data-dsh-claude-style] .agy-tv-pre{padding:10px 12px;overflow-x:auto}body[data-dsh-claude-style][data-dsh-claude-dock-look=card] [class*=_rightbarCol] [data-dockkit-split]>[data-dockkit-column]>[data-dockkit-pane]{margin:6px!important}body[data-dsh-claude-style][data-dsh-claude-dock-look=card] [class*=_rightbarCol] [data-dockkit-split]>[data-dockkit-column=\\\"0\\\"]>[data-dockkit-pane]{margin-right:3px!important}body[data-dsh-claude-style][data-dsh-claude-dock-look=card] [class*=_rightbarCol] [data-dockkit-split]>[data-dockkit-column=\\\"1\\\"]>[data-dockkit-pane]{margin-left:3px!important}body[data-dsh-claude-style][data-dsh-claude-dock-look=card] [class*=_rightbarCol] [data-dockkit-split]>[class*=_divider_]:before{background:transparent!important}body[data-dsh-claude-style]:not([data-ds-dark-theme]) :is([class*=settingsArea] [class*=_panel],[class*=settingsArea] [role=dialog],[class*=_overlay]>[class*=_panel]){background:var(--dsw-alias-bg-base)!important}body[data-dsh-claude-style] button[data-dsh-section=claude-style] [class*=_navIcon]{display:none!important}body[data-dsh-claude-style] button[data-dsh-section=claude-style]:before{content:\\\"\\\";display:block;flex:none;width:16px;height:16px;background-color:currentColor;-webkit-mask:var(--dsh-claude-image-claude-mark) center / contain no-repeat;mask:var(--dsh-claude-image-claude-mark) center / contain no-repeat}body[data-dsh-claude-style]:not([data-ds-dark-theme]) button[data-dsh-section=claude-style]:before{background-color:var(--dsw-alias-label-primary)}body[data-dsh-claude-style] .dsh-claude-settings{display:flex;flex-direction:column;gap:16px;padding:16px 0 0;box-sizing:border-box;font-family:var(--dsw-font-family)}body[data-dsh-claude-style] .dsh-claude-settings-title{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:15px;font-weight:600;color:var(--dsw-alias-label-primary)}body[data-dsh-claude-style] .dsh-claude-settings-repo{flex:none;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:6px;transition:background-color .12s ease}body[data-dsh-claude-style] .dsh-claude-settings-repo:before{content:\\\"\\\";width:16px;height:16px;background-color:var(--dsw-alias-label-secondary);-webkit-mask:var(--dsh-claude-image-github-mark) center / contain no-repeat;mask:var(--dsh-claude-image-github-mark) center / contain no-repeat;transition:background-color .12s ease}body[data-dsh-claude-style] .dsh-claude-settings-repo:hover{background-color:var(--dsh-claude-hover-bg)}body[data-dsh-claude-style] .dsh-claude-settings-repo:hover:before,body[data-dsh-claude-style] .dsh-claude-settings-repo:focus-visible:before{background-color:var(--dsw-alias-label-primary)}body[data-dsh-claude-style] .dsh-claude-settings-repo:focus-visible{outline:2px solid var(--dsw-alias-brand-primary, #d97757);outline-offset:1px}body[data-dsh-claude-style] .dsh-claude-settings-tabs{display:flex;align-self:stretch}body[data-dsh-claude-style] .dsh-claude-settings-tabs>[role=tab]{flex:1 1 0;min-width:0}body[data-dsh-claude-style] .dsh-claude-settings-rows{display:flex;flex-direction:column;min-inline-size:0;margin:0;padding:0;border:0}body[data-dsh-claude-style] .dsh-claude-settings-rows:disabled :is(button,input){cursor:not-allowed}body[data-dsh-claude-style] .dsh-claude-settings-rows:disabled input{opacity:.45}body[data-dsh-claude-style] .dsh-claude-settings-notice{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary)}body[data-dsh-claude-style] .dsh-claude-settings-rows>:first-child{border-top:none}body[data-dsh-claude-style] .dsh-claude-settings-row.dsh-claude-settings-row-sub{border-top:none;padding-top:0}body[data-dsh-claude-style] [data-dsh-claude-settings-scroller]{scrollbar-gutter:stable}body[data-dsh-claude-style] .dsh-claude-settings-row-sub[data-disabled]{opacity:.5}body[data-dsh-claude-style] .dsh-claude-settings-row-sub[data-disabled] :is(button,input){cursor:not-allowed}body[data-dsh-claude-style] .dsh-claude-settings-row{display:flex;align-items:center;gap:8px;padding:16px 0;border-top:.5px solid var(--dsw-alias-border-l2)}body[data-dsh-claude-style] .dsh-claude-settings-row-segment{flex-wrap:wrap;gap:12px 8px}body[data-dsh-claude-style] .dsh-claude-settings-row-segment>.dsh-claude-settings-row-text{flex:1 1 220px}body[data-dsh-claude-style] .dsh-claude-settings-row-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;padding-right:48px}body[data-dsh-claude-style] .dsh-claude-settings-row-block{flex-direction:column;align-items:flex-start;gap:12px}body[data-dsh-claude-style] .dsh-claude-settings-row-block>.dsh-claude-settings-row-text{align-self:stretch;padding-right:0}body[data-dsh-claude-style] .dsh-claude-settings-row-block>.dsh-claude-brand-picker{align-self:stretch}body[data-dsh-claude-style] .dsh-claude-brand-picker{display:grid;grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:8px}body[data-dsh-claude-style] .dsh-claude-brand-card{appearance:none;margin:0;display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 12px 10px;box-sizing:border-box;border:1px solid var(--dsw-alias-border-l1);border-radius:12px;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;transition:border-color .12s ease}body[data-dsh-claude-style] .dsh-claude-brand-card:hover{border-color:var(--dsw-alias-border-l2)}body[data-dsh-claude-style] .dsh-claude-brand-card:focus-visible{outline:2px solid var(--dsw-alias-brand-primary, #d97757);outline-offset:1px}body[data-dsh-claude-style] .dsh-claude-brand-card[data-active]{border-color:var(--dsw-alias-brand-primary, #d97757)}body[data-dsh-claude-style] .dsh-claude-brand-card-logo{width:32px;height:32px;background-position:center;background-repeat:no-repeat;background-size:contain}body[data-dsh-claude-style] .dsh-claude-brand-card-logo[data-brand=claude]{background-image:var(--dsh-claude-image-claude-mark-clay)}body[data-dsh-claude-style] .dsh-claude-brand-card-logo[data-brand=deepseek]{background-image:var(--dsh-claude-image-deepseek-mark)}body[data-dsh-claude-style] .dsh-claude-brand-card-name{font-size:13px;font-weight:600;line-height:1.5}body[data-dsh-claude-style] .dsh-claude-settings-row-title{font-family:var(--dsw-font-family);font-size:14px;font-weight:400;letter-spacing:normal;line-height:22px;color:var(--dsw-alias-label-primary)}body[data-dsh-claude-style] .dsh-claude-settings-row-desc{font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary)}body[data-dsh-claude-style] .dsh-claude-settings-row button:disabled{cursor:not-allowed;opacity:.45}body[data-dsh-claude-style] .dsh-claude-settings-row-managed{display:block;margin-top:2px;color:var(--dsw-alias-state-business-primary)}body[data-dsh-claude-style] .dsh-claude-settings-error{font-size:12px;line-height:1.5;color:var(--dsw-alias-state-error-primary, #c0392b)}body[data-dsh-claude-style] .dsh-claude-settings-switch{flex:none;appearance:none;margin:0;border:0;cursor:pointer;width:36px;height:20px;padding:2px;box-sizing:border-box;border-radius:10px;background:var(--dsw-specific-selector);transition:background-color .12s ease}body[data-dsh-claude-style]:not([data-ds-dark-theme]) .dsh-claude-settings-switch{background:var(--dsh-claude-chip)}body[data-dsh-claude-style] .dsh-claude-settings-switch[data-on]{background:var(--dsw-alias-brand-primary, #d97757)}body[data-dsh-claude-style] .dsh-claude-settings-switch-knob{display:block;width:16px;height:16px;border-radius:50%;corner-shape:round;background:var(--dsw-alias-bg-overlay, #ffffff);box-shadow:0 1px 2px #1414132e;transition:transform .12s ease}body[data-dsh-claude-style] .dsh-claude-settings-switch[data-on] .dsh-claude-settings-switch-knob{transform:translate(16px)}body[data-dsh-claude-style] .dsh-claude-settings-input{flex:none;width:180px;max-width:45%;box-sizing:border-box;border:1px solid var(--dsw-alias-border-l1);border-radius:8px;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);padding:6px 10px;font:inherit;font-size:13px;line-height:18px;outline:none}body[data-dsh-claude-style] .dsh-claude-settings-input:focus{border-color:var(--dsw-alias-brand-primary, #d97757)}body[data-dsh-claude-style] .dsh-claude-settings-input::placeholder{color:var(--dsw-alias-label-caption)}body[data-dsh-claude-style] .dsh-claude-settings-picker{flex:none;min-width:140px;max-width:45%;box-sizing:border-box;border:1px solid var(--dsw-alias-border-l1);border-radius:8px;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);padding:6px 10px;font:inherit;font-size:13px;line-height:18px;text-align:left;cursor:pointer}body[data-dsh-claude-style] .dsh-claude-settings-picker:hover{border-color:var(--dsw-alias-border-l2)}body[data-dsh-claude-style] .dsh-claude-settings-picker[aria-expanded=true]{border-color:var(--dsw-alias-brand-primary, #d97757)}body[data-dsh-claude-style] .dsh-claude-quick-popover{position:fixed!important;min-width:248px!important;display:flex!important;flex-direction:column!important;gap:6px!important;transform-origin:bottom right!important}body[data-dsh-claude-style][data-dsh-claude-home-hero] [class*=_scrollBody]{justify-content:flex-start}body[data-dsh-claude-style][data-dsh-claude-home-hero] [class*=_composerSeat]{flex:1 1 auto;min-height:0}body[data-dsh-claude-style][data-dsh-claude-home-hero] [class*=_composerStack][class*=_composerHero]{flex:1 1 auto;box-sizing:border-box;width:100%;max-width:720px;height:auto;min-height:0;margin-inline:auto;gap:10px;padding-bottom:16px}body[data-dsh-claude-style][data-dsh-claude-home-layout=studio] [class*=_composerHero]>:has([class*=_headline]){order:0;height:auto;justify-content:flex-start;padding:14px var(--dsh-composer-side-clearance, 0px) 0;margin-bottom:30px}body[data-dsh-claude-style] .dsh-claude-home-seat{display:contents}body[data-dsh-claude-style][data-dsh-claude-home-layout=studio] [class*=_composerHero]>:is([data-slot=\\\"conversation.input.dock\\\"],.dsh-claude-home-seat)>*{order:1;flex:0 1 auto;min-height:0;width:480px;max-width:calc(100% - var(--dsh-composer-side-clearance, 0px));margin-right:auto}body[data-dsh-claude-style][data-dsh-claude-home-layout=studio] [class*=_composerHero]>[class*=_heroWorkspaceRow]{order:2;margin-top:auto;gap:8px}body[data-dsh-claude-style][data-dsh-claude-home-hero] [class*=_heroWorkspaceRow] :is(button,[role=button]){box-sizing:border-box;height:28px;padding:0 10px;border:1px solid color-mix(in srgb,var(--dsw-alias-label-primary, #141413) 12%,transparent);border-radius:8px;background:transparent}body[data-dsh-claude-style][data-dsh-claude-home-hero] [class*=_heroWorkspaceRow] :is(button,[role=button]):hover:not(:disabled){background:color-mix(in srgb,var(--dsw-alias-label-primary, #141413) 5%,transparent)}body[data-dsh-claude-style][data-dsh-claude-home-layout=studio] [class*=_composerHero]>[data-slot=\\\"conversation.composer.bar\\\"]>*{order:3}body[data-dsh-claude-style][data-dsh-claude-home-hero] [class*=_headline],body[data-dsh-claude-style][data-dsh-claude-home-hero] [class*=_headline] [class*=titleGroup],body[data-dsh-claude-style][data-dsh-claude-home-hero] [class*=_headline] [class*=titleGroup]>span{justify-content:flex-start;font-family:var(--dsw-font-family);font-size:20px;font-weight:500;line-height:26px;color:var(--dsw-alias-label-primary, #141413)}body[data-dsh-claude-style][data-dsh-claude-home-hero] [class*=_headline]{gap:8px}body[data-dsh-claude-style][data-dsh-claude-home-hero] [class*=fishHitbox]:before{width:21px;height:21px}body[data-dsh-claude-style] .dsh-claude-home-panel{display:none}body[data-dsh-claude-style][data-dsh-claude-home-layout=studio] [class*=_composerHero]>:is([data-slot=\\\"conversation.input.dock\\\"],.dsh-claude-home-seat)>.dsh-claude-home-panel{display:flex}body[data-dsh-claude-style] .dsh-claude-home-panel{flex-direction:column;gap:12px;box-sizing:border-box;margin:0 var(--dsh-composer-side-clearance, 0px);padding:12px;border-radius:12px;background:color-mix(in srgb,var(--dsw-alias-label-primary, #141413) 4%,var(--dsw-alias-bg-layer-2, #fbfbf9));overflow:auto;-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 32px),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - 32px),transparent);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% calc(100% + 32px);mask-size:100% calc(100% + 32px);animation:dsh-claude-home-panel-fade linear both;animation-timeline:scroll(self);animation-range:calc(100% - 32px) 100%}@keyframes dsh-claude-home-panel-fade{0%{-webkit-mask-size:100% 100%;mask-size:100% 100%}to{-webkit-mask-size:100% calc(100% + 32px);mask-size:100% calc(100% + 32px)}}body[data-dsh-claude-style] .dsh-claude-home-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px}body[data-dsh-claude-style] .dsh-claude-home-tabs,body[data-dsh-claude-style] .dsh-claude-home-ranges{display:flex;align-items:center;gap:2px}body[data-dsh-claude-style] .dsh-claude-home-tab,body[data-dsh-claude-style] .dsh-claude-home-range{appearance:none;margin:0;padding:1px 8px;border:0;border-radius:5px;background:transparent;color:var(--dsw-alias-label-tertiary, #8f8a7e);font-family:inherit;font-size:12px;line-height:18px;cursor:pointer}body[data-dsh-claude-style] .dsh-claude-home-tab:hover:not([data-active]),body[data-dsh-claude-style] .dsh-claude-home-range:hover:not([data-active]){background:color-mix(in srgb,var(--dsw-alias-label-primary, #141413) 5%,transparent);color:var(--dsw-alias-label-primary, #141413)}body[data-dsh-claude-style] .dsh-claude-home-tab[data-active],body[data-dsh-claude-style] .dsh-claude-home-range[data-active]{background:color-mix(in srgb,var(--dsw-alias-label-primary, #141413) 10%,var(--dsw-alias-bg-layer-2, #fbfbf9));color:var(--dsw-alias-label-primary, #141413)}body[data-dsh-claude-style] .dsh-claude-home-panel-side{display:flex;align-items:center;gap:10px;min-width:0}body[data-dsh-claude-style] .dsh-claude-home-panel[data-computing] .dsh-claude-home-stat[data-skeleton] .dsh-claude-home-stat-value,body[data-dsh-claude-style] .dsh-claude-home-panel[data-computing] .dsh-claude-home-models[data-skeleton] .dsh-claude-home-model-swatch,body[data-dsh-claude-style] .dsh-claude-home-heat[data-skeleton] .dsh-claude-home-heat-cell{animation:dsh-claude-home-pulse 1.6s ease-in-out infinite}@keyframes dsh-claude-home-pulse{0%,to{opacity:.55}50%{opacity:1}}body[data-dsh-claude-style] .dsh-claude-home-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}body[data-dsh-claude-style] .dsh-claude-home-stat{display:flex;flex-direction:column;gap:2px;box-sizing:border-box;min-width:0;padding:5px 8px;border-radius:8px;background:color-mix(in srgb,var(--dsw-alias-label-primary, #141413) 15%,var(--dsw-alias-bg-layer-2, #fbfbf9))}body[data-dsh-claude-style] .dsh-claude-home-stat-label{color:var(--dsw-alias-label-tertiary, #8f8a7e);font-size:12px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body[data-dsh-claude-style] .dsh-claude-home-stat-value{color:var(--dsw-alias-label-primary, #141413);font-size:13px;font-weight:600;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}body[data-dsh-claude-style] .dsh-claude-home-stat[data-stat=model] .dsh-claude-home-stat-value{font-weight:400}body[data-dsh-claude-style] .dsh-claude-home-heat{display:grid;grid-auto-flow:column;grid-template-rows:repeat(7,1fr);grid-auto-columns:1fr;gap:3px;align-content:start}body[data-dsh-claude-style] .dsh-claude-home-heat-cell{position:relative;aspect-ratio:1;border-radius:3px;background:color-mix(in srgb,var(--dsw-alias-label-primary, #141413) 11%,transparent)}body[data-dsh-claude-style] .dsh-claude-home-heat-cell[data-tip]:hover:after{content:attr(data-tip);position:absolute;bottom:calc(100% + 6px);left:50%;z-index:2;transform:translate(-50%);padding:5px 10px;border-radius:8px;background:var(--dsw-alias-label-primary, #141413);color:var(--dsw-alias-bg-base, #fcfcfb);font-size:13px;font-weight:500;line-height:18px;white-space:nowrap;font-variant-numeric:tabular-nums;pointer-events:none}body[data-dsh-claude-style] .dsh-claude-home-heat-cell[data-tip][data-edge=start]:hover:after{left:0;transform:none}body[data-dsh-claude-style] .dsh-claude-home-heat-cell[data-tip][data-edge=end]:hover:after{left:auto;right:0;transform:none}body[data-dsh-claude-style] .dsh-claude-home-heat-cell[data-level=\\\"1\\\"]{background:color-mix(in srgb,#3b6ecf 20%,transparent)}body[data-dsh-claude-style] .dsh-claude-home-heat-cell[data-level=\\\"2\\\"]{background:color-mix(in srgb,#3b6ecf 40%,transparent)}body[data-dsh-claude-style] .dsh-claude-home-heat-cell[data-level=\\\"3\\\"]{background:color-mix(in srgb,#3b6ecf 65%,transparent)}body[data-dsh-claude-style] .dsh-claude-home-heat-cell[data-level=\\\"4\\\"]{background:#3b6ecf}body[data-dsh-claude-style] .dsh-claude-home-fun{color:var(--dsw-alias-label-tertiary, #8f8a7e);font-size:12px;line-height:16px}body[data-dsh-claude-style] .dsh-claude-home-stat[data-skeleton] .dsh-claude-home-stat-value{display:block;width:42px;height:13px;margin:2px 0;border-radius:4px;background:color-mix(in srgb,var(--dsw-alias-label-primary, #141413) 9%,transparent)}body[data-dsh-claude-style] .dsh-claude-home-heat[data-skeleton] .dsh-claude-home-heat-cell{background:color-mix(in srgb,var(--dsw-alias-label-primary, #141413) 5%,transparent)}@media(max-width:760px){body[data-dsh-claude-style] .dsh-claude-home-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}body[data-dsh-claude-style] .dsh-claude-home-chart{--dsh-home-axis: 34px;display:flex;flex-direction:column;gap:6px}body[data-dsh-claude-style] .dsh-claude-home-chart-plot{position:relative;height:152px;margin-left:var(--dsh-home-axis)}body[data-dsh-claude-style] .dsh-claude-home-chart-tick{position:absolute;left:calc(-1 * var(--dsh-home-axis));width:calc(var(--dsh-home-axis) - 6px);transform:translateY(50%);color:var(--dsw-alias-label-tertiary, #8f8a7e);font-size:11px;line-height:14px;text-align:right;font-variant-numeric:tabular-nums}body[data-dsh-claude-style] .dsh-claude-home-chart-bars{position:absolute;inset:0;display:flex;align-items:flex-end;gap:2px}body[data-dsh-claude-style] .dsh-claude-home-chart-col{display:flex;flex:1 1 0;flex-direction:column;justify-content:flex-end;min-width:0;border-radius:2px;overflow:hidden}body[data-dsh-claude-style] .dsh-claude-home-chart-seg{display:block;width:100%}body[data-dsh-claude-style] .dsh-claude-home-chart-axis{display:flex;gap:2px;margin-left:var(--dsh-home-axis)}body[data-dsh-claude-style] .dsh-claude-home-chart-label{flex:1 1 0;min-width:0;color:var(--dsw-alias-label-tertiary, #8f8a7e);font-size:11px;line-height:14px;white-space:nowrap;font-variant-numeric:tabular-nums}body[data-dsh-claude-style] .dsh-claude-home-chart-seg[data-rank=\\\"0\\\"],body[data-dsh-claude-style] .dsh-claude-home-model-swatch[data-rank=\\\"0\\\"]{background:#2f5fc4}body[data-dsh-claude-style] .dsh-claude-home-chart-seg[data-rank=\\\"1\\\"],body[data-dsh-claude-style] .dsh-claude-home-model-swatch[data-rank=\\\"1\\\"]{background:#3b6ecf}body[data-dsh-claude-style] .dsh-claude-home-chart-seg[data-rank=\\\"2\\\"],body[data-dsh-claude-style] .dsh-claude-home-model-swatch[data-rank=\\\"2\\\"]{background:#5b88da}body[data-dsh-claude-style] .dsh-claude-home-chart-seg[data-rank=\\\"3\\\"],body[data-dsh-claude-style] .dsh-claude-home-model-swatch[data-rank=\\\"3\\\"]{background:#7ea3e4}body[data-dsh-claude-style] .dsh-claude-home-chart-seg[data-rank=\\\"4\\\"],body[data-dsh-claude-style] .dsh-claude-home-model-swatch[data-rank=\\\"4\\\"]{background:#a3bfec}body[data-dsh-claude-style] .dsh-claude-home-chart-seg[data-rank=\\\"5\\\"],body[data-dsh-claude-style] .dsh-claude-home-model-swatch[data-rank=\\\"5\\\"]{background:#c3d5f3}body[data-dsh-claude-style] .dsh-claude-home-chart-seg[data-rank=\\\"6\\\"],body[data-dsh-claude-style] .dsh-claude-home-model-swatch[data-rank=\\\"6\\\"]{background:#dbe5f8}body[data-dsh-claude-style] .dsh-claude-home-chart-seg[data-rank=\\\"7\\\"],body[data-dsh-claude-style] .dsh-claude-home-model-swatch[data-rank=\\\"7\\\"]{background:#b9b5ac}body[data-dsh-claude-style] .dsh-claude-home-models{display:flex;flex-direction:column;gap:8px}body[data-dsh-claude-style] .dsh-claude-home-model{display:flex;align-items:center;gap:8px;min-width:0}body[data-dsh-claude-style] .dsh-claude-home-model-swatch{flex:none;width:8px;height:8px;border-radius:2px}body[data-dsh-claude-style] .dsh-claude-home-model-name{flex:0 1 auto;min-width:0;overflow:hidden;color:var(--dsw-alias-label-primary, #141413);font-size:13px;line-height:18px;white-space:nowrap;text-overflow:ellipsis}body[data-dsh-claude-style] .dsh-claude-home-model-split{margin-left:auto;color:var(--dsw-alias-label-tertiary, #8f8a7e);font-size:12px;line-height:18px;white-space:nowrap;font-variant-numeric:tabular-nums}body[data-dsh-claude-style] .dsh-claude-home-model-share{flex:none;width:48px;color:var(--dsw-alias-label-primary, #141413);font-size:12px;line-height:18px;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}body[data-dsh-claude-style] .dsh-claude-home-models-more{appearance:none;align-self:flex-start;margin:0;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-tertiary, #8f8a7e);font-family:inherit;font-size:12px;line-height:18px;cursor:pointer}body[data-dsh-claude-style] .dsh-claude-home-models-more:hover{color:var(--dsw-alias-label-primary, #141413)}body[data-dsh-claude-style] .dsh-claude-home-models-empty{padding:18px 0;color:var(--dsw-alias-label-tertiary, #8f8a7e);font-size:12px;line-height:16px;text-align:center}body[data-dsh-claude-style] .dsh-claude-home-models[data-skeleton] .dsh-claude-home-model-name,body[data-dsh-claude-style] .dsh-claude-home-models[data-skeleton] .dsh-claude-home-model-split,body[data-dsh-claude-style] .dsh-claude-home-models[data-skeleton] .dsh-claude-home-model-share{display:none}body[data-dsh-claude-style] .dsh-claude-home-models[data-skeleton] .dsh-claude-home-model-swatch{width:100%;height:8px;border-radius:4px;background:color-mix(in srgb,var(--dsw-alias-label-primary, #141413) 9%,transparent)}body[data-dsh-claude-style] .dsh-claude-crab{position:absolute;right:0;bottom:100%;z-index:1;width:104px;height:72px;pointer-events:none}body[data-dsh-claude-style] .dsh-claude-crab:not([data-ready]){visibility:hidden}body[data-dsh-claude-style] :is([data-dsh-claude-crab-anchor=stack],[data-dsh-claude-crab-anchor=panel]){position:relative}body[data-dsh-claude-style] [data-dsh-claude-crab-anchor=stack]>.dsh-claude-crab{right:max(var(--dsh-composer-side-clearance, 16px),(100% - var(--dsh-composer-card-max-width, 100%)) / 2)}body[data-dsh-claude-style] [data-dsh-claude-crab-anchor=panel]>.dsh-claude-crab{right:max(var(--dsh-composer-side-clearance, 16px) + 16px,(100% - var(--dsh-chat-content-width, 100%)) / 2);bottom:calc(100% - 7px)}body[data-dsh-claude-style] .dsh-claude-crab-sprite{position:absolute;left:calc(var(--dsh-claude-crab-x, 0) * 2px);top:calc(var(--dsh-claude-crab-y, 0) * 2px);width:calc(var(--dsh-claude-crab-w, 0) * 2px);height:calc(var(--dsh-claude-crab-h, 0) * 2px);overflow:hidden}body[data-dsh-claude-style] .dsh-claude-crab-strip{position:relative;display:block;width:calc(var(--dsh-claude-crab-cell-w, 0) * 16px);height:calc(var(--dsh-claude-crab-strip-h, 0) * 2px);background-image:var(--dsh-claude-crab-sheet, none);background-repeat:no-repeat;background-size:100% 100%;image-rendering:pixelated}body[data-dsh-claude-style] .dsh-claude-crab-strip:after{content:\\\"\\\";position:absolute;inset:0;background:var(--dsw-alias-label-tertiary, #8f8a7e);-webkit-mask:var(--dsh-claude-crab-ink, none) no-repeat 0 0 / 100% 100%;mask:var(--dsh-claude-crab-ink, none) no-repeat 0 0 / 100% 100%;image-rendering:pixelated}body[data-dsh-claude-style] .dsh-claude-crab-hit{position:absolute;left:48px;top:40px;width:48px;height:32px;pointer-events:auto;touch-action:none}body[data-dsh-claude-style] .dsh-claude-deepy{position:absolute;right:8px;bottom:calc(100% - 4px);z-index:1;width:104px;height:104px;pointer-events:none}body[data-dsh-claude-style] .dsh-claude-deepy:not([data-ready]){visibility:hidden}body[data-dsh-claude-style] :is([data-dsh-claude-deepy-anchor=stack],[data-dsh-claude-deepy-anchor=panel]){position:relative}body[data-dsh-claude-style] [data-dsh-claude-deepy-anchor=stack]>.dsh-claude-deepy{right:calc(max(var(--dsh-composer-side-clearance, 16px),(100% - var(--dsh-composer-card-max-width, 100%)) / 2) + 8px)}body[data-dsh-claude-style] [data-dsh-claude-deepy-anchor=panel]>.dsh-claude-deepy{right:calc(max(var(--dsh-composer-side-clearance, 16px) + 16px,(100% - var(--dsh-chat-content-width, 100%)) / 2) + 8px);bottom:calc(100% - 11px)}body[data-dsh-claude-style] .dsh-claude-deepy-sprite{position:absolute;left:calc(var(--dsh-claude-deepy-x, 0) * 2px);top:calc(var(--dsh-claude-deepy-y, 0) * 2px);width:calc(var(--dsh-claude-deepy-w, 0) * 2px);height:calc(var(--dsh-claude-deepy-h, 0) * 2px);overflow:hidden}body[data-dsh-claude-style] .dsh-claude-deepy-strip{display:block;width:calc(var(--dsh-claude-deepy-cell-w, 0) * 16px);height:calc(var(--dsh-claude-deepy-strip-h, 0) * 2px);background-image:var(--dsh-claude-deepy-sheet, none);background-repeat:no-repeat;background-size:calc(var(--dsh-claude-deepy-cell-w, 0) * 16px) auto}body[data-dsh-claude-style] .dsh-claude-deepy-hit{position:absolute;left:24px;top:60px;width:64px;height:36px;pointer-events:auto;touch-action:none}html[data-dsh-theme-transitioning] body[data-dsh-claude-style][data-dsh-theme-transitioning] *{transition:none!important}body[data-dsh-claude-style][data-dsh-claude-palette=claude][data-we-wallpaper]{background-color:transparent}body[data-dsh-claude-style][data-dsh-claude-palette=claude][data-we-wallpaper]:after{content:\\\"\\\";position:fixed;inset:0;z-index:-1;pointer-events:none;background:color-mix(in srgb,var(--dsh-claude-canvas) 86%,transparent)}body[data-dsh-claude-style][data-dsh-claude-palette=claude][data-ds-dark-theme][data-we-wallpaper]:after{background:color-mix(in srgb,var(--dsh-claude-canvas) 82%,transparent)}body[data-dsh-claude-style][data-dsh-claude-palette=claude][data-we-wallpaper] :is([class*=_frame]:has(>[class*=_sidebarCol]),[class*=centerCol],[class*=_rightbarCol],[data-phase]:has([data-conversation-scroll])){background:transparent}body[data-dsh-claude-style][data-dsh-claude-palette=claude][data-we-wallpaper] :is([data-pane=sidebar],[class*=sidebarCol]){--dsw-specific-sidebar-fill: transparent;background:transparent}body[data-dsh-claude-style][data-dsh-claude-palette=claude][data-we-wallpaper] :is([data-phase=active],[data-content-phase=active]) [data-composer-seat]{background:transparent}body[data-dsh-claude-style][data-dsh-claude-palette=claude][data-we-wallpaper] :is([data-phase=active],[data-content-phase=active]) [data-composer-seat]:before,body[data-dsh-claude-style][data-dsh-claude-palette=claude][data-we-wallpaper] [class*=_header]:has([class*=_tabs]):after{display:none}body[data-dsh-claude-style][data-dsh-claude-palette=claude][data-we-wallpaper] :is([data-phase=active],[data-content-phase=active]) [data-composer-seat]:after{content:\\\"\\\";position:absolute;top:16px;bottom:0;left:calc(50% - var(--dsh-composer-card-max-width, 100%) / 2);right:calc(50% - var(--dsh-composer-card-max-width, 100%) / 2);z-index:-1;pointer-events:none;background:var(--dsh-claude-canvas)}\\n\"\nexport const COMBINE_SVGS = {\"baidu\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 5.0084 1\\\" data-combine-word=\\\"Baidu\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.1208 -0.2250) scale(0.060417)\\\"><g><path d=\\\"M8.859 11.735c1.017-1.71 4.059-3.083 6.202.286 1.579 2.284 4.284 4.397 4.284 4.397s2.027 1.601.73 4.684c-1.24 2.956-5.64 1.607-6.005 1.49l-.024-.009s-1.746-.568-3.776-.112c-2.026.458-3.773.286-3.773.286l-.045-.001c-.328-.01-2.38-.187-3.001-2.968-.675-3.028 2.365-4.687 2.592-4.968.226-.288 1.802-1.37 2.816-3.085zm.986 1.738v2.032h-1.64s-1.64.138-2.213 2.014c-.2 1.252.177 1.99.242 2.148.067.157.596 1.073 1.927 1.342h3.078v-7.514l-1.394-.022zm3.588 2.191l-1.44.024v3.956s.064.985 1.44 1.344h3.541v-5.3h-1.528v3.979h-1.46s-.466-.068-.553-.447v-3.556zM9.82 16.715v3.06H8.58s-.863-.045-1.126-1.049c-.136-.445.02-.959.088-1.16.063-.203.353-.671.951-.85H9.82zm9.525-9.036c2.086 0 2.646 2.06 2.646 2.742 0 .688.284 3.597-2.309 3.655-2.595.057-2.704-1.77-2.704-3.08 0-1.374.277-3.317 2.367-3.317zM4.24 6.08c1.523-.135 2.645 1.55 2.762 2.513.07.625.393 3.486-1.975 4-2.364.515-3.244-2.249-2.984-3.544 0 0 .28-2.797 2.197-2.969zm8.847-1.483c.14-1.31 1.69-3.316 2.931-3.028 1.236.285 2.367 1.944 2.137 3.37-.224 1.428-1.345 3.313-3.095 3.082-1.748-.226-2.143-1.823-1.973-3.424zM9.425 1c1.307 0 2.364 1.519 2.364 3.398 0 1.879-1.057 3.4-2.364 3.4s-2.367-1.521-2.367-3.4C7.058 2.518 8.118 1 9.425 1z\\\" fill=\\\"#2932E1\\\" fill-rule=\\\"nonzero\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.1208 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M8.859 11.735c1.017-1.71 4.059-3.083 6.202.286 1.579 2.284 4.284 4.397 4.284 4.397s2.027 1.601.73 4.684c-1.24 2.956-5.64 1.607-6.005 1.49l-.024-.009s-1.746-.568-3.776-.112c-2.026.458-3.773.286-3.773.286l-.045-.001c-.328-.01-2.38-.187-3.001-2.968-.675-3.028 2.365-4.687 2.592-4.968.226-.288 1.802-1.37 2.816-3.085zm.986 1.738v2.032h-1.64s-1.64.138-2.213 2.014c-.2 1.252.177 1.99.242 2.148.067.157.596 1.073 1.927 1.342h3.078v-7.514l-1.394-.022zm3.588 2.191l-1.44.024v3.956s.064.985 1.44 1.344h3.541v-5.3h-1.528v3.979h-1.46s-.466-.068-.553-.447v-3.556zM9.82 16.715v3.06H8.58s-.863-.045-1.126-1.049c-.136-.445.02-.959.088-1.16.063-.203.353-.671.951-.85H9.82zm9.525-9.036c2.086 0 2.646 2.06 2.646 2.742 0 .688.284 3.597-2.309 3.655-2.595.057-2.704-1.77-2.704-3.08 0-1.374.277-3.317 2.367-3.317zM4.24 6.08c1.523-.135 2.645 1.55 2.762 2.513.07.625.393 3.486-1.975 4-2.364.515-3.244-2.249-2.984-3.544 0 0 .28-2.797 2.197-2.969zm8.847-1.483c.14-1.31 1.69-3.316 2.931-3.028 1.236.285 2.367 1.944 2.137 3.37-.224 1.428-1.345 3.313-3.095 3.082-1.748-.226-2.143-1.823-1.973-3.424zM9.425 1c1.307 0 2.364 1.519 2.364 3.398 0 1.879-1.057 3.4-2.364 3.4s-2.367-1.521-2.367-3.4C7.058 2.518 8.118 1 9.425 1z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.4084 -0.1000) scale(0.050000)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M36.887 5.791H41V2.125h-4.113v3.666zM41 21.774V7.389h-4.113v14.385H41zM21.423 7.379v3.023h7.695s1.832.458 1.832 1.634V13.1h-6.963s-2.739.256-3.618 3.567c-.152 1.55.05 2.31.153 2.595.1.28.901 2.107 3.29 2.565h11.087V11.523s-.528-3.535-4.7-4.121l-8.776-.023zm3.923 11.6c-.753-.307-1.004-.815-1.057-.942-.052-.125-.226-.58-.023-1.041.453-.889 1.205-1.093 1.205-1.093h5.479v3.076h-5.604zm-8.866-6.964c2.629-1.392 2.295-4.897 2.295-4.897-.285-5.366-6.764-5.116-6.764-5.116H2V22h11.304c6.638-.026 6.16-5.272 6.16-5.272.122-3.503-2.984-4.713-2.984-4.713zM6.305 18.292v-4.314h6.739l.228.046s1.282.237 1.746 1.404c0 0 .27 1.096-.311 1.91 0 0-.427.755-1.63.945l-6.772.009zm6.545-8.252H6.305V5.9h6.517s1.416-.067 1.885 1.072c0 0 .281 1.21-.195 2.038 0 0-.455.847-1.662 1.029zM53.274 2v5.394h-4.308s-4.306.365-5.814 5.343c-.525 3.324.464 5.282.637 5.701.174.418 1.566 2.849 5.06 3.562h8.085V2.058L53.274 2zm-.065 16.727h-3.257s-2.269-.12-2.96-2.784c-.356-1.182.053-2.546.233-3.082.164-.538.926-1.779 2.497-2.256h3.486l.001 8.122zm5.707-10.849v10.5s.168 2.614 3.78 3.566H72V7.878h-4.015v10.56h-3.833s-1.225-.18-1.454-1.186V7.816l-3.782.062z\\\"></path></g></g></g></svg>\",\"bytedance\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 8.1408 1\\\" data-combine-word=\\\"ByteDance\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0604 -0.2250) scale(0.060417)\\\"><g><path d=\\\"M14.944 18.587l-1.704-.445V10.01l1.824-.462c1-.254 1.84-.461 1.88-.453.032 0 .056 2.235.056 4.972v4.973l-.176-.008c-.104 0-.952-.207-1.88-.446z\\\" fill=\\\"#00C8D2\\\" fill-rule=\\\"nonzero\\\"></path><path d=\\\"M7 16.542c0-2.736.024-4.98.064-4.98.032-.008.872.2 1.88.454l1.816.461-.016 4.05-.024 4.049-1.632.422c-.896.23-1.736.445-1.856.469L7 21.523v-4.98z\\\" fill=\\\"#3C8CFF\\\" fill-rule=\\\"nonzero\\\"></path><path d=\\\"M19.24 12.477c0-9.03.008-9.515.144-9.475.072.024.784.207 1.576.406.792.207 1.576.405 1.744.445l.296.08-.016 8.56-.024 8.568-1.624.414c-.888.23-1.728.437-1.856.47l-.24.055v-9.523z\\\" fill=\\\"currentColor\\\" fill-rule=\\\"nonzero\\\"></path><path d=\\\"M1 12.509c0-4.678.024-8.505.064-8.505.032 0 .872.207 1.872.454l1.824.461v7.582c0 4.16-.016 7.574-.032 7.574-.024 0-.872.215-1.88.47L1 21.013v-8.505z\\\" fill=\\\"#325AB4\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0604 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M14.944 18.587l-1.704-.445V10.01l1.824-.462c1-.254 1.84-.461 1.88-.453.032 0 .056 2.235.056 4.972v4.973l-.176-.008c-.104 0-.952-.207-1.88-.446z\\\"></path><path d=\\\"M7 16.542c0-2.736.024-4.98.064-4.98.032-.008.872.2 1.88.454l1.816.461-.016 4.05-.024 4.049-1.632.422c-.896.23-1.736.445-1.856.469L7 21.523v-4.98z\\\"></path><path d=\\\"M19.24 12.477c0-9.03.008-9.515.144-9.475.072.024.784.207 1.576.406.792.207 1.576.405 1.744.445l.296.08-.016 8.56-.024 8.568-1.624.414c-.888.23-1.728.437-1.856.47l-.24.055v-9.523z\\\"></path><path d=\\\"M1 12.509c0-4.678.024-8.505.064-8.505.032 0 .872.207 1.872.454l1.824.461v7.582c0 4.16-.016 7.574-.032 7.574-.024 0-.872.215-1.88.47L1 21.013v-8.505z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.5129 -0.1163) scale(0.058140)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M31.574 4.626V7.43h.893c.674 0 .84.015.88.49l.012.53-.013.53c-.04.474-.205.49-.88.49h-.892l.003 5c.018 2.842.164 2.902 1.298 2.902.357 0 .46.137.48.837l.004 1.534-1.428-.179c-.79-.076-1.631-.28-1.912-.408-.693-.382-.96-1.705-.991-5.188l-.003-4.499h-2.958l-3.187 7.266L19.72 24h-2.423l.484-1.198c.28-.688.74-1.785 1.02-2.447l.536-1.25-4.768-11.344c-.102-.255.255-.331 1.25-.331h1.376l2.633 6.613c.738 1.81.936 2.113 1.094 1.82l1.857-4.584 1.53-3.722 4.716-.153V4.626h2.55zm68.557 3.773c.306.229.23.407-.383 1.121l-.765.867-1.121-.612c-2.04-1.07-3.978-.408-4.895 1.657-.587 1.3-.51 2.83.178 4.181.918 1.733 3.34 2.294 5.048 1.147l.892-.612.663.689c.357.382.663.79.663.943 0 .637-3.493 2.065-4.564 1.86l-1.045-.203c-1.886-.383-3.467-1.683-4.181-3.39-.255-.561-.408-1.709-.408-2.83 0-1.657.102-2.014.841-3.238 1.81-3.033 5.94-3.747 9.077-1.58zM42.92 7.455c2.09.561 3.951 3.263 3.951 5.685v.918l-7.175.008c-2.97.039-2.837.26-2.08 1.521 1.25 2.116 4.539 2.346 6.63.46.586-.536 1.172-.409 1.86.433.281.331.23.51-.382 1.147-1.3 1.351-4.181 2.269-5.864 1.86-2.269-.535-3.62-1.503-4.538-3.237-.765-1.453-.74-4.435.026-5.94 1.35-2.6 4.36-3.747 7.572-2.855zm64.604-.28c3.595 0 5.966 2.065 6.323 5.506l.153 1.377h-9.765v.663c0 .433.306.968.893 1.53 1.53 1.452 3.722 1.478 5.685.101l1.096-.765.765.51c.408.306.74.638.74.74 0 .102-.306.484-.689.866-1.402 1.326-4.232 2.116-6.195 1.734-2.932-.586-4.844-3.008-4.844-6.17 0-3.466 2.524-6.067 5.838-6.092zm-34.01.918l.55.367c.508.32.584.263.595-.18l.002-.213c0-.49.078-.61.713-.633L76.7 7.43v11.726h-1.148c-.847 0-1.09-.058-1.137-.363l-.01-.146c0-.638-.127-.638-1.198.025-1.377.867-3.697.918-5.329.153-2.422-1.173-3.62-3.39-3.34-6.297.179-1.963 1.097-3.594 2.55-4.435 1.989-1.173 4.691-1.173 6.425 0zM2 19.182V2l4.892.212c2.05.11 2.655.253 3.496.706 2.498 1.274 3.136 4.563 1.275 6.526-.357.382-.485.663-.306.714 1.3.433 2.6 2.523 2.626 4.155 0 1.351-.97 3.059-2.244 3.951l-1.122.765L2 19.182zM87.995 8.985c.69.928.914 2.167.94 5.644l.003 4.527h-2.294v-3.365l-.02-1.404c-.11-4.106-.676-5.045-2.683-5.045-.994 0-1.274.127-1.912.841l-.74.816v8.157h-2.294V7.43h1.147c.743 0 1.056.075 1.13.289l.018.119c0 .23.076.357.204.306 2.855-1.479 4.946-1.198 6.501.84zm-36.33-6.909c8.285 0 11.778 2.805 11.472 9.203-.255 5.456-3.39 7.877-10.172 7.877H49.93V2.076h1.733zm17.005 7.75c-1.683 1.122-2.244 4.053-1.071 5.787 1.147 1.733 3.646 2.243 5.252 1.07 2.294-1.733 2.192-5.404-.23-6.806-1.045-.612-3.033-.637-3.951-.05zM4.55 11.713v5.2l4.09-.15c1.333-.067 1.473-.209 2.054-.87.459-.51.74-1.096.74-1.58s-.281-1.07-.74-1.58l-.283-.312c-.518-.531-.864-.54-3.159-.606l-2.702-.102zm47.675-7.419v12.62l2.244-.103c1.606-.076 2.498-.255 3.263-.663 2.04-1.045 2.907-2.676 2.907-5.404 0-2.141-.434-3.314-1.632-4.461-1.09-1.066-2.052-1.48-4.23-1.737l-2.552-.252zM39.962 9.342c-1.173.204-2.779 1.606-2.779 2.422l.017.171c.077.273.477.327 2.443.336l4.704.002-.153-.56c-.484-1.58-2.422-2.677-4.232-2.371zm66.568.102c-1.07.306-2.295 1.555-2.295 2.345 0 .402.176.471 2.44.482l4.674.002-.255-.764c-.587-1.683-2.703-2.626-4.564-2.065zM4.55 4.294V9.47h1.657c.918 0 2.04-.153 2.498-.331 1.147-.484 1.53-1.045 1.53-2.243 0-.79-.179-1.199-.663-1.708-.47-.45-.775-.604-1.858-.7L4.55 4.294z\\\"></path></g></g></g></svg>\",\"celestoai\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 7.7955 1\\\" data-combine-word=\\\"celestoai\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"#000\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M11.77.194c.044-.259.416-.259.46 0l1.081 6.45a.989.989 0 001.55.641l5.325-3.795c.213-.153.477.11.324.324L16.715 9.14a.989.989 0 00.641 1.549l6.45 1.082c.259.043.259.415 0 .458l-6.45 1.082a.989.989 0 00-.641 1.55l3.795 5.325c.153.213-.11.477-.324.324l-5.326-3.795a.989.989 0 00-1.549.641l-1.082 6.45c-.043.259-.415.259-.458 0l-1.082-6.45a.989.989 0 00-1.55-.641L3.815 20.51c-.214.153-.477-.11-.324-.324l3.795-5.326a.989.989 0 00-.641-1.549L.194 12.23c-.259-.043-.259-.415 0-.458l6.45-1.082a.989.989 0 00.641-1.55L3.49 3.815c-.153-.214.11-.477.324-.324L9.14 7.285a.989.989 0 001.549-.641L11.77.194z\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M11.77.194c.044-.259.416-.259.46 0l1.081 6.45a.989.989 0 001.55.641l5.325-3.795c.213-.153.477.11.324.324L16.715 9.14a.989.989 0 00.641 1.549l6.45 1.082c.259.043.259.415 0 .458l-6.45 1.082a.989.989 0 00-.641 1.55l3.795 5.325c.153.213-.11.477-.324.324l-5.326-3.795a.989.989 0 00-1.549.641l-1.082 6.45c-.043.259-.415.259-.458 0l-1.082-6.45a.989.989 0 00-1.55-.641L3.815 20.51c-.214.153-.477-.11-.324-.324l3.795-5.326a.989.989 0 00-.641-1.549L.194 12.23c-.259-.043-.259-.415 0-.458l6.45-1.082a.989.989 0 00.641-1.55L3.49 3.815c-.153-.214.11-.477.324-.324L9.14 7.285a.989.989 0 001.549-.641L11.77.194z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.6591 -0.0455) scale(0.045455)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"nonzero\\\"><path d=\\\"M12.49 23c-1.52 0-2.923-.268-4.207-.803a10.25 10.25 0 01-3.32-2.319 10.334 10.334 0 01-2.192-3.508C2.256 15.022 2 13.546 2 11.94c0-1.605.257-3.072.77-4.4.514-1.327 1.235-2.477 2.164-3.448a9.873 9.873 0 013.319-2.29C9.537 1.269 10.95 1 12.49 1c1.699 0 3.23.337 4.593 1.01a8.828 8.828 0 013.349 2.855c.889 1.209 1.432 2.636 1.63 4.28h-3.794c-.237-1.604-.879-2.833-1.926-3.686-1.047-.872-2.321-1.308-3.823-1.308-1.323 0-2.48.317-3.467.952-.988.634-1.758 1.536-2.311 2.705-.554 1.15-.83 2.517-.83 4.103 0 1.625.276 3.032.83 4.221.553 1.17 1.333 2.081 2.34 2.736 1.008.654 2.164.98 3.468.98 1.462 0 2.716-.425 3.764-1.278 1.047-.872 1.708-2.1 1.985-3.686h3.823c-.237 1.625-.8 3.052-1.69 4.28a8.828 8.828 0 01-3.348 2.855c-1.363.654-2.894.981-4.593.981zM31.756 23c-1.6 0-3.002-.337-4.208-1.01a7.27 7.27 0 01-2.785-2.795c-.652-1.19-.978-2.557-.978-4.103 0-1.546.326-2.904.978-4.073a7.063 7.063 0 012.785-2.765c1.186-.674 2.569-1.01 4.15-1.01 1.5 0 2.805.316 3.911.95a6.436 6.436 0 012.578 2.617c.613 1.13.919 2.448.919 3.954a8.821 8.821 0 01-.118 1.486H26.095v-2.616h10.017l-.77.714c0-1.427-.327-2.498-.979-3.211-.652-.714-1.56-1.07-2.726-1.07-1.264 0-2.272.436-3.023 1.308-.73.872-1.096 2.13-1.096 3.775 0 1.626.365 2.874 1.096 3.746.751.853 1.808 1.279 3.171 1.279.79 0 1.482-.149 2.075-.446a2.743 2.743 0 001.303-1.368h3.527c-.494 1.427-1.334 2.557-2.519 3.39-1.165.832-2.637 1.248-4.415 1.248zM41.9 22.703V1.297h3.734v21.406H41.9zM56.385 23c-1.6 0-3.003-.337-4.209-1.01a7.27 7.27 0 01-2.785-2.795c-.652-1.19-.978-2.557-.978-4.103 0-1.546.326-2.904.978-4.073a7.062 7.062 0 012.785-2.765c1.186-.674 2.569-1.01 4.15-1.01 1.5 0 2.805.316 3.91.95a6.436 6.436 0 012.58 2.617c.612 1.13.918 2.448.918 3.954a8.821 8.821 0 01-.119 1.486h-12.89v-2.616H60.74l-.77.714c0-1.427-.327-2.498-.979-3.211-.652-.714-1.56-1.07-2.726-1.07-1.264 0-2.272.436-3.023 1.308-.73.872-1.096 2.13-1.096 3.775 0 1.626.365 2.874 1.096 3.746.75.853 1.808 1.279 3.171 1.279.79 0 1.482-.149 2.075-.446a2.743 2.743 0 001.303-1.368h3.527c-.494 1.427-1.334 2.557-2.519 3.39-1.166.832-2.637 1.248-4.415 1.248zM72.394 23c-2.095 0-3.764-.436-5.009-1.308-1.244-.892-1.926-2.12-2.044-3.687h3.408c.098.773.464 1.358 1.096 1.755.632.396 1.482.594 2.549.594.968 0 1.689-.149 2.163-.446.494-.317.74-.763.74-1.338 0-.416-.138-.753-.414-1.01-.277-.278-.8-.506-1.57-.684l-2.43-.565c-1.66-.357-2.895-.912-3.705-1.665-.79-.773-1.185-1.734-1.185-2.884 0-1.407.533-2.507 1.6-3.3 1.086-.812 2.578-1.219 4.475-1.219 1.877 0 3.378.407 4.504 1.22 1.146.792 1.778 1.892 1.897 3.3H75.06a1.904 1.904 0 00-.949-1.398c-.513-.317-1.224-.476-2.133-.476-.85 0-1.492.139-1.927.416-.434.258-.652.645-.652 1.16 0 .396.168.733.504 1.01.336.258.9.486 1.69.684l2.607.595c1.482.337 2.598.922 3.349 1.754a4.19 4.19 0 011.156 2.943c0 1.447-.553 2.567-1.66 3.36C75.94 22.604 74.39 23 72.394 23zM88.016 23c-1.857 0-3.23-.436-4.12-1.308-.869-.892-1.303-2.22-1.303-3.984V4.092l3.763-1.397v15.102c0 .734.198 1.279.593 1.635.395.357 1.017.536 1.867.536.336 0 .632-.02.889-.06.277-.06.533-.129.77-.208v2.913c-.237.12-.572.209-1.007.268-.435.08-.919.119-1.452.119zm-8.328-12.516V7.54h10.787v2.943H79.69zM99.68 23c-1.6 0-3.012-.337-4.237-1.01a7.213 7.213 0 01-2.815-2.795c-.672-1.21-1.008-2.587-1.008-4.133 0-1.546.336-2.903 1.008-4.073a7.067 7.067 0 012.815-2.735c1.225-.674 2.638-1.01 4.238-1.01 1.62 0 3.032.336 4.237 1.01a7.065 7.065 0 012.816 2.735c.671 1.17 1.007 2.527 1.007 4.073 0 1.546-.345 2.924-1.037 4.133a7.215 7.215 0 01-2.815 2.794c-1.205.674-2.608 1.011-4.208 1.011zm0-3.003c.791 0 1.502-.198 2.134-.594.633-.416 1.127-.991 1.482-1.725.356-.753.534-1.635.534-2.646 0-1.486-.396-2.655-1.186-3.508-.77-.852-1.758-1.278-2.963-1.278s-2.203.426-2.993 1.278c-.79.853-1.186 2.022-1.186 3.508 0 1.011.178 1.893.534 2.646.375.734.869 1.308 1.481 1.725.633.396 1.354.594 2.164.594zM108.406 22.703l7.853-21.406h3.319l-7.379 21.406h-3.793zm16.092 0l-7.35-21.406h3.497l7.824 21.406h-3.971zm-12.032-8.414h11.676v3.092h-11.676V14.29zM131.148 22.703V1.297H135v21.406h-3.852z\\\"></path></g></g></g></svg>\",\"claude\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 5.9773 1\\\" data-combine-word=\\\"Claude\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g><path d=\\\"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z\\\" fill=\\\"#D97757\\\" fill-rule=\\\"nonzero\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.6591 -0.0000) scale(0.045455)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"nonzero\\\"><path d=\\\"M13.623 20.222c-3.417 0-5.753-1.901-6.855-4.827a12.992 12.992 0 01-.838-4.772c0-4.907 2.206-8.315 7.08-8.315 3.275 0 5.297 1.425 6.448 4.826h1.402l-.19-4.69C18.709 1.18 16.258.543 13.276.543c-4.2 0-7.775 1.874-9.763 5.254a11.357 11.357 0 00-1.511 5.872c0 3.753 1.777 7.08 5.113 8.926a11.95 11.95 0 005.943 1.398c3.254 0 5.835-.617 8.122-1.697l.593-5.172h-1.43c-.858 2.362-1.88 3.78-3.574 4.534-.831.373-1.88.564-3.146.564zm14.74-17.914L28.499 0h-.967L23.23 1.29v.699l1.907.882v16.142c0 1.1-.565 1.344-2.043 1.528v1.18h7.319v-1.18c-1.484-.184-2.042-.428-2.042-1.528V2.315l-.007-.007zm29.104 19.685h.565l4.95-.937v-1.208l-.695-.054c-1.157-.109-1.457-.346-1.457-1.29V9.897l.137-2.763h-.783l-4.678.672v1.181l.457.082c1.266.183 1.64.536 1.64 1.419v7.67c-1.212.937-2.369 1.527-3.744 1.527-1.525 0-2.471-.774-2.471-2.58V9.905l.136-2.763h-.804l-4.684.672v1.181l.484.082c1.266.183 1.64.536 1.64 1.418v7.08c0 3 1.703 4.426 4.412 4.426 2.07 0 3.765-1.1 5.038-2.627L57.474 22l-.007-.007zm-13.602-9.55c0-3.836-2.043-5.309-5.733-5.309-3.254 0-5.616 1.344-5.616 3.57 0 .666.238 1.175.721 1.528l2.478-.326c-.109-.746-.163-1.201-.163-1.391 0-1.263.674-1.901 2.042-1.901 2.022 0 3.044 1.419 3.044 3.7v.746l-5.106 1.527c-1.702.462-2.67.863-3.316 1.8a3.386 3.386 0 00-.476 1.9c0 2.172 1.497 3.706 4.057 3.706 1.852 0 3.493-.835 4.922-2.416.51 1.581 1.294 2.416 2.69 2.416 1.13 0 2.15-.455 3.063-1.344l-.272-.937a4.363 4.363 0 01-1.178.163c-.783 0-1.157-.617-1.157-1.826v-5.607zm-6.536 7.378c-1.396 0-2.26-.808-2.26-2.226 0-.964.456-1.528 1.43-1.854l4.139-1.31v3.965c-1.321.997-2.097 1.425-3.31 1.425zm43.095 1.235v-1.208l-.701-.054c-1.158-.109-1.45-.346-1.45-1.29V2.308L78.409 0h-.974l-4.302 1.29v.699l1.906.882V8.18a6.024 6.024 0 00-3.656-1.046c-4.276 0-7.612 3.245-7.612 8.098 0 3.998 2.397 6.761 6.346 6.761 2.042 0 3.819-.99 4.922-2.525l-.136 2.525h.571l4.95-.937zm-8.96-12.313c2.043 0 3.575 1.181 3.575 3.353v6.11a4.91 4.91 0 01-3.547 1.425c-2.928 0-4.412-2.308-4.412-5.39 0-3.462 1.695-5.498 4.385-5.498zm19.424 3.055c-.381-1.792-1.484-2.81-3.016-2.81-2.288 0-3.874 1.717-3.874 4.18 0 3.646 1.934 6.008 5.059 6.008a5.858 5.858 0 005.03-2.953l.913.245c-.408 3.163-3.281 5.525-6.808 5.525-4.14 0-6.992-3.054-6.992-7.399 0-4.378 3.098-7.46 7.237-7.46 3.09 0 5.27 1.853 5.97 5.07l-10.783 3.3V14.05l7.264-2.247v-.006z\\\"></path></g></g></g></svg>\",\"cohere\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 6.2957 1\\\" data-combine-word=\\\"Cohere\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0604 -0.2250) scale(0.060417)\\\"><g><path clip-rule=\\\"evenodd\\\" d=\\\"M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z\\\" fill=\\\"#39594D\\\" fill-rule=\\\"evenodd\\\"></path><path clip-rule=\\\"evenodd\\\" d=\\\"M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z\\\" fill=\\\"#D18EE2\\\" fill-rule=\\\"evenodd\\\"></path><path d=\\\"M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z\\\" fill=\\\"#FF7759\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0604 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path clip-rule=\\\"evenodd\\\" d=\\\"M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z\\\"></path><path clip-rule=\\\"evenodd\\\" d=\\\"M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z\\\"></path><path d=\\\"M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.5339 -0.0476) scale(0.047619)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M9.589 21.996c3.12 0 5.85-1.56 6.929-4.709.21-.63-.091-1.05-.69-1.05h-1.17c-.54 0-.9.24-1.141.75-.93 1.83-2.22 2.488-3.839 2.488-2.88 0-4.65-2.01-4.65-5.369 0-3.358 1.831-5.369 4.589-5.369 1.68 0 3.06.72 3.93 2.43.27.51.598.749 1.14.749h1.17c.6 0 .9-.39.69-.96-1.259-3.42-4.08-4.74-6.958-4.74C5.24 6.217 2 9.428 2 14.107c0 4.68 3.09 7.89 7.589 7.89zm78.496-9.27c.389-2.55 2.129-4.14 4.499-4.14 2.37 0 4.14 1.62 4.349 4.14h-8.848zm4.62 9.27c2.76 0 5.519-1.29 6.869-4.199.33-.69.03-1.17-.57-1.17h-1.109c-.539 0-.87.239-1.14.72-.9 1.589-2.46 2.249-4.048 2.249-2.73 0-4.5-1.86-4.71-4.889h11.01c.6 0 .99-.33.99-.96-.12-4.71-3.178-7.528-7.409-7.528-4.23 0-7.589 3.06-7.589 7.89 0 4.829 3.27 7.889 7.71 7.889l-.005-.002zm-17.458-7.498h.99c.6 0 .93-.33 1.02-.961.572-4.053 2.944-4.59 5.467-4.47.54.026.982-.39.982-.93v-.93c0-.599-.3-.96-.9-.99-2.232-.085-4.224.681-5.375 2.85-.063.119-.241.087-.256-.046l-.186-1.636c-.06-.599-.39-.9-.99-.9h-4.53c-.529 0-.96.43-.96.961v.51c0 .53.43.961.96.961h1.86c.53 0 .962.43.962.96v3.66c0 .529.43.96.96.96h-.004zm-4.048 7.2h9.387c.6 0 .961-.36.961-.962v-.51c0-.598-.36-.96-.96-.96h-2.4c-.6 0-.961-.36-.961-.961v-1.65c0-.6-.36-.962-.961-.962h-1.02c-.599 0-.96.36-.96.961v1.651c0 .599-.36.96-.962.96h-2.129c-.599 0-.96.36-.96.962v.51c0 .599.36.96.96.96h.005zm-14.489-8.97c.39-2.55 2.13-4.139 4.5-4.139s4.14 1.619 4.349 4.14H56.71zm4.62 9.27c2.76 0 5.52-1.289 6.87-4.199.33-.69.03-1.17-.57-1.17h-1.108c-.54 0-.87.239-1.141.72-.9 1.589-2.46 2.249-4.049 2.249-2.73 0-4.499-1.86-4.708-4.889h11.009c.599 0 .99-.33.99-.96-.12-4.71-3.178-7.528-7.41-7.528-4.23 0-7.588 3.06-7.588 7.89 0 4.829 3.27 7.889 7.71 7.889l-.005-.002zm-34.703 0c4.5 0 7.71-3.33 7.71-7.89s-3.21-7.89-7.71-7.89c-4.499 0-7.71 3.391-7.71 7.89 0 1.05.18 2.22.72 3.51.271.63.781.719 1.32.33l.87-.631c.451-.33.57-.72.42-1.29-.24-.748-.301-1.409-.301-1.978 0-3.149 1.89-5.31 4.68-5.31 2.788 0 4.678 2.13 4.678 5.37s-1.86 5.368-4.62 5.368c-.96 0-1.86-.18-2.94-.99-.45-.36-.869-.42-1.35-.06l-.66.481c-.54.39-.598.93-.09 1.35 1.56 1.26 3.358 1.74 4.98 1.74h.003zm11.517-.3h.99c.53 0 .962-.43.962-.962V13.57c0-3.029 1.618-4.83 4.139-4.83 2.28 0 3.6 1.5 3.6 4.26v7.74c0 .529.43.96.96.96h1.02c.53 0 .961-.43.961-.96v-8.22c0-4.048-2.07-6.298-5.578-6.298-2.39 0-3.801.978-4.855 2.338a.136.136 0 01-.243-.082V1.96A.97.97 0 0039.135 1h-.99c-.53 0-.962.43-.962.96v18.777c0 .529.43.96.961.96z\\\"></path></g></g></g></svg>\",\"deepseek\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 8.2825 1\\\" data-combine-word=\\\"DeepSeek\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g><path d=\\\"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z\\\" fill=\\\"#4D6BFE\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.6469 -0.0000) scale(0.051546)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M117.986 0h-3.21v19.404h3.21V0zM8.7 5.215h1.83v2.838H8.7c-1.135 0-2.28.282-3.019 1.068-.738.785-1.016 1.99-1.016 3.194s.267 2.408 1.016 3.193c.75.786 1.884 1.068 3.018 1.068 1.135 0 2.28-.282 3.018-1.068.739-.785 1.017-1.99 1.017-3.193V.649h3.21v18.755h-3.21V18.21h-.589a3.498 3.498 0 01-.192.199c-.803.733-2.034.995-3.243.995-1.894 0-3.788-.472-5.03-1.78C2.44 16.314 2 14.303 2 12.303c0-2 .45-4 1.68-5.32 1.242-1.308 3.136-1.77 5.02-1.77zM57.564 18.9h-1.83v-2.837h1.83c1.134 0 2.28-.283 3.017-1.068.739-.785 1.017-1.99 1.017-3.194s-.267-2.408-1.017-3.194c-.749-.785-1.883-1.068-3.017-1.068s-2.28.283-3.018 1.068c-.738.786-1.017 1.99-1.017 3.194v11.655h-3.21V4.712h3.21v1.194h.59a3.42 3.42 0 01.186-.194l.005-.005c.803-.733 2.034-.995 3.243-.995 1.895 0 3.788.471 5.03 1.78 1.241 1.31 1.68 3.32 1.68 5.32 0 2-.45 4-1.68 5.319-1.23 1.32-3.135 1.77-5.019 1.77zM32.05 13.204v-1.14c0-2.064-.46-4.137-1.754-5.498-1.285-1.362-3.264-1.843-5.223-1.843-1.958 0-3.928.492-5.222 1.843-1.295 1.35-1.755 3.434-1.755 5.497 0 2.063.47 4.136 1.755 5.498 1.284 1.36 3.264 1.843 5.222 1.843 1.959 0 3.938-.493 5.223-1.843.663-.692 1.102-1.582 1.38-2.566h-3.168a5.026 5.026 0 01-.3.367c-.77.816-1.958 1.11-3.135 1.11-1.177 0-2.365-.304-3.136-1.11-.77-.807-1.048-2.063-1.048-3.299 0-1.236.278-2.482 1.049-3.298.77-.817 1.958-1.11 3.135-1.11 1.177 0 2.365.293 3.136 1.11.535.565.834 1.34.963 2.167H23.5v2.272h8.55zM48.168 12.063v1.141h-8.55v-2.272h5.671c-.129-.827-.428-1.602-.963-2.167-.77-.817-1.959-1.11-3.136-1.11s-2.365.293-3.136 1.11c-.77.816-1.049 2.063-1.049 3.298 0 1.236.279 2.492 1.05 3.299.77.806 1.958 1.11 3.135 1.11 1.177 0 2.365-.294 3.136-1.11.107-.116.203-.241.299-.367h3.168c-.278.985-.717 1.874-1.38 2.566-1.285 1.35-3.264 1.843-5.223 1.843s-3.938-.482-5.222-1.843c-1.285-1.362-1.756-3.435-1.756-5.498s.46-4.147 1.755-5.497c1.296-1.351 3.264-1.843 5.223-1.843s3.938.481 5.222 1.843c1.296 1.36 1.756 3.434 1.756 5.497zM78.635 18.315c-1.284.806-3.263 1.089-5.222 1.089-1.958 0-3.917-.294-5.212-1.09-1.295-.795-1.755-2.03-1.755-3.246h3.767c0 .472.225.953.824 1.257.6.304 1.54.419 2.462.419.92 0 1.851-.115 2.46-.42.611-.303.825-.784.825-1.256 0-.47-.214-.952-.824-1.256-.61-.304-1.627-.419-2.547-.419-1.777 0-3.563-.293-4.73-1.09-1.167-.795-1.584-2.03-1.584-3.245 0-1.215.417-2.44 1.584-3.246 1.167-.807 2.953-1.09 4.73-1.09 1.776 0 3.564.294 4.73 1.09 1.167.795 1.584 2.031 1.584 3.246h-3.264c0-.471-.203-.942-.749-1.257-.546-.303-1.391-.419-2.226-.419s-1.68.105-2.226.42c-.556.303-.75.785-.75 1.256 0 .47.204.942.75 1.256.545.304 1.316.42 2.151.42 1.959 0 3.938.292 5.222 1.088 1.295.796 1.756 2.032 1.756 3.246 0 1.215-.471 2.44-1.756 3.247zM96.507 12.063v1.141h-8.55v-2.272h5.672c-.129-.827-.429-1.602-.963-2.167-.771-.817-1.959-1.11-3.136-1.11s-2.366.293-3.136 1.11c-.77.816-1.048 2.063-1.048 3.298 0 1.236.278 2.492 1.048 3.299.77.806 1.959 1.11 3.135 1.11 1.178 0 2.366-.294 3.137-1.11.106-.116.203-.241.3-.367h3.167c-.279.985-.717 1.874-1.38 2.566-1.284 1.35-3.265 1.843-5.224 1.843-1.957 0-3.938-.482-5.222-1.843-1.284-1.362-1.754-3.435-1.754-5.498s.46-4.147 1.754-5.497c1.296-1.351 3.265-1.843 5.222-1.843 1.96 0 3.94.481 5.224 1.843 1.294 1.36 1.754 3.434 1.754 5.497zM112.624 13.204v-1.14c0-2.064-.46-4.137-1.754-5.498-1.285-1.362-3.265-1.843-5.223-1.843-1.959 0-3.928.492-5.222 1.843-1.296 1.35-1.756 3.434-1.756 5.497 0 2.063.471 4.136 1.756 5.498 1.284 1.36 3.263 1.843 5.222 1.843 1.958 0 3.938-.493 5.223-1.843.663-.692 1.102-1.582 1.38-2.566h-3.168l-.012.016c-.093.12-.185.24-.288.35-.77.817-1.957 1.11-3.135 1.11-1.177 0-2.365-.303-3.136-1.11-.77-.806-1.049-2.062-1.049-3.298 0-1.236.279-2.482 1.049-3.298.771-.817 1.959-1.11 3.136-1.11 1.178 0 2.365.293 3.135 1.11.536.565.836 1.34.964 2.167h-5.672v2.272h8.55zM128.73 19.404l-5.264-7.78 5.264-6.252h-3.97l-5.265 6.251 5.265 7.78h3.97z\\\"></path></g></g></g></svg>\",\"gemini\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 5.6291 1\\\" data-combine-word=\\\"Gemini\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><defs><linearGradient gradientUnits=\\\"userSpaceOnUse\\\" id=\\\"lobe-icons-gemini-0-_R_0_\\\" x1=\\\"7\\\" x2=\\\"11\\\" y1=\\\"15.5\\\" y2=\\\"12\\\"><stop stop-color=\\\"#08B962\\\"></stop><stop offset=\\\"1\\\" stop-color=\\\"#08B962\\\" stop-opacity=\\\"0\\\"></stop></linearGradient><linearGradient gradientUnits=\\\"userSpaceOnUse\\\" id=\\\"lobe-icons-gemini-1-_R_0_\\\" x1=\\\"8\\\" x2=\\\"11.5\\\" y1=\\\"5.5\\\" y2=\\\"11\\\"><stop stop-color=\\\"#F94543\\\"></stop><stop offset=\\\"1\\\" stop-color=\\\"#F94543\\\" stop-opacity=\\\"0\\\"></stop></linearGradient><linearGradient gradientUnits=\\\"userSpaceOnUse\\\" id=\\\"lobe-icons-gemini-2-_R_0_\\\" x1=\\\"3.5\\\" x2=\\\"17.5\\\" y1=\\\"13.5\\\" y2=\\\"12\\\"><stop stop-color=\\\"#FABC12\\\"></stop><stop offset=\\\".46\\\" stop-color=\\\"#FABC12\\\" stop-opacity=\\\"0\\\"></stop></linearGradient></defs><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0604 -0.2250) scale(0.060417)\\\"><g><path d=\\\"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z\\\" fill=\\\"#3186FF\\\"></path><path d=\\\"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z\\\" fill=\\\"url(#lobe-icons-gemini-0-_R_0_)\\\"></path><path d=\\\"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z\\\" fill=\\\"url(#lobe-icons-gemini-1-_R_0_)\\\"></path><path d=\\\"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z\\\" fill=\\\"url(#lobe-icons-gemini-2-_R_0_)\\\"></path><defs><linearGradient gradientUnits=\\\"userSpaceOnUse\\\" id=\\\"lobe-icons-gemini-0-_R_0_\\\" x1=\\\"7\\\" x2=\\\"11\\\" y1=\\\"15.5\\\" y2=\\\"12\\\"><stop stop-color=\\\"#08B962\\\"></stop><stop offset=\\\"1\\\" stop-color=\\\"#08B962\\\" stop-opacity=\\\"0\\\"></stop></linearGradient><linearGradient gradientUnits=\\\"userSpaceOnUse\\\" id=\\\"lobe-icons-gemini-1-_R_0_\\\" x1=\\\"8\\\" x2=\\\"11.5\\\" y1=\\\"5.5\\\" y2=\\\"11\\\"><stop stop-color=\\\"#F94543\\\"></stop><stop offset=\\\"1\\\" stop-color=\\\"#F94543\\\" stop-opacity=\\\"0\\\"></stop></linearGradient><linearGradient gradientUnits=\\\"userSpaceOnUse\\\" id=\\\"lobe-icons-gemini-2-_R_0_\\\" x1=\\\"3.5\\\" x2=\\\"17.5\\\" y1=\\\"13.5\\\" y2=\\\"12\\\"><stop stop-color=\\\"#FABC12\\\"></stop><stop offset=\\\".46\\\" stop-color=\\\"#FABC12\\\" stop-opacity=\\\"0\\\"></stop></linearGradient></defs></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0604 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.5265 -0.1026) scale(0.051282)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M21.186 12.67c0 2.649-.786 4.759-2.359 6.33-1.766 1.87-4.09 2.806-6.969 2.806-2.756 0-5.088-.953-6.996-2.86C2.954 17.04 2 14.693 2 11.904c0-2.789.954-5.137 2.862-7.043C6.77 2.953 9.102 2 11.858 2c1.396 0 2.712.247 3.949.741 1.236.495 2.252 1.192 3.047 2.092l-1.749 1.748c-.583-.706-1.338-1.258-2.266-1.655a7.49 7.49 0 00-2.981-.596c-2.067 0-3.816.715-5.247 2.145-1.413 1.448-2.12 3.257-2.12 5.428s.707 3.98 2.12 5.428c1.431 1.43 3.18 2.145 5.247 2.145 1.89 0 3.463-.53 4.717-1.588 1.254-1.06 1.979-2.516 2.173-4.37h-6.89v-2.277h9.196c.088.495.132.971.132 1.43m7.652-4.633c1.946 0 3.494.629 4.645 1.886 1.15 1.257 1.726 3.018 1.726 5.282l-.027.268H24.877c.036 1.284.464 2.318 1.285 3.102.82.785 1.802 1.177 2.944 1.177 1.57 0 2.802-.784 3.694-2.354l2.195 1.07a6.54 6.54 0 01-2.45 2.595C31.503 21.688 30.32 22 29 22c-1.927 0-3.516-.66-4.765-1.98-1.249-1.319-1.873-2.986-1.873-5.001 0-1.997.606-3.66 1.82-4.988 1.213-1.329 2.766-1.993 4.657-1.993m-.053 2.247c-.928 0-1.727.285-2.396.856-.67.57-1.11 1.337-1.325 2.3h7.522c-.071-.91-.442-1.663-1.111-2.26-.67-.598-1.566-.896-2.69-.896M39.247 21.53h-2.455V8.465h2.348v1.813h.107c.374-.64.947-1.173 1.721-1.6.774-.427 1.544-.64 2.309-.64.96 0 1.806.222 2.535.667a3.931 3.931 0 011.601 1.84c1.085-1.671 2.589-2.507 4.51-2.507 1.513 0 2.678.462 3.496 1.387.819.924 1.228 2.24 1.228 3.946v8.16h-2.455v-7.786c0-1.227-.223-2.112-.668-2.654-.444-.542-1.192-.813-2.241-.813-.943 0-1.735.4-2.375 1.2-.64.8-.961 1.742-.961 2.826v7.227h-2.455v-7.786c0-1.227-.223-2.112-.668-2.654-.444-.542-1.191-.813-2.241-.813-.943 0-1.735.4-2.375 1.2-.64.8-.961 1.742-.961 2.826v7.227zM61.911 3.93c0 .48-.17.89-.508 1.228a1.675 1.675 0 01-1.23.508c-.48 0-.89-.17-1.229-.508a1.673 1.673 0 01-.508-1.228c0-.481.17-.89.508-1.229a1.675 1.675 0 011.23-.508c.48 0 .89.17 1.23.508.338.338.507.748.507 1.228m-.11 4.514v13.088h-2.857V8.443h2.857zM80 3.93c0 .48-.17.89-.508 1.228a1.675 1.675 0 01-1.23.508c-.48 0-.89-.17-1.229-.508a1.673 1.673 0 01-.508-1.228c0-.481.17-.89.508-1.229a1.675 1.675 0 011.23-.508c.48 0 .89.17 1.23.508.338.338.507.748.507 1.228m-.11 4.514v13.088h-2.857V8.443h2.857zm-16.343.022h2.349v1.813h.107c.373-.64.947-1.173 1.721-1.6a4.935 4.935 0 012.415-.64c1.601 0 2.833.458 3.696 1.373.863.916 1.294 2.218 1.294 3.907v8.213h-2.455v-8.053c-.053-2.133-1.13-3.2-3.229-3.2-.978 0-1.797.395-2.455 1.187-.658.79-.987 1.737-.987 2.84v7.226h-2.456V8.465z\\\"></path></g></g></g></svg>\",\"gemma\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 6.2500 1\\\" data-combine-word=\\\"Gemma\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><defs><linearGradient id=\\\"lobe-icons-gemma-_R_0_\\\" x1=\\\"24.419%\\\" x2=\\\"75.194%\\\" y1=\\\"75.581%\\\" y2=\\\"25.194%\\\"><stop offset=\\\"0%\\\" stop-color=\\\"#446EFF\\\"></stop><stop offset=\\\"36.661%\\\" stop-color=\\\"#2E96FF\\\"></stop><stop offset=\\\"83.221%\\\" stop-color=\\\"#B1C5FF\\\"></stop></linearGradient></defs><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g><defs><linearGradient id=\\\"lobe-icons-gemma-_R_0_\\\" x1=\\\"24.419%\\\" x2=\\\"75.194%\\\" y1=\\\"75.581%\\\" y2=\\\"25.194%\\\"><stop offset=\\\"0%\\\" stop-color=\\\"#446EFF\\\"></stop><stop offset=\\\"36.661%\\\" stop-color=\\\"#2E96FF\\\"></stop><stop offset=\\\"83.221%\\\" stop-color=\\\"#B1C5FF\\\"></stop></linearGradient></defs><path d=\\\"M12.34 5.953a8.233 8.233 0 01-.247-1.125V3.72a8.25 8.25 0 015.562 2.232H12.34zm-.69 0c.113-.373.199-.755.257-1.145V3.72a8.25 8.25 0 00-5.562 2.232h5.304zm-5.433.187h5.373a7.98 7.98 0 01-.267.696 8.41 8.41 0 01-1.76 2.65L6.216 6.14zm-.264-.187H2.977v.187h2.915a8.436 8.436 0 00-2.357 5.767H0v.186h3.535a8.436 8.436 0 002.357 5.767H2.977v.186h2.976v2.977h.187v-2.915a8.436 8.436 0 005.767 2.357V24h.186v-3.535a8.436 8.436 0 005.767-2.357v2.915h.186v-2.977h2.977v-.186h-2.915a8.436 8.436 0 002.357-5.767H24v-.186h-3.535a8.436 8.436 0 00-2.357-5.767h2.915v-.187h-2.977V2.977h-.186v2.915a8.436 8.436 0 00-5.767-2.357V0h-.186v3.535A8.436 8.436 0 006.14 5.892V2.977h-.187v2.976zm6.14 14.326a8.25 8.25 0 005.562-2.233H12.34c-.108.367-.19.743-.247 1.126v1.107zm-.186-1.087a8.015 8.015 0 00-.258-1.146H6.345a8.25 8.25 0 005.562 2.233v-1.087zm-8.186-7.285h1.107a8.23 8.23 0 001.125-.247V6.345a8.25 8.25 0 00-2.232 5.562zm1.087.186H3.72a8.25 8.25 0 002.232 5.562v-5.304a8.012 8.012 0 00-1.145-.258zm15.47-.186a8.25 8.25 0 00-2.232-5.562v5.315c.367.108.743.19 1.126.247h1.107zm-1.086.186c-.39.058-.772.144-1.146.258v5.304a8.25 8.25 0 002.233-5.562h-1.087zm-1.332 5.69V12.41a7.97 7.97 0 00-.696.267 8.409 8.409 0 00-2.65 1.76l3.346 3.346zm0-6.18v-5.45l-.012-.013h-5.451c.076.235.162.468.26.696a8.698 8.698 0 001.819 2.688 8.698 8.698 0 002.688 1.82c.228.097.46.183.696.259zM6.14 17.848V12.41c.235.078.468.167.696.267a8.403 8.403 0 012.688 1.799 8.404 8.404 0 011.799 2.688c.1.228.19.46.267.696H6.152l-.012-.012zm0-6.245V6.326l3.29 3.29a8.716 8.716 0 01-2.594 1.728 8.14 8.14 0 01-.696.259zm6.257 6.257h5.277l-3.29-3.29a8.716 8.716 0 00-1.728 2.594 8.135 8.135 0 00-.259.696zm-2.347-7.81a9.435 9.435 0 01-2.88 1.96 9.14 9.14 0 012.88 1.94 9.14 9.14 0 011.94 2.88 9.435 9.435 0 011.96-2.88 9.14 9.14 0 012.88-1.94 9.435 9.435 0 01-2.88-1.96 9.434 9.434 0 01-1.96-2.88 9.14 9.14 0 01-1.94 2.88z\\\" fill=\\\"url(#lobe-icons-gemma-_R_0_)\\\" fill-rule=\\\"evenodd\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M12.34 5.953a8.233 8.233 0 01-.247-1.125V3.72a8.25 8.25 0 015.562 2.232H12.34zm-.69 0c.113-.373.199-.755.257-1.145V3.72a8.25 8.25 0 00-5.562 2.232h5.304zm-5.433.187h5.373a7.98 7.98 0 01-.267.696 8.41 8.41 0 01-1.76 2.65L6.216 6.14zm-.264-.187H2.977v.187h2.915a8.436 8.436 0 00-2.357 5.767H0v.186h3.535a8.436 8.436 0 002.357 5.767H2.977v.186h2.976v2.977h.187v-2.915a8.436 8.436 0 005.767 2.357V24h.186v-3.535a8.436 8.436 0 005.767-2.357v2.915h.186v-2.977h2.977v-.186h-2.915a8.436 8.436 0 002.357-5.767H24v-.186h-3.535a8.436 8.436 0 00-2.357-5.767h2.915v-.187h-2.977V2.977h-.186v2.915a8.436 8.436 0 00-5.767-2.357V0h-.186v3.535A8.436 8.436 0 006.14 5.892V2.977h-.187v2.976zm6.14 14.326a8.25 8.25 0 005.562-2.233H12.34c-.108.367-.19.743-.247 1.126v1.107zm-.186-1.087a8.015 8.015 0 00-.258-1.146H6.345a8.25 8.25 0 005.562 2.233v-1.087zm-8.186-7.285h1.107a8.23 8.23 0 001.125-.247V6.345a8.25 8.25 0 00-2.232 5.562zm1.087.186H3.72a8.25 8.25 0 002.232 5.562v-5.304a8.012 8.012 0 00-1.145-.258zm15.47-.186a8.25 8.25 0 00-2.232-5.562v5.315c.367.108.743.19 1.126.247h1.107zm-1.086.186c-.39.058-.772.144-1.146.258v5.304a8.25 8.25 0 002.233-5.562h-1.087zm-1.332 5.69V12.41a7.97 7.97 0 00-.696.267 8.409 8.409 0 00-2.65 1.76l3.346 3.346zm0-6.18v-5.45l-.012-.013h-5.451c.076.235.162.468.26.696a8.698 8.698 0 001.819 2.688 8.698 8.698 0 002.688 1.82c.228.097.46.183.696.259zM6.14 17.848V12.41c.235.078.468.167.696.267a8.403 8.403 0 012.688 1.799 8.404 8.404 0 011.799 2.688c.1.228.19.46.267.696H6.152l-.012-.012zm0-6.245V6.326l3.29 3.29a8.716 8.716 0 01-2.594 1.728 8.14 8.14 0 01-.696.259zm6.257 6.257h5.277l-3.29-3.29a8.716 8.716 0 00-1.728 2.594 8.135 8.135 0 00-.259.696zm-2.347-7.81a9.435 9.435 0 01-2.88 1.96 9.14 9.14 0 012.88 1.94 9.14 9.14 0 011.94 2.88 9.435 9.435 0 011.96-2.88 9.14 9.14 0 012.88-1.94 9.435 9.435 0 01-2.88-1.96 9.434 9.434 0 01-1.96-2.88 9.14 9.14 0 01-1.94 2.88z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.6591 -0.0000) scale(0.045455)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M12.914 22c-1.98 0-3.804-.48-5.472-1.441a10.717 10.717 0 01-3.971-3.97C2.49 14.901 2 13.038 2 11c0-2.04.49-3.902 1.47-5.588a10.717 10.717 0 013.972-3.97C9.11.48 10.934 0 12.914 0c1.55 0 3.006.275 4.37.824 1.362.549 2.485 1.323 3.368 2.323l-1.795 1.794c-.667-.823-1.52-1.456-2.56-1.897a8.494 8.494 0 00-3.353-.662c-1.49 0-2.878.358-4.163 1.074-1.285.716-2.314 1.725-3.089 3.03C4.917 7.788 4.53 9.293 4.53 11c0 1.706.387 3.21 1.162 4.515a8.144 8.144 0 003.104 3.03 8.44 8.44 0 004.148 1.073c1.412 0 2.594-.22 3.545-.662a7.943 7.943 0 002.456-1.75 6.43 6.43 0 001.236-1.985c.314-.775.51-1.633.588-2.574h-7.796v-2.323h10.12c.098.549.147 1.058.147 1.529 0 1.294-.205 2.554-.617 3.78a8.347 8.347 0 01-1.971 3.22C18.71 20.95 16.13 22 12.914 22zm18.727 0c-1.432 0-2.716-.343-3.854-1.03a7.143 7.143 0 01-2.662-2.838c-.638-1.206-.957-2.563-.957-4.073 0-1.451.3-2.784.898-4a7.26 7.26 0 012.545-2.912c1.098-.725 2.373-1.088 3.824-1.088 1.47 0 2.746.328 3.824.985a6.54 6.54 0 012.486 2.72c.579 1.158.868 2.481.868 3.971 0 .294-.03.55-.088.765H26.669c.059 1.137.334 2.098.824 2.882.49.785 1.113 1.373 1.868 1.765a5.072 5.072 0 002.368.588c1.922 0 3.403-.902 4.442-2.706l2.119 1.03c-.648 1.216-1.525 2.176-2.633 2.882C34.548 21.647 33.21 22 31.64 22zm4.324-9.559a4.868 4.868 0 00-.53-1.882c-.313-.628-.808-1.157-1.485-1.588-.676-.432-1.525-.647-2.544-.647-1.177 0-2.173.377-2.986 1.132-.814.755-1.349 1.75-1.604 2.985h9.15zm4.223-5.912h2.383v2.206h.118c.432-.764 1.079-1.402 1.942-1.911a5.296 5.296 0 012.736-.765c1.098 0 2.054.265 2.868.794a4.446 4.446 0 011.75 2.118 6.125 6.125 0 012.104-2.118c.873-.53 1.888-.794 3.045-.794 1.726 0 3.025.524 3.898 1.573.872 1.05 1.309 2.476 1.309 4.28v9.617H59.87v-9.235c0-1.392-.285-2.402-.853-3.03-.57-.627-1.413-.94-2.53-.94-.746 0-1.422.215-2.03.647-.608.431-1.084 1.01-1.427 1.735a5.432 5.432 0 00-.515 2.353v8.47h-2.5v-9.205c0-1.412-.285-2.432-.854-3.06-.569-.627-1.402-.94-2.5-.94-.746 0-1.422.22-2.03.661-.608.441-1.084 1.03-1.427 1.765a5.528 5.528 0 00-.515 2.368v8.411h-2.5v-15zm24.405 0h2.383v2.206h.117c.432-.764 1.08-1.402 1.942-1.911a5.296 5.296 0 012.736-.765c1.098 0 2.054.265 2.868.794a4.446 4.446 0 011.75 2.118 6.125 6.125 0 012.104-2.118c.873-.53 1.888-.794 3.045-.794 1.726 0 3.025.524 3.898 1.573.873 1.05 1.31 2.476 1.31 4.28v9.617h-2.472v-9.235c0-1.392-.284-2.402-.853-3.03-.569-.627-1.412-.94-2.53-.94-.745 0-1.422.215-2.03.647-.608.431-1.084 1.01-1.427 1.735a5.432 5.432 0 00-.515 2.353v8.47h-2.5v-9.205c0-1.412-.285-2.432-.853-3.06-.57-.627-1.403-.94-2.501-.94-.745 0-1.422.22-2.03.661-.608.441-1.084 1.03-1.427 1.765a5.528 5.528 0 00-.515 2.368v8.411h-2.5v-15zM93.645 22c-1.098 0-2.079-.216-2.942-.647-.863-.431-1.53-1.025-2-1.78-.47-.754-.706-1.612-.706-2.573 0-1.588.598-2.828 1.794-3.72 1.197-.893 2.707-1.339 4.53-1.339.903 0 1.742.098 2.516.294.775.196 1.368.422 1.78.677V12c0-1.118-.392-2.015-1.177-2.691-.784-.677-1.775-1.015-2.971-1.015a5.01 5.01 0 00-2.324.544 4.246 4.246 0 00-1.677 1.515L88.585 8.94c.589-.902 1.398-1.608 2.427-2.117 1.03-.51 2.172-.765 3.428-.765 2.04 0 3.643.534 4.81 1.603 1.167 1.068 1.75 2.524 1.75 4.367v9.5h-2.383v-2.147H98.5c-.431.726-1.078 1.343-1.941 1.853S94.724 22 93.645 22zm.236-2.206c.843 0 1.627-.216 2.353-.647a4.905 4.905 0 001.736-1.735c.431-.726.647-1.52.647-2.383-.47-.313-1.05-.568-1.736-.764a7.89 7.89 0 00-2.177-.294c-1.373 0-2.407.284-3.103.853-.697.568-1.045 1.303-1.045 2.205 0 .824.314 1.49.942 2 .627.51 1.422.765 2.383.765z\\\"></path></g></g></g></svg>\",\"grok\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 4.6799 1\\\" data-combine-word=\\\"Grok\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"#000\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.6500 -0.1000) scale(0.050000)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M47.419 21.645V2.457h3.033V15.12l6.415-7.369h3.678l-5.772 6.316 5.825 7.578h-3.624l-4.717-6.512-1.805-.012v6.524h-3.033zM38.22 21.968c-4.51 0-6.952-3.198-6.952-7.283 0-4.112 2.443-7.283 6.952-7.283 4.537 0 6.952 3.17 6.952 7.283 0 4.085-2.415 7.283-6.952 7.283zm-3.785-7.283c0 3.17 1.718 4.756 3.785 4.756 2.094 0 3.785-1.585 3.785-4.756 0-3.172-1.691-4.784-3.785-4.784-2.067 0-3.785 1.612-3.785 4.784zM22.826 21.645V9.955l2.55-2.204h5.422v2.58H25.86v11.314h-3.033zM11.228 22C5.447 22 2 17.802 2 12.078 2 6.3 5.57 2 11.341 2c4.51 0 7.811 2.311 8.59 6.611h-3.463c-.51-2.445-2.55-3.816-5.127-3.816-4.16 0-5.986 3.601-5.986 7.283 0 3.682 1.826 7.256 5.986 7.256 3.973 0 5.717-2.876 5.852-5.267h-5.986v-2.783h9.046l-.015 1.455c0 5.406-2.203 9.261-9.01 9.261z\\\"></path></g></g></g></svg>\",\"inception\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 7.7527 1\\\" data-combine-word=\\\"inception\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0604 -0.2250) scale(0.060417)\\\"><g fill=\\\"#000\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M14.767 1H7.884L1 7.883v6.884h6.884V7.883h6.883V1zM9.234 23h6.882L23 16.116V9.233h-6.884v6.883H9.234V23z\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0604 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M14.767 1H7.884L1 7.883v6.884h6.884V7.883h6.883V1zM9.234 23h6.882L23 16.116V9.233h-6.884v6.883H9.234V23z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.4960 -0.2780) scale(0.066560)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path clip-rule=\\\"evenodd\\\" d=\\\"M50.024 7.374c1.58 0 2.891.56 3.893 1.689.993 1.12 1.476 2.533 1.476 4.203 0 1.67-.483 3.085-1.476 4.205-1.002 1.128-2.314 1.689-3.893 1.689v-.002c-1.164 0-2.142-.327-2.911-.983V24h-2.808V7.66h2.808v.698c.77-.657 1.748-.984 2.911-.984zm-.802 1.859c-.874 0-1.565.286-2.11.854v6.355c.558.573 1.25.859 2.11.859.948 0 1.69-.357 2.269-1.083.629-.84.95-1.87.91-2.918V13.247a4.603 4.603 0 00-.884-2.899l-.02-.025-.11-.133c-.563-.642-1.273-.957-2.165-.957z\\\"></path><path d=\\\"M60.694 7.66h3.862v1.962h-3.862v6.643l-.003.023c-.029.29.054.579.23.81.291.177.629.262.97.244l.015-.001h.098c.672 0 1.226-.059 1.67-.17l.595-.148v1.642l-.363.09a13.015 13.015 0 01-3.157.405 3.399 3.399 0 01-1.838-.435l-.013-.007-.012-.009a2.044 2.044 0 01-.27-.21l-.015-.013-.014-.016a2.57 2.57 0 01-.67-1.634 5.94 5.94 0 01-.03-.618V9.622h-2.281V7.661h2.28V5.452l2.808-1.276V7.66zM25.668 7.373c.83.022 1.648.21 2.405.552l.008.003.006.004c.151.073.297.156.438.246.49.277.888.69 1.144 1.188l.103.224.007.015.005.018c.06.183.09.374.09.566 0 .378-.105.733-.356 1.016a1.255 1.255 0 01-.965.428c-.387 0-.74-.122-1.03-.376-.28-.246-.472-.589-.598-.983l-.004-.012-.002-.012c-.117-.44-.305-.76-.546-.986a1.654 1.654 0 00-1.057-.335H25.28a4.35 4.35 0 00-.178-.004c-.805 0-1.458.295-1.99.9a3.62 3.62 0 00-.803 2.207l-.001.011v.01c-.01.145-.015.289-.014.433v.354c.024.787.211 1.562.55 2.275.128.248.282.483.46.698l.125.143c.633.692 1.439 1.037 2.454 1.037h.015l.016.001a2.99 2.99 0 003.082-2.2l.004-.016.005-.015c.042-.122.08-.245.113-.37l.095-.353h1.514l-.122.577c-.294 1.387-.85 2.494-1.701 3.272-.855.782-1.964 1.191-3.286 1.26-.137.007-.276.01-.413.01-1.688 0-3.091-.547-4.159-1.666-1.06-1.111-1.58-2.52-1.58-4.186a5.848 5.848 0 011.256-3.839l.007-.008c.14-.169.289-.328.448-.479l.215-.195c1.091-.94 2.407-1.41 3.922-1.412l.355-.001z\\\"></path><path clip-rule=\\\"evenodd\\\" d=\\\"M36.976 7.374c1.326 0 2.483.361 3.447 1.098l.191.153.009.007a5.438 5.438 0 011.805 3.439l.016.098.084.55h-8.336c.037 1.326.39 2.342 1.017 3.093.658.788 1.507 1.181 2.59 1.181h.018l.019.001a3.074 3.074 0 003.18-2.185l.003-.012.005-.011c.035-.098.066-.197.094-.297l.1-.347h1.488l-.1.562a5.837 5.837 0 01-1.474 2.952l-.01.009c-.127.129-.262.25-.404.364l-.01.009-.001-.001a5.54 5.54 0 01-3.408 1.12h.001a8.36 8.36 0 01-.2.003c-1.688 0-3.09-.548-4.158-1.667-1.06-1.111-1.58-2.52-1.58-4.186 0-1.75.556-3.2 1.697-4.301 1.117-1.079 2.43-1.632 3.917-1.632zm-.04 1.551c-.673 0-1.245.224-1.739.682-.38.353-.662.832-.834 1.459h4.958a3.429 3.429 0 00-.505-1.263 1.985 1.985 0 00-.211-.244l-.167-.148c-.4-.32-.893-.485-1.502-.486zM76.261 7.374c1.663 0 3.086.544 4.235 1.64 1.16 1.104 1.73 2.536 1.73 4.252 0 1.704-.571 3.132-1.729 4.242-1.15 1.103-2.572 1.652-4.236 1.652-1.663 0-3.086-.55-4.235-1.652-1.157-1.11-1.73-2.538-1.73-4.242 0-1.716.571-3.148 1.73-4.253 1.15-1.095 2.573-1.639 4.236-1.64zm-.122 1.633c-.774 0-1.43.288-1.993.894a3.466 3.466 0 00-.823 2.069l-.002.02a6.894 6.894 0 00-.032.68v.002c0 1.246.278 2.332.82 3.271l.113.187.009.013.007.014a2.627 2.627 0 001.75 1.316c.131.021.263.033.396.033.776 0 1.434-.288 1.997-.89a3.423 3.423 0 00.82-2.052v-.01l.001-.012c.022-.226.033-.453.033-.68 0-1.329-.316-2.481-.934-3.47l-.009-.013-.007-.013a2.654 2.654 0 00-1.69-1.315 2.301 2.301 0 00-.456-.044z\\\"></path><path d=\\\"M5.136 18.914H2.328V7.66h2.808v11.253zM13.76 7.374c1.254 0 2.275.374 2.97 1.195.681.805.98 1.962.98 3.385v6.96h-2.807v-6.627a4.578 4.578 0 00-.287-1.754l-.055-.125a1.697 1.697 0 00-1.666-.951h-.04c-.65 0-1.17.221-1.595.663a2.645 2.645 0 00-.631 1.614l-.001.013-.001.012a5.998 5.998 0 00-.025.563v6.592H7.794V7.66h2.808v1.084c.08-.097.164-.191.252-.282l.014-.014c.067-.063.136-.123.207-.18.752-.602 1.656-.895 2.684-.895zM68.4 18.914h-2.808V7.66h2.807v11.253zM90.049 7.374c1.254 0 2.275.374 2.97 1.195.682.805.981 1.962.981 3.385v6.96h-2.808v-6.627a4.577 4.577 0 00-.287-1.754 1.697 1.697 0 00-1.722-1.076h-.039c-.649 0-1.17.221-1.595.663a2.644 2.644 0 00-.63 1.614l-.002.013v.012a5.998 5.998 0 00-.026.563v6.592h-2.808V7.66h2.808v1.084c.08-.097.164-.191.253-.282l.006-.007.008-.007c.067-.063.135-.123.207-.18.751-.602 1.656-.895 2.684-.895zM3.732 2c.476 0 .894.182 1.233.52.334.333.52.742.52 1.209 0 .475-.18.893-.52 1.231a1.707 1.707 0 01-1.057.511l-.176.009a1.68 1.68 0 01-1.212-.52A1.699 1.699 0 012 3.73c0-.467.186-.876.52-1.21A1.68 1.68 0 013.732 2zM66.995 2c.476 0 .894.181 1.233.52.334.333.52.742.52 1.209a1.7 1.7 0 01-.52 1.231c-.338.338-.757.52-1.233.52a1.68 1.68 0 01-1.212-.52 1.699 1.699 0 01-.52-1.231c0-.467.186-.876.52-1.21l.129-.117c.308-.26.674-.402 1.083-.402z\\\"></path></g></g></g></svg>\",\"kimi\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 4.5548 1\\\" data-combine-word=\\\"Kimi\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.1812 -0.2250) scale(0.060417)\\\"><g><path d=\\\"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z\\\" fill=\\\"#1783FF\\\"></path><path d=\\\"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z\\\" fill=\\\"currentColor\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.1812 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z\\\"></path><path d=\\\"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.4548 -0.1000) scale(0.050000)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M24.353 21.58c0 .232.188.42.42.42h2.69a.42.42 0 00.42-.42V2.42a.42.42 0 00-.42-.42h-2.69a.42.42 0 00-.42.42v19.16zM58.47 21.58c0 .232.188.42.42.42h2.691a.42.42 0 00.419-.42V2.42a.42.42 0 00-.419-.42H58.89a.42.42 0 00-.42.42v19.16zM47.786 2a.42.42 0 00-.408.32L43.4 18.633c-.066.267-.38.267-.444 0L38.976 2.32A.417.417 0 0038.57 2H31.83a.418.418 0 00-.418.42v19.16c0 .232.188.42.42.42h2.988c.231 0 .419-.182.419-.414V5.471c0-.322.378-.389.454-.079l3.974 16.288a.42.42 0 00.407.32h6.208a.42.42 0 00.407-.32L50.66 5.394c.076-.31.455-.243.455.079V21.58c0 .231.187.419.419.419h2.987a.42.42 0 00.42-.42V2.42a.42.42 0 00-.42-.42h-6.735zM11.55 11.273l8.115-8.565A.42.42 0 0019.36 2h-3.776a.42.42 0 00-.298.124l-9.303 9.39c-.144.146-.357.016-.357-.218V2.42a.42.42 0 00-.42-.42H2.42a.42.42 0 00-.42.42v19.16c0 .232.188.42.42.42h2.786a.42.42 0 00.42-.42v-3.82c0-.085.03-.166.081-.219l2.87-2.931c.07-.07.166-.081.243-.029l7.678 5.816c1.123.778 2.552 1.288 3.861 1.5a.403.403 0 00.464-.404v-3.461c0-.206-.15-.38-.35-.423-.76-.164-1.604-.474-2.244-.918l-6.647-4.953c-.138-.095-.155-.34-.033-.465z\\\"></path></g></g></g></svg>\",\"longcat\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 7.7616 1\\\" data-combine-word=\\\"longcat\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"#000\\\" fill-rule=\\\"evenodd\\\"><path clip-rule=\\\"evenodd\\\" d=\\\"M.507 19.883a.507.507 0 01-.489-.642L4.29 3.745a1.013 1.013 0 011.533-.578l5.622 3.687a1.013 1.013 0 001.11 0L18.2 3.165a1.013 1.013 0 011.532.58l4.25 15.497a.506.506 0 01-.49.64H18.07a6.297 6.297 0 001.53-4.115v-.177a6.09 6.09 0 00-1.513-4.017l-.697-3.495a.438.438 0 00-.694-.266L14.07 9.781a.748.748 0 01-.654.121 5.156 5.156 0 00-2.833 0 .746.746 0 01-.653-.121L7.302 7.81a.435.435 0 00-.688.269l-.675 3.652a5.36 5.36 0 00-1.539 3.76v.333c0 1.474.527 2.9 1.488 4.02l.032.038H.507z\\\"></path><path d=\\\"M9.213 16.843h1.52v-3.546h-1.29l-.23 3.546zm5.573 0h-1.52v-3.546h1.29l.23 3.546z\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path clip-rule=\\\"evenodd\\\" d=\\\"M.507 19.883a.507.507 0 01-.489-.642L4.29 3.745a1.013 1.013 0 011.533-.578l5.622 3.687a1.013 1.013 0 001.11 0L18.2 3.165a1.013 1.013 0 011.532.58l4.25 15.497a.506.506 0 01-.49.64H18.07a6.297 6.297 0 001.53-4.115v-.177a6.09 6.09 0 00-1.513-4.017l-.697-3.495a.438.438 0 00-.694-.266L14.07 9.781a.748.748 0 01-.654.121 5.156 5.156 0 00-2.833 0 .746.746 0 01-.653-.121L7.302 7.81a.435.435 0 00-.688.269l-.675 3.652a5.36 5.36 0 00-1.539 3.76v.333c0 1.474.527 2.9 1.488 4.02l.032.038H.507z\\\"></path><path d=\\\"M9.213 16.843h1.52v-3.546h-1.29l-.23 3.546zm5.573 0h-1.52v-3.546h1.29l.23 3.546z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.6344 -0.1156) scale(0.057803)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path clip-rule=\\\"evenodd\\\" d=\\\"M2 19.138h12.31V15.96H5.887V2.289H2v16.849zm20.277.192c4.103 0 7.079-2.768 7.079-6.667 0-3.9-2.976-6.667-7.08-6.667-4.102 0-7.102 2.768-7.102 6.667 0 3.9 3 6.667 7.103 6.667zm0-3.08c-1.872 0-3.312-1.348-3.312-3.587s1.44-3.586 3.312-3.586c1.872 0 3.287 1.348 3.287 3.586 0 2.239-1.415 3.587-3.287 3.587zM39.698 5.996c-1.752 0-3.263.601-4.271 1.709V6.188H31.85v12.95h3.744v-6.403c0-2.383 1.296-3.49 3.095-3.49 1.656 0 2.616.963 2.616 3.057v6.836h3.743v-7.414c0-3.947-2.303-5.728-5.35-5.728zm18.645.192V7.85c-.984-1.252-2.471-1.853-4.271-1.853-3.576 0-6.455 2.479-6.455 6.258s2.88 6.258 6.455 6.258c1.68 0 3.095-.53 4.08-1.613v.554c0 2.335-1.153 3.538-3.792 3.538-1.656 0-3.456-.577-4.56-1.468l-1.487 2.696C49.825 23.399 52.2 24 54.648 24c4.655 0 7.247-2.214 7.247-7.028V6.188h-3.552zm-3.527 9.243c-1.968 0-3.408-1.276-3.408-3.177 0-1.902 1.44-3.177 3.408-3.177s3.383 1.275 3.383 3.177c0 1.901-1.415 3.177-3.383 3.177zm18.861 3.996c2.927 0 5.351-1.06 6.935-3.01l-2.496-2.31c-1.127 1.324-2.543 1.998-4.223 1.998-3.144 0-5.375-2.214-5.375-5.392 0-3.177 2.231-5.391 5.375-5.391 1.68 0 3.096.674 4.223 1.973l2.496-2.31C79.028 3.059 76.605 2 73.7 2c-5.231 0-9.119 3.635-9.119 8.713 0 5.08 3.888 8.714 9.095 8.714zM88.075 5.996c-2.064 0-4.152.553-5.567 1.564l1.343 2.624c.936-.746 2.352-1.204 3.72-1.204 2.016 0 2.975.939 2.975 2.552h-2.975c-3.936 0-5.543 1.588-5.543 3.875 0 2.238 1.8 3.923 4.823 3.923 1.896 0 3.24-.625 3.935-1.805v1.613h3.504v-7.39c0-3.923-2.28-5.752-6.215-5.752zm-.288 10.807c-1.32 0-2.112-.626-2.112-1.565 0-.866.552-1.516 2.304-1.516h2.567v1.324c-.432 1.18-1.511 1.757-2.76 1.757zm17.205-.939c-.408.313-.96.482-1.512.482-1.007 0-1.607-.602-1.607-1.71v-5.27h3.215V6.476h-3.215V3.324h-3.744v3.153h-1.992v2.888h1.992v5.32c0 3.08 1.776 4.645 4.823 4.645 1.152 0 2.28-.264 3.048-.818l-1.008-2.648z\\\"></path></g></g></g></svg>\",\"meta\":\"<svg fill=\\\"none\\\" viewBox=\\\"2.0000 2.6410 99.0000 19.3590\\\" data-combine-word=\\\"Meta\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><defs><linearGradient id=\\\"lobe-icons-meta-brand-0-_R_0_\\\" x1=\\\"75.904%\\\" x2=\\\"33.275%\\\" y1=\\\"89.153%\\\" y2=\\\"23.044%\\\"><stop offset=\\\".06%\\\" stop-color=\\\"#0867DF\\\"></stop><stop offset=\\\"45.39%\\\" stop-color=\\\"#0668E1\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#0064E0\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-1-_R_0_\\\" x1=\\\"21.67%\\\" x2=\\\"97.068%\\\" y1=\\\"75.837%\\\" y2=\\\"24.022%\\\"><stop offset=\\\"13.23%\\\" stop-color=\\\"#0064DF\\\"></stop><stop offset=\\\"99.88%\\\" stop-color=\\\"#0064E0\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-2-_R_0_\\\" x1=\\\"38.247%\\\" x2=\\\"60.91%\\\" y1=\\\"89.127%\\\" y2=\\\"16.131%\\\"><stop offset=\\\"1.47%\\\" stop-color=\\\"#0072EC\\\"></stop><stop offset=\\\"68.81%\\\" stop-color=\\\"#0064DF\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-3-_R_0_\\\" x1=\\\"47.027%\\\" x2=\\\"52.153%\\\" y1=\\\"90.19%\\\" y2=\\\"15.745%\\\"><stop offset=\\\"7.31%\\\" stop-color=\\\"#007CF6\\\"></stop><stop offset=\\\"99.43%\\\" stop-color=\\\"#0072EC\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-4-_R_0_\\\" x1=\\\"52.155%\\\" x2=\\\"47.591%\\\" y1=\\\"58.289%\\\" y2=\\\"37.023%\\\"><stop offset=\\\"7.31%\\\" stop-color=\\\"#007FF9\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#007CF6\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-5-_R_0_\\\" x1=\\\"37.689%\\\" x2=\\\"61.961%\\\" y1=\\\"12.556%\\\" y2=\\\"63.605%\\\"><stop offset=\\\"7.31%\\\" stop-color=\\\"#007FF9\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#0082FB\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-6-_R_0_\\\" x1=\\\"42.496%\\\" x2=\\\"59.964%\\\" y1=\\\"56.072%\\\" y2=\\\"27.099%\\\"><stop offset=\\\"0%\\\" stop-color=\\\"#007FF8\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#0082FB\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-7-_R_0_\\\" x1=\\\"43.753%\\\" x2=\\\"57.613%\\\" y1=\\\"6.235%\\\" y2=\\\"98.514%\\\"><stop offset=\\\"0%\\\" stop-color=\\\"#0082FB\\\"></stop><stop offset=\\\"99.95%\\\" stop-color=\\\"#0081FA\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-8-_R_0_\\\" x1=\\\"60.07%\\\" x2=\\\"39.865%\\\" y1=\\\"4.661%\\\" y2=\\\"69.077%\\\"><stop offset=\\\"6.19%\\\" stop-color=\\\"#0081FA\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#0080F9\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-9-_R_0_\\\" x1=\\\"30.254%\\\" x2=\\\"61.097%\\\" y1=\\\"59.32%\\\" y2=\\\"33.244%\\\"><stop offset=\\\"0%\\\" stop-color=\\\"#027AF3\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#0080F9\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-10-_R_0_\\\" x1=\\\"20.433%\\\" x2=\\\"82.112%\\\" y1=\\\"50.001%\\\" y2=\\\"50.001%\\\"><stop offset=\\\"0%\\\" stop-color=\\\"#0377EF\\\"></stop><stop offset=\\\"99.94%\\\" stop-color=\\\"#0279F1\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-11-_R_0_\\\" x1=\\\"40.289%\\\" x2=\\\"72.427%\\\" y1=\\\"35.298%\\\" y2=\\\"57.811%\\\"><stop offset=\\\".19%\\\" stop-color=\\\"#0471E9\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#0377EF\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-12-_R_0_\\\" x1=\\\"32.228%\\\" x2=\\\"68.028%\\\" y1=\\\"19.719%\\\" y2=\\\"84.908%\\\"><stop offset=\\\"27.65%\\\" stop-color=\\\"#0867DF\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#0471E9\\\"></stop></linearGradient></defs><g class=\\\"dsh-combine-mark-color\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M38.337 2.641h3.752l6.38 11.57 6.38-11.57h3.671v19.011H55.46V7.082l-5.594 10.09h-2.872l-5.595-10.09v14.57h-3.06V2.642zm30.058 19.353c-1.418 0-2.664-.314-3.739-.944a6.594 6.594 0 01-2.513-2.614c-.6-1.113-.9-2.39-.9-3.829 0-1.457.293-2.748.88-3.87.587-1.123 1.402-2 2.445-2.635 1.043-.633 2.242-.95 3.596-.95 1.346 0 2.504.319 3.475.957.97.638 1.718 1.532 2.242 2.682.523 1.15.785 2.499.785 4.047v.842h-10.39c.19 1.159.658 2.07 1.403 2.736.745.665 1.686.998 2.824.998.912 0 1.698-.136 2.357-.407a5.997 5.997 0 001.856-1.236l1.625 1.996c-1.616 1.485-3.599 2.227-5.946 2.227zm2.235-11.278c-.642-.656-1.481-.984-2.52-.984-1.011 0-1.858.335-2.54 1.005-.681.67-1.113 1.57-1.293 2.702h7.45c-.09-1.159-.456-2.066-1.097-2.723zm7.748-.712h-2.817V7.492h2.817V3.337h2.953v4.155h4.28v2.512h-4.28v6.369c0 1.059.18 1.815.542 2.267.36.453.98.68 1.855.68.389 0 .718-.016.99-.048l.426-.056c.15-.022.305-.046.467-.073v2.485a8.876 8.876 0 01-2.452.34c-3.187 0-4.781-1.748-4.781-5.242v-6.722zM101 21.654h-2.899v-1.982a5.24 5.24 0 01-1.964 1.718c-.795.403-1.698.604-2.71.604-1.245 0-2.35-.319-3.311-.957-.962-.638-1.718-1.517-2.269-2.635-.55-1.118-.826-2.396-.826-3.836 0-1.448.28-2.73.84-3.843.56-1.113 1.334-1.987 2.323-2.62.989-.634 2.124-.951 3.406-.951.967 0 1.834.188 2.601.563a5.145 5.145 0 011.91 1.596V7.49H101v14.164zm-2.953-9.206c-.316-.806-.815-1.442-1.497-1.908-.682-.466-1.47-.7-2.363-.7-1.265 0-2.272.426-3.021 1.277-.75.851-1.125 2-1.124 3.45 0 1.457.36 2.611 1.083 3.462.722.851 1.702 1.276 2.94 1.276.911 0 1.724-.235 2.438-.706a3.987 3.987 0 001.544-1.9v-4.251z\\\"></path><path d=\\\"M8.627 0h-.029l-.04 3.27.028-.001c2.146 0 3.81 1.696 7.43 7.807l.22.372.014.024 2.026-3.047-.014-.023a60.949 60.949 0 00-1.374-2.146 35.014 35.014 0 00-1.47-2.036C13.026 1.165 11.024 0 8.628 0z\\\" fill=\\\"url(#lobe-icons-meta-brand-0-_R_0_)\\\" transform=\\\"translate(2 2)\\\"></path><path d=\\\"M8.598 0C6.19.013 4.062 1.573 2.525 3.961a5.44 5.44 0 00-.013.021l2.82 1.54.015-.022c.897-1.354 2.014-2.218 3.211-2.23l.027-.001L8.627 0h-.03z\\\" fill=\\\"url(#lobe-icons-meta-brand-1-_R_0_)\\\" transform=\\\"translate(2 2)\\\"></path><path d=\\\"M2.525 3.963l-.013.02C1.502 5.56.749 7.494.342 9.58l-.005.027 3.17.75c0-.01.002-.018.004-.028.339-1.833.984-3.533 1.822-4.806l.013-.02-2.82-1.54z\\\" fill=\\\"url(#lobe-icons-meta-brand-2-_R_0_)\\\" transform=\\\"translate(2 2)\\\"></path><path d=\\\"M3.511 10.33L.342 9.582l-.005.027A18.541 18.541 0 000 13.09v.028l3.25.292v-.029a15.728 15.728 0 01.262-3.05z\\\" fill=\\\"url(#lobe-icons-meta-brand-3-_R_0_)\\\" transform=\\\"translate(2 2)\\\"></path><path d=\\\"M3.349 14.422a6.822 6.822 0 01-.099-1.017v-.028L0 13.085v.031a11.105 11.105 0 00.183 2.064l3.17-.731a5.131 5.131 0 01-.004-.027z\\\" fill=\\\"url(#lobe-icons-meta-brand-4-_R_0_)\\\" transform=\\\"translate(2 2)\\\"></path><path d=\\\"M4.09 16.112c-.354-.387-.605-.945-.736-1.659l-.005-.027-3.171.731.005.027c.24 1.262.71 2.313 1.383 3.108l.018.022 2.524-2.181a2.635 2.635 0 01-.019-.02z\\\" fill=\\\"url(#lobe-icons-meta-brand-5-_R_0_)\\\" transform=\\\"translate(2 2)\\\"></path><path d=\\\"M15.484 9.067a399.491 399.491 0 00-3.069 4.781c-2.545 4-3.426 4.897-4.843 4.897-.591 0-1.085-.211-1.464-.615a2.313 2.313 0 01-.019-.02l-2.523 2.18.018.021C4.514 21.397 5.825 22 7.448 22c2.456 0 4.222-1.16 7.361-6.662l2.21-3.913a51.6 51.6 0 00-1.535-2.358z\\\" fill=\\\"#0082FB\\\"></path><path d=\\\"M16.89 2.432a19.722 19.722 0 00-1.471 1.79c.472.604.96 1.281 1.47 2.038.6-.93 1.16-1.682 1.71-2.258l.019-.02-1.728-1.55z\\\" fill=\\\"url(#lobe-icons-meta-brand-6-_R_0_)\\\" transform=\\\"translate(2 2)\\\"></path><path d=\\\"M28.166 4.142C26.834 2.792 25.245 2 23.546 2c-1.79 0-3.297.984-4.656 2.43a6.451 6.451 0 00-.02.02L20.6 6l.019-.021c.895-.934 1.762-1.4 2.722-1.4 1.034 0 2.001.488 2.84 1.343l.019.02 1.987-1.78-.02-.02z\\\" fill=\\\"#0082FB\\\"></path><path d=\\\"M30.019 12.656c-.075-4.333-1.588-8.207-3.833-10.495l-.02-.02-1.987 1.78.02.02c1.689 1.74 2.848 4.975 2.953 8.714v.028l2.867.001v-.028z\\\" fill=\\\"url(#lobe-icons-meta-brand-7-_R_0_)\\\" transform=\\\"translate(2 2)\\\"></path><path d=\\\"M30.02 12.687l-.001-.028h-2.867v.027c.005.176.008.352.008.53 0 1.02-.152 1.843-.461 2.438l-.014.027 2.137 2.228.016-.024c.776-1.2 1.183-2.868 1.183-4.89 0-.103 0-.205-.002-.308z\\\" fill=\\\"url(#lobe-icons-meta-brand-8-_R_0_)\\\" transform=\\\"translate(2 2)\\\"></path><path d=\\\"M26.7 15.65l-.015.026c-.267.502-.649.836-1.147.982l.974 3.079a4.372 4.372 0 00.547-.229 4.45 4.45 0 001.709-1.522 4.18 4.18 0 00.055-.081l.015-.025-2.139-2.23z\\\" fill=\\\"url(#lobe-icons-meta-brand-9-_R_0_)\\\" transform=\\\"translate(2 2)\\\"></path><path d=\\\"M24.917 16.742c-.327 0-.615-.049-.897-.175l-.998 3.151c.56.192 1.16.279 1.826.279.615 0 1.179-.092 1.69-.27l-.974-3.077c-.21.063-.428.094-.647.092z\\\" fill=\\\"url(#lobe-icons-meta-brand-10-_R_0_)\\\" transform=\\\"translate(2 2)\\\"></path><path d=\\\"M22.92 15.667l-.018-.021-2.296 2.393.02.02c.797.853 1.56 1.382 2.423 1.672l.997-3.15c-.364-.156-.716-.44-1.125-.914z\\\" fill=\\\"url(#lobe-icons-meta-brand-11-_R_0_)\\\" transform=\\\"translate(2 2)\\\"></path><path d=\\\"M22.902 15.643c-.688-.802-1.54-2.139-2.88-4.3l-1.746-2.92-.014-.023-2.026 3.046.014.024 1.237 2.087c1.2 2.012 2.177 3.467 3.12 4.48l.019.02 2.295-2.392a2.945 2.945 0 01-.019-.022z\\\" fill=\\\"url(#lobe-icons-meta-brand-12-_R_0_)\\\" transform=\\\"translate(2 2)\\\"></path><defs><linearGradient id=\\\"lobe-icons-meta-brand-0-_R_0_\\\" x1=\\\"75.904%\\\" x2=\\\"33.275%\\\" y1=\\\"89.153%\\\" y2=\\\"23.044%\\\"><stop offset=\\\".06%\\\" stop-color=\\\"#0867DF\\\"></stop><stop offset=\\\"45.39%\\\" stop-color=\\\"#0668E1\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#0064E0\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-1-_R_0_\\\" x1=\\\"21.67%\\\" x2=\\\"97.068%\\\" y1=\\\"75.837%\\\" y2=\\\"24.022%\\\"><stop offset=\\\"13.23%\\\" stop-color=\\\"#0064DF\\\"></stop><stop offset=\\\"99.88%\\\" stop-color=\\\"#0064E0\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-2-_R_0_\\\" x1=\\\"38.247%\\\" x2=\\\"60.91%\\\" y1=\\\"89.127%\\\" y2=\\\"16.131%\\\"><stop offset=\\\"1.47%\\\" stop-color=\\\"#0072EC\\\"></stop><stop offset=\\\"68.81%\\\" stop-color=\\\"#0064DF\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-3-_R_0_\\\" x1=\\\"47.027%\\\" x2=\\\"52.153%\\\" y1=\\\"90.19%\\\" y2=\\\"15.745%\\\"><stop offset=\\\"7.31%\\\" stop-color=\\\"#007CF6\\\"></stop><stop offset=\\\"99.43%\\\" stop-color=\\\"#0072EC\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-4-_R_0_\\\" x1=\\\"52.155%\\\" x2=\\\"47.591%\\\" y1=\\\"58.289%\\\" y2=\\\"37.023%\\\"><stop offset=\\\"7.31%\\\" stop-color=\\\"#007FF9\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#007CF6\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-5-_R_0_\\\" x1=\\\"37.689%\\\" x2=\\\"61.961%\\\" y1=\\\"12.556%\\\" y2=\\\"63.605%\\\"><stop offset=\\\"7.31%\\\" stop-color=\\\"#007FF9\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#0082FB\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-6-_R_0_\\\" x1=\\\"42.496%\\\" x2=\\\"59.964%\\\" y1=\\\"56.072%\\\" y2=\\\"27.099%\\\"><stop offset=\\\"0%\\\" stop-color=\\\"#007FF8\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#0082FB\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-7-_R_0_\\\" x1=\\\"43.753%\\\" x2=\\\"57.613%\\\" y1=\\\"6.235%\\\" y2=\\\"98.514%\\\"><stop offset=\\\"0%\\\" stop-color=\\\"#0082FB\\\"></stop><stop offset=\\\"99.95%\\\" stop-color=\\\"#0081FA\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-8-_R_0_\\\" x1=\\\"60.07%\\\" x2=\\\"39.865%\\\" y1=\\\"4.661%\\\" y2=\\\"69.077%\\\"><stop offset=\\\"6.19%\\\" stop-color=\\\"#0081FA\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#0080F9\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-9-_R_0_\\\" x1=\\\"30.254%\\\" x2=\\\"61.097%\\\" y1=\\\"59.32%\\\" y2=\\\"33.244%\\\"><stop offset=\\\"0%\\\" stop-color=\\\"#027AF3\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#0080F9\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-10-_R_0_\\\" x1=\\\"20.433%\\\" x2=\\\"82.112%\\\" y1=\\\"50.001%\\\" y2=\\\"50.001%\\\"><stop offset=\\\"0%\\\" stop-color=\\\"#0377EF\\\"></stop><stop offset=\\\"99.94%\\\" stop-color=\\\"#0279F1\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-11-_R_0_\\\" x1=\\\"40.289%\\\" x2=\\\"72.427%\\\" y1=\\\"35.298%\\\" y2=\\\"57.811%\\\"><stop offset=\\\".19%\\\" stop-color=\\\"#0471E9\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#0377EF\\\"></stop></linearGradient><linearGradient id=\\\"lobe-icons-meta-brand-12-_R_0_\\\" x1=\\\"32.228%\\\" x2=\\\"68.028%\\\" y1=\\\"19.719%\\\" y2=\\\"84.908%\\\"><stop offset=\\\"27.65%\\\" stop-color=\\\"#0867DF\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#0471E9\\\"></stop></linearGradient></defs></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M38.337 2.641h3.752l6.38 11.57 6.38-11.57h3.671v19.011H55.46V7.082l-5.594 10.09h-2.872l-5.595-10.09v14.57h-3.06V2.642zm30.058 19.353c-1.418 0-2.664-.314-3.739-.944a6.594 6.594 0 01-2.513-2.614c-.6-1.113-.9-2.39-.9-3.829 0-1.457.293-2.748.88-3.87.587-1.123 1.402-2 2.445-2.635 1.043-.633 2.242-.95 3.596-.95 1.346 0 2.504.319 3.475.957.97.638 1.718 1.532 2.242 2.682.523 1.15.785 2.499.785 4.047v.842h-10.39c.19 1.159.658 2.07 1.403 2.736.745.665 1.686.998 2.824.998.912 0 1.698-.136 2.357-.407a5.997 5.997 0 001.856-1.236l1.625 1.996c-1.616 1.485-3.599 2.227-5.946 2.227zm2.235-11.278c-.642-.656-1.481-.984-2.52-.984-1.011 0-1.858.335-2.54 1.005-.681.67-1.113 1.57-1.293 2.702h7.45c-.09-1.159-.456-2.066-1.097-2.723zm7.748-.712h-2.817V7.492h2.817V3.337h2.953v4.155h4.28v2.512h-4.28v6.369c0 1.059.18 1.815.542 2.267.36.453.98.68 1.855.68.389 0 .718-.016.99-.048l.426-.056c.15-.022.305-.046.467-.073v2.485a8.88 8.88 0 01-2.452.34c-3.187 0-4.781-1.748-4.781-5.242v-6.722zM101 21.654h-2.899v-1.982a5.24 5.24 0 01-1.964 1.718c-.795.403-1.698.604-2.71.604-1.245 0-2.35-.319-3.311-.957-.962-.638-1.718-1.517-2.269-2.635-.55-1.118-.826-2.396-.826-3.836 0-1.448.28-2.73.84-3.843.56-1.113 1.334-1.987 2.323-2.62.989-.634 2.124-.951 3.406-.951.967 0 1.834.188 2.601.563a5.145 5.145 0 011.91 1.596V7.49H101v14.164zm-2.953-9.206c-.316-.806-.815-1.442-1.497-1.908-.682-.466-1.47-.7-2.363-.7-1.265 0-2.272.426-3.021 1.277-.75.851-1.125 2-1.124 3.45 0 1.457.36 2.611 1.083 3.462.722.851 1.702 1.276 2.94 1.276.911 0 1.724-.235 2.438-.706a3.987 3.987 0 001.544-1.9v-4.251zM10.627 2c2.396 0 4.398 1.165 6.792 4.22.375-.507.758-.99 1.153-1.438l.318-.352C20.249 2.984 21.755 2 23.546 2c1.604 0 3.11.706 4.395 1.92l.245.24c2.173 2.215 3.66 5.914 3.821 10.078l.012.446.002.311c0 1.896-.358 3.48-1.042 4.66l-.157.254-.134.19a4.45 4.45 0 01-1.629 1.41l-.17.08a4.372 4.372 0 01-.377.148c-.505.17-1.06.26-1.664.26-.656 0-1.246-.084-1.8-.27-.784-.26-1.485-.72-2.206-1.443l-.236-.245c-.942-1.015-1.92-2.47-3.119-4.482l-1.472-2.481c-.171-.29-.338-.57-.5-.839l-.497-.812-2.209 3.913-.377.652-.373.623C11.374 21.023 9.701 22 7.449 22c-1.528 0-2.78-.534-3.696-1.501l-.187-.207c-.617-.729-1.063-1.673-1.318-2.797l-.07-.338a10.856 10.856 0 01-.17-1.61L2 15.084c.002-.97.08-1.941.235-2.902l.107-.603C2.72 9.643 3.396 7.837 4.3 6.327l.226-.366c1.482-2.303 3.514-3.836 5.816-3.954L10.627 2zm.114 3.272l-.183-.003c-1.13.012-2.19.784-3.06 2.01l-.153.222-.012.022c-.774 1.175-1.383 2.714-1.738 4.386l-.089.448c-.17.93-.257 1.873-.259 2.818l.003.235c.005.224.022.45.05.675l.054.364c.117.639.328 1.15.621 1.528l.113.133.02.02c.379.404.873.615 1.464.615 1.348 0 2.21-.811 4.482-4.333l2.286-3.578 1.144-1.767-.25-.354c-1.744-2.429-2.965-3.32-4.34-3.432l-.153-.009zm12.599-.693l-.204.007c-.88.062-1.687.526-2.518 1.393l-.02.023c-.549.576-1.11 1.329-1.71 2.258.352.52.715 1.082 1.09 1.683l.298.48 1.746 2.92.748 1.2.527.83c.607.946 1.085 1.641 1.5 2.146l.124.146c.358.416.672.686.989.852l.108.051c.284.125.572.174.899.174.22.002.437-.03.647-.092.43-.132.774-.409 1.03-.815l.106-.185.087-.181c.25-.576.373-1.336.373-2.253l-.002-.266-.006-.292c-.102-3.612-1.185-6.752-2.78-8.53l-.193-.206c-.838-.855-1.805-1.343-2.84-1.343z\\\"></path></g></g></svg>\",\"microsoft\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 6.6971 1\\\" data-combine-word=\\\"Azure\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.1208 -0.2250) scale(0.060417)\\\"><g><path d=\\\"M11.49 2H2v9.492h9.492V2h-.002z\\\" fill=\\\"#F25022\\\"></path><path d=\\\"M22 2h-9.492v9.492H22V2z\\\" fill=\\\"#7FBA00\\\"></path><path d=\\\"M11.49 12.508H2V22h9.492v-9.492h-.002z\\\" fill=\\\"#00A4EF\\\"></path><path d=\\\"M22 12.508h-9.492V22H22v-9.492z\\\" fill=\\\"#FFB900\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.1208 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M11.49 2H2v9.492h9.492V2h-.002z\\\"></path><path d=\\\"M22 2h-9.492v9.492H22V2z\\\"></path><path d=\\\"M11.49 12.508H2V22h9.492v-9.492h-.002z\\\"></path><path d=\\\"M22 12.508h-9.492V22H22v-9.492z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.4083 -0.1000) scale(0.050000)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path clip-rule=\\\"evenodd\\\" d=\\\"M21.881 3.355V21.68h-3.19V7.316h-.051l-5.7 14.364h-2.114L4.984 7.316h-.038V21.68H2V3.355h4.573L11.85 16.94h.076L17.5 3.355h4.381zm2.667 1.393c0-.511.186-.939.558-1.284.356-.34.832-.526 1.325-.518.546 0 1 .177 1.358.53.359.354.538.778.538 1.272 0 .502-.184.925-.55 1.264-.368.342-.816.512-1.346.512-.529 0-.976-.172-1.338-.517a1.667 1.667 0 01-.545-1.259zm.32 16.932h3.1V8.543h-3.1V21.68zm12.503-2.25c.461 0 .97-.104 1.524-.318a6.417 6.417 0 001.538-.844v2.876a6.289 6.289 0 01-1.685.639A9.217 9.217 0 0136.68 22c-1.94 0-3.515-.611-4.728-1.834-1.212-1.221-1.819-2.783-1.819-4.683 0-2.113.62-3.853 1.858-5.22 1.238-1.368 2.993-2.051 5.265-2.051.58 0 1.168.074 1.761.223.594.148 1.065.32 1.416.518v2.964a6.39 6.39 0 00-1.468-.812 4.234 4.234 0 00-1.53-.287c-1.22 0-2.207.396-2.96 1.189-.75.792-1.126 1.862-1.126 3.207 0 1.329.36 2.365 1.082 3.105.722.742 1.701 1.111 2.94 1.111zM49.258 8.327c.248 0 .471.017.667.051.195.034.363.076.5.128v3.131c-.163-.12-.4-.232-.711-.338-.313-.108-.69-.16-1.134-.16-.76 0-1.403.32-1.928.958-.525.64-.787 1.624-.787 2.952v6.632h-3.1V8.544h3.1v2.07h.05c.282-.716.709-1.276 1.281-1.681.572-.404 1.26-.606 2.062-.606zm1.335 6.977c0-2.172.614-3.893 1.843-5.162 1.231-1.27 2.939-1.904 5.124-1.904 2.06 0 3.666.611 4.824 1.834 1.157 1.223 1.735 2.873 1.735 4.952 0 2.13-.614 3.825-1.844 5.085C61.045 21.371 59.371 22 57.253 22c-2.041 0-3.661-.598-4.86-1.795-1.201-1.197-1.8-2.829-1.8-4.901zm3.228-.101c0 1.37.31 2.42.935 3.143.622.724 1.515 1.086 2.677 1.086 1.128 0 1.985-.362 2.574-1.086.59-.723.884-1.797.884-3.22 0-1.415-.305-2.482-.915-3.2-.611-.721-1.468-1.082-2.568-1.082-1.137 0-2.019.377-2.646 1.132-.628.754-.941 1.829-.941 3.227zm14.91-3.208c0 .443.141.79.422 1.042.283.25.905.568 1.871.951 1.238.495 2.108 1.051 2.607 1.67.5.615.749 1.364.749 2.24 0 1.237-.476 2.23-1.428 2.979-.951.75-2.24 1.124-3.862 1.124a9.277 9.277 0 01-1.813-.198c-.662-.132-1.223-.3-1.685-.506v-3.04c.564.391 1.17.703 1.82.933.649.23 1.238.344 1.768.344.699 0 1.216-.097 1.55-.294.331-.195.499-.523.499-.982 0-.427-.172-.787-.519-1.081-.346-.294-1-.633-1.966-1.016-1.144-.477-1.956-1.014-2.434-1.61-.477-.596-.718-1.354-.718-2.275 0-1.185.473-2.158 1.416-2.92.944-.763 2.167-1.143 3.67-1.143.46 0 .978.05 1.55.152.573.103 1.051.235 1.435.396v2.94a6.63 6.63 0 00-1.435-.703 4.797 4.797 0 00-1.626-.294c-.59 0-1.049.115-1.378.345-.328.23-.493.546-.493.946zm6.982 3.31c0-2.173.614-3.894 1.844-5.163 1.23-1.27 2.937-1.904 5.124-1.904 2.059 0 3.666.611 4.824 1.834 1.157 1.223 1.735 2.873 1.735 4.952 0 2.13-.616 3.825-1.844 5.085C86.166 21.371 84.491 22 82.373 22c-2.04 0-3.66-.598-4.861-1.795-1.2-1.197-1.799-2.83-1.799-4.902v.002zm3.227-.102c0 1.37.313 2.42.935 3.143.625.724 1.517 1.086 2.677 1.086 1.128 0 1.987-.362 2.576-1.086.588-.723.883-1.797.883-3.22 0-1.415-.304-2.482-.916-3.2-.609-.721-1.467-1.082-2.567-1.082-1.136 0-2.018.377-2.646 1.132-.628.754-.942 1.829-.942 3.227zm20.584-4.128h-4.618V21.68H91.77V11.074h-2.203v-2.53h2.203V6.716c0-1.38.45-2.511 1.352-3.393C94.021 2.44 95.177 2 96.586 2c.376 0 .708.02.998.058.292.038.548.095.77.172v2.672a3.233 3.233 0 00-.54-.218 2.792 2.792 0 00-.883-.128c-.648 0-1.148.202-1.498.607-.35.405-.527 1.004-.527 1.795v1.586h4.618V5.592l3.113-.946v3.898h3.138v2.53h-3.138v6.146c0 .81.147 1.38.442 1.712.294.334.758.499 1.391.499.178 0 .394-.042.647-.128.25-.085.47-.186.658-.306v2.556c-.196.112-.523.213-.98.307-.457.093-.906.14-1.35.14-1.308 0-2.287-.347-2.942-1.043-.653-.692-.98-1.739-.98-3.136v-6.747l.001.001z\\\"></path></g></g></g></svg>\",\"minimax\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 7.2485 1\\\" data-combine-word=\\\"Minimax\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><defs><linearGradient id=\\\"lobe-icons-minimax-_R_0_\\\" x1=\\\"0%\\\" x2=\\\"100.182%\\\" y1=\\\"50.057%\\\" y2=\\\"50.057%\\\"><stop offset=\\\"0%\\\" stop-color=\\\"#E2167E\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#FE603C\\\"></stop></linearGradient></defs><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g><defs><linearGradient id=\\\"lobe-icons-minimax-_R_0_\\\" x1=\\\"0%\\\" x2=\\\"100.182%\\\" y1=\\\"50.057%\\\" y2=\\\"50.057%\\\"><stop offset=\\\"0%\\\" stop-color=\\\"#E2167E\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#FE603C\\\"></stop></linearGradient></defs><path d=\\\"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z\\\" fill=\\\"url(#lobe-icons-minimax-_R_0_)\\\" fill-rule=\\\"nonzero\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.6500 -0.1000) scale(0.050000)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M2 22V2h4.23l4.41 6.828L14.93 2h3.988v20l-3.987-.06V9.25l-3.263 4.714H9.674L6.23 9.25V22H2zM26.471 2h-3.867v20h3.867V2zm3.565 0h4.049l7.492 12.387V2h3.988v20h-3.988L34.085 9.734V21.94h-4.049V2zm23.082 0h-4.109v20h4.109V2zm3.504 0v20h4.23V9.25l3.444 4.714h1.994l3.263-4.713V21.94l3.988.06V2h-3.988l-4.29 6.828L60.852 2h-4.23zm19.457 20l6.344-20h5.076l6.404 20h-4.471l-.89-3.021h-7.139L80.49 22h-4.411zm6.369-6.405h5.078l-2.505-8.338-2.573 8.338zM111.97 2h-4.774l-3.619 6.082L99.885 2h-4.592l5.961 9.985L95.294 22h4.591l3.698-6.113 3.613 6.053h4.774l-6.025-9.956L111.97 2z\\\"></path></g></g></g></svg>\",\"mistral\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 7.7685 1\\\" data-combine-word=\\\"Mistral\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g><path d=\\\"M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z\\\" fill=\\\"gold\\\"></path><path d=\\\"M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z\\\" fill=\\\"#FFAF00\\\"></path><path d=\\\"M3.428 10.258h17.144v3.428H3.428v-3.428z\\\" fill=\\\"#FF8205\\\"></path><path d=\\\"M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z\\\" fill=\\\"#FA500F\\\"></path><path d=\\\"M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z\\\" fill=\\\"#E10500\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path clip-rule=\\\"evenodd\\\" d=\\\"M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.6574 -0.0463) scale(0.046296)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M2 22.638V1h6.55l3.933 14.76L16.37 1h6.565v21.638H18.87V5.605l-4.302 17.033h-4.214L6.066 5.605v17.033H2zm25.011-17.8V1.002h4.155V4.84h-4.155zm0 17.801V6.964h4.155V22.64h-4.155zm6.707-4.473l4.17-.635c.177.807.536 1.42 1.079 1.838.986.864 3.753.796 4.702.036.588-.404.753-1.367.25-1.89-.206-.196-.67-.378-1.389-.545-3.351-.738-5.475-1.412-6.372-2.022-2.418-1.526-2.465-5.18-.252-6.952 1.76-1.8 7.852-1.78 9.788-.34 1.045.699 1.764 1.732 2.159 3.1l-3.918.723c-.413-1.402-1.417-1.886-2.957-1.89-1.094 0-1.878.154-2.35.458-.591.383-.651 1.179-.06 1.595.374.275 1.668.664 3.88 1.165 2.213.502 3.759 1.117 4.636 1.845 1.993 1.694 1.615 5.13-.503 6.79-2.087 2.01-8.091 2.034-10.416.25-1.247-.865-2.063-2.04-2.447-3.527zm31.88 4.472h-4.154V6.963h3.86v2.229c.66-1.053 1.253-1.747 1.78-2.081 1.374-.857 3.144-.536 4.532.28l-1.286 3.617c-1.877-1.247-3.849-.81-4.384 1.535-.468 1.352-.329 7.76-.347 10.096zm10.67-10.892l-3.77-.679c1.014-3.408 3.08-4.43 6.801-4.457 2.81.037 4.804.362 6.055 2.324.37.674.554 1.912.554 3.713.013 1.729-.178 6.48.155 7.889.133.654.382 1.355.747 2.103H82.7c-.124-.272-.411-1.286-.547-1.712-1.378 1.335-2.97 2.066-4.865 2.067-2.945.058-5.22-1.756-5.219-4.635-.011-1.72.87-3.225 2.418-3.963.764-.37 1.865-.691 3.304-.967 1.942-.364 3.287-.703 4.037-1.018v-.413c0-.797-.197-1.366-.591-1.705-.57-.582-3.147-.744-3.963-.074-.414.29-.75.8-1.006 1.527zm5.56 3.365c-.757.315-4.139.86-4.79 1.358-1.077.707-1.038 2.141-.163 2.967 1.017.987 2.672.733 3.8-.103 1.374-.983 1.117-2.455 1.153-4.221zm7.933 7.527V1h4.155v21.638H89.76zm35.917 0h-4.761l-1.892-4.915h-8.665l-1.789 4.915h-4.643L112.371 1h4.627l8.679 21.638h.001zm-8.058-8.56l-2.987-8.03-2.927 8.03h5.914zm10.004 8.56V1H132v21.638h-4.376zM58.98 6.964v3.307H56.14v6.317l.081 2.236c.434 1.136 1.612.712 2.743.332l.355 3.218c-2.416 1.02-6.87 1.14-7.215-2.346-.096-.537-.123-1.89-.133-3.44v-6.317h-1.908V6.965h1.908V3.85l4.17-2.42v5.535h2.838z\\\"></path></g></g></g></svg>\",\"nanobanana\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 9.8258 1\\\" data-combine-word=\\\"Nano Banana\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0906 -0.2250) scale(0.060417)\\\"><g fill=\\\"#000\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M8.342 13.16H3.455c-.513 0-.772-.639-.408-1.012l1.608-1.653a3.166 3.166 0 014.565 0l.513.527.006-.015.038.017c.735-1.93.786-2.809.783-5.007v-.275c-.01-1.782-.02-3.935 1.965-4.22 2.603-.375 4.504 4.219 4.815 8.299a3.166 3.166 0 013.38.774l1.609 1.653c.365.375.106 1.012-.407 1.012H19.27c.072.264.11.542.11.828v5.664c0 .914-.994 1.292-1.602.576-.229-.27-1.067-1.25-2.155-2.52-2.92 4.183-10.266 6.462-12.34 3.006a.915.915 0 01-.05 0h-.743a.991.991 0 110-1.982h.246c.014-1.687 1.23-3.148 2.846-3.783a7.448 7.448 0 002.76-1.889zm7.543-2.145c0-.127-.001-.256-.005-.388a15.693 15.693 0 00-.632-3.939c-.38-1.282-.887-2.33-1.425-2.992-.545-.671-.906-.715-1.085-.69-.223.032-.292.098-.322.129-.05.052-.135.176-.209.45-.152.567-.15 1.286-.147 2.186v.244c.002 1.134-.009 2.028-.145 2.92a11.292 11.292 0 01-.537 2.08h4.507zm-3.468 3.056c-1.636 3.166-4.981 4.71-8.118 4.87a.562.562 0 00.057 1.124c3.294-.169 6.921-1.749 8.845-5.081l-.784-.913z\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0906 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M8.342 13.16H3.455c-.513 0-.772-.639-.408-1.012l1.608-1.653a3.166 3.166 0 014.565 0l.513.527.006-.015.038.017c.735-1.93.786-2.809.783-5.007v-.275c-.01-1.782-.02-3.935 1.965-4.22 2.603-.375 4.504 4.219 4.815 8.299a3.166 3.166 0 013.38.774l1.609 1.653c.365.375.106 1.012-.407 1.012H19.27c.072.264.11.542.11.828v5.664c0 .914-.994 1.292-1.602.576-.229-.27-1.067-1.25-2.155-2.52-2.92 4.183-10.266 6.462-12.34 3.006a.915.915 0 01-.05 0h-.743a.991.991 0 110-1.982h.246c.014-1.687 1.23-3.148 2.846-3.783a7.448 7.448 0 002.76-1.889zm7.543-2.145c0-.127-.001-.256-.005-.388a15.693 15.693 0 00-.632-3.939c-.38-1.282-.887-2.33-1.425-2.992-.545-.671-.906-.715-1.085-.69-.223.032-.292.098-.322.129-.05.052-.135.176-.209.45-.152.567-.15 1.286-.147 2.186v.244c.002 1.134-.009 2.028-.145 2.92a11.292 11.292 0 01-.537 2.08h4.507zm-3.468 3.056c-1.636 3.166-4.981 4.71-8.118 4.87a.562.562 0 00.057 1.124c3.294-.169 6.921-1.749 8.845-5.081l-.784-.913z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.4688 -0.1000) scale(0.050000)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"nonzero\\\"><path d=\\\"M159.626 22c-1.002 0-1.886-.191-2.651-.574a4.55 4.55 0 01-1.803-1.666c-.437-.71-.656-1.521-.656-2.432 0-.984.255-1.822.765-2.514.51-.71 1.194-1.248 2.05-1.612.856-.383 1.812-.574 2.869-.574.564 0 1.083.037 1.557.11.492.072.92.164 1.284.273.383.109.683.218.902.328v-.656c0-.838-.31-1.512-.929-2.022-.601-.528-1.403-.792-2.405-.792-.692 0-1.348.154-1.967.464a4.31 4.31 0 00-1.53 1.257l-2.158-1.694a6.783 6.783 0 011.53-1.448 6.114 6.114 0 011.967-.93 7.849 7.849 0 012.268-.327c2.076 0 3.661.5 4.754 1.503 1.111.983 1.667 2.395 1.667 4.235v8.634h-3.197v-1.557h-.191a4.409 4.409 0 01-.957.983c-.4.291-.865.528-1.393.71-.528.2-1.12.301-1.776.301zm.683-2.596c.747 0 1.393-.164 1.94-.491a3.547 3.547 0 001.257-1.34 3.827 3.827 0 00.437-1.775 5.033 5.033 0 00-1.421-.547 7.082 7.082 0 00-1.667-.191c-1.129 0-1.921.219-2.377.656a2.149 2.149 0 00-.683 1.612c0 .6.219 1.102.656 1.503.437.382 1.056.573 1.858.573zM139.245 21.563V7.628h3.06v1.83h.192c.4-.673.992-1.22 1.776-1.639a5.303 5.303 0 012.541-.628c1.712 0 2.996.52 3.852 1.557.875 1.02 1.312 2.377 1.312 4.072v8.743h-3.279v-8.306c0-1.02-.255-1.776-.765-2.268-.51-.51-1.193-.765-2.049-.765-.674 0-1.266.191-1.776.574-.51.364-.911.856-1.203 1.475a4.768 4.768 0 00-.409 1.995v7.295h-3.252zM128.487 22c-1.002 0-1.885-.191-2.65-.574a4.56 4.56 0 01-1.804-1.666c-.437-.71-.655-1.521-.655-2.432 0-.984.255-1.822.765-2.514.51-.71 1.193-1.248 2.049-1.612.856-.383 1.812-.574 2.869-.574.565 0 1.084.037 1.557.11.492.072.92.164 1.284.273.383.109.684.218.902.328v-.656c0-.838-.31-1.512-.929-2.022-.601-.528-1.402-.792-2.404-.792-.692 0-1.348.154-1.968.464a4.31 4.31 0 00-1.53 1.257l-2.158-1.694a6.783 6.783 0 011.53-1.448 6.124 6.124 0 011.967-.93 7.854 7.854 0 012.268-.327c2.077 0 3.661.5 4.754 1.503 1.111.983 1.667 2.395 1.667 4.235v8.634h-3.197v-1.557h-.191a4.425 4.425 0 01-.956.983 5.29 5.29 0 01-1.394.71c-.528.2-1.12.301-1.776.301zm.683-2.596c.747 0 1.394-.164 1.94-.491a3.532 3.532 0 001.257-1.34 3.827 3.827 0 00.437-1.775 5.021 5.021 0 00-1.421-.547 7.074 7.074 0 00-1.666-.191c-1.13 0-1.922.219-2.377.656a2.146 2.146 0 00-.684 1.612c0 .6.219 1.102.656 1.503.437.382 1.057.573 1.858.573zM108.106 21.563V7.628h3.06v1.83h.192c.4-.673.992-1.22 1.776-1.639a5.303 5.303 0 012.541-.628c1.712 0 2.996.52 3.852 1.557.875 1.02 1.312 2.377 1.312 4.072v8.743h-3.279v-8.306c0-1.02-.255-1.776-.765-2.268-.51-.51-1.193-.765-2.049-.765-.674 0-1.266.191-1.776.574-.51.364-.911.856-1.203 1.475a4.768 4.768 0 00-.409 1.995v7.295h-3.252zM97.348 22c-1.002 0-1.885-.191-2.65-.574a4.552 4.552 0 01-1.803-1.666c-.438-.71-.656-1.521-.656-2.432 0-.984.255-1.822.765-2.514.51-.71 1.193-1.248 2.049-1.612.856-.383 1.813-.574 2.869-.574.565 0 1.084.037 1.557.11.492.072.92.164 1.285.273.382.109.683.218.901.328v-.656c0-.838-.309-1.512-.929-2.022-.601-.528-1.402-.792-2.404-.792a4.34 4.34 0 00-1.967.464c-.62.31-1.13.729-1.53 1.257l-2.16-1.694a6.79 6.79 0 011.531-1.448 6.119 6.119 0 011.967-.93 7.85 7.85 0 012.268-.327c2.077 0 3.661.5 4.754 1.503 1.111.983 1.667 2.395 1.667 4.235v8.634h-3.197v-1.557h-.191a4.425 4.425 0 01-.956.983 5.286 5.286 0 01-1.394.71c-.528.2-1.12.301-1.776.301zm.683-2.596c.747 0 1.394-.164 1.94-.491a3.533 3.533 0 001.257-1.34 3.815 3.815 0 00.437-1.775 5.01 5.01 0 00-1.421-.547 7.076 7.076 0 00-1.666-.191c-1.13 0-1.922.219-2.377.656a2.147 2.147 0 00-.683 1.612c0 .6.218 1.102.655 1.503.438.382 1.057.573 1.858.573zM76.151 21.563V2h7.514c1.093 0 2.077.228 2.951.683.893.455 1.603 1.075 2.131 1.858.529.765.793 1.64.793 2.623 0 1.002-.255 1.858-.765 2.568a4.787 4.787 0 01-1.858 1.613v.19a4.941 4.941 0 012.404 1.695c.62.783.93 1.74.93 2.869 0 1.11-.292 2.076-.875 2.896-.565.802-1.32 1.43-2.268 1.885-.947.456-1.995.683-3.142.683H76.15zm1.858-8.552v-2.923h5.438c.6 0 1.11-.119 1.53-.356a2.47 2.47 0 00.956-.929c.219-.4.328-.82.328-1.256 0-.456-.11-.866-.328-1.23a2.28 2.28 0 00-.929-.929c-.4-.237-.883-.355-1.448-.355h-4.044v13.47h4.372c.637 0 1.175-.127 1.612-.382.455-.255.792-.583 1.01-.984a2.73 2.73 0 00.356-1.366c0-.51-.118-.975-.355-1.394-.219-.419-.565-.747-1.038-.983-.456-.255-1.02-.383-1.694-.383h-5.766zM59.271 22c-1.439 0-2.714-.319-3.825-.956a6.971 6.971 0 01-2.596-2.65c-.619-1.13-.929-2.396-.929-3.798 0-1.403.31-2.66.93-3.771a6.726 6.726 0 012.595-2.65c1.111-.656 2.386-.984 3.825-.984 1.457 0 2.733.328 3.825.984a6.917 6.917 0 012.596 2.677c.62 1.111.93 2.36.93 3.743 0 1.403-.31 2.669-.93 3.798a6.971 6.971 0 01-2.595 2.65c-1.112.638-2.387.957-3.826.957zm0-3.033c.729 0 1.403-.173 2.022-.519a3.967 3.967 0 001.503-1.503c.383-.655.574-1.439.574-2.35 0-.929-.191-1.712-.574-2.35a3.967 3.967 0 00-1.503-1.502 4.024 4.024 0 00-1.994-.52 4.23 4.23 0 00-2.05.52c-.619.346-1.12.847-1.502 1.503-.383.655-.574 1.439-.574 2.35 0 .928.191 1.72.574 2.377a3.967 3.967 0 001.502 1.502 4.362 4.362 0 002.022.492zM36.65 21.563V7.628h3.06v1.83h.191c.401-.673.993-1.22 1.776-1.639a5.304 5.304 0 012.541-.628c1.713 0 2.997.52 3.853 1.557.874 1.02 1.312 2.377 1.312 4.072v8.743h-3.28v-8.306c0-1.02-.254-1.776-.764-2.268-.51-.51-1.193-.765-2.05-.765-.673 0-1.265.191-1.776.574-.51.364-.91.856-1.202 1.475a4.765 4.765 0 00-.41 1.995v7.295H36.65zM25.892 22c-1.002 0-1.885-.191-2.65-.574a4.552 4.552 0 01-1.804-1.666c-.437-.71-.655-1.521-.655-2.432 0-.984.255-1.822.765-2.514.51-.71 1.193-1.248 2.049-1.612.856-.383 1.812-.574 2.869-.574.564 0 1.084.037 1.557.11.492.072.92.164 1.284.273.383.109.684.218.902.328v-.656c0-.838-.31-1.512-.929-2.022-.601-.528-1.402-.792-2.404-.792a4.34 4.34 0 00-1.968.464c-.619.31-1.129.729-1.53 1.257L21.22 9.896a6.788 6.788 0 011.53-1.448 6.117 6.117 0 011.967-.93 7.85 7.85 0 012.268-.327c2.076 0 3.661.5 4.754 1.503 1.111.983 1.667 2.395 1.667 4.235v8.634h-3.197v-1.557h-.191a4.407 4.407 0 01-.957.983c-.4.291-.865.528-1.393.71-.528.2-1.12.301-1.776.301zm.683-2.596c.747 0 1.394-.164 1.94-.491a3.54 3.54 0 001.257-1.34 3.823 3.823 0 00.437-1.775 5.024 5.024 0 00-1.42-.547 7.083 7.083 0 00-1.668-.191c-1.129 0-1.921.219-2.377.656a2.148 2.148 0 00-.683 1.612c0 .6.219 1.102.656 1.503.437.382 1.057.573 1.858.573zM2 21.563V2h3.935l8.36 13.743h.192l-.192-3.77V2h3.334v19.563h-3.525L5.306 7.083h-.191l.191 3.77v10.71H2z\\\"></path></g></g></g></svg>\",\"nova\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 10.9878 1\\\" data-combine-word=\\\"Nova\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><defs><linearGradient gradientUnits=\\\"userSpaceOnUse\\\" id=\\\"lobe-icons-nova-2-_R_0_\\\" x1=\\\"33.663\\\" x2=\\\"-2.086\\\" y1=\\\"33.633\\\" y2=\\\"-1.901\\\"><stop stop-color=\\\"#ff6200\\\"></stop><stop offset=\\\".399\\\" stop-color=\\\"#e433ff\\\"></stop><stop offset=\\\".96\\\" stop-color=\\\"#6842ff\\\"></stop></linearGradient></defs><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(0.0002 -0.2250) scale(0.045312)\\\"><g><g mask=\\\"url(#lobe-icons-nova-0-_R_0_)\\\"><mask height=\\\"32\\\" id=\\\"lobe-icons-nova-0-_R_0_\\\" maskUnits=\\\"userSpaceOnUse\\\" style=\\\"mask-type:luminance\\\" width=\\\"32\\\" x=\\\"0\\\" y=\\\"0\\\"><path d=\\\"M31.8 0H0v32h31.8z\\\" fill=\\\"currentColor\\\"></path></mask><mask height=\\\"32\\\" id=\\\"lobe-icons-nova-1-_R_0_\\\" maskUnits=\\\"userSpaceOnUse\\\" style=\\\"mask-type:alpha\\\" width=\\\"32\\\" x=\\\"0\\\" y=\\\"0\\\"><path d=\\\"m17.865 23.28 1.533 1.543c.07.07.092.175.055.267l-2.398 6.118A1.24 1.24 0 0 1 15.9 32c-.51 0-.969-.315-1.155-.793l-3.451-8.804-5.582 5.617a.246.246 0 0 1-.35 0l-1.407-1.415a.25.25 0 0 1 0-.352l6.89-6.932a1.3 1.3 0 0 1 .834-.398 1.25 1.25 0 0 1 1.232.79l2.992 7.63 1.557-3.977a.248.248 0 0 1 .408-.085zm8.224-19.3-5.583 5.617-3.45-8.805a1.24 1.24 0 0 0-1.43-.762c-.414.092-.744.407-.899.805l-2.38 6.072a.25.25 0 0 0 .055.267l1.533 1.543c.127.127.34.082.407-.085L15.9 4.655l2.991 7.629a1.24 1.24 0 0 0 2.035.425l6.922-6.965a.25.25 0 0 0 0-.352L26.44 3.977a.246.246 0 0 0-.35 0zM8.578 17.566l-3.953-1.567 7.582-3.01c.49-.195.815-.685.785-1.24a1.3 1.3 0 0 0-.395-.84l-6.886-6.93a.246.246 0 0 0-.35 0L3.954 5.395a.25.25 0 0 0 0 .353l5.583 5.617-8.75 3.472a1.25 1.25 0 0 0 0 2.325l6.079 2.412a.24.24 0 0 0 .266-.055l1.533-1.542a.25.25 0 0 0-.085-.41zm22.434-2.73-6.08-2.412a.24.24 0 0 0-.265.055l-1.533 1.542a.25.25 0 0 0 .084.41L27.172 16l-7.583 3.01a1.255 1.255 0 0 0-.785 1.24c.018.317.172.614.395.84l6.89 6.931a.246.246 0 0 0 .35 0l1.406-1.415a.25.25 0 0 0 0-.352l-5.582-5.617 8.75-3.472a1.25 1.25 0 0 0 0-2.325z\\\" fill=\\\"currentColor\\\"></path></mask><g mask=\\\"url(#lobe-icons-nova-1-_R_0_)\\\"><path d=\\\"M-2.915 34.125h37.448V-2.109H-2.915z\\\" fill=\\\"url(#lobe-icons-nova-2-_R_0_)\\\"></path></g></g><defs><linearGradient gradientUnits=\\\"userSpaceOnUse\\\" id=\\\"lobe-icons-nova-2-_R_0_\\\" x1=\\\"33.663\\\" x2=\\\"-2.086\\\" y1=\\\"33.633\\\" y2=\\\"-1.901\\\"><stop stop-color=\\\"#ff6200\\\"></stop><stop offset=\\\".399\\\" stop-color=\\\"#e433ff\\\"></stop><stop offset=\\\".96\\\" stop-color=\\\"#6842ff\\\"></stop></linearGradient></defs></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(0.0002 -0.2250) scale(0.045312)\\\"><g fill=\\\"none\\\"><path d=\\\"m17.865 23.28 1.533 1.543c.07.07.092.175.055.267l-2.398 6.118A1.24 1.24 0 0 1 15.9 32c-.51 0-.969-.315-1.155-.793l-3.451-8.804-5.582 5.617a.246.246 0 0 1-.35 0l-1.407-1.415a.25.25 0 0 1 0-.352l6.89-6.932a1.3 1.3 0 0 1 .834-.398 1.25 1.25 0 0 1 1.232.79l2.992 7.63 1.557-3.977a.248.248 0 0 1 .408-.085zm8.224-19.3-5.583 5.617-3.45-8.805a1.24 1.24 0 0 0-1.43-.762c-.414.092-.744.407-.899.805l-2.38 6.072a.25.25 0 0 0 .055.267l1.533 1.543c.127.127.34.082.407-.085L15.9 4.655l2.991 7.629a1.24 1.24 0 0 0 2.035.425l6.922-6.965a.25.25 0 0 0 0-.352L26.44 3.977a.246.246 0 0 0-.35 0zM8.578 17.566l-3.953-1.567 7.582-3.01c.49-.195.815-.685.785-1.24a1.3 1.3 0 0 0-.395-.84l-6.886-6.93a.246.246 0 0 0-.35 0L3.954 5.395a.25.25 0 0 0 0 .353l5.583 5.617-8.75 3.472a1.25 1.25 0 0 0 0 2.325l6.079 2.412a.24.24 0 0 0 .266-.055l1.533-1.542a.25.25 0 0 0-.085-.41zm22.434-2.73-6.08-2.412a.24.24 0 0 0-.265.055l-1.533 1.542a.25.25 0 0 0 .084.41L27.172 16l-7.583 3.01a1.255 1.255 0 0 0-.785 1.24c.018.317.172.614.395.84l6.89 6.931a.246.246 0 0 0 .35 0l1.406-1.415a.25.25 0 0 0 0-.352l-5.582-5.617 8.75-3.472a1.25 1.25 0 0 0 0-2.325z\\\" fill=\\\"currentColor\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.6437 -0.0488) scale(0.048780)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M183.349 22c-1.461 0-2.636-.415-3.525-1.244-.869-.83-1.303-1.935-1.303-3.317 0-1.462.533-2.627 1.599-3.495 1.086-.889 2.518-1.333 4.295-1.333.948 0 1.995.128 3.14.385v-1.481c0-.909-.188-1.53-.563-1.866-.375-.336-1.066-.504-2.073-.504-.691 0-1.422.07-2.192.208-.77.118-1.55.286-2.34.503-.158.04-.267.06-.326.06-.336 0-.503-.228-.503-.682V7.901c0-.316.039-.533.118-.651.099-.119.277-.237.533-.356.691-.296 1.531-.523 2.518-.681a16.69 16.69 0 012.962-.267c2.034 0 3.515.415 4.443 1.244.948.81 1.422 2.093 1.422 3.85v9.746c0 .493-.247.74-.741.74h-2.014c-.435 0-.711-.217-.829-.651l-.178-.682a7.346 7.346 0 01-2.133 1.333c-.79.316-1.56.474-2.31.474zm1.214-2.903c1.027 0 2.024-.404 2.992-1.214v-2.577c-.375-.06-.77-.109-1.185-.148-.415-.04-.8-.06-1.155-.06-1.718 0-2.577.692-2.577 2.074 0 .612.168 1.086.504 1.422.335.335.809.503 1.421.503zM170.756 21.526h-2.577c-.276 0-.494-.05-.652-.148-.158-.1-.296-.306-.414-.622l-5.065-13.181a11.554 11.554 0 01-.148-.415 1.023 1.023 0 01-.059-.326c0-.296.197-.444.592-.444h2.962c.553 0 .898.257 1.037.77l3.05 10.485 3.11-10.485c.139-.513.484-.77 1.037-.77h2.873c.395 0 .593.148.593.444 0 .1-.02.208-.06.326-.039.119-.089.257-.148.415l-5.065 13.18c-.118.317-.256.524-.414.623-.158.098-.376.148-.652.148zM153.044 21.97c-2.31 0-4.137-.69-5.48-2.073-1.342-1.402-2.014-3.386-2.014-5.953 0-2.548.672-4.512 2.014-5.895 1.343-1.402 3.17-2.103 5.48-2.103 2.31 0 4.137.701 5.48 2.103 1.342 1.383 2.014 3.347 2.014 5.895 0 2.567-.672 4.551-2.014 5.953-1.343 1.382-3.17 2.073-5.48 2.073zm0-3.317c.987 0 1.748-.365 2.281-1.096.553-.75.829-1.955.829-3.613 0-1.64-.276-2.824-.829-3.555-.533-.75-1.294-1.125-2.281-1.125-.968 0-1.728.375-2.281 1.125-.553.73-.829 1.916-.829 3.555 0 1.658.276 2.863.829 3.613.553.73 1.313 1.096 2.281 1.096zM128.034 21.526h-2.429c-.493 0-.74-.247-.74-.74V1.74c0-.493.247-.74.74-.74h3.288c.316 0 .533.05.652.148.138.08.276.227.414.444l7.998 13.774V1.74c0-.493.246-.74.74-.74h2.429c.493 0 .74.247.74.74v19.046c0 .493-.247.74-.74.74h-3.288c-.316 0-.543-.04-.681-.118a2.05 2.05 0 01-.385-.474l-7.998-13.655v13.507c0 .493-.246.74-.74.74zM102.264 21.526h-2.843c-.494 0-.74-.247-.74-.74V7.13c0-.494.246-.74.74-.74h2.133c.454 0 .73.217.829.651l.266.978c1.778-1.383 3.673-2.074 5.687-2.074 1.402 0 2.479.385 3.229 1.155.77.75 1.155 1.827 1.155 3.229v10.456c0 .493-.247.74-.74.74h-2.844c-.494 0-.74-.247-.74-.74v-9.182c0-1.56-.721-2.34-2.163-2.34-1.086 0-2.162.335-3.228 1.007v10.515c0 .493-.247.74-.741.74zM87.817 21.97c-2.31 0-4.136-.69-5.48-2.073-1.342-1.402-2.013-3.386-2.013-5.953 0-2.548.671-4.512 2.014-5.895 1.343-1.402 3.17-2.103 5.48-2.103 2.31 0 4.136.701 5.48 2.103 1.342 1.383 2.013 3.347 2.013 5.895 0 2.567-.671 4.551-2.014 5.953-1.343 1.382-3.17 2.073-5.48 2.073zm0-3.317c.988 0 1.748-.365 2.281-1.096.553-.75.83-1.955.83-3.613 0-1.64-.277-2.824-.83-3.555-.533-.75-1.293-1.125-2.28-1.125-.968 0-1.728.375-2.281 1.125-.553.73-.83 1.916-.83 3.555 0 1.658.277 2.863.83 3.613.553.73 1.313 1.096 2.28 1.096zM77.617 21.526H66.39c-.494 0-.74-.247-.74-.74v-1.511c0-.297.029-.534.088-.711.06-.178.188-.375.385-.593L73.44 9.59h-6.753c-.494 0-.74-.247-.74-.74V7.13c0-.494.246-.74.74-.74h10.782c.493 0 .74.246.74.74V8.7c0 .296-.03.533-.089.71-.06.178-.188.376-.385.593l-7.405 8.323h7.287c.493 0 .74.247.74.74v1.718c0 .494-.247.74-.74.74zM54.487 22c-1.462 0-2.636-.415-3.525-1.244-.869-.83-1.303-1.935-1.303-3.317 0-1.462.533-2.627 1.6-3.495 1.085-.889 2.517-1.333 4.294-1.333.948 0 1.994.128 3.14.385v-1.481c0-.909-.188-1.53-.563-1.866-.375-.336-1.066-.504-2.074-.504-.69 0-1.421.07-2.191.208-.77.118-1.55.286-2.34.503-.158.04-.267.06-.326.06-.336 0-.504-.228-.504-.682V7.901c0-.316.04-.533.119-.651.099-.119.276-.237.533-.356.691-.296 1.53-.523 2.518-.681a16.689 16.689 0 012.962-.267c2.034 0 3.515.415 4.443 1.244.947.81 1.421 2.093 1.421 3.85v9.746c0 .493-.247.74-.74.74h-2.014c-.435 0-.711-.217-.83-.651l-.177-.682a7.35 7.35 0 01-2.133 1.333c-.79.316-1.56.474-2.31.474zm1.214-2.903c1.027 0 2.024-.404 2.992-1.214v-2.577c-.375-.06-.77-.109-1.185-.148-.415-.04-.8-.06-1.155-.06-1.718 0-2.577.692-2.577 2.074 0 .612.168 1.086.503 1.422.336.335.81.503 1.422.503zM27.03 21.526h-2.844c-.494 0-.74-.247-.74-.74V7.13c0-.494.246-.74.74-.74h2.133c.454 0 .73.217.83.651l.236.8c1.027-.671 1.955-1.155 2.784-1.451a7.947 7.947 0 012.636-.445c1.778 0 3.032.632 3.762 1.896 1.007-.671 1.955-1.155 2.844-1.451a8.654 8.654 0 012.754-.445c1.382 0 2.449.385 3.2 1.155.77.75 1.154 1.827 1.154 3.229v10.456c0 .493-.247.74-.74.74h-2.844c-.493 0-.74-.247-.74-.74v-9.508c0-1.343-.602-2.014-1.807-2.014-1.066 0-2.142.256-3.228.77v10.752c0 .493-.247.74-.741.74h-2.843c-.494 0-.74-.247-.74-.74v-9.508c0-1.343-.603-2.014-1.808-2.014-.533 0-1.066.069-1.6.207a7.649 7.649 0 00-1.658.592v10.723c0 .493-.247.74-.74.74zM2.592 21.526c-.395 0-.592-.148-.592-.444 0-.099.02-.217.06-.355.058-.158.118-.326.177-.504L8.812 1.77c.119-.316.257-.523.415-.622C9.385 1.05 9.602 1 9.88 1h3.288c.276 0 .493.05.651.148.178.099.316.306.415.622l6.575 18.453c.06.178.109.346.148.504.06.138.09.256.09.355 0 .296-.198.444-.593.444h-3.258c-.316 0-.543-.059-.681-.177-.139-.119-.257-.316-.356-.593l-1.214-3.91h-7.08l-1.154 3.91c-.08.277-.198.474-.356.593-.138.118-.375.177-.71.177H2.591zm6.22-7.878h5.213l-2.636-8.59-2.577 8.59z\\\"></path></g></g></g></svg>\",\"openai\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 4.5678 1\\\" data-combine-word=\\\"GPT\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><clipPath id=\\\"crop-openai\\\"><rect x=\\\"1.7500\\\" y=\\\"-1\\\" width=\\\"2.8178\\\" height=\\\"3\\\"/></clipPath><g class=\\\"dsh-combine-mark-mono dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.2852 -2.0104) scale(0.002787)\\\"><g fill=\\\"currentColor\\\"><path d=\\\"M583.793,841.346c11.778,-44.127 0.356,-93.159 -34.264,-127.777c-34.616,-34.618 -83.65,-46.041 -127.777,-34.264c-32.329,-32.262 -80.503,-46.887 -127.794,-34.215c-47.289,12.672 -81.694,49.424 -93.563,93.526c-44.102,11.866 -80.854,46.274 -93.523,93.564c-12.673,47.289 1.952,95.462 34.214,127.791c-11.776,44.126 -0.354,93.16 34.264,127.777c34.618,34.62 83.651,46.041 127.779,34.264c32.329,32.263 80.503,46.888 127.79,34.215c47.289,-12.672 81.695,-49.425 93.564,-93.526c44.104,-11.865 80.857,-46.274 93.526,-93.563c12.672,-47.291 -1.952,-95.462 -34.216,-127.792Zm-179.693,-124.105c39.682,-22.943 91.303,-17.439 125.254,16.511c23.963,23.965 33.748,56.745 29.367,87.904l-111.77,-64.53c-4.415,-2.549 -9.855,-2.549 -14.27,0l-130.876,75.563l0,-50.806c0,-3.427 1.837,-6.63 4.803,-8.343l97.49,-56.297l0.002,-0.002Zm-41.659,113.397l60.638,35.01l0,70.02l-60.638,35.01l-60.639,-35.01l0,-70.02l60.639,-35.01Zm-138.015,-57.766c-0.029,-45.836 30.549,-87.793 76.926,-100.217c32.734,-8.773 66.015,-0.856 90.81,18.518l-111.768,64.53c-4.415,2.549 -7.134,7.261 -7.134,12.359l0,151.125l-44.001,-25.405c-2.967,-1.715 -4.824,-4.909 -4.824,-8.332l-0.009,-112.576l0,-0.002Zm-89.99,66.69c8.773,-32.735 32.268,-57.601 61.443,-69.386l0,129.056c0,5.099 2.719,9.81 7.134,12.359l130.877,75.564l-44.002,25.405c-2.964,1.713 -6.661,1.724 -9.627,0.011l-97.498,-56.279c-39.71,-22.893 -60.754,-70.353 -48.329,-116.727l0.002,-0.003Zm186.345,244.515c-39.681,22.943 -91.303,17.437 -125.253,-16.512c-23.965,-23.965 -33.749,-56.745 -29.368,-87.904l111.769,64.53c4.414,2.549 9.856,2.549 14.271,0l130.876,-75.564l0,50.807c0,3.429 -1.837,6.632 -4.803,8.343l-97.49,56.298l-0.002,0.002Zm179.675,-55.631c0.028,45.837 -30.55,87.793 -76.927,100.216c-32.736,8.774 -66.017,0.856 -90.81,-18.519l111.767,-64.529c4.417,-2.549 7.136,-7.262 7.136,-12.359l0,-151.123l44.001,25.404c2.965,1.713 4.824,4.909 4.824,8.332l0.009,112.578Zm89.986,-66.691c-8.773,32.735 -32.268,57.601 -61.444,69.387l0,-129.058c0,-5.097 -2.718,-9.808 -7.133,-12.359l-130.878,-75.562l44.002,-25.405c2.965,-1.714 6.662,-1.726 9.628,-0.012l97.497,56.278c39.712,22.893 60.754,70.355 48.329,116.729l-0.001,0.002Z\\\" style=\\\"\\\"/></g></g></g><g clip-path=\\\"url(#crop-openai)\\\"><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(-4.3541 -3.0172) scale(0.003905)\\\"><g fill=\\\"currentColor\\\"><path d=\\\"M882.894,985.151c-46.843,0 -79.373,-35.476 -79.373,-84.506c0,-49.03 32.578,-84.506 78.67,-84.506c33.672,0 59.617,19.759 67.304,43.897l52.326,0c-9.132,-52.678 -58.522,-91.091 -120.372,-91.091c-74.28,0 -128.761,58.914 -128.761,131.7c0,72.787 53.027,131.7 129.153,131.7c62.912,0 111.201,-37.67 121.082,-91.091l-51.935,0c-8.781,24.498 -34.374,43.897 -68.045,43.897l-0.041,0l-0.008,0Z\\\" style=\\\"\\\"/><path d=\\\"M1131.2,842.121c-24.148,0 -43.154,10.624 -53.781,25.241l0,-94.739l-47.544,0l0,256.071l47.544,0l0,-98.429c0,-28.537 15.368,-47.192 40.258,-47.192c22.698,0 35.469,17.563 35.469,42.052l0,103.521l47.544,0l0,-111.201c0,-45.35 -27.787,-75.381 -69.49,-75.381l0,0.057Z\\\" style=\\\"\\\"/><path d=\\\"M1395.71,909.439c0,-41.699 -28.538,-67.301 -81.217,-67.301c-43.155,0 -77.576,24.148 -83.412,59.266l47.944,0c3.641,-12.07 16.813,-21.603 35.125,-21.603c23.797,0 35.125,12.421 35.125,34.022l0,1.094l-46.451,4.04c-48.639,4.04 -75.734,23.796 -75.734,61.108c0,31.477 27.086,52.327 64.756,52.327c25.242,0 49.743,-9.882 60.015,-26.343c0,8.03 0.744,15.367 2.197,22.696l44.255,0c-1.844,-11.72 -2.547,-25.242 -2.547,-40.959l0,-78.281l-0.048,-0.088l-0.008,0.022Zm-46.492,43.557c0,21.601 -16.109,43.547 -48.639,43.547c-17.563,0 -27.086,-8.431 -27.086,-20.852c0,-13.524 9.132,-21.951 29.633,-23.797l46.092,-4.04l0,5.142Z\\\" style=\\\"\\\"/><path d=\\\"M1495.64,786.533l-47.545,0l0,59.263l-38.061,0l0,38.416l38.061,0l0,89.995c0,34.773 17.914,54.525 56.328,54.525l38.062,0l0,-39.509l-24.148,0c-16.11,0 -22.697,-5.483 -22.697,-20.499l0,-84.506l46.845,0l0,-38.413l-46.845,0l0,-59.264l0,-0.008Z\\\" style=\\\"\\\"/><path d=\\\"M1778.69,891.873l-81.969,0l0,40.957l69.889,0c-4.78,34.024 -36.617,54.525 -72.083,54.525c-51.234,0 -81.216,-37.672 -81.216,-86.702c0,-49.029 33.671,-84.865 79.722,-84.865c31.477,0 57.118,18.305 63.696,38.765l52.287,0c-9.883,-50.835 -56.719,-85.608 -116.693,-85.608c-73.888,0 -128.762,59.615 -128.762,132.051c0,72.436 50.49,131.349 125.865,131.349c34.415,0 65.498,-15.367 79.373,-36.218l0,32.579l42.452,0l0,-104.264c0,-20.851 -11.678,-32.578 -32.571,-32.578l0.01,0.009Z\\\" style=\\\"\\\"/><path d=\\\"M1962.44,772.631l-113.397,0l0,256.071l48.247,0l0,-96.231l65.494,0c50.541,0 86.356,-29.633 86.356,-79.374c0,-49.74 -35.815,-80.474 -86.7,-80.474l0,0.008Zm-3.299,117.434l-61.851,0l0,-73.537l61.851,0c24.913,0 41.002,14.267 41.002,36.569c0,22.304 -16.089,36.962 -41.002,36.962l0,0.006Z\\\" style=\\\"\\\"/><path d=\\\"M2061.15,772.623l0,43.897l87.459,0l0,212.174l48.251,0l0,-212.174l87.814,0l0,-43.897l-223.543,0l0.037,0l-0.018,0Z\\\" style=\\\"\\\"/></g></g></g></g></svg>\",\"perplexity\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 7.5161 1\\\" data-combine-word=\\\"Perplexity\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0906 -0.2250) scale(0.060417)\\\"><g><path d=\\\"M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z\\\" fill=\\\"#22B8CD\\\" fill-rule=\\\"nonzero\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0906 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.4635 -0.0000) scale(0.052632)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M38.542 5.218h1.151V7.59h-1.49c-1.167 0-2.036.281-2.612.843-.575.563-.863 1.485-.863 2.768v7.773h-2.351V5.271h2.351v2.187c0 .123.062.185.184.185.069 0 .121-.017.157-.053a.58.58 0 00.104-.211c.453-1.44 1.577-2.16 3.371-2.16h-.002zm15.36 2.938c.617 1.098.928 2.42.928 3.966 0 1.545-.309 2.867-.928 3.965-.62 1.098-1.42 1.92-2.404 2.464a6.446 6.446 0 01-3.174.817c-2.23 0-3.797-.896-4.703-2.688-.069-.14-.157-.211-.262-.211-.105 0-.157.052-.157.158v7.352h-2.351V5.271h2.351v2.345c0 .106.052.159.157.159.105 0 .191-.07.262-.211.906-1.793 2.473-2.689 4.703-2.689 1.132 0 2.19.272 3.174.817.984.545 1.785 1.366 2.404 2.464zm-1.424 3.966c0-1.617-.43-2.877-1.292-3.781-.862-.904-1.998-1.357-3.41-1.357-1.413 0-2.548.453-3.41 1.357-.863.905-1.179 2.166-1.179 3.78 0 1.616.316 2.878 1.178 3.782.863.905 2 1.356 3.41 1.356 1.411 0 2.549-.453 3.411-1.356.862-.904 1.292-2.166 1.292-3.781zM15.05 8.177c.618 1.098.928 2.42.928 3.965 0 1.546-.308 2.868-.928 3.966-.619 1.098-1.42 1.919-2.403 2.464a6.448 6.448 0 01-3.175.817c-2.23 0-3.797-.896-4.702-2.688-.07-.14-.158-.212-.262-.212-.105 0-.158.053-.158.159V24H2V5.292h2.351v2.345c0 .106.053.159.158.159.104 0 .19-.07.261-.212.906-1.792 2.473-2.688 4.703-2.688 1.132 0 2.19.272 3.175.817.983.545 1.784 1.366 2.403 2.464h-.002zm-1.423 3.965c0-1.616-.43-2.877-1.293-3.78-.862-.904-1.998-1.357-3.41-1.357-1.412 0-2.548.453-3.41 1.357-.862.905-1.178 2.165-1.178 3.78 0 1.615.316 2.878 1.178 3.781.862.906 1.998 1.357 3.41 1.357 1.412 0 2.548-.453 3.41-1.357.863-.903 1.293-2.166 1.293-3.78zm14.422 2.481h2.482c-.33 1.283-1.006 2.395-2.023 3.334-1.02.94-2.479 1.41-4.378 1.41-1.429 0-2.686-.295-3.775-.884a6.13 6.13 0 01-2.521-2.516c-.593-1.089-.889-2.372-.889-3.847 0-1.476.288-2.758.863-3.847.574-1.089 1.38-1.928 2.417-2.517 1.036-.588 2.25-.883 3.644-.883 1.393 0 2.547.29 3.514.87.968.58 1.69 1.349 2.168 2.305.48.959.719 2.008.719 3.15v1.58H19.427c.086 1.37.544 2.46 1.37 3.268.828.807 1.939 1.213 3.332 1.213 1.132 0 2-.232 2.6-.698.601-.466 1.04-1.111 1.32-1.938zm-8.595-3.82h8.204c0-1.194-.305-2.13-.914-2.807-.61-.676-1.568-1.015-2.874-1.015-1.22 0-2.217.33-2.99.988-.775.659-1.25 1.604-1.424 2.832l-.002.002zm37.238 8.17h2.352V0H56.69v18.974-.002zM89.316 3.774h2.747V.81h-2.747v2.966zm9.688 13.156c-.426.043-.684.066-.77.066a.39.39 0 01-.289-.106.395.395 0 01-.104-.29c0-.087.022-.348.065-.778.043-.43.066-1.094.066-1.988V7.279h3.354l-.66-2.008h-2.692v-3.69h-2.352v3.688h-2.557v2.008h2.557v7.214c0 1.512.367 2.636 1.098 3.374.732.737 1.846 1.107 3.345 1.107h1.83v-2.107h-.915c-.889 0-1.547.022-1.974.066h-.002zm13.759-11.662l-3.893 11.498c-.053.141-.135.326-.402.326-.268 0-.35-.185-.402-.326l-3.893-11.498h-2.398l4.508 13.703h1.594a.81.81 0 01.235.026c.053.017.096.06.131.133.07.105.06.264-.026.473l-.731 2.002c-.105.264-.305.396-.6.396-.106 0-.349-.023-.732-.066a13.71 13.71 0 00-1.49-.066h-1.907v2.107h2.508c1.463 0 2.344-.25 3.102-.75.757-.5 1.345-1.383 1.764-2.65L115 5.795v-.526h-2.237v.001zm-31.127 5.113L77.953 5.27h-2.588v.527l4.415 5.93-5.382 6.72v.526h2.64l4.285-5.507 3.998 5.507h2.535v-.526l-4.677-6.324 5.07-6.298v-.553h-2.64l-3.971 5.113-.002-.002zm7.931 8.59h2.351v-13.7h-2.35v13.702-.002zm-15.062-4.349c-.331 1.283-1.006 2.395-2.024 3.334-1.02.94-2.479 1.41-4.377 1.41-1.43 0-2.686-.295-3.775-.884a6.13 6.13 0 01-2.522-2.516c-.593-1.089-.888-2.372-.888-3.847 0-1.476.288-2.758.862-3.847.574-1.089 1.38-1.928 2.417-2.517 1.036-.588 2.25-.883 3.644-.883 1.394 0 2.547.29 3.515.87.967.58 1.689 1.349 2.168 2.305.479.959.718 2.008.718 3.15v1.58H63.401c.086 1.37.544 2.46 1.371 3.268.827.807 1.938 1.213 3.332 1.213 1.132 0 2-.232 2.6-.698.6-.466 1.04-1.111 1.319-1.938h2.482zm-11.078-3.82h8.205c0-1.194-.305-2.13-.915-2.807-.61-.676-1.568-1.015-2.873-1.015-1.22 0-2.217.33-2.991.988-.775.659-1.25 1.604-1.424 2.832l-.002.002z\\\"></path></g></g></g></svg>\",\"qwen\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 4.8478 1\\\" data-combine-word=\\\"Qwen\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><defs><linearGradient id=\\\"lobe-icons-qwen-_R_0_\\\" x1=\\\"0%\\\" x2=\\\"100%\\\" y1=\\\"0%\\\" y2=\\\"0%\\\"><stop offset=\\\"0%\\\" stop-color=\\\"#6336E7\\\" stop-opacity=\\\".84\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#6F69F7\\\" stop-opacity=\\\".84\\\"></stop></linearGradient></defs><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0604 -0.2250) scale(0.060417)\\\"><g><path d=\\\"M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z\\\" fill=\\\"url(#lobe-icons-qwen-_R_0_)\\\" fill-rule=\\\"nonzero\\\"></path><defs><linearGradient id=\\\"lobe-icons-qwen-_R_0_\\\" x1=\\\"0%\\\" x2=\\\"100%\\\" y1=\\\"0%\\\" y2=\\\"0%\\\"><stop offset=\\\"0%\\\" stop-color=\\\"#6336E7\\\" stop-opacity=\\\".84\\\"></stop><stop offset=\\\"100%\\\" stop-color=\\\"#6F69F7\\\" stop-opacity=\\\".84\\\"></stop></linearGradient></defs></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0604 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.5383 -0.0000) scale(0.045455)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M11.425 14.13h3.642l1.529 1.795a7.89 7.89 0 002.166-2.832 8.36 8.36 0 00.771-3.562c0-2.03-.624-3.664-1.874-4.905-1.24-1.25-2.884-1.874-4.931-1.874-1.028 0-1.99.186-2.885.558A6.99 6.99 0 007.45 4.932 8.576 8.576 0 005.656 7.67a8.354 8.354 0 00-.625 3.19c0 2.003.611 3.643 1.834 4.919 1.223 1.276 2.779 1.914 4.666 1.914.39 0 .793-.031 1.21-.093.425-.062.868-.16 1.329-.293l-2.645-3.177zM18.07 22l-2.127-2.46c-.753.293-1.48.51-2.18.652a9.84 9.84 0 01-2.073.226c-2.97 0-5.326-.85-7.072-2.552C2.873 16.164 2 13.865 2 10.966c0-1.577.28-3.052.837-4.426a10.148 10.148 0 012.406-3.576A10.427 10.427 0 018.713.758C10.025.253 11.429 0 12.927 0c2.915 0 5.25.86 7.005 2.579 1.755 1.72 2.632 4.01 2.632 6.872 0 1.764-.354 3.399-1.063 4.905a10.156 10.156 0 01-3.031 3.776L21.714 22H18.07zm5.743-14.675h2.884l2.047 6.433.054.16c.248.789.38 1.373.399 1.755.097-.302.221-.62.372-.958.16-.345.354-.713.585-1.103l4.227-7.218 2.06 7.43c.08.275.146.559.2.851.053.293.097.63.133 1.01.132-.372.265-.708.398-1.01.142-.3.28-.562.412-.784l3.816-6.567h3.243L36.097 20.71l-2.127-7.045a8.683 8.683 0 01-.213-.798 17.846 17.846 0 01-.146-.97 69.17 69.17 0 01-.519 1.063c-.15.302-.265.514-.345.638l-4.28 7.112-4.653-13.385zm24.392 4.785h6.5c-.026-.85-.292-1.52-.797-2.007-.496-.497-1.166-.745-2.008-.745-.957 0-1.768.248-2.432.745-.665.496-1.086 1.165-1.263 2.007zm6.34 3.948l2.061 1.608c-.735.966-1.533 1.67-2.392 2.114-.86.443-1.848.665-2.965.665-1.87 0-3.38-.563-4.533-1.689-1.152-1.134-1.728-2.623-1.728-4.466 0-2.162.66-3.935 1.98-5.317 1.33-1.391 3.018-2.087 5.066-2.087 1.71 0 3.07.532 4.08 1.595 1.02 1.055 1.53 2.473 1.53 4.254 0 .15-.01.345-.027.585-.01.23-.027.51-.054.837h-9.61c0 1.143.288 2.056.864 2.738.576.674 1.342 1.01 2.3 1.01.664 0 1.293-.159 1.887-.478a4.633 4.633 0 001.542-1.369zm14.317 3.868l.957-7.244c.018-.133.031-.27.04-.412.009-.151.013-.368.013-.652 0-.824-.2-1.453-.598-1.887-.399-.444-.98-.665-1.741-.665-1.188 0-2.118.385-2.792 1.156-.673.763-1.112 1.937-1.316 3.523l-.797 6.181H59.77l1.661-12.601h2.752l-.213 1.515c.727-.664 1.476-1.156 2.247-1.475a6.5 6.5 0 012.486-.479c1.293 0 2.3.341 3.017 1.024.727.673 1.09 1.622 1.09 2.845 0 .31-.018.673-.053 1.09-.036.407-.089.886-.16 1.435l-.877 6.647h-2.858z\\\"></path></g></g></g></svg>\",\"stepfun\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 6.5278 1\\\" data-combine-word=\\\"Step\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><defs><linearGradient gradientUnits=\\\"userSpaceOnUse\\\" id=\\\"lobe-icons-stepfun-_R_0_\\\" x1=\\\"1.646\\\" x2=\\\"18.342\\\" y1=\\\"1.916\\\" y2=\\\"22.091\\\"><stop stop-color=\\\"#01A9FF\\\"></stop><stop offset=\\\"1\\\" stop-color=\\\"#0160FF\\\"></stop></linearGradient></defs><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g><path d=\\\"M22.012 0h1.032v.927H24v.968h-.956V3.78h-1.032V1.896h-1.878v-.97h1.878V0zM2.6 12.371V1.87h.969v10.502h-.97zm10.423.66h10.95v.918h-6.208v9.579h-4.742V13.03zM5.629 3.333v12.356H0v4.51h10.386V8L20.859 8l-.003-4.668-15.227.001z\\\" fill=\\\"url(#lobe-icons-stepfun-_R_0_)\\\" fill-rule=\\\"evenodd\\\"></path><defs><linearGradient gradientUnits=\\\"userSpaceOnUse\\\" id=\\\"lobe-icons-stepfun-_R_0_\\\" x1=\\\"1.646\\\" x2=\\\"18.342\\\" y1=\\\"1.916\\\" y2=\\\"22.091\\\"><stop stop-color=\\\"#01A9FF\\\"></stop><stop offset=\\\"1\\\" stop-color=\\\"#0160FF\\\"></stop></linearGradient></defs></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM8.762 19.614H4.376v-4.386h4.386v4.386zm5.423 0H9.798v-4.386h4.387v4.386zm0-5.42H9.798V9.81h4.387v4.386zm0-5.418H9.798V4.39h4.387v4.386zm5.422-.004h-4.386V4.386h4.386v4.386z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.6364 -0.1136) scale(0.056818)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M14.86 14.568c0 2.873-2.174 5.061-6.347 5.061-3.542 0-6.352-1.844-6.492-5.143h2.794c.18 1.795 1.67 2.766 3.824 2.766s3.45-1.121 3.45-2.562c0-1.296-.97-2.072-3.44-2.8l-1.514-.427c-2.853-.82-4.615-2.082-4.615-4.658 0-2.892 2.66-4.784 6.143-4.784 3.484 0 5.934 1.989 6.046 4.876h-2.741c-.224-1.553-1.442-2.504-3.392-2.504s-3.27.961-3.27 2.387c0 1.238 1.062 1.956 3.226 2.582l1.32.374c3.29.96 5.007 2.329 5.007 4.837v-.005zm5.4 1.13V9.12h2.339V6.683H20.26V3.874h-2.64v2.81H15.53v2.435h2.091v6.609c0 2.868 1.796 3.697 3.494 3.785.85.043 1.723-.073 1.723-.073v-2.174c-.296.015-.486.039-.85.039-.64 0-1.732-.116-1.732-1.606h.005zm28.42-2.391c0 3.93-2.732 6.308-5.915 6.308-1.335 0-2.742-.471-3.693-1.33v5.692h-2.64V7.08h2.64v1.17c.951-.86 2.358-1.33 3.693-1.33 3.032 0 5.914 2.465 5.914 6.386zm-2.62-.039c0-2.61-1.486-4.042-3.315-4.042-1.83 0-3.678 1.431-3.678 4.042 0 2.61 1.849 4.042 3.678 4.042 1.83 0 3.314-1.431 3.314-4.042z\\\"></path><path d=\\\"M39.095 24h-2.688V7.056h2.688v1.14c.927-.815 2.29-1.3 3.669-1.3 1.518 0 3.018.63 4.114 1.732 1.18 1.184 1.83 2.848 1.83 4.682 0 1.835-.612 3.48-1.772 4.644-1.082 1.087-2.562 1.689-4.168 1.689-1.378 0-2.741-.486-3.668-1.3V24h-.005zm-2.634-.049h2.59v-5.72l.04.038c.916.83 2.29 1.325 3.677 1.325 2.926 0 5.89-2.16 5.89-6.284s-2.993-6.36-5.89-6.36c-1.383 0-2.756.494-3.678 1.324l-.038.039V7.109H36.46v16.847-.005zM8.51 19.657c-1.8 0-3.372-.466-4.536-1.339C2.747 17.396 2.063 16.071 2 14.49v-.025h2.839v.025c.174 1.717 1.591 2.741 3.804 2.741 2.018 0 3.425-1.043 3.425-2.538 0-1.27-.96-2.047-3.425-2.775l-1.514-.427c-1.563-.446-2.64-.98-3.387-1.674-.84-.776-1.247-1.761-1.247-3.008 0-1.408.611-2.616 1.776-3.494C5.387 2.465 6.944 2 8.662 2s3.212.47 4.309 1.359c1.097.888 1.708 2.11 1.761 3.542v.024h-2.79v-.02c-.228-1.576-1.456-2.484-3.367-2.484-1.912 0-3.246.927-3.246 2.363 0 1.155.931 1.897 3.212 2.557l1.32.374c3.522 1.029 5.026 2.484 5.026 4.857 0 1.475-.558 2.727-1.615 3.625-1.121.956-2.766 1.46-4.755 1.46h-.005zM2.05 14.51c.14 3.096 2.673 5.095 6.463 5.095s6.322-1.931 6.322-5.037c0-2.353-1.494-3.79-4.988-4.813l-1.32-.374C6.221 8.71 5.28 7.958 5.28 6.775c0-1.466 1.296-2.412 3.295-2.412 1.999 0 3.173.912 3.41 2.504h2.699c-.126-2.887-2.543-4.828-6.022-4.828s-6.119 1.96-6.119 4.76c0 2.324 1.374 3.712 4.6 4.639l1.514.427c2.49.732 3.46 1.523 3.46 2.819 0 1.523-1.427 2.586-3.474 2.586-2.227 0-3.664-1.034-3.848-2.766H2.049v.005zm19.457 5.037c-.131 0-.262 0-.393-.01-1-.049-1.805-.34-2.397-.854-.742-.645-1.121-1.64-1.121-2.955V9.143h-2.091V6.658h2.091v-2.81h2.688v2.81h2.339v2.485h-2.339v6.555c0 1.417.976 1.582 1.708 1.582.253 0 .427-.01.607-.025l.237-.014h.025v2.217h-.02s-.635.088-1.334.088zM15.557 9.094h2.091v6.633c0 2.96 1.888 3.678 3.47 3.76.766.04 1.557-.053 1.698-.072v-2.126c-.078 0-.145.01-.213.015a7.092 7.092 0 01-.612.024c-.432 0-1.756 0-1.756-1.63V9.094h2.338V6.707h-2.338v-2.81h-2.591v2.81h-2.092v2.387h.005zm27.187 8.244a3.654 3.654 0 01-2.542-1.048c-.757-.752-1.16-1.795-1.16-3.018 0-1.223.403-2.266 1.16-3.018a3.654 3.654 0 012.542-1.048c2 0 3.338 1.635 3.338 4.066 0 2.43-1.339 4.066-3.338 4.066zm0-8.089c-1.771 0-3.654 1.407-3.654 4.018 0 2.61 1.883 4.018 3.654 4.018 1.965 0 3.29-1.616 3.29-4.018 0-2.402-1.32-4.018-3.29-4.018zM31.98 15.704c-.535 1.097-1.495 1.597-2.81 1.636-1.854-.049-3.009-1.136-3.246-3.222h9.073c.025-.277.044-.563.044-.86 0-4.114-2.625-6.341-5.866-6.341-3.242 0-5.867 2.222-5.867 6.342 0 4.12 2.397 6.337 5.867 6.337 2.872 0 4.677-1.35 5.502-3.892h-2.698zm-2.81-6.55c1.805.048 2.945.912 3.227 2.902h-6.454c.281-1.99 1.422-2.854 3.227-2.902z\\\"></path><path d=\\\"M29.17 19.622c-1.748 0-3.218-.568-4.251-1.64-1.073-1.111-1.64-2.746-1.64-4.721s.596-3.59 1.727-4.731c1.043-1.053 2.523-1.635 4.168-1.635s3.12.582 4.168 1.635c1.13 1.14 1.727 2.775 1.727 4.73 0 .282-.014.573-.043.86v.024h-9.07c.244 2.023 1.355 3.125 3.218 3.173 1.364-.039 2.27-.568 2.785-1.62v-.015h2.751l-.01.034c-.844 2.591-2.702 3.906-5.526 3.906h-.005zm0-12.679c-3.495 0-5.843 2.538-5.843 6.318s2.237 6.312 5.842 6.312c2.79 0 4.63-1.29 5.469-3.843h-2.65c-.524 1.063-1.446 1.597-2.824 1.636-1.902-.054-3.032-1.174-3.27-3.246v-.03h9.074a9.77 9.77 0 00.038-.834c0-3.775-2.348-6.318-5.842-6.318l.005.005zm3.255 5.139h-6.507v-.03c.272-1.911 1.335-2.867 3.251-2.92 1.917.053 2.98 1.009 3.251 2.92v.03h.005zm-6.453-.049h6.395c-.272-1.868-1.32-2.8-3.198-2.853-1.878.053-2.926.985-3.198 2.853zM53.09 5.294v4.77h7.182v2.678h-7.181v6.914h-2.8V2.616h9.981v2.678h-7.181zM72.92 7.482v12.17h-2.63v-.893c-.612.786-1.82 1.325-3.775 1.208-1.956-.116-4.673-1.635-4.673-5.012V7.482h2.63v7.206c0 1.849 1.241 2.824 2.727 2.824 1.484 0 3.09-1.024 3.09-3.503V7.482h2.63zM75.011 19.66V7.49h2.63v.893c.612-.786 1.82-1.324 3.775-1.208 1.956.116 4.673 1.635 4.673 5.012v7.473h-2.63v-7.206c0-1.849-1.242-2.824-2.727-2.824-1.485 0-3.09 1.024-3.09 3.503v6.527h-2.63z\\\"></path></g></g></g></svg>\",\"tencent\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 7.0893 1\\\" data-combine-word=\\\"Hunyuan\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g><circle cx=\\\"12\\\" cy=\\\"12\\\" fill=\\\"#0055E9\\\" r=\\\"12\\\"></circle><path d=\\\"M12 0c.518 0 1.028.033 1.528.096A6.188 6.188 0 0112.12 12.28l-.12.001c-2.99 0-5.242 2.179-5.554 5.11-.223 2.086.353 4.412 2.242 6.146C3.672 22.1 0 17.479 0 12 0 5.373 5.373 0 12 0z\\\" fill=\\\"currentColor\\\"></path><path d=\\\"M5.286 5a2.438 2.438 0 01.682 3.38c-3.962 5.966-3.215 10.743 2.648 15.136C3.636 22.056 0 17.452 0 12c0-1.787.39-3.482 1.09-5.006.253-.435.525-.872.817-1.311A2.438 2.438 0 015.286 5z\\\" fill=\\\"#0055E9\\\"></path><path d=\\\"M12.98.04c.272.021.543.053.81.093.583.106 1.117.254 1.538.44 6.638 2.927 8.07 10.052 1.748 15.642a4.125 4.125 0 01-5.822-.358c-1.51-1.706-1.3-4.184.357-5.822.858-.848 3.108-1.223 4.045-2.441 1.257-1.634 2.122-6.009-2.523-7.506L12.98.039z\\\" fill=\\\"#00BCFF\\\"></path><path d=\\\"M13.528.096A6.187 6.187 0 0112 12.281a5.75 5.75 0 00-1.71.255c.147-.905.595-1.784 1.321-2.501.858-.848 3.108-1.223 4.045-2.441 1.27-1.651 2.14-6.104-2.676-7.554.184.014.367.033.548.056z\\\" fill=\\\"#ECECEE\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M12 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0zm1.652 1.123l-.01-.001c.533.097 1.023.233 1.41.404 6.084 2.683 7.396 9.214 1.601 14.338a3.781 3.781 0 01-5.337-.328 3.654 3.654 0 01-.884-3.044c-1.934.6-3.295 2.305-3.524 4.45-.204 1.912.324 4.044 2.056 5.634l.245.067C10.1 22.876 11.036 23 12 23c6.075 0 11-4.925 11-11 0-5.513-4.056-10.08-9.348-10.877zM2.748 6.21c-.178.269-.348.536-.51.803l-.235.394.078-.167A10.957 10.957 0 001 12c0 4.919 3.228 9.083 7.682 10.49l.214.065C3.523 18.528 2.84 14.149 6.47 8.68A2.234 2.234 0 102.748 6.21zm10.157-5.172c4.408 1.33 3.61 5.41 2.447 6.924-.86 1.117-2.922 1.46-3.708 2.238-.666.657-1.077 1.462-1.212 2.291A5.303 5.303 0 0112 12.258a5.672 5.672 0 001.404-11.169 10.51 10.51 0 00-.5-.052z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.6485 -0.1015) scale(0.050761)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M23.587 7.91c5.127 0 6.172 3.607 5.66 6.56-.11.635-.262 1.144-.39 1.434h-10.55c-.318 2.448 1.711 3.514 4.265 3.514 1.831 0 3.994-.683 5.693-1.904l-.54 3.084c-1.74.97-3.88 1.402-6.169 1.402-5.121 0-7.651-3.027-6.937-7.161.645-3.723 3.893-6.929 8.968-6.929zm47.887 0c5.13 0 6.174 3.607 5.665 6.56-.078.491-.209.972-.39 1.434H66.198c-.317 2.448 1.71 3.514 4.263 3.514 1.833 0 3.995-.683 5.694-1.904l-.54 3.084c-1.74.97-3.881 1.402-6.169 1.402-5.12 0-7.652-3.027-6.937-7.161.645-3.723 3.892-6.929 8.965-6.929zm-13.732.007c1.46-.01 2.91.263 4.267.803l-.619 3.67c-1.06-1.4-2.74-1.817-3.981-1.817-3.043 0-5.377 1.902-5.791 4.373-.48 2.767 1.578 4.354 4.295 4.354 1.332 0 3.213-.31 4.6-1.806l-.646 3.605c-.888.33-3.237.898-5.203.898-4.947 0-7.867-3.03-7.145-7.219.7-4.037 4.674-6.86 10.223-6.86zm-16.524-.005c2.75 0 5.364 1.515 4.625 5.78l-1.406 8.015h-3.99l1.334-7.614c.333-1.935-.259-3.41-2.439-3.41-1.586 0-2.836.96-3.432 2.002-.172.28-.304.693-.37 1.082l-1.389 7.94h-3.99l1.638-9.48c.204-1.172.352-2.361.468-3.376l.105-.94 3.515 2.084h.093c.879-1.047 2.746-2.083 5.238-2.083zm47.889 0c2.75 0 5.364 1.515 4.625 5.78l-1.404 8.015h-3.992l1.334-7.614c.335-1.935-.257-3.41-2.439-3.41-1.585 0-2.836.96-3.432 2.002-.172.28-.305.693-.37 1.082l-1.389 7.94h-3.992l1.639-9.48c.229-1.319.389-2.659.511-3.748l.063-.567 3.515 2.083h.092c.85-1.011 2.618-2.012 4.982-2.08l.257-.003zM20.633 2l-.494 2.866h-7.105l-2.949 16.84h-3.99l2.948-16.84H2L2.498 2h18.135zm78.69 2.414l7.861 6.344h-4.978l-1.92 10.949h-3.992l1.915-10.949H95.93l-1.768-2.543h4.495l.666-3.801zm-76.389 5.825c-2.456 0-3.805 1.906-4.221 3.287h6.943c.233-1.248-.05-3.287-2.722-3.287zm47.888 0c-2.453 0-3.803 1.906-4.219 3.287h6.943l.028-.175c.175-1.255-.199-3.112-2.752-3.112z\\\"></path></g></g></g></svg>\",\"xiaomimimo\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 10.0671 1\\\" data-combine-word=\\\"MiMo\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"#000\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M.958 15.936a.459.459 0 01.459.44v2.729a.46.46 0 01-.918 0v-2.729a.459.459 0 01.459-.44zm4.814-2.035a.46.46 0 01.553.45v4.754a.458.458 0 11-.918 0V15.48L3.74 17.202a.462.462 0 01-.655.016.462.462 0 01-.065-.082L.628 14.67a.459.459 0 01.658-.637l2.124 2.187 2.127-2.188a.46.46 0 01.235-.13zm2.068.004a.46.46 0 01.458.445v4.755a.46.46 0 01-.458.458.459.459 0 01-.458-.458V14.35a.459.459 0 01.458-.445zm1.973 2.014a.46.46 0 01.46.457v2.729a.46.46 0 01-.784.324.46.46 0 01-.134-.324v-2.729a.46.46 0 01.458-.458zm.002-2.045a.458.458 0 01.328.157l2.127 2.19 2.125-2.19a.459.459 0 01.784.318v4.756a.46.46 0 01-.455.458.46.46 0 01-.458-.458V15.48l-1.667 1.723a.46.46 0 01-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46 0 01-.008-.667.461.461 0 01.338-.128zm6.797 1.206a.46.46 0 01.53.651A1.966 1.966 0 0019.81 18.4a.462.462 0 01.623.18.46.46 0 01-.181.624 2.863 2.863 0 01-1.38.353l-.142-.004a2.88 2.88 0 01-2.393-4.263.461.461 0 01.274-.21zm.864-.931a2.884 2.884 0 013.915 3.914.46.46 0 01-.402.24l-.057-.004a.458.458 0 01-.164-.055.46.46 0 01-.182-.622 1.967 1.967 0 00-2.669-2.67.459.459 0 11-.441-.803zM9.59 6.368c1.481 0 1.696 1.202 1.696 1.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133 0-1.289-.03-1.384-1.136-.082-.932.675-1.61 2.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379 1.012-.567 1.764-.567zm4.427.1c1.263 0 2.082.97 2.083 2.15 0 1.181-.824 2.154-2.083 2.154-1.26 0-2.084-.972-2.084-2.152 0-1.18.82-2.153 2.084-2.153zm6.801.015c.68 0 1.202.465 1.197 1.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628 0-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22 1.22 0 01.947-.516c.398 0 .76.193.982.686a1.321 1.321 0 011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311 8.07l2.14 2.602H4.24L2.725 8.796 1.21 10.672H0L2.138 8.07.13 5.583h1.138l1.458 1.772zm4.149 3.317h-.916V6.644h.916v4.028zm16.99 0h-.916V6.644h.916v4.028zM9.925 8.71c-1.055 0-1.359.412-1.326.742.032.329.324.537.757.537a1.013 1.013 0 001.014-.968l.002-.31h-.447zM14.018 7.3c-.663 0-1.184.487-1.184 1.32 0 .832.52 1.32 1.184 1.32.662 0 1.182-.49 1.182-1.32 0-.832-.52-1.32-1.182-1.32zM6.417 5.001a.568.568 0 01.587.582.588.588 0 01-1.175 0A.57.57 0 016.417 5zm16.991 0a.57.57 0 01.592.582.588.588 0 01-1.174 0 .57.57 0 01.357-.542.572.572 0 01.225-.04z\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M.958 15.936a.459.459 0 01.459.44v2.729a.46.46 0 01-.918 0v-2.729a.459.459 0 01.459-.44zm4.814-2.035a.46.46 0 01.553.45v4.754a.458.458 0 11-.918 0V15.48L3.74 17.202a.462.462 0 01-.655.016.462.462 0 01-.065-.082L.628 14.67a.459.459 0 01.658-.637l2.124 2.187 2.127-2.188a.46.46 0 01.235-.13zm2.068.004a.46.46 0 01.458.445v4.755a.46.46 0 01-.458.458.459.459 0 01-.458-.458V14.35a.459.459 0 01.458-.445zm1.973 2.014a.46.46 0 01.46.457v2.729a.46.46 0 01-.784.324.46.46 0 01-.134-.324v-2.729a.46.46 0 01.458-.458zm.002-2.045a.458.458 0 01.328.157l2.127 2.19 2.125-2.19a.459.459 0 01.784.318v4.756a.46.46 0 01-.455.458.46.46 0 01-.458-.458V15.48l-1.667 1.723a.46.46 0 01-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46 0 01-.008-.667.461.461 0 01.338-.128zm6.797 1.206a.46.46 0 01.53.651A1.966 1.966 0 0019.81 18.4a.462.462 0 01.623.18.46.46 0 01-.181.624 2.863 2.863 0 01-1.38.353l-.142-.004a2.88 2.88 0 01-2.393-4.263.461.461 0 01.274-.21zm.864-.931a2.884 2.884 0 013.915 3.914.46.46 0 01-.402.24l-.057-.004a.458.458 0 01-.164-.055.46.46 0 01-.182-.622 1.967 1.967 0 00-2.669-2.67.459.459 0 11-.441-.803zM9.59 6.368c1.481 0 1.696 1.202 1.696 1.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133 0-1.289-.03-1.384-1.136-.082-.932.675-1.61 2.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379 1.012-.567 1.764-.567zm4.427.1c1.263 0 2.082.97 2.083 2.15 0 1.181-.824 2.154-2.083 2.154-1.26 0-2.084-.972-2.084-2.152 0-1.18.82-2.153 2.084-2.153zm6.801.015c.68 0 1.202.465 1.197 1.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628 0-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22 1.22 0 01.947-.516c.398 0 .76.193.982.686a1.321 1.321 0 011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311 8.07l2.14 2.602H4.24L2.725 8.796 1.21 10.672H0L2.138 8.07.13 5.583h1.138l1.458 1.772zm4.149 3.317h-.916V6.644h.916v4.028zm16.99 0h-.916V6.644h.916v4.028zM9.925 8.71c-1.055 0-1.359.412-1.326.742.032.329.324.537.757.537a1.013 1.013 0 001.014-.968l.002-.31h-.447zM14.018 7.3c-.663 0-1.184.487-1.184 1.32 0 .832.52 1.32 1.184 1.32.662 0 1.182-.49 1.182-1.32 0-.832-.52-1.32-1.182-1.32zM6.417 5.001a.568.568 0 01.587.582.588.588 0 01-1.175 0A.57.57 0 016.417 5zm16.991 0a.57.57 0 01.592.582.588.588 0 01-1.174 0 .57.57 0 01.357-.542.572.572 0 01.225-.04z\\\"></path></g></g></g><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.6993 -0.1157) scale(0.050714)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path clip-rule=\\\"evenodd\\\" d=\\\"M34.192 6.736c5.13 0 5.87 4.168 5.87 5.733v9.174h-3.171v-1.497C35.99 21.344 34.147 22 32.18 22c-.46 0-4.46-.107-4.788-3.936-.283-3.23 2.335-5.58 7.103-5.58h2.395c0-1.948-1.27-3.068-3.405-3.068a6.746 6.746 0 00-4.152 1.586l-1.248-2.298c1.679-1.313 3.505-1.968 6.106-1.968zm1.156 8.115c-3.65 0-4.7 1.425-4.588 2.566.11 1.141 1.12 1.861 2.622 1.861a3.5 3.5 0 003.509-3.353l.005-1.074h-1.548zM49.511 7.083c4.373 0 7.21 3.362 7.21 7.454 0 4.09-2.85 7.458-7.21 7.458-4.358 0-7.21-3.367-7.21-7.456 0-4.088 2.835-7.456 7.21-7.456zm0 2.885c-2.294 0-4.093 1.686-4.093 4.571 0 2.884 1.8 4.573 4.093 4.573 2.295 0 4.093-1.693 4.093-4.573 0-2.881-1.797-4.57-4.093-4.57z\\\"></path><path d=\\\"M109.72 2.376a1.58 1.58 0 01.923.082 1.583 1.583 0 01.991 1.475v16.47a1.593 1.593 0 01-.463 1.126 1.59 1.59 0 01-2.714-1.125V7.847l-5.769 5.966a1.596 1.596 0 01-2.268.057 1.593 1.593 0 01-.228-.285L91.914 5.04a1.593 1.593 0 01.075-2.206 1.59 1.59 0 012.203-.008l7.354 7.58 7.362-7.58c.219-.228.502-.385.812-.45zM116.876 2.391c.413 0 .81.16 1.107.449.295.288.466.68.477 1.093v16.476a1.584 1.584 0 01-2.706 1.12 1.591 1.591 0 01-.465-1.123V3.933a1.585 1.585 0 011.587-1.542zM123.707 9.366a1.587 1.587 0 011.585 1.589v9.449a1.593 1.593 0 01-.463 1.125 1.59 1.59 0 01-2.246 0 1.596 1.596 0 01-.463-1.125v-9.45a1.588 1.588 0 011.587-1.588zM123.712 2.282a1.591 1.591 0 011.132.545l7.366 7.59 7.352-7.59a1.583 1.583 0 012.441.228c.176.26.27.567.272.88v16.471a1.598 1.598 0 01-1.577 1.589 1.587 1.587 0 01-1.585-1.589V7.85l-5.769 5.966a1.597 1.597 0 01-1.117.481 1.592 1.592 0 01-1.129-.448l-.019-.023-.015-.012-8.496-8.775a1.597 1.597 0 01-.51-1.148 1.6 1.6 0 01.481-1.16c.154-.15.34-.267.542-.344.201-.077.416-.113.631-.104zM93.056 9.426a1.592 1.592 0 011.59 1.529v9.449a1.6 1.6 0 01-.469 1.125 1.59 1.59 0 01-.517.342 1.587 1.587 0 01-2.191-1.467v-9.45a1.592 1.592 0 011.587-1.528zM147.235 6.461a1.587 1.587 0 011.832 2.256 6.82 6.82 0 00-.772 4.238 6.819 6.819 0 001.926 3.855 6.803 6.803 0 008.082 1.155 1.595 1.595 0 012.157.624 1.603 1.603 0 01-.151 1.76c-.13.163-.291.299-.473.4a9.903 9.903 0 01-4.777 1.224 9.962 9.962 0 01-7.014-2.853 9.98 9.98 0 01-2.989-6.96 9.993 9.993 0 011.231-4.973 1.59 1.59 0 01.948-.726zM73.054 7.138c2.354 0 4.157 1.608 4.14 5.361v9.154h-3.167v-8.257c0-1.08-.004-3.395-2.181-3.395-2.174 0-2.174 2.314-2.174 2.905v8.745h-3.078v-8.745c0-.591-.003-2.905-2.179-2.905-2.175 0-2.174 2.316-2.174 3.395v8.257h-3.172V7.69h3.172v1.232a4.222 4.222 0 013.276-1.784c1.38 0 2.632.667 3.4 2.377a4.567 4.567 0 014.138-2.377zM10.431 10.16l5.044-6.143h3.94l-6.953 8.618 7.4 9.016h-4.189l-5.242-6.5-5.239 6.5H1l7.399-9.018-6.95-8.616h3.939l5.043 6.142zM24.793 21.65h-3.17V7.694h3.17v13.958zM83.595 21.65h-3.17V7.694h3.17v13.958zM150.224 3.236a9.975 9.975 0 016.21-1.13 9.98 9.98 0 018.465 8.475 10.003 10.003 0 01-1.126 6.216 1.592 1.592 0 01-1.392.828 1.59 1.59 0 01-1.391-2.357 6.819 6.819 0 00-1.154-8.093 6.802 6.802 0 00-8.085-1.155 1.582 1.582 0 01-1.223.158 1.588 1.588 0 01-1.159-1.365 1.596 1.596 0 01.364-1.183c.136-.162.302-.297.491-.394zM23.208 2.004a1.964 1.964 0 012.03 2.013 2.038 2.038 0 01-.594 1.438 2.034 2.034 0 01-1.436.597 2.033 2.033 0 01-1.877-1.257 2.037 2.037 0 01-.156-.778 1.97 1.97 0 012.033-2.013zM82.013 2.002A1.963 1.963 0 0184.06 4.02a2.03 2.03 0 11-4.063 0 1.97 1.97 0 012.016-2.018z\\\"></path></g></g></g></svg>\",\"zai\":\"<svg fill=\\\"none\\\" viewBox=\\\"0 0 4.1567 1\\\" data-combine-word=\\\"GLM\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><clipPath id=\\\"crop-zai\\\"><rect x=\\\"1.7500\\\" y=\\\"-1\\\" width=\\\"2.4067\\\" height=\\\"3\\\"/></clipPath><g class=\\\"dsh-combine-mark-color\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"#000\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z\\\"></path></g></g></g><g class=\\\"dsh-combine-mark-mono\\\"><g transform=\\\"translate(-0.0000 -0.2250) scale(0.060417)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z\\\"></path></g></g></g><g clip-path=\\\"url(#crop-zai)\\\"><g class=\\\"dsh-combine-text\\\"><g transform=\\\"translate(1.6480 -0.1020) scale(0.051020)\\\"><g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\"><path d=\\\"M8.904 2c1.374 0 2.56.285 3.608.853 1.048.567 1.858 1.346 2.433 2.332.576.988.865 2.077.865 3.27v.138a.346.346 0 01-.09.237.287.287 0 01-.219.099h-3.658a.287.287 0 01-.219-.099.338.338 0 01-.09-.237c0-.727-.235-1.346-.708-1.858-.473-.511-1.113-.768-1.92-.768-.807 0-1.426.279-1.906.838-.48.558-.722 1.285-.722 2.178v6.006c0 .893.268 1.62.8 2.179.53.559 1.2.838 2.008.838.756 0 1.365-.22 1.829-.655.464-.437.696-1.049.696-1.83v-.782c0-.093-.044-.138-.13-.138H8.904a.287.287 0 01-.218-.099.338.338 0 01-.09-.237V11.19c0-.093.03-.171.09-.237a.287.287 0 01.218-.099h6.597c.086 0 .159.033.219.1.06.065.09.143.09.236v3.798c0 1.397-.29 2.627-.865 3.688a6.048 6.048 0 01-2.42 2.458c-1.04.577-2.247.865-3.62.865-1.374 0-2.58-.297-3.62-.893a6.179 6.179 0 01-2.42-2.514C2.288 17.513 2 16.263 2 14.849V9.122c0-1.415.287-2.657.864-3.73a6.222 6.222 0 012.421-2.5C6.325 2.298 7.531 2 8.905 2zm58.488.479c.184 0 .302.09.353.273l2.907 12.442c.017.055.043.082.078.082.034 0 .057-.027.076-.082l2.856-12.442c.051-.182.168-.273.355-.273h3.79c.101 0 .178.036.23.109.05.073.057.165.024.274l-5.18 18.485c-.051.182-.161.273-.33.273H68.71c-.168 0-.278-.09-.33-.273h-.003L63.272 2.862l-.026-.11c0-.182.093-.273.277-.273h3.869zm-45.29.003c.084 0 .156.033.216.095a.33.33 0 01.087.232V17.6c0 .09.042.137.126.137h8.063c.084 0 .155.033.216.095a.33.33 0 01.088.232v3.227a.33.33 0 01-.088.231.282.282 0 01-.216.095H18.512a.279.279 0 01-.168-.053l-.045-.04a.332.332 0 01-.088-.232V2.809a.33.33 0 01.088-.232.278.278 0 01.215-.095h3.588zm25.99-.002a.29.29 0 01.216.095.332.332 0 01.087.233v18.484a.33.33 0 01-.087.231.281.281 0 01-.215.095h-3.59a.284.284 0 01-.215-.095.33.33 0 01-.087-.231V10.3c0-.073-.017-.11-.052-.11-.034 0-.067.028-.1.083l-2.173 3.772c-.068.146-.186.22-.354.22h-1.795c-.168 0-.287-.074-.355-.22l-2.198-3.8c-.035-.055-.068-.082-.1-.082-.034 0-.051.036-.051.11v11.019a.33.33 0 01-.088.231.282.282 0 01-.216.095H33.13a.285.285 0 01-.216-.095.33.33 0 01-.088-.231V2.809a.33.33 0 01.088-.232.28.28 0 01.216-.095h3.564c.152 0 .269.073.355.22l3.514 5.96c.05.11.1.11.15 0l3.463-5.96c.067-.147.184-.22.354-.22l-.004-.002h3.566zm12.506 8.496v3.63h-7.416v-3.63h7.416z\\\"></path></g></g></g></g></svg>\"}\nexport const COMBINE_WORDS = {\"baidu\":\"Baidu\",\"bytedance\":\"ByteDance\",\"celestoai\":\"celestoai\",\"claude\":\"Claude\",\"cohere\":\"Cohere\",\"deepseek\":\"DeepSeek\",\"gemini\":\"Gemini\",\"gemma\":\"Gemma\",\"grok\":\"Grok\",\"inception\":\"inception\",\"kimi\":\"Kimi\",\"longcat\":\"longcat\",\"meta\":\"Meta\",\"microsoft\":\"Azure\",\"minimax\":\"Minimax\",\"mistral\":\"Mistral\",\"nanobanana\":\"Nano Banana\",\"nova\":\"Nova\",\"openai\":\"GPT\",\"perplexity\":\"Perplexity\",\"qwen\":\"Qwen\",\"stepfun\":\"Step\",\"tencent\":\"Hunyuan\",\"xiaomimimo\":\"MiMo\",\"zai\":\"GLM\"}\nexport const BUILD_ID = \"%%BUILD_ID%%\"\nexport const CLIENT_VERSION = \"0.13.2\"\nexport const CRAB_SHEET_URLS = {\"idle\":{\"body\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAAAwCAYAAABHTnUeAAAA+ElEQVR42u3bsQ3CQAwF0H+IXRgigzAKMzBEBmCHLMI0UNGcBAGl4BS/VwL6FVaMjVs698v5kQ1O11v79L58+SPlHwKFvS2AaV4yzctqwLefky9/xHxPAEprW3sq2GULBAoAFADs+DdAzInlxx4AtECgAKCQ41qv9Oq5+t6pf/3X3ky+/BHyPQHQAoECgNgDmBPLjz0AuAfwf3H57gHAPQCYAoECAAUA9gAxh5YfewDQAoECgLgH8H90+XEPAFogUAAQewD58mMPAO4B5NfgHoASXyD3AGAKBAoAFADYA8QcWn7sAUALBAoA4h5Avvy4BwAtECgA+LcnkKN/7mnIqCwAAAAASUVORK5CYII=\",\"ink\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAAAwCAYAAABHTnUeAAAAOklEQVR42u3BMQEAAADCoPVP7W8GoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgDeQMAABeOTGmAAAAABJRU5ErkJggg==\"},\"idle-look\":{\"body\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAABACAYAAABMbHjfAAABSUlEQVR42u3dwY3CMBAF0B9ELxSRQiiFGigiBdBDGqEaOOViCQJERE783nFZfYlII088tuhSuF/Ojyxwut66d5/Ll19T/iHQsJcF0A9j+mGcDfj0/+R7NjXmWwFoWre0p4JdtkCgAEABwI7fAWKfWH7MAUALBAoAGnKc65Wmnqvsncq/f9ubyZdfQ74VAC0QKACIOYB9YvkxB4CWWyDnxeUvyd/Sd7AC4D6Ax4AWCBQAKAAwB4h9YvkxBwAtECgAiPsAzqPLj/sAoAUCBQAxB7APLT/mAOD3AeJcvfwN5VsBcB/AY0ALBAoAFACYA8Q+sfyYA4AWCBQAxH0A59Hlx30A0AKBAoCYA9iHlr9SvhUA1ioA58U9m5p/g8AKAO4DsGf/fiewAuAdABQAmAPYh5YfcwDQAoECgLgP4Dy6/NryrQCgAEABwM+e2Uo8TK1/jy4AAAAASUVORK5CYII=\",\"ink\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAABACAYAAABMbHjfAAAAR0lEQVR42u3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4N8AwEAAAWSBsuAAAAAASUVORK5CYII=\"},\"idle-wave\":{\"body\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAAAqCAYAAADlA1TjAAABJ0lEQVR42u3cyw3CMAwAUBd1F4bgyg4MwBDMwBAMwA5cGYJp4ISE+JVKLamb925IlRVVMXGauk3wV5fd5vr4e7k/NsZfbvwLU5KaSQCq1roFSpSaxy8BCsk2Mec6/rYrA4e+MVOP3/cfSvzc8VslCvYAb6wOp4iIOG/XXwP8el22+F2JZfzzGL+nQFStGbtmy765G/r+iD+t+IvME1X9T3WbYJOecBIMA+0BwjmA+BXHtwKgBAIJAOEp0EutdK+5Pj2ffb6uby0mvvgl41sBUAKBBAAAAKLGVyFCxxY2wRB1HoRNval57i97oR9AiUX+pvjsTdml42MPAJGuKX7spubwhTisAJri0RQP9gCgKT6cA2AFAAkAEgBCU3zq+FgBQAKABICR3AAtroMyqwB90gAAAABJRU5ErkJggg==\",\"ink\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAAAqCAYAAADlA1TjAAAANklEQVR42u3BMQEAAADCoPVPbQZ/oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4DH4qAAH4CjvkAAAAAElFTkSuQmCC\"},\"idle-laptop\":{\"body\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARAAAACKCAYAAABigBWEAAAFPElEQVR42u3dv20cRxQH4HeH7UEKlbEIBk4MsASnBlyEa2ARBJiyBANMGLgIZwqlKuRopeOC93/m5u3M9wFMhJP4087tu9nZ2zcRAAAAAAAAACSyufQv/vf3Hz+u+cV3jy+bEv8BOXLmYAyTQ0ANCuoYObbXBrp/eo37p9dir5OjrxyYgUDzGUyrSys5DufY3GrqU2qKJkfOHLVzyZEzxzagoiyXSHLUyeEShhRv5tm/f/0ux4pyKCBUvfNyygnw0WtKX+O3yDHC8ZguveZqdVtKjpw5erqF7JZ6WAMB6lNAi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Fzb4D1rU6XYMioohA4yWMdvn1ljOwZAGx3o99BwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAjN0jO0KHi9KHDAAAAAElFTkSuQmCC\"},\"thinking\":{\"body\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARAAAACACAYAAADDGzbiAAACOklEQVR42u3dsW2EMBSA4ccpu2QIt+yQARgiM2QID5Ad3DLETZNUSMjlnTEYfV95IsmfxuLJ1jkCAAAAAAAAAAAAAAAAAAAAALiK6dUffH5//b3zhz9/fqcW/4AOHTrO63i888tSLpFyafacDh06xup4BMCLPt754XWZmz6nQ4eOsTqmXrNTqxlPhw4d1+kwwgAWEMACAoRzIPbXdegI50AAjDCABQSImxwk289E22xVz0j150ftS+vQoaN/hzcQwAgDWEAAAAAAAAAAAAAAAAAAAAAAAIBwL4wOHTpGuRcm5RIpl2bP6dChY6wOX2kIxCnXOqzL3PQ5HTp0jNUx9ZqdWs14OnTouE6HEQawgAAWECCcA7G/rkNHOAcCYIQBLCBA3OQg2X4m2marekaqPz9qX1qHDh39O7yBAEYYwAICAAAAAAAAAAAAAAAAAAAAAACEe2F06NAxyr0wKZdIuTR7TocOHWN1+EpDIE651mFd5qbP6dChY6yOqdfs1GrG06FDx3U6jDCABQSwgADhHIj9dR06wjkQACMMYAEB4iYHyfYz0TZb1TNS/flR+9I6dOjo3+ENBDDCABYQAAAAAAAAAAAAAAAAAAAAAAAg3AujQ4eOUe6FSblEyqXZczp06Birw1caAnHKtQ7rMjd9TocOHWN1TL1mp1Yzng4dOq7TYYQBLCCABQQI50Dsr+vQEc6BABhhAAsIEDc5SLafibbZqp6R6s+P2pfWoUNH/w5vIIARBrCAAAP5B781IFkfFpUqAAAAAElFTkSuQmCC\",\"ink\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARAAAACACAYAAADDGzbiAAABWElEQVR42u3dMQ6DQAxFwQ/3v7PTpI4olo3BM1L6V0QrsSA7AQAAAAAAAAAAAHiB+v50bOw4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YW6S9y/jZM1ljwAAAABJRU5ErkJggg==\"},\"music\":{\"body\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPAAAABGCAYAAADyxhn6AAACC0lEQVR42u3dwW3CMBQG4BeUXTpEr+zAAAzRGToEA3SHXhmi09BTpKpSQoBgm+fvu9btA/8Px0klHAEAAAAAAAAAAAAAAAAAAAAAACkMcz/4+ThcHvnDb59fwz2/V6tub+Sbw7jVxNZqJA29rq58c+Y7WsOe0yClrhSP1n0/fUdExPm432Rc63Wz5btbM9HTJG4x7paAa9TtyfvpO87HfZyP+8U5XDuu9boZ+3kotdWZW7Fq1Z17HVtdGVqrK9/DZVoQ/i4OSwvH0rhW6g6lJvzaGy5dt9eGlm+uuuPcgNIPH2rVrXVFqFVXvrny9RCrkw8uOfMdNTTyjdf/P3DvDVhqa1errnxz5rsTNbwuH2DIvIX+//Rwbouw9VPGWnV73WrK1z2whtbQ8i1c1xYa3AMDAAAAAAAAAAAAAAAAAAAAAADA3YZeT6wPB5LLNxJ9rWytrylt5etRsze0fHPm63uhn9Qgpa4Uj9bd6mDxuOPE+hp1s+W7WzPR0yRuMe6WgGvU7cl0Cvz5uF+cw7XjWq+bsZ+H3k+s//86troytFZXvofLtCD8XRyWFo6lca3UHUpN+LU3XLpurw0t31x1x2tnuESlM2vCwddPqSvfXPl6iOXEel4431FDI99wvOirN2CprV2tuvLNma/TCSEcLwq0uIV2Yr0T6+XrHlhDa2j5PqGuLTS4BwZq+AWP69iZS7atlwAAAABJRU5ErkJggg==\",\"ink\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPAAAABGCAYAAADyxhn6AAAB1UlEQVR42u3dQW7FIAwFQINy/yvTVaWq7SrhQ2xmVt0gK+Gh/EAVtwDuGj/+bjvqdnPA5GCNX8GuXHf1wv1T1wIW6FKBPqx26wIt0K45r25yXTOP33+31e0CTaVAn+aSO4Em70PoEmgK/qrafryzqq4nsEBXPCf9rrdr09JDw274RxbSaXXL/9rrjnfC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RZcEvoiyrKiWRZN9UXUqkuWLEPE1QzpZC07qy/VIy4q9vSTpVdhU30R19r7DuLd366i950sWfNlmQdrzHA4dbWeLsoKE80KTdaSsxQYRIVvV6nxCFMW4V1EQIGBAgPvIup9J0uWvohgiAgoMKjjF2zqHsxE0DXFAAAAAElFTkSuQmCC\",\"ink\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAABICAYAAACURjuuAAAAkElEQVR42u3c0QnAIAxF0Uv33zmu0I8WDJyzwAOJoJJYAAAAAAAAAHChkbUua2StyVL4C7P4wGMJAAAAAAAAAAAAAAAAACDT57JA4f+VZaIZAADApVlWXqZQjDYZ+RcRAAAAAAAAAAAAAEhne7rosclkkXEVAKcNWU4bKEb/IgIAAAAAAAAAAAAAAAAAAADvHP+lL9tVOzyTAAAAAElFTkSuQmCC\"},\"building\":{\"body\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAAARCAYAAADE46BdAAABHklEQVR42u2aMQ6CMBSGqfEOOrpxCAYXE47gauIhPAOHIGHlCCYuDB7CzVFPoRMJvIRggRb7+L6kQ0vJn77H/9KSRhEAAAAAgFeMzeTH5fixmf98v1r9tKjQQ8+ZXoisqEEAGBAAA/aR5LcoyW+Dn9uCHnoYEACcsbaZfD8fRj2f+uA+Vu962re0dputqvX5zt8c8VRvQNs/WfBfkL+ADSgrmkb6qnTIzJE/zfHkDAiw5DOgD+KsNJq3T9rXBxMbsHk7wfX2wveWKS0q49MEc2wJfebPdzzVG1BeBaqDW1dx2Zfz6vfHfnjoDdNbav7UnwFlleuqenJ8aGBd6sVZaeqmcX1LjKdaA8rKJftd479eqk2LyjSbaz3Wp0svRL7741H17CprKQAAAABJRU5ErkJggg==\",\"ink\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAAARCAYAAADE46BdAAAAiElEQVR42u3bwQ2AMAwDwIb9dw4zAKJV3bs3yFKDBY9Q451+eH2Nb+TJi3RNOMy398iTF68WHErJk+dt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IZ1zUCjRq89R1WmRO17iuLwXo22dI2UpFIeL/CBPmUAdBpj9MPtSBe3fjurKEneERIQasPoEoBQAAAAAAAAAAAAAAAAAAAAAAXOALqhfvSfh7RAEAAAAASUVORK5CYII=\"},\"notification\":{\"body\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAAA4CAYAAACrHfdzAAABJUlEQVR42u3czQ0BURgF0DsyvSjCVg8KUIQaFKEAPdgqQjWsJEjGDDNvIs85O4nchfjm/ZCbAAAAAAAAAFCXZurAy25zfXy93B8b+fPl85mFj4B/1vY9oUqvEPKnze9bUeQ/57ddb1wdTkmS83b9NnDo++TPkz90iyW/ZwDGKr23lY8zAIzUTL2nfX2yyZ83n5GHYOpwH7RSA1ZLvgGo9Isvf1i+MwB+CXZPLP9f860AxDUoGACIa9Cua6iu++tvr6vky/+FfCsAtkBgAAAAAAAAAAAAohs0ujujGzT+CwTRDaq7M7pBoxs0ujujG1Q3aPTTRDeoMwBEN6j86AbVDUp0g0Y3KM4u0Q0KukHly49uUIhrUDAAEN2g8uVHNyjYAoEBgAJum8colXsFaJEAAAAASUVORK5CYII=\",\"ink\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAAA4CAYAAACrHfdzAAAAhklEQVR42u3csQ2AQAwDQBOx/8rQMMSb3Em0X1iWSOWEJs/3tb5/nFEgBdqc/ygQm40I2OwWQZWr/H03nBNI/iiQ/EvzVyAAAAAAAAAAAAAAAAAAAAAgRgliGU6B5G8bFPwBILZBYxs0tkHdcPKXPwokf9ugAAAAAAAAAAAAAAAAAAAA/NcLs/xH0QBTK9kAAAAASUVORK5CYII=\"},\"compacting\":{\"body\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPAAAAAwCAYAAAAvvfcmAAAB9klEQVR42u3dzW0CMRCG4dmIXigi1/SQAlJEaqCIFEAPuaYIqklOSGgFZNkfj7Gf94ZkGK09nz3G/mCIO5w+339jAfvDcQigc7bU0a61hzV5oKe8miTg16/viIj4+XhbpV2rg2vy0M+ldbTr7YFbTeapSZ0VV14VWIFvDe7UBxi3G3/etUHeKqGmxIbVfou8KqmjqlfguQ+8dHCXztDXOnyrhCqVuHMSO6OfM/Oq2j1wb2QNcFZplxW3JSERMNISmpAaEfC4BClxDrx2THteZOdVSR3tDG6Z442tY9b4LXRGP/fGi7kaIGAAUeFZ2mXZM379aDtxxRV33bhWYEAJDYCAATzEUKMfuLe4QLiJFXyqIOBwR5f/2eTxNP1sBQ4+Vf7n55200v3AvcXlf4Y9cHAj8T/zP+8Px4GAwf/8xP5nAgb/cyu/yJHhB+4tLv8z7IHB/8z/HBGuUgLhLjSAekvo89J9LglulQrjdmuVDC3HvTx+mBv30f3vrfdvGfeybQ9xS/WzFRhQQgMgYACxmh84Gvw/VXERPXyJ5YIBoISOpXdWz/dR12gnLroUsMQCKt8D3yuZ13RvlPTIzvUDtxoXnV7k8O91gD0wAAIG8O85cOYxknNge15YgQECBkDAAKLgMVKGT5UPOScurMAACBgAAQOd8Aeuci8zP1toCQAAAABJRU5ErkJggg==\",\"ink\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPAAAAAwCAYAAAAvvfcmAAAAXklEQVR42u3asQ0AMAgEsdt/abIDHYq9ANVJX1AAAAAAAAAAwAXz2V0QFgAAmOvmOogJAAAAAAAAAAAAgLyq5lUVYQkLAADMdRCTmAAAAAAAAAAAAAAAAAAAAACAnQd7SA/xuy9XZQAAAABJRU5ErkJggg==\"},\"sleeping\":{\"body\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOgAAACECAYAAACan2dZAAAB9klEQVR42u3dzVHCQACG4S9OerEIrvZgARZhDRZBAfbA1SKsRk8gs+6YzS9kfJ4bmOTlEhPCzm4CAAAAAAAAAAAAAAAAAAAAALCZrvbm5+vz15yDPr69d2P30dTU/O3B/yi4X05Q2OsJejiecjieBg/Sul0LTU3NH/1ff/x4eWo6SOt2Sx5LU/M/NN3igu+gQKb+zDL3UXEmPErW1NQcbrqCgltcwAkKhvoZpqWpuVWzb9n5/CHKg5XvL/EFWlNT0y0uAAAAAAAAAAAAAAAAAAAAAAAAZLfTbi41tf2YKQw1NTVjVj+ImeUBK2xralph2+rImpqxwjZQ0629IGkqT6o0NTXbmq6gEE9xAScoGElkFIim5o2al/B1vHw9djtNTc1pTbe4AAAAAAAAAAAAAAAAAAAAAABAUpnVL5k/W9noWco0NTVj0jCIiasB64NqalofNNZ21NS0PijgBIXs72eWtRcmrT1K1tTUHG66goJbXMAJCob6GaalqblVs2/Z+fwhyoOV7y/xBVpTU9MtLgAAAAAAAAAAAAAAAAAAAAAAAGS3024uNbX9mCkMNTU1Y1Y/iJnlAStsa2paYdvqyJqascI2UNOtvSBpKk+qNDU125quoBBPcQEnKBhJZBSIpuaNmpfwdbx8PXY7TU3NaU23uHDHvgFW+LilN9hzCQAAAABJRU5ErkJggg==\",\"ink\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOgAAACECAYAAACan2dZAAABbklEQVR42u3dMY4CMRAAwZ7/PxoCUiLEssauCi/pAwlpvALPdI3Hm79N19LU1PzSP6CpqblA0xurqenDqam5Z3PM8pqaZ59BAQAAAAAAAACA1f3qq35zw/cZNTU1fdlZUzO/ZtHUzK9ZjAqamieNuAAAAAAAAAAAAAAAAAAAAAAAAAAA0D6rH3LHqabm31ycnZvCNTWzCkJTc6umEVdT04gLZD+opqamM4OmZh4KaWraD2pU0NS0HxQAAAAAAAAAAAAAAAAAACCXhvXxFQ5zw7URmpqa7pXR1MzFYZqaml6kpman3ern/KCpuegZFMh+UE3NLE9yptDUzEMjTU1NI66mphEXyH5QTU1NZwZNzTwU0tTUNOJqatoPCgAAAAAAAAAAAAAAAAAAkEvDsuNCUzP7QTU1Nb1ITU0fTk1NTftBNTU1gewH1dTUdKbQ1NT0xmpq2g+qqWnEBQAAAAAAAAAAAAAAAAAAAAAAAABentEVN3SBilQBAAAAAElFTkSuQmCC\"},\"waking\":{\"body\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAABACAYAAABMbHjfAAABsklEQVR42u3cwW3CMBQA0J/KuzAE1+7AAB2CGRiCAdiBa4dgGnqrUEVCiuzEdt67FQVjGX//n5g6AgAAADZiMAR9ux0P98e/d6fLUFN7a0umSN8TVIBN+zAF2TIZoPMV2vhPtycDdG53ugwlyohS7coAG5ygJTLD2OQs9TmttCsAGkv5pezP14iI+P76zHJdqyWeAKhshS49QZeSq/+lx18AuInd9PgLgMpKiKUy2dz+/L2ulhvfXOMvACottVqboK32P0mRET1t7aMEKlKi9FZCyJAjAVB6BbVCUxM7wSiBeqz5302Rvf3clzczwP58/a2PX9XQc65bun2YlQFKr6Bz35e7fcaz5WNWe/ba1LW34+HeU1a0D2CCbrr/qZfHY54yIQOs+Fz61QqndKtz/NPSK6gVup5saexlgM1P0LH35Gyr5gBLUmTdJUrOCar/MkD2L3TuF6x0q3P801orqJtIwm+BAAAAAAAAAAAAAAAA4H+G3k6HdqoF4WxQZ5viXyJBAMDkPYDTFqLpw7CQAUAAgAAA+wD2AZABQACAAIB443j01k+Hdro1MgAIABAA8NQP8RzW3H0Y1OcAAAAASUVORK5CYII=\",\"ink\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAABACAYAAABMbHjfAAAAkUlEQVR42u3cQQqAIBAF0DG6/5V1EyjtReS/B62rab6TG6tg6t8V4/HNNWjy8wsA0QTACh1d/1fNWLS0FxYADfpfQXfepwnA+RF580p3e4P21EnjHx2bYAFD/RUIABMAAAAAAAAAAAAAAAAAAAAAAAAAAChHC1KORwcBAAEAAJtgAAAAAAAAAAAAAAAAAAAAjhq4KRwHBpIvogAAAABJRU5ErkJggg==\"},\"poke-left\":{\"body\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAAAgCAYAAABw4baZAAABDklEQVR42u3bwRGCQAwF0F2HXizCQizFGijCAujBRqxG74woomYlvHdV+eNAyOKaWkaup+OtfGDfD/Xdz0RnRuZlzJIzP6crDXz6hf45L2NWtpxIu6kXDudLOZwvLw8w933kE3WNrDlnt8UT1iIvaxbP1V+35Ufr0+jMyLyMWXKWn6MmHWzfD3XJjyFryMuYlS3nL57BFJoshbbyAoPsum8/r7S480RnRnfdbFmtcyKveR0MLBFBgQFz/yo13jOYWrd+c28hOjMyL2OWnNc5OhhYIoICA0bqVmalQAcD82DFeAXoYLCxebAWs2egg4ECAxQY2Acr9sHQwQAFBgoMinmw/LNSoIOBAgMUGDR0B/glUpc7BkxsAAAAAElFTkSuQmCC\",\"ink\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAAAgCAYAAABw4baZAAAAMklEQVR42u3BMQEAAADCoPVPbQlPoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgJcBbCAAAQ5e1s0AAAAASUVORK5CYII=\"},\"poke-right\":{\"body\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAAAgCAYAAABw4baZAAABCUlEQVR42u3bwQ2CQBAF0IHQi0VQiKVYg0VQgD3QiNXonUQFIQPsvnfe5EdgmMXJNvHF83Z9xQqX+6P5tSYjIzOn5Cx5y/O6OLnpBVl6QY+WU3JWDXlT7ZxF/TBGP4ybreP8sp+Js+a1td2wzBtVahbzNVvuP+fsTzMysn5L5nXbI0veel0pb4qsvXXmHr7UrBryiikwheVBP2JhHe4bDIr/BgtzMHMweZvm6WBgiwgKDIg//kWczpY+zRLWzKAyMjJzSs6SNz9PBwNbRFBgQBxsDhY7zTtAB4MaCsyxC9DBwHmw2OncD+hgoMAABQbmYGEOhg4GKDBQYBDOg9Vzrgl0MFBggAKDRG9/9FZS9IHJcwAAAABJRU5ErkJggg==\",\"ink\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAAAgCAYAAABw4baZAAAAMklEQVR42u3BMQEAAADCoPVPbQlPoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgJcBbCAAAQ5e1s0AAAAASUVORK5CYII=\"},\"tickle\":{\"body\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANAAAAAkCAYAAAD4p7R7AAABfklEQVR42u3by3GDMBSF4QtDLykiW3pIARSRGlJECkgP2VJEqklWzng8NuGlV+b7V7ZHII7PXCQkThcJ+Hp9+b7+/vT20d37LRph6dpb1MWf8+gDwG6GNRWd466xlS13khx6curiTz26htwCSgzbreviT726hqXGz++fERExT2PsaXf9p10+317A0T62cKaeGnTxp7w//dKB8zTGPI2/JznSrlQf/7Uv/tTRV5diSC0xj085RSg5n08xhePPyYsIj4a5FtgybLeqiz/16hpaFbbmrtOiUUu6+FOfLvtAQNhIBRQQoIAABQQg9r4Ld7vScFkl+WtlZc9qytpzHnmLNqeeHLr4U48//aOD11zc2naxcoMrVZ8l9KTsmz/1+GMKB3gGAsrQSTxKpPLHCASERGpIPEqkSqRKPEqkSqRGSDxKpPJHIlUilT8SqRKp/JFIDYlHiVSJVIlHiVT+2AcCwkYqoIAABQQoIAAhkSqRyh+JVIlHiVSJVMAzEID7/AC/YppCTpcIBwAAAABJRU5ErkJggg==\",\"ink\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANAAAAAkCAYAAAD4p7R7AAAANElEQVR42u3BMQEAAADCoPVPbQdvoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfgN1JAABgIwlBQAAAABJRU5ErkJggg==\"},\"drag\":{\"body\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANAAAAAWCAYAAACxFRLdAAAA2klEQVR42u3c2w2CQBAF0MHYi0VQCKVQg0VYgD3QCNXgrzE+VpHdZXPOJwEmN2GyAwS6iIh5HJa4czpfu1jh1fly1Wktkyz1XmuHAH6mgUADQRnHd3PjWo9zZ646rWWSpd5r7Zhyw7SVXHVayyRLPXXejnD9ZYr+Mn08Sep+peu0lkmW8nXcA4GHCFBGt8W8mPrSKled1jLJUk8WKxAY4UADgQYCDQRoINBAsCfzOCyPz8yfbft231J1WsskS11ZrEBghAMNBLHLD+rijz9fSD0+V53WMslSV5Yb/YiR3qNBrscAAAAASUVORK5CYII=\",\"ink\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANAAAAAWCAYAAACxFRLdAAAAKElEQVR42u3BMQEAAADCoPVP7WENoAAAAAAAAAAAAAAAAAAAAAAAgBtHlgABq98cRwAAAABJRU5ErkJggg==\"}}\nexport const DEEPY_SHEET_URLS = {\"idle\":\"/dsh-claude-style/assets/22360387d0e1.svg\",\"idle-look\":\"/dsh-claude-style/assets/ae2250afa4d4.svg\",\"idle-spout\":\"/dsh-claude-style/assets/7f10aaf08b36.svg\",\"thinking\":\"/dsh-claude-style/assets/07ba49c55318.svg\",\"typing\":\"/dsh-claude-style/assets/917b19426a88.svg\",\"music\":\"/dsh-claude-style/assets/e4c4d54e666e.svg\",\"conducting\":\"/dsh-claude-style/assets/2d4bd629514d.svg\",\"building\":\"/dsh-claude-style/assets/84bc02d65566.svg\",\"error\":\"/dsh-claude-style/assets/d0b76604f76f.svg\",\"happy\":\"/dsh-claude-style/assets/62647b81453f.svg\",\"notification\":\"/dsh-claude-style/assets/b5c88fffcd08.svg\",\"compacting\":\"/dsh-claude-style/assets/bd48fda92d54.svg\",\"sleeping\":\"/dsh-claude-style/assets/c94f98071b0f.svg\",\"waking\":\"/dsh-claude-style/assets/aee0b9809ae6.svg\",\"poke-left\":\"/dsh-claude-style/assets/5ff45ccd6396.svg\",\"poke-right\":\"/dsh-claude-style/assets/6cda22c8c355.svg\",\"tickle\":\"/dsh-claude-style/assets/192fda8da55a.svg\",\"drag\":\"/dsh-claude-style/assets/3b6d7b199795.svg\"}", "import { UNTAGGED_SHEET_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport { STYLESHEET } from 'virtual:dsh-claude-style/generated'\nimport { FOREIGN_SHEET_TAG, PACKAGE_NAME, STYLE_ID, STYLE_PLUGIN_CSS } from '../constants'\n\n/** The generation whose stylesheet is mounted; 0 before the first mount. */\nlet sheetGeneration = 0\n\n/**\n * Park a sibling's untagged stylesheet so no package's bookkeeping can take it.\n *\n * The client module system claims every untagged `<style>` in the document\n * for the package whose factory has just materialized (`claimStyles`, reading\n * `style:not([data-plugin])`), and that package's next reload removes every\n * tag carrying its id (`removeOwnedStyles`). A sibling that mounts its sheet\n * from `apply()` — after its own materialization — leaves it untagged, so the\n * next package to materialize would take it into custody and delete it at\n * that package's next reload, stripping the sibling's rules off a page that\n * keeps running. Every untagged sheet that is not this package's own is\n * therefore parked under a resting tag: the tag carries a slash, can never\n * equal a package name, and matches no removal step, so the sibling keeps its\n * sheet — and its own teardown still removes that sheet by reference when its\n * generation ends. Two moments call this, because a sweep never waits for the\n * skin: the module scope of packages/client/src/entry.ts, the only code of ours that runs\n * before the sweep of our own materialization, and the head watch, which sees\n * a sheet arriving after it.\n */\nexport function parkForeignSheets() {\n const untagged = document.querySelectorAll<HTMLStyleElement>(UNTAGGED_SHEET_SELECTOR)\n for (const el of untagged) {\n if (el.id !== STYLE_ID) el.dataset.plugin = FOREIGN_SHEET_TAG\n }\n}\n\n/**\n * Mount the skin's stylesheet, once per generation.\n *\n * The sheet wears this package's own `data-plugin` and its own\n * `data-plugin-css` from the moment it exists — the claim sweep reads\n * untagged tags alone — so no sibling package's bookkeeping can take it, and\n * it is refreshed in place rather than replaced, so a stale generation's\n * stop can never take a newer generation's sheet away (D33).\n *\n * @returns this generation's stop function: it unmounts the sheet unless a\n * newer generation mounted after it.\n */\nexport function mountStylesheet() {\n const generation = ++sheetGeneration\n let sheet = document.getElementById(STYLE_ID)\n if (sheet === null) {\n sheet = document.createElement('style')\n sheet.id = STYLE_ID\n document.head.appendChild(sheet)\n }\n sheet.dataset.plugin = PACKAGE_NAME\n sheet.dataset.pluginCss = STYLE_PLUGIN_CSS\n sheet.dataset.skinChrome = STYLE_ID\n if (sheet.textContent !== STYLESHEET) sheet.textContent = STYLESHEET\n return () => {\n if (sheetGeneration === generation) sheet.remove()\n }\n}\n", "import { subscribeMutations } from '../core/bus'\nimport { notifyEnvironmentChange } from '../core/prefs'\nimport { parkForeignSheets } from '../core/stylesheet'\nimport { notifyAll } from './notify'\nimport type { PeerPlugin } from '../core/feature'\n\n/**\n * The other chat-behaviour plugin, when this page runs it.\n *\n * dsh-chat-ux implements the same chat-area interactions this skin ports\n * (docs/decisions D32): the same fold doors over the same clicks, the\n * same two seat keys at the same priority, the same token fade, the same\n * drawn caret. Two implementations of one behaviour on one page do not\n * merge — the fold doors both intercept the click and replay it at each\n * other, and the second seat registration at one priority throws. So while\n * that plugin is on the page the ported features stand down whole, and the\n * settings page says who took them over.\n *\n * Two signals, either one is enough:\n *\n * boot the host's own entry list (`window.__DSH_BOOT__.entries`), which\n * names every installed client entry before any of them runs, so\n * the answer holds from the first frame whichever plugin's bundle\n * the loader evaluates first.\n * style the stylesheet that plugin keeps in the head while its browser\n * half is live. Its own half mounts and removes it, so a plugin\n * hot reload in either direction shows up here — which the boot\n * list, fixed at load, cannot report.\n *\n * The boot list is read once, since it does not change after load. The\n * stylesheet is asked on every call, and while anybody is subscribed its\n * arrival or departure is noticed: a subscription to the head's child list\n * (the element is mounted there; the observation bus, D40) re-asks the\n * question and, when the answer changed, re-runs the environment — the\n * entry installs or tears down the features whose manifests yield to that\n * plugin (D42). The head is watched only while something is subscribed.\n */\n/** The other plugin's id, as its entry appears in the boot list. */\nconst PEER_ENTRY_ID = 'dsh-chat-ux'\n/** The `<style>` its browser half mounts while it is live. */\nconst PEER_STYLE_ID = 'dsh-chat-ux-style'\n\n/** The boot list's answer, and whether it has been read. */\nlet peerEntrySeen = false\nlet peerEntryRead = false\n/** The answer the last announcement carried; null before the first one. */\nlet peerAnnounced: boolean | null = null\n/** Who hears about the answer changing. */\nconst peerListeners: ((present: boolean) => void)[] = []\n/** Stops the head watch; set while at least one listener is subscribed. */\nlet stopHeadWatch: (() => void) | null = null\n\n/**\n * Whether dsh-chat-ux is installed on this page right now.\n * @returns true while the ported chat features must stand down.\n */\nfunction dshChatUxPresent() {\n if (document.getElementById(PEER_STYLE_ID) !== null) return true\n if (peerEntryRead) return peerEntrySeen\n peerEntryRead = true\n const entries = window.__DSH_BOOT__?.entries\n peerEntrySeen = Array.isArray(entries)\n && entries.some(entry => typeof entry?.id === 'string' && entry.id.includes(PEER_ENTRY_ID))\n return peerEntrySeen\n}\n\n/** Whether a plugin a manifest yields to is on the page right now. */\nexport function peerPresent(plugin: PeerPlugin) {\n if (plugin === PEER_ENTRY_ID) return dshChatUxPresent()\n throw new Error(`peer-plugin: no presence check for ${plugin}`)\n}\n\n/**\n * Ask the question again and, when the answer moved, say so.\n *\n * What is compared is the answer last announced, not a snapshot of the head:\n * the head changes for many reasons (a stylesheet of anybody's), and only\n * this plugin's own presence is news.\n *\n * The same child list carries the stylesheets that arrive with no owner: a\n * sibling that mounts its sheet from `apply()` leaves it untagged, and the\n * next package to materialize would take it into that package's bookkeeping\n * and delete it at that package's next reload. This callback runs before\n * such a materialization — a mutation callback is a microtask, a\n * materialization is a later task — so the sheet is parked here (D33) while\n * it is still nobody's. This is the only hook the skin has for a sheet that\n * arrives after its own factory ran: `parkForeignSheets()` at module scope\n * covers the sheets already in the document, and nothing of the skin runs\n * between a sibling's append and that sibling's own materialization.\n */\nexport function checkPeerPresence() {\n parkForeignSheets()\n const present = dshChatUxPresent()\n if (present === peerAnnounced) return\n peerAnnounced = present\n notifyAll(peerListeners, present)\n // The features that stand down by reading a preference hear about it\n // through the stream they already subscribe to; the one that claims seat\n // keys registers again on its own subscription above.\n notifyEnvironmentChange()\n}\n\n/**\n * Hear about dsh-chat-ux arriving on or leaving the page.\n *\n * @param listener - called with the new answer, only when it changes.\n * @returns unsubscribe.\n */\nexport function subscribePeerPresence(listener: (present: boolean) => void) {\n peerListeners.push(listener)\n if (stopHeadWatch === null) {\n stopHeadWatch = subscribeMutations(document.head, { childList: true }, checkPeerPresence)\n peerAnnounced = dshChatUxPresent()\n }\n return () => {\n const at = peerListeners.indexOf(listener)\n if (at >= 0) peerListeners.splice(at, 1)\n if (peerListeners.length > 0 || stopHeadWatch === null) return\n stopHeadWatch()\n stopHeadWatch = null\n }\n}\n", "import { FRAME_TOP_CLEARANCE_PROPERTY, FULLSCREEN_ATTRIBUTE, WINDOWS_TITLEBAR_ATTRIBUTE } from '@dsh-claude-style/contracts/dom'\n\n/** macOS: the clearance the traffic lights need, read off the host's own leading seat. */\nconst MAC_TRAFFIC_LIGHTS = 88\n/** macOS: the strip height the host declares, used when the token is absent. */\nconst MAC_BAND_HEIGHT = 48\n/** Windows: the three caption buttons at their standard size, used when the overlay cannot measure them. */\nconst WIN_CAPTION_CONTROLS = 140\n/** Windows: the strip height the host declares, used when the token is absent. */\nconst WIN_BAND_HEIGHT = 40\n\n/**\n * The host's declared caption-strip height, or `fallback` when the host\n * declares none.\n *\n * `--dsh-frame-top-clearance` is the host's own name for the strip, and the\n * one token both desktop platforms set: 48px under\n * `html[data-platform=darwin]`, and `var(--dsh-windows-titlebar-height)`\n * under `html[data-windows-titlebar]`. It is read through the computed\n * style, so that alias chain resolves to a length.\n *\n * @param fallback - the height to answer with when the token is absent.\n * @returns the height in CSS pixels.\n */\nfunction bandHeight(fallback: number) {\n const declared = parseFloat(getComputedStyle(document.documentElement).getPropertyValue(FRAME_TOP_CLEARANCE_PROPERTY))\n return isFinite(declared) && declared > 0 ? Math.round(declared) : fallback\n}\n\n/**\n * The desktop shell's native caption strip, resolved in one place.\n *\n * Both desktop platforms hand the top of the window to a native layer, and\n * every consumer of that strip asks the same three questions: whether it\n * exists, how tall it is, and which end the platform's window controls take.\n * The platforms answer differently, so the answers are resolved here once.\n *\n * - Marker. Windows marks `<html>` with `data-windows-titlebar`; macOS\n * marks it `data-platform=\"darwin\"`. The shell's preload writes both.\n * - Controls. Windows draws its three caption buttons at the right end and\n * publishes their box through the Window Controls Overlay API; macOS\n * draws its traffic lights at the left, at (16, 18) — the shell's own\n * `trafficLightPosition` — and publishes no measurement. The host's own\n * leading seat starts at 88px, the clearance those lights need.\n * - Fullscreen. A fullscreen macOS window hides its traffic lights, and\n * the host zeroes `--dsh-frame-chrome-top` with them, so that platform\n * answers null. Windows keeps the answer it gave before this module\n * existed: its frame holds both the strip and its padding in fullscreen,\n * and the Window Controls Overlay API's own visibility is the authority\n * there.\n *\n * Windows' answers are the ones the caption-band code computed before this\n * module existed, the Window Controls Overlay API included, so that\n * platform's behaviour is unchanged.\n *\n * @returns {{ platform: 'win32' | 'darwin', height: number, controls: { side: 'left' | 'right', size: number } } | null}\n * the strip, or null when the page owns its whole surface.\n */\nexport function desktopBand() {\n const root = document.documentElement\n if (root.hasAttribute(WINDOWS_TITLEBAR_ATTRIBUTE)) {\n const overlay = navigator.windowControlsOverlay\n if (!overlay || overlay.visible !== true) return null\n const rect = typeof overlay.getTitlebarAreaRect === 'function' ? overlay.getTitlebarAreaRect() : null\n if (rect && rect.width > 0 && rect.height > 0) {\n return {\n platform: 'win32',\n height: Math.round(rect.height),\n controls: { side: 'right', size: Math.max(0, Math.round(window.innerWidth - rect.right)) },\n }\n }\n // The API is present and visible with no measurement yet: the declared\n // caption height, and Windows' three caption buttons at their standard\n // size.\n return {\n platform: 'win32',\n height: bandHeight(WIN_BAND_HEIGHT),\n controls: { side: 'right', size: WIN_CAPTION_CONTROLS },\n }\n }\n if (root.dataset.platform === 'darwin') {\n if (root.hasAttribute(FULLSCREEN_ATTRIBUTE)) return null\n return {\n platform: 'darwin',\n height: bandHeight(MAC_BAND_HEIGHT),\n controls: { side: 'left', size: MAC_TRAFFIC_LIGHTS },\n }\n }\n return null\n}\n", "import type { Prefs } from '../constants'\nimport { peerPresent } from '../shared/peer-plugin'\nimport type { HostContext } from './host'\nimport type { HandleName, Handles, Ui, UiCalls } from './scheduler'\n\n/**\n * A feature's manifest (D42): every fact about the feature that something\n * outside it needs. It sits beside the feature's main module as\n * `<main>.manifest.ts` and holds data only — the build evaluates it in Node\n * (scripts/shared/read-manifests.cjs) to order the features and their stylesheets,\n * to check the switches, and to hand the smoke run its coverage table; the\n * browser half receives the runtime fields through the generated registry.\n */\nexport type FeatureManifest = FeatureIdentity & FeatureFields & FeatureSwitch\n\n/** Exactly one of `pref` and `ungated` (D29). */\nexport type FeatureSwitch =\n | {\n /** The preference that decides whether the reader gets the feature. */\n pref: keyof Prefs\n /**\n * The preference values the feature runs under, for a choice switch\n * (`chatAnimations`): a value outside the list runs its teardown. A\n * boolean switch leaves this out and is on unless stored as `false`.\n */\n prefValues?: string[]\n ungated?: never\n }\n | { /** Why the feature has no switch. */ ungated: string, pref?: never }\n\n/**\n * The install name — the failure report, the teardown and `retire()` use it —\n * and the name the feature's handle registers on `ui`. They are one name,\n * except for the settings page, whose handle is its navigation alone\n * (settingsNav): a failing sync stops the navigation and keeps the page.\n */\nexport type FeatureIdentity =\n | { id: HandleName, handle?: never }\n | { id: 'settings', handle: HandleName }\n\nexport interface FeatureFields {\n /**\n * The other features' handles this feature's modules read off `ui`\n * (D42). Its modules see `ui` as FeatureUi of this manifest, so a read\n * the manifest does not declare fails the type check.\n */\n reads?: HandleName[]\n /** Install order, and with it the scheduler's pass order: ascending, unique. */\n order: number\n /** The plugin implementing the same behaviour: while it is on the page the feature stays uninstalled (D32). */\n yieldsTo?: PeerPlugin\n /**\n * `'deferred'`: the feature's own modules leave the bundle for a chunk of\n * their own, fetched once the page is taken and installed when it arrives\n * (D39). Only for a feature the first frames can do without.\n */\n load?: 'deferred'\n /** The feature's stylesheets, relative to its directory; `rank` places each one in the concatenated sheet. */\n stylesheets: FeatureStylesheet[]\n /** The settings row of the switch this feature owns; a preference shared by several features is owned by one. */\n switchRow?: FeatureSwitchRow\n /** The smoke cases that cover the feature (`npm run smoke -- --feature <dir>`). */\n cases: string[]\n /**\n * The host contract's entries this feature's own modules name\n * (packages/contracts/src/table.ts, D44): the answer to \"what breaks if the host\n * changes this\", and the build refuses an entry no manifest claims.\n */\n contracts: string[]\n /** What the feature does, for a reader: the README's feature paragraphs (D48). */\n description: { zh: FeatureCopy, en: FeatureCopy }\n}\n\n/** The other plugins a feature can yield to. */\nexport type PeerPlugin = 'dsh-chat-ux'\n\nexport interface FeatureStylesheet {\n file: string\n /** Position in the concatenated stylesheet, shared with the theme's sheets (scripts/build.mjs). Unique. */\n rank: number\n /** The composer rules are gated (D4). */\n gate?: boolean\n}\n\n/** A line of settings copy: its key in the model copy document and the English fallback. */\nexport interface SettingsCopyLine {\n key: string\n fallback: string\n}\n\n/** The settings tabs, by id (packages/client/src/features/settings/settings-tab-*.ts). */\nexport type SettingsTabId = 'general' | 'appearance' | 'composer' | 'sidebar' | 'conversation'\n\nexport interface FeatureSwitchRow {\n tab: SettingsTabId\n /** Position among the tab's rows, shared with the rows the tab writes itself. */\n rank: number\n title: SettingsCopyLine\n desc: SettingsCopyLine\n /** The choices of a segmented control; without them the row is an on/off switch. */\n choices?: FeatureSwitchChoice[]\n}\n\n/** One choice of a switch row's segmented control: the stored value and its line of copy. */\nexport interface FeatureSwitchChoice {\n value: string\n label: SettingsCopyLine\n}\n\nexport interface FeatureCopy {\n title: string\n text: string\n}\n\n/** The manifest fields the browser half reads. */\nexport type FeatureRuntime = FeatureIdentity & Pick<FeatureFields, 'order' | 'yieldsTo' | 'switchRow'> & { pref?: keyof Prefs, prefValues?: string[], ungated?: string }\n\n/** A feature main module's `install`. */\nexport type FeatureInstall = (ctx: HostContext, ui: Ui) => (() => void) | void\n\n/**\n * One installable feature: its runtime manifest fields beside its main\n * module's `install`, or beside the address of the chunk that carries it (D39).\n */\nexport type Feature = FeatureRuntime & ({ install: FeatureInstall, chunk?: never } | { chunk: string, install?: never })\n\n/** The name a feature's handle registers under on `ui`. */\nexport function handleName(feature: FeatureIdentity): HandleName {\n return feature.handle === undefined ? feature.id : feature.handle\n}\n\n/** The handle a manifest's feature registers under. */\ntype OwnHandle<M> = M extends { handle: infer H extends HandleName } ? H : M extends { id: infer I extends HandleName } ? I : never\n\n/** The handles a manifest says its feature reads. */\ntype ReadHandles<M> = M extends { reads: readonly (infer R extends HandleName)[] } ? R : never\n\n/**\n * What one feature's modules see of `ui`: the two calls, the feature's own\n * handle and the handles its manifest `reads` (D42). Its install takes `ui` as\n * `FeatureUi<typeof manifest>`, with the manifest imported as a type.\n */\nexport type FeatureUi<M> = UiCalls & { [K in OwnHandle<M> | ReadHandles<M>]?: Handles[K] }\n\n/** The registry the entry installs from, kept for readers outside the install loop (the settings page). */\nlet registry: readonly Feature[] = []\n\nexport function setFeatureRegistry(features: readonly Feature[]) {\n registry = features\n}\n\n/** The features whose manifest places a switch row on this settings tab. */\nexport function switchRowFeatures(tab: SettingsTabId) {\n return registry.filter((feature): feature is Feature & { pref: keyof Prefs, switchRow: FeatureSwitchRow } => feature.switchRow?.tab === tab)\n}\n\n/** Whether a feature reading this preference stands down right now for a plugin it yields to. */\nexport function prefYielded(pref: keyof Prefs) {\n return registry.some(feature => feature.pref === pref && feature.yieldsTo !== undefined && peerPresent(feature.yieldsTo))\n}\n", "import { MODEL_COPY_FALLBACK_LOCALE } from '../features/model/copy-fallbacks'\nimport { hostCtx } from './host'\nimport type { HostContext } from './host'\nimport { modelCopy } from './model-copy'\nimport { readPrefs } from './prefs'\n\n/** Values for a copy string's `{name}` slots. */\nexport type CopyParams = Record<string, string | number>\n\n/** The shell's active locale id, or the document fallback when it cannot be read. */\nexport function activeLocale(ctx?: HostContext | null): string {\n const active = (ctx || hostCtx)?.get('locale')?.getSnapshot().active\n if (typeof active === 'string' && active) return active\n return modelCopy === null ? MODEL_COPY_FALLBACK_LOCALE : modelCopy.fallback\n}\n\n/** Fill a copy string's `{name}` slots from `params`; a slot with no value stays as written. */\nfunction fillTemplate(text: string, params?: CopyParams) {\n if (!params) return text\n return text.replace(/\\{(\\w+)\\}/g, (match, name: string) => Object.prototype.hasOwnProperty.call(params, name) ? String(params[name]) : match)\n}\n\n/** One localized string out of a `{ locale: text }` pair, fallback locale last. */\nexport function localized(pair: Record<string, unknown> | null | undefined, ctx?: HostContext | null) {\n if (!pair || typeof pair !== 'object') return ''\n const loc = activeLocale(ctx)\n const text = pair[loc]\n if (typeof text === 'string' && text) return text\n const prefix = typeof loc === 'string' && loc.includes('-') ? loc.split('-')[0] : (typeof loc === 'string' && loc.includes('_') ? loc.split('_')[0] : '')\n const prefixed = pair[prefix]\n if (prefix && typeof prefixed === 'string' && prefixed) return prefixed\n const fallback = modelCopy === null ? MODEL_COPY_FALLBACK_LOCALE : modelCopy.fallback\n const backstop = pair[fallback]\n if (typeof backstop === 'string' && backstop) return backstop\n const fallbackPrefix = typeof fallback === 'string' && fallback.includes('-') ? fallback.split('-')[0] : ''\n const fallbackPrefixed = pair[fallbackPrefix]\n if (fallbackPrefix && typeof fallbackPrefixed === 'string' && fallbackPrefixed) return fallbackPrefixed\n return ''\n}\n\n/**\n * One picker label: the document's localized string, else the neutral\n * English constant the bundle carries. `{name}` placeholders are filled\n * from `params`, so a label with a slot stays translatable.\n */\nexport function copyLabel(key: string, fallback: string, params?: CopyParams) {\n const text = modelCopy === null || !modelCopy.ui ? '' : localized(modelCopy.ui[key])\n return fillTemplate(text || fallback, params)\n}\n\n/**\n * One settings-page string. The settings copy rides the same document as\n * the picker copy, so the page follows the shell language too — and the\n * English constants stay as the fallback for a failed fetch.\n */\nexport function settingsCopy(key: string, fallback: string, params?: CopyParams) {\n const text = modelCopy === null || !modelCopy.settings ? '' : localized(modelCopy.settings[key])\n return fillTemplate(text || fallback, params)\n}\n\n/**\n * One account-hold easter-egg string, in the language the `banLocale`\n * preference names — NOT the shell's language. The page reproduces a real\n * Claude screen, so it is read in the language Claude wrote it in whatever\n * the rest of the UI is set to; `localized` is bypassed on purpose rather\n * than fed a fake locale, so a missing translation still falls through the\n * document's own fallback locale.\n */\nexport function banCopy(key: string, fallback: string, params?: CopyParams) {\n const pair = modelCopy === null || !modelCopy.ban ? null : modelCopy.ban[key]\n const want = readPrefs().banLocale\n const wanted = pair && typeof pair === 'object' ? pair[want] : undefined\n let text = typeof wanted === 'string' ? wanted : ''\n if (!text) text = localized(pair)\n return fillTemplate(text || fallback, params)\n}\n", "/**\n * Claude-flavored presentation of the permission presets, keyed by preset\n * id. The host's catalog decides WHICH presets a deployment offers — a\n * third-party plugin's ride in it, the auto mode plugin's `auto-mode` among\n * them — and this table decides how a known one reads. A preset the table\n * does not know falls back to the name the catalog carries, so nothing the\n * host offers is ever hidden and a machine id is never shown.\n */\nexport const PERMISSION_PRESETS: Record<string, { label: string, desc: string }> = {\n 'read-only': { label: 'Read only', desc: '仅读取文件与分析,不修改代码' },\n 'workspace-write': { label: 'Accept edits', desc: '允许编辑工作区文件' },\n 'auto-mode': { label: 'Auto mode', desc: '规则放行常规操作,其余由分类器裁决' },\n 'auto': { label: 'Auto review', desc: '无沙箱运行,调用前由模型审查' },\n 'danger-full-access': { label: 'Full access', desc: '自动执行,无需反复确认' }\n}\n\n/**\n * The control's segments, in slot order. Each slot lists the presets it may\n * bind to, best first: the deployment's own auto tier wins the slot over the\n * host's built-in Auto review, and a slot none of whose presets the host\n * offers is not drawn at all.\n */\nexport const PERMISSION_SEGMENTS = [\n { label: 'Read', presets: ['read-only'] },\n { label: 'Edit', presets: ['workspace-write'] },\n { label: 'Auto', presets: ['auto-mode', 'auto'] },\n { label: 'Yolo', presets: ['danger-full-access'] }\n]\n\n/**\n * The host's own tier names, keyed by preset id: its `permission.access`\n * dictionary holds the original Chinese names a Chinese interface shows\n * instead of a translation of Claude's own (D17).\n */\nexport const PERMISSION_ACCESS_NAMESPACE = 'permission.access'\nexport const PERMISSION_HOST_LABEL_KEYS: Record<string, string> = {\n 'read-only': 'preset.readOnly',\n 'workspace-write': 'preset.workspaceWrite',\n 'auto': 'auto.label',\n 'danger-full-access': 'preset.fullAccess'\n}\n/** The interface languages whose tier names come from that dictionary. */\nexport const PERMISSION_HOST_LABEL_LOCALE = 'zh'\n\n/** Popover row order; a preset the host offers but this list does not know follows in catalog order. */\nexport const PERMISSION_ORDER = ['read-only', 'workspace-write', 'auto-mode', 'auto', 'danger-full-access']\n\n/**\n * What the control draws before the host's first catalog read settles: the\n * shipped built-ins, with the auto slot left out the way the shipped picker\n * renders nothing until its own catalog arrives.\n */\nexport const PERMISSION_SHIPPED_PRESETS = ['read-only', 'workspace-write', 'danger-full-access']\n\n/**\n * Names for host values that are never switch targets. `custom` is the\n * host's own word for knob settings that match no preset, so the trigger\n * reads that rather than the machine value.\n */\nexport const PERMISSION_CURRENT_LABELS: Record<string, string> = { custom: 'Custom' }\n\n/** Skin-owned class names, so nothing couples to hashed CSS-module classes. */\nexport const SEGMENTS_CLASS = 'dsh-claude-segments'\nexport const SEGMENT_CLASS = 'dsh-claude-segment'\n", "import { requestFrame } from '../../core/frame'\nimport { closestConversationSession, conversationSessionId, findChatTarget, findConversationSession, sessionOutline } from '../../core/host'\nimport { CONVERSATION_SCROLL_SELECTOR, TURN_RAIL_CURRENT_SELECTOR, TURN_RAIL_INSET, TURN_RAIL_MARK_SELECTOR, TURN_RAIL_PITCH, TURN_RAIL_SCROLLER_SELECTOR, TURN_RAIL_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport { closestFrom } from '../../shared/dom'\nimport type { HostContext, HostText } from '../../core/host'\nimport type { HostLoadedTurn, HostOutlineTurn } from '@dsh-claude-style/contracts/services'\n\n/** One turn the rail shows: its number, the prompt that opened it, and whether the chat snapshot holds it. */\nexport interface TurnItem {\n turn: number\n prompt: string\n loaded: boolean\n}\n\n/**\n * The host side of the conversation navigator (docs/decisions D34):\n * ui-chat's turn rail, the turns it lists, and the jump that presses its\n * marks.\n *\n * The host's rail (TurnNavigator) stays mounted under the skin's own: its\n * mark's click is the host's whole jump — paging history in first when the\n * turn is outside the loaded window, landing it, and moving the reading\n * position — and its current mark is the host's reading position. Two\n * things follow from the rail's shape. It renders only the marks near its\n * own scroll position, so a jump to a far turn first scrolls the rail until\n * that mark exists. And its marks carry their position in the list, not\n * their turn number, so the turns are read from the same two sources the\n * host merges — the chat snapshot's loaded turns and the whole-log outline\n * — and a mark is trusted only while the rail holds as many marks as that\n * list has turns.\n *\n * @param ctx - client context: the session binding, the chat target and the locale.\n * @returns { findRail, railShown, turnItems, currentIndex, jumpToTurn, chatText, stop }.\n */\nexport function createTurnNavHost(ctx: HostContext) {\n /** Frames a jump waits for the rail to agree with the list and render the mark. */\n const MARK_WAIT_FRAMES = 30\n\n /** The rail last found, kept while it stays the shown conversation's. */\n let rail: HTMLElement | null = null\n /** What the turns were built from: the two sources' identities, and the result. */\n let sources: { sessionId: string, outline: HostOutlineTurn[] | undefined, loaded: HostLoadedTurn[] } | null = null\n let items: TurnItem[] = []\n /** The jump in flight: its generation and what cancels the frame it waits on. */\n let jumpGeneration = 0\n let cancelJumpFrame: (() => void) | null = null\n let stopped = false\n\n /** The shown conversation's rail, or null below two turns or away from the chat view. */\n function findRail() {\n const session = findConversationSession()\n if (rail !== null && rail.isConnected && closestConversationSession(rail) === session) return rail\n rail = session === null ? null : session.querySelector<HTMLElement>(TURN_RAIL_SELECTOR)\n return rail\n }\n\n /** Whether the rail is laid out: the host hides it when the conversation is narrow. */\n function railShown(found: Element) {\n return found.getClientRects().length > 0\n }\n\n /** How many marks the rail holds, read off its scroller's content height. */\n function railMarkCount(found: Element) {\n const scroller = found.querySelector(TURN_RAIL_SCROLLER_SELECTOR)\n if (scroller === null) return -1\n return Math.round((scroller.scrollHeight - 2 * (TURN_RAIL_INSET - TURN_RAIL_PITCH / 2)) / TURN_RAIL_PITCH)\n }\n\n /**\n * The reading position's place in `list`, or -1: its mark is not\n * rendered, or the rail does not hold the list's turns yet.\n */\n function currentIndex(found: Element, list: TurnItem[]) {\n const mark = found.querySelector<HTMLElement>(TURN_RAIL_CURRENT_SELECTOR)\n if (mark === null || railMarkCount(found) !== list.length) return -1\n return Number(mark.dataset.index)\n }\n\n /** The whole-log outline's current value (the `turnOutline` projection), or undefined. */\n function outlineValue(sessionId: string) {\n return sessionOutline(ctx, sessionId)\n }\n\n /** The loaded window's turns, as the chat snapshot's turn navigation lists them. */\n function loadedTurns(sessionId: string): HostLoadedTurn[] {\n const target = findChatTarget(ctx, sessionId)\n const navigation = target === null ? undefined : target.getSnapshot()?.navigation\n return typeof navigation?.items === 'function' ? navigation.items() : []\n }\n\n /**\n * Every turn the rail shows, ascending, as `{ turn, prompt, loaded }` —\n * ui-chat's `mergeTurnRailItems` with its own entry rules: an outline\n * entry whose turn or seq is damaged is dropped, and a turn on both sides\n * keeps the loaded prompt unless that one is empty. The same array comes\n * back until either source's identity moves (the host keeps both arrays'\n * identity until an item changes), so a reader can compare by identity.\n */\n function turnItems(sessionId: string) {\n const outline = outlineValue(sessionId)\n const loaded = loadedTurns(sessionId)\n if (sources !== null && sources.sessionId === sessionId && sources.outline === outline && sources.loaded === loaded) return items\n const byTurn = new Map<number, TurnItem>()\n if (Array.isArray(outline)) {\n for (const entry of outline) {\n if (typeof entry !== 'object' || entry === null) continue\n if (!Number.isSafeInteger(entry.turn) || entry.turn < 0) continue\n if (!Number.isSafeInteger(entry.seq) || entry.seq < 0 || Object.is(entry.seq, -0)) continue\n byTurn.set(entry.turn, { turn: entry.turn, prompt: typeof entry.prompt === 'string' ? entry.prompt : '', loaded: false })\n }\n }\n for (const item of loaded) {\n const outlined = byTurn.get(item.turn)\n byTurn.set(item.turn, { turn: item.turn, prompt: item.prompt !== '' ? item.prompt : outlined?.prompt ?? '', loaded: true })\n }\n sources = { sessionId, outline, loaded }\n items = [...byTurn.values()].sort((left, right) => left.turn - right.turn)\n return items\n }\n\n /** The host's `chat` namespace translate seat, or null when it is absent. */\n function chatText(): HostText | null {\n const locale = ctx.get('locale')\n return typeof locale?.bind === 'function' ? locale.bind('chat') : null\n }\n\n /**\n * Jump to one turn by pressing its mark. The rail is first scrolled so the\n * mark renders, and nothing is pressed while the rail's mark count and the\n * list disagree (the host commits a new turn a frame after the snapshot\n * carries it). A mark that never renders is a host the rail contract no\n * longer describes, and is said loudly.\n *\n * @param turn - the turn to jump to.\n * @param onPressed - called right after the mark is pressed, with the\n * conversation's scroller and its position just before the press.\n */\n function jumpToTurn(turn: number, onPressed: (scroller: HTMLElement | null, before: number | null) => void) {\n const generation = ++jumpGeneration\n if (cancelJumpFrame !== null) cancelJumpFrame()\n cancelJumpFrame = null\n let frames = 0\n let scrolled = false\n const step = () => {\n cancelJumpFrame = null\n if (stopped || generation !== jumpGeneration) return\n const found = findRail()\n const sessionId = conversationSessionId(findConversationSession())\n if (found === null || sessionId === null) return\n const list = turnItems(sessionId)\n const index = list.findIndex(item => item.turn === turn)\n if (index < 0) return\n if (railMarkCount(found) === list.length) {\n const mark = found.querySelector<HTMLElement>(`${TURN_RAIL_MARK_SELECTOR}[data-index=\"${index}\"]`)\n if (mark !== null) {\n const scroller = closestFrom(found, CONVERSATION_SCROLL_SELECTOR)\n const before = scroller === null ? null : scroller.scrollTop\n mark.click()\n onPressed(scroller, before)\n return\n }\n if (!scrolled) {\n // railMarkCount matched the list, so the scroller it read is there.\n const scroller = found.querySelector(TURN_RAIL_SCROLLER_SELECTOR)!\n scroller.scrollTop = index * TURN_RAIL_PITCH + TURN_RAIL_INSET - scroller.clientHeight / 2\n scrolled = true\n }\n }\n if (++frames > MARK_WAIT_FRAMES) {\n throw new Error(`dsh-claude-style: the turn rail never rendered mark ${index} of ${list.length} (it holds ${railMarkCount(found)})`)\n }\n cancelJumpFrame = requestFrame({ write: step })\n }\n step()\n }\n\n return {\n findRail,\n railShown,\n turnItems,\n currentIndex,\n jumpToTurn,\n chatText,\n /** Drop the jump in flight. */\n stop() {\n stopped = true\n if (cancelJumpFrame !== null) cancelJumpFrame()\n cancelJumpFrame = null\n rail = null\n },\n }\n}\n", "import type { HostText } from '@dsh-claude-style/contracts/services'\n\n/**\n * A two-digit number for a clock or a date part: \"09\", \"23\". Every caller\n * hands it a value in [0, 60); the padding is what keeps a time string the\n * same width at every hour.\n */\nexport function pad2(value: number) {\n return value < 10 ? `0${value}` : String(value)\n}\n\n/**\n * A duration the way the host's own chat clocks write it (ui-chat's\n * formatRunDuration): each figure followed by its unit word from the `chat`\n * namespace, minutes from the first minute on and hours from the first hour,\n * joined with no separator of its own — the unit words carry their spacing.\n */\nexport function formatHostDuration(ms: number, t: HostText) {\n const total = Math.max(0, Math.floor(ms / 1000))\n const hours = Math.floor(total / 3600)\n const minutes = Math.floor(total / 60) % 60\n const seconds = total % 60\n let text = ''\n if (hours > 0) text += `${hours}${t('duration.hourUnit')}`\n if (total >= 60) text += `${minutes}${t('duration.minuteUnit')}`\n return `${text}${seconds}${t('duration.secondUnit')}`\n}\n\n/**\n * One value as text: a missing id or name reads as empty, so a lookup key\n * built from an absent provider, model or session still forms a string.\n */\nexport function textOf(value: unknown) {\n return value === undefined || value === null ? '' : String(value)\n}\n\n/**\n * One token count the way Claude Code writes it: one decimal at most, a\n * whole number without its \".0\", and a lowercase k — \"109M\", \"4.4M\",\n * \"963.6k\". The unit is picked on the rounded value, so a count just under\n * a million reads \"1M\", never \"1000k\". The turn status line, the usage\n * panel's stat cells and its model chart all print through this.\n */\nexport function formatCompactTokens(count: unknown) {\n const value = Number(count) || 0\n const units: [number, string][] = [[1e9, 'B'], [1e6, 'M'], [1e3, 'k']]\n for (let u = 0; u < units.length; u++) {\n const scaled = Math.round(value / units[u][0] * 10) / 10\n if (scaled >= 1) return String(scaled) + units[u][1]\n }\n return String(Math.round(value))\n}\n", "import { buildElement, setAttributeIfChanged } from './dom'\n\nexport const POPOVER_MARGIN = 8\n\n/** Where an anchored popover goes (resolveAnchoredPosition). */\nexport interface AnchorOptions {\n side?: 'right' | 'above' | 'above-left'\n /** Distance kept from the viewport's edges; POPOVER_MARGIN when unset. */\n margin?: number\n /** Distance between the trigger and the card. */\n gap?: number\n /** Write the position with `!important` (positionAnchoredPopover). */\n important?: boolean\n}\n\n/**\n * The viewport coordinates of a popover anchored to a trigger's box:\n * `'right'` bottom-aligns to the trigger's right (the account popover),\n * `'above'` right-aligns and opens over it, `'above-left'` matches left edges\n * (the permission menu). The hero menu resolves through this too but writes\n * the answer into custom properties, because the host re-places that card\n * from its own geometry every frame.\n *\n * @param rect - the trigger's bounding box.\n * @param width - the popover's laid-out width.\n * @param height - the popover's laid-out height.\n */\nexport function resolveAnchoredPosition(rect: DOMRect, width: number, height: number, opts: AnchorOptions = {}) {\n const margin = opts.margin || POPOVER_MARGIN\n if (opts.side === 'right') {\n let x = rect.right + margin\n if (x + width > window.innerWidth - margin) {\n x = Math.max(margin, rect.left - margin - width)\n }\n const y = Math.min(Math.max(margin, rect.bottom - height), Math.max(margin, window.innerHeight - height - margin))\n return { x, y }\n }\n if (opts.side === 'above-left') {\n const left = Math.max(margin, Math.min(rect.left, window.innerWidth - width - margin))\n let top = rect.top - (opts.gap || 0) - height\n if (top < margin) top = Math.min(rect.bottom + (opts.gap || 0), Math.max(margin, window.innerHeight - height - margin))\n return { x: left, y: top }\n }\n const x = Math.max(margin, Math.min(rect.right - width, window.innerWidth - width - margin))\n let y = rect.top - (opts.gap || 0) - height\n if (y < margin) y = Math.min(rect.bottom + (opts.gap || 0), Math.max(margin, window.innerHeight - height - margin))\n return { x, y }\n}\n\n/**\n * Position a fixed-position popover relative to its trigger. `important`\n * switches to `style.setProperty(..., 'important')`, as the account popover\n * requires; the same-value guard skips a write that would only dirty layout.\n */\nexport function positionAnchoredPopover(trigger: Element, pop: HTMLElement, opts: AnchorOptions = {}) {\n const rect = trigger.getBoundingClientRect()\n const { x, y } = resolveAnchoredPosition(rect, pop.offsetWidth, pop.offsetHeight, opts)\n const leftValue = `${Math.round(x)}px`\n const topValue = `${Math.round(y)}px`\n if (opts.important) {\n if (pop.style.left !== leftValue) pop.style.setProperty('left', leftValue, 'important')\n if (pop.style.top !== topValue) pop.style.setProperty('top', topValue, 'important')\n } else {\n if (pop.style.left !== leftValue) pop.style.left = leftValue\n if (pop.style.top !== topValue) pop.style.top = topValue\n }\n return { x, y }\n}\n\n/** The check mark a chosen row draws: one string, since every picker shares the slot. */\nexport const POPOVER_CHECK_SVG = '<svg viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 8.5l3.2 3.2L13 5\"/></svg>'\n\n/**\n * Hover dwell before a popover unfolds, and grace before it closes: 100ms is\n * what a pointer crossing a 28px trigger at an ordinary pace needs to clear\n * it, while a parked pointer opens at once; the grace lets the pointer travel\n * the gap between a trigger and its card.\n */\nexport const POPOVER_OPEN_DELAY = 100\nexport const POPOVER_CLOSE_DELAY = 100\n\n/**\n * Hover-intent helper shared by every skin popover. BOTH sides are scheduled:\n * `scheduleOpen` waits out the dwell, `scheduleClose` the grace, and `cancel`\n * clears whichever is pending (a leave needs only the one call, since\n * `scheduleClose` drops a pending open as well).\n */\nexport function createHoverIntent(open: () => void, close: () => void, openDelay: number, closeDelay: number) {\n let openTimer: ReturnType<typeof setTimeout> | null = null\n let closeTimer: ReturnType<typeof setTimeout> | null = null\n return {\n cancel() {\n if (openTimer) {\n clearTimeout(openTimer)\n openTimer = null\n }\n if (closeTimer) {\n clearTimeout(closeTimer)\n closeTimer = null\n }\n },\n scheduleOpen() {\n if (openTimer) clearTimeout(openTimer)\n openTimer = setTimeout(() => {\n openTimer = null\n open()\n }, openDelay)\n },\n scheduleClose() {\n if (openTimer) {\n clearTimeout(openTimer)\n openTimer = null\n }\n if (closeTimer) clearTimeout(closeTimer)\n closeTimer = setTimeout(() => {\n closeTimer = null\n close()\n }, closeDelay)\n },\n }\n}\n\n/**\n * The skin's popovers, one entry per popover. A picker whose second level is\n * its own card registers once, so opening that level does not fold the first.\n * An entry carries only the close path, and every closer is a no-op while its\n * popover is down, so the registry never holds \"who is open\".\n */\nconst popoverRegistry: { name: string, close: () => void }[] = []\n\n/**\n * Register (or replace) one popover's closer. Replacing by name is what makes\n * a client reload safe: the previous generation's closer points at a scope\n * that is gone.\n */\nexport function registerPopover(name: string, close: () => void) {\n for (let i = 0; i < popoverRegistry.length; i++) {\n if (popoverRegistry[i].name === name) {\n popoverRegistry[i].close = close\n return\n }\n }\n popoverRegistry.push({ name, close })\n}\n\n/** Drop one popover's entry when its feature is torn down. */\nexport function unregisterPopover(name: string) {\n for (let i = 0; i < popoverRegistry.length; i++) {\n if (popoverRegistry[i].name === name) {\n popoverRegistry.splice(i, 1)\n return\n }\n }\n}\n\n/** Close every registered popover except the one named, so two cards never share the screen. */\nexport function closeOtherPopovers(name: string) {\n for (let i = 0; i < popoverRegistry.length; i++) {\n if (popoverRegistry[i].name === name) continue\n popoverRegistry[i].close()\n }\n}\n\n/**\n * Write one menu card's open state together with the role that says the same\n * thing to the host: the host's keyboard arbitration reads every present\n * `[role=\"menu\"]` as owning the foreground, and a card kept mounted for\n * measurement answers that query while merely hidden — so the role rides the\n * open state. Only a card that IS a menu goes through here.\n *\n * The trigger's own `aria-expanded` is written here too where the caller names\n * one: the card and the control that opens it have to report the same state,\n * and a card toggled without it leaves the reader told \"collapsed\" while the\n * menu is up.\n */\nexport function setMenuPopoverOpen(card: Element, open: boolean, trigger: Element | null = null) {\n if (open) {\n card.setAttribute('data-open', 'true')\n card.setAttribute('role', 'menu')\n } else {\n card.setAttribute('data-open', 'false')\n card.removeAttribute('role')\n }\n if (trigger !== null) setAttributeIfChanged(trigger, 'aria-expanded', open ? 'true' : 'false')\n}\n\n/** The slots and classes one popover row asks for (buildPopoverItem). */\nexport interface PopoverItemOptions {\n className?: string\n role?: string\n icon?: boolean\n lines?: 1 | 2\n textClass?: string\n badge?: boolean\n check?: boolean\n}\n\n/**\n * One row of a popover card: an optional icon, the text block that takes the\n * slack, an optional badge and an optional trailing mark; the look belongs to\n * shared/popover.css. `lines: 2` splits the text block into a title and a\n * quieter second line; `textClass` replaces the shared text class.\n *\n * @returns `{ row, icon, text, desc, badge, check }`; a slot the options did\n * not ask for is null.\n */\nexport function buildPopoverItem(opts: PopoverItemOptions = {}) {\n const row = buildElement('button', opts.className ? `dsh-claude-popover-item ${opts.className}` : 'dsh-claude-popover-item')\n row.type = 'button'\n if (opts.role) row.setAttribute('role', opts.role)\n const icon = opts.icon ? buildElement('span', 'dsh-claude-popover-item-icon') : null\n if (icon !== null) row.appendChild(icon)\n let text: HTMLSpanElement\n let desc: HTMLSpanElement | null = null\n if (opts.lines === 2) {\n const col = buildElement('div', 'dsh-claude-popover-item-col')\n text = buildElement('span', 'dsh-claude-popover-item-text')\n desc = buildElement('span', 'dsh-claude-popover-item-desc')\n col.appendChild(text)\n col.appendChild(desc)\n row.appendChild(col)\n } else {\n text = buildElement('span', opts.textClass || 'dsh-claude-popover-item-text')\n row.appendChild(text)\n }\n const badge = opts.badge ? buildElement('span', 'dsh-claude-popover-item-badge') : null\n if (badge !== null) row.appendChild(badge)\n const check = opts.check ? buildElement('span', 'dsh-claude-popover-check') : null\n if (check !== null) row.appendChild(check)\n return { row, icon, text, desc, badge, check }\n}\n\n/**\n * Remove the skin's own nodes that no live reference holds: client HMR drops\n * the previous generation's disposals instead of running them, and a host\n * re-render can strand a copy in a container React replaced. Every node\n * matching `selector` under `scope` goes except the ones in `keep`.\n */\nexport function removeStrayNodes(scope: ParentNode, selector: string, keep: (Element | null)[]) {\n const nodes = scope.querySelectorAll(selector)\n for (let i = 0; i < nodes.length; i++) {\n if (keep.includes(nodes[i])) continue\n nodes[i].parentElement?.removeChild(nodes[i])\n }\n}\n", "import { READER_HOLD_ATTR, STREAM_GLIDE_ATTR } from '../constants'\nimport { subscribeMutations } from '../core/bus'\nimport { motionReduced } from '../core/prefs'\nimport { CONVERSATION_SCROLL_SELECTOR, CONVERSATION_SESSION_ATTRIBUTE, CONVERSATION_SESSION_SELECTOR, FLOW_KIND_ATTRIBUTE, FOLLOW_THRESHOLD_PX, PROCESS_BODY_SELECTOR, SUBMISSION_ECHO_SELECTOR, USER_ROW_KIND } from '@dsh-claude-style/contracts/dom'\nimport { conversationScroller, findFollowTailButton, isScrollbarStrip } from './chat-dom'\nimport { isReaderScrollIntent } from './reader-intent'\nimport { SCROLL_EASE_LEAD_PX, easeScroll, isScrollEasing, scrollEasePosition, scrollEnd, stopScrollEase } from './scroll-ease'\n\n/**\n * The chat area's scroll positions have one writer (D41): the conversation's\n * scroller and every capped process body are written here and nowhere else.\n * Features ask; this module decides, on the spring of shared/scroll-ease.ts.\n *\n * The sources, from the strongest claim to the weakest:\n *\n * jump the conversation navigator walking to a turn the reader picked\n * fold a fold's own position work: putting the position back after\n * the skin's press on a group header, and handing the follow\n * back once a door has rolled\n * composer keeping a reader at the end while the composer card changes height\n * follow the follow's hand-back at a structural moment\n * stream the stream glide: taking the host's pin back and walking the\n * distance while content streams\n * process a capped process body's catch-up\n *\n * The rules, per container:\n * - a request whose source ranks below the ease running there is refused;\n * an equal or higher one is carried out, and a write ends a running ease\n * that ranks below it;\n * - follow, stream and process requests are refused while the reader holds\n * the container (readerHolds), and their eases end the moment he does;\n * - stream requests are refused, and their eases end, for a while after\n * the reader's own message arrives: the host's jump to it stands; the\n * hold is dropped when the scroller is replaced, because a conversation\n * opening mounts its own user rows and its jump is not the one being\n * protected (claimConversation);\n * - while the reader's animation choice means \"no animation\", an ease is\n * its destination written at once.\n * The reader's own wheel is the browser's: this module only records that he\n * moved (noteIntent), so the following sources stand down. The container he\n * holds carries READER_HOLD_ATTR while he does, and the live status line's pin\n * hangs on that mark: it stands only while the follow is the one moving the\n * position, never over content the reader scrolled back to.\n *\n * The host's side of the follow is handed over here too: the pin a frame of\n * streaming writes is taken back (takeBackHostPin), the host's follow is lit\n * back up through its own button (handBackFollow), and that button is kept\n * out of sight while the stream glide follows (holdFollowButton).\n */\n\nexport { SCROLL_EASE_LEAD_PX }\n\nexport type ScrollSource ='jump' | 'fold' | 'composer' | 'follow' | 'stream' | 'process'\n\n/** Each source's rank; a higher rank's claim stands over a lower one's. */\nconst SCROLL_SOURCE_RANK: Record<ScrollSource, number> = {\n process: 1,\n stream: 2,\n follow: 2,\n composer: 3,\n fold: 5,\n jump: 6,\n}\n/** The sources that only follow the end: the reader holding a container stops them. */\nconst FOLLOWING_SOURCES = new Set<ScrollSource>(['follow', 'stream', 'process'])\n\n/** How close to a process body's end the reader has to come for his hold on it to end. */\nconst PROCESS_RELEASE_THRESHOLD_PX = 4\n/**\n * The two arrivals that are the reader's own submission rather than content\n * streaming in: his own message row, and the echo the host mounts in its\n * place before the real row takes over.\n */\nconst SUBMISSION_SELECTOR = `[${FLOW_KIND_ATTRIBUTE}=\"${USER_ROW_KIND}\"], ${SUBMISSION_ECHO_SELECTOR}`\n/**\n * How long the stream glide stands down after one of them arrives. The\n * host's own jump to a freshly sent message is deliberate — the reader has to\n * see the message he just sent — and the echo is swapped for the real row\n * about a second later, which moves the position again. The stand-down\n * covers both.\n */\nconst SUBMISSION_HOLD_MS = 1200\n/**\n * How far the position has to move past the stream's own last reading before\n * it counts as the host pinning it rather than the spring taking its own\n * step (both happen inside one frame).\n */\nconst HOST_PIN_TOLERANCE_PX = 1\n/** How many times a hand-back looks again; the host may turn its follow off a beat later. */\nconst FOLLOW_LOOK_ROUNDS = 5\n/** The gap between two looks; five of them cover the host's 500 ms sampling window. */\nconst FOLLOW_LOOK_INTERVAL_MS = 100\n\n/**\n * The reader's intent events. The conversation reads all but touchmove (a\n * touch drag starts with touchstart); a process body reads all but\n * beforematch (in-page find has nothing to do with a body); \"moved since\"\n * reads the four that really move a position.\n */\nconst INTENT_TYPES = ['wheel', 'touchstart', 'touchmove', 'pointerdown', 'keydown', 'beforematch']\nconst MOVING_INTENT_TYPES = new Set(['wheel', 'touchstart', 'pointerdown', 'keydown'])\n\n/**\n * The source of the ease running on each container; stale once the spring has let go of it.\n *\n * A WeakMap on purpose: an entry is dropped when the container is asked about\n * again, but a spring that arrives on its own never asks, and a Map would hold\n * that container — and the conversation subtree hanging off it — for the life of\n * the page. Nothing iterates the table, so weak keys cost nothing.\n */\nconst easeSources = new WeakMap<Element, ScrollSource>()\n/** The containers the reader holds: an intent was seen there and he has not come back to the end. A Set, so leaving the owner can take every mark off again. */\nconst held = new Set<Element>()\n/** The held containers the reader has since moved toward the end of: his own way back to it. */\nconst heldTowardEnd = new WeakSet<Element>()\n/** How many containers the reader holds; the page's root carries the mark while any is held. */\nlet heldCount = 0\n/** When the reader last made a moving intent, for movedSince. */\nlet lastMovingIntentAt = 0\n/** Until this moment the stream glide stands down: the reader's own message just arrived. */\nlet submissionHoldUntil = 0\n/** The conversation the owner last worked in, for the hold above; null before the first is claimed. */\nlet claimedSession: string | null = null\n/** The conversation's position as the frame started, from its scroll events; the reading a host pin is measured against. */\nlet seen: { element: Element, top: number } | null = null\n/** The host's back-to-end button while it is kept out of sight. */\nlet heldButton: HTMLElement | null = null\n/** How many features use the owner; its listeners live while one does. */\nlet members = 0\nlet stopSubmissionWatch: (() => void) | null = null\n\n/**\n * Put a container's hold down or take it up, with the mark the page can read:\n * the waiting line's pin hangs on it (chat-wait.css). Every change of\n * `held` goes through here, so the two cannot say different things.\n */\nfunction setHeld(container: Element, holding: boolean) {\n if (holding === held.has(container)) return\n if (holding) {\n held.add(container)\n heldCount += 1\n container.setAttribute(READER_HOLD_ATTR, '')\n // The stylesheet that stands the status line's pin down reads the mark on the\n // page's own root: the container is not an ancestor of the line, and a reader\n // holding anything on the page is enough for it to stand down.\n document.body.setAttribute(READER_HOLD_ATTR, '')\n return\n }\n held.delete(container)\n heldCount -= 1\n heldTowardEnd.delete(container)\n container.removeAttribute(READER_HOLD_ATTR)\n if (heldCount <= 0) document.body.removeAttribute(READER_HOLD_ATTR)\n}\n\n/** The ease running on a container now, and the source it serves. */\nfunction runningSource(container: Element) {\n if (!isScrollEasing(container)) {\n easeSources.delete(container)\n return undefined\n }\n return easeSources.get(container)\n}\n\n/** Whether `source` may move `container` now. */\nfunction claim(container: Element, source: ScrollSource) {\n claimConversation()\n const running = runningSource(container)\n if (running !== undefined && SCROLL_SOURCE_RANK[source] < SCROLL_SOURCE_RANK[running]) return false\n if (FOLLOWING_SOURCES.has(source) && readerHolds(container)) return false\n if (source === 'stream' && submissionHolds()) return false\n return true\n}\n\n/**\n * Whether the reader holds this container: he made an intent there and has\n * not come back within its end's threshold since.\n *\n * The end is not always his doing: the host's own follow keeps writing the\n * position there while a turn runs, and between those writes the gap leaves\n * the threshold for a single frame. So a position at the end is not what ends\n * the hold — his own move toward the end is (heldTowardEnd), and a hold taken\n * without one stands even with the container sitting at its end. `holdReader`\n * takes a hold that way, for a jump the reader picked himself.\n */\nexport function readerHolds(container: Element) {\n if (!held.has(container)) return false\n const threshold = container.matches(PROCESS_BODY_SELECTOR) ? PROCESS_RELEASE_THRESHOLD_PX : FOLLOW_THRESHOLD_PX\n if (container.scrollHeight - container.clientHeight - container.scrollTop > threshold) return true\n if (heldTowardEnd.has(container)) {\n setHeld(container, false)\n return false\n }\n return true\n}\n\n/** End the reader's hold on a container that no longer shows its own position (a folded body). */\nexport function releaseReader(container: Element) {\n setHeld(container, false)\n}\n\n/**\n * Take the reader's hold on a container without an intent event.\n *\n * A jump to a turn he picked is the reader choosing where to read, so the\n * following sources have to stand down the way they do after his own wheel —\n * otherwise the next burst of output drags him back to the end. The release is\n * the holds' own: his move toward the end of it, or a position that never left\n * the end when his move is the one that took the hold.\n *\n * @param container - the container the reader is now reading.\n */\nexport function holdReader(container: Element) {\n heldTowardEnd.delete(container)\n setHeld(container, true)\n}\n\n/** Whether the reader made a moving intent anywhere after `since` (a performance.now() reading). */\nexport function readerMovedSince(since: number) {\n return lastMovingIntentAt > since\n}\n\n/** Whether the stream glide stands down for the reader's own message right now. */\nexport function submissionHolds() {\n return performance.now() < submissionHoldUntil\n}\n\n/**\n * The conversation's element as it was last seen, and the session it belonged\n * to; the element is read again once a session switch replaces it.\n */\nlet sessionElement: Element | null = null\nlet sessionId: string | null = null\n\n/**\n * Note which conversation the owner is working in, and drop what belonged to the\n * previous one. Every claim asks, so past the first it is one attribute read:\n * the conversation's element is kept the way the scroller is, and a session\n * switch replaces the content inside it.\n *\n * The submission hold is armed by the nodes a conversation renders — opening a\n * session mounts its user rows, which look exactly like a message just sent —\n * and it protects the host's jump to a message the reader has just sent, which\n * belongs to the conversation he left. Left standing, it refuses the stream\n * source for its whole window over the history the new conversation just opened.\n */\nfunction claimConversation() {\n if (sessionElement === null || !sessionElement.isConnected) {\n sessionElement = conversationScroller()?.closest(CONVERSATION_SESSION_SELECTOR) ?? null\n }\n const next = sessionElement?.getAttribute(CONVERSATION_SESSION_ATTRIBUTE) ?? null\n if (next === sessionId) return\n sessionId = next\n submissionHoldUntil = 0\n seen = null\n}\n\nfunction noteIntent(event: Event) {\n if (!isReaderScrollIntent(event)) return\n const moving = MOVING_INTENT_TYPES.has(event.type)\n if (moving) lastMovingIntentAt = performance.now()\n // A wheel carries where the reader is going; the others are read as his move\n // toward the end, since none of them can be sent by a follower.\n const towardEnd = !(event instanceof WheelEvent) || event.deltaY >= 0\n if (event.type !== 'touchmove') {\n // The container is kept by shared/chat-dom.ts: a trackpad sends hundreds of\n // these a second.\n const scroller = conversationScroller()\n claimConversation()\n // Only once the content has grown a scrollbar: before that there is nothing to hold.\n if (scroller !== null && scroller.scrollHeight - scroller.clientHeight > 0) {\n if (moving && towardEnd) heldTowardEnd.add(scroller)\n setHeld(scroller, true)\n }\n }\n if (event.type === 'beforematch') return\n const target = event.target\n if (!(target instanceof Element)) return\n const body = target.closest(PROCESS_BODY_SELECTOR)\n if (body === null) return\n // A press anywhere on the body is kept for the scrollbar's own strip alone;\n // content reached through a body (a row, a link) is opening something rather\n // than scrolling it. The pointer is on the bar itself exactly when the event\n // was addressed to the body, which is what the predicate is handed; the\n // conversation's own strip is read by the same predicate, one level up.\n if (event.type === 'pointerdown' && !(event instanceof PointerEvent && isScrollbarStrip(body, event, target))) return\n // A scroll key the host has already handled knows where it is going.\n if (event.type === 'keydown' && event.defaultPrevented) return\n if (moving && towardEnd) heldTowardEnd.add(body)\n setHeld(body, true)\n}\n\n/**\n * Track the conversation's position as each frame starts: scroll events are\n * fired before the frame's own callbacks, so this is what a pin written\n * during the frame is measured against. A held container that has come back\n * to its end is released here, before content growing under it can move the\n * end away again.\n */\nfunction noteScroll(event: Event) {\n const target = event.target\n if (target instanceof Element && held.has(target)) readerHolds(target)\n if (target instanceof HTMLElement && target.matches(CONVERSATION_SCROLL_SELECTOR)) {\n // Kept with its element: a session switch replaces the scroller.\n seen = { element: target, top: target.scrollTop }\n }\n}\n\nfunction noteSubmission(records: MutationRecord[]) {\n for (const record of records) {\n for (const node of [...record.addedNodes, ...record.removedNodes]) {\n if (node instanceof Element && (node.matches(SUBMISSION_SELECTOR) || node.querySelector(SUBMISSION_SELECTOR) !== null)) {\n submissionHoldUntil = performance.now() + SUBMISSION_HOLD_MS\n return\n }\n }\n }\n}\n\n/** Every observed change of the body: a submission's arrival. */\nfunction noteBodyChanges(records: MutationRecord[]) {\n noteSubmission(records)\n}\n\n/**\n * Use the owner while a feature is installed: its intent, scroll and\n * submission watches live while any feature does.\n * @returns leave.\n */\nexport function joinScrollOwner() {\n members += 1\n if (members === 1) {\n for (const type of INTENT_TYPES) document.addEventListener(type, noteIntent, { capture: true, passive: true })\n window.addEventListener('scroll', noteScroll, { capture: true, passive: true })\n stopSubmissionWatch = subscribeMutations(document.body, { childList: true, subtree: true }, noteBodyChanges)\n }\n let left = false\n return () => {\n if (left) return\n left = true\n members -= 1\n if (members > 0) return\n for (const type of INTENT_TYPES) document.removeEventListener(type, noteIntent, true)\n window.removeEventListener('scroll', noteScroll, true)\n if (stopSubmissionWatch !== null) stopSubmissionWatch()\n stopSubmissionWatch = null\n for (const container of held) {\n container.removeAttribute(READER_HOLD_ATTR)\n heldTowardEnd.delete(container)\n }\n held.clear()\n heldCount = 0\n document.body.removeAttribute(READER_HOLD_ATTR)\n releaseFollowButton()\n seen = null\n }\n}\n\n/**\n * Put a container's position down now.\n * @returns whether the write was carried out.\n */\nexport function writeScroll(container: Element, value: number, source: ScrollSource) {\n if (!claim(container, source)) return false\n const running = runningSource(container)\n if (running !== undefined && SCROLL_SOURCE_RANK[running] < SCROLL_SOURCE_RANK[source]) stopScrollEase(container)\n container.scrollTop = value\n return true\n}\n\n/**\n * Walk a container's position toward a destination on the spring, replacing\n * the ease running there.\n * @param destination - asked every frame: the position wanted now.\n * @param wanted - asked every frame; false ends the ease where it is.\n * @param lead - the longest stretch glided (shared/scroll-ease.ts).\n * @returns whether the request was carried out.\n */\nexport function easeScrollFor(container: Element, source: ScrollSource, destination: (element: Element, end: number) => number, wanted: () => boolean, lead = SCROLL_EASE_LEAD_PX) {\n if (!claim(container, source)) return false\n if (motionReduced()) {\n stopScrollEase(container)\n container.scrollTop = destination(container, scrollEnd(container))\n return true\n }\n const following = FOLLOWING_SOURCES.has(source)\n easeScroll(container, destination, () => wanted()\n && !(following && readerHolds(container))\n && !(source === 'stream' && submissionHolds()), lead)\n easeSources.set(container, source)\n return true\n}\n\n/** Walk a container's position to its end, wherever the end goes. */\nexport function easeScrollToEndFor(container: Element, source: ScrollSource, wanted: () => boolean) {\n return easeScrollFor(container, source, (_element, end) => end, wanted)\n}\n\n/** End the ease running on a container, when it serves `source` (or whichever source, without one). */\nexport function stopScrollFor(container: Element, source?: ScrollSource) {\n const running = runningSource(container)\n if (running === undefined) return\n if (source !== undefined && running !== source) return\n stopScrollEase(container)\n easeSources.delete(container)\n}\n\n/** The position the ease last wrote on a container, or null while none runs there. */\nexport function scrollPositionFor(container: Element) {\n return scrollEasePosition(container)\n}\n\n/**\n * Take back the end the host wrote this frame while content streams, and\n * leave the distance to the stream glide.\n *\n * The reference a pin is measured against: the spring's own last write while\n * it eases (a position it has just written is one this frame may be at),\n * else the position this scroller was at as the frame started, else the end\n * the frame started at — this frame's end less the column's reported growth.\n * Only a move down is taken back: an upward one is the reader, or the host\n * going somewhere else.\n *\n * @param scroller - the conversation's scroller.\n * @param end - the end of its content, read by the caller: reading it here as\n * well paid a second layout pass in the same frame (D9).\n * @param grew - how far the message column grew this frame, when it did.\n * @returns the position the scroller sits at now, so the caller needs no\n * reading of its own after a write.\n */\nexport function takeBackHostPin(scroller: HTMLElement, end: number, grew?: number) {\n let expected = scrollEasePosition(scroller)\n if (expected === null && seen !== null && seen.element === scroller) expected = seen.top\n if (expected === null && typeof grew === 'number' && grew > 0) expected = Math.max(0, end - grew)\n const top = scroller.scrollTop\n if (expected === null || top - expected <= HOST_PIN_TOLERANCE_PX) return top\n return writeScroll(scroller, expected, 'stream') ? expected : top\n}\n\n/**\n * Keep the host's own back-to-end button out of sight while the stream glide\n * follows. A position held off the end reads to the host as a reader who left\n * it, so its settlement turns the follow off and renders the button although\n * the glide is following. The mark is this skin's own and the stylesheet hides\n * the button; the host's state is untouched.\n */\nexport function holdFollowButton() {\n // The host renders that button only while its follow is off, so finding one\n // is the reading the marker used to be asked for — and finding it costs the\n // structure walk rather than a document query on every frame of a stream (D9).\n const button = findFollowTailButton()\n if (button === heldButton) return\n releaseFollowButton()\n if (button !== null) {\n button.setAttribute(STREAM_GLIDE_ATTR, '')\n heldButton = button\n }\n}\n\n/** Let the host's button show again. */\nexport function releaseFollowButton() {\n if (heldButton === null) return\n heldButton.removeAttribute(STREAM_GLIDE_ATTR)\n heldButton = null\n}\n\n/**\n * Hand the conversation back to the host's own follow, lighting it up again\n * when it has been switched off.\n *\n * The host's follow is switched off by a scroll that looks like the reader\n * moving and does not reach the end: that scroll enters its 500 ms sampling\n * window, in which a resize follows nothing, and the settlement compares\n * position rather than intent — so the host's own focus(), a browser clamp\n * and any programmatic write all read as the reader having moved. The host\n * leaves one way back in: the back-to-end button it renders only while the\n * follow is off, whose click clears the window, lights the follow up and\n * reaches the end. Both ways are used, in this order:\n *\n * walk the position is walked to the end, so the text above the last\n * line is pushed up smoothly. Any displacement makes the host's\n * onScroll take the \"reader reached the end\" branch, which lights\n * the follow up and clears the window.\n * click no displacement means no scroll event: the start of an execution,\n * before the content has a scrollbar. Only the button works there.\n *\n * The looks in between are needed: the host often turns the follow off a\n * beat late, once its sampling window settles.\n *\n * @param source - follow for the follow's own hand-back, fold after a door.\n * @param options - stillWanted is asked before every look (the reader can\n * take over in between); onSettled runs once the round is over.\n */\nexport function handBackFollow(source: ScrollSource, options?: { stillWanted?: () => boolean, onSettled?: () => void }) {\n const stillWanted = options?.stillWanted ?? (() => true)\n const onSettled = options?.onSettled ?? null\n const scroller = conversationScroller()\n if (scroller === null) {\n if (onSettled !== null) onSettled()\n return\n }\n if (scroller.scrollHeight - scroller.clientHeight - scroller.scrollTop > 0.5) easeScrollToEndFor(scroller, source, stillWanted)\n let rounds = 0\n const look = () => {\n if (!stillWanted() || rounds >= FOLLOW_LOOK_ROUNDS) {\n if (onSettled !== null) onSettled()\n return\n }\n rounds += 1\n // The walk first, the button after it: clicking mid-walk would drop the\n // eased position for the host's own instant jump.\n if (isScrollEasing(scroller)) {\n window.setTimeout(look, FOLLOW_LOOK_INTERVAL_MS)\n return\n }\n // A pinned position does not mean the follow is back: the settlement may\n // switch it off a beat later, and after that only the button brings it\n // back. The button stands on the page only while the follow is off, so\n // finding one is the reading.\n const button = findFollowTailButton()\n if (button !== null) {\n button.click()\n if (onSettled !== null) onSettled()\n return\n }\n window.setTimeout(look, FOLLOW_LOOK_INTERVAL_MS)\n }\n window.setTimeout(look, FOLLOW_LOOK_INTERVAL_MS)\n}\n", "import { CHAT_FLOW_SELECTOR, CONVERSATION_SCROLL_SELECTOR, FOLLOW_THRESHOLD_PX } from '@dsh-claude-style/contracts/dom'\n\n/**\n * The chat area's DOM helpers: the three reads the ported chat interactions and\n * the conversation navigator make on the column itself. The literals they use\n * are the host contract's (packages/contracts/src/dom.ts, D44); everything the skin\n * writes stays with the feature that writes it.\n */\n/** The keys that scroll the viewport; the same set the host reads. */\nexport const SCROLL_KEYS = new Set(['ArrowUp', 'ArrowDown', 'PageUp', 'PageDown', 'Home', 'End', ' '])\n\n/**\n * The session's scroll container: the host hangs its follow and its fold\n * animation on it.\n *\n * Kept once it is read: every feature that writes a scroll position asks for it\n * on each frame of a stream, and a document query made after the host's own\n * write forces a style pass over the whole page (D9). A session switch replaces\n * the element, which detaches the one held here.\n */\nlet scroller: HTMLElement | null = null\n\nexport function conversationScroller() {\n if (scroller === null || !scroller.isConnected) scroller = document.querySelector<HTMLElement>(CONVERSATION_SCROLL_SELECTOR)\n return scroller\n}\n\n/**\n * The conversation's message column, kept the way the scroller is: the stream\n * glide asks for it on every frame it holds the position. A session switch\n * replaces the element, which detaches the one held here.\n */\nlet column: HTMLElement | null = null\n\nexport function conversationColumn() {\n if (column === null || !column.isConnected) column = document.querySelector<HTMLElement>(CHAT_FLOW_SELECTOR)\n return column\n}\n\n/**\n * Whether the reader is at the session's end right now, by the host's own line.\n * @param scroller - the session's scroll container.\n * @returns true within the host's own threshold of the end.\n */\nexport function isAtBottom(scroller: Element) {\n return scroller.scrollHeight - scroller.clientHeight - scroller.scrollTop <= FOLLOW_THRESHOLD_PX\n}\n\n/**\n * Whether a pointer event landed on a container's own scrollbar strip.\n *\n * The one intent with no event of its own: a drag of the bar is a pointer\n * event, so the scroll owner (shared/scroll-owner.ts) tells the strip from the\n * content by the node the event was addressed to and the geometry the browser\n * leaves beside `clientWidth`. False on an overlay scrollbar, which takes no\n * room: there the pointer is over the content, and the content is not the bar.\n *\n * @param container - the scrolling element whose strip is asked about.\n * @param event - the pointer event.\n * @param target - the node the event was addressed to (`event.target`).\n * @returns true when the pointer sits in the strip and not on the content.\n */\nexport function isScrollbarStrip(container: Element, event: PointerEvent, target: EventTarget | null) {\n if (target !== container) return false\n const box = container.getBoundingClientRect()\n return event.clientX >= box.left + container.clientWidth\n}\n\n/**\n * The host's own \"back to the end\" button, the one it renders only while its\n * follow is off.\n *\n * With the follow off, data-chat-following-tail is gone, so the frame that\n * holds the button is found by walking back out of the column: column to\n * scroll frame to frame, and the button sits beside the frame. The stream\n * glide (chat-follow.ts) needs the same button to keep it out of sight while\n * it follows.\n * @returns the button, or null when the frame or the button is not there.\n */\nexport function findFollowTailButton() {\n const root = (() => {\n const column = conversationColumn()\n if (column === null || column.parentElement === null) return null\n return column.parentElement.parentElement\n })()\n if (root === null || root.nextElementSibling === null) return null\n return root.nextElementSibling.querySelector('button')\n}\n", "import { COMPOSER_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport { SCROLL_KEYS } from './chat-dom'\n\n/**\n * Whether an event is the reader taking the scroll over.\n *\n * The scroll owner (shared/scroll-owner.ts) asks it for every intent event\n * it hears. Two rules: a pointer or key inside the composer is the reader\n * typing, and of the keys only the ones that scroll the viewport count.\n *\n * @param event - any pointer, touch or key event on the page.\n * @returns false for an event inside the composer, or a key that cannot scroll.\n */\nexport function isReaderScrollIntent(event: Event) {\n const target = event.target\n if (target instanceof Element && target.closest(COMPOSER_SELECTOR) !== null) return false\n if (event.type !== 'keydown') return true\n return event instanceof KeyboardEvent && SCROLL_KEYS.has(event.key)\n}\n", "import { requestFrame } from '../core/frame'\n/**\n * Walk a scroll container's position to where it is going instead of\n * writing it in one frame: the one scroll motion the skin draws.\n *\n * Its one reader is the scroll owner (shared/scroll-owner.ts, D41), which\n * decides whose request the spring carries on each container; the build\n * fails when anything else imports this module.\n *\n * The curve is a critically damped spring:\n *\n * acceleration = ω² × gap − 2ω × velocity\n *\n * A spring is what a moving target needs: a target that grows mid-flight is\n * just a wider gap on the next step, with no restart and no stutter, and a\n * critically damped one arrives without overshoot.\n *\n * Three things keep the motion smooth at its two ends and in between:\n *\n * start the spring is integrated in one-millisecond steps. A whole frame\n * is too coarse a step for it (ω × 16.7 ms is close to one half):\n * stepped a frame at a time, the first frame alone carried the\n * speed to its peak, and a 320px block left at 1800px/s from rest.\n * Fine steps let the speed build continuously.\n * middle the acceleration and the speed are both capped: a long gap\n * builds up over about a tenth of a second into one steady glide\n * (a little brisker than the browser's own smooth scroll), and the\n * spring takes the deceleration back once the gap is short.\n * arrival the position is kept as a fraction and the ease ends when it is\n * within half a pixel and nearly still, so the last write is\n * below a pixel. Ending at two pixels, as this once did, put a\n * 1.7px jump at the end of every glide — every streamed line came\n * to rest with a tick.\n *\n * A gap longer than the ease's lead (SCROLL_EASE_LEAD_PX unless the caller\n * gives a shorter one) is first closed to that distance on the side the\n * position comes from, then glided: every destination, near or far, is\n * reached with the same last stretch, and nobody waits for a glide across a\n * dozen screens.\n *\n * The frame's own interval drives the integration, so a dropped frame covers\n * more ground rather than arriving late, and the loop exists only while\n * something is easing — the last arrival cancels it.\n */\n/**\n * The spring's angular frequency, critical damping implied: 95% of a short\n * gap is covered in 4.74 / ω seconds, about 170ms. Compared on a replayed\n * stream with the twenty it replaced, the newest line spends a quarter to a\n * third less time hidden under the bottom edge, and with the fine steps the\n * largest change of speed between two frames is still lower than before.\n */\nconst SCROLL_EASE_OMEGA = 28\n/** The fastest the position moves, in pixels a second; past it the motion reads as a blur. */\nconst SCROLL_EASE_MAX_SPEED_PX_S = 2400\n/** The hardest the position speeds up or slows down, in pixels a second squared: full speed from rest takes a tenth of a second. */\nconst SCROLL_EASE_MAX_ACCEL_PX_S2 = 24000\n/**\n * The longest stretch that is glided. A gap past it is first closed to it\n * (see above); it is also the line the stream glide draws between a burst of\n * content and a replaced column.\n */\nexport const SCROLL_EASE_LEAD_PX = 1200\n/** Within this of the destination, and slower than SCROLL_EASE_REST_PX_S, the position has arrived. */\nconst SCROLL_EASE_DONE_PX = 0.5\nconst SCROLL_EASE_REST_PX_S = 10\n/** The integration step, in seconds. */\nconst SCROLL_EASE_STEP_S = 0.001\n/** A position more than this off the ease's own last write was moved by someone else, and is taken as it is. */\nconst SCROLL_EASE_MOVED_PX = 1.5\n/** The longest frame interval the curve counts; past it the page was hidden or held up. */\nconst SCROLL_EASE_MAX_FRAME_MS = 64\n/** One frame at 60 Hz, for the first frame of a run, which has no interval yet. */\nconst SCROLL_EASE_NOMINAL_FRAME_MS = 16.7\n\n/** One element's ease: where it is going, whether it is still wanted, and the motion it carries. */\nexport interface ScrollEase {\n destination: (element: Element, end: number) => number\n wanted: () => boolean\n lead: number\n velocity: number\n position: number | null\n lastWritten: number | null\n}\n\n/** The elements easing now, each with its destination, its test, and the motion it carries. */\nconst scrollEasing = new Map<Element, ScrollEase>()\n/** Whether the shared frame is requested; false when nothing is easing. */\nlet scrollEaseFrameQueued = false\n/** The previous frame's timestamp, for the interval. */\nlet scrollEaseLastAt = 0\n\n/**\n * Carry a position and its speed toward a target through `seconds` of the\n * spring, in SCROLL_EASE_STEP_S steps with the acceleration and the speed\n * capped (see above).\n */\nexport function stepSpring(position: number, velocity: number, target: number, seconds: number) {\n for (let spent = 0; spent < seconds; spent += SCROLL_EASE_STEP_S) {\n const step = Math.min(SCROLL_EASE_STEP_S, seconds - spent)\n let acceleration = SCROLL_EASE_OMEGA * SCROLL_EASE_OMEGA * (target - position) - 2 * SCROLL_EASE_OMEGA * velocity\n acceleration = Math.max(-SCROLL_EASE_MAX_ACCEL_PX_S2, Math.min(SCROLL_EASE_MAX_ACCEL_PX_S2, acceleration))\n // Semi-implicit Euler: the velocity steps first and the position\n // follows it — the order that keeps a stiff spring stable.\n velocity = Math.max(-SCROLL_EASE_MAX_SPEED_PX_S, Math.min(SCROLL_EASE_MAX_SPEED_PX_S, velocity + acceleration * step))\n position += velocity * step\n }\n return { position, velocity }\n}\n\n/** Whether a position has arrived: within half a pixel of the target and nearly still. */\nexport function springArrived(position: number, velocity: number, target: number) {\n return Math.abs(target - position) <= SCROLL_EASE_DONE_PX && Math.abs(velocity) <= SCROLL_EASE_REST_PX_S\n}\n\n/** A scroll container's end: the position that shows its last pixel. */\nexport function scrollEnd(element: Element) {\n return element.scrollHeight - element.clientHeight\n}\n\n/**\n * Start (or keep) easing this element's position toward a destination.\n *\n * @param element - the scroll container.\n * @param destination - asked every frame with the end this frame already read:\n * the position wanted now. The one destination that is that end itself gets\n * it without a second reading (a reading forces a layout pass, D9).\n * @param wanted - asked every frame; false ends this element's ease where it is.\n * @param lead - the longest stretch glided; a farther destination is first\n * closed to it. A jump the reader asked for wants a short one: the glide\n * only has to say which way the page went.\n */\nexport function easeScroll(element: Element, destination: (element: Element, end: number) => number, wanted: () => boolean, lead = SCROLL_EASE_LEAD_PX) {\n // A run already in flight keeps the motion it is carrying: the re-arm is\n // for re-reading the tests, and zeroing the speed would re-do the take-off\n // the spring exists to avoid.\n const active = scrollEasing.get(element)\n scrollEasing.set(element, {\n destination,\n wanted,\n lead,\n velocity: active === undefined ? 0 : active.velocity,\n position: active === undefined ? null : active.position,\n // Carried across a re-arm, like the velocity: it is a reading of where\n // this run has the position, and a fresh one would read as a move made\n // by someone else (see scrollEasePosition).\n lastWritten: active === undefined ? null : active.lastWritten,\n })\n if (scrollEaseFrameQueued) return\n scrollEaseLastAt = 0\n scrollEaseFrameQueued = true\n requestFrame({ write: stepScrollEase })\n}\n\n/** End this element's ease, leaving the position where it is. */\nexport function stopScrollEase(element: Element) {\n scrollEasing.delete(element)\n}\n\n/**\n * Whether this element is being eased right now.\n * @param element - the scroll container.\n */\nexport function isScrollEasing(element: Element) {\n return scrollEasing.has(element)\n}\n\n/**\n * The position the ease last wrote on this element, or null while it is not\n * easing on it.\n *\n * The scroll owner reads it to tell the host's pin apart from the spring's\n * own step inside one frame (takeBackHostPin): the host writes the end\n * outright the moment content grows, and the distance that write added has\n * to go back to the spring instead of painting.\n * @param element - the scroll container.\n */\nexport function scrollEasePosition(element: Element) {\n const ease = scrollEasing.get(element)\n return ease === undefined ? null : ease.lastWritten\n}\n\n/** Put the position down and say what was really written (the container may round it). */\nfunction writeScrollEase(element: Element, ease: ScrollEase, value: number) {\n ease.position = value\n element.scrollTop = value\n ease.lastWritten = element.scrollTop\n return ease.lastWritten\n}\n\n/**\n * One frame of every ease in flight.\n * @param now - this frame's timestamp.\n */\nfunction stepScrollEase(now: number) {\n scrollEaseFrameQueued = false\n const interval = scrollEaseLastAt === 0\n ? SCROLL_EASE_NOMINAL_FRAME_MS\n : Math.min(SCROLL_EASE_MAX_FRAME_MS, Math.max(0, now - scrollEaseLastAt))\n scrollEaseLastAt = now\n const seconds = interval / 1000\n for (const [element, ease] of scrollEasing) {\n // A container that left the document, or one the reader has taken over,\n // is done here: the loop never scrolls what nobody is following.\n if (!element.isConnected || !ease.wanted()) {\n scrollEasing.delete(element)\n continue\n }\n const floor = scrollEnd(element)\n const target = Math.max(0, Math.min(floor, ease.destination(element, floor)))\n // The fraction the ease keeps, unless someone else moved the position\n // since its last write: then the position is taken where it is.\n let position = ease.position\n if (position === null || ease.lastWritten === null || Math.abs(element.scrollTop - ease.lastWritten) > SCROLL_EASE_MOVED_PX) {\n position = element.scrollTop\n }\n // A far destination: closed to the lead first, on the side the position comes from.\n if (Math.abs(target - position) > ease.lead) {\n position = target - Math.sign(target - position) * ease.lead\n }\n const motion = stepSpring(position, ease.velocity, target, seconds)\n const velocity = motion.velocity\n position = Math.max(0, Math.min(floor, motion.position))\n if (springArrived(position, velocity, target)) {\n writeScrollEase(element, ease, target)\n scrollEasing.delete(element)\n continue\n }\n ease.velocity = velocity\n const written = writeScrollEase(element, ease, position)\n // The container's real end can sit a few pixels inside the arithmetic\n // one — a child's clipped overflow, a scrollbar's rounding — and the\n // write is then clamped: a position the container will not take has\n // arrived as far as it can, and the loop must not keep waking for it.\n if (Math.abs(written - position) > SCROLL_EASE_MOVED_PX) scrollEasing.delete(element)\n }\n if (scrollEasing.size === 0) return\n scrollEaseFrameQueued = true\n requestFrame({ write: stepScrollEase })\n}\n", "import { observeSize } from '../core/bus'\n\n/**\n * The sliding highlight of a segmented control: one pseudo-element on the\n * control (shared/sliding-pill.css) that travels to the active item,\n * instead of each item fading its own background out and the next one in.\n * The conversation view tabs, the permission segments and the workspace\n * section's 进行中 / 已归档 control all place it through this one factory.\n *\n * The control gets `data-dsh-claude-pill` and two custom properties,\n * `--dsh-claude-pill-x` and `--dsh-claude-pill-w`, measured from the active\n * item's box against the control's padding box — the box the absolutely\n * placed pseudo-element is laid out in. Any transform on the control moves\n * both boxes alike, so it cancels out. The attribute and the first placement\n * land in the same call: the pseudo-element does not exist before it, so the\n * pill appears in place and only later moves slide. A control with no\n * visible active item (hidden, or nothing selected) drops the attribute and\n * the item's own active background comes back.\n *\n * Item widths change without a DOM mutation when a font finishes loading,\n * so the control is also watched by a ResizeObserver.\n *\n * @param activeSelector - the active item, relative to the control.\n * @returns `{ sync(control), release() }`: `sync` places the pill on\n * `control` (a different control takes the placement off the previous\n * one; null just takes it off); `release` takes it off and stops watching.\n */\nexport function createSlidingPill(activeSelector: string) {\n const PILL_ATTR = 'data-dsh-claude-pill'\n let control: HTMLElement | null = null\n /** The last written offset and width, so an unchanged placement writes nothing. */\n let lastX: number | null = null\n let lastW: number | null = null\n /** Stops watching the current control's size. */\n let stopSize: (() => void) | null = null\n\n function clear(el: HTMLElement) {\n el.removeAttribute(PILL_ATTR)\n el.style.removeProperty('--dsh-claude-pill-x')\n el.style.removeProperty('--dsh-claude-pill-w')\n lastX = null\n lastW = null\n }\n\n function place(control: HTMLElement) {\n const active = control.querySelector(activeSelector)\n const box = control.getBoundingClientRect()\n const itemBox = active === null ? null : active.getBoundingClientRect()\n if (box.width === 0 || itemBox === null || itemBox.width === 0) {\n if (control.hasAttribute(PILL_ATTR)) clear(control)\n return\n }\n const x = Math.round((itemBox.left - box.left - control.clientLeft) * 100) / 100\n const w = Math.round(itemBox.width * 100) / 100\n if (x === lastX && w === lastW && control.hasAttribute(PILL_ATTR)) return\n lastX = x\n lastW = w\n control.style.setProperty('--dsh-claude-pill-x', `${x}px`)\n control.style.setProperty('--dsh-claude-pill-w', `${w}px`)\n if (!control.hasAttribute(PILL_ATTR)) control.setAttribute(PILL_ATTR, '')\n }\n\n function sync(next: HTMLElement | null) {\n if (next !== control) {\n if (stopSize !== null) stopSize()\n stopSize = null\n if (control !== null) clear(control)\n control = next\n if (control === null) return\n stopSize = observeSize(control, () => {\n if (control !== null) place(control)\n })\n }\n if (control !== null) place(control)\n }\n\n function release() {\n if (stopSize !== null) stopSize()\n stopSize = null\n if (control !== null) clear(control)\n control = null\n }\n\n return { sync, release }\n}\n", "import * as shared0 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/constants.ts\"\nimport * as shared1 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/core/bus.ts\"\nimport * as shared2 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/core/desktop-band.ts\"\nimport * as shared3 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/core/feature.ts\"\nimport * as shared4 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/core/frame.ts\"\nimport * as shared5 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/core/host.ts\"\nimport * as shared6 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/core/i18n.ts\"\nimport * as shared7 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/core/model-copy.ts\"\nimport * as shared8 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/core/prefs.ts\"\nimport * as shared9 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/features/permissions/permission-copy.ts\"\nimport * as shared10 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/features/turn-nav/turn-nav-host.ts\"\nimport * as shared11 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/shared/dom.ts\"\nimport * as shared12 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/shared/format.ts\"\nimport * as shared13 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/shared/popover.ts\"\nimport * as shared14 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/shared/scroll-owner.ts\"\nimport * as shared15 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/client/src/shared/sliding-pill.ts\"\nimport * as shared16 from \"/home/runner/work/dsh-claude-style/dsh-claude-style/packages/contracts/src/dom.ts\"\nimport * as shared17 from \"virtual:dsh-claude-style/generated\"\nexport const CHUNK_MODULES = {\n \"@deepseek-ai/dsh-client-ui-primitives\": require(\"@deepseek-ai/dsh-client-ui-primitives\"),\n \"packages/client/src/constants.ts\": shared0,\n \"packages/client/src/core/bus.ts\": shared1,\n \"packages/client/src/core/desktop-band.ts\": shared2,\n \"packages/client/src/core/feature.ts\": shared3,\n \"packages/client/src/core/frame.ts\": shared4,\n \"packages/client/src/core/host.ts\": shared5,\n \"packages/client/src/core/i18n.ts\": shared6,\n \"packages/client/src/core/model-copy.ts\": shared7,\n \"packages/client/src/core/prefs.ts\": shared8,\n \"packages/client/src/features/permissions/permission-copy.ts\": shared9,\n \"packages/client/src/features/turn-nav/turn-nav-host.ts\": shared10,\n \"packages/client/src/shared/dom.ts\": shared11,\n \"packages/client/src/shared/format.ts\": shared12,\n \"packages/client/src/shared/popover.ts\": shared13,\n \"packages/client/src/shared/scroll-owner.ts\": shared14,\n \"packages/client/src/shared/sliding-pill.ts\": shared15,\n \"packages/contracts/src/dom.ts\": shared16,\n \"react\": require(\"react\"),\n \"react-dom/client\": require(\"react-dom/client\"),\n \"virtual:dsh-claude-style/generated\": shared17,\n}\n", "import { CHUNK_MODULES } from 'virtual:dsh-claude-style/chunk-modules'\nimport type { FeatureInstall } from './feature'\n\n/** What a chunk's script sets on its own element: its body, still to be run against the shared modules. */\ntype ChunkFactory = NonNullable<HTMLScriptElement['__dshChunk']>\n\n/** This generation's chunk loads by address: a feature switched off and on again reuses its first load. */\nconst loads = new Map<string, Promise<FeatureInstall>>()\n\n/**\n * The `require` a chunk's factory receives (D39): the modules the build left\n * out of the chunk because the bundle carries them, as this generation's own\n * instances. A chunk holding a second copy of a module with state would split\n * that state in two, so the build shares every such module through this table.\n */\nfunction chunkRequire(id: string) {\n if (!Object.hasOwn(CHUNK_MODULES, id)) throw new Error(`dsh-claude-style: a feature chunk asks for \"${id}\", which the bundle does not share`)\n return CHUNK_MODULES[id]\n}\n\n/**\n * Fetch one chunk's script and take the factory it sets on its own element.\n *\n * The chunk is a classic script served by the host half's asset route: a\n * script element is what the host page's own loader uses, so it runs wherever\n * the bundle does. The element leaves the page once it has run.\n */\nfunction fetchFactory(url: string) {\n return new Promise<ChunkFactory>((resolve, reject) => {\n const script = document.createElement('script')\n script.src = url\n script.async = true\n script.onload = () => {\n script.remove()\n if (script.__dshChunk === undefined) reject(new Error(`dsh-claude-style: the chunk ${url} ran without handing back a factory`))\n else resolve(script.__dshChunk)\n }\n script.onerror = () => {\n script.remove()\n // The route answers every chunk the build in lib/ wrote. A host still\n // serving the bundle it read at boot asks for the chunks of the build\n // before an update, which the update replaced.\n reject(new Error(`dsh-claude-style: the chunk ${url} failed to load; restart the host if the plugin was updated while it ran`))\n }\n document.head.appendChild(script)\n })\n}\n\n/**\n * Load one feature chunk and hand back its feature's `install` (D39).\n *\n * @param url - the chunk's address (the asset route, content-hashed).\n * @returns `install`, or a rejection naming the address when the script fails\n * to load, carries no factory or throws while it runs.\n */\nexport function loadFeatureChunk(url: string): Promise<FeatureInstall> {\n const known = loads.get(url)\n if (known !== undefined) return known\n const load = fetchFactory(url).then((factory) => {\n const { install } = factory(chunkRequire)\n if (typeof install !== 'function') throw new Error(`dsh-claude-style: the chunk ${url} exports no install`)\n return install as FeatureInstall\n })\n loads.set(url, load)\n return load\n}\n", "import { WINDOW_BLUR_ATTR } from '../../constants'\n\n/**\n * Text selection has two paints and CSS cannot tell them apart: gray on\n * black while the browser window is unfocused, blue on white while it is\n * focused. Chromium reaches that difference through its own internal\n * selection colors (`-internal-inactive-selection-*`), which a stylesheet\n * cannot address — so the focus state is mirrored onto the document here\n * and `packages/client/src/theme/chrome.css` switches on the attribute. Nothing else about\n * the selection is stateful; the paint itself stays pure CSS.\n *\n * `blur`/`focus` on the window are the events that matter (a click on\n * another window, Alt+Tab, a devtools focus), and `document.hasFocus()`\n * seeds the state so a page loaded in a background tab is unfocused from\n * its first paint instead of inheriting the focused default.\n */\nexport function install() {\n const body = document.body\n\n function sync() {\n if (document.hasFocus()) body.removeAttribute(WINDOW_BLUR_ATTR)\n else body.setAttribute(WINDOW_BLUR_ATTR, '')\n }\n\n // Capture phase: the events are dispatched at the window, so the flag\n // records the transition before anything downstream can stop it.\n window.addEventListener('focus', sync, true)\n window.addEventListener('blur', sync, true)\n sync()\n\n return () => {\n window.removeEventListener('focus', sync, true)\n window.removeEventListener('blur', sync, true)\n body.removeAttribute(WINDOW_BLUR_ATTR)\n }\n}\n", "import { COMPOSER_ATTR, COMPOSER_HIDDEN_ATTR, HOME_LAYOUT_STUDIO, STATS_POSITION_CONTEXT } from '../../constants'\nimport { DIALOG_TRIGGER_SELECTOR, MOBILE_STATS_SELECTOR, PHASE_ATTRIBUTE } from '@dsh-claude-style/contracts/dom'\nimport { observeSize } from '../../core/bus'\nimport { COMPOSER_STACK, closestComposerCard, findAccessTrigger, findComposerCards, findComposerPlaceholder, findComposerSeat, findConversationScroller } from '../../core/host'\nimport { composerRestyleRetired, readPrefs } from '../../core/prefs'\nimport type { HostContext } from '../../core/host'\nimport type { FeatureHandle } from '../../core/scheduler'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './composer.manifest'\nimport { closestFrom, setAttributeIfChanged } from '../../shared/dom'\nimport { writeScroll } from '../../shared/scroll-owner'\n\n/** What other features read off the composer's reading (ui.composer). */\nexport interface ComposerHandle extends FeatureHandle {\n isHero(): boolean\n heroCard(): HTMLElement | null\n isActive(): boolean\n}\n\n/**\n * The composer's own layout: one feature for the whole input area.\n *\n * Each pass starts here. It reads the page's composer state once — whether\n * the host shows the hero composer, and whether the restyle applies to it —\n * and every other feature reads that answer through `ui.composer` for the\n * rest of the pass. From the same reading it writes what the stylesheet\n * keys on: the hero/inline variant on the cards and their stack, the\n * composer gate on <body>, the attachment state and tiles, the context\n * meter's stamp and room, and whether the chat tab (the composer's only\n * view) is up. The scheduler triggers its two behaviours through hooks: a\n * press on the inline card focuses the editor, and the transcript follows\n * the card when it changes height.\n */\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n /** Whether the page shows the hero composer, as of the last reading. */\n let hero = false\n /** Whether the composer restyle applies to the page shown, as of the last reading. */\n let active = false\n /** Whether the studio home layout owns the hero page, as of the last reading. */\n let studioHome = false\n /** The hero page's composer card, or null off the hero page, as of the last pass. */\n let heroCard: HTMLElement | null = null\n\n /**\n * Read the page's composer state. The host marks the conversation root\n * `data-phase=\"hero\"` exactly when it renders the hero composer (no\n * session yet, or a blank one), so that marker is the whole test; the\n * composer-scope preference then decides whether the restyle covers the\n * page.\n */\n function readState() {\n hero = document.querySelector(`[${PHASE_ATTRIBUTE}=\"hero\"]`) !== null\n const scope = readPrefs().composerScope\n active = !composerRestyleRetired && (scope === 'all' || (hero ? scope === 'hero' : scope === 'conversation'))\n studioHome = hero && readPrefs().homeLayout === HOME_LAYOUT_STUDIO\n }\n\n /**\n * Mirror the variant onto every card and its composerStack ancestor, so\n * stack-scoped rules read an attribute instead of re-deriving hero/inline\n * through :has() on every DOM mutation. Write only when the value differs\n * (re-setting the same value still invalidates the element's styles), and\n * once per stack even when several cards share one.\n *\n * The studio home layout draws its composer in the conversation's\n * single-line form, so a studio hero page stamps `inline`, not `hero`.\n */\n function syncVariant(cards: NodeListOf<HTMLElement>) {\n const value = hero && !studioHome ? 'hero' : 'inline'\n const stacks = new Set<Element>()\n for (const card of cards) {\n setAttributeIfChanged(card, 'data-composer-variant', value)\n const stack = card.closest(COMPOSER_STACK)\n if (stack !== null) stacks.add(stack)\n }\n for (const stack of stacks) setAttributeIfChanged(stack, 'data-composer-variant', value)\n }\n\n /**\n * The attachment rails inside a card (ui-attachment): the shell rail and\n * its scrolling inner rail, both `_rail`.\n */\n const ATTACHMENT_RAIL = '[class*=\"_rail\"]'\n /**\n * Anything in a card that means it carries attachments: an image tile\n * (`_imageItem`, `_thumbnail`), or any item, image or file card\n * (FileCard's `_card`) on a rail.\n */\n const ATTACHMENT_PRESENT = `[class*=\"_imageItem\"], [class*=\"_thumbnail\"], ${ATTACHMENT_RAIL} :is([class*=\"_item\"], img, [class*=\"_card\"])`\n /**\n * The attachment tiles the stylesheet reshapes into thumbnails. They are\n * found here once per pass and marked, so the rules read one attribute\n * instead of re-running this list, with its structural :has(img), on\n * every DOM change.\n */\n const ATTACHMENT_TILES = `${ATTACHMENT_RAIL} :is([class*=\"_imageItem\"], [class*=\"_thumbnail\"], [class*=\"_item\"]:has(img), [class*=\"_card\"]:has(img))`\n const ATTACHMENT_TILE_ATTR = 'data-dsh-claude-attachment'\n\n /** Mark the cards that carry attachments, and the tiles inside them. */\n function syncAttachments(cards: NodeListOf<HTMLElement>) {\n const tiles = new Set<Element>()\n for (const card of cards) {\n const carries = active && card.querySelector(ATTACHMENT_PRESENT) !== null\n if (carries) {\n setAttributeIfChanged(card, 'data-has-attachments', 'true')\n for (const tile of card.querySelectorAll(ATTACHMENT_TILES)) tiles.add(tile)\n } else {\n card.removeAttribute('data-has-attachments')\n }\n }\n for (const marked of document.querySelectorAll(`[${ATTACHMENT_TILE_ATTR}]`)) {\n if (!tiles.has(marked)) marked.removeAttribute(ATTACHMENT_TILE_ATTR)\n }\n for (const tile of tiles) tile.toggleAttribute(ATTACHMENT_TILE_ATTR, true)\n }\n\n const CONTROL_ATTR = 'data-dsh-claude-control'\n\n /**\n * Mark each host control on the composer with what it is, so the\n * stylesheets key on `data-dsh-claude-control` instead of the host's\n * button text — text that changes with the shell language and with each\n * host release. Read from the host's structure (InputBar):\n * commands — the tools row's `+`, the one button that opens a listbox;\n * stop / send — the trailing row's primary buttons, told apart by their\n * glyph: stop draws a rect, the submit arrow a path (queue and steer\n * are the same submit button under another label);\n * access — the button the permission slot renders (host.ts).\n */\n function syncControls(cards: NodeListOf<HTMLElement>) {\n for (const card of cards) {\n const commands = card.querySelector('[class*=\"_tools\"] button[aria-haspopup=\"listbox\"]')\n if (commands !== null) setAttributeIfChanged(commands, CONTROL_ATTR, 'commands')\n for (const button of card.querySelectorAll('[class*=\"_trailing\"] button[class*=\"_primary\"]')) {\n setAttributeIfChanged(button, CONTROL_ATTR, button.querySelector('svg rect') !== null ? 'stop' : 'send')\n }\n }\n const access = findAccessTrigger()\n if (access !== null) setAttributeIfChanged(access, CONTROL_ATTR, 'access')\n }\n\n const DRAFT_EMPTY_ATTR = 'data-dsh-claude-draft-empty'\n\n /**\n * Mark the cards whose draft is empty. The host's editor shows its\n * placeholder exactly then (DraftEditor's `data-composer-placeholder`),\n * and the send button's ghost and ready looks key on this mark — as a\n * stylesheet test (`card:has(placeholder) button`) it made every DOM\n * change re-match the whole document. The placeholder comes and goes as a\n * DOM change, so the pass that follows it moves the mark in the same frame.\n */\n function syncDraftState(cards: NodeListOf<HTMLElement>) {\n for (const card of cards) card.toggleAttribute(DRAFT_EMPTY_ATTR, findComposerPlaceholder(card) !== null)\n }\n\n /**\n * The composer's dock line, which the host renders right after the card\n * (a notice line, when there is one, sits before it).\n */\n function composerDock(card: Element) {\n return card.nextElementSibling\n }\n\n /**\n * The meter the host parks in that dock, or null when it is not there.\n * Its trigger is told apart by its glyph (ui-conversation ContextMeter):\n * the dialog trigger that draws a ring of `<circle>`s; the stats pills\n * draw none.\n */\n function dockedContextMeter(dock: Element | null) {\n if (dock === null) return null\n for (const trigger of dock.querySelectorAll<HTMLElement>(DIALOG_TRIGGER_SELECTOR)) {\n if (trigger.querySelector(':scope > svg > circle') === null) continue\n let node: HTMLElement = trigger\n while (node.parentElement !== null && node.parentElement !== dock) node = node.parentElement\n return node\n }\n return null\n }\n\n /** The custom properties the dock overlay reads to copy the toolbar row's own box. */\n const METER_ROW_OFFSET = '--dsh-claude-meter-row-offset'\n const METER_ROW_HEIGHT = '--dsh-claude-meter-row-height'\n /** How far the dock's own line stands above the band a mobile plugin's statistics strip took. */\n const MOBILE_STATS_LIFT = '--dsh-claude-mobile-stats-lift'\n /** The band-carrying spacer the dock's line is lifted by. */\n const MOBILE_STATS_ATTR = 'data-dsh-claude-mobile-stats'\n let mobileStatsLift = ''\n /** The room the meter takes at the toolbar row's right end, as the row carries it. */\n let meterRoom = ''\n /** The meter node the room was measured from, and the reading and scope it had then. */\n let meterNode: HTMLElement | null = null\n let meterReading = ''\n let meterMeasuredActive = false\n let meterWidth = 0\n /** The toolbar row's own box as <body> carries it (`\"offset height\"`), and the box it was read from. */\n let meterRow = ''\n let meterRowBox: Element | null = null\n let meterRowStack: Element | null = null\n let stopMeterRow: (() => void) | null = null\n\n /**\n * Copy the toolbar row's own box onto <body> for the window overlay: the row's\n * height, and how far its bottom stands above the box the dock is placed in\n * (that box is the composer stack, which the stylesheet makes the containing\n * block — inline-bar.css). Both belong to the host, and a host whose card\n * leaves a different gap under the row, or a taller row, puts the meter off\n * that row's line: the overlay reads these two numbers instead of assuming the\n * 28px and the 4px this host leaves.\n *\n * The reading is taken when the row or the stack changes size, never on every\n * pass: the same caching the room below keeps, and for the same reason.\n */\n function stampMeterRow(card: HTMLElement | undefined, meter: HTMLElement | null) {\n const row = card === undefined || !active || readPrefs().statsPosition !== STATS_POSITION_CONTEXT || meter === null\n ? null\n : card.querySelector('[class*=\"_trailing\"]')?.parentElement ?? null\n const stack = row === null ? null : closestFrom(row, COMPOSER_STACK)\n // The band a mobile plugin's strip took is measured on every pass: the strip\n // appears and leaves without any size of this row changing, so the row's own\n // cached reading says nothing about it.\n liftDockLine(card)\n if (row === null || stack === null) {\n if (meterRow === '' && meterRowBox === null) return\n meterRow = ''\n meterRowBox = null\n meterRowStack = null\n if (stopMeterRow !== null) {\n stopMeterRow()\n stopMeterRow = null\n }\n document.body.style.removeProperty(METER_ROW_OFFSET)\n document.body.style.removeProperty(METER_ROW_HEIGHT)\n return\n }\n if (meterRowBox !== row || meterRowStack !== stack) {\n // A rebuilt row or stack: the watcher follows the new boxes.\n if (stopMeterRow !== null) stopMeterRow()\n stopMeterRow = observeSize([row, stack], () => {\n meterRow = ''\n stampContextMeter(findComposerCards()[0])\n })\n meterRowBox = row\n meterRowStack = stack\n meterRow = ''\n }\n if (meterRow !== '') return\n const rowBox = row.getBoundingClientRect()\n if (rowBox.height <= 0) return\n const stackBox = stack.getBoundingClientRect()\n const round = (value: number) => Math.round(value * 100) / 100\n meterRow = `${round(stackBox.bottom - rowBox.bottom)} ${round(rowBox.height)}`\n const [offset, height] = meterRow.split(' ')\n document.body.style.setProperty(METER_ROW_OFFSET, `${offset}px`)\n document.body.style.setProperty(METER_ROW_HEIGHT, `${height}px`)\n }\n\n /**\n * Park the dock's own line above the band a mobile plugin's statistics strip\n * took.\n *\n * dsh-pocket draws its strip inside the host's dock — the box this overlay\n * re-places — as its own absolutely positioned child, so the strip keeps the\n * band the dock's line is pinned to and the two rows of text print over each\n * other (issue #47). The strip carries no host mark, and a stylesheet cannot\n * ask for a child and style its parent, so nothing in the sheet can see it: it\n * is measured here and the dock is handed a spacer of the strip's own height\n * plus a bottom offset of the same size (inline-bar.css). The spacer re-enters\n * the flex flow to push the dock's children above the band — the strip being out\n * of flow cannot do that for itself — and the offset moves the whole overlay up\n * by the same amount, so the line lands in the band the spacer took. The\n * strip's own height is the whole lift because that height is what the band\n * costs, whatever box the strip is positioned against.\n *\n * The lift stands only while the strip really shares the band: a plugin that\n * renders its strip somewhere else on the page leaves the geometry alone. A host\n * without the plugin measures nothing and every rule reads its fallback.\n */\n function liftDockLine(card: HTMLElement | undefined) {\n const dock = card?.nextElementSibling ?? null\n const strip = dock === null || !dock.matches('[class*=\"_dock\"]') ? null : dock.querySelector(MOBILE_STATS_SELECTOR)\n if (dock === null || strip === null) {\n releaseMobileStats()\n return\n }\n const stripBox = strip.getBoundingClientRect()\n const dockBox = dock.getBoundingClientRect()\n const sharesBand = stripBox.height > 0 && stripBox.top < dockBox.bottom && stripBox.bottom > dockBox.top\n const lift = sharesBand ? Math.round(stripBox.height * 100) / 100 : 0\n const next = lift <= 0 ? '' : `${lift}px`\n if (next === mobileStatsLift) return\n mobileStatsLift = next\n if (next === '') {\n releaseMobileStats()\n return\n }\n const host = dock as HTMLElement\n const spacer = dock.querySelector<HTMLElement>(`[${MOBILE_STATS_ATTR}]`) ?? document.createElement('div')\n if (spacer.parentElement !== host || spacer.previousElementSibling !== null) host.insertBefore(spacer, host.firstChild)\n spacer.setAttribute(MOBILE_STATS_ATTR, '')\n spacer.style.height = next\n document.body.style.setProperty(MOBILE_STATS_LIFT, next)\n // The dock's own line moved, and its box is where the row's height was read.\n meterRow = ''\n }\n\n /** Take the lift and its spacer back: the strip is gone, or the line left the dock. */\n function releaseMobileStats() {\n if (mobileStatsLift === '') return\n mobileStatsLift = ''\n document.body.style.removeProperty(MOBILE_STATS_LIFT)\n for (const spacer of document.querySelectorAll(`[${MOBILE_STATS_ATTR}]`)) spacer.remove()\n }\n\n /**\n * The width the meter's pill takes: the node the host parks in the dock, and\n * the trigger inside it — the button whose hover face is the pill the reader\n * sees. A host whose trigger reaches outside its wrapper (the button wider\n * than the span around it, or shifted inside it) would otherwise leave the\n * row's own text under that face, so the room covers the two boxes' union.\n */\n function meterPillWidth(meter: HTMLElement) {\n const trigger = meter.querySelector('button')\n if (trigger === null) return meter.offsetWidth\n const wrapper = meter.getBoundingClientRect()\n const face = trigger.getBoundingClientRect()\n // Rounded up: the room is a whole number of pixels, and one pixel more than\n // the pill takes never leaves the row's text under its face.\n return Math.ceil(Math.max(wrapper.right, face.right) - Math.min(wrapper.left, face.left))\n }\n\n /**\n * Stamp the context-occupancy meter and keep its room on the toolbar row.\n *\n * The meter stays in the host's dock line, its native React parent: moving\n * it out crashed React's unmount (Node.removeChild). The stylesheet lays\n * the dock over the toolbar row and puts the meter at the row's right end,\n * after the model and effort triggers; the trailing cluster keeps that\n * room free through --dsh-claude-meter-room — the pill the reader sees,\n * trigger and wrapper together, plus the cluster's own 8px gap. With the\n * session's numbers asked onto a line of their own the dock keeps the\n * host's placement, nothing overlays the row, and no room is measured.\n *\n * The meter is re-resolved only when the cached node left the tree, and\n * its width is re-read only when its reading moved (the trigger IS the\n * percentage text, whose width follows the text): a pass with an unmoved\n * meter reads no layout, which during streaming would otherwise force one.\n * A reading taken with no box — the composer's seat is display: none while\n * another conversation tab is up — is no reading: it stays unrecorded, the\n * row keeps the room it has, and the next pass measures again.\n *\n * The write is decided against the value the document carries: a variable\n * another generation or feature cleared has to come back, and the\n * declaration is the cheapest thing to ask.\n */\n function stampContextMeter(card: HTMLElement | undefined) {\n if (meterNode !== null && !meterNode.isConnected) {\n meterNode = null\n meterReading = ''\n meterWidth = 0\n }\n let meter = meterNode\n if (card === undefined) meter = null\n else if (meter === null) meter = dockedContextMeter(composerDock(card))\n let room = ''\n if (meter !== null) {\n meter.toggleAttribute('data-dsh-claude-context-meter', true)\n const reading = meter.textContent || ''\n // Re-measure when the reading moved or the restyle scope flipped:\n // either can change what the room should be.\n if (reading !== meterReading || active !== meterMeasuredActive) {\n const width = active ? meterPillWidth(meter) : 0\n // A zero width with the restyle on is the composer having no box\n // right now, never a meter that takes no room.\n if (!active || width > 0) {\n meterReading = reading\n meterMeasuredActive = active\n meterWidth = width\n }\n }\n if (active && readPrefs().statsPosition === STATS_POSITION_CONTEXT) room = meterWidth > 0 ? `${meterWidth + 8}px` : meterRoom\n }\n meterNode = meter\n stampMeterRow(card, meter)\n const written = document.body.style.getPropertyValue('--dsh-claude-meter-room')\n if (room === written) {\n meterRoom = room\n return\n }\n meterRoom = room\n if (room === '') document.body.style.removeProperty('--dsh-claude-meter-room')\n else document.body.style.setProperty('--dsh-claude-meter-room', room)\n }\n\n /**\n * The composer is chat-view-only. The host mounts the seat inside the\n * conversation root on every tab (轨迹 / 上下文 even reserve room for\n * it), so the skin reflects the active view on <body> and CSS drops the\n * whole bottom area unless the chat tab is selected.\n *\n * Scope: the conversation tablist lives in the panel header, which is\n * the root's first child — any other tablist (the trajectory detail\n * panel, say) renders later inside the ledger. The chat view registers\n * at order 0, so it is always the tablist's FIRST tab; reading that\n * tab's aria-selected is locale-independent. No tab bar at all (hero /\n * single view) means the chat surface is all there is.\n */\n function syncChatTabComposer() {\n const root = closestFrom(findComposerSeat(), `[${PHASE_ATTRIBUTE}]`)\n const list = root === null ? null : root.querySelector('[role=\"tablist\"]')\n const first = list === null ? null : list.querySelector('[role=\"tab\"]')\n const chatActive = first === null || first.getAttribute('aria-selected') === 'true'\n document.body.toggleAttribute(COMPOSER_HIDDEN_ATTR, active && !chatActive)\n }\n\n function syncComposer() {\n readState()\n const cards = findComposerCards()\n heroCard = hero && cards.length > 0 ? cards[0] : null\n syncVariant(cards)\n document.body.toggleAttribute(COMPOSER_ATTR, active)\n syncAttachments(cards)\n syncDraftState(cards)\n syncControls(cards)\n stampContextMeter(cards[0])\n syncChatTabComposer()\n }\n\n /**\n * A press on the inline card lands in its editor: the card's padding and\n * toolbar row surround a one-line field, and a press on the card that is\n * not one of its controls means the field.\n */\n function focusEditorOnPress(target: EventTarget | null) {\n const card = closestComposerCard(target, 'inline')\n if (!card) return\n if (closestFrom(target, 'button, [role=\"button\"], [role=\"menu\"], [role=\"radiogroup\"], input, select')) return\n const input = card.querySelector<HTMLElement>('[data-composer-input]')\n if (input && document.activeElement !== input) {\n input.focus()\n }\n }\n\n /**\n * Keep a reader who was at the transcript's end there while the card\n * changes height: the card growing with a multi-line draft (or shrinking\n * back) moves the transcript's bottom edge without any scroll. Within\n * 150px of the end counts as at the end.\n */\n function followTranscript() {\n const scroller = findConversationScroller()\n if (scroller === null) return\n const distance = scroller.scrollHeight - scroller.scrollTop - scroller.clientHeight\n if (distance < 150) writeScroll(scroller, scroller.scrollHeight, 'composer')\n }\n\n ui.composer = {\n sync: syncComposer,\n /** Whether the page shows the hero composer, as of this pass. */\n isHero() { return hero },\n /** The hero page's composer card as of this pass, or null off the hero page. */\n heroCard() { return heroCard },\n /** Whether the composer restyle applies to the page shown, as of this pass. */\n isActive() { return active },\n /** A copy source changed, the composer-scope preference among them: read again now. */\n onCopyChange: readState,\n onPointerDown: focusEditorOnPress,\n /** The composer card changed size: the transcript follows it. */\n reposition(reason: 'viewport' | 'composer') {\n if (reason === 'composer') followTranscript()\n }\n }\n readState()\n\n return () => {\n active = false\n heroCard = null\n document.body.removeAttribute(COMPOSER_ATTR)\n document.body.removeAttribute(COMPOSER_HIDDEN_ATTR)\n const marks = ['data-composer-variant', 'data-has-attachments', ATTACHMENT_TILE_ATTR, DRAFT_EMPTY_ATTR, CONTROL_ATTR, 'data-dsh-claude-context-meter']\n for (const mark of marks) {\n for (const marked of document.querySelectorAll(`[${mark}]`)) marked.removeAttribute(mark)\n }\n if (meterRoom !== '') {\n meterRoom = ''\n document.body.style.removeProperty('--dsh-claude-meter-room')\n }\n if (stopMeterRow !== null) {\n stopMeterRow()\n stopMeterRow = null\n }\n meterRow = ''\n meterRowBox = null\n meterRowStack = null\n document.body.style.removeProperty(METER_ROW_OFFSET)\n document.body.style.removeProperty(METER_ROW_HEIGHT)\n releaseMobileStats()\n meterNode = null\n meterReading = ''\n meterMeasuredActive = false\n meterWidth = 0\n }\n}\n", "import * as React from 'react'\nimport * as ReactDOM from 'react-dom/client'\nimport { PHASE_ATTRIBUTE } from '@dsh-claude-style/contracts/dom'\nimport { HOME_HERO_ATTR, HOME_LAYOUT_ATTR, HOME_LAYOUT_STUDIO, PREF_DEFAULTS } from '../../constants'\nimport { COMPOSER_STACK } from '../../core/host'\nimport { copyLabel } from '../../core/i18n'\nimport { readPrefs } from '../../core/prefs'\nimport { HOME_RANGES, createHomeUsage, homePanelData } from './data'\nimport { createHomeModels } from './models'\nimport { createHomeOverview } from './overview'\nimport { buildElement } from '../../shared/dom'\nimport type { HostContext, HostFiber } from '../../core/host'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './home-layout.manifest'\n\n/**\n * The home page's second layout, and the usage panel that fills it.\n *\n * `classic` is the hero the skin has always drawn: brand mark and greeting\n * centred, composer under them, everything vertically centred in the scroll\n * body. `studio` is the dashboard form — the greeting moves to the top left,\n * the composer hugs the window's bottom edge, and the space between them\n * carries a usage panel. The two differ only in arrangement, so the switch\n * is one body attribute the stylesheet branches on; the host keeps owning the\n * hero's markup either way.\n *\n * The panel's own seat is `conversation.input.dock`, the host's list slot\n * rendered between the greeting and the composer card. It is the only seat in\n * the hero region that accepts a new entry (the brand mark, workspace and\n * preset seats are `single` and occupied), and it is scoped to a session, so\n * on the cold start screen — no session object yet — the host does not render\n * it at all. There the skin mounts the same panel itself: a React root on a\n * `display: contents` element of its own at the end of the hero stack, which\n * the stylesheet sorts into the dock's place. It goes away as soon as the\n * host renders the dock.\n *\n * This fragment is the shell: the seat registration, the head (the\n * Overview/Models tabs and the All/30d/7d range pills), the tab switch and\n * the teardown. The numbers behind it come from `features/home/data.ts`,\n * and the two tabs render from `features/home/overview.ts` and\n * `features/home/models.ts`.\n *\n * @param ctx - client context.\n * @param ui - shared handle table.\n * @returns teardown.\n */\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n /** The host's list slot between the hero greeting and the composer card. */\n const DOCK_SLOT = 'conversation.input.dock'\n\n let layout = PREF_DEFAULTS.homeLayout\n /** Whether the last pass saw the new-conversation hero, as of that reading. */\n let lastHero = false\n /**\n * The yardstick book's draw. It is held here, not in the panel: the dock\n * seat keeps the panel mounted inside a conversation too, and the draw is\n * renewed each time the page comes back to the new-conversation hero.\n */\n let bookPick = Math.random()\n let slotsFiber: HostFiber | null = null\n /** The cold start screen's panel: `{ stack, element, root }`, or null. */\n let coldSeat: { stack: Element, element: HTMLElement, root: ReactDOM.Root } | null = null\n\n const usage = createHomeUsage(ctx)\n const overview = createHomeOverview()\n const models = createHomeModels()\n\n /**\n * Whether the page currently shows the new-conversation hero.\n *\n * The dock seat renders in both phases — the host puts it above the\n * composer inside a conversation too — so the layout alone is not enough:\n * the panel belongs to the home page, and only the hero phase is home. The\n * conversation root carries the phase (`data-phase=\"hero\"`); the same\n * marker the composer feature reads, and the element test is qualified by\n * `_root` because the draft editor and the connection indicator carry a\n * `data-phase` of their own.\n */\n function heroPhase() {\n return document.querySelector(`[class*=\"_root\"][${PHASE_ATTRIBUTE}=\"hero\"]`) !== null\n }\n\n /**\n * Mark the document while the studio layout owns the page shown: the\n * studio rules key on this one attribute instead of each re-reading the\n * host's phase marker.\n */\n function writeHeroAttr(hero: boolean) {\n const studioHero = layout === HOME_LAYOUT_STUDIO && hero\n if (studioHero === document.body.hasAttribute(HOME_HERO_ATTR)) return\n if (studioHero) document.body.setAttribute(HOME_HERO_ATTR, '')\n else document.body.removeAttribute(HOME_HERO_ATTR)\n }\n\n /** Write the layout onto the document and start loading when it needs data. */\n function setLayout(next: string) {\n layout = next\n lastHero = heroPhase()\n if (next === HOME_LAYOUT_STUDIO) document.body.setAttribute(HOME_LAYOUT_ATTR, HOME_LAYOUT_STUDIO)\n else document.body.removeAttribute(HOME_LAYOUT_ATTR)\n writeHeroAttr(lastHero)\n if (next === HOME_LAYOUT_STUDIO) usage.load(false)\n usage.notify()\n }\n\n /** Re-render on every store change. */\n function useUsage() {\n const pair = React.useState(0)\n const bump = pair[1]\n React.useEffect(() => usage.subscribe(() => { bump(count => count + 1) }), [])\n return usage.state()\n }\n\n /**\n * The usage panel. It draws its frame — the head pills, the stat cells and\n * the empty heat grid — before any number arrives, and the frame's geometry\n * does not change when the numbers land, so the page never shifts under the\n * pointer.\n *\n * The head is Claude Code's own: an Overview/Models tab pair on the left,\n * the All/30d/7d range trio on the right. The range window filters the\n * tiles and the model list; the heat grid and the models chart keep their\n * own windows, the way Claude Code's do.\n */\n function HomeUsagePanel() {\n const state = useUsage()\n const tabState = React.useState('overview')\n const tab = tabState[0]\n const setTab = tabState[1]\n const rangeState = React.useState('all')\n const range = rangeState[0]\n const setRange = rangeState[1]\n if (layout !== HOME_LAYOUT_STUDIO || !heroPhase()) return null\n const data = homePanelData(state, usage.list(), range, bookPick)\n\n function tabButton(id: string, label: string) {\n return React.createElement('button', {\n key: id,\n type: 'button',\n className: 'dsh-claude-home-tab',\n 'data-active': tab === id ? '' : undefined,\n 'aria-pressed': tab === id,\n onClick() { setTab(id) },\n }, label)\n }\n\n return React.createElement(\n 'section',\n {\n className: 'dsh-claude-home-panel',\n 'data-dsh-claude-home-panel': '',\n 'data-computing': state.computing ? '' : undefined,\n 'aria-busy': state.computing || !data.known ? 'true' : 'false',\n },\n React.createElement(\n 'div',\n { className: 'dsh-claude-home-panel-head' },\n React.createElement(\n 'div',\n { className: 'dsh-claude-home-tabs' },\n tabButton('overview', copyLabel('homeTabOverview', 'Overview')),\n tabButton('models', copyLabel('homeTabModels', 'Models')),\n ),\n React.createElement(\n 'div',\n { className: 'dsh-claude-home-panel-side' },\n React.createElement(\n 'div',\n { className: 'dsh-claude-home-ranges' },\n HOME_RANGES.map(item => React.createElement('button', {\n key: item.id,\n type: 'button',\n className: 'dsh-claude-home-range',\n 'data-active': range === item.id ? '' : undefined,\n 'aria-pressed': range === item.id,\n onClick() { setRange(item.id) },\n }, copyLabel(item.labelKey, item.fallback))),\n ),\n ),\n ),\n tab === 'models'\n ? React.createElement(models.component, { data })\n : overview.view(data),\n )\n }\n\n /**\n * Register the panel. The seat is declared by the host's conversation\n * package, so the registration waits for the declaration the same way the\n * settings section does; a host that never declares it simply keeps the\n * classic layout's spacing.\n */\n function registerPanel() {\n if (typeof ctx.inject !== 'function') return\n slotsFiber = ctx.inject(['slots'], scope => {\n const slots = scope.get('slots')\n if (slots === undefined || slots === null || typeof slots.inject !== 'function') return\n scope.effect(() => slots.inject(DOCK_SLOT, () => // A list seat keys its entries by id; the dock also carries the\n // host's todo, queue and goal bars, so the id is what keeps this\n // panel's slot stable across their re-renders.\n slots.register({ name: DOCK_SLOT, id: 'claude-style-usage', order: 40 }, HomeUsagePanel)), 'dsh-claude-style: home usage panel')\n })\n }\n\n function unmountColdSeat() {\n if (coldSeat === null) return\n coldSeat.root.unmount()\n if (coldSeat.element.parentElement !== null) coldSeat.element.parentElement.removeChild(coldSeat.element)\n coldSeat = null\n }\n\n /**\n * Mount the panel on the cold start screen, and drop it once the host's\n * dock is there to carry it (or the page leaves the studio hero). The\n * element is appended to the host's stack and never moves a host node;\n * a re-render that replaces the stack leaves the old copy behind, so it\n * is re-mounted on the new stack.\n */\n function syncColdSeat() {\n const stack = document.body.hasAttribute(HOME_HERO_ATTR)\n ? document.querySelector(`${COMPOSER_STACK}[class*=\"_composerHero\"]`)\n : null\n if (stack === null || stack.querySelector(`:scope > [data-slot=\"${DOCK_SLOT}\"]`) !== null) {\n unmountColdSeat()\n return\n }\n if (coldSeat !== null && coldSeat.stack === stack && coldSeat.element.parentElement === stack) return\n unmountColdSeat()\n const element = buildElement('div', 'dsh-claude-home-seat')\n stack.appendChild(element)\n const root = ReactDOM.createRoot(element)\n root.render(React.createElement(HomeUsagePanel))\n coldSeat = { stack, element, root }\n }\n\n /** Each pass reads the preference and the phase; only a change re-renders. */\n function sync() {\n const next = readPrefs().homeLayout\n if (next !== layout) {\n setLayout(next)\n syncColdSeat()\n return\n }\n // The hero/active phase flips without any preference change (opening a\n // session, or the new-session row), and the panel's visibility follows\n // it — so the flip has to reach the component, and the stylesheet's\n // studio rules follow it through the document mark.\n const hero = heroPhase()\n writeHeroAttr(hero)\n if (hero !== lastHero) {\n lastHero = hero\n if (hero) bookPick = Math.random()\n usage.notify()\n }\n syncColdSeat()\n if (next === HOME_LAYOUT_STUDIO) {\n usage.load(false)\n usage.loadList()\n }\n }\n\n ui.homeLayout = { sync }\n\n registerPanel()\n setLayout(readPrefs().homeLayout)\n\n return () => {\n unmountColdSeat()\n usage.stop()\n document.body.removeAttribute(HOME_LAYOUT_ATTR)\n document.body.removeAttribute(HOME_HERO_ATTR)\n if (slotsFiber !== null) {\n if (typeof slotsFiber.dispose === 'function') slotsFiber.dispose()\n slotsFiber = null\n }\n delete ui.homeLayout\n }\n}\n", "import { USAGE_ROUTE } from '../../constants'\nimport { activeLocale, copyLabel } from '../../core/i18n'\nimport { pad2 } from '../../shared/format'\nimport { notifyAll } from '../../shared/notify'\nimport type { HostContext } from '../../core/host'\nimport type { HostRemoteListAnswer, HostSessionRow } from '@dsh-claude-style/contracts/services'\nimport type { UsageAnswer, UsageDay, UsageModel, UsageReport, UsageTotals } from '@dsh-claude-style/contracts/usage'\n\n/**\n * The roll-up store's snapshot: the route's last answer (the host half's\n * usage fold, packages/host/src/usage-fold.ts), whether more is coming, and why not.\n */\nexport interface HomeUsageState {\n value: UsageReport | null\n computing: boolean\n error: string | null\n loading: boolean\n polls: number\n}\n\n/** One model's share in the session list's roll-up. */\nexport interface ListedModel {\n id: string\n tokens: number\n sessions: number\n lastAt: number\n}\n\n/** The session list's roll-up (summarizeSessionList). */\nexport interface ListSummary {\n tokens: number\n sessions: number\n activeDays: number\n model: string | null\n models: ListedModel[]\n days: { date: string, total: number }[]\n entries: { at: number, tokens: number, model: string | null }[]\n}\n\n/** One cell of the heat grid. */\nexport interface HeatCell {\n date: string\n tokens: number\n level: number\n}\n\n/**\n * The usage panel's data: the host half's roll-up route, the session list's\n * own projections, and the small vocabulary the two views share.\n *\n * The route (`USAGE_ROUTE`) is the panel's first source: it folds the local\n * session logs (or reads the cost-meter ledger) and answers immediately with\n * whatever it already knows. A cold answer carries `computing`, and the panel\n * keeps its skeleton up and polls until the value lands — so the first paint\n * never waits on the aggregation, and a value that has not arrived yet is\n * never drawn as a zero.\n *\n * The session list is the second source. Every listed session carries the\n * host's token-usage and model-selection projections, so it answers even when\n * the route cannot (an older host half, or a failed fold). It is coarser —\n * one total per session, bucketed onto that session's last-activity day — so\n * the panel names the source it drew from.\n *\n * `homePanelData` is the one derivation both views read: the range window and\n * the figures it sums, the heat grid's cells, the ranked model list, and the\n * per-day per-model totals the models chart stacks.\n */\n/** Where the roll-up lands while the host half is still folding. */\nexport const HOME_POLL_MS = 800\n/** Polls per load; a cold fold over a large history takes a few seconds. */\nexport const HOME_POLL_MAX = 15\n/** Heat-grid columns: twenty-six weeks of days, Sunday first — Claude Code's span. */\nexport const HOME_HEAT_WEEKS = 26\n/** A day's heat is bucketed into four steps against the busiest day shown. */\nexport const HOME_HEAT_STEPS = 4\n/**\n * The yardstick line's books, shortest first: each title's copy key, its\n * English fallback, and its length in tokens. Lengths carry two sources:\n * the public-domain classics were measured by feeding their full\n * Project Gutenberg / Wikisource text to the o200k_base tokenizer (the\n * English original or the standard English translation; Faust is the\n * German original), while\n * titles still under copyright keep word-count estimates (English at the\n * same 1.3 tokens a word The Hobbit's 123k comes from; the Three-Body\n * volumes, To Live and Ordinary World at the 0.96 tokens a character that\n * tokenizer measures on modern simplified-Chinese prose).\n */\nexport const HOME_BOOKS = [\n { key: 'homeBookTaoTeChing', title: 'Tao Te Ching', tokens: 7607 },\n { key: 'homeBookYellowWallpaper', title: 'The Yellow Wallpaper', tokens: 7778 },\n { key: 'homeBookMetamorphosis', title: 'Metamorphosis', tokens: 27557 },\n { key: 'homeBookJekyllAndHyde', title: 'The Strange Case of Dr Jekyll and Mr Hyde', tokens: 34713 },\n { key: 'homeBookAlice', title: \"Alice's Adventures in Wonderland\", tokens: 37248 },\n { key: 'homeBookAnimalFarm', title: 'Animal Farm', tokens: 39000 },\n { key: 'homeBookChristmasCarol', title: 'A Christmas Carol', tokens: 40306 },\n { key: 'homeBookCallOfTheWild', title: 'The Call of the Wild', tokens: 42383 },\n { key: 'homeBookTimeMachine', title: 'The Time Machine', tokens: 42817 },\n { key: 'homeBookWizardOfOz', title: 'The Wonderful Wizard of Oz', tokens: 51004 },\n { key: 'homeBookHeartOfDarkness', title: 'Heart of Darkness', tokens: 52163 },\n { key: 'homeBookFaust', title: 'Faust', tokens: 53930 },\n { key: 'homeBookTurnOfTheScrew', title: 'The Turn of the Screw', tokens: 57484 },\n { key: 'homeBookAesopsFables', title: \"Aesop's Fables\", tokens: 60707 },\n { key: 'homeBookPeterPan', title: 'Peter Pan', tokens: 63821 },\n { key: 'homeBookGatsby', title: 'The Great Gatsby', tokens: 65763 },\n { key: 'homeBookPrince', title: 'The Prince', tokens: 66670 },\n { key: 'homeBookInvisibleMan', title: 'The Invisible Man', tokens: 68163 },\n { key: 'homeBookAndersensFairyTales', title: \"Andersen's Fairy Tales\", tokens: 73931 },\n { key: 'homeBookWarOfTheWorlds', title: 'The War of the Worlds', tokens: 80168 },\n { key: 'homeBookBeyondGoodAndEvil', title: 'Beyond Good and Evil', tokens: 89836 },\n { key: 'homeBookWhiteFang', title: 'White Fang', tokens: 96418 },\n { key: 'homeBookMeditations', title: 'Meditations', tokens: 96973 },\n { key: 'homeBookFrankenstein', title: 'Frankenstein', tokens: 97886 },\n { key: 'homeBookPhilosophersStone', title: \"Harry Potter and the Philosopher's Stone\", tokens: 100000 },\n { key: 'homeBookDorianGray', title: 'The Picture of Dorian Gray', tokens: 106339 },\n { key: 'homeBookToLive', title: 'To Live', tokens: 115000 },\n { key: 'homeBookHobbit', title: 'The Hobbit', tokens: 123000 },\n { key: 'homeBookGrimmsFairyTales', title: \"Grimms' Fairy Tales\", tokens: 132467 },\n { key: 'homeBook1984', title: 'Nineteen Eighty-Four', tokens: 136278 },\n { key: 'homeBookSherlockHolmes', title: 'The Adventures of Sherlock Holmes', tokens: 138725 },\n { key: 'homeBookGulliversTravels', title: \"Gulliver's Travels\", tokens: 138958 },\n { key: 'homeBookWalden', title: 'Walden', tokens: 152659 },\n { key: 'homeBookRobinsonCrusoe', title: 'Robinson Crusoe', tokens: 153596 },\n { key: 'homeBookHuckleberryFinn', title: 'Adventures of Huckleberry Finn', tokens: 154263 },\n { key: 'homeBookDivineComedy', title: 'The Divine Comedy', tokens: 157765 },\n { key: 'homeBookMadameBovary', title: 'Madame Bovary', tokens: 159575 },\n { key: 'homeBookZarathustra', title: 'Thus Spoke Zarathustra', tokens: 161488 },\n { key: 'homeBookPride', title: 'Pride and Prejudice', tokens: 171701 },\n { key: 'homeBookOdyssey', title: 'The Odyssey', tokens: 173150 },\n { key: 'homeBookTaleOfTwoCities', title: 'A Tale of Two Cities', tokens: 187333 },\n { key: 'homeBookThreeBody', title: 'The Three-Body Problem', tokens: 202000 },\n { key: 'homeBookDracula', title: 'Dracula', tokens: 213648 },\n { key: 'homeBookGreatExpectations', title: 'Great Expectations', tokens: 252176 },\n { key: 'homeBookJaneEyre', title: 'Jane Eyre', tokens: 256179 },\n { key: 'homeBookRepublic', title: 'The Republic', tokens: 279539 },\n { key: 'homeBookCrimeAndPunishment', title: 'Crime and Punishment', tokens: 285009 },\n { key: 'homeBookLeviathan', title: 'Leviathan', tokens: 304696 },\n { key: 'homeBookMobyDick', title: 'Moby-Dick', tokens: 306522 },\n { key: 'homeBookDarkForest', title: 'The Dark Forest', tokens: 307000 },\n { key: 'homeBookDeathsEnd', title: \"Death's End\", tokens: 336000 },\n { key: 'homeBookAnnaKarenina', title: 'Anna Karenina', tokens: 481659 },\n { key: 'homeBookBrothersKaramazov', title: 'The Brothers Karamazov', tokens: 487590 },\n { key: 'homeBookDonQuixote', title: 'Don Quixote', tokens: 574243 },\n { key: 'homeBookLordOfTheRings', title: 'The Lord of the Rings', tokens: 625000 },\n { key: 'homeBookThreeKingdoms', title: 'Romance of the Three Kingdoms', tokens: 638009 },\n { key: 'homeBookCountOfMonteCristo', title: 'The Count of Monte Cristo', tokens: 651128 },\n { key: 'homeBookWarAndPeace', title: 'War and Peace', tokens: 769001 },\n { key: 'homeBookJourneyWest', title: 'Journey to the West', tokens: 783200 },\n { key: 'homeBookLesMiserables', title: 'Les Misérables', tokens: 801791 },\n { key: 'homeBookRedChamber', title: 'Dream of the Red Chamber', tokens: 903956 },\n { key: 'homeBookWaterMargin', title: 'Water Margin', tokens: 958242 },\n { key: 'homeBookOrdinaryWorld', title: 'Ordinary World', tokens: 998000 },\n { key: 'homeBookHarryPotter', title: 'the whole Harry Potter series', tokens: 1409000 },\n { key: 'homeBookLostTime', title: 'In Search of Lost Time', tokens: 1647000 },\n]\n/** The models chart's own window, in days: Claude Code's chart spans a month. */\nexport const HOME_CHART_DAYS = 30\n/** Models the ranked list shows before its \"show more\" row. */\nexport const HOME_MODEL_ROWS = 6\n/** The range pills: all time, or the last 30/7 calendar days including today. */\nexport const HOME_RANGES = [\n { id: 'all', labelKey: 'homeRangeAll', fallback: 'All', days: 0 },\n { id: '30d', labelKey: 'homeRange30d', fallback: '30d', days: 30 },\n { id: '7d', labelKey: 'homeRange7d', fallback: '7d', days: 7 },\n]\n\n/** A local calendar day, matching the host half's day keys. */\nexport function homeDayKey(date: Date) {\n return `${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())}`\n}\n\n/** The short day-label formatter, in the shell's language: \"Aug 26\", \"8月26日\". */\nexport function homeShortDateFormat() {\n return new Intl.DateTimeFormat(activeLocale(), { month: 'short', day: 'numeric' })\n}\n\n/** One day key as a short label, through `homeShortDateFormat()`'s formatter. */\nexport function homeShortDate(format: Intl.DateTimeFormat, day: string) {\n const parts = day.split('-')\n return format.format(new Date(Number(parts[0]), Number(parts[1]) - 1, Number(parts[2])))\n}\n\n/** The first day key of a range window; all time has none. */\nexport function homeRangeStart(windowDays: number) {\n if (!windowDays) return null\n const start = new Date()\n start.setHours(0, 0, 0, 0)\n start.setDate(start.getDate() - (windowDays - 1))\n return homeDayKey(start)\n}\n\nexport function formatHomeCount(count: unknown) {\n const value = Math.round(Number(count) || 0)\n return String(value).replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')\n}\n\n/** A settlement hour as Claude Code writes it: \"5 AM\" / \"下午 3 点\". */\nexport function formatHomeHour(hour: number) {\n const h12 = hour % 12 === 0 ? 12 : hour % 12\n return copyLabel(hour < 12 ? 'homeHourAm' : 'homeHourPm', hour < 12 ? '{hour} AM' : '{hour} PM', { hour: h12 })\n}\n\n/**\n * The tokens one day entry stands for. The host half's fold carries the four\n * buckets; the session list's roll-up can only carry one total per day, so it\n * is read when present.\n */\nexport function homeDayTokens(day: UsageDay | UsageTotals): number {\n if (day === null || day === undefined) return 0\n if (day.total !== undefined) return Number(day.total) || 0\n return (day.input || 0) + (day.output || 0) + (day.cacheRead || 0) + (day.cacheWrite || 0)\n}\n\n/** One model's bucket sum, for the ranked list's input and output columns. */\nexport function homeModelTokens(entry: UsageModel): number {\n if (entry.tokens !== undefined) return Number(entry.tokens) || 0\n return (entry.input || 0) + (entry.output || 0) + (entry.cacheRead || 0) + (entry.cacheWrite || 0)\n}\n\n/**\n * The roll-up store: the route's answer, the list's answer, and the polling\n * that fills the first one in.\n *\n * @param ctx - client context.\n * @returns accessors, the loads, and a stop that ends polling and listeners.\n */\nexport function createHomeUsage(ctx: HostContext) {\n /** What the panel draws: the last answer, whether more is coming, and why not. */\n const usage: HomeUsageState = { value: null, computing: false, error: null, loading: false, polls: 0 }\n let listSummary: ListSummary | null = null\n let listLoading = false\n const listeners: (() => void)[] = []\n let pollTimer: ReturnType<typeof setTimeout> | null = null\n let disposed = false\n\n function emit() {\n notifyAll(listeners)\n }\n\n function subscribe(listener: () => void) {\n listeners.push(listener)\n return () => {\n const index = listeners.indexOf(listener)\n if (index !== -1) listeners.splice(index, 1)\n }\n }\n\n function stopPolling() {\n if (pollTimer !== null) {\n clearTimeout(pollTimer)\n pollTimer = null\n }\n }\n\n /**\n * One read of the roll-up. `computing` schedules the next poll, so the\n * panel fills in as soon as the host half has the numbers.\n */\n function loadUsage(force?: boolean) {\n if (disposed || usage.loading) return\n if (!force && usage.value !== null && !usage.computing) return\n usage.loading = true\n const request = fetch(USAGE_ROUTE, { credentials: 'same-origin', headers: { accept: 'application/json' } })\n request.then(response => response !== null && response.ok === true ? response.json() : null).then((body: UsageAnswer | null) => {\n usage.loading = false\n if (disposed) return\n if (body === null || body.ok !== true) {\n usage.error = 'unavailable'\n emit()\n return\n }\n usage.value = body.value === undefined ? null : body.value\n usage.computing = body.computing === true\n usage.error = body.error === undefined ? null : body.error\n emit()\n if (usage.computing) {\n if (usage.polls >= HOME_POLL_MAX) return\n usage.polls += 1\n stopPolling()\n pollTimer = setTimeout(() => {\n pollTimer = null\n loadUsage(true)\n }, HOME_POLL_MS)\n }\n // A failed usage fetch is the panel's \"unavailable\" state, not an exception: the panel renders without the numbers (D12).\n }).catch(() => {\n usage.loading = false\n if (disposed) return\n usage.error = 'unavailable'\n emit()\n })\n }\n\n /**\n * The session list's roll-up.\n *\n * The host's list rows carry their own projection block\n * (`projections.values`): `tokenUsage` with its four disjoint buckets,\n * `modelSelection` with the route the session last used, and\n * `sessionListMetadata` with the blank flag and the last prompt time.\n * Summing them gives the panel a second, cheaper source — and the model\n * list's fallback when the roll-up route cannot answer.\n *\n * A session's whole total is bucketed onto its own last-activity day: the\n * list has no per-day split, so this is coarser than the host half's fold,\n * which is exactly why the panel names the source it drew from.\n */\n function summarizeSessionList(rows: HostSessionRow[]): ListSummary {\n let tokens = 0\n const dayCount: Record<string, boolean> = {}\n const byDay: Record<string, number> = {}\n const byModel: Record<string, { tokens: number, sessions: number, lastAt: number }> = {}\n const entries: ListSummary['entries'] = []\n for (let i = 0; i < rows.length; i++) {\n const row = rows[i]\n const values = row !== null && row !== undefined && row.projections !== undefined && row.projections !== null\n ? row.projections.values\n : null\n if (values === null || values === undefined) continue\n const meta = values.sessionListMetadata\n if (meta !== null && meta !== undefined && meta.blank === true) continue\n const bucket = values.tokenUsage\n const total = bucket === null || bucket === undefined ? 0\n : (bucket.uncachedInputTokens || 0) + (bucket.outputTokens || 0)\n + (bucket.cacheReadTokens || 0) + (bucket.cacheWriteTokens || 0)\n tokens += total\n const at = meta !== null && meta !== undefined && typeof meta.lastPromptAt === 'number'\n ? meta.lastPromptAt\n : row.updatedAt\n const selection = values.modelSelection\n const picked = selection !== null && selection !== undefined ? (selection.next || selection.lastUsed) : null\n const id = picked !== null && picked !== undefined && typeof picked.model === 'string' ? picked.model : null\n entries.push({ at: typeof at === 'number' ? at : 0, tokens: total, model: id })\n if (typeof at === 'number') {\n const day = homeDayKey(new Date(at))\n dayCount[day] = true\n byDay[day] = (byDay[day] || 0) + total\n }\n if (id !== null) {\n let cell = byModel[id]\n if (cell === undefined) {\n cell = { tokens: 0, sessions: 0, lastAt: 0 }\n byModel[id] = cell\n }\n cell.tokens += total\n cell.sessions += 1\n if (typeof at === 'number' && at > cell.lastAt) cell.lastAt = at\n }\n }\n let favorite: string | null = null\n let best = 0\n const models: ListedModel[] = []\n for (const name in byModel) {\n models.push({ id: name, tokens: byModel[name].tokens, sessions: byModel[name].sessions, lastAt: byModel[name].lastAt })\n if (byModel[name].sessions > best) {\n best = byModel[name].sessions\n favorite = name\n }\n }\n models.sort((left, right) => right.tokens - left.tokens)\n const days: ListSummary['days'] = []\n for (const date in byDay) days.push({ date, total: byDay[date] })\n return { tokens, sessions: entries.length, activeDays: Object.keys(dayCount).length, model: favorite, models, days, entries }\n }\n\n /** Read the session list once; a host without the remote service keeps the route's answer. */\n function loadSessionSummary() {\n if (disposed || listLoading || listSummary !== null) return\n const sessions = ctx.get('remote.session')\n if (sessions === undefined || sessions === null || typeof sessions.list !== 'function') return\n listLoading = true\n sessions.list({}).then((result: HostRemoteListAnswer) => {\n listLoading = false\n if (disposed) return\n const items = result !== null && result !== undefined && result.ok === true\n && result.value !== null && result.value !== undefined && Array.isArray(result.value.items)\n ? result.value.items\n : null\n if (items === null) return\n listSummary = summarizeSessionList(items)\n emit()\n // The roll-up is a summary the panel can do without: a failed fetch just ends the loading mark (D12).\n }).catch(() => {\n listLoading = false\n })\n }\n\n return {\n state() { return usage },\n list() { return listSummary },\n listLoading() { return listLoading },\n subscribe,\n /** Ask every view to re-render; a state change outside the store uses it. */\n notify: emit,\n load: loadUsage,\n loadList: loadSessionSummary,\n stop() {\n disposed = true\n stopPolling()\n listeners.length = 0\n },\n }\n}\n\n/**\n * The heat grid: one cell per day, weeks as columns, Sunday first, running\n * back HOME_HEAT_WEEKS weeks from today. Days the roll-up does not cover are\n * cells with no heat, which is exactly what an empty cell means.\n */\nexport function homeHeatGrid(days: UsageDay[] | null | undefined) {\n const byDate: Record<string, number> = {}\n const list = days === null || days === undefined ? [] : days\n for (let i = 0; i < list.length; i++) {\n byDate[list[i].date] = homeDayTokens(list[i])\n }\n const today = new Date()\n today.setHours(0, 0, 0, 0)\n const start = new Date(today)\n start.setDate(start.getDate() - (HOME_HEAT_WEEKS * 7 - 1))\n start.setDate(start.getDate() - start.getDay())\n const cells: HeatCell[] = []\n let peak = 0\n for (const cursor = new Date(start); cursor <= today; cursor.setDate(cursor.getDate() + 1)) {\n const key = homeDayKey(cursor)\n const tokens = byDate[key] || 0\n if (tokens > peak) peak = tokens\n cells.push({ date: key, tokens, level: 0 })\n }\n for (let c = 0; c < cells.length; c++) {\n if (cells[c].tokens === 0 || peak === 0) continue\n cells[c].level = Math.max(1, Math.min(HOME_HEAT_STEPS, Math.ceil(cells[c].tokens / peak * HOME_HEAT_STEPS)))\n }\n return { cells, peak }\n}\n\n/** One row of the ranked model list; the buckets are there when the host half's fold answered. */\nexport interface HomeModel {\n id: string\n input?: number\n output?: number\n cacheRead?: number\n cacheWrite?: number\n tokens: number\n /** The list's own count of sessions on this model; the fold's answer carries no such count. */\n sessions?: number\n lastAt?: number\n}\n\n/**\n * The ranked model list, from whichever source can answer.\n *\n * The host half's fold attributes every usage sample it can to its route, so\n * its answer carries each model's four buckets; the session list carries one\n * total per model and no split. Both are sorted by tokens.\n */\nexport function homeModelList(value: UsageReport | null, listed: ListSummary | null): HomeModel[] | null {\n if (value !== null && Array.isArray(value.models) && value.models.length > 0) {\n return value.models.map((entry: UsageModel) => ({\n id: entry.id,\n input: entry.input || 0,\n output: entry.output || 0,\n cacheRead: entry.cacheRead || 0,\n cacheWrite: entry.cacheWrite || 0,\n tokens: homeModelTokens(entry),\n sessions: entry.sessions,\n lastAt: entry.lastAt\n }))\n }\n if (listed === null) return null\n return listed.models.map(entry => ({\n id: entry.id,\n tokens: entry.tokens,\n sessions: entry.sessions,\n lastAt: entry.lastAt\n }))\n}\n\n/**\n * The models chart's columns: the last HOME_CHART_DAYS days of the roll-up's\n * own per-day per-model totals, in calendar order.\n *\n * The fold attributes a sample only when the event names its route, so a day\n * whose samples are all unattributed carries no models and draws no stack —\n * its share of the day simply stays out of the chart.\n */\nexport function homeModelDays(value: UsageReport | null, windowDays: number) {\n if (value === null || !Array.isArray(value.days)) return null\n const span = windowDays > 0 && windowDays < HOME_CHART_DAYS ? windowDays : HOME_CHART_DAYS\n // The span is at least a day, so the window has a first day.\n const start = homeRangeStart(span)!\n const columns: { date: string, models: Record<string, number> }[] = []\n for (let i = 0; i < value.days.length; i++) {\n const day = value.days[i]\n if (day.date < start || day.models === undefined || day.models === null) continue\n columns.push({ date: day.date, models: day.models })\n }\n if (columns.length === 0) return null\n columns.sort((left, right) => left.date < right.date ? -1 : 1)\n return columns\n}\n\n/**\n * Every figure the panel draws, from the two sources and the picked range.\n *\n * @param state - the roll-up store's snapshot.\n * @param listed - the session list's roll-up, or null.\n * @param range - the picked range id ('all' / '30d' / '7d').\n * @param bookPick - the panel's draw in [0, 1), which picks the yardstick book.\n * @returns the figures both views read.\n */\nexport function homePanelData(state: HomeUsageState, listed: ListSummary | null, range: string, bookPick: number) {\n const value = state.value\n const ready = value !== null && value.totals !== undefined\n const totals = ready ? value.totals : null\n const known = ready || listed !== null\n let windowDays = 0\n for (let r = 0; r < HOME_RANGES.length; r++) {\n if (HOME_RANGES[r].id === range) windowDays = HOME_RANGES[r].days\n }\n const start = homeRangeStart(windowDays)\n const startMs = start === null ? null : new Date(`${start}T00:00:00`).getTime()\n const inRange = (date: string) => start === null || date >= start\n let tokens = 0\n let calls: number | null = null\n let sessions: number | null = null\n let activeDays: number | null = null\n if (ready && start === null && totals !== null) {\n // All time reads the fold's own totals; its session count is already the\n // distinct union over every day.\n tokens = homeDayTokens(totals)\n calls = totals.calls ?? null\n sessions = totals.sessions ?? null\n activeDays = totals.activeDays ?? null\n } else if (ready) {\n // A window sums the per-day buckets. Sessions union the per-day id lists\n // when the host half carries them on every day; an older host half has\n // none, and the per-day counts then sum to an upper bound rather than\n // reading zero.\n const ids: Record<string, boolean> = {}\n let everyDayHasIds = true\n let daySessions = 0\n calls = 0\n sessions = 0\n activeDays = 0\n for (let d = 0; d < value.days.length; d++) {\n const day = value.days[d]\n if (!inRange(day.date)) continue\n tokens += homeDayTokens(day)\n calls += day.calls || 0\n activeDays += 1\n if (Array.isArray(day.sessionIds)) {\n for (let s = 0; s < day.sessionIds.length; s++) ids[day.sessionIds[s]] = true\n } else {\n everyDayHasIds = false\n }\n daySessions += day.sessions || 0\n }\n sessions = everyDayHasIds ? Object.keys(ids).length : daySessions\n } else if (listed !== null) {\n // The list's fall-back: a session's whole total rides its last-activity\n // day, so the window keeps the sessions whose last prompt falls inside.\n sessions = 0\n activeDays = 0\n for (let e = 0; e < listed.entries.length; e++) {\n const item = listed.entries[e]\n if (startMs !== null && item.at < startMs) continue\n tokens += item.tokens\n sessions += 1\n }\n for (let ld = 0; ld < listed.days.length; ld++) {\n if (inRange(listed.days[ld].date)) activeDays += 1\n }\n }\n // The hour histogram is the fold's own (behind a cost-meter answer it\n // lands a moment later). All time reads the whole histogram; a window sums\n // its own days' histograms, so the peak hour follows the range pills.\n let hourCounts: number[] | null = null\n if (ready && start === null && Array.isArray(value.hours)) hourCounts = value.hours\n else if (ready && start !== null && Array.isArray(value.days)) {\n for (let hd = 0; hd < value.days.length; hd++) {\n const hourDay = value.days[hd]\n if (!inRange(hourDay.date) || !Array.isArray(hourDay.hours)) continue\n if (hourCounts === null) hourCounts = new Array(24).fill(0)\n for (let dh = 0; dh < 24; dh++) hourCounts[dh] += Number(hourDay.hours[dh]) || 0\n }\n }\n let peakHour: string | null = null\n if (hourCounts !== null) {\n let bestHour = 0\n let hourSum = 0\n for (let h = 0; h < 24; h++) {\n const hourCount = Number(hourCounts[h]) || 0\n hourSum += hourCount\n if (hourCount > (Number(hourCounts[bestHour]) || 0)) bestHour = h\n }\n if (hourSum > 0) peakHour = formatHomeHour(bestHour)\n }\n let model: string | null = null\n if (listed !== null) {\n if (startMs === null) model = listed.model\n else {\n let bestSessions = 0\n for (let m = 0; m < listed.models.length; m++) {\n const windowed = listed.models[m]\n if (windowed.lastAt < startMs || windowed.sessions <= bestSessions) continue\n bestSessions = windowed.sessions\n model = windowed.id\n }\n }\n }\n if (model === null && ready && typeof value.model === 'string') model = value.model\n // The yardstick line reads the window's own total, like the tiles above it.\n // The panel draws its book once; a window that has not passed that book\n // yet steps down to the longest book it has passed, so switching ranges\n // keeps the same book whenever the totals allow.\n let fun: string | null = null\n let bookIndex = Math.min(HOME_BOOKS.length - 1, Math.floor(bookPick * HOME_BOOKS.length))\n while (bookIndex >= 0 && tokens < HOME_BOOKS[bookIndex].tokens) bookIndex -= 1\n if (bookIndex >= 0) {\n const book = HOME_BOOKS[bookIndex]\n fun = copyLabel('homeFunBook', \"You've used ~{count}× the tokens in {book}.\", {\n count: formatHomeCount(Math.round(tokens / book.tokens)),\n book: copyLabel(book.key, book.title),\n })\n }\n const models = homeModelList(value, listed)\n // Only what the two views draw: the window's own bookkeeping (the range\n // start, its milliseconds, the day test) stays local to this file.\n return {\n listed,\n known,\n tokens,\n calls,\n sessions,\n activeDays,\n peakHour,\n model,\n grid: homeHeatGrid(ready ? value.days : (listed === null ? null : listed.days)),\n fun,\n models,\n modelDays: homeModelDays(value, windowDays),\n }\n}\n\n/** Every figure the panel draws (homePanelData). */\nexport type HomePanel = ReturnType<typeof homePanelData>\n", "import * as React from 'react'\nimport { copyLabel } from '../../core/i18n'\nimport { HOME_MODEL_ROWS, formatHomeCount, homeShortDate, homeShortDateFormat } from './data'\nimport type { HomeModel, HomePanel } from './data'\nimport { formatCompactTokens } from '../../shared/format'\n\n/**\n * The panel's Models tab: Claude Code's own shape — a per-day stacked chart\n * over a ranked list of the models that spent those tokens.\n *\n * The chart stacks each day's per-model totals (the ledger's per-provider\n * split, or the fold's route attribution when the event names one), so a model's\n * colour is its rank in the list below: the biggest spender is the darkest\n * blue, the ramp walks down to grey, and the list's swatches repeat it. A day\n * whose samples are all unattributed draws no stack.\n *\n * The list is a rank, a name, the input and output sides of its tokens, and\n * its share of the models shown; past HOME_MODEL_ROWS rows it folds behind\n * one \"show more\" row, the way Claude Code's does, and the open list ends in\n * a \"show less\" row that folds it back. The chart keeps its own\n * HOME_CHART_DAYS window while the list follows the range pills, which is the\n * same split the Overview tab's heat grid already uses.\n *\n * @returns `{ component }`, a React component taking `{ data }`.\n */\nexport function createHomeModels() {\n /** One decimal of a percentage, as Claude Code writes it: \"43.0%\". */\n function share(part: number, whole: number) {\n return whole > 0 ? `${(Math.round(part / whole * 1000) / 10).toFixed(1)}%` : '—'\n }\n\n /** The axis top: the peak rounded up to one significant step. */\n function axisMax(peak: number) {\n if (!(peak > 0)) return 0\n const magnitude = Math.pow(10, Math.floor(Math.log(peak) / Math.LN10))\n const scaled = peak / magnitude\n const step = scaled <= 1 ? 1 : scaled <= 2 ? 2 : scaled <= 2.5 ? 2.5 : scaled <= 5 ? 5 : 10\n return step * magnitude\n }\n\n /** The four buckets' two sides, as the list writes them. */\n function sides(entry: HomeModel) {\n return {\n input: (entry.input || 0) + (entry.cacheRead || 0) + (entry.cacheWrite || 0),\n output: entry.output || 0,\n }\n }\n\n /** Whether the source carried the four buckets, or only one total. */\n function hasSplit(entry: HomeModel) {\n return entry.input !== undefined || entry.output !== undefined\n || entry.cacheRead !== undefined || entry.cacheWrite !== undefined\n }\n\n /** The palette's last step, for a model the ranked list does not carry. */\n const RANK_LAST = 7\n\n function chart(columns: HomePanel['modelDays'], rankOf: Record<string, number>, skeleton: boolean) {\n let peak = 0\n const list = columns === null ? [] : columns\n for (let c = 0; c < list.length; c++) {\n let total = 0\n const models = list[c].models\n for (const id in models) total += models[id]\n if (total > peak) peak = total\n }\n const top = axisMax(peak)\n const format = homeShortDateFormat()\n // Four gridlines plus the baseline, Claude Code's own ladder.\n const ticks = [1, 0.75, 0.5, 0.25, 0]\n return React.createElement(\n 'div',\n { className: 'dsh-claude-home-chart', 'data-skeleton': skeleton ? '' : undefined },\n React.createElement(\n 'div',\n { className: 'dsh-claude-home-chart-plot' },\n ticks.map(at => React.createElement(\n 'span',\n { key: at, className: 'dsh-claude-home-chart-tick', style: { bottom: `${at * 100}%` } },\n skeleton || top === 0 ? '' : formatCompactTokens(top * at),\n )),\n React.createElement(\n 'div',\n { className: 'dsh-claude-home-chart-bars' },\n list.map(column => {\n let dayTotal = 0\n const stack: { id: string, tokens: number, rank: number }[] = []\n const models = column.models\n for (const id in models) {\n dayTotal += models[id]\n const rank = rankOf[id]\n stack.push({ id, tokens: models[id], rank: rank === undefined ? Number.MAX_VALUE : rank })\n }\n // Biggest first, so the darkest slice sits on the axis.\n stack.sort((left, right) => left.rank - right.rank)\n // The column is the day's whole stack, sized against the axis top,\n // and each slice is its share of the day: both percentages then\n // resolve against a definite height, and the column's rounding\n // lands on the top of the stack.\n return React.createElement(\n 'span',\n {\n key: column.date,\n className: 'dsh-claude-home-chart-col',\n title: `${homeShortDate(format, column.date)} · ${formatCompactTokens(dayTotal)}`,\n style: { height: `${top > 0 ? dayTotal / top * 100 : 0}%` },\n },\n stack.map(slice => React.createElement('span', {\n key: slice.id,\n className: 'dsh-claude-home-chart-seg',\n 'data-rank': Math.min(slice.rank, RANK_LAST),\n style: { height: `${dayTotal > 0 ? slice.tokens / dayTotal * 100 : 0}%` },\n })),\n )\n }),\n ),\n ),\n React.createElement(\n 'div',\n { className: 'dsh-claude-home-chart-axis' },\n list.map((column, index) => {\n // Every third column from the first, Claude Code's own cadence.\n const labelled = index % 3 === 0\n return React.createElement('span', { key: column.date, className: 'dsh-claude-home-chart-label' }, labelled ? homeShortDate(format, column.date) : '')\n }),\n ),\n )\n }\n\n function ModelsView(props: { data: HomePanel }) {\n const data = props.data\n const more = React.useState(false)\n const expanded = more[0]\n const setExpanded = more[1]\n const models = data.models\n const columns = data.modelDays\n const skeleton = !data.known\n if (models === null || models.length === 0) {\n if (data.listed !== null || !skeleton) {\n return React.createElement('div', { className: 'dsh-claude-home-models-empty' }, copyLabel('homeModelsEmpty', 'No model data yet'))\n }\n return React.createElement(\n React.Fragment,\n null,\n // The frame comes first, so the chart's height is reserved from the\n // first paint and the list does not jump when the numbers land.\n chart(null, {}, true),\n React.createElement(\n 'div',\n { className: 'dsh-claude-home-models', 'data-skeleton': '' },\n [0, 1, 2].map(index => React.createElement(\n 'div',\n { key: index, className: 'dsh-claude-home-model' },\n React.createElement('span', { className: 'dsh-claude-home-model-swatch' }),\n React.createElement('span', { className: 'dsh-claude-home-model-name' }, ''),\n React.createElement('span', { className: 'dsh-claude-home-model-split' }, ''),\n React.createElement('span', { className: 'dsh-claude-home-model-share' }, ''),\n )),\n ),\n )\n }\n let total = 0\n const rankOf: Record<string, number> = {}\n for (let i = 0; i < models.length; i++) {\n total += models[i].tokens\n rankOf[models[i].id] = i\n }\n const shown = expanded ? models : models.slice(0, HOME_MODEL_ROWS)\n const hidden = models.length - shown.length\n return React.createElement(\n React.Fragment,\n null,\n columns === null && !skeleton ? null : chart(columns, rankOf, skeleton),\n React.createElement(\n 'div',\n { className: 'dsh-claude-home-models' },\n shown.map((entry, rank) => {\n const parts = sides(entry)\n return React.createElement(\n 'div',\n {\n key: entry.id,\n className: 'dsh-claude-home-model',\n title: entry.sessions === undefined\n ? entry.id\n : `${entry.id} · ${copyLabel('homeModelSessions', '{count} sessions', { count: formatHomeCount(entry.sessions) })}`,\n },\n React.createElement('span', { className: 'dsh-claude-home-model-swatch', 'data-rank': Math.min(rank, RANK_LAST) }),\n React.createElement('span', { className: 'dsh-claude-home-model-name' }, entry.id),\n React.createElement(\n 'span',\n { className: 'dsh-claude-home-model-split' },\n hasSplit(entry)\n ? `${formatCompactTokens(parts.input)} in · ${formatCompactTokens(parts.output)} out`\n : formatCompactTokens(entry.tokens),\n ),\n React.createElement('span', { className: 'dsh-claude-home-model-share' }, share(entry.tokens, total)),\n )\n }),\n // The fold row turns into its own undo once the list is open.\n models.length <= HOME_MODEL_ROWS ? null : React.createElement(\n 'button',\n {\n type: 'button',\n className: 'dsh-claude-home-models-more',\n 'aria-expanded': expanded,\n onClick() { setExpanded(!expanded) },\n },\n expanded\n ? copyLabel('homeModelsLess', 'Show less')\n : copyLabel('homeModelsMore', 'Show {count} more', { count: hidden }),\n ),\n ),\n )\n }\n\n return { component: ModelsView }\n}\n", "import * as React from 'react'\nimport { copyLabel } from '../../core/i18n'\nimport { formatHomeCount, homeShortDate, homeShortDateFormat } from './data'\nimport type { HeatCell, HomePanel } from './data'\nimport { formatCompactTokens } from '../../shared/format'\n\n/**\n * The panel's Overview tab: the six stat cells, the heat grid, and Claude\n * Code's yardstick line.\n *\n * The frame is drawn before any number arrives — the cells keep their\n * geometry and show a skeleton — so the page never shifts under the pointer\n * when the roll-up lands. A figure the source cannot answer is a dash, not a\n * zero and not a skeleton: the skeleton means \"still loading\", which a\n * missing figure is not.\n *\n * @returns `{ view(data) }`, where `data` is `homePanelData`'s answer.\n */\nexport function createHomeOverview() {\n function statCell(key: string, label: string, text: string, skeleton: boolean) {\n return React.createElement(\n 'div',\n { key, className: 'dsh-claude-home-stat', 'data-stat': key, 'data-skeleton': skeleton ? '' : undefined },\n React.createElement('span', { className: 'dsh-claude-home-stat-label' }, label),\n React.createElement('span', { className: 'dsh-claude-home-stat-value', title: skeleton ? undefined : text }, skeleton ? '' : text),\n )\n }\n\n /** Columns at each end of the grid whose tip pill lines up with its cell's outer edge. */\n const HOME_TIP_EDGE = 3\n\n /**\n * A heat cell's tip: the day and the tokens that day spent, \"Sep 9 —\n * 15.9k tokens\". Both sources behind the grid carry a per-day token total,\n * so every cell reads the same figure the cell's own heat is bucketed from.\n */\n function heatTip(format: Intl.DateTimeFormat, cell: HeatCell) {\n return copyLabel('homeHeatTipTokens', '{date} — {tokens} tokens', {\n date: homeShortDate(format, cell.date),\n tokens: formatCompactTokens(cell.tokens),\n })\n }\n\n function view(data: HomePanel) {\n const skeleton = !data.known\n const format = homeShortDateFormat()\n const columns = Math.ceil(data.grid.cells.length / 7)\n return React.createElement(\n React.Fragment,\n null,\n React.createElement(\n 'div',\n { className: 'dsh-claude-home-stats' },\n statCell('sessions', copyLabel('homeSessions', 'Sessions'), data.sessions === null ? '—' : formatHomeCount(data.sessions), skeleton),\n statCell('calls', copyLabel('homeCalls', 'Messages'), data.calls === null ? '—' : formatHomeCount(data.calls), skeleton),\n statCell('tokens', copyLabel('homeTokens', 'Total tokens'), formatCompactTokens(data.tokens), skeleton),\n statCell('days', copyLabel('homeActiveDays', 'Active days'), data.activeDays === null ? '—' : formatHomeCount(data.activeDays), skeleton),\n statCell('peak', copyLabel('homePeakHour', 'Peak hour'), data.peakHour === null ? '—' : data.peakHour, skeleton),\n statCell('model', copyLabel('homeTopModel', 'Favorite model'), data.model === null ? '—' : data.model, skeleton),\n ),\n React.createElement(\n 'div',\n { className: 'dsh-claude-home-heat', 'data-skeleton': data.known ? undefined : '' },\n data.grid.cells.map((cell, index) => {\n const tip = skeleton ? undefined : heatTip(format, cell)\n const column = Math.floor(index / 7)\n return React.createElement('span', {\n key: cell.date,\n className: 'dsh-claude-home-heat-cell',\n 'data-level': cell.level,\n 'data-tip': tip,\n 'aria-label': tip,\n // The pill is centred on its cell, except near the grid's two\n // ends, where it lines up with the cell's outer edge and stays\n // inside the panel.\n 'data-edge': column < HOME_TIP_EDGE ? 'start' : column >= columns - HOME_TIP_EDGE ? 'end' : undefined,\n })\n }),\n ),\n data.fun === null ? null : React.createElement('span', { className: 'dsh-claude-home-fun' }, data.fun),\n )\n }\n\n return { view }\n}\n", "/** English weekday names, indexed by Date#getDay() (0 = Sunday). */\nexport const WEEKDAY_NAMES = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n\n/**\n * The classic hero's welcomes, à la Claude Code's rotating greetings. Each\n * time-of-day slot has its own pool — the night slot runs past midnight,\n * so its hours count on from 24 — and a few lines fit any hour. `{name}`\n * is the user's name, `{weekday}` today's.\n */\nexport const HERO_GREETING_SLOTS = [\n { from: 5, to: 12, lines: [\n 'Good morning, {name}!',\n 'Happy {weekday}, {name}.',\n 'What are you working on?',\n 'Morning, {name}. What’s first?',\n 'Fresh start, {name}?',\n ] },\n { from: 12, to: 14, lines: [\n 'What’s on the agenda today?',\n 'Good afternoon, {name}.',\n 'Midday check-in, {name}?',\n ] },\n { from: 14, to: 18, lines: [\n 'Coffee and Claude time?',\n 'Good afternoon, {name}.',\n 'How’s the day going, {name}?',\n 'Afternoon, {name}. What’s next?',\n ] },\n { from: 18, to: 22, lines: [\n 'Evening, how are things?',\n 'Good evening, {name}.',\n 'How was your day, {name}?',\n 'Winding down, or just getting started?',\n ] },\n { from: 22, to: 29, lines: [\n 'You are here!',\n 'Hello, night owl.',\n 'Burning the midnight oil, {name}?',\n 'Still up, {name}?',\n ] },\n]\nexport const HERO_GREETING_ANYTIME = [\n 'Back at it, {name}?',\n 'Welcome back, {name}.',\n 'Hey there, {name}.',\n 'What shall we build?',\n]\n\n/**\n * One classic hero welcome: the current slot's pool and the any-hour lines,\n * picked by `draw` in [0, 1). The caller holds the draw, so the line stays\n * put between passes and changes only when the draw or the slot does.\n */\nexport function pickHeroGreeting(username: string, draw: number) {\n const now = new Date()\n const hour = now.getHours()\n const clock = hour < 5 ? hour + 24 : hour\n let lines = HERO_GREETING_ANYTIME\n for (let s = 0; s < HERO_GREETING_SLOTS.length; s++) {\n const slot = HERO_GREETING_SLOTS[s]\n if (clock >= slot.from && clock < slot.to) lines = slot.lines.concat(HERO_GREETING_ANYTIME)\n }\n const line = lines[Math.min(lines.length - 1, Math.floor(draw * lines.length))]\n return line.replace('{name}', username || 'User').replace('{weekday}', WEEKDAY_NAMES[now.getDay()])\n}\n\n/**\n * The studio dashboard's greeting, à la Claude Code's desktop home: one\n * fixed line naming the signed-in user, no clock. The classic hero keeps\n * the rotating welcomes.\n */\nexport function pickStudioGreeting(username: string) {\n return `What's up next, ${username || 'User'}?`\n}\n", "import { HOME_LAYOUT_STUDIO } from '../../constants'\nimport { pickHeroGreeting, pickStudioGreeting } from '../home/greetings'\nimport { findComposerCards, findComposerInput, findComposerPlaceholder, findComposerPlaceholders, getUsername } from '../../core/host'\nimport { readPrefs } from '../../core/prefs'\nimport { removeStrayNodes } from '../../shared/popover'\nimport type { HostContext } from '../../core/host'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './copy.manifest'\n\n/** The hero composer's own hint, which the copy animation types back out. */\nconst HERO_HINT = 'How can I help you today?'\n/** The conversation composer's hint, which the same animation settles on. */\nconst DEFAULT_HINT = 'Type / for commands'\n\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n /** Shipped idle composer hints (zh / en, hero / default) this skin replaces. */\n const HINT_SOURCES = [\n '描述你想要构建的内容',\n '发消息或创建任务',\n 'Describe what you want to build',\n 'Message or run a task',\n HERO_HINT,\n DEFAULT_HINT,\n ]\n\n /** Whether a placeholder's text is one of the hints this skin replaces. */\n function isShippedHint(text: string) {\n for (let j = 0; j < HINT_SOURCES.length; j++) {\n if (text.indexOf(HINT_SOURCES[j]) === 0) return true\n }\n return false\n }\n\n /** The classic welcome's draw, renewed each time the page comes back to the hero. */\n let greetingDraw = Math.random()\n let wasHero = false\n\n function rewriteHeadline() {\n const hero = ui.composer!.isHero()\n if (hero && !wasHero) greetingDraw = Math.random()\n wasHero = hero\n // The studio dashboard shows one fixed line; the classic hero draws from\n // the clock slot's welcomes.\n const greeting = readPrefs().homeLayout === HOME_LAYOUT_STUDIO\n ? pickStudioGreeting(getUsername())\n : pickHeroGreeting(getUsername(), greetingDraw)\n const groups = document.querySelectorAll('[class*=\"titleGroup\"]')\n for (let i = 0; i < groups.length; i++) {\n const spans = groups[i].children\n for (let j = 0; j < spans.length; j++) {\n const span = spans[j]\n const cls = span.getAttribute('class') || ''\n if (cls.includes('previewBadge')) continue\n if (span.textContent !== greeting) span.textContent = greeting\n break\n }\n }\n }\n\n function rewriteHint() {\n if (!ui.composer!.isActive()) return\n const targetHint = ui.composer!.isHero() ? HERO_HINT : DEFAULT_HINT\n const hints = findComposerPlaceholders()\n for (let i = 0; i < hints.length; i++) {\n const node = hints[i]\n const text = node.textContent || ''\n if (isShippedHint(text) && text !== targetHint) node.textContent = targetHint\n }\n }\n\n function syncAttachmentPlaceholder() {\n if (!ui.composer!.isActive()) {\n removeStrayNodes(document, '[data-dsh-synthetic-placeholder]', [])\n return\n }\n const targetHint = ui.composer!.isHero() ? HERO_HINT : DEFAULT_HINT\n const cards = findComposerCards()\n for (let ci = 0; ci < cards.length; ci++) {\n const card = cards[ci]\n const input = findComposerInput(card)\n if (!input) continue\n const text = (input.textContent || '').replace(/[\\u200B-\\u200D\\uFEFF]/g, '').trim()\n const isEmpty = text.length === 0\n let placeholder = findComposerPlaceholder(card)\n const grow = input.closest ? input.closest('[class*=\"_grow\"]') : input.parentElement\n\n if (isEmpty) {\n if (!placeholder && grow) {\n placeholder = document.createElement('div')\n placeholder.setAttribute('data-composer-placeholder', '')\n placeholder.setAttribute('data-dsh-synthetic-placeholder', 'true')\n placeholder.textContent = targetHint\n grow.appendChild(placeholder)\n } else if (placeholder) {\n if (placeholder.style.display === 'none') placeholder.style.display = ''\n const curText = placeholder.textContent || ''\n if (isShippedHint(curText) && curText !== targetHint) placeholder.textContent = targetHint\n }\n } else {\n if (placeholder && placeholder.hasAttribute('data-dsh-synthetic-placeholder')) {\n if (placeholder.parentElement) placeholder.parentElement.removeChild(placeholder)\n }\n }\n }\n }\n\n ui.copy = {\n sync() {\n rewriteHeadline()\n rewriteHint()\n // Every pass, the restyle on or off: its off branch is what takes the\n // skin's placeholders away again.\n syncAttachmentPlaceholder()\n },\n /** A composer input/compositionend event: refresh the placeholder. The\n * scheduler owns the [data-composer-input] filter. */\n onInput() { syncAttachmentPlaceholder() }\n }\n\n return () => {\n // The placeholders the skin added stand in for the host's own, so they\n // leave with it.\n removeStrayNodes(document, '[data-dsh-synthetic-placeholder]', [])\n }\n}\n", "import { COMPOSER_CARD_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport { AUTO_POPOVER_ALL, PERMISSIONS_ATTR } from '../../constants'\nimport { PERMISSION_ACCESS_NAMESPACE, PERMISSION_CURRENT_LABELS, PERMISSION_HOST_LABEL_KEYS, PERMISSION_HOST_LABEL_LOCALE, PERMISSION_ORDER, PERMISSION_PRESETS, PERMISSION_SEGMENTS, PERMISSION_SHIPPED_PRESETS, SEGMENTS_CLASS, SEGMENT_CLASS } from './permission-copy'\nimport { currentPreset, currentSession, findAccessTrigger } from '../../core/host'\nimport { activeLocale, copyLabel } from '../../core/i18n'\nimport { readPrefs } from '../../core/prefs'\nimport { buildElement, closestFrom, setAttributeIfChanged } from '../../shared/dom'\nimport { POPOVER_CLOSE_DELAY, POPOVER_OPEN_DELAY, buildPopoverItem, closeOtherPopovers, createHoverIntent, positionAnchoredPopover, registerPopover, removeStrayNodes, setMenuPopoverOpen, unregisterPopover } from '../../shared/popover'\nimport { createSlidingPill } from '../../shared/sliding-pill'\nimport type { HostContext, HostFiber } from '../../core/host'\nimport type { HostPermissionCatalogAnswer, HostPermissionOption } from '@dsh-claude-style/contracts/services'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './permissions.manifest'\n\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n let segments: HTMLElement | null = null\n /** The segment group's sliding highlight (packages/client/src/shared/sliding-pill.ts). */\n const segmentPill = createSlidingPill('[data-active]')\n let permContainer: HTMLElement | null = null\n let permBtn: HTMLButtonElement | null = null\n let permLabel: HTMLElement | null = null\n let permPopover: HTMLElement | null = null\n let permHoverIntent: ReturnType<typeof createHoverIntent> | null = null\n /** The pick path the rows call back into; the rows are rebuilt, the path is not. */\n let permPick: ((preset: string) => void) | null = null\n /** Where the tier list hangs off its trigger: above it, left-aligned with it. */\n const PERM_POPOVER_PLACEMENT = { side: 'above-left', gap: 6, important: true } as const\n\n /**\n * The host's permission catalog: every preset this deployment offers, in\n * the host's order, or null before the first read settles. It is the\n * authority on what is switchable — a third-party plugin's preset rides\n * in it — while PERMISSION_PRESETS decides how a known one reads.\n */\n let catalogOptions: HostPermissionOption[] | null = null\n /**\n * The preset a new session starts in (the catalog's `defaultPreset`: the\n * configured default, or the one the host infers). The cold start screen\n * has no session to read a preset from, so its segments show this one.\n * null until a catalog read settled.\n */\n let defaultPreset: string | null = null\n /** Whether the last pass drew the segments on the cold start screen. */\n let coldStartShown = false\n /** The first catalog failure; thrown on the next sync to retire the feature. */\n let autoPresetError: Error | null = null\n let catalogFiber: HostFiber | null = null\n let catalogChangedDisposer: (() => void) | null = null\n /** What the popover and the segment group currently render, so a change rebuilds them. */\n let renderedRows = ''\n let renderedRowsFor: HTMLElement | null = null\n let renderedSegments = ''\n\n /** The catalog's entry for one preset, or null. */\n function catalogOption(preset: string): HostPermissionOption | null {\n if (catalogOptions === null) return null\n for (let i = 0; i < catalogOptions.length; i++) {\n const option = catalogOptions[i]\n if (option !== null && typeof option === 'object' && option.value === preset) return option\n }\n return null\n }\n\n /**\n * Whether the host offers a preset. Until the first read settles the\n * shipped built-ins stand in, which is what the control drew before the\n * catalog existed; a preset the catalog does not carry is not drawn at\n * all, so a deployment that configures fewer presets gets fewer rows\n * rather than dead ones.\n */\n function presetOffered(preset: string) {\n if (catalogOptions === null) return PERMISSION_SHIPPED_PRESETS.includes(preset)\n return catalogOption(preset) !== null\n }\n\n /**\n * The host's own name for a tier, or '' when the skin's table answers. Claude\n * names the tiers in English and a Chinese interface shows the host's original\n * Chinese names instead. A host that mounts no locale service, and one that\n * never registers the namespace — whose translate seat then answers with the\n * key itself — both leave the skin's table in charge.\n */\n function hostPresetLabel(preset: string): string {\n const key = PERMISSION_HOST_LABEL_KEYS[preset]\n if (key === undefined || !activeLocale(ctx).startsWith(PERMISSION_HOST_LABEL_LOCALE)) return ''\n const locale = ctx.get('locale')\n if (typeof locale?.bind !== 'function') return ''\n const text: string = locale.bind(PERMISSION_ACCESS_NAMESPACE)(key)\n return typeof text === 'string' && text !== '' && text !== key ? text : ''\n }\n\n /** The name a preset reads as: the host's own Chinese name first, then the skin's table, then the host's catalog. */\n function presetLabel(preset: string): string {\n const hostName = hostPresetLabel(preset)\n if (hostName !== '') return hostName\n const known = PERMISSION_PRESETS[preset]\n if (known !== undefined) return known.label\n const option = catalogOption(preset)\n if (option !== null && typeof option.name === 'string' && option.name !== '') return option.name\n const current = PERMISSION_CURRENT_LABELS[preset]\n return current === undefined ? preset : current\n }\n\n /** The name the control reads before a session's preset is known: the tier the host starts a session in. */\n function restingLabel(): string {\n return presetLabel('workspace-write')\n }\n\n /** The one line under that name, from the same two sources. */\n function presetDesc(preset: string): string {\n const known = PERMISSION_PRESETS[preset]\n if (known !== undefined) return known.desc\n const option = catalogOption(preset)\n return option !== null && typeof option.description === 'string' ? option.description : ''\n }\n\n /** Every preset the control offers, in the order its rows list them. */\n function offeredPresets() {\n let i\n if (catalogOptions === null) return PERMISSION_SHIPPED_PRESETS.slice()\n const offered: string[] = []\n for (i = 0; i < catalogOptions.length; i++) {\n const option = catalogOptions[i]\n if (option === null || typeof option !== 'object') continue\n if (typeof option.value !== 'string' || option.value === '') continue\n if (!offered.includes(option.value)) offered.push(option.value)\n }\n // The skin's order for the presets it knows; anything else the host\n // offers follows in the host's own order.\n const ordered = []\n for (i = 0; i < PERMISSION_ORDER.length; i++) {\n if (offered.includes(PERMISSION_ORDER[i])) ordered.push(PERMISSION_ORDER[i])\n }\n for (i = 0; i < offered.length; i++) {\n if (!ordered.includes(offered[i])) ordered.push(offered[i])\n }\n return ordered\n }\n\n /** The segments to draw: each slot bound to the first of its presets the host offers. */\n function resolvedSegments() {\n const out = []\n for (let i = 0; i < PERMISSION_SEGMENTS.length; i++) {\n const slot = PERMISSION_SEGMENTS[i]\n for (let j = 0; j < slot.presets.length; j++) {\n if (!presetOffered(slot.presets[j])) continue\n out.push({ label: slot.label, preset: slot.presets[j] })\n break\n }\n }\n return out\n }\n\n /**\n * Read the host's permission catalog into `catalogOptions`, and which\n * preset a new session starts in into `defaultPreset`. The shipped\n * picker builds its rows from the same catalog, so it is the authority on\n * what is switchable — including presets a third-party plugin registered.\n * A rejected read retries like the account profile's reads (the client\n * connection may still be coming up at install); once the retries are\n * exhausted the failure is remembered and thrown on the next sync, which\n * retires this feature and hands the shipped access button back (D12).\n */\n const AUTO_PRESET_RETRY_MS = [1000, 5000]\n let autoPresetRetries = 0\n let autoPresetRead = 0\n let autoPresetRetry: ReturnType<typeof setTimeout> | null = null\n\n /** Invalidate the read in flight and drop any retry still waiting. */\n function dropAutoPresetRead() {\n autoPresetRead++\n if (autoPresetRetry !== null) {\n clearTimeout(autoPresetRetry)\n autoPresetRetry = null\n }\n }\n\n function probeAutoPreset() {\n const namespace = ctx.get('remote.permissionPresets')\n if (typeof namespace?.catalog !== 'function') {\n if (typeof ctx.inject !== 'function') {\n autoPresetError = new Error('permission: the host exposes no remote.permissionPresets catalog')\n ui.schedule!()\n }\n return\n }\n dropAutoPresetRead()\n const read = autoPresetRead\n namespace.catalog().then((result: HostPermissionCatalogAnswer) => {\n if (read !== autoPresetRead) return\n if (result === null || typeof result !== 'object' || result.ok !== true ||\n result.value === null || typeof result.value !== 'object' ||\n !Array.isArray(result.value.options) || typeof result.value.defaultPreset !== 'string') {\n autoPresetError = new Error('permission: unexpected permissionPresets catalog shape')\n ui.schedule!()\n return\n }\n autoPresetRetries = 0\n autoPresetError = null\n // The whole option list is kept, not just whether one preset is in\n // it: the rows and the segments are built from what the host serves.\n catalogOptions = result.value.options.slice()\n defaultPreset = result.value.defaultPreset\n ui.schedule!()\n }, () => {\n if (read !== autoPresetRead) return\n if (autoPresetRetries >= AUTO_PRESET_RETRY_MS.length) {\n autoPresetError = new Error(`permission: the permissionPresets catalog read failed ${AUTO_PRESET_RETRY_MS.length + 1} times`)\n ui.schedule!()\n return\n }\n autoPresetRetry = setTimeout(() => {\n autoPresetRetry = null\n probeAutoPreset()\n }, AUTO_PRESET_RETRY_MS[autoPresetRetries++])\n })\n }\n\n /**\n * The namespace may register after this plugin (the host registers each\n * remote namespace as its package loads), so wait for it the way the\n * account row waits for remote.account; a host without inject gets one\n * read now. The catalog-changed event re-reads when the auto-review\n * integration is registered or dropped while the page stays open.\n */\n function startAutoPresetProbe() {\n if (typeof ctx.inject === 'function') {\n catalogFiber = ctx.inject(['remote.permissionPresets'], scope => {\n scope.effect(() => {\n probeAutoPreset()\n return () => {}\n }, 'dsh-claude-style: permission catalog')\n })\n } else {\n probeAutoPreset()\n }\n const remoteRoot = ctx.get('remote')\n if (typeof remoteRoot?.$on === 'function') {\n catalogChangedDisposer = remoteRoot.$on('permission-presets/catalog-changed', () => {\n probeAutoPreset()\n })\n }\n }\n\n /**\n * Build the segment group from the resolved slots. `specs` is what\n * resolvedSegments() returned, so a slot the host cannot serve is simply\n * absent instead of drawn dead.\n */\n function buildSegments(onPick: (preset: string | null) => void, specs: { label: string, preset: string }[]) {\n const group = buildElement('div', SEGMENTS_CLASS)\n group.setAttribute('role', 'radiogroup')\n group.setAttribute('aria-label', copyLabel('permissionGroupLabel', 'Permission'))\n group.setAttribute('data-composer-segments', '')\n for (let i = 0; i < specs.length; i++) {\n const spec = specs[i]\n const item = document.createElement('button')\n item.type = 'button'\n item.className = SEGMENT_CLASS\n item.setAttribute('role', 'radio')\n item.setAttribute('data-preset', spec.preset)\n item.textContent = spec.label\n group.appendChild(item)\n }\n group.addEventListener('click', event => {\n const item = closestFrom(event.target, `.${SEGMENT_CLASS}`)\n if (item === null || !group.contains(item)) return\n onPick(item.getAttribute('data-preset'))\n })\n return group\n }\n\n let permDocPointerListener: ((e: PointerEvent) => void) | null = null\n let permResizeListener: (() => void) | null = null\n\n /** Every dismiss route (item pick, outside pointer, resize/scroll, Escape) closes the menu through this one path. */\n function closePermMenu() {\n if (permBtn === null || permPopover === null) return\n permBtn.removeAttribute('data-open')\n permBtn.setAttribute('aria-expanded', 'false')\n setMenuPopoverOpen(permPopover, false)\n }\n\n /**\n * One popover row for one preset: its name and the line under it from the\n * sources the trigger reads as well, and the active check. No glyph: the\n * tiers read as one list, and a preset's own `icon` — which the host ignores\n * natively — is left out so the rows stay consistent with each other.\n */\n function buildPermRow(preset: string) {\n const built = buildPopoverItem({ role: 'menuitemradio', lines: 2, check: true })\n const item = built.row\n item.setAttribute('data-preset', preset)\n built.text.textContent = presetLabel(preset)\n // Two lines and a check were asked for, so both slots are there.\n built.desc!.textContent = presetDesc(preset)\n built.check!.textContent = '✓'\n built.check!.hidden = true\n\n item.addEventListener('click', e => {\n e.stopPropagation()\n closePermMenu()\n if (permPick !== null) permPick(preset)\n })\n\n return item\n }\n\n /**\n * Rebuild the popover's rows when the set of offered presets or any row's\n * name changes. Rows come from the host's catalog, so a preset a plugin\n * registers while the page stays open appears without a reload, and one it\n * withdraws disappears; the names carry the interface language, so a\n * language switch repaints the rows here. An unchanged signature leaves the\n * DOM alone (the pass runs on every mutation).\n *\n * The rendered signature is kept WITH the element it was rendered into: a\n * new popover starts empty (the hero view takes the old one out of the\n * tree), so a signature that merely matches the previous one must not\n * skip filling this one.\n */\n function syncPermRows() {\n if (permPopover === null) return\n const wanted = offeredPresets()\n const signature = wanted.map(preset => `${preset}=${presetLabel(preset)}`).join('|')\n if (signature === renderedRows && renderedRowsFor === permPopover) return\n renderedRows = signature\n renderedRowsFor = permPopover\n while (permPopover.firstChild !== null) permPopover.removeChild(permPopover.firstChild)\n for (let i = 0; i < wanted.length; i++) permPopover.appendChild(buildPermRow(wanted[i]))\n }\n\n registerPopover('permission', closePermMenu)\n\n /** Put an open tier card back over its trigger; every other place leaves it where it was. */\n function placeOpenPermCard() {\n if (permBtn === null || permPopover === null) return\n if (permBtn.getAttribute('data-open') !== 'true') return\n positionAnchoredPopover(permBtn, permPopover, PERM_POPOVER_PLACEMENT)\n }\n\n function buildPermTriggerAndPopover(onPick: (preset: string) => void) {\n permPick = onPick\n const container = buildElement('div', 'dsh-claude-perm-container')\n\n const btn = document.createElement('button')\n btn.type = 'button'\n btn.className = 'dsh-claude-perm-btn'\n btn.setAttribute('aria-haspopup', 'menu')\n btn.setAttribute('aria-expanded', 'false')\n\n const label = buildElement('span', 'dsh-claude-perm-label', restingLabel())\n\n btn.appendChild(label)\n\n const popover = buildElement('div', 'dsh-claude-popover-card dsh-claude-perm-popover')\n setMenuPopoverOpen(popover, false)\n\n function openPerm() {\n if (permHoverIntent) permHoverIntent.cancel()\n closeOtherPopovers('permission')\n positionAnchoredPopover(btn, popover, PERM_POPOVER_PLACEMENT)\n btn.setAttribute('data-open', 'true')\n btn.setAttribute('aria-expanded', 'true')\n setMenuPopoverOpen(popover, true)\n }\n\n permHoverIntent = createHoverIntent(openPerm, closePermMenu, POPOVER_OPEN_DELAY, POPOVER_CLOSE_DELAY)\n\n // The listeners read the intent in force when they fire: a rebuild replaces it.\n btn.addEventListener('mouseenter', () => {\n if (readPrefs().autoPopover === AUTO_POPOVER_ALL) permHoverIntent!.scheduleOpen()\n })\n btn.addEventListener('mouseleave', () => {\n if (readPrefs().autoPopover === AUTO_POPOVER_ALL) permHoverIntent!.scheduleClose()\n })\n popover.addEventListener('mouseenter', () => {\n permHoverIntent!.cancel()\n })\n popover.addEventListener('mouseleave', () => {\n permHoverIntent!.scheduleClose()\n })\n\n btn.addEventListener('click', e => {\n e.stopPropagation()\n const isOpen = btn.getAttribute('data-open') === 'true'\n if (isOpen) {\n closePermMenu()\n } else {\n openPerm()\n }\n })\n\n if (!permDocPointerListener) {\n permDocPointerListener = e => {\n if (permPopover && permBtn && permPopover.getAttribute('data-open') === 'true') {\n if (!permBtn.contains(e.target as Node) && !permPopover.contains(e.target as Node)) closePermMenu()\n }\n }\n document.addEventListener('pointerdown', permDocPointerListener)\n }\n\n if (!permResizeListener) {\n permResizeListener = () => {\n if (permPopover && permBtn && permPopover.getAttribute('data-open') === 'true') closePermMenu()\n }\n window.addEventListener('resize', permResizeListener)\n window.addEventListener('scroll', permResizeListener, true)\n }\n\n container.appendChild(btn)\n // One popover per generation: a rebuild whose container a host\n // re-render dropped strands the previous popover in the document, so\n // installing this one sweeps every popover already there.\n removeStrayNodes(document, '.dsh-claude-perm-popover', [])\n document.body.appendChild(popover)\n\n return {\n container,\n btn,\n label,\n popover\n }\n }\n\n function updatePermState(preset: string | null) {\n if (!permLabel || !permPopover) return\n // The rows follow the host's catalog: one it does not serve is not\n // drawn at all, and one it starts serving appears.\n syncPermRows()\n // The running preset reads under the name the interface language gives\n // it; a value no preset carries (the host's `custom`) reads as the host's\n // own word for it rather than as the machine value.\n const matchedLabel = preset === null ? restingLabel() : presetLabel(preset)\n // Same-value guard: this runs on every pass, and an identical\n // textContent write still replaces the text node — a mutation that\n // schedules the next pass, so the page never went idle.\n if (permLabel.textContent !== matchedLabel) permLabel.textContent = matchedLabel\n\n const items = permPopover.querySelectorAll('[data-preset]')\n for (let j = 0; j < items.length; j++) {\n const it = items[j]\n const isCurrent = it.getAttribute('data-preset') === preset\n const check = it.querySelector<HTMLElement>('.dsh-claude-popover-check')\n if (check) check.hidden = !isCurrent\n it.toggleAttribute('data-active', isCurrent)\n // One preset out of the list is current: the row says so itself, so the\n // check mark is not the only thing carrying the choice.\n setAttributeIfChanged(it, 'aria-checked', String(isCurrent))\n }\n }\n\n /**\n * The first failed switch request, thrown on the next sync so the feature\n * retires the way a failed catalog read does (D12): a control that cannot\n * switch must hand the shipped access button back, and the refusal must\n * not pass silently.\n */\n let submitError: Error | null = null\n\n /**\n * Request the preset switch through the host's `/permission` command —\n * the same write the shipped picker's confirmation dialog ends in, minus\n * the dialog. The command validates the preset against the host's own\n * catalog, writes the sandbox mode and the approval policy, and appends\n * the preset event, so the next sync re-renders the control from the\n * projection alone.\n */\n function submitPreset(preset: string) {\n const session = currentSession(ctx)\n if (session === null) return\n const settled = session.command(`/permission ${preset}`)\n if (settled === undefined || settled === null) return\n settled.then((result) => {\n if (result === null || typeof result !== 'object' || result.ok !== true) {\n submitError = new Error(`permission: the /permission ${preset} command was refused`)\n } else if (result.value === null || typeof result.value !== 'object' || result.value.matched !== true) {\n submitError = new Error('permission: the host offers no /permission command')\n } else {\n submitError = null\n }\n ui.schedule!()\n }, () => {\n submitError = new Error(`permission: the /permission ${preset} command failed`)\n ui.schedule!()\n })\n }\n\n /**\n * Request the switch for every row, gated presets included: the host's\n * `/permission` command performs the switch itself, so no shipped menu\n * and no risk-confirmation dialog sit between the pick and the write.\n * A same-value pick writes nothing.\n */\n function pick(preset: string | null) {\n const session = currentSession(ctx)\n if (session === null || preset === null) return\n if (preset === currentPreset(session)) return\n submitPreset(preset)\n }\n\n // Re-insert when a re-render swapped the host row, then mirror the running preset.\n function syncSegments() {\n const isHero = ui.composer!.isHero()\n const composerOn = ui.composer!.isActive()\n\n const existingPermContainers = document.querySelectorAll('.dsh-claude-perm-container')\n const existingSegments = document.querySelectorAll<HTMLElement>(`.${SEGMENTS_CLASS}[data-composer-segments]`)\n\n if (!composerOn) {\n for (let ep = 0; ep < existingPermContainers.length; ep++) {\n existingPermContainers[ep].remove()\n }\n if (permPopover && permPopover.parentElement) {\n permPopover.parentElement.removeChild(permPopover)\n }\n permContainer = null\n permBtn = null\n permLabel = null\n permPopover = null\n\n for (let es0 = 0; es0 < existingSegments.length; es0++) {\n existingSegments[es0].remove()\n }\n segments = null\n segmentPill.sync(null)\n coldStartShown = false\n return\n }\n\n const session = currentSession(ctx)\n const trigger = findAccessTrigger()\n // The cold start screen (no session yet) renders no access button: the\n // host leaves the card's mode strip empty and turns the whole card into\n // the workspace pick target. The segments take that strip and show the\n // preset the new session will start in; they are disabled there, so a\n // press falls through to the card and opens the workspace picker like\n // every other control on it.\n const coldStart = trigger === null && isHero && session === null\n const host = coldStart\n ? document.querySelector(`${COMPOSER_CARD_SELECTOR}[class*=\"_cardWorkspaceTrigger\"] [class*=\"_modes\"]`)\n : trigger === null ? null : trigger.parentElement\n // The default can change in Settings without a catalog event, so each\n // return to the cold start screen reads it again.\n if (coldStart && !coldStartShown && catalogOptions !== null) probeAutoPreset()\n coldStartShown = coldStart\n if (host === null) return\n\n const preset = coldStart ? defaultPreset : session === null ? null : currentPreset(session)\n\n if (isHero) {\n for (let i = 0; i < existingPermContainers.length; i++) {\n existingPermContainers[i].remove()\n }\n if (permPopover && permPopover.parentElement) {\n permPopover.parentElement.removeChild(permPopover)\n }\n permContainer = null\n permBtn = null\n permLabel = null\n permPopover = null\n\n // The slots follow the host's catalog: the deployment's own auto tier\n // takes the Auto slot when it is offered, and a slot with no offered\n // preset is not drawn. Rebuild when the binding changed; the shipped\n // group is reused otherwise, so a pass leaves the DOM alone.\n const segmentSpecs = resolvedSegments()\n const segmentSignature = segmentSpecs.map(spec => `${spec.label}=${spec.preset}`).join('|')\n if (existingSegments.length > 1) {\n for (let s = 1; s < existingSegments.length; s++) existingSegments[s].remove()\n }\n let group: HTMLElement\n if (segmentSignature === renderedSegments && existingSegments.length === 1 && host.contains(existingSegments[0])) {\n group = existingSegments[0]\n } else {\n renderedSegments = segmentSignature\n for (let s2 = 0; s2 < existingSegments.length; s2++) existingSegments[s2].remove()\n group = buildSegments(pick, segmentSpecs)\n host.insertBefore(group, host.firstChild)\n }\n segments = group\n for (let j = 0; j < group.children.length; j++) {\n // buildSegments fills the group with buttons alone.\n const item = group.children[j] as HTMLButtonElement\n if (item.disabled !== coldStart) item.disabled = coldStart\n const isCurrent = item.getAttribute('data-preset') === preset\n item.toggleAttribute('data-active', isCurrent)\n setAttributeIfChanged(item, 'aria-checked', String(isCurrent))\n }\n segmentPill.sync(group)\n } else {\n for (let es = 0; es < existingSegments.length; es++) {\n existingSegments[es].remove()\n }\n segments = null\n segmentPill.sync(null)\n\n const allExisting = document.querySelectorAll<HTMLElement>('.dsh-claude-perm-container')\n if (allExisting.length > 0) {\n const adopted = allExisting[0]\n permContainer = adopted\n for (let p = 1; p < allExisting.length; p++) {\n allExisting[p].remove()\n }\n if (adopted.parentElement !== host) {\n host.insertBefore(adopted, host.firstChild)\n }\n permBtn = adopted.querySelector<HTMLButtonElement>('.dsh-claude-perm-btn')\n permLabel = adopted.querySelector<HTMLElement>('.dsh-claude-perm-label')\n // The container can be adopted from a generation whose disposals a\n // client reload dropped; its popover is still in the document, and\n // without it updatePermState would early-return forever.\n if (permPopover === null) permPopover = document.querySelector<HTMLElement>('.dsh-claude-perm-popover')\n } else {\n const res = buildPermTriggerAndPopover(pick)\n permContainer = res.container\n permBtn = res.btn\n permLabel = res.label\n permPopover = res.popover\n host.insertBefore(permContainer, host.firstChild)\n }\n updatePermState(preset)\n }\n }\n\n ui.permissions = {\n sync() {\n if (autoPresetError !== null) throw autoPresetError\n if (submitError !== null) throw submitError\n syncSegments()\n // The tier card is fixed under its trigger and nothing else places it\n // again: a column that moved under an open card (the sidebar opening, the\n // window narrowing) would otherwise leave it hanging where the trigger\n // used to be.\n placeOpenPermCard()\n },\n /**\n * Esc and composer focus close the menu. There is deliberately no\n * 'outside' route — the menu runs its own document pointerdown\n * listener (see buildPermTriggerAndPopover).\n */\n close() {\n closePermMenu()\n },\n /** A viewport or composer-card change moves the anchor: place the open card in the same frame. */\n reposition() {\n placeOpenPermCard()\n },\n }\n\n // The composer restyle hides the host's access button only while this\n // says its replacement is installed.\n document.body.setAttribute(PERMISSIONS_ATTR, '')\n startAutoPresetProbe()\n\n return () => {\n unregisterPopover('permission')\n if (permHoverIntent) permHoverIntent.cancel()\n dropAutoPresetRead()\n if (catalogFiber !== null && typeof catalogFiber.dispose === 'function') {\n catalogFiber.dispose()\n catalogFiber = null\n }\n if (catalogChangedDisposer !== null) {\n catalogChangedDisposer()\n catalogChangedDisposer = null\n }\n if (permDocPointerListener) {\n document.removeEventListener('pointerdown', permDocPointerListener)\n permDocPointerListener = null\n }\n if (permResizeListener) {\n window.removeEventListener('resize', permResizeListener)\n window.removeEventListener('scroll', permResizeListener, true)\n permResizeListener = null\n }\n segmentPill.release()\n removeStrayNodes(document, `.${SEGMENTS_CLASS}[data-composer-segments], .dsh-claude-perm-container, .dsh-claude-perm-popover`, [])\n segments = null\n permPopover = null\n permBtn = null\n permLabel = null\n permContainer = null\n document.body.removeAttribute(PERMISSIONS_ATTR)\n }\n}\n", "import type { RateOverride, RatePeriod, RateProfile, RateSchedule, RateState, RateWindow } from '@dsh-claude-style/contracts/peakrate'\n\n/**\n * Which rate is in force, judged against the clock (D54).\n *\n * Every judgement is made from real instants: the wall clock is read in the\n * schedule's own zone through `Intl`, a wall-clock time is converted back to a\n * real instant before it is compared with now, and day arithmetic runs on the\n * zone's own calendar. That is what makes a daylight-saving boundary and a\n * window crossing midnight come out right rather than approximately right —\n * \"wall-clock minutes plus 1440\" is off by an hour across a transition and by\n * a day at a window's edge.\n *\n * Precedence, highest first: a dated promotional window, a public holiday\n * (off-peak in full), then the weekday filter and the peak windows. A window\n * crossing midnight belongs to the day it starts, so the small hours are\n * judged against the previous day's weekday and holiday.\n */\n\n/** How many days ahead the switch search looks; a weekday cycle fits twice. */\nconst SEARCH_DAYS = 9\n\nconst MINUTES_PER_DAY = 1440\n\nconst MILLIS_PER_DAY = 24 * 60 * 60 * 1000\n\nconst WEEKDAYS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']\n\n/** One instant read in a schedule's zone. */\ninterface Moment {\n /** 0 = Sunday. */\n weekday: number\n /** Minutes since local midnight. */\n minutes: number\n /** `YYYY-MM-DD` in that zone. */\n date: string\n /** The real instant, which a bound stated as an instant is compared with. */\n instant: number\n}\n\n/** One peak window, in minutes from its own day's midnight; an end above 1440 crosses midnight. */\ninterface Span {\n start: number\n end: number\n}\n\n/** `\"HH:mm\"` in minutes, or NaN. */\nfunction parseMinutes(value: string): number {\n const match = /^(\\d{1,2}):(\\d{2})$/.exec(value)\n if (match === null) return Number.NaN\n const hour = Number(match[1])\n const minute = Number(match[2])\n if (hour > 23 || minute > 59) return Number.NaN\n return hour * 60 + minute\n}\n\n/** `\"YYYY-MM-DD\"` shifted by whole days, on the UTC calendar so no local zone interferes. */\nfunction addDays(date: string, days: number): string {\n const [year, month, day] = date.split('-').map(Number)\n const at = new Date(Date.UTC(year, month - 1, day))\n at.setUTCDate(at.getUTCDate() + days)\n const pad = (value: number) => String(value).padStart(2, '0')\n return `${at.getUTCFullYear()}-${pad(at.getUTCMonth() + 1)}-${pad(at.getUTCDate())}`\n}\n\n/** The formatters, one per zone and shape: building one per judgement is the expensive part. */\nconst clockFormatters = new Map<string, Intl.DateTimeFormat>()\n\nfunction formatter(timeZone: string, withWeekday: boolean): Intl.DateTimeFormat {\n const key = `${timeZone}|${withWeekday ? 'day' : 'time'}`\n let cached = clockFormatters.get(key)\n if (cached === undefined) {\n cached = new Intl.DateTimeFormat('en-CA', {\n timeZone,\n hour12: false,\n ...(withWeekday ? { weekday: 'short', year: 'numeric', month: '2-digit', day: '2-digit' } : { year: 'numeric', month: '2-digit', day: '2-digit' }),\n hour: '2-digit',\n minute: '2-digit',\n ...(withWeekday ? {} : { second: '2-digit' }),\n })\n clockFormatters.set(key, cached)\n }\n return cached\n}\n\n/** The parts of one formatting, by type. */\nfunction partMap(timeZone: string, at: Date, withWeekday: boolean): Record<string, string> {\n const out: Record<string, string> = {}\n for (const part of formatter(timeZone, withWeekday).formatToParts(at)) out[part.type] = part.value\n return out\n}\n\n/** The zone's wall clock at one instant. */\nfunction momentAt(schedule: RateSchedule, at: Date): Moment {\n const parts = partMap(schedule.timeZone, at, true)\n const weekday = WEEKDAYS.indexOf(parts.weekday ?? '')\n return {\n weekday: weekday === -1 ? 0 : weekday,\n // Some engines render midnight as \"24\" under hour12: false.\n minutes: (Number(parts.hour) % 24) * 60 + Number(parts.minute),\n date: `${parts.year}-${parts.month}-${parts.day}`,\n instant: at.getTime(),\n }\n}\n\n/** The zone's wall clock at one instant, as its own calendar day and minutes. */\nfunction wallClockAt(timeZone: string, instant: number): { date: string, minutes: number } {\n const parts = partMap(timeZone, new Date(instant), false)\n return { date: `${parts.year}-${parts.month}-${parts.day}`, minutes: (Number(parts.hour) % 24) * 60 + Number(parts.minute) }\n}\n\n/** One `\"HH:mm\"` window as minutes from its day's midnight; an end at or before the start crosses midnight. */\nfunction spanOf(window: RateWindow): Span | undefined {\n const start = parseMinutes(window.start)\n const end = parseMinutes(window.end)\n if (Number.isNaN(start) || Number.isNaN(end)) return undefined\n return { start, end: end > start ? end : end + MINUTES_PER_DAY }\n}\n\n/** One list of windows, invalid entries dropped and the rest in start order. */\nfunction spansOf(windows: readonly RateWindow[]): Span[] {\n const spans: Span[] = []\n for (const window of windows) {\n const span = spanOf(window)\n if (span !== undefined) spans.push(span)\n }\n return spans.sort((left, right) => left.start - right.start)\n}\n\n/** The zone's offset from UTC at one instant, measured rather than assumed. */\nfunction zoneOffsetMs(timeZone: string, at: Date): number {\n const parts = partMap(timeZone, at, false)\n const asUtc = Date.UTC(\n Number(parts.year),\n Number(parts.month) - 1,\n Number(parts.day),\n Number(parts.hour) % 24,\n Number(parts.minute),\n Number(parts.second),\n )\n return asUtc - at.getTime()\n}\n\n/**\n * The real instant of one wall-clock time in a zone.\n *\n * The day is added on the zone's own calendar first and the offset is resolved\n * afterwards, so a 23- or 25-hour day cannot shift the answer by a day; one\n * correction step settles the offset the new instant actually has.\n *\n * A wall-clock time the zone skips (the hour a spring-forward transition jumps\n * over) has no instant of its own: the correction lands on either side of the\n * transition, and the answer is the transition itself, found by search. That is\n * what keeps a window edge written inside the skipped hour from being read as a\n * moment in the past and pushing the next switch a day out.\n *\n * @param timeZone - the schedule's zone.\n * @param baseDate - `YYYY-MM-DD` in that zone, the day the offset counts from.\n * @param dayOffset - whole days from `baseDate`.\n * @param minuteOfDay - minutes from that day's midnight.\n * @returns the instant in milliseconds, or NaN when the zone cannot be read.\n */\nfunction instantOf(timeZone: string, baseDate: string, dayOffset: number, minuteOfDay: number): number {\n const date = addDays(baseDate, dayOffset)\n const [year, month, day] = date.split('-').map(Number)\n const guess = Date.UTC(year, month - 1, day, Math.floor(minuteOfDay / 60), minuteOfDay % 60)\n if (Number.isNaN(guess)) return Number.NaN\n const first = zoneOffsetMs(timeZone, new Date(guess))\n let instant = guess - first\n const second = zoneOffsetMs(timeZone, new Date(instant))\n if (second !== first) instant = guess - second\n const settled = wallClockAt(timeZone, instant)\n if (settled.date === date && settled.minutes === minuteOfDay) return instant\n const target = `${date} ${String(minuteOfDay).padStart(4, '0')}`\n const key = (at: number) => {\n const wall = wallClockAt(timeZone, at)\n return `${wall.date} ${String(wall.minutes).padStart(4, '0')}`\n }\n let low = guess - MILLIS_PER_DAY - 2 * 3600 * 1000\n let high = guess + MILLIS_PER_DAY + 2 * 3600 * 1000\n if (key(low) >= target || key(high) < target) return instant\n while (high - low > 1) {\n const middle = Math.floor((low + high) / 2)\n if (key(middle) >= target) high = middle\n else low = middle\n }\n return high\n}\n\n/**\n * The calendar day a holiday calendar reads at one instant, in its own zone\n * when it names one. The parser drops a zone the platform cannot resolve, so\n * the profile's own zone needs no guard here.\n */\nfunction holidayDateAt(schedule: RateSchedule, at: Date, fallback: string): string {\n const zone = schedule.publicHolidayTimeZone\n if (zone === undefined || schedule.publicHolidayDates === undefined) return fallback\n return momentAt({ ...schedule, timeZone: zone }, at).date\n}\n\nfunction isHoliday(schedule: RateSchedule, date: string): boolean {\n return schedule.publicHolidayDates?.includes(date) ?? false\n}\n\n/** Whether a dated window covers one day and weekday, within the bounds it states. */\nfunction covers(override: RateOverride, date: string, weekday: number, instant: number): boolean {\n if (override.startAt !== undefined && instant < Date.parse(override.startAt)) return false\n // The closing instant is the first moment the campaign is over, so the switch\n // reads at that instant rather than a candidate later in the day.\n if (override.endAt !== undefined && instant >= Date.parse(override.endAt)) return false\n if (override.startDate !== undefined && date < override.startDate) return false\n if (override.endDate !== undefined && date > override.endDate) return false\n return override.days.length === 0 || override.days.includes(weekday)\n}\n\n/**\n * Whether a promotional window is in force.\n *\n * The leg after midnight belongs to the day the window started, so the\n * previous day's weekday and date range decide it — the same rule the regular\n * peak windows follow.\n */\nfunction overrideInForce(override: RateOverride, moment: Moment): boolean {\n const previousDate = addDays(moment.date, -1)\n const previousWeekday = (moment.weekday + 6) % 7\n if (covers(override, moment.date, moment.weekday, moment.instant)) {\n for (const window of override.windows) {\n const start = parseMinutes(window.start)\n const end = parseMinutes(window.end)\n if (Number.isNaN(start) || Number.isNaN(end)) continue\n if (end > start) {\n if (moment.minutes >= start && moment.minutes < end) return true\n } else if (moment.minutes >= start) {\n // Cross-midnight, or the whole day written as `00:00–00:00`.\n return true\n }\n }\n }\n if (!covers(override, previousDate, previousWeekday, moment.instant)) return false\n for (const window of override.windows) {\n const start = parseMinutes(window.start)\n const end = parseMinutes(window.end)\n if (Number.isNaN(start) || Number.isNaN(end)) continue\n if (end <= start && moment.minutes < end) return true\n }\n return false\n}\n\n/** The promotional window in force, the document's own order deciding between several. */\nfunction activeOverride(schedule: RateSchedule, moment: Moment): RateOverride | undefined {\n for (const override of schedule.overrides ?? []) {\n if (overrideInForce(override, moment)) return override\n }\n return undefined\n}\n\n/**\n * Whether the regular cycle bills peak right now. A window crossing midnight\n * spills into the next day's small hours, and the previous day's holiday\n * suppresses that spill: a holiday evening's peak window must not make the\n * working day after it peak.\n */\nfunction isPeak(schedule: RateSchedule, spans: readonly Span[], moment: Moment, previousDayHoliday: boolean): boolean {\n const previousWeekday = (moment.weekday + 6) % 7\n if (!previousDayHoliday && schedule.peakDays.includes(previousWeekday)) {\n for (const span of spans) {\n if (span.end > MINUTES_PER_DAY && moment.minutes < span.end - MINUTES_PER_DAY) return true\n }\n }\n if (schedule.peakDays.includes(moment.weekday)) {\n for (const span of spans) {\n if (moment.minutes >= span.start && moment.minutes < span.end) return true\n }\n }\n return false\n}\n\n/** One judgement: the state, and the promotional window that decided it when there is one. */\ninterface Judgement {\n period: RatePeriod\n override?: RateOverride\n}\n\nfunction judgeAt(schedule: RateSchedule, spans: readonly Span[], moment: Moment, holidayDate: string): Judgement {\n const override = activeOverride(schedule, moment)\n // A dated promotion is the more specific rule, so it outranks everything.\n if (override !== undefined) return { period: 'campaign', override }\n // A holiday is off-peak in full: neither the weekday filter nor a window\n // that started the evening before can make it peak.\n if (isHoliday(schedule, holidayDate)) return { period: 'offPeak' }\n const previousHoliday = isHoliday(schedule, addDays(holidayDate, -1))\n return { period: isPeak(schedule, spans, moment, previousHoliday) ? 'peak' : 'offPeak' }\n}\n\n/** The multiplier to show for one state, the active window's own badge winning. */\nfunction badgeFor(profile: RateProfile, period: RatePeriod, override: RateOverride | undefined): string {\n if (period === 'campaign') {\n if (override?.badge !== undefined && override.badge !== '') return override.badge\n return profile.campaignBadge ?? profile.peakBadge\n }\n return period === 'peak' ? profile.peakBadge : profile.offPeakBadge\n}\n\n/** One instant's judgement together with the switch that follows it. */\ninterface Flip {\n minutes: number\n judgement: Judgement\n}\n\n/**\n * When the state next changes, and into what.\n *\n * A window boundary is not a switch: two peak windows meeting at noon change\n * nothing. So candidates are every midnight, every window edge for the next\n * days (both of a crossing window's legs), and every instant a campaign states\n * as its bound — a campaign can open or close at a moment that is none of the\n * clock's own edges. Each candidate is judged with the same predicate as now,\n * and the first whose judgement differs is the switch.\n */\nfunction nextFlip(schedule: RateSchedule, spans: readonly Span[], now: Date, moment: Moment, current: Judgement): Flip | undefined {\n const points: number[] = []\n /** Every edge of one window list, counted from the same day's midnight. */\n const edges = (list: readonly Span[], base: number) => {\n for (const span of list) {\n points.push(base + span.start)\n // A crossing window's end is normalised above 1440, and `end % 1440` is\n // the edge it has on the day the window starts; both are candidates,\n // because which one is the real edge depends on the day being scanned.\n points.push(base + (span.end % MINUTES_PER_DAY))\n points.push(base + span.end)\n }\n }\n for (let day = 0; day <= SEARCH_DAYS; day++) {\n const base = day * MINUTES_PER_DAY\n // Midnight can end a crossing window, start a holiday and open a promo.\n points.push(base)\n edges(spans, base)\n for (const override of schedule.overrides ?? []) edges(spansOf(override.windows), base)\n }\n const instants: number[] = []\n for (const point of points) {\n const instant = instantOf(schedule.timeZone, moment.date, Math.floor(point / MINUTES_PER_DAY), point % MINUTES_PER_DAY)\n if (!Number.isNaN(instant)) instants.push(instant)\n }\n for (const override of schedule.overrides ?? []) {\n for (const bound of [override.startAt, override.endAt]) {\n if (bound === undefined) continue\n const at = Date.parse(bound)\n if (!Number.isNaN(at)) instants.push(at)\n }\n }\n instants.sort((left, right) => left - right)\n const nowMs = now.getTime()\n let previous = Number.NaN\n for (const instant of instants) {\n // The same edge is reached by several spellings; one judgement settles them.\n if (instant <= nowMs || instant === previous) continue\n previous = instant\n const at = new Date(instant)\n const wallAt = momentAt(schedule, at)\n const judgement = judgeAt(schedule, spans, wallAt, holidayDateAt(schedule, at, wallAt.date))\n if (judgement.period === current.period && (judgement.override?.periodName ?? '') === (current.override?.periodName ?? '')) continue\n return { minutes: Math.round((instant - nowMs) / 60000), judgement }\n }\n return undefined\n}\n\n/** The last judgement computed, per profile and minute: the search is the pricey part. */\nconst judged = new Map<string, { minute: number, state: RateState }>()\n\n/**\n * The rate in force for one profile at one instant.\n *\n * @param profile - the matched profile.\n * @param now - the instant to judge.\n * @returns the state, its badge and the switch that follows it.\n */\nexport function currentRate(profile: RateProfile, now: Date): RateState {\n const minute = Math.floor(now.getTime() / 60000)\n const cached = judged.get(profile.id)\n if (cached !== undefined && cached.minute === minute) return cached.state\n\n const schedule = profile.schedule\n const spans = spansOf(schedule.peakWindows)\n const moment = momentAt(schedule, now)\n const judgement = judgeAt(schedule, spans, moment, holidayDateAt(schedule, now, moment.date))\n const flip = nextFlip(schedule, spans, now, moment, judgement)\n const state: RateState = {\n period: judgement.period,\n badge: badgeFor(profile, judgement.period, judgement.override),\n minutesUntilSwitch: flip === undefined ? Number.POSITIVE_INFINITY : flip.minutes,\n ...(flip === undefined ? {} : {\n nextPeriod: flip.judgement.period,\n nextBadge: badgeFor(profile, flip.judgement.period, flip.judgement.override),\n }),\n ...(judgement.override?.name === undefined ? {} : { overrideName: judgement.override.name }),\n ...(flip?.judgement.override?.name === undefined ? {} : { nextOverrideName: flip.judgement.override.name }),\n }\n judged.set(profile.id, { minute, state })\n return state\n}\n\n/** Drop the memo: a new catalog is a new set of clocks. */\nexport function forgetRates(): void {\n judged.clear()\n}\n\n/** Whole minutes as the badge's own short form (`2d 7h`, `1h 20m`, `45m`, `<1m`); no countdown has no text. */\nexport function formatCountdown(minutes: number): string {\n if (!Number.isFinite(minutes)) return ''\n const total = Math.max(0, Math.round(minutes))\n // Under a minute the clock still moves; \"0m\" would read as a switch that\n // already happened.\n if (total < 1) return '<1m'\n if (total < 60) return `${total}m`\n if (total < MINUTES_PER_DAY) {\n const hours = Math.floor(total / 60)\n const rest = total % 60\n return rest === 0 ? `${hours}h` : `${hours}h ${rest}m`\n }\n const days = Math.floor(total / MINUTES_PER_DAY)\n const hours = Math.floor((total % MINUTES_PER_DAY) / 60)\n return hours === 0 ? `${days}d` : `${days}d ${hours}h`\n}\n", "import { copyLabel } from '../../core/i18n'\nimport { formatCountdown } from './schedule'\nimport { buildElement } from '../../shared/dom'\nimport type { RatePeriod, RateState } from '@dsh-claude-style/contracts/peakrate'\n\n/**\n * The rate badge and its wording (D54).\n *\n * The shape carries which state it is, the colour carries whether it is\n * expensive or cheap: twin peaks for the peak rate, twin valleys for the\n * off-peak rate, a spark for a dated promotion. Nothing here reads a\n * direction — every transition but a promotion is a two-state flip, and a\n * promotion's badge is a plan name with no order in it.\n *\n * The badge's text is the data source's own (`2×`, `0.5× credits`): it is\n * foreign text and is written with `textContent`, never as markup\n * (docs/decisions D11).\n */\n\n/** The mark each state draws, in a 16×16 box stroked with the current colour. */\nconst ICONS: Record<RatePeriod, string> = {\n peak: '<svg viewBox=\"0 0 16 16\" width=\"13\" height=\"13\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M1.6 12.4 5.4 6.2l3.1 4.1 2.4-3.3 3.5 5.4\"/></svg>',\n offPeak: '<svg viewBox=\"0 0 16 16\" width=\"13\" height=\"13\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M1.6 3.6 5.4 9.8l3.1-4.1 2.4 3.3 3.5-5.4\"/></svg>',\n campaign: '<svg viewBox=\"0 0 16 16\" width=\"13\" height=\"13\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M8 2.4l1.6 4 4 1.6-4 1.6L8 13.6l-1.6-4-4-1.6 4-1.6z\"/></svg>',\n}\n\n/** The state's own name, and the neutral English constant that stands until the copy document answers. */\nconst NAMES: Record<RatePeriod, { key: string, fallback: string }> = {\n peak: { key: 'ratePeak', fallback: 'Peak rate' },\n offPeak: { key: 'rateOffPeak', fallback: 'Off-peak rate' },\n campaign: { key: 'rateCampaign', fallback: 'Promotion' },\n}\n\n/** One state's name in the shell's language. */\nexport function rateName(period: RatePeriod) {\n return copyLabel(NAMES[period].key, NAMES[period].fallback)\n}\n\n/** `峰价 2×`, in one string: the state's name and the multiplier the source prints. */\nfunction rateText(period: RatePeriod, badge: string) {\n return `${rateName(period)} ${badge}`.trim()\n}\n\n/**\n * The whole judgement in one line: the state in force, and what it becomes and\n * when. A state with no switch in sight (nothing changes within ten days) says\n * only what it is.\n */\nexport function rateDetail(state: RateState) {\n const now = copyLabel('rateNow', 'Now {rate}', { rate: rateText(state.period, state.badge) })\n const countdown = formatCountdown(state.minutesUntilSwitch)\n if (state.nextPeriod === undefined || countdown === '') return now\n const next = rateText(state.nextPeriod, state.nextBadge ?? '')\n return `${now} · ${copyLabel('rateNext', 'in {countdown} → {next}', { countdown, next })}`\n}\n\n/**\n * The badge as it stands in a model row: the state's mark, the multiplier and\n * the countdown, with the whole judgement as its own title.\n *\n * @param state - the judgement for one row.\n * @returns the badge element.\n */\nexport function buildRateBadge(state: RateState): HTMLElement {\n const detail = rateDetail(state)\n const badge = buildElement('span', 'dsh-claude-peakrate')\n badge.setAttribute('data-period', state.period)\n badge.setAttribute('role', 'img')\n badge.setAttribute('aria-label', detail)\n badge.setAttribute('title', detail)\n const icon = buildElement('span', 'dsh-claude-peakrate-icon')\n icon.innerHTML = ICONS[state.period]\n badge.appendChild(icon)\n badge.appendChild(buildElement('span', 'dsh-claude-peakrate-value', state.badge))\n const countdown = formatCountdown(state.minutesUntilSwitch)\n if (countdown !== '') {\n badge.appendChild(buildElement('span', 'dsh-claude-peakrate-countdown', `· ${countdown}`))\n }\n return badge\n}\n", "import { PEAKRATE_ROUTE } from '../../constants'\nimport { forgetRates } from './schedule'\nimport type { HostAnswer } from '../../shared/resource'\nimport type { RateProfile } from '@dsh-claude-style/contracts/peakrate'\n\n/**\n * The catalog in the browser: what the host half holds, read once and kept\n * (D54).\n *\n * The host owns the fetching, the disk cache and the refresh timer; this side\n * asks it once when the feature installs and again only when the copy it got\n * is older than the source's own refresh interval. A browser-side copy in\n * localStorage would only duplicate what the host already keeps on disk, so\n * there is none: a reload asks the host, which answers from memory.\n */\n\n/** How old the host's copy may be before this side asks it to fetch again. */\nconst STALE_MS = 24 * 60 * 60 * 1000\n\n/** How long after an attempt the next pass may try again. */\nconst RETRY_MS = 5 * 60 * 1000\n\nlet profiles: readonly RateProfile[] = []\n/** When the host last fetched the source, or NaN when it never has. */\nlet fetchedAt = Number.NaN\n/** When this page last asked, so the scheduler's passes cannot become a poll. */\nlet attemptedAt = 0\n/** True while a request is in flight: one at a time. */\nlet inFlight = false\n/** True once a copy has been adopted, so a later failure keeps what is on screen. */\nlet loaded = false\n/** How many catalogs this page has adopted; the rows' render signature reads it. */\nlet generation = 0\n/**\n * Bumped when the feature is torn down: an answer that arrives afterwards\n * belongs to a scope that is gone, so it is dropped rather than adopted.\n */\nlet epoch = 0\nconst listeners = new Set<() => void>()\n\n/** Tell every reader the catalog moved (a new one arrived, or the first attempt failed). */\nfunction announce(): void {\n for (const listener of listeners) listener()\n}\n\n/** Read one host answer into the held catalog; `false` when the answer is unusable. */\nfunction adopt(answer: HostAnswer): boolean {\n if (answer === null || answer.ok !== true) return false\n const list = answer.profiles\n if (!Array.isArray(list) || list.length === 0) return false\n const accepted: RateProfile[] = []\n for (const entry of list) {\n if (entry === null || typeof entry !== 'object') return false\n const profile = entry as RateProfile\n if (typeof profile.id !== 'string' || typeof profile.provider !== 'string') return false\n if (profile.schedule === null || typeof profile.schedule !== 'object') return false\n accepted.push(profile)\n }\n profiles = accepted\n fetchedAt = typeof answer.fetchedAt === 'string' ? Date.parse(answer.fetchedAt) : Number.NaN\n loaded = true\n generation += 1\n // The judgement memo is keyed by profile id, so a new catalog has to drop it.\n forgetRates()\n announce()\n return true\n}\n\n/**\n * One request to the host half. `refresh` asks it to fetch the source first,\n * which the browser cannot do itself: the source's address is the host's to\n * know.\n */\nfunction call(refresh: boolean): Promise<boolean> {\n const startedAt = epoch\n inFlight = true\n attemptedAt = Date.now()\n return fetch(PEAKRATE_ROUTE, {\n method: refresh ? 'POST' : 'GET',\n credentials: 'same-origin',\n headers: { accept: 'application/json' },\n }).then(\n response => {\n if (!response.ok) throw new Error(`HTTP ${response.status}`)\n return response.json()\n },\n ).then(\n (answer: HostAnswer) => {\n // The feature may have been switched off while this request was out.\n if (epoch !== startedAt) return false\n inFlight = false\n return adopt(answer)\n },\n () => {\n // The host half did not answer: the catalog already held stays, and the\n // meter draws nothing until the next attempt (docs/decisions D54).\n if (epoch !== startedAt) return false\n inFlight = false\n return false\n },\n )\n}\n\n/** Whether the copy in hand is old enough to be worth replacing, or was never obtained. */\nfunction stale(now: number): boolean {\n if (!loaded) return true\n return !Number.isFinite(fetchedAt) || now - fetchedAt > STALE_MS\n}\n\n/**\n * Bring the catalog up to date, called from the feature's sync. The guards\n * here are what keep the scheduler's passes from becoming a poll: one request\n * at a time, and no attempt within RETRY_MS of the last one.\n *\n * @param now - the instant of the pass.\n */\nexport function loadPeakRate(now: number): void {\n if (inFlight) return\n if (loaded && !stale(now)) return\n if (attemptedAt !== 0 && now - attemptedAt < RETRY_MS) return\n // Holding a stale copy means the host's own answer is already known to be\n // old, so it is asked to fetch the source in the same round trip.\n const refresh = loaded && stale(now)\n const startedAt = epoch\n void call(refresh).then((adopted) => {\n if (epoch !== startedAt) return\n if (!refresh && adopted && stale(Date.now())) void call(true)\n })\n}\n\n/** Forget the page's copy: the feature is being torn down. */\nexport function stopPeakRate(): void {\n epoch += 1\n profiles = []\n fetchedAt = Number.NaN\n attemptedAt = 0\n loaded = false\n inFlight = false\n forgetRates()\n}\n\n/** The catalog in force, empty until the host answers. */\nexport function peakProfiles(): readonly RateProfile[] {\n return profiles\n}\n\n/** How many catalogs this page has adopted; the rows repaint when the number moves. */\nexport function peakRateGeneration(): number {\n return generation\n}\n\n/** Subscribe to the catalog moving; the returned call removes the listener. */\nexport function subscribePeakRate(listener: () => void): () => void {\n listeners.add(listener)\n return () => {\n listeners.delete(listener)\n }\n}\n", "import { normalizeModelId } from '../../core/model-copy'\nimport type { RateProfile } from '@dsh-claude-style/contracts/peakrate'\n\n/**\n * Which billing profile applies to one provider and model (D54).\n *\n * A profile is a provider's clock, not a model's: the data source lists direct\n * vendors, and a provider that resells one of them inherits its schedule. So\n * the host's own provider id is translated to the data source's provider name\n * first — the ids are local labels the user chose, and nothing in them is a\n * billing reality — and the model id then picks between the profiles that\n * vendor publishes (one provider can run several clocks: Z.ai's GLM-5.3 and\n * GLM-5.3-Flash do).\n *\n * A model that matches nothing carries no rate at all: decorating it with a\n * clock it does not bill by is worse than showing nothing.\n */\n\n/** Host provider id → the data source's provider name. */\nexport const PROVIDER_ALIASES: Record<string, string> = {\n 'deepseek-official': 'DeepSeek',\n 'deepseek-account': 'DeepSeek',\n ocg: 'DeepSeek',\n 'ocg-1': 'DeepSeek',\n 'opencode-go': 'DeepSeek',\n ollama: 'Ollama',\n zai: 'Z.ai',\n qoder: 'Qoder',\n 'qoder-cn': 'Qoder CN',\n bai: 'B.AI',\n 'baidu-qianfan': 'Baidu Qianfan',\n 'tencent-cloud': 'Tencent Cloud',\n 'alibaba-cloud': 'Alibaba Cloud',\n siliconflow: 'SiliconFlow',\n 'xiaomi-token-plan-cn': 'Xiaomi MiMo',\n swarms: 'Swarms',\n}\n\n/**\n * One profile's model pattern, keyed by the **catalog's** provider name (the\n * alias table's target), so every provider that resolves to a vendor shares\n * that vendor's patterns. Patterns are model-id prefixes in the folded form\n * (`normalizeModelId`); the first hit wins, so a longer pattern has to stand\n * above the shorter one it starts with.\n */\nexport const MODEL_MAPPINGS: { provider: string, match: string, profile: string }[] = [\n // The official service and every gateway that resells it: one clock, so\n // every DeepSeek model of these providers shares a profile.\n { provider: 'DeepSeek', match: 'deepseek-v4-pro', profile: 'deepseek-v4' },\n { provider: 'DeepSeek', match: 'deepseek-v4-flash', profile: 'deepseek-v4' },\n { provider: 'DeepSeek', match: 'deepseek-flash', profile: 'deepseek-v4' },\n { provider: 'DeepSeek', match: 'deepseek-v4', profile: 'deepseek-v4' },\n { provider: 'Ollama', match: 'deepseek', profile: 'ollama-deepseek-v4' },\n { provider: 'Z.ai', match: 'glm-5.3-flash', profile: 'zai-glm-5-3-flash' },\n { provider: 'Z.ai', match: 'glm-5.3', profile: 'zai-glm-5-3' },\n { provider: 'Qoder', match: 'qwen3.8-max', profile: 'qoder-qwen3-8-max' },\n { provider: 'Qoder', match: 'qwen3.7-max', profile: 'qoder-qwen3-7-max' },\n { provider: 'Qoder', match: 'qwen3.7-plus', profile: 'qoder-qwen3-7-plus' },\n { provider: 'Qoder CN', match: 'qwen3.8-flash', profile: 'qoder-qwen3-8-flash' },\n { provider: 'B.AI', match: 'deepseek-v4-pro', profile: 'bai-deepseek-v4-pro' },\n { provider: 'B.AI', match: 'deepseek', profile: 'bai-deepseek-v4' },\n { provider: 'B.AI', match: 'glm-5.3-flash', profile: 'bai-glm53-flash' },\n { provider: 'B.AI', match: 'glm-5.3', profile: 'bai-glm53' },\n { provider: 'B.AI', match: 'glm-5.2', profile: 'bai-glm52' },\n { provider: 'B.AI', match: 'mimo', profile: 'bai-mimo26-flash' },\n { provider: 'Baidu Qianfan', match: 'deepseek', profile: 'baidu-qianfan-deepseek-v4' },\n { provider: 'Baidu Qianfan', match: 'glm', profile: 'baidu-qianfan-glm53' },\n { provider: 'Tencent Cloud', match: 'deepseek', profile: 'tencent-deepseek-v4-vendor-direct' },\n { provider: 'Alibaba Cloud', match: 'deepseek', profile: 'alibaba-deepseek-v4-token-plan' },\n { provider: 'Alibaba Cloud', match: 'qwen3.8-max', profile: 'alibaba-qwen3-8-max' },\n { provider: 'Alibaba Cloud', match: 'qwen3.7-plus', profile: 'alibaba-qwen3-7-plus-api-global' },\n { provider: 'Alibaba Cloud Model Studio', match: 'deepseek', profile: 'alibaba-model-studio-deepseek-v4' },\n { provider: 'SiliconFlow', match: 'deepseek', profile: 'siliconflow-deepseek-v4-flash' },\n // Two gateways whose published clock covers whatever is routed through them.\n { provider: 'Swarms', match: '', profile: 'swarms-swarm-completions' },\n { provider: 'Xiaomi MiMo', match: '', profile: 'xiaomi-mimo-v2-5-token-plan' },\n]\n\n/** The mappings with their patterns folded once, so a row costs one comparison. */\nconst FOLDED_MAPPINGS = MODEL_MAPPINGS.map(entry => ({ ...entry, folded: normalizeModelId(entry.match) }))\n\n/**\n * The profile that bills `modelId` under `providerId`, or undefined when the\n * provider is unknown to the catalog or none of its profiles claims the model.\n *\n * @param providerId - the host's provider id.\n * @param modelId - the host's model id.\n * @param profiles - the catalog in force.\n */\nexport function matchProfile(providerId: string, modelId: string, profiles: readonly RateProfile[]): RateProfile | undefined {\n const providerName = PROVIDER_ALIASES[providerId] ?? providerId\n const candidates = profiles.filter(profile => profile.provider === providerName)\n if (candidates.length === 0) return undefined\n const folded = normalizeModelId(modelId)\n for (const mapping of FOLDED_MAPPINGS) {\n if (mapping.provider !== providerName) continue\n if (mapping.folded !== '' && !folded.startsWith(mapping.folded)) continue\n const profile = candidates.find(candidate => candidate.id === mapping.profile)\n if (profile !== undefined) return profile\n }\n return undefined\n}\n", "import { buildRateBadge } from './badge'\nimport { currentRate } from './schedule'\nimport { loadPeakRate, peakProfiles, peakRateGeneration, stopPeakRate, subscribePeakRate } from './live'\nimport { matchProfile } from './match'\nimport type { HostContext } from '../../core/host'\nimport type { FeatureHandle } from '../../core/scheduler'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './peakrate.manifest'\nimport type { RateState } from '@dsh-claude-style/contracts/peakrate'\n\n/**\n * What the model picker reads off this feature: the rate for one row.\n *\n * The badge belongs to the rows, and the rows belong to the model picker, so\n * the picker asks and this feature answers: the catalog, the matching and the\n * time judgement stay here, the row layout stays there.\n */\nexport interface PeakRateHandle extends FeatureHandle {\n /** The state in force for one provider and model, or null when no profile claims it. */\n state(provider: string, modelId: string): RateState | null\n /** That state as the badge a model row carries, or null. */\n badge(provider: string, modelId: string): HTMLElement | null\n /** A number that changes when the catalog does: part of the rows' render signature. */\n epoch(): number\n teardown(): void\n}\n\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n /**\n * The catalog is the host half's (packages/host/src/peakrate.ts): it fetches\n * the source, caches it on disk and serves it over the plugin's own route.\n * This half asks for it once, matches it against the picker's rows and\n * judges it against the clock — no third party is ever contacted from here.\n */\n const unsubscribe = subscribePeakRate(() => {\n // A new catalog repaints the rows that are already built.\n if (typeof ui.schedule === 'function') ui.schedule()\n })\n\n /** The judgement for one row, or null when the model carries no clock. */\n function state(provider: string, modelId: string): RateState | null {\n const profile = matchProfile(provider, modelId, peakProfiles())\n if (profile === undefined) return null\n return currentRate(profile, new Date())\n }\n\n ui.peakrate = {\n sync() { loadPeakRate(Date.now()) },\n state,\n badge(provider, modelId) {\n const judgement = state(provider, modelId)\n return judgement === null ? null : buildRateBadge(judgement)\n },\n epoch: peakRateGeneration,\n teardown() {\n unsubscribe()\n stopPeakRate()\n },\n }\n\n return ui.peakrate.teardown\n}\n", "import { MODEL_EFFORT_DEFAULT } from './copy-fallbacks'\nimport { currentSessionId } from '../../core/host'\nimport type { HostContext } from '../../core/host'\nimport type { HostModelCatalogSnapshot, HostModelDirectory, HostModelEntry, HostModelGroup, HostModelReasoning } from '@dsh-claude-style/contracts/services'\nimport { notifyAll } from '../../shared/notify'\n\n/** One provider the catalog lists, with how many models it carries. */\nexport interface CatalogProvider {\n id: string\n name: string\n count: number\n}\n\n/** The catalog handle createModelCatalog returns. */\nexport type ModelCatalog = ReturnType<typeof createModelCatalog>\n\n/**\n * Model catalog: the per-session ModelDirectory and its reactive store.\n *\n * Split out of the model picker's install (packages/client/src/features/model/model-picker.ts); this\n * fragment is the catalog half of that feature. It reaches outside its own\n * closure only through its options — `ctx` (the host context, for\n * `sessions` / `modelDirectories`) and `schedule()` (the scheduler\n * wake-up the directory's store subscription calls). The directory\n * instance, the session id, the warm-up flag and the provider listeners\n * stay in this closure and are handed back through the returned handle.\n *\n * @param options - { ctx, schedule }.\n */\nexport function createModelCatalog(options: { ctx: HostContext, schedule?: () => void }) {\n const ctx = options.ctx\n const schedule = options.schedule\n let modelSub: (() => void) | null = null\n let modelDir: HostModelDirectory | null = null\n let modelSessionId: string | null = null\n let modelWarmRequested = false\n /** Settings-page listeners waiting on the provider list. */\n const providerListeners: ((providers: CatalogProvider[]) => void)[] = []\n\n /**\n * The current session id. The Session Controller dropped\n * `list.current` in dsh 0.2 (the main-view selection now comes from the\n * `uiSession` projection), so this MUST go through the shared\n * currentSessionId() in core/host.ts — reading the legacy field directly\n * resolves to null on current hosts and the picker never loads.\n */\n function currentModelSessionId() {\n const sessions = ctx.get('sessions')\n if (sessions === undefined || sessions === null) return null\n return currentSessionId(ctx, sessions) ?? null\n }\n\n function dropSubscription() {\n if (modelSub) modelSub()\n modelSub = null\n }\n\n /** Resolve the session's directory (and observe it) once per session. */\n function directory() {\n const id = currentModelSessionId()\n if (id === null) {\n dropSubscription()\n modelDir = null\n modelSessionId = null\n return null\n }\n if (modelSessionId === id && modelDir !== null) return modelDir\n dropSubscription()\n modelDir = null\n modelSessionId = null\n const dirs = ctx.get('modelDirectories')\n if (typeof dirs?.directoryFor === 'function') {\n try {\n modelDir = dirs.directoryFor(id)\n } catch (error) {\n // The host throws for a session id that has not materialized\n // its scope yet (ui-model-selection directoryFor): no directory\n // this time, and the next pass asks again.\n modelDir = null\n }\n }\n modelSessionId = id\n // The directory INSTANCE only carries load/select — its reactive state\n // hangs off the `.store` snapshot store (the host hands that same store\n // to its own menu as `directory`). Subscribe to the store, never to the\n // instance.\n if (typeof modelDir?.store?.subscribe === 'function') {\n modelSub = modelDir.store.subscribe(() => { notifyProviders(); if (schedule) schedule() })\n }\n return modelDir\n }\n\n function snapshot(): HostModelCatalogSnapshot | null {\n if (modelDir === null || !modelDir.store) return null\n return modelDir.store.getSnapshot()\n }\n\n /**\n * The catalog's providers, in catalog order, each with its model count.\n *\n * The settings page's quick-provider picker is the other consumer, and it\n * may be opened before the picker itself ever was — so this resolves the\n * directory and starts the shared catalog load rather than requiring a\n * first popover open.\n */\n function providers() {\n directory()\n warm()\n const snap = snapshot()\n const groups = (snap && snap.groups) || []\n const out: CatalogProvider[] = []\n for (let i = 0; i < groups.length; i++) {\n if (groups[i].models.length === 0) continue\n out.push({ id: groups[i].id, name: groups[i].name || groups[i].id, count: groups[i].models.length })\n }\n return out\n }\n\n /** Tell the settings picker the provider list moved (catalog arrived, changed). */\n function notifyProviders() {\n if (providerListeners.length === 0) return\n notifyAll(providerListeners, providers())\n }\n\n /**\n * Start the host's model catalog load as soon as a session resolves, rather\n * than waiting for the first popover open.\n *\n * The catalog is one RPC per Host generation (`remote.session.modelCatalog`)\n * and nothing else fetches it: the host kicks it off from its own menu's\n * `show()`, and this skin hides that seat, so leaving it to the first open\n * pays the whole round-trip inside a popover the user is waiting on. Starting\n * it here moves that wait into the startup the user is already sitting\n * through, and the trigger's label needs the same catalog anyway: the current\n * model's name comes out of it. The load is shared and cached host-side, so\n * the popover's own `load()` becomes a no-op instead of a second request.\n *\n * Failures are the store's to report — the popover shows the error and the\n * host offers a retry — so this only has to avoid throwing into a pass.\n */\n function warm() {\n if (modelWarmRequested || modelDir === null || typeof modelDir.load !== 'function') return\n modelWarmRequested = true\n const pending = modelDir.load()\n if (pending && typeof pending.catch === 'function') {\n pending.catch(() => { /* surfaced by the store, not here */ })\n }\n }\n\n /** The current selection resolved to its group + model entries. */\n function current(snap: HostModelCatalogSnapshot | null): { group: HostModelGroup, model: HostModelEntry } | null {\n if (!snap || snap.current === null) return null\n for (let g = 0; g < snap.groups.length; g++) {\n const group = snap.groups[g]\n if (group.id !== snap.current.provider) continue\n for (let m = 0; m < group.models.length; m++) {\n if (group.models[m].id === snap.current.model) return { group, model: group.models[m] }\n }\n }\n return null\n }\n\n /** Reasoning metadata + the effective effort for the current model. */\n function effort(snap: HostModelCatalogSnapshot | null): { reasoning: HostModelReasoning, effective: string | undefined, label: string } | null {\n const active = current(snap)\n if (active === null || !active.model.reasoning || snap === null || snap.current === null) return null\n const reasoning = active.model.reasoning\n const selection = snap.current\n const effective = selection.reasoningEffort !== undefined ? selection.reasoningEffort : reasoning.defaultEffort\n let label = MODEL_EFFORT_DEFAULT\n if (effective !== undefined) {\n label = effective\n for (let i = 0; i < reasoning.efforts.length; i++) {\n if (reasoning.efforts[i].id === effective) {\n label = reasoning.efforts[i].name\n break\n }\n }\n }\n return { reasoning, effective, label }\n }\n\n /** Register a provider-list listener; the returned call removes it again. */\n function onProviders(listener: (providers: CatalogProvider[]) => void) {\n providerListeners.push(listener)\n return () => {\n const at = providerListeners.indexOf(listener)\n if (at !== -1) providerListeners.splice(at, 1)\n }\n }\n\n /** Drop the directory and its subscription (a feature switch-off). */\n function reset() {\n dropSubscription()\n modelDir = null\n modelSessionId = null\n }\n\n /** Let a fresh install warm the catalog again (teardown). */\n function resetWarm() {\n modelWarmRequested = false\n }\n\n return {\n directory,\n snapshot,\n providers,\n notifyProviders,\n warm,\n current,\n effort,\n onProviders,\n reset,\n resetWarm\n }\n}\n", "import { modelCopy } from '../../core/model-copy'\nimport { buildElement } from '../../shared/dom'\nimport { COMBINE_SVGS, COMBINE_WORDS } from 'virtual:dsh-claude-style/generated'\n\n/**\n * The brand mark for one model: the vendor that made it, not the route it is\n * resold through — an OpenRouter group listing Claude models shows Anthropic\n * marks on the rows, never OpenRouter's own.\n *\n * Rules are ordered and anchored in the document; the first match wins. There is\n * deliberately **no fallback to the provider route**: a model no rule claims\n * draws no lockup at all.\n *\n * @param modelId - catalog model id.\n * @returns the vendored lockup's id, or null when no rule claims it.\n */\nexport function modelBrand(modelId: unknown) {\n if (modelCopy !== null) {\n const id = String(modelId === undefined || modelId === null ? '' : modelId).toLowerCase()\n for (let i = 0; i < modelCopy.brandRules.length; i++) {\n if (modelCopy.brandRules[i].re.test(id)) return modelCopy.brandRules[i].brand\n }\n }\n return null\n}\n\n/**\n * The vendor lockup a label should draw, if any.\n *\n * Every vendor with a vendored lockup has one, and the lockup carries both the\n * mark and the vendor's word as one piece of art — so it replaces that word\n * when the catalog spells it in the name, and leads the label when it does not\n * (Kimi's own catalog calls the model \"K3\").\n *\n * @param brand - resolved brand id, or null.\n * @param name - the catalog's display name (always a string; the caller guards).\n * @returns `{ id, word, svg, at }` — `at` is the word's index in the name, or -1.\n */\nexport function modelCombine(brand: string | null, name: string) {\n if (brand === null || !COMBINE_SVGS[brand]) return null\n const word = COMBINE_WORDS[brand]\n const at = word === undefined ? -1 : name.toLowerCase().indexOf(word.toLowerCase())\n return { id: brand, word, svg: COMBINE_SVGS[brand], at }\n}\n\n/**\n * One row's label, with the vendor's lockup standing in for its name.\n *\n * The lockup is decoration in the DOM — it *is* the vendor's name, drawn as art\n * — so the word it stands in for stays in the accessibility tree as hidden\n * text, and the label keeps naming the vendor for assistive tech.\n *\n * @param name - the catalog's display name.\n * @param brand - resolved brand id, or null.\n * @returns the label element.\n */\nexport function buildModelLabel(name: unknown, brand: string | null) {\n const el = buildElement('span', 'dsh-claude-model-name')\n const text = typeof name === 'string' ? name : ''\n const mark = modelCombine(brand, text)\n if (mark === null) {\n el.textContent = text\n return el\n }\n const box = buildElement('span', 'dsh-claude-model-combine')\n box.setAttribute('aria-hidden', 'true')\n box.innerHTML = mark.svg\n const head = mark.at === -1 ? '' : text.slice(0, mark.at)\n // The word's own separator goes with the word: the lockup's margin stands in\n // for it, so the label does not end up with two gaps.\n const tail = mark.at === -1 ? text : text.slice(mark.at + mark.word.length).replace(/^[\\s\\-–—]+/, '')\n if (head) el.appendChild(document.createTextNode(head))\n el.appendChild(box)\n el.appendChild(document.createTextNode(tail))\n el.appendChild(buildElement('span', 'dsh-claude-model-combine-alt', tail ? `${mark.word} ` : mark.word))\n return el\n}\n", "import type { HostContext } from '../../core/host'\nimport type { HostModelEntry } from '@dsh-claude-style/contracts/services'\nimport { localized } from '../../core/i18n'\nimport { modelCopy } from '../../core/model-copy'\nimport { textOf } from '../../shared/format'\n\n/**\n * Resolving a catalog model to its description line.\n *\n * The copy document (packages/client/data/model-descriptions.json) ships as data beside the\n * bundle and is fetched at runtime, so this is the only place that knows how\n * a model's id becomes a sentence. Resolution descends: family rule → tier\n * rule → the catalog's own text. Family rules are ordered and anchored, so\n * `deepseek-v4.1-flash` and a future Flash read one line while another\n * vendor's flash tier never borrows DeepSeek's copy; a rule anchored to a\n * version keeps that version's numbers to itself. The tier rules are the last\n * resort, read out of the id itself. A model this table has never seen and the\n * catalog does not describe resolves to an empty string on purpose: a\n * name-only row beats an invented line.\n *\n * Split out of model-picker.ts when the effort slider pushed that fragment\n * past the repository's size stop line; nothing here touches the picker's\n * closure, only the shared copy document.\n */\n/**\n * Family entry. The model id is tried alone first because it is the stronger\n * signal, then `provider/id` for ids that carry no brand of their own\n * (`abab6.5s-chat` under a provider called `minimax`).\n */\nexport function familyModelCopy(groupId: unknown, modelId: unknown) {\n if (modelCopy === null) return null\n const id = textOf(modelId).toLowerCase()\n const haystacks = [id, `${textOf(groupId).toLowerCase()}/${id}`]\n for (let h = 0; h < haystacks.length; h++) {\n for (let i = 0; i < modelCopy.families.length; i++) {\n const rule = modelCopy.families[i]\n if (!rule.re.test(haystacks[h])) continue\n return rule.text\n }\n }\n return null\n}\n\n/** Last-resort tier rule, read out of the id itself. */\nexport function tierModelCopy(modelId: unknown) {\n if (modelCopy === null) return null\n const id = textOf(modelId).toLowerCase()\n for (let i = 0; i < modelCopy.tiers.length; i++) {\n if (modelCopy.tiers[i].re.test(id)) return modelCopy.tiers[i].text\n }\n return null\n}\n\n/**\n * The description line for one catalog model, in the shell's language.\n * `ctx` is the caller's context, used only to read the shell's locale.\n */\nexport function modelDescription(ctx: HostContext | null, groupId: unknown, model: HostModelEntry): string {\n const id = typeof model.id === 'string' ? model.id : ''\n const pair = familyModelCopy(groupId, id) || tierModelCopy(id)\n const text = localized(pair, ctx)\n if (text) return text\n return typeof model.description === 'string' ? model.description : ''\n}\n", "import { AUTO_POPOVER_ALL } from '../../constants'\nimport { MODEL_OFFICIAL_GROUP } from './copy-fallbacks'\nimport { readPrefs } from '../../core/prefs'\nimport { buildModelLabel, modelBrand } from './brand'\nimport { modelDescription } from './copy-lookup'\nimport { buildElement } from '../../shared/dom'\nimport { POPOVER_CHECK_SVG, buildPopoverItem } from '../../shared/popover'\nimport type { createHoverIntent } from '../../shared/popover'\nimport type { HostContext } from '../../core/host'\nimport type { HostModelEntry, HostModelGroup } from '@dsh-claude-style/contracts/services'\n\n/**\n * Model picker rows: the row/cell builders and the two level-1 list\n * selectors.\n *\n * Split out of the model picker's install (packages/client/src/features/model/model-picker.ts); this\n * fragment is the row half of that feature. createModelRows reaches the\n * feature's closure only through its options: ctx (the copy lookup),\n * pickModel(provider, modelId) (commit a row), subHoverIntent (the\n * More-models dwell/grace), and isSubOpen() / closeSub() / openSub() (the\n * second level's state). The two SVG strings and byModelId are pure and\n * stay at the fragment's top level.\n */\nexport const MODEL_CHEVRON_SVG = '<svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 4l4 4-4 4\"/></svg>'\n\n/** Catalog order is whatever the provider happened to send; id order is scannable. */\nexport function byModelId(a: HostModelEntry, b: HostModelEntry) {\n const left = String(a.id)\n const right = String(b.id)\n return left < right ? -1 : left > right ? 1 : 0\n}\n\nexport function createModelRows(options: {\n ctx: HostContext\n pickModel: (provider: string, modelId: string) => void\n subHoverIntent: ReturnType<typeof createHoverIntent>\n isSubOpen: () => boolean\n closeSub: () => void\n openSub: () => void\n /** The peak rate meter's badge for one row, or null (features/peakrate). */\n rate: (provider: string, modelId: string) => HTMLElement | null\n}) {\n const ctx = options.ctx\n const pickModel = options.pickModel\n const subHoverIntent = options.subHoverIntent\n const isSubOpen = options.isSubOpen\n const closeSub = options.closeSub\n const openSub = options.openSub\n const rate = options.rate\n\n /**\n * The rule that separates one provider's models from the next. The provider\n * name rides the rule itself rather than trailing the model in parentheses:\n * one quiet line above the group says who serves it, and the model names\n * stay clean.\n */\n function buildProviderRule(name: string) {\n const rule = buildElement('div', 'dsh-claude-model-rule')\n if (name) rule.appendChild(buildElement('span', 'dsh-claude-model-rule-name', name))\n return rule\n }\n\n /**\n * One model row, the skeleton every level builds from: brand mark, name, an\n * optional description line, the peak rate meter and a check when the model is\n * in force. `onPick` is the whole difference between the rows — a list row\n * puts its model in force, the current seat's own row only folds the picker.\n *\n * Every row goes through here, the current seat's included: a row built\n * anywhere else is a row that can quietly lose whatever the others carry.\n */\n function buildModelRow(group: HostModelGroup, model: HostModelEntry, selected: boolean, withDescription: boolean, onPick: () => void) {\n // The shared row skeleton; the copy block keeps its own class, and\n // the vendor typography rides on the label inside it.\n const built = buildPopoverItem({ className: 'dsh-claude-model-option', role: 'menuitemradio', textClass: 'dsh-claude-model-copy', check: true })\n const item = built.row\n item.setAttribute('aria-checked', selected ? 'true' : 'false')\n const brand = modelBrand(model.id)\n // The brand id is the row's styling hook — it is what gives a vendor's rows\n // their own typography (see .dsh-claude-model-name in\n // features/model/model-picker.css). The vendor's mark is no longer drawn\n // here: it rides inside the label's lockup. The scheduler's attributeFilter\n // does not watch data-*, so this write cannot re-trigger a pass.\n if (brand) item.setAttribute('data-brand', brand)\n const copy = built.text\n // A model the host names with an empty string still reads as itself: the\n // row is picked by that id, so the label falls back to it.\n copy.appendChild(buildModelLabel(model.name || model.id, brand))\n // The description belongs to level 1 only: that list is the official\n // catalog, short enough that the line is what tells the models apart,\n // while \"More models\" is every provider's full catalog and reads better\n // as names alone. One line, in the shell's language — the copy document is\n // localized rather than stacked, so a row never carries two languages.\n const desc = withDescription ? modelDescription(ctx, group.id, model) : ''\n if (desc) copy.appendChild(buildElement('span', 'dsh-claude-model-desc', desc))\n // The peak rate meter rides in front of the check: the row is compared by\n // its rate before it is picked, and a model whose provider bills on no\n // clock carries no badge at all (packages/client/src/features/peakrate/, D54).\n const meter = rate(group.id, model.id)\n if (meter !== null) item.insertBefore(meter, built.check)\n built.check!.innerHTML = selected ? POPOVER_CHECK_SVG : ''\n item.addEventListener('click', (e: MouseEvent) => {\n e.stopPropagation()\n onPick()\n })\n return item\n }\n\n /** One selectable model row: picking it puts that model in force. */\n function buildModelOption(group: HostModelGroup, model: HostModelEntry, selected: boolean, withDescription: boolean) {\n return buildModelRow(group, model, selected, withDescription, () => { pickModel(group.id, model.id) })\n }\n\n /**\n * The model in force, as a row of its own for the case where level 1 lists no\n * group carrying it: the same row with its check on, and picking it only folds\n * the picker, because that model is already in force.\n */\n function buildCurrentOption(group: HostModelGroup, model: HostModelEntry) {\n return buildModelRow(group, model, true, true, () => { closeSub() })\n }\n\n /** The More-models row: label + chevron, hover opens the second level. */\n function buildModelCell(label: string) {\n const cell = buildElement('button', 'dsh-claude-model-cell')\n cell.type = 'button'\n cell.setAttribute('role', 'menuitem')\n cell.appendChild(buildElement('span', 'dsh-claude-model-cell-label', label))\n const chevron = buildElement('span', 'dsh-claude-model-cell-chevron')\n chevron.innerHTML = MODEL_CHEVRON_SVG\n cell.appendChild(chevron)\n cell.addEventListener('mouseenter', () => {\n if (readPrefs().autoPopover === AUTO_POPOVER_ALL) subHoverIntent.scheduleOpen()\n })\n cell.addEventListener('mouseleave', () => {\n // A pointer that only crossed the cell must not drill in behind it.\n subHoverIntent.cancel()\n })\n cell.addEventListener('click', e => {\n e.stopPropagation()\n if (isSubOpen()) closeSub()\n else openSub()\n })\n return cell\n }\n\n /**\n * The providers level 1 lists: the official service first, then the quick\n * providers the settings page picked. Only when the catalog has no\n * (non-empty) official service at all does the list fall back to the\n * picked providers, and with none picked to every provider.\n */\n function levelOneSections(groups: HostModelGroup[]) {\n const sections: HostModelGroup[] = []\n const chosen = readPrefs().quickProviders\n for (let g0 = 0; g0 < groups.length; g0++) {\n if (groups[g0].id === MODEL_OFFICIAL_GROUP && groups[g0].models.length > 0) {\n sections.push(groups[g0])\n break\n }\n }\n for (let g2 = 0; g2 < groups.length; g2++) {\n if (!chosen.includes(groups[g2].id) || groups[g2].id === MODEL_OFFICIAL_GROUP || groups[g2].models.length === 0) continue\n sections.push(groups[g2])\n }\n if (sections.length === 0) {\n for (let g4 = 0; g4 < groups.length; g4++) {\n if (groups[g4].models.length > 0) sections.push(groups[g4])\n }\n }\n return sections\n }\n\n /**\n * The provider groups level 1 does NOT show — which is exactly what level 2\n * is for. Repeating a provider across the two cards made the same models\n * appear twice, one card apart.\n *\n * Only a GROUP counts as shown. The seat level 1 surfaces as a row of its\n * own does not: that row carries one model, not the provider, so hiding the\n * provider's remaining models behind it would strand them.\n */\n function remainingGroups(groups: HostModelGroup[], sections: HostModelGroup[]) {\n const shown: Record<string, boolean> = {}\n for (let i = 0; i < sections.length; i++) shown[sections[i].id] = true\n const out: HostModelGroup[] = []\n for (let g = 0; g < groups.length; g++) {\n if (groups[g].models.length === 0 || shown[groups[g].id] === true) continue\n out.push(groups[g])\n }\n return out\n }\n\n return {\n buildProviderRule,\n buildModelOption,\n buildCurrentOption,\n buildModelCell,\n levelOneSections,\n remainingGroups\n }\n}\n", "import { AUTO_POPOVER_ALL } from '../../constants'\nimport { MODEL_EMPTY_LABEL, MODEL_FALLBACK_LABEL, MODEL_LOADING_LABEL, MODEL_MORE_LABEL, MODEL_OFFICIAL_GROUP, MODEL_TRIGGER_LABEL } from './copy-fallbacks'\nimport { activeLocale, copyLabel } from '../../core/i18n'\nimport { loadModelCopy } from '../../core/model-copy'\nimport { readPrefs } from '../../core/prefs'\nimport { createModelCatalog } from './catalog'\nimport { byModelId, createModelRows } from './rows'\nimport { buildElement, closestFrom, setAttributeIfChanged } from '../../shared/dom'\nimport { POPOVER_MARGIN, POPOVER_OPEN_DELAY, closeOtherPopovers, createHoverIntent, positionAnchoredPopover, registerPopover, removeStrayNodes, setMenuPopoverOpen, unregisterPopover } from '../../shared/popover'\nimport type { HostContext } from '../../core/host'\nimport type { FeatureHandle } from '../../core/scheduler'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './model-picker.manifest'\nimport type { CatalogProvider, ModelCatalog } from './catalog'\n\n/** What the effort picker and the settings page read off the model picker (ui.model). */\nexport interface ModelHandle extends FeatureHandle {\n close(): void\n /** The host slot the seat lives in. */\n seat(): HTMLElement | null\n /** The skin's model trigger while it is in the document. */\n trigger(): HTMLButtonElement | null\n effort(): ReturnType<ModelCatalog['effort']>\n named(): boolean\n settled(): boolean\n pickEffort(effort: string | undefined): void\n providers(): CatalogProvider[]\n onProviders(listener: (providers: CatalogProvider[]) => void): () => void\n teardown(): void\n}\n\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n /**\n * The host's model seat is a click-triggered two-pane menu (Model /\n * Effort rows drilling into their own lists). The skin replaces it with\n * a Claude-style picker: hovering the trigger opens the first level —\n * the DeepSeek official provider's models, a divider, then the\n * reasoning-effort row (when the current model offers one) and a More\n * models row; both open their second level BESIDE the first level.\n *\n * Data and submission ride the host's own per-session ModelDirectory\n * (`ctx.modelDirectories`), the same store the host's menu and the\n * /model command read — so the current selection, catalog and errors\n * stay in sync without scraping the DOM. The host's seat is hidden and\n * marked; a React swap re-marks it on the next pass.\n */\n let modelBtn: HTMLButtonElement | null = null\n let modelPop: HTMLElement | null = null\n let modelSubPop: HTMLElement | null = null\n let modelBody: HTMLElement | null = null\n let modelFooter: HTMLElement | null = null\n let modelSubBody: HTMLElement | null = null\n /** The host slot the seat lives in; the effort picker anchors there too. */\n let modelSlot: HTMLElement | null = null\n /**\n * The picker is two cards wide, and the level-2 card only cancels a pending\n * close once the pointer is ON it — so the grace has to cover the journey\n * from a level-1 row, across the gap, onto the sub card. At the shared 100ms\n * a slow traverse ran it out and both cards folded up mid-journey.\n */\n const MODEL_CLOSE_DELAY = 150\n /** Pending fold of level 2 while the pointer is still crossing level 1. */\n let subFoldTimer: ReturnType<typeof setTimeout> | null = null\n const modelHoverIntent = createHoverIntent(openModelPopover, closeModelIfAway, POPOVER_OPEN_DELAY, MODEL_CLOSE_DELAY)\n /** The More-models cell drills in on the same dwell/grace as the trigger. */\n const modelSubHoverIntent = createHoverIntent(openModelSub, closeModelIfAway, POPOVER_OPEN_DELAY, MODEL_CLOSE_DELAY)\n let modelBodySig = ''\n let modelSubSig = ''\n /**\n * The catalog half of the picker (packages/client/src/features/model/catalog.ts):\n * directory, snapshot, warm-up and the provider listeners. `schedule` is\n * the scheduler wake-up the directory's store subscription calls.\n */\n const modelCatalog = createModelCatalog({\n ctx,\n schedule() { if (ui.schedule) ui.schedule() }\n })\n /**\n * The row half of the picker (packages/client/src/features/model/rows.ts): the level-1\n * and level-2 builders. `pickModel` is this closure's own commit function\n * (a hoisted declaration); the rest is the second level's state.\n */\n const modelRows = createModelRows({\n ctx,\n pickModel,\n subHoverIntent: modelSubHoverIntent,\n isSubOpen() { return modelSubPop !== null && modelSubPop.getAttribute('data-open') === 'true' },\n closeSub: closeModelPopovers,\n openSub: openModelSub,\n /**\n * The peak rate meter is its own feature (packages/client/src/features/peakrate/):\n * it answers with a badge for the row, and with nothing at all for a\n * model whose provider bills on no clock.\n */\n rate(provider: string, modelId: string) {\n const peakrate = ui.peakrate\n if (peakrate === undefined) return null\n return peakrate.badge(provider, modelId)\n }\n })\n\n function cancelCloseModel() {\n modelHoverIntent.cancel()\n if (subFoldTimer !== null) {\n clearTimeout(subFoldTimer)\n subFoldTimer = null\n }\n }\n\n function scheduleCloseModel() {\n modelHoverIntent.scheduleClose()\n }\n\n /**\n * Where the pointer last was, tracked only while a card is up. The two cards\n * are separate boxes with a sliver of desktop between them, and a pointer\n * crossing that sliver has not left the picker — without this the grace\n * simply runs out mid-gap and both cards fold.\n */\n let pointer: { x: number, y: number } | null = null\n let pointerBound = false\n function trackPointer(event: MouseEvent) {\n pointer = { x: event.clientX, y: event.clientY }\n }\n function trackPointerWhileOpen() {\n const wanted = modelPop !== null && modelPop.getAttribute('data-open') === 'true'\n if (wanted === pointerBound) return\n pointerBound = wanted\n if (wanted) {\n document.addEventListener('mousemove', trackPointer, true)\n } else {\n document.removeEventListener('mousemove', trackPointer, true)\n pointer = null\n }\n }\n\n /** True while the tracked pointer sits within one card's box, with the same\n * 8px band of desktop around it that covers the sliver of gap between the\n * two cards. */\n function pointerInCardBox(card: HTMLElement | null) {\n if (pointer === null || card === null) return false\n if (card.getAttribute('data-open') !== 'true') return false\n const box = card.getBoundingClientRect()\n return pointer.x >= box.left - 8 && pointer.x <= box.right + 8 &&\n pointer.y >= box.top - 8 && pointer.y <= box.bottom + 8\n }\n\n /** True while the pointer sits in either card, or in the gap between them. */\n function pointerInPicker() {\n return pointerInCardBox(modelPop) || pointerInCardBox(modelSubPop)\n }\n\n /** Close on leave, but treat the gap between the two cards as still inside. */\n function closeModelIfAway() {\n if (pointerInPicker()) {\n scheduleCloseModel()\n return\n }\n closeModelPopovers()\n }\n\n function closeModelPopovers() {\n cancelCloseModel()\n if (modelPop) setMenuPopoverOpen(modelPop, false, modelBtn)\n if (modelSubPop) setMenuPopoverOpen(modelSubPop, false)\n }\n\n function openModelPopover() {\n cancelCloseModel()\n // One card at a time: the second level is this same choice and stays,\n // every other popover folds (the effort trigger sits beside this one, so\n // leaving its card up would stack two panels over one corner).\n closeOtherPopovers('model')\n const dir = modelCatalog.directory()\n // load() is async — the host itself guards with .catch(() => {}); a bare\n // try/catch cannot see its rejection.\n if (dir && typeof dir.load === 'function') {\n const pending = dir.load()\n if (pending && typeof pending.catch === 'function') {\n pending.catch(() => { /* the store's error surface covers a failure */ })\n }\n }\n if (modelSubPop) setMenuPopoverOpen(modelSubPop, false)\n // A card opening repaints from scratch: its countdowns were drawn at\n // whatever minute it was last on screen, and a closed card is not part of\n // any signature (rateSignature).\n modelBodySig = ''\n renderModelBody()\n positionModelPopovers()\n if (modelPop) setMenuPopoverOpen(modelPop, true, modelBtn)\n }\n\n function openModelSub() {\n cancelCloseModel()\n modelSubSig = ''\n renderModelSub()\n // Open BEFORE placing: the placement pass reads the sub card only while\n // it is marked open, so positioning first would skip it and leave the\n // card at its previous position — every open has to place it fresh.\n if (modelSubPop) setMenuPopoverOpen(modelSubPop, true)\n positionModelPopovers()\n }\n\n function pickModel(provider: string, modelId: string) {\n const dir = modelCatalog.directory()\n if (dir === null) return\n // select() is async and rejects on a failed selection, which the host's\n // toast reports; the rejection is dropped the way the host's own seat\n // wrapper drops it.\n const pending = dir.select({ provider, model: modelId })\n if (pending && typeof pending.catch === 'function') pending.catch(() => {})\n closeModelPopovers()\n }\n\n /** Commit one reasoning level. The slider stays open for the next nudge. */\n function pickEffort(effort: string | undefined) {\n const dir = modelCatalog.directory()\n const snap = modelCatalog.snapshot()\n if (dir === null || !snap || snap.current === null) return\n const selection: { provider: string, model: string, reasoningEffort?: string } = { provider: snap.current.provider, model: snap.current.model }\n if (effort !== undefined) selection.reasoningEffort = effort\n // A rejected selection is reported by the host's toast (see pickModel).\n const pending = dir.select(selection)\n if (pending && typeof pending.catch === 'function') pending.catch(() => {})\n }\n\n /**\n * The footer holds the divider and the More-models row, and nothing else:\n * the effort slider moved to its own card (packages/client/src/features/effort/effort-picker.ts).\n * Rebuilt only when the row set changes — the divider exists to close the\n * list off from what follows it, so with no More-models row it is a stray\n * line and is not drawn either.\n */\n function layoutModelFooter(showMore: boolean) {\n if (!modelFooter) return\n const stale: ChildNode[] = []\n for (let child = modelFooter.firstChild; child !== null; child = child.nextSibling) stale.push(child)\n for (let i = 0; i < stale.length; i++) modelFooter.removeChild(stale[i])\n if (!showMore) return\n modelFooter.appendChild(buildElement('div', 'dsh-claude-model-divider'))\n modelFooter.appendChild(modelRows.buildModelCell(copyLabel('moreLabel', MODEL_MORE_LABEL)))\n }\n\n /**\n * What the rows' rates depend on, in one value the render signatures carry.\n * The catalog is the meter feature's (its generation moves when one arrives),\n * and the minute only matters while a card is on screen — the countdown is\n * drawn to the minute, and a card that is down is repainted by the opening\n * pass anyway.\n */\n function rateSignature() {\n const peakrate = ui.peakrate\n if (peakrate === undefined) return ''\n const up = (modelPop !== null && modelPop.getAttribute('data-open') === 'true') ||\n (modelSubPop !== null && modelSubPop.getAttribute('data-open') === 'true')\n return up ? `${peakrate.epoch()}/${Math.floor(Date.now() / 60000)}` : `${peakrate.epoch()}`\n }\n\n /** Level 1: the provider sections, the divider, More models. */\n function renderModelBody() {\n if (!modelBody) return\n const snap = modelCatalog.snapshot()\n const status = snap ? snap.status : 'idle'\n const groups = (snap && snap.groups) || []\n const current = modelCatalog.current(snap)\n let sig = [status, activeLocale(), current ? `${current.group.id}/${current.model.id}` : '', readPrefs().quickProviders.join(','), rateSignature()].join('|')\n for (let g = 0; g < groups.length; g++) sig += `;${groups[g].id}:${groups[g].models.length}`\n if (sig === modelBodySig) {\n return\n }\n modelBodySig = sig\n while (modelBody.firstChild) modelBody.removeChild(modelBody.firstChild)\n\n // A seat whose data is still in flight must not blank a picker that\n // already has a list. The host marks the directory `selecting` for the\n // WHOLE selectModel round-trip, and that round-trip runs for seconds on\n // providers whose adapters resolve over the network. Only a directory with\n // nothing to show yet falls back to the loading line.\n const seated = groups.length > 0 && current !== null\n if (!seated && (status === 'idle' || status === 'loading' || status === 'selecting')) {\n modelBody.appendChild(buildElement('div', 'dsh-claude-popover-status', copyLabel('loading', MODEL_LOADING_LABEL)))\n layoutModelFooter(false)\n } else {\n const sections = modelRows.levelOneSections(groups)\n if (sections.length === 0) {\n modelBody.appendChild(buildElement('div', 'dsh-claude-popover-status', copyLabel('empty', MODEL_EMPTY_LABEL)))\n } else {\n for (let s = 0; s < sections.length; s++) {\n const section = sections[s]\n // The official source needs no naming, and the first section needs\n // no rule: a bare line above the list would be one line too many.\n const sectionLabel = section.id === MODEL_OFFICIAL_GROUP ? '' : (section.name || section.id)\n if (sectionLabel !== '' || s > 0) modelBody.appendChild(modelRows.buildProviderRule(sectionLabel))\n const sectionModels = section.models.slice().sort(byModelId)\n for (let m = 0; m < sectionModels.length; m++) {\n const selected = current !== null && current.group.id === section.id && current.model.id === sectionModels[m].id\n modelBody.appendChild(modelRows.buildModelOption(section, sectionModels[m], selected, true))\n }\n }\n }\n // The current seat is surfaced under the list when none of the sections\n // above already carries it, so the row the seat is read from is always\n // on screen. Its provider rides a rule of its own rather than trailing\n // the model in parentheses — the same idiom the sections use. It stays\n // above the divider: the divider closes the model list, so anything\n // that belongs to the list has to sit on its side of it.\n let currentListed = false\n for (let c = 0; c < sections.length; c++) {\n if (current !== null && sections[c].id === current.group.id) currentListed = true\n }\n if (current !== null && !currentListed) {\n // The divider above already draws a line, so a provider that needs no\n // naming (the official source) adds nothing here.\n const currentRuleName = current.group.id === MODEL_OFFICIAL_GROUP ? '' : (current.group.name || current.group.id)\n if (currentRuleName !== '') modelBody.appendChild(modelRows.buildProviderRule(currentRuleName))\n // Through the same row builder as every other row, so this one carries\n // the same brand hook, description and peak rate meter.\n modelBody.appendChild(modelRows.buildCurrentOption(current.group, current.model))\n }\n // The divider closes the model list and the More-models row follows it;\n // both live in the footer, OUTSIDE the scroll area — the list above\n // scrolls under them while the row stays reachable. The effort slider\n // is not here any more: it has its own trigger and card.\n if (modelFooter) {\n // \"More models\" carries what level 1 does not. With every provider\n // already on screen the row would only open an empty card, so it goes\n // away with the last remaining provider.\n const showMore = modelRows.remainingGroups(groups, sections).length > 0\n // The divider exists to close the list off from what follows it. With\n // no More-models row there is nothing left to close off, and a bare\n // line under the list reads as a stray rule. layoutModelFooter owns\n // that judgement.\n layoutModelFooter(showMore)\n }\n }\n }\n\n /** Level 2: the providers level 1 does NOT show, each headed by its name. */\n function renderModelSub() {\n if (!modelSubBody) return\n const snap = modelCatalog.snapshot()\n const groups = (snap && snap.groups) || []\n const current = modelCatalog.current(snap)\n // What level 2 holds depends on what level 1 lists, so the signature has\n // to carry level 1's provider ids as well.\n const sections = modelRows.levelOneSections(groups)\n const listed = []\n for (let s0 = 0; s0 < sections.length; s0++) listed.push(sections[s0].id)\n let sig2 = `more|${listed.join(',')}|${rateSignature()}`\n for (let g = 0; g < groups.length; g++) sig2 += `;${groups[g].id}:${groups[g].models.length}`\n if (current) sig2 += `#${current.group.id}/${current.model.id}`\n if (sig2 === modelSubSig) return\n modelSubSig = sig2\n while (modelSubBody.firstChild) modelSubBody.removeChild(modelSubBody.firstChild)\n const rest = modelRows.remainingGroups(groups, sections)\n for (let g2 = 0; g2 < rest.length; g2++) {\n const group = rest[g2]\n if (group.models.length === 0) continue\n const groupSection = buildElement('div', 'dsh-claude-model-group-section')\n const groupRow = buildElement('div', 'dsh-claude-model-group-row')\n const groupLabel = buildElement('div', 'dsh-claude-model-group')\n // The group label is the provider's name alone: a mark there would repeat\n // what the rows below already carry inside their lockups.\n groupLabel.appendChild(buildElement('span', 'dsh-claude-model-group-name', group.name))\n groupRow.appendChild(groupLabel)\n groupSection.appendChild(groupRow)\n // A provider's models read in id order, so the list is scannable and stays\n // put between visits; the catalog's own order is whatever the provider\n // happened to send. Sorted on a copy — the snapshot belongs to the store.\n const groupModels = group.models.slice().sort(byModelId)\n for (let m = 0; m < groupModels.length; m++) {\n const selected = current !== null && current.group.id === group.id && current.model.id === groupModels[m].id\n groupSection.appendChild(modelRows.buildModelOption(group, groupModels[m], selected, false))\n }\n modelSubBody.appendChild(groupSection)\n }\n if (modelSubBody.firstChild === null) {\n modelSubBody.appendChild(buildElement('div', 'dsh-claude-popover-status', copyLabel('empty', MODEL_EMPTY_LABEL)))\n }\n }\n\n function positionModelPopovers() {\n trackPointerWhileOpen()\n if (!modelBtn || !modelPop) return\n const pos = positionAnchoredPopover(modelBtn, modelPop, { side: 'above', gap: 6 })\n if (modelSubPop && modelSubPop.getAttribute('data-open') === 'true') {\n const w2 = modelSubPop.offsetWidth\n const h2 = modelSubPop.offsetHeight\n const h1 = modelPop.offsetHeight\n // Beside the first level; flip to its left when the viewport is tight.\n let x2 = pos.x + modelPop.offsetWidth + 2\n if (x2 + w2 > window.innerWidth - POPOVER_MARGIN) x2 = Math.max(POPOVER_MARGIN, pos.x - 4 - w2)\n // Bottom-aligned with the first level; a level 2 TALLER than level 1\n // keeps its top instead, so it cannot push itself off the top edge.\n let y2 = pos.y + Math.max(0, h1 - h2)\n y2 = Math.max(POPOVER_MARGIN, Math.min(y2, window.innerHeight - h2 - POPOVER_MARGIN))\n modelSubPop.style.left = `${x2}px`\n modelSubPop.style.top = `${y2}px`\n }\n }\n\n function ensureModelChrome() {\n // Idempotence guard, not just a null check: the picker's own teardown\n // sweep, or a hot-reload generation's stray sweep, can REMOVE the\n // popover node while the closure still references it. With a null-only\n // check the reference stays non-null-but-detached and is never rebuilt\n // — the trigger then toggles a popover that is not in the document and\n // the picker silently loses its click effect. The account footer's\n // equivalent guard (footArea.contains) is the established pattern.\n // Rebuilding also re-points the body/footer children and resets the\n // render signatures so the next pass repaints into the fresh nodes.\n if (modelPop === null || modelPop.parentElement === null) {\n modelPop = document.createElement('div')\n modelPop.className = 'dsh-claude-popover-card dsh-claude-model-popover'\n setMenuPopoverOpen(modelPop, false)\n modelBody = document.createElement('div')\n modelBody.className = 'dsh-claude-popover-body'\n modelPop.appendChild(modelBody)\n modelFooter = document.createElement('div')\n modelFooter.className = 'dsh-claude-model-footer'\n modelPop.appendChild(modelFooter)\n modelPop.addEventListener('mouseenter', cancelCloseModel)\n // The second level belongs to its More-models cell: while it is open,\n // the pointer landing anywhere else on the first level (a model row,\n // bare card) folds it — the first level itself stays open, it is the\n // hover-intent host. Delegated mouseover, not mouseenter: moving from\n // the cell to a model row never crosses the popover's boundary, so a\n // boundary event would never fire.\n modelPop.addEventListener('mouseover', e => {\n if (modelSubPop === null || modelSubPop.getAttribute('data-open') !== 'true') return\n if (closestFrom(e.target, '.dsh-claude-model-cell')) return\n // Delayed, not immediate: the sub card sits BESIDE level 1, so a\n // pointer on its way from the cell to the sub crosses level 1's own\n // rows — folding on the spot made that journey impossible at any\n // speed. Folding now waits out the same grace, and stands down only\n // when the pointer has meanwhile reached the sub card itself: the\n // pointer still being on level 1 means it left the More-models cell,\n // which is exactly when level 2 folds.\n if (subFoldTimer !== null) clearTimeout(subFoldTimer)\n subFoldTimer = setTimeout(() => {\n subFoldTimer = null\n if (pointerInCardBox(modelSubPop)) return\n if (modelSubPop !== null) setMenuPopoverOpen(modelSubPop, false)\n }, MODEL_CLOSE_DELAY)\n })\n modelPop.addEventListener('mouseleave', scheduleCloseModel)\n document.body.appendChild(modelPop)\n modelBodySig = ''\n }\n if (modelSubPop === null || modelSubPop.parentElement === null) {\n modelSubPop = document.createElement('div')\n modelSubPop.className = 'dsh-claude-popover-card dsh-claude-model-popover dsh-claude-model-popover-sub'\n setMenuPopoverOpen(modelSubPop, false)\n modelSubBody = document.createElement('div')\n modelSubBody.className = 'dsh-claude-popover-body'\n modelSubPop.appendChild(modelSubBody)\n modelSubPop.addEventListener('mouseenter', cancelCloseModel)\n modelSubPop.addEventListener('mouseleave', scheduleCloseModel)\n document.body.appendChild(modelSubPop)\n modelSubSig = ''\n }\n }\n\n /**\n * Hand the host's own model seat and menu back: unmark the seat, remove the\n * skin's trigger and popovers, drop the catalog subscription.\n */\n function dropModelControl() {\n const allHosts = document.querySelectorAll('[data-dsh-claude-model-host]')\n for (let h = 0; h < allHosts.length; h++) {\n allHosts[h].removeAttribute('data-dsh-claude-model-host')\n }\n removeStrayNodes(document, '.dsh-claude-model-btn', [])\n modelBtn = null\n removeStrayNodes(document, '.dsh-claude-model-popover', [])\n modelPop = null\n modelSubPop = null\n modelBody = null\n modelFooter = null\n modelSubBody = null\n modelBodySig = ''\n modelSubSig = ''\n cancelCloseModel()\n modelCatalog.reset()\n }\n\n /** Build/refresh the trigger, its label and the popover rows. */\n function syncModelControl() {\n // Two ways to be off: the composer restyle does not apply to this page, or\n // the picker preference is off. Both hand the host's own model seat and\n // menu back, so both run the same sweep.\n if (!ui.composer!.isActive() || !readPrefs().modelPicker) {\n dropModelControl()\n return\n }\n\n // The copy document is fetched on first paint of the picker rather than\n // at install, so a session that never opens it never pays for it.\n loadModelCopy()\n modelCatalog.directory()\n modelCatalog.warm()\n const slot = document.querySelector<HTMLElement>('[data-slot=\"conversation.input.model\"]')\n modelSlot = slot\n if (slot === null) return\n // Hide the host's own seat (React owns the node; re-mark on swap).\n // Idempotent against a torn-down-less reload, like the account footer:\n // client HMR drops the old fiber's disposals, so a previous generation's\n // trigger and popovers are still in the DOM while this fresh scope starts\n // from null. Sweep the strays, or the seat renders twice.\n removeStrayNodes(slot, '.dsh-claude-model-btn', [modelBtn])\n removeStrayNodes(document, 'body > .dsh-claude-model-popover', [modelPop, modelSubPop])\n const hostRoot = slot.firstElementChild\n if (hostRoot !== null) hostRoot.toggleAttribute('data-dsh-claude-model-host', true)\n if (modelBtn === null || modelBtn.parentElement !== slot) {\n if (modelBtn !== null && modelBtn.parentElement !== null) modelBtn.parentElement.removeChild(modelBtn)\n modelBtn = document.createElement('button')\n modelBtn.type = 'button'\n modelBtn.className = 'dsh-claude-model-btn'\n modelBtn.setAttribute('aria-haspopup', 'menu')\n modelBtn.innerHTML = '<span class=\"dsh-claude-model-btn-label\"></span>'\n // Same contract as the account trigger: hover under the \"All\" scope,\n // click-only otherwise.\n modelBtn.addEventListener('mouseenter', () => {\n if (readPrefs().autoPopover === AUTO_POPOVER_ALL) modelHoverIntent.scheduleOpen()\n })\n modelBtn.addEventListener('mouseleave', () => {\n if (readPrefs().autoPopover === AUTO_POPOVER_ALL) scheduleCloseModel()\n })\n modelBtn.addEventListener('click', e => {\n e.stopPropagation()\n if (modelPop && modelPop.getAttribute('data-open') === 'true') closeModelPopovers()\n else openModelPopover()\n })\n slot.appendChild(modelBtn)\n }\n ensureModelChrome()\n\n const snap = modelCatalog.snapshot()\n const current = modelCatalog.current(snap)\n const groupsNow = (snap && snap.groups) || []\n const label = current ? current.model.name : copyLabel('fallbackLabel', MODEL_FALLBACK_LABEL)\n const labelEl = modelBtn.querySelector('.dsh-claude-model-btn-label')\n if (labelEl) {\n // Same-value guards: syncModelControl runs on every scheduler pass,\n // and an identical write still mutates the DOM (textContent replaces\n // the text node; setAttribute queues an attribute record — and\n // aria-label is in the observer's attributeFilter). Unguarded, each\n // pass feeds the observer that schedules the next pass, keeping one\n // full pass running every frame even at idle.\n if (labelEl.textContent !== label) labelEl.textContent = label\n // The dimmed tone means \"no seat to name yet\". A selection in flight\n // still names the model in force, so it keeps the normal tone — the\n // host can hold `selecting` for seconds (the effort slider commits\n // through that same RPC), and a greyed-out trigger for that long\n // reads as broken rather than busy.\n const unsettled = !!(snap && (snap.status === 'loading' || snap.status === 'idle' || snap.status === 'selecting')) && !(groupsNow.length > 0 && current !== null)\n labelEl.classList.toggle('dsh-claude-model-btn-loading', unsettled)\n }\n // The level is NOT part of this trigger any more: it has its own button\n // beside it (packages/client/src/features/effort/effort-picker.ts). A stale \"· High\" span from\n // an older generation is swept rather than reused.\n const staleEffortEl = modelBtn.querySelector('.dsh-claude-model-btn-effort')\n if (staleEffortEl !== null) staleEffortEl.remove()\n const triggerAria = copyLabel('triggerLabel', MODEL_TRIGGER_LABEL, { model: label })\n setAttributeIfChanged(modelBtn, 'aria-label', triggerAria)\n modelBtn.disabled = false\n\n renderModelBody()\n if (modelSubPop && modelSubPop.getAttribute('data-open') === 'true') {\n renderModelSub()\n positionModelPopovers()\n } else if (modelPop && modelPop.getAttribute('data-open') === 'true') {\n positionModelPopovers()\n }\n }\n\n\n // The picker takes part in the shared popover rule (shared/popover.ts): one\n // entry for BOTH levels, so opening the More-models card never folds the\n // card that carries it.\n registerPopover('model', closeModelPopovers)\n\n ui.model = {\n sync: syncModelControl,\n /**\n * Close both levels of the picker. The scheduler calls this for every\n * dismiss reason ('outside', 'escape', 'composer') and the picker acts\n * on all of them, so the reason is ignored; other features (the effort\n * picker) call it with none.\n */\n close() { closeModelPopovers() },\n /**\n * What the effort picker (a separate fragment that owns the level's\n * trigger and card) reads from this one: the seat slot, the model\n * trigger it sits beside, the effort descriptor and the commit call.\n * `effort()` re-reads the catalog every call, so a level the host echoes\n * back lands on the knob without either fragment pushing it.\n */\n seat() { return modelSlot },\n /** The skin's model trigger while it is in the document, else null. */\n trigger() { return modelBtn !== null && modelBtn.isConnected ? modelBtn : null },\n effort() { return modelCatalog.effort(modelCatalog.snapshot()) },\n /**\n * Whether the catalog can match the current selection to a group and\n * model. FALSE is \"cannot name the seat\" (the snapshot is still arriving,\n * or the provider group is not in it), which is not the same as \"the seat\n * has no levels\".\n */\n named() { return modelCatalog.current(modelCatalog.snapshot()) !== null },\n /**\n * Whether the catalog is currently able to name the seat. FALSE means\n * \"in flight\": the host re-enumerates the whole directory for seconds\n * after every selection, and during that window the snapshot can have no\n * groups, no current seat and no reasoning metadata. Readers must not\n * read that as \"this model has no levels\" — the model card learned this\n * the hard way (it blanked its list on every pick), and the effort card\n * would take its trigger away mid-selection.\n */\n settled() {\n const snap = modelCatalog.snapshot()\n if (!snap) return true\n const inFlight = snap.status === 'loading' || snap.status === 'idle' || snap.status === 'selecting'\n const groups = snap.groups || []\n return !inFlight || (groups.length > 0 && modelCatalog.current(snap) !== null)\n },\n pickEffort,\n owns(target: Node) {\n if (!target) return false\n return (modelBtn !== null && modelBtn.contains(target)) ||\n (modelPop !== null && modelPop.contains(target)) ||\n (modelSubPop !== null && modelSubPop.contains(target))\n },\n reposition: positionModelPopovers,\n providers: modelCatalog.providers,\n onProviders: modelCatalog.onProviders,\n /**\n * A copy source changed: drop the render signatures so the next pass\n * repaints the rows in the new language.\n */\n onCopyChange() {\n modelBodySig = ''\n modelSubSig = ''\n },\n // Removes the skin's DOM too: a feature switched off mid-session (see\n // packages/client/src/entry.ts) keeps the stylesheet around it, so the seat has to be\n // handed back here rather than by the stylesheet going away.\n teardown() {\n dropModelControl()\n modelCatalog.resetWarm()\n modelSlot = null\n unregisterPopover('model')\n }\n }\n\n return ui.model.teardown\n}\n", "import { motionReduced } from '../../core/prefs'\nimport { buildElement } from '../../shared/dom'\n\n/**\n * The dot matrix the reasoning-effort slider (effort/control.ts) shows on\n * its top rung.\n *\n * The grid is solved in whole device pixels, every particle's phase, cycle\n * length and tone is scattered by hash, and the entrance sweeps in from the\n * right. The control decides when the top rung is reached; this factory\n * builds the grid inside `matrix` for the width of `track`, and returns\n * `{ ensure }` — `ensure()` (re)builds it for the track's current\n * device-pixel size and answers false while the track has no layout yet.\n */\nexport function createEffortMatrix(track: HTMLElement, matrix: HTMLElement) {\n /**\n * The grid the matrix is built for, '`widthDev@dpr`'; '' while unbuilt.\n * The picker's width is fixed, so a built grid is reused for the whole\n * mount; a device-pixel-ratio change (window dragged across monitors)\n * changes the signature and forces one rebuild on the next apex entry.\n */\n let matrixSig = ''\n\n /**\n * Scatter one cell's phase. A linear rule such as `(7r + 13c) % 29` maps\n * neighbours onto a regular lattice, which the eye reads as diagonal\n * bands; avalanching both coordinates first scatters them instead. The\n * result is continuous rather than quantised into buckets, so no two\n * cells are forced to flip in the very same instant every round.\n */\n function cellUnit(r: number, c: number, seed: number) {\n let h = Math.imul(r + 1, 0x9e3779b1) ^ Math.imul(c + 1, 0x85ebca6b) ^ Math.imul(seed + 1, 0x27d4eb2f)\n h = Math.imul(h ^ (h >>> 15), 0x2545f491)\n h ^= h >>> 13\n return (h >>> 0) / 4294967296\n }\n\n /**\n * The matrix's left-to-right mask: the right end is solid, the left end\n * dissolves back into the bare track, so the grid reads as a gradient\n * rather than a wall of blocks.\n */\n function cellFade(fx: number) {\n if (fx <= 0.05) return 0\n if (fx >= 0.75) return 1\n const t = (fx - 0.05) / 0.7\n return t * t * (3 - 2 * t)\n }\n\n /**\n * Solve the grid in whole device pixels. Rounding here — instead of\n * handing the browser a fractional remainder — is what keeps the matrix\n * uniform: a fractional pitch rasterizes as alternating gaps, and a\n * centred fractional remainder leaves one edge with a different gap. The\n * vertical rest goes back into the top/bottom padding, so the blocks\n * stay square and centred inside the groove whatever the device ratio.\n */\n function solveMatrix(wDev: number, dpr: number) {\n /* Five rows of ~4px blocks on the 26px groove: chunky enough for the\n grid to read as PIXELS (Claude's own matrix is similarly coarse);\n six rows solved to 3px blocks and blurred into a texture. */\n const ROWS = 5\n const gap = Math.max(1, Math.round(1 * dpr))\n const margin = Math.max(1, Math.round(0.5 * dpr))\n const hDev = Math.round(26 * dpr)\n const block = Math.max(3, Math.floor((hDev - 2 * margin - (ROWS - 1) * gap) / ROWS))\n const cols = Math.max(1, Math.floor((wDev + gap) / (block + gap)))\n const restX = wDev - (cols * block + (cols - 1) * gap)\n const restY = hDev - (ROWS * block + (ROWS - 1) * gap)\n return {\n cols,\n rows: ROWS,\n sq: block / dpr,\n gap: gap / dpr,\n padTop: Math.floor(restY / 2) / dpr,\n padBottom: (restY - Math.floor(restY / 2)) / dpr,\n padLeft: Math.floor(restX / 2) / dpr,\n padRight: (restX - Math.floor(restX / 2)) / dpr,\n }\n }\n /**\n * Give one particle its twinkle: a hash-scattered phase, a hash-scattered\n * CYCLE LENGTH and a hash-scattered tone. Nothing here is ordered — the\n * phases spread across the cycle so no two neighbours fire together, and\n * the per-block durations drift the phases apart so the pattern never\n * repeats exactly. (An ordered wave was tried and rejected: it read as one\n * sweeping bar rather than as a field of particles.)\n */\n function paintParticle(sq: HTMLElement, r: number, c: number) {\n sq.setAttribute('data-tone', String(Math.floor(cellUnit(r, c, 1) * 8) % 8))\n // Standing still, the cycle and the phase are not written at all: an inline\n // `!important` duration outranks the reduced-motion rule, and a plume that\n // flashes once per block after a scattered delay is motion like any other\n // (D26). Without them the stylesheet's own duration answers the rule.\n if (motionReduced()) {\n sq.style.removeProperty('animation-delay')\n sq.style.removeProperty('animation-duration')\n return\n }\n sq.style.setProperty('animation-delay', `${(cellUnit(r, c, 2) * 1.38 + 0.3).toFixed(3)}s`, 'important')\n sq.style.setProperty('animation-duration', `${(1.45 * (0.92 + cellUnit(r, c, 3) * 0.16)).toFixed(3)}s`, 'important')\n }\n\n\n /**\n * (Re)build the matrix for the track's current device-pixel size. Returns\n * false when the track has no layout yet (the picker is still hidden);\n * the caller then keeps the apex treatment off, and the next paintValue\n * retries — the attribute never marks a grid that is not there.\n */\n function ensureMatrix() {\n const w = track.clientWidth\n if (!w) return false\n const dpr = window.devicePixelRatio > 0 ? window.devicePixelRatio : 1\n const sig = `${Math.round(w * dpr)}@${dpr}${motionReduced() ? '@still' : ''}`\n if (sig === matrixSig) return true\n const lay = solveMatrix(Math.round(w * dpr), dpr)\n while (matrix.firstChild) matrix.removeChild(matrix.firstChild)\n matrix.style.gap = `${lay.gap}px`\n matrix.style.padding = `${lay.padTop}px ${lay.padRight}px ${lay.padBottom}px ${lay.padLeft}px`\n matrix.style.gridTemplateColumns = `repeat(${lay.cols}, ${lay.sq}px)`\n matrix.style.gridAutoRows = `${lay.sq}px`\n for (let r = 0; r < lay.rows; r++) {\n for (let c = 0; c < lay.cols; c++) {\n const fx = lay.cols > 1 ? c / (lay.cols - 1) : 1\n const cell = buildElement('div', 'dsh-claude-effort-matrix-cell')\n /* The entrance sweeps in from the right — the end the knob reached\n for — with a whisper of scatter so it does not read as a wipe.\n !important inline: the stylesheet's animation shorthand is\n !important (it resets delay/duration), so a plain assignment\n would silently lose. Standing still it is left off, for the same\n reason paintParticle leaves the cycle off (D26). */\n if (!motionReduced()) cell.style.setProperty('animation-delay', `${(((1 - fx) * 0.45) + cellUnit(r, c, 4) * 0.08).toFixed(3)}s`, 'important')\n const sq = buildElement('div', 'dsh-claude-effort-matrix-sq')\n /* The plume shape is a STATIC per-block opacity: the flash animates\n the colour through it, so the two never fight. */\n sq.style.opacity = cellFade(fx).toFixed(3)\n paintParticle(sq, r, c)\n cell.appendChild(sq)\n matrix.appendChild(cell)\n }\n }\n matrixSig = sig\n return true\n }\n\n return { ensure: ensureMatrix }\n}\n", "import { requestFrame } from '../../core/frame'\nimport { MODEL_EFFORT_DEFAULT, MODEL_EFFORT_FASTER, MODEL_EFFORT_LABEL, MODEL_EFFORT_NONE, MODEL_EFFORT_SMARTER } from '../model/copy-fallbacks'\nimport { copyLabel } from '../../core/i18n'\nimport { createEffortMatrix } from './matrix'\nimport { buildElement, setAttributeIfChanged } from '../../shared/dom'\nimport type { ModelCatalog } from '../model/catalog'\n\n/** One rung of the ladder: the level's id (undefined for the model's own default) and its name. */\ninterface EffortStep {\n id: string | undefined\n name: string\n}\n\n/** The words around the slider. */\ninterface EffortLabels {\n label: string\n faster: string\n smarter: string\n none: string\n}\n\n/**\n * The reasoning-effort slider inside the effort picker's card\n * (packages/client/src/features/effort/effort-picker.ts).\n *\n * The catalog describes a model's reasoning as a discrete ladder\n * (`reasoning.efforts` plus the level in force), and this control draws that\n * ladder as a track: the label carries the level's name, `Faster` / `Smarter`\n * name the direction of travel, and the knob follows the pointer\n * CONTINUOUSLY rather than hopping stop to stop. The value settles only when\n * the gesture ends — release, or the pointer leaving the control — and it\n * settles on the NEAREST level, so dragging never reads as a hard switch\n * between fixed positions.\n *\n * The face of the control follows Claude Desktop's effort slider: a filled\n * portion grows from the left end to the knob, one tick dot marks every\n * stop the ladder offers, and the TOP rung is special — reaching it swaps\n * the plain fill for a dot-matrix (effort/matrix.ts) that twinkles in\n * Claude's Ultracode violet (the grid is solved in whole device pixels,\n * the phases scattered by hash, the entrance swept in from the right, in\n * the manner of the community skin-switcher plugin), tints the knob, and\n * colours the level's name. The violet is the one deliberate exception to\n * the skin's single clay accent, at the user's request.\n *\n * A seat that names no levels (the catalog has not produced a ladder yet)\n * leaves the slider in its empty state: the knob travels the same way and\n * eases back to its resting end, but there is nothing to snap to and\n * nothing to select.\n *\n * The element is built once and never detached (effort-picker.ts): a\n * detach mid-gesture would drop the pointer capture, and a re-insertion\n * restarts its CSS animations.\n *\n * @param opts - `{ read, onPick, onDragStart, onDragEnd }`. `read()` returns\n * the current seat's effort descriptor — the model picker's `effort()`,\n * held over while a selection is in flight — or null,\n * `onPick(levelId)` commits one level — `undefined` is the\n * model's own default level — and `onDragEnd(event)` hears the physical\n * release wherever it lands (the gesture itself may have settled earlier,\n * at the control's edge).\n * @returns `{ el, update, isHeld }`.\n */\nexport function createEffortControl(opts: {\n read: () => ReturnType<ModelCatalog['effort']>\n onPick: (levelId: string | undefined) => void\n onDragStart?: () => void\n onDragEnd?: (event: PointerEvent) => void\n}) {\n const root = buildElement('div', 'dsh-claude-effort')\n const head = buildElement('div', 'dsh-claude-effort-head')\n const labelEl = buildElement('span', 'dsh-claude-effort-label')\n const valueEl = buildElement('span', 'dsh-claude-effort-value')\n /* The outgoing name, absolutely positioned over the value: it takes no\n layout space and never needs removing — the out animation ends at\n opacity 0 and is re-armed on the next swap. */\n const valueGhost = buildElement('span', 'dsh-claude-effort-value-ghost')\n const ends = buildElement('div', 'dsh-claude-effort-ends')\n const fasterEl = buildElement('span', 'dsh-claude-effort-end')\n const smarterEl = buildElement('span', 'dsh-claude-effort-end')\n const track = buildElement('div', 'dsh-claude-effort-track')\n const fill = buildElement('div', 'dsh-claude-effort-fill')\n const ticks = buildElement('div', 'dsh-claude-effort-ticks')\n const matrix = buildElement('div', 'dsh-claude-effort-matrix')\n const knob = buildElement('div', 'dsh-claude-effort-knob')\n\n head.appendChild(labelEl)\n head.appendChild(valueEl)\n head.appendChild(valueGhost)\n ends.appendChild(fasterEl)\n ends.appendChild(smarterEl)\n /* Paint order is DOM order: the fill under the ticks, the matrix over\n both, and the opaque knob on top — it covers whatever it rides over. */\n track.appendChild(fill)\n track.appendChild(ticks)\n track.appendChild(matrix)\n track.appendChild(knob)\n root.appendChild(head)\n root.appendChild(ends)\n root.appendChild(track)\n track.setAttribute('role', 'slider')\n track.setAttribute('tabindex', '0')\n /** The top rung's dot matrix (effort/matrix.ts). */\n const dotMatrix = createEffortMatrix(track, matrix)\n\n /** The ladder in force, the level it is on, and the words around it. */\n let steps: EffortStep[] = []\n let selected = -1\n let live = -1\n /**\n * A press and a drag are two states, not one. `pressed` starts on\n * pointerdown and the knob GLIDES to the press position (the stylesheet's\n * translate transition is still live, so a click on bare track reads as\n * travel rather than a teleport). `dragging` starts on the first move and\n * writes directly, with `data-dragging` switching the transition off so\n * the knob keeps up with the pointer. Setting the drag flag at pointerdown\n * would kill the glide before the browser ever started it: the transition\n * list is read at the next style recalc, by which time the flag is on.\n */\n let pressed = false\n let dragging = false\n /**\n * The PHYSICAL hold: down at pointerdown, up only at the real release.\n * `pressed` ends early when the pointer leaves the control (the gesture\n * settles there), but the picker's hover-close must stand down until the\n * button is up — the card closing mid-hold read as a crash.\n */\n let held = false\n let painted = false\n let pointerId: number | null = null\n /** The dash shown when there is no level to name; cached, not re-read per move. */\n let noneLabel = ''\n /** Whether the top-rung treatment (the matrix) is on. */\n let apexOn = false\n /** The track width the ticks were laid out for, so a late layout re-does them. */\n let ticksWidth = -1\n /**\n * The level just committed, and whether the host has echoed it back yet.\n * The host's catalog snapshot TRAILS the commit — its selection RPC is\n * slow (seconds, on some providers) — so between the release and the echo\n * the snapshot still names the OLD level. Following it there would drag\n * the knob back to where the gesture started, then forward again once the\n * echo lands: the \"bounce\" on release. While this flag is set, update()\n * keeps the knob on the committed level; the echo (or the safety timeout,\n * for a commit that never lands) ends the wait.\n */\n let pendingEcho = false\n let pendingId: string | undefined = undefined\n let pendingTimer = 0\n /** Longest a commit waits for its echo before the host is trusted again.\n Host selections have been measured at up to ~8s on slow providers. */\n const PENDING_ECHO_MS = 12000\n\n /**\n * The ladder as ordered steps, the step in force, and the words. A model\n * with no reasoning (or one whose catalog entry has not loaded) resolves to\n * an empty ladder: the slider is still shown, it just has nothing to\n * select. The catalog may leave out a default level (`defaultEffort` is\n * undefined) — that \"Default\" is a real position on the track, so it leads\n * the steps with an undefined id.\n */\n function state(): { steps: EffortStep[], index: number, labels: EffortLabels } {\n const effort = opts.read()\n const list: EffortStep[] = []\n let index = -1\n if (effort !== null) {\n if (effort.reasoning.defaultEffort === undefined) list.push({ id: undefined, name: MODEL_EFFORT_DEFAULT })\n for (let i = 0; i < effort.reasoning.efforts.length; i++) {\n list.push({ id: effort.reasoning.efforts[i].id, name: effort.reasoning.efforts[i].name })\n }\n index = 0\n for (let s = 0; s < list.length; s++) {\n if (list[s].id === effort.effective) { index = s; break }\n }\n }\n return {\n steps: list,\n index,\n labels: {\n label: copyLabel('effortLabel', MODEL_EFFORT_LABEL),\n faster: copyLabel('effortFaster', MODEL_EFFORT_FASTER),\n smarter: copyLabel('effortSmarter', MODEL_EFFORT_SMARTER),\n none: MODEL_EFFORT_NONE,\n },\n }\n }\n\n /** How wide the knob is, and how far its centre may travel. */\n function geometry() {\n const size = knob.offsetWidth || 16\n return { size, span: Math.max(0, track.clientWidth - size) }\n }\n\n /** The knob's x for one level. No levels (or a single one) rest at the end. */\n function positionFor(index: number) {\n const box = geometry()\n if (index < 0 || steps.length < 2) return box.span\n return (index / (steps.length - 1)) * box.span\n }\n\n /**\n * Move the knob. While the gesture runs this is ONE compositor write:\n * the stylesheet already drops `translate` from the transition for\n * `data-dragging`, so an inline transition dance (and the forced reflow\n * it needs to take effect) would be pure overhead on every pointermove.\n * The inline dance survives only for the rare non-drag instant move (a\n * ladder swap on first paint), where the stylesheet's transition would\n * otherwise animate the jump.\n *\n * The travel goes through the INDIVIDUAL `translate` property, never\n * `transform`: the drag lift is `scale`, and the individual properties\n * compose as translate → scale. Writing the travel into `transform` puts\n * it AFTER the scale in the product, so a 1.1 lift would scale the travel\n * itself (see the stylesheet's note on the knob).\n */\n let lastTravel = ''\n let lastWidth = ''\n\n function place(x: number, animate: boolean) {\n const px = Math.round(x)\n const value = `${px}px`\n /* The fill runs from the track's left end to the knob's centre (+8 is\n half the 16px knob from the stylesheet) and disappears under the\n opaque knob, so its right end is never seen. An empty ladder selects\n nothing, and nothing stays unfilled. */\n const width = steps.length === 0 ? '0px' : `${px + 8}px`\n /* Same-value guard: update() runs on every scheduler pass, and re-writing\n an unchanged position would run the transition dance's forced reflow\n for nothing — worse, mid-glide it cancels the transition and snaps the\n knob to its end. Only a real change touches the DOM. */\n if (value === lastTravel && width === lastWidth) return\n lastTravel = value\n lastWidth = width\n if (animate || dragging) {\n knob.style.translate = value\n fill.style.width = width\n return\n }\n knob.style.transition = 'none'\n fill.style.transition = 'none'\n knob.style.translate = value\n fill.style.width = width\n void knob.offsetWidth\n knob.style.transition = ''\n fill.style.transition = ''\n }\n\n /** Where the pointer sits along the track, in knob-travel units. */\n function pointerTravel(clientX: number) {\n const box = geometry()\n const raw = clientX - track.getBoundingClientRect().left - box.size / 2\n return Math.max(0, Math.min(box.span, raw))\n }\n\n /**\n * How strongly the knob resists leaving a stop, as a fraction of the\n * pointer's speed right at the stop. 0 is pure 1:1 tracking; 0.8 makes the\n * knob creep out of a stop at a FIFTH of the pointer's speed (slope\n * 1 - D at t = 0) and then overtake it mid-segment (slope 1 + D at t = ½,\n * i.e. 1.8×) — a detent you can feel. Must stay below 1: the slope\n * `1 - D·cos(2πt)` would reach zero and the travel would stop being\n * monotone, so the knob could jump backwards.\n */\n const DETENT = 0.8\n\n /**\n * The detent transfer: raw pointer travel → knob travel. Within one\n * segment the knob lags near the ends and catches up in the middle\n * (`t - D·sin(2πt)/2π`), so leaving a stop feels damped while the middle\n * still tracks the pointer. The curve fixes every stop and every midpoint\n * (t = 0, ½, 1 map to themselves) and is monotone, so `nearest()` may keep\n * reading the RAW position: the knob's nearest stop is the pointer's\n * nearest stop either way. Applied on the pointer paths only — settle and\n * the host echo place the knob on a stop, which the curve already fixes.\n */\n function dampTravel(x: number) {\n if (steps.length < 2) return x\n const box = geometry()\n if (box.span === 0) return x\n const seg = box.span / (steps.length - 1)\n const index = Math.floor(x / seg)\n if (index >= steps.length - 1) return x\n const t = (x - index * seg) / seg\n return (index + t - DETENT * Math.sin(2 * Math.PI * t) / (2 * Math.PI)) * seg\n }\n\n /** The level nearest a travel position: the one a release settles on. */\n function nearest(x: number) {\n if (steps.length === 0) return -1\n if (steps.length === 1) return 0\n const box = geometry()\n const ratio = box.span === 0 ? 0 : x / box.span\n return Math.max(0, Math.min(steps.length - 1, Math.round(ratio * (steps.length - 1))))\n }\n\n /**\n * The top rung is the slider's showpiece: reaching it (a settled level or\n * a drag's live position alike) swaps the plain fill for the matrix,\n * tints the knob and colours the level's name. Everything hangs off\n * `data-apex`; the guard keeps the attribute writes — which the\n * scheduler's observer sees — to actual transitions.\n */\n function paintApex(at: number) {\n const want = steps.length > 1 && at === steps.length - 1\n if (want === apexOn) return\n if (want && !dotMatrix.ensure()) return\n apexOn = want\n if (want) root.setAttribute('data-apex', '')\n else root.removeAttribute('data-apex')\n }\n\n /**\n * One tick dot per stop, centred on the stop's resting position. Rebuilt\n * when the ladder changes or the track's width moved out from under the\n * last layout (first paint can run before the picker has its width).\n * The dots carry no state: the fill they share a colour with swallows\n * the passed ones, and the opaque knob swallows the current one.\n */\n function paintTicks() {\n const w = track.clientWidth\n if (!w || w === ticksWidth) return\n ticksWidth = w\n while (ticks.firstChild) ticks.removeChild(ticks.firstChild)\n const box = geometry()\n for (let i = 0; i < steps.length; i++) {\n const dot = buildElement('span', 'dsh-claude-effort-tick')\n dot.style.left = `${Math.round(positionFor(i) + box.size / 2)}px`\n ticks.appendChild(dot)\n }\n }\n\n /**\n * Re-arm a stylesheet animation on one element. The reset must be an\n * !important inline: the rules carry !important (they have to, to outrank\n * the host), and a plain inline 'none' loses that cascade — the restart\n * would be a silent no-op.\n */\n function restartAnimation(el: HTMLElement) {\n el.style.setProperty('animation', 'none', 'important')\n void el.offsetWidth\n el.style.removeProperty('animation')\n }\n\n /**\n * The level's name while the gesture runs, the committed one otherwise.\n * Same-value guard: the write runs per frame while dragging, and an\n * identical textContent assignment still replaces the text node — the\n * resulting mutation would feed the scheduler's observer and keep a full\n * pass running every frame.\n *\n * A real change is a SWAP, not a replacement: the outgoing name is copied\n * into the ghost (which sits exactly where the value sat), the ghost blurs\n * away upward, and the value — now carrying the new name — rises out of a\n * blur from below. Both animations are re-armed on every swap, mid-drag\n * included: a slider whose label changes as the knob crosses a stop reads\n * as a rolling counter, which is the point.\n */\n function paintValue() {\n const at = pressed ? live : selected\n const text = at >= 0 && steps[at] ? steps[at].name : noneLabel\n if (valueEl.textContent !== text) {\n const previous = valueEl.textContent\n if (previous !== '') {\n /* Anchor the ghost where the value sits (offsetLeft is measured\n against the positioned head, and the ghost shares that space). */\n valueGhost.textContent = previous\n valueGhost.style.left = `${valueEl.offsetLeft}px`\n restartAnimation(valueGhost)\n }\n valueEl.textContent = text\n restartAnimation(valueEl)\n }\n paintApex(at)\n }\n\n function paintAria(labels: EffortLabels) {\n noneLabel = labels.none\n // Same-value guards throughout: update() runs on every scheduler pass,\n // and an identical write here (in particular the aria-label, which is\n // in the observer's attributeFilter) re-schedules the next pass — a\n // self-sustaining one-pass-per-frame loop.\n if (labelEl.textContent !== labels.label) labelEl.textContent = labels.label\n if (fasterEl.textContent !== labels.faster) fasterEl.textContent = labels.faster\n if (smarterEl.textContent !== labels.smarter) smarterEl.textContent = labels.smarter\n setAttributeIfChanged(track, 'aria-label', labels.label)\n if (steps.length === 0) {\n root.setAttribute('data-empty', '')\n track.setAttribute('aria-disabled', 'true')\n track.removeAttribute('aria-valuemin')\n track.removeAttribute('aria-valuemax')\n track.removeAttribute('aria-valuenow')\n track.removeAttribute('aria-valuetext')\n return\n }\n const at = Math.max(0, selected)\n root.removeAttribute('data-empty')\n track.removeAttribute('aria-disabled')\n track.setAttribute('aria-valuemin', '0')\n track.setAttribute('aria-valuemax', String(steps.length - 1))\n track.setAttribute('aria-valuenow', String(at))\n track.setAttribute('aria-valuetext', steps[at] ? steps[at].name : '')\n }\n\n /** Drop the wait for the host's echo (echo seen, ladder changed, or timeout). */\n function clearPending() {\n if (pendingTimer !== 0) {\n clearTimeout(pendingTimer)\n pendingTimer = 0\n }\n pendingEcho = false\n pendingId = undefined\n }\n\n /** Commit one level, once: the host is told only when the level moved. */\n function commit(index: number) {\n if (index < 0 || index >= steps.length || index === selected) return\n selected = index\n /* Hold the knob here until the host's snapshot agrees (see pendingEcho). */\n pendingEcho = true\n pendingId = steps[index].id\n if (pendingTimer !== 0) clearTimeout(pendingTimer)\n pendingTimer = setTimeout(clearPending, PENDING_ECHO_MS)\n opts.onPick(steps[index].id)\n }\n\n function releaseCapture() {\n if (pointerId !== null && track.hasPointerCapture(pointerId)) track.releasePointerCapture(pointerId)\n pointerId = null\n }\n\n /** The gesture ends: the knob lands on the nearest level and commits it. */\n function settle() {\n if (!pressed) return\n if (moveQueued) {\n // Land the still-pending position first, so the release settles on\n // where the pointer actually is rather than one event behind.\n if (cancelPendingFrame !== null) cancelPendingFrame()\n moveQueued = false\n cancelPendingFrame = null\n applyPending()\n if (!pressed) return\n }\n pressed = false\n dragging = false\n root.removeAttribute('data-dragging')\n releaseCapture()\n const index = live\n live = -1\n /* Commit FIRST, then paint ONCE on the committed level. Painting before\n the commit read the OLD `selected`: the name went back to the level\n the gesture started from (replaying its blur-in), and the apex\n attribute flipped off and on, which hid the matrix and restarted its\n entrance sweep — a visible double take on every release. */\n commit(index)\n place(positionFor(selected), true)\n paintValue()\n }\n\n /**\n * The physical release, wherever it lands: after a boundary settle the\n * track's own pointerup only arrives while the capture holds, so the end\n * of the hold is heard on the document — capture phase, so a host\n * handler's stopPropagation cannot steal it. This fires BEFORE the\n * track's bubble-phase pointerup (settle), which is safe: the close it\n * may cause only flips data-open, the commit below proceeds regardless.\n */\n function onHeldRelease(e: PointerEvent) {\n if (e.pointerId !== pointerId) return\n held = false\n document.removeEventListener('pointerup', onHeldRelease, true)\n document.removeEventListener('pointercancel', onHeldRelease, true)\n if (typeof opts.onDragEnd === 'function') opts.onDragEnd(e)\n }\n\n function onPointerDown(e: PointerEvent) {\n if (e.button !== 0) return\n e.preventDefault()\n e.stopPropagation()\n painted = true\n pointerId = e.pointerId\n held = true\n document.addEventListener('pointerup', onHeldRelease, true)\n document.addEventListener('pointercancel', onHeldRelease, true)\n track.setPointerCapture(e.pointerId)\n if (typeof opts.onDragStart === 'function') opts.onDragStart()\n const x = pointerTravel(e.clientX)\n /* Glide to the press position. The drag state (and with it the\n transition-off flag) only starts on the first MOVE — see the flags'\n note: setting it here would suppress the very transition that makes\n this read as travel. */\n pressed = true\n place(dampTravel(x), true)\n live = nearest(x)\n paintValue()\n }\n\n /**\n * The gesture's latest pointer position. pointermove fires faster than\n * frames render; the event stores the position and ONE animation-frame\n * callback applies it — reads first (boundary box, travel geometry),\n * writes after (one transform + the level name) — so the drag costs one\n * layout flush per frame instead of one forced reflow per event.\n */\n let cancelPendingFrame: (() => void) | null = null\n let moveQueued = false\n let pendingX = 0\n let pendingY = 0\n\n function applyPending() {\n if (!pressed) return\n const box = root.getBoundingClientRect()\n // Leaving the control ends the gesture where it stands — the knob\n // settles on the nearest level instead of trailing the pointer away.\n if (pendingX < box.left - 6 || pendingX > box.right + 6 || pendingY < box.top - 6 || pendingY > box.bottom + 6) {\n settle()\n return\n }\n const x = pointerTravel(pendingX)\n place(dampTravel(x), false)\n live = nearest(x)\n paintValue()\n }\n\n function onPointerMove(e: PointerEvent) {\n if (!pressed) return\n if (!dragging) {\n // The pointer is moving: the gesture is a drag now, so the knob must\n // follow it without easing.\n dragging = true\n root.setAttribute('data-dragging', '')\n }\n pendingX = e.clientX\n pendingY = e.clientY\n if (moveQueued) return\n moveQueued = true\n cancelPendingFrame = requestFrame({\n write() {\n moveQueued = false\n cancelPendingFrame = null\n applyPending()\n },\n })\n }\n\n track.addEventListener('pointerdown', onPointerDown)\n track.addEventListener('pointermove', onPointerMove)\n track.addEventListener('pointerup', () => { settle() })\n track.addEventListener('pointercancel', () => { settle() })\n track.addEventListener('keydown', e => {\n if (steps.length === 0) return\n const base = selected < 0 ? 0 : selected\n let next = base\n if (e.key === 'ArrowLeft' || e.key === 'ArrowDown') next = Math.max(0, base - 1)\n else if (e.key === 'ArrowRight' || e.key === 'ArrowUp') next = Math.min(steps.length - 1, base + 1)\n else if (e.key === 'Home') next = 0\n else if (e.key === 'End') next = steps.length - 1\n else return\n e.preventDefault()\n e.stopPropagation()\n commit(next)\n place(positionFor(next), true)\n paintAria(state().labels)\n paintValue()\n })\n\n /**\n * Re-point the control at the model in force. The ladder is rebuilt only\n * when the levels themselves change; the knob is only animated when the\n * selected level moved on its own (the host echoing a selection back).\n */\n function update() {\n const next = state()\n let changed = next.steps.length !== steps.length\n if (!changed) {\n for (let i = 0; i < next.steps.length; i++) {\n if (next.steps[i].id !== steps[i].id) { changed = true; break }\n }\n }\n if (changed) {\n steps = next.steps.slice()\n ticksWidth = -1\n /* A different ladder is a different question; the old commit's echo\n will never come. */\n clearPending()\n }\n /* The echo test: the snapshot now names the level we committed. */\n if (pendingEcho && next.index >= 0 && next.steps[next.index] !== undefined && next.steps[next.index].id === pendingId) {\n clearPending()\n }\n if (!pressed && !pendingEcho) {\n const moved = painted && !changed && selected !== next.index\n selected = next.index\n place(positionFor(selected), moved)\n painted = true\n }\n paintTicks()\n paintAria(next.labels)\n paintValue()\n }\n\n return {\n el: root,\n update,\n // The picker's hover-close guard keys on the PHYSICAL hold: from\n // pointerdown until the real release, wherever it lands. `pressed`\n // ends earlier — at the boundary settle — which is exactly when the\n // pointer is on its way out of the card.\n isHeld() { return held },\n }\n}\n", "import { AUTO_POPOVER_ALL } from '../../constants'\nimport { MODEL_EFFORT_LABEL } from '../model/copy-fallbacks'\nimport { copyLabel } from '../../core/i18n'\nimport { readPrefs } from '../../core/prefs'\nimport { createEffortControl } from './control'\nimport type { HostContext } from '../../core/host'\nimport type { CloseReason } from '../../core/scheduler'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './effort-picker.manifest'\nimport type { ModelCatalog } from '../model/catalog'\nimport { setAttributeIfChanged } from '../../shared/dom'\nimport { POPOVER_CLOSE_DELAY, POPOVER_OPEN_DELAY, closeOtherPopovers, createHoverIntent, positionAnchoredPopover, registerPopover, removeStrayNodes, setMenuPopoverOpen, unregisterPopover } from '../../shared/popover'\n\n/**\n * The reasoning-effort picker: its own seat trigger and its own card.\n *\n * The level and the model are two decisions with two different cadences — the\n * model changes rarely, the level is nudged often — so the level owns a trigger\n * of its own beside the model's, and a card of its own. The model card keeps\n * only the model list and the More-models row.\n *\n * Everything else follows the model picker's discipline: the trigger is\n * created once and reused, the card is a fixed-position sibling on <body>,\n * hover opens it under the \"all\" scope and click does so otherwise, and the\n * slider element is NEVER detached once built — re-inserting it restarts its\n * CSS animations (the name's blur-in, the apex matrix's entrance sweep) and\n * reads as a flicker on every host round-trip.\n *\n * @param ctx - the plugin context (unused; kept for the installer shape).\n * @param ui - the shared UI registry. `ui.model` provides the seat element\n * (`seat()`), the model trigger (`trigger()`), the catalog's state\n * (`effort()`, `named()`, `settled()`), the commit call (`pickEffort()`)\n * and `close()`.\n * @returns a teardown function.\n */\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n let effortBtn: HTMLButtonElement | null = null\n let effortPop: HTMLElement | null = null\n let effortSlider: ReturnType<typeof createEffortControl> | null = null\n /**\n * The last ladder the seat named. A selection makes the host re-enumerate\n * the whole directory for seconds, and the snapshot can go blank in that\n * window — the trigger must not vanish and the knob must not fall into its\n * empty state just because the answer is in flight. Only a SETTLED seat\n * that names no ladder takes the trigger away.\n */\n let lastEffort: ReturnType<ModelCatalog['effort']> = null\n const effortHoverIntent = createHoverIntent(\n () => { openEffortPopover() },\n () => { closeEffortPopover() },\n POPOVER_OPEN_DELAY,\n POPOVER_CLOSE_DELAY\n )\n\n /** What the catalog currently says about the seat's ladder. */\n function effortInfo() {\n return typeof ui.model?.effort === 'function' ? ui.model.effort() : null\n }\n\n /** True while the catalog cannot name the seat (a selection in flight). */\n function seatInFlight() {\n return typeof ui.model?.settled === 'function' && !ui.model.settled()\n }\n\n /**\n * The ladder to draw: the catalog's when it has one, otherwise the last one\n * it named — but only while the seat is in flight. A settled seat with no\n * ladder returns null, which is the control's empty state.\n */\n function readEffort() {\n const info = effortInfo()\n if (info !== null) {\n lastEffort = info\n return info\n }\n return seatInFlight() ? lastEffort : null\n }\n\n /** The host slot the seat lives in (owned by the model picker). */\n function seat() {\n return typeof ui.model?.seat === 'function' ? ui.model.seat() : null\n }\n\n /** The model trigger this one sits beside (owned by the model picker), or null. */\n function modelTrigger() {\n return typeof ui.model?.trigger === 'function' ? ui.model.trigger() : null\n }\n\n /**\n * Hand back the room this trigger reserves on the model trigger's right\n * edge (see positionEffortTrigger), or the gap outlives the trigger.\n */\n function releaseModelMargin() {\n const modelBtn = modelTrigger()\n if (modelBtn !== null && modelBtn.style.marginRight !== '') modelBtn.style.marginRight = ''\n }\n\n function cancelCloseEffort() {\n effortHoverIntent.cancel()\n }\n\n function closeEffortPopover() {\n effortHoverIntent.cancel()\n if (effortPop !== null) setMenuPopoverOpen(effortPop, false, effortBtn)\n }\n\n function openEffortPopover() {\n effortHoverIntent.cancel()\n ensureEffortChrome()\n // One card at a time: the model trigger sits beside this one, so leaving\n // its card up would stack two panels over the same corner.\n closeOtherPopovers('effort')\n if (effortSlider !== null) effortSlider.update()\n positionEffortPopover()\n if (effortPop !== null) setMenuPopoverOpen(effortPop, true, effortBtn)\n }\n\n function positionEffortPopover() {\n if (effortBtn === null || effortPop === null) return\n positionAnchoredPopover(effortBtn, effortPop, { side: 'above', gap: 6 })\n }\n\n /** The measurements behind the trigger's placement, as of the last positioning. */\n const effortPlace = { left: -1, top: -1, need: 0, widthLabel: '', height: 0 }\n\n /** Pin the body-mounted trigger beside the model trigger (every pass: the\n * seat moves with the window and the composer's own growth). The label is\n * read off the button so the reposition hook gets the same cache the sync\n * pass does. */\n function positionEffortTrigger() {\n if (effortBtn === null) return\n const modelBtn = modelTrigger()\n if (modelBtn === null) {\n effortBtn.style.display = 'none'\n return\n }\n // The row's own rhythm is the 12px flex gap (8px in narrow cards) the\n // host puts between the trailing cluster's children: sit 2px past the\n // model trigger, and with its 8px right padding and this trigger's 2px\n // left padding the two texts land 12px apart — the same 12 the meter's\n // ring (8px into its pill) and the send icon then keep. The model\n // trigger is OUR element, so the effort picker reserves room for itself\n // on its right edge (a margin on it shifts the trigger left, out from\n // under the context meter / send button) and then sits in that reserved\n // space: the row's 12px gap covers 12 of the needed width+2, the margin\n // covers the rest. Measured, not a magic number: the width follows the\n // current level's name.\n // A seat the host keeps in the DOM without laying it out (another view is\n // up, or an ancestor is hidden) reports a zero box; pinning to it put the\n // trigger in the window's top-left corner. No box, no trigger.\n const seatBox = modelBtn.getBoundingClientRect()\n if (seatBox.width === 0 || seatBox.height === 0) {\n hideEffortTrigger()\n return\n }\n // Show it BEFORE measuring: a trigger coming back from the hidden state\n // (its seat returned) would otherwise read offsetWidth 0, reserve no\n // room for that one pass and overlap the control that follows.\n if (effortBtn.style.display !== 'inline-flex') effortBtn.style.display = 'inline-flex'\n // The trigger's size follows its label: re-measure only when it moved\n // (offsetWidth/offsetHeight force a layout the pass would rather not pay).\n const labelEl = effortBtn.querySelector('.dsh-claude-effort-btn-label')\n const label = labelEl === null ? '' : labelEl.textContent\n if (label !== effortPlace.widthLabel) {\n effortPlace.widthLabel = label\n effortPlace.need = Math.max(0, effortBtn.offsetWidth - 6)\n effortPlace.height = effortBtn.offsetHeight\n }\n const need = effortPlace.need\n const marginChanged = modelBtn.style.marginRight !== `${need}px`\n if (marginChanged) modelBtn.style.marginRight = `${need}px`\n // An unchanged margin leaves the box at the seatBox just read: a second\n // getBoundingClientRect after the write would force a reflow for the\n // same numbers every pass.\n const shifted = marginChanged ? modelBtn.getBoundingClientRect() : seatBox\n const left = Math.round(shifted.right + 2)\n const top = Math.round(shifted.top + (shifted.height - effortPlace.height) / 2)\n if (left !== effortPlace.left) {\n effortPlace.left = left\n effortBtn.style.left = `${left}px`\n }\n if (top !== effortPlace.top) {\n effortPlace.top = top\n effortBtn.style.top = `${top}px`\n }\n }\n\n /** The slider, built once; the card holds this node for its whole life. */\n function effortControlElement() {\n if (effortSlider === null) {\n effortSlider = createEffortControl({\n read: readEffort,\n onPick(levelId) {\n if (typeof ui.model?.pickEffort === 'function') ui.model.pickEffort(levelId)\n },\n // A drag must not be cut short by the hover-close timer: the pointer\n // is inside the control the whole time.\n onDragStart: cancelCloseEffort,\n // ...and a hold that leaves the card closes it on the RELEASE, not\n // at the boundary crossing (the mouseleave guard stands down while\n // the button is held; this is the other half).\n onDragEnd(e) {\n if (effortPop === null || effortPop.getAttribute('data-open') !== 'true') return\n const under = e && typeof e.clientX === 'number' ? document.elementFromPoint(e.clientX, e.clientY) : null\n if (under !== null && effortPop.contains(under)) return\n closeEffortPopover()\n },\n })\n }\n return effortSlider.el\n }\n\n /**\n * Build (or re-find) the trigger and the card. Idempotence guards, not\n * null checks: client HMR drops the previous generation's disposals, so a\n * stale trigger or card can still be in the document while this scope\n * starts from null. The model picker sweeps its own strays the same way.\n */\n function ensureEffortChrome() {\n const slot = seat()\n if (slot !== null) removeStrayNodes(slot, '.dsh-claude-effort-btn', [effortBtn])\n removeStrayNodes(document, 'body > .dsh-claude-effort-popover', [effortPop])\n if (effortPop === null || effortPop.parentElement === null) {\n effortPop = document.createElement('div')\n effortPop.className = 'dsh-claude-popover-card dsh-claude-effort-popover'\n setMenuPopoverOpen(effortPop, false)\n effortPop.addEventListener('mouseenter', cancelCloseEffort)\n effortPop.addEventListener('mouseleave', () => {\n // A hold must not be cut short by the hover-close timer: the\n // slider settles at its own edge while the pointer travels on\n // with the button down, and the card closing mid-hold read as a\n // crash. A release OUTSIDE the card closes it (onDragEnd).\n if (effortSlider !== null && effortSlider.isHeld()) return\n effortHoverIntent.scheduleClose()\n })\n document.body.appendChild(effortPop)\n }\n // Append the slider only when it is not already the card's child: a\n // detach/re-append would restart its animations (see the header note).\n const control = effortControlElement()\n if (control.parentElement !== effortPop) effortPop.appendChild(control)\n }\n\n /**\n * Take the body-mounted trigger down with its seat. It is removed rather\n * than hidden: the stylesheet pins `display: inline-flex` with !important,\n * which beats an inline `display: none`, so a hidden trigger stayed on\n * screen at its last coordinates after the seat lost its box (the\n * trajectory and context views) or went away with the composer. The model\n * trigger's reserved margin goes back with it, and so does every value\n * the placement caches: the replacement is a new node.\n */\n function hideEffortTrigger() {\n // The next trigger is a NEW node, so the placement cache starts over.\n // A left/top left behind here is a value the new node never received:\n // the same-value guards below would skip both writes and the trigger\n // would sit at its static position, the end of the document.\n effortPlace.widthLabel = ''\n effortPlace.left = -1\n effortPlace.top = -1\n if (effortBtn !== null) {\n if (effortBtn.parentElement !== null) effortBtn.parentElement.removeChild(effortBtn)\n effortBtn = null\n }\n releaseModelMargin()\n closeEffortPopover()\n }\n\n /** Re-point the trigger and the slider at the seat in force (every pass). */\n function syncEffortControl() {\n const slot = seat()\n // No seat to sit beside, or no model trigger to attach to: the trigger\n // comes down (see hideEffortTrigger).\n if (slot === null || modelTrigger() === null) {\n hideEffortTrigger()\n return\n }\n // Never take the trigger away on an in-flight catalog: that is the\n // \"selector crashed\" report — a pick blanks the snapshot for seconds and\n // the trigger (with its open card) disappeared with it.\n if (seatInFlight()) {\n if (effortSlider !== null) effortSlider.update()\n return\n }\n const info = effortInfo()\n if (info === null) {\n // A catalog that cannot name the seat (the current selection is not in\n // its snapshot yet) has said nothing about that seat's levels: the\n // trigger stays as it is, the way the in-flight branch above keeps it.\n // Only a named model without a ladder takes it away.\n if (typeof ui.model?.named === 'function' && !ui.model.named()) return\n // No ladder on this seat: the trigger goes away with it, exactly as the\n // model card drew no effort row for such a model.\n hideEffortTrigger()\n return\n }\n ensureEffortChrome()\n if (effortBtn === null || effortBtn.parentElement !== document.body) {\n if (effortBtn !== null && effortBtn.parentElement !== null) effortBtn.parentElement.removeChild(effortBtn)\n effortBtn = document.createElement('button')\n effortBtn.type = 'button'\n effortBtn.className = 'dsh-claude-effort-btn'\n effortBtn.setAttribute('aria-haspopup', 'menu')\n effortBtn.innerHTML = '<span class=\"dsh-claude-effort-btn-label\"></span>'\n // Same contract as the model trigger: hover under the \"All\" scope,\n // click-only otherwise.\n effortBtn.addEventListener('mouseenter', () => {\n if (readPrefs().autoPopover === AUTO_POPOVER_ALL) effortHoverIntent.scheduleOpen()\n })\n effortBtn.addEventListener('mouseleave', () => {\n if (readPrefs().autoPopover === AUTO_POPOVER_ALL) effortHoverIntent.scheduleClose()\n })\n effortBtn.addEventListener('click', e => {\n e.stopPropagation()\n if (effortPop !== null && effortPop.getAttribute('data-open') === 'true') closeEffortPopover()\n else openEffortPopover()\n })\n // NOT inside the seat slot: that subtree is React-managed, and no foreign\n // node may be inserted into it. The button lives on <body> like the card\n // and is pinned beside the model trigger on every pass instead.\n document.body.appendChild(effortBtn)\n }\n // Same-value guards: sync runs on every scheduler pass, and an identical\n // write still mutates the DOM (textContent replaces the text node;\n // setAttribute queues a record the scheduler's observer sees).\n const labelEl = effortBtn.querySelector('.dsh-claude-effort-btn-label')\n if (labelEl !== null && labelEl.textContent !== info.label) labelEl.textContent = info.label\n const aria = `${copyLabel('effortLabel', MODEL_EFFORT_LABEL)} ${info.label}`\n setAttributeIfChanged(effortBtn, 'aria-label', aria)\n if (effortSlider !== null) effortSlider.update()\n positionEffortTrigger()\n\n if (effortPop !== null && effortPop.getAttribute('data-open') === 'true') positionEffortPopover()\n }\n\n function ownsEffort(target: Node) {\n if (!target) return false\n return (effortBtn !== null && effortBtn.contains(target)) ||\n (effortPop !== null && effortPop.contains(target))\n }\n\n function teardown() {\n effortHoverIntent.cancel()\n if (effortBtn !== null && effortBtn.parentElement !== null) effortBtn.parentElement.removeChild(effortBtn)\n if (effortPop !== null && effortPop.parentElement !== null) effortPop.parentElement.removeChild(effortPop)\n effortBtn = null\n effortPop = null\n effortSlider = null\n effortPlace.left = -1\n effortPlace.top = -1\n effortPlace.widthLabel = ''\n releaseModelMargin()\n unregisterPopover('effort')\n }\n\n registerPopover('effort', closeEffortPopover)\n\n ui.effort = {\n sync: syncEffortControl,\n /**\n * The effort card closes on an outside press and on Esc. Composer focus\n * is NOT one of its dismiss routes (the model picker closes there, this\n * one does not), so that reason is ignored.\n */\n close(reason?: CloseReason) {\n if (reason === 'composer') return\n closeEffortPopover()\n },\n owns: ownsEffort,\n /**\n * The trigger is JS-pinned beside the model trigger, so a viewport or\n * composer-card change has to re-pin it in the SAME frame as the CSS\n * reflow. The scheduler calls this on resize / scroll (and on a card\n * resize); without it the pin waited for the next pass and visibly\n * trailed the controls it sits between.\n */\n reposition() {\n positionEffortTrigger()\n positionEffortPopover()\n },\n teardown,\n }\n return teardown\n}\n", "import { AUTO_POPOVER_ALL, HERO_MENU_ATTR } from '../../constants'\nimport { MENU_ROLE_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport { readPrefs } from '../../core/prefs'\nimport { closestFrom, createStamp } from '../../shared/dom'\nimport { POPOVER_CLOSE_DELAY, POPOVER_OPEN_DELAY, closeOtherPopovers, createHoverIntent, registerPopover, resolveAnchoredPosition, unregisterPopover } from '../../shared/popover'\nimport type { HostContext } from '../../core/host'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './hero-menu.manifest'\n\n/**\n * The hero row's two pickers — the workspace (directory) chip and the\n * agent-preset seat — both open the host's shared menu primitive, which\n * portals its card to <body>. That card carries no marker of its own, so a\n * stylesheet cannot tell it apart from the host's other menus (sidebar row\n * menus, the settings permission row, submenus) — and it has to: this skin\n * redraws these two and leaves the rest alone.\n *\n * So the browser half stamps the open card rather than guessing in CSS.\n * While either trigger reports `aria-expanded=\"true\"`, the one host menu\n * sitting in <body> is that card; HERO_MENU_ATTR is what\n * features/hero-menu/hero-menu.css switches on, and its value (`workspace` or\n * `preset`) names the picker, since the two cards are drawn differently.\n *\n * The scheduler's attributeFilter does not watch `aria-expanded`, but the\n * card is inserted into <body> as it opens — a childList mutation the pass\n * already observes — so the stamp lands on the frame the menu appears. Two\n * candidates mean an unrelated menu is open as well: the pass then leaves\n * every card alone rather than stamping the wrong one.\n *\n * The host drops that card below its trigger, which is exactly where the\n * composer sits: it would land on the input area and on the controls in it.\n * This row sits above the composer, so the card is placed the way the skin's\n * own composer pickers sit on their triggers — right-aligned with the\n * trigger and opening upward, flipped below it only when the viewport leaves\n * no room above. The host re-places the card from its own geometry on every\n * frame while the card is open, and an inline `left` / `top` written here\n * would live only until the host's next frame. The position therefore\n * travels in two custom properties, which the host's style writes never\n * touch, and\n * features/hero-menu/hero-menu.css reads them with `!important`: an author\n * `!important` declaration outranks the host's plain inline value, so the\n * card holds this position from the pass that stamps it onward. The\n * scheduler's scroll/resize hook re-applies it when the anchor moves.\n *\n * Hover is the host's own click handler driven from here: the \"Open popovers\n * on hover\" preference's `all` scope covers these two, and the host offers no\n * hover of its own. The listeners are delegated from the document because\n * React replaces the triggers, and the close waits out the gap between the\n * trigger and the card so crossing it does not shut the menu.\n */\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n /** Air between the trigger and its card, as the skin's other pickers take. */\n const GAP = 6\n /** The two triggers, and the card once it is stamped. */\n const TRIGGER_SELECTOR = '[class*=\"heroWorkspaceRow\"] [aria-haspopup=\"menu\"]'\n const CARD_SELECTOR = `[${HERO_MENU_ATTR}]`\n /** The open card, marked with the picker it belongs to, and the trigger it was stamped for. */\n const cardStamp = createStamp<HTMLElement>(HERO_MENU_ATTR)\n let stampedTrigger: HTMLElement | null = null\n let openedByHover = false\n /** The trigger the hover opened. The row has TWO of them (workspace, preset). */\n let hoverTrigger: HTMLElement | null = null\n /** The hero trigger the pointer last entered: the picker a click just used. */\n let pointerTrigger: HTMLElement | null = null\n /** The trigger a scheduled hover open clicks when its dwell runs out. */\n let pendingTrigger: HTMLElement | null = null\n /**\n * The hover dwell and grace, shared with the skin's own pickers: the dwell\n * swallows a pointer merely crossing the hero row, the grace lets it\n * travel the gap between the trigger and the card.\n */\n const hoverIntent = createHoverIntent(\n () => {\n const trigger = pendingTrigger\n pendingTrigger = null\n if (trigger !== null) openFromHover(trigger)\n },\n () => { closeFromHover() },\n POPOVER_OPEN_DELAY,\n POPOVER_CLOSE_DELAY,\n )\n\n /**\n * Open what hover asked for, once the pointer has stayed the dwell out.\n * The host's menu has no hover of its own — this clicks its trigger — so\n * the dwell is what keeps a pointer merely crossing the hero row from\n * unfolding the card.\n */\n function openFromHover(trigger: HTMLElement) {\n if (!hoverEnabled()) return\n if (trigger.getAttribute('aria-expanded') === 'true') return\n // One card at a time. The row carries two pickers — the workspace chip and\n // the preset seat — and they are two independent host menus, while the\n // shared registry holds ONE entry for the row. The sibling therefore has\n // to be folded here: crossing from the preset straight to the workspace\n // chip left both cards up, and syncHeroMenu (which stamps and places a\n // single card) then placed neither.\n closeSiblingHeroMenus(trigger)\n closeOtherPopovers('hero')\n trigger.click()\n openedByHover = true\n hoverTrigger = trigger\n }\n\n /**\n * Close every open hero menu, whatever opened it — a hover or a click. The\n * shared popover rule calls this when another popover opens; the hover-leave\n * path comes through closeFromHover below, which closes only what hover\n * opened.\n */\n function closeHeroMenu() {\n hoverIntent.cancel()\n pendingTrigger = null\n openedByHover = false\n hoverTrigger = null\n const open = openTriggers()\n for (let i = 0; i < open.length; i++) open[i].click()\n }\n\n /** Close what hover opened; a click-opened menu is left alone. */\n function closeFromHover() {\n if (!openedByHover) return\n const trigger = hoverTrigger\n openedByHover = false\n hoverTrigger = null\n if (trigger === null || trigger.getAttribute('aria-expanded') !== 'true') return\n trigger.click()\n }\n\n /**\n * The row's other open picker, folded so only one card can be up. The list\n * is read before the first press: a press re-renders the host's row, and a\n * node it replaced answers no click anyway.\n */\n function closeSiblingHeroMenus(trigger: HTMLElement) {\n const open = openTriggers()\n for (let i = 0; i < open.length; i++) {\n if (open[i] !== trigger) open[i].click()\n }\n }\n\n /** The `all` scope only, and only while the composer restyle is in play. */\n function hoverEnabled() {\n return readPrefs().autoPopover === AUTO_POPOVER_ALL &&\n ui.composer !== undefined && ui.composer.isActive()\n }\n\n function onHeroPointerOver(e: MouseEvent) {\n if (!hoverEnabled()) return\n const target = e.target\n if (closestFrom(target, CARD_SELECTOR) !== null) {\n hoverIntent.cancel()\n return\n }\n const trigger = closestFrom(target, TRIGGER_SELECTOR)\n if (trigger === null) return\n pointerTrigger = trigger\n hoverIntent.cancel()\n if (trigger.getAttribute('aria-expanded') !== 'true') {\n pendingTrigger = trigger\n hoverIntent.scheduleOpen()\n }\n }\n\n function onHeroPointerOut(e: MouseEvent) {\n if (!hoverEnabled()) return\n const target = e.target\n if (closestFrom(target, CARD_SELECTOR) === null && closestFrom(target, TRIGGER_SELECTOR) === null) return\n // Moving onto the other half — the card, or the trigger — is not a leave.\n const next = e.relatedTarget\n if (closestFrom(next, CARD_SELECTOR) !== null || closestFrom(next, TRIGGER_SELECTOR) !== null) return\n pendingTrigger = null\n hoverIntent.scheduleClose()\n }\n\n document.addEventListener('mouseover', onHeroPointerOver, true)\n document.addEventListener('mouseout', onHeroPointerOut, true)\n\n /**\n * Which picker a trigger opens, written as the stamp's value so the\n * stylesheet can draw the two cards apart. The workspace chip is the\n * button carrying the host's workspace label; the composer card's own\n * workspace trigger opens that same picker; anything else in the row is\n * the agent-preset seat.\n */\n function pickerKind(trigger: HTMLElement) {\n if (trigger.querySelector('[class*=\"_workspaceLabel\"]') !== null) return 'workspace'\n if (closestFrom(trigger, '[class*=\"cardWorkspaceTrigger\"]') !== null) return 'workspace'\n return 'preset'\n }\n\n function clearStamp() {\n cardStamp.release()\n stampedTrigger = null\n }\n\n /** The hero row's open pickers: the workspace chip and the preset seat. */\n function rowTriggers() {\n const nodes = document.querySelectorAll<HTMLElement>('[class*=\"heroWorkspaceRow\"] [aria-haspopup=\"menu\"][aria-expanded=\"true\"]')\n const found: HTMLElement[] = []\n for (let i = 0; i < nodes.length; i++) found.push(nodes[i])\n return found\n }\n\n /**\n * The open pickers, one entry each. The composer card's own workspace trigger\n * is a SECOND view of the same picker state as the row's chip (both read the\n * host's `pickerOpen`), so it stands in only when the row carries no open\n * picker: pressing both views in one task toggles the picker shut and open\n * again.\n */\n function openTriggers() {\n const row = rowTriggers()\n if (row.length > 0) return row\n const card = document.querySelector<HTMLElement>('[class*=\"cardWorkspaceTrigger\"] [aria-expanded=\"true\"]')\n return card === null ? [] : [card]\n }\n\n /** The trigger whose picker is open, or null. */\n function openTrigger() {\n const open = openTriggers()\n return open.length === 0 ? null : open[0]\n }\n\n /**\n * Park the card on its trigger: right-aligned with it and opening above it\n * by the same air the skin's own pickers take, flipped below when the\n * viewport leaves no room above, and clamped to the viewport either way.\n * A card that has not been laid out yet is left for the next pass rather\n * than pinned to a zero-sized guess.\n */\n function placeCard(trigger: HTMLElement, card: HTMLElement) {\n const rect = trigger.getBoundingClientRect()\n const width = card.offsetWidth\n const height = card.offsetHeight\n if (width === 0 || height === 0) return\n // The shared above-anchor geometry; the answer goes into custom\n // properties the host's own per-frame style writes never touch (see\n // the header note).\n const { x, y } = resolveAnchoredPosition(rect, width, height, { gap: GAP })\n card.style.setProperty('--dsh-claude-hero-menu-x', `${Math.round(x)}px`)\n card.style.setProperty('--dsh-claude-hero-menu-y', `${Math.round(y)}px`)\n }\n\n /** Re-place an open card after a scroll or a resize moved its anchor. */\n function repositionHeroMenu() {\n const card = cardStamp.current()\n if (card === null || stampedTrigger === null) return\n placeCard(stampedTrigger, card)\n }\n\n function syncHeroMenu() {\n const trigger = openTrigger()\n if (trigger === null) {\n // The menu is shut — by a click, by Escape or by an outside press — so\n // whatever hover opened it no longer owns it.\n openedByHover = false\n hoverTrigger = null\n hoverIntent.cancel()\n clearStamp()\n return\n }\n // Both of the row's pickers being open at once — a click on the second\n // trigger is enough — is the state this feature exists to prevent, and\n // with two cards up neither can be stamped or placed. The picker the\n // pointer is on stays (a click on it is the newest intent), the row's\n // other pickers fold. The hover path never arrives here: openFromHover\n // folds the sibling before it presses.\n const open = openTriggers()\n if (open.length > 1) {\n closeSiblingHeroMenus(pointerTrigger !== null && open.includes(pointerTrigger) ? pointerTrigger : trigger)\n clearStamp()\n return\n }\n // The skin's own popovers carry their own classes, so excluding them\n // leaves the host's menus only.\n const cards = document.querySelectorAll<HTMLElement>(`body > ${MENU_ROLE_SELECTOR}:not([class*=\"dsh-claude\"])`)\n if (cards.length !== 1) {\n clearStamp()\n return\n }\n if (cardStamp.current() !== cards[0]) stampedTrigger = trigger\n cardStamp.mark(cards[0], pickerKind(trigger))\n placeCard(trigger, cards[0])\n }\n\n // The hero row's two host menus take part in the shared popover rule\n // (shared/popover.ts): the entry closes whatever menu the row has open,\n // however that menu was opened.\n registerPopover('hero', closeHeroMenu)\n\n ui.heroMenu = { sync: syncHeroMenu, reposition: repositionHeroMenu }\n return () => {\n hoverIntent.cancel()\n openedByHover = false\n hoverTrigger = null\n pointerTrigger = null\n clearStamp()\n unregisterPopover('hero')\n document.removeEventListener('mouseover', onHeroPointerOver, true)\n document.removeEventListener('mouseout', onHeroPointerOut, true)\n delete ui.heroMenu\n }\n}\n", "import { MODEL_OFFICIAL_GROUP } from '../model/copy-fallbacks'\nimport { settingsCopy } from '../../core/i18n'\nimport { readPrefs } from '../../core/prefs'\nimport { buildElement } from '../../shared/dom'\nimport { POPOVER_CHECK_SVG, buildPopoverItem, closeOtherPopovers, positionAnchoredPopover, registerPopover, setMenuPopoverOpen, unregisterPopover } from '../../shared/popover'\nimport type { HostContext } from '../../core/host'\nimport type { CloseReason, FeatureHandle } from '../../core/scheduler'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './quick-providers.manifest'\nimport type { CatalogProvider } from '../model/catalog'\n\n/** Writes the chosen provider ids back to the preferences. */\ntype QuickProvidersWrite = (next: string[]) => void\n\n/** The quick-provider picker's handle: the settings row opens and closes the card through it. */\nexport interface QuickProvidersHandle extends FeatureHandle {\n toggle(trigger: HTMLElement, write: QuickProvidersWrite): void\n isOpen(): boolean\n}\n\n/**\n * The settings page's quick-provider picker — the providers whose models the\n * model picker's first level carries.\n *\n * It is the permission popover's design in multi-select form: the shared\n * popover card and rows (shared/popover.css), with the accent check marking\n * the chosen providers. It is a\n * settings control rather than a takeover, so it opens on click only —\n * hovering a settings row should not unfold a menu — and it stays open while\n * rows are toggled.\n *\n * The card is appended to <body> rather than rendered inside the settings row:\n * a dialog clips and may transform its own subtree, so a `position: fixed`\n * card in there would be positioned against the dialog, not the viewport.\n */\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n let card: HTMLElement | null = null\n let cardBody: HTMLElement | null = null\n let anchor: HTMLElement | null = null\n let onWrite: QuickProvidersWrite | null = null\n let providers: CatalogProvider[] = []\n let unsubscribe: (() => void) | null = null\n\n function close() {\n if (card !== null && card.parentElement) card.parentElement.removeChild(card)\n if (anchor !== null) anchor.setAttribute('aria-expanded', 'false')\n card = null\n cardBody = null\n anchor = null\n onWrite = null\n document.removeEventListener('pointerdown', onOutsidePointerDown, true)\n document.removeEventListener('keydown', onKeyDown, true)\n }\n\n function onOutsidePointerDown(e: PointerEvent) {\n if (card === null) return\n const target = e.target as Node | null\n if (card.contains(target)) return\n if (anchor !== null && anchor.contains(target)) return\n close()\n }\n\n function onKeyDown(e: KeyboardEvent) {\n if (e.key === 'Escape') close()\n }\n\n /** One provider: its name, how many models it offers, and a check when chosen. */\n function buildRow(provider: CatalogProvider, chosen: boolean, stale: boolean) {\n const built = buildPopoverItem({ role: 'menuitemcheckbox', badge: true, check: true })\n const row = built.row\n if (stale) row.classList.add('dsh-claude-popover-item-stale')\n row.setAttribute('aria-checked', chosen ? 'true' : 'false')\n built.text.textContent = provider.name\n // badge and check were both asked for above.\n built.badge!.textContent = stale ? settingsCopy('quickRemoved', 'Removed') : String(provider.count)\n built.check!.innerHTML = chosen ? POPOVER_CHECK_SVG : ''\n row.addEventListener('click', e => {\n e.stopPropagation()\n const next = readPrefs().quickProviders.slice()\n const at = next.indexOf(provider.id)\n if (at === -1) next.push(provider.id)\n else next.splice(at, 1)\n if (typeof onWrite === 'function') onWrite(next)\n renderBody()\n })\n return row\n }\n\n function renderBody() {\n if (cardBody === null) return\n while (cardBody.firstChild) cardBody.removeChild(cardBody.firstChild)\n if (providers.length === 0) {\n cardBody.appendChild(buildElement('div', 'dsh-claude-popover-status', settingsCopy('quickLoading', 'Loading providers…')))\n return\n }\n const chosen = readPrefs().quickProviders\n // The official service always leads the first level, so it is not a\n // choice here: it is never listed, and a stored id for it is pruned on\n // load. A provider that vanished from the catalog still appears, marked\n // removed, so it can be unchecked out of the stored list instead of\n // lingering invisibly.\n const known: Record<string, boolean> = {}\n for (let i = 0; i < providers.length; i++) {\n if (providers[i].id === MODEL_OFFICIAL_GROUP) continue\n known[providers[i].id] = true\n cardBody.appendChild(buildRow(providers[i], chosen.includes(providers[i].id), false))\n }\n for (let s = 0; s < chosen.length; s++) {\n if (chosen[s] === MODEL_OFFICIAL_GROUP || known[chosen[s]]) continue\n cardBody.appendChild(buildRow({ id: chosen[s], name: chosen[s], count: 0 }, true, true))\n }\n }\n\n function open(trigger: HTMLElement, write: QuickProvidersWrite) {\n closeOtherPopovers('quickProviders')\n anchor = trigger\n anchor.setAttribute('aria-expanded', 'true')\n onWrite = write\n providers = typeof ui.model?.providers === 'function' ? ui.model.providers() : []\n card = buildElement('div', 'dsh-claude-popover-card dsh-claude-quick-popover')\n setMenuPopoverOpen(card, true)\n cardBody = buildElement('div', 'dsh-claude-popover-body')\n card.appendChild(cardBody)\n renderBody()\n document.body.appendChild(card)\n positionAnchoredPopover(trigger, card, { side: 'above', gap: 6, important: true })\n document.addEventListener('pointerdown', onOutsidePointerDown, true)\n document.addEventListener('keydown', onKeyDown, true)\n }\n\n function toggle(trigger: HTMLElement, write: QuickProvidersWrite) {\n if (card === null) open(trigger, write)\n else close()\n }\n\n // The catalog arrives after the settings page may already be open, so an\n // open card follows it rather than showing an empty list until reopened.\n if (typeof ui.model?.onProviders === 'function') {\n unsubscribe = ui.model.onProviders(list => {\n providers = list\n if (card !== null) renderBody()\n })\n }\n\n registerPopover('quickProviders', close)\n\n const handle: QuickProvidersHandle = {\n toggle,\n /**\n * The card closes on composer focus (and when the settings page tears it\n * down, which calls this with no reason). Esc and an outside press are\n * NOT its dismiss routes, so those reasons are ignored.\n */\n close(reason?: CloseReason) {\n if (reason === 'escape' || reason === 'outside') return\n close()\n },\n isOpen() { return card !== null },\n }\n ui.quickProviders = handle\n return () => {\n close()\n unregisterPopover('quickProviders')\n if (unsubscribe !== null) {\n unsubscribe()\n unsubscribe = null\n }\n delete ui.quickProviders\n }\n}\n", "import { FOOTER_ACTIONS_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport { findFootArea } from '../../core/host'\nimport { copyLabel } from '../../core/i18n'\nimport { buildPopoverItem } from '../../shared/popover'\n\nexport function createFooterMirror(options: {\n body(): HTMLElement | null\n anchor(): Element | null\n isOpen(): boolean\n close(): void\n}) {\n /** The popover body, while sync and its helpers run (sync returns early without one). */\n function openBody() {\n const body = options.body()\n if (body === null) throw new Error('dsh-claude-style: the footer mirror has no popover body')\n return body\n }\n\n /**\n * The `sidebar.footer.action` list slot accepts arbitrary plugin\n * controls, not just buttons: a plugin may render a composite widget\n * (toggles, selects, status chips) straight into the sidebar footer.\n * Redirection therefore works on ENTRIES (direct children of\n * footerActions), not on `querySelectorAll('button')`:\n * - every entry is marked `data-dsh-claude-footer-entry` (CSS\n * collapses its box so nothing paints in the sidebar);\n * - entries without a floating overlay are hidden wholesale via\n * `data-dsh-claude-footer-hidden`;\n * - entries hosting an overlay — a fixed-position panel (the cordis\n * inventory panel) or a dialog/menu/listbox — stay visible, but\n * every branch of their subtree that does not lead to the overlay\n * is hidden, so only the overlay itself can surface.\n * Returns the live entry list for popover mirroring.\n */\n function syncFooterActionVisibility(footerActions: Element | null) {\n if (!footerActions) return []\n const entries = footerEntriesOf(footerActions)\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i]\n entry.setAttribute('data-dsh-claude-footer-entry', '')\n const all = entry.querySelectorAll('*')\n for (let j = 0; j < all.length; j++) {\n const el = all[j]\n if (el.hasAttribute('data-dsh-claude-footer-overlay')) continue\n const role = el.getAttribute('role') || ''\n let overlay = role === 'dialog' || role === 'menu' || role === 'listbox'\n if (!overlay) {\n overlay = window.getComputedStyle(el).position === 'fixed'\n }\n if (overlay) el.setAttribute('data-dsh-claude-footer-overlay', '')\n }\n markFooterHiddenBranches(entry)\n }\n return entries\n }\n\n /**\n * Mirrorable footer units. Every slot outlet renders inside a\n * `div[data-slot]` anchor with `display:contents`, so a list slot's\n * entries are the ANCHOR's children, not footerActions' — reading\n * `footerActions.children` directly collapses every registrant into a\n * single mirrorable unit and drops all but the first from the popover.\n * Dead cells (`data-slot-error`) never mirror.\n */\n function footerEntriesOf(footerActions: Element) {\n const entries: Element[] = []\n const kids = footerActions.children\n for (let i = 0; i < kids.length; i++) {\n const kid = kids[i]\n if (kid.hasAttribute('data-slot-error')) continue\n if (kid.hasAttribute('data-slot')) {\n const slotKids = kid.children\n for (let j = 0; j < slotKids.length; j++) {\n if (!slotKids[j].hasAttribute('data-slot-error')) entries.push(slotKids[j])\n }\n } else {\n entries.push(kid)\n }\n }\n return entries\n }\n\n /** Hide every branch of `el`'s subtree that does not carry an overlay. */\n function markFooterHiddenBranches(el: Element) {\n if (el.hasAttribute('data-dsh-claude-footer-overlay')) {\n el.removeAttribute('data-dsh-claude-footer-hidden')\n return\n }\n if (el.querySelector('[data-dsh-claude-footer-overlay]') !== null) {\n el.removeAttribute('data-dsh-claude-footer-hidden')\n const kids = el.children\n for (let i = 0; i < kids.length; i++) markFooterHiddenBranches(kids[i])\n return\n }\n el.setAttribute('data-dsh-claude-footer-hidden', '')\n }\n\n /**\n * Bring one mirrored text item in line with the entry behind its index.\n * The label and badge are the plugin's own strings, so they are written as\n * text; the icon is a copy of the plugin's node rather than re-parsed\n * markup, and is replaced only when the source's markup changed.\n */\n function syncMirrorItem(item: Element, iconEl: Element | null, text: string, badge: string) {\n const iconBox = item.querySelector('.dsh-claude-popover-item-icon')\n const iconHtml = iconEl ? iconEl.outerHTML : ''\n if (iconBox !== null && iconBox.__dshIconHtml !== iconHtml) {\n iconBox.__dshIconHtml = iconHtml\n while (iconBox.firstChild) iconBox.removeChild(iconBox.firstChild)\n if (iconEl) iconBox.appendChild(iconEl.cloneNode(true))\n }\n const textBox = item.querySelector('.dsh-claude-popover-item-text')\n if (textBox !== null && textBox.textContent !== text) textBox.textContent = text\n let badgeBox = item.querySelector('.dsh-claude-popover-item-badge')\n if (badge) {\n if (badgeBox === null) {\n badgeBox = document.createElement('span')\n badgeBox.className = 'dsh-claude-popover-item-badge'\n item.appendChild(badgeBox)\n }\n if (badgeBox.textContent !== badge) badgeBox.textContent = badge\n } else if (badgeBox !== null) {\n item.removeChild(badgeBox)\n }\n }\n\n /** Remove the mirrored text item for one entry index, if present. */\n function removeActionMirror(idx: number) {\n const item = openBody().querySelector(`[data-action-index=\"${idx}\"]`)\n if (item && item.parentElement) item.parentElement.removeChild(item)\n }\n\n /** Remove the embedded widget clone for one entry index, if present. */\n function removeEmbedMirror(idx: number) {\n const embed = openBody().querySelector(`[data-embed-index=\"${idx}\"]`)\n if (embed && embed.parentElement) embed.parentElement.removeChild(embed)\n }\n\n /**\n * Whether an entry reads as a plain ACTION (mirror it as a text menu\n * item) or as a rich WIDGET (embed a live clone). A text item is only\n * faithful when the trigger accounts for essentially all of the\n * entry's visible content: a clickable progress-bar stack (cost-meter\n * balance) would otherwise shrink to one label and lose its bars.\n * Overlay text is excluded so an open cordis panel does not flip its\n * own entry into a widget.\n */\n function entryIsActionLike(entry: Element, trigger: HTMLElement | null) {\n if (trigger === null) return false\n if (trigger === entry) {\n // Only genuinely interactive ROOTS count as actions; a clickable\n // container (a region or tabindex wrapper) is still a widget.\n const tag = entry.tagName\n const role = entry.getAttribute('role') || ''\n return tag === 'BUTTON' || tag === 'A' || role === 'button'\n }\n // Semantic meter markup is always a widget, however small.\n if (entry.querySelector('[role=\"progressbar\"], [role=\"meter\"], meter, progress') !== null) return false\n const entryText = textExcludingOverlays(entry)\n const triggerText = (trigger.textContent || '').trim()\n // Tight slack: the trigger must account for essentially all of the\n // entry's visible text. A balance box reading \"余额¥10.07\" beside an\n // icon-only trigger already exceeds it — and its bar must survive.\n return entryText.length - triggerText.length <= 2\n }\n\n /** Visible text of an entry, skipping overlay subtrees. */\n function textExcludingOverlays(entry: Element) {\n let text = ''\n const walker = document.createTreeWalker(entry, 4 /* SHOW_TEXT */, {\n acceptNode(node) {\n let p = node.parentElement\n while (p && p !== entry) {\n if (p.hasAttribute('data-dsh-claude-footer-overlay')) return 2 // REJECT\n p = p.parentElement\n }\n return 1 // ACCEPT\n }\n })\n while (walker.nextNode()) text += walker.currentNode.nodeValue\n return text.trim()\n }\n\n /**\n * Embed a live clone of a display-only footer entry (a progress bar\n * reads as nothing as a text menu item — the cost-meter balance/quota\n * stack is the known case). The clone is replaced only when the\n * source's markup changes, so it tracks the plugin's re-renders without\n * churning the popover DOM. Skin marker attributes, ids, and overlay\n * subtrees are stripped from the copy: it must never be re-hidden by\n * the footArea hiding rule, double-register an id, or duplicate an\n * open panel next to the real one. Event listeners do not survive\n * cloning, so the embed forwards clicks back into the live entry —\n * path-mapped to the clicked sub-control (see resolveEmbedActivator) —\n * and deliberately leaves the popover open so the widget's response\n * stays visible; it still closes on pointer-leave as usual. The embed\n * is marked `data-clickable` for the cursor when the entry has a\n * trigger at all.\n */\n function syncEmbedMirror(entry: Element, idx: number, forward: HTMLElement | null) {\n let embed = openBody().querySelector<HTMLElement>(`[data-embed-index=\"${idx}\"]`)\n if (!embed) {\n const built = document.createElement('div')\n built.className = 'dsh-claude-popover-embed'\n built.setAttribute('data-embed-index', String(idx))\n built.addEventListener('click', e => {\n if (!built.__dshEntry) return\n e.stopPropagation()\n const activator = resolveEmbedActivator(e.target, built)\n if (activator) activator.click()\n })\n openBody().insertBefore(built, options.anchor())\n embed = built\n }\n embed.__dshEntry = entry\n embed.__dshForward = forward || null\n if (forward) {\n embed.setAttribute('data-clickable', '')\n } else {\n embed.removeAttribute('data-clickable')\n }\n const clone = entry.cloneNode(true) as Element\n clone.removeAttribute('id')\n clone.removeAttribute('data-dsh-claude-footer-entry')\n clone.removeAttribute('data-dsh-claude-footer-hidden')\n clone.removeAttribute('data-dsh-claude-footer-overlay')\n const overlays = clone.querySelectorAll('[data-dsh-claude-footer-overlay]')\n for (let o = 0; o < overlays.length; o++) {\n overlays[o].remove()\n }\n const stripped = clone.querySelectorAll('[id], [data-dsh-claude-footer-hidden]')\n for (let s = 0; s < stripped.length; s++) {\n stripped[s].removeAttribute('id')\n stripped[s].removeAttribute('data-dsh-claude-footer-hidden')\n }\n const html = clone.outerHTML\n if (embed.getAttribute('data-embed-html') !== html) {\n embed.setAttribute('data-embed-html', html)\n while (embed.firstChild) embed.removeChild(embed.firstChild)\n embed.appendChild(clone)\n }\n }\n\n const INTERACTIVE_SELECTOR = 'button, [role=\"button\"], a[href], [tabindex], input, select, summary'\n\n /**\n * Map a click inside the embedded clone back to the matching control\n * of the live entry. Forwarding every embed click to the entry's FIRST\n * trigger misfires for multi-control widgets (the cost-meter stack\n * carries refresh / collapse / tab buttons): the user clicks the\n * balance box but the first button in tree order fires. The clone\n * preserves the entry's tree shape, so the clicked node's child-index\n * path replays onto the original (tag-checked per level — overlay\n * stripping can shift siblings); the nearest interactive element at or\n * above the mapped node wins, and any mismatch falls back to the\n * entry's primary trigger.\n */\n function resolveEmbedActivator(clicked: EventTarget | null, embed: HTMLElement): HTMLElement | null | undefined {\n const entry = embed.__dshEntry\n const cloneRoot = embed.firstElementChild\n if (!entry || !cloneRoot || !(clicked instanceof Element)) return embed.__dshForward\n if (clicked === embed || clicked === cloneRoot) return embed.__dshForward\n // Child-index path from the clicked clone node up to the clone root.\n const path: number[] = []\n let node: Element = clicked\n while (node && node !== cloneRoot) {\n const parent = node.parentElement\n if (!parent) return embed.__dshForward\n path.unshift(Array.prototype.indexOf.call(parent.children, node))\n node = parent\n }\n // Replay the path on the live entry, verifying shape level by level.\n let original = entry\n let cloneNode = cloneRoot\n for (let i = 0; i < path.length; i++) {\n const nextClone = cloneNode.children[path[i]]\n const nextOrig = original.children[path[i]]\n if (!nextClone || !nextOrig || nextClone.tagName !== nextOrig.tagName) {\n return embed.__dshForward\n }\n cloneNode = nextClone\n original = nextOrig\n }\n // Nearest interactive element at or above the mapped original,\n // bounded by the entry and never inside an overlay subtree.\n let target: Element | null = original\n while (target) {\n if (target !== entry && target instanceof HTMLElement && target.matches(INTERACTIVE_SELECTOR) &&\n !hasOverlayAncestor(target, entry)) {\n return target\n }\n if (target === entry) break\n target = target.parentElement\n }\n return embed.__dshForward\n }\n\n /** Whether `el` sits inside an overlay-marked subtree above `entry`. */\n function hasOverlayAncestor(el: Element, entry: Element) {\n let node: Element | null = el\n while (node && node !== entry) {\n if (node.hasAttribute('data-dsh-claude-footer-overlay')) return true\n node = node.parentElement\n }\n return false\n }\n\n /**\n * First interactive element of a footer entry that is not part of an\n * overlay subtree (an open panel may render action buttons of its own,\n * and those must never become the popover item's activation target).\n */\n function findFooterTrigger(entry: Element): HTMLElement | null {\n const selector = INTERACTIVE_SELECTOR\n if (entry instanceof HTMLElement && entry.matches(selector) &&\n !entry.hasAttribute('data-dsh-claude-footer-overlay')) {\n return entry\n }\n const found = entry.querySelectorAll<HTMLElement>(selector)\n for (let i = 0; i < found.length; i++) {\n const candidate = found[i]\n let node: Element | null = candidate\n let insideOverlay = false\n while (node && node !== entry) {\n if (node.hasAttribute('data-dsh-claude-footer-overlay')) {\n insideOverlay = true\n break\n }\n node = node.parentElement\n }\n if (!insideOverlay) return candidate\n }\n return null\n }\n\n function sync(footArea: Element) {\n const footerActions = footArea.querySelector(FOOTER_ACTIONS_SELECTOR)\n const footerEntries = syncFooterActionVisibility(footerActions)\n const body = options.body()\n\n // A closed host drawer has no container to mirror into, but the entries\n // above are hidden in place all the same: the host re-renders them, and a\n // pass that skips this leaves their icons painted in the sidebar until the\n // drawer is opened once.\n if (body === null) return\n\n // While the popover is open, its mirrors must stay completely static:\n // a content rewrite, reorder, or embedded-clone replacement under the\n // pointer cancels the browser's :hover state and can swallow the click\n // between pointerdown and pointerup. Sync runs only while closed;\n // openPopover runs one final pass right before the reveal — and the\n // sidebar-side redirection above stays live, so a newly mounted entry\n // keeps being hidden even with the popover open.\n if (options.isOpen()) return\n\n const existingActionItems = body.querySelectorAll('[data-action-index], [data-embed-index]')\n for (let ea = 0; ea < existingActionItems.length; ea++) {\n const staleIdx = parseInt(existingActionItems[ea].getAttribute('data-action-index') || existingActionItems[ea].getAttribute('data-embed-index') || '', 10)\n if (isNaN(staleIdx) || staleIdx >= footerEntries.length) {\n existingActionItems[ea].remove()\n }\n }\n\n for (let f = 0; f < footerEntries.length; f++) {\n try {\n ((entry: Element, idx: number) => {\n // The host's account area also lives in the footer: skip anything\n // that is a menu anchor or contains one, and anything carrying the\n // host's sign-out glyph, so its logout button stays out of the\n // drawer's header. The glyph is identified by its geometry\n // (ui-primitives LogoutIcon: a 13.664×13.571 svg), never by text —\n // the row is icon-only and its label follows the interface\n // language.\n if (entry.getAttribute('aria-haspopup') === 'menu') return\n if (entry.querySelector('[aria-haspopup=\"menu\"]') !== null) return\n if (entry.querySelector('svg[viewBox=\"0 0 13.664 13.571\"]') !== null) return\n const trigger = findFooterTrigger(entry)\n const hasContent = (entry.textContent || '').trim() !== '' ||\n entry.querySelector('svg, img, canvas') !== null\n\n // Rich widgets (progress bars, stat panels) cannot collapse into\n // a text menu item — embed a live clone instead, forwarding\n // clicks to the entry's trigger when it has one (the cost-meter\n // balance stack is itself clickable).\n if (!entryIsActionLike(entry, trigger)) {\n removeActionMirror(idx)\n if (hasContent) {\n syncEmbedMirror(entry, idx, trigger)\n } else {\n removeEmbedMirror(idx)\n }\n return\n }\n removeEmbedMirror(idx)\n\n // The mirrored item activates the first interactive element\n // outside any overlay.\n // entryIsActionLike answered true, so there is a trigger.\n const activator = trigger!\n let item = body.querySelector<HTMLElement>(`[data-action-index=\"${idx}\"]`)\n const iconEl = (trigger && trigger.querySelector('svg')) || entry.querySelector('svg')\n const text = activator.getAttribute('aria-label') || (activator.textContent || '').trim() || copyLabel('footerPluginRow', 'Plugin')\n const badge = activator.getAttribute('data-cordis-badge') || entry.getAttribute('data-cordis-badge') || ''\n\n if (!item) {\n // The shared row skeleton: icon, text, and the badge slot the\n // sync below fills or drops.\n const built = buildPopoverItem({ icon: true }).row\n built.setAttribute('data-action-index', String(idx))\n\n built.addEventListener('click', e => {\n e.stopPropagation()\n options.close()\n // The activator is rebound on every (closed-state) sync pass\n // (`item.__dshActivator`), never captured at creation — the\n // host re-sorts list slots by `order` on each render, so the\n // entry behind an index changes over time.\n let live = built.__dshActivator\n if (!live || typeof live.click !== 'function') {\n // Safety net: re-resolve the current trigger for this index\n // from the live footer DOM. Covers the rare case where the\n // stored node was detached by a host re-render while the\n // popover was open.\n const fa = findFootArea()\n const actions = fa ? fa.querySelector(FOOTER_ACTIONS_SELECTOR) : null\n const liveEntries = actions ? footerEntriesOf(actions) : []\n const liveEntry = liveEntries[idx] || null\n live = liveEntry ? findFooterTrigger(liveEntry) : null\n }\n if (live && typeof live.click === 'function') live.click()\n })\n body.insertBefore(built, options.anchor())\n item = built\n }\n // Entries are reused by index: the host re-sorts list slots by\n // `order` on every render, so a re-sort can seat a different\n // plugin under an existing item — icon, text, badge AND the\n // click target must all re-sync, or the label shows one entry\n // while the click fires the previous occupant's trigger.\n syncMirrorItem(item, iconEl, text, badge)\n // Rebind the click target to the entry currently behind this\n // index. Done on every pass, for new and reused items alike.\n item.__dshActivator = activator\n })(footerEntries[f], f)\n } catch (error) {\n // A single broken entry must not abort the rest of the mirror\n // sync (which would leave later items without a rebound\n // activator or un-ordered); it is reported.\n reportError(error)\n }\n }\n\n // The host re-sorts list-slot outlets by `order` on every render\n // (stable, ties keep registration order), and plugins mount\n // progressively at startup — so the mirror nodes must track the live\n // footer order on every pass: a later re-sort would otherwise leave\n // the popover frozen in a stale order that no longer matches the\n // real controls. Re-append action items and embedded widgets in\n // entry-index order.\n const mirrors: Element[] = []\n for (let mi = 0; mi < body.children.length; mi++) {\n const mirrorNode = body.children[mi]\n if (mirrorNode === options.anchor()) continue\n if (mirrorNode.hasAttribute('data-action-index') || mirrorNode.hasAttribute('data-embed-index')) {\n mirrors.push(mirrorNode)\n }\n }\n mirrors.sort((a, b) => {\n const ai = parseInt(a.getAttribute('data-action-index') || a.getAttribute('data-embed-index') || '', 10) || 0\n const bi = parseInt(b.getAttribute('data-action-index') || b.getAttribute('data-embed-index') || '', 10) || 0\n return ai - bi\n })\n // Walk back from the settings row and move a mirror only when it is out\n // of place. Inserting front to back before the settings row moved every\n // mirror on every pass once there were two (each insert lands after the\n // ones already placed), and each move is a mutation that schedules the\n // next pass — the scheduler never went idle.\n let nextMirror = options.anchor()\n for (let mr = mirrors.length - 1; mr >= 0; mr--) {\n if (mirrors[mr].nextSibling !== nextMirror) body.insertBefore(mirrors[mr], nextMirror)\n nextMirror = mirrors[mr]\n }\n }\n\n /** Drop every takeover marker from the host's footer entries. */\n function clear(footArea: Element) {\n const marked = footArea.querySelectorAll(\n '[data-dsh-claude-footer-entry], [data-dsh-claude-footer-hidden], [data-dsh-claude-footer-overlay]',\n )\n for (let i = 0; i < marked.length; i++) {\n marked[i].removeAttribute('data-dsh-claude-footer-entry')\n marked[i].removeAttribute('data-dsh-claude-footer-hidden')\n marked[i].removeAttribute('data-dsh-claude-footer-overlay')\n }\n }\n\n return { sync, clear }\n}\n", "import { MENU_ROLE_SELECTOR, SETTINGS_BUTTON_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport { findFootArea } from '../../core/host'\n\n/** Rhythm and give-up point of the poll for the host's account menu after the trigger's own click. */\nconst MENU_LOOK_INTERVAL_MS = 40\nconst MENU_LOOK_TRIES = 20\n\n/**\n * The host's account trigger, its settings entry, and its open account menu.\n *\n * The skin no longer drives the host's account menu to read its rows: the\n * account surface (account/surface.ts) injects our rows into the menu while\n * it is open, and the host renders its own rows. This factory therefore keeps\n * only what the remaining callers need — the trigger (which is both the entry\n * on a host that has one and the \"is there an account area?\" probe), the\n * menu's list element to inject into, and the settings drive that Ctrl+, and\n * the synthetic path's settings row still use.\n */\nexport function createHostAccountMenu(options: { close(): void }) {\n /** A click the host's React handlers actually see (pointerdown + click). */\n function realClick(el: HTMLElement | null | undefined) {\n if (el === null || el === undefined) return\n const rect = el.getBoundingClientRect()\n const init = {\n bubbles: true, cancelable: true, composed: true, button: 0, buttons: 1,\n clientX: Math.round(rect.left + rect.width / 2),\n clientY: Math.round(rect.top + rect.height / 2)\n }\n el.dispatchEvent(new PointerEvent('pointerdown', init))\n el.dispatchEvent(new MouseEvent('mousedown', init))\n el.dispatchEvent(new PointerEvent('pointerup', init))\n el.dispatchEvent(new MouseEvent('mouseup', init))\n el.click()\n }\n\n /**\n * The host's account trigger: the menu anchor the host itself marks with\n * the sign-in state (`data-signed-out`). No other element carries that\n * mark, so no label text is read. The footer scope comes first — that is\n * where the account row lives — and the document is the fallback for a\n * host that seats it elsewhere.\n *\n * No structural fallback beyond the mark: \"the first non-ours anchor in\n * the footer\" picked the open-in-app menu instead, filling the drawer\n * with Cursor / VS Code / … Returning null is the honest answer: the\n * surface self-builds instead.\n */\n function hostAccountTrigger() {\n const foot = findFootArea()\n const scopes: (ParentNode | null)[] = [foot, document]\n for (const scope of scopes) {\n if (scope === null) continue\n const el = scope.querySelector<HTMLElement>('[aria-haspopup=\"menu\"][data-signed-out]')\n if (el !== null && !String(el.className || '').includes('dsh-claude-')) return el\n }\n return null\n }\n\n /**\n * The host's settings button, a dialog trigger in the footer, or null. The\n * desktop has none: its account menu took that slot and carries 设置\n * itself, and \"any button that is not a menu anchor\" there is the update\n * pill beside it — the settings row read \"Retry update\" and clicked it.\n */\n function hostSettingsTrigger() {\n const foot = findFootArea()\n return foot === null ? null : foot.querySelector<HTMLElement>(SETTINGS_BUTTON_SELECTOR)\n }\n\n /**\n * The host's open account menu, or null while it is closed.\n *\n * Identified through the trigger, never through the menu's text: the\n * account trigger reports `aria-expanded` while its menu is up, so the\n * open host menu (the skin's own cards carry `dsh-claude-` classes) is\n * the account menu. Opening a menu folds the shell's other menus, so at\n * most one host menu is ever open.\n */\n function findAccountMenu() {\n const trigger = hostAccountTrigger()\n if (trigger === null || trigger.getAttribute('aria-expanded') !== 'true') return null\n const menus = document.querySelectorAll<HTMLElement>(MENU_ROLE_SELECTOR)\n for (let i = 0; i < menus.length; i++) {\n if (!String(menus[i].className || '').includes('dsh-claude-')) return menus[i]\n }\n return null\n }\n\n /**\n * The settings row of an open account menu: the only row the host marks\n * with its keyboard shortcut. The visible label follows the interface\n * language; `aria-keyshortcuts` does not.\n */\n function settingsRowOf(menu: Element) {\n return menu.querySelector<HTMLElement>('[role=\"menuitem\"][aria-keyshortcuts]')\n }\n\n /**\n * The menu's list element — the host's own keyboard walk and our injected\n * rows both live inside it — or null when the host's list markup differs\n * from the one this skin was built against.\n */\n function menuViewport(menu: Element) {\n return menu.querySelector('[role=\"presentation\"]')\n }\n\n /**\n * Open the host's settings: its settings button where it has one, or else\n * the settings row of its account menu — the desktop, where that menu is\n * the settings launcher. The row is found by the shortcut mark the host\n * puts on it, never by its label, which follows the interface language.\n * The drive is hidden in place while it runs: the menu is a means to the\n * dialog, never the answer.\n */\n function openHostSettings() {\n options.close()\n const trigger = hostSettingsTrigger()\n if (trigger !== null) {\n trigger.click()\n return\n }\n const account = hostAccountTrigger()\n if (account === null) return\n realClick(account)\n let tries = 0\n function look() {\n const menu = findAccountMenu()\n if (menu !== null) {\n const row = settingsRowOf(menu)\n if (row === null) {\n // No settings row in this menu: fold it back, the drive is over.\n realClick(account)\n return\n }\n const previous = menu.style.visibility\n menu.style.visibility = 'hidden'\n realClick(row)\n menu.style.visibility = previous\n return\n }\n if (tries++ > MENU_LOOK_TRIES) return\n setTimeout(look, MENU_LOOK_INTERVAL_MS)\n }\n setTimeout(look, MENU_LOOK_INTERVAL_MS)\n }\n\n /**\n * Open the host's account menu for the hover preference. The trigger opens\n * on its own onClick, so one click is the whole press: the extra\n * pointerdown/mouseup pair realClick adds reaches any host handler that\n * acts on a press, and the click that follows then toggles the just-opened\n * menu shut.\n */\n function openAccountMenu() {\n const trigger = hostAccountTrigger()\n if (trigger === null) return\n trigger.click()\n }\n\n return {\n trigger: hostAccountTrigger,\n settingsTrigger: hostSettingsTrigger,\n findMenu: findAccountMenu,\n menuViewport,\n openMenu: openAccountMenu,\n openSettings: openHostSettings\n }\n}\n\n/** The host account menu accessors (createHostAccountMenu). */\nexport type HostAccountMenu = ReturnType<typeof createHostAccountMenu>\n", "import { CLIENT_VERSION } from 'virtual:dsh-claude-style/generated'\nimport { setAccountIdentity } from '../../core/host'\nimport { activeLocale } from '../../core/i18n'\nimport type { HostContext, HostFiber } from '../../core/host'\nimport type { HostAccountAnswer, HostAccountClient, HostAccountFrame, HostAccountService, HostStream, HostStreamStep } from '@dsh-claude-style/contracts/services'\n\n/**\n * The signed-in account, when the desktop has one: `remote.account.getProfile(client)`\n * resolves to a profile whose `status` is 'ready' and whose value carries the\n * nickname and the avatar URL. Read leniently by NAME (the same way the archive\n * registry is read), so a host without the account plugin simply keeps the\n * hand-drawn mark and the stored username.\n *\n * The profile is a platform request on the host, so it is read only when the\n * account can have changed: once the account service is up for this\n * generation (a cold start or a hot reload) and when the account stream\n * reports a sign-in or a sign-out (followAccount). A read that comes back without an answer — the platform\n * timed out, or the credential changed under it and the host aborted it, as\n * happens during a sign-in — is retried a few times, then left to the next\n * change; the row keeps what it shows meanwhile.\n */\nexport function createAccountProfile(ctx: HostContext, onChange: () => void) {\n let accountName: string | null = null\n let accountAvatar: string | null = null\n const ACCOUNT_RETRY_MS = [2000, 10000, 30000]\n let accountRead = 0\n let accountRetry: ReturnType<typeof setTimeout> | null = null\n let accountRetries = 0\n\n function accountService(): HostAccountService | null {\n return ctx.get('remote.account') ?? null\n }\n\n /**\n * The identity every account call carries. The Remote requires it as the\n * method's own argument: the Host refuses a call whose argument fields do\n * not match its descriptor, so a call without it never reaches the\n * Platform. Each field is read at call time, so a language or a zone change\n * reaches the next read. The version is this bundle's own build version —\n * the DSH build the page runs is readable from no host service the browser\n * half can see.\n */\n function accountClient(): HostAccountClient {\n return {\n version: CLIENT_VERSION,\n locale: activeLocale(ctx),\n timezoneOffsetSeconds: -new Date().getTimezoneOffset() * 60,\n }\n }\n\n function showAccount(name: string | null, avatar: string | null) {\n if (name === accountName && avatar === accountAvatar) return\n accountName = name\n accountAvatar = avatar\n // The greeting, the account rows and the hold screen read one identity\n // store (packages/client/src/core/host.ts); this feature supplies its account half.\n setAccountIdentity(name, avatar)\n // Nothing in the DOM changed, so no mutation will schedule the pass that\n // paints the new name and picture: ask for one.\n onChange()\n }\n\n /** Drop the read in flight (its answer is ignored) and any retry waiting. */\n function dropAccountRead() {\n accountRead++\n if (accountRetry !== null) {\n clearTimeout(accountRetry)\n accountRetry = null\n }\n }\n\n function retryAccount() {\n if (accountRetries >= ACCOUNT_RETRY_MS.length) return\n accountRetry = setTimeout(() => {\n accountRetry = null\n loadAccount()\n }, ACCOUNT_RETRY_MS[accountRetries++])\n }\n\n function loadAccount() {\n const account = accountService()\n if (account === null || typeof account.getProfile !== 'function') return\n dropAccountRead()\n const read = accountRead\n account.getProfile(accountClient()).then((result: HostAccountAnswer) => {\n if (read !== accountRead) return\n if (!result || result.ok !== true) { retryAccount(); return }\n if (!result.value) {\n // `null` is the host's \"no credential\" — unless the stream says one\n // is stored, and then it changed while this read was out.\n if (accountState !== null && accountState !== 'signed-out') retryAccount()\n else showAccount(null, null)\n return\n }\n const profile = result.value.profile || result.value\n // A 'failed' profile is a platform miss, not a sign-out.\n if (!profile || profile.status !== 'ready' || !profile.value) { retryAccount(); return }\n accountRetries = 0\n showAccount(profile.value.name || profile.value.contact || null, profile.value.avatarUrl || profile.avatarUrl || null)\n }, () => {\n if (read === accountRead) retryAccount()\n })\n }\n\n /**\n * One frame of the host's account state (`remote.account.watch`). A read\n * follows only the frames after which the row can owe a different\n * profile: the first one (this generation starting), a flip between signed\n * out and a stored credential, and a sign-in that stores a new credential\n * over a stored one. The rest — a sign-in still waiting on the browser, a\n * failed attempt, the same state again after a reconnect — read nothing.\n */\n let accountState: string | null = null\n let accountSignIn: string | null = null\n function onAccountState(view: HostAccountFrame) {\n if (view === null || typeof view !== 'object') return\n const signedIn = view.status === 'credential-stored'\n const attempt = view.attempt\n if (!signedIn) accountSignIn = null\n else if (attempt && (attempt.phase === 'committing' || attempt.phase === 'succeeded')) accountSignIn = attempt.id ?? null\n const state = signedIn ? `signed-in:${accountSignIn || ''}` : 'signed-out'\n if (state === accountState) return\n accountState = state\n accountRetries = 0\n if (signedIn) {\n loadAccount()\n } else {\n dropAccountRead()\n showAccount(null, null)\n }\n }\n\n let accountStream: HostStream<HostAccountFrame> | null = null\n\n /** Close this generation's account stream and drop its reads. */\n function stopFollowingAccount() {\n dropAccountRead()\n if (accountStream === null) return\n const stream = accountStream\n accountStream = null\n if (document.body.__dshAccountStream === stream) document.body.__dshAccountStream = null\n stream.dispose()\n }\n\n /**\n * Follow the account stream the host's own account UI reads, through\n * `remote.$stream`, which reopens it across reconnects. It is an async\n * iterable, stepped by hand: leaving a `for await` would call the\n * iterator's return() and close the stream, whose disposal belongs to\n * stopFollowingAccount().\n *\n * Client HMR drops the old generation's disposals, so its stream would stay\n * open and read again on every sign-in. The newest generation marks the\n * page with its stream; an older one that finds another mark closes its\n * own instead of reading.\n * @returns whether there is a stream to follow.\n */\n function followAccount() {\n const account = accountService()\n const remote = ctx.get('remote')\n if (account === null || typeof account.watch !== 'function' || typeof remote?.$stream !== 'function') return false\n const stream = remote.$stream({\n name: 'dsh-claude-style account',\n open(signal: AbortSignal) { return account.watch(signal) },\n ended() { return new Error('account stream ended') }\n })\n const frames = stream[Symbol.asyncIterator]()\n accountStream = stream\n document.body.__dshAccountStream = stream\n function next() {\n frames.next().then((step: HostStreamStep<HostAccountFrame>) => {\n if (accountStream !== stream || step.done) return\n if (document.body.__dshAccountStream !== stream) { stopFollowingAccount(); return }\n onAccountState(step.value.value)\n if (typeof step.value.accept === 'function') step.value.accept()\n next()\n }, () => {\n // Closed for good. Before a first frame that would leave the row\n // with no read at all.\n if (accountStream === stream && accountState === null) loadAccount()\n })\n }\n next()\n return true\n }\n\n /**\n * The account service mounts after this plugin does (the host registers\n * each remote namespace as its package loads), so reading it at install\n * found nothing on the desktop: the name only ever arrived with the old\n * poll's first tick, a minute in. Wait for it the way the settings section\n * waits for `slots`. With the stream, its first frame makes the first\n * read; a host without `ctx.inject` gets one read now.\n */\n let accountFiber: HostFiber | null = null\n if (typeof ctx.inject === 'function') {\n accountFiber = ctx.inject(['remote.account'], scope => {\n scope.effect(() => {\n if (!followAccount()) loadAccount()\n return stopFollowingAccount\n }, 'dsh-claude-style: account')\n })\n } else if (!followAccount()) {\n loadAccount()\n }\n // The profile's only outward job is its own lifetime: the identity it\n // reads lands in the shared store (setAccountIdentity), which every\n // reader — the greeting, the rows, the hold screen — already follows.\n return {\n stop() {\n if (accountFiber !== null && typeof accountFiber.dispose === 'function') {\n accountFiber.dispose()\n }\n stopFollowingAccount()\n }\n }\n}\n", "import { HDSL_SKIN_ROUTE } from '../../constants'\nimport { resolveAvatarUrl, resolveDisplayName } from '../../core/host'\nimport { copyLabel } from '../../core/i18n'\nimport { buildElement } from '../../shared/dom'\nimport type { HostAccountMenu } from './host-menu'\n\n/**\n * The account rows: the header with the hold-screen easter egg, the\n * self-built trigger's picture, and the self-built path's settings row.\n *\n * The footer (account-footer.ts) builds the containers and decides which\n * mount point is active (account/surface.ts); this factory builds and syncs\n * the rows that go into them. `options.hostMenu` is the host's account menu\n * (account/host-menu.ts) and `options.openBan()` what a press on the header\n * does; the nickname and the picture come from the identity chain\n * (packages/client/src/core/host.ts).\n */\nexport function createAccountRows(options: { hostMenu: HostAccountMenu, openBan(): void, onChange?(): void }) {\n const hostMenu = options.hostMenu\n\n /**\n * The profile picture's address, or null when there is none usable. It\n * comes from the account service or from the plugin's own HDSL route, so\n * only http(s) and that route are accepted, and it is set as a property —\n * never written into markup.\n */\n function accountPhotoUrl(raw: unknown) {\n if (raw === HDSL_SKIN_ROUTE) return raw\n if (typeof raw !== 'string' || raw === '' || !URL.canParse(raw, window.location.href)) return null\n const url = new URL(raw, window.location.href)\n return url.protocol === 'https:' || url.protocol === 'http:' ? url.href : null\n }\n\n /** The head's canvas, and what a pass needs to decide whether to keep it. */\n let headCanvas: HTMLCanvasElement | null = null\n /** A load has been started; the route is read once per page, so is a failure. */\n let headRequested = false\n let headFailed = false\n\n /**\n * Draw the head out of a launcher skin, the way the launcher's own\n * account list draws it: the front face of the head texel block, inset by\n * 1/18 of the box, then the hat layer over the whole box. The atlas may\n * be stored at any integer multiple of 64 (the launcher normalizes to\n * 64×64 and keeps an already-larger import at its size), so every texel\n * block is measured by that multiple.\n *\n * @returns whether a head was drawn.\n */\n function drawLauncherHead(canvas: HTMLCanvasElement, image: HTMLImageElement) {\n const box = canvas.width\n const scale = image.naturalWidth / 64\n const context = canvas.getContext('2d')\n if (context === null || scale < 1 || scale !== Math.floor(scale)) return false\n const offset = Math.round(box / 18)\n context.clearRect(0, 0, box, box)\n // The face is a 8×8 texel block drawn inside the inset; the pixels are\n // already at the right size, so smoothing would only blur them.\n context.imageSmoothingEnabled = false\n context.drawImage(image, 8 * scale, 8 * scale, 8 * scale, 8 * scale, offset, offset, box - 2 * offset, box - 2 * offset)\n context.drawImage(image, 40 * scale, 8 * scale, 8 * scale, 8 * scale, 0, 0, box, box)\n return true\n }\n\n /**\n * Load the launcher's atlas once. The canvas is built off-screen: the\n * avatar element a pass hands in may be a different one by the time the\n * picture lands, and a failure only means the mark keeps the circle.\n */\n function loadLauncherHead() {\n headRequested = true\n const image = new Image()\n image.decoding = 'async'\n image.addEventListener('load', () => {\n if (image.naturalWidth !== image.naturalHeight || image.naturalWidth < 64) {\n headFailed = true\n wake()\n return\n }\n let canvas = headCanvas\n if (canvas === null) {\n canvas = document.createElement('canvas')\n canvas.className = 'dsh-claude-account-skin'\n canvas.width = 64\n canvas.height = 64\n canvas.setAttribute('aria-hidden', 'true')\n headCanvas = canvas\n }\n if (!drawLauncherHead(canvas, image)) headFailed = true\n wake()\n })\n image.addEventListener('error', () => {\n headFailed = true\n wake()\n })\n image.src = HDSL_SKIN_ROUTE\n }\n\n /** Ask for the pass that mounts the head (the picture changes no DOM). */\n function wake() {\n if (typeof options.onChange === 'function') options.onChange()\n }\n\n /** Drop the account profile's photo, if one is mounted. */\n function clearAccountPhoto(avatarEl: Element) {\n const photo = avatarEl.querySelector('.dsh-claude-account-photo')\n if (photo === null) return\n avatarEl.removeChild(photo)\n if (avatarEl.hasAttribute('data-dsh-claude-photo')) avatarEl.removeAttribute('data-dsh-claude-photo')\n }\n\n /** Take the head's canvas back out of a circle the photo path owns again. */\n function detachLauncherHead(avatarEl: Element) {\n if (headCanvas !== null && headCanvas.parentElement === avatarEl) avatarEl.removeChild(headCanvas)\n if (avatarEl.hasAttribute('data-dsh-claude-skin')) avatarEl.removeAttribute('data-dsh-claude-skin')\n }\n\n /**\n * Paint the player's own head. What the launcher serves is the normalized\n * skin atlas — a sheet of body parts, not a face — so it is cropped into\n * a canvas and never handed to the `<img>` the photo path uses. Until the\n * head is drawn, and when it cannot be, the mark keeps the circle.\n */\n function syncLauncherHead(avatarEl: Element) {\n if (!headRequested) loadLauncherHead()\n if (headCanvas === null || headFailed) return\n if (headCanvas.parentElement !== avatarEl) {\n headCanvas.remove()\n avatarEl.appendChild(headCanvas)\n }\n avatarEl.toggleAttribute('data-dsh-claude-skin', true)\n }\n\n /**\n * Paint (or clear) the picture inside the avatar circle. The address comes\n * from the identity chain (packages/client/src/core/host.ts): the account's own avatar,\n * then the HDSL launcher's (drawn as a cropped head), then nothing — and\n * the brand mark the stylesheet draws shows through. The account's avatar\n * is a real `<img>` layered over that\n * mark rather than a CSS background: the host's own avatar `<img>` carries\n * `referrerPolicy=\"no-referrer\"`, which is what the picture host expects,\n * and a background cannot drop the referrer. A picture that fails to load\n * hides itself, so the mark underneath shows instead of an empty circle.\n */\n function syncAccountAvatar(avatarEl: Element | null) {\n if (avatarEl === null) return\n const src = accountPhotoUrl(resolveAvatarUrl())\n if (src === HDSL_SKIN_ROUTE) {\n // The launcher's picture only ever shows as the cropped head.\n clearAccountPhoto(avatarEl)\n syncLauncherHead(avatarEl)\n return\n }\n detachLauncherHead(avatarEl)\n let photo = avatarEl.querySelector<HTMLImageElement>('.dsh-claude-account-photo')\n if (src === null) {\n clearAccountPhoto(avatarEl)\n return\n }\n if (photo === null) {\n const image = document.createElement('img')\n image.className = 'dsh-claude-account-photo'\n image.alt = ''\n image.decoding = 'async'\n image.draggable = false\n image.referrerPolicy = 'no-referrer'\n image.addEventListener('load', () => { image.hidden = false })\n image.addEventListener('error', () => { image.hidden = true })\n avatarEl.appendChild(image)\n photo = image\n }\n if (photo.getAttribute('src') !== src) photo.src = src\n if (!avatarEl.hasAttribute('data-dsh-claude-photo')) avatarEl.setAttribute('data-dsh-claude-photo', '')\n }\n\n /**\n * The account header: the nickname and the hold-screen easter egg's entry.\n * It is the first row of whichever container is active — the injected\n * container on the host path, the popover's own header on the self-built\n * one. The header is only a WRAPPER: the clickable strip is the inner row,\n * so the hover plate covers the name and not the divider that follows it.\n */\n function buildAccountHeader(username: string) {\n const header = buildElement('div', 'dsh-claude-account-popover-header')\n header.setAttribute('data-dsh-claude-ban-row', '')\n\n const rowEl = buildElement('div', 'dsh-claude-account-popover-row')\n rowEl.setAttribute('role', 'button')\n rowEl.setAttribute('tabindex', '0')\n rowEl.setAttribute('aria-haspopup', 'dialog')\n\n const nameEl = buildElement('div', 'dsh-claude-account-popover-name', username)\n\n const divider = buildElement('div', 'dsh-claude-account-popover-divider')\n\n rowEl.appendChild(nameEl)\n header.appendChild(rowEl)\n header.appendChild(divider)\n return header\n }\n\n /**\n * The nickname the header shows: the identity chain first (a custom\n * nickname, the account's own name, HDSL, the OS-user probe), then the\n * host's own rendered label when the chain resolved nothing — on the host\n * path that label is the host's own account name, so a host whose profile\n * read failed still shows what it renders.\n */\n function accountDisplayName(hostRow: Element | null) {\n const resolved = resolveDisplayName()\n if (resolved) return resolved\n if (hostRow !== null) {\n const label = (hostRow.textContent || '').trim()\n if (label) return label\n }\n return copyLabel('accountNameFallback', 'User')\n }\n\n /**\n * Sync the header of the active container: the nickname and the easter\n * egg's binding. Bound OUTSIDE the build branch so the pass that creates\n * the container already wires the row; `__dshBanBound` keeps a later pass\n * from binding it twice, which would open the overlay twice per click.\n */\n function syncAccountHeader(root: Element | null, hostRow: Element | null) {\n if (root === null) return\n const nameEl = root.querySelector('.dsh-claude-account-popover-name')\n const username = accountDisplayName(hostRow)\n if (nameEl && nameEl.textContent !== username) nameEl.textContent = username\n const banRow = root.querySelector<HTMLElement>('[data-dsh-claude-ban-row]')\n if (banRow && !banRow.__dshBanBound) {\n banRow.__dshBanBound = true\n banRow.addEventListener('click', e => {\n // The row's gesture is the easter egg, not a menu selection.\n e.preventDefault()\n e.stopPropagation()\n options.openBan()\n })\n banRow.addEventListener('keydown', e => {\n if (e.key !== 'Enter' && e.key !== ' ') return\n e.preventDefault()\n e.stopPropagation()\n options.openBan()\n })\n }\n }\n\n /** The container injected at the head of the host's account menu. */\n function buildHostContainer() {\n const container = buildElement('div', 'dsh-claude-account-inject')\n container.appendChild(buildAccountHeader(accountDisplayName(hostMenu.trigger())))\n return container\n }\n\n /** The settings row, needed on the self-built path only. */\n function buildSettingsItem() {\n const item = document.createElement('button')\n item.type = 'button'\n item.className = 'dsh-claude-popover-item'\n item.setAttribute('data-action', 'settings')\n item.innerHTML =\n '<span class=\"dsh-claude-popover-item-icon\">' +\n '<svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\">' +\n '<circle cx=\"12\" cy=\"12\" r=\"3\"></circle>' +\n '<path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"></path>' +\n '</svg>' +\n '</span>' +\n '<span class=\"dsh-claude-popover-item-text\"></span>'\n item.addEventListener('click', e => {\n e.stopPropagation()\n hostMenu.openSettings()\n })\n return item\n }\n\n /**\n * The settings row names and opens whatever the host's settings entry is:\n * its settings button, or the 设置 item of its account menu. The\n * self-built path is used exactly when the host has no account area, so\n * there is no host copy of this row to step aside for.\n */\n function syncSettingsItem(settingsItem: Element | null) {\n if (settingsItem === null) return\n let labelText = copyLabel('accountSettingsRow', 'Settings')\n const trigger = hostMenu.settingsTrigger()\n if (trigger) {\n let txt = (trigger.textContent || '').trim()\n if (!txt) txt = trigger.getAttribute('aria-label') || ''\n if (txt) labelText = txt\n }\n const txtEl = settingsItem.querySelector('.dsh-claude-popover-item-text')\n if (txtEl && txtEl.textContent !== labelText) txtEl.textContent = labelText\n }\n\n return {\n syncAvatar: syncAccountAvatar,\n buildHeader: buildAccountHeader,\n syncHeader: syncAccountHeader,\n buildHostContainer,\n buildSettingsItem,\n syncSettingsItem\n }\n}\n", "import { requestFrame } from '../../core/frame'\nimport { ACCOUNT_MENU_ATTR, ACCOUNT_READY_ATTR } from '../../constants'\nimport { createStamp } from '../../shared/dom'\n\n/** Where the skin's account rows live: the host's own account menu, or the skin's self-built popover. */\nexport type AccountSurfaceMode = 'host' | 'synthetic'\n\n/**\n * The account surface: one row model, two mount points.\n *\n * A host with an account area (Desktop 0.1.7+) owns the entry — its own\n * account row, restyled by the stylesheet, opens its own account menu. The\n * host renders that menu's list itself and unmounts it on close, so this\n * surface re-identifies the list every pass and injects our container at its\n * head: the first child INSIDE the list, never a sibling of the host's rows.\n * The list is content-matched (account/host-menu.ts), so the permission\n * control's menu and the model picker's submenu are never touched.\n *\n * A host without one (Web) gets a self-built trigger and popover\n * (account-footer.ts); that popover's body is the container.\n *\n * A closed list leaves no reference behind: the next open builds a fresh\n * container. A host re-render that merely empties the list is healed by\n * re-inserting the node we still hold, so our rows survive it unchanged.\n */\nexport function createAccountSurface(options: {\n hostTrigger(): HTMLElement | null\n findMenu(): HTMLElement | null\n menuViewport(menu: Element): Element | null\n buildContainer(): HTMLElement\n syntheticContainer(): HTMLElement | null\n onMode(mode: AccountSurfaceMode): void\n onMenu?(menu: HTMLElement | null): void\n}) {\n let mode: AccountSurfaceMode | null = null\n let hostContainer: HTMLElement | null = null\n /** The open account menu, marked for the stylesheet. */\n const menuStamp = createStamp(ACCOUNT_MENU_ATTR)\n\n function detect(): AccountSurfaceMode {\n return options.hostTrigger() !== null ? 'host' : 'synthetic'\n }\n\n function container() {\n return mode === 'host' ? hostContainer : options.syntheticContainer()\n }\n\n /**\n * Stamp the open account menu so the stylesheet can tell the host's\n * hashed card from its other menus, and clear the stamp when it is gone.\n * Value-change only: the attribute is written on the transition, never\n * once per pass. The transition is also reported to the caller, which\n * binds its hover behaviour on the menu the host has just mounted.\n */\n function markMenu(menu: HTMLElement | null) {\n if (menuStamp.current() === menu) return\n menuStamp.mark(menu)\n if (options.onMenu) options.onMenu(menu)\n }\n\n /**\n * Reveal the host's card once it is the card the reader will see.\n *\n * The host mounts its card with its own rows and places it from that\n * geometry; our container lands a frame later, the card grows, and the host\n * re-places it on the frame after the list changed. Revealing on the mount\n * frame would fade the card in at the height and the place it is about to\n * leave, so the stylesheet holds it (the armed window, constants.ts) until\n * our rows are in the list AND its placement has stopped moving — a\n * placement read twice with the same value, after the rows landed. A card\n * that carries no inline placement has nothing to wait for and is revealed\n * as soon as the rows are in; one that never settles is revealed at the\n * bound rather than staying unpainted. The watch stops with the card.\n */\n function revealMenu(menu: HTMLElement) {\n if (menu.hasAttribute(ACCOUNT_READY_ATTR)) return\n let lastTop: string | null = null\n let stable = 0\n let tries = 0\n const look = () => {\n if (!menu.isConnected || menu.hasAttribute(ACCOUNT_READY_ATTR)) return\n const rows = hostContainer !== null && hostContainer.isConnected && hostContainer.childElementCount > 0\n const top = menu.style.top\n stable = rows && top !== '' && top === lastTop ? stable + 1 : 0\n lastTop = top\n if (stable >= 1 || (rows && top === '') || tries >= 10) {\n menu.setAttribute(ACCOUNT_READY_ATTR, '')\n return\n }\n tries += 1\n requestFrame({ write: look })\n }\n requestFrame({ write: look })\n }\n\n function syncHost() {\n const menu = options.findMenu()\n if (menu === null) {\n // Closed: the host unmounted the list, and our node is dead to us.\n markMenu(null)\n hostContainer = null\n return\n }\n markMenu(menu)\n const viewport = options.menuViewport(menu)\n if (viewport === null) {\n hostContainer = null\n revealMenu(menu)\n return\n }\n if (hostContainer === null) hostContainer = options.buildContainer()\n // Re-insert whenever the host has moved or dropped us. This is the\n // self-heal, and it is also what keeps our container first.\n if (viewport.firstChild !== hostContainer) viewport.insertBefore(hostContainer, viewport.firstChild)\n revealMenu(menu)\n }\n\n function sync() {\n const next = detect()\n if (next !== mode) {\n mode = next\n hostContainer = null\n options.onMode(mode)\n }\n if (mode === 'host') syncHost()\n }\n\n return {\n mode() { return mode },\n container,\n clearMenu() { markMenu(null) },\n sync\n }\n}\n", "import { ACCOUNT_ARMED_ATTR, AUTO_POPOVER_OFF } from '../../constants'\nimport { findFootArea, getUsername } from '../../core/host'\nimport { readPrefs } from '../../core/prefs'\nimport { createFooterMirror } from './footer-mirror'\nimport { createHostAccountMenu } from './host-menu'\nimport { createAccountProfile } from './profile'\nimport { createAccountRows } from './rows'\nimport { createAccountSurface } from './surface'\nimport type { AccountSurfaceMode } from './surface'\nimport { POPOVER_CLOSE_DELAY, POPOVER_OPEN_DELAY, closeOtherPopovers, createHoverIntent, positionAnchoredPopover, registerPopover, removeStrayNodes, unregisterPopover } from '../../shared/popover'\nimport type { HostContext } from '../../core/host'\nimport type { CloseReason, FeatureHandle } from '../../core/scheduler'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './account-footer.manifest'\n\n/** The account footer's handle (ui.footer): the settings drive and whether its drawer is open. */\nexport interface FooterHandle extends FeatureHandle {\n openSettings(): void\n isOpen(): boolean\n}\n\n/**\n * The account area of the sidebar footer.\n *\n * One row model, two mount points (account/surface.ts): on a host that has\n * an account row (Desktop 0.1.7+) that row is the entry and our container is\n * injected into the host's own account menu; on a host without one (Web)\n * the skin self-builds the trigger and the popover and the popover's\n * body is the container. The rows themselves — the account header with the\n * hold-screen easter egg, the plugin footer entries (account/footer-mirror.ts)\n * and, on the self-built path only, the settings row — are shared.\n */\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n /** The marker the stylesheet hangs the host account row's Claude shape on. */\n const HOST_ROW_ATTR = 'data-dsh-claude-account-host-row'\n const profile = createAccountProfile(ctx, () => {\n if (typeof ui.schedule === 'function') ui.schedule()\n })\n let accountBtn: HTMLElement | null = null\n let accountPopover: HTMLElement | null = null\n let popoverBody: HTMLElement | null = null\n let settingsItem: HTMLElement | null = null\n const popoverHoverIntent = createHoverIntent(openPopover, closePopover, POPOVER_OPEN_DELAY, POPOVER_CLOSE_DELAY)\n // The host path's hover intent. The host owns its menu and unmounts it on\n // close, so this drives the host's trigger and dismisses the menu with the\n // Escape the host's own Menu handles.\n const hostHoverIntent = createHoverIntent(openHostMenu, closeHostMenuForHover, POPOVER_OPEN_DELAY, POPOVER_CLOSE_DELAY)\n /**\n * Identity of the row bindings THIS generation installed. A client reload\n * drops the old generation's disposals but the host's row node outlives\n * them, so a boolean guard would leave the new generation's listeners\n * unattached (the same reason session-stats keeps a binding token).\n */\n const hostRowBindingToken = {}\n // Whether the popover is up because it was CLICKED (rather than hovered).\n // Clicking the account row opens the ban-screen easter egg and leaves the\n // pointer inside the popover, so without this the row's own mouseleave\n // would tear the popover down behind the overlay; a click-opened popover\n // instead stays until the pointer leaves the whole footer.\n let popoverOpenedByClick = false\n\n function isPopoverOpen() {\n return !!(accountPopover && accountPopover.getAttribute('data-open') === 'true')\n }\n\n function openPopover() {\n if (!accountPopover || !accountBtn) return\n cancelClosePopover()\n closeOtherPopovers('account')\n // Mirrors are frozen while the popover is open (footer-mirror.sync\n // bails), so reconcile them here — before the reveal — to show fresh\n // content/order and bind click targets for the upcoming interaction.\n // Opening must not fail because of a mirror sync; a failing one is reported.\n try {\n const footArea = findFootArea()\n if (footArea) mirror.sync(footArea)\n } catch (error) { reportError(error) }\n // Resolve the rail anchor before the reveal so the panel never paints at\n // its stale coordinates for a frame.\n positionAccountPopover()\n accountPopover.setAttribute('data-open', 'true')\n accountBtn.setAttribute('data-open', 'true')\n accountBtn.setAttribute('aria-expanded', 'true')\n }\n\n function closePopover() {\n if (!accountPopover || !accountBtn) return\n cancelClosePopover()\n popoverOpenedByClick = false\n accountPopover.setAttribute('data-open', 'false')\n accountBtn.setAttribute('data-open', 'false')\n accountBtn.setAttribute('aria-expanded', 'false')\n }\n\n function togglePopover() {\n if (!accountPopover) return\n if (isPopoverOpen()) {\n closePopover()\n } else {\n // The pointer stays on the trigger after a click, and the popover\n // hangs below it, so the trigger's mouseleave must not close what the\n // click just opened — otherwise the panel is unreachable with a mouse.\n popoverOpenedByClick = true\n openPopover()\n }\n }\n\n function cancelClosePopover() {\n popoverHoverIntent.cancel()\n }\n\n function scheduleClosePopover() {\n popoverHoverIntent.scheduleClose()\n }\n\n /**\n * Anchor the account popover to its trigger while the sidebar is a rail.\n *\n * In the rail the popover is `position: fixed` (features/account/account-footer.css): the sidebar\n * column clips its overflow, so an absolutely positioned panel would be cut\n * off at the 56px rail edge and never seen. Its coordinates therefore have\n * to be resolved here — the same contract the model picker's popovers use.\n * The declarations are written `important` because the stylesheet anchors\n * the wide-sidebar popover with `!important` as well, and an author\n * `!important` beats a plain inline declaration.\n *\n * With the sidebar wide the CSS anchor is the right one, so the inline\n * overrides are dropped again and the footer rule takes over.\n */\n function positionAccountPopover() {\n if (!accountPopover || !accountBtn) return\n if (accountBtn.closest('[class*=\"_collapsed\"]') === null) {\n accountPopover.style.removeProperty('left')\n accountPopover.style.removeProperty('top')\n return\n }\n positionAnchoredPopover(accountBtn, accountPopover, { side: 'right', important: true })\n }\n\n const hostMenu = createHostAccountMenu({ close: closePopover })\n const rows = createAccountRows({\n hostMenu,\n // Drawing the launcher's head is asynchronous and changes no DOM the\n // observer can see, so the picture asks for the pass that paints it.\n onChange() {\n if (typeof ui.schedule === 'function') ui.schedule()\n },\n openBan() {\n // Leave the surface up: the overlay is a full-window surface, so what\n // is behind it does not matter, and the footer is left as the user\n // had it once the screen is dismissed.\n popoverOpenedByClick = true\n if (ui.ban) ui.ban.open()\n }\n })\n const surface = createAccountSurface({\n hostTrigger: hostMenu.trigger,\n findMenu: hostMenu.findMenu,\n menuViewport: hostMenu.menuViewport,\n buildContainer: rows.buildHostContainer,\n syntheticContainer() { return popoverBody },\n onMode: onSurfaceMode,\n onMenu: onHostMenuChanged\n })\n const mirror = createFooterMirror({\n body() { return surface.container() },\n anchor() { return settingsItem },\n isOpen() { return surface.mode() === 'synthetic' && isPopoverOpen() },\n close: closeSurface\n })\n // The account area takes part in the shared popover rule (shared/popover.ts):\n // ONE entry for both surfaces, since a given host has only one of them.\n registerPopover('account', closeAccountSurfaces)\n /** The entry row's width, as last written to the stylesheet. */\n let accountWidth = 0\n /** The self-built drawer's distance from the footer's edges, as last written. */\n let accountInsetLeft = -1\n let accountInsetRight = -1\n\n /**\n * Build (or reuse) the self-built trigger and popover and return the\n * popover body. Idempotent against a torn-down-less reload: client HMR\n * drops the old fiber's disposals instead of running them, so a previous\n * generation's button and popover are still in the DOM and this fresh\n * scope knows nothing of them. Sweep the strays before deciding whether to\n * build — otherwise the row renders twice (and the orphan keeps a stale\n * name).\n */\n function ensureSynthetic(footArea: Element) {\n const username = getUsername()\n removeStrayNodes(footArea, '.dsh-claude-account-btn', [accountBtn])\n removeStrayNodes(document, '.dsh-claude-account-popover', [accountPopover])\n\n if (accountBtn === null || !footArea.contains(accountBtn)) {\n if (accountBtn && accountBtn.parentElement) accountBtn.parentElement.removeChild(accountBtn)\n accountBtn = document.createElement('div')\n accountBtn.className = 'dsh-claude-account-btn'\n accountBtn.setAttribute('role', 'button')\n accountBtn.setAttribute('tabindex', '0')\n accountBtn.setAttribute('aria-haspopup', 'menu')\n accountBtn.setAttribute('aria-expanded', 'false')\n accountBtn.innerHTML =\n '<span class=\"dsh-claude-account-avatar\"></span>' +\n '<span class=\"dsh-claude-account-label\">' +\n '<span class=\"dsh-claude-account-user\"></span>' +\n '</span>' +\n '<span class=\"dsh-claude-account-chevron\"></span>'\n\n // Hover is the default way in; the \"Open popovers on hover\"\n // preference turns it off, leaving the click handler below as the only\n // way in (and the only way out, so a click-opened popover does not\n // vanish when the pointer leaves). The account row is the one popover\n // the `account` scope keeps on hover.\n accountBtn.addEventListener('mouseenter', () => {\n if (readPrefs().autoPopover !== AUTO_POPOVER_OFF) popoverHoverIntent.scheduleOpen()\n })\n accountBtn.addEventListener('mouseleave', () => {\n if (readPrefs().autoPopover !== AUTO_POPOVER_OFF && !popoverOpenedByClick) scheduleClosePopover()\n })\n accountBtn.addEventListener('click', e => {\n e.stopPropagation()\n togglePopover()\n })\n footArea.appendChild(accountBtn)\n }\n // The name and the picture are user- and host-supplied (a preference, the\n // OS user, the account profile), so they are written as text and as an\n // image source, never spliced into markup — and synced on every pass, so a\n // profile that lands after the row was built still shows up.\n const userEl = accountBtn.querySelector('.dsh-claude-account-user')\n if (userEl && userEl.textContent !== username) userEl.textContent = username\n rows.syncAvatar(accountBtn.querySelector('.dsh-claude-account-avatar'))\n\n if (accountPopover === null || !footArea.contains(accountPopover)) {\n if (accountPopover && accountPopover.parentElement) accountPopover.parentElement.removeChild(accountPopover)\n accountPopover = document.createElement('div')\n accountPopover.id = 'dsh-claude-account-popover'\n accountPopover.className = 'dsh-claude-popover-card dsh-claude-account-popover'\n accountPopover.setAttribute('data-open', 'false')\n\n accountPopover.addEventListener('mouseenter', () => {\n cancelClosePopover()\n })\n accountPopover.addEventListener('mouseleave', () => {\n // The hold screen takes the window, so its opening \"leaves\" the\n // card without the pointer moving; that leave must not fold the\n // drawer behind the page (openBan leaves the footer as it was).\n if (ui.ban?.isOpen() === true) return\n scheduleClosePopover()\n })\n\n accountPopover.appendChild(rows.buildHeader(username))\n\n popoverBody = document.createElement('div')\n popoverBody.className = 'dsh-claude-account-popover-body'\n accountPopover.appendChild(popoverBody)\n\n settingsItem = null\n footArea.appendChild(accountPopover)\n }\n\n // Built together with the popover above.\n const body = popoverBody!\n if (settingsItem === null || !body.contains(settingsItem)) {\n settingsItem = rows.buildSettingsItem()\n body.appendChild(settingsItem)\n }\n rows.syncSettingsItem(settingsItem)\n return body\n }\n\n /** Remove the self-built trigger and popover (the host path's shape). */\n function dropSynthetic() {\n cancelClosePopover()\n removeStrayNodes(document, '.dsh-claude-account-btn, .dsh-claude-account-popover', [])\n accountBtn = null\n accountPopover = null\n popoverBody = null\n settingsItem = null\n }\n\n /**\n * Close the active surface after one of OUR rows was picked. The host's\n * menu belongs to the host: it is dismissed the way the host dismisses it\n * (an Escape its own Menu handles), never by driving its trigger. The\n * self-built popover is ours and closes directly.\n */\n function closeSurface() {\n if (surface.mode() === 'host') {\n const menu = hostMenu.findMenu()\n if (menu !== null) {\n // The scheduler's key handler must not read this as a user's Esc\n // (it would close every overlay, the hold screen included): the\n // event is this skin's own dismissal, addressed to the host's Menu\n // alone.\n const escape = new KeyboardEvent('keydown', { key: 'Escape', bubbles: true, cancelable: true })\n escape.__dshHostMenuEscape = true\n menu.dispatchEvent(escape)\n }\n return\n }\n closePopover()\n }\n\n /**\n * Close whichever account surface is up, for the shared popover rule\n * (shared/popover.ts): the self-built drawer directly, the host's menu the\n * way the host dismisses it. Both halves are no-ops while their surface is\n * down, so this is safe to call on every open of every other popover.\n */\n function closeAccountSurfaces() {\n if (surface.mode() === 'host') closeSurface()\n else closePopover()\n }\n\n /**\n * Open the host's account menu for the hover preference. The menu is the\n * host's, so it is opened by driving its trigger; when it is already up\n * (the pointer re-entered the row) nothing is pressed, or the host's own\n * toggle would close it.\n */\n /** Set from the row's hover or press until the menu closes (constants.ts). */\n function armAccountMenu() {\n if (!document.body.hasAttribute(ACCOUNT_ARMED_ATTR)) document.body.setAttribute(ACCOUNT_ARMED_ATTR, '')\n }\n\n function disarmAccountMenu() {\n if (document.body.hasAttribute(ACCOUNT_ARMED_ATTR)) document.body.removeAttribute(ACCOUNT_ARMED_ATTR)\n }\n\n function openHostMenu() {\n if (surface.mode() !== 'host') return\n if (hostMenu.findMenu() !== null) return\n closeOtherPopovers('account')\n armAccountMenu()\n hostMenu.openMenu()\n }\n\n /**\n * Close the host's menu for the hover preference.\n *\n * The host renders the row and portals the card, and the card moves over\n * its first placement frames, so a leave can arrive while the pointer is\n * still on the row or on the card. Only a pointer that is genuinely\n * elsewhere dismisses the menu; the next leave closes it.\n *\n * The hold-screen overlay covers the whole window, so opening it \"leaves\"\n * the row and the card without the pointer moving: that leave stands down\n * — the surface the reader had behind the page stays up and the footer is\n * handed back as it was once the screen is dismissed.\n */\n function closeHostMenuForHover() {\n if (ui.ban?.isOpen() === true) return\n const row = hostMenu.trigger()\n if (row !== null && row.matches(':hover')) return\n const menu = hostMenu.findMenu()\n if (menu !== null && menu.matches(':hover')) return\n closeSurface()\n }\n\n /**\n * The host row's bindings as this generation installed them, so the teardown\n * can take them off again. The token alone keeps a generation from binding the\n * same node twice; a node the host keeps across generations (its own account\n * row) would otherwise collect one set of listeners per switch.\n */\n const hostRowBindings = new Map<HTMLElement, { enter: () => void, leave: () => void, press: () => void }>()\n /** The host's menu bindings this generation installed, taken off with it. */\n const hostMenuBindings = new Map<HTMLElement, { enter: () => void, leave: () => void }>()\n\n /**\n * Bind the hover preference on the host's account row. The host renders\n * that row, so its listeners are bound in place and guarded per element:\n * a host re-render that replaces the row must not stack a second pair.\n */\n function bindHostRowHover(row: HTMLElement) {\n if (row.__dshHostRowToken === hostRowBindingToken) return\n row.__dshHostRowToken = hostRowBindingToken\n const enter = () => {\n if (readPrefs().autoPopover !== AUTO_POPOVER_OFF) hostHoverIntent.scheduleOpen()\n }\n const leave = () => {\n if (readPrefs().autoPopover !== AUTO_POPOVER_OFF) hostHoverIntent.scheduleClose()\n }\n // The row's own click opens the menu too (autoPopover off, or a press\n // before the hover delay elapsed). A listener on the row runs in the\n // target phase, ahead of the host's own delegated onClick, so the armed\n // marker is in place before the host mounts the card.\n const press = () => {\n armAccountMenu()\n }\n row.addEventListener('mouseenter', enter)\n row.addEventListener('mouseleave', leave)\n row.addEventListener('click', press)\n hostRowBindings.set(row, { enter, leave, press })\n }\n\n /**\n * The host mounts and unmounts its menu around each open. Entering the\n * card cancels the row's pending close; leaving it schedules the close\n * that dismisses the menu.\n */\n function onHostMenuChanged(menu: HTMLElement | null) {\n if (menu === null) {\n disarmAccountMenu()\n return\n }\n if (menu.__dshHostHoverToken === hostRowBindingToken) return\n menu.__dshHostHoverToken = hostRowBindingToken\n const enter = () => {\n if (readPrefs().autoPopover !== AUTO_POPOVER_OFF) hostHoverIntent.cancel()\n }\n const leave = () => {\n if (readPrefs().autoPopover !== AUTO_POPOVER_OFF) hostHoverIntent.scheduleClose()\n }\n menu.addEventListener('mouseenter', enter)\n menu.addEventListener('mouseleave', leave)\n hostMenuBindings.set(menu, { enter, leave })\n }\n\n function onSurfaceMode(mode: AccountSurfaceMode) {\n // The host's account row is the entry on that host, so the self-built\n // trigger and popover have no job there.\n if (mode === 'host') dropSynthetic()\n }\n\n /**\n * Hand the sidebar footer back to the host.\n *\n * The \"Collapse the sidebar settings area\" preference turns the whole\n * takeover off, so the skin's own nodes and injected container go and\n * every marker it put on the host's entries is removed — with the\n * stylesheet's takeover rules gated on the same attribute, the footer then\n * renders exactly as shipped.\n */\n function dropAccountFooter(footArea: Element | null) {\n cancelClosePopover()\n hostHoverIntent.cancel()\n disarmAccountMenu()\n if (accountWidth !== 0) {\n accountWidth = 0\n document.body.style.removeProperty('--dsh-claude-account-width')\n }\n if (accountInsetLeft !== -1 || accountInsetRight !== -1) {\n accountInsetLeft = -1\n accountInsetRight = -1\n document.body.style.removeProperty('--dsh-claude-account-inset-left')\n document.body.style.removeProperty('--dsh-claude-account-inset-right')\n }\n dropSynthetic()\n // The menu marker goes with the takeover: an open host menu must not\n // keep the skin's card styling after the footer is handed back.\n surface.clearMenu()\n const injected = document.querySelectorAll('.dsh-claude-account-inject')\n for (let i = 0; i < injected.length; i++) injected[i].remove()\n const marked = document.querySelectorAll(`[${HOST_ROW_ATTR}]`)\n for (let m = 0; m < marked.length; m++) marked[m].removeAttribute(HOST_ROW_ATTR)\n // The host's row outlives this generation, so its listeners come off here:\n // a switch off and on again must not leave a second set behind.\n for (const [row, bindings] of hostRowBindings) {\n row.removeEventListener('mouseenter', bindings.enter)\n row.removeEventListener('mouseleave', bindings.leave)\n row.removeEventListener('click', bindings.press)\n delete row.__dshHostRowToken\n }\n hostRowBindings.clear()\n for (const [menu, bindings] of hostMenuBindings) {\n menu.removeEventListener('mouseenter', bindings.enter)\n menu.removeEventListener('mouseleave', bindings.leave)\n delete menu.__dshHostHoverToken\n }\n hostMenuBindings.clear()\n if (footArea) mirror.clear(footArea)\n }\n\n /**\n * Measure the entry row and hand its box to the stylesheet.\n *\n * The host's account menu is portalled outside the sidebar, so it cannot\n * inherit the row's width: the card reads the measured width from\n * --dsh-claude-account-width. The self-built drawer is a child of the\n * footer instead, but the footer's padding box is wider than the row, so\n * its left and right are the measured distances from the footer's edges.\n * Every value is written only on a change.\n */\n function syncAccountRowBox(row: Element | null, footArea: Element) {\n if (row === null) return\n const rowRect = row.getBoundingClientRect()\n const rowWidth = Math.round(rowRect.width)\n if (rowWidth > 0 && rowWidth !== accountWidth) {\n accountWidth = rowWidth\n document.body.style.setProperty('--dsh-claude-account-width', `${rowWidth}px`)\n }\n if (surface.mode() !== 'synthetic') return\n const footRect = footArea.getBoundingClientRect()\n const left = Math.round(rowRect.left - footRect.left)\n const right = Math.round(footRect.right - rowRect.right)\n if (left !== accountInsetLeft) {\n accountInsetLeft = left\n document.body.style.setProperty('--dsh-claude-account-inset-left', `${left}px`)\n }\n if (right !== accountInsetRight) {\n accountInsetRight = right\n document.body.style.setProperty('--dsh-claude-account-inset-right', `${right}px`)\n }\n }\n\n function syncAccountFooter() {\n const footArea = findFootArea()\n if (footArea === null) return\n\n if (!readPrefs().collapseFooter) {\n dropAccountFooter(footArea)\n return\n }\n surface.sync()\n if (surface.mode() === 'host') {\n dropSynthetic()\n } else {\n ensureSynthetic(footArea)\n }\n\n // The host's own account row is the entry on the host path: mark it so\n // the stylesheet can repaint it as a Claude row. It is left in the host's\n // DOM and flow, never moved or copied.\n const hostTrigger = hostMenu.trigger()\n if (hostTrigger !== null && !hostTrigger.hasAttribute(HOST_ROW_ATTR)) hostTrigger.setAttribute(HOST_ROW_ATTR, '')\n // The entry row — the host's own row, or the self-built button — is the\n // shape both cards have to match, so its box is measured here and handed\n // to the stylesheet. The hover preference is bound on the host's row in\n // the same pass, since the host renders that row itself.\n const entryRow = surface.mode() === 'host' ? hostTrigger : accountBtn\n syncAccountRowBox(entryRow, footArea)\n if (hostTrigger !== null) bindHostRowHover(hostTrigger)\n\n // The host's footer entries are hidden in place on every pass, drawer or\n // no drawer: the host re-renders them, and a pass that skipped this left\n // their icons painted beside the account row until the drawer had been\n // opened once. Only the mirroring needs a container to write into.\n mirror.sync(footArea)\n\n const root = surface.mode() === 'host' ? surface.container() : accountPopover\n if (root === null) return\n rows.syncHeader(root, hostTrigger)\n // The rail toggle (and any reflow) moves the anchor without a window\n // resize or a page scroll, so an open drawer re-resolves its position at\n // the end of its own pass.\n if (isPopoverOpen()) positionAccountPopover()\n }\n\n ui.footer = {\n sync: syncAccountFooter,\n /**\n * The self-built drawer's dismiss routes: 'outside' (a press the footer\n * does not own), 'escape' and 'composer'. The shipped scheduler only\n * closed an OPEN drawer on an outside press, so that reason keeps the\n * open check; Esc and composer focus close regardless. On the host path\n * the drawer is null, so this is a no-op and the host keeps its own\n * dismissal.\n */\n close(reason?: CloseReason) {\n if (reason === 'outside' && !isPopoverOpen()) return\n closePopover()\n },\n openSettings: hostMenu.openSettings,\n /** Ctrl+, opens settings, and the key goes no further. */\n onKey(e: KeyboardEvent) {\n if (!(e.ctrlKey || e.metaKey) || e.key !== ',') return\n e.preventDefault()\n hostMenu.openSettings()\n },\n owns(target: Node) {\n if (!target) return false\n if (accountBtn !== null && accountBtn.contains(target)) return true\n if (accountPopover !== null && accountPopover.contains(target)) return true\n const container = surface.container()\n return container !== null && container.contains(target)\n },\n isOpen() { return isPopoverOpen() },\n /** Re-anchor an open drawer after a viewport change; a closed one has\n * nothing to place. */\n reposition() {\n if (!isPopoverOpen()) return\n positionAccountPopover()\n }\n }\n return () => {\n profile.stop()\n unregisterPopover('account')\n dropAccountFooter(findFootArea())\n }\n}\n", "import { DARK_THEME_ATTRIBUTE } from '@dsh-claude-style/contracts/dom'\nimport { subscribeMutations } from '../../core/bus'\nimport { requestFrame } from '../../core/frame'\n\n/**\n * The skin's own 0.12s border/box-shadow transitions (composer card, input\n * scroll, attachment rail, hero tray) are worth keeping for hover/focus, but\n * a theme flip re-runs them: the canvas repaints in one recalc (CSS\n * variables swap with the attribute) while the borders and halos ease in\n * behind it — the staged \"colours first, styles later\" beat. Two layers\n * make the swap land in one frame:\n *\n * 1. An attribute on <html> and <body> suppresses every transition the\n * suppression rule can out-specify (see theme-flip.css).\n * 2. A forced style flush inside the flip's microtask, then cancelling\n * every running paint transition: the flush makes the transitions the\n * flip would start NOW (before any paint), and cancel() snaps\n * their properties to the final values in the same frame. This covers\n * the high-specificity rules the stylesheet cannot out-specify (the\n * input scroll is (0,6,1), the rail (0,7,1)). A cancel in a rAF would\n * be one frame late — recalc runs after rAF callbacks.\n *\n * Only paint properties themes actually change are cancelled; transform\n * and opacity transitions (hover/menu feedback) keep running. The flag\n * comes down after a short window, so everyday hover/focus feel is\n * untouched.\n *\n * The host flips `data-ds-dark-theme` on <body> itself; this subscription\n * only times the suppression around that flip. It is a channel of its own on\n * the observation bus (D40): the scheduler's pass only hears\n * aria-label/aria-selected (D9), and this flag must not feed it.\n */\nexport const THEME_FLIP_ATTR = 'data-dsh-theme-transitioning'\nexport const THEME_FLIP_MS = 300\n// Paint properties a theme flip changes; cancelling their transitions\n// snaps them to the new theme's values in one frame.\nexport const THEME_FLIP_PROPS: Record<string, boolean> = {\n 'border-color': true,\n 'border': true,\n 'border-top-color': true,\n 'border-right-color': true,\n 'border-bottom-color': true,\n 'border-left-color': true,\n 'box-shadow': true,\n 'color': true,\n 'background-color': true,\n 'background': true,\n 'background-image': true,\n 'outline-color': true,\n 'fill': true,\n 'stroke': true,\n 'text-decoration-color': true,\n 'caret-color': true\n}\n\nexport function install() {\n const body = document.body\n const root = document.documentElement\n let flipTimer: ReturnType<typeof setTimeout> | null = null\n /** Cancels the next frame of the transition sweep. */\n let cancelSweep: (() => void) | null = null\n\n // The flag lives on <html> AND <body> so the suppression selector can\n // out-specify the gated composer rules it can (html[flag] body[skin][flag] *).\n function setFlag(on: boolean) {\n root.toggleAttribute(THEME_FLIP_ATTR, on)\n body.toggleAttribute(THEME_FLIP_ATTR, on)\n }\n\n function cancelThemeTransitions() {\n const anims = document.getAnimations()\n for (let i = 0; i < anims.length; i++) {\n const anim = anims[i]\n // CSSTransition carries transitionProperty; CSSAnimation does not.\n if (!(anim instanceof CSSTransition)) continue\n if (!THEME_FLIP_PROPS[anim.transitionProperty]) continue\n anim.cancel()\n }\n }\n\n function onThemeFlip() {\n setFlag(true)\n // Force the flip's style recalc right now — inside this microtask,\n // before any paint — so every transition it would start has started.\n void root.offsetHeight\n cancelThemeTransitions()\n // The host may commit more of the flip after us; sweep the next two\n // frames to catch those starts as well.\n if (cancelSweep !== null) cancelSweep()\n cancelSweep = requestFrame({\n write() {\n cancelThemeTransitions()\n cancelSweep = requestFrame({\n write() {\n cancelSweep = null\n cancelThemeTransitions()\n },\n })\n },\n })\n if (flipTimer !== null) clearTimeout(flipTimer)\n flipTimer = setTimeout(() => {\n setFlag(false)\n flipTimer = null\n }, THEME_FLIP_MS)\n }\n\n // Called inside the flip's own mutation microtask, before any paint (D40).\n const stopThemeWatch = subscribeMutations(body, { attributeFilter: [DARK_THEME_ATTRIBUTE] }, onThemeFlip)\n\n return () => {\n stopThemeWatch()\n if (cancelSweep !== null) cancelSweep()\n if (flipTimer !== null) clearTimeout(flipTimer)\n setFlag(false)\n }\n}\n", "import * as React from 'react'\nimport * as primitives from '@deepseek-ai/dsh-client-ui-primitives'\nimport * as reactDom from 'react-dom/client'\nimport { SESSION_DELETE_ROUTE } from '../../constants'\nimport { copyLabel } from '../../core/i18n'\nimport { buildElement, closestFrom, createStamp } from '../../shared/dom'\nimport { removeStrayNodes } from '../../shared/popover'\nimport type { HostAnswer } from '../../shared/resource'\nimport { createSlidingPill } from '../../shared/sliding-pill'\nimport type { HostContext, HostValue } from '../../core/host'\nimport type { HostSessionsService, HostWorkspacesService } from '@dsh-claude-style/contracts/services'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './workspace-view.manifest'\n\n/**\n * The sidebar's workspace section, re-cut as a two-state view.\n *\n * 进行中 needs no filtering of its own: the host's tree already leaves\n * archived sessions out (measured on 0.1.7-alpha.1 — 10 rows, 6 archived, zero\n * overlap). 已归档 is the skin's own flat list of archived conversations, a\n * live projection of the host's two client lists — the workspace\n * controller's archive set (ids) and the session list (titles and times) —\n * with an unarchive and a delete button on every row.\n *\n * The host DOES ship this filter, but its state lives in the viewing store\n * the ui-workspace plugin creates privately (`createWorkspaceViewStore`) and\n * is not reachable as a client service — the only way to use it is to click its options menu, which flashes\n * a popover in the user's face and still leaves the archived rows buried in\n * collapsed workspace groups. Listing them here is quieter and flat.\n *\n * @param ctx - client context.\n * @param ui - shared handle table.\n * @returns teardown.\n */\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n /**\n * The host's own Tooltip, Toast and icons, reached through the plugin\n * loader's `require` — the same packages its UI uses, so these row actions\n * and the notice look and behave like the host's.\n */\n /** React roots holding the row actions, unmounted when the list is rebuilt. */\n let actionRoots: reactDom.Root[] = []\n /** React root holding the archived-row notice, and the show count that keys it. */\n let noticeRoot: reactDom.Root | null = null\n let noticeSeq = 0\n /** The section's view (active / archived), its heading and the host's tree, marked for workspace.css. */\n const viewStamp = createStamp('data-dsh-claude-ws-view')\n const labelStamp = createStamp('data-dsh-claude-ws-label')\n const treeStamp = createStamp('data-dsh-claude-ws-tree')\n const SEGMENTS = [\n { id: 'active', key: 'archiveActive', fallback: 'Active' },\n { id: 'archived', key: 'archiveArchived', fallback: 'Archived' }\n ]\n let view = 'active'\n let control: HTMLElement | null = null\n /** The control's sliding highlight (packages/client/src/shared/sliding-pill.ts). */\n const segmentPill = createSlidingPill('[aria-checked=\"true\"]')\n let listHost: HTMLElement | null = null\n /** `null` until both host lists have arrived; then `[{ id, title, at }]`. */\n let items: { id: string, title: string, at: number }[] | null = null\n /** Ids, titles and times of the rows on screen, joined; a list tick that changes none of them leaves the rows alone. */\n let renderedKey: string | null | undefined\n /** Rows deleted through the host half, hidden while the host's two lists catch up. */\n const deletedIds: Record<string, boolean> = {}\n /**\n * The host's workspace and session services, once both are reachable;\n * until then the section keeps its plain label. `unwatch` drops the two\n * list subscriptions.\n */\n let workspaces: HostWorkspacesService | null = null\n let sessions: HostSessionsService | null = null\n let unwatch: (() => void) | null = null\n let disposed = false\n\n function service(name: string): HostValue {\n return ctx.get(name)\n }\n\n /**\n * The workspace section's label, identified by structure, never by its\n * text: the label's own CSS-module prefix is the section root's, and that\n * root holds the session list area. A host that renames the label keeps\n * matching; a host that restructures the sidebar stops matching, and the\n * section keeps its plain label — the feature stays off rather than\n * mounting on a section that happens to be first.\n */\n function findSection() {\n const labels = document.querySelectorAll('[class*=\"sectionLabel\"]')\n for (let i = 0; i < labels.length; i++) {\n const label = labels[i]\n const match = /([^\\s]+)_sectionLabel(?:\\s|$)/.exec(label.className || '')\n if (match === null) continue\n const root = label.closest(`[class*=\"${match[1]}_root\"]`)\n if (root !== null && root.querySelector(`[class*=\"${match[1]}_listArea\"]`) !== null) return label\n }\n return null\n }\n\n /**\n * The tree's rows. `data-row-key` is what the host stamps on them; the row\n * CLASSES are the stable fallback, and the skin's own stylesheet already\n * keys off them.\n */\n const TREE_ROW_SELECTOR = '[data-row-key], [class*=\"sessionRow\"], [class*=\"projectRow\"]'\n\n function findTree(label: Element) {\n let region = label.parentElement\n while (region !== null && region !== document.body) {\n const tree = region.querySelector('[role=\"tree\"], [class*=\"_list\"]')\n if (tree !== null && tree.querySelector(TREE_ROW_SELECTOR) !== null) return tree\n region = region.parentElement\n }\n return null\n }\n\n function relativeTime(at: unknown) {\n if (typeof at !== 'number' || !isFinite(at)) return ''\n const minutes = Math.floor((Date.now() - at) / 60000)\n if (minutes < 1) return copyLabel('archiveJustNow', 'Just now')\n if (minutes < 60) return copyLabel('archiveMinutes', '{count} min', { count: minutes })\n const hours = Math.floor(minutes / 60)\n if (hours < 24) return copyLabel('archiveHours', '{count} h', { count: hours })\n return copyLabel('archiveDays', '{count} d', { count: Math.floor(hours / 24) })\n }\n\n /**\n * Follow the host's two client lists: `workspaces.list` carries the\n * registry-global archive set, `sessions.list` every session's title,\n * time and origin. Both arrive after the skin installs — the archive set\n * reads `[]` while the workspace list is still `pending` — so the rows are\n * recomputed on every tick of either list, never read once.\n * @returns whether both lists are being followed.\n */\n function watch() {\n if (unwatch !== null) return true\n const nextWorkspaces = service('workspaces')\n const nextSessions = service('sessions')\n if (nextWorkspaces === undefined || nextWorkspaces === null || nextWorkspaces.list === undefined) return false\n if (nextSessions === undefined || nextSessions === null || nextSessions.list === undefined) return false\n workspaces = nextWorkspaces\n sessions = nextSessions\n const stopArchive = nextWorkspaces.list.subscribe(refreshItems)\n const stopSessions = nextSessions.list.subscribe(refreshItems)\n unwatch = () => {\n stopArchive()\n stopSessions()\n }\n refreshItems()\n return true\n }\n\n /**\n * The archived rows, by the host's own archived-only rule (ui-workspace\n * `sessionVisible`): an archived id whose session summary has landed,\n * neither a subagent child nor a blank placeholder. Newest first.\n */\n function refreshItems() {\n if (disposed) return\n const followed = workspaces\n const followedSessions = sessions\n if (followed === null || followedSessions === null) return\n const archive = followed.list.getSnapshot()\n const list = followedSessions.list.getSnapshot()\n if (archive.phase !== 'ready' || list.phase !== 'ready') {\n items = null\n } else {\n items = []\n for (let i = 0; i < archive.archivedSessionIds.length; i++) {\n const id = archive.archivedSessionIds[i]\n const summary = list.byId[id]\n if (summary === undefined || summary.origin === 'subagent' || summary.blank || deletedIds[id] === true) continue\n items.push({ id, title: summary.displayTitle, at: summary.updatedAt })\n }\n items.sort((a, b) => b.at - a.at)\n }\n const key = items === null ? null : items.map(item => `${item.id}\\n${item.title}\\n${item.at}`).join('\\n')\n if (key === renderedKey) return\n renderedKey = key\n renderList()\n }\n\n /**\n * The host's Toast, warning glyph included, rendered by the skin itself:\n * the host's notice channel is private to ui-workspace. The Toast\n * portals to the body, and a new key restarts it the way the host\n * re-shows it.\n */\n function notifyToast(text: string) {\n if (noticeRoot === null) noticeRoot = reactDom.createRoot(document.createElement('div'))\n noticeSeq++\n noticeRoot.render(React.createElement(primitives.Toast, {\n key: `toast-${noticeSeq}`,\n text,\n icon: React.createElement(primitives.IconWarningOutlineRegular),\n onDone() { if (noticeRoot !== null) noticeRoot.render(null) },\n }))\n }\n\n /** The host's own notice for a clicked archived row (`toast.archivedNotOpenable`). */\n function notifyArchivedNotOpenable() {\n const t = ctx.get('locale').bind('workspace')\n notifyToast(t('toast.archivedNotOpenable'))\n }\n\n /**\n * Delete one stored session through the host half's own route.\n *\n * The harness gives the browser half no deletion API of its own (the\n * workspace controller archives and unarchives; the agent protocol's\n * session delete is the host delegating to an ACP agent that owns the\n * storage), so the skin's host half removes the session's stored\n * directory and drops the id from the registry's archive set before it\n * answers. A stored-directory miss answers success too — an archive\n * entry whose directory is already gone is the ghost this buries — and\n * a 404 that still carries the host's own \"session not found\" JSON is\n * the same miss from an older host half without that branch: the storage\n * is gone all the same, so the row leaves too. Every other refusal keeps\n * the row and raises the host's Toast: the \"session is open\" answer (the\n * app still holds the session's agent attached, and only a restart\n * releases it) carries its own copy, everything else names the refusal\n * the route sent.\n */\n function removeArchived(id: string) {\n fetch(SESSION_DELETE_ROUTE, {\n method: 'POST',\n credentials: 'same-origin',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ sessionId: id }),\n }).then(response => response.json().then((result: HostAnswer) => ({ status: response.status, result }))).then(({ status, result }) => {\n if (result?.ok === true || (status === 404 && result?.error === 'session not found')) {\n deletedIds[id] = true\n refreshItems()\n refreshSessions()\n return\n }\n const refusal: Error & { status?: number } = new Error(String(result?.error || `HTTP ${status}`))\n refusal.status = status\n throw refusal\n }).catch((reason: { status?: number, message?: string }) => {\n console.warn('dsh-claude-style: session delete rejected:', reason)\n notifyToast(reason?.status === 409\n ? copyLabel('archiveDeleteOpen', 'The conversation is still held open by this app; restart it, then delete again')\n : copyLabel('archiveDeleteFailed', 'Delete failed: {detail}', { detail: reason?.message ?? String(reason) }))\n })\n }\n\n /**\n * Re-pull the host's session baseline right after a delete.\n *\n * The full list is what the projection prunes by: the host's fresh list\n * answer no longer carries the removed id, so its stale summary — the\n * one that kept a deleted session looking alive — leaves `sessions.list`\n * at this pull instead of at the next reconnect, and the host's own tree\n * drops the row with it. The pull is the sessions service's single-flight\n * refresh, so a pull already under way is reused.\n */\n function refreshSessions() {\n const followed = sessions\n if (followed === null || typeof followed.refresh !== 'function') return\n // Best effort against the host's sessions service: a rejection leaves the list as it stands (D12).\n followed.refresh().catch((reason: unknown) => {\n console.warn('dsh-claude-style: session baseline refresh rejected:', reason)\n })\n }\n\n /**\n * Put a conversation back among the live ones. The row leaves this list\n * on the archive set's next tick; a refusal leaves it in place.\n */\n function restoreArchived(id: string) {\n const followed = workspaces\n if (followed === null) return\n // A refused unarchive keeps the row in the archive set; the host stays the owner of the verdict (D12).\n Promise.resolve(followed.unarchiveSession(id)).catch((reason: unknown) => {\n console.warn('dsh-claude-style: session unarchive rejected:', reason)\n })\n }\n\n /** One row action: the host's icon inside the host's tooltip. */\n function actionButton(kind: 'restore' | 'delete', label: string, onClick: (event: React.MouseEvent) => void) {\n const wrapper = buildElement('span', 'dsh-claude-archive-action')\n const className = kind === 'restore' ? 'dsh-claude-archive-restore' : 'dsh-claude-archive-delete'\n const Icon = kind === 'restore' ? primitives.IconUnarchiveOutlineRegular : primitives.IconTrashOutlineRegular\n const root = reactDom.createRoot(wrapper)\n actionRoots.push(root)\n root.render(React.createElement(primitives.Tooltip, {\n label,\n side: 'top',\n delayMs: 500,\n children: React.createElement('button', { type: 'button', className, 'aria-label': label, title: label, onClick },\n React.createElement(Icon, { size: 14 })),\n }))\n return wrapper\n }\n\n function buildArchivedRow(item: { id: string, title: string, at: number }) {\n const row = buildElement('div', 'dsh-claude-archive-row')\n row.setAttribute('role', 'button')\n row.setAttribute('tabindex', '0')\n row.setAttribute('data-session-id', item.id)\n row.appendChild(buildElement('span', 'dsh-claude-archive-title', item.title))\n row.appendChild(buildElement('span', 'dsh-claude-archive-time', relativeTime(item.at)))\n // The host's archived rows offer an unarchive action; the skin's list\n // carries the same pair, so leaving the archived view is not the only way\n // back to a conversation.\n row.appendChild(actionButton('restore', copyLabel('archiveRestore', 'Unarchive conversation'), event => {\n event.stopPropagation()\n restoreArchived(item.id)\n }))\n row.appendChild(actionButton('delete', copyLabel('archiveDelete', 'Delete conversation'), event => {\n event.stopPropagation()\n removeArchived(item.id)\n }))\n row.addEventListener('click', notifyArchivedNotOpenable)\n return row\n }\n\n function renderList() {\n if (listHost === null) return\n // The actions live in React roots; drop them before the rows go, or every\n // rebuild would leave a tree behind.\n for (let r = 0; r < actionRoots.length; r++) {\n actionRoots[r].unmount()\n }\n actionRoots = []\n while (listHost.firstChild) listHost.removeChild(listHost.firstChild)\n if (items === null) {\n listHost.appendChild(buildElement('div', 'dsh-claude-archive-status', copyLabel('archiveLoading', 'Loading…')))\n return\n }\n if (items.length === 0) {\n listHost.appendChild(buildElement('div', 'dsh-claude-archive-status', copyLabel('archiveEmpty', 'No archived conversations')))\n return\n }\n for (let i = 0; i < items.length; i++) listHost.appendChild(buildArchivedRow(items[i]))\n }\n\n function buildControl() {\n const group = buildElement('div', 'dsh-claude-ws-segments')\n group.setAttribute('role', 'radiogroup')\n for (let i = 0; i < SEGMENTS.length; i++) {\n const item = buildElement('button', 'dsh-claude-ws-segment', '')\n item.type = 'button'\n item.setAttribute('role', 'radio')\n item.setAttribute('data-view', SEGMENTS[i].id)\n group.appendChild(item)\n }\n group.addEventListener('click', event => {\n const item = closestFrom(event.target, '.dsh-claude-ws-segment')\n if (item === null) return\n event.stopPropagation()\n event.preventDefault()\n setView(item.getAttribute('data-view'))\n })\n return group\n }\n\n function setView(next: string | null) {\n if (next !== 'active' && next !== 'archived') return\n if (next === view) return\n view = next\n sync()\n }\n\n function sync() {\n const label = findSection()\n if (label === null || label.parentElement === null) return\n const header = label.parentElement\n // Until the host's workspace and session services are both reachable\n // the section keeps its plain label.\n if (!watch()) return\n labelStamp.mark(label)\n if (control === null || control.parentElement !== header) {\n if (control !== null && control.parentElement !== null) control.parentElement.removeChild(control)\n control = buildControl()\n header.insertBefore(control, header.firstChild)\n }\n for (let i = 0; i < control.children.length; i++) {\n const item = control.children[i]\n const id = item.getAttribute('data-view')\n for (let s = 0; s < SEGMENTS.length; s++) {\n if (SEGMENTS[s].id !== id) continue\n const text = copyLabel(SEGMENTS[s].key, SEGMENTS[s].fallback)\n if (item.textContent !== text) item.textContent = text\n }\n const on = id === view\n if (item.getAttribute('aria-checked') !== (on ? 'true' : 'false')) item.setAttribute('aria-checked', on ? 'true' : 'false')\n }\n segmentPill.sync(control)\n const tree = findTree(label)\n if (tree === null) return\n treeStamp.mark(tree)\n const host = tree.parentElement\n if (host === null) return\n if (listHost === null || listHost.parentElement !== host) {\n if (listHost !== null && listHost.parentElement !== null) listHost.parentElement.removeChild(listHost)\n listHost = buildElement('div', 'dsh-claude-archive-list')\n host.insertBefore(listHost, tree.nextSibling)\n renderList()\n }\n // The sidebar re-renders its own way: when React replaces the container\n // that held the list, the old copy can stay in the document while a new\n // one is built elsewhere. Sweep every copy but the live one, the same way\n // the stats popover sweeps its strays.\n removeStrayNodes(document, '.dsh-claude-archive-list', [listHost])\n viewStamp.mark(host, view)\n }\n\n ui.workspace = { sync }\n\n return () => {\n disposed = true\n for (let r = 0; r < actionRoots.length; r++) {\n actionRoots[r].unmount()\n }\n actionRoots = []\n if (noticeRoot !== null) {\n noticeRoot.unmount()\n noticeRoot = null\n }\n if (unwatch !== null) {\n unwatch()\n unwatch = null\n }\n segmentPill.release()\n if (control !== null && control.parentElement !== null) control.parentElement.removeChild(control)\n if (listHost !== null && listHost.parentElement !== null) listHost.parentElement.removeChild(listHost)\n labelStamp.release()\n treeStamp.release()\n viewStamp.release()\n control = null\n listHost = null\n delete ui.workspace\n }\n}\n", "import { observeSize } from '../../core/bus'\nimport { PROCESS_BODY_SELECTOR, PROCESS_CONTENT_SELECTOR, PROCESS_EXPANDED_MODE_ATTRIBUTE } from '@dsh-claude-style/contracts/dom'\nimport { easeScrollToEndFor, joinScrollOwner, readerHolds, releaseReader, stopScrollFor } from '../../shared/scroll-owner'\n\n/**\n * The capped process group's follow: inside it, thinking and tool output do\n * not fall behind.\n *\n * The standard and compact tiers cap one process group's body (a max\n * height with its own scrollbar), and the host follows that body with a\n * native smooth scroll. Two things make it miss while content streams:\n *\n * travel a native smooth scroll eases out as it nears its target, and\n * the content grows at a steady rate instead — a thinking section\n * followed by tool output grows no slower than the scroll.\n * single the host starts the next one only once the previous has landed,\n * so anything the content grows meanwhile waits.\n *\n * Together they leave the position 20 to 50 px off the end — exactly the\n * last two lines. Nothing here changes the host's own state: past\n * CATCH_UP_GAP_PX the catch-up asks the scroll owner to walk the body's\n * position to its end (shared/scroll-owner.ts, D41), so the text above the\n * last line is pushed up smoothly rather than in a jump, and inside that\n * threshold it leaves the host's smooth scroll alone, which is the pleasant\n * one while it keeps up. The reader scrolling inside a body holds that body\n * until he comes back to its end (the owner's readerHolds).\n *\n * The catch-up and the host's own follow do not fight: moving scrollTop\n * runs its onScroll, and it reads a position at the end as the reader\n * reaching the end — which lights its follow up again and drops the\n * animation target that was stuck.\n */\n/**\n * Past this the catch-up takes over. Inside it the host's smooth scroll\n * gets to finish; measured while streaming, its steady-state lag runs\n * between 20 and 50 px, so 40 sits in the middle.\n */\nexport const CATCH_UP_GAP_PX = 40\n/** How often the watched bodies are brought up to date; session switches and groups coming and going ride it. */\nexport const PROCESS_SYNC_INTERVAL_MS = 500\n\n/**\n * Watch every process group's body on the page and catch up the ones that\n * fall behind.\n *\n * @returns teardown: the size subscriptions and the timer go away.\n */\nexport function createChatProcessFollow() {\n const leaveOwner = joinScrollOwner()\n /** The bodies watched, each with the content layer it currently has and what stops watching the two. */\n const watched = new Map<Element, { content: Element | null, stopBody: () => void, stopContent: (() => void) | null }>()\n /** Set by the teardown, so an ease in flight stops with the feature. */\n let stopped = false\n\n /** Whether this body is ours to follow at all. */\n const followable = (body: Element) => {\n // Folded away, it is not visible.\n if (body.hasAttribute('hidden')) return false\n // Detailed and fully expanded do not cap the body: there is no inner scrollbar to follow.\n if (body.closest('[' + PROCESS_EXPANDED_MODE_ATTRIBUTE + ']') !== null) return false\n // With nothing to scroll there is nothing to do.\n return body.scrollHeight - body.clientHeight > 0\n }\n\n /** How far this body still is from its own end. */\n const gapOf = (body: Element) => body.scrollHeight - body.clientHeight - body.scrollTop\n\n /** Past the threshold, walk the body's position to its end on a curve. */\n const catchUp = (body: Element) => {\n if (readerHolds(body)) return\n if (!followable(body)) return\n if (gapOf(body) <= CATCH_UP_GAP_PX) return\n // Written outright, the catch-up lands as a jump of forty-odd pixels\n // several times a second while text streams, which reads as the\n // paragraph above the last line snapping upward; the owner eases it there\n // instead, and writes it outright under reduced motion.\n easeScrollToEndFor(body, 'process', () => !stopped && followable(body))\n }\n\n // Every content change is judged once. Watching the body itself matters\n // too: a window resize changes which cap applies.\n const onResize = (entries: ResizeObserverEntry[]) => {\n for (const entry of entries) {\n const target = entry.target\n if (!(target instanceof HTMLElement)) continue\n const body = target.closest(PROCESS_BODY_SELECTOR)\n if (body === null) continue\n catchUp(body)\n }\n }\n\n /**\n * Session switches, groups coming and going, and a content layer being\n * remounted all have to be followed.\n *\n * The content layer is resolved again on every sync rather than once:\n * the body is capped, so content growth does not change its own size —\n * the layer inside it is what changes size, and once React remounts that\n * layer the old element stops reporting.\n */\n const sync = () => {\n const present = new Set(document.querySelectorAll(PROCESS_BODY_SELECTOR))\n for (const body of present) {\n const content = body.querySelector(PROCESS_CONTENT_SELECTOR)\n let entry = watched.get(body)\n if (entry === undefined) {\n entry = { content: null, stopBody: observeSize(body, onResize), stopContent: null }\n watched.set(body, entry)\n } else if (entry.content === content) {\n continue\n }\n if (entry.stopContent !== null) entry.stopContent()\n entry.content = content\n entry.stopContent = content === null ? null : observeSize(content, onResize)\n }\n for (const [body, entry] of [...watched]) {\n if (present.has(body)) {\n // A body that was folded and is open again should not carry the last hold over.\n if (body.hasAttribute('hidden')) releaseReader(body)\n continue\n }\n watched.delete(body)\n releaseReader(body)\n entry.stopBody()\n if (entry.stopContent !== null) entry.stopContent()\n // A body leaving the page takes its ease with it; the loop would drop\n // it anyway (it is no longer connected), and this is the tidier exit.\n stopScrollFor(body, 'process')\n }\n }\n\n const timer = window.setInterval(sync, PROCESS_SYNC_INTERVAL_MS)\n sync()\n\n return () => {\n stopped = true\n window.clearInterval(timer)\n for (const [body, entry] of watched) {\n entry.stopBody()\n if (entry.stopContent !== null) entry.stopContent()\n stopScrollFor(body, 'process')\n }\n watched.clear()\n leaveOwner()\n }\n}\n", "import { CHAT_FOLLOW_ATTR, FOLLOW_HOLD_ATTR } from '../../constants'\nimport { observeSize, subscribeMutations } from '../../core/bus'\nimport { requestFrame } from '../../core/frame'\nimport { motionReduced } from '../../core/prefs'\nimport { createChatProcessFollow } from './process-follow'\nimport { CHAT_CALL_SELECTOR, COMPOSER_CARD_SELECTOR, COMPOSER_SELECTOR, CONVERSATION_SCROLL_SELECTOR, FLOW_BLOCK_SELECTOR, FOLLOWING_TAIL_ATTRIBUTE, ROW_PHASE_ATTRIBUTE, RUNNING_STATE, SHIMMER_SELECTOR, STREAMING_SELECTOR, THINK_ROW_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport { conversationColumn, conversationScroller, findFollowTailButton } from '../../shared/chat-dom'\nimport { createStamp } from '../../shared/dom'\nimport { SCROLL_EASE_LEAD_PX, easeScrollToEndFor, handBackFollow, holdFollowButton, joinScrollOwner, readerHolds, releaseFollowButton, stopScrollFor, submissionHolds, takeBackHostPin } from '../../shared/scroll-owner'\nimport type { HostContext } from '../../core/host'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './chat-follow.manifest'\n\n/*\n * Enhanced follow and the capped process group's follow, ported from\n * dsh-chat-ux. Both ride one preference, as they do upstream: they are the\n * two halves of the same hand-back.\n *\n * The guard that watches for the moments that lose the host's follow is\n * below; the hand-back itself and every position write are the scroll\n * owner's (shared/scroll-owner.ts, D41); the catch-up inside a capped body is\n * in process-follow.ts.\n */\n/** One tool call's row, and one flow block, in one selector: a new node either way. */\nexport const FOLLOW_STRUCTURE_SELECTOR = FLOW_BLOCK_SELECTOR + ', ' + CHAT_CALL_SELECTOR\n/** Content is streaming: the host writes both marks, and only then is there a follow to lose. */\nexport const FOLLOW_RUNNING_SELECTOR = STREAMING_SELECTOR + ', ' + SHIMMER_SELECTOR\n/** Two hand-backs never land closer than this, so a run of tool calls cannot pin the position. */\nexport const FOLLOW_MIN_INTERVAL_MS = 200\n/**\n * A structural change this recent still counts as work in progress. The\n * guard watches data-chat-following-tail going away, and it also goes away\n * on a session switch or a restored reading position — moments with no\n * streaming content and no fresh structure. The grace lets a freshly\n * inserted tool row count as work in progress too.\n */\nexport const FOLLOW_ACTIVITY_GRACE_MS = 2000\n/** A fold glide in flight is waited out; after this many waits the round is dropped. */\nexport const FOLLOW_FOLD_WAIT_MS = 150\nexport const FOLLOW_FOLD_WAIT_ATTEMPTS = 4\n/** The host's own back-to-end button, marked for the stylesheet that places it. */\nexport const FOLLOW_TAIL_ATTR = 'data-dsh-claude-follow-tail'\n/** How far above the composer's top edge that button floats. */\nexport const FOLLOW_TAIL_AIR_PX = 12\n/** The button's fixed placement, written as numbers because the column moves under it. */\nconst FOLLOW_TAIL_LEFT = '--dsh-claude-follow-tail-left'\nconst FOLLOW_TAIL_BOTTOM = '--dsh-claude-follow-tail-bottom'\n\n/**\n * The conversation's own composer card: the lowest of the cards on the page,\n * which is the one the conversation is typed into rather than the hero's.\n */\nfunction conversationComposerCard() {\n let found: HTMLElement | null = null\n let lowest = -Infinity\n for (const card of document.querySelectorAll<HTMLElement>(COMPOSER_CARD_SELECTOR)) {\n const box = card.getBoundingClientRect()\n if (box.width === 0 && box.height === 0) continue\n if (box.top > lowest) {\n lowest = box.top\n found = card\n }\n }\n return found\n}\n\n/**\n * The host's back-to-end button, centred over the composer.\n *\n * The button is the host's own and renders only while its follow is off; its\n * shipped place is the conversation column's right edge, which is where the\n * mascot stands on the card. The pass marks it and writes the two numbers its\n * stylesheet reads — the column's centre and the composer's top edge — because\n * the button is fixed and the column moves with the sidebars and the window.\n *\n * @param stamp - the mark to move onto the button, or off when it is not there.\n */\nfunction placeFollowTail(stamp: ReturnType<typeof createStamp<HTMLElement>>) {\n const button = findFollowTailButton()\n const card = button === null ? null : conversationComposerCard()\n const scroller = button === null ? null : conversationScroller()\n if (button === null || card === null || scroller === null) {\n stamp.release()\n return\n }\n stamp.mark(button)\n const cardBox = card.getBoundingClientRect()\n const scrollBox = scroller.getBoundingClientRect()\n const left = `${Math.round(scrollBox.left + scrollBox.width / 2)}px`\n const bottom = `${Math.round(window.innerHeight - cardBox.top + FOLLOW_TAIL_AIR_PX)}px`\n if (button.style.getPropertyValue(FOLLOW_TAIL_LEFT) !== left) button.style.setProperty(FOLLOW_TAIL_LEFT, left)\n if (button.style.getPropertyValue(FOLLOW_TAIL_BOTTOM) !== bottom) button.style.setProperty(FOLLOW_TAIL_BOTTOM, bottom)\n}\n\n/**\n * Watch the whole page for the moments that lose the host's follow, and hand\n * the position back at each of them; while content streams, glide the\n * position instead of letting the host write the end in one frame. Every\n * write goes through the scroll owner (D41).\n *\n * @param foldBusy - whether a fold glide is animating a height right now.\n * @returns teardown: the subscriptions go away.\n */\nexport function createChatFollowGuard(foldBusy: () => boolean) {\n const leaveOwner = joinScrollOwner()\n /** When the last hand-back really landed, for the throttle. */\n let lastEnsureAt = 0\n /** When structure last changed, for the grace above. */\n let lastActivityAt = 0\n let scanQueued = false\n /** This batch of mutations held a structural moment / the follow being turned off. */\n let structureSeen = false\n let guardSeen = false\n\n /** Whether the reader is reading up there right now (the owner's hold on the conversation). */\n const readerAway = () => {\n const scroller = conversationScroller()\n return scroller !== null && readerHolds(scroller)\n }\n\n /** Whether work counts as in progress right now. */\n const running = () => document.querySelector(FOLLOW_RUNNING_SELECTOR) !== null\n || performance.now() - lastActivityAt <= FOLLOW_ACTIVITY_GRACE_MS\n\n // ---------- the stream glide ----------\n //\n // While work is streaming and the reader is at the end, the host follows by\n // writing the end outright the moment content grows — the position never\n // sat more than three pixels off the end, so the text above the last line\n // was pushed up in one frame on every burst. The glide takes that write back\n // before the frame paints and hands the distance to the spring, so the\n // position travels there instead.\n //\n // Every reading is an element read plus at most one style write, and all of\n // it is gated on work being in progress: with the stream idle this costs\n // one attribute read per mutation batch and nothing else.\n /** The scroller the glide last held; a session switch replaces the frame whole. */\n let glideScroller: HTMLElement | null = null\n /** The flow column the glide reads growth from. */\n let glideColumn: HTMLElement | null = null\n /** Stops the glide's size subscription on glideColumn (see glideSync). */\n let stopGlideSize: (() => void) | null = null\n /** The column's height as the glide last saw it; the growth a frame is measured against. */\n let glideHeight = 0\n /** Whether the glide is holding the position right now. */\n let glideHeld = false\n /** The column the hold mark (FOLLOW_HOLD_ATTR) is on, or null while the glide holds nothing. */\n let heldColumn: HTMLElement | null = null\n\n /**\n * Whether content is arriving right now: the mark the host writes while it\n * streams. It is looked for inside the message column rather than across the\n * document — the mark lives there, and a document query made after the host's\n * own write forces a style pass over the whole page (D9).\n */\n const streaming = () => {\n const column = conversationColumn()\n return column !== null && column.querySelector(FOLLOW_RUNNING_SELECTOR) !== null\n }\n\n /**\n * Whether the glide owns the position right now.\n *\n * The gate is the streaming mark itself rather than the guard's wider\n * \"work in progress\" window: the structural moments that window exists for\n * are the hand-back's business, and the glide must not shadow them.\n */\n const glidePinning = () => {\n // The reader's animation choice means \"no animation\": nothing to walk.\n if (motionReduced()) return false\n // The reader's own message has just arrived: the host's jump to it stands.\n if (submissionHolds()) return false\n if (!streaming()) return false\n if (readerAway()) return false\n if (foldBusy()) return false\n return true\n }\n\n /**\n * The test the spring asks every frame: the glide's own gates without the\n * \"work in progress\" one, because the trail left by the last token still\n * has to land after the stream has stopped. The reader's hold and his own\n * message are the owner's to ask.\n */\n const glideWanted = () => !motionReduced() && !foldBusy()\n\n /** Take the hold mark off the column carrying it. */\n const releaseHold = () => {\n if (heldColumn === null) return\n heldColumn.removeAttribute(FOLLOW_HOLD_ATTR)\n heldColumn = null\n }\n\n /**\n * Put the hold mark on the column the glide holds. Held short of the end,\n * the position reads to the host as a reader who left the tail, so the host\n * takes data-chat-following-tail away; the waiting line's pin waits for\n * that attribute (features/chat-wait/chat-wait.css), and this mark keeps\n * the pin standing while the glide is the one moving the position.\n */\n const markHold = (column: HTMLElement) => {\n if (heldColumn === column) return\n releaseHold()\n column.setAttribute(FOLLOW_HOLD_ATTR, '')\n heldColumn = column\n }\n\n /**\n * Watch the flow column the glide reads growth from; a session switch\n * replaces it.\n *\n * The size subscription is made anew for every column, after the host's.\n * Resize observer callbacks run in the order the observers were made, and\n * the host makes the one it pins the end from when it mounts the column\n * (ChatViewport.attach): it watches the column, the scroller and the\n * composer seat. Subscribed `afterHost` once the column is there (D40), this\n * one runs after the pin in the same frame and takes it back before it\n * paints; one made at install would run first, and every pin would paint.\n * It watches the same three elements, so no resize the host pins on goes\n * unseen.\n */\n const glideSync = () => {\n // The column is kept by shared/chat-dom.ts: asking the document for it on\n // every frame of a stream forced a style pass over the whole page (D9).\n const column = conversationColumn()\n if (column === glideColumn) return\n if (stopGlideSize !== null) stopGlideSize()\n stopGlideSize = null\n glideColumn = column\n if (column === null) return\n // The subscription's first report is the column as it is now, which is no\n // growth.\n glideHeight = column.offsetHeight\n const watched: Element[] = [column]\n const scroller = column.closest(CONVERSATION_SCROLL_SELECTOR)\n if (scroller !== null) {\n watched.push(scroller)\n const composer = scroller.querySelector(COMPOSER_SELECTOR)\n if (composer !== null) watched.push(composer)\n }\n stopGlideSize = observeSize(watched, onGlideResize, { afterHost: true })\n }\n\n /**\n * Hold the position through one frame of streaming.\n *\n * This runs from the size subscription above, which the browser calls\n * after the host's own resize observer, so a pin written this frame is\n * still taken back before it paints: the distance it added stays with the\n * spring (takeBackHostPin).\n */\n const glideCheck = (grew?: number) => {\n if (!glidePinning()) {\n if (glideHeld) {\n glideHeld = false\n releaseFollowButton()\n releaseHold()\n }\n return\n }\n glideSync()\n const scroller = conversationScroller()\n if (scroller === null) return\n glideHeld = true\n glideScroller = scroller\n holdFollowButton()\n if (glideColumn !== null) markHold(glideColumn)\n // One reading of the end serves the pin and the question after it: reading\n // it again in the same frame paid another layout pass (D9).\n const end = scroller.scrollHeight - scroller.clientHeight\n const top = takeBackHostPin(scroller, end, grew)\n if (end - top > 0.5) easeScrollToEndFor(scroller, 'stream', glideWanted)\n }\n\n /**\n * The column's own box is what grows while text streams, and a resize is\n * the moment the host has just pinned the end: read the growth this frame\n * brought, then hold.\n */\n const onGlideResize = (entries: ResizeObserverEntry[]) => {\n let grew = 0\n for (const entry of entries) {\n if (entry.target !== glideColumn) continue\n const size = entry.borderBoxSize\n const box = size !== undefined && size.length > 0 ? size[0].blockSize : entry.contentRect.height\n const delta = box - glideHeight\n glideHeight = box\n // A growth wider than the longest stretch the ease glides is a replaced\n // column, not a burst, and is no reading to measure against.\n if (delta > 0 && delta <= SCROLL_EASE_LEAD_PX) grew = delta\n }\n glideCheck(grew)\n }\n\n /**\n * Hand this round's follow back. Three gates have to open: the position,\n * the reader's intent and a fold glide in flight.\n * @param attempt - how many times this round has been put off by a fold glide.\n */\n const ensure = (attempt?: number) => {\n if (readerAway()) return\n const scroller = conversationScroller()\n if (scroller === null) return\n // While the glide holds the position the follow is its own business: the\n // host has turned its follow off over the glide's writes, and its button\n // is kept out of sight — clicking it would drop the glide for exactly the\n // instant jump this feature exists to avoid. The landing itself lights\n // the host's follow back up (its own onScroll reads a position at the end\n // as the reader arriving there).\n if (glidePinning()) return\n // More than a screen off the end is the reader reading higher up, not a follow that fell one step behind.\n if (scroller.scrollHeight - scroller.clientHeight - scroller.scrollTop > scroller.clientHeight) return\n // A fold glide is moving the height, and the position is its business until it lands.\n if (foldBusy()) {\n const tries = typeof attempt === 'number' ? attempt : 0\n if (tries >= FOLLOW_FOLD_WAIT_ATTEMPTS) return\n window.setTimeout(() => ensure(tries + 1), FOLLOW_FOLD_WAIT_MS)\n return\n }\n const now = performance.now()\n if (now - lastEnsureAt < FOLLOW_MIN_INTERVAL_MS) return\n lastEnsureAt = now\n handBackFollow('follow', { stillWanted: () => !readerAway() })\n }\n\n /** A batch of mutations is settled: decide whether to act. */\n const settle = () => {\n const structure = structureSeen\n const guarded = guardSeen\n structureSeen = false\n guardSeen = false\n // The guard side needs the extra \"work in progress\" test: the attribute\n // going away can also be a session switch or history being restored.\n if (!structure && !(guarded && running())) return\n ensure(0)\n }\n\n const queue = () => {\n if (scanQueued) return\n scanQueued = true\n // The hand-back reads the position and writes it in one go: write phase (D40).\n requestFrame({\n write() {\n scanQueued = false\n settle()\n },\n })\n }\n\n /** Whether a newly added node holds a flow block or a tool call row. */\n const marksStructure = (node: Node) => {\n if (!(node instanceof Element)) return false\n return node.matches(FOLLOW_STRUCTURE_SELECTOR) || node.querySelector(FOLLOW_STRUCTURE_SELECTOR) !== null\n }\n\n const onRecords = (records: MutationRecord[]) => {\n for (const record of records) {\n if (record.type === 'attributes') {\n // The follow went from present to absent: the host just turned it off.\n if (record.attributeName === FOLLOWING_TAIL_ATTRIBUTE) {\n if (record.target instanceof Element && !record.target.hasAttribute(FOLLOWING_TAIL_ATTRIBUTE)) guardSeen = true\n continue\n }\n // A thinking row leaving \"running\": the boundary of that piece of work.\n if (record.oldValue === RUNNING_STATE\n && record.target instanceof Element\n && record.target.matches(THINK_ROW_SELECTOR)\n && record.target.getAttribute(ROW_PHASE_ATTRIBUTE) !== RUNNING_STATE) {\n lastActivityAt = performance.now()\n structureSeen = true\n }\n continue\n }\n for (const node of record.addedNodes) {\n if (!marksStructure(node)) continue\n lastActivityAt = performance.now()\n structureSeen = true\n }\n }\n if (structureSeen || guardSeen) queue()\n // Text arriving is the glide's own signal and carries no structure: a\n // character-data change, or a node added or removed anywhere, is enough\n // to ask. Attribute batches (a streaming mark flipping) are skipped,\n // which keeps the common idle case down to a boolean per batch. The\n // reader's own message stands the glide down (the owner's submission\n // hold, which hears the batch before this subscription does).\n const contentArrived = records.some(record => record.type === 'characterData' || record.addedNodes.length > 0 || record.removedNodes.length > 0)\n if (contentArrived) glideCheck()\n }\n\n const stopMutations = subscribeMutations(document.body, {\n subtree: true,\n childList: true,\n characterData: true,\n attributeFilter: [ROW_PHASE_ATTRIBUTE, FOLLOWING_TAIL_ATTRIBUTE],\n attributeOldValue: true,\n }, onRecords)\n\n return () => {\n stopMutations()\n if (stopGlideSize !== null) stopGlideSize()\n stopGlideSize = null\n releaseFollowButton()\n releaseHold()\n // The glide's own easing stops with the feature; a hand-back in flight\n // is the owner's to finish.\n if (glideScroller !== null) stopScrollFor(glideScroller, 'stream')\n glideScroller = null\n glideColumn = null\n leaveOwner()\n }\n}\n\n/**\n * Install both halves of the follow behaviour and mark the page for its\n * stylesheet (the capped body's vertical-only scroll). The entry installs this\n * only while the preference is on and dsh-chat-ux, which drives the same\n * moments and writes the same scroll positions, is off the page (the\n * manifest); this teardown hands the chat area back whole.\n *\n * @param ctx - client context.\n * @param ui - shared handle table.\n * @returns teardown.\n */\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n const foldBusy = () => ui.chatFold !== undefined && ui.chatFold !== null && ui.chatFold.isBusy()\n const stopGuard = createChatFollowGuard(foldBusy)\n const stopProcess = createChatProcessFollow()\n const tailStamp = createStamp<HTMLElement>(FOLLOW_TAIL_ATTR)\n document.body.setAttribute(CHAT_FOLLOW_ATTR, '')\n ui.chatFollow = {\n sync() {\n placeFollowTail(tailStamp)\n },\n /** A viewport or composer-card change moves the column: the button is placed again in the same frame. */\n reposition() {\n placeFollowTail(tailStamp)\n },\n }\n return () => {\n document.body.removeAttribute(CHAT_FOLLOW_ATTR)\n tailStamp.release()\n delete ui.chatFollow\n stopGuard()\n stopProcess()\n }\n}\n", "import { requestFrame } from '../../core/frame'\nimport { CHAT_ROLLING_ATTR } from '../../constants'\nimport { CONVERSATION_SCROLL_SELECTOR, FOLLOW_THRESHOLD_PX, PROCESS_BODY_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport { handBackFollow, readerMovedSince } from '../../shared/scroll-owner'\n\n/**\n * The measuring and bookkeeping half of the fold glide (fold-glide.ts): what\n * a folding body is, how far a door has to travel to be seen, the viewer's\n * own intent, the height animation's scaffolding, and the clock that says\n * \"the position belongs to the animation right now\".\n *\n * The glide itself — the click it takes over, the intent it remembers, the\n * two directions it rolls — lives in fold-glide.ts.\n */\n/** The door's duration, the same tier as the sidebar's AnimatedRows. */\nexport const FOLD_ROLL_MS = 200\n/**\n * The share of that duration the visible stretch gets; the rest is left for\n * the height outside the viewport.\n *\n * Something has to be left: the door's two stretches meet at \"the part the\n * reader can see\", and a final step that jumped would drag the content below\n * along with it.\n */\nexport const FOLD_VISIBLE_SHARE = 0.9\n/** An intent older than this is no longer trustworthy (no layout change followed, or it came from elsewhere). */\nexport const FOLD_INTENT_TTL_MS = 500\nexport { DISCLOSURE_ROW_SELECTOR as FOLD_DISCLOSURE_SELECTOR, FOLD_SKIPPED_CONTROL_SELECTOR, FOLD_TOGGLE_SELECTOR } from '@dsh-claude-style/contracts/dom'\n/** Popup controls (menus, dialogs, lists): they open no folding body, so the whole module skips them. */\nexport const FOLD_POPUP_SELECTOR = '[aria-haspopup]'\n/** How many frames to wait at most for React to take the collapse before the shutdown animation is withdrawn. */\nexport const FOLD_SHUT_CONFIRM_FRAMES = 3\n/** After the door lands, \"the position belongs to the animation\" is counted this much longer, so the settle frame does not meet the follow guard. */\nexport const FOLD_BUSY_GRACE_MS = 50\n/**\n * Two frame timestamps further apart than this mean the main thread was held\n * up in between.\n *\n * Shorter than the stall itself: the first frame after a long task still\n * carries the timestamp queued before the stall and the jump lands on the one\n * after it — a measured 40 ms task leaves a 37 ms gap. 25 ms is about half a\n * frame at 60 Hz.\n */\nexport const FOLD_FRAME_GAP_LIMIT_MS = 25\n/** Before this screen's own frame interval has been measured, one frame at 60 Hz. */\nexport const FOLD_NOMINAL_FRAME_MS = 16.7\n\n/** Until when the position belongs to the animation. */\nexport let chatFoldBusyUntil = 0\n\n/**\n * Whether a door is rolling right now.\n *\n * The position belongs to the animation while it does: were the follow guard\n * to pull the scroll to the end now, the height being pulled along would move\n * with it and read as a shake. It waits this stretch out.\n */\nexport function isChatFoldBusy() {\n return performance.now() < chatFoldBusyUntil\n}\n\n/** Reserve a stretch in which the position belongs to the animation. */\nexport function markChatFoldBusy() {\n chatFoldBusyUntil = performance.now() + FOLD_ROLL_MS + FOLD_BUSY_GRACE_MS\n}\n\n/**\n * How far down the part of this element the reader can see reaches.\n *\n * When the content is taller than the window the element occupies its whole\n * height and the reader only sees a stretch of it: a process group's body\n * (max-height: min(400px, 50vh)) is that window, and the viewport is the\n * outermost one. The door's travel is computed from that stretch, so it only\n * rolls where the reader can see; at full height, eight thousand pixels would\n * be covered in 200 ms and read as a pop.\n *\n * @param element - the element the door pulls.\n * @returns the offset to the visible end, in pixels; 0 when it is entirely outside the viewport.\n */\nexport function foldVisibleReach(element: Element) {\n const rect = element.getBoundingClientRect()\n let bottom = Math.min(rect.bottom, window.innerHeight)\n // Every clipping ancestor can narrow the visible range further, so the\n // whole chain is walked; an ancestor whose overflow is visible clips\n // nothing and is skipped. getComputedStyle is not wasted here — the element\n // has just been inserted, and its styles have to be resolved anyway.\n for (let ancestor = element.parentElement; ancestor !== null; ancestor = ancestor.parentElement) {\n const style = window.getComputedStyle(ancestor)\n if (style.overflowX === 'visible' && style.overflowY === 'visible') continue\n bottom = Math.min(bottom, ancestor.getBoundingClientRect().bottom)\n }\n return Math.max(0, Math.min(rect.height, bottom - rect.top))\n}\n\n/**\n * The body a control expands. When the control names one with aria-controls\n * that id is the answer (useId makes it carry colons, so getElementById is\n * the only way); otherwise the shape of the unmounting family decides it —\n * \"the sibling after the control\". Null means this control is collapsed right\n * now.\n *\n * A process group's header never arrives here: foldProcessBody claims it\n * first, and that path presses the group root rather than the body's own\n * height.\n */\nexport function foldExpandedBody(control: Element) {\n const controls = control.getAttribute('aria-controls')\n if (controls !== null) {\n const target = document.getElementById(controls)\n return target instanceof HTMLElement ? target : null\n }\n const parent = control.parentElement\n const last = parent === null ? null : parent.lastElementChild\n return last instanceof HTMLElement && last !== control ? last : null\n}\n\n/**\n * The process group body a control controls.\n *\n * Only a group's header points at its body with aria-controls (the host's\n * ProcessGroupHeader); the member rows inside a group do not carry that\n * attribute — their expanded body is their next sibling. So \"the control\n * lives inside a process group\" does not mean \"the control is a group\n * header\": every tool row and thinking row inside a body lives in one too.\n * Asking closest() alone would read a click on a tool row as opening the\n * whole group and press the group root in that row's place.\n *\n * @param control - the control that was pressed.\n * @returns the group body it controls, or null when it is not a header.\n */\nexport function foldProcessBody(control: Element) {\n const controls = control.getAttribute('aria-controls')\n if (controls === null) return null\n const target = document.getElementById(controls)\n return target instanceof HTMLElement && target.matches(PROCESS_BODY_SELECTOR) ? target : null\n}\n\n/**\n * Whether the reader is at the session's end right now.\n *\n * This one walks up from the pressed control; shared/chat-dom.ts's isAtBottom\n * answers the same question from the scroller. Same test, different entrance.\n */\nexport function foldControlAtBottom(control: Element) {\n const scroller = control.closest(CONVERSATION_SCROLL_SELECTOR)\n // No scroller in reach counts as \"not at the bottom\".\n if (scroller === null) return false\n return scroller.scrollHeight - scroller.scrollTop - scroller.clientHeight <= FOLLOW_THRESHOLD_PX\n}\n\n/**\n * Start watching whether the reader takes the scroll over before this fold\n * settles.\n *\n * The settle hands the position back to the host's follow, and that only\n * holds for a reader who was at the bottom: the settle comes a couple of\n * hundred milliseconds after the press, and he can take over in between —\n * his intent is only visible in events, which the scroll owner reads\n * (readerMovedSince). A pointer or key inside the composer does not count:\n * he is typing, not scrolling.\n *\n * @param atBottom - whether the reader was at the bottom when the fold began.\n * @returns this fold's settle credentials.\n */\nexport function foldWatchReader(atBottom: boolean) {\n const since = performance.now()\n return { atBottom, moved: () => readerMovedSince(since) }\n}\n\n/** One fold's settle credentials (foldWatchReader). */\nexport type FoldWatch = ReturnType<typeof foldWatchReader>\n\n/**\n * Fold settle: a reader who was at the bottom when the fold began gets the\n * position handed back to the host's follow.\n *\n * A fold is a large height change, and the host's follow is switched off by a\n * scroll that looks like the reader moving without reaching the end — its own\n * \"back to the end\" button is the only way in again. This decides whether the\n * hand-back still stands; how it is done (walk first, press the button only if\n * the attribute does not come back) is the scroll owner's handBackFollow, the\n * same road the follow guard takes.\n *\n * The test is \"the reader was at the bottom when the fold began\": if he was\n * reading higher up, the hand-back is none of his business.\n */\nexport function foldHandBackFollow(watch: FoldWatch) {\n if (!watch.atBottom) return\n // He took the scroll over himself in between: the hand-back is void.\n handBackFollow('fold', { stillWanted: () => !watch.moved() })\n}\n\n/**\n * The settle's entrance: look at the follow once the animation is over.\n *\n * The replay of a collapse and the cancellation of an expand both land at the\n * end of the animation, and the position only settles then. The expand passes\n * its own animation in and waits for it to really finish — a held-up main\n * thread stretches it (see foldHoldThroughStalls), and waiting a fixed\n * duration would pin the position while the door is still rolling. With no\n * animation to wait for (a collapse settling from onfinish, or a fold that\n * never started one) it waits FOLD_ROLL_MS.\n */\nexport function foldSettleAfter(watch: FoldWatch, roll?: Animation | null) {\n if (roll === null || roll === undefined) {\n window.setTimeout(() => {\n foldHandBackFollow(watch)\n }, FOLD_ROLL_MS)\n return\n }\n const settle = () => {\n foldHandBackFollow(watch)\n }\n roll.finished.then(settle, settle)\n}\n\n/**\n * Frames in which the main thread was held up do not count towards the door's\n * duration.\n *\n * The height animation runs on the main thread and paints nothing while it is\n * stuck, while WAAPI measures progress on the wall clock: the first frame\n * after the stall jumps straight to where it \"should\" be, which reads as the\n * door stopping and then leaping. So every frame the gap is read, and a long\n * one winds the animation's current time back to \"one frame past the last\n * look\" — the door pauses and then continues from where the reader last saw\n * it. \"One frame\" is this screen's most recent normal interval, so a\n * high-refresh display does not take an extra step. The wound-back stretch is\n * added to the busy window too, and the follow guard waits it out.\n *\n * Measured in an isolated page: winding currentTime back after a long task\n * works, and the next frame continues from there.\n */\nexport function foldHoldThroughStalls(roll: Animation) {\n let lastFrameAt = 0\n let lastTime = 0\n let frameInterval = FOLD_NOMINAL_FRAME_MS\n const timeOf = () => {\n const time = roll.currentTime\n return typeof time === 'number' ? time : 0\n }\n const look = (now: number) => {\n if (roll.playState !== 'running') return\n const gap = lastFrameAt === 0 ? 0 : now - lastFrameAt\n if (gap > FOLD_FRAME_GAP_LIMIT_MS) {\n const resumeAt = lastTime + frameInterval\n const skipped = timeOf() - resumeAt\n if (skipped > 0) {\n roll.currentTime = resumeAt\n chatFoldBusyUntil += skipped\n }\n } else if (gap > 0) {\n frameInterval = gap\n }\n lastFrameAt = now\n lastTime = timeOf()\n requestFrame({ write: look })\n }\n requestFrame({ write: look })\n}\n\n/**\n * Wait for React to land this collapse on the DOM, then withdraw the\n * animation and the inline styles.\n *\n * A collapse's height animation carries fill: 'forwards', which pins the\n * element at its final height. If React has not taken the click yet, cancel()\n * hands the whole height back to CSS — a jump from the end back to full\n * height, enough to throw the host's follow off. So the withdraw waits until\n * the DOM really collapsed; a few frames without that means the click did not\n * fold anything, and the element is put back as it was.\n */\nexport function foldConfirmCollapsed(settled: () => boolean, done: () => void, attempt?: number) {\n const tries = typeof attempt === 'number' ? attempt : 0\n if (settled() || tries >= FOLD_SHUT_CONFIRM_FRAMES) {\n done()\n return\n }\n requestFrame({\n write() {\n foldConfirmCollapsed(settled, done, tries + 1)\n },\n })\n}\n\n/**\n * The three pieces of bookkeeping a height animation starts with: clip the\n * overflow, make height mean border-box, and mark the door as rolling so the\n * children lay out at their natural height rather than being squeezed by flex\n * (fold-motion.css).\n *\n * Both directions do the same bookkeeping and both have to give it back, so\n * the old values and the restore travel together.\n *\n * @param target - the element the door presses.\n * @returns the restore: the inline styles and the mark, as they were.\n */\nexport function foldBeginHeightClip(target: HTMLElement) {\n const previousOverflow = target.style.overflow\n const previousBoxSizing = target.style.boxSizing\n target.style.overflow = 'hidden'\n target.style.boxSizing = 'border-box'\n target.setAttribute(CHAT_ROLLING_ATTR, '')\n return () => {\n target.style.overflow = previousOverflow\n target.style.boxSizing = previousBoxSizing\n target.removeAttribute(CHAT_ROLLING_ATTR)\n }\n}\n", "/**\n * The bookkeeping for fold toggles this feature presses itself.\n *\n * The automatic collapse of a thinking row and the automatic open and close\n * of a process group both dispatch real clicks: HTMLElement.click() takes\n * the same capture path as the reader's own press, so each module's\n * \"the reader touched it, he wins\" guard cannot tell the two apart. Silencing\n * it would cut the reader's streaming text off mid-word, so it is declared\n * here instead and read by both fold modules and the follow guard.\n */\n/** How deep this feature's own fold presses are nested. */\nexport let chatFoldToggleDepth = 0\n\n/** Mark one of this feature's own fold toggles, so the reader-intent guards ignore it. */\nexport function beginChatFoldToggle() {\n chatFoldToggleDepth += 1\n}\n\n/** One of this feature's own fold toggles is over. */\nexport function endChatFoldToggle() {\n chatFoldToggleDepth = Math.max(0, chatFoldToggleDepth - 1)\n}\n\n/** Whether one of this feature's own fold toggles is in flight right now. */\nexport function isChatFoldToggle() {\n return chatFoldToggleDepth > 0\n}\n", "import { subscribeMutations } from '../../core/bus'\nimport { motionReduced } from '../../core/prefs'\nimport { FOLD_DISCLOSURE_SELECTOR, FOLD_INTENT_TTL_MS, FOLD_POPUP_SELECTOR, FOLD_ROLL_MS, FOLD_SKIPPED_CONTROL_SELECTOR, FOLD_TOGGLE_SELECTOR, FOLD_VISIBLE_SHARE, foldBeginHeightClip, foldConfirmCollapsed, foldControlAtBottom, foldExpandedBody, foldHoldThroughStalls, foldProcessBody, foldSettleAfter, foldVisibleReach, foldWatchReader, markChatFoldBusy } from './fold-glide-parts'\nimport type { FoldWatch } from './fold-glide-parts'\nimport { isChatFoldToggle } from './fold-toggle'\nimport { CHAT_FLOW_SELECTOR, PROCESS_GROUP_SELECTOR, THINK_ROW_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport { joinScrollOwner } from '../../shared/scroll-owner'\n\n/** Margin past the roll's own duration for the backstop that unlocks the click. */\nconst FOLD_ROLL_BACKSTOP_MS = 200\n\n/**\n * When a fold closes, the content below is pushed away and the body rolls up\n * like a door.\n *\n * The host's DisclosureRow unmounts the body whole when it closes ({open &&\n * children}), so CSS has no old value to transition from and a pure CSS\n * height animation is impossible in the chat area. This takes over outside\n * the DOM by intercepting the click: stopPropagation() in the capture phase,\n * so React never sees it and the real element stays where it is, still open,\n * and can have its height pressed down. When the press reaches the end the\n * click is handed back as it was. Pressing the real element means there is no\n * clone and none of a clone's trouble (inheritance, coordinates, scrolling,\n * node limits).\n *\n * opening acts after React has inserted the body — the observer callback\n * still runs before paint, so the height can be pressed back to\n * the start and animated to full while the layout grows frame by\n * frame. The content below is really pushed away, with no FLIP.\n * closing intercepts the click and keeps the element open, so its height\n * can be pressed to the end just as in the opening direction, and\n * only then lets the click through: React unmounts an element\n * that takes no space, so the collapsed layout does not jump.\n *\n * What gets pressed depends on the family:\n *\n * a DisclosureRow the body itself; it is a plain block with no inner scroll.\n * a process group the group root, not its body. The body carries its own\n * scrollbar and the host's use-process-scroll watches it:\n * pressing it would make follow.toBottom smooth-scroll the\n * content to the end and turn the door into a column of\n * text running upwards. The root is only the box around\n * it — the body inside keeps every pixel of its size, so\n * the host's follow receives no ResizeObserver notice,\n * while the root's height is part of the layout and still\n * pushes the content below away.\n * not at all a turn's header (the \"took X seconds\" button) and its\n * trigger notice: what they open is a whole turn's\n * content, nested scrolls included, and the host's own\n * instant toggle is the steadier answer there.\n *\n * The door only rolls what can be seen. The height has to travel from start\n * to end for the layout to really make room, but the animation's distance is\n * the full height: eight thousand pixels of reasoning would run out in 200 ms\n * and look like a pop. So the height runs in two stretches, and the boundary\n * is the visible reach foldVisibleReach measures — the stretch the reader can\n * see gets FOLD_VISIBLE_SHARE of the duration, and the height outside the\n * viewport takes the rest in one go. A door two hundred pixels tall and one\n * twenty thousand tall then move at the same speed in front of the reader,\n * and the two stretches are continuous rather than a jump.\n *\n * An intent is only taken from a reader's own click, and it only keeps one\n * number: the starting height for the opening direction. Streaming additions\n * and paging through history have no click and so no animation; this\n * feature's own automatic folding dispatches real clicks down this very\n * capture path, so those are recognised through isChatFoldToggle and let\n * through — there the content is meant to grow naturally.\n *\n * @returns teardown: the click listener and the observer go away.\n */\nexport function installChatFoldGlide() {\n /** The opening direction's intent, waiting for React to insert the body. */\n let glideIntent: {\n control: HTMLElement\n groupBody: HTMLElement | null\n groupRoot: HTMLElement | null\n collapsedHeight: number\n watch: FoldWatch\n takenAt: number\n } | null = null\n /** A collapse is rolling: for these 200 ms no new click is taken, so two folds cannot pile up. */\n let glideShutting = false\n /** The intercepted click is being replayed to React, and that one must not be intercepted again. */\n let glideReplaying = false\n\n // The reader's animation choice, resolved (packages/client/src/core/prefs.ts): D26's own\n // preference, not the raw media query, so \"reduced\" in the settings page\n // stops the door and \"always\" keeps it against a system that asks for\n // reduced motion.\n const reduceMotion = () => motionReduced()\n\n /** Hand the intercepted click back to React as it was. No intercepting during the replay, and no collapse started. */\n const replay = (control: HTMLElement) => {\n glideShutting = false\n glideReplaying = true\n try {\n control.click()\n } finally {\n glideReplaying = false\n }\n }\n\n /**\n * Roll the door open: the height grows frame by frame from the starting\n * point to full, taking exactly as much room as it shows.\n *\n * There is only the height, but it runs in two stretches: the visible one\n * gets FOLD_VISIBLE_SHARE of the duration and the height outside the\n * viewport is finished with the rest.\n *\n * A rect measures border-box height while CSS height means content-box by\n * default: without switching to border-box the animation runs the padding\n * twice and then shrinks it back on cancel, which reads as the padding\n * moving.\n *\n * @param target - the element the door pulls: a body, or a process group's root.\n * @param from - the starting height. A body starts at 0; a group root starts\n * at the header's own stretch, with the body hidden under it.\n * @returns the animation the settle waits for, or null when none started.\n */\n const rollOpen = (target: HTMLElement, from: number) => {\n markChatFoldBusy()\n const height = target.getBoundingClientRect().height\n if (height <= from) return null\n const travel = Math.max(from, foldVisibleReach(target))\n const restore = foldBeginHeightClip(target)\n const growing = target.animate(\n travel >= height\n ? [{ height: String(from) + 'px' }, { height: String(height) + 'px' }]\n : [\n { height: String(from) + 'px', offset: 0, easing: 'ease-out' },\n { height: String(travel) + 'px', offset: FOLD_VISIBLE_SHARE, easing: 'linear' },\n { height: String(height) + 'px', offset: 1 },\n ],\n { duration: FOLD_ROLL_MS, easing: 'ease-out' },\n )\n foldHoldThroughStalls(growing)\n growing.onfinish = () => {\n growing.cancel()\n restore()\n }\n return growing\n }\n\n /**\n * Roll the door shut: the real element is pressed, nothing is cloned.\n *\n * The click was intercepted in the capture phase, so React has not folded\n * anything and the element still stands at full height: it can be pressed\n * down just as in the opening direction, the layout shrinking frame by frame\n * and the content below really being made room. At the end of the press the\n * click is let through; React collapses then, when the element takes no\n * extra space, so the collapsed layout does not jump.\n *\n * Only the height, in two stretches again, in the opposite direction: the\n * part outside the viewport goes first and the visible stretch rolls up over\n * FOLD_VISIBLE_SHARE of the duration.\n *\n * @param fold - the element to press, the end height, and the test for\n * \"React has collapsed it\".\n */\n const rollShut = (fold: { target: HTMLElement, floor: number, collapsed: () => boolean, control: HTMLElement, watch: FoldWatch }) => {\n markChatFoldBusy()\n const height = fold.target.getBoundingClientRect().height\n // A backstop: if onfinish never arrives for any reason, the click must not stay locked.\n const release = window.setTimeout(() => {\n glideShutting = false\n }, FOLD_ROLL_MS + FOLD_ROLL_BACKSTOP_MS)\n if (height <= fold.floor) {\n window.clearTimeout(release)\n replay(fold.control)\n foldSettleAfter(fold.watch)\n return\n }\n const travel = Math.max(fold.floor, foldVisibleReach(fold.target))\n const restore = foldBeginHeightClip(fold.target)\n const shrinking = fold.target.animate(\n travel >= height\n ? [{ height: String(height) + 'px' }, { height: String(fold.floor) + 'px' }]\n : [\n { height: String(height) + 'px', offset: 0, easing: 'linear' },\n { height: String(travel) + 'px', offset: 1 - FOLD_VISIBLE_SHARE, easing: 'ease-out' },\n { height: String(fold.floor) + 'px', offset: 1 },\n ],\n { duration: FOLD_ROLL_MS, easing: 'ease-out', fill: 'forwards' },\n )\n foldHoldThroughStalls(shrinking)\n shrinking.onfinish = () => {\n window.clearTimeout(release)\n replay(fold.control)\n // The DOM should have collapsed by now; if it has not, the animation\n // cannot be withdrawn — see foldConfirmCollapsed.\n foldConfirmCollapsed(fold.collapsed, () => {\n shrinking.cancel()\n restore()\n })\n foldSettleAfter(fold.watch)\n }\n }\n\n /** React inserted the body the intent was waiting for (or this intent is dead). */\n const flush = () => {\n const current = glideIntent\n glideIntent = null\n if (current === null) return\n const watch = current.watch\n // Nothing to animate on this road.\n if (Date.now() - current.takenAt > FOLD_INTENT_TTL_MS || reduceMotion()) return\n // A process group: the root is pressed, not the body — the body carries\n // its own scrollbar and the host's follow is watching it.\n if (current.groupRoot !== null && current.groupBody !== null) {\n if (current.groupBody.hasAttribute('hidden')) return\n foldSettleAfter(watch, rollOpen(current.groupRoot, current.collapsedHeight))\n return\n }\n const body = foldExpandedBody(current.control)\n if (body === null) return\n // A DisclosureRow: the body is a plain block, and pressing its height is\n // \"show as much as it has pulled down\".\n foldSettleAfter(watch, rollOpen(body, 0))\n }\n\n const onClick = (event: MouseEvent) => {\n // The replay itself goes straight through to React.\n if (glideReplaying) return\n const target = event.target\n if (!(target instanceof Element)) return\n // This feature's own automatic folding dispatches real clicks down this\n // very capture path. A thinking row should roll just like the reader's own\n // click: opened and closed instantly by it, its content would appear and\n // vanish with a snap, while a tool row — only ever opened by a click —\n // always had a door. A process group is not in that list: one scan can\n // toggle several groups, and the collapse is exclusive (glideShutting), so\n // a second click arriving together would be swallowed and that group would\n // never get its turn.\n if (isChatFoldToggle() && target.closest(THINK_ROW_SELECTOR) === null) return\n // Only the chat area is taken over. aria-expanded is used page-wide — the\n // model picker, the settings dropdowns, the sidebar's rows, the task panel\n // — and their opening has nothing to do with the chat flow's movement;\n // taking them over would squash menus and delay a click by 200 ms.\n if (target.closest(CHAT_FLOW_SELECTOR) === null) return\n // A popup opens no folding body: menus and dialogs must not move the chat flow.\n if (target.closest(FOLD_POPUP_SELECTOR) !== null) return\n // A collapse is rolling: for these 200 ms no new click is taken, so two\n // folds cannot pile up.\n if (glideShutting) {\n event.stopPropagation()\n event.preventDefault()\n return\n }\n // The previous opening direction's wait is void.\n glideIntent = null\n // The control: a DisclosureRow, or any other button carrying aria-expanded\n // (a process group's header among them).\n const disclosure = target.closest<HTMLElement>(FOLD_DISCLOSURE_SELECTOR)\n const control = disclosure !== null ? disclosure : target.closest<HTMLElement>(FOLD_TOGGLE_SELECTOR)\n if (control === null) return\n // A turn's header and its trigger notice are skipped whole: what they open\n // is a whole turn's content, neither road suits it, and the host's own\n // instant toggle is steadier there.\n if (control.closest(FOLD_SKIPPED_CONTROL_SELECTOR) !== null) return\n // A group's header controls its body, a member row does not — see foldProcessBody.\n const groupBody = foldProcessBody(control)\n const groupParent = groupBody === null ? null : groupBody.parentElement\n const groupRoot = groupParent === null ? null : groupParent.closest<HTMLElement>(PROCESS_GROUP_SELECTOR)\n const body = groupBody !== null ? groupBody : foldExpandedBody(control)\n // The opening direction: wait for React to insert the body and animate in\n // the observer callback. The starting height is measured on this side —\n // the group root is collapsed right now, and that is the stretch the door\n // will pull out.\n if (body === null || body.hasAttribute('hidden')) {\n glideIntent = {\n control,\n groupBody,\n groupRoot,\n collapsedHeight: groupRoot === null ? 0 : groupRoot.getBoundingClientRect().height,\n watch: foldWatchReader(foldControlAtBottom(control)),\n takenAt: Date.now(),\n }\n return\n }\n if (reduceMotion()) return\n // The closing direction: intercept the click, let the element roll up, and\n // hand the click back when it is done.\n event.stopPropagation()\n event.preventDefault()\n glideShutting = true\n const watch = foldWatchReader(foldControlAtBottom(control))\n const collapsed = groupBody !== null\n ? () => groupBody.hasAttribute('hidden')\n : () => !body.isConnected\n rollShut({\n target: groupRoot !== null ? groupRoot : body,\n // A group root stops at the header's own stretch: once the body is\n // folded away, that is what the root's height comes to.\n floor: groupRoot === null\n ? 0\n : Math.max(0, groupRoot.getBoundingClientRect().height - body.getBoundingClientRect().height),\n collapsed,\n control,\n watch,\n })\n }\n\n const leaveOwner = joinScrollOwner()\n document.addEventListener('click', onClick, true)\n // hidden is watched too: a process group folds with\n // setAttribute('hidden', 'until-found'), an attribute change alone, which\n // a child-list subscription never hears. Elsewhere a hidden flip usually\n // arrives with no intent pending and returns at once.\n const stopMutations = subscribeMutations(document.body, { childList: true, subtree: true, attributeFilter: ['hidden'] }, flush)\n\n return () => {\n document.removeEventListener('click', onClick, true)\n stopMutations()\n glideIntent = null\n leaveOwner()\n }\n}\n", "import { subscribeMutations } from '../../core/bus'\nimport { requestFrame } from '../../core/frame'\nimport { beginChatFoldToggle, endChatFoldToggle, isChatFoldToggle } from './fold-toggle'\nimport { writeScroll } from '../../shared/scroll-owner'\nimport { CONVERSATION_SCROLL_SELECTOR, FOLLOW_THRESHOLD_PX, PROCESS_ACTIVITY_SELECTOR, PROCESS_BODY_SELECTOR, PROCESS_EXPANDED_MODE_ATTRIBUTE, PROCESS_GROUP_SELECTOR, RUNNING_STATE, SHIMMER_ATTRIBUTE, SHIMMER_LEGACY_ATTRIBUTE, SHIMMER_SELECTOR } from '@dsh-claude-style/contracts/dom'\n\n/**\n * A running process group opens by default and folds back once the piece of\n * work ends (the final answer is due).\n *\n * The host gathers a turn's adjacent process content — reasoning, tool calls,\n * commands, file writes — into one process group, opened and closed by its own\n * inline control. In the compact and standard tiers the body starts folded,\n * so the reader has to open it to see what the model is doing. The detailed\n * and fully-expanded tiers do not cap the body (it is open throughout), and\n * this module leaves them alone entirely — the test is the group root's\n * data-group-expanded-mode.\n *\n * A group's phase is read off the shimmer in its header: the host attaches\n * data-shimmer (older hosts write data-text-shimmer) only while the process\n * section is still running. Whether the body is open is its own\n * hidden attribute — the host hides searchably, setting hidden=\"until-found\"\n * when folded and removing it entirely when open. Both are semantic\n * attributes. Command cards inside the group use the shimmer too, so the\n * phase is only ever asked of the header.\n *\n * The group still belongs to the reader: a reader who touched a group in a\n * phase keeps it for that phase. The hand-over is per phase — folding a group\n * while its process still runs means he does not want to watch it right now,\n * and folding it back when the section ends would mean nothing.\n */\n/** The piece of work is over and the final answer is due. */\nconst PROCESS_CLOSED = 'closed'\n\n/**\n * Watch every process group on the page and bring each to what its phase\n * asks for.\n *\n * @returns teardown: the observer and the two listeners go away.\n */\nexport function createProcessFold() {\n /** The phase a group was in when the reader last touched it. */\n const touchedIn = new WeakMap<Element, string>()\n /** The phase a group was in when it was last toggled, so a press that changed nothing is not retried. */\n const attemptedIn = new WeakMap<Element, string>()\n /** Whether a scan is already queued. */\n let scanQueued = false\n /** The groups this batch of mutations touched. */\n const touchedGroups = new Set<Element>()\n\n /**\n * Bring these groups to what their current phase asks for.\n * @param groups - this batch of groups; some may already be unattached.\n */\n const syncGroups = (groups: Iterable<Element>) => {\n for (const group of groups) {\n // A frame sits between collecting and settling, and the group may be gone by then.\n if (!group.isConnected) continue\n // The detailed and fully-expanded tiers do not cap the body, and the\n // host keeps the header in the DOM there (wrapped in a hidden shell), so\n // pressing it would only flip the host's own open state with nothing for\n // the reader to see.\n if (group.hasAttribute(PROCESS_EXPANDED_MODE_ATTRIBUTE)) continue\n const header = group.querySelector(PROCESS_ACTIVITY_SELECTOR)\n const body = group.querySelector(PROCESS_BODY_SELECTOR)\n if (!(header instanceof HTMLElement) || body === null) continue\n const phase = header.querySelector(SHIMMER_SELECTOR) === null ? PROCESS_CLOSED : RUNNING_STATE\n // The reader has decided this group's state in this phase: leave it.\n if (touchedIn.get(group) === phase) continue\n if (body.hasAttribute('hidden') === (phase === PROCESS_CLOSED)) continue\n // A press that changed nothing will not change anything next time either.\n if (attemptedIn.get(group) === phase) continue\n attemptedIn.set(group, phase)\n // The host's header onClick focuses the control, which is meant for a\n // real press. A programmatic one must not take the focus away from the\n // reader, or the browser draws a focus ring on the header that just\n // opened, as if someone had pressed Tab.\n const previousFocus = document.activeElement\n // The same focus() also scrolls the header into view, and that scroll\n // looks to the host exactly like the reader scrolling: its follow is\n // suspended for a 500 ms sampling window, in which a resize follows\n // nothing, and by the time it settles the content has grown past the\n // line — the follow switches off with the reader never having touched\n // the keyboard. So the position is put back after the press.\n const scroller = header.closest<HTMLElement>(CONVERSATION_SCROLL_SELECTOR)\n const scrollTop = scroller === null ? null : scroller.scrollTop\n // Whether the reader was at the bottom is read before the press: the\n // press itself changes the layout.\n const wasAtBottom = scroller !== null\n && scroller.scrollHeight - scroller.scrollTop - scroller.clientHeight <= FOLLOW_THRESHOLD_PX\n // This press is ours: neither the fold glide nor the thinking row's side\n // may read it as the reader's intent.\n beginChatFoldToggle()\n try {\n header.click()\n } finally {\n endChatFoldToggle()\n }\n // The position goes back, but not to a place short of the end for a\n // reader who was at the end: that write is a scroll too, and the host\n // would read it as the reader moving and switch its follow off. At the\n // bottom it is pinned there.\n if (scroller !== null && scrollTop !== null && scroller.scrollTop !== scrollTop) {\n writeScroll(scroller, wasAtBottom ? scroller.scrollHeight : scrollTop, 'fold')\n }\n // With the reader already on the header this puts the focus back where\n // it was and changes nothing.\n if (previousFocus instanceof HTMLElement && previousFocus.isConnected) previousFocus.focus({ preventScroll: true })\n if (document.activeElement === header) header.blur()\n }\n }\n\n /** Settle every group already on the page once, right after install. */\n const syncEveryGroup = () => {\n syncGroups(document.querySelectorAll(PROCESS_GROUP_SELECTOR))\n }\n\n /** Record that the reader, and not this module, just decided a group's state. */\n const rememberReaderTouched = (event: Event) => {\n if (isChatFoldToggle()) return\n const target = event.target\n if (!(target instanceof Element)) return\n const group = target.closest(PROCESS_GROUP_SELECTOR)\n if (group === null) return\n const header = group.querySelector(PROCESS_ACTIVITY_SELECTOR)\n touchedIn.set(group, header !== null && header.querySelector(SHIMMER_SELECTOR) !== null ? RUNNING_STATE : PROCESS_CLOSED)\n }\n\n // Streaming changes the DOM far faster than this needs to run, so one scan\n // a frame at most.\n const onRecords = (records: MutationRecord[]) => {\n const known = touchedGroups.size\n for (const record of records) {\n const target = record.target\n const element = target instanceof Element ? target : target.parentElement\n const group = element?.closest(PROCESS_GROUP_SELECTOR) ?? null\n if (group !== null) touchedGroups.add(group)\n for (const node of record.addedNodes) {\n if (!(node instanceof HTMLElement)) continue\n if (node.matches(PROCESS_GROUP_SELECTOR)) touchedGroups.add(node)\n for (const found of node.querySelectorAll(PROCESS_GROUP_SELECTOR)) touchedGroups.add(found)\n }\n }\n // A change with no process group in it (the sidebar, the plugin page) is\n // not worth a frame.\n if (touchedGroups.size === known) return\n if (scanQueued) return\n scanQueued = true\n // The scan reads each one's state and folds it open or shut: write phase (D40).\n requestFrame({\n write() {\n scanQueued = false\n const groups = [...touchedGroups]\n touchedGroups.clear()\n syncGroups(groups)\n },\n })\n }\n const stopMutations = subscribeMutations(document.body, {\n subtree: true,\n childList: true,\n attributes: true,\n // The group root's expand-mode attribute is in range too: switching tiers\n // adds or removes it, and that batch has to be scanned again.\n attributeFilter: [SHIMMER_ATTRIBUTE, SHIMMER_LEGACY_ATTRIBUTE, 'hidden', PROCESS_EXPANDED_MODE_ATTRIBUTE],\n }, onRecords)\n document.addEventListener('click', rememberReaderTouched, true)\n document.addEventListener('keydown', rememberReaderTouched, true)\n syncEveryGroup()\n\n return () => {\n stopMutations()\n document.removeEventListener('click', rememberReaderTouched, true)\n document.removeEventListener('keydown', rememberReaderTouched, true)\n }\n}\n", "import { QUIET_ATTR } from '../../constants'\nimport { observeSize, subscribeMutations } from '../../core/bus'\nimport { requestFrame } from '../../core/frame'\nimport { copyLabel } from '../../core/i18n'\nimport { motionReduced } from '../../core/prefs'\nimport { buildElement } from '../../shared/dom'\nimport { ASSISTANT_STEP_KIND, CHAT_GROUP_PART_ATTRIBUTE, CHAT_GROUP_PART_REASONING, FLOW_KIND_ATTRIBUTE, PROCESS_ACTIVITY_SELECTOR, PROCESS_CONTENT_SELECTOR, PROCESS_GROUP_SELECTOR, SHIMMER_ATTRIBUTE, SHIMMER_LEGACY_ATTRIBUTE, SHIMMER_SELECTOR, TOOL_CALL_KIND } from '@dsh-claude-style/contracts/dom'\n\n/**\n * A process group's header names what the group holds — 「执行 2 次思考,调用 1 次\n * 工具」 — in place of the host's list of activities (「执行了命令,已读取文件,\n * 已调用工具等」), each number rolling as the work grows. A header without the\n * room for the sentence falls back to the compact figures (`思考×2 · 工具×1`),\n * the wording dsh-better-display's fold summary uses (MIT).\n *\n * The host keeps its header and its words: the summary is a span of the skin's\n * own at the end of the control, marked quiet so writing it wakes no pass, and\n * the stylesheet hides the host's words while it stands (fold.css). The header's\n * accessible name is the sentence, since the summary itself is hidden from the\n * accessibility tree and the host's words are hidden from view.\n */\n\n/** The four figures, in the order the summary reads them. */\nexport type ProcessFigure = 'thinking' | 'output' | 'tool' | 'record'\nexport type ProcessCounts = Record<ProcessFigure, number>\n/** The two wordings: the sentence, and the compact one a narrow header falls back to. */\nexport type SummaryForm = 'full' | 'compact'\n\nconst FIGURES: readonly ProcessFigure[] = ['thinking', 'output', 'tool', 'record']\n\n/** One copied string: the document's key and the English the bundle carries when it cannot be read. */\ninterface CopyText { key: string, fallback: string }\n\n/**\n * Each figure's words. The sentence names the act and its count, and English\n * spells one and several differently — the host's own dictionaries carry the\n * same `.one` / `.other` pair (message.turnProcess.toolCalls).\n */\nconst FIGURE_COPY: Record<ProcessFigure, { full: { one: CopyText, other: CopyText }, compact: CopyText }> = {\n thinking: {\n full: {\n one: { key: 'processSummaryFullThoughtOne', fallback: '{count} thought' },\n other: { key: 'processSummaryFullThoughtOther', fallback: '{count} thoughts' },\n },\n compact: { key: 'processSummaryThinking', fallback: 'Thinking×{count}' },\n },\n output: {\n full: {\n one: { key: 'processSummaryFullOutputOne', fallback: '{count} output' },\n other: { key: 'processSummaryFullOutputOther', fallback: '{count} outputs' },\n },\n compact: { key: 'processSummaryOutput', fallback: 'Output×{count}' },\n },\n tool: {\n full: {\n one: { key: 'processSummaryFullToolOne', fallback: '{count} tool call' },\n other: { key: 'processSummaryFullToolOther', fallback: '{count} tool calls' },\n },\n compact: { key: 'processSummaryTool', fallback: 'Tools×{count}' },\n },\n record: {\n full: {\n one: { key: 'processSummaryFullRecordOne', fallback: '{count} record' },\n other: { key: 'processSummaryFullRecordOther', fallback: '{count} records' },\n },\n compact: { key: 'processSummaryRecord', fallback: 'Records×{count}' },\n },\n}\n\n/** The sentence's separator; the compact figures keep the host's own (message.turnProcess.separator). */\nconst FULL_SEPARATOR = () => copyLabel('processSummaryFullSeparator', ', ')\nconst COMPACT_SEPARATOR = ' · '\n/** On a group root while its header shows the summary; the stylesheet hides the host's words under it. */\nexport const PROCESS_SUMMARY_ATTR = 'data-dsh-claude-summary'\n/** On the summary while the group's section still runs: the stylesheet sweeps it the way the host sweeps its words. */\nexport const PROCESS_SUMMARY_RUNNING_ATTR = 'data-dsh-claude-summary-running'\n/** On the summary: the wording it stands in. */\nexport const PROCESS_SUMMARY_FORM_ATTR = 'data-dsh-claude-summary-form'\n/** On a rolling digit: `enter` rises into place, `exit` leaves upward, `settled` stands. */\nconst ROLL_ATTR = 'data-dsh-claude-roll'\n/** How long a digit takes to roll, as the stylesheet's animations run it. */\nconst ROLL_MS = 160\nconst SUMMARY_CLASS = 'dsh-claude-process-summary'\n/** The hidden span holding the sentence, whose natural width tells whether the header has room for it. */\nconst FIT_CLASS = 'dsh-claude-process-summary-fit'\n\n/**\n * What one group holds: its body's own rows, a thought or an output by the step\n * part they carry, a tool call, and anything else (a command, a record). A tool\n * row's inner calls are its own business and are not rows of the body.\n */\nexport function countProcessItems(content: Element): ProcessCounts {\n const counts: ProcessCounts = { thinking: 0, output: 0, tool: 0, record: 0 }\n for (const row of content.children) {\n const kind = row.getAttribute(FLOW_KIND_ATTRIBUTE)\n if (kind === null) continue\n if (kind === ASSISTANT_STEP_KIND) {\n if (row.getAttribute(CHAT_GROUP_PART_ATTRIBUTE) === CHAT_GROUP_PART_REASONING) counts.thinking += 1\n else counts.output += 1\n } else if (kind === TOOL_CALL_KIND) counts.tool += 1\n else counts.record += 1\n }\n return counts\n}\n\n/** One figure's words in one form, the count standing where `{count}` is. */\nexport function figureWords(figure: ProcessFigure, form: SummaryForm, count: number) {\n const copy = FIGURE_COPY[figure]\n if (form === 'compact') return copyLabel(copy.compact.key, copy.compact.fallback)\n const chosen = count === 1 ? copy.full.one : copy.full.other\n return copyLabel(chosen.key, chosen.fallback)\n}\n\n/** The separator between two figures of one form. */\nexport function summarySeparator(form: SummaryForm) {\n return form === 'full' ? FULL_SEPARATOR() : COMPACT_SEPARATOR\n}\n\n/**\n * Which wording fits: the sentence while its natural width is within what the\n * header has for it, the compact figures otherwise.\n */\nexport function summaryForm(naturalWidth: number, availableWidth: number): SummaryForm {\n return naturalWidth <= availableWidth ? 'full' : 'compact'\n}\n\n/** One figure of the summary: the words around its count. */\nexport interface SummaryPart {\n figure: ProcessFigure\n before: string\n count: number\n after: string\n}\n\n/** The figures a group shows, the empty ones left out; none for a group with nothing counted. */\nexport function summaryParts(counts: ProcessCounts, form: SummaryForm): SummaryPart[] {\n const parts: SummaryPart[] = []\n for (const figure of FIGURES) {\n if (counts[figure] === 0) continue\n const template = figureWords(figure, form, counts[figure])\n const at = template.indexOf('{count}')\n parts.push(at < 0\n ? { figure, before: template, count: counts[figure], after: '' }\n : { figure, before: template.slice(0, at), count: counts[figure], after: template.slice(at + '{count}'.length) })\n }\n return parts\n}\n\n/** One form's line of text, for the header's name and the fit measurement. */\nexport function summaryText(parts: readonly SummaryPart[], form: SummaryForm) {\n const separator = summarySeparator(form)\n let text = ''\n parts.forEach((part, at) => {\n text += `${at === 0 ? '' : separator}${part.before}${part.count}${part.after}`\n })\n return text\n}\n\n/** What one group says: the figures in both wordings, and the sentence for the name. */\ninterface SummaryReading {\n full: SummaryPart[]\n compact: SummaryPart[]\n name: string\n}\n\n/**\n * Watch every process group on the page and keep its header's summary in step\n * with what the group holds, in the wording the header has room for.\n *\n * @returns teardown: the summaries, the marks and the names go, and the host's words come back.\n */\nexport function createProcessSummary() {\n /** Each summarised header: the name written there, and the size watch on its summary. */\n const named = new Map<HTMLElement, { name: string, unwatch: () => void }>()\n /** The digits still leaving, so a teardown or a quick second change can finish them. */\n const leaving = new Map<HTMLElement, number>()\n /** The groups waiting for the next frame. */\n const pending = new Set<Element>()\n let queued = false\n\n /** One figure's count, rolled from the one it showed. */\n function setCount(roll: HTMLElement, count: number) {\n const text = String(count)\n const current = roll.querySelector<HTMLElement>(`[${ROLL_ATTR}]:not([${ROLL_ATTR}=\"exit\"])`)\n if (current !== null && current.textContent === text) return\n const sizer = roll.firstElementChild as HTMLElement\n sizer.textContent = text\n const animate = current !== null && !motionReduced()\n if (current !== null) {\n if (animate) {\n current.setAttribute(ROLL_ATTR, 'exit')\n leaving.set(current, window.setTimeout(() => {\n leaving.delete(current)\n current.remove()\n }, ROLL_MS))\n } else current.remove()\n }\n const digit = buildElement('span', 'dsh-claude-process-summary-digit', text)\n digit.setAttribute(ROLL_ATTR, animate ? 'enter' : 'settled')\n roll.appendChild(digit)\n }\n\n /** The summary span of one header, its hidden measurement standing inside it. */\n function summaryOf(header: HTMLElement) {\n const existing = header.querySelector<HTMLElement>(`:scope > .${SUMMARY_CLASS}`)\n if (existing !== null) return existing\n const summary = buildElement('span', SUMMARY_CLASS)\n summary.setAttribute(QUIET_ATTR, '')\n summary.setAttribute('aria-hidden', 'true')\n summary.appendChild(buildElement('span', FIT_CLASS))\n header.appendChild(summary)\n return summary\n }\n\n /** The hidden span holding the sentence, laid out without taking room. */\n function fitOf(summary: HTMLElement) {\n return summary.firstElementChild as HTMLElement\n }\n\n /**\n * What the header may spend on its summary: the room its containing block\n * gives it, less its own edges, every other child and the gaps between them.\n * The header's own box cannot answer this — the host's control is sized to\n * its content, so its current width follows the wording it is already\n * showing and the check would agree with itself.\n */\n function availableWidth(header: HTMLElement, summary: HTMLElement) {\n const style = getComputedStyle(header)\n const parent = header.parentElement\n const parentStyle = parent === null ? null : getComputedStyle(parent)\n const limit = parent === null || parentStyle === null\n ? header.clientWidth\n : parent.clientWidth - (parseFloat(parentStyle.paddingLeft) || 0) - (parseFloat(parentStyle.paddingRight) || 0)\n const gap = parseFloat(style.columnGap) || 0\n let room = limit\n - (parseFloat(style.paddingLeft) || 0) - (parseFloat(style.paddingRight) || 0)\n - (parseFloat(style.borderLeftWidth) || 0) - (parseFloat(style.borderRightWidth) || 0)\n for (const child of header.children) {\n if (child === summary) continue\n const width = child.getBoundingClientRect().width\n if (width > 0) room -= width + gap\n }\n return Math.max(0, room)\n }\n\n /**\n * The wording this header has room for. The hidden span holds the sentence,\n * which is what the header shows while there is room for it; a header inside\n * a folded turn measures nothing and keeps the sentence until it is opened.\n */\n function formOf(header: HTMLElement, summary: HTMLElement, sentence: string): SummaryForm {\n const fit = fitOf(summary)\n if (fit.textContent !== sentence) fit.textContent = sentence\n return summaryForm(fit.getBoundingClientRect().width, availableWidth(header, summary))\n }\n\n /** What the group holds, or null for a group with nothing counted. */\n function readingOf(group: Element): SummaryReading | null {\n const content = group.querySelector(PROCESS_CONTENT_SELECTOR)\n if (content === null) return null\n const counts = countProcessItems(content)\n const full = summaryParts(counts, 'full')\n if (full.length === 0) return null\n return { full, compact: summaryParts(counts, 'compact'), name: summaryText(full, 'full') }\n }\n\n /** Draw one header's summary part by part, so each count rolls in place. */\n function render(summary: HTMLElement, parts: readonly SummaryPart[], form: SummaryForm, running: boolean) {\n summary.setAttribute(PROCESS_SUMMARY_FORM_ATTR, form)\n summary.toggleAttribute(PROCESS_SUMMARY_RUNNING_ATTR, running)\n const separator = summarySeparator(form)\n const kept = new Set(parts.map(part => part.figure))\n for (const stale of [...summary.children]) {\n if (stale === fitOf(summary)) continue\n if (!kept.has((stale as HTMLElement).dataset.figure as ProcessFigure)) stale.remove()\n }\n let previous: Element | null = null\n for (const part of parts) {\n let element = summary.querySelector<HTMLElement>(`:scope > [data-figure=\"${part.figure}\"]`)\n if (element === null) {\n element = buildElement('span', 'dsh-claude-process-summary-part')\n element.dataset.figure = part.figure\n element.append(buildElement('span', 'dsh-claude-process-summary-words'), buildElement('span', 'dsh-claude-process-summary-roll'), buildElement('span', 'dsh-claude-process-summary-words'))\n element.children[1].appendChild(buildElement('span', 'dsh-claude-process-summary-sizer'))\n }\n // Parts keep the figure order: a figure that appears later slots in behind its predecessor.\n const place: Element | null = previous === null ? fitOf(summary).nextElementSibling : previous.nextElementSibling\n if (place !== element) summary.insertBefore(element, place)\n const [before, roll, after] = element.children as HTMLCollectionOf<HTMLElement>\n const lead = previous === null ? part.before : separator + part.before\n if (before.textContent !== lead) before.textContent = lead\n if (after.textContent !== part.after) after.textContent = part.after\n setCount(roll, part.count)\n previous = element\n }\n }\n\n /** Take one header's summary down and give the host's words back. */\n function release(header: HTMLElement) {\n const kept = named.get(header)\n kept?.unwatch()\n header.querySelector(`:scope > .${SUMMARY_CLASS}`)?.remove()\n if (kept !== undefined && header.getAttribute('aria-label') === kept.name) header.removeAttribute('aria-label')\n named.delete(header)\n header.closest(PROCESS_GROUP_SELECTOR)?.removeAttribute(PROCESS_SUMMARY_ATTR)\n }\n\n /**\n * Write what each group asks for: the wording that fits, and the name — which\n * is the sentence either way, since the drawn wording answers the room this\n * header has and the name says what the group holds.\n */\n function flush(groups: readonly Element[], forms: Map<HTMLElement, SummaryForm>) {\n for (const group of groups) {\n if (!group.isConnected) continue\n const header = group.querySelector<HTMLElement>(PROCESS_ACTIVITY_SELECTOR)\n if (header === null) continue\n const reading = readingOf(group)\n if (reading === null) {\n if (named.has(header)) release(header)\n continue\n }\n const summary = summaryOf(header)\n const form = forms.get(header) ?? formOf(header, summary, summaryText(reading.full, 'full'))\n render(summary, form === 'full' ? reading.full : reading.compact, form, header.querySelector(SHIMMER_SELECTOR) !== null)\n if (header.getAttribute('aria-label') !== reading.name) header.setAttribute('aria-label', reading.name)\n const known = named.get(header)\n if (known === undefined) {\n // A header only ever shrinks with its row, so its own size is what to watch.\n named.set(header, { name: reading.name, unwatch: observeSize(summary, () => queue(group)) })\n } else known.name = reading.name\n if (!group.hasAttribute(PROCESS_SUMMARY_ATTR)) group.setAttribute(PROCESS_SUMMARY_ATTR, '')\n }\n // A header the host replaced or unmounted takes nothing more from this module.\n for (const header of [...named.keys()]) {\n if (!header.isConnected) release(header)\n }\n }\n\n function queue(group: Element) {\n pending.add(group)\n if (queued) return\n queued = true\n const forms = new Map<HTMLElement, SummaryForm>()\n requestFrame({\n read() {\n // The measurement the write needs, taken before this frame's writes.\n for (const candidate of pending) {\n const header = candidate.querySelector<HTMLElement>(PROCESS_ACTIVITY_SELECTOR)\n const reading = readingOf(candidate)\n if (header === null || reading === null) continue\n const summary = summaryOf(header)\n forms.set(header, formOf(header, summary, summaryText(reading.full, 'full')))\n }\n },\n write() {\n queued = false\n const groups = [...pending]\n pending.clear()\n flush(groups, forms)\n },\n })\n }\n\n const stopMutations = subscribeMutations(document.body, {\n subtree: true,\n childList: true,\n attributeFilter: [SHIMMER_ATTRIBUTE, SHIMMER_LEGACY_ATTRIBUTE],\n skipQuiet: true,\n }, records => {\n for (const record of records) {\n const target = record.target instanceof Element ? record.target : record.target.parentElement\n const group = target?.closest(PROCESS_GROUP_SELECTOR) ?? null\n if (group !== null) queue(group)\n for (const node of record.addedNodes) {\n if (!(node instanceof Element)) continue\n if (node.matches(PROCESS_GROUP_SELECTOR)) queue(node)\n for (const found of node.querySelectorAll(PROCESS_GROUP_SELECTOR)) queue(found)\n }\n }\n })\n for (const group of document.querySelectorAll(PROCESS_GROUP_SELECTOR)) queue(group)\n\n return {\n /** The shell language changed: every summary is written again in it. */\n rewrite() {\n for (const group of document.querySelectorAll(PROCESS_GROUP_SELECTOR)) queue(group)\n },\n stop() {\n stopMutations()\n for (const [digit, timer] of leaving) {\n window.clearTimeout(timer)\n digit.remove()\n }\n leaving.clear()\n for (const header of [...named.keys()]) release(header)\n for (const group of document.querySelectorAll(`[${PROCESS_SUMMARY_ATTR}]`)) group.removeAttribute(PROCESS_SUMMARY_ATTR)\n },\n }\n}\n", "import { subscribeMutations } from '../../core/bus'\nimport { requestFrame } from '../../core/frame'\nimport { beginChatFoldToggle, endChatFoldToggle, isChatFoldToggle } from './fold-toggle'\nimport { EXPANDED_ATTRIBUTE, ROW_PHASE_ATTRIBUTE, RUNNING_STATE, THINK_ROW_SELECTOR } from '@dsh-claude-style/contracts/dom'\n\n/**\n * Keep a thinking row open while the model is still reasoning, and fold it\n * back once the reasoning stops.\n *\n * Every thinking row the host renders arrives collapsed: its ReasoningRow\n * pins it with a plain useState(false), and no setting exposes it. The row's\n * own expand control is the one lever this feature can pull, and at least\n * that lever is stable — the row carries data-variant=\"think\", data-state\n * (running while the model reasons, ok once it stops) and data-expanded,\n * all semantic attributes rather than the hashed class names around them.\n *\n * The row still belongs to the reader. A press or a key inside it records\n * the phase it happened in, and this module leaves the row alone for that\n * phase: folded mid-reasoning it stays folded, and a stopped row opened by\n * hand stays open. The hand-over is deliberately per phase rather than per\n * row — folding and unfolding while the model reasons is not a request to\n * keep it open once the reasoning stops, so the ok phase still folds it.\n */\n/**\n * Watch every thinking row on the page and bring each to what its phase asks\n * for.\n *\n * @param onRows - hears the rows this scan touched, for the feature's other\n * reading of a thinking row (its reasoning's streamed window). One observer\n * answers both, so the two cannot see different batches.\n * @returns teardown: the observer and the two listeners go away.\n */\nexport function createReasoningFold(onRows?: (rows: readonly Element[]) => void) {\n /** The phase a row was in when the reader last touched it. */\n const touchedIn = new WeakMap<Element, string>()\n /** The phase a row was in when it was last toggled, so a press that changed nothing is not retried. */\n const attemptedIn = new WeakMap<Element, string>()\n /** Whether a scan is already queued. */\n let scanQueued = false\n /** The rows this batch of mutations touched. */\n const touchedRows = new Set<Element>()\n\n /**\n * Bring these rows to what their current phase asks for.\n *\n * Which node is the control depends on how the host configures the\n * expandable area: with expandOnRowClick the whole row is the button,\n * otherwise it is the chevron on its leading edge. \"The first descendant\n * that looks like a button\" covers both without betting on which one this\n * build chose.\n *\n * @param rows - this batch of rows; some may already be unattached.\n */\n const syncRows = (rows: Iterable<Element>) => {\n for (const row of rows) {\n // A frame sits between collecting and settling, and the row may be\n // gone by then — clicking an element outside the document does nothing.\n if (!row.isConnected) continue\n const phase = row.getAttribute(ROW_PHASE_ATTRIBUTE) ?? ''\n if (phase === '') continue\n // The reader has decided this row's state in this phase: leave it.\n if (touchedIn.get(row) === phase) continue\n if (row.hasAttribute(EXPANDED_ATTRIBUTE) === (phase === RUNNING_STATE)) continue\n // A press that changed nothing will not change anything next time either.\n if (attemptedIn.get(row) === phase) continue\n attemptedIn.set(row, phase)\n const control = row.querySelector('[role=\"button\"], button')\n if (!(control instanceof HTMLElement)) continue\n // The capture listener below sees this same click, so the press has to\n // be declared: it is not the reader asking. The token reveal's own fold\n // guard reads it in the same turn, or the automatic fold would silence\n // the text that just started streaming for 400 ms.\n beginChatFoldToggle()\n try {\n control.click()\n } finally {\n endChatFoldToggle()\n }\n }\n }\n\n /** Settle every row already on the page once, right after install. */\n const syncEveryRow = () => {\n const rows = [...document.querySelectorAll(THINK_ROW_SELECTOR)]\n onRows?.(rows)\n syncRows(rows)\n }\n\n /** Record that the reader, and not this module, just decided a row's state. */\n const rememberReaderTouched = (event: Event) => {\n if (isChatFoldToggle()) return\n const target = event.target\n if (!(target instanceof Element)) return\n const row = target.closest(THINK_ROW_SELECTOR)\n if (row === null) return\n touchedIn.set(row, row.getAttribute(ROW_PHASE_ATTRIBUTE) ?? '')\n }\n\n // Streaming changes the DOM far faster than this needs to run, so one scan\n // a frame at most.\n const onRecords = (records: MutationRecord[]) => {\n const known = touchedRows.size\n for (const record of records) {\n // Both paths matter. record.target is the node the change happened on —\n // the row itself or something inside it for an attribute, the parent\n // container for a child list — and an ancestor walk finds the row from\n // either. addedNodes covers a row that just arrived, which brings\n // itself.\n const target = record.target\n if (target instanceof Element) {\n const row = target.closest(THINK_ROW_SELECTOR)\n if (row !== null) touchedRows.add(row)\n }\n for (const node of record.addedNodes) {\n if (!(node instanceof HTMLElement)) continue\n if (node.matches(THINK_ROW_SELECTOR)) touchedRows.add(node)\n for (const row of node.querySelectorAll(THINK_ROW_SELECTOR)) touchedRows.add(row)\n }\n }\n // A change with no thinking row in it (a tool row turning over, the plugin\n // page repainting) is not worth a frame.\n if (touchedRows.size === known) return\n if (scanQueued) return\n scanQueued = true\n // The scan reads each one's state and folds it open or shut: write phase (D40).\n requestFrame({\n write() {\n scanQueued = false\n const rows = [...touchedRows]\n touchedRows.clear()\n onRows?.(rows)\n syncRows(rows)\n },\n })\n }\n const stopMutations = subscribeMutations(document.body, {\n subtree: true,\n childList: true,\n attributes: true,\n attributeFilter: [ROW_PHASE_ATTRIBUTE, EXPANDED_ATTRIBUTE],\n }, onRecords)\n document.addEventListener('click', rememberReaderTouched, true)\n document.addEventListener('keydown', rememberReaderTouched, true)\n syncEveryRow()\n\n return () => {\n stopMutations()\n document.removeEventListener('click', rememberReaderTouched, true)\n document.removeEventListener('keydown', rememberReaderTouched, true)\n }\n}\n", "import { requestFrame } from '../../core/frame'\nimport { motionReduced } from '../../core/prefs'\nimport { EXPANDED_ATTRIBUTE, REASONING_TEXT_SELECTOR, ROW_PHASE_ATTRIBUTE, RUNNING_STATE, THINK_ROW_SELECTOR } from '@dsh-claude-style/contracts/dom'\n\n/**\n * While the model reasons, its thinking row plays the reasoning back the way\n * transitions.dev's \"Reasoning stream\" does: the text steps up two lines at a\n * time on the snippet's own clock instead of pushing the conversation down line\n * by line, with a soft mask at each edge once it can step.\n *\n * What the snippet loops over a fixed transcript, this reads as live text: no\n * copy, no wrap, and the stepping stops at the newest line, so the reader never\n * loses the end of the reasoning. The host keeps its row, its header and its own\n * collapsing: the window is the nearest ancestor of the host's rendered Markdown\n * that has a box of its own — one host version wraps it in a slot that generates\n * none — and what slides inside that is the Markdown itself.\n *\n * The window grows with the reasoning and stops at the height reasoning is\n * allowed to reach — the host's own cap on a process group's body, the tallest\n * the open row gets — so the text is never cut off to a height the row will not\n * keep: below the cap the window is exactly as tall as the text, and at the cap\n * it stays there and the text steps. That is also what makes the end of the\n * reasoning quiet: the window comes off a text box that already stands at its\n * own height. The mask belongs to the capped state alone, so a reasoning shorter\n * than the cap is never faded.\n *\n * The window's clock is also its watch: a step re-measures the text, so a\n * reasoning that grew past the window since the last step is windowed then,\n * without a second observer on the streaming subtree.\n */\n\n/** On the reasoning's window while it stands: the stylesheet clips it and hangs the step on the text. */\nexport const REASON_WINDOW_ATTR = 'data-dsh-claude-reason-window'\n/** On the window once the text has filled the cap: the stylesheet masks its edges. */\nexport const REASON_CAPPED_ATTR = 'data-dsh-claude-reason-capped'\n/** The window's height in pixels: the text's own height, held under the cap. */\nexport const REASON_WINDOW_HEIGHT_PROPERTY = '--dsh-claude-reason-window-height'\n\n/**\n * What each of the snippet's tokens falls back to when the stylesheet's own\n * value cannot be read. `cap` mirrors the host's max-height on a process group's\n * body, which the stylesheet's --dsh-claude-reason-window-cap carries.\n */\nconst FALLBACKS = { hold: 840, lines: 2, cap: 400 }\n\n/** A duration, a count or a length written in a CSS token. */\nfunction tokenNumber(value: string, fallback: number) {\n const amount = Number.parseFloat(value)\n return Number.isFinite(amount) ? amount : fallback\n}\n\n/** One windowed row: what it clips, what slides there, the wait between steps and how far the text has risen. */\ninterface WindowState {\n window: HTMLElement\n text: HTMLElement\n timer: number\n offset: number\n}\n\n/** The rendered reasoning text of a row, or null while the host renders none. */\nfunction textOf(row: Element) {\n const text = row.querySelector<HTMLElement>(REASONING_TEXT_SELECTOR)\n return text === null || text.offsetHeight === 0 ? null : text\n}\n\n/** The nearest ancestor of the text that is laid out as a box: what the window clips. */\nfunction windowOf(row: Element, text: HTMLElement) {\n let node: HTMLElement | null = text.parentElement\n while (node !== null && node !== row) {\n if (getComputedStyle(node).display !== 'contents') return node\n node = node.parentElement\n }\n return null\n}\n\n/** The line height the text is set in, in pixels. */\nfunction lineHeightOf(text: HTMLElement) {\n const parsed = Number.parseFloat(getComputedStyle(text).lineHeight)\n return Number.isFinite(parsed) && parsed > 0 ? parsed : 20\n}\n\n/**\n * Watch every thinking row and keep its reasoning in the streamed window while\n * the model is working.\n *\n * @returns teardown: the windows come off and every wait is dropped.\n */\nexport function createReasoningStream() {\n const windows = new Map<Element, WindowState>()\n let queued = false\n const pending = new Set<Element>()\n\n /** Take one row's window off and drop its wait: the text stands as the host drew it. */\n function clearWindow(row: Element) {\n const state = windows.get(row)\n if (state === undefined) return\n window.clearTimeout(state.timer)\n windows.delete(row)\n state.window.removeAttribute(REASON_WINDOW_ATTR)\n state.window.removeAttribute(REASON_CAPPED_ATTR)\n state.window.style.removeProperty(REASON_WINDOW_HEIGHT_PROPERTY)\n state.text.style.removeProperty('transform')\n }\n\n /**\n * One wait of the window: the window takes the text's own height up to the cap,\n * the text rises by the snippet's step once it stands at the cap, never past\n * the newest line, and the next wait is booked for when this one has landed.\n * The wait is also where the text is re-measured, so a reasoning that has\n * grown since the last step is met at its new height on this one.\n */\n function tick(row: Element, state: WindowState) {\n const live = row.isConnected && state.window.isConnected && state.text.isConnected\n && row.getAttribute(ROW_PHASE_ATTRIBUTE) === RUNNING_STATE\n && row.hasAttribute(EXPANDED_ATTRIBUTE)\n && !motionReduced()\n // The host can rebuild the body under the same row (a session switch, a fresh\n // stream): the window follows what the row holds now.\n const current = live ? textOf(row) : null\n const viewport = current === null || current !== state.text ? null : state.window\n if (viewport === null) {\n // Not this module's window any more: the host's own body stands.\n if (windows.get(row) === state) clearWindow(row)\n return\n }\n const style = getComputedStyle(viewport)\n const lineHeight = lineHeightOf(state.text)\n const capPx = Math.round(tokenNumber(style.getPropertyValue('--dsh-claude-reason-window-cap'), FALLBACKS.cap))\n const stepPx = Math.round(lineHeight * tokenNumber(style.getPropertyValue('--dsh-claude-reason-lines'), FALLBACKS.lines))\n const holdMs = tokenNumber(style.getPropertyValue('--dsh-claude-reason-hold'), FALLBACKS.hold)\n const height = Math.min(state.text.offsetHeight, capPx)\n const capped = height >= capPx\n // Only what changes is written: the fold watches the row's attributes, and a\n // redundant write each wait would keep the frame scheduler awake.\n const heightPx = `${Math.max(0, height)}px`\n if (viewport.style.getPropertyValue(REASON_WINDOW_HEIGHT_PROPERTY) !== heightPx) viewport.style.setProperty(REASON_WINDOW_HEIGHT_PROPERTY, heightPx)\n if (capped !== viewport.hasAttribute(REASON_CAPPED_ATTR)) viewport.toggleAttribute(REASON_CAPPED_ATTR, capped)\n if (capped) {\n const reachable = Math.max(0, state.text.offsetHeight - height)\n const next = Math.min(state.offset + stepPx, reachable)\n if (next !== state.offset) {\n state.offset = next\n state.text.style.transform = `translateY(${-next}px)`\n }\n } else if (state.offset !== 0) {\n state.offset = 0\n state.text.style.removeProperty('transform')\n }\n state.timer = window.setTimeout(() => tick(row, state), Math.max(1, holdMs))\n }\n\n /** Give one row the window its phase asks for, or take it off. */\n function syncRow(row: Element) {\n const running = row.getAttribute(ROW_PHASE_ATTRIBUTE) === RUNNING_STATE\n const text = running && row.hasAttribute(EXPANDED_ATTRIBUTE) && !motionReduced() ? textOf(row) : null\n const viewport = text === null ? null : windowOf(row, text)\n const held = windows.get(row)\n if (text === null || viewport === null) {\n if (held !== undefined) clearWindow(row)\n return\n }\n if (held !== undefined && held.text === text && held.window === viewport) return\n if (held !== undefined) clearWindow(row)\n const state: WindowState = { window: viewport, text, timer: 0, offset: 0 }\n windows.set(row, state)\n // The mark is what the stylesheet clips and what the fold's own readers\n // look for; the capped mark joins it from the first wait that reaches the cap.\n viewport.setAttribute(REASON_WINDOW_ATTR, '')\n tick(row, state)\n }\n\n function flush() {\n queued = false\n const rows = [...pending]\n pending.clear()\n for (const row of rows) {\n if (row.isConnected) syncRow(row)\n }\n // A row the host replaced takes no wait with it.\n for (const row of [...windows.keys()]) {\n if (row.isConnected) continue\n clearWindow(row)\n }\n }\n\n function queue(row: Element) {\n pending.add(row)\n if (queued) return\n queued = true\n requestFrame({ write: flush })\n }\n\n return {\n /** Re-read every thinking row, for a change the caller saw outside a row. */\n sync() {\n for (const row of document.querySelectorAll(THINK_ROW_SELECTOR)) queue(row)\n },\n queueRow: queue,\n stop() {\n for (const row of [...windows.keys()]) clearWindow(row)\n pending.clear()\n },\n }\n}\n", "import { CHAT_FOLD_ATTR } from '../../constants'\nimport { isChatFoldBusy } from './fold-glide-parts'\nimport { installChatFoldGlide } from './fold-glide'\nimport { createProcessFold } from './process-fold'\nimport { createProcessSummary } from './process-summary'\nimport { createReasoningFold } from './reasoning-fold'\nimport { createReasoningStream } from './reasoning-stream'\nimport type { HostContext } from '../../core/host'\nimport type { FeatureHandle } from '../../core/scheduler'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './chat-fold.manifest'\n\n/** What the follow reads off the folding (ui.chatFold): whether a door is rolling. */\nexport interface ChatFoldHandle extends FeatureHandle {\n isBusy(): boolean\n}\n\n/**\n * The chat area's folding, ported from dsh-chat-ux: a thinking row stays open\n * while the model reasons and folds back once it stops (reasoning-fold.ts), a\n * process group opens while its section runs and folds back when it ends\n * (process-fold.ts), a reader's own press on a row rolls the body down or up\n * instead of snapping it (fold-glide.ts), a process group's header counts what\n * the group holds (process-summary.ts), and a running reasoning plays back\n * inside a window that steps up as it streams (reasoning-stream.ts). All of them\n * ride the one preference: it means \"the skin may fold the chat area\", so off\n * leaves the automatic folding, the door, the header's words and the reasoning's\n * window to the host.\n *\n * The door takes over the reader's clicks on a folding row, a takeover of the\n * host's interface like any other (D29): the entry installs this only while\n * the preference is on and dsh-chat-ux is off the page (the manifest), and\n * this teardown leaves the clicks alone again. The follow guard asks whether\n * a door is rolling through `ui.chatFold`, which exists only while installed.\n *\n * @param ctx - client context.\n * @param ui - shared handle table.\n * @returns teardown.\n */\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n document.body.setAttribute(CHAT_FOLD_ATTR, '')\n const stream = createReasoningStream()\n const stopReasoning = createReasoningFold(rows => {\n for (const row of rows) stream.queueRow(row)\n })\n const stopProcess = createProcessFold()\n const summary = createProcessSummary()\n const stopGlide = installChatFoldGlide()\n ui.chatFold = {\n isBusy: isChatFoldBusy,\n onCopyChange: () => {\n summary.rewrite()\n stream.sync()\n },\n // A resize can change the text's line height (the content font delta), which\n // the window's own height is measured from.\n reposition: () => stream.sync(),\n }\n return () => {\n delete ui.chatFold\n stream.stop()\n stopReasoning()\n stopProcess()\n summary.stop()\n stopGlide()\n document.body.removeAttribute(CHAT_FOLD_ATTR)\n }\n}\n", "import { readTurnActivity } from '../core/host'\nimport type { HostChatSnapshot, HostTurn } from '@dsh-claude-style/contracts/services'\n\n/**\n * What an open turn is doing now, in words (D32, D63): the states the waiting\n * line says, the one line that speaks for a running turn.\n *\n * The words are the copy document's own (`chatWait*`, model-descriptions.json);\n * a line that cannot read a state falls back to its own wording.\n */\n\n/** One line of copy: its key in the copy document and the English the bundle carries. */\nexport interface ActivityWords {\n key: string\n fallback: string\n}\n\n/** The model is thinking. */\nexport const ACTIVITY_THINKING: ActivityWords = { key: 'chatWaitThinking', fallback: 'Thinking…' }\n/** The model is writing its answer. */\nexport const ACTIVITY_WRITING: ActivityWords = { key: 'chatWaitWriting', fallback: 'Writing…' }\n/** The model is drawing up a tool call. */\nexport const ACTIVITY_TOOL_CALL: ActivityWords = { key: 'chatWaitToolCall', fallback: 'Preparing a tool call…' }\n/** The turn's tool calls are running. */\nexport const ACTIVITY_TOOLS: ActivityWords = { key: 'chatWaitTools', fallback: 'Running tools…' }\n\n/**\n * The words for what the turn is doing, or null where there is nothing to say:\n * the model has written nothing in its newest step and no tool is running. A\n * turn's newest block decides among thinking, a tool call being drawn up and\n * writing; any other block kind reads as writing.\n */\nexport function activityWords(snapshot: HostChatSnapshot | null, turn: HostTurn | undefined): ActivityWords | null {\n if (snapshot === null || turn === undefined) return null\n const activity = readTurnActivity(snapshot, turn)\n if (activity === null) return null\n if (activity.kind === 'tools') return ACTIVITY_TOOLS\n const newest = activity.newest\n if (newest === 'reasoning') return ACTIVITY_THINKING\n if (newest === 'tool-call') return ACTIVITY_TOOL_CALL\n if (newest === null) return null\n return ACTIVITY_WRITING\n}\n", "import type { HostChatSnapshot, HostTurn } from '@dsh-claude-style/contracts/services'\n\n/**\n * When the model has kept the reader waiting, read off the host's chat\n * snapshot. The wait follows dsh-better-display's waiting clock (MIT): it\n * counts from the moment the move went back to the model, not from the turn's\n * first message, so the minutes a tool spent never count against the model.\n */\n\n/** Past this, a wait stops reading as a pause and reads as the model not answering. */\nexport const WAIT_OVERTIME_MS = 10_000\n\n/**\n * Where a wait first seen at `now` began. Before the model has written anything\n * in the turn, the wait is the turn's own, from its start; after that the move\n * came back the moment the page saw the wait begin, which is as close as the\n * snapshot says — it carries no time for a tool's result.\n */\nexport function waitStart(turn: HostTurn, now: number) {\n const wrote = turn.steps.some(step => {\n const assistant = step.data.get('assistant-step')\n return assistant !== undefined && assistant.blocks.length > 0\n })\n return !wrote && turn.start !== undefined ? turn.start.time : now\n}\n\n/** The newest open turn of a snapshot, the one the running row speaks for. */\nexport function openTurn(snapshot: HostChatSnapshot): HostTurn | undefined {\n let found: HostTurn | undefined\n for (const turn of snapshot.timeline.turns.values()) {\n if (turn.status !== 'open') continue\n if (found === undefined || turn.turn > found.turn) found = turn\n }\n return found\n}\n", "import { QUIET_ATTR } from '../../constants'\nimport { requestFrame } from '../../core/frame'\nimport { closestConversationSession, conversationSessionId, findChatTarget } from '../../core/host'\nimport { copyLabel } from '../../core/i18n'\nimport { motionReduced } from '../../core/prefs'\nimport { buildElement } from '../../shared/dom'\nimport { formatHostDuration } from '../../shared/format'\nimport { activityWords } from '../../shared/turn-activity'\nimport { CHAT_RUNNING_SELECTOR, CHAT_RUNNING_TEXT_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport { WAIT_OVERTIME_MS, openTurn, waitStart } from './wait-state'\nimport type { HostContext, HostText } from '../../core/host'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './chat-wait.manifest'\n\n/**\n * The live turn's running row, after dsh-better-display's status line (MIT):\n * what the turn is doing now in this line's own words\n * (shared/turn-activity.ts), the host's own 「深度求索中」 where no state can be\n * read, the turn's elapsed time as a quiet clock beside it, and 「暂未响应」\n * once the model has been silent for ten seconds (wait-state.ts). The wording\n * swaps in place with transitions.dev's \"Text states swap\" (MIT).\n *\n * The host keeps its row, its whale and its live region: the line is a span of\n * the skin's own beside the whale, marked quiet so its ticking wakes no pass,\n * and the stylesheet hides the host's words while it stands (chat-wait.css).\n * The words, the clock's units and the session's turns are the host's.\n *\n * @param ctx - client context.\n * @param ui - shared handle table.\n * @returns teardown.\n */\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n /** On the host's running row while the line stands in for its words. */\n const WAIT_ATTR = 'data-dsh-claude-wait'\n /** On the wording while it swaps: `exit` for the wording leaving, `enter` for the one taking its place. */\n const SWAP_ATTR = 'data-dsh-claude-wait-swap'\n /** The clock's step: the host's own row ticks once a second, and a quarter keeps the two in step. */\n const TICK_MS = 250\n /** How long the wording takes to leave when the stylesheet's own token cannot be read. */\n const SWAP_FALLBACK_MS = 150\n /** Each running row with the line drawn into it. */\n const lines = new Map<HTMLElement, HTMLElement>()\n /** The wording a leaving one hands over to, by label. */\n const swapping = new Map<HTMLElement, string>()\n /** The exit a label is in the middle of, by label. */\n const exits = new Map<HTMLElement, number>()\n /** When each turn's current wait began, by `session:turn`; absent while the model is at work. */\n const waits = new Map<string, number>()\n let timer: number | null = null\n let cancelTick: (() => void) | null = null\n\n /** The line inside one row, built the first time beside the host's words. */\n function lineOf(row: HTMLElement, words: Element) {\n let line = lines.get(row)\n if (line !== undefined && line.isConnected) return line\n line = buildElement('span', 'dsh-claude-chat-wait')\n line.setAttribute(QUIET_ATTR, '')\n // The host's own words are hidden while this line stands in for them\n // (chat-wait.css), so the line carries what a reader gets: the wording, the\n // clock and the wait badge are ordinary text, and the host's live region\n // still announces the row.\n line.append(\n buildElement('span', 'dsh-claude-chat-wait-label'),\n buildElement('span', 'dsh-claude-chat-wait-clock'),\n buildElement('span', 'dsh-claude-chat-wait-badge'),\n )\n words.after(line)\n lines.set(row, line)\n return line\n }\n\n function writeText(element: Element, text: string) {\n if (element.textContent !== text) element.textContent = text\n }\n\n /** A duration written in a CSS token, in milliseconds. */\n function milliseconds(value: string) {\n const parsed = /^\\s*([\\d.]+)\\s*(ms|s)?\\s*$/.exec(value)\n if (parsed === null) return SWAP_FALLBACK_MS\n const amount = Number(parsed[1])\n return Number.isFinite(amount) ? (parsed[2] === 's' ? amount * 1000 : amount) : SWAP_FALLBACK_MS\n }\n\n /** Write one wording into the label, the swap's second half: it enters from below at its rest pose. */\n function enter(label: HTMLElement, word: string) {\n label.textContent = word\n label.dataset.text = word\n label.setAttribute(SWAP_ATTR, 'enter')\n // The entry pose has to be committed before the transition is released: the\n // snippet's own reflow, and what keeps the new wording from starting at rest.\n void label.offsetHeight\n label.removeAttribute(SWAP_ATTR)\n }\n\n /**\n * Put one wording into the label, running transitions.dev's three-phase swap\n * when it differs from the one standing: the old wording leaves upward with a\n * blur, the text is written once it has gone, and the new one enters from\n * below. A wording arriving during an exit is the one that exit hands over to.\n */\n function setLabel(label: HTMLElement, word: string) {\n if (label.dataset.text === word) return\n if (label.dataset.text === undefined || motionReduced()) {\n label.textContent = word\n label.dataset.text = word\n return\n }\n swapping.set(label, word)\n if (exits.has(label)) return\n label.setAttribute(SWAP_ATTR, 'exit')\n const duration = milliseconds(getComputedStyle(label).getPropertyValue('--dsh-claude-wait-swap-duration'))\n exits.set(label, window.setTimeout(() => {\n exits.delete(label)\n const next = swapping.get(label)\n swapping.delete(label)\n if (label.isConnected && next !== undefined) enter(label, next)\n }, duration))\n }\n\n /** Drop a label's swap: a row leaving the page takes no timer with it. */\n function settleSwap(label: HTMLElement) {\n const exit = exits.get(label)\n if (exit !== undefined) window.clearTimeout(exit)\n exits.delete(label)\n swapping.delete(label)\n }\n\n /** Bring one row's line to what the host's snapshot says now. */\n function syncRow(row: HTMLElement, t: HostText, now: number, seen: Set<string>) {\n const words = row.querySelector(CHAT_RUNNING_TEXT_SELECTOR)\n if (words === null) return\n const sessionId = conversationSessionId(closestConversationSession(row))\n const target = sessionId === null ? null : findChatTarget(ctx, sessionId)\n const snapshot = target === null ? null : target.getSnapshot() ?? null\n const turn = snapshot === null ? undefined : openTurn(snapshot)\n const line = lineOf(row, words)\n const [label, clock, badge] = line.children as HTMLCollectionOf<HTMLElement>\n // What the turn is doing, and the host's own word for a turn whose state\n // cannot be read (D58): the line says the model's work, never a guess.\n const activity = activityWords(snapshot, turn)\n const word = activity === null ? t('chat.deepDiving') : copyLabel(activity.key, activity.fallback)\n setLabel(label, word)\n clock.hidden = turn === undefined || turn.start === undefined\n if (turn !== undefined && turn.start !== undefined) writeText(clock, formatHostDuration(Math.max(1000, now - turn.start.time), t))\n let overtime = false\n if (snapshot !== null && turn !== undefined && activity === null) {\n const key = `${sessionId}:${turn.turn}`\n seen.add(key)\n let began = waits.get(key)\n if (began === undefined) {\n began = waitStart(turn, now)\n waits.set(key, began)\n }\n overtime = now - began >= WAIT_OVERTIME_MS\n }\n badge.hidden = !overtime\n if (overtime) writeText(badge, copyLabel('chatWaitOvertime', 'No response yet'))\n if (!row.hasAttribute(WAIT_ATTR)) row.setAttribute(WAIT_ATTR, '')\n }\n\n /** Take one row's line down and give the host's words back. */\n function release(row: HTMLElement) {\n const line = lines.get(row)\n if (line !== null && line !== undefined) {\n const label = line.firstElementChild\n if (label instanceof HTMLElement) settleSwap(label)\n line.remove()\n }\n lines.delete(row)\n row.removeAttribute(WAIT_ATTR)\n }\n\n function sync() {\n const t = ctx.get('locale')?.bind('chat')\n const rows = t === undefined ? [] : [...document.querySelectorAll<HTMLElement>(CHAT_RUNNING_SELECTOR)]\n const now = Date.now()\n const seen = new Set<string>()\n for (const row of rows) syncRow(row, t!, now, seen)\n for (const row of [...lines.keys()]) {\n if (!rows.includes(row)) release(row)\n }\n // A wait the model ended, or a turn that closed, starts over next time.\n for (const key of [...waits.keys()]) {\n if (!seen.has(key)) waits.delete(key)\n }\n // The clock ticks only while a row is on the page.\n if (lines.size > 0 && timer === null) {\n timer = window.setInterval(() => {\n if (cancelTick !== null) return\n cancelTick = requestFrame({ write() { cancelTick = null; sync() } })\n }, TICK_MS)\n } else if (lines.size === 0 && timer !== null) {\n window.clearInterval(timer)\n timer = null\n }\n }\n\n ui.chatWait = { sync, onCopyChange: sync }\n\n return () => {\n if (timer !== null) window.clearInterval(timer)\n timer = null\n if (cancelTick !== null) cancelTick()\n cancelTick = null\n for (const row of [...lines.keys()]) release(row)\n for (const row of document.querySelectorAll(`[${WAIT_ATTR}]`)) row.removeAttribute(WAIT_ATTR)\n for (const exit of exits.values()) window.clearTimeout(exit)\n exits.clear()\n swapping.clear()\n waits.clear()\n delete ui.chatWait\n }\n}\n", "/**\n * The reveal engine's tuning table and the shapes its modules pass around:\n * the constants, one fading segment, one container's snapshot, and the state\n * the factory owns.\n */\n\nexport const CHAT_REVEAL_STEPS = 24\n/** The faintest step: a fifth faint, which still reads as text arriving in both themes. */\nexport const CHAT_REVEAL_MIN_OPACITY = 0.2\n/**\n * How long a character takes to become fully opaque. Not a preference: a longer\n * fade would spread the step rules into visible steps, a shorter one crosses\n * in a single frame. Moving it means moving the step count and its rules too.\n */\nexport const CHAT_REVEAL_MS = 120\n/** The prefix of every highlight name this engine registers (reveal-rules.css carries the same names by hand). */\nexport const CHAT_REVEAL_HIGHLIGHT_PREFIX = 'dsh-claude-tok-'\n/** The custom property an element publishes its own colour to; the step rules read it inside ::highlight(). */\nexport const CHAT_REVEAL_COLOR_VAR = '--dsh-claude-run-color'\n/** The share of one fade a batch's stagger spreads over: proportional to the fade, so neither pace lets staggering take over. */\nexport const CHAT_REVEAL_STAGGER_DIVISOR = 50\n/** The stagger step's bounds: smaller shows no sweep, larger makes the last characters late. */\nexport const CHAT_REVEAL_MIN_STAGGER_MS = 1\nexport const CHAT_REVEAL_MAX_STAGGER_MS = 8\n/**\n * How long a container is left out of the reveal after a fold.\n *\n * A container carries data-streaming for the whole turn, including the answer\n * that arrives after the reasoning stops, so pressing a thinking or tool row\n * rewrites a container the scan is still reading. This is long enough to cover\n * React's re-render and the mutations it makes, and short enough that a stream\n * resuming right after the press still animates.\n */\nexport const CHAT_REVEAL_FOLD_QUIET_MS = 400\n/**\n * The most characters one batch may hold.\n *\n * The segment count is the batch's character count and multiplies every frame\n * (one Range per segment): a measured fifteen thousand characters arriving at\n * once pushes a single frame to 700 ms, and the frame-gap compensation keeps\n * those segments alive so the page cannot catch up. Real streaming batches run\n * a median of a dozen characters, so this gate is never touched.\n */\nexport const CHAT_REVEAL_BURST_LIMIT = 10000\n/** How many characters a container that just appeared may hold and still count as \"the start of an answer\". */\nexport const CHAT_REVEAL_FIRST_SIGHT_LIMIT = 200\n/** A gap between frames longer than this means no frame was drawn in between (a hidden page, or a held-up main thread). */\nexport const CHAT_REVEAL_FRAME_GAP_MS = 40\n/** A normal frame at 60 Hz; the compensation subtracts it from the blank so segments continue where they were. */\nexport const CHAT_REVEAL_NOMINAL_FRAME_MS = 16.7\n/** A frame gap longer than this counts as slow: under 20 fps the fade's steps sit for tens of milliseconds each. */\nexport const CHAT_REVEAL_SLOW_FRAME_MS = 50\n/** This many slow frames in a row before the engine gives way; one long task must not switch the fade off. */\nexport const CHAT_REVEAL_SLOW_FRAME_RUN = 4\n/** A gap this long is a hidden page (rAF stopped), not a busy main thread. */\nexport const CHAT_REVEAL_HIDDEN_GAP_MS = 1000\n/** How long after giving way new characters are let through at full strength. */\nexport const CHAT_REVEAL_YIELD_MS = 3000\n/** The most characters the rewritten middle may hold and still be diffed; beyond it the whole block was rewritten. */\nexport const CHAT_REVEAL_REWRITE_DIFF_BUDGET = 4096\n/** The most characters a diffed rewrite may add and still animate. */\nexport const CHAT_REVEAL_LOCAL_REWRITE_LIMIT = 64\n\n/** One fading stretch of characters. */\nexport interface RevealRun {\n /** The streaming container the characters arrived in. */\n container: Element\n /** Offset into the container's joined text, and how many UTF-16 units. */\n start: number\n length: number\n bornAt: number\n delay: number\n /** The element whose colour was last published for this segment. */\n colorElement: HTMLElement | null\n}\n\n/** One text node's offset in the joined text the scan built for its container. */\nexport interface RevealTextEntry {\n node: Text\n start: number\n}\n\n/** A streaming container's joined text and the nodes it was joined from. */\nexport interface RevealSnapshot {\n text: string\n entries: RevealTextEntry[]\n}\n\n/**\n * Everything the engine factory owns. The paint loop and the scan are separate\n * modules and share it instead of closing over the factory's locals; a scalar\n * they write (lastFrameAt, slowFrames, yieldUntil, cancelPaintFrame) has to\n * come back through the same object.\n */\nexport interface RevealState {\n /** The segments still fading. */\n liveRuns: RevealRun[]\n /** Streaming containers already on the page when the engine installed: they are history and do not replay. */\n historyContainers: WeakSet<Element>\n /** Each streaming container's text snapshot, written by the scan and reused by the paint. */\n textSnapshots: WeakMap<Element, RevealSnapshot>\n /** Containers the reader just folded, quiet until this moment. */\n foldQuietUntil: WeakMap<Element, number>\n /** The streaming containers on the page at the last full scan; segments and snapshots of the ones gone are dropped. */\n liveContainers: Element[]\n /** The last paint frame's timestamp; 0 before the first. */\n lastFrameAt: number\n /** Slow frames in a row; at CHAT_REVEAL_SLOW_FRAME_RUN the engine gives way. */\n slowFrames: number\n /** New characters are not queued before this moment: the main thread is busy (see the painter's yield). */\n yieldUntil: number\n /** Cancels the queued paint frame; null when none. */\n cancelPaintFrame: (() => void) | null\n}\n", "import { STREAMING_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport {\n CHAT_REVEAL_BURST_LIMIT,\n CHAT_REVEAL_FIRST_SIGHT_LIMIT,\n CHAT_REVEAL_LOCAL_REWRITE_LIMIT,\n CHAT_REVEAL_MAX_STAGGER_MS,\n CHAT_REVEAL_MIN_STAGGER_MS,\n CHAT_REVEAL_MS,\n CHAT_REVEAL_REWRITE_DIFF_BUDGET,\n CHAT_REVEAL_STAGGER_DIVISOR,\n} from './reveal-params'\nimport type { RevealRun, RevealState, RevealTextEntry } from './reveal-params'\n\n/** What a scan needs from the rest of the engine: the colour it publishes and the repaint it forces. */\ninterface RevealScanHooks {\n publishRunColor: (element: HTMLElement | null) => void\n paint: (now: number, fromFrame: boolean) => void\n}\n\n/**\n * The scan's entry point, with the engine's segments and snapshots in `state`.\n *\n * @param state - the engine's state; this module writes its segments and snapshots.\n * @param hooks - the colour publisher and the paint a scan forces.\n * @returns scan.\n */\nexport function createRevealScanner(state: RevealState, hooks: RevealScanHooks) {\n const { paint, publishRunColor } = hooks\n\n /**\n * Compare the streaming containers against their last snapshots and queue\n * the characters that just appeared.\n * @param only - look at these containers alone (the ones this batch of\n * mutations touched); null looks at every container on the page and\n * drops the ones that are gone.\n */\n return (only: Set<Element> | null) => {\n const now = performance.now()\n let containers: Element[]\n if (only === null) {\n containers = [...document.querySelectorAll(STREAMING_SELECTOR)]\n // Containers no longer streaming lose their segments with their\n // snapshots: a snapshot is a copy of a whole message, kept alive by its\n // element, and over a long session that is memory growing with the\n // session.\n for (const gone of state.liveContainers) {\n if (containers.includes(gone)) continue\n state.textSnapshots.delete(gone)\n for (let index = state.liveRuns.length - 1; index >= 0; index -= 1) {\n if (state.liveRuns[index]?.container === gone) state.liveRuns.splice(index, 1)\n }\n }\n state.liveContainers = containers\n } else {\n containers = [...only].filter(container => container.isConnected && container.matches(STREAMING_SELECTOR))\n for (const container of containers) if (!state.liveContainers.includes(container)) state.liveContainers.push(container)\n }\n if (containers.length === 0) return\n /** The main thread is busy and the engine has given way: snapshots are still updated, the batch just does not fade. */\n const yielding = now < state.yieldUntil\n /** The segments this scan created, grouped so the stagger can be handed out per batch. */\n const createdRuns: RevealRun[] = []\n for (const container of containers) {\n const batchStart = createdRuns.length\n // First join every text node under the container, remembering each\n // node's offset in the joined string.\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_TEXT)\n const entries: RevealTextEntry[] = []\n let text = ''\n let node = walker.nextNode()\n while (node !== null) {\n // SHOW_TEXT: every node the walker yields is a text node.\n const textNode = node as Text\n entries.push({ node: textNode, start: text.length })\n text += textNode.data\n node = walker.nextNode()\n }\n\n const previous = state.textSnapshots.get(container)?.text\n state.textSnapshots.set(container, { text, entries })\n\n // The first sight of this container. One that was on the page when the\n // engine installed is history; one that appears already long (a session\n // switch, a page of history mounting) counts as history too. Only one\n // that appeared after install without much text — a new answer — has its\n // opening characters counted as new.\n if (previous === undefined && (state.historyContainers.has(container) || text.length > CHAT_REVEAL_FIRST_SIGHT_LIMIT)) continue\n const before = previous ?? ''\n\n // This batch's two stable stretches: segments inside the common prefix\n // keep their place, ones inside the common suffix move as a whole, and\n // only the middle was really rewritten. Expanding or folding a thinking\n // row is exactly that shape — text at the front swaps between summary and\n // content while the answer streaming at the back does not move a\n // character, and those characters must not freeze because the reader\n // touched a control. Killing every segment in the container on any\n // reflow would snap half-faded text to solid.\n const overlapLimit = Math.min(before.length, text.length)\n let prefix = 0\n while (prefix < overlapLimit && before.charCodeAt(prefix) === text.charCodeAt(prefix)) prefix += 1\n // The suffix does not overlap the prefix, so the rewritten middle is not\n // claimed by both.\n let suffix = 0\n while (\n suffix < overlapLimit - prefix\n && before.charCodeAt(before.length - 1 - suffix) === text.charCodeAt(text.length - 1 - suffix)\n ) suffix += 1\n const stableFrom = before.length - suffix\n const shift = text.length - before.length\n for (let index = state.liveRuns.length - 1; index >= 0; index -= 1) {\n const run = state.liveRuns[index]\n if (run === undefined) continue\n if (run.container !== container) continue\n if (run.start + run.length <= prefix) continue\n if (run.start >= stableFrom) {\n // The same characters, moved as a whole: they follow, keeping their\n // age and their stagger.\n state.liveRuns[index] = { ...run, start: run.start + shift }\n continue\n }\n state.liveRuns.splice(index, 1)\n }\n\n if (yielding) continue\n\n // The reader just folded or unfolded something: this change came from\n // that reflow, not from the model emitting characters.\n const quietUntil = state.foldQuietUntil.get(container)\n if (quietUntil !== undefined && now <= quietUntil) continue\n\n // The characters that just appeared. On a plain append they are the\n // trailing stretch; when markdown closes a marker (** or a backtick or a\n // link) they sit inside the old text, and those characters should fade\n // too.\n //\n // The middle is what the rewrite check looks at: strip the common prefix\n // and suffix from both sides, align what is left with one\n // character-level longest-common-subsequence pass, and the new\n // characters are the ones that do not match. A large middle is given up\n // on — a whole-block rewrite (the final re-layout at the end of a\n // stream, a switch of rendering branch) must not make the reader watch\n // the fade again, and only a small close is worth animating.\n const oldMiddle = before.slice(prefix, before.length - suffix)\n const newMiddle = text.slice(prefix, text.length - suffix)\n if (newMiddle.length === 0) continue\n if (oldMiddle.length > 0 && oldMiddle.length * newMiddle.length > CHAT_REVEAL_REWRITE_DIFF_BUDGET) continue\n\n // Whether each new character matches one in the old text. With an empty\n // old middle every character is new and no alignment is needed.\n const matched = new Uint8Array(newMiddle.length)\n if (oldMiddle.length > 0) {\n // A bottom-up common-subsequence length table, walked back to decide\n // which new characters match the old text.\n const columns = newMiddle.length + 1\n const lengths = new Uint16Array((oldMiddle.length + 1) * columns)\n for (let row = oldMiddle.length - 1; row >= 0; row -= 1) {\n for (let column = newMiddle.length - 1; column >= 0; column -= 1) {\n const sameCharacter = oldMiddle.charCodeAt(row) === newMiddle.charCodeAt(column)\n lengths[row * columns + column] = sameCharacter\n ? (lengths[(row + 1) * columns + column + 1] ?? 0) + 1\n : Math.max(lengths[(row + 1) * columns + column] ?? 0, lengths[row * columns + column + 1] ?? 0)\n }\n }\n let matchedCount = 0\n let row = 0\n let column = 0\n while (row < oldMiddle.length && column < newMiddle.length) {\n if (oldMiddle.charCodeAt(row) === newMiddle.charCodeAt(column)) {\n matched[column] = 1\n matchedCount += 1\n row += 1\n column += 1\n continue\n }\n // Walk towards the larger table value.\n const skipOldRow = lengths[(row + 1) * columns + column] ?? 0\n const skipNewColumn = lengths[row * columns + column + 1] ?? 0\n const advanceOldRow = skipOldRow >= skipNewColumn\n if (advanceOldRow) row += 1\n if (!advanceOldRow) column += 1\n }\n if (matchedCount === 0 || newMiddle.length - matchedCount > CHAT_REVEAL_LOCAL_REWRITE_LIMIT) continue\n }\n\n // The unmatched new characters are the batch; consecutive ones merge\n // into one stretch.\n const addedRanges = []\n let rangeStart = -1\n for (let index = 0; index < newMiddle.length; index += 1) {\n if (matched[index] === 1) {\n if (rangeStart >= 0) addedRanges.push({ start: rangeStart + prefix, end: index + prefix })\n rangeStart = -1\n continue\n }\n if (rangeStart < 0) rangeStart = index\n }\n if (rangeStart >= 0) addedRanges.push({ start: rangeStart + prefix, end: newMiddle.length + prefix })\n if (addedRanges.length === 0) continue\n // Too many characters at once do not fade: thousands together read as a\n // blur, and the segment count is the character count multiplied into\n // every frame (one Range per segment).\n let addedLength = 0\n for (const range of addedRanges) addedLength += range.end - range.start\n if (addedLength > CHAT_REVEAL_BURST_LIMIT) continue\n\n // The walk goes node by node rather than over the joined string: every\n // segment has to carry the element it renders in (that is where the step\n // rules read the colour from), and a node's text always renders in one\n // element. Characters inside one node are born together, and the stagger\n // is handed out by position after the walk — the step-like \"the whole\n // line lights up at once\" is exactly what the stagger spreads out.\n // Iteration is by code point, so a surrogate pair is one segment;\n // whitespace takes no segment of its own but still advances the offset.\n const touchedElements = new Set<Element>()\n for (const range of addedRanges) {\n for (const entry of entries) {\n if (entry.start + entry.node.data.length <= range.start) continue\n if (entry.start >= range.end) break\n const begin = Math.max(range.start, entry.start)\n const end = Math.min(range.end, entry.start + entry.node.data.length)\n const element = entry.node.parentElement\n let offset = begin\n for (const character of entry.node.data.slice(begin - entry.start, end - entry.start)) {\n if (character.trim().length === 0) {\n offset += character.length\n continue\n }\n // One style read per element per scan: a batch of text usually\n // lands in one or two nodes, so even a whole paragraph arriving\n // at once costs a few reads.\n if (element !== null && !touchedElements.has(element)) {\n touchedElements.add(element)\n publishRunColor(element)\n }\n const run: RevealRun = {\n container,\n start: offset,\n length: character.length,\n bornAt: now,\n delay: 0,\n // The element it renders in is remembered as soon as it is\n // queued, so the synchronous paint right after does not read the\n // colour again. One colour read is one forced style resolution,\n // and this read lands exactly on the frame the new character was\n // inserted and the styles just went stale — measured, 190 ms of a\n // 190 ms frame was that read. If the element really is replaced\n // (the markdown layer rebuilding nodes) the paint's comparison\n // still notices and the colour is written again.\n colorElement: element,\n }\n state.liveRuns.push(run)\n createdRuns.push(run)\n offset += character.length\n }\n }\n }\n // The batch is staggered by its characters' order in the stream: the\n // whole batch spreads over no more than one fade, so inserting several\n // hundred characters does not make the tail wait seconds. More\n // characters means a smaller step each, and the sweep stays continuous;\n // smaller shows no sweep, larger makes the last characters late.\n const batchCount = createdRuns.length - batchStart\n const staggerLimit = Math.min(CHAT_REVEAL_MAX_STAGGER_MS, Math.max(CHAT_REVEAL_MIN_STAGGER_MS, CHAT_REVEAL_MS / CHAT_REVEAL_STAGGER_DIVISOR))\n const step = batchCount <= 1 ? 0 : Math.min(staggerLimit, CHAT_REVEAL_MS / (batchCount - 1))\n for (let slot = batchStart; slot < createdRuns.length; slot += 1) {\n const run = createdRuns[slot]\n if (run === undefined || step === 0) continue\n run.delay = (slot - batchStart) * step\n }\n }\n if (createdRuns.length === 0) return\n // A new character has to carry the faintest step within the same frame.\n // Scheduling a paint waits for the next rendering step, and this scan can\n // run right after this step's rAF phase — the character would then be\n // painted at full strength for one frame and pressed back to faint on the\n // next, which the eye reads as a flash. So it is painted synchronously:\n // the segment exists and has its alpha immediately.\n if (state.cancelPaintFrame !== null) {\n state.cancelPaintFrame()\n state.cancelPaintFrame = null\n }\n paint(performance.now(), false)\n }\n}\n", "import { CHAT_REVEAL_COLOR_VAR, CHAT_REVEAL_HIGHLIGHT_PREFIX, CHAT_REVEAL_STEPS } from './reveal-params'\n\n/**\n * The engine's Custom Highlight table: one highlight per step, its segments\n * swapped every frame.\n *\n * @param registry - `CSS.highlights`, checked for existence by the factory.\n * @param HighlightConstructor - the page's `Highlight`, checked to be a function.\n */\nexport function createRevealHighlights(registry: HighlightRegistry, HighlightConstructor: typeof Highlight) {\n /** One highlight per step: registered once, its segments swapped every frame. */\n const highlights: (Highlight | null)[] = new Array(CHAT_REVEAL_STEPS).fill(null)\n\n /** Unregister every step's highlight. */\n const clearHighlights = () => {\n for (let step = 0; step < CHAT_REVEAL_STEPS; step += 1) {\n if (highlights[step] === null) continue\n registry.delete(CHAT_REVEAL_HIGHLIGHT_PREFIX + step)\n highlights[step] = null\n }\n }\n\n /**\n * Swap this step's segments for this batch.\n *\n * The registry is written once per step, the first time it is used; after\n * that only the highlight's own segments change. Unregistering and\n * registering all twenty-four names every frame would make the browser\n * rebuild its highlight markers each time. A step that is empty this frame\n * is cleared rather than unregistered — the next frame very likely needs it.\n */\n const showStep = (step: number, ranges: StaticRange[]) => {\n let highlight = highlights[step] ?? null\n if (ranges.length === 0) {\n if (highlight !== null && highlight.size > 0) highlight.clear()\n return\n }\n if (highlight === null) {\n highlight = new HighlightConstructor()\n highlights[step] = highlight\n registry.set(CHAT_REVEAL_HIGHLIGHT_PREFIX + step, highlight)\n } else {\n highlight.clear()\n }\n for (const range of ranges) highlight.add(range)\n }\n\n return { clearHighlights, showStep }\n}\n\n/**\n * Publish an element's own colour to CHAT_REVEAL_COLOR_VAR.\n *\n * What matters is the colour the markdown layer actually paints — a link's\n * token, a syntax token, a list marker — not what this module last wrote.\n * The computed colour is read, and skipped entirely when the element still\n * carries the colour recorded for it, which is every frame after the first.\n *\n * A value inherited from an ancestor already is its colour (bold inside a\n * paragraph, body text inside a list item), so nothing is written then: an\n * inline style is a style invalidation, and it would wake anything else on\n * the page watching style attributes.\n *\n * @returns the publisher: give it the element a segment renders in.\n */\nexport function createRunColorPublisher() {\n /** Colours already written onto elements, so an unchanged one skips the style read. */\n const writtenColors = new WeakMap<Element, string>()\n\n return (element: HTMLElement | null) => {\n if (element === null) return\n const style = window.getComputedStyle(element)\n const color = style.color\n if (writtenColors.get(element) === color) return\n writtenColors.set(element, color)\n if (style.getPropertyValue(CHAT_REVEAL_COLOR_VAR).trim() === color) return\n element.style.setProperty(CHAT_REVEAL_COLOR_VAR, color)\n }\n}\n", "import { requestFrame } from '../../core/frame'\nimport {\n CHAT_REVEAL_FRAME_GAP_MS,\n CHAT_REVEAL_HIDDEN_GAP_MS,\n CHAT_REVEAL_MS,\n CHAT_REVEAL_NOMINAL_FRAME_MS,\n CHAT_REVEAL_SLOW_FRAME_MS,\n CHAT_REVEAL_SLOW_FRAME_RUN,\n CHAT_REVEAL_STEPS,\n CHAT_REVEAL_YIELD_MS,\n} from './reveal-params'\nimport type { RevealState } from './reveal-params'\n\n/** What the paint loop needs from the rest of the engine: the step table and the colour publisher. */\ninterface RevealPaintHooks {\n clearHighlights: () => void\n showStep: (step: number, ranges: StaticRange[]) => void\n publishRunColor: (element: HTMLElement | null) => void\n}\n\n/**\n * The frame loop, with the engine's timestamps in `state`.\n *\n * @param state - the engine's state; this module owns the frame timestamps in it.\n * @param hooks - the step table and the colour publisher.\n * @returns paint.\n */\nexport function createRevealPainter(state: RevealState, hooks: RevealPaintHooks) {\n const { clearHighlights, publishRunColor, showStep } = hooks\n\n /**\n * The main thread is full: the segments in hand are settled, and new\n * characters arrive at full strength for a while.\n *\n * The fade would not paint smoothly anyway — every step would sit for tens\n * of milliseconds — and its per-frame work is stacked on top of whatever is\n * already slow. Giving way is better: the text still arrives, it just skips\n * the fade.\n */\n const revealYield = () => {\n state.yieldUntil = performance.now() + CHAT_REVEAL_YIELD_MS\n state.slowFrames = 0\n state.lastFrameAt = 0\n state.liveRuns.length = 0\n clearHighlights()\n }\n\n /** Queue the next paint frame. */\n const scheduleFrame = () => {\n state.cancelPaintFrame = requestFrame({\n write(now) {\n paint(now, true)\n },\n })\n }\n\n /**\n * Repaint every live segment at its age's step, then queue the next frame.\n * @param now - this frame's timestamp.\n * @param fromFrame - called by a paint frame rather than by the synchronous\n * repaint a scan does: only these gaps say whether the main thread is busy.\n */\n const paint = (now: number, fromFrame: boolean) => {\n state.cancelPaintFrame = null\n if (state.liveRuns.length === 0) {\n clearHighlights()\n return\n }\n // No frame was drawn in a long gap — a hidden page stops rAF, and a busy\n // main thread skips frames while performance.now() keeps running. The\n // undrawn stretch is subtracted from every segment's age so they continue\n // their own fade after the page comes back, rather than all expiring in\n // one frame.\n const previousFrameAt = state.lastFrameAt\n state.lastFrameAt = now\n const gap = previousFrameAt === 0 ? 0 : now - previousFrameAt\n // Several slow frames in a row are a full main thread, not one long task:\n // give way. A multi-second blank is a hidden page — nobody is watching,\n // which is not being busy.\n if (fromFrame && gap > CHAT_REVEAL_SLOW_FRAME_MS && gap < CHAT_REVEAL_HIDDEN_GAP_MS) state.slowFrames += 1\n else if (fromFrame && gap > 0) state.slowFrames = 0\n if (state.slowFrames >= CHAT_REVEAL_SLOW_FRAME_RUN) {\n revealYield()\n return\n }\n if (gap > CHAT_REVEAL_FRAME_GAP_MS) {\n const unspent = gap - CHAT_REVEAL_NOMINAL_FRAME_MS\n for (const run of state.liveRuns) {\n // Segments born in the blank count as born now, or they would wait\n // that same blank out before starting to fade.\n run.bornAt = run.bornAt <= previousFrameAt ? run.bornAt + unspent : now\n }\n }\n /** The segment each step has already drawn this frame; a following segment that touches it is merged in. */\n const drawn: ({ node: Text, start: number, end: number } | null)[] = new Array(CHAT_REVEAL_STEPS).fill(null)\n const buckets: { node: Text, start: number, end: number }[][] = []\n for (let step = 0; step < CHAT_REVEAL_STEPS; step += 1) buckets.push([])\n /** Live segments are compacted in place: splice would move every later element, and a batch of thousands is quadratic. */\n let kept = 0\n for (let index = 0; index < state.liveRuns.length; index += 1) {\n const run = state.liveRuns[index]\n if (run === undefined) continue\n const age = now - run.bornAt - run.delay\n // Done: it is as solid as the text around it and needs no highlight.\n if (age >= CHAT_REVEAL_MS) continue\n state.liveRuns[kept] = run\n kept += 1\n // The scans that queued these segments built the snapshots on their\n // way, and every mutation after that goes through a fresh scan before\n // this frame, so the cache holds what is on screen. Walking the\n // container again here would put an O(whole message) TreeWalker into\n // every frame.\n const snapshot = state.textSnapshots.get(run.container)\n if (snapshot === undefined) continue\n\n // The first text node that can hold this segment, found by binary\n // search over the snapshot: character-by-character segments mean many\n // lookups a frame, and scanning from the message's start is too slow.\n const end = run.start + run.length\n let low = 0\n let high = snapshot.entries.length - 1\n let firstIndex = -1\n while (low <= high) {\n const middle = (low + high) >> 1\n const entry = snapshot.entries[middle]\n if (entry === undefined) break\n if (entry.start + entry.node.data.length <= run.start) {\n low = middle + 1\n continue\n }\n firstIndex = middle\n high = middle - 1\n }\n // The segment is no longer in the DOM.\n const firstEntry = snapshot.entries[firstIndex]\n if (firstEntry === undefined) continue\n if (firstEntry.start >= end) continue\n const start = Math.max(0, run.start - firstEntry.start)\n let lastNode = firstEntry.node\n let lastEnd = Math.min(firstEntry.node.data.length, end - firstEntry.start)\n for (let next = firstIndex + 1; next < snapshot.entries.length; next += 1) {\n const entry = snapshot.entries[next]\n if (entry === undefined) break\n if (entry.start >= end) break\n lastNode = entry.node\n lastEnd = Math.min(entry.node.data.length, end - entry.start)\n }\n // The element comes from the text node the segment is in, not from the\n // one the scan saw. The markdown layer rebuilds nodes while a message\n // streams (re-parsing **bold, folding a row); once the element a segment\n // lived in is replaced, the colour written on the old one paints nothing\n // and the new one falls back to the page's default — a flash of body\n // colour instead of a fade.\n //\n // But the colour is read only when the element really changed:\n // publishRunColor's first step is getComputedStyle, a forced style\n // resolution, and a few hundred segments a frame each reading it would\n // drag the page's whole style recalc into rAF. The frames where nothing\n // changed (nearly all of them) need one comparison.\n const element = firstEntry.node.parentElement\n if (element !== run.colorElement) {\n publishRunColor(element)\n run.colorElement = element\n }\n\n // The step: 0 is faintest, the last is the element's own colour; the\n // mapping is linear in time, so the colour settles at a constant rate.\n const step = age <= 0 ? 0 : Math.floor((age / CHAT_REVEAL_MS) * CHAT_REVEAL_STEPS)\n const bucket = buckets[step]\n if (bucket === undefined) continue\n // Adjacent characters in one text node at one step are the same stretch\n // of text this frame, so one segment holds them: the segment count drops\n // from characters to stretches.\n const previous = drawn[step] ?? null\n if (previous !== null && lastNode === firstEntry.node && previous.node === firstEntry.node && previous.end === start) {\n previous.end = lastEnd\n continue\n }\n const segment = { node: firstEntry.node, start, end: lastEnd }\n drawn[step] = segment\n bucket.push(segment)\n }\n state.liveRuns.length = kept\n for (let step = 0; step < CHAT_REVEAL_STEPS; step += 1) {\n const list = buckets[step] ?? []\n // A StaticRange does not track DOM changes, and every frame builds them\n // from the fresh snapshot, so tracking is not needed; a live Range would\n // have the page fix its boundaries on every DOM change until collected.\n const ranges = list.map(segment => new StaticRange({\n startContainer: segment.node,\n startOffset: segment.start,\n endContainer: segment.node,\n endOffset: segment.end,\n }))\n showStep(step, ranges)\n }\n if (state.liveRuns.length > 0) scheduleFrame()\n else clearHighlights()\n }\n\n return paint\n}\n", "import { subscribeMutations } from '../../core/bus'\nimport { isChatFoldToggle } from '../chat-fold/fold-toggle'\nimport { STREAMING_ATTRIBUTE, STREAMING_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport { createRevealScanner } from './reveal-diff'\nimport { createRevealHighlights, createRunColorPublisher } from './reveal-highlights'\nimport { createRevealPainter } from './reveal-paint'\nimport { CHAT_REVEAL_FOLD_QUIET_MS } from './reveal-params'\nimport type { RevealSnapshot, RevealState } from './reveal-params'\n\n/**\n * The token reveal's engine, ported from dsh-chat-ux: new characters arrive\n * faint and settle to their own colour.\n *\n * The reveal is a change of the text's own alpha, not a swap of colours:\n * characters arrive faint and come to rest, with nothing repainted in some\n * highlight colour. ::highlight() accepts no opacity — its property set is\n * small and does not include it — so alpha rides on `color`, one rule per\n * step (reveal-rules.css).\n *\n * The engine keeps its scope inside the streaming containers: the step rules\n * are scoped under [data-streaming], so elements outside one are filtered out\n * by their ancestor during style matching and pay nothing, and the observer\n * only looks at what changes inside a streaming container. The step count is\n * bounded by what those rules cost: 24 already reads as a continuous fade.\n *\n * A character is drawn the moment it arrives, at the faintest step, by a\n * synchronous paint right after the scan — a scheduled frame would leave one\n * frame of full-strength text, which the eye reads as a flash.\n */\n\nexport {\n CHAT_REVEAL_STEPS,\n CHAT_REVEAL_MIN_OPACITY,\n CHAT_REVEAL_MS,\n CHAT_REVEAL_HIGHLIGHT_PREFIX,\n CHAT_REVEAL_COLOR_VAR,\n CHAT_REVEAL_STAGGER_DIVISOR,\n CHAT_REVEAL_MIN_STAGGER_MS,\n CHAT_REVEAL_MAX_STAGGER_MS,\n CHAT_REVEAL_FOLD_QUIET_MS,\n CHAT_REVEAL_BURST_LIMIT,\n CHAT_REVEAL_FIRST_SIGHT_LIMIT,\n CHAT_REVEAL_FRAME_GAP_MS,\n CHAT_REVEAL_NOMINAL_FRAME_MS,\n CHAT_REVEAL_SLOW_FRAME_MS,\n CHAT_REVEAL_SLOW_FRAME_RUN,\n CHAT_REVEAL_HIDDEN_GAP_MS,\n CHAT_REVEAL_YIELD_MS,\n CHAT_REVEAL_REWRITE_DIFF_BUDGET,\n CHAT_REVEAL_LOCAL_REWRITE_LIMIT,\n} from './reveal-params'\n\n/**\n * Install the reveal engine: the step rules' mark, the scan observer, the\n * paint frames and the reader-fold guard.\n *\n * @returns the disposer, or null when this browser cannot draw the fade at all.\n * The reader's animation choice is the installer's business\n * (chat-reveal.ts), which has to take a running engine down with it.\n */\nexport function createChatRevealEngine() {\n const registry = globalThis.CSS?.highlights\n const HighlightConstructor = globalThis.Highlight\n if (registry === undefined || registry === null || typeof HighlightConstructor !== 'function') return null\n\n const state: RevealState = {\n liveRuns: [],\n historyContainers: new WeakSet<Element>(),\n textSnapshots: new WeakMap<Element, RevealSnapshot>(),\n foldQuietUntil: new WeakMap<Element, number>(),\n liveContainers: [],\n lastFrameAt: 0,\n slowFrames: 0,\n yieldUntil: 0,\n cancelPaintFrame: null,\n }\n for (const container of document.querySelectorAll(STREAMING_SELECTOR)) state.historyContainers.add(container)\n\n const { clearHighlights, showStep } = createRevealHighlights(registry, HighlightConstructor)\n const publishRunColor = createRunColorPublisher()\n const paint = createRevealPainter(state, { clearHighlights, showStep, publishRunColor })\n const scan = createRevealScanner(state, { publishRunColor, paint })\n\n /**\n * Note the containers a fold is about to reflow.\n *\n * Pressing a thinking row is not the model emitting characters, but the row\n * it toggles lives inside a container that still carries data-streaming, and\n * when the folded summary happens to be a prefix of the expanded content the\n * mutation looks exactly like an append. The click is the only signal that\n * tells them apart, so it is caught before React's handler runs and the\n * containers it can reach are taken out of the reveal.\n */\n const rememberReaderFold = (event: Event) => {\n // This feature's own automatic folding is not the reader's intent: it\n // lands exactly where the reasoning stops and the answer begins.\n if (isChatFoldToggle()) return\n const target = event.target\n if (!(target instanceof Element)) return\n const until = performance.now() + CHAT_REVEAL_FOLD_QUIET_MS\n const ownContainer = target.closest(STREAMING_SELECTOR)\n if (ownContainer !== null) state.foldQuietUntil.set(ownContainer, until)\n // The control that triggers a fold can live outside the container it\n // reflows, so the subtree is swept too — on clicks only: a key event's\n // target is often the whole body, and sweeping its subtree would quiet\n // every streaming container on the page for one PageUp.\n if (event.type !== 'click') return\n for (const container of target.querySelectorAll(STREAMING_SELECTOR)) state.foldQuietUntil.set(container, until)\n }\n\n // Only changes inside a streaming container are looked at: a DOM change\n // anywhere else on the page (another plugin, the sidebar, a timer, the\n // composer) triggers no scan, and a change inside a container rescans only\n // that one. A full look is left to a container appearing, disappearing, or\n // gaining or losing data-streaming.\n const onRecords = (records: MutationRecord[]) => {\n let everything = false\n const touched = new Set<Element>()\n for (const record of records) {\n // data-streaming is watched too: a streaming container is not always \"a\n // newly inserted node\" — when React adds the attribute to a div already\n // on the page it is one attribute change, and missing it would miss the\n // whole start of that answer.\n if (record.type === 'attributes') {\n everything = true\n continue\n }\n const target = record.target\n const element = target instanceof Element ? target : target.parentElement\n const container = element?.closest(STREAMING_SELECTOR) ?? null\n if (container !== null) touched.add(container)\n if (record.type !== 'childList' || everything) continue\n for (const added of record.addedNodes) {\n if (!(added instanceof Element)) continue\n if (added.matches(STREAMING_SELECTOR) || added.querySelector(STREAMING_SELECTOR) !== null) everything = true\n }\n for (const removed of record.removedNodes) {\n if (state.liveContainers.some(live => live === removed || removed.contains(live))) everything = true\n }\n }\n if (everything) scan(null)\n else if (touched.size > 0) scan(touched)\n }\n const stopMutations = subscribeMutations(document.body, {\n subtree: true,\n childList: true,\n characterData: true,\n attributeFilter: [STREAMING_ATTRIBUTE],\n }, onRecords)\n document.addEventListener('click', rememberReaderFold, true)\n document.addEventListener('keydown', rememberReaderFold, true)\n scan(null)\n\n return () => {\n stopMutations()\n document.removeEventListener('click', rememberReaderFold, true)\n document.removeEventListener('keydown', rememberReaderFold, true)\n if (state.cancelPaintFrame !== null) state.cancelPaintFrame()\n state.cancelPaintFrame = null\n state.liveRuns.length = 0\n clearHighlights()\n }\n}\n", "import { CHAT_REVEAL_ATTR } from '../../constants'\nimport { motionReduced, subscribePrefs } from '../../core/prefs'\nimport { createChatRevealEngine } from './reveal-engine'\nimport type { HostContext } from '../../core/host'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './chat-reveal.manifest'\n\n/**\n * The token reveal's installer, ported from dsh-chat-ux: new characters fade\n * in.\n *\n * The entry installs this only while the preference is on and dsh-chat-ux,\n * whose step highlights over the same text would stack with these, is off the\n * page (the manifest); uninstalled, there are no step rules, no scan observer\n * and no paint frames. The engine's own prerequisite (the Custom Highlight\n * API) is handled inside it, and the animation choice is read here so a\n * running engine is taken down with it (D26): what comes back from the engine\n * is null, and the mark the stylesheet reads is not written either.\n *\n * @param ctx - client context.\n * @param ui - shared handle table.\n * @returns teardown.\n */\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n /** The running engine, or null while the animation choice holds it still or it cannot be drawn. */\n let engine: (() => void) | null = null\n\n /** Bring the engine in line with the animation choice. No reload, no pass of its own. */\n const applyReveal = () => {\n if (!motionReduced()) {\n if (engine !== null) return\n engine = createChatRevealEngine()\n if (engine !== null) document.body.setAttribute(CHAT_REVEAL_ATTR, '')\n return\n }\n document.body.removeAttribute(CHAT_REVEAL_ATTR)\n if (engine === null) return\n engine()\n engine = null\n }\n applyReveal()\n const stopPrefs = subscribePrefs(applyReveal)\n return () => {\n stopPrefs()\n document.body.removeAttribute(CHAT_REVEAL_ATTR)\n if (engine === null) return\n engine()\n engine = null\n }\n}\n", "import * as primitives from '@deepseek-ai/dsh-client-ui-primitives'\nimport * as React from 'react'\nimport { CHAT_DIFF_MAX_LINES, CHAT_FILE_ADD_CLASS, CHAT_FILE_BODY_CLASS, CHAT_FILE_CHEVRON_CLASS, CHAT_FILE_DEL_CLASS, CHAT_FILE_DIFF_CLASS, CHAT_FILE_HIDDEN_CLASS, CHAT_FILE_INSPECT_CLASS, CHAT_FILE_IO_CLASS, CHAT_FILE_IO_DIVIDER_CLASS, CHAT_FILE_IO_LABEL_CLASS, CHAT_FILE_IO_SECTION_CLASS, CHAT_FILE_IO_TEXT_CLASS, CHAT_FILE_LEADING_CLASS, CHAT_FILE_LINK_CLASS, CHAT_FILE_MERGED_COPY, CHAT_FILE_MERGE_ATTR, CHAT_FILE_MERGE_GONE, CHAT_FILE_MERGE_HEAD, CHAT_FILE_MERGE_MEMBER, CHAT_FILE_ROLL_CLASS, CHAT_FILE_ROLL_DIGIT_CLASS, CHAT_FILE_ROLL_IN_CLASS, CHAT_FILE_ROLL_MOVING_CLASS, CHAT_FILE_ROLL_OUT_CLASS, CHAT_FILE_ROW_CLASS, CHAT_FILE_ROW_LINE_CLASS, CHAT_FILE_SEAT, CHAT_FILE_SEP_CLASS, CHAT_FILE_STAT_CLASS, CHAT_FILE_SUFFIX_CLASS, CHAT_FILE_TITLE_CLASS, chatFileCallHead, chatFileDiffBlockLabels, chatFileDiffHunks, chatFileParseArgs, chatFileRowModel, chatFileStateLabel, chatFileSummaryClassName } from './file-row-model'\nimport { createFileMerge, rowCarrier } from './file-row-merge'\nimport { copyLabel } from '../../core/i18n'\nimport { motionReduced } from '../../core/prefs'\nimport { createStamp } from '../../shared/dom'\nimport type { FileRowState } from './file-row-model'\nimport type { HostContext, HostFiber, HostText } from '../../core/host'\nimport type { HostChatBlock } from '@dsh-claude-style/contracts/services'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './chat-files.manifest'\n\n/** The seat's owner payload for a file tool row, plus the seat's copy. */\ninterface ChatFileRowProps {\n t: HostText\n toolName: string\n block: HostChatBlock\n cwd?: string\n home?: string\n openFile: (path: string) => void\n inspect?: () => void\n useDisclosure: () => { expanded: boolean, toggle: () => void }\n}\n\n/**\n * The file-change row: a write or edit call rendered as the host's own file\n * row, with the diff card the host draws for root calls only.\n *\n * The row takes the seat's owner payload and the seat's own `t` seat, and\n * renders collapsed as the title, the path and the `+n -m` tail, expanded as\n * the diff card. The host's own rows are the two keyed seats at the default\n * priority 0, and a keyed seat renders the lowest priority, so both are taken\n * over at priority -1; a second registration at one priority throws, so the\n * two keys are claimed together.\n *\n * The host's ToolRow component and its CSS Modules names are not part of the\n * frozen primitives table, so the chrome is redrawn here from the primitives\n * that are shared (DisclosureRow, TextShimmer, DiffBlock, diffTotals); the\n * row's own sizes and rhythm are in chat-files.css.\n *\n * The rows of one file inside one process group stand as one (file-row-merge.ts,\n * D62): the earliest of them draws the file's whole tail and whole diff card,\n * and the others take their boxes off the page. A file touched once is drawn\n * exactly as it was before merging existed.\n *\n * dsh-chat-ux claims the same two keys on the same seat at the same priority,\n * and a second registration at one priority throws, so the entry keeps this\n * feature uninstalled while that plugin is on the page and installs it when\n * the plugin goes (the manifest).\n *\n * @param ctx - client context.\n * @param ui - shared handle table.\n * @returns teardown.\n */\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n const h = React.createElement\n\n /** The rows of one file read together; one install owns one registry (D62). */\n const fileMerge = createFileMerge()\n\n /**\n * One figure of the row's tail. Every character whose own digit changed rolls\n * in its own box — the digit that was there leaves upward as the new one rises\n * in behind it, the same 160 ms and curve the process header's counted figures\n * roll with (dsh-better-display's fold figures, THIRD_PARTY_NOTICES.md) —\n * while the characters that hold keep their place, so a growing number reads\n * as an odometer rather than as a whole new number. The animation choice\n * decides whether a leaving digit is drawn at all (D26).\n */\n const RollingStat = (props: { className: string, text: string, running: boolean }) => {\n const [leaving, setLeaving] = React.useState<string | null>(null)\n const shown = React.useRef(props.text)\n React.useLayoutEffect(() => {\n const before = shown.current\n if (before === props.text) return\n shown.current = props.text\n setLeaving(motionReduced() ? null : before)\n }, [props.text])\n return h(primitives.TextShimmer, {\n className: props.className + ' ' + CHAT_FILE_ROLL_CLASS,\n active: props.running,\n children: [...props.text].map((char, at) => {\n // A character the reader has not seen yet arrives from below with no\n // digit leaving it; a character whose own digit changed swaps the two.\n const before = leaving === null ? char : leaving[at] ?? null\n const moving = before !== char\n return h('span', {\n key: `${at}:${char}`,\n className: CHAT_FILE_ROLL_DIGIT_CLASS + (moving ? ' ' + CHAT_FILE_ROLL_MOVING_CLASS : ''),\n }, [\n moving && before !== null ? h('span', {\n key: 'out',\n className: CHAT_FILE_ROLL_OUT_CLASS,\n 'aria-hidden': true,\n onAnimationEnd: () => setLeaving(null),\n }, before) : null,\n h('span', { key: 'in', className: CHAT_FILE_ROLL_IN_CLASS }, char),\n ])\n }),\n })\n }\n\n /**\n * One row's render.\n * @param props - the owner payload and the seat's copy seat.\n * @returns this row.\n */\n const ChatFileRow = (props: ChatFileRowProps) => {\n const { t, toolName, block, cwd, home, openFile, inspect, useDisclosure } = props\n const { expanded, toggle } = useDisclosure()\n const rootRef = React.useRef<HTMLDivElement | null>(null)\n const args = React.useMemo(() => {\n const head = chatFileCallHead(block)\n return head === null ? null : chatFileParseArgs(head.argsRaw)\n }, [block])\n const model = React.useMemo(() => chatFileRowModel(toolName, block, args, cwd, home), [args, block, cwd, home, toolName])\n const hunks = React.useMemo(() => chatFileDiffHunks(block, args), [args, block])\n const labels = React.useMemo(() => chatFileDiffBlockLabels(t), [t])\n // The view this row's file asks for (D62): null while it is not registered,\n // and a group of one call draws exactly what it drew before merging existed.\n const merge = React.useSyncExternalStore(fileMerge.subscribe, () => fileMerge.viewFor(rootRef.current))\n const merged = merge !== null && merge.count > 1\n // Only the row that stands draws the whole file; a row it stands for keeps\n // its own tail and card, which the reader never sees.\n const shownHunks = merged && merge.head ? merge.hunks : hunks\n const state: FileRowState = merged && merge.running ? 'running' : model.state\n const running = state === 'running'\n const totals = React.useMemo(() => (shownHunks === null ? null : primitives.diffTotals(shownHunks)), [shownHunks])\n const expandable = shownHunks !== null || model.output !== null || model.bodyRaw !== null\n const open = expanded && expandable\n const summaryText = model.errorSummary ?? model.summary\n const status = chatFileStateLabel(state, t)\n // A failed or interrupted row carries no path link: in those two states\n // the summary holds a verdict or a failure, and a link would read it as a\n // normal change.\n const linkAvailable = model.filePath !== undefined && state !== 'error' && state !== 'stopped'\n\n // What this row tells the registry about its own call. A call with no path,\n // no change, or a verdict that failed or was interrupted stands alone.\n const own = React.useMemo(() => hunks === null || model.filePath === undefined || (model.state !== 'ok' && model.state !== 'running')\n ? null\n : { path: model.filePath, hunks, state: model.state },\n [hunks, model.filePath, model.state])\n React.useLayoutEffect(() => {\n const element = rootRef.current\n if (element === null || own === null) return\n return fileMerge.put({ element, ...own })\n }, [own])\n\n // A row the head stands for takes its box off the page: the carrier is the\n // host's call row, so the host row's own spacing goes with it.\n const hidden = merged && !merge.head\n const carrier = React.useMemo(() => createStamp(CHAT_FILE_MERGE_ATTR), [])\n React.useLayoutEffect(() => {\n const element = rootRef.current\n carrier.mark(element === null || !hidden ? null : rowCarrier(element), CHAT_FILE_MERGE_GONE)\n return () => carrier.release()\n }, [carrier, hidden])\n\n const openFileClick = React.useCallback((event: React.MouseEvent) => {\n event.stopPropagation()\n if (model.filePath === undefined) return\n openFile(model.filePath)\n }, [model.filePath, openFile])\n // The path link is a button inside the row, and the whole row is also the\n // open and close target: Enter and space have to land on this button\n // without bubbling into the row's keydown.\n const linkKeyDown = React.useCallback((event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') event.stopPropagation()\n }, [])\n\n const collapsedContent = summaryText === '' ? null : [\n h('span', { key: 'sep', className: CHAT_FILE_SEP_CLASS, 'aria-hidden': true }),\n linkAvailable\n ? h('button', { key: 'path', type: 'button', className: CHAT_FILE_LINK_CLASS, onClick: openFileClick, onKeyDown: linkKeyDown },\n h(primitives.TextShimmer, { active: running, children: summaryText }))\n : h('span', { key: 'path', className: chatFileSummaryClassName(state) },\n h(primitives.TextShimmer, { active: running, children: summaryText })),\n totals === null ? null : h('span', { key: 'totals', className: CHAT_FILE_SUFFIX_CLASS },\n h(RollingStat, { key: 'add', className: CHAT_FILE_STAT_CLASS + ' ' + CHAT_FILE_ADD_CLASS, text: '+' + totals.added, running }),\n h(RollingStat, { key: 'del', className: CHAT_FILE_STAT_CLASS + ' ' + CHAT_FILE_DEL_CLASS, text: '-' + totals.removed, running })),\n ]\n\n const inputSection = model.bodyRaw === null ? null : h('div', { className: CHAT_FILE_IO_SECTION_CLASS },\n h('span', { className: CHAT_FILE_IO_LABEL_CLASS }, t('row.input')),\n h('span', { className: CHAT_FILE_IO_TEXT_CLASS }, model.bodyRaw))\n const outputSection = model.output === null ? null : h('div', { className: CHAT_FILE_IO_SECTION_CLASS },\n h('span', { className: CHAT_FILE_IO_LABEL_CLASS }, t('row.output')),\n h('span', { className: CHAT_FILE_IO_TEXT_CLASS, 'data-error': state === 'error' || undefined }, model.output))\n const expandedContent = open ? h('div', { className: CHAT_FILE_BODY_CLASS },\n shownHunks !== null\n ? h(primitives.DiffBlock, { diffs: shownHunks, labels, maxLines: CHAT_DIFF_MAX_LINES, className: CHAT_FILE_DIFF_CLASS })\n : h('div', { className: CHAT_FILE_IO_CLASS },\n inputSection,\n model.bodyRaw !== null && model.output !== null ? h('span', { className: CHAT_FILE_IO_DIVIDER_CLASS, 'aria-hidden': true }) : null,\n outputSection),\n inspect === undefined ? null : h('button', { type: 'button', className: CHAT_FILE_INSPECT_CLASS, onClick: inspect },\n h(primitives.IconInspectOutlineRegular, null),\n t('row.inspect'))) : undefined\n\n return h('div', {\n ref: rootRef,\n className: CHAT_FILE_ROW_CLASS,\n 'data-variant': model.variant,\n 'data-tool': toolName,\n 'data-state': state,\n [CHAT_FILE_MERGE_ATTR]: merged ? (merge.head ? CHAT_FILE_MERGE_HEAD : CHAT_FILE_MERGE_MEMBER) : undefined,\n },\n status !== null ? h('span', { className: CHAT_FILE_HIDDEN_CLASS }, status) : null,\n // The rows this one stands for leave the page whole, so their calls are\n // said here: a reader who cannot see four rows is told there were four.\n merged ? h('span', { className: CHAT_FILE_HIDDEN_CLASS },\n copyLabel(CHAT_FILE_MERGED_COPY, '{count} changes to the same file are merged into this row', { count: merge.count })) : null,\n h(primitives.DisclosureRow, {\n rowClassName: CHAT_FILE_ROW_LINE_CLASS,\n leadingClassName: CHAT_FILE_LEADING_CLASS,\n titleClassName: CHAT_FILE_TITLE_CLASS,\n chevronClassName: CHAT_FILE_CHEVRON_CLASS,\n icon: h(primitives.IconEditOutlineRegular, { size: 14 }),\n title: t(model.titleKey),\n running,\n open,\n expandable,\n expandOnRowClick: true,\n keepContentWhenOpen: true,\n onToggle: toggle,\n collapsedContent,\n }, expandedContent))\n }\n\n let slotsFiber: HostFiber | null = null\n if (typeof ctx.inject === 'function') {\n slotsFiber = ctx.inject(['slots'], scope => {\n const slots = scope.get('slots')\n if (slots === undefined || slots === null || typeof slots.inject !== 'function') return\n /** The two keys' registrations, or null while they are not claimed. */\n let seatStops: (() => void) | null = null\n const claimSeats = () => {\n if (seatStops !== null) return\n const seat = { name: CHAT_FILE_SEAT, priority: -1, locale: 'conversation' }\n const stopEdit = slots.register({ ...seat, key: 'edit' }, ChatFileRow)\n const stopWrite = slots.register({ ...seat, key: 'write' }, ChatFileRow)\n let stopped = false\n seatStops = () => {\n if (stopped) return\n stopped = true\n stopEdit()\n stopWrite()\n }\n }\n const releaseSeats = () => {\n if (seatStops === null) return\n seatStops()\n seatStops = null\n }\n scope.effect(() => {\n // The seat is the host's to declare, so the keys wait for it.\n const stopSeat = slots.inject(CHAT_FILE_SEAT, () => {\n claimSeats()\n return releaseSeats\n })\n return () => {\n releaseSeats()\n if (typeof stopSeat === 'function') stopSeat()\n }\n }, 'dsh-claude-style: file change row')\n })\n }\n return () => {\n if (slotsFiber === null) return\n if (typeof slotsFiber.dispose === 'function') slotsFiber.dispose()\n slotsFiber = null\n }\n}\n", "import type { HostText } from '../../core/host'\nimport type { HostChatBlock } from '@dsh-claude-style/contracts/services'\n\n/**\n * The file-change row's derivations, kept apart from its React component\n * (chat-files.ts): what a write or edit call is, which diff it shows, and how\n * a path or a failure reads.\n *\n * The host's own file row draws a diff card for a root call only — its\n * diff-card-model returns null the moment a block carries a parentCallId —\n * so the `+96 -0` tail appears on a directly called write or edit and not on\n * the sub-calls run_code dispatches. The skin wants exactly that other half,\n * so it derives the same model without that exclusion. The cost is stated\n * plainly: a sub-call persists no presentation metadata, so after it settles\n * there is nothing saying what was applied and only the arguments can speak —\n * a write's argument is the whole content (exact), an edit's is that pair of\n * replacements (which `replace_all`, or a write that failed, can put out of\n * step with what really happened).\n */\n\n/** One change a file row draws: the file, the text replaced (null for a new file) and the text written. */\nexport interface FileHunk {\n path: string\n oldText: string | null\n newText: string\n}\n\n/** Where a file row's call stands. */\nexport type FileRowState = 'preparing' | 'running' | 'ok' | 'error' | 'stopped'\n\n/** A call's parsed arguments. */\nexport type CallArgs = Record<string, unknown>\n\n/** The row root. */\nexport const CHAT_FILE_ROW_CLASS = 'dsh-claude-file-root'\n/** The disclosure row's own element: the hover highlight hangs here. */\nexport const CHAT_FILE_ROW_LINE_CLASS = 'dsh-claude-file-row'\n/** The icon slot. */\nexport const CHAT_FILE_LEADING_CLASS = 'dsh-claude-file-leading'\n/** The open and close chevron. */\nexport const CHAT_FILE_CHEVRON_CLASS = 'dsh-claude-file-chevron'\n/** The title (edit or write). */\nexport const CHAT_FILE_TITLE_CLASS = 'dsh-claude-file-title'\n/** The dot between the title and the summary. */\nexport const CHAT_FILE_SEP_CLASS = 'dsh-claude-file-sep'\n/** The summary text. */\nexport const CHAT_FILE_SUMMARY_CLASS = 'dsh-claude-file-summary'\n/** The failure colour on the summary. */\nexport const CHAT_FILE_ERROR_CLASS = 'dsh-claude-file-error'\n/** The stopped colour on the summary. */\nexport const CHAT_FILE_STOPPED_CLASS = 'dsh-claude-file-stopped'\n/** The clickable file path. */\nexport const CHAT_FILE_LINK_CLASS = 'dsh-claude-file-link'\n/** The container of the small statistics tail. */\nexport const CHAT_FILE_SUFFIX_CLASS = 'dsh-claude-file-suffix'\n/** The type size both statistics share. */\nexport const CHAT_FILE_STAT_CLASS = 'dsh-claude-file-stat'\n/** The added count. */\nexport const CHAT_FILE_ADD_CLASS = 'dsh-claude-file-add'\n/** The removed count. */\nexport const CHAT_FILE_DEL_CLASS = 'dsh-claude-file-del'\n/** One figure of the tail, which rolls character by character. */\nexport const CHAT_FILE_ROLL_CLASS = 'dsh-claude-file-roll'\n/** One character of that figure, in its own box. */\nexport const CHAT_FILE_ROLL_DIGIT_CLASS = 'dsh-claude-file-roll-digit'\n/** On the character whose own digit changed: this one travels. */\nexport const CHAT_FILE_ROLL_MOVING_CLASS = 'dsh-claude-file-roll-moving'\n/** The digit leaving upward. */\nexport const CHAT_FILE_ROLL_OUT_CLASS = 'dsh-claude-file-roll-out'\n/** The digit in flow, which the leaving one makes way for. */\nexport const CHAT_FILE_ROLL_IN_CLASS = 'dsh-claude-file-roll-in'\n/**\n * On the row while its file's calls are read together: `head` on the row that\n * stands for the file, `member` on the rows it stands for, `gone` on a merged\n * row's carrier — the host's own call row — whose box comes off the page (D62).\n */\nexport const CHAT_FILE_MERGE_ATTR = 'data-dsh-claude-file-merge'\nexport const CHAT_FILE_MERGE_HEAD = 'head'\nexport const CHAT_FILE_MERGE_MEMBER = 'member'\nexport const CHAT_FILE_MERGE_GONE = 'gone'\n/** The merged row's screen-reader sentence: the calls its file's other rows held. */\nexport const CHAT_FILE_MERGED_COPY = 'fileRowMergedChanges'\n/** The expanded body. */\nexport const CHAT_FILE_BODY_CLASS = 'dsh-claude-file-body'\n/** The diff card inside an expanded body. */\nexport const CHAT_FILE_DIFF_CLASS = 'dsh-claude-file-diff'\n/** The IN/OUT card inside an expanded body. */\nexport const CHAT_FILE_IO_CLASS = 'dsh-claude-file-io'\n/** One section of the IN/OUT card. */\nexport const CHAT_FILE_IO_SECTION_CLASS = 'dsh-claude-file-io-section'\n/** The hairline between IN and OUT. */\nexport const CHAT_FILE_IO_DIVIDER_CLASS = 'dsh-claude-file-io-divider'\n/** The IN and OUT side labels. */\nexport const CHAT_FILE_IO_LABEL_CLASS = 'dsh-claude-file-io-label'\n/** The IN and OUT bodies. */\nexport const CHAT_FILE_IO_TEXT_CLASS = 'dsh-claude-file-io-text'\n/** The trajectory entrance pill. */\nexport const CHAT_FILE_INSPECT_CLASS = 'dsh-claude-file-inspect'\n/** The running state label only a screen reader reads. */\nexport const CHAT_FILE_HIDDEN_CLASS = 'dsh-claude-file-hidden'\n/** The seat both file tools render through; the host's own rows sit at priority 0 and a keyed seat renders the lowest. */\nexport const CHAT_FILE_SEAT = 'tool.call.toolview'\n\n/** A chat row shows this many lines before a diff card folds its middle; the host's own CHAT_DIFF_MAX_LINES. */\nexport const CHAT_DIFF_MAX_LINES = 9\n\n/**\n * This row's call head: a settled call reads the one its result node brought\n * back, a running one its own arguments.\n */\nexport function chatFileCallHead(block: HostChatBlock): { name: string, argsRaw: string } | null {\n if ('kind' in block) return block.call ?? null\n if (block.phase !== 'start') return null\n return { name: block.name ?? '', argsRaw: block.argsRaw ?? '' }\n}\n\n/** Parse the raw argument JSON; null when it is cut off mid-stream or is not an object. */\nexport function chatFileParseArgs(argsRaw: string): CallArgs | null {\n let value: unknown\n try {\n value = JSON.parse(argsRaw)\n } catch {\n return null\n }\n if (typeof value !== 'object' || value === null || Array.isArray(value)) return null\n return value as CallArgs\n}\n\n/** The first non-empty string field, in the order given. */\nexport function chatFilePickString(args: CallArgs, keys: string[]) {\n for (const key of keys) {\n const value = args[key]\n if (typeof value === 'string' && value !== '') return value\n }\n return undefined\n}\n\n/**\n * The optional sandbox escalation pair: a file-writing row draws its diff\n * only while the two are together and valid, and otherwise falls back to the\n * IN/OUT card — the host's own test.\n */\nexport function chatFileValidEscalation(args: CallArgs) {\n const permission = args.sandbox_permissions\n const justification = args.justification\n if (permission === undefined && justification === undefined) return true\n if (permission !== 'workspace-write' && permission !== 'danger-full-access') return false\n return typeof justification === 'string' && justification.trim() !== ''\n}\n\n/**\n * Shorten an absolute path into the shape a reader recognises: relative to\n * the session workspace first, then any leftover home prefix as `~`.\n */\nexport function chatFileShortenPath(path: string, cwd: string | undefined, home: string | undefined) {\n if (cwd !== undefined && cwd !== '' && path.startsWith(cwd)) {\n const rest = path.slice(cwd.length).replace(/^[\\\\/]+/, '')\n if (rest !== '') return rest\n }\n if (home !== undefined && home !== '' && path.startsWith(home)) {\n const rest = path.slice(home.length)\n if (rest === '' || rest.startsWith('/') || rest.startsWith('\\\\')) return '~' + rest.replace(/\\\\/g, '/')\n }\n return path\n}\n\n/** The first line of a piece of text. */\nexport function chatFileFirstLine(text: string) {\n const lineBreakAt = text.indexOf('\\n')\n return lineBreakAt === -1 ? text : text.slice(0, lineBreakAt)\n}\n\n/**\n * Derive the change from the call's arguments: a write is the whole content,\n * an edit is that pair of replacements.\n */\nexport function chatFileIntendedHunks(name: string, args: CallArgs | null): FileHunk[] | null {\n if (args === null) return null\n const path = chatFilePickString(args, ['path', 'file_path'])\n if (path === undefined) return null\n if (!chatFileValidEscalation(args)) return null\n if (name === 'write') {\n const content = args.content\n return typeof content === 'string' ? [{ path, oldText: null, newText: content }] : null\n }\n if (name !== 'edit') return null\n const oldText = args.old_string\n const newText = args.new_string\n if (typeof oldText !== 'string' || typeof newText !== 'string') return null\n const replaceAll = args.replace_all\n if (replaceAll !== undefined && typeof replaceAll !== 'boolean') return null\n return [{ path, oldText: oldText === '' ? null : oldText, newText }]\n}\n\n/**\n * Read the hunks the result metadata says were really applied.\n * @returns the hunks, `empty` when the metadata says nothing changed, or null when it is unusable.\n */\nexport function chatFileAppliedHunks(meta: unknown): FileHunk[] | 'empty' | null {\n if (typeof meta !== 'object' || meta === null || Array.isArray(meta)) return null\n // The tool's own metadata: it arrives as JSON, so every field is checked here.\n const diffs = (meta as { diffs?: unknown }).diffs\n if (!Array.isArray(diffs)) return null\n if (diffs.length === 0) return 'empty'\n const hunks: FileHunk[] = []\n for (const hunk of diffs) {\n if (typeof hunk !== 'object' || hunk === null) return null\n const { path, oldText, newText } = hunk as { path?: unknown, oldText?: unknown, newText?: unknown }\n if (typeof path !== 'string') return null\n if (oldText !== null && oldText !== undefined && typeof oldText !== 'string') return null\n if (typeof newText !== 'string') return null\n hunks.push({ path, oldText: oldText ?? null, newText })\n }\n return hunks\n}\n\n/**\n * Derive the change this row shows. One branch differs from the host's own\n * diff-card-model: sub-calls are not excluded. The rest keeps its order —\n * while a call is unsettled only its arguments are available, and once\n * settled the metadata's really-applied hunks win, with the arguments as the\n * fallback.\n * @returns the hunks to draw, or null when this row has none.\n */\nexport function chatFileDiffHunks(block: HostChatBlock, args: CallArgs | null) {\n if (!('kind' in block)) {\n if (block.phase === 'preparing') return null\n return chatFileIntendedHunks(block.name ?? '', args)\n }\n if (block.isError) return null\n const applied = chatFileAppliedHunks(block.meta)\n if (applied !== null && applied !== 'empty') return applied\n if (block.call === undefined || block.call === null) return null\n return chatFileIntendedHunks(block.call.name, args)\n}\n\n/**\n * Everything this row renders from.\n * @returns the row's model.\n */\nexport function chatFileRowModel(toolName: string, block: HostChatBlock, args: CallArgs | null, cwd: string | undefined, home: string | undefined) {\n const done = 'kind' in block\n const head = chatFileCallHead(block)\n const state: FileRowState = !done\n ? block.phase === 'preparing' ? 'preparing' : 'running'\n : block.error?.code === 'interrupted' ? 'stopped' : block.isError ? 'error' : 'ok'\n const path = args === null ? undefined : chatFilePickString(args, ['path', 'file_path'])\n const output = done ? chatFileResultText(block) || null : null\n return {\n titleKey: toolName === 'write' ? 'tool.title.write' : 'tool.title.edit',\n variant: toolName === 'write' ? 'write' : 'edit',\n summary: path === undefined ? '' : chatFileShortenPath(path, cwd, home),\n filePath: path,\n bodyRaw: head === null || head.argsRaw === '' ? null : head.argsRaw,\n output,\n errorSummary: state === 'error' && output !== null ? chatFileFirstLine(output) : null,\n state,\n }\n}\n\n/**\n * Flatten a settled result into display text: text blocks as they are, every\n * other block as JSON. A result with no content falls back to its error.\n */\nexport function chatFileResultText(node: HostChatBlock) {\n const parts: string[] = []\n for (const block of node.content ?? []) {\n if (block.type === 'text' && typeof block.text === 'string') {\n parts.push(block.text)\n continue\n }\n parts.push(JSON.stringify(block, null, 2))\n }\n if (parts.length === 0 && node.error !== undefined) parts.push(`${node.error.name ?? ''}: ${node.error.code ?? ''}`)\n return parts.join('\\n')\n}\n\n/** The summary's class names: a failure and an interruption each carry their own state colour. */\nexport function chatFileSummaryClassName(state: FileRowState) {\n if (state === 'error') return CHAT_FILE_SUMMARY_CLASS + ' ' + CHAT_FILE_ERROR_CLASS\n if (state === 'stopped') return CHAT_FILE_SUMMARY_CLASS + ' ' + CHAT_FILE_STOPPED_CLASS\n return CHAT_FILE_SUMMARY_CLASS\n}\n\n/**\n * The state text for a screen reader: neither the icon nor the shimmer says\n * anything, so this sentence says it for them.\n * @returns the state text, or null when there is nothing to announce.\n */\nexport function chatFileStateLabel(state: FileRowState, t: HostText) {\n if (state === 'running') return t('row.running')\n if (state === 'error') return t('row.failed')\n if (state === 'stopped') return t('row.stopped')\n return null\n}\n\n/** Assemble the diff card's own chrome copy. */\nexport function chatFileDiffBlockLabels(t: HostText) {\n return {\n codeLabel: t('codeBlock.title'),\n wrapLabel: t('codeBlock.wrap'),\n unwrapLabel: t('codeBlock.unwrap'),\n copy: t('copy'),\n copied: t('copied'),\n collapseAria: t('diff.collapseAria'),\n expandAria: (hidden: number) => t('diff.expandAria', { count: hidden }),\n collapse: t('collapse'),\n expand: (hidden: number) => t('diff.expandRest', { count: hidden }),\n }\n}\n", "import { CHAT_CALL_SELECTOR, PROCESS_CONTENT_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport { notifyAll } from '../../shared/notify'\nimport type { FileHunk, FileRowState } from './file-row-model'\n\n/**\n * The file-change row's read-across-calls half (D62): the edits and writes of\n * one file inside one process group stand as a single row.\n *\n * The host renders one row per call and hands each of them only its own block,\n * so a row that has to know what the others did reads it here: every row\n * registers the file it touched and what its own call changed, and the row the\n * registry names as the group's head draws the whole file's tail and its whole\n * diff card. A file touched once is drawn exactly as it was before this module\n * existed.\n *\n * A group is one process group's content layer (D44), so two pieces of work in\n * one turn are never read together, and the head is the group's earliest call\n * in document order: a number that grows stays where the file was first\n * touched. The calls a program dispatched are the case with several rows of one\n * file on the page at once: the host renders them side by side under the\n * program's own row, inside the same content layer.\n */\n\n/** One file-change row as the registry knows it: its element, its file, what its own call changed. */\nexport interface FileMergeRow {\n element: HTMLElement\n path: string\n hunks: readonly FileHunk[]\n state: FileRowState\n}\n\n/** What one row draws once its file's calls are read together. */\nexport interface FileMergeView {\n /** This row stands for the file: it draws the merged tail and the merged diff card. */\n head: boolean\n /** How many calls of the file are read together. */\n count: number\n /** Every call's hunks, in document order. */\n hunks: FileHunk[]\n /** Whether any call of the file is still running. */\n running: boolean\n}\n\n/** The content layer a row sits in, or null when it is in no process group. */\nexport function rowContainer(element: HTMLElement) {\n return element.closest(PROCESS_CONTENT_SELECTOR)\n}\n\n/**\n * The element whose box a row takes in its list: the host's call row for this\n * call. For a directly called tool that row is the content layer's own child;\n * for a call a program dispatched it is the sub-call's own row, and the\n * program's row around them must stay. Hiding this one takes the host row's\n * spacing with it; hiding the row inside it would leave the box behind.\n *\n * @returns the carrier, or null for a row the host drew outside a call row.\n */\nexport function rowCarrier(element: HTMLElement) {\n return element.closest(CHAT_CALL_SELECTOR)\n}\n\n/** The earlier of two rows first, by document order. */\nexport function byDocumentOrder(a: FileMergeRow, b: FileMergeRow) {\n if (a.element === b.element) return 0\n return a.element.compareDocumentPosition(b.element) & Node.DOCUMENT_POSITION_PRECEDING ? 1 : -1\n}\n\n/**\n * Read every registered row's group.\n *\n * @param rows - the registered rows.\n * @returns each registered row's element → the view it draws.\n */\nexport function mergeViews(rows: readonly FileMergeRow[]) {\n const groups = new Map<Element, Map<string, FileMergeRow[]>>()\n for (const row of rows) {\n const container = rowContainer(row.element)\n if (container === null) continue\n let byPath = groups.get(container)\n if (byPath === undefined) {\n byPath = new Map()\n groups.set(container, byPath)\n }\n const members = byPath.get(row.path)\n if (members === undefined) byPath.set(row.path, [row])\n else members.push(row)\n }\n const views = new Map<HTMLElement, FileMergeView>()\n for (const byPath of groups.values()) {\n for (const members of byPath.values()) {\n const ordered = [...members].sort(byDocumentOrder)\n // One group shares one hunk list: the tail and the diff card both read it,\n // so the numbers can never disagree with the card.\n const hunks = ordered.flatMap((member) => [...member.hunks])\n const running = ordered.some((member) => member.state === 'running')\n ordered.forEach((member, at) => {\n views.set(member.element, { head: at === 0, count: ordered.length, hunks, running })\n })\n }\n }\n return views\n}\n\n/**\n * The registry one install owns: rows put themselves in, their views are read\n * back out. The views are rebuilt whole on every change and each one stands\n * until the next change, which is the stable snapshot a React subscriber reads\n * between renders.\n */\nexport function createFileMerge() {\n const rows = new Map<HTMLElement, FileMergeRow>()\n const listeners: (() => void)[] = []\n let views = new Map<HTMLElement, FileMergeView>()\n\n const rebuild = () => {\n views = mergeViews([...rows.values()])\n notifyAll(listeners)\n }\n\n return {\n /** The view one row draws, or null while it is not registered. */\n viewFor(element: HTMLElement | null) {\n return element === null ? null : views.get(element) ?? null\n },\n /**\n * Register one row, replacing what the same element registered before.\n * @returns the unregister: it takes this row out while the element still holds it.\n */\n put(row: FileMergeRow) {\n rows.set(row.element, row)\n rebuild()\n return () => {\n if (rows.get(row.element) !== row) return\n rows.delete(row.element)\n rebuild()\n }\n },\n /** Hear about every change; returns the unsubscriber. */\n subscribe(listener: () => void) {\n listeners.push(listener)\n return () => {\n const at = listeners.indexOf(listener)\n if (at !== -1) listeners.splice(at, 1)\n }\n },\n }\n}\n", "/**\n * Measuring the caret's viewport box, ported from dsh-chat-ux's caret\n * motion: the rich surface (dsh's contenteditable composer input) is\n * measured through the collapsed Range the browser keeps, the plain one\n * (a textarea under the composer seat) through a hidden mirror.\n *\n * Facts that shape both, all of them measured in a real Chromium:\n *\n * rich a collapsed Range inside the text, beside a decorator or at a\n * soft wrap gives an exact box. At a line break Chromium gives a\n * 0x0 rect, and empty paragraphs and soft wraps are exactly where\n * that happens — so the break itself is measured there, whose own\n * rect is always one line tall.\n * plain a textarea's selection is not in the DOM and a Range cannot\n * reach it. The mirror copies the styles that decide glyph width\n * and wrap position, is as wide as the textarea's content box,\n * and breaks the text at the caret: the front half is bare text,\n * the back half one span whose first line box is the caret. The\n * whole back half has to be there — soft wrapping goes by whole\n * words, so a front-half-only mirror puts the word being typed on\n * the line above.\n *\n * Nothing here touches a container the host owns: both probes are built,\n * measured and removed within the call.\n */\n\n/** A caret's viewport box: its left edge, its top and its height. */\nexport interface CaretBox {\n left: number\n top: number\n height: number\n}\n\n/**\n * The styles the mirror copies from the textarea: everything that decides\n * glyph width or wrap position. One missing entry and the mirror wraps\n * differently from the textarea, putting the caret on the wrong line.\n */\nexport const CARET_MIRRORED_PROPERTIES = [\n 'direction', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style',\n 'font-variant', 'font-weight', 'font-feature-settings', 'font-variation-settings', 'font-kerning',\n 'letter-spacing', 'word-spacing', 'line-height', 'text-align', 'text-indent', 'text-transform',\n 'tab-size', 'white-space', 'word-break', 'overflow-wrap', 'hyphens',\n 'padding-top', 'padding-right', 'padding-bottom', 'padding-left',\n]\n\n/** A node's index among its parent's children; -1 when it is not one of them. */\nexport function caretChildIndex(parent: Node, child: Node) {\n let index = 0\n for (let node = parent.firstChild; node !== null; node = node.nextSibling) {\n if (node === child) return index\n index += 1\n }\n return -1\n}\n\n/**\n * The line break the caret is sitting against, if any.\n *\n * The break itself is what gets measured, never the paragraph it sits in:\n * a paragraph can be many lines tall, while a break's own rect is always\n * one line and exactly the text height. A 0x0 rect only happens beside a\n * break, so finding none here means there is nothing to measure — the\n * caller hands the native caret back rather than painting a guessed spot.\n */\nexport function caretNearestBreak(range: Range) {\n const container = range.startContainer\n const offset = range.startOffset\n if (container instanceof HTMLBRElement) return { lineBreak: container, before: offset === 0 }\n if (container instanceof Text) {\n const parent = container.parentNode\n if (parent === null) return null\n const index = caretChildIndex(parent, container)\n if (index < 0) return null\n if (offset === container.data.length) {\n const next = parent.childNodes[index + 1]\n if (next instanceof HTMLBRElement) return { lineBreak: next, before: true }\n }\n if (offset === 0) {\n const previous = parent.childNodes[index - 1]\n if (previous instanceof HTMLBRElement) return { lineBreak: previous, before: false }\n }\n return null\n }\n const next = container.childNodes[offset]\n if (next instanceof HTMLBRElement) return { lineBreak: next, before: true }\n const previous = container.childNodes[offset - 1]\n if (previous instanceof HTMLBRElement) return { lineBreak: previous, before: false }\n return null\n}\n\n/**\n * An empty input — a session just switched to leaves a shell with no\n * paragraph at all — is measured through a matching break parked off in a\n * corner of the page.\n *\n * The caret belongs at the start of the content box's first line, and how\n * tall that line is and where the text box sits in it has to be asked of\n * something. The probe is built and removed every frame, and never enters a\n * container the host owns: a node under the composer's own wrapper would\n * wake React.\n *\n * @returns the viewport left, top and height, or null when nothing measures.\n */\nexport function caretEmptyLineBox(input: Element, probeHome: Element | null): CaretBox | null {\n if (probeHome === null) return null\n const style = getComputedStyle(input)\n const probe = document.createElement('div')\n probe.style.cssText = 'position:fixed;top:0;left:0;visibility:hidden;pointer-events:none'\n probe.style.padding = style.padding\n probe.style.whiteSpace = 'pre-wrap'\n probe.style.fontFamily = style.fontFamily\n probe.style.fontSize = style.fontSize\n probe.style.fontWeight = style.fontWeight\n probe.style.fontStyle = style.fontStyle\n probe.style.lineHeight = style.lineHeight\n probe.appendChild(document.createElement('br'))\n probeHome.appendChild(probe)\n const probeRect = probe.getBoundingClientRect()\n const breakElement = probe.firstElementChild\n const breakRect = breakElement === null ? null : breakElement.getBoundingClientRect()\n probe.remove()\n if (breakRect === null) return null\n // The probe carries the input's padding, so these two differences are the\n // distance from the content box's start to the text box's start.\n const inputRect = input.getBoundingClientRect()\n return {\n left: inputRect.left + (breakRect.left - probeRect.left),\n top: inputRect.top + (breakRect.top - probeRect.top),\n height: breakRect.height,\n }\n}\n\n/**\n * The viewport box of this collapsed selection on the rich surface.\n * @returns null when it cannot be measured: the caller hands the native caret back.\n */\nexport function caretMeasureRich(input: Element, range: Range, probeHome: Element | null): CaretBox | null {\n const rect = range.getBoundingClientRect()\n if (rect.height > 0) return { left: rect.left, top: rect.top, height: rect.height }\n const anchor = caretNearestBreak(range)\n if (anchor === null) {\n // No break anywhere in the input: there is nothing to measure, but the\n // caret sits at the start of the content box's first line. Anything else\n // in there is a shape this does not guess at.\n if (input.firstChild !== null) return null\n return caretEmptyLineBox(input, probeHome)\n }\n const breakRect = anchor.lineBreak.getBoundingClientRect()\n if (anchor.before) return { left: breakRect.left, top: breakRect.top, height: breakRect.height }\n // After a break comes the next line's start: back to the block's content\n // left edge, one line down.\n const block = anchor.lineBreak.parentElement\n if (block === null) return null\n const lineHeight = Number.parseFloat(getComputedStyle(block).lineHeight)\n return {\n left: block.getBoundingClientRect().left,\n top: breakRect.top + (Number.isFinite(lineHeight) ? lineHeight : breakRect.height),\n height: breakRect.height,\n }\n}\n\n/**\n * A caret's viewport box on the plain surface, measured through a hidden\n * mirror.\n *\n * The caret's offset at a soft wrap naturally lands at the next line's start\n * in the mirror; with `endKeyed` set (the last move was End) the character\n * before it is measured instead, which is the previous line's end — where\n * the native caret draws after End.\n *\n * @param input - the textarea holding the focus.\n * @param endKeyed - whether the last explicit move was the End key.\n * @param probeHome - the marked container the mirror is built in.\n * @returns null when it cannot be measured: the caller hands the native caret back.\n */\nexport function caretMeasurePlain(input: HTMLTextAreaElement, endKeyed: boolean, probeHome: Element | null): CaretBox | null {\n if (probeHome === null) return null\n const style = getComputedStyle(input)\n const mirror = document.createElement('div')\n mirror.style.cssText = 'position:fixed;top:0;left:0;visibility:hidden;pointer-events:none;'\n + 'margin:0;border:0;box-sizing:content-box;height:auto;overflow:hidden'\n for (const name of CARET_MIRRORED_PROPERTIES) mirror.style.setProperty(name, style.getPropertyValue(name))\n const paddingX = Number.parseFloat(style.paddingLeft) + Number.parseFloat(style.paddingRight)\n mirror.style.width = String(Math.max(0, input.clientWidth - (Number.isFinite(paddingX) ? paddingX : 0))) + 'px'\n // The caller only comes here for a collapsed selection: start and end are one spot.\n const caretAt = input.selectionEnd\n const marker = document.createElement('span')\n mirror.textContent = input.value.slice(0, caretAt)\n // An empty back half (the caret at the very end) needs a zero-width space\n // for the empty line after a trailing newline to have a line box at all.\n marker.textContent = input.value.slice(caretAt) || '\\u200b'\n mirror.appendChild(marker)\n probeHome.appendChild(mirror)\n const mirrorRect = mirror.getBoundingClientRect()\n let spot = marker.getClientRects()[0]\n let edge = spot === undefined ? undefined : spot.left\n const before = mirror.firstChild\n if (endKeyed && spot !== undefined && before instanceof Text && caretAt > 0 && input.value[caretAt - 1] !== '\\n') {\n const previous = document.createRange()\n previous.setStart(before, caretAt - 1)\n previous.setEnd(before, caretAt)\n const rects = previous.getClientRects()\n const last = rects[rects.length - 1]\n // Only a previous character on a higher line means a soft wrap.\n if (last !== undefined && last.top < spot.top - 1) {\n spot = last\n edge = last.right\n }\n }\n mirror.remove()\n if (spot === undefined || edge === undefined) return null\n // The mirror has no border and the textarea's padding, so these differences\n // are the caret's place inside the textarea's padding box; the textarea's\n // own scroll is subtracted.\n const inputRect = input.getBoundingClientRect()\n return {\n left: inputRect.left + input.clientLeft + (edge - mirrorRect.left) - input.scrollLeft,\n top: inputRect.top + input.clientTop + (spot.top - mirrorRect.top) - input.scrollTop,\n height: spot.height,\n }\n}\n\n/**\n * Clip a viewport box to the part of the textarea that shows.\n *\n * The drawn caret does not live inside the textarea, so the textarea's own\n * clipping does not reach it: when the caret scrolls out of view the native\n * one disappears and this one has to disappear as well.\n *\n * @returns the clipped box, or null when nothing of it is left.\n */\nexport function caretClipToField(input: Element, box: CaretBox): CaretBox | null {\n const inputRect = input.getBoundingClientRect()\n const clipTop = inputRect.top + input.clientTop\n const clipBottom = clipTop + input.clientHeight\n const top = Math.max(box.top, clipTop)\n const bottom = Math.min(box.top + box.height, clipBottom)\n if (bottom - top < 1) return null\n return { left: box.left, top, height: bottom - top }\n}\n", "import { CARET_ATTR, CARET_HOST_ATTR, CARET_LAYER_ATTR, CARET_MOTION_MOVE, CARET_MOTION_OFF, CARET_VISIBLE_ATTR, QUIET_ATTR } from '../../constants'\nimport { subscribeMutations } from '../../core/bus'\nimport { requestFrame } from '../../core/frame'\nimport { readPrefs, subscribePrefs } from '../../core/prefs'\nimport { caretClipToField, caretMeasurePlain, caretMeasureRich } from './caret-measure'\nimport type { CaretBox } from './caret-measure'\nimport { COMPOSER_INPUT_SELECTOR, COMPOSER_TEXTAREA_SELECTOR } from '@dsh-claude-style/contracts/dom'\nimport type { HostContext } from '../../core/host'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './caret.manifest'\n\n/**\n * The composer caret's motion, ported from dsh-chat-ux: the browser's own\n * caret is pressed down and one is drawn in its place, so moving it can\n * carry a transition.\n *\n * The browser's caret has no animatable property beyond its colour and its\n * blink, so a transition has only one road: make it transparent and draw\n * one. Two surfaces under the composer seat are taken over — the\n * contenteditable input (measured through the collapsed Range the browser\n * keeps, caret-measure.ts) and a textarea inside the seat, such as a\n * question card's answer box or a queued message's inline editor (measured\n * through a hidden mirror, caret-measure.ts).\n *\n * What the mode means (the settings page's three-way choice):\n *\n * typing every move transitions, which is the default;\n * move only explicit moves (an arrow key, a click) transition — a\n * keystroke lands instantly, told apart by the frame's input;\n * off nothing is taken over at all: no drawn caret, no mark, the\n * browser's own caret throughout. That road is also the fallback,\n * because the one way this effect really hurts a reader is a\n * caret that cannot be seen.\n *\n * Two more rules, both measured in a real Chromium: the first frame the\n * drawn caret appears writes its place with no transition (otherwise it\n * slides in from wherever it last was), and a measurement that fails hands\n * the native caret back rather than leaving the surface with none.\n */\n/** The blink animation, by name; the stylesheet's keyframes carry the same name by hand. */\nexport const CARET_BLINK_NAME = 'dsh-claude-caret-blink'\n/** The drawn caret's colour, on the element itself: read off the native caret when taking over. */\nexport const CARET_COLOR_PROPERTY = '--dsh-claude-caret-color'\n/** How long after a focus change to look again: a session switch leaves a few frames between the focus and a selection that is ready. */\nexport const CARET_FOCUS_SETTLE_MS = 120\n\n/** One surface's drawn state: the drawn caret, whether it shows, and the container it sits in (marked when the skin made it a positioning context). */\ninterface CaretLayer {\n caret: HTMLDivElement\n visible: boolean\n host: HTMLElement\n markedHost: boolean\n}\n\n/**\n * Whether an element is an editable surface this takes over, and which kind.\n * @param element - usually whatever holds the focus right now.\n * @returns 'rich' for the composer input, 'plain' for a textarea in the\n * composer seat, null for anything else.\n */\nexport function caretSurfaceOf(element: Element) {\n if (element.matches(COMPOSER_INPUT_SELECTOR)) return 'rich'\n if (element instanceof HTMLTextAreaElement && element.matches(COMPOSER_TEXTAREA_SELECTOR)) {\n return element.disabled || element.readOnly ? null : 'plain'\n }\n return null\n}\n\n/**\n * Draw the caret in place of the browser's own, for the whole page.\n *\n * @param read - reads the mode in force now; it is read on every frame's\n * sync, so changing it at runtime needs no reinstall.\n * @returns { resync, dispose }: resync queues a sync for the next frame,\n * dispose takes every listener, drawn caret and mark away.\n */\nexport function createCaretMotion(read: () => string) {\n /** One drawn state per editable surface; only one surface holds the focus at a time, so this usually holds one. */\n const layers = new Map<HTMLElement, CaretLayer>()\n /** A sync is already queued for the next frame. */\n let queued = false\n /** Cancels the frame queued; null when there is none, so dispose can cancel it. */\n let cancelFrame: (() => void) | null = null\n /**\n * Cancels the one-off frame that gives the transition back after an\n * instant landing; null when there is none, so dispose can cancel it too —\n * an untracked frame here would outlive the teardown and write into a\n * released layer.\n */\n let cancelTransitionFrame: (() => void) | null = null\n /**\n * After dispose, nothing acts.\n *\n * A frame callback and the two timers behind syncAfterFocusChange can\n * still be in flight; letting them run would rebuild the drawn caret and\n * re-attach the observer after the native caret's mark is gone — leaving\n * a reader with neither.\n */\n let disposed = false\n /** Input arrived in this frame; the move mode tells typing from an explicit move with it. */\n let typed = false\n /**\n * The last move was the End key.\n *\n * One offset at a soft wrap has two places: the previous line's end and\n * the next line's start. A textarea does not say which side it means, and\n * Chromium draws at the line's end after End and at its start otherwise —\n * so this is remembered.\n */\n let endKeyed = false\n /**\n * Where the measuring probes are built. It is marked quiet (QUIET_ATTR),\n * so the shared scheduler never reads a measurement as a change (D40); the\n * probes are built and removed inside it, in the same call.\n */\n const probeHome = document.createElement('div')\n probeHome.setAttribute(QUIET_ATTR, '')\n document.body.appendChild(probeHome)\n\n const queue = () => {\n if (disposed || queued) return\n queued = true\n // Measuring builds probes and reads them, then draws: write phase (D40).\n cancelFrame = requestFrame({\n write() {\n cancelFrame = null\n queued = false\n if (disposed) return\n const typing = typed\n typed = false\n sync(typing)\n },\n })\n }\n\n const markTyped = () => {\n typed = true\n endKeyed = false\n }\n\n /** Note whether this move was End (with Shift it selects, and there is no caret to draw). */\n const noteKey = (event: KeyboardEvent) => {\n if (event.key === 'Shift' || event.key === 'Control' || event.key === 'Meta' || event.key === 'Alt') return\n endKeyed = event.key === 'End' && !event.shiftKey\n }\n\n /** Where a pointer lands is the browser's decision, so the last End's leaning no longer stands. */\n const clearEndKey = () => {\n endKeyed = false\n }\n\n /**\n * A plain surface scrolled on its own: the drawn caret is not inside it and\n * does not come along, so it is measured again. scroll does not bubble,\n * hence the capture listener; every scroll on the page passes here and only\n * a surface already taken over is acted on.\n */\n const followPlainScroll = (event: Event) => {\n const target = event.target\n if (!(target instanceof HTMLTextAreaElement) || !layers.has(target)) return\n queue()\n }\n\n /**\n * An editable surface's content, editability or identity changed.\n *\n * selectionchange does not cover those silent changes: clearing a draft\n * need not move the selection and the browser fires nothing at all; on a\n * session switch the editor is still binding and contenteditable goes\n * false for a moment, the browser takes the focus away, and its return is\n * another event that never comes. The plain surface does not ride this:\n * its content is not in the DOM.\n */\n const onContentChange = () => {\n if (read() === CARET_MOTION_OFF) return\n queue()\n }\n /** The rich surfaces watched, each with what stops watching it. */\n const watchedSurfaces = new Map<HTMLElement, () => void>()\n\n /**\n * Watch a rich surface. Watching the same one twice is idempotent; a\n * surface that has left the page is let go here.\n */\n const observeComposer = (input: HTMLElement) => {\n for (const [surface, stop] of watchedSurfaces) {\n if (surface.isConnected) continue\n stop()\n watchedSurfaces.delete(surface)\n }\n if (watchedSurfaces.has(input)) return\n watchedSurfaces.set(input, subscribeMutations(input, {\n childList: true,\n subtree: true,\n characterData: true,\n attributeFilter: ['contenteditable', 'data-composer-input'],\n }, onContentChange))\n }\n\n /** The focus is on this surface and no caret has been drawn yet: the gap a session switch leaves. */\n const needsTakeover = () => {\n const active = document.activeElement\n if (!(active instanceof HTMLElement) || caretSurfaceOf(active) === null) return false\n return !active.hasAttribute(CARET_ATTR)\n }\n\n /**\n * Look again after a focus change.\n *\n * A session switch leaves a few frames between the focus leaving the old\n * surface and landing on the new one, with no event in between: the\n * browser moves the selection silently, and focusin does not even always\n * arrive (the new element may exist before the editor binds). Both\n * directions are listened for, since either can be the last word. Only a\n * surface not taken over yet is looked at again — an already drawn caret\n * is left alone, or its blink would restart.\n */\n const syncAfterFocusChange = () => {\n queue()\n window.setTimeout(() => {\n if (needsTakeover()) queue()\n }, CARET_FOCUS_SETTLE_MS)\n }\n\n const hide = (layer: CaretLayer) => {\n layer.caret.removeAttribute(CARET_VISIBLE_ATTR)\n layer.visible = false\n }\n\n /** Take a surface's drawn state away whole: the caret, the mark, and any positioning context lent to its parent. */\n const release = (input: HTMLElement, layer: CaretLayer) => {\n layer.caret.remove()\n input.removeAttribute(CARET_ATTR)\n if (layer.markedHost) layer.host.removeAttribute(CARET_HOST_ATTR)\n }\n\n /** This surface's drawn caret; one is built when there is none. */\n const layerFor = (input: HTMLElement) => {\n const host = input.parentElement\n if (host === null) return null\n const known = layers.get(input)\n if (known !== undefined && known.host === host) {\n // A React re-render takes the caret away with it: put it back and let\n // it land afresh.\n if (known.caret.isConnected) return known\n host.appendChild(known.caret)\n known.visible = false\n return known\n }\n // The parent changed: the old state goes whole and is rebuilt on the new parent.\n if (known !== undefined) {\n release(input, known)\n layers.delete(input)\n }\n // The drawn caret is placed against the container's padding box, so the\n // container has to be a positioning context. When it is not, a mark is\n // written and the stylesheet turns it relative — a question card's field\n // and a queued row are both like that. A display: contents container has\n // no box of its own, and marking it would do nothing: better to leave the\n // native caret alone.\n const hostStyle = getComputedStyle(host)\n if (hostStyle.display === 'contents') return null\n const markedHost = hostStyle.position === 'static'\n if (markedHost) host.setAttribute(CARET_HOST_ATTR, '')\n const caret = document.createElement('div')\n caret.setAttribute(CARET_LAYER_ATTR, '')\n // The scheduler reads the insertion of a marked node as no change (D40).\n caret.setAttribute(QUIET_ATTR, '')\n host.appendChild(caret)\n if (input.isContentEditable) observeComposer(input)\n const layer = { caret, visible: false, host, markedHost }\n layers.set(input, layer)\n return layer\n }\n\n /**\n * Read the native caret's colour at the moment of taking over, so the drawn\n * one can be painted with it.\n *\n * It is only readable while the mark is not written yet; afterwards the\n * computed value is transparent. An auto colour follows the text colour.\n */\n const adoptCaretColor = (input: HTMLElement, layer: CaretLayer) => {\n const style = getComputedStyle(input)\n // A transparent computed colour means the native caret is already pressed\n // down — another plugin's caret took this surface over first. Copying that\n // would draw nothing at all, so the text colour stands in; it is also what\n // an auto colour means.\n const color = style.caretColor === 'auto' || style.caretColor === 'rgba(0, 0, 0, 0)' ? style.color : style.caretColor\n layer.caret.style.setProperty(CARET_COLOR_PROPERTY, color)\n }\n\n /**\n * Put the drawn caret on this viewport box.\n * @param paused - no transition on this frame: it just appeared, or the\n * move mode is landing a keystroke.\n */\n const drawCaret = (layer: CaretLayer, box: CaretBox, paused: boolean) => {\n // Absolute positioning goes by the container's padding box and follows\n // its own scroll: the border comes off the difference and the scrolled\n // distance goes back on.\n const hostRect = layer.host.getBoundingClientRect()\n // Snapped to whole pixels. The native caret sits on the pixel grid, and a\n // box landing on a fraction gets antialiased into a grey fringe that reads\n // as a different caret. The cost is up to half a pixel, which is invisible.\n const left = Math.round(box.left - hostRect.left - layer.host.clientLeft + layer.host.scrollLeft)\n const top = Math.round(box.top - hostRect.top - layer.host.clientTop + layer.host.scrollTop)\n\n // The frame that lands without a transition has to arrive instantly; the\n // transition comes back on the next one.\n const fresh = !layer.visible\n const instant = fresh || paused\n if (instant) layer.caret.style.transitionProperty = 'none'\n layer.caret.style.transform = 'translate(' + left + 'px, ' + top + 'px)'\n layer.caret.style.height = box.height + 'px'\n if (instant) {\n if (cancelTransitionFrame !== null) cancelTransitionFrame()\n cancelTransitionFrame = requestFrame({\n write() {\n cancelTransitionFrame = null\n if (disposed) return\n layer.caret.style.transitionProperty = ''\n },\n })\n }\n if (fresh) {\n layer.visible = true\n layer.caret.setAttribute(CARET_VISIBLE_ATTR, '')\n }\n // Every move restarts the blink: caught on the dark half of the cycle, a\n // reader would think the caret did not keep up. Only the blink is\n // restarted — getAnimations() also holds the travel transition this very\n // method drives, and pulling that back would make steady typing arrive\n // one grid step at a time.\n for (const animation of layer.caret.getAnimations()) {\n if (animation instanceof CSSAnimation && animation.animationName === CARET_BLINK_NAME) animation.currentTime = 0\n }\n }\n\n /**\n * Whose caret this frame's is.\n * @param typing - input arrived in this frame.\n */\n const sync = (typing: boolean) => {\n const mode = read()\n // off is absolute: the drawn caret and the mark go away together and the\n // native caret comes back. Keeping them only leaves the reader with none.\n if (mode === CARET_MOTION_OFF) {\n for (const [input, layer] of layers) release(input, layer)\n layers.clear()\n return\n }\n const selection = document.getSelection()\n const active = document.activeElement\n const kind = active instanceof HTMLElement ? caretSurfaceOf(active) : null\n // A rich surface holding the focus is watched even before it is editable:\n // contenteditable goes false for a moment on a session switch, and\n // watching the attribute is the only way to catch its return.\n if (kind === 'rich' && active instanceof HTMLElement) observeComposer(active)\n // A caret only exists on the editable surface holding the focus: the hero\n // input has none, and with several sessions only one holds it. A selection\n // (a candidate word during composition included) has no caret.\n let target: HTMLElement | null = null\n let range: Range | null = null\n if (kind === 'rich' && active instanceof HTMLElement && active.isContentEditable\n && selection !== null && selection.isCollapsed && selection.rangeCount > 0) {\n const candidate = selection.getRangeAt(0)\n if (active.contains(candidate.startContainer)) {\n target = active\n range = candidate\n }\n }\n if (kind === 'plain' && active instanceof HTMLTextAreaElement && active.selectionStart === active.selectionEnd) {\n target = active\n }\n for (const [input, layer] of layers) {\n // A session switch replaces the whole input area, and answering a\n // question card or saving a queued row unmounts one whole; the caret\n // that came along goes with it.\n if (!input.isConnected) {\n release(input, layer)\n layers.delete(input)\n continue\n }\n if (input === target) continue\n // The caret is not this surface's, or there is none: hide the drawn one\n // and give the native caret back. The mark only stands while a drawn\n // caret really exists, so taking it away is safe at any other time.\n hide(layer)\n input.removeAttribute(CARET_ATTR)\n }\n if (target === null) return\n const layer = layerFor(target)\n if (layer === null) return\n const measured = target instanceof HTMLTextAreaElement\n ? caretMeasurePlain(target, endKeyed, probeHome)\n : range === null ? null : caretMeasureRich(target, range, probeHome)\n // The mark is written only after a caret was really drawn. A measurement\n // that fails gives the native caret back: a transparent native caret\n // beside no drawn one is the one failure that really hurts a reader, so\n // every failed measurement returns to the start rather than holding on.\n if (measured === null) {\n target.removeAttribute(CARET_ATTR)\n hide(layer)\n return\n }\n if (!target.hasAttribute(CARET_ATTR)) adoptCaretColor(target, layer)\n // A plain surface's own scrolled-away part is not drawn. That is not a\n // failed measurement — the native caret is invisible there too — so the\n // mark still stands.\n const box = target instanceof HTMLTextAreaElement ? caretClipToField(target, measured) : measured\n if (box === null) hide(layer)\n else drawCaret(layer, box, mode === CARET_MOTION_MOVE && typing)\n target.setAttribute(CARET_ATTR, '')\n }\n\n document.addEventListener('selectionchange', queue)\n document.addEventListener('focusin', syncAfterFocusChange)\n document.addEventListener('focusout', syncAfterFocusChange)\n // What the move mode reads: it arrives before selectionchange, so whether\n // this frame's move is typing is read rather than guessed from position.\n document.addEventListener('beforeinput', markTyped)\n // Which side of a soft wrap is meant: whether the last move was End.\n document.addEventListener('keydown', noteKey, true)\n document.addEventListener('pointerdown', clearEndKey, true)\n document.addEventListener('scroll', followPlainScroll, { capture: true, passive: true })\n window.addEventListener('resize', queue)\n // The shipped faces arrive after the first frame and wrap differently, so the caret is measured again.\n document.fonts.addEventListener('loadingdone', queue)\n\n return {\n resync: queue,\n dispose: () => {\n disposed = true\n if (cancelFrame !== null) cancelFrame()\n cancelFrame = null\n if (cancelTransitionFrame !== null) cancelTransitionFrame()\n cancelTransitionFrame = null\n document.removeEventListener('selectionchange', queue)\n document.removeEventListener('focusin', syncAfterFocusChange)\n document.removeEventListener('focusout', syncAfterFocusChange)\n document.removeEventListener('beforeinput', markTyped)\n document.removeEventListener('keydown', noteKey, true)\n document.removeEventListener('pointerdown', clearEndKey, true)\n document.removeEventListener('scroll', followPlainScroll, true)\n window.removeEventListener('resize', queue)\n document.fonts.removeEventListener('loadingdone', queue)\n for (const stop of watchedSurfaces.values()) stop()\n watchedSurfaces.clear()\n for (const [input, layer] of layers) release(input, layer)\n layers.clear()\n probeHome.remove()\n },\n }\n}\n\n/**\n * Install the caret motion and keep it in step with the preference.\n *\n * @param ctx - client context.\n * @param ui - shared handle table.\n * @returns teardown.\n */\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n // dsh-chat-ux draws its own caret on the same surfaces, and two drawn\n // carets blink out of phase: the entry keeps this uninstalled while that\n // plugin is on the page (the manifest).\n const motion = createCaretMotion(() => readPrefs().caretMotion)\n const stopPrefs = subscribePrefs(() => motion.resync())\n return () => {\n stopPrefs()\n motion.dispose()\n }\n}\n", "import { WINDOWS_TITLEBAR_ATTRIBUTE } from '@dsh-claude-style/contracts/dom'\nimport { createStamp } from '../../shared/dom'\nimport { createSlidingPill } from '../../shared/sliding-pill'\nimport type { HostContext } from '../../core/host'\nimport type { FeatureUi } from '../../core/feature'\nimport type manifest from './view-tabs.manifest'\n\n/**\n * The conversation view-tab strip's vertical placement — measured, not guessed.\n *\n * The strip's own row sits below the header's title row, and that title row\n * ALSO carries the header actions (the background-task chip, the workspace /\n * preset picker, the overflow menu, the panel toggle). Whether the strip can\n * rise onto the title's line therefore depends on the window: centred, it fits\n * beside a short title on a wide header and collides with the actions on a\n * narrow one. A fixed offset cannot be right in both cases — this was learned\n * the hard way, with -38px landing the strip on top of the task chip.\n *\n * So the skin measures the boxes and writes ONE custom property,\n * `--dsh-view-tabs-shift`, which the stylesheet turns into the translate. The\n * stylesheet keeps the fallback (its own row); this only lifts the strip when\n * the room above is real — the title and the actions both clear it, and the\n * header's top inset still holds.\n *\n * Windows titlebar mode is the one case where no measurement is needed: the\n * desktop shell marks <html> with `data-windows-titlebar` and the strip is\n * placed fixed in the titlebar row, centred (view-tabs.css). This mirrors that\n * marker onto <body> so the stylesheet can switch, and skips the measured\n * shift entirely there.\n *\n * macOS keeps the measured path. Its shell hands the top of the window to\n * the traffic lights and pads no content around them: the host sets\n * `--dsh-frame-top-clearance: 48px` under `html[data-platform=darwin]` and\n * leaves `--dsh-frame-chrome-top` at 0, so the conversation header keeps its\n * own top inset and draws its first row inside that strip. A fixed strip\n * would land on the title and the header actions; the measured shift already\n * seats it on the row beneath the strip.\n *\n * The strip itself is stamped `data-dsh-view-tabs`, and every strip rule in\n * view-tabs.css keys on that attribute. Finding the strip is a query this pass\n * runs once; as a stylesheet selector (`header:has(tabs) tabs`) it would make\n * the browser re-match the whole document on every DOM change.\n *\n * The strip's active pill slides between tabs (packages/client/src/shared/sliding-pill.ts).\n *\n * @param ctx - client context.\n * @param ui - shared handle table.\n * @returns teardown.\n */\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n const HEADER = '[class*=\"_header\"]:has([class*=\"_tabs\"])'\n /**\n * The title's TEXT, not its row or cluster: `.titleRow` is a flex row and the\n * cluster takes up the slack, so testing against them reported a clash on\n * every window and the strip never lifted. The crumb is the content-sized\n * element that actually draws the words.\n */\n const TITLE = '[class*=\"crumbCurrent\"], [class*=\"_crumb\"], [class*=\"titleCluster\"]'\n const ACTIONS = '[class*=\"headerActions\"], [class*=\"headerUtilities\"]'\n /** The stylesheet's fallback: the strip's own row, 10px up from y=50. */\n const FALLBACK = -10\n /** The header's own top inset; the lifted strip may not enter it. */\n const TOP_INSET = 8\n /** Breathing room between the lifted strip and whatever shares the line. */\n const CLEARANCE = 6\n let last: number | null = null\n /** The element last was written to: a re-rendered strip must be told again. */\n let lastEl: HTMLElement | null = null\n /** The body marker the stylesheet reads for the fixed titlebar placement. */\n const TITLEBAR_ATTR = 'data-dsh-titlebar-tabs'\n /** Whether the last pass saw the host's Windows titlebar marker. */\n let titlebar = false\n /** The strip mark every strip rule in view-tabs.css keys on. */\n const stripStamp = createStamp('data-dsh-view-tabs')\n const pill = createSlidingPill('[aria-selected=\"true\"]')\n\n /**\n * Mirror the host's Windows titlebar marker onto <body>, the way D9 moves\n * structure-sensitive branches from CSS to a JS-written attribute. The\n * observer's attributeFilter is aria-* only, so this write cannot feed\n * itself another pass; value-change only, so an unchanged mode writes\n * nothing.\n */\n function syncTitlebar() {\n const next = document.documentElement.hasAttribute(WINDOWS_TITLEBAR_ATTRIBUTE)\n if (next === titlebar) return\n titlebar = next\n if (next) document.body.setAttribute(TITLEBAR_ATTR, '')\n else document.body.removeAttribute(TITLEBAR_ATTR)\n }\n\n function rect(el: Element | null | undefined) {\n if (el === null || el === undefined) return null\n const box = el.getBoundingClientRect()\n if (box.width === 0 && box.height === 0) return null\n return box\n }\n\n /** The boxes the strip would share the title's line with. */\n function neighbours(header: Element) {\n const out: DOMRect[] = []\n const title = titleBoxOf(header)\n const actions = rect(header.querySelector(ACTIONS))\n if (title !== null) out.push(title)\n if (actions !== null) out.push(actions)\n return out\n }\n\n /**\n * The title's box. `querySelector` on the selector list returns the first\n * match in DOCUMENT order, which is the wrapper (`.titleCluster` contains\n * the crumb) — and the wrapper stretches, so the strip never lifted. Take\n * the narrowest match instead: that is the element drawing the words.\n */\n function titleBoxOf(header: Element) {\n const all = header.querySelectorAll(TITLE)\n let best: DOMRect | null = null\n for (let i = 0; i < all.length; i++) {\n const box = rect(all[i])\n if (box === null) continue\n if (best === null || box.width <= best.width) best = box\n }\n return best\n }\n\n function sync() {\n syncTitlebar()\n const header = document.querySelector(HEADER)\n const strip = header === null ? null : header.querySelector<HTMLElement>('[class*=\"_tabs\"]')\n stripStamp.mark(strip)\n pill.sync(strip)\n if (header === null || strip === null) return\n // Windows titlebar mode places the strip itself (view-tabs.css): it is\n // fixed there, so neither the measured shift nor the fallback applies.\n if (titlebar) return\n const stripBox = rect(strip)\n if (stripBox === null) return\n const headerBox = rect(header)\n if (headerBox === null) return\n // The strip's own layout position, with the shift we may already have\n // applied taken back out: rect.top moves with the transform.\n let applied = parseFloat(strip.style.getPropertyValue('--dsh-view-tabs-shift'))\n if (!isFinite(applied)) applied = FALLBACK\n const naturalTop = stripBox.top - applied\n const titleBox = titleBoxOf(header)\n let shift = FALLBACK\n if (titleBox !== null) {\n let want = titleBox.top + titleBox.height / 2 - naturalTop - stripBox.height / 2\n // Room above: the lifted strip stays under the header's top inset.\n const top = naturalTop + want\n if (top < headerBox.top + TOP_INSET) want = headerBox.top + TOP_INSET - naturalTop\n // Room sideways: centred, it must clear the title and the actions.\n const left = stripBox.left\n const right = stripBox.right\n let clash = false\n const others = neighbours(header)\n for (let i = 0; i < others.length; i++) {\n const box = others[i]\n if (box === null) continue\n if (right > box.left - CLEARANCE && left < box.right + CLEARANCE) clash = true\n }\n if (!clash) shift = Math.round(want)\n }\n if (shift === last && strip === lastEl) return\n last = shift\n lastEl = strip\n strip.style.setProperty('--dsh-view-tabs-shift', `${shift}px`)\n }\n\n ui.viewTabs = { sync }\n\n return () => {\n if (titlebar) {\n document.body.removeAttribute(TITLEBAR_ATTR)\n titlebar = false\n }\n const header = document.querySelector(HEADER)\n const strip = header === null ? null : header.querySelector<HTMLElement>('[class*=\"_tabs\"]')\n if (strip !== null) strip.style.removeProperty('--dsh-view-tabs-shift')\n pill.release()\n stripStamp.release()\n last = null\n lastEl = null\n delete ui.viewTabs\n }\n}\n", "import {\n CONVERSATION_HEADER_SELECTOR,\n HEADER_CORNER_SELECTOR,\n HEADER_TITLE_ROW_SELECTOR,\n HEADER_TITLE_SELECTOR,\n HEADER_UTILITIES_SELECTOR,\n VIEW_TABS_STRIP_SELECTOR,\n WINDOWS_MENU_SELECTOR,\n} from '@dsh-claude-style/contracts/dom'\nimport { observeSize } from '../../core/bus'\nimport { desktopBand } from '../../core/desktop-band'\nimport { createStamp, setAttributeIfChanged } from '../../shared/dom'\nimport type { FeatureUi } from '../../core/feature'\nimport type { HostContext } from '../../core/host'\nimport type manifest from './header-band.manifest'\n\n/**\n * The conversation header's title row, lifted into the desktop caption row.\n *\n * The Windows shell hands the window's top 40px to a caption row and lets the\n * columns run up under it (D31), so that row is the one place a session title\n * can sit above everything else — the row the collapsed sidebar's own button\n * and the view-tab strip (view-tabs.css) already use. Everything lifted here\n * belongs to the host, so nothing is moved between parents: each piece is\n * stamped and placed with `position: fixed`, and the row it leaves reflows on\n * its own — the title cluster keeps the preset picker, which closes up to the\n * row's left edge (D52).\n *\n * Both placements are measured, never assumed: the caption buttons' reserve\n * comes from desktopBand (D28), the row's own inset from the title row, and\n * the strip's box from wherever view-tabs put it. A side whose room is too\n * small stays in the row, which is the stylesheets' base rule — a placement\n * that does not fit writes nothing, so the fallback needs no restoring. The\n * title and the controls are decided apart, because a window wide enough for\n * one of them is often too narrow for the other, and either cluster may be\n * missing (the corner seat is empty while the right sidebar is open, whose own\n * chrome carries those controls) without the other losing its place.\n *\n * The row the title leaves rises: with the words gone it holds only controls,\n * and the inset the host gives a row that also carried a title would leave\n * them floating a title's height below the caption row.\n *\n * macOS is left alone: its shell pads no content and the header already draws\n * its first line inside the traffic-light strip, so there is nothing to lift.\n *\n * The marks: `data-dsh-header-band` on <body> carries which parts left the row\n * (`title`, `actions`, or both) and header-band.css keys every rule on it; the\n * three element stamps keep the stylesheet free of host class names.\n *\n * @param ctx - client context.\n * @param ui - shared handle table.\n * @returns teardown.\n */\nexport function install(ctx: HostContext, ui: FeatureUi<typeof manifest>) {\n /** The body marker: which parts of the row the caption row holds, as a token list. */\n const BAND_ATTR = 'data-dsh-header-band'\n /** The title's stamp, and the numbers its rule reads. */\n const TITLE_ATTR = 'data-dsh-header-title'\n const TITLE_LEFT = '--dsh-header-band-left'\n const TITLE_MAX = '--dsh-header-band-max'\n const TITLE_TOP = '--dsh-header-band-title-top'\n /**\n * How far below the caption row's middle the title sits: its text draws 20px\n * in a 28px box, so a box centred on the row leaves the line reading high\n * against the controls beside it.\n */\n const TITLE_NUDGE = 2\n /**\n * The row's own stamp and the negative top margin its rule reads: with the\n * title gone the row holds only the controls, and the host's top inset for a\n * row that also carried a title leaves it too low.\n */\n const ROW_ATTR = 'data-dsh-header-row'\n const ROW_LIFT = '--dsh-header-band-row-lift'\n /** The two control clusters' stamps, and the right offset both rules read. */\n const ACTIONS_ATTR = 'data-dsh-header-actions'\n const CORNER_ATTR = 'data-dsh-header-corner'\n const ACTIONS_RIGHT = '--dsh-header-band-right'\n /**\n * The view-tab strip's own stamp and the centre its rule reads: view-tabs\n * places the strip at the window's centre, which stops reading as the middle\n * of the row once the title and the controls stand on either side of it.\n */\n const TABS_ATTR = 'data-dsh-header-band-tabs'\n const TABS_LEFT = '--dsh-header-band-tabs-left'\n /** The two tokens the body marker carries. */\n const TITLE_TOKEN = 'title'\n const ACTIONS_TOKEN = 'actions'\n /** The air between anything placed here and its neighbour. */\n const GAP = 8\n /**\n * How far the row the title left tucks into the title's own box. The title\n * draws 20px of text in a 28px box (ink ending 5px above the box), and a\n * chip's text starts about 7px below the row's top, so this is what leaves\n * about 10px of air between the two lines of text.\n */\n const ROW_TUCK = 2\n /** What the row keeps clear when the shell mounts no menu seat: the sidebar's own control. */\n const FURNITURE = 48\n /** Below this a lifted title would be a stub: it stays in the row instead. */\n const MIN_TITLE = 120\n\n const rowStamp = createStamp<HTMLElement>(ROW_ATTR)\n const titleStamp = createStamp<HTMLElement>(TITLE_ATTR)\n const actionsStamp = createStamp<HTMLElement>(ACTIONS_ATTR)\n const cornerStamp = createStamp<HTMLElement>(CORNER_ATTR)\n const tabsStamp = createStamp<HTMLElement>(TABS_ATTR)\n /** The row whose size the pass follows. */\n let watched: HTMLElement | null = null\n /** Stops watching it. */\n let stopSize: (() => void) | null = null\n\n /**\n * The header's title row: the one carrying a title or the utilities. The\n * bare substring also names rows inside the sidebar's panels, and a pass\n * that took one of those would lift nothing all session.\n */\n function titleRow() {\n for (const row of document.querySelectorAll<HTMLElement>(HEADER_TITLE_ROW_SELECTOR)) {\n if (row.querySelector(HEADER_TITLE_SELECTOR) !== null) return row\n if (row.querySelector(HEADER_UTILITIES_SELECTOR) !== null) return row\n }\n return null\n }\n\n function rect(element: Element | null) {\n if (element === null) return null\n const box = element.getBoundingClientRect()\n return box.width === 0 && box.height === 0 ? null : box\n }\n\n /** Write one placement number, and nothing when it is already the one there. */\n function setVar(element: HTMLElement, name: string, value: string) {\n if (element.style.getPropertyValue(name) !== value) element.style.setProperty(name, value)\n }\n\n /** Hand the row back: no placement, no marks. */\n function clear() {\n rowStamp.release()\n titleStamp.release()\n actionsStamp.release()\n cornerStamp.release()\n tabsStamp.release()\n document.body.removeAttribute(BAND_ATTR)\n }\n\n /**\n * Follow the row's own box. The sidebar's collapse is an animation of the\n * column's width with no mutation under it, and a placement written once\n * would trail the column the whole way; a resize report asks for a pass in\n * the same frame, and the pass writes the same numbers, so it stops there.\n */\n function watch(row: HTMLElement | null) {\n if (row === watched) return\n if (stopSize !== null) stopSize()\n stopSize = null\n watched = row\n if (row !== null) stopSize = observeSize(row, () => { ui.schedule?.() })\n }\n\n function sync() {\n const band = desktopBand()\n const row = band === null || band.platform !== 'win32' ? null : titleRow()\n if (band === null || band.platform !== 'win32' || row === null) {\n watch(null)\n clear()\n return\n }\n watch(row)\n const rowBox = rect(row)\n if (rowBox === null) {\n clear()\n return\n }\n const header = row.closest(CONVERSATION_HEADER_SELECTOR)\n const title = row.querySelector<HTMLElement>(HEADER_TITLE_SELECTOR)\n const utilities = row.querySelector<HTMLElement>(HEADER_UTILITIES_SELECTOR)\n const corner = row.querySelector<HTMLElement>(HEADER_CORNER_SELECTOR)\n // Only a strip the view-tabs feature has already lifted shares the caption\n // row; one still drawn in the header's own row takes nothing from it. Its\n // room is read off the width rather than the box: view-tabs centres it on\n // the window, this pass then moves it, and a fit decided against the moved\n // box would answer differently on the next pass.\n const stripEl = header === null ? null : header.querySelector<HTMLElement>(VIEW_TABS_STRIP_SELECTOR)\n const stripBox = rect(stripEl)\n const inBand = stripBox !== null && stripBox.top < band.height\n const stripWidth = stripBox === null || !inBand ? 0 : stripBox.width\n const stripRight = stripWidth === 0 ? 0 : document.documentElement.clientWidth / 2 + stripWidth / 2\n // The shell's own menu seat takes the row's left end, and the collapsed\n // sidebar's control sits left of it whether the seat is mounted or not.\n const menuBox = rect(document.querySelector(WINDOWS_MENU_SELECTOR))\n const furniture = menuBox === null ? FURNITURE : Math.max(FURNITURE, menuBox.right)\n // Either cluster can be missing: the corner seat is empty while the right\n // sidebar is open, whose own chrome carries those controls. The cluster\n // that is there still belongs in the caption row, and a missing one leaves\n // no air behind.\n const utilitiesBox = rect(utilities)\n const cornerBox = rect(corner)\n const utilitiesWidth = utilitiesBox === null ? 0 : utilitiesBox.width\n const cornerWidth = cornerBox === null ? 0 : cornerBox.width\n const clusterWidth = utilitiesWidth + cornerWidth + (utilitiesBox === null || cornerBox === null ? 0 : GAP)\n // The caption buttons' reserve, and the air this skin keeps off it. The\n // width is the one fixed boxes are placed in: the document's client width\n // leaves out a page scrollbar, which `innerWidth` counts.\n const edge = document.documentElement.clientWidth - band.controls.size - GAP\n const cornerRight = band.controls.size + GAP\n // The controls hang off the right edge, so whether they fit does not\n // depend on the title; the title then takes what is left of the row's\n // left end, up to the first thing in its way.\n const liftActions = clusterWidth > 0 &&\n edge - clusterWidth >= Math.max(furniture, stripRight) + GAP\n const left = Math.max(rowBox.left, furniture + GAP)\n // Where the row's right-hand content ends: the controls when they are lifted,\n // the caption buttons when they stayed in the row.\n const rightStop = liftActions ? edge - clusterWidth : document.documentElement.clientWidth - band.controls.size\n // The title's room runs up to that end, less the strip's own width and the\n // air on both sides of it: the strip is centred in what is left between the\n // two, so its width is reserved here rather than read off a position it is\n // about to leave.\n const room = rightStop - GAP - (inBand ? stripWidth + GAP : 0) - left\n const titleBox = rect(title)\n const liftTitle = title !== null && room >= MIN_TITLE\n // The row the title leaves holds only controls, and the host's inset for a\n // row that still carried a title would leave them floating below the caption\n // row. It rides up to tuck ROW_TUCK px into the title's own box, which the\n // stylesheet centres in the caption row — the target is computed rather than\n // read, because the title's box is not there yet on the pass that lifts it\n // and nothing would wake a second pass. Where the offset already applied is\n // taken back out, or the pass would read the raised row as needing no rise.\n const titleHeight = titleBox === null ? 0 : titleBox.height\n const titleCentre = band.height / 2 + TITLE_NUDGE\n const applied = parseFloat(row.style.getPropertyValue(ROW_LIFT))\n const rise = !liftTitle ? 0 : Math.max(0, Math.round(rowBox.top - (isFinite(applied) ? applied : 0) - (titleCentre + titleHeight / 2 - ROW_TUCK)))\n\n rowStamp.mark(liftTitle ? row : null)\n if (liftTitle) setVar(row, ROW_LIFT, `${-rise}px`)\n titleStamp.mark(liftTitle ? title : null)\n if (liftTitle && title !== null) {\n setVar(title, TITLE_LEFT, `${Math.round(left)}px`)\n setVar(title, TITLE_MAX, `${Math.round(room)}px`)\n setVar(title, TITLE_TOP, `${Math.round(titleCentre)}px`)\n }\n actionsStamp.mark(liftActions && utilitiesBox !== null ? utilities : null)\n cornerStamp.mark(liftActions && cornerBox !== null ? corner : null)\n if (liftActions) {\n const utilitiesRight = cornerRight + (cornerBox === null ? 0 : cornerWidth + GAP)\n if (utilities !== null && utilitiesBox !== null) setVar(utilities, ACTIONS_RIGHT, `${Math.round(utilitiesRight)}px`)\n if (corner !== null && cornerBox !== null) setVar(corner, ACTIONS_RIGHT, `${Math.round(cornerRight)}px`)\n }\n // view-tabs centres the strip on the window; with the title and the controls\n // standing on either side of it that stops reading as the middle of the row,\n // so it takes the middle of what is left between them — or between the\n // shell's own left end and the caption buttons when a side stayed in the row.\n const stripInBand = inBand && stripEl !== null\n if (stripInBand && stripEl !== null) {\n const leftStop = liftTitle && titleBox !== null ? left + titleBox.width : furniture\n setVar(stripEl, TABS_LEFT, `${Math.round((leftStop + rightStop) / 2)}px`)\n }\n tabsStamp.mark(stripInBand ? stripEl : null)\n\n const tokens = `${liftTitle ? TITLE_TOKEN : ''} ${liftActions ? ACTIONS_TOKEN : ''}`.trim()\n if (tokens === '') document.body.removeAttribute(BAND_ATTR)\n else setAttributeIfChanged(document.body, BAND_ATTR, tokens)\n }\n\n ui.headerBand = { sync }\n\n return () => {\n const row = rowStamp.current()\n const title = titleStamp.current()\n const utilities = actionsStamp.current()\n const corner = cornerStamp.current()\n const strip = tabsStamp.current()\n if (row !== null) row.style.removeProperty(ROW_LIFT)\n if (title !== null) {\n title.style.removeProperty(TITLE_LEFT)\n title.style.removeProperty(TITLE_MAX)\n title.style.removeProperty(TITLE_TOP)\n }\n if (utilities !== null) utilities.style.removeProperty(ACTIONS_RIGHT)\n if (corner !== null) corner.style.removeProperty(ACTIONS_RIGHT)\n if (strip !== null) strip.style.removeProperty(TABS_LEFT)\n clear()\n watch(null)\n delete ui.headerBand\n }\n}\n", "import { install as install0 } from \"./features/selection/selection.ts\"\nimport { install as install1 } from \"./features/composer/composer.ts\"\nimport { install as install2 } from \"./features/home/home-layout.ts\"\nimport { install as install4 } from \"./features/copy/copy.ts\"\nimport { install as install5 } from \"./features/permissions/permissions.ts\"\nimport { install as install7 } from \"./features/peakrate/peakrate.ts\"\nimport { install as install8 } from \"./features/model/model-picker.ts\"\nimport { install as install9 } from \"./features/effort/effort-picker.ts\"\nimport { install as install10 } from \"./features/hero-menu/hero-menu.ts\"\nimport { install as install11 } from \"./features/settings/quick-providers.ts\"\nimport { install as install12 } from \"./features/account/account-footer.ts\"\nimport { install as install14 } from \"./features/theme-flip/theme-flip.ts\"\nimport { install as install15 } from \"./features/workspace/workspace-view.ts\"\nimport { install as install18 } from \"./features/chat-follow/chat-follow.ts\"\nimport { install as install19 } from \"./features/chat-fold/chat-fold.ts\"\nimport { install as install20 } from \"./features/chat-wait/chat-wait.ts\"\nimport { install as install21 } from \"./features/chat-reveal/chat-reveal.ts\"\nimport { install as install22 } from \"./features/chat-files/chat-files.ts\"\nimport { install as install24 } from \"./features/caret/caret.ts\"\nimport { install as install25 } from \"./features/view-tabs/view-tabs.ts\"\nimport { install as install26 } from \"./features/header-band/header-band.ts\"\nexport const FEATURES = [\n { ...{\"id\":\"selection\",\"order\":10,\"ungated\":\"修宿主失焦时的选区颜色,不改变功能\"}, install: install0 },\n { ...{\"id\":\"composer\",\"order\":20,\"pref\":\"composerScope\"}, install: install1 },\n { ...{\"id\":\"homeLayout\",\"order\":30,\"pref\":\"homeLayout\"}, install: install2 },\n { ...{\"id\":\"mascot\",\"order\":40,\"pref\":\"mascot\",\"chunk\":\"/dsh-claude-style/assets/968fcbfc3e22.js\"} },\n { ...{\"id\":\"copy\",\"order\":50,\"ungated\":\"提示语跟随输入框改造的范围,问候语跟随首页版面\"}, install: install4 },\n { ...{\"id\":\"permissions\",\"order\":60,\"pref\":\"permissionsControl\",\"switchRow\":{\"tab\":\"composer\",\"rank\":50,\"title\":{\"key\":\"permissionsTitle\",\"fallback\":\"Redraw the permission control\"},\"desc\":{\"key\":\"permissionsDesc\",\"fallback\":\"Replace the composer's permission menu with a segmented control. Off restores the host's permission menu.\"}}}, install: install5 },\n { ...{\"id\":\"contextStats\",\"order\":70,\"pref\":\"statsPosition\",\"prefValues\":[\"inline\",\"context\"],\"switchRow\":{\"tab\":\"conversation\",\"rank\":35,\"title\":{\"key\":\"statsPositionTitle\",\"fallback\":\"Conversation statistics position\"},\"desc\":{\"key\":\"statsPositionDesc\",\"fallback\":\"Choose where the conversation statistics show.\"},\"choices\":[{\"value\":\"inline\",\"label\":{\"key\":\"statsPositionInline\",\"fallback\":\"On its own line\"}},{\"value\":\"context\",\"label\":{\"key\":\"statsPositionContext\",\"fallback\":\"Inside the context popover\"}}]},\"chunk\":\"/dsh-claude-style/assets/e1291f79b7c9.js\"} },\n { ...{\"id\":\"peakrate\",\"order\":75,\"pref\":\"peakrate\"}, install: install7 },\n { ...{\"id\":\"model\",\"order\":80,\"pref\":\"modelPicker\",\"switchRow\":{\"tab\":\"composer\",\"rank\":30,\"title\":{\"key\":\"pickerTitle\",\"fallback\":\"Redraw the model picker\"},\"desc\":{\"key\":\"pickerDesc\",\"fallback\":\"Replace the composer's model menu with the two-level Claude-style menu. Off restores the host's model menu.\"}}}, install: install8 },\n { ...{\"id\":\"effort\",\"order\":90,\"pref\":\"modelPicker\"}, install: install9 },\n { ...{\"id\":\"heroMenu\",\"order\":100,\"ungated\":\"跟随输入框改造的首页范围\"}, install: install10 },\n { ...{\"id\":\"quickProviders\",\"order\":110,\"ungated\":\"模型选择器的设置项,不在界面上出现\"}, install: install11 },\n { ...{\"id\":\"footer\",\"order\":120,\"pref\":\"collapseFooter\",\"switchRow\":{\"tab\":\"sidebar\",\"rank\":10,\"title\":{\"key\":\"collapseTitle\",\"fallback\":\"Collapse the sidebar settings area\"},\"desc\":{\"key\":\"collapseDesc\",\"fallback\":\"Fold the sidebar footer's settings entry into the account popover. Off restores the host's footer.\"}}}, install: install12 },\n { ...{\"id\":\"ban\",\"order\":130,\"ungated\":\"彩蛋页只在点击账号行时出现\",\"chunk\":\"/dsh-claude-style/assets/5e05b29d5005.js\"} },\n { ...{\"id\":\"themeFlip\",\"order\":140,\"ungated\":\"修主题切换瞬间的颜色跳变,不改变功能\"}, install: install14 },\n { ...{\"id\":\"workspace\",\"order\":150,\"pref\":\"workspaceView\",\"switchRow\":{\"tab\":\"sidebar\",\"rank\":30,\"title\":{\"key\":\"workspaceTitle\",\"fallback\":\"In progress / Archived view\"},\"desc\":{\"key\":\"workspaceDesc\",\"fallback\":\"Split the sidebar's workspace section into In progress and Archived; archived conversations can be restored or deleted. Off restores the host's workspace list.\"}}}, install: install15 },\n { ...{\"id\":\"search\",\"order\":160,\"pref\":\"sidebarSearch\",\"switchRow\":{\"tab\":\"sidebar\",\"rank\":20,\"title\":{\"key\":\"searchTitle\",\"fallback\":\"Sidebar search\"},\"desc\":{\"key\":\"searchDesc\",\"fallback\":\"A search box in the sidebar that finds sessions, projects, plugins, Skills and shortcuts. Off restores the host's brand row.\"}},\"chunk\":\"/dsh-claude-style/assets/5063c46824b6.js\"} },\n { ...{\"id\":\"turnNav\",\"order\":180,\"pref\":\"turnNav\",\"switchRow\":{\"tab\":\"conversation\",\"rank\":20,\"title\":{\"key\":\"turnNavTitle\",\"fallback\":\"Conversation navigator\"},\"desc\":{\"key\":\"turnNavDesc\",\"fallback\":\"Rest the pointer on the turn marks at the conversation's right edge and they open into a list of every turn, one line each with the message that started it; the wheel scrolls the list and a click jumps to that turn. Alt+↑ and Alt+↓ jump to the previous or the next turn, and the turn you land on is marked with a short line. Off restores the host's turn marks.\"}},\"chunk\":\"/dsh-claude-style/assets/ad2905345a69.js\"} },\n { ...{\"id\":\"chatFollow\",\"order\":190,\"pref\":\"chatAnimations\",\"yieldsTo\":\"dsh-chat-ux\",\"switchRow\":{\"tab\":\"conversation\",\"rank\":30,\"title\":{\"key\":\"chatAnimationsTitle\",\"fallback\":\"Chat-area animations\"},\"desc\":{\"key\":\"chatAnimationsDesc\",\"fallback\":\"The conversation area's motion: the follow, the automatic folding with its rolling door, the text fade, the file change rows, the send flight, the counted figures on each process group's header and the line saying what the model is doing. Off hands the conversation back to the host's own behaviour, the host's own words included. With Animation set to Reduced it all stands still.\"}}}, install: install18 },\n { ...{\"id\":\"chatFold\",\"order\":200,\"pref\":\"chatAnimations\",\"yieldsTo\":\"dsh-chat-ux\"}, install: install19 },\n { ...{\"id\":\"chatWait\",\"order\":205,\"pref\":\"chatAnimations\",\"yieldsTo\":\"dsh-chat-ux\"}, install: install20 },\n { ...{\"id\":\"chatReveal\",\"order\":210,\"pref\":\"chatAnimations\",\"yieldsTo\":\"dsh-chat-ux\"}, install: install21 },\n { ...{\"id\":\"chatFiles\",\"order\":220,\"pref\":\"chatAnimations\",\"yieldsTo\":\"dsh-chat-ux\"}, install: install22 },\n { ...{\"id\":\"chatSend\",\"order\":230,\"pref\":\"chatAnimations\",\"yieldsTo\":\"dsh-chat-ux\",\"chunk\":\"/dsh-claude-style/assets/31253ed42440.js\"} },\n { ...{\"id\":\"caret\",\"order\":240,\"pref\":\"caretMotion\",\"yieldsTo\":\"dsh-chat-ux\"}, install: install24 },\n { ...{\"id\":\"viewTabs\",\"order\":250,\"pref\":\"viewTabs\",\"switchRow\":{\"tab\":\"conversation\",\"rank\":50,\"title\":{\"key\":\"viewTabsTitle\",\"fallback\":\"Chat / Trajectory tabs\"},\"desc\":{\"key\":\"viewTabsDesc\",\"fallback\":\"Redraw the Chat / Trajectory tab strip at the top of the conversation, lifted onto the title's line when it fits. Off restores the host's tab strip.\"}}}, install: install25 },\n { ...{\"id\":\"headerBand\",\"order\":255,\"pref\":\"headerBand\",\"switchRow\":{\"tab\":\"conversation\",\"rank\":60,\"title\":{\"key\":\"headerBandTitle\",\"fallback\":\"Header in the title bar\"},\"desc\":{\"key\":\"headerBandDesc\",\"fallback\":\"Lift the conversation's title and its header controls into the desktop title bar when they fit, and let the rest of the title row close up to the left. Off leaves the header as the host draws it.\"}}}, install: install26 },\n { ...{\"id\":\"settings\",\"handle\":\"settingsNav\",\"order\":260,\"ungated\":\"设置页本身\",\"chunk\":\"/dsh-claude-style/assets/abf0547f08a4.js\"} },\n]\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;+kBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,WAAAE,KAAA,eAAAC,GAAAH,ICAA,IAAAI,GAAA,GAAAC,GAAAD,GAAA,wBAAAE,GAAA,sBAAAC,GAAA,uBAAAC,GAAA,yBAAAC,GAAA,qBAAAC,GAAA,qBAAAC,GAAA,wBAAAC,GAAA,gBAAAC,GAAA,kBAAAC,GAAA,kBAAAC,GAAA,eAAAC,GAAA,iBAAAC,GAAA,mBAAAC,GAAA,0BAAAC,GAAA,uBAAAC,GAAA,eAAAC,GAAA,oBAAAC,GAAA,qBAAAC,GAAA,kBAAAC,GAAA,sBAAAC,GAAA,qBAAAC,GAAA,wBAAAC,GAAA,uBAAAC,GAAA,wBAAAC,GAAA,qBAAAC,GAAA,mBAAAC,GAAA,qBAAAC,GAAA,qBAAAC,GAAA,sBAAAC,GAAA,kBAAAC,GAAA,yBAAAC,GAAA,oBAAAC,GAAA,uBAAAC,GAAA,mBAAAC,GAAA,mBAAAC,GAAA,oBAAAC,GAAA,0BAAAC,GAAA,qBAAAC,GAAA,gBAAAC,GAAA,sBAAAC,GAAA,iBAAAC,GAAA,eAAAC,GAAA,oBAAAC,GAAA,mBAAAC,GAAA,mBAAAC,GAAA,iBAAAC,GAAA,qBAAAC,GAAA,wBAAAC,GAAA,uBAAAC,GAAA,YAAAC,GAAA,gBAAAC,GAAA,iBAAAC,GAAA,gBAAAC,GAAA,iBAAAC,GAAA,eAAAC,GAAA,kBAAAC,GAAA,qBAAAC,GAAA,sBAAAC,GAAA,gBAAAC,GAAA,gBAAAC,GAAA,iBAAAC,GAAA,mBAAAC,GAAA,kBAAAC,GAAA,iBAAAC,GAAA,aAAAC,GAAA,iBAAAC,GAAA,mBA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,EAAImD,CAAW,CAAC,GAAGjC,EAAS,EAC1F,CAEAC,GAAerB,CAAG,EAIlBsD,GAAkBtD,CAAG,EAGjB,OAAOA,EAAI,QAAW,YAAYA,EAAI,OAAO,CAAC,aAAa,EAAG,IAAM,CAAEsD,GAAkBtD,CAAG,CAAE,CAAC,EAClGuD,GAAc,EACdC,GAAa,EACbC,GAAS,EAMTX,GAAWC,EAAK,EAEhBW,GAAmBT,EAAQ,EAC3B,IAAME,EAAOF,GAAS,OAAOvD,EAAM,EAC7B2D,EAAcJ,GAAS,IAAIZ,EAAU,EAe3C,GAVA9B,EAAeoD,GAAsB,IAAM,CAAC,CAAC,EAG7CnD,EAAgBoD,GAAuBC,GAAU,CAC3CA,IAAWlD,IACfA,EAAUkD,EACNA,EAAQhD,EAAQ,CAAC,UAAU,CAAC,EAC3B+B,EAAI,EACX,CAAC,EAEGjC,EAAS,CAKXyB,EAAea,GAAS,KAAKzD,GAAWA,EAAQ,KAAO,UAAU,CAAE,EACnEqB,EAAQ,CAAC,UAAU,CAAC,EACpB,MACF,CACA+B,EAAI,CACN",
|
|
6
|
-
"names": ["entry_exports", "__export", "apply", "__toCommonJS", "constants_exports", "__export", "ACCOUNT_ARMED_ATTR", "ACCOUNT_MENU_ATTR", "ACCOUNT_READY_ATTR", "AUTO_POPOVER_ACCOUNT", "AUTO_POPOVER_ALL", "AUTO_POPOVER_OFF", "AUTO_POPOVER_SCOPES", "BAN_LOCALES", "BAN_LOCALE_EN", "BAN_LOCALE_ZH", "BRAND_ATTR", "BRAND_CLAUDE", "BRAND_DEEPSEEK", "BRAND_DEEPSEEK_LEGACY", "BUNDLE_CONFIG_SLOT", "CARET_ATTR", "CARET_HOST_ATTR", "CARET_LAYER_ATTR", "CARET_MOTIONS", "CARET_MOTION_MOVE", "CARET_MOTION_OFF", "CARET_MOTION_TYPING", "CARET_VISIBLE_ATTR", "CHAT_ANIMATIONS_OFF", "CHAT_FLYING_ATTR", "CHAT_FOLD_ATTR", "CHAT_FOLLOW_ATTR", "CHAT_REVEAL_ATTR", "CHAT_ROLLING_ATTR", "COMPOSER_ATTR", "COMPOSER_HIDDEN_ATTR", "COMPOSER_SCOPES", "COMPOSER_SCOPE_ALL", "DOCK_LOOK_ATTR", "DOCK_LOOK_CARD", "DOCK_LOOK_FLUSH", "FEATURE_PREF_DEFAULTS", "FOLLOW_HOLD_ATTR", "FOOTER_ATTR", "FOREIGN_SHEET_TAG", "HANDOFF_ATTR", "HDSL_PATH", "HDSL_SKIN_PATH", "HERO_MENU_ATTR", "HOME_HERO_ATTR", "HOME_LAYOUTS", "HOME_LAYOUT_ATTR", "HOME_LAYOUT_CLASSIC", "HOME_LAYOUT_STUDIO", "MASCOTS", "MASCOT_ATTR", "MASCOT_BRAND", "MASCOT_CRAB", "MASCOT_DEEPY", "MASCOT_OFF", "MASCOT_SCOPES", "MASCOT_SCOPE_ALL", "MASCOT_SCOPE_HOME", "MOTION_ATTR", "MOTION_FULL", "MOTION_MODES", "MOTION_REDUCED", "MOTION_SYSTEM", "PACKAGE_NAME", "PALETTES", "PALETTE_ATTR", "PALETTE_CLAUDE", "PALETTE_HOST", "PEAKRATE_PATH", "PERMISSIONS_ATTR", "PREF_CHOICES", "PREF_DEFAULTS", "PROVIDER_ID_MAX", "QUICK_PROVIDERS_MAX", "QUIET_ATTR", "READER_HOLD_ATTR", "REPOSITORY_URL", "SEARCH_STYLES", "SEARCH_STYLE_ATTR", "SEARCH_STYLE_ICON", "SEARCH_STYLE_OVERLAY", "SEARCH_STYLE_STANDALONE", "SESSION_DELETE_PATH", "SESSION_SEARCH_PATH", "SESSION_STATS_ATTR", "SETTINGS_ENTRY_FALLBACK", "SETTINGS_SCROLLER_ATTR", "SETTINGS_SECTION_SLOT", "SIDEBAR_LAYOUTS", "SIDEBAR_LAYOUT_ATTR", "SIDEBAR_LAYOUT_COMPACT", "SIDEBAR_LAYOUT_RELAXED", "SKIN_STAMP_ATTR", "STATS_POSITIONS", "STATS_POSITION_ATTR", "STATS_POSITION_CONTEXT", "STATS_POSITION_INLINE", "STREAM_GLIDE_ATTR", "STYLE_ID", "STYLE_PLUGIN_CSS", "TYPEFACES", "TYPEFACE_ATTR", "TYPEFACE_CLAUDE", "TYPEFACE_HOST", "USAGE_PATH", "USERNAME_MAX", "USERNAME_PATH", "WINDOW_BLUR_ATTR", "PREFS_DEFAULT", "ROUTE_PREFIX", "USERNAME_PATH", "HDSL_PATH", "HDSL_SKIN_PATH", "SESSION_DELETE_PATH", "USAGE_PATH", "SESSION_SEARCH_PATH", "PEAKRATE_PATH", "STYLE_ID", "SETTINGS_ENTRY_FALLBACK", "PACKAGE_NAME", "STYLE_PLUGIN_CSS", "FOREIGN_SHEET_TAG", "BUNDLE_CONFIG_SLOT", "SETTINGS_SECTION_SLOT", "REPOSITORY_URL", "BRAND_CLAUDE", "BRAND_DEEPSEEK", "BRAND_DEEPSEEK_LEGACY", "BRAND_ATTR", "MOTION_SYSTEM", "MOTION_REDUCED", "MOTION_FULL", "MOTION_MODES", "MOTION_ATTR", "CARET_MOTION_OFF", "CARET_MOTION_MOVE", "CARET_MOTION_TYPING", "CARET_MOTIONS", "PALETTE_CLAUDE", "PALETTE_HOST", "PALETTES", "PALETTE_ATTR", "TYPEFACE_CLAUDE", "TYPEFACE_HOST", "TYPEFACES", "TYPEFACE_ATTR", "MASCOT_BRAND", "MASCOT_CRAB", "MASCOT_DEEPY", "MASCOT_OFF", "MASCOTS", "MASCOT_ATTR", "MASCOT_SCOPE_HOME", "MASCOT_SCOPE_ALL", "MASCOT_SCOPES", "SEARCH_STYLE_ICON", "SEARCH_STYLE_OVERLAY", "SEARCH_STYLE_STANDALONE", "SEARCH_STYLES", "SEARCH_STYLE_ATTR", "SIDEBAR_LAYOUT_RELAXED", "SIDEBAR_LAYOUT_COMPACT", "SIDEBAR_LAYOUTS", "SIDEBAR_LAYOUT_ATTR", "CHAT_ANIMATIONS_OFF", "STATS_POSITION_INLINE", "STATS_POSITION_CONTEXT", "STATS_POSITIONS", "STATS_POSITION_ATTR", "FEATURE_PREF_DEFAULTS", "CHAT_FOLLOW_ATTR", "STREAM_GLIDE_ATTR", "FOLLOW_HOLD_ATTR", "READER_HOLD_ATTR", "CHAT_REVEAL_ATTR", "CHAT_FLYING_ATTR", "QUIET_ATTR", "CHAT_ROLLING_ATTR", "CARET_ATTR", "CARET_LAYER_ATTR", "CARET_VISIBLE_ATTR", "CARET_HOST_ATTR", "CHAT_FOLD_ATTR", "FOOTER_ATTR", "BAN_LOCALE_EN", "BAN_LOCALE_ZH", "BAN_LOCALES", "COMPOSER_ATTR", "COMPOSER_HIDDEN_ATTR", "PERMISSIONS_ATTR", "SESSION_STATS_ATTR", "ACCOUNT_MENU_ATTR", "ACCOUNT_ARMED_ATTR", "ACCOUNT_READY_ATTR", "HERO_MENU_ATTR", "WINDOW_BLUR_ATTR", "HANDOFF_ATTR", "SKIN_STAMP_ATTR", "SETTINGS_SCROLLER_ATTR", "HOME_LAYOUT_ATTR", "HOME_HERO_ATTR", "DOCK_LOOK_CARD", "DOCK_LOOK_FLUSH", "DOCK_LOOK_ATTR", "HOME_LAYOUT_CLASSIC", "HOME_LAYOUT_STUDIO", "HOME_LAYOUTS", "COMPOSER_SCOPE_ALL", "COMPOSER_SCOPES", "AUTO_POPOVER_OFF", "AUTO_POPOVER_ACCOUNT", "AUTO_POPOVER_ALL", "AUTO_POPOVER_SCOPES", "PREF_DEFAULTS", "PREFS_DEFAULT", "PREF_CHOICES", "USERNAME_MAX", "QUICK_PROVIDERS_MAX", "PROVIDER_ID_MAX", "host_exports", "__export", "COMPOSER_STACK", "accountAvatar", "accountName", "closestComposerCard", "closestConversationSession", "conversationSessionId", "currentPreset", "currentSession", "currentSessionId", "findAccessTrigger", "findChatFlows", "findChatTarget", "findComposerCard", "findComposerCards", "findComposerInput", "findComposerPlaceholder", "findComposerPlaceholders", "findComposerSeat", "findComposerStats", "findConversationScroller", "findConversationSession", "findFootArea", "getUsername", "hostCtx", "loadHdsl", "loadUsername", "onHdslLoaded", "onUsernameLoaded", "outlineSeq", "readTurnActivity", "resolveAvatarUrl", "resolveDisplayName", "sessionOutline", "setAccountIdentity", "setHostContext", "turnForSeq", "dom_exports", "__export", "ACCOUNT_TRIGGER_SELECTOR", "ASSISTANT_STEP_KIND", "CHAIN_OVERLAY_FALLBACK_ATTRIBUTE", "CHAT_CALL_SELECTOR", "CHAT_FLOW_SELECTOR", "CHAT_GROUP_PART_ATTRIBUTE", "CHAT_GROUP_PART_REASONING", "CHAT_RUNNING_SELECTOR", "CHAT_RUNNING_TEXT_SELECTOR", "CHAT_TURN_ATTRIBUTE", "COMPOSER_CARD_SELECTOR", "COMPOSER_INPUT_SELECTOR", "COMPOSER_PLACEHOLDER_SELECTOR", "COMPOSER_SCROLL_SELECTOR", "COMPOSER_SELECTOR", "COMPOSER_STACK_SELECTOR", "COMPOSER_STATS_SELECTOR", "COMPOSER_STAT_SELECTOR", "COMPOSER_TEXTAREA_SELECTOR", "COMPOSER_VARIANT_ATTRIBUTE", "CONTEXT_METER_FILL_SELECTOR", "CONVERSATION_HEADER_SELECTOR", "CONVERSATION_SCROLL_SELECTOR", "CONVERSATION_SESSION_ATTRIBUTE", "CONVERSATION_SESSION_SELECTOR", "DARK_THEME_ATTRIBUTE", "DIALOG_TRIGGER_SELECTOR", "DISCLOSURE_ROW_SELECTOR", "EXPANDED_ATTRIBUTE", "FLOW_BLOCK_SELECTOR", "FLOW_KIND_ATTRIBUTE", "FOLD_SKIPPED_CONTROL_SELECTOR", "FOLD_TOGGLE_SELECTOR", "FOLLOWING_TAIL_ATTRIBUTE", "FOLLOWING_TAIL_SELECTOR", "FOLLOW_THRESHOLD_PX", "FOOTER_ACTIONS_SELECTOR", "FOOT_AREA_SELECTOR", "FOREGROUND_SELECTOR", "FRAME_TOP_CLEARANCE_PROPERTY", "FULLSCREEN_ATTRIBUTE", "HEADER_CORNER_SELECTOR", "HEADER_TITLE_ROW_SELECTOR", "HEADER_TITLE_SELECTOR", "HEADER_UTILITIES_SELECTOR", "MENU_LIST_SELECTOR", "MENU_ROLE_SELECTOR", "MOBILE_STATS_SELECTOR", "PEER_SHEET_SELECTOR", "PERMISSION_TRIGGER_SELECTOR", "PHASE_ATTRIBUTE", "PLATFORM_ATTRIBUTE", "PROCESS_ACTIVITY_SELECTOR", "PROCESS_BODY_SELECTOR", "PROCESS_CONTENT_SELECTOR", "PROCESS_EXPANDED_MODE_ATTRIBUTE", "PROCESS_GROUP_SELECTOR", "PROCESS_HEADER_LABEL_SELECTOR", "REASONING_TEXT_SELECTOR", "ROW_PHASE_ATTRIBUTE", "RUNNING_STATE", "SETTINGS_BUTTON_SELECTOR", "SHIMMER_ATTRIBUTE", "SHIMMER_LEGACY_ATTRIBUTE", "SHIMMER_SELECTOR", "SIDEBAR_SEARCH_SLOT_SELECTOR", "SKIN_CENTER_ATTRIBUTE", "SLOT_ANCHOR_SELECTOR", "STREAMING_ATTRIBUTE", "STREAMING_SELECTOR", "SUBMISSION_ECHO_SELECTOR", "THINK_ROW_SELECTOR", "TOOL_CALL_KIND", "TURN_RAIL_CURRENT_SELECTOR", "TURN_RAIL_INSET", "TURN_RAIL_MARK_SELECTOR", "TURN_RAIL_PITCH", "TURN_RAIL_SCROLLER_SELECTOR", "TURN_RAIL_SELECTOR", "UNTAGGED_SHEET_SELECTOR", "USER_ROW_KIND", "VIEW_TABS_STRIP_SELECTOR", "WINDOWS_MENU_SELECTOR", "WINDOWS_TITLEBAR_ATTRIBUTE", "prefs_exports", "__export", "adoptPrefs", "adoptSettingsForm", "clearPrefsAttributes", "composerRestyleRetired", "disposePrefsBinding", "loadPrefs", "motionReduced", "normalizePrefs", "notifyEnvironmentChange", "prefs", "prefsAreReadOnly", "readPrefs", "refreshMotionAttribute", "resolveMascot", "retireComposerRestyle", "retireFooterTakeover", "savePrefs", "subscribePrefs", "MODEL_OFFICIAL_GROUP", "MODEL_COPY_ROUTE", "MODEL_FALLBACK_LABEL", "MODEL_LOADING_LABEL", "MODEL_EMPTY_LABEL", "MODEL_EFFORT_LABEL", "MODEL_EFFORT_DEFAULT", "MODEL_EFFORT_FASTER", "MODEL_EFFORT_SMARTER", "MODEL_MORE_LABEL", "MODEL_TRIGGER_LABEL", "notifyAll", "listeners", "args", "listener", "error", "bus_exports", "__export", "observeSize", "subscribeMutations", "mutationSubscriptions", "mutationObserver", "isQuietRecord", "record", "target", "QUIET_ATTR", "node", "pageWide", "selects", "subscription", "options", "filter", "routeRecords", "records", "selected", "error", "refreshMutationObserver", "pending", "merged", "into", "init", "subscribeMutations", "callback", "at", "early", "afterHost", "makeSizeObserver", "registry", "entries", "own", "entry", "observeSize", "targets", "element", "count", "externalOwnerActive", "SKIN_STAMP_ATTR", "subscribeExternalOwner", "listener", "last", "subscribeMutations", "next", "prefs", "normalizePrefs", "prefsListeners", "prefsForm", "prefsFormUnsubscribe", "prefsWatchOff", "prefsBinding", "remoteReadOffs", "prefsReadOnly", "settingsNamespaceCandidates", "ctx", "id", "PACKAGE_NAME", "SETTINGS_ENTRY_FALLBACK", "servedNamespace", "namespaces", "candidates", "candidate", "served", "entry", "hostConfigForms", "forms", "readFormValue", "snapshot", "bindServedForm", "match", "form", "loadPrefs", "watchNamespace", "mirror", "attempt", "followHostDocument", "fiber", "scope", "settings", "read", "answer", "adoptPrefs", "offs", "off", "adoptSettingsForm", "prefsAreReadOnly", "disposePrefsBinding", "footerTakeoverRetired", "composerRestyleRetired", "retireFooterTakeover", "FOOTER_ATTR", "retireComposerRestyle", "COMPOSER_ATTR", "readPrefs", "subscribePrefs", "listener", "index", "next", "externalOwnerActive", "BRAND_ATTR", "PALETTE_ATTR", "TYPEFACE_ATTR", "MASCOT_ATTR", "resolveMascot", "DOCK_LOOK_ATTR", "DOCK_LOOK_CARD", "DOCK_LOOK_FLUSH", "SEARCH_STYLE_ATTR", "SIDEBAR_LAYOUT_ATTR", "STATS_POSITION_ATTR", "writeMotionAttribute", "notifyAll", "clearPrefsAttributes", "name", "MOTION_ATTR", "systemPrefersReducedMotion", "mode", "reduced", "MOTION_REDUCED", "MOTION_FULL", "refreshMotionAttribute", "before", "notifyEnvironmentChange", "motionReduced", "resolved", "value", "moveLocalPrefs", "normalizeAutoPopover", "AUTO_POPOVER_ALL", "AUTO_POPOVER_OFF", "AUTO_POPOVER_SCOPES", "PREF_DEFAULTS", "normalizeQuickProviders", "out", "i", "QUICK_PROVIDERS_MAX", "PROVIDER_ID_MAX", "MODEL_OFFICIAL_GROUP", "normalizeBrand", "BRAND_DEEPSEEK", "BRAND_DEEPSEEK_LEGACY", "BRAND_CLAUDE", "current", "MASCOT_BRAND", "MASCOT_DEEPY", "MASCOT_CRAB", "normalizeChatAnimations", "CHAT_ANIMATIONS_OFF", "section", "key", "fallback", "choices", "PREF_CHOICES", "USERNAME_MAX", "LOCAL_PREF_KEYS", "localPrefsMoved", "formValue", "storageKey", "stored", "held", "unusable", "savePrefs", "saved", "patch", "step", "accepted", "pending", "ok", "run", "dom_exports", "__export", "buildElement", "closestFrom", "createStamp", "setAttributeIfChanged", "tag", "className", "text", "element", "name", "value", "node", "selector", "attr", "marked", "mark", "createHostResource", "route", "adopt", "requested", "listeners", "load", "response", "data", "value", "notifyAll", "onLoaded", "listener", "index", "reset", "findAccessTrigger", "PERMISSION_TRIGGER_SELECTOR", "findFootArea", "FOOT_AREA_SELECTOR", "COMPOSER_CARD", "COMPOSER_CARD_SELECTOR", "COMPOSER_PLACEHOLDER", "COMPOSER_PLACEHOLDER_SELECTOR", "findComposerCards", "findComposerCard", "closestComposerCard", "node", "variant", "closestFrom", "COMPOSER_VARIANT_ATTRIBUTE", "findComposerPlaceholders", "findComposerPlaceholder", "card", "findComposerStats", "bar", "COMPOSER_STATS_SELECTOR", "figure", "COMPOSER_STAT_SELECTOR", "findComposerInput", "scope", "COMPOSER_INPUT_SELECTOR", "findComposerSeat", "COMPOSER_SELECTOR", "findConversationScroller", "CONVERSATION_SCROLL_SELECTOR", "findChatFlows", "CHAT_FLOW_SELECTOR", "CONVERSATION_SESSION_ATTR", "CONVERSATION_SESSION_ATTRIBUTE", "CONVERSATION_SESSION", "findConversationSession", "CONVERSATION_SESSION_SELECTOR", "closestConversationSession", "conversationSessionId", "host", "id", "COMPOSER_STACK", "COMPOSER_STACK_SELECTOR", "currentSessionId", "ctx", "sessions", "value", "currentSession", "binding", "findChatTarget", "sessionId", "conversation", "readTurnActivity", "snapshot", "turn", "step", "assistant", "blocks", "calls", "i", "currentPreset", "session", "sessionOutline", "face", "turnForSeq", "outline", "seq", "found", "entry", "outlineSeq", "accountName", "accountAvatar", "setAccountIdentity", "name", "avatar", "usernameFromHost", "PROBED_USERNAME_KEY", "probedUsername", "readStoredProbeUsername", "storeProbeUsername", "usernameResource", "createHostResource", "USERNAME_PATH", "data", "USERNAME_MAX", "onUsernameLoaded", "listener", "loadUsername", "hdslContract", "hdslName", "hdslAvatar", "hdslResource", "HDSL_PATH", "onHdslLoaded", "loadHdsl", "resolveDisplayName", "custom", "readPrefs", "getUsername", "resolveAvatarUrl", "HDSL_SKIN_PATH", "hostCtx", "setHostContext", "model_copy_exports", "__export", "loadModelCopy", "modelCopy", "normalizeModelId", "onModelCopyLoaded", "modelCopy", "modelCopyResource", "createHostResource", "MODEL_COPY_ROUTE", "doc", "indexed", "indexModelCopy", "onModelCopyLoaded", "listener", "loadModelCopy", "table", "value", "brands", "index", "compile", "rules", "out", "i", "rule", "brandRules", "b", "brandRule", "normalizeModelId", "id", "frame_exports", "__export", "requestFrame", "queued", "live", "handle", "runFrame", "now", "tasks", "task", "error", "at", "reportFeatureFailure", "name", "error", "installScheduler", "ctx", "ui", "features", "scheduled", "cancelPass", "stopped", "handleOf", "dispatch", "hook", "args", "handle", "call", "onGlobalActivity", "onGlobalPointerDown", "e", "target", "onGlobalKeyDown", "onGlobalFocusIn", "closestFrom", "closestComposerCard", "onComposerInput", "onFixedPopoverViewportChange", "onCopyChange", "schedule", "localeService", "localeUnsubscribe", "prefsUnsubscribe", "subscribePrefs", "loadPrefs", "motionQuery", "onSystemMotionChange", "refreshMotionAttribute", "modelCopyUnsubscribe", "onModelCopyLoaded", "usernameUnsubscribe", "onUsernameLoaded", "hdslUnsubscribe", "onHdslLoaded", "observedCard", "stopCardSize", "onCardResize", "SYNC_FAILURE_LIMIT", "syncFailures", "runSync", "feature", "failures", "requestFrame", "currentCard", "findComposerCard", "observeSize", "stopMutations", "subscribeMutations", "clockTimer", "generated_exports", "__export", "BUILD_ID", "CLIENT_VERSION", "COMBINE_SVGS", "COMBINE_WORDS", "CRAB_SHEET_URLS", "DEEPY_SHEET_URLS", "STYLESHEET", "sheetGeneration", "parkForeignSheets", "untagged", "UNTAGGED_SHEET_SELECTOR", "el", "STYLE_ID", "FOREIGN_SHEET_TAG", "mountStylesheet", "generation", "sheet", "PACKAGE_NAME", "STYLE_PLUGIN_CSS", "STYLESHEET", "PEER_ENTRY_ID", "PEER_STYLE_ID", "peerEntrySeen", "peerEntryRead", "peerAnnounced", "peerListeners", "stopHeadWatch", "dshChatUxPresent", "entries", "entry", "peerPresent", "plugin", "checkPeerPresence", "parkForeignSheets", "present", "notifyAll", "notifyEnvironmentChange", "subscribePeerPresence", "listener", "subscribeMutations", "at", "desktop_band_exports", "__export", "desktopBand", "MAC_TRAFFIC_LIGHTS", "MAC_BAND_HEIGHT", "WIN_CAPTION_CONTROLS", "WIN_BAND_HEIGHT", "bandHeight", "fallback", "declared", "FRAME_TOP_CLEARANCE_PROPERTY", "desktopBand", "root", "WINDOWS_TITLEBAR_ATTRIBUTE", "overlay", "rect", "FULLSCREEN_ATTRIBUTE", "feature_exports", "__export", "handleName", "prefYielded", "setFeatureRegistry", "switchRowFeatures", "handleName", "feature", "registry", "setFeatureRegistry", "features", "switchRowFeatures", "tab", "prefYielded", "pref", "peerPresent", "i18n_exports", "__export", "activeLocale", "banCopy", "copyLabel", "localized", "settingsCopy", "activeLocale", "ctx", "active", "hostCtx", "modelCopy", "fillTemplate", "text", "params", "match", "name", "localized", "pair", "loc", "prefix", "prefixed", "fallback", "backstop", "fallbackPrefix", "fallbackPrefixed", "copyLabel", "key", "settingsCopy", "banCopy", "want", "readPrefs", "wanted", "permission_copy_exports", "__export", "PERMISSION_ACCESS_NAMESPACE", "PERMISSION_CURRENT_LABELS", "PERMISSION_HOST_LABEL_KEYS", "PERMISSION_HOST_LABEL_LOCALE", "PERMISSION_ORDER", "PERMISSION_PRESETS", "PERMISSION_SEGMENTS", "PERMISSION_SHIPPED_PRESETS", "SEGMENTS_CLASS", "SEGMENT_CLASS", "turn_nav_host_exports", "__export", "createTurnNavHost", "createTurnNavHost", "ctx", "rail", "sources", "items", "jumpGeneration", "cancelJumpFrame", "stopped", "findRail", "session", "findConversationSession", "closestConversationSession", "TURN_RAIL_SELECTOR", "railShown", "found", "railMarkCount", "scroller", "TURN_RAIL_SCROLLER_SELECTOR", "TURN_RAIL_INSET", "TURN_RAIL_PITCH", "currentIndex", "list", "mark", "TURN_RAIL_CURRENT_SELECTOR", "outlineValue", "sessionId", "sessionOutline", "loadedTurns", "target", "findChatTarget", "navigation", "turnItems", "outline", "loaded", "byTurn", "entry", "item", "outlined", "left", "right", "chatText", "locale", "jumpToTurn", "turn", "onPressed", "generation", "frames", "scrolled", "step", "conversationSessionId", "index", "TURN_RAIL_MARK_SELECTOR", "closestFrom", "CONVERSATION_SCROLL_SELECTOR", "before", "requestFrame", "format_exports", "__export", "formatCompactTokens", "formatHostDuration", "pad2", "textOf", "value", "ms", "total", "hours", "minutes", "seconds", "text", "count", "units", "u", "scaled", "popover_exports", "__export", "POPOVER_CHECK_SVG", "POPOVER_CLOSE_DELAY", "POPOVER_MARGIN", "POPOVER_OPEN_DELAY", "buildPopoverItem", "closeOtherPopovers", "createHoverIntent", "positionAnchoredPopover", "registerPopover", "removeStrayNodes", "resolveAnchoredPosition", "setMenuPopoverOpen", "unregisterPopover", "POPOVER_MARGIN", "resolveAnchoredPosition", "rect", "width", "height", "opts", "margin", "x", "y", "left", "top", "positionAnchoredPopover", "trigger", "pop", "leftValue", "topValue", "POPOVER_CHECK_SVG", "POPOVER_OPEN_DELAY", "POPOVER_CLOSE_DELAY", "createHoverIntent", "open", "close", "openDelay", "closeDelay", "openTimer", "closeTimer", "popoverRegistry", "registerPopover", "name", "i", "unregisterPopover", "closeOtherPopovers", "setMenuPopoverOpen", "card", "setAttributeIfChanged", "buildPopoverItem", "row", "buildElement", "icon", "text", "desc", "col", "badge", "check", "removeStrayNodes", "scope", "selector", "keep", "nodes", "scroll_owner_exports", "__export", "SCROLL_EASE_LEAD_PX", "easeScrollFor", "easeScrollToEndFor", "handBackFollow", "holdFollowButton", "holdReader", "joinScrollOwner", "readerHolds", "readerMovedSince", "releaseFollowButton", "releaseReader", "scrollPositionFor", "stopScrollFor", "submissionHolds", "takeBackHostPin", "writeScroll", "SCROLL_KEYS", "scroller", "conversationScroller", "CONVERSATION_SCROLL_SELECTOR", "column", "conversationColumn", "CHAT_FLOW_SELECTOR", "isScrollbarStrip", "container", "event", "target", "box", "findFollowTailButton", "root", "column", "conversationColumn", "isReaderScrollIntent", "event", "target", "COMPOSER_SELECTOR", "SCROLL_KEYS", "SCROLL_EASE_OMEGA", "SCROLL_EASE_MAX_SPEED_PX_S", "SCROLL_EASE_MAX_ACCEL_PX_S2", "SCROLL_EASE_LEAD_PX", "SCROLL_EASE_DONE_PX", "SCROLL_EASE_REST_PX_S", "SCROLL_EASE_STEP_S", "SCROLL_EASE_MOVED_PX", "SCROLL_EASE_MAX_FRAME_MS", "SCROLL_EASE_NOMINAL_FRAME_MS", "scrollEasing", "scrollEaseFrameQueued", "scrollEaseLastAt", "stepSpring", "position", "velocity", "target", "seconds", "spent", "step", "acceleration", "springArrived", "scrollEnd", "element", "easeScroll", "destination", "wanted", "lead", "active", "requestFrame", "stepScrollEase", "stopScrollEase", "isScrollEasing", "scrollEasePosition", "ease", "writeScrollEase", "value", "now", "interval", "floor", "motion", "written", "SCROLL_SOURCE_RANK", "FOLLOWING_SOURCES", "PROCESS_RELEASE_THRESHOLD_PX", "SUBMISSION_SELECTOR", "FLOW_KIND_ATTRIBUTE", "USER_ROW_KIND", "SUBMISSION_ECHO_SELECTOR", "SUBMISSION_HOLD_MS", "HOST_PIN_TOLERANCE_PX", "FOLLOW_LOOK_ROUNDS", "FOLLOW_LOOK_INTERVAL_MS", "INTENT_TYPES", "MOVING_INTENT_TYPES", "easeSources", "held", "heldTowardEnd", "heldCount", "lastMovingIntentAt", "submissionHoldUntil", "seen", "heldButton", "members", "stopSubmissionWatch", "setHeld", "container", "holding", "held", "heldCount", "READER_HOLD_ATTR", "heldTowardEnd", "runningSource", "isScrollEasing", "easeSources", "claim", "source", "claimConversation", "running", "SCROLL_SOURCE_RANK", "FOLLOWING_SOURCES", "readerHolds", "submissionHolds", "threshold", "PROCESS_BODY_SELECTOR", "PROCESS_RELEASE_THRESHOLD_PX", "FOLLOW_THRESHOLD_PX", "releaseReader", "holdReader", "readerMovedSince", "since", "lastMovingIntentAt", "submissionHoldUntil", "sessionElement", "sessionId", "conversationScroller", "CONVERSATION_SESSION_SELECTOR", "next", "CONVERSATION_SESSION_ATTRIBUTE", "noteIntent", "event", "isReaderScrollIntent", "moving", "MOVING_INTENT_TYPES", "towardEnd", "scroller", "target", "body", "isScrollbarStrip", "noteScroll", "CONVERSATION_SCROLL_SELECTOR", "noteSubmission", "records", "record", "node", "SUBMISSION_SELECTOR", "SUBMISSION_HOLD_MS", "noteBodyChanges", "joinScrollOwner", "type", "INTENT_TYPES", "subscribeMutations", "left", "releaseFollowButton", "writeScroll", "value", "stopScrollEase", "easeScrollFor", "destination", "wanted", "lead", "SCROLL_EASE_LEAD_PX", "motionReduced", "scrollEnd", "following", "easeScroll", "easeScrollToEndFor", "_element", "end", "stopScrollFor", "scrollPositionFor", "scrollEasePosition", "takeBackHostPin", "grew", "expected", "top", "HOST_PIN_TOLERANCE_PX", "holdFollowButton", "button", "findFollowTailButton", "STREAM_GLIDE_ATTR", "handBackFollow", "options", "stillWanted", "onSettled", "rounds", "look", "FOLLOW_LOOK_ROUNDS", "FOLLOW_LOOK_INTERVAL_MS", "sliding_pill_exports", "__export", "createSlidingPill", "createSlidingPill", "activeSelector", "PILL_ATTR", "control", "lastX", "lastW", "stopSize", "clear", "el", "place", "active", "box", "itemBox", "x", "w", "sync", "next", "observeSize", "release", "CHUNK_MODULES", "constants_exports", "bus_exports", "desktop_band_exports", "feature_exports", "frame_exports", "host_exports", "i18n_exports", "model_copy_exports", "prefs_exports", "permission_copy_exports", "turn_nav_host_exports", "dom_exports", "format_exports", "popover_exports", "scroll_owner_exports", "sliding_pill_exports", "generated_exports", "loads", "chunkRequire", "id", "CHUNK_MODULES", "fetchFactory", "url", "resolve", "reject", "script", "loadFeatureChunk", "known", "load", "factory", "install", "install", "body", "sync", "WINDOW_BLUR_ATTR", "install", "ctx", "ui", "hero", "active", "studioHome", "heroCard", "readState", "PHASE_ATTRIBUTE", "scope", "readPrefs", "composerRestyleRetired", "HOME_LAYOUT_STUDIO", "syncVariant", "cards", "value", "stacks", "card", "setAttributeIfChanged", "stack", "COMPOSER_STACK", "ATTACHMENT_RAIL", "ATTACHMENT_PRESENT", "ATTACHMENT_TILES", "ATTACHMENT_TILE_ATTR", "syncAttachments", "tiles", "tile", "marked", "CONTROL_ATTR", "syncControls", "commands", "button", "access", "findAccessTrigger", "DRAFT_EMPTY_ATTR", "syncDraftState", "findComposerPlaceholder", "composerDock", "dockedContextMeter", "dock", "trigger", "DIALOG_TRIGGER_SELECTOR", "node", "METER_ROW_OFFSET", "METER_ROW_HEIGHT", "MOBILE_STATS_LIFT", "MOBILE_STATS_ATTR", "mobileStatsLift", "meterRoom", "meterNode", "meterReading", "meterMeasuredActive", "meterWidth", "meterRow", "meterRowBox", "meterRowStack", "stopMeterRow", "stampMeterRow", "meter", "row", "STATS_POSITION_CONTEXT", "closestFrom", "liftDockLine", "observeSize", "stampContextMeter", "findComposerCards", "rowBox", "stackBox", "round", "offset", "height", "strip", "MOBILE_STATS_SELECTOR", "releaseMobileStats", "stripBox", "dockBox", "lift", "next", "host", "spacer", "meterPillWidth", "wrapper", "face", "room", "reading", "width", "written", "syncChatTabComposer", "root", "findComposerSeat", "list", "first", "chatActive", "COMPOSER_HIDDEN_ATTR", "syncComposer", "COMPOSER_ATTR", "focusEditorOnPress", "target", "closestComposerCard", "input", "followTranscript", "scroller", "findConversationScroller", "writeScroll", "reason", "marks", "mark", "React", "ReactDOM", "HOME_POLL_MS", "HOME_POLL_MAX", "HOME_HEAT_WEEKS", "HOME_HEAT_STEPS", "HOME_BOOKS", "HOME_CHART_DAYS", "HOME_MODEL_ROWS", "HOME_RANGES", "homeDayKey", "date", "pad2", "homeShortDateFormat", "activeLocale", "homeShortDate", "format", "day", "parts", "homeRangeStart", "windowDays", "start", "formatHomeCount", "count", "value", "formatHomeHour", "hour", "h12", "copyLabel", "homeDayTokens", "homeModelTokens", "entry", "createHomeUsage", "ctx", "usage", "listSummary", "listLoading", "listeners", "pollTimer", "disposed", "emit", "notifyAll", "subscribe", "listener", "index", "stopPolling", "loadUsage", "force", "USAGE_PATH", "response", "body", "summarizeSessionList", "rows", "tokens", "dayCount", "byDay", "byModel", "entries", "i", "row", "values", "meta", "bucket", "total", "at", "selection", "picked", "id", "cell", "favorite", "best", "models", "name", "left", "right", "days", "loadSessionSummary", "sessions", "result", "items", "homeHeatGrid", "byDate", "list", "today", "cells", "peak", "cursor", "key", "c", "homeModelList", "listed", "homeModelDays", "span", "columns", "homePanelData", "state", "range", "bookPick", "ready", "totals", "known", "r", "startMs", "inRange", "calls", "activeDays", "ids", "everyDayHasIds", "daySessions", "d", "s", "e", "item", "ld", "hourCounts", "hd", "hourDay", "dh", "peakHour", "bestHour", "hourSum", "h", "hourCount", "model", "bestSessions", "m", "windowed", "fun", "bookIndex", "book", "React", "createHomeModels", "share", "part", "whole", "axisMax", "peak", "magnitude", "scaled", "sides", "entry", "hasSplit", "RANK_LAST", "chart", "columns", "rankOf", "skeleton", "list", "c", "total", "models", "id", "top", "format", "homeShortDateFormat", "at", "formatCompactTokens", "column", "dayTotal", "stack", "rank", "left", "right", "homeShortDate", "slice", "index", "labelled", "ModelsView", "props", "data", "more", "expanded", "setExpanded", "copyLabel", "i", "shown", "HOME_MODEL_ROWS", "hidden", "parts", "formatHomeCount", "React", "createHomeOverview", "statCell", "key", "label", "text", "skeleton", "HOME_TIP_EDGE", "heatTip", "format", "cell", "copyLabel", "homeShortDate", "formatCompactTokens", "view", "data", "homeShortDateFormat", "columns", "formatHomeCount", "index", "tip", "column", "install", "ctx", "ui", "DOCK_SLOT", "layout", "PREF_DEFAULTS", "lastHero", "bookPick", "slotsFiber", "coldSeat", "usage", "createHomeUsage", "overview", "createHomeOverview", "models", "createHomeModels", "heroPhase", "PHASE_ATTRIBUTE", "writeHeroAttr", "hero", "studioHero", "HOME_LAYOUT_STUDIO", "HOME_HERO_ATTR", "setLayout", "next", "HOME_LAYOUT_ATTR", "useUsage", "bump", "count", "HomeUsagePanel", "state", "tabState", "tab", "setTab", "rangeState", "range", "setRange", "data", "homePanelData", "tabButton", "id", "label", "copyLabel", "HOME_RANGES", "item", "registerPanel", "scope", "slots", "unmountColdSeat", "syncColdSeat", "stack", "COMPOSER_STACK", "element", "buildElement", "root", "sync", "readPrefs", "WEEKDAY_NAMES", "HERO_GREETING_SLOTS", "HERO_GREETING_ANYTIME", "pickHeroGreeting", "username", "draw", "now", "hour", "clock", "lines", "slot", "pickStudioGreeting", "HERO_HINT", "DEFAULT_HINT", "install", "ctx", "ui", "HINT_SOURCES", "isShippedHint", "text", "j", "greetingDraw", "wasHero", "rewriteHeadline", "hero", "greeting", "readPrefs", "HOME_LAYOUT_STUDIO", "pickStudioGreeting", "getUsername", "pickHeroGreeting", "groups", "i", "spans", "span", "rewriteHint", "targetHint", "hints", "findComposerPlaceholders", "node", "syncAttachmentPlaceholder", "removeStrayNodes", "cards", "findComposerCards", "ci", "card", "input", "findComposerInput", "isEmpty", "placeholder", "findComposerPlaceholder", "grow", "curText", "install", "ctx", "ui", "segments", "segmentPill", "createSlidingPill", "permContainer", "permBtn", "permLabel", "permPopover", "permHoverIntent", "permPick", "PERM_POPOVER_PLACEMENT", "catalogOptions", "defaultPreset", "coldStartShown", "autoPresetError", "catalogFiber", "catalogChangedDisposer", "renderedRows", "renderedRowsFor", "renderedSegments", "catalogOption", "preset", "i", "option", "presetOffered", "PERMISSION_SHIPPED_PRESETS", "hostPresetLabel", "key", "PERMISSION_HOST_LABEL_KEYS", "activeLocale", "PERMISSION_HOST_LABEL_LOCALE", "locale", "text", "PERMISSION_ACCESS_NAMESPACE", "presetLabel", "hostName", "known", "PERMISSION_PRESETS", "current", "PERMISSION_CURRENT_LABELS", "restingLabel", "presetDesc", "offeredPresets", "offered", "ordered", "PERMISSION_ORDER", "resolvedSegments", "out", "PERMISSION_SEGMENTS", "slot", "j", "AUTO_PRESET_RETRY_MS", "autoPresetRetries", "autoPresetRead", "autoPresetRetry", "dropAutoPresetRead", "probeAutoPreset", "namespace", "read", "result", "startAutoPresetProbe", "scope", "remoteRoot", "buildSegments", "onPick", "specs", "group", "buildElement", "SEGMENTS_CLASS", "copyLabel", "spec", "item", "SEGMENT_CLASS", "event", "closestFrom", "permDocPointerListener", "permResizeListener", "closePermMenu", "setMenuPopoverOpen", "buildPermRow", "built", "buildPopoverItem", "e", "syncPermRows", "wanted", "signature", "registerPopover", "placeOpenPermCard", "positionAnchoredPopover", "buildPermTriggerAndPopover", "container", "btn", "label", "popover", "openPerm", "closeOtherPopovers", "createHoverIntent", "POPOVER_OPEN_DELAY", "POPOVER_CLOSE_DELAY", "readPrefs", "AUTO_POPOVER_ALL", "removeStrayNodes", "updatePermState", "matchedLabel", "items", "it", "isCurrent", "check", "setAttributeIfChanged", "submitError", "submitPreset", "session", "currentSession", "settled", "pick", "currentPreset", "syncSegments", "isHero", "composerOn", "existingPermContainers", "existingSegments", "ep", "es0", "trigger", "findAccessTrigger", "coldStart", "host", "COMPOSER_CARD_SELECTOR", "segmentSpecs", "segmentSignature", "s", "s2", "es", "allExisting", "adopted", "p", "res", "PERMISSIONS_ATTR", "unregisterPopover", "WEEKDAYS", "parseMinutes", "value", "match", "hour", "minute", "addDays", "date", "days", "year", "month", "day", "at", "pad", "clockFormatters", "formatter", "timeZone", "withWeekday", "key", "cached", "partMap", "out", "part", "momentAt", "schedule", "parts", "weekday", "wallClockAt", "instant", "spanOf", "window", "start", "end", "spansOf", "windows", "spans", "span", "left", "right", "zoneOffsetMs", "instantOf", "baseDate", "dayOffset", "minuteOfDay", "guess", "first", "second", "settled", "target", "wall", "low", "high", "middle", "holidayDateAt", "fallback", "zone", "isHoliday", "covers", "override", "overrideInForce", "moment", "previousDate", "previousWeekday", "activeOverride", "isPeak", "previousDayHoliday", "judgeAt", "holidayDate", "previousHoliday", "badgeFor", "profile", "period", "nextFlip", "now", "current", "points", "edges", "list", "base", "instants", "point", "bound", "nowMs", "previous", "wallAt", "judgement", "judged", "currentRate", "flip", "state", "forgetRates", "formatCountdown", "minutes", "total", "hours", "rest", "ICONS", "NAMES", "rateName", "period", "copyLabel", "rateText", "badge", "rateDetail", "state", "now", "countdown", "formatCountdown", "next", "buildRateBadge", "detail", "buildElement", "icon", "STALE_MS", "RETRY_MS", "profiles", "fetchedAt", "attemptedAt", "inFlight", "loaded", "generation", "epoch", "listeners", "announce", "listener", "adopt", "answer", "list", "accepted", "entry", "profile", "forgetRates", "call", "refresh", "startedAt", "PEAKRATE_PATH", "response", "stale", "now", "loadPeakRate", "adopted", "stopPeakRate", "peakProfiles", "peakRateGeneration", "subscribePeakRate", "PROVIDER_ALIASES", "MODEL_MAPPINGS", "FOLDED_MAPPINGS", "entry", "normalizeModelId", "matchProfile", "providerId", "modelId", "profiles", "providerName", "candidates", "profile", "folded", "mapping", "candidate", "install", "ctx", "ui", "unsubscribe", "subscribePeakRate", "state", "provider", "modelId", "profile", "matchProfile", "peakProfiles", "currentRate", "loadPeakRate", "judgement", "buildRateBadge", "peakRateGeneration", "stopPeakRate", "createModelCatalog", "options", "ctx", "schedule", "modelSub", "modelDir", "modelSessionId", "modelWarmRequested", "providerListeners", "currentModelSessionId", "sessions", "currentSessionId", "dropSubscription", "directory", "id", "dirs", "notifyProviders", "snapshot", "providers", "warm", "snap", "groups", "out", "i", "notifyAll", "pending", "current", "g", "group", "m", "effort", "active", "reasoning", "selection", "effective", "label", "MODEL_EFFORT_DEFAULT", "onProviders", "listener", "at", "reset", "resetWarm", "modelBrand", "modelId", "modelCopy", "id", "i", "modelCombine", "brand", "name", "COMBINE_SVGS", "word", "COMBINE_WORDS", "at", "buildModelLabel", "el", "buildElement", "text", "mark", "box", "head", "tail", "familyModelCopy", "groupId", "modelId", "modelCopy", "id", "textOf", "haystacks", "h", "i", "rule", "tierModelCopy", "modelDescription", "ctx", "model", "pair", "text", "localized", "MODEL_CHEVRON_SVG", "byModelId", "a", "b", "left", "right", "createModelRows", "options", "ctx", "pickModel", "subHoverIntent", "isSubOpen", "closeSub", "openSub", "rate", "buildProviderRule", "name", "rule", "buildElement", "buildModelRow", "group", "model", "selected", "withDescription", "onPick", "built", "buildPopoverItem", "item", "brand", "modelBrand", "copy", "buildModelLabel", "desc", "modelDescription", "meter", "POPOVER_CHECK_SVG", "e", "buildModelOption", "buildCurrentOption", "buildModelCell", "label", "cell", "chevron", "readPrefs", "AUTO_POPOVER_ALL", "levelOneSections", "groups", "sections", "chosen", "g0", "MODEL_OFFICIAL_GROUP", "g2", "g4", "remainingGroups", "shown", "i", "out", "g", "install", "ctx", "ui", "modelBtn", "modelPop", "modelSubPop", "modelBody", "modelFooter", "modelSubBody", "modelSlot", "MODEL_CLOSE_DELAY", "subFoldTimer", "modelHoverIntent", "createHoverIntent", "openModelPopover", "closeModelIfAway", "POPOVER_OPEN_DELAY", "modelSubHoverIntent", "openModelSub", "modelBodySig", "modelSubSig", "modelCatalog", "createModelCatalog", "modelRows", "createModelRows", "pickModel", "closeModelPopovers", "provider", "modelId", "peakrate", "cancelCloseModel", "scheduleCloseModel", "pointer", "pointerBound", "trackPointer", "event", "trackPointerWhileOpen", "wanted", "pointerInCardBox", "card", "box", "pointerInPicker", "setMenuPopoverOpen", "closeOtherPopovers", "dir", "pending", "renderModelBody", "positionModelPopovers", "renderModelSub", "pickEffort", "effort", "snap", "selection", "layoutModelFooter", "showMore", "stale", "child", "i", "buildElement", "copyLabel", "MODEL_MORE_LABEL", "rateSignature", "status", "groups", "current", "sig", "activeLocale", "readPrefs", "g", "MODEL_LOADING_LABEL", "sections", "MODEL_EMPTY_LABEL", "s", "section", "sectionLabel", "MODEL_OFFICIAL_GROUP", "sectionModels", "byModelId", "m", "selected", "currentListed", "c", "currentRuleName", "listed", "s0", "sig2", "rest", "g2", "group", "groupSection", "groupRow", "groupLabel", "groupModels", "pos", "positionAnchoredPopover", "w2", "h2", "h1", "x2", "POPOVER_MARGIN", "y2", "ensureModelChrome", "e", "closestFrom", "dropModelControl", "allHosts", "h", "removeStrayNodes", "syncModelControl", "loadModelCopy", "slot", "hostRoot", "AUTO_POPOVER_ALL", "groupsNow", "label", "MODEL_FALLBACK_LABEL", "labelEl", "unsettled", "staleEffortEl", "triggerAria", "MODEL_TRIGGER_LABEL", "setAttributeIfChanged", "registerPopover", "inFlight", "target", "unregisterPopover", "createEffortMatrix", "track", "matrix", "matrixSig", "cellUnit", "r", "c", "seed", "h", "cellFade", "fx", "t", "solveMatrix", "wDev", "dpr", "gap", "margin", "hDev", "block", "cols", "restX", "restY", "paintParticle", "sq", "motionReduced", "ensureMatrix", "w", "sig", "lay", "cell", "buildElement", "createEffortControl", "opts", "root", "buildElement", "head", "labelEl", "valueEl", "valueGhost", "ends", "fasterEl", "smarterEl", "track", "fill", "ticks", "matrix", "knob", "dotMatrix", "createEffortMatrix", "steps", "selected", "live", "pressed", "dragging", "held", "painted", "pointerId", "noneLabel", "apexOn", "ticksWidth", "pendingEcho", "pendingId", "pendingTimer", "PENDING_ECHO_MS", "state", "effort", "list", "index", "MODEL_EFFORT_DEFAULT", "i", "s", "copyLabel", "MODEL_EFFORT_LABEL", "MODEL_EFFORT_FASTER", "MODEL_EFFORT_SMARTER", "geometry", "size", "positionFor", "box", "lastTravel", "lastWidth", "place", "x", "animate", "px", "value", "width", "pointerTravel", "clientX", "raw", "DETENT", "dampTravel", "seg", "t", "nearest", "ratio", "paintApex", "at", "want", "paintTicks", "w", "dot", "restartAnimation", "el", "paintValue", "text", "previous", "paintAria", "labels", "setAttributeIfChanged", "clearPending", "commit", "releaseCapture", "settle", "moveQueued", "cancelPendingFrame", "applyPending", "onHeldRelease", "e", "onPointerDown", "pendingX", "pendingY", "onPointerMove", "requestFrame", "base", "next", "update", "changed", "moved", "install", "ctx", "ui", "effortBtn", "effortPop", "effortSlider", "lastEffort", "effortHoverIntent", "createHoverIntent", "openEffortPopover", "closeEffortPopover", "POPOVER_OPEN_DELAY", "POPOVER_CLOSE_DELAY", "effortInfo", "seatInFlight", "readEffort", "info", "seat", "modelTrigger", "releaseModelMargin", "modelBtn", "cancelCloseEffort", "setMenuPopoverOpen", "ensureEffortChrome", "closeOtherPopovers", "positionEffortPopover", "positionAnchoredPopover", "effortPlace", "positionEffortTrigger", "seatBox", "hideEffortTrigger", "labelEl", "label", "need", "marginChanged", "shifted", "left", "top", "effortControlElement", "createEffortControl", "levelId", "e", "under", "slot", "removeStrayNodes", "control", "syncEffortControl", "readPrefs", "AUTO_POPOVER_ALL", "aria", "copyLabel", "MODEL_EFFORT_LABEL", "setAttributeIfChanged", "ownsEffort", "target", "teardown", "unregisterPopover", "registerPopover", "reason", "install", "ctx", "ui", "TRIGGER_SELECTOR", "CARD_SELECTOR", "HERO_MENU_ATTR", "cardStamp", "createStamp", "stampedTrigger", "openedByHover", "hoverTrigger", "pointerTrigger", "pendingTrigger", "hoverIntent", "createHoverIntent", "trigger", "openFromHover", "closeFromHover", "POPOVER_OPEN_DELAY", "POPOVER_CLOSE_DELAY", "hoverEnabled", "closeSiblingHeroMenus", "closeOtherPopovers", "closeHeroMenu", "open", "openTriggers", "i", "readPrefs", "AUTO_POPOVER_ALL", "onHeroPointerOver", "e", "target", "closestFrom", "onHeroPointerOut", "next", "pickerKind", "clearStamp", "rowTriggers", "nodes", "found", "row", "card", "openTrigger", "placeCard", "rect", "width", "height", "x", "y", "resolveAnchoredPosition", "repositionHeroMenu", "syncHeroMenu", "cards", "MENU_ROLE_SELECTOR", "registerPopover", "unregisterPopover", "install", "ctx", "ui", "card", "cardBody", "anchor", "onWrite", "providers", "unsubscribe", "close", "onOutsidePointerDown", "onKeyDown", "e", "target", "buildRow", "provider", "chosen", "stale", "built", "buildPopoverItem", "row", "settingsCopy", "POPOVER_CHECK_SVG", "next", "readPrefs", "at", "renderBody", "buildElement", "known", "i", "MODEL_OFFICIAL_GROUP", "s", "open", "trigger", "write", "closeOtherPopovers", "setMenuPopoverOpen", "positionAnchoredPopover", "toggle", "list", "registerPopover", "handle", "reason", "unregisterPopover", "createFooterMirror", "options", "openBody", "body", "syncFooterActionVisibility", "footerActions", "entries", "footerEntriesOf", "i", "entry", "all", "j", "el", "role", "overlay", "markFooterHiddenBranches", "kids", "kid", "slotKids", "syncMirrorItem", "item", "iconEl", "text", "badge", "iconBox", "iconHtml", "textBox", "badgeBox", "removeActionMirror", "idx", "removeEmbedMirror", "embed", "entryIsActionLike", "trigger", "tag", "entryText", "textExcludingOverlays", "triggerText", "walker", "node", "p", "syncEmbedMirror", "forward", "built", "e", "activator", "resolveEmbedActivator", "clone", "overlays", "o", "stripped", "s", "html", "INTERACTIVE_SELECTOR", "clicked", "cloneRoot", "path", "parent", "original", "cloneNode", "nextClone", "nextOrig", "target", "hasOverlayAncestor", "findFooterTrigger", "selector", "found", "candidate", "insideOverlay", "sync", "footArea", "FOOTER_ACTIONS_SELECTOR", "footerEntries", "existingActionItems", "ea", "staleIdx", "f", "hasContent", "copyLabel", "buildPopoverItem", "live", "fa", "findFootArea", "actions", "liveEntry", "error", "mirrors", "mi", "mirrorNode", "a", "b", "ai", "bi", "nextMirror", "mr", "clear", "marked", "MENU_LOOK_INTERVAL_MS", "MENU_LOOK_TRIES", "createHostAccountMenu", "options", "realClick", "el", "rect", "init", "hostAccountTrigger", "scopes", "findFootArea", "scope", "hostSettingsTrigger", "foot", "SETTINGS_BUTTON_SELECTOR", "findAccountMenu", "trigger", "menus", "MENU_ROLE_SELECTOR", "i", "settingsRowOf", "menu", "menuViewport", "openHostSettings", "account", "tries", "look", "row", "previous", "openAccountMenu", "createAccountProfile", "ctx", "onChange", "accountName", "accountAvatar", "ACCOUNT_RETRY_MS", "accountRead", "accountRetry", "accountRetries", "accountService", "accountClient", "CLIENT_VERSION", "activeLocale", "showAccount", "name", "avatar", "setAccountIdentity", "dropAccountRead", "retryAccount", "loadAccount", "account", "read", "result", "accountState", "profile", "accountSignIn", "onAccountState", "view", "signedIn", "attempt", "state", "accountStream", "stopFollowingAccount", "stream", "followAccount", "remote", "signal", "frames", "next", "step", "accountFiber", "scope", "createAccountRows", "options", "hostMenu", "accountPhotoUrl", "raw", "HDSL_SKIN_PATH", "url", "headCanvas", "headRequested", "headFailed", "drawLauncherHead", "canvas", "image", "box", "scale", "context", "offset", "loadLauncherHead", "wake", "clearAccountPhoto", "avatarEl", "photo", "detachLauncherHead", "syncLauncherHead", "syncAccountAvatar", "src", "resolveAvatarUrl", "buildAccountHeader", "username", "header", "buildElement", "rowEl", "nameEl", "divider", "accountDisplayName", "hostRow", "resolved", "resolveDisplayName", "label", "copyLabel", "syncAccountHeader", "root", "banRow", "e", "buildHostContainer", "container", "buildSettingsItem", "item", "syncSettingsItem", "settingsItem", "labelText", "trigger", "txt", "txtEl", "createAccountSurface", "options", "mode", "hostContainer", "menuStamp", "createStamp", "ACCOUNT_MENU_ATTR", "detect", "container", "markMenu", "menu", "revealMenu", "ACCOUNT_READY_ATTR", "lastTop", "stable", "tries", "look", "rows", "top", "requestFrame", "syncHost", "viewport", "sync", "next", "install", "ctx", "ui", "HOST_ROW_ATTR", "profile", "createAccountProfile", "accountBtn", "accountPopover", "popoverBody", "settingsItem", "popoverHoverIntent", "createHoverIntent", "openPopover", "closePopover", "POPOVER_OPEN_DELAY", "POPOVER_CLOSE_DELAY", "hostHoverIntent", "openHostMenu", "closeHostMenuForHover", "hostRowBindingToken", "popoverOpenedByClick", "isPopoverOpen", "cancelClosePopover", "closeOtherPopovers", "footArea", "findFootArea", "mirror", "error", "positionAccountPopover", "togglePopover", "scheduleClosePopover", "positionAnchoredPopover", "hostMenu", "createHostAccountMenu", "rows", "createAccountRows", "surface", "createAccountSurface", "onSurfaceMode", "onHostMenuChanged", "createFooterMirror", "closeSurface", "registerPopover", "closeAccountSurfaces", "accountWidth", "accountInsetLeft", "accountInsetRight", "ensureSynthetic", "username", "getUsername", "removeStrayNodes", "readPrefs", "AUTO_POPOVER_OFF", "e", "userEl", "body", "dropSynthetic", "menu", "escape", "armAccountMenu", "ACCOUNT_ARMED_ATTR", "disarmAccountMenu", "row", "hostRowBindings", "hostMenuBindings", "bindHostRowHover", "enter", "leave", "press", "mode", "dropAccountFooter", "injected", "i", "marked", "m", "bindings", "syncAccountRowBox", "rowRect", "rowWidth", "footRect", "left", "right", "syncAccountFooter", "hostTrigger", "entryRow", "root", "reason", "target", "container", "unregisterPopover", "THEME_FLIP_ATTR", "THEME_FLIP_MS", "THEME_FLIP_PROPS", "install", "body", "root", "flipTimer", "cancelSweep", "setFlag", "on", "cancelThemeTransitions", "anims", "i", "anim", "onThemeFlip", "requestFrame", "stopThemeWatch", "subscribeMutations", "DARK_THEME_ATTRIBUTE", "React", "primitives", "reactDom", "install", "ctx", "ui", "actionRoots", "noticeRoot", "noticeSeq", "viewStamp", "createStamp", "labelStamp", "treeStamp", "SEGMENTS", "view", "control", "segmentPill", "createSlidingPill", "listHost", "items", "renderedKey", "deletedIds", "workspaces", "sessions", "unwatch", "disposed", "service", "name", "findSection", "labels", "i", "label", "match", "root", "TREE_ROW_SELECTOR", "findTree", "region", "tree", "relativeTime", "at", "minutes", "copyLabel", "hours", "watch", "nextWorkspaces", "nextSessions", "stopArchive", "refreshItems", "stopSessions", "followed", "followedSessions", "archive", "list", "id", "summary", "a", "b", "key", "item", "renderList", "notifyToast", "text", "notifyArchivedNotOpenable", "t", "removeArchived", "SESSION_DELETE_PATH", "response", "result", "status", "refreshSessions", "refusal", "reason", "restoreArchived", "actionButton", "kind", "onClick", "wrapper", "buildElement", "className", "Icon", "buildArchivedRow", "row", "event", "r", "buildControl", "group", "closestFrom", "setView", "next", "sync", "header", "s", "on", "host", "removeStrayNodes", "CATCH_UP_GAP_PX", "PROCESS_SYNC_INTERVAL_MS", "createChatProcessFollow", "leaveOwner", "joinScrollOwner", "watched", "stopped", "followable", "body", "PROCESS_EXPANDED_MODE_ATTRIBUTE", "gapOf", "catchUp", "readerHolds", "easeScrollToEndFor", "onResize", "entries", "entry", "target", "PROCESS_BODY_SELECTOR", "sync", "present", "content", "PROCESS_CONTENT_SELECTOR", "observeSize", "releaseReader", "stopScrollFor", "timer", "FOLLOW_STRUCTURE_SELECTOR", "FLOW_BLOCK_SELECTOR", "CHAT_CALL_SELECTOR", "FOLLOW_RUNNING_SELECTOR", "STREAMING_SELECTOR", "SHIMMER_SELECTOR", "FOLLOW_MIN_INTERVAL_MS", "FOLLOW_ACTIVITY_GRACE_MS", "FOLLOW_FOLD_WAIT_MS", "FOLLOW_FOLD_WAIT_ATTEMPTS", "FOLLOW_TAIL_ATTR", "FOLLOW_TAIL_AIR_PX", "FOLLOW_TAIL_LEFT", "FOLLOW_TAIL_BOTTOM", "conversationComposerCard", "found", "lowest", "card", "COMPOSER_CARD_SELECTOR", "box", "placeFollowTail", "stamp", "button", "findFollowTailButton", "scroller", "conversationScroller", "cardBox", "scrollBox", "left", "bottom", "createChatFollowGuard", "foldBusy", "leaveOwner", "joinScrollOwner", "lastEnsureAt", "lastActivityAt", "scanQueued", "structureSeen", "guardSeen", "readerAway", "readerHolds", "running", "glideScroller", "glideColumn", "stopGlideSize", "glideHeight", "glideHeld", "heldColumn", "streaming", "column", "conversationColumn", "glidePinning", "motionReduced", "submissionHolds", "glideWanted", "releaseHold", "FOLLOW_HOLD_ATTR", "markHold", "glideSync", "watched", "CONVERSATION_SCROLL_SELECTOR", "composer", "COMPOSER_SELECTOR", "observeSize", "onGlideResize", "glideCheck", "grew", "releaseFollowButton", "holdFollowButton", "end", "top", "takeBackHostPin", "easeScrollToEndFor", "entries", "entry", "size", "delta", "SCROLL_EASE_LEAD_PX", "ensure", "attempt", "tries", "now", "handBackFollow", "settle", "structure", "guarded", "queue", "requestFrame", "marksStructure", "node", "onRecords", "records", "record", "FOLLOWING_TAIL_ATTRIBUTE", "RUNNING_STATE", "THINK_ROW_SELECTOR", "ROW_PHASE_ATTRIBUTE", "stopMutations", "subscribeMutations", "stopScrollFor", "install", "ctx", "ui", "stopGuard", "stopProcess", "createChatProcessFollow", "tailStamp", "createStamp", "CHAT_FOLLOW_ATTR", "FOLD_ROLL_MS", "FOLD_VISIBLE_SHARE", "FOLD_INTENT_TTL_MS", "FOLD_POPUP_SELECTOR", "FOLD_SHUT_CONFIRM_FRAMES", "FOLD_BUSY_GRACE_MS", "FOLD_FRAME_GAP_LIMIT_MS", "FOLD_NOMINAL_FRAME_MS", "chatFoldBusyUntil", "isChatFoldBusy", "markChatFoldBusy", "foldVisibleReach", "element", "rect", "bottom", "ancestor", "style", "foldExpandedBody", "control", "controls", "target", "parent", "last", "foldProcessBody", "PROCESS_BODY_SELECTOR", "foldControlAtBottom", "scroller", "CONVERSATION_SCROLL_SELECTOR", "FOLLOW_THRESHOLD_PX", "foldWatchReader", "atBottom", "since", "readerMovedSince", "foldHandBackFollow", "watch", "handBackFollow", "foldSettleAfter", "roll", "settle", "foldHoldThroughStalls", "lastFrameAt", "lastTime", "frameInterval", "timeOf", "time", "look", "now", "gap", "resumeAt", "skipped", "requestFrame", "foldConfirmCollapsed", "settled", "done", "attempt", "tries", "foldBeginHeightClip", "previousOverflow", "previousBoxSizing", "CHAT_ROLLING_ATTR", "chatFoldToggleDepth", "beginChatFoldToggle", "endChatFoldToggle", "isChatFoldToggle", "FOLD_ROLL_BACKSTOP_MS", "installChatFoldGlide", "glideIntent", "glideShutting", "glideReplaying", "reduceMotion", "motionReduced", "replay", "control", "rollOpen", "target", "from", "markChatFoldBusy", "height", "travel", "foldVisibleReach", "restore", "foldBeginHeightClip", "growing", "FOLD_VISIBLE_SHARE", "FOLD_ROLL_MS", "foldHoldThroughStalls", "rollShut", "fold", "release", "foldSettleAfter", "shrinking", "foldConfirmCollapsed", "flush", "current", "watch", "FOLD_INTENT_TTL_MS", "body", "foldExpandedBody", "onClick", "event", "isChatFoldToggle", "THINK_ROW_SELECTOR", "CHAT_FLOW_SELECTOR", "FOLD_POPUP_SELECTOR", "disclosure", "DISCLOSURE_ROW_SELECTOR", "FOLD_TOGGLE_SELECTOR", "FOLD_SKIPPED_CONTROL_SELECTOR", "groupBody", "foldProcessBody", "groupParent", "groupRoot", "PROCESS_GROUP_SELECTOR", "foldWatchReader", "foldControlAtBottom", "collapsed", "leaveOwner", "joinScrollOwner", "stopMutations", "subscribeMutations", "PROCESS_CLOSED", "createProcessFold", "touchedIn", "attemptedIn", "scanQueued", "touchedGroups", "syncGroups", "groups", "group", "PROCESS_EXPANDED_MODE_ATTRIBUTE", "header", "PROCESS_ACTIVITY_SELECTOR", "body", "PROCESS_BODY_SELECTOR", "phase", "SHIMMER_SELECTOR", "RUNNING_STATE", "previousFocus", "scroller", "CONVERSATION_SCROLL_SELECTOR", "scrollTop", "wasAtBottom", "FOLLOW_THRESHOLD_PX", "beginChatFoldToggle", "endChatFoldToggle", "writeScroll", "syncEveryGroup", "PROCESS_GROUP_SELECTOR", "rememberReaderTouched", "event", "isChatFoldToggle", "target", "onRecords", "records", "known", "record", "node", "found", "requestFrame", "stopMutations", "subscribeMutations", "SHIMMER_ATTRIBUTE", "SHIMMER_LEGACY_ATTRIBUTE", "FIGURES", "FIGURE_COPY", "FULL_SEPARATOR", "copyLabel", "COMPACT_SEPARATOR", "PROCESS_SUMMARY_ATTR", "PROCESS_SUMMARY_RUNNING_ATTR", "PROCESS_SUMMARY_FORM_ATTR", "ROLL_ATTR", "ROLL_MS", "SUMMARY_CLASS", "FIT_CLASS", "countProcessItems", "content", "counts", "row", "kind", "FLOW_KIND_ATTRIBUTE", "ASSISTANT_STEP_KIND", "CHAT_GROUP_PART_ATTRIBUTE", "CHAT_GROUP_PART_REASONING", "TOOL_CALL_KIND", "figureWords", "figure", "form", "count", "copy", "chosen", "summarySeparator", "summaryForm", "naturalWidth", "availableWidth", "summaryParts", "parts", "template", "at", "summaryText", "separator", "text", "part", "createProcessSummary", "named", "leaving", "pending", "queued", "setCount", "roll", "current", "sizer", "animate", "motionReduced", "digit", "buildElement", "summaryOf", "header", "existing", "summary", "QUIET_ATTR", "fitOf", "style", "parent", "parentStyle", "limit", "gap", "room", "child", "width", "formOf", "sentence", "fit", "readingOf", "group", "PROCESS_CONTENT_SELECTOR", "full", "render", "running", "kept", "stale", "previous", "element", "place", "before", "after", "lead", "release", "PROCESS_GROUP_SELECTOR", "flush", "groups", "forms", "PROCESS_ACTIVITY_SELECTOR", "reading", "SHIMMER_SELECTOR", "known", "observeSize", "queue", "requestFrame", "candidate", "stopMutations", "subscribeMutations", "SHIMMER_ATTRIBUTE", "SHIMMER_LEGACY_ATTRIBUTE", "records", "record", "node", "found", "timer", "createReasoningFold", "onRows", "touchedIn", "attemptedIn", "scanQueued", "touchedRows", "syncRows", "rows", "row", "phase", "ROW_PHASE_ATTRIBUTE", "EXPANDED_ATTRIBUTE", "RUNNING_STATE", "control", "beginChatFoldToggle", "endChatFoldToggle", "syncEveryRow", "THINK_ROW_SELECTOR", "rememberReaderTouched", "event", "isChatFoldToggle", "target", "onRecords", "records", "known", "record", "node", "requestFrame", "stopMutations", "subscribeMutations", "REASON_WINDOW_ATTR", "REASON_CAPPED_ATTR", "REASON_WINDOW_HEIGHT_PROPERTY", "FALLBACKS", "tokenNumber", "value", "fallback", "amount", "textOf", "row", "text", "REASONING_TEXT_SELECTOR", "windowOf", "node", "lineHeightOf", "parsed", "createReasoningStream", "windows", "queued", "pending", "clearWindow", "state", "tick", "current", "ROW_PHASE_ATTRIBUTE", "RUNNING_STATE", "EXPANDED_ATTRIBUTE", "motionReduced", "viewport", "style", "lineHeight", "capPx", "stepPx", "holdMs", "height", "capped", "heightPx", "reachable", "next", "syncRow", "held", "flush", "rows", "queue", "requestFrame", "THINK_ROW_SELECTOR", "install", "ctx", "ui", "CHAT_FOLD_ATTR", "stream", "createReasoningStream", "stopReasoning", "createReasoningFold", "rows", "row", "stopProcess", "createProcessFold", "summary", "createProcessSummary", "stopGlide", "installChatFoldGlide", "isChatFoldBusy", "ACTIVITY_THINKING", "ACTIVITY_WRITING", "ACTIVITY_TOOL_CALL", "ACTIVITY_TOOLS", "activityWords", "snapshot", "turn", "activity", "readTurnActivity", "newest", "waitStart", "turn", "now", "step", "assistant", "openTurn", "snapshot", "found", "install", "ctx", "ui", "WAIT_ATTR", "SWAP_ATTR", "lines", "swapping", "exits", "waits", "timer", "cancelTick", "lineOf", "row", "words", "line", "buildElement", "QUIET_ATTR", "writeText", "element", "text", "milliseconds", "value", "parsed", "amount", "enter", "label", "word", "setLabel", "motionReduced", "duration", "next", "settleSwap", "exit", "syncRow", "t", "now", "seen", "CHAT_RUNNING_TEXT_SELECTOR", "sessionId", "conversationSessionId", "closestConversationSession", "target", "findChatTarget", "snapshot", "turn", "openTurn", "clock", "badge", "activity", "activityWords", "copyLabel", "formatHostDuration", "overtime", "key", "began", "waitStart", "release", "sync", "rows", "CHAT_RUNNING_SELECTOR", "requestFrame", "CHAT_REVEAL_HIGHLIGHT_PREFIX", "CHAT_REVEAL_COLOR_VAR", "createRevealScanner", "state", "hooks", "paint", "publishRunColor", "only", "now", "containers", "STREAMING_SELECTOR", "gone", "index", "container", "yielding", "createdRuns", "batchStart", "walker", "entries", "text", "node", "textNode", "previous", "before", "overlapLimit", "prefix", "suffix", "stableFrom", "shift", "run", "quietUntil", "oldMiddle", "newMiddle", "matched", "columns", "lengths", "row", "column", "sameCharacter", "matchedCount", "skipOldRow", "skipNewColumn", "advanceOldRow", "addedRanges", "rangeStart", "addedLength", "range", "touchedElements", "entry", "begin", "end", "element", "offset", "character", "batchCount", "staggerLimit", "step", "slot", "createRevealHighlights", "registry", "HighlightConstructor", "highlights", "step", "CHAT_REVEAL_HIGHLIGHT_PREFIX", "ranges", "highlight", "range", "createRunColorPublisher", "writtenColors", "element", "style", "color", "CHAT_REVEAL_COLOR_VAR", "createRevealPainter", "state", "hooks", "clearHighlights", "publishRunColor", "showStep", "revealYield", "scheduleFrame", "requestFrame", "now", "paint", "fromFrame", "previousFrameAt", "gap", "unspent", "run", "drawn", "buckets", "step", "kept", "index", "age", "snapshot", "end", "low", "high", "firstIndex", "middle", "entry", "firstEntry", "start", "lastNode", "lastEnd", "next", "element", "bucket", "previous", "segment", "ranges", "createChatRevealEngine", "registry", "HighlightConstructor", "state", "container", "STREAMING_SELECTOR", "clearHighlights", "showStep", "createRevealHighlights", "publishRunColor", "createRunColorPublisher", "paint", "createRevealPainter", "scan", "createRevealScanner", "rememberReaderFold", "event", "isChatFoldToggle", "target", "until", "ownContainer", "onRecords", "records", "everything", "touched", "record", "added", "removed", "live", "stopMutations", "subscribeMutations", "STREAMING_ATTRIBUTE", "install", "ctx", "ui", "engine", "applyReveal", "motionReduced", "createChatRevealEngine", "CHAT_REVEAL_ATTR", "stopPrefs", "subscribePrefs", "primitives", "React", "CHAT_FILE_ROW_CLASS", "CHAT_FILE_ROW_LINE_CLASS", "CHAT_FILE_LEADING_CLASS", "CHAT_FILE_CHEVRON_CLASS", "CHAT_FILE_TITLE_CLASS", "CHAT_FILE_SEP_CLASS", "CHAT_FILE_SUMMARY_CLASS", "CHAT_FILE_ERROR_CLASS", "CHAT_FILE_STOPPED_CLASS", "CHAT_FILE_LINK_CLASS", "CHAT_FILE_SUFFIX_CLASS", "CHAT_FILE_STAT_CLASS", "CHAT_FILE_ADD_CLASS", "CHAT_FILE_DEL_CLASS", "CHAT_FILE_ROLL_CLASS", "CHAT_FILE_ROLL_DIGIT_CLASS", "CHAT_FILE_ROLL_MOVING_CLASS", "CHAT_FILE_ROLL_OUT_CLASS", "CHAT_FILE_ROLL_IN_CLASS", "CHAT_FILE_MERGE_ATTR", "CHAT_FILE_MERGE_HEAD", "CHAT_FILE_MERGE_MEMBER", "CHAT_FILE_MERGE_GONE", "CHAT_FILE_MERGED_COPY", "CHAT_FILE_BODY_CLASS", "CHAT_FILE_DIFF_CLASS", "CHAT_FILE_IO_CLASS", "CHAT_FILE_IO_SECTION_CLASS", "CHAT_FILE_IO_DIVIDER_CLASS", "CHAT_FILE_IO_LABEL_CLASS", "CHAT_FILE_IO_TEXT_CLASS", "CHAT_FILE_INSPECT_CLASS", "CHAT_FILE_HIDDEN_CLASS", "CHAT_FILE_SEAT", "chatFileCallHead", "block", "chatFileParseArgs", "argsRaw", "value", "chatFilePickString", "args", "keys", "key", "chatFileValidEscalation", "permission", "justification", "chatFileShortenPath", "path", "cwd", "home", "rest", "chatFileFirstLine", "text", "lineBreakAt", "chatFileIntendedHunks", "name", "content", "oldText", "newText", "replaceAll", "chatFileAppliedHunks", "meta", "diffs", "hunks", "hunk", "chatFileDiffHunks", "applied", "chatFileRowModel", "toolName", "done", "head", "state", "output", "chatFileResultText", "node", "parts", "chatFileSummaryClassName", "CHAT_FILE_SUMMARY_CLASS", "CHAT_FILE_ERROR_CLASS", "CHAT_FILE_STOPPED_CLASS", "chatFileStateLabel", "chatFileDiffBlockLabels", "t", "hidden", "rowContainer", "element", "PROCESS_CONTENT_SELECTOR", "rowCarrier", "CHAT_CALL_SELECTOR", "byDocumentOrder", "a", "b", "mergeViews", "rows", "groups", "row", "container", "byPath", "members", "views", "ordered", "hunks", "member", "running", "at", "createFileMerge", "listeners", "rebuild", "notifyAll", "listener", "install", "ctx", "ui", "h", "fileMerge", "createFileMerge", "RollingStat", "props", "leaving", "setLeaving", "shown", "before", "motionReduced", "CHAT_FILE_ROLL_CLASS", "char", "at", "moving", "CHAT_FILE_ROLL_DIGIT_CLASS", "CHAT_FILE_ROLL_MOVING_CLASS", "CHAT_FILE_ROLL_OUT_CLASS", "CHAT_FILE_ROLL_IN_CLASS", "ChatFileRow", "t", "toolName", "block", "cwd", "home", "openFile", "inspect", "useDisclosure", "expanded", "toggle", "rootRef", "args", "head", "chatFileCallHead", "chatFileParseArgs", "model", "chatFileRowModel", "hunks", "chatFileDiffHunks", "labels", "chatFileDiffBlockLabels", "merge", "merged", "shownHunks", "state", "running", "totals", "expandable", "open", "summaryText", "status", "chatFileStateLabel", "linkAvailable", "own", "element", "hidden", "carrier", "createStamp", "CHAT_FILE_MERGE_ATTR", "rowCarrier", "CHAT_FILE_MERGE_GONE", "openFileClick", "event", "linkKeyDown", "collapsedContent", "CHAT_FILE_SEP_CLASS", "CHAT_FILE_LINK_CLASS", "chatFileSummaryClassName", "CHAT_FILE_SUFFIX_CLASS", "CHAT_FILE_STAT_CLASS", "CHAT_FILE_ADD_CLASS", "CHAT_FILE_DEL_CLASS", "inputSection", "CHAT_FILE_IO_SECTION_CLASS", "CHAT_FILE_IO_LABEL_CLASS", "CHAT_FILE_IO_TEXT_CLASS", "outputSection", "expandedContent", "CHAT_FILE_BODY_CLASS", "CHAT_FILE_DIFF_CLASS", "CHAT_FILE_IO_CLASS", "CHAT_FILE_IO_DIVIDER_CLASS", "CHAT_FILE_INSPECT_CLASS", "CHAT_FILE_ROW_CLASS", "CHAT_FILE_MERGE_HEAD", "CHAT_FILE_MERGE_MEMBER", "CHAT_FILE_HIDDEN_CLASS", "copyLabel", "CHAT_FILE_MERGED_COPY", "CHAT_FILE_ROW_LINE_CLASS", "CHAT_FILE_LEADING_CLASS", "CHAT_FILE_TITLE_CLASS", "CHAT_FILE_CHEVRON_CLASS", "slotsFiber", "scope", "slots", "seatStops", "claimSeats", "seat", "CHAT_FILE_SEAT", "stopEdit", "stopWrite", "stopped", "releaseSeats", "stopSeat", "CARET_MIRRORED_PROPERTIES", "caretChildIndex", "parent", "child", "index", "node", "caretNearestBreak", "range", "container", "offset", "next", "previous", "caretEmptyLineBox", "input", "probeHome", "style", "probe", "probeRect", "breakElement", "breakRect", "inputRect", "caretMeasureRich", "rect", "anchor", "block", "lineHeight", "caretMeasurePlain", "endKeyed", "mirror", "name", "paddingX", "caretAt", "marker", "mirrorRect", "spot", "edge", "before", "rects", "last", "caretClipToField", "box", "clipTop", "clipBottom", "top", "bottom", "CARET_BLINK_NAME", "CARET_COLOR_PROPERTY", "CARET_FOCUS_SETTLE_MS", "caretSurfaceOf", "element", "COMPOSER_INPUT_SELECTOR", "COMPOSER_TEXTAREA_SELECTOR", "createCaretMotion", "read", "layers", "queued", "cancelFrame", "cancelTransitionFrame", "disposed", "typed", "endKeyed", "probeHome", "QUIET_ATTR", "queue", "requestFrame", "typing", "sync", "markTyped", "noteKey", "event", "clearEndKey", "followPlainScroll", "target", "onContentChange", "CARET_MOTION_OFF", "watchedSurfaces", "observeComposer", "input", "surface", "stop", "subscribeMutations", "needsTakeover", "active", "CARET_ATTR", "syncAfterFocusChange", "hide", "layer", "CARET_VISIBLE_ATTR", "release", "CARET_HOST_ATTR", "layerFor", "host", "known", "hostStyle", "markedHost", "caret", "CARET_LAYER_ATTR", "adoptCaretColor", "style", "color", "drawCaret", "box", "paused", "hostRect", "left", "top", "fresh", "instant", "animation", "mode", "selection", "kind", "range", "candidate", "measured", "caretMeasurePlain", "caretMeasureRich", "caretClipToField", "CARET_MOTION_MOVE", "install", "ctx", "ui", "motion", "readPrefs", "stopPrefs", "subscribePrefs", "install", "ctx", "ui", "HEADER", "TITLE", "ACTIONS", "last", "lastEl", "TITLEBAR_ATTR", "titlebar", "stripStamp", "createStamp", "pill", "createSlidingPill", "syncTitlebar", "next", "WINDOWS_TITLEBAR_ATTRIBUTE", "rect", "el", "box", "neighbours", "header", "out", "title", "titleBoxOf", "actions", "all", "best", "i", "sync", "strip", "stripBox", "headerBox", "applied", "naturalTop", "titleBox", "shift", "want", "left", "right", "clash", "others", "install", "ctx", "ui", "BAND_ATTR", "TITLE_ATTR", "TITLE_LEFT", "TITLE_MAX", "TITLE_TOP", "ROW_ATTR", "ROW_LIFT", "ACTIONS_ATTR", "CORNER_ATTR", "ACTIONS_RIGHT", "TABS_ATTR", "TABS_LEFT", "TITLE_TOKEN", "ACTIONS_TOKEN", "rowStamp", "createStamp", "titleStamp", "actionsStamp", "cornerStamp", "tabsStamp", "watched", "stopSize", "titleRow", "row", "HEADER_TITLE_ROW_SELECTOR", "HEADER_TITLE_SELECTOR", "HEADER_UTILITIES_SELECTOR", "rect", "element", "box", "setVar", "name", "value", "clear", "watch", "observeSize", "sync", "band", "desktopBand", "rowBox", "header", "CONVERSATION_HEADER_SELECTOR", "title", "utilities", "corner", "HEADER_CORNER_SELECTOR", "stripEl", "VIEW_TABS_STRIP_SELECTOR", "stripBox", "inBand", "stripWidth", "stripRight", "menuBox", "WINDOWS_MENU_SELECTOR", "furniture", "utilitiesBox", "cornerBox", "utilitiesWidth", "cornerWidth", "clusterWidth", "edge", "cornerRight", "liftActions", "left", "rightStop", "room", "titleBox", "liftTitle", "titleHeight", "titleCentre", "applied", "rise", "utilitiesRight", "stripInBand", "leftStop", "tokens", "setAttributeIfChanged", "strip", "FEATURES", "install", "parkForeignSheets", "isSwitched", "feature", "FEATURE_PREF_DEFAULTS", "isLive", "isWanted", "value", "readPrefs", "peerPresent", "apply", "ctx", "body", "ui", "retire", "installed", "failed", "offSwitches", "offPeerWatch", "offOwnerWatch", "stopStylesheet", "disposed", "yielded", "externalOwnerActive", "release", "keep", "kept", "i", "error", "clearPrefsAttributes", "HANDOFF_ATTR", "teardown", "setHostContext", "disposePrefsBinding", "name", "index", "entry", "stop", "retireFooterTakeover", "retireComposerRestyle", "install", "id", "handle", "run", "reportFeatureFailure", "arrived", "awaited", "installFeature", "handleName", "awaitFeature", "belongs", "chunk", "loadFeatureChunk", "applySwitch", "wanted", "own", "BUILD_ID", "adoptPrefs", "prefs", "mountStylesheet", "FEATURES", "subscribePrefs", "live", "installScheduler", "handleNames", "adoptSettingsForm", "loadModelCopy", "loadUsername", "loadHdsl", "setFeatureRegistry", "subscribePeerPresence", "subscribeExternalOwner", "active"]
|
|
7
|
-
}
|