@helpai/elements 0.54.2 → 0.54.3

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
@@ -29,7 +29,7 @@ var BRAND = {
29
29
  };
30
30
 
31
31
  // src/core/version.ts
32
- var ELEMENTS_VERSION = true ? "0.54.2" : "0.0.0-dev";
32
+ var ELEMENTS_VERSION = true ? "0.54.3" : "0.0.0-dev";
33
33
  var ELEMENTS_VERSION_PARAM = "_ev";
34
34
 
35
35
  // src/i18n/strings.ts
@@ -1727,22 +1727,22 @@ function attachAdoptedSheet(shadow, doc) {
1727
1727
  }
1728
1728
  }
1729
1729
  function applyThemeOverrides(host, overrides) {
1730
- const p36 = BRAND.cssPrefix;
1731
- if (overrides.accent) host.style.setProperty(`--${p36}-accent-user`, overrides.accent);
1732
- if (overrides.accentText) host.style.setProperty(`--${p36}-accent-text-user`, overrides.accentText);
1733
- if (overrides.radius) host.style.setProperty(`--${p36}-radius`, overrides.radius);
1734
- if (overrides.fontFamily) host.style.setProperty(`--${p36}-font`, overrides.fontFamily);
1730
+ const p35 = BRAND.cssPrefix;
1731
+ if (overrides.accent) host.style.setProperty(`--${p35}-accent-user`, overrides.accent);
1732
+ if (overrides.accentText) host.style.setProperty(`--${p35}-accent-text-user`, overrides.accentText);
1733
+ if (overrides.radius) host.style.setProperty(`--${p35}-radius`, overrides.radius);
1734
+ if (overrides.fontFamily) host.style.setProperty(`--${p35}-font`, overrides.fontFamily);
1735
1735
  }
1736
1736
  function applyThemeMode(host, mode) {
1737
1737
  host.dataset.theme = mode;
1738
1738
  }
1739
1739
  function applySize(host, size) {
1740
- const p36 = BRAND.cssPrefix;
1741
- if (size.width !== void 0) host.style.setProperty(`--${p36}-panel-w`, size.width);
1742
- if (size.height !== void 0) host.style.setProperty(`--${p36}-panel-h`, size.height);
1743
- if (size.expanded?.width !== void 0) host.style.setProperty(`--${p36}-expanded-w`, size.expanded.width);
1744
- if (size.expanded?.height !== void 0) host.style.setProperty(`--${p36}-expanded-h`, size.expanded.height);
1745
- if (size.inset !== void 0) host.style.setProperty(`--${p36}-panel-inset`, size.inset);
1740
+ const p35 = BRAND.cssPrefix;
1741
+ if (size.width !== void 0) host.style.setProperty(`--${p35}-panel-w`, size.width);
1742
+ if (size.height !== void 0) host.style.setProperty(`--${p35}-panel-h`, size.height);
1743
+ if (size.expanded?.width !== void 0) host.style.setProperty(`--${p35}-expanded-w`, size.expanded.width);
1744
+ if (size.expanded?.height !== void 0) host.style.setProperty(`--${p35}-expanded-h`, size.expanded.height);
1745
+ if (size.inset !== void 0) host.style.setProperty(`--${p35}-panel-inset`, size.inset);
1746
1746
  }
