@helpai/elements 0.44.2 → 0.45.0

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/web-component.mjs CHANGED
@@ -87,6 +87,9 @@ var STRINGS_EN = {
87
87
  thinking: "Thinking\u2026",
88
88
  thoughts: "Thoughts",
89
89
  usedTool: "Used tool",
90
+ toolDetails: "Details",
91
+ toolResult: "Result",
92
+ sources: "Sources",
90
93
  // ── Messenger modules ──────────────────────────────────────────
91
94
  tabHome: "Home",
92
95
  tabConversations: "Conversations",
@@ -200,6 +203,9 @@ var STRINGS_FR = {
200
203
  thinking: "R\xE9flexion\u2026",
201
204
  thoughts: "R\xE9flexions",
202
205
  usedTool: "Outil utilis\xE9",
206
+ toolDetails: "D\xE9tails",
207
+ toolResult: "R\xE9sultat",
208
+ sources: "Sources",
203
209
  // ── Messenger modules ──────────────────────────────────────────
204
210
  tabHome: "Accueil",
205
211
  tabConversations: "Conversations",
@@ -596,6 +602,7 @@ function resolveOptions(rawOpts) {
596
602
  responseMode: behavior.responseMode ?? "streaming",
597
603
  showReasoning: behavior.showReasoning ?? false,
598
604
  showToolCalls: behavior.showToolCalls ?? false,
605
+ showSources: behavior.showSources ?? false,
599
606
  features: {
600
607
  files: opts.features?.files ?? DEFAULT_FEATURES.files,
601
608
  voice: opts.features?.voice ?? DEFAULT_FEATURES.voice,
@@ -922,7 +929,8 @@ var BEHAVIOR_ATTRS = [
922
929
  ["response-mode", "responseMode", (v) => v],
923
930
  ["start-minimized", "startMinimized", boolAttr],
924
931
  ["show-reasoning", "showReasoning", boolAttr],
925
- ["show-tool-calls", "showToolCalls", boolAttr]
932
+ ["show-tool-calls", "showToolCalls", boolAttr],
933
+ ["show-sources", "showSources", boolAttr]
926
934
  ];
927
935
  var I18N_ATTRS = [["locale", "locale"]];
928
936
  var ACTION_NAMES = new Set(ACTION_NAME_LITERALS);
@@ -1094,6 +1102,7 @@ function createPersistence(widgetId, storage = defaultStorage, deploymentId) {
1094
1102
  const KEY_CALLOUT_DISMISSED = `${prefix}.calloutDismissed`;
1095
1103
  const KEY_SIDEBAR_COLLAPSED = `${prefix}.sidebarCollapsed`;
1096
1104
  const KEY_ACTIVE_MODULE = `${prefix}.activeModule`;
1105
+ const KEY_HISTORY_COUNT = `${prefix}.historyCount`;
1097
1106
  const KEY_FORMS_DONE = `${prefix}.formsDone`;
1098
1107
  const persistence = {
1099
1108
  getVisitorId() {
@@ -1177,6 +1186,15 @@ function createPersistence(widgetId, storage = defaultStorage, deploymentId) {
1177
1186
  saveActiveModule(id) {
1178
1187
  storage.set(KEY_ACTIVE_MODULE, id);
1179
1188
  },
1189
+ loadHistoryCount() {
1190
+ const raw = storage.get(KEY_HISTORY_COUNT);
1191
+ if (!raw) return null;
1192
+ const n = Number.parseInt(raw, 10);
1193
+ return Number.isFinite(n) && n >= 0 ? n : null;
1194
+ },
1195
+ saveHistoryCount(count) {
1196
+ storage.set(KEY_HISTORY_COUNT, String(count));
1197
+ },
1180
1198
  loadFormsDone() {
1181
1199
  const raw = storage.get(KEY_FORMS_DONE);
1182
1200
  if (!raw) return {};
@@ -1220,7 +1238,7 @@ var tokens_default = ':host{--__P__-accent-user: __BRAND_ACCENT__;--__P__-accent
1220
1238
  var reset_default = '*,*:before,*:after{box-sizing:border-box;margin:0;padding:0;border:0}button{font:inherit;color:inherit;background:none;cursor:pointer;-webkit-appearance:none;appearance:none;line-height:1}button:focus-visible,[tabindex]:focus-visible,textarea:focus-visible,input:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}textarea,input{font:inherit;color:inherit;background:none;border:0;outline:0;resize:none}a{color:var(--__P__-accent);text-decoration:underline;text-underline-offset:2px}img,svg{display:block;max-width:100%}ul,ol{list-style:none}.__P__-app{display:block;width:100%;height:100%;font-family:var(--__P__-font);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"cv11","ss01","ss03"}.__P__-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n';
1221
1239
 
1222
1240
  // src/styles/panel.css
1223
- var panel_default = '.__P__-anchor{color-scheme:var(--__P__-color-scheme, light);right:16px;bottom:16px}.__P__-surface{display:contents}.__P__-surface[hidden]{display:none}:host([data-position="bottom-left"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{right:auto;left:16px}:host([data-position="top-right"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{bottom:auto;top:16px}.__P__-anchor{position:fixed;display:flex;flex-direction:column;align-items:flex-end;gap:var(--__P__-space-3);pointer-events:none}.__P__-anchor{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=sm]{--__P__-fab-size: 44px}.__P__-anchor[data-launcher-size=md]{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=lg]{--__P__-fab-size: 68px}.__P__-anchor>*{pointer-events:auto}.__P__-fab[data-size=sm]{--__P__-fab-size: 44px;font-size:var(--__P__-text-sm)}.__P__-fab[data-size=md]{--__P__-fab-size: 56px;font-size:calc(14px * var(--__P__-text-scale))}.__P__-fab[data-size=lg]{--__P__-fab-size: 68px;font-size:var(--__P__-text-base)}.__P__-fab{display:inline-flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);color:var(--__P__-accent-text);background:var(--__P__-accent);box-shadow:var(--__P__-shadow-fab);font-weight:600;line-height:1;transform-origin:bottom right;animation:__P__-fab-in var(--__P__-dur-base) var(--__P__-ease) both;transition:transform var(--__P__-dur-base) var(--__P__-ease),opacity var(--__P__-dur-base) var(--__P__-ease),box-shadow var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab:hover{transform:translateY(-2px)}.__P__-fab:active{transform:translateY(0)}.__P__-fab:focus-visible{outline:2px solid var(--__P__-on-accent);outline-offset:3px}.__P__-fab svg{width:24px;height:24px;flex-shrink:0}@keyframes __P__-fab-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}.__P__-fab[data-leaving]{position:absolute;right:0;bottom:0;animation:__P__-fab-out var(--__P__-dur-quick) var(--__P__-ease) forwards;pointer-events:none}:host([data-position^="top-"]) .__P__-fab[data-leaving]{bottom:auto;top:0}:host([data-position$="-left"]) .__P__-fab[data-leaving]{right:auto;left:0}@keyframes __P__-fab-out{0%{opacity:1;transform:none}to{opacity:0;transform:scale(.85)}}.__P__-fab[data-variant=circle]{width:var(--__P__-fab-size);height:var(--__P__-fab-size);border-radius:999px}.__P__-fab[data-variant=circle] .__P__-fab-label{display:none}.__P__-fab[data-variant=pill]{height:var(--__P__-fab-size);padding:0 18px 0 16px;border-radius:999px}.__P__-fab[data-variant=bar]{height:var(--__P__-fab-size);padding:0 22px;border-radius:var(--__P__-radius)}.__P__-fab[data-variant=minimal]{height:var(--__P__-fab-size);padding:0 var(--__P__-space-4);border-radius:999px;background:transparent;color:var(--__P__-accent);box-shadow:none;border:1px solid currentColor}.__P__-fab[data-variant=minimal]:hover{background:color-mix(in srgb,var(--__P__-accent) 12%,transparent)}.__P__-callout{--__P__-callout-fab-h: var(--__P__-fab-size, 56px);--__P__-callout-gap: clamp(12px, calc(var(--__P__-callout-fab-h) * .25), 22px);--__P__-callout-nudge-direction: -1;position:absolute;display:inline-flex;align-items:center;gap:var(--__P__-space-2);padding:10px 14px;background:var(--__P__-fg);color:var(--__P__-bg);border-radius:999px;font-size:var(--__P__-text-sm);font-weight:600;line-height:1.2;box-shadow:0 10px 30px -8px #00000059;pointer-events:auto;animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease);z-index:1;max-width:240px;white-space:nowrap}.__P__-callout[data-position=left]{right:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%)}.__P__-callout[data-position=right]{left:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%);--__P__-callout-nudge-direction: 1}.__P__-callout[data-position=top]{bottom:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-position=bottom]{top:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}:host([data-position$="-left"]) .__P__-callout[data-position=top],:host([data-position$="-left"]) .__P__-callout[data-position=bottom]{right:auto;left:0}.__P__-callout[data-shape=bubble]{border-radius:var(--__P__-radius-md);white-space:normal;width:max-content;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-shape=callout]{padding:12px 18px;font-size:calc(14px * var(--__P__-text-scale));background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-callout:after{content:"";position:absolute;width:12px;height:12px;background:inherit;border-radius:2px;transform:rotate(45deg)}.__P__-callout[data-position=left]:after{right:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=right]:after{left:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=top]:after{bottom:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-position=bottom]:after{top:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}:host([data-position$="-left"]) .__P__-callout[data-position=top]:after,:host([data-position$="-left"]) .__P__-callout[data-position=bottom]:after{right:auto;left:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-animated]{animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease),__P__-callout-nudge 1.6s var(--__P__-ease-in-out) var(--__P__-dur-slow) infinite}@keyframes __P__-callout-in{0%{opacity:0}to{opacity:1}}@keyframes __P__-callout-nudge{0%,to{margin-left:0;margin-right:0}50%{margin-left:calc(6px * var(--__P__-callout-nudge-direction));margin-right:calc(-6px * var(--__P__-callout-nudge-direction))}}@media(prefers-reduced-motion:reduce){.__P__-callout[data-animated]{animation:__P__-callout-in 1ms var(--__P__-ease)}.__P__-icon-btn[data-recording=true],.__P__-typing span{animation:none}}.__P__-callout-close{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;color:inherit;opacity:.7;cursor:pointer}.__P__-callout-close:hover{opacity:1;background:color-mix(in srgb,currentColor 15%,transparent)}.__P__-callout-close:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-callout-close svg{width:12px;height:12px}.__P__-panel{width:var(--__P__-panel-w);height:var(--__P__-panel-h);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);background:var(--__P__-bg);color:var(--__P__-fg);border-radius:var(--__P__-radius-lg);box-shadow:var(--__P__-shadow-panel);display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;animation:__P__-panel-in var(--__P__-dur-slow) var(--__P__-ease);border:1px solid var(--__P__-border)}@media(prefers-reduced-motion:no-preference){.__P__-panel{transition:width var(--__P__-dur-base) var(--__P__-ease),height var(--__P__-dur-base) var(--__P__-ease),max-width var(--__P__-dur-base) var(--__P__-ease),max-height var(--__P__-dur-base) var(--__P__-ease)}.__P__-panel[data-resizing]{transition:none}}:host([data-mode="open"]) .__P__-panel{width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));min-width:var(--__P__-resize-min-w, auto);min-height:var(--__P__-resize-min-h, auto);max-width:var(--__P__-resize-max-w, calc(100vw - 32px) );max-height:var(--__P__-resize-max-h, calc(100dvh - 32px) )}@keyframes __P__-panel-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}:host([data-mode="expanded"]) .__P__-panel{width:var(--__P__-expanded-w, 640px);height:var(--__P__-expanded-h, 820px);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}:host([data-mode="fullscreen"]){z-index:var(--__P__-z-panel)!important}:host([data-mode="fullscreen"]) .__P__-anchor{inset:0;padding:0;justify-content:flex-end;align-items:flex-end}:host([data-mode="fullscreen"][data-position*="top"]) .__P__-anchor{justify-content:flex-start}:host([data-mode="fullscreen"][data-position*="left"]) .__P__-anchor{align-items:flex-start}:host([data-mode="fullscreen"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}:host([data-mode="fullscreen"]) .__P__-fab{display:none}@media(max-width:640px){:host([data-mode="open"]) .__P__-anchor,:host([data-mode="expanded"]) .__P__-anchor{inset:0;align-items:stretch;padding:0}:host([data-mode="open"]) .__P__-panel,:host([data-mode="expanded"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}}:host([data-mode="inline"]) .__P__-anchor,:host([data-mode="standalone"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-height:0}:host([data-mode="inline"]) .__P__-panel,:host([data-mode="standalone"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;animation:none}:host([data-mode="inline"]) .__P__-fab,:host([data-mode="standalone"]) .__P__-fab{display:none}:host([data-mode="inline"]){min-height:320px}:host([data-mode="inline"]) .__P__-panel{border-radius:var(--__P__-radius)}:host([data-mode="standalone"]) .__P__-panel{border-radius:0;border:0;box-shadow:none}:host([data-mode="modal"]){position:fixed!important;inset:0!important;z-index:var(--__P__-z-panel)!important;display:block!important;width:100vw;height:100dvh;background:var(--__P__-modal-backdrop, var(--__P__-backdrop));animation:__P__-backdrop-in var(--__P__-dur-base) var(--__P__-ease) both;--__P__-panel-w: min(960px, 92vw);--__P__-panel-h: min(720px, 88dvh)}:host([data-mode="modal"]) .__P__-anchor{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--__P__-space-6);pointer-events:none}:host([data-mode="modal"]) .__P__-panel{pointer-events:auto;width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);min-width:0;min-height:0;border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-panel);animation:__P__-modal-in var(--__P__-dur-base) var(--__P__-ease);translate:var(--__P__-modal-dx, 0px) var(--__P__-modal-dy, 0px)}:host([data-mode="modal"]) .__P__-header,:host([data-mode="modal"]) .__P__-back-header,:host([data-mode="modal"]) .__P__-home-hero{cursor:grab;touch-action:none}:host([data-mode="modal"]) .__P__-panel[data-dragging]{cursor:grabbing;user-select:none}:host([data-mode="modal"]) .__P__-panel[data-dragging] *{cursor:grabbing}:host([data-mode="modal"]) .__P__-fab{display:none}@keyframes __P__-backdrop-in{0%{background:#0000}to{background:var(--__P__-modal-backdrop, var(--__P__-backdrop))}}@keyframes __P__-modal-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}:host([data-mode="drawer"]){--__P__-panel-w: min(440px, calc(100vw - 32px) );--__P__-panel-h: 100dvh}:host([data-mode="drawer"]) .__P__-anchor{position:fixed;--__P__-inset-x: var(--__P__-panel-inset, 12px);--__P__-inset-y: var(--__P__-panel-inset, 3dvh);top:var(--__P__-inset-y);bottom:auto;right:var(--__P__-inset-x);left:auto;width:min(var(--__P__-widget-w, var(--__P__-panel-w)),calc(100vw - var(--__P__-inset-x) * 2));height:min(var(--__P__-widget-h, var(--__P__-panel-h)),calc(100dvh - var(--__P__-inset-y) * 2));padding:0;display:block;pointer-events:auto}:host([data-mode="drawer"][data-position$="-left"]) .__P__-anchor{right:auto;left:var(--__P__-inset-x)}:host([data-mode="drawer"][data-position^="bottom-"]) .__P__-anchor{top:auto;bottom:var(--__P__-inset-y)}:host([data-mode="drawer"]) .__P__-panel{width:100%;height:100%;max-width:none;max-height:none;min-width:0;min-height:0;border-radius:var(--__P__-radius, 12px);border:1px solid var(--__P__-border);box-shadow:-8px 16px 32px -12px #00000038;animation:__P__-drawer-in var(--__P__-dur-base) var(--__P__-ease)}:host([data-mode="drawer"][data-position$="-left"]) .__P__-panel{box-shadow:8px 16px 32px -12px #00000038;animation:__P__-drawer-in-left var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab[data-edge-tab]{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-2);position:fixed;top:50%;height:140px;width:auto;min-width:0;padding:10px 8px;writing-mode:vertical-rl;text-orientation:mixed;transform:translateY(-50%);transform-origin:center;animation:__P__-edge-tab-in var(--__P__-dur-base) var(--__P__-ease) both}.__P__-fab[data-edge-tab] svg{writing-mode:horizontal-tb}.__P__-fab[data-edge-tab]:hover{transform:translateY(-50%) scale(1.03)}.__P__-fab[data-edge-tab]:active{transform:translateY(-50%) scale(.97)}:host([data-position$="-right"]) .__P__-fab[data-edge-tab]{right:0;left:auto;border-radius:12px 0 0 12px;box-shadow:-6px 0 18px -8px #0000004d}:host([data-position$="-left"]) .__P__-fab[data-edge-tab]{left:0;right:auto;border-radius:0 12px 12px 0;box-shadow:6px 0 18px -8px #0000004d}.__P__-fab[data-edge-tab][data-leaving]{position:fixed;top:50%;bottom:auto;animation:__P__-edge-tab-out var(--__P__-dur-quick) var(--__P__-ease) forwards}@keyframes __P__-edge-tab-in{0%{opacity:0;transform:translateY(-50%) scale(.9)}to{opacity:1;transform:translateY(-50%) scale(1)}}@keyframes __P__-edge-tab-out{0%{opacity:1;transform:translateY(-50%) scale(1)}to{opacity:0;transform:translateY(-50%) scale(.85)}}@keyframes __P__-drawer-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes __P__-drawer-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){:host([data-mode="drawer"]) .__P__-panel,.__P__-fab[data-edge-tab]{animation:none}}.__P__-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);background:var(--__P__-bg)}.__P__-header h1{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;flex:1;letter-spacing:-.01em}.__P__-header-actions{margin-inline-start:auto;display:flex;align-items:center;gap:var(--__P__-space-1);flex-shrink:0}.__P__-agent{flex:1;display:inline-flex;align-items:center;gap:10px;min-width:0}.__P__-agent-avatar{position:relative;width:32px;height:32px;border-radius:999px;background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:var(--__P__-text-xs);overflow:hidden;flex-shrink:0}.__P__-agent-avatar img{width:100%;height:100%;object-fit:cover}.__P__-agent-avatar:after{content:"";position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:999px;border:2px solid var(--__P__-bg);background:var(--__P__-neutral)}.__P__-agent-avatar[data-status=online]:after{background:var(--__P__-success)}.__P__-agent-avatar[data-status=away]:after{background:var(--__P__-warning)}.__P__-agent-avatar[data-status=offline]:after{background:var(--__P__-neutral)}.__P__-agent-meta{display:flex;flex-direction:column;line-height:1.15;min-width:0}.__P__-agent-meta strong{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-agent-meta span{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-suggestions{display:flex;flex-wrap:nowrap;gap:var(--__P__-space-2);padding:6px 14px 10px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x proximity;scrollbar-width:none;-ms-overflow-style:none;min-width:0}.__P__-suggestions::-webkit-scrollbar{display:none}.__P__-suggestions:before,.__P__-suggestions:after{content:"";flex:1 1 0;min-width:0}.__P__-suggestion{flex:0 0 auto;scroll-snap-align:center;padding:7px 14px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg);font-size:var(--__P__-text-sm);font-weight:500;white-space:nowrap;transition:background var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-suggestion:hover{border-color:var(--__P__-accent);color:var(--__P__-accent);transform:translateY(-1px)}.__P__-suggestion:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px;border-color:var(--__P__-accent)}.__P__-suggestion:active{transform:translateY(0)}.__P__-icon-btn{width:32px;height:32px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);transition:background var(--__P__-dur-quick) var(--__P__-ease),color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-icon-btn:hover{background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-icon-btn:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-icon-btn:active{background:var(--__P__-border)}.__P__-icon-btn:disabled{opacity:.45;cursor:not-allowed}.__P__-icon-btn:before{content:"";position:absolute;inset:-6px}.__P__-icon-btn{position:relative}.__P__-icon-btn svg{width:18px;height:18px}.__P__-icon-btn[data-recording=true]{color:var(--__P__-accent);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);animation:__P__-pulse 1.2s var(--__P__-ease) infinite}@keyframes __P__-pulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--__P__-accent) 40%,transparent)}50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--__P__-accent) 0%,transparent)}}.__P__-list,.__P__-history,.__P__-module-scroll,.__P__-home-scroll,.__P__-help-list,.__P__-tool-args,.__P__-sidebar-conversations{scrollbar-width:thin;scrollbar-color:var(--__P__-border-strong) transparent;overscroll-behavior:contain;scrollbar-gutter:stable}.__P__-list::-webkit-scrollbar,.__P__-history::-webkit-scrollbar,.__P__-module-scroll::-webkit-scrollbar,.__P__-home-scroll::-webkit-scrollbar,.__P__-help-list::-webkit-scrollbar,.__P__-tool-args::-webkit-scrollbar,.__P__-sidebar-conversations::-webkit-scrollbar{width:8px}.__P__-list::-webkit-scrollbar-thumb,.__P__-history::-webkit-scrollbar-thumb,.__P__-module-scroll::-webkit-scrollbar-thumb,.__P__-home-scroll::-webkit-scrollbar-thumb,.__P__-help-list::-webkit-scrollbar-thumb,.__P__-tool-args::-webkit-scrollbar-thumb,.__P__-sidebar-conversations::-webkit-scrollbar-thumb{background:var(--__P__-border-strong);border-radius:8px}.__P__-list-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.__P__-jump{position:absolute;inset-inline-end:14px;bottom:14px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;border:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);color:var(--__P__-fg);box-shadow:var(--__P__-shadow-panel);cursor:pointer;opacity:.85;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease);animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-jump:hover{opacity:1}.__P__-jump:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;opacity:1}.__P__-jump:active{transform:translateY(1px)}.__P__-jump svg{width:18px;height:18px}.__P__-list{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-4);padding-bottom:var(--__P__-space-8);display:flex;flex-direction:column;gap:14px}.__P__-date-divider{position:sticky;top:var(--__P__-space-2);z-index:2;display:flex;justify-content:center;align-items:flex-start;height:0;margin:0;pointer-events:none}.__P__-date-pill{padding:3px 10px;border-radius:999px;font-size:calc(11px * var(--__P__-text-scale));font-weight:600;color:var(--__P__-fg-muted);background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);box-shadow:var(--__P__-shadow-card);opacity:0;pointer-events:none;transition:opacity var(--__P__-dur-base) var(--__P__-ease)}.__P__-list[data-scrolling=true] .__P__-date-pill{opacity:1;pointer-events:auto}@media(prefers-reduced-motion:reduce){.__P__-date-pill{transition:none}}.__P__-bubble-row{display:flex}.__P__-bubble-row[data-role=user]{justify-content:flex-end}.__P__-bubble-row[data-role=assistant]{justify-content:flex-start}.__P__-bubble{max-width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);line-height:1.6;font-size:calc(14px * var(--__P__-text-scale));word-wrap:break-word;overflow-wrap:anywhere;box-shadow:0 1px 2px #0000000a,0 1px 8px -4px #0000000f;animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-bubble ::selection{background:color-mix(in srgb,var(--__P__-accent) 30%,transparent)}.__P__-bubble-row[data-role=user] .__P__-bubble ::selection{background:#fff6;color:var(--__P__-bubble-user-text)}@keyframes __P__-bubble-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-bubble-row[data-role=user] .__P__-bubble{background:var(--__P__-bubble-user);color:var(--__P__-bubble-user-text);border-end-end-radius:5px}.__P__-bubble-row[data-role=assistant] .__P__-bubble{background:var(--__P__-bubble-assistant);color:var(--__P__-bubble-assistant-text);border-end-start-radius:5px}.__P__-bubble-col{display:flex;flex-direction:column;max-width:85%;min-width:0}.__P__-bubble-row[data-role=user] .__P__-bubble-col{align-items:flex-end}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col{align-items:flex-start}.__P__-bubble-time{margin-top:3px;padding:0 4px;font-size:calc(11px * var(--__P__-text-scale));line-height:1;color:var(--__P__-fg-muted);user-select:none}.__P__-md>*:first-child{margin-top:0}.__P__-md>*:last-child{margin-bottom:0}.__P__-md p{margin:10px 0}.__P__-md h1,.__P__-md h2,.__P__-md h3,.__P__-md h4,.__P__-md h5,.__P__-md h6{margin:18px 0 8px;line-height:1.3;letter-spacing:-.01em;font-weight:700}.__P__-md h1{font-size:1.4em}.__P__-md h2{font-size:1.22em}.__P__-md h3{font-size:1.08em}.__P__-md h4,.__P__-md h5,.__P__-md h6{font-size:1em}.__P__-md>h1:first-child,.__P__-md>h2:first-child,.__P__-md>h3:first-child,.__P__-md>h4:first-child,.__P__-md>h5:first-child,.__P__-md>h6:first-child{margin-top:0}.__P__-md ul,.__P__-md ol{padding-inline-start:1.5em;margin:10px 0}.__P__-md ul{list-style:disc}.__P__-md ol{list-style:decimal}.__P__-md li{margin:6px 0;padding-inline-start:2px}.__P__-md li::marker{color:var(--__P__-fg-muted)}.__P__-md li>p{margin:6px 0}.__P__-md li>ul,.__P__-md li>ol{margin:6px 0}.__P__-md strong,.__P__-md b{font-weight:650;letter-spacing:-.005em}.__P__-md em,.__P__-md i{font-style:italic}.__P__-md code{font-family:var(--__P__-font-mono);font-size:.86em;padding:1px 6px;border-radius:5px;background:color-mix(in srgb,var(--__P__-accent) 10%,transparent);color:var(--__P__-fg);border:1px solid color-mix(in srgb,var(--__P__-accent) 16%,transparent)}.__P__-md pre{font-family:var(--__P__-font-mono);font-size:calc(12.5px * var(--__P__-text-scale));padding:12px 14px;border-radius:var(--__P__-radius-sm);background:#7f7f7f1f;overflow-x:auto;margin:var(--__P__-space-3) 0;line-height:1.5}.__P__-md pre code{padding:0;background:none}.__P__-md a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.__P__-md a:hover{text-decoration-thickness:2px}.__P__-md blockquote{margin:14px 0;padding:6px 14px;border-inline-start:3px solid color-mix(in srgb,var(--__P__-accent) 50%,transparent);background:color-mix(in srgb,var(--__P__-accent) 5%,transparent);border-start-end-radius:var(--__P__-radius-sm);border-end-end-radius:var(--__P__-radius-sm);color:var(--__P__-fg-muted)}.__P__-md blockquote>:first-child{margin-top:0}.__P__-md blockquote>:last-child{margin-bottom:0}.__P__-md hr{border:0;height:1px;background:color-mix(in srgb,currentColor 18%,transparent);margin:var(--__P__-space-4) 0}.__P__-md table{border-collapse:collapse;margin:var(--__P__-space-3) 0;font-size:.95em;display:block;overflow-x:auto;max-width:100%;font-variant-numeric:tabular-nums}.__P__-md th,.__P__-md td{padding:6px 10px;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);text-align:start}.__P__-md th{font-weight:700;background:color-mix(in srgb,currentColor 6%,transparent)}.__P__-md h1+ul,.__P__-md h1+ol,.__P__-md h2+ul,.__P__-md h2+ol,.__P__-md h3+ul,.__P__-md h3+ol,.__P__-md h4+ul,.__P__-md h4+ol{margin-top:var(--__P__-space-1)}.__P__-loading{display:inline-flex;align-items:center;gap:var(--__P__-space-2);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-loading-spinner{width:14px;height:14px;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:__P__-spin .8s linear infinite}@keyframes __P__-spin{to{transform:rotate(1turn)}}.__P__-typing{display:inline-flex;gap:var(--__P__-space-1);padding:var(--__P__-space-1) 0}.__P__-typing span{width:5px;height:5px;border-radius:999px;background:currentColor;opacity:.4;animation:__P__-blink 1.2s var(--__P__-ease) infinite}.__P__-typing span:nth-child(2){animation-delay:.2s}.__P__-typing span:nth-child(3){animation-delay:.4s}@keyframes __P__-blink{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}.__P__-reasoning{margin:var(--__P__-space-1) 0 var(--__P__-space-2);padding-inline-start:var(--__P__-space-3);border-inline-start:2px solid var(--__P__-border-strong)}.__P__-reasoning-summary{display:inline-flex;align-items:center;gap:var(--__P__-space-1);cursor:pointer;list-style:none;user-select:none;color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-reasoning-summary:hover{color:var(--__P__-fg)}.__P__-reasoning-summary:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;border-radius:var(--__P__-radius-sm)}.__P__-reasoning-summary::-webkit-details-marker{display:none}.__P__-reasoning-summary:before{content:"";width:5px;height:5px;border-inline-end:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.7;transition:transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-reasoning[open] .__P__-reasoning-summary:before{transform:rotate(45deg)}.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:__P__-reasoning-pulse 1.4s var(--__P__-ease) infinite}@keyframes __P__-reasoning-pulse{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:none}}.__P__-reasoning-body{margin-top:var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-reasoning-body>:first-child{margin-top:0}.__P__-reasoning-body>:last-child{margin-bottom:0}.__P__-tool-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2);margin-top:6px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs)}.__P__-composer{border-top:1px solid var(--__P__-border);padding:10px 12px;background:var(--__P__-bg);display:flex;flex-direction:column;gap:var(--__P__-space-2)}.__P__-composer-row{display:flex;align-items:flex-end;gap:6px}.__P__-textarea{flex:1;height:40px;max-height:160px;padding:10px 12px;border-radius:var(--__P__-radius);background:var(--__P__-bg-elevated);border:1px solid transparent;font-size:calc(14px * var(--__P__-text-scale));line-height:1.4;transition:height var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),box-shadow var(--__P__-dur-quick) var(--__P__-ease)}.__P__-textarea:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:1px;border-color:var(--__P__-focus)}@media(pointer:coarse){.__P__-textarea,.__P__-home-search-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}.__P__-textarea{height:44px}}.__P__-send{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease)}.__P__-send[data-shape=circle]{border-radius:999px}.__P__-send[data-shape=square]{border-radius:var(--__P__-radius-sm)}.__P__-send[data-shape=pill]{width:auto;padding:0 18px;border-radius:999px}.__P__-send[data-variant=filled]{background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-send[data-variant=outline]{background:transparent;color:var(--__P__-accent);border-color:var(--__P__-accent)}.__P__-send[data-variant=outline]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 10%,transparent)}.__P__-send[data-variant=ghost]{background:transparent;color:var(--__P__-accent)}.__P__-send[data-variant=ghost]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 8%,transparent)}.__P__-send:disabled{opacity:.4;cursor:not-allowed}.__P__-send:not(:disabled):hover{transform:translateY(-1px)}.__P__-send:not(:disabled):active{transform:translateY(0)}.__P__-send:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-send svg{width:18px;height:18px}.__P__-composer-actions{display:flex;gap:var(--__P__-space-1);flex-wrap:wrap}.__P__-attachments{display:flex;flex-wrap:wrap;gap:6px}.__P__-attachment-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-1);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);font-size:var(--__P__-text-xs);max-width:200px}.__P__-attachment-thumb{width:24px;height:24px;border-radius:999px;object-fit:cover;background:var(--__P__-border)}.__P__-attachment-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-attachment-remove{width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted)}.__P__-attachment-remove:hover{background:var(--__P__-border);color:var(--__P__-fg)}.__P__-dropzone{position:absolute;inset:8px;border:2px dashed var(--__P__-accent);border-radius:var(--__P__-radius);background:color-mix(in srgb,var(--__P__-accent) 8%,transparent);display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--__P__-accent);pointer-events:none;z-index:10;animation:__P__-fade-in var(--__P__-dur-quick) var(--__P__-ease)}@keyframes __P__-fade-in{0%{opacity:0}to{opacity:1}}.__P__-error{margin-top:var(--__P__-space-1);padding:8px 10px;border-radius:var(--__P__-radius-sm);background:var(--__P__-danger-bg);color:var(--__P__-danger-text);font-size:var(--__P__-text-sm);display:flex;align-items:center;gap:var(--__P__-space-2)}.__P__-error button{color:inherit;text-decoration:underline;font-size:var(--__P__-text-sm)}.__P__-history{flex:1;overflow-y:auto;padding:var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-3)}.__P__-history-footer{flex:none;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);border-top:1px solid var(--__P__-border);background:var(--__P__-surface)}.__P__-history-new{width:100%;display:flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);padding:var(--__P__-space-2) var(--__P__-space-3);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-on-accent);cursor:pointer;font-size:var(--__P__-text-sm);font-weight:600;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-history-new svg{width:16px;height:16px}.__P__-history-new:hover{filter:brightness(1.08)}.__P__-history-new:active{transform:translateY(1px)}.__P__-history-new:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-history-empty{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 16px;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));text-align:center}.__P__-history-group{display:flex;flex-direction:column;padding:0 var(--__P__-space-3)}.__P__-history-heading{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);padding:14px 4px 8px;text-transform:uppercase;letter-spacing:.04em}.__P__-history-card{display:flex;flex-direction:column;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);overflow:hidden}.__P__-history-item{all:unset;display:flex;align-items:center;gap:var(--__P__-space-3);padding:12px var(--__P__-space-3);cursor:pointer;transition:background var(--__P__-dur-base) var(--__P__-ease)}.__P__-history-item+.__P__-history-item{border-top:1px solid var(--__P__-border)}.__P__-history-item:hover{background:var(--__P__-bg-elevated)}.__P__-history-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-history-avatar{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:color-mix(in oklab,var(--__P__-accent) 12%,transparent);color:var(--__P__-accent)}.__P__-history-avatar svg{width:18px;height:18px}.__P__-history-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.__P__-history-row{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-2)}.__P__-history-title{flex:1;min-width:0;font-size:calc(14px * var(--__P__-text-scale));font-weight:500;color:var(--__P__-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-time{flex:none;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-history-preview{flex:1;min-width:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--__P__-accent)}.__P__-history-item[data-unread=true] .__P__-history-title{font-weight:600}.__P__-history-item[data-closed=true] .__P__-history-title{color:var(--__P__-fg-muted)}.__P__-history-skeleton-item{display:flex;align-items:center;gap:var(--__P__-space-3);padding:12px var(--__P__-space-3)}.__P__-history-skeleton-item+.__P__-history-skeleton-item{border-top:1px solid var(--__P__-border)}.__P__-history-skeleton-avatar{flex:none;width:36px;height:36px;border-radius:50%}.__P__-history-skeleton-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:7px}.__P__-history-skeleton-line{height:9px;border-radius:4px}.__P__-skeleton-heading{width:52px;height:8px}.__P__-skeleton-title{width:45%}.__P__-skeleton-preview{width:78%}.__P__-history-skeleton-avatar,.__P__-history-skeleton-line{background:linear-gradient(90deg,color-mix(in oklab,var(--__P__-fg) 9%,transparent) 30%,color-mix(in oklab,var(--__P__-fg) 17%,transparent),color-mix(in oklab,var(--__P__-fg) 9%,transparent) 70%);background-size:200% 100%;animation:__P__-skeleton-shimmer 1.8s ease-in-out infinite}@keyframes __P__-skeleton-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.__P__-history-skeleton-avatar,.__P__-history-skeleton-line{animation:none}}.__P__-list-loading{margin:auto;padding:var(--__P__-space-6) var(--__P__-space-4);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);text-align:center}.__P__-readonly-banner{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 12px;margin:0 var(--__P__-space-3) var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);text-align:center;font-size:var(--__P__-text-sm)}.__P__-readonly-label{line-height:1.4}.__P__-readonly-cta{appearance:none;border:0;cursor:pointer;padding:var(--__P__-space-2) var(--__P__-space-4);border-radius:999px;background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-readonly-cta:hover,.__P__-readonly-cta:focus-visible{filter:brightness(1.1)}.__P__-readonly-cta:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}.__P__-composer-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 16px;margin:0 var(--__P__-space-3);border-top:1px solid var(--__P__-border);text-align:center;font-size:calc(11px * var(--__P__-text-scale));line-height:1.4;color:var(--__P__-fg-muted)}.__P__-disclaimer{max-width:320px;margin:0 auto;opacity:.9;letter-spacing:.01em}.__P__-poweredby{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:inherit;text-decoration:none;opacity:.7;transition:opacity var(--__P__-dur-base) var(--__P__-ease);font-size:calc(11px * var(--__P__-text-scale));letter-spacing:.02em}.__P__-poweredby:hover{opacity:1}.__P__-poweredby-logo{height:12px;width:auto;display:inline-block;vertical-align:middle}.__P__-poweredby-bar{flex:none;display:flex;align-items:center;justify-content:center;padding:6px 16px;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated)}.__P__-menu-wrap{position:relative;display:inline-flex}.__P__-menu{position:absolute;top:100%;inset-inline-end:0;margin-top:6px;min-width:200px;padding:6px;background:var(--__P__-bg);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);box-shadow:var(--__P__-shadow-panel);z-index:10;display:flex;flex-direction:column;gap:2px;animation:__P__-menu-in var(--__P__-dur-base) var(--__P__-ease)}@media(prefers-reduced-motion:reduce){.__P__-menu{animation:none}}@keyframes __P__-menu-in{0%{opacity:0;transform:translateY(-4px) scale(.98);transform-origin:top right}to{opacity:1;transform:none}}.__P__-menu-item{all:unset;display:flex;align-items:center;gap:10px;padding:8px 10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);border-radius:var(--__P__-radius-sm);cursor:pointer;user-select:none}.__P__-menu-item:hover{background:var(--__P__-bg-elevated)}.__P__-menu-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-menu-item[disabled]{opacity:.45;cursor:not-allowed}.__P__-menu-icon{display:inline-flex;width:16px;height:16px;color:var(--__P__-fg-muted)}.__P__-menu-icon svg{width:16px;height:16px}.__P__-menu-label{flex:1}.__P__-menu-check{display:inline-flex;color:var(--__P__-accent)}.__P__-menu-check svg{width:14px;height:14px}.__P__-menu-item-segmented{cursor:default}.__P__-menu-item-segmented:hover{background:transparent}.__P__-segmented{display:inline-flex;gap:2px;padding:2px;background:var(--__P__-bg-elevated);border-radius:var(--__P__-radius-sm)}.__P__-segment{all:unset;min-width:26px;padding:3px 8px;font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.02em;text-align:center;color:var(--__P__-fg-muted);border-radius:calc(var(--__P__-radius-sm) - 2px);cursor:pointer;transition:color .12s ease,background .12s ease}.__P__-segment:hover{color:var(--__P__-fg)}.__P__-segment[data-on=true]{background:var(--__P__-bg);color:var(--__P__-accent);box-shadow:var(--__P__-shadow-card)}.__P__-segment:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-resize-grip{position:absolute;width:18px;height:18px;display:flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);opacity:.45;transition:opacity var(--__P__-dur-base) var(--__P__-ease);z-index:2;touch-action:none;user-select:none}.__P__-resize-grip:hover,.__P__-resize-grip:focus-visible{opacity:1}.__P__-resize-grip svg{width:10px;height:10px}.__P__-resize-grip--bottom-left{bottom:2px;left:2px;cursor:nesw-resize;transform:scaleX(-1)}.__P__-resize-grip--bottom-right{bottom:2px;right:2px;cursor:nwse-resize}.__P__-resize-grip--top-left{top:2px;left:2px;cursor:nwse-resize;transform:rotate(180deg)}.__P__-resize-grip--top-right{top:2px;right:2px;cursor:nesw-resize;transform:scaleY(-1)}:host(:not([data-mode="open"])) .__P__-resize-grip{display:none}.__P__-messenger{display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-body,.__P__-messenger-pane{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-pane[hidden]{display:none}@keyframes __P__-view-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-module{display:flex;flex-direction:column;height:100%;min-height:0}@media(prefers-reduced-motion:no-preference){.__P__-module,.__P__-history{animation:__P__-view-in .18s var(--__P__-ease-out)}}.__P__-module-scroll{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-3);display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-home{container-type:inline-size;background:radial-gradient(125% 65% at 88% 0%,color-mix(in srgb,#fff 16%,transparent),transparent 55%),linear-gradient(180deg,var(--__P__-accent) 0%,var(--__P__-accent) 22%,color-mix(in srgb,var(--__P__-accent) 28%,var(--__P__-surface)) 44%,var(--__P__-surface) 70%);border-radius:var(--__P__-radius-lg) var(--__P__-radius-lg) 0 0}.__P__-home-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;background:transparent}.__P__-home-cards{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:4px 14px 16px}.__P__-module-pad{padding:var(--__P__-space-3) var(--__P__-space-3) 0}.__P__-module-empty{display:flex;flex-direction:column;align-items:center;gap:var(--__P__-space-3);padding:var(--__P__-space-8) var(--__P__-space-4);text-align:center;color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-module-retry{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border-strong);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);font-weight:600;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-module-retry:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}.__P__-module-retry:active{background:var(--__P__-border)}.__P__-module-retry:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-help-list{flex:1;min-height:0;overflow-y:auto;padding-bottom:var(--__P__-space-3)}.__P__-help-group{display:flex;flex-direction:column}.__P__-help-section-title{position:sticky;top:0;z-index:1;margin:0;padding:var(--__P__-space-3) var(--__P__-space-5) var(--__P__-space-2);font-size:var(--__P__-text-xs);font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--__P__-fg-muted);background:var(--__P__-bg)}.__P__-help-card{margin:0 var(--__P__-space-3) var(--__P__-space-3);background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden}.__P__-help-card .__P__-list-row{border-bottom:0;border-radius:0}.__P__-help-card .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-module-cta{padding:var(--__P__-space-3);border-top:1px solid var(--__P__-border)}.__P__-tabbar{display:flex;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);flex-shrink:0}.__P__-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-1);min-height:48px;padding:var(--__P__-space-2) var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;transition:color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-tab:hover{color:var(--__P__-fg)}.__P__-tab[aria-selected=true]{color:var(--__P__-accent)}.__P__-tab:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-tab:active{background:var(--__P__-hover)}.__P__-tab-icon{position:relative;display:inline-flex}.__P__-tab-icon svg{width:22px;height:22px}.__P__-tab-badge{position:absolute;top:-4px;left:calc(50% + 6px);min-width:16px;height:16px;padding:0 4px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--__P__-accent);color:var(--__P__-on-accent);font-size:calc(10px * var(--__P__-text-scale));font-weight:600;line-height:1}.__P__-home-hero{flex-shrink:0;padding:var(--__P__-space-5) var(--__P__-space-5) var(--__P__-space-3);color:var(--__P__-on-accent);--__P__-focus: var(--__P__-on-accent)}.__P__-home-hero-top{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-3);min-height:32px}.__P__-home-brand{font-size:clamp(calc(12px * var(--__P__-text-scale)),calc(3.2cqi * var(--__P__-text-scale)),calc(14px * var(--__P__-text-scale)));font-weight:600;letter-spacing:.01em;color:color-mix(in srgb,#fff 82%,transparent);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.__P__-home-brand-spacer{flex:1}.__P__-home-hero-actions{display:flex;align-items:center;gap:var(--__P__-space-2);flex-shrink:0}.__P__-home-hero-actions .__P__-icon-btn{color:#fff}.__P__-home-hero-actions .__P__-icon-btn:hover{background:color-mix(in srgb,#fff 18%,transparent);color:#fff}.__P__-home-hero-actions .__P__-icon-btn:active{background:color-mix(in srgb,#fff 26%,transparent)}.__P__-home-greeting{margin:28px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(19px * var(--__P__-text-scale)),calc(5.5cqi * var(--__P__-text-scale)),var(--__P__-text-2xl));font-weight:800;line-height:1.18;letter-spacing:-.01em;overflow-wrap:anywhere}.__P__-home-lead{margin:10px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(15px * var(--__P__-text-scale)),calc(4.2cqi * var(--__P__-text-scale)),var(--__P__-text-xl));font-weight:600;line-height:1.25;letter-spacing:-.005em;color:color-mix(in srgb,var(--__P__-on-accent) 78%,transparent);overflow-wrap:anywhere}.__P__-home-avatars{display:flex}.__P__-home-avatar{width:30px;height:30px;border-radius:999px;overflow:hidden;margin-inline-start:-10px;border:2px solid color-mix(in srgb,#fff 92%,transparent);box-shadow:0 1px 3px #0000002e;background:var(--__P__-surface);display:inline-flex;align-items:center;justify-content:center;font-size:var(--__P__-text-xs);font-weight:700;color:var(--__P__-fg)}.__P__-home-avatar:first-child{margin-inline-start:0}.__P__-home-avatar img{width:100%;height:100%;object-fit:cover}.__P__-home-content{background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-card);overflow:hidden}.__P__-home-content-title{padding:var(--__P__-space-4) var(--__P__-space-4) var(--__P__-space-3);font-size:var(--__P__-text-sm);font-weight:700}.__P__-home-content-list{display:flex;flex-direction:column;padding:0 var(--__P__-space-2) var(--__P__-space-2)}.__P__-home-content-list .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-home-card{display:block;width:100%;text-align:start;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);padding:var(--__P__-space-4);box-shadow:var(--__P__-shadow-card)}.__P__-home-card[data-interactive=true]{cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-home-card[data-interactive=true]:hover{background:var(--__P__-bg-elevated)}.__P__-home-card[data-interactive=true]:active{transform:translateY(1px)}.__P__-home-card[data-interactive=true]:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-recent-row{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-recent-avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:999px;background:color-mix(in oklch,var(--__P__-accent) 14%,transparent);color:var(--__P__-accent)}.__P__-home-recent-avatar svg{width:20px;height:20px}.__P__-home-recent-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.__P__-home-recent-title{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-recent-preview{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-home-recent-at{color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);flex-shrink:0}.__P__-home-recent-dot{width:8px;height:8px;border-radius:999px;background:var(--__P__-accent);flex-shrink:0}.__P__-home-recent-row[data-unread=true] .__P__-home-recent-title{font-weight:700}.__P__-home-status{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-status-icon svg{width:22px;height:22px;color:var(--__P__-success)}.__P__-home-status[data-level=degraded] .__P__-home-status-icon svg{color:var(--__P__-warning)}.__P__-home-status[data-level=down] .__P__-home-status-icon svg{color:var(--__P__-danger)}.__P__-home-status-text{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search{display:flex;align-items:center;gap:var(--__P__-space-2);width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);border:1px solid var(--__P__-border);background:var(--__P__-surface);text-align:start}.__P__-home-search[data-input=true]{background:var(--__P__-bg-elevated)}.__P__-home-search:hover{border-color:var(--__P__-border-strong)}.__P__-home-search:focus-visible,.__P__-home-search:focus-within{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-search-text{flex:1;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search-input{flex:1;border:0;background:transparent;font-size:calc(14px * var(--__P__-text-scale));color:var(--__P__-fg);outline:none}.__P__-home-search-icon svg{width:18px;height:18px;color:var(--__P__-accent)}.__P__-list-row{display:flex;align-items:center;gap:var(--__P__-space-3);width:100%;min-height:44px;text-align:start;padding:var(--__P__-space-3) var(--__P__-space-2);border-radius:var(--__P__-radius-sm)}.__P__-list-row:hover{background:var(--__P__-hover)}.__P__-list-row:active{background:var(--__P__-border)}.__P__-list-row:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-list-row-body{display:flex;flex-direction:column;min-width:0;flex:1}.__P__-list-row-title{font-weight:600;font-size:var(--__P__-text-md);line-height:1.35}.__P__-list-row-sub{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);margin-top:var(--__P__-space-1);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-list-row-chevron svg{width:18px;height:18px;color:var(--__P__-accent);flex-shrink:0}.__P__-back-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);flex-shrink:0}.__P__-back-title{flex:1;text-align:center;font-size:var(--__P__-text-md);font-weight:700;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-back-spacer{width:32px;height:1px}.__P__-content{display:flex;flex-direction:column;gap:14px;width:100%;max-width:68ch;margin:0 auto}.__P__-content-hero{width:100%;border-radius:var(--__P__-radius)}.__P__-content-subtitle{color:var(--__P__-fg-muted);margin:0}.__P__-content-frame{flex:1;min-height:0;width:100%;border:0;background:#fff}.__P__-news-list{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-news-card{display:block;width:100%;text-align:start;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden;background:var(--__P__-surface)}.__P__-news-card{transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-news-card:hover{background:var(--__P__-bg-elevated)}.__P__-news-card:active{transform:translateY(1px)}.__P__-news-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-news-hero{width:100%;display:block}.__P__-news-body{display:flex;flex-direction:column;gap:6px;padding:14px 16px}.__P__-news-title{font-weight:700;font-size:var(--__P__-text-md)}.__P__-news-summary{color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-modules-empty{display:flex;align-items:center;justify-content:center;position:relative}.__P__-modules-empty-close{position:absolute;top:12px;inset-inline-end:12px}.__P__-modules-empty-text{color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-form{display:flex;flex-direction:column;gap:var(--__P__-space-4)}.__P__-field{display:flex;flex-direction:column;gap:6px}.__P__-field-label{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-field-req{color:var(--__P__-danger)}.__P__-field-input{width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);color:var(--__P__-fg);font:inherit;font-size:var(--__P__-text-sm);resize:vertical;transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-field-input:focus-visible{outline:none;border-color:var(--__P__-accent)}.__P__-field[data-invalid=true] .__P__-field-input{border-color:var(--__P__-danger)}.__P__-field-input[type=date],.__P__-field-input[type=time]{appearance:none;-webkit-appearance:none}@media(pointer:coarse){.__P__-field-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}}.__P__-field-hint{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-field-error{font-size:var(--__P__-text-xs);color:var(--__P__-danger)}.__P__-field-choices{display:flex;flex-direction:column;gap:10px;padding-top:2px}.__P__-choice{display:flex;align-items:flex-start;gap:10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);cursor:pointer}.__P__-choice input{margin-top:2px;accent-color:var(--__P__-accent)}.__P__-form-actions{display:flex;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}.__P__-form-submit,.__P__-tool-approve{padding:var(--__P__-space-2) var(--__P__-space-4);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);cursor:pointer;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-submit:hover:not(:disabled),.__P__-tool-approve:hover:not(:disabled){filter:brightness(1.06)}.__P__-form-submit:disabled{opacity:.6;cursor:default}.__P__-form-skip,.__P__-tool-reject{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:transparent;color:var(--__P__-fg-muted);font:inherit;font-size:var(--__P__-text-sm);cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-skip:hover:not(:disabled),.__P__-tool-reject:hover:not(:disabled){background:var(--__P__-bg-elevated)}.__P__-form-gate{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-form-gate-title{margin:0;font-size:var(--__P__-text-base);font-weight:700;color:var(--__P__-fg)}.__P__-form-gate-desc{margin:0 0 var(--__P__-space-1);font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-form-done{display:flex;align-items:center;justify-content:center;gap:6px;padding:6px 12px;border:1px dashed var(--__P__-border);border-radius:999px;align-self:center;font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted)}.__P__-form-done svg{width:14px;height:14px;color:var(--__P__-success, #22c55e)}.__P__-form-done[data-outcome=skipped] svg{color:var(--__P__-fg-muted)}.__P__-form-done-fill{border:0;background:none;padding:0 2px;cursor:pointer;font:inherit;font-weight:600;color:var(--__P__-accent)}.__P__-form-done-fill:hover{text-decoration:underline}details.__P__-form-done{display:block;padding:0;border-radius:var(--__P__-radius-md)}details[open].__P__-form-done{width:min(100%,420px);background:var(--__P__-surface)}.__P__-form-done-summary{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;cursor:pointer;list-style:none}.__P__-form-done-summary::-webkit-details-marker{display:none}.__P__-form-done-summary>svg:last-child{color:var(--__P__-fg-muted);transition:transform .15s var(--__P__-ease)}details[open]>.__P__-form-done-summary>svg:last-child{transform:rotate(90deg)}.__P__-form-answers{margin:0;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);display:grid;gap:var(--__P__-space-3);text-align:start}.__P__-form-answer{display:grid;gap:6px}.__P__-form-answer dt{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-form-answer dd{margin:0;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);font-size:var(--__P__-text-sm);font-weight:400;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-tool-ask-input,.__P__-tool-approval{display:flex;flex-direction:column;gap:var(--__P__-space-2);margin-top:6px;padding:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-tool-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.__P__-tool-badge{padding:2px 8px;border-radius:999px;background:var(--__P__-warning, #f59e0b);color:#1a1206;font-size:var(--__P__-text-xs);font-weight:600}.__P__-tool-title{font-size:var(--__P__-text-sm);color:var(--__P__-fg)}.__P__-tool-question{margin:0;font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-tool-desc{margin:0;font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-tool-args{margin:0;padding:var(--__P__-space-2);max-height:160px;overflow:auto;border-radius:var(--__P__-radius-sm);background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);white-space:pre-wrap;word-break:break-word}.__P__-tool-stale-note{margin:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-tool-decided{flex-direction:row;align-items:center;flex-wrap:wrap;gap:8px}.__P__-tool-decided-label{padding:2px 8px;border-radius:999px;background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-tool-decided-label[data-approved=true]{color:var(--__P__-success, #16a34a);border-color:var(--__P__-success, #16a34a)}.__P__-tool-decided-label[data-approved=false]{color:var(--__P__-danger);border-color:var(--__P__-danger)}.__P__-tool-decided-value{font-size:var(--__P__-text-sm);color:var(--__P__-fg)}:host([dir="rtl"]) .__P__-icon-dir{transform:scaleX(-1)}:host([dir="rtl"]) .__P__-field-input[type=date],:host([dir="rtl"]) .__P__-field-input[type=time]{position:relative;text-align:right;padding-left:34px}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-datetime-edit,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-datetime-edit{text-align:right}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-calendar-picker-indicator,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-calendar-picker-indicator{position:absolute;left:var(--__P__-space-3);margin:0}\n';
1241
+ var panel_default = '.__P__-anchor{color-scheme:var(--__P__-color-scheme, light);right:16px;bottom:16px}.__P__-surface{display:contents}.__P__-surface[hidden]{display:none}:host([data-position="bottom-left"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{right:auto;left:16px}:host([data-position="top-right"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{bottom:auto;top:16px}.__P__-anchor{position:fixed;display:flex;flex-direction:column;align-items:flex-end;gap:var(--__P__-space-3);pointer-events:none}.__P__-anchor{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=sm]{--__P__-fab-size: 44px}.__P__-anchor[data-launcher-size=md]{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=lg]{--__P__-fab-size: 68px}.__P__-anchor>*{pointer-events:auto}.__P__-fab[data-size=sm]{--__P__-fab-size: 44px;font-size:var(--__P__-text-sm)}.__P__-fab[data-size=md]{--__P__-fab-size: 56px;font-size:calc(14px * var(--__P__-text-scale))}.__P__-fab[data-size=lg]{--__P__-fab-size: 68px;font-size:var(--__P__-text-base)}.__P__-fab{display:inline-flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);color:var(--__P__-accent-text);background:var(--__P__-accent);box-shadow:var(--__P__-shadow-fab);font-weight:600;line-height:1;transform-origin:bottom right;animation:__P__-fab-in var(--__P__-dur-base) var(--__P__-ease) both;transition:transform var(--__P__-dur-base) var(--__P__-ease),opacity var(--__P__-dur-base) var(--__P__-ease),box-shadow var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab:hover{transform:translateY(-2px)}.__P__-fab:active{transform:translateY(0)}.__P__-fab:focus-visible{outline:2px solid var(--__P__-on-accent);outline-offset:3px}.__P__-fab svg{width:24px;height:24px;flex-shrink:0}@keyframes __P__-fab-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}.__P__-fab[data-leaving]{position:absolute;right:0;bottom:0;animation:__P__-fab-out var(--__P__-dur-quick) var(--__P__-ease) forwards;pointer-events:none}:host([data-position^="top-"]) .__P__-fab[data-leaving]{bottom:auto;top:0}:host([data-position$="-left"]) .__P__-fab[data-leaving]{right:auto;left:0}@keyframes __P__-fab-out{0%{opacity:1;transform:none}to{opacity:0;transform:scale(.85)}}.__P__-fab[data-variant=circle]{width:var(--__P__-fab-size);height:var(--__P__-fab-size);border-radius:999px}.__P__-fab[data-variant=circle] .__P__-fab-label{display:none}.__P__-fab[data-variant=pill]{height:var(--__P__-fab-size);padding:0 18px 0 16px;border-radius:999px}.__P__-fab[data-variant=bar]{height:var(--__P__-fab-size);padding:0 22px;border-radius:var(--__P__-radius)}.__P__-fab[data-variant=minimal]{height:var(--__P__-fab-size);padding:0 var(--__P__-space-4);border-radius:999px;background:transparent;color:var(--__P__-accent);box-shadow:none;border:1px solid currentColor}.__P__-fab[data-variant=minimal]:hover{background:color-mix(in srgb,var(--__P__-accent) 12%,transparent)}.__P__-callout{--__P__-callout-fab-h: var(--__P__-fab-size, 56px);--__P__-callout-gap: clamp(12px, calc(var(--__P__-callout-fab-h) * .25), 22px);--__P__-callout-nudge-direction: -1;position:absolute;display:inline-flex;align-items:center;gap:var(--__P__-space-2);padding:10px 14px;background:var(--__P__-fg);color:var(--__P__-bg);border-radius:999px;font-size:var(--__P__-text-sm);font-weight:600;line-height:1.2;box-shadow:0 10px 30px -8px #00000059;pointer-events:auto;animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease);z-index:1;max-width:240px;white-space:nowrap}.__P__-callout[data-position=left]{right:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%)}.__P__-callout[data-position=right]{left:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%);--__P__-callout-nudge-direction: 1}.__P__-callout[data-position=top]{bottom:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-position=bottom]{top:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}:host([data-position$="-left"]) .__P__-callout[data-position=top],:host([data-position$="-left"]) .__P__-callout[data-position=bottom]{right:auto;left:0}.__P__-callout[data-shape=bubble]{border-radius:var(--__P__-radius-md);white-space:normal;width:max-content;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-shape=callout]{padding:12px 18px;font-size:calc(14px * var(--__P__-text-scale));background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-callout:after{content:"";position:absolute;width:12px;height:12px;background:inherit;border-radius:2px;transform:rotate(45deg)}.__P__-callout[data-position=left]:after{right:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=right]:after{left:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=top]:after{bottom:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-position=bottom]:after{top:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}:host([data-position$="-left"]) .__P__-callout[data-position=top]:after,:host([data-position$="-left"]) .__P__-callout[data-position=bottom]:after{right:auto;left:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-animated]{animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease),__P__-callout-nudge 1.6s var(--__P__-ease-in-out) var(--__P__-dur-slow) infinite}@keyframes __P__-callout-in{0%{opacity:0}to{opacity:1}}@keyframes __P__-callout-nudge{0%,to{margin-left:0;margin-right:0}50%{margin-left:calc(6px * var(--__P__-callout-nudge-direction));margin-right:calc(-6px * var(--__P__-callout-nudge-direction))}}@media(prefers-reduced-motion:reduce){.__P__-callout[data-animated]{animation:__P__-callout-in 1ms var(--__P__-ease)}.__P__-icon-btn[data-recording=true],.__P__-typing span{animation:none}}.__P__-callout-close{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;color:inherit;opacity:.7;cursor:pointer}.__P__-callout-close:hover{opacity:1;background:color-mix(in srgb,currentColor 15%,transparent)}.__P__-callout-close:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-callout-close svg{width:12px;height:12px}.__P__-panel{width:var(--__P__-panel-w);height:var(--__P__-panel-h);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);background:var(--__P__-bg);color:var(--__P__-fg);border-radius:var(--__P__-radius-lg);box-shadow:var(--__P__-shadow-panel);display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;animation:__P__-panel-in var(--__P__-dur-slow) var(--__P__-ease);border:1px solid var(--__P__-border)}@media(prefers-reduced-motion:no-preference){.__P__-panel{transition:width var(--__P__-dur-base) var(--__P__-ease),height var(--__P__-dur-base) var(--__P__-ease),max-width var(--__P__-dur-base) var(--__P__-ease),max-height var(--__P__-dur-base) var(--__P__-ease)}.__P__-panel[data-resizing]{transition:none}}:host([data-mode="open"]) .__P__-panel{width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));min-width:var(--__P__-resize-min-w, auto);min-height:var(--__P__-resize-min-h, auto);max-width:var(--__P__-resize-max-w, calc(100vw - 32px) );max-height:var(--__P__-resize-max-h, calc(100dvh - 32px) )}@keyframes __P__-panel-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}:host([data-mode="expanded"]) .__P__-panel{width:var(--__P__-expanded-w, 640px);height:var(--__P__-expanded-h, 820px);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}:host([data-mode="fullscreen"]){z-index:var(--__P__-z-panel)!important}:host([data-mode="fullscreen"]) .__P__-anchor{inset:0;padding:0;justify-content:flex-end;align-items:flex-end}:host([data-mode="fullscreen"][data-position*="top"]) .__P__-anchor{justify-content:flex-start}:host([data-mode="fullscreen"][data-position*="left"]) .__P__-anchor{align-items:flex-start}:host([data-mode="fullscreen"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}:host([data-mode="fullscreen"]) .__P__-fab{display:none}@media(max-width:640px){:host([data-mode="open"]) .__P__-anchor,:host([data-mode="expanded"]) .__P__-anchor{inset:0;align-items:stretch;padding:0}:host([data-mode="open"]) .__P__-panel,:host([data-mode="expanded"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}}:host([data-mode="inline"]) .__P__-anchor,:host([data-mode="standalone"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-height:0}:host([data-mode="inline"]) .__P__-panel,:host([data-mode="standalone"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;animation:none}:host([data-mode="inline"]) .__P__-fab,:host([data-mode="standalone"]) .__P__-fab{display:none}:host([data-mode="inline"]){min-height:320px}:host([data-mode="inline"]) .__P__-panel{border-radius:var(--__P__-radius)}:host([data-mode="standalone"]) .__P__-panel{border-radius:0;border:0;box-shadow:none}:host([data-mode="modal"]){position:fixed!important;inset:0!important;z-index:var(--__P__-z-panel)!important;display:block!important;width:100vw;height:100dvh;background:var(--__P__-modal-backdrop, var(--__P__-backdrop));animation:__P__-backdrop-in var(--__P__-dur-base) var(--__P__-ease) both;--__P__-panel-w: min(960px, 92vw);--__P__-panel-h: min(720px, 88dvh)}:host([data-mode="modal"]) .__P__-anchor{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--__P__-space-6);pointer-events:none}:host([data-mode="modal"]) .__P__-panel{pointer-events:auto;width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);min-width:0;min-height:0;border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-panel);animation:__P__-modal-in var(--__P__-dur-base) var(--__P__-ease);translate:var(--__P__-modal-dx, 0px) var(--__P__-modal-dy, 0px)}:host([data-mode="modal"]) .__P__-header,:host([data-mode="modal"]) .__P__-back-header,:host([data-mode="modal"]) .__P__-home-hero{cursor:grab;touch-action:none}:host([data-mode="modal"]) .__P__-panel[data-dragging]{cursor:grabbing;user-select:none}:host([data-mode="modal"]) .__P__-panel[data-dragging] *{cursor:grabbing}:host([data-mode="modal"]) .__P__-fab{display:none}@keyframes __P__-backdrop-in{0%{background:#0000}to{background:var(--__P__-modal-backdrop, var(--__P__-backdrop))}}@keyframes __P__-modal-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}:host([data-mode="drawer"]){--__P__-panel-w: min(440px, calc(100vw - 32px) );--__P__-panel-h: 100dvh}:host([data-mode="drawer"]) .__P__-anchor{position:fixed;--__P__-inset-x: var(--__P__-panel-inset, 12px);--__P__-inset-y: var(--__P__-panel-inset, 3dvh);top:var(--__P__-inset-y);bottom:auto;right:var(--__P__-inset-x);left:auto;width:min(var(--__P__-widget-w, var(--__P__-panel-w)),calc(100vw - var(--__P__-inset-x) * 2));height:min(var(--__P__-widget-h, var(--__P__-panel-h)),calc(100dvh - var(--__P__-inset-y) * 2));padding:0;display:block;pointer-events:auto}:host([data-mode="drawer"][data-position$="-left"]) .__P__-anchor{right:auto;left:var(--__P__-inset-x)}:host([data-mode="drawer"][data-position^="bottom-"]) .__P__-anchor{top:auto;bottom:var(--__P__-inset-y)}:host([data-mode="drawer"]) .__P__-panel{width:100%;height:100%;max-width:none;max-height:none;min-width:0;min-height:0;border-radius:var(--__P__-radius, 12px);border:1px solid var(--__P__-border);box-shadow:-8px 16px 32px -12px #00000038;animation:__P__-drawer-in var(--__P__-dur-base) var(--__P__-ease)}:host([data-mode="drawer"][data-position$="-left"]) .__P__-panel{box-shadow:8px 16px 32px -12px #00000038;animation:__P__-drawer-in-left var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab[data-edge-tab]{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-2);position:fixed;top:50%;height:140px;width:auto;min-width:0;padding:10px 8px;writing-mode:vertical-rl;text-orientation:mixed;transform:translateY(-50%);transform-origin:center;animation:__P__-edge-tab-in var(--__P__-dur-base) var(--__P__-ease) both}.__P__-fab[data-edge-tab] svg{writing-mode:horizontal-tb}.__P__-fab[data-edge-tab]:hover{transform:translateY(-50%) scale(1.03)}.__P__-fab[data-edge-tab]:active{transform:translateY(-50%) scale(.97)}:host([data-position$="-right"]) .__P__-fab[data-edge-tab]{right:0;left:auto;border-radius:12px 0 0 12px;box-shadow:-6px 0 18px -8px #0000004d}:host([data-position$="-left"]) .__P__-fab[data-edge-tab]{left:0;right:auto;border-radius:0 12px 12px 0;box-shadow:6px 0 18px -8px #0000004d}.__P__-fab[data-edge-tab][data-leaving]{position:fixed;top:50%;bottom:auto;animation:__P__-edge-tab-out var(--__P__-dur-quick) var(--__P__-ease) forwards}@keyframes __P__-edge-tab-in{0%{opacity:0;transform:translateY(-50%) scale(.9)}to{opacity:1;transform:translateY(-50%) scale(1)}}@keyframes __P__-edge-tab-out{0%{opacity:1;transform:translateY(-50%) scale(1)}to{opacity:0;transform:translateY(-50%) scale(.85)}}@keyframes __P__-drawer-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes __P__-drawer-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){:host([data-mode="drawer"]) .__P__-panel,.__P__-fab[data-edge-tab]{animation:none}}.__P__-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);background:var(--__P__-bg)}.__P__-header h1{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;flex:1;letter-spacing:-.01em}.__P__-header-actions{margin-inline-start:auto;display:flex;align-items:center;gap:var(--__P__-space-1);flex-shrink:0}.__P__-agent{flex:1;display:inline-flex;align-items:center;gap:10px;min-width:0}.__P__-agent-avatar{position:relative;width:32px;height:32px;border-radius:999px;background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:var(--__P__-text-xs);overflow:hidden;flex-shrink:0}.__P__-agent-avatar img{width:100%;height:100%;object-fit:cover}.__P__-agent-avatar:after{content:"";position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:999px;border:2px solid var(--__P__-bg);background:var(--__P__-neutral)}.__P__-agent-avatar[data-status=online]:after{background:var(--__P__-success)}.__P__-agent-avatar[data-status=away]:after{background:var(--__P__-warning)}.__P__-agent-avatar[data-status=offline]:after{background:var(--__P__-neutral)}.__P__-agent-meta{display:flex;flex-direction:column;line-height:1.15;min-width:0}.__P__-agent-meta strong{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-agent-meta span{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-suggestions{display:flex;flex-wrap:nowrap;gap:var(--__P__-space-2);padding:6px 14px 10px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x proximity;scrollbar-width:none;-ms-overflow-style:none;min-width:0}.__P__-suggestions::-webkit-scrollbar{display:none}.__P__-suggestions:before,.__P__-suggestions:after{content:"";flex:1 1 0;min-width:0}.__P__-suggestion{flex:0 0 auto;scroll-snap-align:center;padding:7px 14px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg);font-size:var(--__P__-text-sm);font-weight:500;white-space:nowrap;transition:background var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-suggestion:hover{border-color:var(--__P__-accent);color:var(--__P__-accent);transform:translateY(-1px)}.__P__-suggestion:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px;border-color:var(--__P__-accent)}.__P__-suggestion:active{transform:translateY(0)}.__P__-icon-btn{width:32px;height:32px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);transition:background var(--__P__-dur-quick) var(--__P__-ease),color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-icon-btn:hover{background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-icon-btn:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-icon-btn:active{background:var(--__P__-border)}.__P__-icon-btn:disabled{opacity:.45;cursor:not-allowed}.__P__-icon-btn:before{content:"";position:absolute;inset:-6px}.__P__-icon-btn{position:relative}.__P__-icon-btn svg{width:18px;height:18px}.__P__-icon-btn[data-recording=true]{color:var(--__P__-accent);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);animation:__P__-pulse 1.2s var(--__P__-ease) infinite}@keyframes __P__-pulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--__P__-accent) 40%,transparent)}50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--__P__-accent) 0%,transparent)}}.__P__-list,.__P__-history,.__P__-module-scroll,.__P__-home-scroll,.__P__-help-list,.__P__-tool-args,.__P__-sidebar-conversations{scrollbar-width:thin;scrollbar-color:var(--__P__-border-strong) transparent;overscroll-behavior:contain;scrollbar-gutter:stable}.__P__-list::-webkit-scrollbar,.__P__-history::-webkit-scrollbar,.__P__-module-scroll::-webkit-scrollbar,.__P__-home-scroll::-webkit-scrollbar,.__P__-help-list::-webkit-scrollbar,.__P__-tool-args::-webkit-scrollbar,.__P__-sidebar-conversations::-webkit-scrollbar{width:8px}.__P__-list::-webkit-scrollbar-thumb,.__P__-history::-webkit-scrollbar-thumb,.__P__-module-scroll::-webkit-scrollbar-thumb,.__P__-home-scroll::-webkit-scrollbar-thumb,.__P__-help-list::-webkit-scrollbar-thumb,.__P__-tool-args::-webkit-scrollbar-thumb,.__P__-sidebar-conversations::-webkit-scrollbar-thumb{background:var(--__P__-border-strong);border-radius:8px}.__P__-list-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.__P__-jump{position:absolute;inset-inline-end:14px;bottom:14px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;border:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);color:var(--__P__-fg);box-shadow:var(--__P__-shadow-panel);cursor:pointer;opacity:.85;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease);animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-jump:hover{opacity:1}.__P__-jump:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;opacity:1}.__P__-jump:active{transform:translateY(1px)}.__P__-jump svg{width:18px;height:18px}.__P__-list{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-4);padding-bottom:var(--__P__-space-8);display:flex;flex-direction:column;gap:14px}.__P__-date-divider{position:sticky;top:var(--__P__-space-2);z-index:2;display:flex;justify-content:center;align-items:flex-start;height:0;margin:0;pointer-events:none}.__P__-date-pill{padding:3px 10px;border-radius:999px;font-size:calc(11px * var(--__P__-text-scale));font-weight:600;color:var(--__P__-fg-muted);background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);box-shadow:var(--__P__-shadow-card);opacity:0;pointer-events:none;transition:opacity var(--__P__-dur-base) var(--__P__-ease)}.__P__-list[data-scrolling=true] .__P__-date-pill{opacity:1;pointer-events:auto}@media(prefers-reduced-motion:reduce){.__P__-date-pill{transition:none}}.__P__-bubble-row{display:flex}.__P__-bubble-row[data-role=user]{justify-content:flex-end}.__P__-bubble-row[data-role=assistant]{justify-content:flex-start}.__P__-bubble{max-width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);line-height:1.6;font-size:calc(14px * var(--__P__-text-scale));word-wrap:break-word;overflow-wrap:anywhere;box-shadow:0 1px 2px #0000000a,0 1px 8px -4px #0000000f;animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-bubble ::selection{background:color-mix(in srgb,var(--__P__-accent) 30%,transparent)}.__P__-bubble-row[data-role=user] .__P__-bubble ::selection{background:#fff6;color:var(--__P__-bubble-user-text)}@keyframes __P__-bubble-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-bubble-row[data-role=user] .__P__-bubble{background:var(--__P__-bubble-user);color:var(--__P__-bubble-user-text);border-end-end-radius:5px}.__P__-bubble-row[data-role=assistant] .__P__-bubble{background:var(--__P__-bubble-assistant);color:var(--__P__-bubble-assistant-text);border-end-start-radius:5px}.__P__-bubble-col{display:flex;flex-direction:column;max-width:85%;min-width:0}.__P__-bubble-row[data-role=user] .__P__-bubble-col{align-items:flex-end}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col{align-items:flex-start}.__P__-bubble-time{margin-top:3px;padding:0 4px;font-size:calc(11px * var(--__P__-text-scale));line-height:1;color:var(--__P__-fg-muted);user-select:none}.__P__-md>*:first-child{margin-top:0}.__P__-md>*:last-child{margin-bottom:0}.__P__-md p{margin:10px 0}.__P__-md h1,.__P__-md h2,.__P__-md h3,.__P__-md h4,.__P__-md h5,.__P__-md h6{margin:18px 0 8px;line-height:1.3;letter-spacing:-.01em;font-weight:700}.__P__-md h1{font-size:1.4em}.__P__-md h2{font-size:1.22em}.__P__-md h3{font-size:1.08em}.__P__-md h4,.__P__-md h5,.__P__-md h6{font-size:1em}.__P__-md>h1:first-child,.__P__-md>h2:first-child,.__P__-md>h3:first-child,.__P__-md>h4:first-child,.__P__-md>h5:first-child,.__P__-md>h6:first-child{margin-top:0}.__P__-md ul,.__P__-md ol{padding-inline-start:1.5em;margin:10px 0}.__P__-md ul{list-style:disc}.__P__-md ol{list-style:decimal}.__P__-md li{margin:6px 0;padding-inline-start:2px}.__P__-md li::marker{color:var(--__P__-fg-muted)}.__P__-md li>p{margin:6px 0}.__P__-md li>ul,.__P__-md li>ol{margin:6px 0}.__P__-md strong,.__P__-md b{font-weight:650;letter-spacing:-.005em}.__P__-md em,.__P__-md i{font-style:italic}.__P__-md code{font-family:var(--__P__-font-mono);font-size:.86em;padding:1px 6px;border-radius:5px;background:color-mix(in srgb,var(--__P__-accent) 10%,transparent);color:var(--__P__-fg);border:1px solid color-mix(in srgb,var(--__P__-accent) 16%,transparent)}.__P__-md pre{font-family:var(--__P__-font-mono);font-size:calc(12.5px * var(--__P__-text-scale));padding:12px 14px;border-radius:var(--__P__-radius-sm);background:#7f7f7f1f;overflow-x:auto;margin:var(--__P__-space-3) 0;line-height:1.5}.__P__-md pre code{padding:0;background:none}.__P__-md a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.__P__-md a:hover{text-decoration-thickness:2px}.__P__-md blockquote{margin:14px 0;padding:6px 14px;border-inline-start:3px solid color-mix(in srgb,var(--__P__-accent) 50%,transparent);background:color-mix(in srgb,var(--__P__-accent) 5%,transparent);border-start-end-radius:var(--__P__-radius-sm);border-end-end-radius:var(--__P__-radius-sm);color:var(--__P__-fg-muted)}.__P__-md blockquote>:first-child{margin-top:0}.__P__-md blockquote>:last-child{margin-bottom:0}.__P__-md hr{border:0;height:1px;background:color-mix(in srgb,currentColor 18%,transparent);margin:var(--__P__-space-4) 0}.__P__-md table{border-collapse:collapse;margin:var(--__P__-space-3) 0;font-size:.95em;display:block;overflow-x:auto;max-width:100%;font-variant-numeric:tabular-nums}.__P__-md th,.__P__-md td{padding:6px 10px;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);text-align:start}.__P__-md th{font-weight:700;background:color-mix(in srgb,currentColor 6%,transparent)}.__P__-md h1+ul,.__P__-md h1+ol,.__P__-md h2+ul,.__P__-md h2+ol,.__P__-md h3+ul,.__P__-md h3+ol,.__P__-md h4+ul,.__P__-md h4+ol{margin-top:var(--__P__-space-1)}.__P__-loading{display:inline-flex;align-items:center;gap:var(--__P__-space-2);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-loading-spinner{width:14px;height:14px;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:__P__-spin .8s linear infinite}@keyframes __P__-spin{to{transform:rotate(1turn)}}.__P__-typing{display:inline-flex;gap:var(--__P__-space-1);padding:var(--__P__-space-1) 0}.__P__-typing span{width:5px;height:5px;border-radius:999px;background:currentColor;opacity:.4;animation:__P__-blink 1.2s var(--__P__-ease) infinite}.__P__-typing span:nth-child(2){animation-delay:.2s}.__P__-typing span:nth-child(3){animation-delay:.4s}@keyframes __P__-blink{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}.__P__-reasoning{margin:var(--__P__-space-1) 0 var(--__P__-space-2);padding-inline-start:var(--__P__-space-3);border-inline-start:2px solid var(--__P__-border-strong)}.__P__-reasoning-summary{display:inline-flex;align-items:center;gap:var(--__P__-space-1);cursor:pointer;list-style:none;user-select:none;color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-reasoning-summary:hover{color:var(--__P__-fg)}.__P__-reasoning-summary:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;border-radius:var(--__P__-radius-sm)}.__P__-reasoning-summary::-webkit-details-marker{display:none}.__P__-reasoning-summary:before{content:"";width:5px;height:5px;border-inline-end:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.7;transition:transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-reasoning[open] .__P__-reasoning-summary:before{transform:rotate(45deg)}.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:__P__-reasoning-pulse 1.4s var(--__P__-ease) infinite}@keyframes __P__-reasoning-pulse{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:none}}.__P__-reasoning-body{margin-top:var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-reasoning-body>:first-child{margin-top:0}.__P__-reasoning-body>:last-child{margin-bottom:0}.__P__-tool-call{margin-top:6px;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-sm);background:var(--__P__-bg-elevated);font-size:var(--__P__-text-xs)}.__P__-tool-call-summary{display:flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2);cursor:pointer;list-style:none;color:var(--__P__-fg-muted)}.__P__-tool-call-summary::-webkit-details-marker{display:none}.__P__-tool-call-section{padding:0 var(--__P__-space-2) var(--__P__-space-2)}.__P__-tool-call-label{display:block;margin-bottom:4px;color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);text-transform:uppercase;letter-spacing:.04em}.__P__-tool-call-section[data-error=true] .__P__-tool-args{color:var(--__P__-danger, #c0392b)}.__P__-source{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin-top:6px;margin-inline-end:6px;padding:var(--__P__-space-1) var(--__P__-space-2);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);text-decoration:none}a.__P__-source:hover{color:var(--__P__-fg);border-color:var(--__P__-accent)}.__P__-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-composer{border-top:1px solid var(--__P__-border);padding:10px 12px;background:var(--__P__-bg);display:flex;flex-direction:column;gap:var(--__P__-space-2)}.__P__-composer-row{display:flex;align-items:flex-end;gap:6px}.__P__-textarea{flex:1;height:40px;max-height:160px;padding:10px 12px;border-radius:var(--__P__-radius);background:var(--__P__-bg-elevated);border:1px solid transparent;font-size:calc(14px * var(--__P__-text-scale));line-height:1.4;transition:height var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),box-shadow var(--__P__-dur-quick) var(--__P__-ease)}.__P__-textarea:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:1px;border-color:var(--__P__-focus)}@media(pointer:coarse){.__P__-textarea,.__P__-home-search-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}.__P__-textarea{height:44px}}.__P__-send{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease)}.__P__-send[data-shape=circle]{border-radius:999px}.__P__-send[data-shape=square]{border-radius:var(--__P__-radius-sm)}.__P__-send[data-shape=pill]{width:auto;padding:0 18px;border-radius:999px}.__P__-send[data-variant=filled]{background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-send[data-variant=outline]{background:transparent;color:var(--__P__-accent);border-color:var(--__P__-accent)}.__P__-send[data-variant=outline]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 10%,transparent)}.__P__-send[data-variant=ghost]{background:transparent;color:var(--__P__-accent)}.__P__-send[data-variant=ghost]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 8%,transparent)}.__P__-send:disabled{opacity:.4;cursor:not-allowed}.__P__-send:not(:disabled):hover{transform:translateY(-1px)}.__P__-send:not(:disabled):active{transform:translateY(0)}.__P__-send:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-send svg{width:18px;height:18px}.__P__-composer-actions{display:flex;gap:var(--__P__-space-1);flex-wrap:wrap}.__P__-attachments{display:flex;flex-wrap:wrap;gap:6px}.__P__-attachment-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-1);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);font-size:var(--__P__-text-xs);max-width:200px}.__P__-attachment-thumb{width:24px;height:24px;border-radius:999px;object-fit:cover;background:var(--__P__-border)}.__P__-attachment-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-attachment-remove{width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted)}.__P__-attachment-remove:hover{background:var(--__P__-border);color:var(--__P__-fg)}.__P__-dropzone{position:absolute;inset:8px;border:2px dashed var(--__P__-accent);border-radius:var(--__P__-radius);background:color-mix(in srgb,var(--__P__-accent) 8%,transparent);display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--__P__-accent);pointer-events:none;z-index:10;animation:__P__-fade-in var(--__P__-dur-quick) var(--__P__-ease)}@keyframes __P__-fade-in{0%{opacity:0}to{opacity:1}}.__P__-error{margin-top:var(--__P__-space-1);padding:8px 10px;border-radius:var(--__P__-radius-sm);background:var(--__P__-danger-bg);color:var(--__P__-danger-text);font-size:var(--__P__-text-sm);display:flex;align-items:center;gap:var(--__P__-space-2)}.__P__-error button{color:inherit;text-decoration:underline;font-size:var(--__P__-text-sm)}.__P__-history{flex:1;overflow-y:auto;padding:var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-3)}.__P__-history-footer{flex:none;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);border-top:1px solid var(--__P__-border);background:var(--__P__-surface)}.__P__-history-new{width:100%;display:flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);padding:var(--__P__-space-2) var(--__P__-space-3);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-on-accent);cursor:pointer;font-size:var(--__P__-text-sm);font-weight:600;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-history-new svg{width:16px;height:16px}.__P__-history-new:hover{filter:brightness(1.08)}.__P__-history-new:active{transform:translateY(1px)}.__P__-history-new:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-history-empty{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 16px;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));text-align:center}.__P__-history-group{display:flex;flex-direction:column;padding:0 var(--__P__-space-3)}.__P__-history-heading{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);padding:14px 4px 8px;text-transform:uppercase;letter-spacing:.04em}.__P__-history-card{display:flex;flex-direction:column;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);overflow:hidden}.__P__-history-item{all:unset;display:flex;align-items:center;gap:var(--__P__-space-3);padding:12px var(--__P__-space-3);cursor:pointer;transition:background var(--__P__-dur-base) var(--__P__-ease)}.__P__-history-item+.__P__-history-item{border-top:1px solid var(--__P__-border)}.__P__-history-item:hover{background:var(--__P__-bg-elevated)}.__P__-history-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-history-avatar{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:color-mix(in oklab,var(--__P__-accent) 12%,transparent);color:var(--__P__-accent)}.__P__-history-avatar svg{width:18px;height:18px}.__P__-history-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.__P__-history-row{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-2)}.__P__-history-title{flex:1;min-width:0;font-size:calc(14px * var(--__P__-text-scale));font-weight:500;color:var(--__P__-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-time{flex:none;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-history-preview{flex:1;min-width:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--__P__-accent)}.__P__-history-item[data-unread=true] .__P__-history-title{font-weight:600}.__P__-history-item[data-closed=true] .__P__-history-title{color:var(--__P__-fg-muted)}.__P__-history-item-skeleton{cursor:default;pointer-events:none}.__P__-skeleton{display:block;border-radius:4px;background:linear-gradient(90deg,color-mix(in oklab,var(--__P__-fg) 9%,transparent) 30%,color-mix(in oklab,var(--__P__-fg) 17%,transparent),color-mix(in oklab,var(--__P__-fg) 9%,transparent) 70%);background-size:200% 100%;animation:__P__-skeleton-shimmer 1.8s ease-in-out infinite}.__P__-history-avatar.__P__-skeleton{border-radius:50%}.__P__-skeleton-heading{width:52px;height:8px}.__P__-skeleton-title{width:55%;height:12px}.__P__-skeleton-time{width:34px;height:10px}.__P__-skeleton-preview{width:80%;height:10px}@keyframes __P__-skeleton-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.__P__-skeleton{animation:none}}.__P__-list-loading{margin:auto;padding:var(--__P__-space-6) var(--__P__-space-4);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);text-align:center}.__P__-readonly-banner{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 12px;margin:0 var(--__P__-space-3) var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);text-align:center;font-size:var(--__P__-text-sm)}.__P__-readonly-label{line-height:1.4}.__P__-readonly-cta{appearance:none;border:0;cursor:pointer;padding:var(--__P__-space-2) var(--__P__-space-4);border-radius:999px;background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-readonly-cta:hover,.__P__-readonly-cta:focus-visible{filter:brightness(1.1)}.__P__-readonly-cta:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}.__P__-composer-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 16px;margin:0 var(--__P__-space-3);border-top:1px solid var(--__P__-border);text-align:center;font-size:calc(11px * var(--__P__-text-scale));line-height:1.4;color:var(--__P__-fg-muted)}.__P__-disclaimer{max-width:320px;margin:0 auto;opacity:.9;letter-spacing:.01em}.__P__-poweredby{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:inherit;text-decoration:none;opacity:.7;transition:opacity var(--__P__-dur-base) var(--__P__-ease);font-size:calc(11px * var(--__P__-text-scale));letter-spacing:.02em}.__P__-poweredby:hover{opacity:1}.__P__-poweredby-logo{height:12px;width:auto;display:inline-block;vertical-align:middle}.__P__-poweredby-bar{flex:none;display:flex;align-items:center;justify-content:center;padding:6px 16px;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated)}.__P__-menu-wrap{position:relative;display:inline-flex}.__P__-menu{position:absolute;top:100%;inset-inline-end:0;margin-top:6px;min-width:200px;padding:6px;background:var(--__P__-bg);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);box-shadow:var(--__P__-shadow-panel);z-index:10;display:flex;flex-direction:column;gap:2px;animation:__P__-menu-in var(--__P__-dur-base) var(--__P__-ease)}@media(prefers-reduced-motion:reduce){.__P__-menu{animation:none}}@keyframes __P__-menu-in{0%{opacity:0;transform:translateY(-4px) scale(.98);transform-origin:top right}to{opacity:1;transform:none}}.__P__-menu-item{all:unset;display:flex;align-items:center;gap:10px;padding:8px 10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);border-radius:var(--__P__-radius-sm);cursor:pointer;user-select:none}.__P__-menu-item:hover{background:var(--__P__-bg-elevated)}.__P__-menu-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-menu-item[disabled]{opacity:.45;cursor:not-allowed}.__P__-menu-icon{display:inline-flex;width:16px;height:16px;color:var(--__P__-fg-muted)}.__P__-menu-icon svg{width:16px;height:16px}.__P__-menu-label{flex:1}.__P__-menu-check{display:inline-flex;color:var(--__P__-accent)}.__P__-menu-check svg{width:14px;height:14px}.__P__-menu-item-segmented{cursor:default}.__P__-menu-item-segmented:hover{background:transparent}.__P__-segmented{display:inline-flex;gap:2px;padding:2px;background:var(--__P__-bg-elevated);border-radius:var(--__P__-radius-sm)}.__P__-segment{all:unset;min-width:26px;padding:3px 8px;font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.02em;text-align:center;color:var(--__P__-fg-muted);border-radius:calc(var(--__P__-radius-sm) - 2px);cursor:pointer;transition:color .12s ease,background .12s ease}.__P__-segment:hover{color:var(--__P__-fg)}.__P__-segment[data-on=true]{background:var(--__P__-bg);color:var(--__P__-accent);box-shadow:var(--__P__-shadow-card)}.__P__-segment:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-resize-grip{position:absolute;width:18px;height:18px;display:flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);opacity:.45;transition:opacity var(--__P__-dur-base) var(--__P__-ease);z-index:2;touch-action:none;user-select:none}.__P__-resize-grip:hover,.__P__-resize-grip:focus-visible{opacity:1}.__P__-resize-grip svg{width:10px;height:10px}.__P__-resize-grip--bottom-left{bottom:2px;left:2px;cursor:nesw-resize;transform:scaleX(-1)}.__P__-resize-grip--bottom-right{bottom:2px;right:2px;cursor:nwse-resize}.__P__-resize-grip--top-left{top:2px;left:2px;cursor:nwse-resize;transform:rotate(180deg)}.__P__-resize-grip--top-right{top:2px;right:2px;cursor:nesw-resize;transform:scaleY(-1)}:host(:not([data-mode="open"])) .__P__-resize-grip{display:none}.__P__-messenger{display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-body,.__P__-messenger-pane{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-pane[hidden]{display:none}@keyframes __P__-view-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-module{display:flex;flex-direction:column;height:100%;min-height:0}@media(prefers-reduced-motion:no-preference){.__P__-module,.__P__-history{animation:__P__-view-in .18s var(--__P__-ease-out)}}.__P__-module-scroll{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-3);display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-home{container-type:inline-size;background:radial-gradient(125% 65% at 88% 0%,color-mix(in srgb,#fff 16%,transparent),transparent 55%),linear-gradient(180deg,var(--__P__-accent) 0%,var(--__P__-accent) 22%,color-mix(in srgb,var(--__P__-accent) 28%,var(--__P__-surface)) 44%,var(--__P__-surface) 70%);border-radius:var(--__P__-radius-lg) var(--__P__-radius-lg) 0 0}.__P__-home-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;background:transparent}.__P__-home-cards{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:4px 14px 16px}.__P__-module-pad{padding:var(--__P__-space-3) var(--__P__-space-3) 0}.__P__-module-empty{display:flex;flex-direction:column;align-items:center;gap:var(--__P__-space-3);padding:var(--__P__-space-8) var(--__P__-space-4);text-align:center;color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-module-retry{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border-strong);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);font-weight:600;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-module-retry:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}.__P__-module-retry:active{background:var(--__P__-border)}.__P__-module-retry:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-help-list{flex:1;min-height:0;overflow-y:auto;padding-bottom:var(--__P__-space-3)}.__P__-help-group{display:flex;flex-direction:column}.__P__-help-section-title{position:sticky;top:0;z-index:1;margin:0;padding:var(--__P__-space-3) var(--__P__-space-5) var(--__P__-space-2);font-size:var(--__P__-text-xs);font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--__P__-fg-muted);background:var(--__P__-bg)}.__P__-help-card{margin:0 var(--__P__-space-3) var(--__P__-space-3);background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden}.__P__-help-card .__P__-list-row{border-bottom:0;border-radius:0}.__P__-help-card .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-module-cta{padding:var(--__P__-space-3);border-top:1px solid var(--__P__-border)}.__P__-tabbar{display:flex;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);flex-shrink:0}.__P__-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-1);min-height:48px;padding:var(--__P__-space-2) var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;transition:color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-tab:hover{color:var(--__P__-fg)}.__P__-tab[aria-selected=true]{color:var(--__P__-accent)}.__P__-tab:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-tab:active{background:var(--__P__-hover)}.__P__-tab-icon{position:relative;display:inline-flex}.__P__-tab-icon svg{width:22px;height:22px}.__P__-tab-badge{position:absolute;top:-4px;left:calc(50% + 6px);min-width:16px;height:16px;padding:0 4px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--__P__-accent);color:var(--__P__-on-accent);font-size:calc(10px * var(--__P__-text-scale));font-weight:600;line-height:1}.__P__-home-hero{flex-shrink:0;padding:var(--__P__-space-5) var(--__P__-space-5) var(--__P__-space-3);color:var(--__P__-on-accent);--__P__-focus: var(--__P__-on-accent)}.__P__-home-hero-top{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-3);min-height:32px}.__P__-home-brand{font-size:clamp(calc(12px * var(--__P__-text-scale)),calc(3.2cqi * var(--__P__-text-scale)),calc(14px * var(--__P__-text-scale)));font-weight:600;letter-spacing:.01em;color:color-mix(in srgb,#fff 82%,transparent);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.__P__-home-brand-spacer{flex:1}.__P__-home-hero-actions{display:flex;align-items:center;gap:var(--__P__-space-2);flex-shrink:0}.__P__-home-hero-actions .__P__-icon-btn{color:#fff}.__P__-home-hero-actions .__P__-icon-btn:hover{background:color-mix(in srgb,#fff 18%,transparent);color:#fff}.__P__-home-hero-actions .__P__-icon-btn:active{background:color-mix(in srgb,#fff 26%,transparent)}.__P__-home-greeting{margin:28px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(19px * var(--__P__-text-scale)),calc(5.5cqi * var(--__P__-text-scale)),var(--__P__-text-2xl));font-weight:800;line-height:1.18;letter-spacing:-.01em;overflow-wrap:anywhere}.__P__-home-lead{margin:10px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(15px * var(--__P__-text-scale)),calc(4.2cqi * var(--__P__-text-scale)),var(--__P__-text-xl));font-weight:600;line-height:1.25;letter-spacing:-.005em;color:color-mix(in srgb,var(--__P__-on-accent) 78%,transparent);overflow-wrap:anywhere}.__P__-home-avatars{display:flex}.__P__-home-avatar{width:30px;height:30px;border-radius:999px;overflow:hidden;margin-inline-start:-10px;border:2px solid color-mix(in srgb,#fff 92%,transparent);box-shadow:0 1px 3px #0000002e;background:var(--__P__-surface);display:inline-flex;align-items:center;justify-content:center;font-size:var(--__P__-text-xs);font-weight:700;color:var(--__P__-fg)}.__P__-home-avatar:first-child{margin-inline-start:0}.__P__-home-avatar img{width:100%;height:100%;object-fit:cover}.__P__-home-content{background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-card);overflow:hidden}.__P__-home-content-title{padding:var(--__P__-space-4) var(--__P__-space-4) var(--__P__-space-3);font-size:var(--__P__-text-sm);font-weight:700}.__P__-home-content-list{display:flex;flex-direction:column;padding:0 var(--__P__-space-2) var(--__P__-space-2)}.__P__-home-content-list .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-home-card{display:block;width:100%;text-align:start;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);padding:var(--__P__-space-4);box-shadow:var(--__P__-shadow-card)}.__P__-home-card[data-interactive=true]{cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-home-card[data-interactive=true]:hover{background:var(--__P__-bg-elevated)}.__P__-home-card[data-interactive=true]:active{transform:translateY(1px)}.__P__-home-card[data-interactive=true]:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-recent-row{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-recent-avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:999px;background:color-mix(in oklch,var(--__P__-accent) 14%,transparent);color:var(--__P__-accent)}.__P__-home-recent-avatar svg{width:20px;height:20px}.__P__-home-recent-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.__P__-home-recent-title{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-recent-preview{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-home-recent-at{color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);flex-shrink:0}.__P__-home-recent-dot{width:8px;height:8px;border-radius:999px;background:var(--__P__-accent);flex-shrink:0}.__P__-home-recent-row[data-unread=true] .__P__-home-recent-title{font-weight:700}.__P__-home-status{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-status-icon svg{width:22px;height:22px;color:var(--__P__-success)}.__P__-home-status[data-level=degraded] .__P__-home-status-icon svg{color:var(--__P__-warning)}.__P__-home-status[data-level=down] .__P__-home-status-icon svg{color:var(--__P__-danger)}.__P__-home-status-text{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search{display:flex;align-items:center;gap:var(--__P__-space-2);width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);border:1px solid var(--__P__-border);background:var(--__P__-surface);text-align:start}.__P__-home-search[data-input=true]{background:var(--__P__-bg-elevated)}.__P__-home-search:hover{border-color:var(--__P__-border-strong)}.__P__-home-search:focus-visible,.__P__-home-search:focus-within{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-search-text{flex:1;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search-input{flex:1;border:0;background:transparent;font-size:calc(14px * var(--__P__-text-scale));color:var(--__P__-fg);outline:none}.__P__-home-search-icon svg{width:18px;height:18px;color:var(--__P__-accent)}.__P__-list-row{display:flex;align-items:center;gap:var(--__P__-space-3);width:100%;min-height:44px;text-align:start;padding:var(--__P__-space-3) var(--__P__-space-2);border-radius:var(--__P__-radius-sm)}.__P__-list-row:hover{background:var(--__P__-hover)}.__P__-list-row:active{background:var(--__P__-border)}.__P__-list-row:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-list-row-body{display:flex;flex-direction:column;min-width:0;flex:1}.__P__-list-row-title{font-weight:600;font-size:var(--__P__-text-md);line-height:1.35}.__P__-list-row-sub{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);margin-top:var(--__P__-space-1);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-list-row-chevron svg{width:18px;height:18px;color:var(--__P__-accent);flex-shrink:0}.__P__-back-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);flex-shrink:0}.__P__-back-title{flex:1;text-align:center;font-size:var(--__P__-text-md);font-weight:700;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-back-spacer{width:32px;height:1px}.__P__-content{display:flex;flex-direction:column;gap:14px;width:100%;max-width:68ch;margin:0 auto}.__P__-content-hero{width:100%;border-radius:var(--__P__-radius)}.__P__-content-subtitle{color:var(--__P__-fg-muted);margin:0}.__P__-content-frame{flex:1;min-height:0;width:100%;border:0;background:#fff}.__P__-news-list{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-news-card{display:block;width:100%;text-align:start;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden;background:var(--__P__-surface)}.__P__-news-card{transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-news-card:hover{background:var(--__P__-bg-elevated)}.__P__-news-card:active{transform:translateY(1px)}.__P__-news-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-news-hero{width:100%;display:block}.__P__-news-body{display:flex;flex-direction:column;gap:6px;padding:14px 16px}.__P__-news-title{font-weight:700;font-size:var(--__P__-text-md)}.__P__-news-summary{color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-modules-empty{display:flex;align-items:center;justify-content:center;position:relative}.__P__-modules-empty-close{position:absolute;top:12px;inset-inline-end:12px}.__P__-modules-empty-text{color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-form{display:flex;flex-direction:column;gap:var(--__P__-space-4)}.__P__-field{display:flex;flex-direction:column;gap:6px}.__P__-field-label{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-field-req{color:var(--__P__-danger)}.__P__-field-input{width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);color:var(--__P__-fg);font:inherit;font-size:var(--__P__-text-sm);resize:vertical;transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-field-input:focus-visible{outline:none;border-color:var(--__P__-accent)}.__P__-field[data-invalid=true] .__P__-field-input{border-color:var(--__P__-danger)}.__P__-field-input[type=date],.__P__-field-input[type=time]{appearance:none;-webkit-appearance:none}@media(pointer:coarse){.__P__-field-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}}.__P__-field-hint{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-field-error{font-size:var(--__P__-text-xs);color:var(--__P__-danger)}.__P__-field-choices{display:flex;flex-direction:column;gap:10px;padding-top:2px}.__P__-choice{display:flex;align-items:flex-start;gap:10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);cursor:pointer}.__P__-choice input{margin-top:2px;accent-color:var(--__P__-accent)}.__P__-form-actions{display:flex;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}.__P__-form-submit,.__P__-tool-approve{padding:var(--__P__-space-2) var(--__P__-space-4);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);cursor:pointer;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-submit:hover:not(:disabled),.__P__-tool-approve:hover:not(:disabled){filter:brightness(1.06)}.__P__-form-submit:disabled{opacity:.6;cursor:default}.__P__-form-skip,.__P__-tool-reject{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:transparent;color:var(--__P__-fg-muted);font:inherit;font-size:var(--__P__-text-sm);cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-skip:hover:not(:disabled),.__P__-tool-reject:hover:not(:disabled){background:var(--__P__-bg-elevated)}.__P__-form-gate{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-form-gate-title{margin:0;font-size:var(--__P__-text-base);font-weight:700;color:var(--__P__-fg)}.__P__-form-gate-desc{margin:0 0 var(--__P__-space-1);font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-form-done{display:flex;align-items:center;justify-content:center;gap:6px;padding:6px 12px;border:1px dashed var(--__P__-border);border-radius:999px;align-self:center;font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted)}.__P__-form-done svg{width:14px;height:14px;color:var(--__P__-success, #22c55e)}.__P__-form-done[data-outcome=skipped] svg{color:var(--__P__-fg-muted)}.__P__-form-done-fill{border:0;background:none;padding:0 2px;cursor:pointer;font:inherit;font-weight:600;color:var(--__P__-accent)}.__P__-form-done-fill:hover{text-decoration:underline}details.__P__-form-done{display:block;padding:0;border-radius:var(--__P__-radius-md)}details[open].__P__-form-done{width:min(100%,420px);background:var(--__P__-surface)}.__P__-form-done-summary{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;cursor:pointer;list-style:none}.__P__-form-done-summary::-webkit-details-marker{display:none}.__P__-form-done-summary>svg:last-child{color:var(--__P__-fg-muted);transition:transform .15s var(--__P__-ease)}details[open]>.__P__-form-done-summary>svg:last-child{transform:rotate(90deg)}.__P__-form-answers{margin:0;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);display:grid;gap:var(--__P__-space-3);text-align:start}.__P__-form-answer{display:grid;gap:6px}.__P__-form-answer dt{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-form-answer dd{margin:0;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);font-size:var(--__P__-text-sm);font-weight:400;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-tool-ask-input,.__P__-tool-approval{display:flex;flex-direction:column;gap:var(--__P__-space-2);margin-top:6px;padding:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-tool-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.__P__-tool-badge{padding:2px 8px;border-radius:999px;background:var(--__P__-warning, #f59e0b);color:#1a1206;font-size:var(--__P__-text-xs);font-weight:600}.__P__-tool-title{font-size:var(--__P__-text-sm);color:var(--__P__-fg)}.__P__-tool-question{margin:0;font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-tool-desc{margin:0;font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-tool-args{margin:0;padding:var(--__P__-space-2);max-height:160px;overflow:auto;border-radius:var(--__P__-radius-sm);background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);white-space:pre-wrap;word-break:break-word}.__P__-tool-stale-note{margin:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-tool-decided{flex-direction:row;align-items:center;flex-wrap:wrap;gap:8px}.__P__-tool-decided-label{padding:2px 8px;border-radius:999px;background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-tool-decided-label[data-approved=true]{color:var(--__P__-success, #16a34a);border-color:var(--__P__-success, #16a34a)}.__P__-tool-decided-label[data-approved=false]{color:var(--__P__-danger);border-color:var(--__P__-danger)}.__P__-tool-decided-value{font-size:var(--__P__-text-sm);color:var(--__P__-fg)}:host([dir="rtl"]) .__P__-icon-dir{transform:scaleX(-1)}:host([dir="rtl"]) .__P__-field-input[type=date],:host([dir="rtl"]) .__P__-field-input[type=time]{position:relative;text-align:right;padding-left:34px}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-datetime-edit,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-datetime-edit{text-align:right}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-calendar-picker-indicator,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-calendar-picker-indicator{position:absolute;left:var(--__P__-space-3);margin:0}\n';
1224
1242
 
1225
1243
  // src/styles/standalone.css
1226
1244
  var standalone_default = ".__P__-standalone-page{margin:0;height:100vh;background:var(--__P__-bg, #fff);display:grid;place-items:stretch}\n";
@@ -1308,22 +1326,22 @@ function attachAdoptedSheet(shadow, doc) {
1308
1326
  }
1309
1327
  }
1310
1328
  function applyThemeOverrides(host, overrides) {
1311
- const p33 = BRAND.cssPrefix;
1312
- if (overrides.accent) host.style.setProperty(`--${p33}-accent-user`, overrides.accent);
1313
- if (overrides.accentText) host.style.setProperty(`--${p33}-accent-text-user`, overrides.accentText);
1314
- if (overrides.radius) host.style.setProperty(`--${p33}-radius`, overrides.radius);
1315
- if (overrides.fontFamily) host.style.setProperty(`--${p33}-font`, overrides.fontFamily);
1329
+ const p35 = BRAND.cssPrefix;
1330
+ if (overrides.accent) host.style.setProperty(`--${p35}-accent-user`, overrides.accent);
1331
+ if (overrides.accentText) host.style.setProperty(`--${p35}-accent-text-user`, overrides.accentText);
1332
+ if (overrides.radius) host.style.setProperty(`--${p35}-radius`, overrides.radius);
1333
+ if (overrides.fontFamily) host.style.setProperty(`--${p35}-font`, overrides.fontFamily);
1316
1334
  }
1317
1335
  function applyThemeMode(host, mode) {
1318
1336
  host.dataset.theme = mode;
1319
1337
  }
1320
1338
  function applySize(host, size) {
1321
- const p33 = BRAND.cssPrefix;
1322
- if (size.width !== void 0) host.style.setProperty(`--${p33}-panel-w`, size.width);
1323
- if (size.height !== void 0) host.style.setProperty(`--${p33}-panel-h`, size.height);
1324
- if (size.expanded?.width !== void 0) host.style.setProperty(`--${p33}-expanded-w`, size.expanded.width);
1325
- if (size.expanded?.height !== void 0) host.style.setProperty(`--${p33}-expanded-h`, size.expanded.height);
1326
- if (size.inset !== void 0) host.style.setProperty(`--${p33}-panel-inset`, size.inset);
1339
+ const p35 = BRAND.cssPrefix;
1340
+ if (size.width !== void 0) host.style.setProperty(`--${p35}-panel-w`, size.width);
1341
+ if (size.height !== void 0) host.style.setProperty(`--${p35}-panel-h`, size.height);
1342
+ if (size.expanded?.width !== void 0) host.style.setProperty(`--${p35}-expanded-w`, size.expanded.width);
1343
+ if (size.expanded?.height !== void 0) host.style.setProperty(`--${p35}-expanded-h`, size.expanded.height);
1344
+ if (size.inset !== void 0) host.style.setProperty(`--${p35}-panel-inset`, size.inset);
1327
1345
  }
1328
1346
  function applyPosition(host, pos) {
1329
1347
  host.dataset.position = pos;
@@ -1343,7 +1361,7 @@ import { h, render as renderPreact } from "preact";
1343
1361
 
1344
1362
  // src/ui/app.tsx
1345
1363
  import { useCallback as useCallback6, useEffect as useEffect16, useMemo as useMemo3, useRef as useRef9, useState as useState13 } from "preact/hooks";
1346
- import { batch, useComputed as useComputed7, useSignal as useSignal2 } from "@preact/signals";
1364
+ import { batch, useComputed as useComputed8, useSignal as useSignal2 } from "@preact/signals";
1347
1365
 
1348
1366
  // src/core/handshake-shape.ts
1349
1367
  function isPlainObject2(raw) {
@@ -1427,7 +1445,7 @@ function createAuth(opts) {
1427
1445
  }
1428
1446
 
1429
1447
  // src/core/version.ts
1430
- var ELEMENTS_VERSION = true ? "0.44.2" : "0.0.0-dev";
1448
+ var ELEMENTS_VERSION = true ? "0.45.0" : "0.0.0-dev";
1431
1449
  var ELEMENTS_VERSION_PARAM = "_ev";
1432
1450
 
1433
1451
  // src/stream/types.ts
@@ -1512,11 +1530,11 @@ function toBase64Url(json) {
1512
1530
  var nonEmpty = (ctx) => ctx && Object.keys(ctx).length > 0 ? ctx : void 0;
1513
1531
  function encodeContext(user, page) {
1514
1532
  const u = nonEmpty(user);
1515
- const p33 = nonEmpty(page);
1516
- if (!u && !p33) return void 0;
1533
+ const p35 = nonEmpty(page);
1534
+ if (!u && !p35) return void 0;
1517
1535
  const envelope = {};
1518
1536
  if (u) envelope.user = u;
1519
- if (p33) envelope.page = p33;
1537
+ if (p35) envelope.page = p35;
1520
1538
  return toBase64Url(JSON.stringify(envelope));
1521
1539
  }
1522
1540
 
@@ -1526,6 +1544,13 @@ function parseWireDate(value) {
1526
1544
  const ms = Date.parse(value);
1527
1545
  return Number.isFinite(ms) ? ms : void 0;
1528
1546
  }
1547
+ function toolPartType(toolName) {
1548
+ const bare = toolName.startsWith("tool:") ? toolName.slice(5) : toolName;
1549
+ return `tool-${bare}`;
1550
+ }
1551
+ function toolNameFromType(type) {
1552
+ return type.startsWith("tool-") ? type.slice(5) : type;
1553
+ }
1529
1554
  var DEFAULT_PATHS = {
1530
1555
  /** Conversation bootstrap. `POST` → deployment config + per-visitor state. */
1531
1556
  handshake: "/pai/handshake",
@@ -1607,8 +1632,8 @@ function buildSendMessageRequest(params) {
1607
1632
  if (Object.keys(data).length > 0) body.data = data;
1608
1633
  return body;
1609
1634
  }
1610
- function isResolvedToolPart(p33) {
1611
- return p33.state === "output" || p33.state === "error" || p33.approval?.approved !== void 0;
1635
+ function isResolvedToolPart(p35) {
1636
+ return p35.state === "output-available" || p35.state === "output-error" || p35.state === "output-denied" || p35.approval?.approved !== void 0;
1612
1637
  }
1613
1638
  function normalizeToolRef(ref) {
1614
1639
  if (typeof ref === "string") return ref ? { code: ref } : null;
@@ -1616,24 +1641,23 @@ function normalizeToolRef(ref) {
1616
1641
  }
1617
1642
  function messageToWireParts(m) {
1618
1643
  const out = [];
1619
- for (const p33 of m.parts) {
1620
- if (p33.kind === "text" && p33.text) {
1621
- out.push({ text: p33.text, type: "text" });
1644
+ for (const p35 of m.parts) {
1645
+ if (p35.kind === "text" && p35.text) {
1646
+ out.push({ text: p35.text, type: "text" });
1622
1647
  }
1623
- if (p33.kind === "file" && p33.url) {
1624
- out.push({ mediaType: p33.mediaType, type: "file", url: p33.url });
1648
+ if (p35.kind === "file" && p35.url) {
1649
+ out.push({ mediaType: p35.mediaType, type: "file", url: p35.url });
1625
1650
  }
1626
- if (p33.kind === "tool" && isResolvedToolPart(p33)) {
1651
+ if (p35.kind === "tool" && isResolvedToolPart(p35)) {
1627
1652
  const part = {
1628
- type: "tool",
1629
- toolCallId: p33.toolCallId,
1630
- toolName: p33.toolName,
1631
- state: p33.state
1653
+ type: toolPartType(p35.toolName),
1654
+ toolCallId: p35.toolCallId,
1655
+ state: p35.state
1632
1656
  };
1633
- if (p33.input !== void 0) part.input = p33.input;
1634
- if (p33.output !== void 0) part.output = p33.output;
1635
- if (p33.error !== void 0) part.errorText = p33.error;
1636
- if (p33.approval && p33.approval.approved !== void 0) part.approval = p33.approval;
1657
+ if (p35.input !== void 0) part.input = p35.input;
1658
+ if (p35.output !== void 0) part.output = p35.output;
1659
+ if (p35.error !== void 0) part.errorText = p35.error;
1660
+ if (p35.approval && p35.approval.approved !== void 0) part.approval = p35.approval;
1637
1661
  out.push(part);
1638
1662
  }
1639
1663
  }
@@ -2330,11 +2354,23 @@ function fromWireMessage(w) {
2330
2354
  if (part.type === "file") {
2331
2355
  return { kind: "file", url: part.url, mediaType: part.mediaType };
2332
2356
  }
2333
- if (part.type === "tool") {
2357
+ if (part.type === "source-url") {
2358
+ return { kind: "source", sourceId: part.sourceId, url: part.url, title: part.title };
2359
+ }
2360
+ if (part.type === "source-document") {
2361
+ return {
2362
+ kind: "source",
2363
+ sourceId: part.sourceId,
2364
+ title: part.title,
2365
+ filename: part.filename,
2366
+ mediaType: part.mediaType
2367
+ };
2368
+ }
2369
+ if (part.type.startsWith("tool-")) {
2334
2370
  return {
2335
2371
  kind: "tool",
2336
2372
  toolCallId: part.toolCallId,
2337
- toolName: part.toolName,
2373
+ toolName: toolNameFromType(part.type),
2338
2374
  inputPartialSig: signal(""),
2339
2375
  inputSig: signal(part.input),
2340
2376
  outputSig: signal(part.output),
@@ -2344,7 +2380,7 @@ function fromWireMessage(w) {
2344
2380
  };
2345
2381
  }
2346
2382
  return null;
2347
- }).filter((p33) => p33 !== null);
2383
+ }).filter((p35) => p35 !== null);
2348
2384
  return {
2349
2385
  id: w.id,
2350
2386
  role: w.role,
@@ -2374,61 +2410,47 @@ function assistantText(m) {
2374
2410
  }
2375
2411
  return out;
2376
2412
  }
2377
- function partToReactive(p33) {
2378
- if (p33.kind === "text" || p33.kind === "reasoning") {
2379
- return { kind: p33.kind, id: p33.id, textSig: signal(p33.text), doneSig: signal(p33.done) };
2413
+ function partToReactive(p35) {
2414
+ if (p35.kind === "text" || p35.kind === "reasoning") {
2415
+ return { kind: p35.kind, id: p35.id, textSig: signal(p35.text), doneSig: signal(p35.done) };
2380
2416
  }
2381
- if (p33.kind === "tool") {
2417
+ if (p35.kind === "tool") {
2382
2418
  return {
2383
2419
  kind: "tool",
2384
- toolCallId: p33.toolCallId,
2385
- toolName: p33.toolName,
2386
- inputPartialSig: signal(p33.inputPartial),
2387
- inputSig: signal(p33.input),
2388
- outputSig: signal(p33.output),
2389
- errorSig: signal(p33.error),
2390
- stateSig: signal(p33.state),
2391
- approvalSig: signal(p33.approval)
2420
+ toolCallId: p35.toolCallId,
2421
+ toolName: p35.toolName,
2422
+ inputPartialSig: signal(p35.inputPartial),
2423
+ inputSig: signal(p35.input),
2424
+ outputSig: signal(p35.output),
2425
+ errorSig: signal(p35.error),
2426
+ stateSig: signal(p35.state),
2427
+ approvalSig: signal(p35.approval)
2392
2428
  };
2393
2429
  }
2394
- return p33;
2430
+ return p35;
2395
2431
  }
2396
- function partFromReactive(p33) {
2397
- if (p33.kind === "text" || p33.kind === "reasoning") {
2398
- return { kind: p33.kind, id: p33.id, text: p33.textSig.value, done: p33.doneSig.value };
2432
+ function partFromReactive(p35) {
2433
+ if (p35.kind === "text" || p35.kind === "reasoning") {
2434
+ return { kind: p35.kind, id: p35.id, text: p35.textSig.value, done: p35.doneSig.value };
2399
2435
  }
2400
- if (p33.kind === "tool") {
2436
+ if (p35.kind === "tool") {
2401
2437
  return {
2402
2438
  kind: "tool",
2403
- toolCallId: p33.toolCallId,
2404
- toolName: p33.toolName,
2405
- inputPartial: p33.inputPartialSig.value,
2406
- input: p33.inputSig.value,
2407
- output: p33.outputSig.value,
2408
- error: p33.errorSig.value,
2409
- state: p33.stateSig.value,
2410
- approval: p33.approvalSig.value
2439
+ toolCallId: p35.toolCallId,
2440
+ toolName: p35.toolName,
2441
+ inputPartial: p35.inputPartialSig.value,
2442
+ input: p35.inputSig.value,
2443
+ output: p35.outputSig.value,
2444
+ error: p35.errorSig.value,
2445
+ state: p35.stateSig.value,
2446
+ approval: p35.approvalSig.value
2411
2447
  };
2412
2448
  }
2413
- return p33;
2449
+ return p35;
2414
2450
  }
2415
2451
 
2416
2452
  // src/stream/reducer.ts
2417
2453
  import { signal as signal2 } from "@preact/signals";
2418
-
2419
- // src/stream/constants.ts
2420
- function isAskUserInputTool(toolName) {
2421
- if (!toolName) return false;
2422
- const name = toolName.startsWith("tool:") ? toolName.slice(5) : toolName;
2423
- return name === "ask-user-input" || name === "ask_user_input" || name === "request-user-input" || name === "request_user_input";
2424
- }
2425
- var TRIGGER = {
2426
- submitMessage: "submit-message",
2427
- toolResult: "tool-result",
2428
- toolApproval: "tool-approval"
2429
- };
2430
-
2431
- // src/stream/reducer.ts
2432
2454
  var log6 = logger.scope("reducer");
2433
2455
  var StreamReducer = class {
2434
2456
  constructor(messagesSig) {
@@ -2466,8 +2488,8 @@ var StreamReducer = class {
2466
2488
  ensureTextPart(m, "text", chunk.id);
2467
2489
  return;
2468
2490
  case "text-delta": {
2469
- const p33 = ensureTextPart(m, "text", chunk.id);
2470
- p33.textSig.value += chunk.delta;
2491
+ const p35 = ensureTextPart(m, "text", chunk.id);
2492
+ p35.textSig.value += chunk.delta;
2471
2493
  return;
2472
2494
  }
2473
2495
  case "text-end":
@@ -2477,8 +2499,8 @@ var StreamReducer = class {
2477
2499
  ensureTextPart(m, "reasoning", chunk.id).doneSig.value = false;
2478
2500
  return;
2479
2501
  case "reasoning-delta": {
2480
- const p33 = ensureTextPart(m, "reasoning", chunk.id);
2481
- p33.textSig.value += chunk.delta;
2502
+ const p35 = ensureTextPart(m, "reasoning", chunk.id);
2503
+ p35.textSig.value += chunk.delta;
2482
2504
  return;
2483
2505
  }
2484
2506
  case "reasoning-end":
@@ -2489,18 +2511,25 @@ var StreamReducer = class {
2489
2511
  case "tool-input-available":
2490
2512
  case "tool-output-available":
2491
2513
  case "tool-output-error":
2514
+ case "tool-output-denied":
2492
2515
  case "tool-approval-request":
2493
2516
  applyTool(m, chunk);
2494
2517
  return;
2495
2518
  case "file":
2496
2519
  appendPart(m, { kind: "file", url: chunk.url, mediaType: chunk.mediaType });
2497
2520
  return;
2498
- case "source-url": {
2499
- const parts = m.partsSig.value;
2500
- if (parts.some((p33) => p33.kind === "source" && p33.sourceId === chunk.sourceId)) return;
2501
- appendPart(m, { kind: "source", sourceId: chunk.sourceId, url: chunk.url, title: chunk.title });
2521
+ case "source-url":
2522
+ appendSource(m, { kind: "source", sourceId: chunk.sourceId, url: chunk.url, title: chunk.title });
2523
+ return;
2524
+ case "source-document":
2525
+ appendSource(m, {
2526
+ kind: "source",
2527
+ sourceId: chunk.sourceId,
2528
+ title: chunk.title,
2529
+ filename: chunk.filename,
2530
+ mediaType: chunk.mediaType
2531
+ });
2502
2532
  return;
2503
- }
2504
2533
  case "data-notification":
2505
2534
  return;
2506
2535
  default: {
@@ -2521,14 +2550,14 @@ var StreamReducer = class {
2521
2550
  }
2522
2551
  };
2523
2552
  function ensureTextPart(m, kind, id) {
2524
- const existing = m.partsSig.value.find((p33) => p33.kind === kind && p33.id === id);
2553
+ const existing = m.partsSig.value.find((p35) => p35.kind === kind && p35.id === id);
2525
2554
  if (existing) return existing;
2526
2555
  const part = { kind, id, textSig: signal2(""), doneSig: signal2(false) };
2527
2556
  appendPart(m, part);
2528
2557
  return part;
2529
2558
  }
2530
2559
  function ensureToolPart(m, toolCallId, toolName) {
2531
- const existing = m.partsSig.value.find((p33) => p33.kind === "tool" && p33.toolCallId === toolCallId);
2560
+ const existing = m.partsSig.value.find((p35) => p35.kind === "tool" && p35.toolCallId === toolCallId);
2532
2561
  if (existing) return existing;
2533
2562
  const part = {
2534
2563
  kind: "tool",
@@ -2538,7 +2567,7 @@ function ensureToolPart(m, toolCallId, toolName) {
2538
2567
  inputSig: signal2(void 0),
2539
2568
  outputSig: signal2(void 0),
2540
2569
  errorSig: signal2(void 0),
2541
- stateSig: signal2("input"),
2570
+ stateSig: signal2("input-streaming"),
2542
2571
  approvalSig: signal2(void 0)
2543
2572
  };
2544
2573
  appendPart(m, part);
@@ -2547,38 +2576,47 @@ function ensureToolPart(m, toolCallId, toolName) {
2547
2576
  function appendPart(m, part) {
2548
2577
  m.partsSig.value = [...m.partsSig.value, part];
2549
2578
  }
2579
+ function appendSource(m, source) {
2580
+ if (m.partsSig.value.some((p35) => p35.kind === "source" && p35.sourceId === source.sourceId)) return;
2581
+ appendPart(m, source);
2582
+ }
2550
2583
  function applyTool(m, chunk) {
2551
2584
  switch (chunk.type) {
2552
2585
  case "tool-input-start":
2553
2586
  ensureToolPart(m, chunk.toolCallId, chunk.toolName);
2554
2587
  return;
2555
2588
  case "tool-input-delta": {
2556
- const p33 = ensureToolPart(m, chunk.toolCallId);
2557
- p33.inputPartialSig.value += chunk.delta;
2589
+ const p35 = ensureToolPart(m, chunk.toolCallId);
2590
+ p35.inputPartialSig.value += chunk.inputTextDelta;
2558
2591
  return;
2559
2592
  }
2560
2593
  case "tool-input-available": {
2561
- const p33 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
2562
- p33.inputSig.value = chunk.input;
2563
- p33.stateSig.value = isAskUserInputTool(p33.toolName) ? "awaiting-input" : "awaiting";
2594
+ const p35 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
2595
+ p35.inputSig.value = chunk.input;
2596
+ p35.stateSig.value = "input-available";
2564
2597
  return;
2565
2598
  }
2566
2599
  case "tool-approval-request": {
2567
- const p33 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
2568
- p33.approvalSig.value = { id: chunk.approvalId };
2569
- p33.stateSig.value = "awaiting-approval";
2600
+ const p35 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
2601
+ p35.approvalSig.value = { id: chunk.approvalId };
2602
+ p35.stateSig.value = "approval-requested";
2570
2603
  return;
2571
2604
  }
2572
2605
  case "tool-output-available": {
2573
- const p33 = ensureToolPart(m, chunk.toolCallId);
2574
- p33.outputSig.value = chunk.output;
2575
- p33.stateSig.value = "output";
2606
+ const p35 = ensureToolPart(m, chunk.toolCallId);
2607
+ p35.outputSig.value = chunk.output;
2608
+ p35.stateSig.value = "output-available";
2576
2609
  return;
2577
2610
  }
2578
2611
  case "tool-output-error": {
2579
- const p33 = ensureToolPart(m, chunk.toolCallId);
2580
- p33.errorSig.value = chunk.errorText;
2581
- p33.stateSig.value = "error";
2612
+ const p35 = ensureToolPart(m, chunk.toolCallId);
2613
+ p35.errorSig.value = chunk.errorText;
2614
+ p35.stateSig.value = "output-error";
2615
+ return;
2616
+ }
2617
+ case "tool-output-denied": {
2618
+ const p35 = ensureToolPart(m, chunk.toolCallId);
2619
+ p35.stateSig.value = "output-denied";
2582
2620
  return;
2583
2621
  }
2584
2622
  default:
@@ -2586,6 +2624,18 @@ function applyTool(m, chunk) {
2586
2624
  }
2587
2625
  }
2588
2626
 
2627
+ // src/stream/constants.ts
2628
+ function isAskUserInputTool(toolName) {
2629
+ if (!toolName) return false;
2630
+ const name = toolName.startsWith("tool:") ? toolName.slice(5) : toolName;
2631
+ return name === "ask-user-input" || name === "ask_user_input" || name === "request-user-input" || name === "request_user_input";
2632
+ }
2633
+ var TRIGGER = {
2634
+ submitMessage: "submit-message",
2635
+ toolResult: "tool-result",
2636
+ toolApproval: "tool-approval"
2637
+ };
2638
+
2589
2639
  // src/core/feedback/index.ts
2590
2640
  import { signal as signal3 } from "@preact/signals";
2591
2641
 
@@ -3160,7 +3210,11 @@ var TID = {
3160
3210
  /** Tool-approval reject button. */
3161
3211
  toolReject: `${p2}-tool-reject`,
3162
3212
  /** Recorded tool decision summary (after approve/reject/submit). */
3163
- toolDecision: `${p2}-tool-decision`
3213
+ toolDecision: `${p2}-tool-decision`,
3214
+ /** Automatic (non-interactive) tool-call disclosure — shown only when `showToolCalls`. */
3215
+ toolCall: `${p2}-tool-call`,
3216
+ /** A citation source (web link or document reference) — shown only when `showSources`. */
3217
+ source: `${p2}-source`
3164
3218
  };
3165
3219
  function tid(base, suffix) {
3166
3220
  return `${base}-${suffix}`;
@@ -3271,24 +3325,24 @@ import { useCallback as useCallback2, useEffect as useEffect9, useRef as useRef6
3271
3325
  import { useEffect as useEffect2, useRef } from "preact/hooks";
3272
3326
  import { jsx as jsx3 } from "preact/jsx-runtime";
3273
3327
  function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, strings }) {
3274
- const p33 = BRAND.cssPrefix;
3328
+ const p35 = BRAND.cssPrefix;
3275
3329
  const dragRef = useRef(null);
3276
3330
  useEffect2(() => {
3277
3331
  if (!panelEl) return;
3278
3332
  const style = panelEl.style;
3279
- if (resize.minWidth) style.setProperty(`--${p33}-resize-min-w`, resize.minWidth);
3280
- if (resize.maxWidth) style.setProperty(`--${p33}-resize-max-w`, resize.maxWidth);
3281
- if (resize.minHeight) style.setProperty(`--${p33}-resize-min-h`, resize.minHeight);
3282
- if (resize.maxHeight) style.setProperty(`--${p33}-resize-max-h`, resize.maxHeight);
3333
+ if (resize.minWidth) style.setProperty(`--${p35}-resize-min-w`, resize.minWidth);
3334
+ if (resize.maxWidth) style.setProperty(`--${p35}-resize-max-w`, resize.maxWidth);
3335
+ if (resize.minHeight) style.setProperty(`--${p35}-resize-min-h`, resize.minHeight);
3336
+ if (resize.maxHeight) style.setProperty(`--${p35}-resize-max-h`, resize.maxHeight);
3283
3337
  if (initialSize) {
3284
- style.setProperty(`--${p33}-widget-w`, `${initialSize.width}px`);
3285
- style.setProperty(`--${p33}-widget-h`, `${initialSize.height}px`);
3338
+ style.setProperty(`--${p35}-widget-w`, `${initialSize.width}px`);
3339
+ style.setProperty(`--${p35}-widget-h`, `${initialSize.height}px`);
3286
3340
  }
3287
- }, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight, p33, initialSize]);
3341
+ }, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight, p35, initialSize]);
3288
3342
  if (!panelEl) return null;
3289
3343
  const isTop = position.startsWith("top-");
3290
3344
  const isRight = position.endsWith("-right");
3291
- const cornerClass = `${p33}-resize-grip ${p33}-resize-grip--${isTop ? "bottom" : "top"}-${isRight ? "left" : "right"}`;
3345
+ const cornerClass = `${p35}-resize-grip ${p35}-resize-grip--${isTop ? "bottom" : "top"}-${isRight ? "left" : "right"}`;
3292
3346
  const onPointerDown = (e) => {
3293
3347
  if (!panelEl) return;
3294
3348
  const target = e.currentTarget;
@@ -3313,8 +3367,8 @@ function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, stri
3313
3367
  if (!d || e.pointerId !== d.pointerId || !panelEl) return;
3314
3368
  const dx = (e.clientX - d.startX) * d.dirX;
3315
3369
  const dy = (e.clientY - d.startY) * d.dirY;
3316
- panelEl.style.setProperty(`--${p33}-widget-w`, `${d.startW + dx}px`);
3317
- panelEl.style.setProperty(`--${p33}-widget-h`, `${d.startH + dy}px`);
3370
+ panelEl.style.setProperty(`--${p35}-widget-w`, `${d.startW + dx}px`);
3371
+ panelEl.style.setProperty(`--${p35}-widget-h`, `${d.startH + dy}px`);
3318
3372
  };
3319
3373
  const onPointerUp = (e) => {
3320
3374
  const d = dragRef.current;
@@ -4051,7 +4105,7 @@ function usePopoverMenu({ itemCount, initialFocusIndex }) {
4051
4105
  // src/ui/overflow-menu.tsx
4052
4106
  import { jsx as jsx8, jsxs as jsxs6 } from "preact/jsx-runtime";
4053
4107
  function OverflowMenu({ items, triggerLabel }) {
4054
- const p33 = BRAND.cssPrefix;
4108
+ const p35 = BRAND.cssPrefix;
4055
4109
  const menu = usePopoverMenu({ itemCount: items.length });
4056
4110
  const handleSelect = (item) => {
4057
4111
  if (item.disabled) return;
@@ -4074,13 +4128,13 @@ function OverflowMenu({ items, triggerLabel }) {
4074
4128
  e.stopPropagation();
4075
4129
  pickSegment(item, segs[next].value);
4076
4130
  };
4077
- return /* @__PURE__ */ jsxs6("div", { class: `${p33}-menu-wrap`, children: [
4131
+ return /* @__PURE__ */ jsxs6("div", { class: `${p35}-menu-wrap`, children: [
4078
4132
  /* @__PURE__ */ jsx8(
4079
4133
  "button",
4080
4134
  {
4081
4135
  ref: menu.triggerRef,
4082
4136
  type: "button",
4083
- class: `${p33}-icon-btn`,
4137
+ class: `${p35}-icon-btn`,
4084
4138
  "aria-label": triggerLabel,
4085
4139
  "aria-haspopup": "menu",
4086
4140
  "aria-expanded": menu.open,
@@ -4094,7 +4148,7 @@ function OverflowMenu({ items, triggerLabel }) {
4094
4148
  "div",
4095
4149
  {
4096
4150
  ref: menu.menuRef,
4097
- class: `${p33}-menu`,
4151
+ class: `${p35}-menu`,
4098
4152
  role: "menu",
4099
4153
  "aria-label": triggerLabel,
4100
4154
  onKeyDown: menu.onMenuKey,
@@ -4104,14 +4158,14 @@ function OverflowMenu({ items, triggerLabel }) {
4104
4158
  "div",
4105
4159
  {
4106
4160
  role: "menuitem",
4107
- class: `${p33}-menu-item ${p33}-menu-item-segmented`,
4161
+ class: `${p35}-menu-item ${p35}-menu-item-segmented`,
4108
4162
  "aria-label": item.label,
4109
4163
  tabIndex: -1,
4110
4164
  onKeyDown: (e) => onSegmentRowKey(e, item),
4111
4165
  children: [
4112
- item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p33}-menu-icon`, children: item.icon }) : null,
4113
- /* @__PURE__ */ jsx8("span", { class: `${p33}-menu-label`, children: item.label }),
4114
- /* @__PURE__ */ jsx8("span", { class: `${p33}-segmented`, role: "group", "aria-label": item.label, children: item.segments.map((seg) => {
4166
+ item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-icon`, children: item.icon }) : null,
4167
+ /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-label`, children: item.label }),
4168
+ /* @__PURE__ */ jsx8("span", { class: `${p35}-segmented`, role: "group", "aria-label": item.label, children: item.segments.map((seg) => {
4115
4169
  const active = seg.value === item.value;
4116
4170
  return /* @__PURE__ */ jsx8(
4117
4171
  "button",
@@ -4119,7 +4173,7 @@ function OverflowMenu({ items, triggerLabel }) {
4119
4173
  type: "button",
4120
4174
  role: "menuitemradio",
4121
4175
  "aria-checked": active,
4122
- class: `${p33}-segment`,
4176
+ class: `${p35}-segment`,
4123
4177
  "data-on": active ? "true" : void 0,
4124
4178
  lang: seg.lang,
4125
4179
  title: seg.value,
@@ -4139,14 +4193,14 @@ function OverflowMenu({ items, triggerLabel }) {
4139
4193
  {
4140
4194
  type: "button",
4141
4195
  role: "menuitem",
4142
- class: `${p33}-menu-item`,
4196
+ class: `${p35}-menu-item`,
4143
4197
  "aria-pressed": item.type === "switch" ? item.on : void 0,
4144
4198
  disabled: item.disabled,
4145
4199
  onClick: () => handleSelect(item),
4146
4200
  children: [
4147
- item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p33}-menu-icon`, children: item.icon }) : null,
4148
- /* @__PURE__ */ jsx8("span", { class: `${p33}-menu-label`, children: item.label }),
4149
- item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${p33}-menu-check`, "aria-hidden": "true", children: /* @__PURE__ */ jsx8(CheckIcon, {}) }) : null
4201
+ item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-icon`, children: item.icon }) : null,
4202
+ /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-label`, children: item.label }),
4203
+ item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-check`, "aria-hidden": "true", children: /* @__PURE__ */ jsx8(CheckIcon, {}) }) : null
4150
4204
  ]
4151
4205
  },
4152
4206
  item.id
@@ -4298,7 +4352,7 @@ function HeaderActions({ panelProps, variant }) {
4298
4352
 
4299
4353
  // src/ui/message-list.tsx
4300
4354
  import { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState6 } from "preact/hooks";
4301
- import { useComputed as useComputed5 } from "@preact/signals";
4355
+ import { useComputed as useComputed6 } from "@preact/signals";
4302
4356
 
4303
4357
  // src/ui/form/dynamic-form.tsx
4304
4358
  import { useState as useState5 } from "preact/hooks";
@@ -4686,7 +4740,7 @@ function FormDoneMarker({
4686
4740
  }
4687
4741
 
4688
4742
  // src/ui/message-bubble.tsx
4689
- import { useComputed as useComputed4 } from "@preact/signals";
4743
+ import { useComputed as useComputed5 } from "@preact/signals";
4690
4744
 
4691
4745
  // src/ui/markdown.tsx
4692
4746
  import { useLayoutEffect, useMemo, useRef as useRef4 } from "preact/hooks";
@@ -4759,10 +4813,27 @@ function hardenLink(a) {
4759
4813
  a.rel = [...tokens].join(" ");
4760
4814
  }
4761
4815
 
4816
+ // src/ui/source-view.tsx
4817
+ import { jsx as jsx13, jsxs as jsxs10 } from "preact/jsx-runtime";
4818
+ var p12 = BRAND.cssPrefix;
4819
+ function SourceView({ part, strings }) {
4820
+ const label = part.title || part.filename || part.url || strings.sources;
4821
+ if (part.url) {
4822
+ return /* @__PURE__ */ jsxs10("a", { class: `${p12}-source`, href: part.url, target: "_blank", rel: "noreferrer noopener", "data-testid": TID.source, children: [
4823
+ /* @__PURE__ */ jsx13("span", { class: `${p12}-source-icon`, "aria-hidden": "true", children: "\u{1F517}" }),
4824
+ /* @__PURE__ */ jsx13("span", { class: `${p12}-source-label`, children: label })
4825
+ ] });
4826
+ }
4827
+ return /* @__PURE__ */ jsxs10("span", { class: `${p12}-source`, "data-testid": TID.source, children: [
4828
+ /* @__PURE__ */ jsx13("span", { class: `${p12}-source-icon`, "aria-hidden": "true", children: "\u{1F4C4}" }),
4829
+ /* @__PURE__ */ jsx13("span", { class: `${p12}-source-label`, children: label })
4830
+ ] });
4831
+ }
4832
+
4762
4833
  // src/ui/tool-approval.tsx
4763
4834
  import { useComputed as useComputed2, useSignal } from "@preact/signals";
4764
- import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs10 } from "preact/jsx-runtime";
4765
- var p12 = BRAND.cssPrefix;
4835
+ import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs11 } from "preact/jsx-runtime";
4836
+ var p13 = BRAND.cssPrefix;
4766
4837
  function displayToolName(toolName) {
4767
4838
  return (toolName.startsWith("tool:") ? toolName.slice(5) : toolName).replace(/[-_]+/g, " ");
4768
4839
  }
@@ -4773,24 +4844,24 @@ function ToolApproval({ part, strings, active, onDecision }) {
4773
4844
  const decided = approval.value?.approved !== void 0;
4774
4845
  if (decided) {
4775
4846
  const ap = approval.value;
4776
- return /* @__PURE__ */ jsxs10("div", { class: `${p12}-tool-approval ${p12}-tool-decided`, "data-testid": TID.toolDecision, children: [
4777
- /* @__PURE__ */ jsx13("span", { class: `${p12}-tool-decided-label`, "data-approved": ap?.approved ? "true" : "false", children: ap?.approved ? strings.approved : strings.rejected }),
4778
- /* @__PURE__ */ jsx13("strong", { class: `${p12}-tool-title`, children: displayToolName(part.toolName) }),
4779
- ap?.reason ? /* @__PURE__ */ jsx13("span", { class: `${p12}-tool-decided-value`, children: ap.reason }) : null
4847
+ return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-approval ${p13}-tool-decided`, "data-testid": TID.toolDecision, children: [
4848
+ /* @__PURE__ */ jsx14("span", { class: `${p13}-tool-decided-label`, "data-approved": ap?.approved ? "true" : "false", children: ap?.approved ? strings.approved : strings.rejected }),
4849
+ /* @__PURE__ */ jsx14("strong", { class: `${p13}-tool-title`, children: displayToolName(part.toolName) }),
4850
+ ap?.reason ? /* @__PURE__ */ jsx14("span", { class: `${p13}-tool-decided-value`, children: ap.reason }) : null
4780
4851
  ] });
4781
4852
  }
4782
4853
  const args = summarizeInput(input.value);
4783
- return /* @__PURE__ */ jsxs10("div", { class: `${p12}-tool-approval`, "data-testid": TID.toolApproval, children: [
4784
- /* @__PURE__ */ jsxs10("div", { class: `${p12}-tool-head`, children: [
4785
- /* @__PURE__ */ jsx13("span", { class: `${p12}-tool-badge`, children: strings.approvalRequired }),
4786
- /* @__PURE__ */ jsx13("strong", { class: `${p12}-tool-title`, children: displayToolName(part.toolName) })
4854
+ return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-approval`, "data-testid": TID.toolApproval, children: [
4855
+ /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-head`, children: [
4856
+ /* @__PURE__ */ jsx14("span", { class: `${p13}-tool-badge`, children: strings.approvalRequired }),
4857
+ /* @__PURE__ */ jsx14("strong", { class: `${p13}-tool-title`, children: displayToolName(part.toolName) })
4787
4858
  ] }),
4788
- args ? /* @__PURE__ */ jsx13("pre", { class: `${p12}-tool-args`, children: args }) : null,
4789
- active ? /* @__PURE__ */ jsxs10(Fragment2, { children: [
4790
- /* @__PURE__ */ jsx13(
4859
+ args ? /* @__PURE__ */ jsx14("pre", { class: `${p13}-tool-args`, children: args }) : null,
4860
+ active ? /* @__PURE__ */ jsxs11(Fragment2, { children: [
4861
+ /* @__PURE__ */ jsx14(
4791
4862
  "input",
4792
4863
  {
4793
- class: `${p12}-field-input`,
4864
+ class: `${p13}-field-input`,
4794
4865
  value: reason.value,
4795
4866
  placeholder: strings.approvalReason,
4796
4867
  onInput: (e) => {
@@ -4798,29 +4869,29 @@ function ToolApproval({ part, strings, active, onDecision }) {
4798
4869
  }
4799
4870
  }
4800
4871
  ),
4801
- /* @__PURE__ */ jsxs10("div", { class: `${p12}-form-actions`, children: [
4802
- /* @__PURE__ */ jsx13(
4872
+ /* @__PURE__ */ jsxs11("div", { class: `${p13}-form-actions`, children: [
4873
+ /* @__PURE__ */ jsx14(
4803
4874
  "button",
4804
4875
  {
4805
4876
  type: "button",
4806
- class: `${p12}-tool-reject`,
4877
+ class: `${p13}-tool-reject`,
4807
4878
  onClick: () => onDecision(part.toolCallId, false, reason.value.trim() || void 0),
4808
4879
  "data-testid": TID.toolReject,
4809
4880
  children: strings.reject
4810
4881
  }
4811
4882
  ),
4812
- /* @__PURE__ */ jsx13(
4883
+ /* @__PURE__ */ jsx14(
4813
4884
  "button",
4814
4885
  {
4815
4886
  type: "button",
4816
- class: `${p12}-tool-approve`,
4887
+ class: `${p13}-tool-approve`,
4817
4888
  onClick: () => onDecision(part.toolCallId, true, reason.value.trim() || void 0),
4818
4889
  "data-testid": TID.toolApprove,
4819
4890
  children: strings.approve
4820
4891
  }
4821
4892
  )
4822
4893
  ] })
4823
- ] }) : /* @__PURE__ */ jsx13("p", { class: `${p12}-tool-stale-note`, children: strings.stepNoLongerActive })
4894
+ ] }) : /* @__PURE__ */ jsx14("p", { class: `${p13}-tool-stale-note`, children: strings.stepNoLongerActive })
4824
4895
  ] });
4825
4896
  }
4826
4897
  function summarizeInput(input) {
@@ -4891,13 +4962,13 @@ function num(v) {
4891
4962
  }
4892
4963
 
4893
4964
  // src/ui/tool-ask-input.tsx
4894
- import { jsx as jsx14, jsxs as jsxs11 } from "preact/jsx-runtime";
4895
- var p13 = BRAND.cssPrefix;
4965
+ import { jsx as jsx15, jsxs as jsxs12 } from "preact/jsx-runtime";
4966
+ var p14 = BRAND.cssPrefix;
4896
4967
  function ToolAskInput({ part, strings, active, onSubmit, onDecision }) {
4897
4968
  const state = useComputed3(() => part.stateSig.value);
4898
4969
  const approval = useComputed3(() => part.approvalSig.value);
4899
4970
  const request = useComputed3(() => parseAskUserInput(part.inputSig.value));
4900
- const decided = state.value === "output" || state.value === "error" || approval.value?.approved !== void 0;
4971
+ const decided = state.value === "output-available" || state.value === "output-error" || state.value === "output-denied" || state.value === "approval-responded" || approval.value?.approved !== void 0;
4901
4972
  const viaApproval = approval.value !== void 0;
4902
4973
  const resolve = (answer, accepted) => {
4903
4974
  if (viaApproval) onDecision(part.toolCallId, accepted, answer);
@@ -4905,42 +4976,42 @@ function ToolAskInput({ part, strings, active, onSubmit, onDecision }) {
4905
4976
  else onSubmit(part.toolCallId, accepted ? { answer } : {});
4906
4977
  };
4907
4978
  if (decided) {
4908
- return /* @__PURE__ */ jsx14(DecidedSummary, { part, strings });
4979
+ return /* @__PURE__ */ jsx15(DecidedSummary, { part, strings });
4909
4980
  }
4910
4981
  if (!active) {
4911
- return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-ask-input ${p13}-tool-stale`, "data-testid": TID.toolAskInput, children: [
4912
- /* @__PURE__ */ jsx14(Header, { strings, title: request.value.title ?? request.value.question }),
4913
- /* @__PURE__ */ jsx14("p", { class: `${p13}-tool-stale-note`, children: strings.stepNoLongerActive })
4982
+ return /* @__PURE__ */ jsxs12("div", { class: `${p14}-tool-ask-input ${p14}-tool-stale`, "data-testid": TID.toolAskInput, children: [
4983
+ /* @__PURE__ */ jsx15(Header, { strings, title: request.value.title ?? request.value.question }),
4984
+ /* @__PURE__ */ jsx15("p", { class: `${p14}-tool-stale-note`, children: strings.stepNoLongerActive })
4914
4985
  ] });
4915
4986
  }
4916
4987
  const req = request.value;
4917
4988
  const isConfirmation = req.responseType === "confirmation";
4918
- return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-ask-input`, "data-testid": TID.toolAskInput, children: [
4919
- /* @__PURE__ */ jsx14(Header, { strings, title: req.title }),
4920
- req.description ? /* @__PURE__ */ jsx14("p", { class: `${p13}-tool-desc`, children: req.description }) : null,
4921
- isConfirmation ? /* @__PURE__ */ jsx14("p", { class: `${p13}-tool-question`, children: req.question }) : null,
4922
- isConfirmation ? /* @__PURE__ */ jsxs11("div", { class: `${p13}-form-actions`, children: [
4923
- /* @__PURE__ */ jsx14(
4989
+ return /* @__PURE__ */ jsxs12("div", { class: `${p14}-tool-ask-input`, "data-testid": TID.toolAskInput, children: [
4990
+ /* @__PURE__ */ jsx15(Header, { strings, title: req.title }),
4991
+ req.description ? /* @__PURE__ */ jsx15("p", { class: `${p14}-tool-desc`, children: req.description }) : null,
4992
+ isConfirmation ? /* @__PURE__ */ jsx15("p", { class: `${p14}-tool-question`, children: req.question }) : null,
4993
+ isConfirmation ? /* @__PURE__ */ jsxs12("div", { class: `${p14}-form-actions`, children: [
4994
+ /* @__PURE__ */ jsx15(
4924
4995
  "button",
4925
4996
  {
4926
4997
  type: "button",
4927
- class: `${p13}-form-skip`,
4998
+ class: `${p14}-form-skip`,
4928
4999
  onClick: () => resolve(void 0, false),
4929
5000
  "data-testid": TID.toolInputSkip,
4930
5001
  children: strings.reject
4931
5002
  }
4932
5003
  ),
4933
- /* @__PURE__ */ jsx14(
5004
+ /* @__PURE__ */ jsx15(
4934
5005
  "button",
4935
5006
  {
4936
5007
  type: "button",
4937
- class: `${p13}-form-submit`,
5008
+ class: `${p14}-form-submit`,
4938
5009
  onClick: () => resolve(void 0, true),
4939
5010
  "data-testid": TID.toolInputSubmit,
4940
5011
  children: strings.approve
4941
5012
  }
4942
5013
  )
4943
- ] }) : /* @__PURE__ */ jsx14(
5014
+ ] }) : /* @__PURE__ */ jsx15(
4944
5015
  DynamicForm,
4945
5016
  {
4946
5017
  fields: askInputToFields(req),
@@ -4956,9 +5027,9 @@ function ToolAskInput({ part, strings, active, onSubmit, onDecision }) {
4956
5027
  ] });
4957
5028
  }
4958
5029
  function Header({ strings, title }) {
4959
- return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-head`, children: [
4960
- /* @__PURE__ */ jsx14("span", { class: `${p13}-tool-badge`, children: strings.inputRequired }),
4961
- title ? /* @__PURE__ */ jsx14("strong", { class: `${p13}-tool-title`, children: title }) : null
5030
+ return /* @__PURE__ */ jsxs12("div", { class: `${p14}-tool-head`, children: [
5031
+ /* @__PURE__ */ jsx15("span", { class: `${p14}-tool-badge`, children: strings.inputRequired }),
5032
+ title ? /* @__PURE__ */ jsx15("strong", { class: `${p14}-tool-title`, children: title }) : null
4962
5033
  ] });
4963
5034
  }
4964
5035
  function DecidedSummary({ part, strings }) {
@@ -4966,9 +5037,9 @@ function DecidedSummary({ part, strings }) {
4966
5037
  const approval = useComputed3(() => part.approvalSig.value);
4967
5038
  const answer = approval.value?.approved !== void 0 ? approval.value.reason ?? "" : summarizeOutput(output.value);
4968
5039
  const skipped = approval.value?.approved === false;
4969
- return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-ask-input ${p13}-tool-decided`, "data-testid": TID.toolDecision, children: [
4970
- /* @__PURE__ */ jsx14("span", { class: `${p13}-tool-decided-label`, children: skipped ? strings.inputSkip : strings.inputSubmitted }),
4971
- /* @__PURE__ */ jsx14("span", { class: `${p13}-tool-decided-value`, children: skipped ? "" : answer || strings.inputSubmitted })
5040
+ return /* @__PURE__ */ jsxs12("div", { class: `${p14}-tool-ask-input ${p14}-tool-decided`, "data-testid": TID.toolDecision, children: [
5041
+ /* @__PURE__ */ jsx15("span", { class: `${p14}-tool-decided-label`, children: skipped ? strings.inputSkip : strings.inputSubmitted }),
5042
+ /* @__PURE__ */ jsx15("span", { class: `${p14}-tool-decided-value`, children: skipped ? "" : answer || strings.inputSubmitted })
4972
5043
  ] });
4973
5044
  }
4974
5045
  function summarizeOutput(output) {
@@ -4982,37 +5053,70 @@ function summarizeOutput(output) {
4982
5053
  return String(output);
4983
5054
  }
4984
5055
 
4985
- // src/ui/tool-chip.tsx
4986
- import { jsx as jsx15, jsxs as jsxs12 } from "preact/jsx-runtime";
4987
- function ToolChip({ part, strings }) {
4988
- const p33 = BRAND.cssPrefix;
4989
- return /* @__PURE__ */ jsxs12("span", { class: `${p33}-tool-chip`, role: "status", children: [
4990
- /* @__PURE__ */ jsxs12("span", { children: [
4991
- strings.usedTool,
4992
- ":"
5056
+ // src/ui/tool-call.tsx
5057
+ import { useComputed as useComputed4 } from "@preact/signals";
5058
+ import { jsx as jsx16, jsxs as jsxs13 } from "preact/jsx-runtime";
5059
+ var p15 = BRAND.cssPrefix;
5060
+ function displayToolName2(toolName) {
5061
+ return (toolName.startsWith("tool:") ? toolName.slice(5) : toolName).replace(/[-_]+/g, " ").trim();
5062
+ }
5063
+ function ToolCall({ part, strings }) {
5064
+ const details = useComputed4(() => pretty(part.inputSig.value));
5065
+ const result = useComputed4(() => part.errorSig.value ?? pretty(unwrapResult(part.outputSig.value)));
5066
+ const isError = useComputed4(() => !!part.errorSig.value);
5067
+ if (!details.value && !result.value) return null;
5068
+ return /* @__PURE__ */ jsxs13("details", { class: `${p15}-tool-call`, "data-testid": TID.toolCall, children: [
5069
+ /* @__PURE__ */ jsxs13("summary", { class: `${p15}-tool-call-summary`, children: [
5070
+ /* @__PURE__ */ jsx16("span", { class: `${p15}-tool-badge`, children: strings.usedTool }),
5071
+ /* @__PURE__ */ jsx16("strong", { class: `${p15}-tool-title`, children: displayToolName2(part.toolName) })
4993
5072
  ] }),
4994
- /* @__PURE__ */ jsx15("strong", { children: part.toolName })
5073
+ details.value ? /* @__PURE__ */ jsxs13("div", { class: `${p15}-tool-call-section`, children: [
5074
+ /* @__PURE__ */ jsx16("span", { class: `${p15}-tool-call-label`, children: strings.toolDetails }),
5075
+ /* @__PURE__ */ jsx16("pre", { class: `${p15}-tool-args`, children: details.value })
5076
+ ] }) : null,
5077
+ result.value ? /* @__PURE__ */ jsxs13("div", { class: `${p15}-tool-call-section`, "data-error": isError.value ? "true" : void 0, children: [
5078
+ /* @__PURE__ */ jsx16("span", { class: `${p15}-tool-call-label`, children: strings.toolResult }),
5079
+ /* @__PURE__ */ jsx16("pre", { class: `${p15}-tool-args`, children: result.value })
5080
+ ] }) : null
4995
5081
  ] });
4996
5082
  }
5083
+ function unwrapResult(output) {
5084
+ if (output && typeof output === "object") {
5085
+ const rec = output;
5086
+ if (rec.storage === "tool-result-ref" && "summary" in rec) return rec.summary;
5087
+ }
5088
+ return output;
5089
+ }
5090
+ function pretty(value) {
5091
+ if (value == null) return "";
5092
+ try {
5093
+ const json = typeof value === "string" ? value : JSON.stringify(value, null, 2);
5094
+ if (!json || json === "{}" || json === "[]" || json === '""') return "";
5095
+ return json.length > 600 ? `${json.slice(0, 600)}\u2026` : json;
5096
+ } catch {
5097
+ return "";
5098
+ }
5099
+ }
4997
5100
 
4998
5101
  // src/ui/message-bubble.tsx
4999
- import { jsx as jsx16, jsxs as jsxs13 } from "preact/jsx-runtime";
5000
- var p14 = BRAND.cssPrefix;
5102
+ import { jsx as jsx17, jsxs as jsxs14 } from "preact/jsx-runtime";
5103
+ var p16 = BRAND.cssPrefix;
5001
5104
  function MessageBubble({
5002
5105
  message,
5003
5106
  strings,
5004
5107
  responseMode,
5005
5108
  showReasoning,
5006
5109
  showToolCalls,
5110
+ showSources,
5007
5111
  interactive = false,
5008
5112
  tool
5009
5113
  }) {
5010
- const parts = useComputed4(() => message.partsSig.value);
5114
+ const parts = useComputed5(() => message.partsSig.value);
5011
5115
  const partList = parts.value;
5012
- const hasAnswerText = useComputed4(
5116
+ const hasAnswerText = useComputed5(
5013
5117
  () => message.partsSig.value.some((part) => part.kind === "text" && part.textSig.value.length > 0)
5014
5118
  );
5015
- const reasoningVisible = useComputed4(
5119
+ const reasoningVisible = useComputed5(
5016
5120
  () => showReasoning && message.partsSig.value.some((part) => part.kind === "reasoning")
5017
5121
  );
5018
5122
  const streaming = message.role === "assistant" && message.status === "streaming";
@@ -5020,9 +5124,9 @@ function MessageBubble({
5020
5124
  const working = streaming && !hasAnswerText.value;
5021
5125
  const showStreamDots = streaming && !bufferedHold && !(reasoningVisible.value && working);
5022
5126
  const stamp = formatStamp(message.createdAt);
5023
- return /* @__PURE__ */ jsx16("div", { class: `${p14}-bubble-row`, "data-role": message.role, "data-testid": tid(TID.messageBubble, message.id), children: /* @__PURE__ */ jsxs13("div", { class: `${p14}-bubble-col`, children: [
5024
- /* @__PURE__ */ jsxs13("div", { class: `${p14}-bubble`, children: [
5025
- bufferedHold ? /* @__PURE__ */ jsx16(LoadingSpinner, { label: strings.loading }) : partList.map((part) => /* @__PURE__ */ jsx16(
5127
+ return /* @__PURE__ */ jsx17("div", { class: `${p16}-bubble-row`, "data-role": message.role, "data-testid": tid(TID.messageBubble, message.id), children: /* @__PURE__ */ jsxs14("div", { class: `${p16}-bubble-col`, children: [
5128
+ /* @__PURE__ */ jsxs14("div", { class: `${p16}-bubble`, children: [
5129
+ bufferedHold ? /* @__PURE__ */ jsx17(LoadingSpinner, { label: strings.loading }) : partList.map((part) => /* @__PURE__ */ jsx17(
5026
5130
  PartView,
5027
5131
  {
5028
5132
  part,
@@ -5030,15 +5134,16 @@ function MessageBubble({
5030
5134
  strings,
5031
5135
  showReasoning,
5032
5136
  showToolCalls,
5137
+ showSources,
5033
5138
  interactive,
5034
5139
  tool
5035
5140
  },
5036
5141
  partKey(part)
5037
5142
  )),
5038
- showStreamDots && /* @__PURE__ */ jsx16(TypingDots, {}),
5039
- message.status === "error" && message.errorText ? /* @__PURE__ */ jsx16("div", { class: `${p14}-error`, role: "alert", children: /* @__PURE__ */ jsx16("span", { children: message.errorText }) }) : null
5143
+ showStreamDots && /* @__PURE__ */ jsx17(TypingDots, {}),
5144
+ message.status === "error" && message.errorText ? /* @__PURE__ */ jsx17("div", { class: `${p16}-error`, role: "alert", children: /* @__PURE__ */ jsx17("span", { children: message.errorText }) }) : null
5040
5145
  ] }),
5041
- stamp ? /* @__PURE__ */ jsx16("time", { class: `${p14}-bubble-time`, dateTime: stamp.iso, title: stamp.full, children: stamp.short }) : null
5146
+ stamp ? /* @__PURE__ */ jsx17("time", { class: `${p16}-bubble-time`, dateTime: stamp.iso, title: stamp.full, children: stamp.short }) : null
5042
5147
  ] }) });
5043
5148
  }
5044
5149
  function formatStamp(createdAt) {
@@ -5060,16 +5165,17 @@ function PartView({
5060
5165
  strings,
5061
5166
  showReasoning,
5062
5167
  showToolCalls,
5168
+ showSources,
5063
5169
  interactive,
5064
5170
  tool
5065
5171
  }) {
5066
5172
  switch (part.kind) {
5067
5173
  case "text":
5068
- return /* @__PURE__ */ jsx16(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig });
5174
+ return /* @__PURE__ */ jsx17(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig });
5069
5175
  case "reasoning":
5070
- return showReasoning ? /* @__PURE__ */ jsx16(ReasoningView, { part, active, strings }) : null;
5176
+ return showReasoning ? /* @__PURE__ */ jsx17(ReasoningView, { part, active, strings }) : null;
5071
5177
  case "tool":
5072
- return /* @__PURE__ */ jsx16(
5178
+ return /* @__PURE__ */ jsx17(
5073
5179
  ToolPartView,
5074
5180
  {
5075
5181
  part,
@@ -5081,11 +5187,11 @@ function PartView({
5081
5187
  );
5082
5188
  case "file":
5083
5189
  if (part.mediaType.startsWith("image/")) {
5084
- return /* @__PURE__ */ jsx16("img", { src: part.url, alt: "", loading: "lazy" });
5190
+ return /* @__PURE__ */ jsx17("img", { src: part.url, alt: "", loading: "lazy" });
5085
5191
  }
5086
- return /* @__PURE__ */ jsx16("a", { href: part.url, target: "_blank", rel: "noreferrer noopener", children: part.url });
5192
+ return /* @__PURE__ */ jsx17("a", { href: part.url, target: "_blank", rel: "noreferrer noopener", children: part.url });
5087
5193
  case "source":
5088
- return null;
5194
+ return showSources ? /* @__PURE__ */ jsx17(SourceView, { part, strings }) : null;
5089
5195
  }
5090
5196
  }
5091
5197
  function ToolPartView({
@@ -5095,11 +5201,10 @@ function ToolPartView({
5095
5201
  interactive,
5096
5202
  tool
5097
5203
  }) {
5098
- const state = useComputed4(() => part.stateSig.value);
5099
- const hasApproval = useComputed4(() => part.approvalSig.value !== void 0);
5204
+ const hasApproval = useComputed5(() => part.approvalSig.value !== void 0);
5100
5205
  if (tool?.humanInLoop) {
5101
- if (isAskUserInputTool(part.toolName) || state.value === "awaiting-input") {
5102
- return /* @__PURE__ */ jsx16(
5206
+ if (isAskUserInputTool(part.toolName)) {
5207
+ return /* @__PURE__ */ jsx17(
5103
5208
  ToolAskInput,
5104
5209
  {
5105
5210
  part,
@@ -5110,20 +5215,20 @@ function ToolPartView({
5110
5215
  }
5111
5216
  );
5112
5217
  }
5113
- if (hasApproval.value || state.value === "awaiting-approval") {
5114
- return /* @__PURE__ */ jsx16(ToolApproval, { part, strings, active: interactive, onDecision: tool.onDecision });
5218
+ if (hasApproval.value) {
5219
+ return /* @__PURE__ */ jsx17(ToolApproval, { part, strings, active: interactive, onDecision: tool.onDecision });
5115
5220
  }
5116
5221
  }
5117
- return showToolCalls ? /* @__PURE__ */ jsx16(ToolChip, { part, strings }) : null;
5222
+ return showToolCalls ? /* @__PURE__ */ jsx17(ToolCall, { part, strings }) : null;
5118
5223
  }
5119
5224
  function ReasoningView({
5120
5225
  part,
5121
5226
  active,
5122
5227
  strings
5123
5228
  }) {
5124
- return /* @__PURE__ */ jsxs13("details", { class: `${p14}-reasoning`, open: active, "data-active": active ? "true" : void 0, children: [
5125
- /* @__PURE__ */ jsx16("summary", { class: `${p14}-reasoning-summary`, children: /* @__PURE__ */ jsx16("span", { class: `${p14}-reasoning-label`, children: active ? strings.thinking : strings.thoughts }) }),
5126
- /* @__PURE__ */ jsx16("div", { class: `${p14}-reasoning-body`, children: /* @__PURE__ */ jsx16(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig }) })
5229
+ return /* @__PURE__ */ jsxs14("details", { class: `${p16}-reasoning`, open: active, "data-active": active ? "true" : void 0, children: [
5230
+ /* @__PURE__ */ jsx17("summary", { class: `${p16}-reasoning-summary`, children: /* @__PURE__ */ jsx17("span", { class: `${p16}-reasoning-label`, children: active ? strings.thinking : strings.thoughts }) }),
5231
+ /* @__PURE__ */ jsx17("div", { class: `${p16}-reasoning-body`, children: /* @__PURE__ */ jsx17(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig }) })
5127
5232
  ] });
5128
5233
  }
5129
5234
  function partKey(part) {
@@ -5140,22 +5245,22 @@ function partKey(part) {
5140
5245
  }
5141
5246
  }
5142
5247
  function TypingDots() {
5143
- return /* @__PURE__ */ jsxs13("span", { class: `${p14}-typing`, "aria-hidden": "true", children: [
5144
- /* @__PURE__ */ jsx16("span", {}),
5145
- /* @__PURE__ */ jsx16("span", {}),
5146
- /* @__PURE__ */ jsx16("span", {})
5248
+ return /* @__PURE__ */ jsxs14("span", { class: `${p16}-typing`, "aria-hidden": "true", children: [
5249
+ /* @__PURE__ */ jsx17("span", {}),
5250
+ /* @__PURE__ */ jsx17("span", {}),
5251
+ /* @__PURE__ */ jsx17("span", {})
5147
5252
  ] });
5148
5253
  }
5149
5254
  function LoadingSpinner({ label }) {
5150
- return /* @__PURE__ */ jsxs13("span", { class: `${p14}-loading`, role: "status", children: [
5151
- /* @__PURE__ */ jsx16("span", { class: `${p14}-loading-spinner`, "aria-hidden": "true" }),
5152
- /* @__PURE__ */ jsx16("span", { class: `${p14}-loading-label`, children: label })
5255
+ return /* @__PURE__ */ jsxs14("span", { class: `${p16}-loading`, role: "status", children: [
5256
+ /* @__PURE__ */ jsx17("span", { class: `${p16}-loading-spinner`, "aria-hidden": "true" }),
5257
+ /* @__PURE__ */ jsx17("span", { class: `${p16}-loading-label`, children: label })
5153
5258
  ] });
5154
5259
  }
5155
5260
 
5156
5261
  // src/ui/message-list.tsx
5157
- import { jsx as jsx17, jsxs as jsxs14 } from "preact/jsx-runtime";
5158
- var p15 = BRAND.cssPrefix;
5262
+ import { jsx as jsx18, jsxs as jsxs15 } from "preact/jsx-runtime";
5263
+ var p17 = BRAND.cssPrefix;
5159
5264
  var STICK_THRESHOLD = 120;
5160
5265
  var INTERACTION_GRACE_MS = 350;
5161
5266
  var DIVIDER_IDLE_MS = 1200;
@@ -5165,6 +5270,7 @@ function MessageList({
5165
5270
  responseMode,
5166
5271
  showReasoning,
5167
5272
  showToolCalls,
5273
+ showSources,
5168
5274
  loading,
5169
5275
  idle,
5170
5276
  tool,
@@ -5173,7 +5279,7 @@ function MessageList({
5173
5279
  onFillForm
5174
5280
  }) {
5175
5281
  const ref = useRef5(null);
5176
- const messages = useComputed5(() => messagesSig.value);
5282
+ const messages = useComputed6(() => messagesSig.value);
5177
5283
  const [showJump, setShowJump] = useState6(false);
5178
5284
  const [scrolling, setScrolling] = useState6(false);
5179
5285
  const hasHydratedRef = useRef5(false);
@@ -5325,7 +5431,7 @@ function MessageList({
5325
5431
  const pendingMarkers = [...formMarkers ?? []].toSorted(
5326
5432
  (a, b) => (a.createdAt ?? Infinity) - (b.createdAt ?? Infinity)
5327
5433
  );
5328
- const markerRow = (marker) => /* @__PURE__ */ jsx17(
5434
+ const markerRow = (marker) => /* @__PURE__ */ jsx18(
5329
5435
  FormDoneMarker,
5330
5436
  {
5331
5437
  marker,
@@ -5346,12 +5452,12 @@ function MessageList({
5346
5452
  const day = dayKey(m.createdAt);
5347
5453
  if (day && day !== prevDay) {
5348
5454
  rows.push(
5349
- /* @__PURE__ */ jsx17("div", { class: `${p15}-date-divider`, children: /* @__PURE__ */ jsx17("span", { class: `${p15}-date-pill`, title: fullDate(m.createdAt), children: dayLabel(m.createdAt, strings) }) }, `day:${day}`)
5455
+ /* @__PURE__ */ jsx18("div", { class: `${p17}-date-divider`, children: /* @__PURE__ */ jsx18("span", { class: `${p17}-date-pill`, title: fullDate(m.createdAt), children: dayLabel(m.createdAt, strings) }) }, `day:${day}`)
5350
5456
  );
5351
5457
  prevDay = day;
5352
5458
  }
5353
5459
  rows.push(
5354
- /* @__PURE__ */ jsx17(
5460
+ /* @__PURE__ */ jsx18(
5355
5461
  MessageBubble,
5356
5462
  {
5357
5463
  message: m,
@@ -5359,6 +5465,7 @@ function MessageList({
5359
5465
  responseMode,
5360
5466
  showReasoning,
5361
5467
  showToolCalls,
5468
+ showSources,
5362
5469
  interactive: Boolean(idle) && m.id === lastId,
5363
5470
  tool
5364
5471
  },
@@ -5369,33 +5476,33 @@ function MessageList({
5369
5476
  for (const marker of pendingMarkers) {
5370
5477
  rows.push(markerRow(marker));
5371
5478
  }
5372
- return /* @__PURE__ */ jsxs14("div", { class: `${p15}-list-wrap`, children: [
5373
- /* @__PURE__ */ jsxs14(
5479
+ return /* @__PURE__ */ jsxs15("div", { class: `${p17}-list-wrap`, children: [
5480
+ /* @__PURE__ */ jsxs15(
5374
5481
  "div",
5375
5482
  {
5376
5483
  ref,
5377
- class: `${p15}-list`,
5484
+ class: `${p17}-list`,
5378
5485
  role: "log",
5379
5486
  "aria-live": "polite",
5380
5487
  "aria-relevant": "additions text",
5381
5488
  "data-scrolling": scrolling ? "true" : void 0,
5382
5489
  children: [
5383
- loading && messages.value.length === 0 ? /* @__PURE__ */ jsx17("div", { class: `${p15}-list-loading`, role: "status", children: strings.conversationLoading }) : null,
5490
+ loading && messages.value.length === 0 ? /* @__PURE__ */ jsx18("div", { class: `${p17}-list-loading`, role: "status", children: strings.conversationLoading }) : null,
5384
5491
  rows,
5385
- form ? /* @__PURE__ */ jsx17(FormGate, { form: form.form, strings, onSubmit: form.onSubmit, onSkip: form.onSkip }) : null
5492
+ form ? /* @__PURE__ */ jsx18(FormGate, { form: form.form, strings, onSubmit: form.onSubmit, onSkip: form.onSkip }) : null
5386
5493
  ]
5387
5494
  }
5388
5495
  ),
5389
- showJump ? /* @__PURE__ */ jsx17(
5496
+ showJump ? /* @__PURE__ */ jsx18(
5390
5497
  "button",
5391
5498
  {
5392
5499
  type: "button",
5393
- class: `${p15}-jump`,
5500
+ class: `${p17}-jump`,
5394
5501
  onClick: jumpToBottom,
5395
5502
  "aria-label": strings.scrollToBottom,
5396
5503
  title: strings.scrollToBottom,
5397
5504
  "data-testid": TID.scrollToBottom,
5398
- children: /* @__PURE__ */ jsx17(ChevronDownIcon, {})
5505
+ children: /* @__PURE__ */ jsx18(ChevronDownIcon, {})
5399
5506
  }
5400
5507
  ) : null
5401
5508
  ] });
@@ -5454,8 +5561,10 @@ function startOfDay(ms) {
5454
5561
  }
5455
5562
 
5456
5563
  // src/ui/conversation-list.tsx
5457
- import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs15 } from "preact/jsx-runtime";
5564
+ import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs16 } from "preact/jsx-runtime";
5458
5565
  var log11 = logger.scope("history");
5566
+ var DEFAULT_SKELETON_ROWS = 3;
5567
+ var MAX_SKELETON_ROWS = 6;
5459
5568
  var BUCKET_TO_STRING = {
5460
5569
  today: "dateToday",
5461
5570
  yesterday: "dateYesterday",
@@ -5474,11 +5583,12 @@ function ConversationList({
5474
5583
  transport,
5475
5584
  strings,
5476
5585
  locale,
5586
+ persistence,
5477
5587
  visitorId,
5478
5588
  onSelect,
5479
5589
  onNewConversation
5480
5590
  }) {
5481
- const p33 = BRAND.cssPrefix;
5591
+ const p35 = BRAND.cssPrefix;
5482
5592
  const seed = transport.peekConversations({ visitorId });
5483
5593
  const [state, setState] = useState7(seed ? "loaded" : "loading");
5484
5594
  const [conversations, setChats] = useState7(seed?.conversations ?? []);
@@ -5486,8 +5596,10 @@ function ConversationList({
5486
5596
  let cancelled = false;
5487
5597
  transport.listConversations({ visitorId }).then((res) => {
5488
5598
  if (cancelled) return;
5489
- setChats(res.conversations ?? []);
5599
+ const rows = res.conversations ?? [];
5600
+ setChats(rows);
5490
5601
  setState("loaded");
5602
+ persistence.saveHistoryCount(rows.length);
5491
5603
  }).catch((err) => {
5492
5604
  if (cancelled) return;
5493
5605
  log11.warn("listConversations failed", { err });
@@ -5496,29 +5608,33 @@ function ConversationList({
5496
5608
  return () => {
5497
5609
  cancelled = true;
5498
5610
  };
5499
- }, [transport, visitorId]);
5500
- const newChatButton = onNewConversation ? /* @__PURE__ */ jsx18("div", { class: `${p33}-history-footer`, children: /* @__PURE__ */ jsxs15(
5611
+ }, [transport, visitorId, persistence]);
5612
+ const newChatButton = onNewConversation ? /* @__PURE__ */ jsx19("div", { class: `${p35}-history-footer`, children: /* @__PURE__ */ jsxs16(
5501
5613
  "button",
5502
5614
  {
5503
5615
  type: "button",
5504
- class: `${p33}-history-new`,
5616
+ class: `${p35}-history-new`,
5505
5617
  onClick: onNewConversation,
5506
5618
  "data-testid": TID.sidebarNewConversation,
5507
5619
  children: [
5508
- /* @__PURE__ */ jsx18(PlusIcon, {}),
5620
+ /* @__PURE__ */ jsx19(PlusIcon, {}),
5509
5621
  strings.newConversation
5510
5622
  ]
5511
5623
  }
5512
5624
  ) }) : null;
5513
5625
  if (state === "loading") {
5514
- return /* @__PURE__ */ jsxs15(Fragment3, { children: [
5515
- /* @__PURE__ */ jsx18("div", { class: `${p33}-history`, "aria-busy": "true", "aria-label": strings.historyLoading, children: /* @__PURE__ */ jsxs15("div", { class: `${p33}-history-group`, "aria-hidden": "true", children: [
5516
- /* @__PURE__ */ jsx18("div", { class: `${p33}-history-heading`, children: /* @__PURE__ */ jsx18("span", { class: `${p33}-history-skeleton-line ${p33}-skeleton-heading` }) }),
5517
- /* @__PURE__ */ jsx18("div", { class: `${p33}-history-card`, children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs15("div", { class: `${p33}-history-skeleton-item`, children: [
5518
- /* @__PURE__ */ jsx18("span", { class: `${p33}-history-skeleton-avatar` }),
5519
- /* @__PURE__ */ jsxs15("span", { class: `${p33}-history-skeleton-body`, children: [
5520
- /* @__PURE__ */ jsx18("span", { class: `${p33}-history-skeleton-line ${p33}-skeleton-title` }),
5521
- /* @__PURE__ */ jsx18("span", { class: `${p33}-history-skeleton-line ${p33}-skeleton-preview` })
5626
+ const rows = Math.min(persistence.loadHistoryCount() ?? DEFAULT_SKELETON_ROWS, MAX_SKELETON_ROWS);
5627
+ return /* @__PURE__ */ jsxs16(Fragment3, { children: [
5628
+ /* @__PURE__ */ jsx19("div", { class: `${p35}-history`, "aria-busy": "true", "aria-label": strings.historyLoading, children: /* @__PURE__ */ jsxs16("div", { class: `${p35}-history-group`, "aria-hidden": "true", children: [
5629
+ /* @__PURE__ */ jsx19("div", { class: `${p35}-history-heading`, children: /* @__PURE__ */ jsx19("span", { class: `${p35}-skeleton ${p35}-skeleton-heading` }) }),
5630
+ /* @__PURE__ */ jsx19("div", { class: `${p35}-history-card`, children: Array.from({ length: Math.max(1, rows) }, (_, i) => /* @__PURE__ */ jsxs16("div", { class: `${p35}-history-item ${p35}-history-item-skeleton`, children: [
5631
+ /* @__PURE__ */ jsx19("span", { class: `${p35}-history-avatar ${p35}-skeleton` }),
5632
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-body`, children: [
5633
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-row`, children: [
5634
+ /* @__PURE__ */ jsx19("span", { class: `${p35}-history-title`, children: /* @__PURE__ */ jsx19("span", { class: `${p35}-skeleton ${p35}-skeleton-title` }) }),
5635
+ /* @__PURE__ */ jsx19("span", { class: `${p35}-history-time`, children: /* @__PURE__ */ jsx19("span", { class: `${p35}-skeleton ${p35}-skeleton-time` }) })
5636
+ ] }),
5637
+ /* @__PURE__ */ jsx19("span", { class: `${p35}-history-row`, children: /* @__PURE__ */ jsx19("span", { class: `${p35}-history-preview`, children: /* @__PURE__ */ jsx19("span", { class: `${p35}-skeleton ${p35}-skeleton-preview` }) }) })
5522
5638
  ] })
5523
5639
  ] }, i)) })
5524
5640
  ] }) }),
@@ -5526,36 +5642,36 @@ function ConversationList({
5526
5642
  ] });
5527
5643
  }
5528
5644
  if (state === "error" || conversations.length === 0) {
5529
- return /* @__PURE__ */ jsxs15(Fragment3, { children: [
5530
- /* @__PURE__ */ jsx18("div", { class: `${p33}-history-empty`, children: strings.historyEmpty }),
5645
+ return /* @__PURE__ */ jsxs16(Fragment3, { children: [
5646
+ /* @__PURE__ */ jsx19("div", { class: `${p35}-history-empty`, children: strings.historyEmpty }),
5531
5647
  newChatButton
5532
5648
  ] });
5533
5649
  }
5534
5650
  const now = Date.now();
5535
5651
  const groups = groupByBucket(now, conversations);
5536
- return /* @__PURE__ */ jsxs15(Fragment3, { children: [
5537
- /* @__PURE__ */ jsx18("div", { class: `${p33}-history`, role: "list", children: groups.map((group) => /* @__PURE__ */ jsxs15("div", { class: `${p33}-history-group`, children: [
5538
- /* @__PURE__ */ jsx18("div", { class: `${p33}-history-heading`, children: strings[BUCKET_TO_STRING[group.bucket]] }),
5539
- /* @__PURE__ */ jsx18("div", { class: `${p33}-history-card`, children: group.conversations.map((chat) => /* @__PURE__ */ jsxs15(
5652
+ return /* @__PURE__ */ jsxs16(Fragment3, { children: [
5653
+ /* @__PURE__ */ jsx19("div", { class: `${p35}-history`, role: "list", children: groups.map((group) => /* @__PURE__ */ jsxs16("div", { class: `${p35}-history-group`, children: [
5654
+ /* @__PURE__ */ jsx19("div", { class: `${p35}-history-heading`, children: strings[BUCKET_TO_STRING[group.bucket]] }),
5655
+ /* @__PURE__ */ jsx19("div", { class: `${p35}-history-card`, children: group.conversations.map((chat) => /* @__PURE__ */ jsxs16(
5540
5656
  "button",
5541
5657
  {
5542
5658
  type: "button",
5543
5659
  role: "listitem",
5544
- class: `${p33}-history-item`,
5660
+ class: `${p35}-history-item`,
5545
5661
  onClick: () => onSelect(chat),
5546
5662
  "data-closed": chat.canContinue ? void 0 : "true",
5547
5663
  "data-unread": (chat.unreadCount ?? 0) > 0 ? "true" : void 0,
5548
5664
  "data-testid": tid(TID.historyItem, chat.conversationId),
5549
5665
  children: [
5550
- /* @__PURE__ */ jsx18("span", { class: `${p33}-history-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx18(MessageIcon, {}) }),
5551
- /* @__PURE__ */ jsxs15("span", { class: `${p33}-history-body`, children: [
5552
- /* @__PURE__ */ jsxs15("span", { class: `${p33}-history-row`, children: [
5553
- /* @__PURE__ */ jsx18("span", { class: `${p33}-history-title`, children: chat.title }),
5554
- /* @__PURE__ */ jsx18("span", { class: `${p33}-history-time`, children: rowTime(chat.lastMessageAt, now, locale) })
5666
+ /* @__PURE__ */ jsx19("span", { class: `${p35}-history-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx19(MessageIcon, {}) }),
5667
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-body`, children: [
5668
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-row`, children: [
5669
+ /* @__PURE__ */ jsx19("span", { class: `${p35}-history-title`, children: chat.title }),
5670
+ /* @__PURE__ */ jsx19("span", { class: `${p35}-history-time`, children: rowTime(chat.lastMessageAt, now, locale) })
5555
5671
  ] }),
5556
- /* @__PURE__ */ jsxs15("span", { class: `${p33}-history-row`, children: [
5557
- /* @__PURE__ */ jsx18("span", { class: `${p33}-history-preview`, children: chat.preview ?? (chat.canContinue ? strings.historyContinue : strings.conversationClosed) }),
5558
- (chat.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx18("span", { class: `${p33}-history-dot` }) : null
5672
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-row`, children: [
5673
+ /* @__PURE__ */ jsx19("span", { class: `${p35}-history-preview`, children: chat.preview ?? (chat.canContinue ? strings.historyContinue : strings.conversationClosed) }),
5674
+ (chat.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx19("span", { class: `${p35}-history-dot` }) : null
5559
5675
  ] })
5560
5676
  ] })
5561
5677
  ]
@@ -5568,15 +5684,15 @@ function ConversationList({
5568
5684
  }
5569
5685
 
5570
5686
  // src/ui/suggestions.tsx
5571
- import { jsx as jsx19 } from "preact/jsx-runtime";
5572
- var p16 = BRAND.cssPrefix;
5687
+ import { jsx as jsx20 } from "preact/jsx-runtime";
5688
+ var p18 = BRAND.cssPrefix;
5573
5689
  function Suggestions({ suggestions, onPick }) {
5574
5690
  if (suggestions.length === 0) return null;
5575
- return /* @__PURE__ */ jsx19("div", { class: `${p16}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx19(
5691
+ return /* @__PURE__ */ jsx20("div", { class: `${p18}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx20(
5576
5692
  "button",
5577
5693
  {
5578
5694
  type: "button",
5579
- class: `${p16}-suggestion`,
5695
+ class: `${p18}-suggestion`,
5580
5696
  onClick: () => onPick(s),
5581
5697
  "data-testid": tid(TID.suggestion, i),
5582
5698
  children: s.label
@@ -5586,8 +5702,8 @@ function Suggestions({ suggestions, onPick }) {
5586
5702
  }
5587
5703
 
5588
5704
  // src/ui/panel.tsx
5589
- import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs16 } from "preact/jsx-runtime";
5590
- var p17 = BRAND.cssPrefix;
5705
+ import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs17 } from "preact/jsx-runtime";
5706
+ var p19 = BRAND.cssPrefix;
5591
5707
  function Panel(props2) {
5592
5708
  const { options, onClose } = props2;
5593
5709
  const s = options.strings;
@@ -5611,18 +5727,18 @@ function Panel(props2) {
5611
5727
  }, []);
5612
5728
  const { visible: dragOver } = useFileDrop({ containerRef, onDrop: onDropItems });
5613
5729
  useDragMove(containerRef.current, options.mode === "modal");
5614
- return /* @__PURE__ */ jsxs16(
5730
+ return /* @__PURE__ */ jsxs17(
5615
5731
  "div",
5616
5732
  {
5617
5733
  ref: containerRef,
5618
- class: `${p17}-panel`,
5734
+ class: `${p19}-panel`,
5619
5735
  role: "dialog",
5620
5736
  "aria-modal": "false",
5621
5737
  "aria-label": s.panelTitle,
5622
5738
  style: { position: "relative" },
5623
5739
  "data-testid": TID.panel,
5624
5740
  children: [
5625
- /* @__PURE__ */ jsx20(
5741
+ /* @__PURE__ */ jsx21(
5626
5742
  PanelContent,
5627
5743
  {
5628
5744
  ...props2,
@@ -5631,7 +5747,7 @@ function Panel(props2) {
5631
5747
  composerAttachApiRef
5632
5748
  }
5633
5749
  ),
5634
- /* @__PURE__ */ jsx20(PoweredByBar, { poweredBy: props2.options.poweredBy })
5750
+ /* @__PURE__ */ jsx21(PoweredByBar, { poweredBy: props2.options.poweredBy })
5635
5751
  ]
5636
5752
  }
5637
5753
  );
@@ -5642,6 +5758,7 @@ function PanelContent(props2) {
5642
5758
  transport,
5643
5759
  feedback,
5644
5760
  bus,
5761
+ persistence,
5645
5762
  panelSize,
5646
5763
  view,
5647
5764
  canSend,
@@ -5677,9 +5794,9 @@ function PanelContent(props2) {
5677
5794
  if (activeForm) {
5678
5795
  composerArea = null;
5679
5796
  } else if (canSend) {
5680
- composerArea = /* @__PURE__ */ jsxs16(Fragment4, { children: [
5681
- /* @__PURE__ */ jsx20(Suggestions, { suggestions, onPick: onSuggestion }),
5682
- /* @__PURE__ */ jsx20(
5797
+ composerArea = /* @__PURE__ */ jsxs17(Fragment4, { children: [
5798
+ /* @__PURE__ */ jsx21(Suggestions, { suggestions, onPick: onSuggestion }),
5799
+ /* @__PURE__ */ jsx21(
5683
5800
  Composer,
5684
5801
  {
5685
5802
  options,
@@ -5694,10 +5811,10 @@ function PanelContent(props2) {
5694
5811
  )
5695
5812
  ] });
5696
5813
  } else {
5697
- composerArea = /* @__PURE__ */ jsx20(ReadOnlyBanner, { label: s.conversationClosed, ctaLabel: s.startNewConversation, onNewConversation: onClear });
5814
+ composerArea = /* @__PURE__ */ jsx21(ReadOnlyBanner, { label: s.conversationClosed, ctaLabel: s.startNewConversation, onNewConversation: onClear });
5698
5815
  }
5699
- return /* @__PURE__ */ jsxs16(Fragment4, { children: [
5700
- view === "history" ? /* @__PURE__ */ jsx20(
5816
+ return /* @__PURE__ */ jsxs17(Fragment4, { children: [
5817
+ view === "history" ? /* @__PURE__ */ jsx21(
5701
5818
  HistoryHeader,
5702
5819
  {
5703
5820
  strings: s,
@@ -5705,34 +5822,35 @@ function PanelContent(props2) {
5705
5822
  onClose,
5706
5823
  showClose: canShowClose(options.mode, panelSize, options.actions)
5707
5824
  }
5708
- ) : /* @__PURE__ */ jsxs16("header", { class: `${p17}-header`, "data-testid": TID.panelHeader, children: [
5709
- onBack ? /* @__PURE__ */ jsx20(
5825
+ ) : /* @__PURE__ */ jsxs17("header", { class: `${p19}-header`, "data-testid": TID.panelHeader, children: [
5826
+ onBack ? /* @__PURE__ */ jsx21(
5710
5827
  "button",
5711
5828
  {
5712
5829
  type: "button",
5713
- class: `${p17}-icon-btn`,
5830
+ class: `${p19}-icon-btn`,
5714
5831
  onClick: onBack,
5715
5832
  "aria-label": s.moduleBack,
5716
5833
  title: s.moduleBack,
5717
- children: /* @__PURE__ */ jsx20(BackIcon, {})
5834
+ children: /* @__PURE__ */ jsx21(BackIcon, {})
5718
5835
  }
5719
5836
  ) : null,
5720
- agent ? /* @__PURE__ */ jsx20(AgentBadge, { agent, strings: s }) : /* @__PURE__ */ jsx20("h1", { children: s.panelTitle }),
5721
- /* @__PURE__ */ jsx20(HeaderActions, { panelProps: props2, variant: "chat" })
5837
+ agent ? /* @__PURE__ */ jsx21(AgentBadge, { agent, strings: s }) : /* @__PURE__ */ jsx21("h1", { children: s.panelTitle }),
5838
+ /* @__PURE__ */ jsx21(HeaderActions, { panelProps: props2, variant: "chat" })
5722
5839
  ] }),
5723
- view === "history" ? /* @__PURE__ */ jsx20(
5840
+ view === "history" ? /* @__PURE__ */ jsx21(
5724
5841
  ConversationList,
5725
5842
  {
5726
5843
  transport,
5727
5844
  strings: s,
5728
5845
  locale: options.locale,
5846
+ persistence,
5729
5847
  visitorId,
5730
5848
  onSelect: (conversation) => onSelectHistoryConversation(conversation.conversationId),
5731
5849
  onNewConversation
5732
5850
  }
5733
- ) : /* @__PURE__ */ jsxs16(Fragment4, { children: [
5734
- /* @__PURE__ */ jsx20(DropZone, { visible: dragOver, strings: s }),
5735
- /* @__PURE__ */ jsx20(
5851
+ ) : /* @__PURE__ */ jsxs17(Fragment4, { children: [
5852
+ /* @__PURE__ */ jsx21(DropZone, { visible: dragOver, strings: s }),
5853
+ /* @__PURE__ */ jsx21(
5736
5854
  MessageList,
5737
5855
  {
5738
5856
  messagesSig,
@@ -5740,6 +5858,7 @@ function PanelContent(props2) {
5740
5858
  responseMode: options.responseMode,
5741
5859
  showReasoning: options.showReasoning,
5742
5860
  showToolCalls: options.showToolCalls,
5861
+ showSources: options.showSources,
5743
5862
  loading: loadingMessages,
5744
5863
  idle: !isStreaming,
5745
5864
  tool,
@@ -5749,9 +5868,9 @@ function PanelContent(props2) {
5749
5868
  }
5750
5869
  ),
5751
5870
  composerArea,
5752
- /* @__PURE__ */ jsx20(ComposerFooter, { disclaimer: options.composerDisclaimer })
5871
+ /* @__PURE__ */ jsx21(ComposerFooter, { disclaimer: options.composerDisclaimer })
5753
5872
  ] }),
5754
- options.size.resize?.enabled ? /* @__PURE__ */ jsx20(
5873
+ options.size.resize?.enabled ? /* @__PURE__ */ jsx21(
5755
5874
  ResizeGrip,
5756
5875
  {
5757
5876
  panelEl: containerEl,
@@ -5770,28 +5889,28 @@ function HistoryHeader({
5770
5889
  onClose,
5771
5890
  showClose
5772
5891
  }) {
5773
- return /* @__PURE__ */ jsxs16("header", { class: `${p17}-header`, children: [
5774
- /* @__PURE__ */ jsx20(
5892
+ return /* @__PURE__ */ jsxs17("header", { class: `${p19}-header`, children: [
5893
+ /* @__PURE__ */ jsx21(
5775
5894
  "button",
5776
5895
  {
5777
5896
  type: "button",
5778
- class: `${p17}-icon-btn`,
5897
+ class: `${p19}-icon-btn`,
5779
5898
  onClick: onBack,
5780
5899
  "aria-label": strings.historyBack,
5781
5900
  title: strings.historyBack,
5782
- children: /* @__PURE__ */ jsx20(BackIcon, {})
5901
+ children: /* @__PURE__ */ jsx21(BackIcon, {})
5783
5902
  }
5784
5903
  ),
5785
- /* @__PURE__ */ jsx20("h1", { children: strings.historyTitle }),
5786
- showClose ? /* @__PURE__ */ jsx20(
5904
+ /* @__PURE__ */ jsx21("h1", { children: strings.historyTitle }),
5905
+ showClose ? /* @__PURE__ */ jsx21(
5787
5906
  "button",
5788
5907
  {
5789
5908
  type: "button",
5790
- class: `${p17}-icon-btn`,
5909
+ class: `${p19}-icon-btn`,
5791
5910
  onClick: onClose,
5792
5911
  "aria-label": strings.close,
5793
5912
  title: strings.close,
5794
- children: /* @__PURE__ */ jsx20(CloseIcon, {})
5913
+ children: /* @__PURE__ */ jsx21(CloseIcon, {})
5795
5914
  }
5796
5915
  ) : null
5797
5916
  ] });
@@ -5801,28 +5920,28 @@ function ReadOnlyBanner({
5801
5920
  ctaLabel,
5802
5921
  onNewConversation
5803
5922
  }) {
5804
- return /* @__PURE__ */ jsxs16("div", { class: `${p17}-readonly-banner`, role: "note", children: [
5805
- /* @__PURE__ */ jsx20("span", { class: `${p17}-readonly-label`, children: label }),
5806
- /* @__PURE__ */ jsx20("button", { type: "button", class: `${p17}-readonly-cta`, onClick: onNewConversation, children: ctaLabel })
5923
+ return /* @__PURE__ */ jsxs17("div", { class: `${p19}-readonly-banner`, role: "note", children: [
5924
+ /* @__PURE__ */ jsx21("span", { class: `${p19}-readonly-label`, children: label }),
5925
+ /* @__PURE__ */ jsx21("button", { type: "button", class: `${p19}-readonly-cta`, onClick: onNewConversation, children: ctaLabel })
5807
5926
  ] });
5808
5927
  }
5809
5928
  function ComposerFooter({ disclaimer }) {
5810
5929
  if (!disclaimer) return null;
5811
- return /* @__PURE__ */ jsx20("div", { class: `${p17}-composer-footer`, children: /* @__PURE__ */ jsx20("div", { class: `${p17}-disclaimer`, children: disclaimer }) });
5930
+ return /* @__PURE__ */ jsx21("div", { class: `${p19}-composer-footer`, children: /* @__PURE__ */ jsx21("div", { class: `${p19}-disclaimer`, children: disclaimer }) });
5812
5931
  }
5813
5932
  function PoweredByBar({ poweredBy }) {
5814
5933
  if (!poweredBy) return null;
5815
- return /* @__PURE__ */ jsx20("div", { class: `${p17}-poweredby-bar`, children: /* @__PURE__ */ jsx20(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
5934
+ return /* @__PURE__ */ jsx21("div", { class: `${p19}-poweredby-bar`, children: /* @__PURE__ */ jsx21(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
5816
5935
  }
5817
5936
  function PoweredBy({ logoUrl, text, href }) {
5818
- const inner = /* @__PURE__ */ jsxs16(Fragment4, { children: [
5819
- logoUrl ? /* @__PURE__ */ jsx20("img", { class: `${p17}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
5820
- text ? /* @__PURE__ */ jsx20("span", { children: text }) : null
5937
+ const inner = /* @__PURE__ */ jsxs17(Fragment4, { children: [
5938
+ logoUrl ? /* @__PURE__ */ jsx21("img", { class: `${p19}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
5939
+ text ? /* @__PURE__ */ jsx21("span", { children: text }) : null
5821
5940
  ] });
5822
5941
  if (href) {
5823
- return /* @__PURE__ */ jsx20("a", { class: `${p17}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
5942
+ return /* @__PURE__ */ jsx21("a", { class: `${p19}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
5824
5943
  }
5825
- return /* @__PURE__ */ jsx20("span", { class: `${p17}-poweredby`, children: inner });
5944
+ return /* @__PURE__ */ jsx21("span", { class: `${p19}-poweredby`, children: inner });
5826
5945
  }
5827
5946
 
5828
5947
  // src/ui/form/form-controller.ts
@@ -5905,39 +6024,40 @@ function whenPasses(form, d) {
5905
6024
  }
5906
6025
 
5907
6026
  // src/ui/sidebar.tsx
5908
- import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs17 } from "preact/jsx-runtime";
6027
+ import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs18 } from "preact/jsx-runtime";
5909
6028
  function Sidebar(props2) {
5910
- const p33 = BRAND.cssPrefix;
6029
+ const p35 = BRAND.cssPrefix;
5911
6030
  const { site, blocks, strings, collapsed } = props2;
5912
6031
  const navigation = blocks?.navigation ?? [];
5913
6032
  const linkCards = blocks?.linkCards ?? [];
5914
6033
  const toggleLabel = collapsed ? strings.expandSidebar : strings.collapseSidebar;
5915
- return /* @__PURE__ */ jsxs17("aside", { class: `${p33}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
5916
- /* @__PURE__ */ jsxs17("div", { class: `${p33}-sidebar-header`, children: [
5917
- /* @__PURE__ */ jsx21(SidebarBrand, { site }),
5918
- /* @__PURE__ */ jsx21(
6034
+ return /* @__PURE__ */ jsxs18("aside", { class: `${p35}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
6035
+ /* @__PURE__ */ jsxs18("div", { class: `${p35}-sidebar-header`, children: [
6036
+ /* @__PURE__ */ jsx22(SidebarBrand, { site }),
6037
+ /* @__PURE__ */ jsx22(
5919
6038
  "button",
5920
6039
  {
5921
6040
  type: "button",
5922
- class: `${p33}-sidebar-toggle`,
6041
+ class: `${p35}-sidebar-toggle`,
5923
6042
  "aria-label": toggleLabel,
5924
6043
  "aria-expanded": collapsed ? "false" : "true",
5925
6044
  title: toggleLabel,
5926
6045
  onClick: props2.onToggleCollapsed,
5927
6046
  "data-testid": TID.sidebarToggle,
5928
- children: /* @__PURE__ */ jsx21(SidebarToggleIcon, { collapsed })
6047
+ children: /* @__PURE__ */ jsx22(SidebarToggleIcon, { collapsed })
5929
6048
  }
5930
6049
  )
5931
6050
  ] }),
5932
- collapsed ? null : /* @__PURE__ */ jsxs17(Fragment5, { children: [
5933
- navigation.length > 0 ? /* @__PURE__ */ jsx21("nav", { class: `${p33}-sidebar-section`, "data-section": "navigation", children: /* @__PURE__ */ jsx21(SidebarNav, { items: navigation }) }) : null,
5934
- linkCards.length > 0 ? /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-section`, "data-section": "link-cards", children: /* @__PURE__ */ jsx21(SidebarCards, { items: linkCards }) }) : null,
5935
- props2.showConversations ? /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-conversations`, children: /* @__PURE__ */ jsx21(
6051
+ collapsed ? null : /* @__PURE__ */ jsxs18(Fragment5, { children: [
6052
+ navigation.length > 0 ? /* @__PURE__ */ jsx22("nav", { class: `${p35}-sidebar-section`, "data-section": "navigation", children: /* @__PURE__ */ jsx22(SidebarNav, { items: navigation }) }) : null,
6053
+ linkCards.length > 0 ? /* @__PURE__ */ jsx22("div", { class: `${p35}-sidebar-section`, "data-section": "link-cards", children: /* @__PURE__ */ jsx22(SidebarCards, { items: linkCards }) }) : null,
6054
+ props2.showConversations ? /* @__PURE__ */ jsx22("div", { class: `${p35}-sidebar-conversations`, children: /* @__PURE__ */ jsx22(
5936
6055
  ConversationList,
5937
6056
  {
5938
6057
  transport: props2.transport,
5939
6058
  strings: props2.strings,
5940
6059
  locale: props2.locale,
6060
+ persistence: props2.persistence,
5941
6061
  visitorId: props2.visitorId,
5942
6062
  onSelect: props2.onSelectConversation,
5943
6063
  onNewConversation: props2.onNewConversation
@@ -5947,18 +6067,18 @@ function Sidebar(props2) {
5947
6067
  ] });
5948
6068
  }
5949
6069
  function SidebarBrand({ site }) {
5950
- const p33 = BRAND.cssPrefix;
6070
+ const p35 = BRAND.cssPrefix;
5951
6071
  if (site?.logo?.url) {
5952
6072
  const alt = site.logo.alt ?? site.title ?? "Logo";
5953
- return /* @__PURE__ */ jsxs17("picture", { children: [
5954
- site.logoDark?.url ? /* @__PURE__ */ jsx21("source", { srcset: site.logoDark.url, media: "(prefers-color-scheme: dark)" }) : null,
5955
- /* @__PURE__ */ jsx21("img", { class: `${p33}-sidebar-logo`, src: site.logo.url, alt })
6073
+ return /* @__PURE__ */ jsxs18("picture", { children: [
6074
+ site.logoDark?.url ? /* @__PURE__ */ jsx22("source", { srcset: site.logoDark.url, media: "(prefers-color-scheme: dark)" }) : null,
6075
+ /* @__PURE__ */ jsx22("img", { class: `${p35}-sidebar-logo`, src: site.logo.url, alt })
5956
6076
  ] });
5957
6077
  }
5958
- return /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-title`, children: site?.title ?? BRAND.name });
6078
+ return /* @__PURE__ */ jsx22("div", { class: `${p35}-sidebar-title`, children: site?.title ?? BRAND.name });
5959
6079
  }
5960
6080
  function SidebarToggleIcon({ collapsed }) {
5961
- return /* @__PURE__ */ jsx21(
6081
+ return /* @__PURE__ */ jsx22(
5962
6082
  "svg",
5963
6083
  {
5964
6084
  width: "16",
@@ -5968,38 +6088,38 @@ function SidebarToggleIcon({ collapsed }) {
5968
6088
  stroke: "currentColor",
5969
6089
  "stroke-width": "2",
5970
6090
  "aria-hidden": "true",
5971
- children: collapsed ? /* @__PURE__ */ jsx21("polyline", { points: "9 6 15 12 9 18" }) : /* @__PURE__ */ jsx21("polyline", { points: "15 6 9 12 15 18" })
6091
+ children: collapsed ? /* @__PURE__ */ jsx22("polyline", { points: "9 6 15 12 9 18" }) : /* @__PURE__ */ jsx22("polyline", { points: "15 6 9 12 15 18" })
5972
6092
  }
5973
6093
  );
5974
6094
  }
5975
6095
  function SidebarNav({ items }) {
5976
- const p33 = BRAND.cssPrefix;
5977
- return /* @__PURE__ */ jsx21("ul", { class: `${p33}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx21("li", { children: /* @__PURE__ */ jsxs17(
6096
+ const p35 = BRAND.cssPrefix;
6097
+ return /* @__PURE__ */ jsx22("ul", { class: `${p35}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx22("li", { children: /* @__PURE__ */ jsxs18(
5978
6098
  "a",
5979
6099
  {
5980
- class: `${p33}-sidebar-nav-item`,
6100
+ class: `${p35}-sidebar-nav-item`,
5981
6101
  href: item.href,
5982
6102
  target: item.href ? "_blank" : void 0,
5983
6103
  rel: item.href ? "noreferrer" : void 0,
5984
6104
  children: [
5985
- item.icon ? /* @__PURE__ */ jsx21("span", { class: `${p33}-sidebar-nav-icon`, "data-icon": item.icon }) : null,
5986
- /* @__PURE__ */ jsx21("span", { class: `${p33}-sidebar-nav-label`, children: item.label })
6105
+ item.icon ? /* @__PURE__ */ jsx22("span", { class: `${p35}-sidebar-nav-icon`, "data-icon": item.icon }) : null,
6106
+ /* @__PURE__ */ jsx22("span", { class: `${p35}-sidebar-nav-label`, children: item.label })
5987
6107
  ]
5988
6108
  }
5989
6109
  ) }, item.id ?? item.label)) });
5990
6110
  }
5991
6111
  function SidebarCards({ items }) {
5992
- const p33 = BRAND.cssPrefix;
5993
- return /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs17(
6112
+ const p35 = BRAND.cssPrefix;
6113
+ return /* @__PURE__ */ jsx22("div", { class: `${p35}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs18(
5994
6114
  "a",
5995
6115
  {
5996
- class: `${p33}-sidebar-card`,
6116
+ class: `${p35}-sidebar-card`,
5997
6117
  href: item.href,
5998
6118
  target: item.href ? "_blank" : void 0,
5999
6119
  rel: item.href ? "noreferrer" : void 0,
6000
6120
  children: [
6001
- /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-card-label`, children: item.label }),
6002
- item.description ? /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-card-desc`, children: item.description }) : null
6121
+ /* @__PURE__ */ jsx22("div", { class: `${p35}-sidebar-card-label`, children: item.label }),
6122
+ item.description ? /* @__PURE__ */ jsx22("div", { class: `${p35}-sidebar-card-desc`, children: item.description }) : null
6003
6123
  ]
6004
6124
  },
6005
6125
  item.id ?? item.label
@@ -6007,11 +6127,11 @@ function SidebarCards({ items }) {
6007
6127
  }
6008
6128
 
6009
6129
  // src/ui/page-shell.tsx
6010
- import { jsx as jsx22, jsxs as jsxs18 } from "preact/jsx-runtime";
6011
- var p18 = BRAND.cssPrefix;
6130
+ import { jsx as jsx23, jsxs as jsxs19 } from "preact/jsx-runtime";
6131
+ var p20 = BRAND.cssPrefix;
6012
6132
  function PageShell(props2) {
6013
- return /* @__PURE__ */ jsxs18("main", { class: `${p18}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
6014
- /* @__PURE__ */ jsx22(
6133
+ return /* @__PURE__ */ jsxs19("main", { class: `${p20}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
6134
+ /* @__PURE__ */ jsx23(
6015
6135
  Sidebar,
6016
6136
  {
6017
6137
  site: props2.site,
@@ -6019,6 +6139,7 @@ function PageShell(props2) {
6019
6139
  transport: props2.transport,
6020
6140
  strings: props2.strings,
6021
6141
  locale: props2.locale,
6142
+ persistence: props2.persistence,
6022
6143
  visitorId: props2.visitorId,
6023
6144
  showConversations: props2.showConversations,
6024
6145
  onSelectConversation: props2.onSelectConversation,
@@ -6027,7 +6148,7 @@ function PageShell(props2) {
6027
6148
  onToggleCollapsed: props2.onToggleSidebarCollapsed
6028
6149
  }
6029
6150
  ),
6030
- /* @__PURE__ */ jsx22("section", { class: `${p18}-page-chat`, "aria-label": "Chat", children: props2.children })
6151
+ /* @__PURE__ */ jsx23("section", { class: `${p20}-page-chat`, "aria-label": "Chat", children: props2.children })
6031
6152
  ] });
6032
6153
  }
6033
6154
 
@@ -6065,7 +6186,7 @@ var atTabRoot = (s) => activeStack(s).length === 0;
6065
6186
 
6066
6187
  // src/ui/messenger-home.tsx
6067
6188
  import { useCallback as useCallback4, useEffect as useEffect14, useRef as useRef8 } from "preact/hooks";
6068
- import { useComputed as useComputed6 } from "@preact/signals";
6189
+ import { useComputed as useComputed7 } from "@preact/signals";
6069
6190
 
6070
6191
  // src/ui/modules/chat.tsx
6071
6192
  var chatLayout = {
@@ -6077,80 +6198,80 @@ var chatLayout = {
6077
6198
  import { useEffect as useEffect10, useMemo as useMemo2, useState as useState8 } from "preact/hooks";
6078
6199
 
6079
6200
  // src/ui/back-header.tsx
6080
- import { jsx as jsx23, jsxs as jsxs19 } from "preact/jsx-runtime";
6081
- var p19 = BRAND.cssPrefix;
6201
+ import { jsx as jsx24, jsxs as jsxs20 } from "preact/jsx-runtime";
6202
+ var p21 = BRAND.cssPrefix;
6082
6203
  function TitleBar({ title, actions }) {
6083
- return /* @__PURE__ */ jsxs19("header", { class: `${p19}-back-header`, "data-variant": "title", children: [
6084
- /* @__PURE__ */ jsx23("span", { class: `${p19}-back-spacer`, "aria-hidden": "true" }),
6085
- /* @__PURE__ */ jsx23("h1", { class: `${p19}-back-title`, children: title }),
6086
- actions ?? /* @__PURE__ */ jsx23("span", { class: `${p19}-back-spacer`, "aria-hidden": "true" })
6204
+ return /* @__PURE__ */ jsxs20("header", { class: `${p21}-back-header`, "data-variant": "title", children: [
6205
+ /* @__PURE__ */ jsx24("span", { class: `${p21}-back-spacer`, "aria-hidden": "true" }),
6206
+ /* @__PURE__ */ jsx24("h1", { class: `${p21}-back-title`, children: title }),
6207
+ actions ?? /* @__PURE__ */ jsx24("span", { class: `${p21}-back-spacer`, "aria-hidden": "true" })
6087
6208
  ] });
6088
6209
  }
6089
6210
  function BackHeader({ title, backLabel, onBack, actions, testid }) {
6090
- return /* @__PURE__ */ jsxs19("header", { class: `${p19}-back-header`, "data-testid": testid, children: [
6091
- /* @__PURE__ */ jsx23("button", { type: "button", class: `${p19}-icon-btn`, onClick: onBack, "aria-label": backLabel, title: backLabel, children: /* @__PURE__ */ jsx23(BackIcon, {}) }),
6092
- /* @__PURE__ */ jsx23("h1", { class: `${p19}-back-title`, children: title }),
6093
- actions ?? /* @__PURE__ */ jsx23("span", { class: `${p19}-back-spacer`, "aria-hidden": "true" })
6211
+ return /* @__PURE__ */ jsxs20("header", { class: `${p21}-back-header`, "data-testid": testid, children: [
6212
+ /* @__PURE__ */ jsx24("button", { type: "button", class: `${p21}-icon-btn`, onClick: onBack, "aria-label": backLabel, title: backLabel, children: /* @__PURE__ */ jsx24(BackIcon, {}) }),
6213
+ /* @__PURE__ */ jsx24("h1", { class: `${p21}-back-title`, children: title }),
6214
+ actions ?? /* @__PURE__ */ jsx24("span", { class: `${p21}-back-spacer`, "aria-hidden": "true" })
6094
6215
  ] });
6095
6216
  }
6096
6217
 
6097
6218
  // src/ui/home-search.tsx
6098
- import { jsx as jsx24, jsxs as jsxs20 } from "preact/jsx-runtime";
6099
- var p20 = BRAND.cssPrefix;
6219
+ import { jsx as jsx25, jsxs as jsxs21 } from "preact/jsx-runtime";
6220
+ var p22 = BRAND.cssPrefix;
6100
6221
  function HomeSearchButton({ placeholder, onActivate }) {
6101
- return /* @__PURE__ */ jsxs20("button", { type: "button", class: `${p20}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
6102
- /* @__PURE__ */ jsx24("span", { class: `${p20}-home-search-text`, children: placeholder }),
6103
- /* @__PURE__ */ jsx24("span", { class: `${p20}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx24(SearchIcon, {}) })
6222
+ return /* @__PURE__ */ jsxs21("button", { type: "button", class: `${p22}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
6223
+ /* @__PURE__ */ jsx25("span", { class: `${p22}-home-search-text`, children: placeholder }),
6224
+ /* @__PURE__ */ jsx25("span", { class: `${p22}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx25(SearchIcon, {}) })
6104
6225
  ] });
6105
6226
  }
6106
6227
  function HelpSearchInput({ placeholder, value, onInput }) {
6107
- return /* @__PURE__ */ jsxs20("div", { class: `${p20}-home-search`, "data-input": "true", children: [
6108
- /* @__PURE__ */ jsx24(
6228
+ return /* @__PURE__ */ jsxs21("div", { class: `${p22}-home-search`, "data-input": "true", children: [
6229
+ /* @__PURE__ */ jsx25(
6109
6230
  "input",
6110
6231
  {
6111
6232
  type: "search",
6112
- class: `${p20}-home-search-input`,
6233
+ class: `${p22}-home-search-input`,
6113
6234
  placeholder,
6114
6235
  value,
6115
6236
  onInput: (e) => onInput(e.currentTarget.value),
6116
6237
  "data-testid": TID.helpSearch
6117
6238
  }
6118
6239
  ),
6119
- /* @__PURE__ */ jsx24("span", { class: `${p20}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx24(SearchIcon, {}) })
6240
+ /* @__PURE__ */ jsx25("span", { class: `${p22}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx25(SearchIcon, {}) })
6120
6241
  ] });
6121
6242
  }
6122
6243
 
6123
6244
  // src/ui/list-row.tsx
6124
- import { jsx as jsx25, jsxs as jsxs21 } from "preact/jsx-runtime";
6125
- var p21 = BRAND.cssPrefix;
6245
+ import { jsx as jsx26, jsxs as jsxs22 } from "preact/jsx-runtime";
6246
+ var p23 = BRAND.cssPrefix;
6126
6247
  function ListRow({ title, subtitle, onClick, testid }) {
6127
- return /* @__PURE__ */ jsxs21("button", { type: "button", class: `${p21}-list-row`, onClick, "data-testid": testid, children: [
6128
- /* @__PURE__ */ jsxs21("span", { class: `${p21}-list-row-body`, children: [
6129
- /* @__PURE__ */ jsx25("span", { class: `${p21}-list-row-title`, children: title }),
6130
- subtitle ? /* @__PURE__ */ jsx25("span", { class: `${p21}-list-row-sub`, children: subtitle }) : null
6248
+ return /* @__PURE__ */ jsxs22("button", { type: "button", class: `${p23}-list-row`, onClick, "data-testid": testid, children: [
6249
+ /* @__PURE__ */ jsxs22("span", { class: `${p23}-list-row-body`, children: [
6250
+ /* @__PURE__ */ jsx26("span", { class: `${p23}-list-row-title`, children: title }),
6251
+ subtitle ? /* @__PURE__ */ jsx26("span", { class: `${p23}-list-row-sub`, children: subtitle }) : null
6131
6252
  ] }),
6132
- /* @__PURE__ */ jsx25("span", { class: `${p21}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx25(ChevronRightIcon, {}) })
6253
+ /* @__PURE__ */ jsx26("span", { class: `${p23}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx26(ChevronRightIcon, {}) })
6133
6254
  ] });
6134
6255
  }
6135
6256
 
6136
6257
  // src/ui/module-state.tsx
6137
- import { jsx as jsx26, jsxs as jsxs22 } from "preact/jsx-runtime";
6138
- var p22 = BRAND.cssPrefix;
6258
+ import { jsx as jsx27, jsxs as jsxs23 } from "preact/jsx-runtime";
6259
+ var p24 = BRAND.cssPrefix;
6139
6260
  function ModuleState({
6140
6261
  tone = "info",
6141
6262
  message,
6142
6263
  onRetry,
6143
6264
  strings
6144
6265
  }) {
6145
- return /* @__PURE__ */ jsxs22("div", { class: `${p22}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
6146
- /* @__PURE__ */ jsx26("span", { children: message }),
6147
- onRetry ? /* @__PURE__ */ jsx26("button", { type: "button", class: `${p22}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
6266
+ return /* @__PURE__ */ jsxs23("div", { class: `${p24}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
6267
+ /* @__PURE__ */ jsx27("span", { children: message }),
6268
+ onRetry ? /* @__PURE__ */ jsx27("button", { type: "button", class: `${p24}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
6148
6269
  ] });
6149
6270
  }
6150
6271
 
6151
6272
  // src/ui/modules/help.tsx
6152
- import { jsx as jsx27, jsxs as jsxs23 } from "preact/jsx-runtime";
6153
- var p23 = BRAND.cssPrefix;
6273
+ import { jsx as jsx28, jsxs as jsxs24 } from "preact/jsx-runtime";
6274
+ var p25 = BRAND.cssPrefix;
6154
6275
  var log12 = logger.scope("help");
6155
6276
  var openArticle = (nav, a) => a.url ? nav.push({ kind: "iframe", url: a.url, title: a.title }) : nav.push({ kind: "content", id: a.id, title: a.title });
6156
6277
  function groupByCategory(items) {
@@ -6179,7 +6300,7 @@ function fuzzySearch(items, query) {
6179
6300
  return items.map((item) => ({ item, score: Math.max(fuzzyScore(q, item.title) * 2, fuzzyScore(q, item.description ?? "")) })).filter((r) => r.score > 0).toSorted((a, b) => b.score - a.score).map((r) => r.item);
6180
6301
  }
6181
6302
  function ArticleRow({ article, nav }) {
6182
- return /* @__PURE__ */ jsx27(
6303
+ return /* @__PURE__ */ jsx28(
6183
6304
  ListRow,
6184
6305
  {
6185
6306
  title: article.title,
@@ -6224,46 +6345,46 @@ function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
6224
6345
  }, [query, results, bus]);
6225
6346
  function renderBody() {
6226
6347
  if (query.trim().length > 0) {
6227
- if (results.length === 0) return /* @__PURE__ */ jsx27(ModuleState, { message: strings.helpSearchEmpty, strings });
6228
- return /* @__PURE__ */ jsx27("div", { class: `${p23}-help-card`, children: results.map((a) => /* @__PURE__ */ jsx27(ArticleRow, { article: a, nav }, a.id)) });
6348
+ if (results.length === 0) return /* @__PURE__ */ jsx28(ModuleState, { message: strings.helpSearchEmpty, strings });
6349
+ return /* @__PURE__ */ jsx28("div", { class: `${p25}-help-card`, children: results.map((a) => /* @__PURE__ */ jsx28(ArticleRow, { article: a, nav }, a.id)) });
6229
6350
  }
6230
- if (state === "loading") return /* @__PURE__ */ jsx27(ModuleState, { message: strings.helpLoading, strings });
6351
+ if (state === "loading") return /* @__PURE__ */ jsx28(ModuleState, { message: strings.helpLoading, strings });
6231
6352
  if (state === "error") {
6232
- return /* @__PURE__ */ jsx27(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
6353
+ return /* @__PURE__ */ jsx28(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
6233
6354
  }
6234
- if (items.length === 0) return /* @__PURE__ */ jsx27(ModuleState, { message: strings.helpEmpty, strings });
6235
- return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs23("section", { class: `${p23}-help-group`, children: [
6236
- category ? /* @__PURE__ */ jsx27("h2", { class: `${p23}-help-section-title`, children: category }) : null,
6237
- /* @__PURE__ */ jsx27("div", { class: `${p23}-help-card`, children: rows.map((a) => /* @__PURE__ */ jsx27(ArticleRow, { article: a, nav }, a.id)) })
6355
+ if (items.length === 0) return /* @__PURE__ */ jsx28(ModuleState, { message: strings.helpEmpty, strings });
6356
+ return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs24("section", { class: `${p25}-help-group`, children: [
6357
+ category ? /* @__PURE__ */ jsx28("h2", { class: `${p25}-help-section-title`, children: category }) : null,
6358
+ /* @__PURE__ */ jsx28("div", { class: `${p25}-help-card`, children: rows.map((a) => /* @__PURE__ */ jsx28(ArticleRow, { article: a, nav }, a.id)) })
6238
6359
  ] }, category));
6239
6360
  }
6240
- return /* @__PURE__ */ jsxs23("div", { class: `${p23}-module`, children: [
6241
- /* @__PURE__ */ jsx27(TitleBar, { title: strings.helpTitle, actions: /* @__PURE__ */ jsx27(HeaderActions, { panelProps, variant: "plain" }) }),
6242
- /* @__PURE__ */ jsx27("div", { class: `${p23}-module-pad`, children: /* @__PURE__ */ jsx27(HelpSearchInput, { placeholder: strings.helpSearchPlaceholder, value: query, onInput: setQuery }) }),
6243
- /* @__PURE__ */ jsx27("div", { class: `${p23}-help-list`, children: renderBody() })
6361
+ return /* @__PURE__ */ jsxs24("div", { class: `${p25}-module`, children: [
6362
+ /* @__PURE__ */ jsx28(TitleBar, { title: strings.helpTitle, actions: /* @__PURE__ */ jsx28(HeaderActions, { panelProps, variant: "plain" }) }),
6363
+ /* @__PURE__ */ jsx28("div", { class: `${p25}-module-pad`, children: /* @__PURE__ */ jsx28(HelpSearchInput, { placeholder: strings.helpSearchPlaceholder, value: query, onInput: setQuery }) }),
6364
+ /* @__PURE__ */ jsx28("div", { class: `${p25}-help-list`, children: renderBody() })
6244
6365
  ] });
6245
6366
  }
6246
6367
  var helpLayout = {
6247
6368
  Icon: HelpIcon,
6248
- Root: (props2) => /* @__PURE__ */ jsx27(HelpRoot, { ...props2 })
6369
+ Root: (props2) => /* @__PURE__ */ jsx28(HelpRoot, { ...props2 })
6249
6370
  };
6250
6371
 
6251
6372
  // src/ui/modules/home.tsx
6252
6373
  import { useEffect as useEffect11, useState as useState9 } from "preact/hooks";
6253
6374
 
6254
6375
  // src/ui/home-card.tsx
6255
- import { jsx as jsx28 } from "preact/jsx-runtime";
6256
- var p24 = BRAND.cssPrefix;
6376
+ import { jsx as jsx29 } from "preact/jsx-runtime";
6377
+ var p26 = BRAND.cssPrefix;
6257
6378
  function HomeCard({ onClick, children, testid }) {
6258
6379
  if (onClick) {
6259
- return /* @__PURE__ */ jsx28("button", { type: "button", class: `${p24}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
6380
+ return /* @__PURE__ */ jsx29("button", { type: "button", class: `${p26}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
6260
6381
  }
6261
- return /* @__PURE__ */ jsx28("div", { class: `${p24}-home-card`, "data-testid": testid, children });
6382
+ return /* @__PURE__ */ jsx29("div", { class: `${p26}-home-card`, "data-testid": testid, children });
6262
6383
  }
6263
6384
 
6264
6385
  // src/ui/modules/home.tsx
6265
- import { Fragment as Fragment6, jsx as jsx29, jsxs as jsxs24 } from "preact/jsx-runtime";
6266
- var p25 = BRAND.cssPrefix;
6386
+ import { Fragment as Fragment6, jsx as jsx30, jsxs as jsxs25 } from "preact/jsx-runtime";
6387
+ var p27 = BRAND.cssPrefix;
6267
6388
  var log13 = logger.scope("home");
6268
6389
  function resolveGreeting(props2) {
6269
6390
  const name = props2.options.userContext?.name;
@@ -6306,49 +6427,49 @@ function HomeRoot(props2) {
6306
6427
  const status = config.status;
6307
6428
  const statusText = status?.text ? localizeText(strings, status.text) : strings.homeStatus;
6308
6429
  const contentTitle = config.contentBlockTitle ? localizeText(strings, config.contentBlockTitle) : strings.homeContentTitle;
6309
- return /* @__PURE__ */ jsx29("div", { class: `${p25}-module ${p25}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-scroll`, children: [
6310
- /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-hero`, children: [
6311
- /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-hero-top`, children: [
6312
- config.brandName ? /* @__PURE__ */ jsx29("span", { class: `${p25}-home-brand`, "data-testid": TID.homeBrand, children: config.brandName }) : /* @__PURE__ */ jsx29("span", { class: `${p25}-home-brand-spacer`, "aria-hidden": "true" }),
6313
- /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-hero-actions`, children: [
6314
- avatars.length > 0 ? /* @__PURE__ */ jsx29("div", { class: `${p25}-home-avatars`, children: avatars.map((a) => /* @__PURE__ */ jsx29("span", { class: `${p25}-home-avatar`, title: a.role ? `${a.name} \xB7 ${a.role}` : a.name, children: a.avatar ? /* @__PURE__ */ jsx29("img", { src: a.avatar, alt: "", loading: "lazy" }) : /* @__PURE__ */ jsx29("span", { children: initials(a.name) }) }, a.name)) }) : null,
6315
- /* @__PURE__ */ jsx29(HeaderActions, { panelProps, variant: "plain" })
6430
+ return /* @__PURE__ */ jsx30("div", { class: `${p27}-module ${p27}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-scroll`, children: [
6431
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-hero`, children: [
6432
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-hero-top`, children: [
6433
+ config.brandName ? /* @__PURE__ */ jsx30("span", { class: `${p27}-home-brand`, "data-testid": TID.homeBrand, children: config.brandName }) : /* @__PURE__ */ jsx30("span", { class: `${p27}-home-brand-spacer`, "aria-hidden": "true" }),
6434
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-hero-actions`, children: [
6435
+ avatars.length > 0 ? /* @__PURE__ */ jsx30("div", { class: `${p27}-home-avatars`, children: avatars.map((a) => /* @__PURE__ */ jsx30("span", { class: `${p27}-home-avatar`, title: a.role ? `${a.name} \xB7 ${a.role}` : a.name, children: a.avatar ? /* @__PURE__ */ jsx30("img", { src: a.avatar, alt: "", loading: "lazy" }) : /* @__PURE__ */ jsx30("span", { children: initials(a.name) }) }, a.name)) }) : null,
6436
+ /* @__PURE__ */ jsx30(HeaderActions, { panelProps, variant: "plain" })
6316
6437
  ] })
6317
6438
  ] }),
6318
- config.showGreeting !== false ? /* @__PURE__ */ jsxs24(Fragment6, { children: [
6319
- /* @__PURE__ */ jsx29("h1", { class: `${p25}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
6320
- greeting.subtitle ? /* @__PURE__ */ jsx29("p", { class: `${p25}-home-lead`, children: greeting.subtitle }) : null
6439
+ config.showGreeting !== false ? /* @__PURE__ */ jsxs25(Fragment6, { children: [
6440
+ /* @__PURE__ */ jsx30("h1", { class: `${p27}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
6441
+ greeting.subtitle ? /* @__PURE__ */ jsx30("p", { class: `${p27}-home-lead`, children: greeting.subtitle }) : null
6321
6442
  ] }) : null
6322
6443
  ] }),
6323
- /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-cards`, children: [
6324
- config.showSearchBar !== false ? /* @__PURE__ */ jsx29(
6444
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-cards`, children: [
6445
+ config.showSearchBar !== false ? /* @__PURE__ */ jsx30(
6325
6446
  HomeSearchButton,
6326
6447
  {
6327
6448
  placeholder: strings.homeSearchPlaceholder,
6328
6449
  onActivate: () => nav.switchToLayout("help")
6329
6450
  }
6330
6451
  ) : null,
6331
- recent ? /* @__PURE__ */ jsx29(HomeCard, { onClick: () => nav.selectConversation(recent.conversationId), testid: TID.homeRecent, children: /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-recent-row`, "data-unread": (recent.unreadCount ?? 0) > 0 ? "true" : void 0, children: [
6332
- /* @__PURE__ */ jsx29("span", { class: `${p25}-home-recent-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx29(BubblesIcon, {}) }),
6333
- /* @__PURE__ */ jsxs24("span", { class: `${p25}-home-recent-body`, children: [
6334
- /* @__PURE__ */ jsx29("span", { class: `${p25}-home-recent-title`, children: recent.title }),
6335
- recent.preview ? /* @__PURE__ */ jsx29("span", { class: `${p25}-home-recent-preview`, children: recent.preview }) : null
6452
+ recent ? /* @__PURE__ */ jsx30(HomeCard, { onClick: () => nav.selectConversation(recent.conversationId), testid: TID.homeRecent, children: /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-recent-row`, "data-unread": (recent.unreadCount ?? 0) > 0 ? "true" : void 0, children: [
6453
+ /* @__PURE__ */ jsx30("span", { class: `${p27}-home-recent-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx30(BubblesIcon, {}) }),
6454
+ /* @__PURE__ */ jsxs25("span", { class: `${p27}-home-recent-body`, children: [
6455
+ /* @__PURE__ */ jsx30("span", { class: `${p27}-home-recent-title`, children: recent.title }),
6456
+ recent.preview ? /* @__PURE__ */ jsx30("span", { class: `${p27}-home-recent-preview`, children: recent.preview }) : null
6336
6457
  ] }),
6337
- (recent.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx29("span", { class: `${p25}-home-recent-dot`, "aria-label": "Unread" }) : null
6458
+ (recent.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx30("span", { class: `${p27}-home-recent-dot`, "aria-label": "Unread" }) : null
6338
6459
  ] }) }) : null,
6339
- status ? /* @__PURE__ */ jsx29(
6460
+ status ? /* @__PURE__ */ jsx30(
6340
6461
  HomeCard,
6341
6462
  {
6342
6463
  onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: statusText }) : void 0,
6343
- children: /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-status`, "data-level": status.level ?? "operational", children: [
6344
- /* @__PURE__ */ jsx29("span", { class: `${p25}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx29(StatusOkIcon, {}) }),
6345
- /* @__PURE__ */ jsx29("span", { class: `${p25}-home-status-text`, children: statusText })
6464
+ children: /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-status`, "data-level": status.level ?? "operational", children: [
6465
+ /* @__PURE__ */ jsx30("span", { class: `${p27}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx30(StatusOkIcon, {}) }),
6466
+ /* @__PURE__ */ jsx30("span", { class: `${p27}-home-status-text`, children: statusText })
6346
6467
  ] })
6347
6468
  }
6348
6469
  ) : null,
6349
- content.length > 0 ? /* @__PURE__ */ jsxs24("section", { class: `${p25}-home-content`, children: [
6350
- /* @__PURE__ */ jsx29("div", { class: `${p25}-home-content-title`, children: contentTitle }),
6351
- /* @__PURE__ */ jsx29("div", { class: `${p25}-home-content-list`, children: content.map((item) => /* @__PURE__ */ jsx29(
6470
+ content.length > 0 ? /* @__PURE__ */ jsxs25("section", { class: `${p27}-home-content`, children: [
6471
+ /* @__PURE__ */ jsx30("div", { class: `${p27}-home-content-title`, children: contentTitle }),
6472
+ /* @__PURE__ */ jsx30("div", { class: `${p27}-home-content-list`, children: content.map((item) => /* @__PURE__ */ jsx30(
6352
6473
  ListRow,
6353
6474
  {
6354
6475
  title: item.title,
@@ -6364,13 +6485,13 @@ function HomeRoot(props2) {
6364
6485
  }
6365
6486
  var homeLayout = {
6366
6487
  Icon: HomeIcon,
6367
- Root: (props2) => /* @__PURE__ */ jsx29(HomeRoot, { ...props2 })
6488
+ Root: (props2) => /* @__PURE__ */ jsx30(HomeRoot, { ...props2 })
6368
6489
  };
6369
6490
 
6370
6491
  // src/ui/modules/news.tsx
6371
6492
  import { useEffect as useEffect12, useState as useState10 } from "preact/hooks";
6372
- import { jsx as jsx30, jsxs as jsxs25 } from "preact/jsx-runtime";
6373
- var p26 = BRAND.cssPrefix;
6493
+ import { jsx as jsx31, jsxs as jsxs26 } from "preact/jsx-runtime";
6494
+ var p28 = BRAND.cssPrefix;
6374
6495
  var log14 = logger.scope("news");
6375
6496
  function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
6376
6497
  const tags = config.contentTags;
@@ -6398,37 +6519,37 @@ function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
6398
6519
  };
6399
6520
  }, [transport, tags, reloadKey, bus]);
6400
6521
  function renderBody() {
6401
- if (state === "loading") return /* @__PURE__ */ jsx30(ModuleState, { message: strings.newsLoading, strings });
6522
+ if (state === "loading") return /* @__PURE__ */ jsx31(ModuleState, { message: strings.newsLoading, strings });
6402
6523
  if (state === "error") {
6403
- return /* @__PURE__ */ jsx30(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
6524
+ return /* @__PURE__ */ jsx31(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
6404
6525
  }
6405
- if (items.length === 0) return /* @__PURE__ */ jsx30(ModuleState, { message: strings.newsEmpty, strings });
6406
- return /* @__PURE__ */ jsx30("div", { class: `${p26}-news-list`, children: items.map((item) => /* @__PURE__ */ jsxs25(
6526
+ if (items.length === 0) return /* @__PURE__ */ jsx31(ModuleState, { message: strings.newsEmpty, strings });
6527
+ return /* @__PURE__ */ jsx31("div", { class: `${p28}-news-list`, children: items.map((item) => /* @__PURE__ */ jsxs26(
6407
6528
  "button",
6408
6529
  {
6409
6530
  type: "button",
6410
- class: `${p26}-news-card`,
6531
+ class: `${p28}-news-card`,
6411
6532
  onClick: () => nav.push({ kind: "content", id: item.id, title: item.title }),
6412
6533
  "data-testid": tid(TID.newsItem, item.id),
6413
6534
  children: [
6414
- item.image ? /* @__PURE__ */ jsx30("img", { class: `${p26}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
6415
- /* @__PURE__ */ jsxs25("span", { class: `${p26}-news-body`, children: [
6416
- /* @__PURE__ */ jsx30("span", { class: `${p26}-news-title`, children: item.title }),
6417
- item.description ? /* @__PURE__ */ jsx30("span", { class: `${p26}-news-summary`, children: item.description }) : null
6535
+ item.image ? /* @__PURE__ */ jsx31("img", { class: `${p28}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
6536
+ /* @__PURE__ */ jsxs26("span", { class: `${p28}-news-body`, children: [
6537
+ /* @__PURE__ */ jsx31("span", { class: `${p28}-news-title`, children: item.title }),
6538
+ item.description ? /* @__PURE__ */ jsx31("span", { class: `${p28}-news-summary`, children: item.description }) : null
6418
6539
  ] })
6419
6540
  ]
6420
6541
  },
6421
6542
  item.id
6422
6543
  )) });
6423
6544
  }
6424
- return /* @__PURE__ */ jsxs25("div", { class: `${p26}-module`, children: [
6425
- /* @__PURE__ */ jsx30(TitleBar, { title: strings.newsTitle, actions: /* @__PURE__ */ jsx30(HeaderActions, { panelProps, variant: "plain" }) }),
6426
- /* @__PURE__ */ jsx30("div", { class: `${p26}-module-scroll`, children: renderBody() })
6545
+ return /* @__PURE__ */ jsxs26("div", { class: `${p28}-module`, children: [
6546
+ /* @__PURE__ */ jsx31(TitleBar, { title: strings.newsTitle, actions: /* @__PURE__ */ jsx31(HeaderActions, { panelProps, variant: "plain" }) }),
6547
+ /* @__PURE__ */ jsx31("div", { class: `${p28}-module-scroll`, children: renderBody() })
6427
6548
  ] });
6428
6549
  }
6429
6550
  var newsLayout = {
6430
6551
  Icon: NewsIcon,
6431
- Root: (props2) => /* @__PURE__ */ jsx30(NewsRoot, { ...props2 })
6552
+ Root: (props2) => /* @__PURE__ */ jsx31(NewsRoot, { ...props2 })
6432
6553
  };
6433
6554
 
6434
6555
  // src/ui/modules/registry.ts
@@ -6440,28 +6561,28 @@ var LAYOUTS = {
6440
6561
  };
6441
6562
 
6442
6563
  // src/ui/home-tab-bar.tsx
6443
- import { jsx as jsx31, jsxs as jsxs26 } from "preact/jsx-runtime";
6444
- var p27 = BRAND.cssPrefix;
6564
+ import { jsx as jsx32, jsxs as jsxs27 } from "preact/jsx-runtime";
6565
+ var p29 = BRAND.cssPrefix;
6445
6566
  function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
6446
- return /* @__PURE__ */ jsx31("nav", { class: `${p27}-tabbar`, role: "tablist", "aria-label": strings.panelTitle, children: modules.map((m) => {
6567
+ return /* @__PURE__ */ jsx32("nav", { class: `${p29}-tabbar`, role: "tablist", "aria-label": strings.panelTitle, children: modules.map((m) => {
6447
6568
  const Icon = LAYOUTS[m.layout].Icon;
6448
6569
  const selected = m.id === activeTab;
6449
6570
  const badge = m.layout === "chat" && unreadCount > 0 ? unreadCount > 9 ? "9+" : String(unreadCount) : null;
6450
- return /* @__PURE__ */ jsxs26(
6571
+ return /* @__PURE__ */ jsxs27(
6451
6572
  "button",
6452
6573
  {
6453
6574
  type: "button",
6454
6575
  role: "tab",
6455
6576
  "aria-selected": selected,
6456
- class: `${p27}-tab`,
6577
+ class: `${p29}-tab`,
6457
6578
  onClick: () => onSelect(m.id),
6458
6579
  "data-testid": tid(TID.tab, m.id),
6459
6580
  children: [
6460
- /* @__PURE__ */ jsxs26("span", { class: `${p27}-tab-icon`, "aria-hidden": "true", children: [
6461
- /* @__PURE__ */ jsx31(Icon, {}),
6462
- badge ? /* @__PURE__ */ jsx31("span", { class: `${p27}-tab-badge`, "data-testid": TID.tabBadge, children: badge }) : null
6581
+ /* @__PURE__ */ jsxs27("span", { class: `${p29}-tab-icon`, "aria-hidden": "true", children: [
6582
+ /* @__PURE__ */ jsx32(Icon, {}),
6583
+ badge ? /* @__PURE__ */ jsx32("span", { class: `${p29}-tab-badge`, "data-testid": TID.tabBadge, children: badge }) : null
6463
6584
  ] }),
6464
- /* @__PURE__ */ jsx31("span", { class: `${p27}-tab-label`, children: localizeText(strings, m.label) })
6585
+ /* @__PURE__ */ jsx32("span", { class: `${p29}-tab-label`, children: localizeText(strings, m.label) })
6465
6586
  ]
6466
6587
  },
6467
6588
  m.id
@@ -6470,12 +6591,12 @@ function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
6470
6591
  }
6471
6592
 
6472
6593
  // src/ui/iframe-view.tsx
6473
- import { jsx as jsx32, jsxs as jsxs27 } from "preact/jsx-runtime";
6474
- var p28 = BRAND.cssPrefix;
6594
+ import { jsx as jsx33, jsxs as jsxs28 } from "preact/jsx-runtime";
6595
+ var p30 = BRAND.cssPrefix;
6475
6596
  var SANDBOX = "allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads";
6476
6597
  function IframeView({ url, title, strings, onBack, actions }) {
6477
- return /* @__PURE__ */ jsxs27("div", { class: `${p28}-module`, children: [
6478
- /* @__PURE__ */ jsx32(
6598
+ return /* @__PURE__ */ jsxs28("div", { class: `${p30}-module`, children: [
6599
+ /* @__PURE__ */ jsx33(
6479
6600
  BackHeader,
6480
6601
  {
6481
6602
  title: title || strings.moduleBack,
@@ -6484,10 +6605,10 @@ function IframeView({ url, title, strings, onBack, actions }) {
6484
6605
  actions
6485
6606
  }
6486
6607
  ),
6487
- /* @__PURE__ */ jsx32(
6608
+ /* @__PURE__ */ jsx33(
6488
6609
  "iframe",
6489
6610
  {
6490
- class: `${p28}-content-frame`,
6611
+ class: `${p30}-content-frame`,
6491
6612
  src: url,
6492
6613
  title: title || "content",
6493
6614
  sandbox: SANDBOX,
@@ -6501,8 +6622,8 @@ function IframeView({ url, title, strings, onBack, actions }) {
6501
6622
 
6502
6623
  // src/ui/content-view.tsx
6503
6624
  import { useCallback as useCallback3, useEffect as useEffect13, useState as useState11 } from "preact/hooks";
6504
- import { jsx as jsx33, jsxs as jsxs28 } from "preact/jsx-runtime";
6505
- var p29 = BRAND.cssPrefix;
6625
+ import { jsx as jsx34, jsxs as jsxs29 } from "preact/jsx-runtime";
6626
+ var p31 = BRAND.cssPrefix;
6506
6627
  var log15 = logger.scope("content");
6507
6628
  var READ_DWELL_MS = 5e3;
6508
6629
  function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
@@ -6546,16 +6667,16 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
6546
6667
  [bus, id]
6547
6668
  );
6548
6669
  function renderBody() {
6549
- if (failed) return /* @__PURE__ */ jsx33(ModuleState, { tone: "error", message: strings.errorGeneric, onRetry: retry, strings });
6550
- if (item === null) return /* @__PURE__ */ jsx33(ModuleState, { message: strings.contentLoading, strings });
6551
- return /* @__PURE__ */ jsxs28("article", { class: `${p29}-content`, "data-testid": TID.contentView, onClick: onArticleClick, children: [
6552
- item.image ? /* @__PURE__ */ jsx33("img", { class: `${p29}-content-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
6553
- item.description ? /* @__PURE__ */ jsx33("p", { class: `${p29}-content-subtitle`, children: item.description }) : null,
6554
- /* @__PURE__ */ jsx33(StaticMarkdown, { text: item.content ?? "" })
6670
+ if (failed) return /* @__PURE__ */ jsx34(ModuleState, { tone: "error", message: strings.errorGeneric, onRetry: retry, strings });
6671
+ if (item === null) return /* @__PURE__ */ jsx34(ModuleState, { message: strings.contentLoading, strings });
6672
+ return /* @__PURE__ */ jsxs29("article", { class: `${p31}-content`, "data-testid": TID.contentView, onClick: onArticleClick, children: [
6673
+ item.image ? /* @__PURE__ */ jsx34("img", { class: `${p31}-content-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
6674
+ item.description ? /* @__PURE__ */ jsx34("p", { class: `${p31}-content-subtitle`, children: item.description }) : null,
6675
+ /* @__PURE__ */ jsx34(StaticMarkdown, { text: item.content ?? "" })
6555
6676
  ] });
6556
6677
  }
6557
- return /* @__PURE__ */ jsxs28("div", { class: `${p29}-module`, children: [
6558
- /* @__PURE__ */ jsx33(
6678
+ return /* @__PURE__ */ jsxs29("div", { class: `${p31}-module`, children: [
6679
+ /* @__PURE__ */ jsx34(
6559
6680
  BackHeader,
6560
6681
  {
6561
6682
  title: item?.title || title || strings.moduleBack,
@@ -6565,13 +6686,13 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
6565
6686
  testid: TID.backHeader
6566
6687
  }
6567
6688
  ),
6568
- /* @__PURE__ */ jsx33("div", { class: `${p29}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
6689
+ /* @__PURE__ */ jsx34("div", { class: `${p31}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
6569
6690
  ] });
6570
6691
  }
6571
6692
 
6572
6693
  // src/ui/messenger-home.tsx
6573
- import { jsx as jsx34, jsxs as jsxs29 } from "preact/jsx-runtime";
6574
- var p30 = BRAND.cssPrefix;
6694
+ import { jsx as jsx35, jsxs as jsxs30 } from "preact/jsx-runtime";
6695
+ var p32 = BRAND.cssPrefix;
6575
6696
  function MessengerHome({
6576
6697
  panelProps,
6577
6698
  enabledModules,
@@ -6605,7 +6726,7 @@ function MessengerHome({
6605
6726
  }, []);
6606
6727
  const { visible: dragOver } = useFileDrop({ containerRef, onDrop: onDropItems });
6607
6728
  useDragMove(containerRef.current, options.mode === "modal");
6608
- const navState = useComputed6(() => nav.sig.value).value;
6729
+ const navState = useComputed7(() => nav.sig.value).value;
6609
6730
  const top = topScreen(navState);
6610
6731
  const activeModule = options.modules.byId[navState.activeTab];
6611
6732
  const isReader = top?.kind === "iframe" || top?.kind === "content";
@@ -6642,12 +6763,12 @@ function MessengerHome({
6642
6763
  bus,
6643
6764
  panelProps
6644
6765
  });
6645
- const plainActions = /* @__PURE__ */ jsx34(HeaderActions, { panelProps, variant: "plain" });
6766
+ const plainActions = /* @__PURE__ */ jsx35(HeaderActions, { panelProps, variant: "plain" });
6646
6767
  if (activeModule) visitedRef.current.add(activeModule.id);
6647
6768
  const visitedTabs = enabledModules.filter((m) => visitedRef.current.has(m.id));
6648
6769
  const tabRoot = (module) => {
6649
6770
  if (module.layout === "chat") {
6650
- return /* @__PURE__ */ jsx34(
6771
+ return /* @__PURE__ */ jsx35(
6651
6772
  PanelContent,
6652
6773
  {
6653
6774
  ...panelProps,
@@ -6658,14 +6779,14 @@ function MessengerHome({
6658
6779
  );
6659
6780
  }
6660
6781
  const Root = LAYOUTS[module.layout].Root;
6661
- return Root ? /* @__PURE__ */ jsx34(Root, { ...screenProps(module) }) : null;
6782
+ return Root ? /* @__PURE__ */ jsx35(Root, { ...screenProps(module) }) : null;
6662
6783
  };
6663
6784
  const renderReader = () => {
6664
6785
  if (top?.kind === "iframe") {
6665
- return /* @__PURE__ */ jsx34(IframeView, { url: top.url, title: top.title, strings, onBack: nav.pop, actions: plainActions });
6786
+ return /* @__PURE__ */ jsx35(IframeView, { url: top.url, title: top.title, strings, onBack: nav.pop, actions: plainActions });
6666
6787
  }
6667
6788
  if (top?.kind === "content") {
6668
- return /* @__PURE__ */ jsx34(
6789
+ return /* @__PURE__ */ jsx35(
6669
6790
  ContentView,
6670
6791
  {
6671
6792
  id: top.id,
@@ -6680,22 +6801,22 @@ function MessengerHome({
6680
6801
  }
6681
6802
  return null;
6682
6803
  };
6683
- return /* @__PURE__ */ jsxs29(
6804
+ return /* @__PURE__ */ jsxs30(
6684
6805
  "div",
6685
6806
  {
6686
6807
  ref: containerRef,
6687
- class: `${p30}-panel ${p30}-messenger`,
6808
+ class: `${p32}-panel ${p32}-messenger`,
6688
6809
  role: "dialog",
6689
6810
  "aria-modal": "false",
6690
6811
  "aria-label": strings.panelTitle,
6691
6812
  style: { position: "relative" },
6692
6813
  "data-testid": TID.messengerHome,
6693
6814
  children: [
6694
- /* @__PURE__ */ jsxs29("div", { class: `${p30}-messenger-body`, children: [
6695
- visitedTabs.map((m) => /* @__PURE__ */ jsx34("div", { class: `${p30}-messenger-pane`, hidden: isReader || m.id !== activeModule?.id, children: tabRoot(m) }, m.id)),
6815
+ /* @__PURE__ */ jsxs30("div", { class: `${p32}-messenger-body`, children: [
6816
+ visitedTabs.map((m) => /* @__PURE__ */ jsx35("div", { class: `${p32}-messenger-pane`, hidden: isReader || m.id !== activeModule?.id, children: tabRoot(m) }, m.id)),
6696
6817
  renderReader()
6697
6818
  ] }),
6698
- showTabBar ? /* @__PURE__ */ jsx34(
6819
+ showTabBar ? /* @__PURE__ */ jsx35(
6699
6820
  HomeTabBar,
6700
6821
  {
6701
6822
  modules: enabledModules,
@@ -6705,8 +6826,8 @@ function MessengerHome({
6705
6826
  onSelect: nav.switchTab
6706
6827
  }
6707
6828
  ) : null,
6708
- /* @__PURE__ */ jsx34(PoweredByBar, { poweredBy: options.poweredBy }),
6709
- options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */ jsx34(
6829
+ /* @__PURE__ */ jsx35(PoweredByBar, { poweredBy: options.poweredBy }),
6830
+ options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */ jsx35(
6710
6831
  ResizeGrip,
6711
6832
  {
6712
6833
  panelEl: containerRef.current,
@@ -6723,29 +6844,29 @@ function MessengerHome({
6723
6844
  }
6724
6845
 
6725
6846
  // src/ui/modules-empty.tsx
6726
- import { jsx as jsx35, jsxs as jsxs30 } from "preact/jsx-runtime";
6727
- var p31 = BRAND.cssPrefix;
6847
+ import { jsx as jsx36, jsxs as jsxs31 } from "preact/jsx-runtime";
6848
+ var p33 = BRAND.cssPrefix;
6728
6849
  function ModulesEmpty({ strings, onClose }) {
6729
- return /* @__PURE__ */ jsxs30(
6850
+ return /* @__PURE__ */ jsxs31(
6730
6851
  "div",
6731
6852
  {
6732
- class: `${p31}-panel ${p31}-modules-empty`,
6853
+ class: `${p33}-panel ${p33}-modules-empty`,
6733
6854
  role: "dialog",
6734
6855
  "aria-label": strings.panelTitle,
6735
6856
  "data-testid": TID.modulesEmpty,
6736
6857
  children: [
6737
- onClose ? /* @__PURE__ */ jsx35(
6858
+ onClose ? /* @__PURE__ */ jsx36(
6738
6859
  "button",
6739
6860
  {
6740
6861
  type: "button",
6741
- class: `${p31}-icon-btn ${p31}-modules-empty-close`,
6862
+ class: `${p33}-icon-btn ${p33}-modules-empty-close`,
6742
6863
  onClick: onClose,
6743
6864
  "aria-label": strings.close,
6744
6865
  title: strings.close,
6745
- children: /* @__PURE__ */ jsx35(CloseIcon, {})
6866
+ children: /* @__PURE__ */ jsx36(CloseIcon, {})
6746
6867
  }
6747
6868
  ) : null,
6748
- /* @__PURE__ */ jsx35("p", { class: `${p31}-modules-empty-text`, children: strings.modulesEmpty })
6869
+ /* @__PURE__ */ jsx36("p", { class: `${p33}-modules-empty-text`, children: strings.modulesEmpty })
6749
6870
  ]
6750
6871
  }
6751
6872
  );
@@ -6768,9 +6889,9 @@ function useLauncherCallout({ callout, persistence }) {
6768
6889
  }
6769
6890
 
6770
6891
  // src/ui/app.tsx
6771
- import { jsx as jsx36, jsxs as jsxs31 } from "preact/jsx-runtime";
6892
+ import { jsx as jsx37, jsxs as jsxs32 } from "preact/jsx-runtime";
6772
6893
  var log16 = logger.scope("app");
6773
- var p32 = BRAND.cssPrefix;
6894
+ var p34 = BRAND.cssPrefix;
6774
6895
  function makeLocalizedWelcome(w, strings) {
6775
6896
  return makeInstantWelcomeMessage({ ...w, text: localizeText(strings, w.text) });
6776
6897
  }
@@ -7312,7 +7433,7 @@ function App({ options, hostElement, bus }) {
7312
7433
  bus.emit("toolResult", { toolCallId });
7313
7434
  resolveTool(toolCallId, TRIGGER.toolResult, (part) => {
7314
7435
  part.outputSig.value = output;
7315
- part.stateSig.value = "output";
7436
+ part.stateSig.value = "output-available";
7316
7437
  });
7317
7438
  },
7318
7439
  [bus, resolveTool]
@@ -7324,7 +7445,7 @@ function App({ options, hostElement, bus }) {
7324
7445
  resolveTool(toolCallId, TRIGGER.toolApproval, (part) => {
7325
7446
  const id = part.approvalSig.value?.id ?? toolCallId;
7326
7447
  part.approvalSig.value = { id, approved, reason };
7327
- part.stateSig.value = "output";
7448
+ part.stateSig.value = "approval-responded";
7328
7449
  });
7329
7450
  },
7330
7451
  [bus, resolveTool]
@@ -7365,12 +7486,12 @@ function App({ options, hostElement, bus }) {
7365
7486
  void transport.submitForm({ formId: form.id, conversationId: activeConversationId, trigger, values, skipped });
7366
7487
  }
7367
7488
  });
7368
- const activeForm = useComputed7(() => forms.activeForm.value);
7489
+ const activeForm = useComputed8(() => forms.activeForm.value);
7369
7490
  useEffect16(() => {
7370
7491
  forms.refresh();
7371
7492
  }, [effectiveForms, forms]);
7372
7493
  const pageArea = options.pageContext?.area ? String(options.pageContext.area) : void 0;
7373
- const msgCount = useComputed7(() => messagesSig.value.length);
7494
+ const msgCount = useComputed8(() => messagesSig.value.length);
7374
7495
  useEffect16(() => {
7375
7496
  if (conversationReady && formsReady) forms.fire("pre-chat");
7376
7497
  }, [conversationReady, formsReady, forms]);
@@ -7634,6 +7755,7 @@ function App({ options, hostElement, bus }) {
7634
7755
  transport,
7635
7756
  feedback,
7636
7757
  bus,
7758
+ persistence,
7637
7759
  view,
7638
7760
  canSend,
7639
7761
  isStreaming: streaming,
@@ -7684,12 +7806,12 @@ function App({ options, hostElement, bus }) {
7684
7806
  const renderSurface = (size) => {
7685
7807
  const closeable = isActionVisible("close", effectiveOptions.mode, size);
7686
7808
  if (enabledModules.length === 0) {
7687
- return /* @__PURE__ */ jsx36(ModulesEmpty, { strings: effectiveOptions.strings, onClose: closeable ? handleClose : void 0 });
7809
+ return /* @__PURE__ */ jsx37(ModulesEmpty, { strings: effectiveOptions.strings, onClose: closeable ? handleClose : void 0 });
7688
7810
  }
7689
7811
  if (enabledModules.length === 1 && enabledModules[0]?.layout === "chat") {
7690
- return /* @__PURE__ */ jsx36(Panel, { ...panelProps, panelSize: size });
7812
+ return /* @__PURE__ */ jsx37(Panel, { ...panelProps, panelSize: size });
7691
7813
  }
7692
- return /* @__PURE__ */ jsx36(
7814
+ return /* @__PURE__ */ jsx37(
7693
7815
  MessengerHome,
7694
7816
  {
7695
7817
  panelProps: { ...panelProps, panelSize: size, onClose: closeable ? handleClose : void 0 },
@@ -7708,7 +7830,7 @@ function App({ options, hostElement, bus }) {
7708
7830
  void handleSelectHistoryConversation(chat.conversationId);
7709
7831
  };
7710
7832
  const conversationsEnabled = enabledModules.some((m) => m.layout === "chat");
7711
- return /* @__PURE__ */ jsx36("div", { class: `${p32}-anchor`, children: /* @__PURE__ */ jsx36(
7833
+ return /* @__PURE__ */ jsx37("div", { class: `${p34}-anchor`, children: /* @__PURE__ */ jsx37(
7712
7834
  PageShell,
7713
7835
  {
7714
7836
  site: parsedSite,
@@ -7716,6 +7838,7 @@ function App({ options, hostElement, bus }) {
7716
7838
  transport,
7717
7839
  strings: effectiveOptions.strings,
7718
7840
  locale: effectiveOptions.locale,
7841
+ persistence,
7719
7842
  visitorId,
7720
7843
  showConversations: conversationsEnabled,
7721
7844
  onSelectConversation: onSelectConversationFromSidebar,
@@ -7728,15 +7851,15 @@ function App({ options, hostElement, bus }) {
7728
7851
  }
7729
7852
  if (isInlineLike) {
7730
7853
  const inlineSize = options.mode === "standalone" ? "fullscreen" : panelSize;
7731
- return /* @__PURE__ */ jsx36("div", { class: `${p32}-anchor`, children: renderSurface(inlineSize) });
7854
+ return /* @__PURE__ */ jsx37("div", { class: `${p34}-anchor`, children: renderSurface(inlineSize) });
7732
7855
  }
7733
7856
  const drawerEdgeTab = options.mode === "drawer";
7734
7857
  const triggerOwnedByPage = options.mode === "modal";
7735
7858
  const launcherVisible = !triggerOwnedByPage && !options.launcher.hidden && (!isOpen || launcherLeaving);
7736
7859
  const calloutToRender = launcherVisible && !launcherLeaving && !calloutDismissed && !drawerEdgeTab ? effectiveOptions.launcher.callout : null;
7737
- return /* @__PURE__ */ jsxs31("div", { class: `${p32}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
7738
- isOpen || activated ? /* @__PURE__ */ jsx36("div", { class: `${p32}-surface`, hidden: !isOpen, children: renderSurface(panelSize) }) : null,
7739
- launcherVisible ? /* @__PURE__ */ jsx36(
7860
+ return /* @__PURE__ */ jsxs32("div", { class: `${p34}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
7861
+ isOpen || activated ? /* @__PURE__ */ jsx37("div", { class: `${p34}-surface`, hidden: !isOpen, children: renderSurface(panelSize) }) : null,
7862
+ launcherVisible ? /* @__PURE__ */ jsx37(
7740
7863
  Launcher,
7741
7864
  {
7742
7865
  onToggle: handleOpen,
@@ -7746,7 +7869,7 @@ function App({ options, hostElement, bus }) {
7746
7869
  edgeTab: drawerEdgeTab
7747
7870
  }
7748
7871
  ) : null,
7749
- calloutToRender ? /* @__PURE__ */ jsx36(
7872
+ calloutToRender ? /* @__PURE__ */ jsx37(
7750
7873
  LauncherCallout,
7751
7874
  {
7752
7875
  callout: calloutToRender,
@@ -7811,34 +7934,34 @@ var TRACKED = {
7811
7934
  expand: (on) => ({ on }),
7812
7935
  fullscreen: (on) => ({ on }),
7813
7936
  // Conversation funnel. `send` is the key conversion; text never rides.
7814
- send: (p33) => ({ attachments: p33.attachmentCount }),
7815
- message: (p33) => ({ role: p33.role }),
7937
+ send: (p35) => ({ attachments: p35.attachmentCount }),
7938
+ message: (p35) => ({ role: p35.role }),
7816
7939
  stop: () => void 0,
7817
7940
  clear: () => void 0,
7818
7941
  suggestion: () => void 0,
7819
- toggleHistory: (p33) => ({ view: p33.view }),
7942
+ toggleHistory: (p35) => ({ view: p35.view }),
7820
7943
  handshake: () => void 0,
7821
7944
  // Forms + human-in-the-loop — ids and outcomes, never values.
7822
- formSubmit: (p33) => ({ formId: p33.formId, skipped: p33.skipped }),
7945
+ formSubmit: (p35) => ({ formId: p35.formId, skipped: p35.skipped }),
7823
7946
  toolResult: () => void 0,
7824
- toolDecision: (p33) => ({ approved: p33.approved }),
7947
+ toolDecision: (p35) => ({ approved: p35.approved }),
7825
7948
  // Content — ids, tags + counts only; titles/bodies never ride.
7826
- contentView: (p33) => ({ section: p33.section, tags: p33.tags, count: p33.count }),
7827
- contentOpen: (p33) => ({ contentId: p33.contentId, tags: p33.tags }),
7828
- contentSearch: (p33) => ({ qlen: p33.queryLength, hits: p33.hitCount }),
7829
- contentRead: (p33) => ({ contentId: p33.contentId }),
7830
- contentLinkClick: (p33) => ({ contentId: p33.contentId }),
7949
+ contentView: (p35) => ({ section: p35.section, tags: p35.tags, count: p35.count }),
7950
+ contentOpen: (p35) => ({ contentId: p35.contentId, tags: p35.tags }),
7951
+ contentSearch: (p35) => ({ qlen: p35.queryLength, hits: p35.hitCount }),
7952
+ contentRead: (p35) => ({ contentId: p35.contentId }),
7953
+ contentLinkClick: (p35) => ({ contentId: p35.contentId }),
7831
7954
  // Composer / attachments / voice.
7832
- attach: (p33) => ({ count: p33.count, bytes: p33.totalBytes }),
7955
+ attach: (p35) => ({ count: p35.count, bytes: p35.totalBytes }),
7833
7956
  voiceStart: () => void 0,
7834
- voiceStop: (p33) => ({ ms: p33.durationMs }),
7957
+ voiceStop: (p35) => ({ ms: p35.durationMs }),
7835
7958
  voiceCancel: () => void 0,
7836
7959
  // Preferences — how visitors tune the surface.
7837
7960
  localeChange: (locale) => ({ locale }),
7838
7961
  themeChange: (theme) => ({ theme }),
7839
7962
  textSizeChange: (size) => ({ size }),
7840
- soundToggle: (p33) => ({ muted: p33.muted }),
7841
- sidebarToggle: (p33) => ({ collapsed: p33.collapsed }),
7963
+ soundToggle: (p35) => ({ muted: p35.muted }),
7964
+ sidebarToggle: (p35) => ({ collapsed: p35.collapsed }),
7842
7965
  calloutDismiss: () => void 0,
7843
7966
  // Health signal only — the error object itself never leaves the page.
7844
7967
  error: () => void 0