@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/index.mjs CHANGED
@@ -30,7 +30,7 @@ var BRAND = {
30
30
  };
31
31
 
32
32
  // src/core/version.ts
33
- var ELEMENTS_VERSION = true ? "0.44.2" : "0.0.0-dev";
33
+ var ELEMENTS_VERSION = true ? "0.45.0" : "0.0.0-dev";
34
34
  var ELEMENTS_VERSION_PARAM = "_ev";
35
35
 
36
36
  // src/i18n/strings.ts
@@ -91,6 +91,9 @@ var STRINGS_EN = {
91
91
  thinking: "Thinking\u2026",
92
92
  thoughts: "Thoughts",
93
93
  usedTool: "Used tool",
94
+ toolDetails: "Details",
95
+ toolResult: "Result",
96
+ sources: "Sources",
94
97
  // ── Messenger modules ──────────────────────────────────────────
95
98
  tabHome: "Home",
96
99
  tabConversations: "Conversations",
@@ -204,6 +207,9 @@ var STRINGS_FR = {
204
207
  thinking: "R\xE9flexion\u2026",
205
208
  thoughts: "R\xE9flexions",
206
209
  usedTool: "Outil utilis\xE9",
210
+ toolDetails: "D\xE9tails",
211
+ toolResult: "R\xE9sultat",
212
+ sources: "Sources",
207
213
  // ── Messenger modules ──────────────────────────────────────────
208
214
  tabHome: "Accueil",
209
215
  tabConversations: "Conversations",
@@ -615,6 +621,7 @@ function resolveOptions(rawOpts) {
615
621
  responseMode: behavior.responseMode ?? "streaming",
616
622
  showReasoning: behavior.showReasoning ?? false,
617
623
  showToolCalls: behavior.showToolCalls ?? false,
624
+ showSources: behavior.showSources ?? false,
618
625
  features: {
619
626
  files: opts.features?.files ?? DEFAULT_FEATURES.files,
620
627
  voice: opts.features?.voice ?? DEFAULT_FEATURES.voice,
@@ -941,7 +948,8 @@ var BEHAVIOR_ATTRS = [
941
948
  ["response-mode", "responseMode", (v) => v],
942
949
  ["start-minimized", "startMinimized", boolAttr],
943
950
  ["show-reasoning", "showReasoning", boolAttr],
944
- ["show-tool-calls", "showToolCalls", boolAttr]
951
+ ["show-tool-calls", "showToolCalls", boolAttr],
952
+ ["show-sources", "showSources", boolAttr]
945
953
  ];
946
954
  var I18N_ATTRS = [["locale", "locale"]];
947
955
  var ACTION_NAMES = new Set(ACTION_NAME_LITERALS);
@@ -1060,6 +1068,7 @@ function createPersistence(widgetId, storage = defaultStorage, deploymentId) {
1060
1068
  const KEY_CALLOUT_DISMISSED = `${prefix}.calloutDismissed`;
1061
1069
  const KEY_SIDEBAR_COLLAPSED = `${prefix}.sidebarCollapsed`;
1062
1070
  const KEY_ACTIVE_MODULE = `${prefix}.activeModule`;
1071
+ const KEY_HISTORY_COUNT = `${prefix}.historyCount`;
1063
1072
  const KEY_FORMS_DONE = `${prefix}.formsDone`;
1064
1073
  const persistence = {
1065
1074
  getVisitorId() {
@@ -1143,6 +1152,15 @@ function createPersistence(widgetId, storage = defaultStorage, deploymentId) {
1143
1152
  saveActiveModule(id) {
1144
1153
  storage.set(KEY_ACTIVE_MODULE, id);
1145
1154
  },
1155
+ loadHistoryCount() {
1156
+ const raw = storage.get(KEY_HISTORY_COUNT);
1157
+ if (!raw) return null;
1158
+ const n = Number.parseInt(raw, 10);
1159
+ return Number.isFinite(n) && n >= 0 ? n : null;
1160
+ },
1161
+ saveHistoryCount(count) {
1162
+ storage.set(KEY_HISTORY_COUNT, String(count));
1163
+ },
1146
1164
  loadFormsDone() {
1147
1165
  const raw = storage.get(KEY_FORMS_DONE);
1148
1166
  if (!raw) return {};
@@ -1186,7 +1204,7 @@ var tokens_default = ':host{--__P__-accent-user: __BRAND_ACCENT__;--__P__-accent
1186
1204
  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';
1187
1205
 
1188
1206
  // src/styles/panel.css
1189
- 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';
1207
+ 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';
1190
1208
 
1191
1209
  // src/styles/standalone.css
1192
1210
  var standalone_default = ".__P__-standalone-page{margin:0;height:100vh;background:var(--__P__-bg, #fff);display:grid;place-items:stretch}\n";
@@ -1274,22 +1292,22 @@ function attachAdoptedSheet(shadow, doc) {
1274
1292
  }
1275
1293
  }
1276
1294
  function applyThemeOverrides(host, overrides) {
1277
- const p33 = BRAND.cssPrefix;
1278
- if (overrides.accent) host.style.setProperty(`--${p33}-accent-user`, overrides.accent);
1279
- if (overrides.accentText) host.style.setProperty(`--${p33}-accent-text-user`, overrides.accentText);
1280
- if (overrides.radius) host.style.setProperty(`--${p33}-radius`, overrides.radius);
1281
- if (overrides.fontFamily) host.style.setProperty(`--${p33}-font`, overrides.fontFamily);
1295
+ const p35 = BRAND.cssPrefix;
1296
+ if (overrides.accent) host.style.setProperty(`--${p35}-accent-user`, overrides.accent);
1297
+ if (overrides.accentText) host.style.setProperty(`--${p35}-accent-text-user`, overrides.accentText);
1298
+ if (overrides.radius) host.style.setProperty(`--${p35}-radius`, overrides.radius);
1299
+ if (overrides.fontFamily) host.style.setProperty(`--${p35}-font`, overrides.fontFamily);
1282
1300
  }
1283
1301
  function applyThemeMode(host, mode) {
1284
1302
  host.dataset.theme = mode;
1285
1303
  }
1286
1304
  function applySize(host, size) {
1287
- const p33 = BRAND.cssPrefix;
1288
- if (size.width !== void 0) host.style.setProperty(`--${p33}-panel-w`, size.width);
1289
- if (size.height !== void 0) host.style.setProperty(`--${p33}-panel-h`, size.height);
1290
- if (size.expanded?.width !== void 0) host.style.setProperty(`--${p33}-expanded-w`, size.expanded.width);
1291
- if (size.expanded?.height !== void 0) host.style.setProperty(`--${p33}-expanded-h`, size.expanded.height);
1292
- if (size.inset !== void 0) host.style.setProperty(`--${p33}-panel-inset`, size.inset);
1305
+ const p35 = BRAND.cssPrefix;
1306
+ if (size.width !== void 0) host.style.setProperty(`--${p35}-panel-w`, size.width);
1307
+ if (size.height !== void 0) host.style.setProperty(`--${p35}-panel-h`, size.height);
1308
+ if (size.expanded?.width !== void 0) host.style.setProperty(`--${p35}-expanded-w`, size.expanded.width);
1309
+ if (size.expanded?.height !== void 0) host.style.setProperty(`--${p35}-expanded-h`, size.expanded.height);
1310
+ if (size.inset !== void 0) host.style.setProperty(`--${p35}-panel-inset`, size.inset);
1293
1311
  }
1294
1312
  function applyPosition(host, pos) {
1295
1313
  host.dataset.position = pos;
@@ -1405,7 +1423,7 @@ import { h, render as renderPreact } from "preact";
1405
1423
 
1406
1424
  // src/ui/app.tsx
1407
1425
  import { useCallback as useCallback6, useEffect as useEffect16, useMemo as useMemo3, useRef as useRef9, useState as useState13 } from "preact/hooks";
1408
- import { batch, useComputed as useComputed7, useSignal as useSignal2 } from "@preact/signals";
1426
+ import { batch, useComputed as useComputed8, useSignal as useSignal2 } from "@preact/signals";
1409
1427
 
1410
1428
  // src/core/handshake-shape.ts
1411
1429
  function isPlainObject2(raw) {
@@ -1553,11 +1571,11 @@ function toBase64Url(json) {
1553
1571
  var nonEmpty = (ctx) => ctx && Object.keys(ctx).length > 0 ? ctx : void 0;
1554
1572
  function encodeContext(user, page) {
1555
1573
  const u = nonEmpty(user);
1556
- const p33 = nonEmpty(page);
1557
- if (!u && !p33) return void 0;
1574
+ const p35 = nonEmpty(page);
1575
+ if (!u && !p35) return void 0;
1558
1576
  const envelope = {};
1559
1577
  if (u) envelope.user = u;
1560
- if (p33) envelope.page = p33;
1578
+ if (p35) envelope.page = p35;
1561
1579
  return toBase64Url(JSON.stringify(envelope));
1562
1580
  }
1563
1581
 
@@ -1567,6 +1585,13 @@ function parseWireDate(value) {
1567
1585
  const ms = Date.parse(value);
1568
1586
  return Number.isFinite(ms) ? ms : void 0;
1569
1587
  }
1588
+ function toolPartType(toolName) {
1589
+ const bare = toolName.startsWith("tool:") ? toolName.slice(5) : toolName;
1590
+ return `tool-${bare}`;
1591
+ }
1592
+ function toolNameFromType(type) {
1593
+ return type.startsWith("tool-") ? type.slice(5) : type;
1594
+ }
1570
1595
  var DEFAULT_PATHS = {
1571
1596
  /** Conversation bootstrap. `POST` → deployment config + per-visitor state. */
1572
1597
  handshake: "/pai/handshake",
@@ -1648,8 +1673,8 @@ function buildSendMessageRequest(params) {
1648
1673
  if (Object.keys(data).length > 0) body.data = data;
1649
1674
  return body;
1650
1675
  }
1651
- function isResolvedToolPart(p33) {
1652
- return p33.state === "output" || p33.state === "error" || p33.approval?.approved !== void 0;
1676
+ function isResolvedToolPart(p35) {
1677
+ return p35.state === "output-available" || p35.state === "output-error" || p35.state === "output-denied" || p35.approval?.approved !== void 0;
1653
1678
  }
1654
1679
  function normalizeToolRef(ref) {
1655
1680
  if (typeof ref === "string") return ref ? { code: ref } : null;
@@ -1657,24 +1682,23 @@ function normalizeToolRef(ref) {
1657
1682
  }
1658
1683
  function messageToWireParts(m) {
1659
1684
  const out = [];
1660
- for (const p33 of m.parts) {
1661
- if (p33.kind === "text" && p33.text) {
1662
- out.push({ text: p33.text, type: "text" });
1685
+ for (const p35 of m.parts) {
1686
+ if (p35.kind === "text" && p35.text) {
1687
+ out.push({ text: p35.text, type: "text" });
1663
1688
  }
1664
- if (p33.kind === "file" && p33.url) {
1665
- out.push({ mediaType: p33.mediaType, type: "file", url: p33.url });
1689
+ if (p35.kind === "file" && p35.url) {
1690
+ out.push({ mediaType: p35.mediaType, type: "file", url: p35.url });
1666
1691
  }
1667
- if (p33.kind === "tool" && isResolvedToolPart(p33)) {
1692
+ if (p35.kind === "tool" && isResolvedToolPart(p35)) {
1668
1693
  const part = {
1669
- type: "tool",
1670
- toolCallId: p33.toolCallId,
1671
- toolName: p33.toolName,
1672
- state: p33.state
1694
+ type: toolPartType(p35.toolName),
1695
+ toolCallId: p35.toolCallId,
1696
+ state: p35.state
1673
1697
  };
1674
- if (p33.input !== void 0) part.input = p33.input;
1675
- if (p33.output !== void 0) part.output = p33.output;
1676
- if (p33.error !== void 0) part.errorText = p33.error;
1677
- if (p33.approval && p33.approval.approved !== void 0) part.approval = p33.approval;
1698
+ if (p35.input !== void 0) part.input = p35.input;
1699
+ if (p35.output !== void 0) part.output = p35.output;
1700
+ if (p35.error !== void 0) part.errorText = p35.error;
1701
+ if (p35.approval && p35.approval.approved !== void 0) part.approval = p35.approval;
1678
1702
  out.push(part);
1679
1703
  }
1680
1704
  }
@@ -2371,11 +2395,23 @@ function fromWireMessage(w) {
2371
2395
  if (part.type === "file") {
2372
2396
  return { kind: "file", url: part.url, mediaType: part.mediaType };
2373
2397
  }
2374
- if (part.type === "tool") {
2398
+ if (part.type === "source-url") {
2399
+ return { kind: "source", sourceId: part.sourceId, url: part.url, title: part.title };
2400
+ }
2401
+ if (part.type === "source-document") {
2402
+ return {
2403
+ kind: "source",
2404
+ sourceId: part.sourceId,
2405
+ title: part.title,
2406
+ filename: part.filename,
2407
+ mediaType: part.mediaType
2408
+ };
2409
+ }
2410
+ if (part.type.startsWith("tool-")) {
2375
2411
  return {
2376
2412
  kind: "tool",
2377
2413
  toolCallId: part.toolCallId,
2378
- toolName: part.toolName,
2414
+ toolName: toolNameFromType(part.type),
2379
2415
  inputPartialSig: signal(""),
2380
2416
  inputSig: signal(part.input),
2381
2417
  outputSig: signal(part.output),
@@ -2385,7 +2421,7 @@ function fromWireMessage(w) {
2385
2421
  };
2386
2422
  }
2387
2423
  return null;
2388
- }).filter((p33) => p33 !== null);
2424
+ }).filter((p35) => p35 !== null);
2389
2425
  return {
2390
2426
  id: w.id,
2391
2427
  role: w.role,
@@ -2415,61 +2451,47 @@ function assistantText(m) {
2415
2451
  }
2416
2452
  return out;
2417
2453
  }
2418
- function partToReactive(p33) {
2419
- if (p33.kind === "text" || p33.kind === "reasoning") {
2420
- return { kind: p33.kind, id: p33.id, textSig: signal(p33.text), doneSig: signal(p33.done) };
2454
+ function partToReactive(p35) {
2455
+ if (p35.kind === "text" || p35.kind === "reasoning") {
2456
+ return { kind: p35.kind, id: p35.id, textSig: signal(p35.text), doneSig: signal(p35.done) };
2421
2457
  }
2422
- if (p33.kind === "tool") {
2458
+ if (p35.kind === "tool") {
2423
2459
  return {
2424
2460
  kind: "tool",
2425
- toolCallId: p33.toolCallId,
2426
- toolName: p33.toolName,
2427
- inputPartialSig: signal(p33.inputPartial),
2428
- inputSig: signal(p33.input),
2429
- outputSig: signal(p33.output),
2430
- errorSig: signal(p33.error),
2431
- stateSig: signal(p33.state),
2432
- approvalSig: signal(p33.approval)
2461
+ toolCallId: p35.toolCallId,
2462
+ toolName: p35.toolName,
2463
+ inputPartialSig: signal(p35.inputPartial),
2464
+ inputSig: signal(p35.input),
2465
+ outputSig: signal(p35.output),
2466
+ errorSig: signal(p35.error),
2467
+ stateSig: signal(p35.state),
2468
+ approvalSig: signal(p35.approval)
2433
2469
  };
2434
2470
  }
2435
- return p33;
2471
+ return p35;
2436
2472
  }
2437
- function partFromReactive(p33) {
2438
- if (p33.kind === "text" || p33.kind === "reasoning") {
2439
- return { kind: p33.kind, id: p33.id, text: p33.textSig.value, done: p33.doneSig.value };
2473
+ function partFromReactive(p35) {
2474
+ if (p35.kind === "text" || p35.kind === "reasoning") {
2475
+ return { kind: p35.kind, id: p35.id, text: p35.textSig.value, done: p35.doneSig.value };
2440
2476
  }
2441
- if (p33.kind === "tool") {
2477
+ if (p35.kind === "tool") {
2442
2478
  return {
2443
2479
  kind: "tool",
2444
- toolCallId: p33.toolCallId,
2445
- toolName: p33.toolName,
2446
- inputPartial: p33.inputPartialSig.value,
2447
- input: p33.inputSig.value,
2448
- output: p33.outputSig.value,
2449
- error: p33.errorSig.value,
2450
- state: p33.stateSig.value,
2451
- approval: p33.approvalSig.value
2480
+ toolCallId: p35.toolCallId,
2481
+ toolName: p35.toolName,
2482
+ inputPartial: p35.inputPartialSig.value,
2483
+ input: p35.inputSig.value,
2484
+ output: p35.outputSig.value,
2485
+ error: p35.errorSig.value,
2486
+ state: p35.stateSig.value,
2487
+ approval: p35.approvalSig.value
2452
2488
  };
2453
2489
  }
2454
- return p33;
2490
+ return p35;
2455
2491
  }
2456
2492
 
2457
2493
  // src/stream/reducer.ts
2458
2494
  import { signal as signal2 } from "@preact/signals";
2459
-
2460
- // src/stream/constants.ts
2461
- function isAskUserInputTool(toolName) {
2462
- if (!toolName) return false;
2463
- const name = toolName.startsWith("tool:") ? toolName.slice(5) : toolName;
2464
- return name === "ask-user-input" || name === "ask_user_input" || name === "request-user-input" || name === "request_user_input";
2465
- }
2466
- var TRIGGER = {
2467
- submitMessage: "submit-message",
2468
- toolResult: "tool-result",
2469
- toolApproval: "tool-approval"
2470
- };
2471
-
2472
- // src/stream/reducer.ts
2473
2495
  var log7 = logger.scope("reducer");
2474
2496
  var StreamReducer = class {
2475
2497
  constructor(messagesSig) {
@@ -2507,8 +2529,8 @@ var StreamReducer = class {
2507
2529
  ensureTextPart(m, "text", chunk.id);
2508
2530
  return;
2509
2531
  case "text-delta": {
2510
- const p33 = ensureTextPart(m, "text", chunk.id);
2511
- p33.textSig.value += chunk.delta;
2532
+ const p35 = ensureTextPart(m, "text", chunk.id);
2533
+ p35.textSig.value += chunk.delta;
2512
2534
  return;
2513
2535
  }
2514
2536
  case "text-end":
@@ -2518,8 +2540,8 @@ var StreamReducer = class {
2518
2540
  ensureTextPart(m, "reasoning", chunk.id).doneSig.value = false;
2519
2541
  return;
2520
2542
  case "reasoning-delta": {
2521
- const p33 = ensureTextPart(m, "reasoning", chunk.id);
2522
- p33.textSig.value += chunk.delta;
2543
+ const p35 = ensureTextPart(m, "reasoning", chunk.id);
2544
+ p35.textSig.value += chunk.delta;
2523
2545
  return;
2524
2546
  }
2525
2547
  case "reasoning-end":
@@ -2530,18 +2552,25 @@ var StreamReducer = class {
2530
2552
  case "tool-input-available":
2531
2553
  case "tool-output-available":
2532
2554
  case "tool-output-error":
2555
+ case "tool-output-denied":
2533
2556
  case "tool-approval-request":
2534
2557
  applyTool(m, chunk);
2535
2558
  return;
2536
2559
  case "file":
2537
2560
  appendPart(m, { kind: "file", url: chunk.url, mediaType: chunk.mediaType });
2538
2561
  return;
2539
- case "source-url": {
2540
- const parts = m.partsSig.value;
2541
- if (parts.some((p33) => p33.kind === "source" && p33.sourceId === chunk.sourceId)) return;
2542
- appendPart(m, { kind: "source", sourceId: chunk.sourceId, url: chunk.url, title: chunk.title });
2562
+ case "source-url":
2563
+ appendSource(m, { kind: "source", sourceId: chunk.sourceId, url: chunk.url, title: chunk.title });
2564
+ return;
2565
+ case "source-document":
2566
+ appendSource(m, {
2567
+ kind: "source",
2568
+ sourceId: chunk.sourceId,
2569
+ title: chunk.title,
2570
+ filename: chunk.filename,
2571
+ mediaType: chunk.mediaType
2572
+ });
2543
2573
  return;
2544
- }
2545
2574
  case "data-notification":
2546
2575
  return;
2547
2576
  default: {
@@ -2562,14 +2591,14 @@ var StreamReducer = class {
2562
2591
  }
2563
2592
  };
2564
2593
  function ensureTextPart(m, kind, id) {
2565
- const existing = m.partsSig.value.find((p33) => p33.kind === kind && p33.id === id);
2594
+ const existing = m.partsSig.value.find((p35) => p35.kind === kind && p35.id === id);
2566
2595
  if (existing) return existing;
2567
2596
  const part = { kind, id, textSig: signal2(""), doneSig: signal2(false) };
2568
2597
  appendPart(m, part);
2569
2598
  return part;
2570
2599
  }
2571
2600
  function ensureToolPart(m, toolCallId, toolName) {
2572
- const existing = m.partsSig.value.find((p33) => p33.kind === "tool" && p33.toolCallId === toolCallId);
2601
+ const existing = m.partsSig.value.find((p35) => p35.kind === "tool" && p35.toolCallId === toolCallId);
2573
2602
  if (existing) return existing;
2574
2603
  const part = {
2575
2604
  kind: "tool",
@@ -2579,7 +2608,7 @@ function ensureToolPart(m, toolCallId, toolName) {
2579
2608
  inputSig: signal2(void 0),
2580
2609
  outputSig: signal2(void 0),
2581
2610
  errorSig: signal2(void 0),
2582
- stateSig: signal2("input"),
2611
+ stateSig: signal2("input-streaming"),
2583
2612
  approvalSig: signal2(void 0)
2584
2613
  };
2585
2614
  appendPart(m, part);
@@ -2588,38 +2617,47 @@ function ensureToolPart(m, toolCallId, toolName) {
2588
2617
  function appendPart(m, part) {
2589
2618
  m.partsSig.value = [...m.partsSig.value, part];
2590
2619
  }
2620
+ function appendSource(m, source) {
2621
+ if (m.partsSig.value.some((p35) => p35.kind === "source" && p35.sourceId === source.sourceId)) return;
2622
+ appendPart(m, source);
2623
+ }
2591
2624
  function applyTool(m, chunk) {
2592
2625
  switch (chunk.type) {
2593
2626
  case "tool-input-start":
2594
2627
  ensureToolPart(m, chunk.toolCallId, chunk.toolName);
2595
2628
  return;
2596
2629
  case "tool-input-delta": {
2597
- const p33 = ensureToolPart(m, chunk.toolCallId);
2598
- p33.inputPartialSig.value += chunk.delta;
2630
+ const p35 = ensureToolPart(m, chunk.toolCallId);
2631
+ p35.inputPartialSig.value += chunk.inputTextDelta;
2599
2632
  return;
2600
2633
  }
2601
2634
  case "tool-input-available": {
2602
- const p33 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
2603
- p33.inputSig.value = chunk.input;
2604
- p33.stateSig.value = isAskUserInputTool(p33.toolName) ? "awaiting-input" : "awaiting";
2635
+ const p35 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
2636
+ p35.inputSig.value = chunk.input;
2637
+ p35.stateSig.value = "input-available";
2605
2638
  return;
2606
2639
  }
2607
2640
  case "tool-approval-request": {
2608
- const p33 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
2609
- p33.approvalSig.value = { id: chunk.approvalId };
2610
- p33.stateSig.value = "awaiting-approval";
2641
+ const p35 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
2642
+ p35.approvalSig.value = { id: chunk.approvalId };
2643
+ p35.stateSig.value = "approval-requested";
2611
2644
  return;
2612
2645
  }
2613
2646
  case "tool-output-available": {
2614
- const p33 = ensureToolPart(m, chunk.toolCallId);
2615
- p33.outputSig.value = chunk.output;
2616
- p33.stateSig.value = "output";
2647
+ const p35 = ensureToolPart(m, chunk.toolCallId);
2648
+ p35.outputSig.value = chunk.output;
2649
+ p35.stateSig.value = "output-available";
2617
2650
  return;
2618
2651
  }
2619
2652
  case "tool-output-error": {
2620
- const p33 = ensureToolPart(m, chunk.toolCallId);
2621
- p33.errorSig.value = chunk.errorText;
2622
- p33.stateSig.value = "error";
2653
+ const p35 = ensureToolPart(m, chunk.toolCallId);
2654
+ p35.errorSig.value = chunk.errorText;
2655
+ p35.stateSig.value = "output-error";
2656
+ return;
2657
+ }
2658
+ case "tool-output-denied": {
2659
+ const p35 = ensureToolPart(m, chunk.toolCallId);
2660
+ p35.stateSig.value = "output-denied";
2623
2661
  return;
2624
2662
  }
2625
2663
  default:
@@ -2627,6 +2665,18 @@ function applyTool(m, chunk) {
2627
2665
  }
2628
2666
  }
2629
2667
 
2668
+ // src/stream/constants.ts
2669
+ function isAskUserInputTool(toolName) {
2670
+ if (!toolName) return false;
2671
+ const name = toolName.startsWith("tool:") ? toolName.slice(5) : toolName;
2672
+ return name === "ask-user-input" || name === "ask_user_input" || name === "request-user-input" || name === "request_user_input";
2673
+ }
2674
+ var TRIGGER = {
2675
+ submitMessage: "submit-message",
2676
+ toolResult: "tool-result",
2677
+ toolApproval: "tool-approval"
2678
+ };
2679
+
2630
2680
  // src/core/feedback/index.ts
2631
2681
  import { signal as signal3 } from "@preact/signals";
2632
2682
 
@@ -3201,7 +3251,11 @@ var TID = {
3201
3251
  /** Tool-approval reject button. */
3202
3252
  toolReject: `${p2}-tool-reject`,
3203
3253
  /** Recorded tool decision summary (after approve/reject/submit). */
3204
- toolDecision: `${p2}-tool-decision`
3254
+ toolDecision: `${p2}-tool-decision`,
3255
+ /** Automatic (non-interactive) tool-call disclosure — shown only when `showToolCalls`. */
3256
+ toolCall: `${p2}-tool-call`,
3257
+ /** A citation source (web link or document reference) — shown only when `showSources`. */
3258
+ source: `${p2}-source`
3205
3259
  };
3206
3260
  function tid(base, suffix) {
3207
3261
  return `${base}-${suffix}`;
@@ -3312,24 +3366,24 @@ import { useCallback as useCallback2, useEffect as useEffect9, useRef as useRef6
3312
3366
  import { useEffect as useEffect2, useRef } from "preact/hooks";
3313
3367
  import { jsx as jsx3 } from "preact/jsx-runtime";
3314
3368
  function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, strings }) {
3315
- const p33 = BRAND.cssPrefix;
3369
+ const p35 = BRAND.cssPrefix;
3316
3370
  const dragRef = useRef(null);
3317
3371
  useEffect2(() => {
3318
3372
  if (!panelEl) return;
3319
3373
  const style = panelEl.style;
3320
- if (resize.minWidth) style.setProperty(`--${p33}-resize-min-w`, resize.minWidth);
3321
- if (resize.maxWidth) style.setProperty(`--${p33}-resize-max-w`, resize.maxWidth);
3322
- if (resize.minHeight) style.setProperty(`--${p33}-resize-min-h`, resize.minHeight);
3323
- if (resize.maxHeight) style.setProperty(`--${p33}-resize-max-h`, resize.maxHeight);
3374
+ if (resize.minWidth) style.setProperty(`--${p35}-resize-min-w`, resize.minWidth);
3375
+ if (resize.maxWidth) style.setProperty(`--${p35}-resize-max-w`, resize.maxWidth);
3376
+ if (resize.minHeight) style.setProperty(`--${p35}-resize-min-h`, resize.minHeight);
3377
+ if (resize.maxHeight) style.setProperty(`--${p35}-resize-max-h`, resize.maxHeight);
3324
3378
  if (initialSize) {
3325
- style.setProperty(`--${p33}-widget-w`, `${initialSize.width}px`);
3326
- style.setProperty(`--${p33}-widget-h`, `${initialSize.height}px`);
3379
+ style.setProperty(`--${p35}-widget-w`, `${initialSize.width}px`);
3380
+ style.setProperty(`--${p35}-widget-h`, `${initialSize.height}px`);
3327
3381
  }
3328
- }, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight, p33, initialSize]);
3382
+ }, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight, p35, initialSize]);
3329
3383
  if (!panelEl) return null;
3330
3384
  const isTop = position.startsWith("top-");
3331
3385
  const isRight = position.endsWith("-right");
3332
- const cornerClass = `${p33}-resize-grip ${p33}-resize-grip--${isTop ? "bottom" : "top"}-${isRight ? "left" : "right"}`;
3386
+ const cornerClass = `${p35}-resize-grip ${p35}-resize-grip--${isTop ? "bottom" : "top"}-${isRight ? "left" : "right"}`;
3333
3387
  const onPointerDown = (e) => {
3334
3388
  if (!panelEl) return;
3335
3389
  const target = e.currentTarget;
@@ -3354,8 +3408,8 @@ function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, stri
3354
3408
  if (!d || e.pointerId !== d.pointerId || !panelEl) return;
3355
3409
  const dx = (e.clientX - d.startX) * d.dirX;
3356
3410
  const dy = (e.clientY - d.startY) * d.dirY;
3357
- panelEl.style.setProperty(`--${p33}-widget-w`, `${d.startW + dx}px`);
3358
- panelEl.style.setProperty(`--${p33}-widget-h`, `${d.startH + dy}px`);
3411
+ panelEl.style.setProperty(`--${p35}-widget-w`, `${d.startW + dx}px`);
3412
+ panelEl.style.setProperty(`--${p35}-widget-h`, `${d.startH + dy}px`);
3359
3413
  };
3360
3414
  const onPointerUp = (e) => {
3361
3415
  const d = dragRef.current;
@@ -4092,7 +4146,7 @@ function usePopoverMenu({ itemCount, initialFocusIndex }) {
4092
4146
  // src/ui/overflow-menu.tsx
4093
4147
  import { jsx as jsx8, jsxs as jsxs6 } from "preact/jsx-runtime";
4094
4148
  function OverflowMenu({ items, triggerLabel }) {
4095
- const p33 = BRAND.cssPrefix;
4149
+ const p35 = BRAND.cssPrefix;
4096
4150
  const menu = usePopoverMenu({ itemCount: items.length });
4097
4151
  const handleSelect = (item) => {
4098
4152
  if (item.disabled) return;
@@ -4115,13 +4169,13 @@ function OverflowMenu({ items, triggerLabel }) {
4115
4169
  e.stopPropagation();
4116
4170
  pickSegment(item, segs[next].value);
4117
4171
  };
4118
- return /* @__PURE__ */ jsxs6("div", { class: `${p33}-menu-wrap`, children: [
4172
+ return /* @__PURE__ */ jsxs6("div", { class: `${p35}-menu-wrap`, children: [
4119
4173
  /* @__PURE__ */ jsx8(
4120
4174
  "button",
4121
4175
  {
4122
4176
  ref: menu.triggerRef,
4123
4177
  type: "button",
4124
- class: `${p33}-icon-btn`,
4178
+ class: `${p35}-icon-btn`,
4125
4179
  "aria-label": triggerLabel,
4126
4180
  "aria-haspopup": "menu",
4127
4181
  "aria-expanded": menu.open,
@@ -4135,7 +4189,7 @@ function OverflowMenu({ items, triggerLabel }) {
4135
4189
  "div",
4136
4190
  {
4137
4191
  ref: menu.menuRef,
4138
- class: `${p33}-menu`,
4192
+ class: `${p35}-menu`,
4139
4193
  role: "menu",
4140
4194
  "aria-label": triggerLabel,
4141
4195
  onKeyDown: menu.onMenuKey,
@@ -4145,14 +4199,14 @@ function OverflowMenu({ items, triggerLabel }) {
4145
4199
  "div",
4146
4200
  {
4147
4201
  role: "menuitem",
4148
- class: `${p33}-menu-item ${p33}-menu-item-segmented`,
4202
+ class: `${p35}-menu-item ${p35}-menu-item-segmented`,
4149
4203
  "aria-label": item.label,
4150
4204
  tabIndex: -1,
4151
4205
  onKeyDown: (e) => onSegmentRowKey(e, item),
4152
4206
  children: [
4153
- item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p33}-menu-icon`, children: item.icon }) : null,
4154
- /* @__PURE__ */ jsx8("span", { class: `${p33}-menu-label`, children: item.label }),
4155
- /* @__PURE__ */ jsx8("span", { class: `${p33}-segmented`, role: "group", "aria-label": item.label, children: item.segments.map((seg) => {
4207
+ item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-icon`, children: item.icon }) : null,
4208
+ /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-label`, children: item.label }),
4209
+ /* @__PURE__ */ jsx8("span", { class: `${p35}-segmented`, role: "group", "aria-label": item.label, children: item.segments.map((seg) => {
4156
4210
  const active = seg.value === item.value;
4157
4211
  return /* @__PURE__ */ jsx8(
4158
4212
  "button",
@@ -4160,7 +4214,7 @@ function OverflowMenu({ items, triggerLabel }) {
4160
4214
  type: "button",
4161
4215
  role: "menuitemradio",
4162
4216
  "aria-checked": active,
4163
- class: `${p33}-segment`,
4217
+ class: `${p35}-segment`,
4164
4218
  "data-on": active ? "true" : void 0,
4165
4219
  lang: seg.lang,
4166
4220
  title: seg.value,
@@ -4180,14 +4234,14 @@ function OverflowMenu({ items, triggerLabel }) {
4180
4234
  {
4181
4235
  type: "button",
4182
4236
  role: "menuitem",
4183
- class: `${p33}-menu-item`,
4237
+ class: `${p35}-menu-item`,
4184
4238
  "aria-pressed": item.type === "switch" ? item.on : void 0,
4185
4239
  disabled: item.disabled,
4186
4240
  onClick: () => handleSelect(item),
4187
4241
  children: [
4188
- item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p33}-menu-icon`, children: item.icon }) : null,
4189
- /* @__PURE__ */ jsx8("span", { class: `${p33}-menu-label`, children: item.label }),
4190
- item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${p33}-menu-check`, "aria-hidden": "true", children: /* @__PURE__ */ jsx8(CheckIcon, {}) }) : null
4242
+ item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-icon`, children: item.icon }) : null,
4243
+ /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-label`, children: item.label }),
4244
+ item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-check`, "aria-hidden": "true", children: /* @__PURE__ */ jsx8(CheckIcon, {}) }) : null
4191
4245
  ]
4192
4246
  },
4193
4247
  item.id
@@ -4339,7 +4393,7 @@ function HeaderActions({ panelProps, variant }) {
4339
4393
 
4340
4394
  // src/ui/message-list.tsx
4341
4395
  import { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState6 } from "preact/hooks";
4342
- import { useComputed as useComputed5 } from "@preact/signals";
4396
+ import { useComputed as useComputed6 } from "@preact/signals";
4343
4397
 
4344
4398
  // src/ui/form/dynamic-form.tsx
4345
4399
  import { useState as useState5 } from "preact/hooks";
@@ -4727,7 +4781,7 @@ function FormDoneMarker({
4727
4781
  }
4728
4782
 
4729
4783
  // src/ui/message-bubble.tsx
4730
- import { useComputed as useComputed4 } from "@preact/signals";
4784
+ import { useComputed as useComputed5 } from "@preact/signals";
4731
4785
 
4732
4786
  // src/ui/markdown.tsx
4733
4787
  import { useLayoutEffect, useMemo, useRef as useRef4 } from "preact/hooks";
@@ -4800,10 +4854,27 @@ function hardenLink(a) {
4800
4854
  a.rel = [...tokens].join(" ");
4801
4855
  }
4802
4856
 
4857
+ // src/ui/source-view.tsx
4858
+ import { jsx as jsx13, jsxs as jsxs10 } from "preact/jsx-runtime";
4859
+ var p12 = BRAND.cssPrefix;
4860
+ function SourceView({ part, strings }) {
4861
+ const label = part.title || part.filename || part.url || strings.sources;
4862
+ if (part.url) {
4863
+ return /* @__PURE__ */ jsxs10("a", { class: `${p12}-source`, href: part.url, target: "_blank", rel: "noreferrer noopener", "data-testid": TID.source, children: [
4864
+ /* @__PURE__ */ jsx13("span", { class: `${p12}-source-icon`, "aria-hidden": "true", children: "\u{1F517}" }),
4865
+ /* @__PURE__ */ jsx13("span", { class: `${p12}-source-label`, children: label })
4866
+ ] });
4867
+ }
4868
+ return /* @__PURE__ */ jsxs10("span", { class: `${p12}-source`, "data-testid": TID.source, children: [
4869
+ /* @__PURE__ */ jsx13("span", { class: `${p12}-source-icon`, "aria-hidden": "true", children: "\u{1F4C4}" }),
4870
+ /* @__PURE__ */ jsx13("span", { class: `${p12}-source-label`, children: label })
4871
+ ] });
4872
+ }
4873
+
4803
4874
  // src/ui/tool-approval.tsx
4804
4875
  import { useComputed as useComputed2, useSignal } from "@preact/signals";
4805
- import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs10 } from "preact/jsx-runtime";
4806
- var p12 = BRAND.cssPrefix;
4876
+ import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs11 } from "preact/jsx-runtime";
4877
+ var p13 = BRAND.cssPrefix;
4807
4878
  function displayToolName(toolName) {
4808
4879
  return (toolName.startsWith("tool:") ? toolName.slice(5) : toolName).replace(/[-_]+/g, " ");
4809
4880
  }
@@ -4814,24 +4885,24 @@ function ToolApproval({ part, strings, active, onDecision }) {
4814
4885
  const decided = approval.value?.approved !== void 0;
4815
4886
  if (decided) {
4816
4887
  const ap = approval.value;
4817
- return /* @__PURE__ */ jsxs10("div", { class: `${p12}-tool-approval ${p12}-tool-decided`, "data-testid": TID.toolDecision, children: [
4818
- /* @__PURE__ */ jsx13("span", { class: `${p12}-tool-decided-label`, "data-approved": ap?.approved ? "true" : "false", children: ap?.approved ? strings.approved : strings.rejected }),
4819
- /* @__PURE__ */ jsx13("strong", { class: `${p12}-tool-title`, children: displayToolName(part.toolName) }),
4820
- ap?.reason ? /* @__PURE__ */ jsx13("span", { class: `${p12}-tool-decided-value`, children: ap.reason }) : null
4888
+ return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-approval ${p13}-tool-decided`, "data-testid": TID.toolDecision, children: [
4889
+ /* @__PURE__ */ jsx14("span", { class: `${p13}-tool-decided-label`, "data-approved": ap?.approved ? "true" : "false", children: ap?.approved ? strings.approved : strings.rejected }),
4890
+ /* @__PURE__ */ jsx14("strong", { class: `${p13}-tool-title`, children: displayToolName(part.toolName) }),
4891
+ ap?.reason ? /* @__PURE__ */ jsx14("span", { class: `${p13}-tool-decided-value`, children: ap.reason }) : null
4821
4892
  ] });
4822
4893
  }
4823
4894
  const args = summarizeInput(input.value);
4824
- return /* @__PURE__ */ jsxs10("div", { class: `${p12}-tool-approval`, "data-testid": TID.toolApproval, children: [
4825
- /* @__PURE__ */ jsxs10("div", { class: `${p12}-tool-head`, children: [
4826
- /* @__PURE__ */ jsx13("span", { class: `${p12}-tool-badge`, children: strings.approvalRequired }),
4827
- /* @__PURE__ */ jsx13("strong", { class: `${p12}-tool-title`, children: displayToolName(part.toolName) })
4895
+ return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-approval`, "data-testid": TID.toolApproval, children: [
4896
+ /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-head`, children: [
4897
+ /* @__PURE__ */ jsx14("span", { class: `${p13}-tool-badge`, children: strings.approvalRequired }),
4898
+ /* @__PURE__ */ jsx14("strong", { class: `${p13}-tool-title`, children: displayToolName(part.toolName) })
4828
4899
  ] }),
4829
- args ? /* @__PURE__ */ jsx13("pre", { class: `${p12}-tool-args`, children: args }) : null,
4830
- active ? /* @__PURE__ */ jsxs10(Fragment2, { children: [
4831
- /* @__PURE__ */ jsx13(
4900
+ args ? /* @__PURE__ */ jsx14("pre", { class: `${p13}-tool-args`, children: args }) : null,
4901
+ active ? /* @__PURE__ */ jsxs11(Fragment2, { children: [
4902
+ /* @__PURE__ */ jsx14(
4832
4903
  "input",
4833
4904
  {
4834
- class: `${p12}-field-input`,
4905
+ class: `${p13}-field-input`,
4835
4906
  value: reason.value,
4836
4907
  placeholder: strings.approvalReason,
4837
4908
  onInput: (e) => {
@@ -4839,29 +4910,29 @@ function ToolApproval({ part, strings, active, onDecision }) {
4839
4910
  }
4840
4911
  }
4841
4912
  ),
4842
- /* @__PURE__ */ jsxs10("div", { class: `${p12}-form-actions`, children: [
4843
- /* @__PURE__ */ jsx13(
4913
+ /* @__PURE__ */ jsxs11("div", { class: `${p13}-form-actions`, children: [
4914
+ /* @__PURE__ */ jsx14(
4844
4915
  "button",
4845
4916
  {
4846
4917
  type: "button",
4847
- class: `${p12}-tool-reject`,
4918
+ class: `${p13}-tool-reject`,
4848
4919
  onClick: () => onDecision(part.toolCallId, false, reason.value.trim() || void 0),
4849
4920
  "data-testid": TID.toolReject,
4850
4921
  children: strings.reject
4851
4922
  }
4852
4923
  ),
4853
- /* @__PURE__ */ jsx13(
4924
+ /* @__PURE__ */ jsx14(
4854
4925
  "button",
4855
4926
  {
4856
4927
  type: "button",
4857
- class: `${p12}-tool-approve`,
4928
+ class: `${p13}-tool-approve`,
4858
4929
  onClick: () => onDecision(part.toolCallId, true, reason.value.trim() || void 0),
4859
4930
  "data-testid": TID.toolApprove,
4860
4931
  children: strings.approve
4861
4932
  }
4862
4933
  )
4863
4934
  ] })
4864
- ] }) : /* @__PURE__ */ jsx13("p", { class: `${p12}-tool-stale-note`, children: strings.stepNoLongerActive })
4935
+ ] }) : /* @__PURE__ */ jsx14("p", { class: `${p13}-tool-stale-note`, children: strings.stepNoLongerActive })
4865
4936
  ] });
4866
4937
  }
4867
4938
  function summarizeInput(input) {
@@ -4932,13 +5003,13 @@ function num(v) {
4932
5003
  }
4933
5004
 
4934
5005
  // src/ui/tool-ask-input.tsx
4935
- import { jsx as jsx14, jsxs as jsxs11 } from "preact/jsx-runtime";
4936
- var p13 = BRAND.cssPrefix;
5006
+ import { jsx as jsx15, jsxs as jsxs12 } from "preact/jsx-runtime";
5007
+ var p14 = BRAND.cssPrefix;
4937
5008
  function ToolAskInput({ part, strings, active, onSubmit, onDecision }) {
4938
5009
  const state = useComputed3(() => part.stateSig.value);
4939
5010
  const approval = useComputed3(() => part.approvalSig.value);
4940
5011
  const request = useComputed3(() => parseAskUserInput(part.inputSig.value));
4941
- const decided = state.value === "output" || state.value === "error" || approval.value?.approved !== void 0;
5012
+ const decided = state.value === "output-available" || state.value === "output-error" || state.value === "output-denied" || state.value === "approval-responded" || approval.value?.approved !== void 0;
4942
5013
  const viaApproval = approval.value !== void 0;
4943
5014
  const resolve = (answer, accepted) => {
4944
5015
  if (viaApproval) onDecision(part.toolCallId, accepted, answer);
@@ -4946,42 +5017,42 @@ function ToolAskInput({ part, strings, active, onSubmit, onDecision }) {
4946
5017
  else onSubmit(part.toolCallId, accepted ? { answer } : {});
4947
5018
  };
4948
5019
  if (decided) {
4949
- return /* @__PURE__ */ jsx14(DecidedSummary, { part, strings });
5020
+ return /* @__PURE__ */ jsx15(DecidedSummary, { part, strings });
4950
5021
  }
4951
5022
  if (!active) {
4952
- return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-ask-input ${p13}-tool-stale`, "data-testid": TID.toolAskInput, children: [
4953
- /* @__PURE__ */ jsx14(Header, { strings, title: request.value.title ?? request.value.question }),
4954
- /* @__PURE__ */ jsx14("p", { class: `${p13}-tool-stale-note`, children: strings.stepNoLongerActive })
5023
+ return /* @__PURE__ */ jsxs12("div", { class: `${p14}-tool-ask-input ${p14}-tool-stale`, "data-testid": TID.toolAskInput, children: [
5024
+ /* @__PURE__ */ jsx15(Header, { strings, title: request.value.title ?? request.value.question }),
5025
+ /* @__PURE__ */ jsx15("p", { class: `${p14}-tool-stale-note`, children: strings.stepNoLongerActive })
4955
5026
  ] });
4956
5027
  }
4957
5028
  const req = request.value;
4958
5029
  const isConfirmation = req.responseType === "confirmation";
4959
- return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-ask-input`, "data-testid": TID.toolAskInput, children: [
4960
- /* @__PURE__ */ jsx14(Header, { strings, title: req.title }),
4961
- req.description ? /* @__PURE__ */ jsx14("p", { class: `${p13}-tool-desc`, children: req.description }) : null,
4962
- isConfirmation ? /* @__PURE__ */ jsx14("p", { class: `${p13}-tool-question`, children: req.question }) : null,
4963
- isConfirmation ? /* @__PURE__ */ jsxs11("div", { class: `${p13}-form-actions`, children: [
4964
- /* @__PURE__ */ jsx14(
5030
+ return /* @__PURE__ */ jsxs12("div", { class: `${p14}-tool-ask-input`, "data-testid": TID.toolAskInput, children: [
5031
+ /* @__PURE__ */ jsx15(Header, { strings, title: req.title }),
5032
+ req.description ? /* @__PURE__ */ jsx15("p", { class: `${p14}-tool-desc`, children: req.description }) : null,
5033
+ isConfirmation ? /* @__PURE__ */ jsx15("p", { class: `${p14}-tool-question`, children: req.question }) : null,
5034
+ isConfirmation ? /* @__PURE__ */ jsxs12("div", { class: `${p14}-form-actions`, children: [
5035
+ /* @__PURE__ */ jsx15(
4965
5036
  "button",
4966
5037
  {
4967
5038
  type: "button",
4968
- class: `${p13}-form-skip`,
5039
+ class: `${p14}-form-skip`,
4969
5040
  onClick: () => resolve(void 0, false),
4970
5041
  "data-testid": TID.toolInputSkip,
4971
5042
  children: strings.reject
4972
5043
  }
4973
5044
  ),
4974
- /* @__PURE__ */ jsx14(
5045
+ /* @__PURE__ */ jsx15(
4975
5046
  "button",
4976
5047
  {
4977
5048
  type: "button",
4978
- class: `${p13}-form-submit`,
5049
+ class: `${p14}-form-submit`,
4979
5050
  onClick: () => resolve(void 0, true),
4980
5051
  "data-testid": TID.toolInputSubmit,
4981
5052
  children: strings.approve
4982
5053
  }
4983
5054
  )
4984
- ] }) : /* @__PURE__ */ jsx14(
5055
+ ] }) : /* @__PURE__ */ jsx15(
4985
5056
  DynamicForm,
4986
5057
  {
4987
5058
  fields: askInputToFields(req),
@@ -4997,9 +5068,9 @@ function ToolAskInput({ part, strings, active, onSubmit, onDecision }) {
4997
5068
  ] });
4998
5069
  }
4999
5070
  function Header({ strings, title }) {
5000
- return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-head`, children: [
5001
- /* @__PURE__ */ jsx14("span", { class: `${p13}-tool-badge`, children: strings.inputRequired }),
5002
- title ? /* @__PURE__ */ jsx14("strong", { class: `${p13}-tool-title`, children: title }) : null
5071
+ return /* @__PURE__ */ jsxs12("div", { class: `${p14}-tool-head`, children: [
5072
+ /* @__PURE__ */ jsx15("span", { class: `${p14}-tool-badge`, children: strings.inputRequired }),
5073
+ title ? /* @__PURE__ */ jsx15("strong", { class: `${p14}-tool-title`, children: title }) : null
5003
5074
  ] });
5004
5075
  }
5005
5076
  function DecidedSummary({ part, strings }) {
@@ -5007,9 +5078,9 @@ function DecidedSummary({ part, strings }) {
5007
5078
  const approval = useComputed3(() => part.approvalSig.value);
5008
5079
  const answer = approval.value?.approved !== void 0 ? approval.value.reason ?? "" : summarizeOutput(output.value);
5009
5080
  const skipped = approval.value?.approved === false;
5010
- return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-ask-input ${p13}-tool-decided`, "data-testid": TID.toolDecision, children: [
5011
- /* @__PURE__ */ jsx14("span", { class: `${p13}-tool-decided-label`, children: skipped ? strings.inputSkip : strings.inputSubmitted }),
5012
- /* @__PURE__ */ jsx14("span", { class: `${p13}-tool-decided-value`, children: skipped ? "" : answer || strings.inputSubmitted })
5081
+ return /* @__PURE__ */ jsxs12("div", { class: `${p14}-tool-ask-input ${p14}-tool-decided`, "data-testid": TID.toolDecision, children: [
5082
+ /* @__PURE__ */ jsx15("span", { class: `${p14}-tool-decided-label`, children: skipped ? strings.inputSkip : strings.inputSubmitted }),
5083
+ /* @__PURE__ */ jsx15("span", { class: `${p14}-tool-decided-value`, children: skipped ? "" : answer || strings.inputSubmitted })
5013
5084
  ] });
5014
5085
  }
5015
5086
  function summarizeOutput(output) {
@@ -5023,37 +5094,70 @@ function summarizeOutput(output) {
5023
5094
  return String(output);
5024
5095
  }
5025
5096
 
5026
- // src/ui/tool-chip.tsx
5027
- import { jsx as jsx15, jsxs as jsxs12 } from "preact/jsx-runtime";
5028
- function ToolChip({ part, strings }) {
5029
- const p33 = BRAND.cssPrefix;
5030
- return /* @__PURE__ */ jsxs12("span", { class: `${p33}-tool-chip`, role: "status", children: [
5031
- /* @__PURE__ */ jsxs12("span", { children: [
5032
- strings.usedTool,
5033
- ":"
5097
+ // src/ui/tool-call.tsx
5098
+ import { useComputed as useComputed4 } from "@preact/signals";
5099
+ import { jsx as jsx16, jsxs as jsxs13 } from "preact/jsx-runtime";
5100
+ var p15 = BRAND.cssPrefix;
5101
+ function displayToolName2(toolName) {
5102
+ return (toolName.startsWith("tool:") ? toolName.slice(5) : toolName).replace(/[-_]+/g, " ").trim();
5103
+ }
5104
+ function ToolCall({ part, strings }) {
5105
+ const details = useComputed4(() => pretty(part.inputSig.value));
5106
+ const result = useComputed4(() => part.errorSig.value ?? pretty(unwrapResult(part.outputSig.value)));
5107
+ const isError = useComputed4(() => !!part.errorSig.value);
5108
+ if (!details.value && !result.value) return null;
5109
+ return /* @__PURE__ */ jsxs13("details", { class: `${p15}-tool-call`, "data-testid": TID.toolCall, children: [
5110
+ /* @__PURE__ */ jsxs13("summary", { class: `${p15}-tool-call-summary`, children: [
5111
+ /* @__PURE__ */ jsx16("span", { class: `${p15}-tool-badge`, children: strings.usedTool }),
5112
+ /* @__PURE__ */ jsx16("strong", { class: `${p15}-tool-title`, children: displayToolName2(part.toolName) })
5034
5113
  ] }),
5035
- /* @__PURE__ */ jsx15("strong", { children: part.toolName })
5114
+ details.value ? /* @__PURE__ */ jsxs13("div", { class: `${p15}-tool-call-section`, children: [
5115
+ /* @__PURE__ */ jsx16("span", { class: `${p15}-tool-call-label`, children: strings.toolDetails }),
5116
+ /* @__PURE__ */ jsx16("pre", { class: `${p15}-tool-args`, children: details.value })
5117
+ ] }) : null,
5118
+ result.value ? /* @__PURE__ */ jsxs13("div", { class: `${p15}-tool-call-section`, "data-error": isError.value ? "true" : void 0, children: [
5119
+ /* @__PURE__ */ jsx16("span", { class: `${p15}-tool-call-label`, children: strings.toolResult }),
5120
+ /* @__PURE__ */ jsx16("pre", { class: `${p15}-tool-args`, children: result.value })
5121
+ ] }) : null
5036
5122
  ] });
5037
5123
  }
5124
+ function unwrapResult(output) {
5125
+ if (output && typeof output === "object") {
5126
+ const rec = output;
5127
+ if (rec.storage === "tool-result-ref" && "summary" in rec) return rec.summary;
5128
+ }
5129
+ return output;
5130
+ }
5131
+ function pretty(value) {
5132
+ if (value == null) return "";
5133
+ try {
5134
+ const json = typeof value === "string" ? value : JSON.stringify(value, null, 2);
5135
+ if (!json || json === "{}" || json === "[]" || json === '""') return "";
5136
+ return json.length > 600 ? `${json.slice(0, 600)}\u2026` : json;
5137
+ } catch {
5138
+ return "";
5139
+ }
5140
+ }
5038
5141
 
5039
5142
  // src/ui/message-bubble.tsx
5040
- import { jsx as jsx16, jsxs as jsxs13 } from "preact/jsx-runtime";
5041
- var p14 = BRAND.cssPrefix;
5143
+ import { jsx as jsx17, jsxs as jsxs14 } from "preact/jsx-runtime";
5144
+ var p16 = BRAND.cssPrefix;
5042
5145
  function MessageBubble({
5043
5146
  message,
5044
5147
  strings,
5045
5148
  responseMode,
5046
5149
  showReasoning,
5047
5150
  showToolCalls,
5151
+ showSources,
5048
5152
  interactive = false,
5049
5153
  tool
5050
5154
  }) {
5051
- const parts = useComputed4(() => message.partsSig.value);
5155
+ const parts = useComputed5(() => message.partsSig.value);
5052
5156
  const partList = parts.value;
5053
- const hasAnswerText = useComputed4(
5157
+ const hasAnswerText = useComputed5(
5054
5158
  () => message.partsSig.value.some((part) => part.kind === "text" && part.textSig.value.length > 0)
5055
5159
  );
5056
- const reasoningVisible = useComputed4(
5160
+ const reasoningVisible = useComputed5(
5057
5161
  () => showReasoning && message.partsSig.value.some((part) => part.kind === "reasoning")
5058
5162
  );
5059
5163
  const streaming = message.role === "assistant" && message.status === "streaming";
@@ -5061,9 +5165,9 @@ function MessageBubble({
5061
5165
  const working = streaming && !hasAnswerText.value;
5062
5166
  const showStreamDots = streaming && !bufferedHold && !(reasoningVisible.value && working);
5063
5167
  const stamp = formatStamp(message.createdAt);
5064
- 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: [
5065
- /* @__PURE__ */ jsxs13("div", { class: `${p14}-bubble`, children: [
5066
- bufferedHold ? /* @__PURE__ */ jsx16(LoadingSpinner, { label: strings.loading }) : partList.map((part) => /* @__PURE__ */ jsx16(
5168
+ 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: [
5169
+ /* @__PURE__ */ jsxs14("div", { class: `${p16}-bubble`, children: [
5170
+ bufferedHold ? /* @__PURE__ */ jsx17(LoadingSpinner, { label: strings.loading }) : partList.map((part) => /* @__PURE__ */ jsx17(
5067
5171
  PartView,
5068
5172
  {
5069
5173
  part,
@@ -5071,15 +5175,16 @@ function MessageBubble({
5071
5175
  strings,
5072
5176
  showReasoning,
5073
5177
  showToolCalls,
5178
+ showSources,
5074
5179
  interactive,
5075
5180
  tool
5076
5181
  },
5077
5182
  partKey(part)
5078
5183
  )),
5079
- showStreamDots && /* @__PURE__ */ jsx16(TypingDots, {}),
5080
- message.status === "error" && message.errorText ? /* @__PURE__ */ jsx16("div", { class: `${p14}-error`, role: "alert", children: /* @__PURE__ */ jsx16("span", { children: message.errorText }) }) : null
5184
+ showStreamDots && /* @__PURE__ */ jsx17(TypingDots, {}),
5185
+ message.status === "error" && message.errorText ? /* @__PURE__ */ jsx17("div", { class: `${p16}-error`, role: "alert", children: /* @__PURE__ */ jsx17("span", { children: message.errorText }) }) : null
5081
5186
  ] }),
5082
- stamp ? /* @__PURE__ */ jsx16("time", { class: `${p14}-bubble-time`, dateTime: stamp.iso, title: stamp.full, children: stamp.short }) : null
5187
+ stamp ? /* @__PURE__ */ jsx17("time", { class: `${p16}-bubble-time`, dateTime: stamp.iso, title: stamp.full, children: stamp.short }) : null
5083
5188
  ] }) });
5084
5189
  }
5085
5190
  function formatStamp(createdAt) {
@@ -5101,16 +5206,17 @@ function PartView({
5101
5206
  strings,
5102
5207
  showReasoning,
5103
5208
  showToolCalls,
5209
+ showSources,
5104
5210
  interactive,
5105
5211
  tool
5106
5212
  }) {
5107
5213
  switch (part.kind) {
5108
5214
  case "text":
5109
- return /* @__PURE__ */ jsx16(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig });
5215
+ return /* @__PURE__ */ jsx17(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig });
5110
5216
  case "reasoning":
5111
- return showReasoning ? /* @__PURE__ */ jsx16(ReasoningView, { part, active, strings }) : null;
5217
+ return showReasoning ? /* @__PURE__ */ jsx17(ReasoningView, { part, active, strings }) : null;
5112
5218
  case "tool":
5113
- return /* @__PURE__ */ jsx16(
5219
+ return /* @__PURE__ */ jsx17(
5114
5220
  ToolPartView,
5115
5221
  {
5116
5222
  part,
@@ -5122,11 +5228,11 @@ function PartView({
5122
5228
  );
5123
5229
  case "file":
5124
5230
  if (part.mediaType.startsWith("image/")) {
5125
- return /* @__PURE__ */ jsx16("img", { src: part.url, alt: "", loading: "lazy" });
5231
+ return /* @__PURE__ */ jsx17("img", { src: part.url, alt: "", loading: "lazy" });
5126
5232
  }
5127
- return /* @__PURE__ */ jsx16("a", { href: part.url, target: "_blank", rel: "noreferrer noopener", children: part.url });
5233
+ return /* @__PURE__ */ jsx17("a", { href: part.url, target: "_blank", rel: "noreferrer noopener", children: part.url });
5128
5234
  case "source":
5129
- return null;
5235
+ return showSources ? /* @__PURE__ */ jsx17(SourceView, { part, strings }) : null;
5130
5236
  }
5131
5237
  }
5132
5238
  function ToolPartView({
@@ -5136,11 +5242,10 @@ function ToolPartView({
5136
5242
  interactive,
5137
5243
  tool
5138
5244
  }) {
5139
- const state = useComputed4(() => part.stateSig.value);
5140
- const hasApproval = useComputed4(() => part.approvalSig.value !== void 0);
5245
+ const hasApproval = useComputed5(() => part.approvalSig.value !== void 0);
5141
5246
  if (tool?.humanInLoop) {
5142
- if (isAskUserInputTool(part.toolName) || state.value === "awaiting-input") {
5143
- return /* @__PURE__ */ jsx16(
5247
+ if (isAskUserInputTool(part.toolName)) {
5248
+ return /* @__PURE__ */ jsx17(
5144
5249
  ToolAskInput,
5145
5250
  {
5146
5251
  part,
@@ -5151,20 +5256,20 @@ function ToolPartView({
5151
5256
  }
5152
5257
  );
5153
5258
  }
5154
- if (hasApproval.value || state.value === "awaiting-approval") {
5155
- return /* @__PURE__ */ jsx16(ToolApproval, { part, strings, active: interactive, onDecision: tool.onDecision });
5259
+ if (hasApproval.value) {
5260
+ return /* @__PURE__ */ jsx17(ToolApproval, { part, strings, active: interactive, onDecision: tool.onDecision });
5156
5261
  }
5157
5262
  }
5158
- return showToolCalls ? /* @__PURE__ */ jsx16(ToolChip, { part, strings }) : null;
5263
+ return showToolCalls ? /* @__PURE__ */ jsx17(ToolCall, { part, strings }) : null;
5159
5264
  }
5160
5265
  function ReasoningView({
5161
5266
  part,
5162
5267
  active,
5163
5268
  strings
5164
5269
  }) {
5165
- return /* @__PURE__ */ jsxs13("details", { class: `${p14}-reasoning`, open: active, "data-active": active ? "true" : void 0, children: [
5166
- /* @__PURE__ */ jsx16("summary", { class: `${p14}-reasoning-summary`, children: /* @__PURE__ */ jsx16("span", { class: `${p14}-reasoning-label`, children: active ? strings.thinking : strings.thoughts }) }),
5167
- /* @__PURE__ */ jsx16("div", { class: `${p14}-reasoning-body`, children: /* @__PURE__ */ jsx16(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig }) })
5270
+ return /* @__PURE__ */ jsxs14("details", { class: `${p16}-reasoning`, open: active, "data-active": active ? "true" : void 0, children: [
5271
+ /* @__PURE__ */ jsx17("summary", { class: `${p16}-reasoning-summary`, children: /* @__PURE__ */ jsx17("span", { class: `${p16}-reasoning-label`, children: active ? strings.thinking : strings.thoughts }) }),
5272
+ /* @__PURE__ */ jsx17("div", { class: `${p16}-reasoning-body`, children: /* @__PURE__ */ jsx17(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig }) })
5168
5273
  ] });
5169
5274
  }
5170
5275
  function partKey(part) {
@@ -5181,22 +5286,22 @@ function partKey(part) {
5181
5286
  }
5182
5287
  }
5183
5288
  function TypingDots() {
5184
- return /* @__PURE__ */ jsxs13("span", { class: `${p14}-typing`, "aria-hidden": "true", children: [
5185
- /* @__PURE__ */ jsx16("span", {}),
5186
- /* @__PURE__ */ jsx16("span", {}),
5187
- /* @__PURE__ */ jsx16("span", {})
5289
+ return /* @__PURE__ */ jsxs14("span", { class: `${p16}-typing`, "aria-hidden": "true", children: [
5290
+ /* @__PURE__ */ jsx17("span", {}),
5291
+ /* @__PURE__ */ jsx17("span", {}),
5292
+ /* @__PURE__ */ jsx17("span", {})
5188
5293
  ] });
5189
5294
  }
5190
5295
  function LoadingSpinner({ label }) {
5191
- return /* @__PURE__ */ jsxs13("span", { class: `${p14}-loading`, role: "status", children: [
5192
- /* @__PURE__ */ jsx16("span", { class: `${p14}-loading-spinner`, "aria-hidden": "true" }),
5193
- /* @__PURE__ */ jsx16("span", { class: `${p14}-loading-label`, children: label })
5296
+ return /* @__PURE__ */ jsxs14("span", { class: `${p16}-loading`, role: "status", children: [
5297
+ /* @__PURE__ */ jsx17("span", { class: `${p16}-loading-spinner`, "aria-hidden": "true" }),
5298
+ /* @__PURE__ */ jsx17("span", { class: `${p16}-loading-label`, children: label })
5194
5299
  ] });
5195
5300
  }
5196
5301
 
5197
5302
  // src/ui/message-list.tsx
5198
- import { jsx as jsx17, jsxs as jsxs14 } from "preact/jsx-runtime";
5199
- var p15 = BRAND.cssPrefix;
5303
+ import { jsx as jsx18, jsxs as jsxs15 } from "preact/jsx-runtime";
5304
+ var p17 = BRAND.cssPrefix;
5200
5305
  var STICK_THRESHOLD = 120;
5201
5306
  var INTERACTION_GRACE_MS = 350;
5202
5307
  var DIVIDER_IDLE_MS = 1200;
@@ -5206,6 +5311,7 @@ function MessageList({
5206
5311
  responseMode,
5207
5312
  showReasoning,
5208
5313
  showToolCalls,
5314
+ showSources,
5209
5315
  loading,
5210
5316
  idle,
5211
5317
  tool,
@@ -5214,7 +5320,7 @@ function MessageList({
5214
5320
  onFillForm
5215
5321
  }) {
5216
5322
  const ref = useRef5(null);
5217
- const messages = useComputed5(() => messagesSig.value);
5323
+ const messages = useComputed6(() => messagesSig.value);
5218
5324
  const [showJump, setShowJump] = useState6(false);
5219
5325
  const [scrolling, setScrolling] = useState6(false);
5220
5326
  const hasHydratedRef = useRef5(false);
@@ -5366,7 +5472,7 @@ function MessageList({
5366
5472
  const pendingMarkers = [...formMarkers ?? []].toSorted(
5367
5473
  (a, b) => (a.createdAt ?? Infinity) - (b.createdAt ?? Infinity)
5368
5474
  );
5369
- const markerRow = (marker) => /* @__PURE__ */ jsx17(
5475
+ const markerRow = (marker) => /* @__PURE__ */ jsx18(
5370
5476
  FormDoneMarker,
5371
5477
  {
5372
5478
  marker,
@@ -5387,12 +5493,12 @@ function MessageList({
5387
5493
  const day = dayKey(m.createdAt);
5388
5494
  if (day && day !== prevDay) {
5389
5495
  rows.push(
5390
- /* @__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}`)
5496
+ /* @__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}`)
5391
5497
  );
5392
5498
  prevDay = day;
5393
5499
  }
5394
5500
  rows.push(
5395
- /* @__PURE__ */ jsx17(
5501
+ /* @__PURE__ */ jsx18(
5396
5502
  MessageBubble,
5397
5503
  {
5398
5504
  message: m,
@@ -5400,6 +5506,7 @@ function MessageList({
5400
5506
  responseMode,
5401
5507
  showReasoning,
5402
5508
  showToolCalls,
5509
+ showSources,
5403
5510
  interactive: Boolean(idle) && m.id === lastId,
5404
5511
  tool
5405
5512
  },
@@ -5410,33 +5517,33 @@ function MessageList({
5410
5517
  for (const marker of pendingMarkers) {
5411
5518
  rows.push(markerRow(marker));
5412
5519
  }
5413
- return /* @__PURE__ */ jsxs14("div", { class: `${p15}-list-wrap`, children: [
5414
- /* @__PURE__ */ jsxs14(
5520
+ return /* @__PURE__ */ jsxs15("div", { class: `${p17}-list-wrap`, children: [
5521
+ /* @__PURE__ */ jsxs15(
5415
5522
  "div",
5416
5523
  {
5417
5524
  ref,
5418
- class: `${p15}-list`,
5525
+ class: `${p17}-list`,
5419
5526
  role: "log",
5420
5527
  "aria-live": "polite",
5421
5528
  "aria-relevant": "additions text",
5422
5529
  "data-scrolling": scrolling ? "true" : void 0,
5423
5530
  children: [
5424
- loading && messages.value.length === 0 ? /* @__PURE__ */ jsx17("div", { class: `${p15}-list-loading`, role: "status", children: strings.conversationLoading }) : null,
5531
+ loading && messages.value.length === 0 ? /* @__PURE__ */ jsx18("div", { class: `${p17}-list-loading`, role: "status", children: strings.conversationLoading }) : null,
5425
5532
  rows,
5426
- form ? /* @__PURE__ */ jsx17(FormGate, { form: form.form, strings, onSubmit: form.onSubmit, onSkip: form.onSkip }) : null
5533
+ form ? /* @__PURE__ */ jsx18(FormGate, { form: form.form, strings, onSubmit: form.onSubmit, onSkip: form.onSkip }) : null
5427
5534
  ]
5428
5535
  }
5429
5536
  ),
5430
- showJump ? /* @__PURE__ */ jsx17(
5537
+ showJump ? /* @__PURE__ */ jsx18(
5431
5538
  "button",
5432
5539
  {
5433
5540
  type: "button",
5434
- class: `${p15}-jump`,
5541
+ class: `${p17}-jump`,
5435
5542
  onClick: jumpToBottom,
5436
5543
  "aria-label": strings.scrollToBottom,
5437
5544
  title: strings.scrollToBottom,
5438
5545
  "data-testid": TID.scrollToBottom,
5439
- children: /* @__PURE__ */ jsx17(ChevronDownIcon, {})
5546
+ children: /* @__PURE__ */ jsx18(ChevronDownIcon, {})
5440
5547
  }
5441
5548
  ) : null
5442
5549
  ] });
@@ -5495,8 +5602,10 @@ function startOfDay(ms) {
5495
5602
  }
5496
5603
 
5497
5604
  // src/ui/conversation-list.tsx
5498
- import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs15 } from "preact/jsx-runtime";
5605
+ import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs16 } from "preact/jsx-runtime";
5499
5606
  var log12 = logger.scope("history");
5607
+ var DEFAULT_SKELETON_ROWS = 3;
5608
+ var MAX_SKELETON_ROWS = 6;
5500
5609
  var BUCKET_TO_STRING = {
5501
5610
  today: "dateToday",
5502
5611
  yesterday: "dateYesterday",
@@ -5515,11 +5624,12 @@ function ConversationList({
5515
5624
  transport,
5516
5625
  strings,
5517
5626
  locale,
5627
+ persistence,
5518
5628
  visitorId,
5519
5629
  onSelect,
5520
5630
  onNewConversation
5521
5631
  }) {
5522
- const p33 = BRAND.cssPrefix;
5632
+ const p35 = BRAND.cssPrefix;
5523
5633
  const seed = transport.peekConversations({ visitorId });
5524
5634
  const [state, setState] = useState7(seed ? "loaded" : "loading");
5525
5635
  const [conversations, setChats] = useState7(seed?.conversations ?? []);
@@ -5527,8 +5637,10 @@ function ConversationList({
5527
5637
  let cancelled = false;
5528
5638
  transport.listConversations({ visitorId }).then((res) => {
5529
5639
  if (cancelled) return;
5530
- setChats(res.conversations ?? []);
5640
+ const rows = res.conversations ?? [];
5641
+ setChats(rows);
5531
5642
  setState("loaded");
5643
+ persistence.saveHistoryCount(rows.length);
5532
5644
  }).catch((err) => {
5533
5645
  if (cancelled) return;
5534
5646
  log12.warn("listConversations failed", { err });
@@ -5537,29 +5649,33 @@ function ConversationList({
5537
5649
  return () => {
5538
5650
  cancelled = true;
5539
5651
  };
5540
- }, [transport, visitorId]);
5541
- const newChatButton = onNewConversation ? /* @__PURE__ */ jsx18("div", { class: `${p33}-history-footer`, children: /* @__PURE__ */ jsxs15(
5652
+ }, [transport, visitorId, persistence]);
5653
+ const newChatButton = onNewConversation ? /* @__PURE__ */ jsx19("div", { class: `${p35}-history-footer`, children: /* @__PURE__ */ jsxs16(
5542
5654
  "button",
5543
5655
  {
5544
5656
  type: "button",
5545
- class: `${p33}-history-new`,
5657
+ class: `${p35}-history-new`,
5546
5658
  onClick: onNewConversation,
5547
5659
  "data-testid": TID.sidebarNewConversation,
5548
5660
  children: [
5549
- /* @__PURE__ */ jsx18(PlusIcon, {}),
5661
+ /* @__PURE__ */ jsx19(PlusIcon, {}),
5550
5662
  strings.newConversation
5551
5663
  ]
5552
5664
  }
5553
5665
  ) }) : null;
5554
5666
  if (state === "loading") {
5555
- return /* @__PURE__ */ jsxs15(Fragment3, { children: [
5556
- /* @__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: [
5557
- /* @__PURE__ */ jsx18("div", { class: `${p33}-history-heading`, children: /* @__PURE__ */ jsx18("span", { class: `${p33}-history-skeleton-line ${p33}-skeleton-heading` }) }),
5558
- /* @__PURE__ */ jsx18("div", { class: `${p33}-history-card`, children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs15("div", { class: `${p33}-history-skeleton-item`, children: [
5559
- /* @__PURE__ */ jsx18("span", { class: `${p33}-history-skeleton-avatar` }),
5560
- /* @__PURE__ */ jsxs15("span", { class: `${p33}-history-skeleton-body`, children: [
5561
- /* @__PURE__ */ jsx18("span", { class: `${p33}-history-skeleton-line ${p33}-skeleton-title` }),
5562
- /* @__PURE__ */ jsx18("span", { class: `${p33}-history-skeleton-line ${p33}-skeleton-preview` })
5667
+ const rows = Math.min(persistence.loadHistoryCount() ?? DEFAULT_SKELETON_ROWS, MAX_SKELETON_ROWS);
5668
+ return /* @__PURE__ */ jsxs16(Fragment3, { children: [
5669
+ /* @__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: [
5670
+ /* @__PURE__ */ jsx19("div", { class: `${p35}-history-heading`, children: /* @__PURE__ */ jsx19("span", { class: `${p35}-skeleton ${p35}-skeleton-heading` }) }),
5671
+ /* @__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: [
5672
+ /* @__PURE__ */ jsx19("span", { class: `${p35}-history-avatar ${p35}-skeleton` }),
5673
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-body`, children: [
5674
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-row`, children: [
5675
+ /* @__PURE__ */ jsx19("span", { class: `${p35}-history-title`, children: /* @__PURE__ */ jsx19("span", { class: `${p35}-skeleton ${p35}-skeleton-title` }) }),
5676
+ /* @__PURE__ */ jsx19("span", { class: `${p35}-history-time`, children: /* @__PURE__ */ jsx19("span", { class: `${p35}-skeleton ${p35}-skeleton-time` }) })
5677
+ ] }),
5678
+ /* @__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` }) }) })
5563
5679
  ] })
5564
5680
  ] }, i)) })
5565
5681
  ] }) }),
@@ -5567,36 +5683,36 @@ function ConversationList({
5567
5683
  ] });
5568
5684
  }
5569
5685
  if (state === "error" || conversations.length === 0) {
5570
- return /* @__PURE__ */ jsxs15(Fragment3, { children: [
5571
- /* @__PURE__ */ jsx18("div", { class: `${p33}-history-empty`, children: strings.historyEmpty }),
5686
+ return /* @__PURE__ */ jsxs16(Fragment3, { children: [
5687
+ /* @__PURE__ */ jsx19("div", { class: `${p35}-history-empty`, children: strings.historyEmpty }),
5572
5688
  newChatButton
5573
5689
  ] });
5574
5690
  }
5575
5691
  const now = Date.now();
5576
5692
  const groups = groupByBucket(now, conversations);
5577
- return /* @__PURE__ */ jsxs15(Fragment3, { children: [
5578
- /* @__PURE__ */ jsx18("div", { class: `${p33}-history`, role: "list", children: groups.map((group) => /* @__PURE__ */ jsxs15("div", { class: `${p33}-history-group`, children: [
5579
- /* @__PURE__ */ jsx18("div", { class: `${p33}-history-heading`, children: strings[BUCKET_TO_STRING[group.bucket]] }),
5580
- /* @__PURE__ */ jsx18("div", { class: `${p33}-history-card`, children: group.conversations.map((chat) => /* @__PURE__ */ jsxs15(
5693
+ return /* @__PURE__ */ jsxs16(Fragment3, { children: [
5694
+ /* @__PURE__ */ jsx19("div", { class: `${p35}-history`, role: "list", children: groups.map((group) => /* @__PURE__ */ jsxs16("div", { class: `${p35}-history-group`, children: [
5695
+ /* @__PURE__ */ jsx19("div", { class: `${p35}-history-heading`, children: strings[BUCKET_TO_STRING[group.bucket]] }),
5696
+ /* @__PURE__ */ jsx19("div", { class: `${p35}-history-card`, children: group.conversations.map((chat) => /* @__PURE__ */ jsxs16(
5581
5697
  "button",
5582
5698
  {
5583
5699
  type: "button",
5584
5700
  role: "listitem",
5585
- class: `${p33}-history-item`,
5701
+ class: `${p35}-history-item`,
5586
5702
  onClick: () => onSelect(chat),
5587
5703
  "data-closed": chat.canContinue ? void 0 : "true",
5588
5704
  "data-unread": (chat.unreadCount ?? 0) > 0 ? "true" : void 0,
5589
5705
  "data-testid": tid(TID.historyItem, chat.conversationId),
5590
5706
  children: [
5591
- /* @__PURE__ */ jsx18("span", { class: `${p33}-history-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx18(MessageIcon, {}) }),
5592
- /* @__PURE__ */ jsxs15("span", { class: `${p33}-history-body`, children: [
5593
- /* @__PURE__ */ jsxs15("span", { class: `${p33}-history-row`, children: [
5594
- /* @__PURE__ */ jsx18("span", { class: `${p33}-history-title`, children: chat.title }),
5595
- /* @__PURE__ */ jsx18("span", { class: `${p33}-history-time`, children: rowTime(chat.lastMessageAt, now, locale) })
5707
+ /* @__PURE__ */ jsx19("span", { class: `${p35}-history-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx19(MessageIcon, {}) }),
5708
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-body`, children: [
5709
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-row`, children: [
5710
+ /* @__PURE__ */ jsx19("span", { class: `${p35}-history-title`, children: chat.title }),
5711
+ /* @__PURE__ */ jsx19("span", { class: `${p35}-history-time`, children: rowTime(chat.lastMessageAt, now, locale) })
5596
5712
  ] }),
5597
- /* @__PURE__ */ jsxs15("span", { class: `${p33}-history-row`, children: [
5598
- /* @__PURE__ */ jsx18("span", { class: `${p33}-history-preview`, children: chat.preview ?? (chat.canContinue ? strings.historyContinue : strings.conversationClosed) }),
5599
- (chat.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx18("span", { class: `${p33}-history-dot` }) : null
5713
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-row`, children: [
5714
+ /* @__PURE__ */ jsx19("span", { class: `${p35}-history-preview`, children: chat.preview ?? (chat.canContinue ? strings.historyContinue : strings.conversationClosed) }),
5715
+ (chat.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx19("span", { class: `${p35}-history-dot` }) : null
5600
5716
  ] })
5601
5717
  ] })
5602
5718
  ]
@@ -5609,15 +5725,15 @@ function ConversationList({
5609
5725
  }
5610
5726
 
5611
5727
  // src/ui/suggestions.tsx
5612
- import { jsx as jsx19 } from "preact/jsx-runtime";
5613
- var p16 = BRAND.cssPrefix;
5728
+ import { jsx as jsx20 } from "preact/jsx-runtime";
5729
+ var p18 = BRAND.cssPrefix;
5614
5730
  function Suggestions({ suggestions, onPick }) {
5615
5731
  if (suggestions.length === 0) return null;
5616
- return /* @__PURE__ */ jsx19("div", { class: `${p16}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx19(
5732
+ return /* @__PURE__ */ jsx20("div", { class: `${p18}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx20(
5617
5733
  "button",
5618
5734
  {
5619
5735
  type: "button",
5620
- class: `${p16}-suggestion`,
5736
+ class: `${p18}-suggestion`,
5621
5737
  onClick: () => onPick(s),
5622
5738
  "data-testid": tid(TID.suggestion, i),
5623
5739
  children: s.label
@@ -5627,8 +5743,8 @@ function Suggestions({ suggestions, onPick }) {
5627
5743
  }
5628
5744
 
5629
5745
  // src/ui/panel.tsx
5630
- import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs16 } from "preact/jsx-runtime";
5631
- var p17 = BRAND.cssPrefix;
5746
+ import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs17 } from "preact/jsx-runtime";
5747
+ var p19 = BRAND.cssPrefix;
5632
5748
  function Panel(props2) {
5633
5749
  const { options, onClose } = props2;
5634
5750
  const s = options.strings;
@@ -5652,18 +5768,18 @@ function Panel(props2) {
5652
5768
  }, []);
5653
5769
  const { visible: dragOver } = useFileDrop({ containerRef, onDrop: onDropItems });
5654
5770
  useDragMove(containerRef.current, options.mode === "modal");
5655
- return /* @__PURE__ */ jsxs16(
5771
+ return /* @__PURE__ */ jsxs17(
5656
5772
  "div",
5657
5773
  {
5658
5774
  ref: containerRef,
5659
- class: `${p17}-panel`,
5775
+ class: `${p19}-panel`,
5660
5776
  role: "dialog",
5661
5777
  "aria-modal": "false",
5662
5778
  "aria-label": s.panelTitle,
5663
5779
  style: { position: "relative" },
5664
5780
  "data-testid": TID.panel,
5665
5781
  children: [
5666
- /* @__PURE__ */ jsx20(
5782
+ /* @__PURE__ */ jsx21(
5667
5783
  PanelContent,
5668
5784
  {
5669
5785
  ...props2,
@@ -5672,7 +5788,7 @@ function Panel(props2) {
5672
5788
  composerAttachApiRef
5673
5789
  }
5674
5790
  ),
5675
- /* @__PURE__ */ jsx20(PoweredByBar, { poweredBy: props2.options.poweredBy })
5791
+ /* @__PURE__ */ jsx21(PoweredByBar, { poweredBy: props2.options.poweredBy })
5676
5792
  ]
5677
5793
  }
5678
5794
  );
@@ -5683,6 +5799,7 @@ function PanelContent(props2) {
5683
5799
  transport,
5684
5800
  feedback,
5685
5801
  bus,
5802
+ persistence,
5686
5803
  panelSize,
5687
5804
  view,
5688
5805
  canSend,
@@ -5718,9 +5835,9 @@ function PanelContent(props2) {
5718
5835
  if (activeForm) {
5719
5836
  composerArea = null;
5720
5837
  } else if (canSend) {
5721
- composerArea = /* @__PURE__ */ jsxs16(Fragment4, { children: [
5722
- /* @__PURE__ */ jsx20(Suggestions, { suggestions, onPick: onSuggestion }),
5723
- /* @__PURE__ */ jsx20(
5838
+ composerArea = /* @__PURE__ */ jsxs17(Fragment4, { children: [
5839
+ /* @__PURE__ */ jsx21(Suggestions, { suggestions, onPick: onSuggestion }),
5840
+ /* @__PURE__ */ jsx21(
5724
5841
  Composer,
5725
5842
  {
5726
5843
  options,
@@ -5735,10 +5852,10 @@ function PanelContent(props2) {
5735
5852
  )
5736
5853
  ] });
5737
5854
  } else {
5738
- composerArea = /* @__PURE__ */ jsx20(ReadOnlyBanner, { label: s.conversationClosed, ctaLabel: s.startNewConversation, onNewConversation: onClear });
5855
+ composerArea = /* @__PURE__ */ jsx21(ReadOnlyBanner, { label: s.conversationClosed, ctaLabel: s.startNewConversation, onNewConversation: onClear });
5739
5856
  }
5740
- return /* @__PURE__ */ jsxs16(Fragment4, { children: [
5741
- view === "history" ? /* @__PURE__ */ jsx20(
5857
+ return /* @__PURE__ */ jsxs17(Fragment4, { children: [
5858
+ view === "history" ? /* @__PURE__ */ jsx21(
5742
5859
  HistoryHeader,
5743
5860
  {
5744
5861
  strings: s,
@@ -5746,34 +5863,35 @@ function PanelContent(props2) {
5746
5863
  onClose,
5747
5864
  showClose: canShowClose(options.mode, panelSize, options.actions)
5748
5865
  }
5749
- ) : /* @__PURE__ */ jsxs16("header", { class: `${p17}-header`, "data-testid": TID.panelHeader, children: [
5750
- onBack ? /* @__PURE__ */ jsx20(
5866
+ ) : /* @__PURE__ */ jsxs17("header", { class: `${p19}-header`, "data-testid": TID.panelHeader, children: [
5867
+ onBack ? /* @__PURE__ */ jsx21(
5751
5868
  "button",
5752
5869
  {
5753
5870
  type: "button",
5754
- class: `${p17}-icon-btn`,
5871
+ class: `${p19}-icon-btn`,
5755
5872
  onClick: onBack,
5756
5873
  "aria-label": s.moduleBack,
5757
5874
  title: s.moduleBack,
5758
- children: /* @__PURE__ */ jsx20(BackIcon, {})
5875
+ children: /* @__PURE__ */ jsx21(BackIcon, {})
5759
5876
  }
5760
5877
  ) : null,
5761
- agent ? /* @__PURE__ */ jsx20(AgentBadge, { agent, strings: s }) : /* @__PURE__ */ jsx20("h1", { children: s.panelTitle }),
5762
- /* @__PURE__ */ jsx20(HeaderActions, { panelProps: props2, variant: "chat" })
5878
+ agent ? /* @__PURE__ */ jsx21(AgentBadge, { agent, strings: s }) : /* @__PURE__ */ jsx21("h1", { children: s.panelTitle }),
5879
+ /* @__PURE__ */ jsx21(HeaderActions, { panelProps: props2, variant: "chat" })
5763
5880
  ] }),
5764
- view === "history" ? /* @__PURE__ */ jsx20(
5881
+ view === "history" ? /* @__PURE__ */ jsx21(
5765
5882
  ConversationList,
5766
5883
  {
5767
5884
  transport,
5768
5885
  strings: s,
5769
5886
  locale: options.locale,
5887
+ persistence,
5770
5888
  visitorId,
5771
5889
  onSelect: (conversation) => onSelectHistoryConversation(conversation.conversationId),
5772
5890
  onNewConversation
5773
5891
  }
5774
- ) : /* @__PURE__ */ jsxs16(Fragment4, { children: [
5775
- /* @__PURE__ */ jsx20(DropZone, { visible: dragOver, strings: s }),
5776
- /* @__PURE__ */ jsx20(
5892
+ ) : /* @__PURE__ */ jsxs17(Fragment4, { children: [
5893
+ /* @__PURE__ */ jsx21(DropZone, { visible: dragOver, strings: s }),
5894
+ /* @__PURE__ */ jsx21(
5777
5895
  MessageList,
5778
5896
  {
5779
5897
  messagesSig,
@@ -5781,6 +5899,7 @@ function PanelContent(props2) {
5781
5899
  responseMode: options.responseMode,
5782
5900
  showReasoning: options.showReasoning,
5783
5901
  showToolCalls: options.showToolCalls,
5902
+ showSources: options.showSources,
5784
5903
  loading: loadingMessages,
5785
5904
  idle: !isStreaming,
5786
5905
  tool,
@@ -5790,9 +5909,9 @@ function PanelContent(props2) {
5790
5909
  }
5791
5910
  ),
5792
5911
  composerArea,
5793
- /* @__PURE__ */ jsx20(ComposerFooter, { disclaimer: options.composerDisclaimer })
5912
+ /* @__PURE__ */ jsx21(ComposerFooter, { disclaimer: options.composerDisclaimer })
5794
5913
  ] }),
5795
- options.size.resize?.enabled ? /* @__PURE__ */ jsx20(
5914
+ options.size.resize?.enabled ? /* @__PURE__ */ jsx21(
5796
5915
  ResizeGrip,
5797
5916
  {
5798
5917
  panelEl: containerEl,
@@ -5811,28 +5930,28 @@ function HistoryHeader({
5811
5930
  onClose,
5812
5931
  showClose
5813
5932
  }) {
5814
- return /* @__PURE__ */ jsxs16("header", { class: `${p17}-header`, children: [
5815
- /* @__PURE__ */ jsx20(
5933
+ return /* @__PURE__ */ jsxs17("header", { class: `${p19}-header`, children: [
5934
+ /* @__PURE__ */ jsx21(
5816
5935
  "button",
5817
5936
  {
5818
5937
  type: "button",
5819
- class: `${p17}-icon-btn`,
5938
+ class: `${p19}-icon-btn`,
5820
5939
  onClick: onBack,
5821
5940
  "aria-label": strings.historyBack,
5822
5941
  title: strings.historyBack,
5823
- children: /* @__PURE__ */ jsx20(BackIcon, {})
5942
+ children: /* @__PURE__ */ jsx21(BackIcon, {})
5824
5943
  }
5825
5944
  ),
5826
- /* @__PURE__ */ jsx20("h1", { children: strings.historyTitle }),
5827
- showClose ? /* @__PURE__ */ jsx20(
5945
+ /* @__PURE__ */ jsx21("h1", { children: strings.historyTitle }),
5946
+ showClose ? /* @__PURE__ */ jsx21(
5828
5947
  "button",
5829
5948
  {
5830
5949
  type: "button",
5831
- class: `${p17}-icon-btn`,
5950
+ class: `${p19}-icon-btn`,
5832
5951
  onClick: onClose,
5833
5952
  "aria-label": strings.close,
5834
5953
  title: strings.close,
5835
- children: /* @__PURE__ */ jsx20(CloseIcon, {})
5954
+ children: /* @__PURE__ */ jsx21(CloseIcon, {})
5836
5955
  }
5837
5956
  ) : null
5838
5957
  ] });
@@ -5842,28 +5961,28 @@ function ReadOnlyBanner({
5842
5961
  ctaLabel,
5843
5962
  onNewConversation
5844
5963
  }) {
5845
- return /* @__PURE__ */ jsxs16("div", { class: `${p17}-readonly-banner`, role: "note", children: [
5846
- /* @__PURE__ */ jsx20("span", { class: `${p17}-readonly-label`, children: label }),
5847
- /* @__PURE__ */ jsx20("button", { type: "button", class: `${p17}-readonly-cta`, onClick: onNewConversation, children: ctaLabel })
5964
+ return /* @__PURE__ */ jsxs17("div", { class: `${p19}-readonly-banner`, role: "note", children: [
5965
+ /* @__PURE__ */ jsx21("span", { class: `${p19}-readonly-label`, children: label }),
5966
+ /* @__PURE__ */ jsx21("button", { type: "button", class: `${p19}-readonly-cta`, onClick: onNewConversation, children: ctaLabel })
5848
5967
  ] });
5849
5968
  }
5850
5969
  function ComposerFooter({ disclaimer }) {
5851
5970
  if (!disclaimer) return null;
5852
- return /* @__PURE__ */ jsx20("div", { class: `${p17}-composer-footer`, children: /* @__PURE__ */ jsx20("div", { class: `${p17}-disclaimer`, children: disclaimer }) });
5971
+ return /* @__PURE__ */ jsx21("div", { class: `${p19}-composer-footer`, children: /* @__PURE__ */ jsx21("div", { class: `${p19}-disclaimer`, children: disclaimer }) });
5853
5972
  }
5854
5973
  function PoweredByBar({ poweredBy }) {
5855
5974
  if (!poweredBy) return null;
5856
- return /* @__PURE__ */ jsx20("div", { class: `${p17}-poweredby-bar`, children: /* @__PURE__ */ jsx20(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
5975
+ return /* @__PURE__ */ jsx21("div", { class: `${p19}-poweredby-bar`, children: /* @__PURE__ */ jsx21(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
5857
5976
  }
5858
5977
  function PoweredBy({ logoUrl, text, href }) {
5859
- const inner = /* @__PURE__ */ jsxs16(Fragment4, { children: [
5860
- logoUrl ? /* @__PURE__ */ jsx20("img", { class: `${p17}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
5861
- text ? /* @__PURE__ */ jsx20("span", { children: text }) : null
5978
+ const inner = /* @__PURE__ */ jsxs17(Fragment4, { children: [
5979
+ logoUrl ? /* @__PURE__ */ jsx21("img", { class: `${p19}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
5980
+ text ? /* @__PURE__ */ jsx21("span", { children: text }) : null
5862
5981
  ] });
5863
5982
  if (href) {
5864
- return /* @__PURE__ */ jsx20("a", { class: `${p17}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
5983
+ return /* @__PURE__ */ jsx21("a", { class: `${p19}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
5865
5984
  }
5866
- return /* @__PURE__ */ jsx20("span", { class: `${p17}-poweredby`, children: inner });
5985
+ return /* @__PURE__ */ jsx21("span", { class: `${p19}-poweredby`, children: inner });
5867
5986
  }
5868
5987
 
5869
5988
  // src/ui/form/form-controller.ts
@@ -5946,39 +6065,40 @@ function whenPasses(form, d) {
5946
6065
  }
5947
6066
 
5948
6067
  // src/ui/sidebar.tsx
5949
- import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs17 } from "preact/jsx-runtime";
6068
+ import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs18 } from "preact/jsx-runtime";
5950
6069
  function Sidebar(props2) {
5951
- const p33 = BRAND.cssPrefix;
6070
+ const p35 = BRAND.cssPrefix;
5952
6071
  const { site, blocks, strings, collapsed } = props2;
5953
6072
  const navigation = blocks?.navigation ?? [];
5954
6073
  const linkCards = blocks?.linkCards ?? [];
5955
6074
  const toggleLabel = collapsed ? strings.expandSidebar : strings.collapseSidebar;
5956
- return /* @__PURE__ */ jsxs17("aside", { class: `${p33}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
5957
- /* @__PURE__ */ jsxs17("div", { class: `${p33}-sidebar-header`, children: [
5958
- /* @__PURE__ */ jsx21(SidebarBrand, { site }),
5959
- /* @__PURE__ */ jsx21(
6075
+ return /* @__PURE__ */ jsxs18("aside", { class: `${p35}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
6076
+ /* @__PURE__ */ jsxs18("div", { class: `${p35}-sidebar-header`, children: [
6077
+ /* @__PURE__ */ jsx22(SidebarBrand, { site }),
6078
+ /* @__PURE__ */ jsx22(
5960
6079
  "button",
5961
6080
  {
5962
6081
  type: "button",
5963
- class: `${p33}-sidebar-toggle`,
6082
+ class: `${p35}-sidebar-toggle`,
5964
6083
  "aria-label": toggleLabel,
5965
6084
  "aria-expanded": collapsed ? "false" : "true",
5966
6085
  title: toggleLabel,
5967
6086
  onClick: props2.onToggleCollapsed,
5968
6087
  "data-testid": TID.sidebarToggle,
5969
- children: /* @__PURE__ */ jsx21(SidebarToggleIcon, { collapsed })
6088
+ children: /* @__PURE__ */ jsx22(SidebarToggleIcon, { collapsed })
5970
6089
  }
5971
6090
  )
5972
6091
  ] }),
5973
- collapsed ? null : /* @__PURE__ */ jsxs17(Fragment5, { children: [
5974
- navigation.length > 0 ? /* @__PURE__ */ jsx21("nav", { class: `${p33}-sidebar-section`, "data-section": "navigation", children: /* @__PURE__ */ jsx21(SidebarNav, { items: navigation }) }) : null,
5975
- linkCards.length > 0 ? /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-section`, "data-section": "link-cards", children: /* @__PURE__ */ jsx21(SidebarCards, { items: linkCards }) }) : null,
5976
- props2.showConversations ? /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-conversations`, children: /* @__PURE__ */ jsx21(
6092
+ collapsed ? null : /* @__PURE__ */ jsxs18(Fragment5, { children: [
6093
+ navigation.length > 0 ? /* @__PURE__ */ jsx22("nav", { class: `${p35}-sidebar-section`, "data-section": "navigation", children: /* @__PURE__ */ jsx22(SidebarNav, { items: navigation }) }) : null,
6094
+ linkCards.length > 0 ? /* @__PURE__ */ jsx22("div", { class: `${p35}-sidebar-section`, "data-section": "link-cards", children: /* @__PURE__ */ jsx22(SidebarCards, { items: linkCards }) }) : null,
6095
+ props2.showConversations ? /* @__PURE__ */ jsx22("div", { class: `${p35}-sidebar-conversations`, children: /* @__PURE__ */ jsx22(
5977
6096
  ConversationList,
5978
6097
  {
5979
6098
  transport: props2.transport,
5980
6099
  strings: props2.strings,
5981
6100
  locale: props2.locale,
6101
+ persistence: props2.persistence,
5982
6102
  visitorId: props2.visitorId,
5983
6103
  onSelect: props2.onSelectConversation,
5984
6104
  onNewConversation: props2.onNewConversation
@@ -5988,18 +6108,18 @@ function Sidebar(props2) {
5988
6108
  ] });
5989
6109
  }
5990
6110
  function SidebarBrand({ site }) {
5991
- const p33 = BRAND.cssPrefix;
6111
+ const p35 = BRAND.cssPrefix;
5992
6112
  if (site?.logo?.url) {
5993
6113
  const alt = site.logo.alt ?? site.title ?? "Logo";
5994
- return /* @__PURE__ */ jsxs17("picture", { children: [
5995
- site.logoDark?.url ? /* @__PURE__ */ jsx21("source", { srcset: site.logoDark.url, media: "(prefers-color-scheme: dark)" }) : null,
5996
- /* @__PURE__ */ jsx21("img", { class: `${p33}-sidebar-logo`, src: site.logo.url, alt })
6114
+ return /* @__PURE__ */ jsxs18("picture", { children: [
6115
+ site.logoDark?.url ? /* @__PURE__ */ jsx22("source", { srcset: site.logoDark.url, media: "(prefers-color-scheme: dark)" }) : null,
6116
+ /* @__PURE__ */ jsx22("img", { class: `${p35}-sidebar-logo`, src: site.logo.url, alt })
5997
6117
  ] });
5998
6118
  }
5999
- return /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-title`, children: site?.title ?? BRAND.name });
6119
+ return /* @__PURE__ */ jsx22("div", { class: `${p35}-sidebar-title`, children: site?.title ?? BRAND.name });
6000
6120
  }
6001
6121
  function SidebarToggleIcon({ collapsed }) {
6002
- return /* @__PURE__ */ jsx21(
6122
+ return /* @__PURE__ */ jsx22(
6003
6123
  "svg",
6004
6124
  {
6005
6125
  width: "16",
@@ -6009,38 +6129,38 @@ function SidebarToggleIcon({ collapsed }) {
6009
6129
  stroke: "currentColor",
6010
6130
  "stroke-width": "2",
6011
6131
  "aria-hidden": "true",
6012
- children: collapsed ? /* @__PURE__ */ jsx21("polyline", { points: "9 6 15 12 9 18" }) : /* @__PURE__ */ jsx21("polyline", { points: "15 6 9 12 15 18" })
6132
+ children: collapsed ? /* @__PURE__ */ jsx22("polyline", { points: "9 6 15 12 9 18" }) : /* @__PURE__ */ jsx22("polyline", { points: "15 6 9 12 15 18" })
6013
6133
  }
6014
6134
  );
6015
6135
  }
6016
6136
  function SidebarNav({ items }) {
6017
- const p33 = BRAND.cssPrefix;
6018
- return /* @__PURE__ */ jsx21("ul", { class: `${p33}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx21("li", { children: /* @__PURE__ */ jsxs17(
6137
+ const p35 = BRAND.cssPrefix;
6138
+ return /* @__PURE__ */ jsx22("ul", { class: `${p35}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx22("li", { children: /* @__PURE__ */ jsxs18(
6019
6139
  "a",
6020
6140
  {
6021
- class: `${p33}-sidebar-nav-item`,
6141
+ class: `${p35}-sidebar-nav-item`,
6022
6142
  href: item.href,
6023
6143
  target: item.href ? "_blank" : void 0,
6024
6144
  rel: item.href ? "noreferrer" : void 0,
6025
6145
  children: [
6026
- item.icon ? /* @__PURE__ */ jsx21("span", { class: `${p33}-sidebar-nav-icon`, "data-icon": item.icon }) : null,
6027
- /* @__PURE__ */ jsx21("span", { class: `${p33}-sidebar-nav-label`, children: item.label })
6146
+ item.icon ? /* @__PURE__ */ jsx22("span", { class: `${p35}-sidebar-nav-icon`, "data-icon": item.icon }) : null,
6147
+ /* @__PURE__ */ jsx22("span", { class: `${p35}-sidebar-nav-label`, children: item.label })
6028
6148
  ]
6029
6149
  }
6030
6150
  ) }, item.id ?? item.label)) });
6031
6151
  }
6032
6152
  function SidebarCards({ items }) {
6033
- const p33 = BRAND.cssPrefix;
6034
- return /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs17(
6153
+ const p35 = BRAND.cssPrefix;
6154
+ return /* @__PURE__ */ jsx22("div", { class: `${p35}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs18(
6035
6155
  "a",
6036
6156
  {
6037
- class: `${p33}-sidebar-card`,
6157
+ class: `${p35}-sidebar-card`,
6038
6158
  href: item.href,
6039
6159
  target: item.href ? "_blank" : void 0,
6040
6160
  rel: item.href ? "noreferrer" : void 0,
6041
6161
  children: [
6042
- /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-card-label`, children: item.label }),
6043
- item.description ? /* @__PURE__ */ jsx21("div", { class: `${p33}-sidebar-card-desc`, children: item.description }) : null
6162
+ /* @__PURE__ */ jsx22("div", { class: `${p35}-sidebar-card-label`, children: item.label }),
6163
+ item.description ? /* @__PURE__ */ jsx22("div", { class: `${p35}-sidebar-card-desc`, children: item.description }) : null
6044
6164
  ]
6045
6165
  },
6046
6166
  item.id ?? item.label
@@ -6048,11 +6168,11 @@ function SidebarCards({ items }) {
6048
6168
  }
6049
6169
 
6050
6170
  // src/ui/page-shell.tsx
6051
- import { jsx as jsx22, jsxs as jsxs18 } from "preact/jsx-runtime";
6052
- var p18 = BRAND.cssPrefix;
6171
+ import { jsx as jsx23, jsxs as jsxs19 } from "preact/jsx-runtime";
6172
+ var p20 = BRAND.cssPrefix;
6053
6173
  function PageShell(props2) {
6054
- return /* @__PURE__ */ jsxs18("main", { class: `${p18}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
6055
- /* @__PURE__ */ jsx22(
6174
+ return /* @__PURE__ */ jsxs19("main", { class: `${p20}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
6175
+ /* @__PURE__ */ jsx23(
6056
6176
  Sidebar,
6057
6177
  {
6058
6178
  site: props2.site,
@@ -6060,6 +6180,7 @@ function PageShell(props2) {
6060
6180
  transport: props2.transport,
6061
6181
  strings: props2.strings,
6062
6182
  locale: props2.locale,
6183
+ persistence: props2.persistence,
6063
6184
  visitorId: props2.visitorId,
6064
6185
  showConversations: props2.showConversations,
6065
6186
  onSelectConversation: props2.onSelectConversation,
@@ -6068,7 +6189,7 @@ function PageShell(props2) {
6068
6189
  onToggleCollapsed: props2.onToggleSidebarCollapsed
6069
6190
  }
6070
6191
  ),
6071
- /* @__PURE__ */ jsx22("section", { class: `${p18}-page-chat`, "aria-label": "Chat", children: props2.children })
6192
+ /* @__PURE__ */ jsx23("section", { class: `${p20}-page-chat`, "aria-label": "Chat", children: props2.children })
6072
6193
  ] });
6073
6194
  }
6074
6195
 
@@ -6106,7 +6227,7 @@ var atTabRoot = (s) => activeStack(s).length === 0;
6106
6227
 
6107
6228
  // src/ui/messenger-home.tsx
6108
6229
  import { useCallback as useCallback4, useEffect as useEffect14, useRef as useRef8 } from "preact/hooks";
6109
- import { useComputed as useComputed6 } from "@preact/signals";
6230
+ import { useComputed as useComputed7 } from "@preact/signals";
6110
6231
 
6111
6232
  // src/ui/modules/chat.tsx
6112
6233
  var chatLayout = {
@@ -6118,80 +6239,80 @@ var chatLayout = {
6118
6239
  import { useEffect as useEffect10, useMemo as useMemo2, useState as useState8 } from "preact/hooks";
6119
6240
 
6120
6241
  // src/ui/back-header.tsx
6121
- import { jsx as jsx23, jsxs as jsxs19 } from "preact/jsx-runtime";
6122
- var p19 = BRAND.cssPrefix;
6242
+ import { jsx as jsx24, jsxs as jsxs20 } from "preact/jsx-runtime";
6243
+ var p21 = BRAND.cssPrefix;
6123
6244
  function TitleBar({ title, actions }) {
6124
- return /* @__PURE__ */ jsxs19("header", { class: `${p19}-back-header`, "data-variant": "title", children: [
6125
- /* @__PURE__ */ jsx23("span", { class: `${p19}-back-spacer`, "aria-hidden": "true" }),
6126
- /* @__PURE__ */ jsx23("h1", { class: `${p19}-back-title`, children: title }),
6127
- actions ?? /* @__PURE__ */ jsx23("span", { class: `${p19}-back-spacer`, "aria-hidden": "true" })
6245
+ return /* @__PURE__ */ jsxs20("header", { class: `${p21}-back-header`, "data-variant": "title", children: [
6246
+ /* @__PURE__ */ jsx24("span", { class: `${p21}-back-spacer`, "aria-hidden": "true" }),
6247
+ /* @__PURE__ */ jsx24("h1", { class: `${p21}-back-title`, children: title }),
6248
+ actions ?? /* @__PURE__ */ jsx24("span", { class: `${p21}-back-spacer`, "aria-hidden": "true" })
6128
6249
  ] });
6129
6250
  }
6130
6251
  function BackHeader({ title, backLabel, onBack, actions, testid }) {
6131
- return /* @__PURE__ */ jsxs19("header", { class: `${p19}-back-header`, "data-testid": testid, children: [
6132
- /* @__PURE__ */ jsx23("button", { type: "button", class: `${p19}-icon-btn`, onClick: onBack, "aria-label": backLabel, title: backLabel, children: /* @__PURE__ */ jsx23(BackIcon, {}) }),
6133
- /* @__PURE__ */ jsx23("h1", { class: `${p19}-back-title`, children: title }),
6134
- actions ?? /* @__PURE__ */ jsx23("span", { class: `${p19}-back-spacer`, "aria-hidden": "true" })
6252
+ return /* @__PURE__ */ jsxs20("header", { class: `${p21}-back-header`, "data-testid": testid, children: [
6253
+ /* @__PURE__ */ jsx24("button", { type: "button", class: `${p21}-icon-btn`, onClick: onBack, "aria-label": backLabel, title: backLabel, children: /* @__PURE__ */ jsx24(BackIcon, {}) }),
6254
+ /* @__PURE__ */ jsx24("h1", { class: `${p21}-back-title`, children: title }),
6255
+ actions ?? /* @__PURE__ */ jsx24("span", { class: `${p21}-back-spacer`, "aria-hidden": "true" })
6135
6256
  ] });
6136
6257
  }
6137
6258
 
6138
6259
  // src/ui/home-search.tsx
6139
- import { jsx as jsx24, jsxs as jsxs20 } from "preact/jsx-runtime";
6140
- var p20 = BRAND.cssPrefix;
6260
+ import { jsx as jsx25, jsxs as jsxs21 } from "preact/jsx-runtime";
6261
+ var p22 = BRAND.cssPrefix;
6141
6262
  function HomeSearchButton({ placeholder, onActivate }) {
6142
- return /* @__PURE__ */ jsxs20("button", { type: "button", class: `${p20}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
6143
- /* @__PURE__ */ jsx24("span", { class: `${p20}-home-search-text`, children: placeholder }),
6144
- /* @__PURE__ */ jsx24("span", { class: `${p20}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx24(SearchIcon, {}) })
6263
+ return /* @__PURE__ */ jsxs21("button", { type: "button", class: `${p22}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
6264
+ /* @__PURE__ */ jsx25("span", { class: `${p22}-home-search-text`, children: placeholder }),
6265
+ /* @__PURE__ */ jsx25("span", { class: `${p22}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx25(SearchIcon, {}) })
6145
6266
  ] });
6146
6267
  }
6147
6268
  function HelpSearchInput({ placeholder, value, onInput }) {
6148
- return /* @__PURE__ */ jsxs20("div", { class: `${p20}-home-search`, "data-input": "true", children: [
6149
- /* @__PURE__ */ jsx24(
6269
+ return /* @__PURE__ */ jsxs21("div", { class: `${p22}-home-search`, "data-input": "true", children: [
6270
+ /* @__PURE__ */ jsx25(
6150
6271
  "input",
6151
6272
  {
6152
6273
  type: "search",
6153
- class: `${p20}-home-search-input`,
6274
+ class: `${p22}-home-search-input`,
6154
6275
  placeholder,
6155
6276
  value,
6156
6277
  onInput: (e) => onInput(e.currentTarget.value),
6157
6278
  "data-testid": TID.helpSearch
6158
6279
  }
6159
6280
  ),
6160
- /* @__PURE__ */ jsx24("span", { class: `${p20}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx24(SearchIcon, {}) })
6281
+ /* @__PURE__ */ jsx25("span", { class: `${p22}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx25(SearchIcon, {}) })
6161
6282
  ] });
6162
6283
  }
6163
6284
 
6164
6285
  // src/ui/list-row.tsx
6165
- import { jsx as jsx25, jsxs as jsxs21 } from "preact/jsx-runtime";
6166
- var p21 = BRAND.cssPrefix;
6286
+ import { jsx as jsx26, jsxs as jsxs22 } from "preact/jsx-runtime";
6287
+ var p23 = BRAND.cssPrefix;
6167
6288
  function ListRow({ title, subtitle, onClick, testid }) {
6168
- return /* @__PURE__ */ jsxs21("button", { type: "button", class: `${p21}-list-row`, onClick, "data-testid": testid, children: [
6169
- /* @__PURE__ */ jsxs21("span", { class: `${p21}-list-row-body`, children: [
6170
- /* @__PURE__ */ jsx25("span", { class: `${p21}-list-row-title`, children: title }),
6171
- subtitle ? /* @__PURE__ */ jsx25("span", { class: `${p21}-list-row-sub`, children: subtitle }) : null
6289
+ return /* @__PURE__ */ jsxs22("button", { type: "button", class: `${p23}-list-row`, onClick, "data-testid": testid, children: [
6290
+ /* @__PURE__ */ jsxs22("span", { class: `${p23}-list-row-body`, children: [
6291
+ /* @__PURE__ */ jsx26("span", { class: `${p23}-list-row-title`, children: title }),
6292
+ subtitle ? /* @__PURE__ */ jsx26("span", { class: `${p23}-list-row-sub`, children: subtitle }) : null
6172
6293
  ] }),
6173
- /* @__PURE__ */ jsx25("span", { class: `${p21}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx25(ChevronRightIcon, {}) })
6294
+ /* @__PURE__ */ jsx26("span", { class: `${p23}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx26(ChevronRightIcon, {}) })
6174
6295
  ] });
6175
6296
  }
6176
6297
 
6177
6298
  // src/ui/module-state.tsx
6178
- import { jsx as jsx26, jsxs as jsxs22 } from "preact/jsx-runtime";
6179
- var p22 = BRAND.cssPrefix;
6299
+ import { jsx as jsx27, jsxs as jsxs23 } from "preact/jsx-runtime";
6300
+ var p24 = BRAND.cssPrefix;
6180
6301
  function ModuleState({
6181
6302
  tone = "info",
6182
6303
  message,
6183
6304
  onRetry,
6184
6305
  strings
6185
6306
  }) {
6186
- return /* @__PURE__ */ jsxs22("div", { class: `${p22}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
6187
- /* @__PURE__ */ jsx26("span", { children: message }),
6188
- onRetry ? /* @__PURE__ */ jsx26("button", { type: "button", class: `${p22}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
6307
+ return /* @__PURE__ */ jsxs23("div", { class: `${p24}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
6308
+ /* @__PURE__ */ jsx27("span", { children: message }),
6309
+ onRetry ? /* @__PURE__ */ jsx27("button", { type: "button", class: `${p24}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
6189
6310
  ] });
6190
6311
  }
6191
6312
 
6192
6313
  // src/ui/modules/help.tsx
6193
- import { jsx as jsx27, jsxs as jsxs23 } from "preact/jsx-runtime";
6194
- var p23 = BRAND.cssPrefix;
6314
+ import { jsx as jsx28, jsxs as jsxs24 } from "preact/jsx-runtime";
6315
+ var p25 = BRAND.cssPrefix;
6195
6316
  var log13 = logger.scope("help");
6196
6317
  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 });
6197
6318
  function groupByCategory(items) {
@@ -6220,7 +6341,7 @@ function fuzzySearch(items, query) {
6220
6341
  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);
6221
6342
  }
6222
6343
  function ArticleRow({ article, nav }) {
6223
- return /* @__PURE__ */ jsx27(
6344
+ return /* @__PURE__ */ jsx28(
6224
6345
  ListRow,
6225
6346
  {
6226
6347
  title: article.title,
@@ -6265,46 +6386,46 @@ function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
6265
6386
  }, [query, results, bus]);
6266
6387
  function renderBody() {
6267
6388
  if (query.trim().length > 0) {
6268
- if (results.length === 0) return /* @__PURE__ */ jsx27(ModuleState, { message: strings.helpSearchEmpty, strings });
6269
- return /* @__PURE__ */ jsx27("div", { class: `${p23}-help-card`, children: results.map((a) => /* @__PURE__ */ jsx27(ArticleRow, { article: a, nav }, a.id)) });
6389
+ if (results.length === 0) return /* @__PURE__ */ jsx28(ModuleState, { message: strings.helpSearchEmpty, strings });
6390
+ return /* @__PURE__ */ jsx28("div", { class: `${p25}-help-card`, children: results.map((a) => /* @__PURE__ */ jsx28(ArticleRow, { article: a, nav }, a.id)) });
6270
6391
  }
6271
- if (state === "loading") return /* @__PURE__ */ jsx27(ModuleState, { message: strings.helpLoading, strings });
6392
+ if (state === "loading") return /* @__PURE__ */ jsx28(ModuleState, { message: strings.helpLoading, strings });
6272
6393
  if (state === "error") {
6273
- return /* @__PURE__ */ jsx27(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
6394
+ return /* @__PURE__ */ jsx28(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
6274
6395
  }
6275
- if (items.length === 0) return /* @__PURE__ */ jsx27(ModuleState, { message: strings.helpEmpty, strings });
6276
- return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs23("section", { class: `${p23}-help-group`, children: [
6277
- category ? /* @__PURE__ */ jsx27("h2", { class: `${p23}-help-section-title`, children: category }) : null,
6278
- /* @__PURE__ */ jsx27("div", { class: `${p23}-help-card`, children: rows.map((a) => /* @__PURE__ */ jsx27(ArticleRow, { article: a, nav }, a.id)) })
6396
+ if (items.length === 0) return /* @__PURE__ */ jsx28(ModuleState, { message: strings.helpEmpty, strings });
6397
+ return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs24("section", { class: `${p25}-help-group`, children: [
6398
+ category ? /* @__PURE__ */ jsx28("h2", { class: `${p25}-help-section-title`, children: category }) : null,
6399
+ /* @__PURE__ */ jsx28("div", { class: `${p25}-help-card`, children: rows.map((a) => /* @__PURE__ */ jsx28(ArticleRow, { article: a, nav }, a.id)) })
6279
6400
  ] }, category));
6280
6401
  }
6281
- return /* @__PURE__ */ jsxs23("div", { class: `${p23}-module`, children: [
6282
- /* @__PURE__ */ jsx27(TitleBar, { title: strings.helpTitle, actions: /* @__PURE__ */ jsx27(HeaderActions, { panelProps, variant: "plain" }) }),
6283
- /* @__PURE__ */ jsx27("div", { class: `${p23}-module-pad`, children: /* @__PURE__ */ jsx27(HelpSearchInput, { placeholder: strings.helpSearchPlaceholder, value: query, onInput: setQuery }) }),
6284
- /* @__PURE__ */ jsx27("div", { class: `${p23}-help-list`, children: renderBody() })
6402
+ return /* @__PURE__ */ jsxs24("div", { class: `${p25}-module`, children: [
6403
+ /* @__PURE__ */ jsx28(TitleBar, { title: strings.helpTitle, actions: /* @__PURE__ */ jsx28(HeaderActions, { panelProps, variant: "plain" }) }),
6404
+ /* @__PURE__ */ jsx28("div", { class: `${p25}-module-pad`, children: /* @__PURE__ */ jsx28(HelpSearchInput, { placeholder: strings.helpSearchPlaceholder, value: query, onInput: setQuery }) }),
6405
+ /* @__PURE__ */ jsx28("div", { class: `${p25}-help-list`, children: renderBody() })
6285
6406
  ] });
6286
6407
  }
6287
6408
  var helpLayout = {
6288
6409
  Icon: HelpIcon,
6289
- Root: (props2) => /* @__PURE__ */ jsx27(HelpRoot, { ...props2 })
6410
+ Root: (props2) => /* @__PURE__ */ jsx28(HelpRoot, { ...props2 })
6290
6411
  };
6291
6412
 
6292
6413
  // src/ui/modules/home.tsx
6293
6414
  import { useEffect as useEffect11, useState as useState9 } from "preact/hooks";
6294
6415
 
6295
6416
  // src/ui/home-card.tsx
6296
- import { jsx as jsx28 } from "preact/jsx-runtime";
6297
- var p24 = BRAND.cssPrefix;
6417
+ import { jsx as jsx29 } from "preact/jsx-runtime";
6418
+ var p26 = BRAND.cssPrefix;
6298
6419
  function HomeCard({ onClick, children, testid }) {
6299
6420
  if (onClick) {
6300
- return /* @__PURE__ */ jsx28("button", { type: "button", class: `${p24}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
6421
+ return /* @__PURE__ */ jsx29("button", { type: "button", class: `${p26}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
6301
6422
  }
6302
- return /* @__PURE__ */ jsx28("div", { class: `${p24}-home-card`, "data-testid": testid, children });
6423
+ return /* @__PURE__ */ jsx29("div", { class: `${p26}-home-card`, "data-testid": testid, children });
6303
6424
  }
6304
6425
 
6305
6426
  // src/ui/modules/home.tsx
6306
- import { Fragment as Fragment6, jsx as jsx29, jsxs as jsxs24 } from "preact/jsx-runtime";
6307
- var p25 = BRAND.cssPrefix;
6427
+ import { Fragment as Fragment6, jsx as jsx30, jsxs as jsxs25 } from "preact/jsx-runtime";
6428
+ var p27 = BRAND.cssPrefix;
6308
6429
  var log14 = logger.scope("home");
6309
6430
  function resolveGreeting(props2) {
6310
6431
  const name = props2.options.userContext?.name;
@@ -6347,49 +6468,49 @@ function HomeRoot(props2) {
6347
6468
  const status = config.status;
6348
6469
  const statusText = status?.text ? localizeText(strings, status.text) : strings.homeStatus;
6349
6470
  const contentTitle = config.contentBlockTitle ? localizeText(strings, config.contentBlockTitle) : strings.homeContentTitle;
6350
- return /* @__PURE__ */ jsx29("div", { class: `${p25}-module ${p25}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-scroll`, children: [
6351
- /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-hero`, children: [
6352
- /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-hero-top`, children: [
6353
- 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" }),
6354
- /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-hero-actions`, children: [
6355
- 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,
6356
- /* @__PURE__ */ jsx29(HeaderActions, { panelProps, variant: "plain" })
6471
+ return /* @__PURE__ */ jsx30("div", { class: `${p27}-module ${p27}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-scroll`, children: [
6472
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-hero`, children: [
6473
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-hero-top`, children: [
6474
+ 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" }),
6475
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-hero-actions`, children: [
6476
+ 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,
6477
+ /* @__PURE__ */ jsx30(HeaderActions, { panelProps, variant: "plain" })
6357
6478
  ] })
6358
6479
  ] }),
6359
- config.showGreeting !== false ? /* @__PURE__ */ jsxs24(Fragment6, { children: [
6360
- /* @__PURE__ */ jsx29("h1", { class: `${p25}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
6361
- greeting.subtitle ? /* @__PURE__ */ jsx29("p", { class: `${p25}-home-lead`, children: greeting.subtitle }) : null
6480
+ config.showGreeting !== false ? /* @__PURE__ */ jsxs25(Fragment6, { children: [
6481
+ /* @__PURE__ */ jsx30("h1", { class: `${p27}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
6482
+ greeting.subtitle ? /* @__PURE__ */ jsx30("p", { class: `${p27}-home-lead`, children: greeting.subtitle }) : null
6362
6483
  ] }) : null
6363
6484
  ] }),
6364
- /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-cards`, children: [
6365
- config.showSearchBar !== false ? /* @__PURE__ */ jsx29(
6485
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-cards`, children: [
6486
+ config.showSearchBar !== false ? /* @__PURE__ */ jsx30(
6366
6487
  HomeSearchButton,
6367
6488
  {
6368
6489
  placeholder: strings.homeSearchPlaceholder,
6369
6490
  onActivate: () => nav.switchToLayout("help")
6370
6491
  }
6371
6492
  ) : null,
6372
- 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: [
6373
- /* @__PURE__ */ jsx29("span", { class: `${p25}-home-recent-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx29(BubblesIcon, {}) }),
6374
- /* @__PURE__ */ jsxs24("span", { class: `${p25}-home-recent-body`, children: [
6375
- /* @__PURE__ */ jsx29("span", { class: `${p25}-home-recent-title`, children: recent.title }),
6376
- recent.preview ? /* @__PURE__ */ jsx29("span", { class: `${p25}-home-recent-preview`, children: recent.preview }) : null
6493
+ 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: [
6494
+ /* @__PURE__ */ jsx30("span", { class: `${p27}-home-recent-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx30(BubblesIcon, {}) }),
6495
+ /* @__PURE__ */ jsxs25("span", { class: `${p27}-home-recent-body`, children: [
6496
+ /* @__PURE__ */ jsx30("span", { class: `${p27}-home-recent-title`, children: recent.title }),
6497
+ recent.preview ? /* @__PURE__ */ jsx30("span", { class: `${p27}-home-recent-preview`, children: recent.preview }) : null
6377
6498
  ] }),
6378
- (recent.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx29("span", { class: `${p25}-home-recent-dot`, "aria-label": "Unread" }) : null
6499
+ (recent.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx30("span", { class: `${p27}-home-recent-dot`, "aria-label": "Unread" }) : null
6379
6500
  ] }) }) : null,
6380
- status ? /* @__PURE__ */ jsx29(
6501
+ status ? /* @__PURE__ */ jsx30(
6381
6502
  HomeCard,
6382
6503
  {
6383
6504
  onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: statusText }) : void 0,
6384
- children: /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-status`, "data-level": status.level ?? "operational", children: [
6385
- /* @__PURE__ */ jsx29("span", { class: `${p25}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx29(StatusOkIcon, {}) }),
6386
- /* @__PURE__ */ jsx29("span", { class: `${p25}-home-status-text`, children: statusText })
6505
+ children: /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-status`, "data-level": status.level ?? "operational", children: [
6506
+ /* @__PURE__ */ jsx30("span", { class: `${p27}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx30(StatusOkIcon, {}) }),
6507
+ /* @__PURE__ */ jsx30("span", { class: `${p27}-home-status-text`, children: statusText })
6387
6508
  ] })
6388
6509
  }
6389
6510
  ) : null,
6390
- content.length > 0 ? /* @__PURE__ */ jsxs24("section", { class: `${p25}-home-content`, children: [
6391
- /* @__PURE__ */ jsx29("div", { class: `${p25}-home-content-title`, children: contentTitle }),
6392
- /* @__PURE__ */ jsx29("div", { class: `${p25}-home-content-list`, children: content.map((item) => /* @__PURE__ */ jsx29(
6511
+ content.length > 0 ? /* @__PURE__ */ jsxs25("section", { class: `${p27}-home-content`, children: [
6512
+ /* @__PURE__ */ jsx30("div", { class: `${p27}-home-content-title`, children: contentTitle }),
6513
+ /* @__PURE__ */ jsx30("div", { class: `${p27}-home-content-list`, children: content.map((item) => /* @__PURE__ */ jsx30(
6393
6514
  ListRow,
6394
6515
  {
6395
6516
  title: item.title,
@@ -6405,13 +6526,13 @@ function HomeRoot(props2) {
6405
6526
  }
6406
6527
  var homeLayout = {
6407
6528
  Icon: HomeIcon,
6408
- Root: (props2) => /* @__PURE__ */ jsx29(HomeRoot, { ...props2 })
6529
+ Root: (props2) => /* @__PURE__ */ jsx30(HomeRoot, { ...props2 })
6409
6530
  };
6410
6531
 
6411
6532
  // src/ui/modules/news.tsx
6412
6533
  import { useEffect as useEffect12, useState as useState10 } from "preact/hooks";
6413
- import { jsx as jsx30, jsxs as jsxs25 } from "preact/jsx-runtime";
6414
- var p26 = BRAND.cssPrefix;
6534
+ import { jsx as jsx31, jsxs as jsxs26 } from "preact/jsx-runtime";
6535
+ var p28 = BRAND.cssPrefix;
6415
6536
  var log15 = logger.scope("news");
6416
6537
  function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
6417
6538
  const tags = config.contentTags;
@@ -6439,37 +6560,37 @@ function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
6439
6560
  };
6440
6561
  }, [transport, tags, reloadKey, bus]);
6441
6562
  function renderBody() {
6442
- if (state === "loading") return /* @__PURE__ */ jsx30(ModuleState, { message: strings.newsLoading, strings });
6563
+ if (state === "loading") return /* @__PURE__ */ jsx31(ModuleState, { message: strings.newsLoading, strings });
6443
6564
  if (state === "error") {
6444
- return /* @__PURE__ */ jsx30(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
6565
+ return /* @__PURE__ */ jsx31(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
6445
6566
  }
6446
- if (items.length === 0) return /* @__PURE__ */ jsx30(ModuleState, { message: strings.newsEmpty, strings });
6447
- return /* @__PURE__ */ jsx30("div", { class: `${p26}-news-list`, children: items.map((item) => /* @__PURE__ */ jsxs25(
6567
+ if (items.length === 0) return /* @__PURE__ */ jsx31(ModuleState, { message: strings.newsEmpty, strings });
6568
+ return /* @__PURE__ */ jsx31("div", { class: `${p28}-news-list`, children: items.map((item) => /* @__PURE__ */ jsxs26(
6448
6569
  "button",
6449
6570
  {
6450
6571
  type: "button",
6451
- class: `${p26}-news-card`,
6572
+ class: `${p28}-news-card`,
6452
6573
  onClick: () => nav.push({ kind: "content", id: item.id, title: item.title }),
6453
6574
  "data-testid": tid(TID.newsItem, item.id),
6454
6575
  children: [
6455
- item.image ? /* @__PURE__ */ jsx30("img", { class: `${p26}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
6456
- /* @__PURE__ */ jsxs25("span", { class: `${p26}-news-body`, children: [
6457
- /* @__PURE__ */ jsx30("span", { class: `${p26}-news-title`, children: item.title }),
6458
- item.description ? /* @__PURE__ */ jsx30("span", { class: `${p26}-news-summary`, children: item.description }) : null
6576
+ item.image ? /* @__PURE__ */ jsx31("img", { class: `${p28}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
6577
+ /* @__PURE__ */ jsxs26("span", { class: `${p28}-news-body`, children: [
6578
+ /* @__PURE__ */ jsx31("span", { class: `${p28}-news-title`, children: item.title }),
6579
+ item.description ? /* @__PURE__ */ jsx31("span", { class: `${p28}-news-summary`, children: item.description }) : null
6459
6580
  ] })
6460
6581
  ]
6461
6582
  },
6462
6583
  item.id
6463
6584
  )) });
6464
6585
  }
6465
- return /* @__PURE__ */ jsxs25("div", { class: `${p26}-module`, children: [
6466
- /* @__PURE__ */ jsx30(TitleBar, { title: strings.newsTitle, actions: /* @__PURE__ */ jsx30(HeaderActions, { panelProps, variant: "plain" }) }),
6467
- /* @__PURE__ */ jsx30("div", { class: `${p26}-module-scroll`, children: renderBody() })
6586
+ return /* @__PURE__ */ jsxs26("div", { class: `${p28}-module`, children: [
6587
+ /* @__PURE__ */ jsx31(TitleBar, { title: strings.newsTitle, actions: /* @__PURE__ */ jsx31(HeaderActions, { panelProps, variant: "plain" }) }),
6588
+ /* @__PURE__ */ jsx31("div", { class: `${p28}-module-scroll`, children: renderBody() })
6468
6589
  ] });
6469
6590
  }
6470
6591
  var newsLayout = {
6471
6592
  Icon: NewsIcon,
6472
- Root: (props2) => /* @__PURE__ */ jsx30(NewsRoot, { ...props2 })
6593
+ Root: (props2) => /* @__PURE__ */ jsx31(NewsRoot, { ...props2 })
6473
6594
  };
6474
6595
 
6475
6596
  // src/ui/modules/registry.ts
@@ -6481,28 +6602,28 @@ var LAYOUTS = {
6481
6602
  };
6482
6603
 
6483
6604
  // src/ui/home-tab-bar.tsx
6484
- import { jsx as jsx31, jsxs as jsxs26 } from "preact/jsx-runtime";
6485
- var p27 = BRAND.cssPrefix;
6605
+ import { jsx as jsx32, jsxs as jsxs27 } from "preact/jsx-runtime";
6606
+ var p29 = BRAND.cssPrefix;
6486
6607
  function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
6487
- return /* @__PURE__ */ jsx31("nav", { class: `${p27}-tabbar`, role: "tablist", "aria-label": strings.panelTitle, children: modules.map((m) => {
6608
+ return /* @__PURE__ */ jsx32("nav", { class: `${p29}-tabbar`, role: "tablist", "aria-label": strings.panelTitle, children: modules.map((m) => {
6488
6609
  const Icon = LAYOUTS[m.layout].Icon;
6489
6610
  const selected = m.id === activeTab;
6490
6611
  const badge = m.layout === "chat" && unreadCount > 0 ? unreadCount > 9 ? "9+" : String(unreadCount) : null;
6491
- return /* @__PURE__ */ jsxs26(
6612
+ return /* @__PURE__ */ jsxs27(
6492
6613
  "button",
6493
6614
  {
6494
6615
  type: "button",
6495
6616
  role: "tab",
6496
6617
  "aria-selected": selected,
6497
- class: `${p27}-tab`,
6618
+ class: `${p29}-tab`,
6498
6619
  onClick: () => onSelect(m.id),
6499
6620
  "data-testid": tid(TID.tab, m.id),
6500
6621
  children: [
6501
- /* @__PURE__ */ jsxs26("span", { class: `${p27}-tab-icon`, "aria-hidden": "true", children: [
6502
- /* @__PURE__ */ jsx31(Icon, {}),
6503
- badge ? /* @__PURE__ */ jsx31("span", { class: `${p27}-tab-badge`, "data-testid": TID.tabBadge, children: badge }) : null
6622
+ /* @__PURE__ */ jsxs27("span", { class: `${p29}-tab-icon`, "aria-hidden": "true", children: [
6623
+ /* @__PURE__ */ jsx32(Icon, {}),
6624
+ badge ? /* @__PURE__ */ jsx32("span", { class: `${p29}-tab-badge`, "data-testid": TID.tabBadge, children: badge }) : null
6504
6625
  ] }),
6505
- /* @__PURE__ */ jsx31("span", { class: `${p27}-tab-label`, children: localizeText(strings, m.label) })
6626
+ /* @__PURE__ */ jsx32("span", { class: `${p29}-tab-label`, children: localizeText(strings, m.label) })
6506
6627
  ]
6507
6628
  },
6508
6629
  m.id
@@ -6511,12 +6632,12 @@ function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
6511
6632
  }
6512
6633
 
6513
6634
  // src/ui/iframe-view.tsx
6514
- import { jsx as jsx32, jsxs as jsxs27 } from "preact/jsx-runtime";
6515
- var p28 = BRAND.cssPrefix;
6635
+ import { jsx as jsx33, jsxs as jsxs28 } from "preact/jsx-runtime";
6636
+ var p30 = BRAND.cssPrefix;
6516
6637
  var SANDBOX = "allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads";
6517
6638
  function IframeView({ url, title, strings, onBack, actions }) {
6518
- return /* @__PURE__ */ jsxs27("div", { class: `${p28}-module`, children: [
6519
- /* @__PURE__ */ jsx32(
6639
+ return /* @__PURE__ */ jsxs28("div", { class: `${p30}-module`, children: [
6640
+ /* @__PURE__ */ jsx33(
6520
6641
  BackHeader,
6521
6642
  {
6522
6643
  title: title || strings.moduleBack,
@@ -6525,10 +6646,10 @@ function IframeView({ url, title, strings, onBack, actions }) {
6525
6646
  actions
6526
6647
  }
6527
6648
  ),
6528
- /* @__PURE__ */ jsx32(
6649
+ /* @__PURE__ */ jsx33(
6529
6650
  "iframe",
6530
6651
  {
6531
- class: `${p28}-content-frame`,
6652
+ class: `${p30}-content-frame`,
6532
6653
  src: url,
6533
6654
  title: title || "content",
6534
6655
  sandbox: SANDBOX,
@@ -6542,8 +6663,8 @@ function IframeView({ url, title, strings, onBack, actions }) {
6542
6663
 
6543
6664
  // src/ui/content-view.tsx
6544
6665
  import { useCallback as useCallback3, useEffect as useEffect13, useState as useState11 } from "preact/hooks";
6545
- import { jsx as jsx33, jsxs as jsxs28 } from "preact/jsx-runtime";
6546
- var p29 = BRAND.cssPrefix;
6666
+ import { jsx as jsx34, jsxs as jsxs29 } from "preact/jsx-runtime";
6667
+ var p31 = BRAND.cssPrefix;
6547
6668
  var log16 = logger.scope("content");
6548
6669
  var READ_DWELL_MS = 5e3;
6549
6670
  function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
@@ -6587,16 +6708,16 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
6587
6708
  [bus, id]
6588
6709
  );
6589
6710
  function renderBody() {
6590
- if (failed) return /* @__PURE__ */ jsx33(ModuleState, { tone: "error", message: strings.errorGeneric, onRetry: retry, strings });
6591
- if (item === null) return /* @__PURE__ */ jsx33(ModuleState, { message: strings.contentLoading, strings });
6592
- return /* @__PURE__ */ jsxs28("article", { class: `${p29}-content`, "data-testid": TID.contentView, onClick: onArticleClick, children: [
6593
- item.image ? /* @__PURE__ */ jsx33("img", { class: `${p29}-content-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
6594
- item.description ? /* @__PURE__ */ jsx33("p", { class: `${p29}-content-subtitle`, children: item.description }) : null,
6595
- /* @__PURE__ */ jsx33(StaticMarkdown, { text: item.content ?? "" })
6711
+ if (failed) return /* @__PURE__ */ jsx34(ModuleState, { tone: "error", message: strings.errorGeneric, onRetry: retry, strings });
6712
+ if (item === null) return /* @__PURE__ */ jsx34(ModuleState, { message: strings.contentLoading, strings });
6713
+ return /* @__PURE__ */ jsxs29("article", { class: `${p31}-content`, "data-testid": TID.contentView, onClick: onArticleClick, children: [
6714
+ item.image ? /* @__PURE__ */ jsx34("img", { class: `${p31}-content-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
6715
+ item.description ? /* @__PURE__ */ jsx34("p", { class: `${p31}-content-subtitle`, children: item.description }) : null,
6716
+ /* @__PURE__ */ jsx34(StaticMarkdown, { text: item.content ?? "" })
6596
6717
  ] });
6597
6718
  }
6598
- return /* @__PURE__ */ jsxs28("div", { class: `${p29}-module`, children: [
6599
- /* @__PURE__ */ jsx33(
6719
+ return /* @__PURE__ */ jsxs29("div", { class: `${p31}-module`, children: [
6720
+ /* @__PURE__ */ jsx34(
6600
6721
  BackHeader,
6601
6722
  {
6602
6723
  title: item?.title || title || strings.moduleBack,
@@ -6606,13 +6727,13 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
6606
6727
  testid: TID.backHeader
6607
6728
  }
6608
6729
  ),
6609
- /* @__PURE__ */ jsx33("div", { class: `${p29}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
6730
+ /* @__PURE__ */ jsx34("div", { class: `${p31}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
6610
6731
  ] });
6611
6732
  }
6612
6733
 
6613
6734
  // src/ui/messenger-home.tsx
6614
- import { jsx as jsx34, jsxs as jsxs29 } from "preact/jsx-runtime";
6615
- var p30 = BRAND.cssPrefix;
6735
+ import { jsx as jsx35, jsxs as jsxs30 } from "preact/jsx-runtime";
6736
+ var p32 = BRAND.cssPrefix;
6616
6737
  function MessengerHome({
6617
6738
  panelProps,
6618
6739
  enabledModules,
@@ -6646,7 +6767,7 @@ function MessengerHome({
6646
6767
  }, []);
6647
6768
  const { visible: dragOver } = useFileDrop({ containerRef, onDrop: onDropItems });
6648
6769
  useDragMove(containerRef.current, options.mode === "modal");
6649
- const navState = useComputed6(() => nav.sig.value).value;
6770
+ const navState = useComputed7(() => nav.sig.value).value;
6650
6771
  const top = topScreen(navState);
6651
6772
  const activeModule = options.modules.byId[navState.activeTab];
6652
6773
  const isReader = top?.kind === "iframe" || top?.kind === "content";
@@ -6683,12 +6804,12 @@ function MessengerHome({
6683
6804
  bus,
6684
6805
  panelProps
6685
6806
  });
6686
- const plainActions = /* @__PURE__ */ jsx34(HeaderActions, { panelProps, variant: "plain" });
6807
+ const plainActions = /* @__PURE__ */ jsx35(HeaderActions, { panelProps, variant: "plain" });
6687
6808
  if (activeModule) visitedRef.current.add(activeModule.id);
6688
6809
  const visitedTabs = enabledModules.filter((m) => visitedRef.current.has(m.id));
6689
6810
  const tabRoot = (module) => {
6690
6811
  if (module.layout === "chat") {
6691
- return /* @__PURE__ */ jsx34(
6812
+ return /* @__PURE__ */ jsx35(
6692
6813
  PanelContent,
6693
6814
  {
6694
6815
  ...panelProps,
@@ -6699,14 +6820,14 @@ function MessengerHome({
6699
6820
  );
6700
6821
  }
6701
6822
  const Root = LAYOUTS[module.layout].Root;
6702
- return Root ? /* @__PURE__ */ jsx34(Root, { ...screenProps(module) }) : null;
6823
+ return Root ? /* @__PURE__ */ jsx35(Root, { ...screenProps(module) }) : null;
6703
6824
  };
6704
6825
  const renderReader = () => {
6705
6826
  if (top?.kind === "iframe") {
6706
- return /* @__PURE__ */ jsx34(IframeView, { url: top.url, title: top.title, strings, onBack: nav.pop, actions: plainActions });
6827
+ return /* @__PURE__ */ jsx35(IframeView, { url: top.url, title: top.title, strings, onBack: nav.pop, actions: plainActions });
6707
6828
  }
6708
6829
  if (top?.kind === "content") {
6709
- return /* @__PURE__ */ jsx34(
6830
+ return /* @__PURE__ */ jsx35(
6710
6831
  ContentView,
6711
6832
  {
6712
6833
  id: top.id,
@@ -6721,22 +6842,22 @@ function MessengerHome({
6721
6842
  }
6722
6843
  return null;
6723
6844
  };
6724
- return /* @__PURE__ */ jsxs29(
6845
+ return /* @__PURE__ */ jsxs30(
6725
6846
  "div",
6726
6847
  {
6727
6848
  ref: containerRef,
6728
- class: `${p30}-panel ${p30}-messenger`,
6849
+ class: `${p32}-panel ${p32}-messenger`,
6729
6850
  role: "dialog",
6730
6851
  "aria-modal": "false",
6731
6852
  "aria-label": strings.panelTitle,
6732
6853
  style: { position: "relative" },
6733
6854
  "data-testid": TID.messengerHome,
6734
6855
  children: [
6735
- /* @__PURE__ */ jsxs29("div", { class: `${p30}-messenger-body`, children: [
6736
- visitedTabs.map((m) => /* @__PURE__ */ jsx34("div", { class: `${p30}-messenger-pane`, hidden: isReader || m.id !== activeModule?.id, children: tabRoot(m) }, m.id)),
6856
+ /* @__PURE__ */ jsxs30("div", { class: `${p32}-messenger-body`, children: [
6857
+ visitedTabs.map((m) => /* @__PURE__ */ jsx35("div", { class: `${p32}-messenger-pane`, hidden: isReader || m.id !== activeModule?.id, children: tabRoot(m) }, m.id)),
6737
6858
  renderReader()
6738
6859
  ] }),
6739
- showTabBar ? /* @__PURE__ */ jsx34(
6860
+ showTabBar ? /* @__PURE__ */ jsx35(
6740
6861
  HomeTabBar,
6741
6862
  {
6742
6863
  modules: enabledModules,
@@ -6746,8 +6867,8 @@ function MessengerHome({
6746
6867
  onSelect: nav.switchTab
6747
6868
  }
6748
6869
  ) : null,
6749
- /* @__PURE__ */ jsx34(PoweredByBar, { poweredBy: options.poweredBy }),
6750
- options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */ jsx34(
6870
+ /* @__PURE__ */ jsx35(PoweredByBar, { poweredBy: options.poweredBy }),
6871
+ options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */ jsx35(
6751
6872
  ResizeGrip,
6752
6873
  {
6753
6874
  panelEl: containerRef.current,
@@ -6764,29 +6885,29 @@ function MessengerHome({
6764
6885
  }
6765
6886
 
6766
6887
  // src/ui/modules-empty.tsx
6767
- import { jsx as jsx35, jsxs as jsxs30 } from "preact/jsx-runtime";
6768
- var p31 = BRAND.cssPrefix;
6888
+ import { jsx as jsx36, jsxs as jsxs31 } from "preact/jsx-runtime";
6889
+ var p33 = BRAND.cssPrefix;
6769
6890
  function ModulesEmpty({ strings, onClose }) {
6770
- return /* @__PURE__ */ jsxs30(
6891
+ return /* @__PURE__ */ jsxs31(
6771
6892
  "div",
6772
6893
  {
6773
- class: `${p31}-panel ${p31}-modules-empty`,
6894
+ class: `${p33}-panel ${p33}-modules-empty`,
6774
6895
  role: "dialog",
6775
6896
  "aria-label": strings.panelTitle,
6776
6897
  "data-testid": TID.modulesEmpty,
6777
6898
  children: [
6778
- onClose ? /* @__PURE__ */ jsx35(
6899
+ onClose ? /* @__PURE__ */ jsx36(
6779
6900
  "button",
6780
6901
  {
6781
6902
  type: "button",
6782
- class: `${p31}-icon-btn ${p31}-modules-empty-close`,
6903
+ class: `${p33}-icon-btn ${p33}-modules-empty-close`,
6783
6904
  onClick: onClose,
6784
6905
  "aria-label": strings.close,
6785
6906
  title: strings.close,
6786
- children: /* @__PURE__ */ jsx35(CloseIcon, {})
6907
+ children: /* @__PURE__ */ jsx36(CloseIcon, {})
6787
6908
  }
6788
6909
  ) : null,
6789
- /* @__PURE__ */ jsx35("p", { class: `${p31}-modules-empty-text`, children: strings.modulesEmpty })
6910
+ /* @__PURE__ */ jsx36("p", { class: `${p33}-modules-empty-text`, children: strings.modulesEmpty })
6790
6911
  ]
6791
6912
  }
6792
6913
  );
@@ -6809,9 +6930,9 @@ function useLauncherCallout({ callout, persistence }) {
6809
6930
  }
6810
6931
 
6811
6932
  // src/ui/app.tsx
6812
- import { jsx as jsx36, jsxs as jsxs31 } from "preact/jsx-runtime";
6933
+ import { jsx as jsx37, jsxs as jsxs32 } from "preact/jsx-runtime";
6813
6934
  var log17 = logger.scope("app");
6814
- var p32 = BRAND.cssPrefix;
6935
+ var p34 = BRAND.cssPrefix;
6815
6936
  function makeLocalizedWelcome(w, strings) {
6816
6937
  return makeInstantWelcomeMessage({ ...w, text: localizeText(strings, w.text) });
6817
6938
  }
@@ -7353,7 +7474,7 @@ function App({ options, hostElement, bus }) {
7353
7474
  bus.emit("toolResult", { toolCallId });
7354
7475
  resolveTool(toolCallId, TRIGGER.toolResult, (part) => {
7355
7476
  part.outputSig.value = output;
7356
- part.stateSig.value = "output";
7477
+ part.stateSig.value = "output-available";
7357
7478
  });
7358
7479
  },
7359
7480
  [bus, resolveTool]
@@ -7365,7 +7486,7 @@ function App({ options, hostElement, bus }) {
7365
7486
  resolveTool(toolCallId, TRIGGER.toolApproval, (part) => {
7366
7487
  const id = part.approvalSig.value?.id ?? toolCallId;
7367
7488
  part.approvalSig.value = { id, approved, reason };
7368
- part.stateSig.value = "output";
7489
+ part.stateSig.value = "approval-responded";
7369
7490
  });
7370
7491
  },
7371
7492
  [bus, resolveTool]
@@ -7406,12 +7527,12 @@ function App({ options, hostElement, bus }) {
7406
7527
  void transport.submitForm({ formId: form.id, conversationId: activeConversationId, trigger, values, skipped });
7407
7528
  }
7408
7529
  });
7409
- const activeForm = useComputed7(() => forms.activeForm.value);
7530
+ const activeForm = useComputed8(() => forms.activeForm.value);
7410
7531
  useEffect16(() => {
7411
7532
  forms.refresh();
7412
7533
  }, [effectiveForms, forms]);
7413
7534
  const pageArea = options.pageContext?.area ? String(options.pageContext.area) : void 0;
7414
- const msgCount = useComputed7(() => messagesSig.value.length);
7535
+ const msgCount = useComputed8(() => messagesSig.value.length);
7415
7536
  useEffect16(() => {
7416
7537
  if (conversationReady && formsReady) forms.fire("pre-chat");
7417
7538
  }, [conversationReady, formsReady, forms]);
@@ -7675,6 +7796,7 @@ function App({ options, hostElement, bus }) {
7675
7796
  transport,
7676
7797
  feedback,
7677
7798
  bus,
7799
+ persistence,
7678
7800
  view,
7679
7801
  canSend,
7680
7802
  isStreaming: streaming,
@@ -7725,12 +7847,12 @@ function App({ options, hostElement, bus }) {
7725
7847
  const renderSurface = (size) => {
7726
7848
  const closeable = isActionVisible("close", effectiveOptions.mode, size);
7727
7849
  if (enabledModules.length === 0) {
7728
- return /* @__PURE__ */ jsx36(ModulesEmpty, { strings: effectiveOptions.strings, onClose: closeable ? handleClose : void 0 });
7850
+ return /* @__PURE__ */ jsx37(ModulesEmpty, { strings: effectiveOptions.strings, onClose: closeable ? handleClose : void 0 });
7729
7851
  }
7730
7852
  if (enabledModules.length === 1 && enabledModules[0]?.layout === "chat") {
7731
- return /* @__PURE__ */ jsx36(Panel, { ...panelProps, panelSize: size });
7853
+ return /* @__PURE__ */ jsx37(Panel, { ...panelProps, panelSize: size });
7732
7854
  }
7733
- return /* @__PURE__ */ jsx36(
7855
+ return /* @__PURE__ */ jsx37(
7734
7856
  MessengerHome,
7735
7857
  {
7736
7858
  panelProps: { ...panelProps, panelSize: size, onClose: closeable ? handleClose : void 0 },
@@ -7749,7 +7871,7 @@ function App({ options, hostElement, bus }) {
7749
7871
  void handleSelectHistoryConversation(chat.conversationId);
7750
7872
  };
7751
7873
  const conversationsEnabled = enabledModules.some((m) => m.layout === "chat");
7752
- return /* @__PURE__ */ jsx36("div", { class: `${p32}-anchor`, children: /* @__PURE__ */ jsx36(
7874
+ return /* @__PURE__ */ jsx37("div", { class: `${p34}-anchor`, children: /* @__PURE__ */ jsx37(
7753
7875
  PageShell,
7754
7876
  {
7755
7877
  site: parsedSite,
@@ -7757,6 +7879,7 @@ function App({ options, hostElement, bus }) {
7757
7879
  transport,
7758
7880
  strings: effectiveOptions.strings,
7759
7881
  locale: effectiveOptions.locale,
7882
+ persistence,
7760
7883
  visitorId,
7761
7884
  showConversations: conversationsEnabled,
7762
7885
  onSelectConversation: onSelectConversationFromSidebar,
@@ -7769,15 +7892,15 @@ function App({ options, hostElement, bus }) {
7769
7892
  }
7770
7893
  if (isInlineLike) {
7771
7894
  const inlineSize = options.mode === "standalone" ? "fullscreen" : panelSize;
7772
- return /* @__PURE__ */ jsx36("div", { class: `${p32}-anchor`, children: renderSurface(inlineSize) });
7895
+ return /* @__PURE__ */ jsx37("div", { class: `${p34}-anchor`, children: renderSurface(inlineSize) });
7773
7896
  }
7774
7897
  const drawerEdgeTab = options.mode === "drawer";
7775
7898
  const triggerOwnedByPage = options.mode === "modal";
7776
7899
  const launcherVisible = !triggerOwnedByPage && !options.launcher.hidden && (!isOpen || launcherLeaving);
7777
7900
  const calloutToRender = launcherVisible && !launcherLeaving && !calloutDismissed && !drawerEdgeTab ? effectiveOptions.launcher.callout : null;
7778
- return /* @__PURE__ */ jsxs31("div", { class: `${p32}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
7779
- isOpen || activated ? /* @__PURE__ */ jsx36("div", { class: `${p32}-surface`, hidden: !isOpen, children: renderSurface(panelSize) }) : null,
7780
- launcherVisible ? /* @__PURE__ */ jsx36(
7901
+ return /* @__PURE__ */ jsxs32("div", { class: `${p34}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
7902
+ isOpen || activated ? /* @__PURE__ */ jsx37("div", { class: `${p34}-surface`, hidden: !isOpen, children: renderSurface(panelSize) }) : null,
7903
+ launcherVisible ? /* @__PURE__ */ jsx37(
7781
7904
  Launcher,
7782
7905
  {
7783
7906
  onToggle: handleOpen,
@@ -7787,7 +7910,7 @@ function App({ options, hostElement, bus }) {
7787
7910
  edgeTab: drawerEdgeTab
7788
7911
  }
7789
7912
  ) : null,
7790
- calloutToRender ? /* @__PURE__ */ jsx36(
7913
+ calloutToRender ? /* @__PURE__ */ jsx37(
7791
7914
  LauncherCallout,
7792
7915
  {
7793
7916
  callout: calloutToRender,
@@ -7852,34 +7975,34 @@ var TRACKED = {
7852
7975
  expand: (on) => ({ on }),
7853
7976
  fullscreen: (on) => ({ on }),
7854
7977
  // Conversation funnel. `send` is the key conversion; text never rides.
7855
- send: (p33) => ({ attachments: p33.attachmentCount }),
7856
- message: (p33) => ({ role: p33.role }),
7978
+ send: (p35) => ({ attachments: p35.attachmentCount }),
7979
+ message: (p35) => ({ role: p35.role }),
7857
7980
  stop: () => void 0,
7858
7981
  clear: () => void 0,
7859
7982
  suggestion: () => void 0,
7860
- toggleHistory: (p33) => ({ view: p33.view }),
7983
+ toggleHistory: (p35) => ({ view: p35.view }),
7861
7984
  handshake: () => void 0,
7862
7985
  // Forms + human-in-the-loop — ids and outcomes, never values.
7863
- formSubmit: (p33) => ({ formId: p33.formId, skipped: p33.skipped }),
7986
+ formSubmit: (p35) => ({ formId: p35.formId, skipped: p35.skipped }),
7864
7987
  toolResult: () => void 0,
7865
- toolDecision: (p33) => ({ approved: p33.approved }),
7988
+ toolDecision: (p35) => ({ approved: p35.approved }),
7866
7989
  // Content — ids, tags + counts only; titles/bodies never ride.
7867
- contentView: (p33) => ({ section: p33.section, tags: p33.tags, count: p33.count }),
7868
- contentOpen: (p33) => ({ contentId: p33.contentId, tags: p33.tags }),
7869
- contentSearch: (p33) => ({ qlen: p33.queryLength, hits: p33.hitCount }),
7870
- contentRead: (p33) => ({ contentId: p33.contentId }),
7871
- contentLinkClick: (p33) => ({ contentId: p33.contentId }),
7990
+ contentView: (p35) => ({ section: p35.section, tags: p35.tags, count: p35.count }),
7991
+ contentOpen: (p35) => ({ contentId: p35.contentId, tags: p35.tags }),
7992
+ contentSearch: (p35) => ({ qlen: p35.queryLength, hits: p35.hitCount }),
7993
+ contentRead: (p35) => ({ contentId: p35.contentId }),
7994
+ contentLinkClick: (p35) => ({ contentId: p35.contentId }),
7872
7995
  // Composer / attachments / voice.
7873
- attach: (p33) => ({ count: p33.count, bytes: p33.totalBytes }),
7996
+ attach: (p35) => ({ count: p35.count, bytes: p35.totalBytes }),
7874
7997
  voiceStart: () => void 0,
7875
- voiceStop: (p33) => ({ ms: p33.durationMs }),
7998
+ voiceStop: (p35) => ({ ms: p35.durationMs }),
7876
7999
  voiceCancel: () => void 0,
7877
8000
  // Preferences — how visitors tune the surface.
7878
8001
  localeChange: (locale) => ({ locale }),
7879
8002
  themeChange: (theme) => ({ theme }),
7880
8003
  textSizeChange: (size) => ({ size }),
7881
- soundToggle: (p33) => ({ muted: p33.muted }),
7882
- sidebarToggle: (p33) => ({ collapsed: p33.collapsed }),
8004
+ soundToggle: (p35) => ({ muted: p35.muted }),
8005
+ sidebarToggle: (p35) => ({ collapsed: p35.collapsed }),
7883
8006
  calloutDismiss: () => void 0,
7884
8007
  // Health signal only — the error object itself never leaves the page.
7885
8008
  error: () => void 0