1747
1747
  function applyPosition(host, pos) {
1748
1748
  host.dataset.position = pos;
@@ -1858,7 +1858,7 @@ import { h, render as renderPreact } from "preact";
1858
1858
 
1859
1859
  // src/ui/app.tsx
1860
1860
  import { useCallback as useCallback6, useEffect as useEffect16, useLayoutEffect as useLayoutEffect3, useMemo as useMemo3, useRef as useRef9, useState as useState13 } from "preact/hooks";
1861
- import { batch, useComputed as useComputed8, useSignal } from "@preact/signals";
1861
+ import { batch, useComputed as useComputed9, useSignal } from "@preact/signals";
1862
1862
 
1863
1863
  // src/core/handshake-shape.ts
1864
1864
  function isPlainObject2(raw) {
@@ -2006,11 +2006,11 @@ function toBase64Url(json) {
2006
2006
  var nonEmpty = (ctx) => ctx && Object.keys(ctx).length > 0 ? ctx : void 0;
2007
2007
  function encodeContext(user, page) {
2008
2008
  const u = nonEmpty(user);
2009
- const p36 = nonEmpty(page);
2010
- if (!u && !p36) return void 0;
2009
+ const p35 = nonEmpty(page);
2010
+ if (!u && !p35) return void 0;
2011
2011
  const envelope = {};
2012
2012
  if (u) envelope.user = u;
2013
- if (p36) envelope.page = p36;
2013
+ if (p35) envelope.page = p35;
2014
2014
  return toBase64Url(JSON.stringify(envelope));
2015
2015
  }
2016
2016
 
@@ -2110,8 +2110,8 @@ function buildSendMessageRequest(params) {
2110
2110
  if (tools?.length) body.data = { tools };
2111
2111
  return body;
2112
2112
  }
2113
- function isResolvedToolPart(p36) {
2114
- return p36.state === "output-available" || p36.state === "output-error" || p36.state === "output-denied" || p36.approval?.approved !== void 0;
2113
+ function isResolvedToolPart(p35) {
2114
+ return p35.state === "output-available" || p35.state === "output-error" || p35.state === "output-denied" || p35.approval?.approved !== void 0;
2115
2115
  }
2116
2116
  function normalizeToolRef(ref) {
2117
2117
  if (typeof ref === "string") return ref ? { code: ref } : null;
@@ -2119,29 +2119,29 @@ function normalizeToolRef(ref) {
2119
2119
  }
2120
2120
  function messageToWireParts(m) {
2121
2121
  const out = [];
2122
- for (const p36 of m.parts) {
2123
- if (p36.kind === "step-start") {
2122
+ for (const p35 of m.parts) {
2123
+ if (p35.kind === "step-start") {
2124
2124
  out.push({ type: "step-start" });
2125
2125
  }
2126
- if (p36.kind === "reasoning" && p36.text) {
2127
- out.push({ type: "reasoning", text: p36.text, state: p36.done ? "done" : "streaming" });
2126
+ if (p35.kind === "reasoning" && p35.text) {
2127
+ out.push({ type: "reasoning", text: p35.text, state: p35.done ? "done" : "streaming" });
2128
2128
  }
2129
- if (p36.kind === "text" && p36.text) {
2130
- out.push({ text: p36.text, type: "text" });
2129
+ if (p35.kind === "text" && p35.text) {
2130
+ out.push({ text: p35.text, type: "text" });
2131
2131
  }
2132
- if (p36.kind === "file" && p36.url) {
2133
- out.push({ mediaType: p36.mediaType, type: "file", url: p36.url });
2132
+ if (p35.kind === "file" && p35.url) {
2133
+ out.push({ mediaType: p35.mediaType, type: "file", url: p35.url });
2134
2134
  }
2135
- if (p36.kind === "tool" && isResolvedToolPart(p36)) {
2135
+ if (p35.kind === "tool" && isResolvedToolPart(p35)) {
2136
2136
  const part = {
2137
- type: toolPartType(p36.toolName),
2138
- toolCallId: p36.toolCallId,
2139
- state: p36.state
2137
+ type: toolPartType(p35.toolName),
2138
+ toolCallId: p35.toolCallId,
2139
+ state: p35.state
2140
2140
  };
2141
- if (p36.input !== void 0) part.input = p36.input;
2142
- if (p36.output !== void 0) part.output = p36.output;
2143
- if (p36.error !== void 0) part.errorText = p36.error;
2144
- if (p36.approval && p36.approval.approved !== void 0) part.approval = p36.approval;
2141
+ if (p35.input !== void 0) part.input = p35.input;
2142
+ if (p35.output !== void 0) part.output = p35.output;
2143
+ if (p35.error !== void 0) part.errorText = p35.error;
2144
+ if (p35.approval && p35.approval.approved !== void 0) part.approval = p35.approval;
2145
2145
  out.push(part);
2146
2146
  }
2147
2147
  }
@@ -2899,7 +2899,7 @@ function fromWireMessage(w) {
2899
2899
  };
2900
2900
  }
2901
2901
  return null;
2902
- }).filter((p36) => p36 !== null);
2902
+ }).filter((p35) => p35 !== null);
2903
2903
  return {
2904
2904
  id: w.id,
2905
2905
  role: w.role,
@@ -2953,7 +2953,7 @@ function assistantText(m) {
2953
2953
  }
2954
2954
  function hasNoVisibleAnswer(m) {
2955
2955
  if (assistantText(m).trim() !== "") return false;
2956
- return !m.partsSig.value.some((p36) => p36.kind === "tool" || p36.kind === "file" || p36.kind === "source");
2956
+ return !m.partsSig.value.some((p35) => p35.kind === "tool" || p35.kind === "file" || p35.kind === "source");
2957
2957
  }
2958
2958
  function isEmptyAssistantReply(m) {
2959
2959
  return m.role === "assistant" && m.status !== "streaming" && hasNoVisibleAnswer(m);
@@ -2961,43 +2961,43 @@ function isEmptyAssistantReply(m) {
2961
2961
  function isHiddenCanceledTurn(m) {
2962
2962
  return m.canceled === true && isEmptyAssistantReply(m);
2963
2963
  }
2964
- function partToReactive(p36) {
2965
- if (p36.kind === "text" || p36.kind === "reasoning") {
2966
- return { kind: p36.kind, id: p36.id, textSig: signal(p36.text), doneSig: signal(p36.done) };
2964
+ function partToReactive(p35) {
2965
+ if (p35.kind === "text" || p35.kind === "reasoning") {
2966
+ return { kind: p35.kind, id: p35.id, textSig: signal(p35.text), doneSig: signal(p35.done) };
2967
2967
  }
2968
- if (p36.kind === "tool") {
2968
+ if (p35.kind === "tool") {
2969
2969
  return {
2970
2970
  kind: "tool",
2971
- toolCallId: p36.toolCallId,
2972
- toolName: p36.toolName,
2973
- inputPartialSig: signal(p36.inputPartial),
2974
- inputSig: signal(p36.input),
2975
- outputSig: signal(p36.output),
2976
- errorSig: signal(p36.error),
2977
- stateSig: signal(p36.state),
2978
- approvalSig: signal(p36.approval)
2971
+ toolCallId: p35.toolCallId,
2972
+ toolName: p35.toolName,
2973
+ inputPartialSig: signal(p35.inputPartial),
2974
+ inputSig: signal(p35.input),
2975
+ outputSig: signal(p35.output),
2976
+ errorSig: signal(p35.error),
2977
+ stateSig: signal(p35.state),
2978
+ approvalSig: signal(p35.approval)
2979
2979
  };
2980
2980
  }
2981
- return p36;
2981
+ return p35;
2982
2982
  }
2983
- function partFromReactive(p36) {
2984
- if (p36.kind === "text" || p36.kind === "reasoning") {
2985
- return { kind: p36.kind, id: p36.id, text: p36.textSig.value, done: p36.doneSig.value };
2983
+ function partFromReactive(p35) {
2984
+ if (p35.kind === "text" || p35.kind === "reasoning") {
2985
+ return { kind: p35.kind, id: p35.id, text: p35.textSig.value, done: p35.doneSig.value };
2986
2986
  }
2987
- if (p36.kind === "tool") {
2987
+ if (p35.kind === "tool") {
2988
2988
  return {
2989
2989
  kind: "tool",
2990
- toolCallId: p36.toolCallId,
2991
- toolName: p36.toolName,
2992
- inputPartial: p36.inputPartialSig.value,
2993
- input: p36.inputSig.value,
2994
- output: p36.outputSig.value,
2995
- error: p36.errorSig.value,
2996
- state: p36.stateSig.value,
2997
- approval: p36.approvalSig.value
2990
+ toolCallId: p35.toolCallId,
2991
+ toolName: p35.toolName,
2992
+ inputPartial: p35.inputPartialSig.value,
2993
+ input: p35.inputSig.value,
2994
+ output: p35.outputSig.value,
2995
+ error: p35.errorSig.value,
2996
+ state: p35.stateSig.value,
2997
+ approval: p35.approvalSig.value
2998
2998
  };
2999
2999
  }
3000
- return p36;
3000
+ return p35;
3001
3001
  }
3002
3002
 
3003
3003
  // src/stream/reducer.ts
@@ -3076,8 +3076,8 @@ var StreamReducer = class {
3076
3076
  this.ensureTextPart(m, "text", chunk.id);
3077
3077
  return;
3078
3078
  case "text-delta": {
3079
- const p36 = this.ensureTextPart(m, "text", chunk.id);
3080
- p36.textSig.value += chunk.delta;
3079
+ const p35 = this.ensureTextPart(m, "text", chunk.id);
3080
+ p35.textSig.value += chunk.delta;
3081
3081
  return;
3082
3082
  }
3083
3083
  case "text-end":
@@ -3087,8 +3087,8 @@ var StreamReducer = class {
3087
3087
  this.ensureTextPart(m, "reasoning", chunk.id).doneSig.value = false;
3088
3088
  return;
3089
3089
  case "reasoning-delta": {
3090
- const p36 = this.ensureTextPart(m, "reasoning", chunk.id);
3091
- p36.textSig.value += chunk.delta;
3090
+ const p35 = this.ensureTextPart(m, "reasoning", chunk.id);
3091
+ p35.textSig.value += chunk.delta;
3092
3092
  return;
3093
3093
  }
3094
3094
  case "reasoning-end":
@@ -3140,7 +3140,7 @@ var StreamReducer = class {
3140
3140
  }
3141
3141
  };
3142
3142
  function ensureToolPart(m, toolCallId, toolName2) {
3143
- const existing = m.partsSig.value.find((p36) => p36.kind === "tool" && p36.toolCallId === toolCallId);
3143
+ const existing = m.partsSig.value.find((p35) => p35.kind === "tool" && p35.toolCallId === toolCallId);
3144
3144
  if (existing) return existing;
3145
3145
  const part = {
3146
3146
  kind: "tool",
@@ -3160,7 +3160,7 @@ function appendPart(m, part) {
3160
3160
  m.partsSig.value = [...m.partsSig.value, part];
3161
3161
  }
3162
3162
  function appendSource(m, source) {
3163
- if (m.partsSig.value.some((p36) => p36.kind === "source" && p36.sourceId === source.sourceId)) return;
3163
+ if (m.partsSig.value.some((p35) => p35.kind === "source" && p35.sourceId === source.sourceId)) return;
3164
3164
  appendPart(m, source);
3165
3165
  }
3166
3166
  function applyTool(m, chunk) {
@@ -3169,37 +3169,37 @@ function applyTool(m, chunk) {
3169
3169
  ensureToolPart(m, chunk.toolCallId, chunk.toolName);
3170
3170
  return;
3171
3171
  case "tool-input-delta": {
3172
- const p36 = ensureToolPart(m, chunk.toolCallId);
3173
- p36.inputPartialSig.value += chunk.inputTextDelta;
3172
+ const p35 = ensureToolPart(m, chunk.toolCallId);
3173
+ p35.inputPartialSig.value += chunk.inputTextDelta;
3174
3174
  return;
3175
3175
  }
3176
3176
  case "tool-input-available": {
3177
- const p36 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
3178
- p36.inputSig.value = chunk.input;
3179
- p36.stateSig.value = "input-available";
3177
+ const p35 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
3178
+ p35.inputSig.value = chunk.input;
3179
+ p35.stateSig.value = "input-available";
3180
3180
  return;
3181
3181
  }
3182
3182
  case "tool-approval-request": {
3183
- const p36 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
3184
- p36.approvalSig.value = { id: chunk.approvalId };
3185
- p36.stateSig.value = "approval-requested";
3183
+ const p35 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
3184
+ p35.approvalSig.value = { id: chunk.approvalId };
3185
+ p35.stateSig.value = "approval-requested";
3186
3186
  return;
3187
3187
  }
3188
3188
  case "tool-output-available": {
3189
- const p36 = ensureToolPart(m, chunk.toolCallId);
3190
- p36.outputSig.value = chunk.output;
3191
- p36.stateSig.value = "output-available";
3189
+ const p35 = ensureToolPart(m, chunk.toolCallId);
3190
+ p35.outputSig.value = chunk.output;
3191
+ p35.stateSig.value = "output-available";
3192
3192
  return;
3193
3193
  }
3194
3194
  case "tool-output-error": {
3195
- const p36 = ensureToolPart(m, chunk.toolCallId);
3196
- p36.errorSig.value = chunk.errorText;
3197
- p36.stateSig.value = "output-error";
3195
+ const p35 = ensureToolPart(m, chunk.toolCallId);
3196
+ p35.errorSig.value = chunk.errorText;
3197
+ p35.stateSig.value = "output-error";
3198
3198
  return;
3199
3199
  }
3200
3200
  case "tool-output-denied": {
3201
- const p36 = ensureToolPart(m, chunk.toolCallId);
3202
- p36.stateSig.value = "output-denied";
3201
+ const p35 = ensureToolPart(m, chunk.toolCallId);
3202
+ p35.stateSig.value = "output-denied";
3203
3203
  return;
3204
3204
  }
3205
3205
  default:
@@ -3911,24 +3911,24 @@ import { useCallback as useCallback2, useEffect as useEffect9, useRef as useRef6
3911
3911
  import { useEffect as useEffect2, useRef } from "preact/hooks";
3912
3912
  import { jsx as jsx3 } from "preact/jsx-runtime";
3913
3913
  function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, strings }) {
3914
- const p36 = BRAND.cssPrefix;
3914
+ const p35 = BRAND.cssPrefix;
3915
3915
  const dragRef = useRef(null);
3916
3916
  useEffect2(() => {
3917
3917
  if (!panelEl) return;
3918
3918
  const style = panelEl.style;
3919
- if (resize.minWidth) style.setProperty(`--${p36}-resize-min-w`, resize.minWidth);
3920
- if (resize.maxWidth) style.setProperty(`--${p36}-resize-max-w`, resize.maxWidth);
3921
- if (resize.minHeight) style.setProperty(`--${p36}-resize-min-h`, resize.minHeight);
3922
- if (resize.maxHeight) style.setProperty(`--${p36}-resize-max-h`, resize.maxHeight);
3919
+ if (resize.minWidth) style.setProperty(`--${p35}-resize-min-w`, resize.minWidth);
3920
+ if (resize.maxWidth) style.setProperty(`--${p35}-resize-max-w`, resize.maxWidth);
3921
+ if (resize.minHeight) style.setProperty(`--${p35}-resize-min-h`, resize.minHeight);
3922
+ if (resize.maxHeight) style.setProperty(`--${p35}-resize-max-h`, resize.maxHeight);
3923
3923
  if (initialSize) {
3924
- style.setProperty(`--${p36}-widget-w`, `${initialSize.width}px`);
3925
- style.setProperty(`--${p36}-widget-h`, `${initialSize.height}px`);
3924
+ style.setProperty(`--${p35}-widget-w`, `${initialSize.width}px`);
3925
+ style.setProperty(`--${p35}-widget-h`, `${initialSize.height}px`);
3926
3926
  }
3927
- }, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight, p36, initialSize]);
3927
+ }, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight, p35, initialSize]);
3928
3928
  if (!panelEl) return null;
3929
3929
  const isTop = position.startsWith("top-");
3930
3930
  const isRight = position.endsWith("-right");
3931
- const cornerClass = `${p36}-resize-grip ${p36}-resize-grip--${isTop ? "bottom" : "top"}-${isRight ? "left" : "right"}`;
3931
+ const cornerClass = `${p35}-resize-grip ${p35}-resize-grip--${isTop ? "bottom" : "top"}-${isRight ? "left" : "right"}`;
3932
3932
  const onPointerDown = (e) => {
3933
3933
  if (!panelEl) return;
3934
3934
  const target = e.currentTarget;
@@ -3953,8 +3953,8 @@ function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, stri
3953
3953
  if (!d || e.pointerId !== d.pointerId || !panelEl) return;
3954
3954
  const dx = (e.clientX - d.startX) * d.dirX;
3955
3955
  const dy = (e.clientY - d.startY) * d.dirY;
3956
- panelEl.style.setProperty(`--${p36}-widget-w`, `${d.startW + dx}px`);
3957
- panelEl.style.setProperty(`--${p36}-widget-h`, `${d.startH + dy}px`);
3956
+ panelEl.style.setProperty(`--${p35}-widget-w`, `${d.startW + dx}px`);
3957
+ panelEl.style.setProperty(`--${p35}-widget-h`, `${d.startH + dy}px`);
3958
3958
  };
3959
3959
  const onPointerUp = (e) => {
3960
3960
  const d = dragRef.current;
@@ -4691,7 +4691,7 @@ function usePopoverMenu({ itemCount, initialFocusIndex }) {
4691
4691
  // src/ui/overflow-menu.tsx
4692
4692
  import { jsx as jsx8, jsxs as jsxs6 } from "preact/jsx-runtime";
4693
4693
  function OverflowMenu({ items, triggerLabel }) {
4694
- const p36 = BRAND.cssPrefix;
4694
+ const p35 = BRAND.cssPrefix;
4695
4695
  const menu = usePopoverMenu({ itemCount: items.length });
4696
4696
  const handleSelect = (item) => {
4697
4697
  if (item.disabled) return;
@@ -4714,13 +4714,13 @@ function OverflowMenu({ items, triggerLabel }) {
4714
4714
  e.stopPropagation();
4715
4715
  pickSegment(item, segs[next].value);
4716
4716
  };
4717
- return /* @__PURE__ */ jsxs6("div", { class: `${p36}-menu-wrap`, children: [
4717
+ return /* @__PURE__ */ jsxs6("div", { class: `${p35}-menu-wrap`, children: [
4718
4718
  /* @__PURE__ */ jsx8(
4719
4719
  "button",
4720
4720
  {
4721
4721
  ref: menu.triggerRef,
4722
4722
  type: "button",
4723
- class: `${p36}-icon-btn`,
4723
+ class: `${p35}-icon-btn`,
4724
4724
  "aria-label": triggerLabel,
4725
4725
  "aria-haspopup": "menu",
4726
4726
  "aria-expanded": menu.open,
@@ -4734,7 +4734,7 @@ function OverflowMenu({ items, triggerLabel }) {
4734
4734
  "div",
4735
4735
  {
4736
4736
  ref: menu.menuRef,
4737
- class: `${p36}-menu`,
4737
+ class: `${p35}-menu`,
4738
4738
  role: "menu",
4739
4739
  "aria-label": triggerLabel,
4740
4740
  onKeyDown: menu.onMenuKey,
@@ -4744,14 +4744,14 @@ function OverflowMenu({ items, triggerLabel }) {
4744
4744
  "div",
4745
4745
  {
4746
4746
  role: "menuitem",
4747
- class: `${p36}-menu-item ${p36}-menu-item-segmented`,
4747
+ class: `${p35}-menu-item ${p35}-menu-item-segmented`,
4748
4748
  "aria-label": item.label,
4749
4749
  tabIndex: -1,
4750
4750
  onKeyDown: (e) => onSegmentRowKey(e, item),
4751
4751
  children: [
4752
- item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-icon`, children: item.icon }) : null,
4753
- /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-label`, children: item.label }),
4754
- /* @__PURE__ */ jsx8("span", { class: `${p36}-segmented`, role: "group", "aria-label": item.label, children: item.segments.map((seg) => {
4752
+ item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-icon`, children: item.icon }) : null,
4753
+ /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-label`, children: item.label }),
4754
+ /* @__PURE__ */ jsx8("span", { class: `${p35}-segmented`, role: "group", "aria-label": item.label, children: item.segments.map((seg) => {
4755
4755
  const active = seg.value === item.value;
4756
4756
  return /* @__PURE__ */ jsx8(
4757
4757
  "button",
@@ -4759,7 +4759,7 @@ function OverflowMenu({ items, triggerLabel }) {
4759
4759
  type: "button",
4760
4760
  role: "menuitemradio",
4761
4761
  "aria-checked": active,
4762
- class: `${p36}-segment`,
4762
+ class: `${p35}-segment`,
4763
4763
  "data-on": active ? "true" : void 0,
4764
4764
  lang: seg.lang,
4765
4765
  title: seg.value,
@@ -4779,14 +4779,14 @@ function OverflowMenu({ items, triggerLabel }) {
4779
4779
  {
4780
4780
  type: "button",
4781
4781
  role: "menuitem",
4782
- class: `${p36}-menu-item`,
4782
+ class: `${p35}-menu-item`,
4783
4783
  "aria-pressed": item.type === "switch" ? item.on : void 0,
4784
4784
  disabled: item.disabled,
4785
4785
  onClick: () => handleSelect(item),
4786
4786
  children: [
4787
- item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-icon`, children: item.icon }) : null,
4788
- /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-label`, children: item.label }),
4789
- item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-check`, "aria-hidden": "true", children: /* @__PURE__ */ jsx8(CheckIcon, {}) }) : null
4787
+ item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-icon`, children: item.icon }) : null,
4788
+ /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-label`, children: item.label }),
4789
+ item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${p35}-menu-check`, "aria-hidden": "true", children: /* @__PURE__ */ jsx8(CheckIcon, {}) }) : null
4790
4790
  ]
4791
4791
  },
4792
4792
  item.id
@@ -4938,7 +4938,7 @@ function HeaderActions({ panelProps, variant }) {
4938
4938
 
4939
4939
  // src/ui/message-list.tsx
4940
4940
  import { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState6 } from "preact/hooks";
4941
- import { useComputed as useComputed6 } from "@preact/signals";
4941
+ import { useComputed as useComputed7 } from "@preact/signals";
4942
4942
 
4943
4943
  // src/ui/form/dynamic-form.tsx
4944
4944
  import { useState as useState5 } from "preact/hooks";
@@ -5334,7 +5334,7 @@ function FormDoneMarker({
5334
5334
  }
5335
5335
 
5336
5336
  // src/ui/message-bubble.tsx
5337
- import { useComputed as useComputed5 } from "@preact/signals";
5337
+ import { useComputed as useComputed6 } from "@preact/signals";
5338
5338
 
5339
5339
  // src/stream/constants.ts
5340
5340
  function isAskUserQuestionsTool(toolName2) {
@@ -5432,9 +5432,10 @@ function SourceView({ part, strings }) {
5432
5432
  }
5433
5433
 
5434
5434
  // src/ui/tool-approval.tsx
5435
- import { useComputed as useComputed2 } from "@preact/signals";
5435
+ import { useComputed as useComputed3 } from "@preact/signals";
5436
5436
 
5437
5437
  // src/ui/tool-card.tsx
5438
+ import { useComputed as useComputed2 } from "@preact/signals";
5438
5439
  import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs11 } from "preact/jsx-runtime";
5439
5440
  var p13 = BRAND.cssPrefix;
5440
5441
  function toolName(raw) {
@@ -5505,6 +5506,33 @@ function ToolHeaderRow({
5505
5506
  /* @__PURE__ */ jsx14("span", { class: `${p13}-toolui-chevron`, children: /* @__PURE__ */ jsx14(ChevronDownIcon, {}) })
5506
5507
  ] });
5507
5508
  }
5509
+ function ToolCollapsibleCard({
5510
+ part,
5511
+ strings,
5512
+ testid,
5513
+ superseded
5514
+ }) {
5515
+ const input = useComputed2(() => part.inputSig.value);
5516
+ const output = useComputed2(() => part.outputSig.value);
5517
+ const error = useComputed2(() => part.errorSig.value);
5518
+ const state = useComputed2(() => part.stateSig.value);
5519
+ const approval = useComputed2(() => part.approvalSig.value);
5520
+ return /* @__PURE__ */ jsxs11("details", { class: `${p13}-toolui ${p13}-toolui-collapsible`, "data-testid": testid, children: [
5521
+ /* @__PURE__ */ jsx14("summary", { class: `${p13}-toolui-head`, children: /* @__PURE__ */ jsx14(
5522
+ ToolHeaderRow,
5523
+ {
5524
+ name: toolName(part.toolName),
5525
+ state: state.value,
5526
+ approval: approval.value,
5527
+ strings,
5528
+ superseded
5529
+ }
5530
+ ) }),
5531
+ /* @__PURE__ */ jsx14(ToolSection, { label: strings.toolParameters, value: input.value }),
5532
+ output.value !== void 0 ? /* @__PURE__ */ jsx14(ToolSection, { label: strings.toolResult, value: output.value }) : null,
5533
+ error.value ? /* @__PURE__ */ jsx14(ToolSection, { label: strings.statusError, value: error.value, error: true }) : null
5534
+ ] });
5535
+ }
5508
5536
  function ToolSection({ label, value, error }) {
5509
5537
  const text = error ? String(value ?? "") : pretty(unwrapResult(value));
5510
5538
  if (!text) return null;
@@ -5535,11 +5563,8 @@ function pretty(value) {
5535
5563
  import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs12 } from "preact/jsx-runtime";
5536
5564
  var p14 = BRAND.cssPrefix;
5537
5565
  function ToolApproval({ part, strings, active, superseded = false, onDecision, onEdit }) {
5538
- const approval = useComputed2(() => part.approvalSig.value);
5539
- const state = useComputed2(() => part.stateSig.value);
5540
- const input = useComputed2(() => part.inputSig.value);
5541
- const output = useComputed2(() => part.outputSig.value);
5542
- const error = useComputed2(() => part.errorSig.value);
5566
+ const approval = useComputed3(() => part.approvalSig.value);
5567
+ const state = useComputed3(() => part.stateSig.value);
5543
5568
  const name = toolName(part.toolName);
5544
5569
  const approved = approval.value?.approved;
5545
5570
  const { terminal, responded, decided } = toolDecisionState(state.value, approval.value);
@@ -5547,21 +5572,7 @@ function ToolApproval({ part, strings, active, superseded = false, onDecision, o
5547
5572
  const skipped = superseded && !decided;
5548
5573
  const id = part.toolCallId;
5549
5574
  return /* @__PURE__ */ jsxs12("div", { class: `${p14}-toolui-group`, "data-testid": decided ? TID.toolDecision : TID.toolApproval, children: [
5550
- /* @__PURE__ */ jsxs12("details", { class: `${p14}-toolui ${p14}-toolui-collapsible`, children: [
5551
- /* @__PURE__ */ jsx15("summary", { class: `${p14}-toolui-head`, children: /* @__PURE__ */ jsx15(
5552
- ToolHeaderRow,
5553
- {
5554
- name,
5555
- state: state.value,
5556
- approval: approval.value,
5557
- strings,
5558
- superseded: skipped
5559
- }
5560
- ) }),
5561
- /* @__PURE__ */ jsx15(ToolSection, { label: strings.toolParameters, value: input.value }),
5562
- output.value !== void 0 ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.toolResult, value: output.value }) : null,
5563
- error.value ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.statusError, value: error.value, error: true }) : null
5564
- ] }),
5575
+ /* @__PURE__ */ jsx15(ToolCollapsibleCard, { part, strings, superseded: skipped }),
5565
5576
  skipped || terminal ? null : /* @__PURE__ */ jsxs12("div", { class: `${p14}-toolui ${p14}-toolui-body`, children: [
5566
5577
  responded ? (
5567
5578
  // DECIDED — lead with the recorded response (no repeated prompt/body), so the card barely
@@ -5602,13 +5613,14 @@ function ToolApproval({ part, strings, active, superseded = false, onDecision, o
5602
5613
  children: strings.approve
5603
5614
  }
5604
5615
  )
5605
- ] }) : editable ? /* @__PURE__ */ jsx15("div", { class: `${p14}-toolui-actions`, children: /* @__PURE__ */ jsx15("button", { type: "button", class: `${p14}-form-skip`, onClick: () => onEdit(id), "data-testid": TID.toolEdit, children: strings.edit }) }) : null
5616
+ ] }) : null,
5617
+ editable ? /* @__PURE__ */ jsx15("div", { class: `${p14}-toolui-actions`, children: /* @__PURE__ */ jsx15("button", { type: "button", class: `${p14}-form-skip`, onClick: () => onEdit(id), "data-testid": TID.toolEdit, children: strings.edit }) }) : null
5606
5618
  ] })
5607
5619
  ] });
5608
5620
  }
5609
5621
 
5610
5622
  // src/ui/tool-ask-questions.tsx
5611
- import { useComputed as useComputed3 } from "@preact/signals";
5623
+ import { useComputed as useComputed4 } from "@preact/signals";
5612
5624
 
5613
5625
  // src/ui/form/field.ts
5614
5626
  var QUESTION_TYPES = /* @__PURE__ */ new Set([
@@ -5680,9 +5692,9 @@ function str(v) {
5680
5692
  import { Fragment as Fragment4, jsx as jsx16, jsxs as jsxs13 } from "preact/jsx-runtime";
5681
5693
  var p15 = BRAND.cssPrefix;
5682
5694
  function ToolAskQuestions({ part, strings, active, superseded = false, onDecision, onEdit }) {
5683
- const state = useComputed3(() => part.stateSig.value);
5684
- const approval = useComputed3(() => part.approvalSig.value);
5685
- const request = useComputed3(() => parseAskUserQuestions(part.inputSig.value));
5695
+ const state = useComputed4(() => part.stateSig.value);
5696
+ const approval = useComputed4(() => part.approvalSig.value);
5697
+ const request = useComputed4(() => parseAskUserQuestions(part.inputSig.value));
5686
5698
  const { terminal, responded, decided } = toolDecisionState(state.value, approval.value);
5687
5699
  const req = request.value;
5688
5700
  if (decided) {
@@ -5745,7 +5757,7 @@ function DecidedCard({
5745
5757
  editable,
5746
5758
  onEdit
5747
5759
  }) {
5748
- const approval = useComputed3(() => part.approvalSig.value);
5760
+ const approval = useComputed4(() => part.approvalSig.value);
5749
5761
  const skipped = approval.value?.approved === false;
5750
5762
  const answers = approval.value?.approved ? parseAnswers(approval.value.reason) : {};
5751
5763
  return /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui`, "data-testid": TID.toolDecision, children: [
@@ -5786,36 +5798,20 @@ function parseAnswers(reason) {
5786
5798
  }
5787
5799
 
5788
5800
  // src/ui/tool-call.tsx
5789
- import { useComputed as useComputed4 } from "@preact/signals";
5790
- import { jsx as jsx17, jsxs as jsxs14 } from "preact/jsx-runtime";
5791
- var p16 = BRAND.cssPrefix;
5801
+ import { useComputed as useComputed5 } from "@preact/signals";
5802
+ import { jsx as jsx17 } from "preact/jsx-runtime";
5792
5803
  function ToolCall({ part, strings }) {
5793
- const input = useComputed4(() => part.inputSig.value);
5794
- const output = useComputed4(() => part.outputSig.value);
5795
- const error = useComputed4(() => part.errorSig.value);
5796
- const state = useComputed4(() => part.stateSig.value);
5797
- const approval = useComputed4(() => part.approvalSig.value);
5798
- const hasDetails = useComputed4(() => !!pretty(input.value) || !!error.value || !!pretty(unwrapResult(output.value)));
5804
+ const input = useComputed5(() => part.inputSig.value);
5805
+ const output = useComputed5(() => part.outputSig.value);
5806
+ const error = useComputed5(() => part.errorSig.value);
5807
+ const hasDetails = useComputed5(() => !!pretty(input.value) || !!error.value || !!pretty(unwrapResult(output.value)));
5799
5808
  if (!hasDetails.value) return null;
5800
- return /* @__PURE__ */ jsxs14("details", { class: `${p16}-toolui ${p16}-toolui-collapsible`, "data-testid": TID.toolCall, children: [
5801
- /* @__PURE__ */ jsx17("summary", { class: `${p16}-toolui-head`, children: /* @__PURE__ */ jsx17(
5802
- ToolHeaderRow,
5803
- {
5804
- name: toolName(part.toolName),
5805
- state: state.value,
5806
- approval: approval.value,
5807
- strings
5808
- }
5809
- ) }),
5810
- /* @__PURE__ */ jsx17(ToolSection, { label: strings.toolParameters, value: input.value }),
5811
- output.value !== void 0 ? /* @__PURE__ */ jsx17(ToolSection, { label: strings.toolResult, value: output.value }) : null,
5812
- error.value ? /* @__PURE__ */ jsx17(ToolSection, { label: strings.statusError, value: error.value, error: true }) : null
5813
- ] });
5809
+ return /* @__PURE__ */ jsx17(ToolCollapsibleCard, { part, strings, testid: TID.toolCall });
5814
5810
  }
5815
5811
 
5816
5812
  // src/ui/message-bubble.tsx
5817
- import { jsx as jsx18, jsxs as jsxs15 } from "preact/jsx-runtime";
5818
- var p17 = BRAND.cssPrefix;
5813
+ import { jsx as jsx18, jsxs as jsxs14 } from "preact/jsx-runtime";
5814
+ var p16 = BRAND.cssPrefix;
5819
5815
  function MessageBubble({
5820
5816
  message,
5821
5817
  strings,
@@ -5828,17 +5824,17 @@ function MessageBubble({
5828
5824
  tool,
5829
5825
  onRetry
5830
5826
  }) {
5831
- const parts = useComputed5(() => message.partsSig.value);
5827
+ const parts = useComputed6(() => message.partsSig.value);
5832
5828
  const partList = parts.value;
5833
- const emptyReply = useComputed5(() => isEmptyAssistantReply(message));
5834
- const hideCanceledHusk = useComputed5(() => isHiddenCanceledTurn(message));
5835
- const hasAnswerText = useComputed5(
5829
+ const emptyReply = useComputed6(() => isEmptyAssistantReply(message));
5830
+ const hideCanceledHusk = useComputed6(() => isHiddenCanceledTurn(message));
5831
+ const hasAnswerText = useComputed6(
5836
5832
  () => message.partsSig.value.some((part) => part.kind === "text" && part.textSig.value.length > 0)
5837
5833
  );
5838
- const reasoningVisible = useComputed5(
5834
+ const reasoningVisible = useComputed6(
5839
5835
  () => showReasoning && message.partsSig.value.some((part) => part.kind === "reasoning")
5840
5836
  );
5841
- const lastOutputIdx = useComputed5(() => {
5837
+ const lastOutputIdx = useComputed6(() => {
5842
5838
  const list = message.partsSig.value;
5843
5839
  let idx = -1;
5844
5840
  for (let i = 0; i < list.length; i++) {
@@ -5853,8 +5849,8 @@ function MessageBubble({
5853
5849
  const showStreamDots = streaming && !bufferedHold && !(reasoningVisible.value && working);
5854
5850
  if (hideCanceledHusk.value) return null;
5855
5851
  const stamp = formatStamp(message.createdAt);
5856
- return /* @__PURE__ */ jsx18("div", { class: `${p17}-bubble-row`, "data-role": message.role, "data-testid": tid(TID.messageBubble, message.id), children: /* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble-col`, children: [
5857
- /* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble`, children: [
5852
+ return /* @__PURE__ */ jsx18("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: [
5853
+ /* @__PURE__ */ jsxs14("div", { class: `${p16}-bubble`, children: [
5858
5854
  bufferedHold ? /* @__PURE__ */ jsx18(LoadingSpinner, { label: strings.loading }) : partList.map((part, index) => /* @__PURE__ */ jsx18(
5859
5855
  PartView,
5860
5856
  {
@@ -5871,12 +5867,12 @@ function MessageBubble({
5871
5867
  partKey(part)
5872
5868
  )),
5873
5869
  showStreamDots && /* @__PURE__ */ jsx18(TypingDots, {}),
5874
- message.status === "error" && message.errorText || emptyReply.value ? /* @__PURE__ */ jsxs15("div", { class: `${p17}-error`, role: "alert", children: [
5870
+ message.status === "error" && message.errorText || emptyReply.value ? /* @__PURE__ */ jsxs14("div", { class: `${p16}-error`, role: "alert", children: [
5875
5871
  /* @__PURE__ */ jsx18("span", { children: message.errorText ?? strings.errorGeneric }),
5876
- onRetry ? /* @__PURE__ */ jsx18("button", { type: "button", class: `${p17}-error-retry`, onClick: onRetry, "data-testid": TID.messageRetry, children: strings.errorRetry }) : null
5872
+ onRetry ? /* @__PURE__ */ jsx18("button", { type: "button", class: `${p16}-error-retry`, onClick: onRetry, "data-testid": TID.messageRetry, children: strings.errorRetry }) : null
5877
5873
  ] }) : null
5878
5874
  ] }),
5879
- stamp ? /* @__PURE__ */ jsx18("time", { class: `${p17}-bubble-time`, dateTime: stamp.iso, title: stamp.full, children: stamp.short }) : null
5875
+ stamp ? /* @__PURE__ */ jsx18("time", { class: `${p16}-bubble-time`, dateTime: stamp.iso, title: stamp.full, children: stamp.short }) : null
5880
5876
  ] }) });
5881
5877
  }
5882
5878
  function formatStamp(createdAt) {
@@ -5939,7 +5935,7 @@ function ToolPartView({
5939
5935
  superseded,
5940
5936
  tool
5941
5937
  }) {
5942
- const hasApproval = useComputed5(() => part.approvalSig.value !== void 0);
5938
+ const hasApproval = useComputed6(() => part.approvalSig.value !== void 0);
5943
5939
  if (tool?.humanInLoop) {
5944
5940
  if (isAskUserQuestionsTool(part.toolName)) {
5945
5941
  return /* @__PURE__ */ jsx18(
@@ -5975,9 +5971,9 @@ function ReasoningView({
5975
5971
  active,
5976
5972
  strings
5977
5973
  }) {
5978
- return /* @__PURE__ */ jsxs15("details", { class: `${p17}-reasoning`, open: active, "data-active": active ? "true" : void 0, children: [
5979
- /* @__PURE__ */ jsx18("summary", { class: `${p17}-reasoning-summary`, children: /* @__PURE__ */ jsx18("span", { class: `${p17}-reasoning-label`, children: active ? strings.thinking : strings.thoughts }) }),
5980
- /* @__PURE__ */ jsx18("div", { class: `${p17}-reasoning-body`, children: /* @__PURE__ */ jsx18(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig }) })
5974
+ return /* @__PURE__ */ jsxs14("details", { class: `${p16}-reasoning`, open: active, "data-active": active ? "true" : void 0, children: [
5975
+ /* @__PURE__ */ jsx18("summary", { class: `${p16}-reasoning-summary`, children: /* @__PURE__ */ jsx18("span", { class: `${p16}-reasoning-label`, children: active ? strings.thinking : strings.thoughts }) }),
5976
+ /* @__PURE__ */ jsx18("div", { class: `${p16}-reasoning-body`, children: /* @__PURE__ */ jsx18(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig }) })
5981
5977
  ] });
5982
5978
  }
5983
5979
  function partKey(part) {
@@ -5995,22 +5991,22 @@ function partKey(part) {
5995
5991
  }
5996
5992
  }
5997
5993
  function TypingDots() {
5998
- return /* @__PURE__ */ jsxs15("span", { class: `${p17}-typing`, "aria-hidden": "true", children: [
5994
+ return /* @__PURE__ */ jsxs14("span", { class: `${p16}-typing`, "aria-hidden": "true", children: [
5999
5995
  /* @__PURE__ */ jsx18("span", {}),
6000
5996
  /* @__PURE__ */ jsx18("span", {}),
6001
5997
  /* @__PURE__ */ jsx18("span", {})
6002
5998
  ] });
6003
5999
  }
6004
6000
  function LoadingSpinner({ label }) {
6005
- return /* @__PURE__ */ jsxs15("span", { class: `${p17}-loading`, role: "status", children: [
6006
- /* @__PURE__ */ jsx18("span", { class: `${p17}-loading-spinner`, "aria-hidden": "true" }),
6007
- /* @__PURE__ */ jsx18("span", { class: `${p17}-loading-label`, children: label })
6001
+ return /* @__PURE__ */ jsxs14("span", { class: `${p16}-loading`, role: "status", children: [
6002
+ /* @__PURE__ */ jsx18("span", { class: `${p16}-loading-spinner`, "aria-hidden": "true" }),
6003
+ /* @__PURE__ */ jsx18("span", { class: `${p16}-loading-label`, children: label })
6008
6004
  ] });
6009
6005
  }
6010
6006
 
6011
6007
  // src/ui/message-list.tsx
6012
- import { jsx as jsx19, jsxs as jsxs16 } from "preact/jsx-runtime";
6013
- var p18 = BRAND.cssPrefix;
6008
+ import { jsx as jsx19, jsxs as jsxs15 } from "preact/jsx-runtime";
6009
+ var p17 = BRAND.cssPrefix;
6014
6010
  var STICK_THRESHOLD = 120;
6015
6011
  var INTERACTION_GRACE_MS = 350;
6016
6012
  function MessageList({
@@ -6029,7 +6025,7 @@ function MessageList({
6029
6025
  onFillForm
6030
6026
  }) {
6031
6027
  const ref = useRef5(null);
6032
- const messages = useComputed6(() => messagesSig.value);
6028
+ const messages = useComputed7(() => messagesSig.value);
6033
6029
  const [showJump, setShowJump] = useState6(false);
6034
6030
  const hasHydratedRef = useRef5(false);
6035
6031
  const detachedRef = useRef5(false);
@@ -6247,7 +6243,7 @@ function MessageList({
6247
6243
  const day = dayKey(m.createdAt);
6248
6244
  if (day && day !== prevDay) {
6249
6245
  rows.push(
6250
- /* @__PURE__ */ jsx19("div", { class: `${p18}-date-divider`, children: /* @__PURE__ */ jsx19("span", { class: `${p18}-date-pill`, title: fullDate(m.createdAt), children: dayLabel(m.createdAt, strings) }) }, `day:${day}`)
6246
+ /* @__PURE__ */ jsx19("div", { class: `${p17}-date-divider`, children: /* @__PURE__ */ jsx19("span", { class: `${p17}-date-pill`, title: fullDate(m.createdAt), children: dayLabel(m.createdAt, strings) }) }, `day:${day}`)
6251
6247
  );
6252
6248
  prevDay = day;
6253
6249
  }
@@ -6273,9 +6269,9 @@ function MessageList({
6273
6269
  for (const marker of pendingMarkers) {
6274
6270
  rows.push(markerRow(marker));
6275
6271
  }
6276
- return /* @__PURE__ */ jsxs16("div", { class: `${p18}-list-wrap`, children: [
6277
- /* @__PURE__ */ jsxs16("div", { ref, class: `${p18}-list`, role: "log", "aria-live": "polite", "aria-relevant": "additions text", children: [
6278
- loading && messages.value.length === 0 ? /* @__PURE__ */ jsx19("div", { class: `${p18}-list-loading`, role: "status", children: strings.conversationLoading }) : null,
6272
+ return /* @__PURE__ */ jsxs15("div", { class: `${p17}-list-wrap`, children: [
6273
+ /* @__PURE__ */ jsxs15("div", { ref, class: `${p17}-list`, role: "log", "aria-live": "polite", "aria-relevant": "additions text", children: [
6274
+ loading && messages.value.length === 0 ? /* @__PURE__ */ jsx19("div", { class: `${p17}-list-loading`, role: "status", children: strings.conversationLoading }) : null,
6279
6275
  rows,
6280
6276
  form && !inlineForm ? /* @__PURE__ */ jsx19(FormGate, { form: form.form, strings, onSubmit: form.onSubmit, onSkip: form.onSkip }) : null
6281
6277
  ] }),
@@ -6283,7 +6279,7 @@ function MessageList({
6283
6279
  "button",
6284
6280
  {
6285
6281
  type: "button",
6286
- class: `${p18}-jump`,
6282
+ class: `${p17}-jump`,
6287
6283
  onClick: jumpToBottom,
6288
6284
  "aria-label": strings.scrollToBottom,
6289
6285
  title: strings.scrollToBottom,
@@ -6347,7 +6343,7 @@ function startOfDay(ms) {
6347
6343
  }
6348
6344
 
6349
6345
  // src/ui/conversation-list.tsx
6350
- import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs17 } from "preact/jsx-runtime";
6346
+ import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs16 } from "preact/jsx-runtime";
6351
6347
  var log12 = logger.scope("history");
6352
6348
  var DEFAULT_SKELETON_ROWS = 3;
6353
6349
  var MAX_SKELETON_ROWS = 6;
@@ -6374,7 +6370,7 @@ function ConversationList({
6374
6370
  onSelect,
6375
6371
  onNewConversation
6376
6372
  }) {
6377
- const p36 = BRAND.cssPrefix;
6373
+ const p35 = BRAND.cssPrefix;
6378
6374
  const seed = transport.peekConversations({ visitorId });
6379
6375
  const [state, setState] = useState7(seed ? "loaded" : "loading");
6380
6376
  const [conversations, setChats] = useState7(seed?.conversations ?? []);
@@ -6395,11 +6391,11 @@ function ConversationList({
6395
6391
  cancelled = true;
6396
6392
  };
6397
6393
  }, [transport, visitorId, persistence]);
6398
- const newChatButton = onNewConversation ? /* @__PURE__ */ jsx20("div", { class: `${p36}-history-footer`, children: /* @__PURE__ */ jsxs17(
6394
+ const newChatButton = onNewConversation ? /* @__PURE__ */ jsx20("div", { class: `${p35}-history-footer`, children: /* @__PURE__ */ jsxs16(
6399
6395
  "button",
6400
6396
  {
6401
6397
  type: "button",
6402
- class: `${p36}-history-new`,
6398
+ class: `${p35}-history-new`,
6403
6399
  onClick: onNewConversation,
6404
6400
  "data-testid": TID.sidebarNewConversation,
6405
6401
  children: [
@@ -6410,17 +6406,17 @@ function ConversationList({
6410
6406
  ) }) : null;
6411
6407
  if (state === "loading") {
6412
6408
  const rows = Math.min(persistence.loadHistoryCount() ?? DEFAULT_SKELETON_ROWS, MAX_SKELETON_ROWS);
6413
- return /* @__PURE__ */ jsxs17(Fragment5, { children: [
6414
- /* @__PURE__ */ jsx20("div", { class: `${p36}-history`, "aria-busy": "true", "aria-label": strings.historyLoading, children: /* @__PURE__ */ jsxs17("div", { class: `${p36}-history-group`, "aria-hidden": "true", children: [
6415
- /* @__PURE__ */ jsx20("div", { class: `${p36}-history-heading`, children: /* @__PURE__ */ jsx20("span", { class: `${p36}-skeleton ${p36}-skeleton-heading` }) }),
6416
- /* @__PURE__ */ jsx20("div", { class: `${p36}-history-card`, children: Array.from({ length: Math.max(1, rows) }, (_, i) => /* @__PURE__ */ jsxs17("div", { class: `${p36}-history-item ${p36}-history-item-skeleton`, children: [
6417
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-avatar ${p36}-skeleton` }),
6418
- /* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
6419
- /* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
6420
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-title`, children: /* @__PURE__ */ jsx20("span", { class: `${p36}-skeleton ${p36}-skeleton-title` }) }),
6421
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-time`, children: /* @__PURE__ */ jsx20("span", { class: `${p36}-skeleton ${p36}-skeleton-time` }) })
6409
+ return /* @__PURE__ */ jsxs16(Fragment5, { children: [
6410
+ /* @__PURE__ */ jsx20("div", { class: `${p35}-history`, "aria-busy": "true", "aria-label": strings.historyLoading, children: /* @__PURE__ */ jsxs16("div", { class: `${p35}-history-group`, "aria-hidden": "true", children: [
6411
+ /* @__PURE__ */ jsx20("div", { class: `${p35}-history-heading`, children: /* @__PURE__ */ jsx20("span", { class: `${p35}-skeleton ${p35}-skeleton-heading` }) }),
6412
+ /* @__PURE__ */ jsx20("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: [
6413
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-avatar ${p35}-skeleton` }),
6414
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-body`, children: [
6415
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-row`, children: [
6416
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-title`, children: /* @__PURE__ */ jsx20("span", { class: `${p35}-skeleton ${p35}-skeleton-title` }) }),
6417
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-time`, children: /* @__PURE__ */ jsx20("span", { class: `${p35}-skeleton ${p35}-skeleton-time` }) })
6422
6418
  ] }),
6423
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-row`, children: /* @__PURE__ */ jsx20("span", { class: `${p36}-history-preview`, children: /* @__PURE__ */ jsx20("span", { class: `${p36}-skeleton ${p36}-skeleton-preview` }) }) })
6419
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-row`, children: /* @__PURE__ */ jsx20("span", { class: `${p35}-history-preview`, children: /* @__PURE__ */ jsx20("span", { class: `${p35}-skeleton ${p35}-skeleton-preview` }) }) })
6424
6420
  ] })
6425
6421
  ] }, i)) })
6426
6422
  ] }) }),
@@ -6428,36 +6424,36 @@ function ConversationList({
6428
6424
  ] });
6429
6425
  }
6430
6426
  if (state === "error" || conversations.length === 0) {
6431
- return /* @__PURE__ */ jsxs17(Fragment5, { children: [
6432
- /* @__PURE__ */ jsx20("div", { class: `${p36}-history-empty`, children: strings.historyEmpty }),
6427
+ return /* @__PURE__ */ jsxs16(Fragment5, { children: [
6428
+ /* @__PURE__ */ jsx20("div", { class: `${p35}-history-empty`, children: strings.historyEmpty }),
6433
6429
  newChatButton
6434
6430
  ] });
6435
6431
  }
6436
6432
  const now = Date.now();
6437
6433
  const groups = groupByBucket(now, conversations);
6438
- return /* @__PURE__ */ jsxs17(Fragment5, { children: [
6439
- /* @__PURE__ */ jsx20("div", { class: `${p36}-history`, role: "list", children: groups.map((group) => /* @__PURE__ */ jsxs17("div", { class: `${p36}-history-group`, children: [
6440
- /* @__PURE__ */ jsx20("div", { class: `${p36}-history-heading`, children: strings[BUCKET_TO_STRING[group.bucket]] }),
6441
- /* @__PURE__ */ jsx20("div", { class: `${p36}-history-card`, children: group.conversations.map((chat) => /* @__PURE__ */ jsxs17(
6434
+ return /* @__PURE__ */ jsxs16(Fragment5, { children: [
6435
+ /* @__PURE__ */ jsx20("div", { class: `${p35}-history`, role: "list", children: groups.map((group) => /* @__PURE__ */ jsxs16("div", { class: `${p35}-history-group`, children: [
6436
+ /* @__PURE__ */ jsx20("div", { class: `${p35}-history-heading`, children: strings[BUCKET_TO_STRING[group.bucket]] }),
6437
+ /* @__PURE__ */ jsx20("div", { class: `${p35}-history-card`, children: group.conversations.map((chat) => /* @__PURE__ */ jsxs16(
6442
6438
  "button",
6443
6439
  {
6444
6440
  type: "button",
6445
6441
  role: "listitem",
6446
- class: `${p36}-history-item`,
6442
+ class: `${p35}-history-item`,
6447
6443
  onClick: () => onSelect(chat),
6448
6444
  "data-closed": chat.canContinue ? void 0 : "true",
6449
6445
  "data-unread": (chat.unreadCount ?? 0) > 0 ? "true" : void 0,
6450
6446
  "data-testid": tid(TID.historyItem, chat.conversationId),
6451
6447
  children: [
6452
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx20(MessageIcon, {}) }),
6453
- /* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
6454
- /* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
6455
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-title`, children: chat.title }),
6456
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-time`, children: rowTime(chat.lastMessageAt, now, locale) })
6448
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx20(MessageIcon, {}) }),
6449
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-body`, children: [
6450
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-row`, children: [
6451
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-title`, children: chat.title }),
6452
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-time`, children: rowTime(chat.lastMessageAt, now, locale) })
6457
6453
  ] }),
6458
- /* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
6459
- /* @__PURE__ */ jsx20("span", { class: `${p36}-history-preview`, children: chat.preview ?? (chat.canContinue ? strings.historyContinue : strings.conversationClosed) }),
6460
- (chat.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx20("span", { class: `${p36}-history-dot` }) : null
6454
+ /* @__PURE__ */ jsxs16("span", { class: `${p35}-history-row`, children: [
6455
+ /* @__PURE__ */ jsx20("span", { class: `${p35}-history-preview`, children: chat.preview ?? (chat.canContinue ? strings.historyContinue : strings.conversationClosed) }),
6456
+ (chat.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx20("span", { class: `${p35}-history-dot` }) : null
6461
6457
  ] })
6462
6458
  ] })
6463
6459
  ]
@@ -6471,14 +6467,14 @@ function ConversationList({
6471
6467
 
6472
6468
  // src/ui/suggestions.tsx
6473
6469
  import { jsx as jsx21 } from "preact/jsx-runtime";
6474
- var p19 = BRAND.cssPrefix;
6470
+ var p18 = BRAND.cssPrefix;
6475
6471
  function Suggestions({ suggestions, onPick }) {
6476
6472
  if (suggestions.length === 0) return null;
6477
- return /* @__PURE__ */ jsx21("div", { class: `${p19}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx21(
6473
+ return /* @__PURE__ */ jsx21("div", { class: `${p18}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx21(
6478
6474
  "button",
6479
6475
  {
6480
6476
  type: "button",
6481
- class: `${p19}-suggestion`,
6477
+ class: `${p18}-suggestion`,
6482
6478
  onClick: () => onPick(s),
6483
6479
  "data-testid": tid(TID.suggestion, i),
6484
6480
  children: s.label
@@ -6488,8 +6484,8 @@ function Suggestions({ suggestions, onPick }) {
6488
6484
  }
6489
6485
 
6490
6486
  // src/ui/panel.tsx
6491
- import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs18 } from "preact/jsx-runtime";
6492
- var p20 = BRAND.cssPrefix;
6487
+ import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs17 } from "preact/jsx-runtime";
6488
+ var p19 = BRAND.cssPrefix;
6493
6489
  function Panel(props2) {
6494
6490
  const { options, onClose } = props2;
6495
6491
  const s = options.strings;
@@ -6513,11 +6509,11 @@ function Panel(props2) {
6513
6509
  }, []);
6514
6510
  const { visible: dragOver } = useFileDrop({ containerRef, onDrop: onDropItems });
6515
6511
  useDragMove(containerRef.current, options.mode === "modal");
6516
- return /* @__PURE__ */ jsxs18(
6512
+ return /* @__PURE__ */ jsxs17(
6517
6513
  "div",
6518
6514
  {
6519
6515
  ref: containerRef,
6520
- class: `${p20}-panel`,
6516
+ class: `${p19}-panel`,
6521
6517
  role: "dialog",
6522
6518
  "aria-modal": "false",
6523
6519
  "aria-label": s.panelTitle,
@@ -6581,7 +6577,7 @@ function PanelContent(props2) {
6581
6577
  if (activeForm) {
6582
6578
  composerArea = null;
6583
6579
  } else if (canSend) {
6584
- composerArea = /* @__PURE__ */ jsxs18(Fragment6, { children: [
6580
+ composerArea = /* @__PURE__ */ jsxs17(Fragment6, { children: [
6585
6581
  /* @__PURE__ */ jsx22(Suggestions, { suggestions, onPick: onSuggestion }),
6586
6582
  /* @__PURE__ */ jsx22(
6587
6583
  Composer,
@@ -6600,7 +6596,7 @@ function PanelContent(props2) {
6600
6596
  } else {
6601
6597
  composerArea = /* @__PURE__ */ jsx22(ReadOnlyBanner, { label: s.conversationClosed, ctaLabel: s.startNewConversation, onNewConversation: onClear });
6602
6598
  }
6603
- return /* @__PURE__ */ jsxs18(Fragment6, { children: [
6599
+ return /* @__PURE__ */ jsxs17(Fragment6, { children: [
6604
6600
  view === "history" ? /* @__PURE__ */ jsx22(
6605
6601
  HistoryHeader,
6606
6602
  {
@@ -6609,12 +6605,12 @@ function PanelContent(props2) {
6609
6605
  onClose,
6610
6606
  showClose: canShowClose(options.mode, panelSize, options.actions)
6611
6607
  }
6612
- ) : /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, "data-testid": TID.panelHeader, children: [
6608
+ ) : /* @__PURE__ */ jsxs17("header", { class: `${p19}-header`, "data-testid": TID.panelHeader, children: [
6613
6609
  onBack ? /* @__PURE__ */ jsx22(
6614
6610
  "button",
6615
6611
  {
6616
6612
  type: "button",
6617
- class: `${p20}-icon-btn`,
6613
+ class: `${p19}-icon-btn`,
6618
6614
  onClick: onBack,
6619
6615
  "aria-label": s.moduleBack,
6620
6616
  title: s.moduleBack,
@@ -6635,7 +6631,7 @@ function PanelContent(props2) {
6635
6631
  onSelect: (conversation) => onSelectHistoryConversation(conversation.conversationId),
6636
6632
  onNewConversation
6637
6633
  }
6638
- ) : /* @__PURE__ */ jsxs18(Fragment6, { children: [
6634
+ ) : /* @__PURE__ */ jsxs17(Fragment6, { children: [
6639
6635
  /* @__PURE__ */ jsx22(DropZone, { visible: dragOver, strings: s }),
6640
6636
  /* @__PURE__ */ jsx22(
6641
6637
  MessageList,
@@ -6677,12 +6673,12 @@ function HistoryHeader({
6677
6673
  onClose,
6678
6674
  showClose
6679
6675
  }) {
6680
- return /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, children: [
6676
+ return /* @__PURE__ */ jsxs17("header", { class: `${p19}-header`, children: [
6681
6677
  /* @__PURE__ */ jsx22(
6682
6678
  "button",
6683
6679
  {
6684
6680
  type: "button",
6685
- class: `${p20}-icon-btn`,
6681
+ class: `${p19}-icon-btn`,
6686
6682
  onClick: onBack,
6687
6683
  "aria-label": strings.historyBack,
6688
6684
  title: strings.historyBack,
@@ -6694,7 +6690,7 @@ function HistoryHeader({
6694
6690
  "button",
6695
6691
  {
6696
6692
  type: "button",
6697
- class: `${p20}-icon-btn`,
6693
+ class: `${p19}-icon-btn`,
6698
6694
  onClick: onClose,
6699
6695
  "aria-label": strings.close,
6700
6696
  title: strings.close,
@@ -6708,28 +6704,28 @@ function ReadOnlyBanner({
6708
6704
  ctaLabel,
6709
6705
  onNewConversation
6710
6706
  }) {
6711
- return /* @__PURE__ */ jsxs18("div", { class: `${p20}-readonly-banner`, role: "note", children: [
6712
- /* @__PURE__ */ jsx22("span", { class: `${p20}-readonly-label`, children: label }),
6713
- /* @__PURE__ */ jsx22("button", { type: "button", class: `${p20}-readonly-cta`, onClick: onNewConversation, children: ctaLabel })
6707
+ return /* @__PURE__ */ jsxs17("div", { class: `${p19}-readonly-banner`, role: "note", children: [
6708
+ /* @__PURE__ */ jsx22("span", { class: `${p19}-readonly-label`, children: label }),
6709
+ /* @__PURE__ */ jsx22("button", { type: "button", class: `${p19}-readonly-cta`, onClick: onNewConversation, children: ctaLabel })
6714
6710
  ] });
6715
6711
  }
6716
6712
  function ComposerFooter({ disclaimer }) {
6717
6713
  if (!disclaimer) return null;
6718
- return /* @__PURE__ */ jsx22("div", { class: `${p20}-composer-footer`, children: /* @__PURE__ */ jsx22("div", { class: `${p20}-disclaimer`, children: disclaimer }) });
6714
+ return /* @__PURE__ */ jsx22("div", { class: `${p19}-composer-footer`, children: /* @__PURE__ */ jsx22("div", { class: `${p19}-disclaimer`, children: disclaimer }) });
6719
6715
  }
6720
6716
  function PoweredByBar({ poweredBy }) {
6721
6717
  if (!poweredBy) return null;
6722
- return /* @__PURE__ */ jsx22("div", { class: `${p20}-poweredby-bar`, children: /* @__PURE__ */ jsx22(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
6718
+ return /* @__PURE__ */ jsx22("div", { class: `${p19}-poweredby-bar`, children: /* @__PURE__ */ jsx22(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
6723
6719
  }
6724
6720
  function PoweredBy({ logoUrl, text, href }) {
6725
- const inner = /* @__PURE__ */ jsxs18(Fragment6, { children: [
6726
- logoUrl ? /* @__PURE__ */ jsx22("img", { class: `${p20}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
6721
+ const inner = /* @__PURE__ */ jsxs17(Fragment6, { children: [
6722
+ logoUrl ? /* @__PURE__ */ jsx22("img", { class: `${p19}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
6727
6723
  text ? /* @__PURE__ */ jsx22("span", { children: text }) : null
6728
6724
  ] });
6729
6725
  if (href) {
6730
- return /* @__PURE__ */ jsx22("a", { class: `${p20}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
6726
+ return /* @__PURE__ */ jsx22("a", { class: `${p19}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
6731
6727
  }
6732
- return /* @__PURE__ */ jsx22("span", { class: `${p20}-poweredby`, children: inner });
6728
+ return /* @__PURE__ */ jsx22("span", { class: `${p19}-poweredby`, children: inner });
6733
6729
  }
6734
6730
 
6735
6731
  // src/ui/form/form-controller.ts
@@ -6812,21 +6808,21 @@ function whenPasses(form, d) {
6812
6808
  }
6813
6809
 
6814
6810
  // src/ui/sidebar.tsx
6815
- import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs19 } from "preact/jsx-runtime";
6811
+ import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs18 } from "preact/jsx-runtime";
6816
6812
  function Sidebar(props2) {
6817
- const p36 = BRAND.cssPrefix;
6813
+ const p35 = BRAND.cssPrefix;
6818
6814
  const { site, blocks, strings, collapsed } = props2;
6819
6815
  const navigation = blocks?.navigation ?? [];
6820
6816
  const linkCards = blocks?.linkCards ?? [];
6821
6817
  const toggleLabel = collapsed ? strings.expandSidebar : strings.collapseSidebar;
6822
- return /* @__PURE__ */ jsxs19("aside", { class: `${p36}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
6823
- /* @__PURE__ */ jsxs19("div", { class: `${p36}-sidebar-header`, children: [
6818
+ return /* @__PURE__ */ jsxs18("aside", { class: `${p35}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
6819
+ /* @__PURE__ */ jsxs18("div", { class: `${p35}-sidebar-header`, children: [
6824
6820
  /* @__PURE__ */ jsx23(SidebarBrand, { site }),
6825
6821
  /* @__PURE__ */ jsx23(
6826
6822
  "button",
6827
6823
  {
6828
6824
  type: "button",
6829
- class: `${p36}-sidebar-toggle`,
6825
+ class: `${p35}-sidebar-toggle`,
6830
6826
  "aria-label": toggleLabel,
6831
6827
  "aria-expanded": collapsed ? "false" : "true",
6832
6828
  title: toggleLabel,
@@ -6836,10 +6832,10 @@ function Sidebar(props2) {
6836
6832
  }
6837
6833
  )
6838
6834
  ] }),
6839
- collapsed ? null : /* @__PURE__ */ jsxs19(Fragment7, { children: [
6840
- navigation.length > 0 ? /* @__PURE__ */ jsx23("nav", { class: `${p36}-sidebar-section`, "data-section": "navigation", children: /* @__PURE__ */ jsx23(SidebarNav, { items: navigation }) }) : null,
6841
- linkCards.length > 0 ? /* @__PURE__ */ jsx23("div", { class: `${p36}-sidebar-section`, "data-section": "link-cards", children: /* @__PURE__ */ jsx23(SidebarCards, { items: linkCards }) }) : null,
6842
- props2.showConversations ? /* @__PURE__ */ jsx23("div", { class: `${p36}-sidebar-conversations`, children: /* @__PURE__ */ jsx23(
6835
+ collapsed ? null : /* @__PURE__ */ jsxs18(Fragment7, { children: [
6836
+ navigation.length > 0 ? /* @__PURE__ */ jsx23("nav", { class: `${p35}-sidebar-section`, "data-section": "navigation", children: /* @__PURE__ */ jsx23(SidebarNav, { items: navigation }) }) : null,
6837
+ linkCards.length > 0 ? /* @__PURE__ */ jsx23("div", { class: `${p35}-sidebar-section`, "data-section": "link-cards", children: /* @__PURE__ */ jsx23(SidebarCards, { items: linkCards }) }) : null,
6838
+ props2.showConversations ? /* @__PURE__ */ jsx23("div", { class: `${p35}-sidebar-conversations`, children: /* @__PURE__ */ jsx23(
6843
6839
  ConversationList,
6844
6840
  {
6845
6841
  transport: props2.transport,
@@ -6855,15 +6851,15 @@ function Sidebar(props2) {
6855
6851
  ] });
6856
6852
  }
6857
6853
  function SidebarBrand({ site }) {
6858
- const p36 = BRAND.cssPrefix;
6854
+ const p35 = BRAND.cssPrefix;
6859
6855
  if (site?.logo?.url) {
6860
6856
  const alt = site.logo.alt ?? site.title ?? "Logo";
6861
- return /* @__PURE__ */ jsxs19("picture", { children: [
6857
+ return /* @__PURE__ */ jsxs18("picture", { children: [
6862
6858
  site.logoDark?.url ? /* @__PURE__ */ jsx23("source", { srcset: site.logoDark.url, media: "(prefers-color-scheme: dark)" }) : null,
6863
- /* @__PURE__ */ jsx23("img", { class: `${p36}-sidebar-logo`, src: site.logo.url, alt })
6859
+ /* @__PURE__ */ jsx23("img", { class: `${p35}-sidebar-logo`, src: site.logo.url, alt })
6864
6860
  ] });
6865
6861
  }
6866
- return /* @__PURE__ */ jsx23("div", { class: `${p36}-sidebar-title`, children: site?.title ?? BRAND.name });
6862
+ return /* @__PURE__ */ jsx23("div", { class: `${p35}-sidebar-title`, children: site?.title ?? BRAND.name });
6867
6863
  }
6868
6864
  function SidebarToggleIcon({ collapsed }) {
6869
6865
  return /* @__PURE__ */ jsx23(
@@ -6881,33 +6877,33 @@ function SidebarToggleIcon({ collapsed }) {
6881
6877
  );
6882
6878
  }
6883
6879
  function SidebarNav({ items }) {
6884
- const p36 = BRAND.cssPrefix;
6885
- return /* @__PURE__ */ jsx23("ul", { class: `${p36}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx23("li", { children: /* @__PURE__ */ jsxs19(
6880
+ const p35 = BRAND.cssPrefix;
6881
+ return /* @__PURE__ */ jsx23("ul", { class: `${p35}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx23("li", { children: /* @__PURE__ */ jsxs18(
6886
6882
  "a",
6887
6883
  {
6888
- class: `${p36}-sidebar-nav-item`,
6884
+ class: `${p35}-sidebar-nav-item`,
6889
6885
  href: item.href,
6890
6886
  target: item.href ? "_blank" : void 0,
6891
6887
  rel: item.href ? "noreferrer" : void 0,
6892
6888
  children: [
6893
- item.icon ? /* @__PURE__ */ jsx23("span", { class: `${p36}-sidebar-nav-icon`, "data-icon": item.icon }) : null,
6894
- /* @__PURE__ */ jsx23("span", { class: `${p36}-sidebar-nav-label`, children: item.label })
6889
+ item.icon ? /* @__PURE__ */ jsx23("span", { class: `${p35}-sidebar-nav-icon`, "data-icon": item.icon }) : null,
6890
+ /* @__PURE__ */ jsx23("span", { class: `${p35}-sidebar-nav-label`, children: item.label })
6895
6891
  ]
6896
6892
  }
6897
6893
  ) }, item.id ?? item.label)) });
6898
6894
  }
6899
6895
  function SidebarCards({ items }) {
6900
- const p36 = BRAND.cssPrefix;
6901
- return /* @__PURE__ */ jsx23("div", { class: `${p36}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs19(
6896
+ const p35 = BRAND.cssPrefix;
6897
+ return /* @__PURE__ */ jsx23("div", { class: `${p35}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs18(
6902
6898
  "a",
6903
6899
  {
6904
- class: `${p36}-sidebar-card`,
6900
+ class: `${p35}-sidebar-card`,
6905
6901
  href: item.href,
6906
6902
  target: item.href ? "_blank" : void 0,
6907
6903
  rel: item.href ? "noreferrer" : void 0,
6908
6904
  children: [
6909
- /* @__PURE__ */ jsx23("div", { class: `${p36}-sidebar-card-label`, children: item.label }),
6910
- item.description ? /* @__PURE__ */ jsx23("div", { class: `${p36}-sidebar-card-desc`, children: item.description }) : null
6905
+ /* @__PURE__ */ jsx23("div", { class: `${p35}-sidebar-card-label`, children: item.label }),
6906
+ item.description ? /* @__PURE__ */ jsx23("div", { class: `${p35}-sidebar-card-desc`, children: item.description }) : null
6911
6907
  ]
6912
6908
  },
6913
6909
  item.id ?? item.label
@@ -6915,10 +6911,10 @@ function SidebarCards({ items }) {
6915
6911
  }
6916
6912
 
6917
6913
  // src/ui/page-shell.tsx
6918
- import { jsx as jsx24, jsxs as jsxs20 } from "preact/jsx-runtime";
6919
- var p21 = BRAND.cssPrefix;
6914
+ import { jsx as jsx24, jsxs as jsxs19 } from "preact/jsx-runtime";
6915
+ var p20 = BRAND.cssPrefix;
6920
6916
  function PageShell(props2) {
6921
- return /* @__PURE__ */ jsxs20("main", { class: `${p21}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
6917
+ return /* @__PURE__ */ jsxs19("main", { class: `${p20}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
6922
6918
  /* @__PURE__ */ jsx24(
6923
6919
  Sidebar,
6924
6920
  {
@@ -6936,7 +6932,7 @@ function PageShell(props2) {
6936
6932
  onToggleCollapsed: props2.onToggleSidebarCollapsed
6937
6933
  }
6938
6934
  ),
6939
- /* @__PURE__ */ jsx24("section", { class: `${p21}-page-chat`, "aria-label": "Chat", children: props2.children })
6935
+ /* @__PURE__ */ jsx24("section", { class: `${p20}-page-chat`, "aria-label": "Chat", children: props2.children })
6940
6936
  ] });
6941
6937
  }
6942
6938
 
@@ -6974,7 +6970,7 @@ var atTabRoot = (s) => activeStack(s).length === 0;
6974
6970
 
6975
6971
  // src/ui/messenger-home.tsx
6976
6972
  import { useCallback as useCallback4, useEffect as useEffect14, useRef as useRef8 } from "preact/hooks";
6977
- import { useComputed as useComputed7 } from "@preact/signals";
6973
+ import { useComputed as useComputed8 } from "@preact/signals";
6978
6974
 
6979
6975
  // src/ui/modules/chat.tsx
6980
6976
  var chatLayout = {
@@ -6986,80 +6982,80 @@ var chatLayout = {
6986
6982
  import { useEffect as useEffect10, useMemo as useMemo2, useState as useState8 } from "preact/hooks";
6987
6983
 
6988
6984
  // src/ui/back-header.tsx
6989
- import { jsx as jsx25, jsxs as jsxs21 } from "preact/jsx-runtime";
6990
- var p22 = BRAND.cssPrefix;
6985
+ import { jsx as jsx25, jsxs as jsxs20 } from "preact/jsx-runtime";
6986
+ var p21 = BRAND.cssPrefix;
6991
6987
  function TitleBar({ title, actions }) {
6992
- return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-variant": "title", children: [
6993
- /* @__PURE__ */ jsx25("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" }),
6994
- /* @__PURE__ */ jsx25("h1", { class: `${p22}-back-title`, children: title }),
6995
- actions ?? /* @__PURE__ */ jsx25("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" })
6988
+ return /* @__PURE__ */ jsxs20("header", { class: `${p21}-back-header`, "data-variant": "title", children: [
6989
+ /* @__PURE__ */ jsx25("span", { class: `${p21}-back-spacer`, "aria-hidden": "true" }),
6990
+ /* @__PURE__ */ jsx25("h1", { class: `${p21}-back-title`, children: title }),
6991
+ actions ?? /* @__PURE__ */ jsx25("span", { class: `${p21}-back-spacer`, "aria-hidden": "true" })
6996
6992
  ] });
6997
6993
  }
6998
6994
  function BackHeader({ title, backLabel, onBack, actions, testid }) {
6999
- return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-testid": testid, children: [
7000
- /* @__PURE__ */ jsx25("button", { type: "button", class: `${p22}-icon-btn`, onClick: onBack, "aria-label": backLabel, title: backLabel, children: /* @__PURE__ */ jsx25(BackIcon, {}) }),
7001
- /* @__PURE__ */ jsx25("h1", { class: `${p22}-back-title`, children: title }),
7002
- actions ?? /* @__PURE__ */ jsx25("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" })
6995
+ return /* @__PURE__ */ jsxs20("header", { class: `${p21}-back-header`, "data-testid": testid, children: [
6996
+ /* @__PURE__ */ jsx25("button", { type: "button", class: `${p21}-icon-btn`, onClick: onBack, "aria-label": backLabel, title: backLabel, children: /* @__PURE__ */ jsx25(BackIcon, {}) }),
6997
+ /* @__PURE__ */ jsx25("h1", { class: `${p21}-back-title`, children: title }),
6998
+ actions ?? /* @__PURE__ */ jsx25("span", { class: `${p21}-back-spacer`, "aria-hidden": "true" })
7003
6999
  ] });
7004
7000
  }
7005
7001
 
7006
7002
  // src/ui/home-search.tsx
7007
- import { jsx as jsx26, jsxs as jsxs22 } from "preact/jsx-runtime";
7008
- var p23 = BRAND.cssPrefix;
7003
+ import { jsx as jsx26, jsxs as jsxs21 } from "preact/jsx-runtime";
7004
+ var p22 = BRAND.cssPrefix;
7009
7005
  function HomeSearchButton({ placeholder, onActivate }) {
7010
- return /* @__PURE__ */ jsxs22("button", { type: "button", class: `${p23}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
7011
- /* @__PURE__ */ jsx26("span", { class: `${p23}-home-search-text`, children: placeholder }),
7012
- /* @__PURE__ */ jsx26("span", { class: `${p23}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx26(SearchIcon, {}) })
7006
+ return /* @__PURE__ */ jsxs21("button", { type: "button", class: `${p22}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
7007
+ /* @__PURE__ */ jsx26("span", { class: `${p22}-home-search-text`, children: placeholder }),
7008
+ /* @__PURE__ */ jsx26("span", { class: `${p22}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx26(SearchIcon, {}) })
7013
7009
  ] });
7014
7010
  }
7015
7011
  function HelpSearchInput({ placeholder, value, onInput }) {
7016
- return /* @__PURE__ */ jsxs22("div", { class: `${p23}-home-search`, "data-input": "true", children: [
7012
+ return /* @__PURE__ */ jsxs21("div", { class: `${p22}-home-search`, "data-input": "true", children: [
7017
7013
  /* @__PURE__ */ jsx26(
7018
7014
  "input",
7019
7015
  {
7020
7016
  type: "search",
7021
- class: `${p23}-home-search-input`,
7017
+ class: `${p22}-home-search-input`,
7022
7018
  placeholder,
7023
7019
  value,
7024
7020
  onInput: (e) => onInput(e.currentTarget.value),
7025
7021
  "data-testid": TID.helpSearch
7026
7022
  }
7027
7023
  ),
7028
- /* @__PURE__ */ jsx26("span", { class: `${p23}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx26(SearchIcon, {}) })
7024
+ /* @__PURE__ */ jsx26("span", { class: `${p22}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx26(SearchIcon, {}) })
7029
7025
  ] });
7030
7026
  }
7031
7027
 
7032
7028
  // src/ui/list-row.tsx
7033
- import { jsx as jsx27, jsxs as jsxs23 } from "preact/jsx-runtime";
7034
- var p24 = BRAND.cssPrefix;
7029
+ import { jsx as jsx27, jsxs as jsxs22 } from "preact/jsx-runtime";
7030
+ var p23 = BRAND.cssPrefix;
7035
7031
  function ListRow({ title, subtitle, onClick, testid }) {
7036
- return /* @__PURE__ */ jsxs23("button", { type: "button", class: `${p24}-list-row`, onClick, "data-testid": testid, children: [
7037
- /* @__PURE__ */ jsxs23("span", { class: `${p24}-list-row-body`, children: [
7038
- /* @__PURE__ */ jsx27("span", { class: `${p24}-list-row-title`, children: title }),
7039
- subtitle ? /* @__PURE__ */ jsx27("span", { class: `${p24}-list-row-sub`, children: subtitle }) : null
7032
+ return /* @__PURE__ */ jsxs22("button", { type: "button", class: `${p23}-list-row`, onClick, "data-testid": testid, children: [
7033
+ /* @__PURE__ */ jsxs22("span", { class: `${p23}-list-row-body`, children: [
7034
+ /* @__PURE__ */ jsx27("span", { class: `${p23}-list-row-title`, children: title }),
7035
+ subtitle ? /* @__PURE__ */ jsx27("span", { class: `${p23}-list-row-sub`, children: subtitle }) : null
7040
7036
  ] }),
7041
- /* @__PURE__ */ jsx27("span", { class: `${p24}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx27(ChevronRightIcon, {}) })
7037
+ /* @__PURE__ */ jsx27("span", { class: `${p23}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx27(ChevronRightIcon, {}) })
7042
7038
  ] });
7043
7039
  }
7044
7040
 
7045
7041
  // src/ui/module-state.tsx
7046
- import { jsx as jsx28, jsxs as jsxs24 } from "preact/jsx-runtime";
7047
- var p25 = BRAND.cssPrefix;
7042
+ import { jsx as jsx28, jsxs as jsxs23 } from "preact/jsx-runtime";
7043
+ var p24 = BRAND.cssPrefix;
7048
7044
  function ModuleState({
7049
7045
  tone = "info",
7050
7046
  message,
7051
7047
  onRetry,
7052
7048
  strings
7053
7049
  }) {
7054
- return /* @__PURE__ */ jsxs24("div", { class: `${p25}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
7050
+ return /* @__PURE__ */ jsxs23("div", { class: `${p24}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
7055
7051
  /* @__PURE__ */ jsx28("span", { children: message }),
7056
- onRetry ? /* @__PURE__ */ jsx28("button", { type: "button", class: `${p25}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
7052
+ onRetry ? /* @__PURE__ */ jsx28("button", { type: "button", class: `${p24}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
7057
7053
  ] });
7058
7054
  }
7059
7055
 
7060
7056
  // src/ui/modules/help.tsx
7061
- import { jsx as jsx29, jsxs as jsxs25 } from "preact/jsx-runtime";
7062
- var p26 = BRAND.cssPrefix;
7057
+ import { jsx as jsx29, jsxs as jsxs24 } from "preact/jsx-runtime";
7058
+ var p25 = BRAND.cssPrefix;
7063
7059
  var log13 = logger.scope("help");
7064
7060
  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 });
7065
7061
  function groupByCategory(items) {
@@ -7134,22 +7130,22 @@ function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
7134
7130
  function renderBody() {
7135
7131
  if (query.trim().length > 0) {
7136
7132
  if (results.length === 0) return /* @__PURE__ */ jsx29(ModuleState, { message: strings.helpSearchEmpty, strings });
7137
- return /* @__PURE__ */ jsx29("div", { class: `${p26}-help-card`, children: results.map((a) => /* @__PURE__ */ jsx29(ArticleRow, { article: a, nav }, a.id)) });
7133
+ return /* @__PURE__ */ jsx29("div", { class: `${p25}-help-card`, children: results.map((a) => /* @__PURE__ */ jsx29(ArticleRow, { article: a, nav }, a.id)) });
7138
7134
  }
7139
7135
  if (state === "loading") return /* @__PURE__ */ jsx29(ModuleState, { message: strings.helpLoading, strings });
7140
7136
  if (state === "error") {
7141
7137
  return /* @__PURE__ */ jsx29(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
7142
7138
  }
7143
7139
  if (items.length === 0) return /* @__PURE__ */ jsx29(ModuleState, { message: strings.helpEmpty, strings });
7144
- return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs25("section", { class: `${p26}-help-group`, children: [
7145
- category ? /* @__PURE__ */ jsx29("h2", { class: `${p26}-help-section-title`, children: category }) : null,
7146
- /* @__PURE__ */ jsx29("div", { class: `${p26}-help-card`, children: rows.map((a) => /* @__PURE__ */ jsx29(ArticleRow, { article: a, nav }, a.id)) })
7140
+ return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs24("section", { class: `${p25}-help-group`, children: [
7141
+ category ? /* @__PURE__ */ jsx29("h2", { class: `${p25}-help-section-title`, children: category }) : null,
7142
+ /* @__PURE__ */ jsx29("div", { class: `${p25}-help-card`, children: rows.map((a) => /* @__PURE__ */ jsx29(ArticleRow, { article: a, nav }, a.id)) })
7147
7143
  ] }, category));
7148
7144
  }
7149
- return /* @__PURE__ */ jsxs25("div", { class: `${p26}-module`, children: [
7145
+ return /* @__PURE__ */ jsxs24("div", { class: `${p25}-module`, children: [
7150
7146
  /* @__PURE__ */ jsx29(TitleBar, { title: strings.helpTitle, actions: /* @__PURE__ */ jsx29(HeaderActions, { panelProps, variant: "plain" }) }),
7151
- /* @__PURE__ */ jsx29("div", { class: `${p26}-module-pad`, children: /* @__PURE__ */ jsx29(HelpSearchInput, { placeholder: strings.helpSearchPlaceholder, value: query, onInput: setQuery }) }),
7152
- /* @__PURE__ */ jsx29("div", { class: `${p26}-help-list`, children: renderBody() })
7147
+ /* @__PURE__ */ jsx29("div", { class: `${p25}-module-pad`, children: /* @__PURE__ */ jsx29(HelpSearchInput, { placeholder: strings.helpSearchPlaceholder, value: query, onInput: setQuery }) }),
7148
+ /* @__PURE__ */ jsx29("div", { class: `${p25}-help-list`, children: renderBody() })
7153
7149
  ] });
7154
7150
  }
7155
7151
  var helpLayout = {
@@ -7162,17 +7158,17 @@ import { useEffect as useEffect11, useState as useState9 } from "preact/hooks";
7162
7158
 
7163
7159
  // src/ui/home-card.tsx
7164
7160
  import { jsx as jsx30 } from "preact/jsx-runtime";
7165
- var p27 = BRAND.cssPrefix;
7161
+ var p26 = BRAND.cssPrefix;
7166
7162
  function HomeCard({ onClick, children, testid }) {
7167
7163
  if (onClick) {
7168
- return /* @__PURE__ */ jsx30("button", { type: "button", class: `${p27}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
7164
+ return /* @__PURE__ */ jsx30("button", { type: "button", class: `${p26}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
7169
7165
  }
7170
- return /* @__PURE__ */ jsx30("div", { class: `${p27}-home-card`, "data-testid": testid, children });
7166
+ return /* @__PURE__ */ jsx30("div", { class: `${p26}-home-card`, "data-testid": testid, children });
7171
7167
  }
7172
7168
 
7173
7169
  // src/ui/modules/home.tsx
7174
- import { Fragment as Fragment8, jsx as jsx31, jsxs as jsxs26 } from "preact/jsx-runtime";
7175
- var p28 = BRAND.cssPrefix;
7170
+ import { Fragment as Fragment8, jsx as jsx31, jsxs as jsxs25 } from "preact/jsx-runtime";
7171
+ var p27 = BRAND.cssPrefix;
7176
7172
  var log14 = logger.scope("home");
7177
7173
  function resolveGreeting(props2) {
7178
7174
  const name = props2.options.userContext?.name;
@@ -7215,21 +7211,21 @@ function HomeRoot(props2) {
7215
7211
  const status = config.status;
7216
7212
  const statusText = status?.text ? localizeText(strings, status.text) : strings.homeStatus;
7217
7213
  const contentTitle = config.contentBlockTitle ? localizeText(strings, config.contentBlockTitle) : strings.homeContentTitle;
7218
- return /* @__PURE__ */ jsx31("div", { class: `${p28}-module ${p28}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-scroll`, children: [
7219
- /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero`, children: [
7220
- /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-top`, children: [
7221
- config.brandName ? /* @__PURE__ */ jsx31("span", { class: `${p28}-home-brand`, "data-testid": TID.homeBrand, children: config.brandName }) : /* @__PURE__ */ jsx31("span", { class: `${p28}-home-brand-spacer`, "aria-hidden": "true" }),
7222
- /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-actions`, children: [
7223
- avatars.length > 0 ? /* @__PURE__ */ jsx31("div", { class: `${p28}-home-avatars`, children: avatars.map((a) => /* @__PURE__ */ jsx31("span", { class: `${p28}-home-avatar`, title: a.role ? `${a.name} \xB7 ${a.role}` : a.name, children: a.avatar ? /* @__PURE__ */ jsx31("img", { src: a.avatar, alt: "", loading: "lazy" }) : /* @__PURE__ */ jsx31("span", { children: initials(a.name) }) }, a.name)) }) : null,
7214
+ return /* @__PURE__ */ jsx31("div", { class: `${p27}-module ${p27}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-scroll`, children: [
7215
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-hero`, children: [
7216
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-hero-top`, children: [
7217
+ config.brandName ? /* @__PURE__ */ jsx31("span", { class: `${p27}-home-brand`, "data-testid": TID.homeBrand, children: config.brandName }) : /* @__PURE__ */ jsx31("span", { class: `${p27}-home-brand-spacer`, "aria-hidden": "true" }),
7218
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-hero-actions`, children: [
7219
+ avatars.length > 0 ? /* @__PURE__ */ jsx31("div", { class: `${p27}-home-avatars`, children: avatars.map((a) => /* @__PURE__ */ jsx31("span", { class: `${p27}-home-avatar`, title: a.role ? `${a.name} \xB7 ${a.role}` : a.name, children: a.avatar ? /* @__PURE__ */ jsx31("img", { src: a.avatar, alt: "", loading: "lazy" }) : /* @__PURE__ */ jsx31("span", { children: initials(a.name) }) }, a.name)) }) : null,
7224
7220
  /* @__PURE__ */ jsx31(HeaderActions, { panelProps, variant: "plain" })
7225
7221
  ] })
7226
7222
  ] }),
7227
- config.showGreeting !== false ? /* @__PURE__ */ jsxs26(Fragment8, { children: [
7228
- /* @__PURE__ */ jsx31("h1", { class: `${p28}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
7229
- greeting.subtitle ? /* @__PURE__ */ jsx31("p", { class: `${p28}-home-lead`, children: greeting.subtitle }) : null
7223
+ config.showGreeting !== false ? /* @__PURE__ */ jsxs25(Fragment8, { children: [
7224
+ /* @__PURE__ */ jsx31("h1", { class: `${p27}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
7225
+ greeting.subtitle ? /* @__PURE__ */ jsx31("p", { class: `${p27}-home-lead`, children: greeting.subtitle }) : null
7230
7226
  ] }) : null
7231
7227
  ] }),
7232
- /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-cards`, children: [
7228
+ /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-cards`, children: [
7233
7229
  config.showSearchBar !== false ? /* @__PURE__ */ jsx31(
7234
7230
  HomeSearchButton,
7235
7231
  {
@@ -7237,27 +7233,27 @@ function HomeRoot(props2) {
7237
7233
  onActivate: () => nav.switchToLayout("help")
7238
7234
  }
7239
7235
  ) : null,
7240
- recent ? /* @__PURE__ */ jsx31(HomeCard, { onClick: () => nav.selectConversation(recent.conversationId), testid: TID.homeRecent, children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-recent-row`, "data-unread": (recent.unreadCount ?? 0) > 0 ? "true" : void 0, children: [
7241
- /* @__PURE__ */ jsx31("span", { class: `${p28}-home-recent-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx31(BubblesIcon, {}) }),
7242
- /* @__PURE__ */ jsxs26("span", { class: `${p28}-home-recent-body`, children: [
7243
- /* @__PURE__ */ jsx31("span", { class: `${p28}-home-recent-title`, children: recent.title }),
7244
- recent.preview ? /* @__PURE__ */ jsx31("span", { class: `${p28}-home-recent-preview`, children: recent.preview }) : null
7236
+ recent ? /* @__PURE__ */ jsx31(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: [
7237
+ /* @__PURE__ */ jsx31("span", { class: `${p27}-home-recent-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx31(BubblesIcon, {}) }),
7238
+ /* @__PURE__ */ jsxs25("span", { class: `${p27}-home-recent-body`, children: [
7239
+ /* @__PURE__ */ jsx31("span", { class: `${p27}-home-recent-title`, children: recent.title }),
7240
+ recent.preview ? /* @__PURE__ */ jsx31("span", { class: `${p27}-home-recent-preview`, children: recent.preview }) : null
7245
7241
  ] }),
7246
- (recent.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx31("span", { class: `${p28}-home-recent-dot`, "aria-label": "Unread" }) : null
7242
+ (recent.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx31("span", { class: `${p27}-home-recent-dot`, "aria-label": "Unread" }) : null
7247
7243
  ] }) }) : null,
7248
7244
  status ? /* @__PURE__ */ jsx31(
7249
7245
  HomeCard,
7250
7246
  {
7251
7247
  onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: statusText }) : void 0,
7252
- children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-status`, "data-level": status.level ?? "operational", children: [
7253
- /* @__PURE__ */ jsx31("span", { class: `${p28}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx31(StatusOkIcon, {}) }),
7254
- /* @__PURE__ */ jsx31("span", { class: `${p28}-home-status-text`, children: statusText })
7248
+ children: /* @__PURE__ */ jsxs25("div", { class: `${p27}-home-status`, "data-level": status.level ?? "operational", children: [
7249
+ /* @__PURE__ */ jsx31("span", { class: `${p27}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx31(StatusOkIcon, {}) }),
7250
+ /* @__PURE__ */ jsx31("span", { class: `${p27}-home-status-text`, children: statusText })
7255
7251
  ] })
7256
7252
  }
7257
7253
  ) : null,
7258
- content.length > 0 ? /* @__PURE__ */ jsxs26("section", { class: `${p28}-home-content`, children: [
7259
- /* @__PURE__ */ jsx31("div", { class: `${p28}-home-content-title`, children: contentTitle }),
7260
- /* @__PURE__ */ jsx31("div", { class: `${p28}-home-content-list`, children: content.map((item) => /* @__PURE__ */ jsx31(
7254
+ content.length > 0 ? /* @__PURE__ */ jsxs25("section", { class: `${p27}-home-content`, children: [
7255
+ /* @__PURE__ */ jsx31("div", { class: `${p27}-home-content-title`, children: contentTitle }),
7256
+ /* @__PURE__ */ jsx31("div", { class: `${p27}-home-content-list`, children: content.map((item) => /* @__PURE__ */ jsx31(
7261
7257
  ListRow,
7262
7258
  {
7263
7259
  title: item.title,
@@ -7278,8 +7274,8 @@ var homeLayout = {
7278
7274
 
7279
7275
  // src/ui/modules/news.tsx
7280
7276
  import { useEffect as useEffect12, useState as useState10 } from "preact/hooks";
7281
- import { jsx as jsx32, jsxs as jsxs27 } from "preact/jsx-runtime";
7282
- var p29 = BRAND.cssPrefix;
7277
+ import { jsx as jsx32, jsxs as jsxs26 } from "preact/jsx-runtime";
7278
+ var p28 = BRAND.cssPrefix;
7283
7279
  var log15 = logger.scope("news");
7284
7280
  function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
7285
7281
  const tags = config.contentTags;
@@ -7312,27 +7308,27 @@ function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
7312
7308
  return /* @__PURE__ */ jsx32(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
7313
7309
  }
7314
7310
  if (items.length === 0) return /* @__PURE__ */ jsx32(ModuleState, { message: strings.newsEmpty, strings });
7315
- return /* @__PURE__ */ jsx32("div", { class: `${p29}-news-list`, children: items.map((item) => /* @__PURE__ */ jsxs27(
7311
+ return /* @__PURE__ */ jsx32("div", { class: `${p28}-news-list`, children: items.map((item) => /* @__PURE__ */ jsxs26(
7316
7312
  "button",
7317
7313
  {
7318
7314
  type: "button",
7319
- class: `${p29}-news-card`,
7315
+ class: `${p28}-news-card`,
7320
7316
  onClick: () => nav.push({ kind: "content", id: item.id, title: item.title }),
7321
7317
  "data-testid": tid(TID.newsItem, item.id),
7322
7318
  children: [
7323
- item.image ? /* @__PURE__ */ jsx32("img", { class: `${p29}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
7324
- /* @__PURE__ */ jsxs27("span", { class: `${p29}-news-body`, children: [
7325
- /* @__PURE__ */ jsx32("span", { class: `${p29}-news-title`, children: item.title }),
7326
- item.description ? /* @__PURE__ */ jsx32("span", { class: `${p29}-news-summary`, children: item.description }) : null
7319
+ item.image ? /* @__PURE__ */ jsx32("img", { class: `${p28}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
7320
+ /* @__PURE__ */ jsxs26("span", { class: `${p28}-news-body`, children: [
7321
+ /* @__PURE__ */ jsx32("span", { class: `${p28}-news-title`, children: item.title }),
7322
+ item.description ? /* @__PURE__ */ jsx32("span", { class: `${p28}-news-summary`, children: item.description }) : null
7327
7323
  ] })
7328
7324
  ]
7329
7325
  },
7330
7326
  item.id
7331
7327
  )) });
7332
7328
  }
7333
- return /* @__PURE__ */ jsxs27("div", { class: `${p29}-module`, children: [
7329
+ return /* @__PURE__ */ jsxs26("div", { class: `${p28}-module`, children: [
7334
7330
  /* @__PURE__ */ jsx32(TitleBar, { title: strings.newsTitle, actions: /* @__PURE__ */ jsx32(HeaderActions, { panelProps, variant: "plain" }) }),
7335
- /* @__PURE__ */ jsx32("div", { class: `${p29}-module-scroll`, children: renderBody() })
7331
+ /* @__PURE__ */ jsx32("div", { class: `${p28}-module-scroll`, children: renderBody() })
7336
7332
  ] });
7337
7333
  }
7338
7334
  var newsLayout = {
@@ -7349,28 +7345,28 @@ var LAYOUTS = {
7349
7345
  };
7350
7346
 
7351
7347
  // src/ui/home-tab-bar.tsx
7352
- import { jsx as jsx33, jsxs as jsxs28 } from "preact/jsx-runtime";
7353
- var p30 = BRAND.cssPrefix;
7348
+ import { jsx as jsx33, jsxs as jsxs27 } from "preact/jsx-runtime";
7349
+ var p29 = BRAND.cssPrefix;
7354
7350
  function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
7355
- return /* @__PURE__ */ jsx33("nav", { class: `${p30}-tabbar`, role: "tablist", "aria-label": strings.panelTitle, children: modules.map((m) => {
7351
+ return /* @__PURE__ */ jsx33("nav", { class: `${p29}-tabbar`, role: "tablist", "aria-label": strings.panelTitle, children: modules.map((m) => {
7356
7352
  const Icon = LAYOUTS[m.layout].Icon;
7357
7353
  const selected = m.id === activeTab;
7358
7354
  const badge = m.layout === "chat" && unreadCount > 0 ? unreadCount > 9 ? "9+" : String(unreadCount) : null;
7359
- return /* @__PURE__ */ jsxs28(
7355
+ return /* @__PURE__ */ jsxs27(
7360
7356
  "button",
7361
7357
  {
7362
7358
  type: "button",
7363
7359
  role: "tab",
7364
7360
  "aria-selected": selected,
7365
- class: `${p30}-tab`,
7361
+ class: `${p29}-tab`,
7366
7362
  onClick: () => onSelect(m.id),
7367
7363
  "data-testid": tid(TID.tab, m.id),
7368
7364
  children: [
7369
- /* @__PURE__ */ jsxs28("span", { class: `${p30}-tab-icon`, "aria-hidden": "true", children: [
7365
+ /* @__PURE__ */ jsxs27("span", { class: `${p29}-tab-icon`, "aria-hidden": "true", children: [
7370
7366
  /* @__PURE__ */ jsx33(Icon, {}),
7371
- badge ? /* @__PURE__ */ jsx33("span", { class: `${p30}-tab-badge`, "data-testid": TID.tabBadge, children: badge }) : null
7367
+ badge ? /* @__PURE__ */ jsx33("span", { class: `${p29}-tab-badge`, "data-testid": TID.tabBadge, children: badge }) : null
7372
7368
  ] }),
7373
- /* @__PURE__ */ jsx33("span", { class: `${p30}-tab-label`, children: localizeText(strings, m.label) })
7369
+ /* @__PURE__ */ jsx33("span", { class: `${p29}-tab-label`, children: localizeText(strings, m.label) })
7374
7370
  ]
7375
7371
  },
7376
7372
  m.id
@@ -7379,11 +7375,11 @@ function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
7379
7375
  }
7380
7376
 
7381
7377
  // src/ui/iframe-view.tsx
7382
- import { jsx as jsx34, jsxs as jsxs29 } from "preact/jsx-runtime";
7383
- var p31 = BRAND.cssPrefix;
7378
+ import { jsx as jsx34, jsxs as jsxs28 } from "preact/jsx-runtime";
7379
+ var p30 = BRAND.cssPrefix;
7384
7380
  var SANDBOX = "allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads";
7385
7381
  function IframeView({ url, title, strings, onBack, actions }) {
7386
- return /* @__PURE__ */ jsxs29("div", { class: `${p31}-module`, children: [
7382
+ return /* @__PURE__ */ jsxs28("div", { class: `${p30}-module`, children: [
7387
7383
  /* @__PURE__ */ jsx34(
7388
7384
  BackHeader,
7389
7385
  {
@@ -7396,7 +7392,7 @@ function IframeView({ url, title, strings, onBack, actions }) {
7396
7392
  /* @__PURE__ */ jsx34(
7397
7393
  "iframe",
7398
7394
  {
7399
- class: `${p31}-content-frame`,
7395
+ class: `${p30}-content-frame`,
7400
7396
  src: url,
7401
7397
  title: title || "content",
7402
7398
  sandbox: SANDBOX,
@@ -7410,8 +7406,8 @@ function IframeView({ url, title, strings, onBack, actions }) {
7410
7406
 
7411
7407
  // src/ui/content-view.tsx
7412
7408
  import { useCallback as useCallback3, useEffect as useEffect13, useState as useState11 } from "preact/hooks";
7413
- import { jsx as jsx35, jsxs as jsxs30 } from "preact/jsx-runtime";
7414
- var p32 = BRAND.cssPrefix;
7409
+ import { jsx as jsx35, jsxs as jsxs29 } from "preact/jsx-runtime";
7410
+ var p31 = BRAND.cssPrefix;
7415
7411
  var log16 = logger.scope("content");
7416
7412
  var READ_DWELL_MS = 5e3;
7417
7413
  function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
@@ -7457,13 +7453,13 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
7457
7453
  function renderBody() {
7458
7454
  if (failed) return /* @__PURE__ */ jsx35(ModuleState, { tone: "error", message: strings.errorGeneric, onRetry: retry, strings });
7459
7455
  if (item === null) return /* @__PURE__ */ jsx35(ModuleState, { message: strings.contentLoading, strings });
7460
- return /* @__PURE__ */ jsxs30("article", { class: `${p32}-content`, "data-testid": TID.contentView, onClick: onArticleClick, children: [
7461
- item.image ? /* @__PURE__ */ jsx35("img", { class: `${p32}-content-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
7462
- item.description ? /* @__PURE__ */ jsx35("p", { class: `${p32}-content-subtitle`, children: item.description }) : null,
7456
+ return /* @__PURE__ */ jsxs29("article", { class: `${p31}-content`, "data-testid": TID.contentView, onClick: onArticleClick, children: [
7457
+ item.image ? /* @__PURE__ */ jsx35("img", { class: `${p31}-content-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
7458
+ item.description ? /* @__PURE__ */ jsx35("p", { class: `${p31}-content-subtitle`, children: item.description }) : null,
7463
7459
  /* @__PURE__ */ jsx35(StaticMarkdown, { text: item.content ?? "" })
7464
7460
  ] });
7465
7461
  }
7466
- return /* @__PURE__ */ jsxs30("div", { class: `${p32}-module`, children: [
7462
+ return /* @__PURE__ */ jsxs29("div", { class: `${p31}-module`, children: [
7467
7463
  /* @__PURE__ */ jsx35(
7468
7464
  BackHeader,
7469
7465
  {
@@ -7474,13 +7470,13 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
7474
7470
  testid: TID.backHeader
7475
7471
  }
7476
7472
  ),
7477
- /* @__PURE__ */ jsx35("div", { class: `${p32}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
7473
+ /* @__PURE__ */ jsx35("div", { class: `${p31}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
7478
7474
  ] });
7479
7475
  }
7480
7476
 
7481
7477
  // src/ui/messenger-home.tsx
7482
- import { jsx as jsx36, jsxs as jsxs31 } from "preact/jsx-runtime";
7483
- var p33 = BRAND.cssPrefix;
7478
+ import { jsx as jsx36, jsxs as jsxs30 } from "preact/jsx-runtime";
7479
+ var p32 = BRAND.cssPrefix;
7484
7480
  function MessengerHome({
7485
7481
  panelProps,
7486
7482
  enabledModules,
@@ -7514,7 +7510,7 @@ function MessengerHome({
7514
7510
  }, []);
7515
7511
  const { visible: dragOver } = useFileDrop({ containerRef, onDrop: onDropItems });
7516
7512
  useDragMove(containerRef.current, options.mode === "modal");
7517
- const navState = useComputed7(() => nav.sig.value).value;
7513
+ const navState = useComputed8(() => nav.sig.value).value;
7518
7514
  const top = topScreen(navState);
7519
7515
  const activeModule = options.modules.byId[navState.activeTab];
7520
7516
  const isReader = top?.kind === "iframe" || top?.kind === "content";
@@ -7589,19 +7585,19 @@ function MessengerHome({
7589
7585
  }
7590
7586
  return null;
7591
7587
  };
7592
- return /* @__PURE__ */ jsxs31(
7588
+ return /* @__PURE__ */ jsxs30(
7593
7589
  "div",
7594
7590
  {
7595
7591
  ref: containerRef,
7596
- class: `${p33}-panel ${p33}-messenger`,
7592
+ class: `${p32}-panel ${p32}-messenger`,
7597
7593
  role: "dialog",
7598
7594
  "aria-modal": "false",
7599
7595
  "aria-label": strings.panelTitle,
7600
7596
  style: { position: "relative" },
7601
7597
  "data-testid": TID.messengerHome,
7602
7598
  children: [
7603
- /* @__PURE__ */ jsxs31("div", { class: `${p33}-messenger-body`, children: [
7604
- visitedTabs.map((m) => /* @__PURE__ */ jsx36("div", { class: `${p33}-messenger-pane`, hidden: isReader || m.id !== activeModule?.id, children: tabRoot(m) }, m.id)),
7599
+ /* @__PURE__ */ jsxs30("div", { class: `${p32}-messenger-body`, children: [
7600
+ visitedTabs.map((m) => /* @__PURE__ */ jsx36("div", { class: `${p32}-messenger-pane`, hidden: isReader || m.id !== activeModule?.id, children: tabRoot(m) }, m.id)),
7605
7601
  renderReader()
7606
7602
  ] }),
7607
7603
  showTabBar ? /* @__PURE__ */ jsx36(
@@ -7632,13 +7628,13 @@ function MessengerHome({
7632
7628
  }
7633
7629
 
7634
7630
  // src/ui/modules-empty.tsx
7635
- import { jsx as jsx37, jsxs as jsxs32 } from "preact/jsx-runtime";
7636
- var p34 = BRAND.cssPrefix;
7631
+ import { jsx as jsx37, jsxs as jsxs31 } from "preact/jsx-runtime";
7632
+ var p33 = BRAND.cssPrefix;
7637
7633
  function ModulesEmpty({ strings, onClose }) {
7638
- return /* @__PURE__ */ jsxs32(
7634
+ return /* @__PURE__ */ jsxs31(
7639
7635
  "div",
7640
7636
  {
7641
- class: `${p34}-panel ${p34}-modules-empty`,
7637
+ class: `${p33}-panel ${p33}-modules-empty`,
7642
7638
  role: "dialog",
7643
7639
  "aria-label": strings.panelTitle,
7644
7640
  "data-testid": TID.modulesEmpty,
@@ -7647,14 +7643,14 @@ function ModulesEmpty({ strings, onClose }) {
7647
7643
  "button",
7648
7644
  {
7649
7645
  type: "button",
7650
- class: `${p34}-icon-btn ${p34}-modules-empty-close`,
7646
+ class: `${p33}-icon-btn ${p33}-modules-empty-close`,
7651
7647
  onClick: onClose,
7652
7648
  "aria-label": strings.close,
7653
7649
  title: strings.close,
7654
7650
  children: /* @__PURE__ */ jsx37(CloseIcon, {})
7655
7651
  }
7656
7652
  ) : null,
7657
- /* @__PURE__ */ jsx37("p", { class: `${p34}-modules-empty-text`, children: strings.modulesEmpty })
7653
+ /* @__PURE__ */ jsx37("p", { class: `${p33}-modules-empty-text`, children: strings.modulesEmpty })
7658
7654
  ]
7659
7655
  }
7660
7656
  );
@@ -7677,9 +7673,9 @@ function useLauncherCallout({ callout, persistence }) {
7677
7673
  }
7678
7674
 
7679
7675
  // src/ui/app.tsx
7680
- import { jsx as jsx38, jsxs as jsxs33 } from "preact/jsx-runtime";
7676
+ import { jsx as jsx38, jsxs as jsxs32 } from "preact/jsx-runtime";
7681
7677
  var log17 = logger.scope("app");
7682
- var p35 = BRAND.cssPrefix;
7678
+ var p34 = BRAND.cssPrefix;
7683
7679
  function makeLocalizedWelcome(w, strings) {
7684
7680
  return makeInstantWelcomeMessage({ ...w, text: localizeText(strings, w.text) });
7685
7681
  }
@@ -8284,7 +8280,7 @@ function App({ options, hostElement, bus }) {
8284
8280
  );
8285
8281
  const regenerateDanglingTurn = useCallback6(() => {
8286
8282
  if (streaming || regenInFlightRef.current || resumeBubbleRef.current) return;
8287
- const last = messagesSig.value.filter((m) => !m.ephemeral).at(-1);
8283
+ const last = messagesSig.value.findLast((m) => !m.ephemeral);
8288
8284
  if (last?.role !== "user") return;
8289
8285
  regenInFlightRef.current = true;
8290
8286
  log17.info("regenerating dangling user turn (needs-generation)");
@@ -8402,12 +8398,12 @@ function App({ options, hostElement, bus }) {
8402
8398
  void transport.submitForm({ formId: form.id, conversationId: activeConversationId, trigger, values, skipped });
8403
8399
  }
8404
8400
  });
8405
- const activeForm = useComputed8(() => forms.activeForm.value);
8401
+ const activeForm = useComputed9(() => forms.activeForm.value);
8406
8402
  useEffect16(() => {
8407
8403
  forms.refresh();
8408
8404
  }, [effectiveForms, forms]);
8409
8405
  const pageArea = options.pageContext?.area ? String(options.pageContext.area) : void 0;
8410
- const msgCount = useComputed8(() => messagesSig.value.length);
8406
+ const msgCount = useComputed9(() => messagesSig.value.length);
8411
8407
  useEffect16(() => {
8412
8408
  if (conversationReady && formsReady) forms.fire("pre-chat");
8413
8409
  }, [conversationReady, formsReady, forms]);
@@ -8765,7 +8761,7 @@ function App({ options, hostElement, bus }) {
8765
8761
  void handleSelectHistoryConversation(chat.conversationId);
8766
8762
  };
8767
8763
  const conversationsEnabled = enabledModules.some((m) => m.layout === "chat");
8768
- return /* @__PURE__ */ jsx38("div", { class: `${p35}-anchor`, children: /* @__PURE__ */ jsx38(
8764
+ return /* @__PURE__ */ jsx38("div", { class: `${p34}-anchor`, children: /* @__PURE__ */ jsx38(
8769
8765
  PageShell,
8770
8766
  {
8771
8767
  site: parsedSite,
@@ -8786,14 +8782,14 @@ function App({ options, hostElement, bus }) {
8786
8782
  }
8787
8783
  if (isInlineLike) {
8788
8784
  const inlineSize = options.mode === "standalone" ? "fullscreen" : panelSize;
8789
- return /* @__PURE__ */ jsx38("div", { class: `${p35}-anchor`, children: renderSurface(inlineSize) });
8785
+ return /* @__PURE__ */ jsx38("div", { class: `${p34}-anchor`, children: renderSurface(inlineSize) });
8790
8786
  }
8791
8787
  const drawerEdgeTab = options.mode === "drawer";
8792
8788
  const triggerOwnedByPage = options.mode === "modal";
8793
8789
  const launcherVisible = !triggerOwnedByPage && !options.launcher.hidden && (!isOpen || launcherLeaving);
8794
8790
  const calloutToRender = launcherVisible && !launcherLeaving && !calloutDismissed && !drawerEdgeTab ? effectiveOptions.launcher.callout : null;
8795
- return /* @__PURE__ */ jsxs33("div", { class: `${p35}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
8796
- isOpen || activated ? /* @__PURE__ */ jsx38("div", { class: `${p35}-surface`, hidden: !isOpen, children: renderSurface(panelSize) }) : null,
8791
+ return /* @__PURE__ */ jsxs32("div", { class: `${p34}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
8792
+ isOpen || activated ? /* @__PURE__ */ jsx38("div", { class: `${p34}-surface`, hidden: !isOpen, children: renderSurface(panelSize) }) : null,
8797
8793
  launcherVisible ? /* @__PURE__ */ jsx38(
8798
8794
  Launcher,
8799
8795
  {
@@ -8869,34 +8865,34 @@ var TRACKED = {
8869
8865
  expand: (on) => ({ on }),
8870
8866
  fullscreen: (on) => ({ on }),
8871
8867
  // Conversation funnel. `send` is the key conversion; text never rides.
8872
- send: (p36) => ({ attachments: p36.attachmentCount }),
8873
- message: (p36) => ({ role: p36.role }),
8868
+ send: (p35) => ({ attachments: p35.attachmentCount }),
8869
+ message: (p35) => ({ role: p35.role }),
8874
8870
  stop: () => void 0,
8875
8871
  clear: () => void 0,
8876
8872
  suggestion: () => void 0,
8877
- toggleHistory: (p36) => ({ view: p36.view }),
8873
+ toggleHistory: (p35) => ({ view: p35.view }),
8878
8874
  handshake: () => void 0,
8879
8875
  // Forms + human-in-the-loop — ids and outcomes, never values.
8880
- formSubmit: (p36) => ({ formId: p36.formId, skipped: p36.skipped }),
8876
+ formSubmit: (p35) => ({ formId: p35.formId, skipped: p35.skipped }),
8881
8877
  toolResult: () => void 0,
8882
- toolDecision: (p36) => ({ approved: p36.approved }),
8878
+ toolDecision: (p35) => ({ approved: p35.approved }),
8883
8879
  // Content — ids, tags + counts only; titles/bodies never ride.
8884
- contentView: (p36) => ({ section: p36.section, tags: p36.tags, count: p36.count }),
8885
- contentOpen: (p36) => ({ contentId: p36.contentId, tags: p36.tags }),
8886
- contentSearch: (p36) => ({ qlen: p36.queryLength, hits: p36.hitCount }),
8887
- contentRead: (p36) => ({ contentId: p36.contentId }),
8888
- contentLinkClick: (p36) => ({ contentId: p36.contentId }),
8880
+ contentView: (p35) => ({ section: p35.section, tags: p35.tags, count: p35.count }),
8881
+ contentOpen: (p35) => ({ contentId: p35.contentId, tags: p35.tags }),
8882
+ contentSearch: (p35) => ({ qlen: p35.queryLength, hits: p35.hitCount }),
8883
+ contentRead: (p35) => ({ contentId: p35.contentId }),
8884
+ contentLinkClick: (p35) => ({ contentId: p35.contentId }),
8889
8885
  // Composer / attachments / voice.
8890
- attach: (p36) => ({ count: p36.count, bytes: p36.totalBytes }),
8886
+ attach: (p35) => ({ count: p35.count, bytes: p35.totalBytes }),
8891
8887
  voiceStart: () => void 0,
8892
- voiceStop: (p36) => ({ ms: p36.durationMs }),
8888
+ voiceStop: (p35) => ({ ms: p35.durationMs }),
8893
8889
  voiceCancel: () => void 0,
8894
8890
  // Preferences — how visitors tune the surface.
8895
8891
  localeChange: (locale) => ({ locale }),
8896
8892
  themeChange: (theme) => ({ theme }),
8897
8893
  textSizeChange: (size) => ({ size }),
8898
- soundToggle: (p36) => ({ muted: p36.muted }),
8899
- sidebarToggle: (p36) => ({ collapsed: p36.collapsed }),
8894
+ soundToggle: (p35) => ({ muted: p35.muted }),
8895
+ sidebarToggle: (p35) => ({ collapsed: p35.collapsed }),
8900
8896
  calloutDismiss: () => void 0,
8901
8897
  // Health signal only — the error object itself never leaves the page.
8902
8898
  error: () => void 0