@helpai/elements 0.14.0 → 0.14.1
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/configurator.mjs +3 -5
- package/elements-web-component.esm.js +25 -25
- package/elements-web-component.esm.js.map +4 -4
- package/elements.cjs.js +27 -27
- package/elements.cjs.js.map +4 -4
- package/elements.esm.js +27 -27
- package/elements.esm.js.map +4 -4
- package/elements.js +25 -25
- package/elements.js.map +4 -4
- package/index.d.ts +9 -11
- package/index.mjs +448 -499
- package/package.json +1 -1
- package/schema.d.ts +3 -5
- package/schema.json +4 -20
- package/schema.mjs +3 -5
- package/style.css +1 -1
- package/web-component.mjs +448 -499
package/index.mjs
CHANGED
|
@@ -109,7 +109,6 @@ var STRINGS_EN = {
|
|
|
109
109
|
// ── Forms + human-in-the-loop (forms / ask-input / approval) ────
|
|
110
110
|
formSubmit: "Submit",
|
|
111
111
|
formSkip: "Skip for now",
|
|
112
|
-
formDismiss: "Dismiss",
|
|
113
112
|
formRequired: "This field is required",
|
|
114
113
|
formInvalidEmail: "Enter a valid email address",
|
|
115
114
|
formInvalidTel: "Enter a valid phone number",
|
|
@@ -215,7 +214,6 @@ var STRINGS_FR = {
|
|
|
215
214
|
// ── Forms + human-in-the-loop (forms / ask-input / approval) ────
|
|
216
215
|
formSubmit: "Envoyer",
|
|
217
216
|
formSkip: "Ignorer pour l'instant",
|
|
218
|
-
formDismiss: "Fermer",
|
|
219
217
|
formRequired: "Ce champ est obligatoire",
|
|
220
218
|
formInvalidEmail: "Saisissez une adresse e-mail valide",
|
|
221
219
|
formInvalidTel: "Saisissez un num\xE9ro de t\xE9l\xE9phone valide",
|
|
@@ -624,7 +622,6 @@ function resolveModules(overrides) {
|
|
|
624
622
|
const byId = Object.fromEntries(list.map((m) => [m.id, m]));
|
|
625
623
|
return { list, byId };
|
|
626
624
|
}
|
|
627
|
-
var BLOCKABLE_KINDS = /* @__PURE__ */ new Set(["pre-chat", "after-messages"]);
|
|
628
625
|
function resolveForms(overrides) {
|
|
629
626
|
var _a;
|
|
630
627
|
if (!overrides?.length) return DEFAULT_FORMS;
|
|
@@ -636,7 +633,6 @@ function resolveForms(overrides) {
|
|
|
636
633
|
const triggers = (Array.isArray(def.on) ? def.on : [def.on]).map(parseTrigger).filter((t) => t !== null);
|
|
637
634
|
if (fields.length === 0 || triggers.length === 0) continue;
|
|
638
635
|
seen.add(def.id);
|
|
639
|
-
const blockable = triggers.some((t) => BLOCKABLE_KINDS.has(t.kind));
|
|
640
636
|
list.push({
|
|
641
637
|
id: def.id,
|
|
642
638
|
triggers,
|
|
@@ -646,7 +642,6 @@ function resolveForms(overrides) {
|
|
|
646
642
|
description: def.description,
|
|
647
643
|
submitLabel: def.submitLabel,
|
|
648
644
|
skippable: def.skippable ?? false,
|
|
649
|
-
blocking: (def.blocking ?? false) && blockable,
|
|
650
645
|
frequency: def.frequency ?? "once",
|
|
651
646
|
mirrorToContext: def.mirrorToContext ?? true
|
|
652
647
|
});
|
|
@@ -912,7 +907,7 @@ var tokens_default = ':host{--__P__-accent: __BRAND_ACCENT__;--__P__-accent-text
|
|
|
912
907
|
var reset_default = '*,*:before,*:after{box-sizing:border-box;margin:0;padding:0;border:0}button{font:inherit;color:inherit;background:none;cursor:pointer;-webkit-appearance:none;appearance:none;line-height:1}button:focus-visible,[tabindex]:focus-visible,textarea:focus-visible,input:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}textarea,input{font:inherit;color:inherit;background:none;border:0;outline:0;resize:none}a{color:var(--__P__-accent);text-decoration:underline;text-underline-offset:2px}img,svg{display:block;max-width:100%}ul,ol{list-style:none}.__P__-app{display:block;width:100%;height:100%;font-family:var(--__P__-font);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"cv11","ss01","ss03"}.__P__-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n';
|
|
913
908
|
|
|
914
909
|
// src/styles/panel.css
|
|
915
|
-
var panel_default = '.__P__-anchor{right:16px;bottom:16px}:host([data-position="bottom-left"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{right:auto;left:16px}:host([data-position="top-right"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{bottom:auto;top:16px}.__P__-anchor{position:fixed;display:flex;flex-direction:column;align-items:flex-end;gap:var(--__P__-space-3);pointer-events:none}.__P__-anchor{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=sm]{--__P__-fab-size: 44px}.__P__-anchor[data-launcher-size=md]{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=lg]{--__P__-fab-size: 68px}.__P__-anchor>*{pointer-events:auto}.__P__-fab[data-size=sm]{--__P__-fab-size: 44px;font-size:var(--__P__-text-sm)}.__P__-fab[data-size=md]{--__P__-fab-size: 56px;font-size:14px}.__P__-fab[data-size=lg]{--__P__-fab-size: 68px;font-size:var(--__P__-text-base)}.__P__-fab{display:inline-flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);color:var(--__P__-accent-text);background:var(--__P__-accent);box-shadow:var(--__P__-shadow-fab);font-weight:600;line-height:1;transform-origin:bottom right;animation:__P__-fab-in var(--__P__-dur-base) var(--__P__-ease) both;transition:transform var(--__P__-dur-base) var(--__P__-ease),opacity var(--__P__-dur-base) var(--__P__-ease),box-shadow var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab:hover{transform:translateY(-2px)}.__P__-fab:active{transform:translateY(0)}.__P__-fab:focus-visible{outline:2px solid var(--__P__-on-accent);outline-offset:3px}.__P__-fab svg{width:24px;height:24px;flex-shrink:0}@keyframes __P__-fab-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}.__P__-fab[data-leaving]{position:absolute;right:0;bottom:0;animation:__P__-fab-out var(--__P__-dur-quick) var(--__P__-ease) forwards;pointer-events:none}:host([data-position^="top-"]) .__P__-fab[data-leaving]{bottom:auto;top:0}:host([data-position$="-left"]) .__P__-fab[data-leaving]{right:auto;left:0}@keyframes __P__-fab-out{0%{opacity:1;transform:none}to{opacity:0;transform:scale(.85)}}.__P__-fab[data-variant=circle]{width:var(--__P__-fab-size);height:var(--__P__-fab-size);border-radius:999px}.__P__-fab[data-variant=circle] .__P__-fab-label{display:none}.__P__-fab[data-variant=pill]{height:var(--__P__-fab-size);padding:0 18px 0 16px;border-radius:999px}.__P__-fab[data-variant=bar]{height:var(--__P__-fab-size);padding:0 22px;border-radius:var(--__P__-radius)}.__P__-fab[data-variant=minimal]{height:var(--__P__-fab-size);padding:0 var(--__P__-space-4);border-radius:999px;background:transparent;color:var(--__P__-accent);box-shadow:none;border:1px solid currentColor}.__P__-fab[data-variant=minimal]:hover{background:color-mix(in srgb,var(--__P__-accent) 12%,transparent)}.__P__-callout{--__P__-callout-fab-h: var(--__P__-fab-size, 56px);--__P__-callout-gap: clamp(12px, calc(var(--__P__-callout-fab-h) * .25), 22px);--__P__-callout-nudge-direction: -1;position:absolute;display:inline-flex;align-items:center;gap:var(--__P__-space-2);padding:10px 14px;background:var(--__P__-fg);color:var(--__P__-bg);border-radius:999px;font-size:var(--__P__-text-sm);font-weight:600;line-height:1.2;box-shadow:0 10px 30px -8px #00000059;pointer-events:auto;animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease);z-index:1;max-width:240px;white-space:nowrap}.__P__-callout[data-position=left]{right:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%)}.__P__-callout[data-position=right]{left:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%);--__P__-callout-nudge-direction: 1}.__P__-callout[data-position=top]{bottom:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-position=bottom]{top:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}:host([data-position$="-left"]) .__P__-callout[data-position=top],:host([data-position$="-left"]) .__P__-callout[data-position=bottom]{right:auto;left:0}.__P__-callout[data-shape=bubble]{border-radius:var(--__P__-radius-md);white-space:normal;width:max-content;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-shape=callout]{padding:12px 18px;font-size:14px;background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-callout:after{content:"";position:absolute;width:12px;height:12px;background:inherit;border-radius:2px;transform:rotate(45deg)}.__P__-callout[data-position=left]:after{right:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=right]:after{left:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=top]:after{bottom:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-position=bottom]:after{top:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}:host([data-position$="-left"]) .__P__-callout[data-position=top]:after,:host([data-position$="-left"]) .__P__-callout[data-position=bottom]:after{right:auto;left:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-animated]{animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease),__P__-callout-nudge 1.6s var(--__P__-ease-in-out) var(--__P__-dur-slow) infinite}@keyframes __P__-callout-in{0%{opacity:0}to{opacity:1}}@keyframes __P__-callout-nudge{0%,to{margin-left:0;margin-right:0}50%{margin-left:calc(6px * var(--__P__-callout-nudge-direction));margin-right:calc(-6px * var(--__P__-callout-nudge-direction))}}@media(prefers-reduced-motion:reduce){.__P__-callout[data-animated]{animation:__P__-callout-in 1ms var(--__P__-ease)}.__P__-icon-btn[data-recording=true],.__P__-typing span{animation:none}}.__P__-callout-close{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;color:inherit;opacity:.7;cursor:pointer}.__P__-callout-close:hover{opacity:1;background:#ffffff26}.__P__-callout-close svg{width:12px;height:12px}.__P__-panel{width:var(--__P__-panel-w);height:var(--__P__-panel-h);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);background:var(--__P__-bg);color:var(--__P__-fg);border-radius:var(--__P__-radius-lg);box-shadow:var(--__P__-shadow-panel);display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;animation:__P__-panel-in var(--__P__-dur-slow) var(--__P__-ease);border:1px solid var(--__P__-border)}:host([data-mode="open"]) .__P__-panel{width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));min-width:var(--__P__-resize-min-w, auto);min-height:var(--__P__-resize-min-h, auto);max-width:var(--__P__-resize-max-w, calc(100vw - 32px) );max-height:var(--__P__-resize-max-h, calc(100dvh - 32px) )}@keyframes __P__-panel-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}:host([data-mode="expanded"]) .__P__-panel{width:var(--__P__-expanded-w, 640px);height:var(--__P__-expanded-h, 820px);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}:host([data-mode="fullscreen"]){z-index:var(--__P__-z-panel)!important}:host([data-mode="fullscreen"]) .__P__-anchor{inset:0;align-items:stretch;padding:0}:host([data-mode="fullscreen"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}:host([data-mode="fullscreen"]) .__P__-fab{display:none}:host([data-mode="inline"]) .__P__-anchor,:host([data-mode="standalone"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-height:0}:host([data-mode="inline"]) .__P__-panel,:host([data-mode="standalone"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;animation:none}:host([data-mode="inline"]) .__P__-fab,:host([data-mode="standalone"]) .__P__-fab{display:none}:host([data-mode="inline"]){min-height:320px}:host([data-mode="inline"]) .__P__-panel{border-radius:var(--__P__-radius)}:host([data-mode="standalone"]) .__P__-panel{border-radius:0;border:0;box-shadow:none}:host([data-mode="modal"]){position:fixed!important;inset:0!important;z-index:var(--__P__-z-panel)!important;display:block!important;width:100vw;height:100dvh;background:var(--__P__-modal-backdrop, var(--__P__-backdrop));animation:__P__-backdrop-in var(--__P__-dur-base) var(--__P__-ease) both;--__P__-panel-w: min(960px, 92vw);--__P__-panel-h: min(720px, 88dvh)}:host([data-mode="modal"]) .__P__-anchor{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--__P__-space-6);pointer-events:none}:host([data-mode="modal"]) .__P__-panel{pointer-events:auto;width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);min-width:0;min-height:0;border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-panel);animation:__P__-modal-in var(--__P__-dur-base) var(--__P__-ease);translate:var(--__P__-modal-dx, 0px) var(--__P__-modal-dy, 0px)}:host([data-mode="modal"]) .__P__-header,:host([data-mode="modal"]) .__P__-back-header,:host([data-mode="modal"]) .__P__-home-hero{cursor:grab;touch-action:none}:host([data-mode="modal"]) .__P__-panel[data-dragging]{cursor:grabbing;user-select:none}:host([data-mode="modal"]) .__P__-panel[data-dragging] *{cursor:grabbing}:host([data-mode="modal"]) .__P__-fab{display:none}@keyframes __P__-backdrop-in{0%{background:#0000}to{background:var(--__P__-modal-backdrop, var(--__P__-backdrop))}}@keyframes __P__-modal-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}:host([data-mode="drawer"]){--__P__-panel-w: min(440px, calc(100vw - 32px) );--__P__-panel-h: 100dvh}:host([data-mode="drawer"]) .__P__-anchor{position:fixed;--__P__-inset-x: var(--__P__-panel-inset, 12px);--__P__-inset-y: var(--__P__-panel-inset, 3dvh);top:var(--__P__-inset-y);bottom:auto;right:var(--__P__-inset-x);left:auto;width:min(var(--__P__-widget-w, var(--__P__-panel-w)),calc(100vw - var(--__P__-inset-x) * 2));height:min(var(--__P__-widget-h, var(--__P__-panel-h)),calc(100dvh - var(--__P__-inset-y) * 2));padding:0;display:block;pointer-events:auto}:host([data-mode="drawer"][data-position$="-left"]) .__P__-anchor{right:auto;left:var(--__P__-inset-x)}:host([data-mode="drawer"][data-position^="bottom-"]) .__P__-anchor{top:auto;bottom:var(--__P__-inset-y)}:host([data-mode="drawer"]) .__P__-panel{width:100%;height:100%;max-width:none;max-height:none;min-width:0;min-height:0;border-radius:var(--__P__-radius, 12px);border:1px solid var(--__P__-border);box-shadow:-8px 16px 32px -12px #00000038;animation:__P__-drawer-in var(--__P__-dur-base) var(--__P__-ease)}:host([data-mode="drawer"][data-position$="-left"]) .__P__-panel{box-shadow:8px 16px 32px -12px #00000038;animation:__P__-drawer-in-left var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab[data-edge-tab]{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-2);position:fixed;top:50%;height:140px;width:auto;min-width:0;padding:10px 8px;writing-mode:vertical-rl;text-orientation:mixed;transform:translateY(-50%);transform-origin:center;animation:__P__-edge-tab-in var(--__P__-dur-base) var(--__P__-ease) both}.__P__-fab[data-edge-tab] svg{writing-mode:horizontal-tb}.__P__-fab[data-edge-tab]:hover{transform:translateY(-50%) scale(1.03)}.__P__-fab[data-edge-tab]:active{transform:translateY(-50%) scale(.97)}:host([data-position$="-right"]) .__P__-fab[data-edge-tab]{right:0;left:auto;border-radius:12px 0 0 12px;box-shadow:-6px 0 18px -8px #0000004d}:host([data-position$="-left"]) .__P__-fab[data-edge-tab]{left:0;right:auto;border-radius:0 12px 12px 0;box-shadow:6px 0 18px -8px #0000004d}.__P__-fab[data-edge-tab][data-leaving]{position:fixed;top:50%;bottom:auto;animation:__P__-edge-tab-out var(--__P__-dur-quick) var(--__P__-ease) forwards}@keyframes __P__-edge-tab-in{0%{opacity:0;transform:translateY(-50%) scale(.9)}to{opacity:1;transform:translateY(-50%) scale(1)}}@keyframes __P__-edge-tab-out{0%{opacity:1;transform:translateY(-50%) scale(1)}to{opacity:0;transform:translateY(-50%) scale(.85)}}@keyframes __P__-drawer-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes __P__-drawer-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){:host([data-mode="drawer"]) .__P__-panel,.__P__-fab[data-edge-tab]{animation:none}}.__P__-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);background:var(--__P__-bg)}.__P__-header h1{font-size:14px;font-weight:600;flex:1;letter-spacing:-.01em}.__P__-header-actions{margin-left:auto;display:flex;align-items:center;gap:var(--__P__-space-1);flex-shrink:0}.__P__-agent{flex:1;display:inline-flex;align-items:center;gap:10px;min-width:0}.__P__-agent-avatar{position:relative;width:32px;height:32px;border-radius:999px;background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:var(--__P__-text-xs);overflow:hidden;flex-shrink:0}.__P__-agent-avatar img{width:100%;height:100%;object-fit:cover}.__P__-agent-avatar:after{content:"";position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:999px;border:2px solid var(--__P__-bg);background:var(--__P__-neutral)}.__P__-agent-avatar[data-status=online]:after{background:var(--__P__-success)}.__P__-agent-avatar[data-status=away]:after{background:var(--__P__-warning)}.__P__-agent-avatar[data-status=offline]:after{background:var(--__P__-neutral)}.__P__-agent-meta{display:flex;flex-direction:column;line-height:1.15;min-width:0}.__P__-agent-meta strong{font-size:14px;font-weight:600;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-agent-meta span{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-suggestions{display:flex;flex-wrap:nowrap;gap:var(--__P__-space-2);padding:6px 14px 10px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x proximity;scrollbar-width:none;-ms-overflow-style:none;min-width:0}.__P__-suggestions::-webkit-scrollbar{display:none}.__P__-suggestions:before,.__P__-suggestions:after{content:"";flex:1 1 0;min-width:0}.__P__-suggestion{flex:0 0 auto;scroll-snap-align:center;padding:7px 14px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg);font-size:var(--__P__-text-sm);font-weight:500;white-space:nowrap;transition:background var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-suggestion:hover{border-color:var(--__P__-accent);color:var(--__P__-accent);transform:translateY(-1px)}.__P__-suggestion:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px;border-color:var(--__P__-accent)}.__P__-suggestion:active{transform:translateY(0)}.__P__-icon-btn{width:32px;height:32px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);transition:background var(--__P__-dur-quick) var(--__P__-ease),color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-icon-btn:hover{background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-icon-btn:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-icon-btn:active{background:var(--__P__-border)}.__P__-icon-btn:disabled{opacity:.45;cursor:not-allowed}.__P__-icon-btn:before{content:"";position:absolute;inset:-6px}.__P__-icon-btn{position:relative}.__P__-icon-btn svg{width:18px;height:18px}.__P__-icon-btn[data-recording=true]{color:var(--__P__-accent);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);animation:__P__-pulse 1.2s var(--__P__-ease) infinite}@keyframes __P__-pulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--__P__-accent) 40%,transparent)}50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--__P__-accent) 0%,transparent)}}.__P__-list-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.__P__-jump{position:absolute;right:14px;bottom:14px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;border:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);color:var(--__P__-fg);box-shadow:var(--__P__-shadow-panel);cursor:pointer;opacity:.85;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease);animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-jump:hover{opacity:1}.__P__-jump:active{transform:translateY(1px)}.__P__-jump svg{width:18px;height:18px}.__P__-list{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-4);padding-bottom:var(--__P__-space-8);display:flex;flex-direction:column;gap:14px;scrollbar-width:thin;scrollbar-color:var(--__P__-border-strong) transparent;scrollbar-gutter:stable}.__P__-list::-webkit-scrollbar{width:8px}.__P__-list::-webkit-scrollbar-thumb{background:var(--__P__-border-strong);border-radius:8px}.__P__-date-divider{position:sticky;top:var(--__P__-space-2);z-index:2;display:flex;justify-content:center;margin:var(--__P__-space-1) 0;pointer-events:none}.__P__-date-pill{padding:3px 10px;border-radius:999px;font-size:11px;font-weight:600;color:var(--__P__-fg-muted);background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);box-shadow:var(--__P__-shadow-card);opacity:0;pointer-events:none;transition:opacity var(--__P__-dur-base) var(--__P__-ease)}.__P__-list[data-scrolling=true] .__P__-date-pill{opacity:1;pointer-events:auto}@media(prefers-reduced-motion:reduce){.__P__-date-pill{transition:none}}.__P__-bubble-row{display:flex}.__P__-bubble-row[data-role=user]{justify-content:flex-end}.__P__-bubble-row[data-role=assistant]{justify-content:flex-start}.__P__-bubble{max-width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);line-height:1.6;font-size:14px;word-wrap:break-word;overflow-wrap:anywhere;box-shadow:0 1px 2px #0000000a,0 1px 8px -4px #0000000f;animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-bubble ::selection{background:color-mix(in srgb,var(--__P__-accent) 30%,transparent)}.__P__-bubble-row[data-role=user] .__P__-bubble ::selection{background:#fff6;color:var(--__P__-bubble-user-text)}@keyframes __P__-bubble-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-bubble-row[data-role=user] .__P__-bubble{background:var(--__P__-bubble-user);color:var(--__P__-bubble-user-text);border-bottom-right-radius:5px}.__P__-bubble-row[data-role=assistant] .__P__-bubble{background:var(--__P__-bubble-assistant);color:var(--__P__-bubble-assistant-text);border-bottom-left-radius:5px}.__P__-bubble-col{display:flex;flex-direction:column;max-width:85%;min-width:0}.__P__-bubble-row[data-role=user] .__P__-bubble-col{align-items:flex-end}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col{align-items:flex-start}.__P__-bubble-time{margin-top:3px;padding:0 4px;font-size:11px;line-height:1;color:var(--__P__-fg-muted);user-select:none}.__P__-md>*:first-child{margin-top:0}.__P__-md>*:last-child{margin-bottom:0}.__P__-md p{margin:10px 0}.__P__-md h1,.__P__-md h2,.__P__-md h3,.__P__-md h4,.__P__-md h5,.__P__-md h6{margin:18px 0 8px;line-height:1.3;letter-spacing:-.01em;font-weight:700}.__P__-md h1{font-size:1.4em}.__P__-md h2{font-size:1.22em}.__P__-md h3{font-size:1.08em}.__P__-md h4,.__P__-md h5,.__P__-md h6{font-size:1em}.__P__-md>h1:first-child,.__P__-md>h2:first-child,.__P__-md>h3:first-child,.__P__-md>h4:first-child,.__P__-md>h5:first-child,.__P__-md>h6:first-child{margin-top:0}.__P__-md ul,.__P__-md ol{padding-left:1.5em;margin:10px 0}.__P__-md ul{list-style:disc}.__P__-md ol{list-style:decimal}.__P__-md li{margin:6px 0;padding-left:2px}.__P__-md li::marker{color:var(--__P__-fg-muted)}.__P__-md li>p{margin:6px 0}.__P__-md li>ul,.__P__-md li>ol{margin:6px 0}.__P__-md strong,.__P__-md b{font-weight:650;letter-spacing:-.005em}.__P__-md em,.__P__-md i{font-style:italic}.__P__-md code{font-family:var(--__P__-font-mono);font-size:.86em;padding:1px 6px;border-radius:5px;background:color-mix(in srgb,var(--__P__-accent) 10%,transparent);color:var(--__P__-fg);border:1px solid color-mix(in srgb,var(--__P__-accent) 16%,transparent)}.__P__-md pre{font-family:var(--__P__-font-mono);font-size:12.5px;padding:12px 14px;border-radius:var(--__P__-radius-sm);background:#7f7f7f1f;overflow-x:auto;margin:var(--__P__-space-3) 0;line-height:1.5}.__P__-md pre code{padding:0;background:none}.__P__-md a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.__P__-md a:hover{text-decoration-thickness:2px}.__P__-md blockquote{margin:14px 0;padding:6px 14px;border-left:3px solid color-mix(in srgb,var(--__P__-accent) 50%,transparent);background:color-mix(in srgb,var(--__P__-accent) 5%,transparent);border-radius:0 var(--__P__-radius-sm) var(--__P__-radius-sm) 0;color:var(--__P__-fg-muted)}.__P__-md blockquote>:first-child{margin-top:0}.__P__-md blockquote>:last-child{margin-bottom:0}.__P__-md hr{border:0;height:1px;background:color-mix(in srgb,currentColor 18%,transparent);margin:var(--__P__-space-4) 0}.__P__-md table{border-collapse:collapse;margin:var(--__P__-space-3) 0;font-size:.95em;display:block;overflow-x:auto;max-width:100%;font-variant-numeric:tabular-nums}.__P__-md th,.__P__-md td{padding:6px 10px;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);text-align:left}.__P__-md th{font-weight:700;background:color-mix(in srgb,currentColor 6%,transparent)}.__P__-md h1+ul,.__P__-md h1+ol,.__P__-md h2+ul,.__P__-md h2+ol,.__P__-md h3+ul,.__P__-md h3+ol,.__P__-md h4+ul,.__P__-md h4+ol{margin-top:var(--__P__-space-1)}.__P__-loading{display:inline-flex;align-items:center;gap:var(--__P__-space-2);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-loading-spinner{width:14px;height:14px;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:__P__-spin .8s linear infinite}@keyframes __P__-spin{to{transform:rotate(1turn)}}.__P__-typing{display:inline-flex;gap:var(--__P__-space-1);padding:var(--__P__-space-1) 0}.__P__-typing span{width:5px;height:5px;border-radius:999px;background:currentColor;opacity:.4;animation:__P__-blink 1.2s var(--__P__-ease) infinite}.__P__-typing span:nth-child(2){animation-delay:.2s}.__P__-typing span:nth-child(3){animation-delay:.4s}@keyframes __P__-blink{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}.__P__-reasoning{margin:var(--__P__-space-1) 0 var(--__P__-space-2);padding-left:var(--__P__-space-3);border-left:2px solid var(--__P__-border-strong)}.__P__-reasoning-summary{display:inline-flex;align-items:center;gap:var(--__P__-space-1);cursor:pointer;list-style:none;user-select:none;color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-reasoning-summary::-webkit-details-marker{display:none}.__P__-reasoning-summary:before{content:"";width:5px;height:5px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.7;transition:transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-reasoning[open] .__P__-reasoning-summary:before{transform:rotate(45deg)}.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:__P__-reasoning-pulse 1.4s var(--__P__-ease) infinite}@keyframes __P__-reasoning-pulse{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:none}}.__P__-reasoning-body{margin-top:var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-reasoning-body>:first-child{margin-top:0}.__P__-reasoning-body>:last-child{margin-bottom:0}.__P__-tool-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2);margin-top:6px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs)}.__P__-composer{border-top:1px solid var(--__P__-border);padding:10px 12px;background:var(--__P__-bg);display:flex;flex-direction:column;gap:var(--__P__-space-2)}.__P__-composer-row{display:flex;align-items:flex-end;gap:6px}.__P__-textarea{flex:1;height:40px;max-height:160px;padding:10px 12px;border-radius:var(--__P__-radius);background:var(--__P__-bg-elevated);border:1px solid transparent;font-size:14px;line-height:1.4;transition:height var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),box-shadow var(--__P__-dur-quick) var(--__P__-ease)}.__P__-textarea:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:1px;border-color:var(--__P__-focus)}@media(pointer:coarse){.__P__-textarea,.__P__-home-search-input{font-size:16px}.__P__-textarea{height:44px}}.__P__-send{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease)}.__P__-send[data-shape=circle]{border-radius:999px}.__P__-send[data-shape=square]{border-radius:var(--__P__-radius-sm)}.__P__-send[data-shape=pill]{width:auto;padding:0 18px;border-radius:999px}.__P__-send[data-variant=filled]{background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-send[data-variant=outline]{background:transparent;color:var(--__P__-accent);border-color:var(--__P__-accent)}.__P__-send[data-variant=outline]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 10%,transparent)}.__P__-send[data-variant=ghost]{background:transparent;color:var(--__P__-accent)}.__P__-send[data-variant=ghost]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 8%,transparent)}.__P__-send:disabled{opacity:.4;cursor:not-allowed}.__P__-send:not(:disabled):hover{transform:translateY(-1px)}.__P__-send:not(:disabled):active{transform:translateY(0)}.__P__-send:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-send svg{width:18px;height:18px}.__P__-composer-actions{display:flex;gap:var(--__P__-space-1);flex-wrap:wrap}.__P__-attachments{display:flex;flex-wrap:wrap;gap:6px}.__P__-attachment-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-1);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);font-size:var(--__P__-text-xs);max-width:200px}.__P__-attachment-thumb{width:24px;height:24px;border-radius:999px;object-fit:cover;background:var(--__P__-border)}.__P__-attachment-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-attachment-remove{width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted)}.__P__-attachment-remove:hover{background:var(--__P__-border);color:var(--__P__-fg)}.__P__-dropzone{position:absolute;inset:8px;border:2px dashed var(--__P__-accent);border-radius:var(--__P__-radius);background:color-mix(in srgb,var(--__P__-accent) 8%,transparent);display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--__P__-accent);pointer-events:none;z-index:10;animation:__P__-fade-in var(--__P__-dur-quick) var(--__P__-ease)}@keyframes __P__-fade-in{0%{opacity:0}to{opacity:1}}.__P__-error{margin-top:var(--__P__-space-1);padding:8px 10px;border-radius:var(--__P__-radius-sm);background:var(--__P__-danger-bg);color:var(--__P__-danger-text);font-size:var(--__P__-text-sm);display:flex;align-items:center;gap:var(--__P__-space-2)}.__P__-error button{color:inherit;text-decoration:underline;font-size:var(--__P__-text-sm)}.__P__-history{flex:1;overflow-y:auto;padding:var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-3)}.__P__-history-footer{flex:none;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);border-top:1px solid var(--__P__-border);background:var(--__P__-surface)}.__P__-history-new{width:100%;display:flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);padding:var(--__P__-space-2) var(--__P__-space-3);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-on-accent);cursor:pointer;font-size:var(--__P__-text-sm);font-weight:600;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-history-new svg{width:16px;height:16px}.__P__-history-new:hover{filter:brightness(1.08)}.__P__-history-new:active{transform:translateY(1px)}.__P__-history-new:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-history-empty{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 16px;color:var(--__P__-fg-muted);font-size:14px;text-align:center}.__P__-history-group{display:flex;flex-direction:column;padding:0 var(--__P__-space-2)}.__P__-history-heading{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);padding:12px 8px 6px;text-transform:uppercase;letter-spacing:.04em}.__P__-history-item{all:unset;display:flex;flex-direction:column;gap:3px;padding:10px 12px;border-radius:var(--__P__-radius-md);cursor:pointer;transition:background var(--__P__-dur-base) var(--__P__-ease)}.__P__-history-item:hover{background:var(--__P__-bg-elevated)}.__P__-history-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-history-title{font-size:14px;font-weight:500;color:var(--__P__-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-preview{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-item[data-closed=true] .__P__-history-title:after{content:"\\2022";margin-left:var(--__P__-space-2);opacity:.5}.__P__-list-loading{margin:auto;padding:var(--__P__-space-6) var(--__P__-space-4);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);text-align:center}.__P__-readonly-banner{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 12px;margin:0 var(--__P__-space-3) var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);text-align:center;font-size:var(--__P__-text-sm)}.__P__-readonly-label{line-height:1.4}.__P__-readonly-cta{appearance:none;border:0;cursor:pointer;padding:var(--__P__-space-2) var(--__P__-space-4);border-radius:999px;background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-readonly-cta:hover,.__P__-readonly-cta:focus-visible{filter:brightness(1.1)}.__P__-readonly-cta:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}.__P__-composer-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 16px;margin:0 var(--__P__-space-3);border-top:1px solid var(--__P__-border);text-align:center;font-size:11px;line-height:1.4;color:var(--__P__-fg-muted)}.__P__-disclaimer{max-width:320px;margin:0 auto;opacity:.9;letter-spacing:.01em}.__P__-poweredby{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:inherit;text-decoration:none;opacity:.7;transition:opacity var(--__P__-dur-base) var(--__P__-ease);font-size:11px;letter-spacing:.02em}.__P__-poweredby:hover{opacity:1}.__P__-poweredby-logo{height:12px;width:auto;display:inline-block;vertical-align:middle}.__P__-poweredby-bar{flex:none;display:flex;align-items:center;justify-content:center;padding:6px 16px;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated)}.__P__-menu-wrap{position:relative;display:inline-flex}.__P__-menu{position:absolute;top:100%;right:0;margin-top:6px;min-width:200px;padding:6px;background:var(--__P__-bg);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);box-shadow:var(--__P__-shadow-panel);z-index:10;display:flex;flex-direction:column;gap:2px;animation:__P__-menu-in var(--__P__-dur-base) var(--__P__-ease)}@media(prefers-reduced-motion:reduce){.__P__-menu{animation:none}}@keyframes __P__-menu-in{0%{opacity:0;transform:translateY(-4px) scale(.98);transform-origin:top right}to{opacity:1;transform:none}}.__P__-menu-item{all:unset;display:flex;align-items:center;gap:10px;padding:8px 10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);border-radius:var(--__P__-radius-sm);cursor:pointer;user-select:none}.__P__-menu-item:hover{background:var(--__P__-bg-elevated)}.__P__-menu-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-menu-item[disabled]{opacity:.45;cursor:not-allowed}.__P__-menu-icon{display:inline-flex;width:16px;height:16px;color:var(--__P__-fg-muted)}.__P__-menu-icon svg{width:16px;height:16px}.__P__-menu-label{flex:1}.__P__-menu-check{display:inline-flex;color:var(--__P__-accent)}.__P__-menu-check svg{width:14px;height:14px}.__P__-resize-grip{position:absolute;width:18px;height:18px;display:flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);opacity:.45;transition:opacity var(--__P__-dur-base) var(--__P__-ease);z-index:2;touch-action:none;user-select:none}.__P__-resize-grip:hover,.__P__-resize-grip:focus-visible{opacity:1}.__P__-resize-grip svg{width:10px;height:10px}.__P__-resize-grip--bottom-left{bottom:2px;left:2px;cursor:nesw-resize;transform:scaleX(-1)}.__P__-resize-grip--bottom-right{bottom:2px;right:2px;cursor:nwse-resize}.__P__-resize-grip--top-left{top:2px;left:2px;cursor:nwse-resize;transform:rotate(180deg)}.__P__-resize-grip--top-right{top:2px;right:2px;cursor:nesw-resize;transform:scaleY(-1)}:host(:not([data-mode="open"])) .__P__-resize-grip{display:none}.__P__-messenger{display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.__P__-module{display:flex;flex-direction:column;height:100%;min-height:0}.__P__-module-scroll{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-3);display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-home{background:radial-gradient(125% 65% at 88% 0%,color-mix(in srgb,#fff 16%,transparent),transparent 55%),linear-gradient(180deg,var(--__P__-accent) 0%,var(--__P__-accent) 22%,color-mix(in srgb,var(--__P__-accent) 28%,var(--__P__-surface)) 44%,var(--__P__-surface) 70%);border-radius:var(--__P__-radius-lg) var(--__P__-radius-lg) 0 0}.__P__-home-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;background:transparent}.__P__-home-cards{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:4px 14px 16px}.__P__-module-pad{padding:var(--__P__-space-3) var(--__P__-space-3) 0}.__P__-module-empty{display:flex;flex-direction:column;align-items:center;gap:var(--__P__-space-3);padding:var(--__P__-space-8) var(--__P__-space-4);text-align:center;color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-module-retry{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border-strong);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);font-weight:600;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-module-retry:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}.__P__-module-retry:active{background:var(--__P__-border)}.__P__-module-retry:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-help-list{flex:1;min-height:0;overflow-y:auto;padding-bottom:var(--__P__-space-3)}.__P__-help-group{display:flex;flex-direction:column}.__P__-help-section-title{position:sticky;top:0;z-index:1;margin:0;padding:var(--__P__-space-3) var(--__P__-space-5) var(--__P__-space-2);font-size:var(--__P__-text-xs);font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--__P__-fg-muted);background:var(--__P__-bg)}.__P__-help-card{margin:0 var(--__P__-space-3) var(--__P__-space-3);background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden}.__P__-help-card .__P__-list-row{border-bottom:0;border-radius:0}.__P__-help-card .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-help-card .__P__-list-row:hover{background:var(--__P__-hover)}.__P__-module-cta{padding:var(--__P__-space-3);border-top:1px solid var(--__P__-border)}.__P__-tabbar{display:flex;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);flex-shrink:0}.__P__-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-1);min-height:48px;padding:var(--__P__-space-2) var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;transition:color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-tab:hover{color:var(--__P__-fg)}.__P__-tab[aria-selected=true]{color:var(--__P__-accent)}.__P__-tab:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-tab:active{background:var(--__P__-hover)}.__P__-tab-icon{position:relative;display:inline-flex}.__P__-tab-icon svg{width:22px;height:22px}.__P__-tab-badge{position:absolute;top:-4px;left:calc(50% + 6px);min-width:16px;height:16px;padding:0 4px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--__P__-accent);color:var(--__P__-on-accent);font-size:10px;font-weight:600;line-height:1}.__P__-home-hero{flex-shrink:0;padding:var(--__P__-space-5) var(--__P__-space-5) var(--__P__-space-3);color:var(--__P__-on-accent);--__P__-focus: var(--__P__-on-accent)}.__P__-home-hero-top{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-3);min-height:32px}.__P__-home-brand{font-size:14px;font-weight:600;letter-spacing:.01em;color:color-mix(in srgb,#fff 82%,transparent);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.__P__-home-brand-spacer{flex:1}.__P__-home-hero-actions{display:flex;align-items:center;gap:var(--__P__-space-2);flex-shrink:0}.__P__-home-hero-actions .__P__-icon-btn{color:#fff}.__P__-home-greeting{margin:28px 0 0;font-family:var(--__P__-font-display);font-size:var(--__P__-text-2xl);font-weight:800;line-height:1.18;letter-spacing:-.01em;overflow-wrap:anywhere}.__P__-home-lead{margin:2px 0 0;font-family:var(--__P__-font-display);font-size:var(--__P__-text-2xl);font-weight:800;line-height:1.18;letter-spacing:-.01em;color:color-mix(in srgb,var(--__P__-on-accent) 88%,transparent);overflow-wrap:anywhere}.__P__-home-avatars{display:flex}.__P__-home-avatar{width:30px;height:30px;border-radius:999px;overflow:hidden;margin-left:-10px;border:2px solid color-mix(in srgb,#fff 92%,transparent);box-shadow:0 1px 3px #0000002e;background:var(--__P__-surface);display:inline-flex;align-items:center;justify-content:center;font-size:var(--__P__-text-xs);font-weight:700;color:var(--__P__-fg)}.__P__-home-avatar:first-child{margin-left:0}.__P__-home-avatar img{width:100%;height:100%;object-fit:cover}.__P__-home-content{background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-card);overflow:hidden}.__P__-home-content-title{padding:var(--__P__-space-4) var(--__P__-space-4) var(--__P__-space-3);font-size:var(--__P__-text-sm);font-weight:700}.__P__-home-content-list{display:flex;flex-direction:column;padding:0 var(--__P__-space-2) var(--__P__-space-2)}.__P__-home-content-list .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-home-card{display:block;width:100%;text-align:left;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);padding:var(--__P__-space-4);box-shadow:var(--__P__-shadow-card)}.__P__-home-card[data-interactive=true]{cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-home-card[data-interactive=true]:hover{background:var(--__P__-bg-elevated)}.__P__-home-card[data-interactive=true]:active{transform:translateY(1px)}.__P__-home-card[data-interactive=true]:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-recent-row{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-recent-avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:999px;background:color-mix(in oklch,var(--__P__-accent) 14%,transparent);color:var(--__P__-accent)}.__P__-home-recent-avatar svg{width:20px;height:20px}.__P__-home-recent-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.__P__-home-recent-title{font-weight:600;font-size:14px}.__P__-home-recent-preview{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-home-recent-at{color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);flex-shrink:0}.__P__-home-recent-dot{width:8px;height:8px;border-radius:999px;background:var(--__P__-accent);flex-shrink:0}.__P__-home-recent-row[data-unread=true] .__P__-home-recent-title{font-weight:700}.__P__-home-status{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-status-icon svg{width:22px;height:22px;color:var(--__P__-success)}.__P__-home-status[data-level=degraded] .__P__-home-status-icon svg{color:var(--__P__-warning)}.__P__-home-status[data-level=down] .__P__-home-status-icon svg{color:var(--__P__-danger)}.__P__-home-status-text{font-weight:600;font-size:14px}.__P__-home-search{display:flex;align-items:center;gap:var(--__P__-space-2);width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);border:1px solid var(--__P__-border);background:var(--__P__-surface);text-align:left}.__P__-home-search[data-input=true]{background:var(--__P__-bg-elevated)}.__P__-home-search:hover{border-color:var(--__P__-border-strong)}.__P__-home-search:focus-visible,.__P__-home-search:focus-within{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-search-text{flex:1;color:var(--__P__-fg-muted);font-size:14px}.__P__-home-search-input{flex:1;border:0;background:transparent;font-size:14px;color:var(--__P__-fg);outline:none}.__P__-home-search-icon svg{width:18px;height:18px;color:var(--__P__-accent)}.__P__-list-row{display:flex;align-items:center;gap:var(--__P__-space-3);width:100%;min-height:44px;text-align:left;padding:var(--__P__-space-3) var(--__P__-space-2);border-radius:var(--__P__-radius-sm)}.__P__-list-row:hover{background:var(--__P__-bg-elevated)}.__P__-list-row:active{background:var(--__P__-border)}.__P__-list-row:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-list-row-body{display:flex;flex-direction:column;min-width:0;flex:1}.__P__-list-row-title{font-weight:600;font-size:var(--__P__-text-md);line-height:1.35}.__P__-list-row-sub{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);margin-top:var(--__P__-space-1);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-list-row-chevron svg{width:18px;height:18px;color:var(--__P__-accent);flex-shrink:0}.__P__-back-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);flex-shrink:0}.__P__-back-title{flex:1;text-align:center;font-size:var(--__P__-text-md);font-weight:700;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-back-spacer{width:32px;height:1px}.__P__-content{display:flex;flex-direction:column;gap:14px;width:100%;max-width:68ch;margin:0 auto}.__P__-content-hero{width:100%;border-radius:var(--__P__-radius)}.__P__-content-subtitle{color:var(--__P__-fg-muted);margin:0}.__P__-content-frame{flex:1;min-height:0;width:100%;border:0;background:#fff}.__P__-news-list{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-news-card{display:block;width:100%;text-align:left;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden;background:var(--__P__-surface)}.__P__-news-card{transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-news-card:hover{background:var(--__P__-bg-elevated)}.__P__-news-card:active{transform:translateY(1px)}.__P__-news-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-news-hero{width:100%;display:block}.__P__-news-body{display:flex;flex-direction:column;gap:6px;padding:14px 16px}.__P__-news-tags{display:flex;gap:6px;flex-wrap:wrap}.__P__-news-tag{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-accent);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);padding:2px 8px;border-radius:999px}.__P__-news-title{font-weight:700;font-size:var(--__P__-text-md)}.__P__-news-summary{color:var(--__P__-fg-muted);font-size:14px;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-modules-empty{display:flex;align-items:center;justify-content:center;position:relative}.__P__-modules-empty-close{position:absolute;top:12px;right:12px}.__P__-modules-empty-text{color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-form{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-field{display:flex;flex-direction:column;gap:4px}.__P__-field-label{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-field-req{color:var(--__P__-danger)}.__P__-field-input{width:100%;box-sizing:border-box;padding:var(--__P__-space-2) var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);color:var(--__P__-fg);font:inherit;font-size:var(--__P__-text-sm);resize:vertical;transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-field-input:focus-visible{outline:none;border-color:var(--__P__-accent)}.__P__-field[data-invalid=true] .__P__-field-input{border-color:var(--__P__-danger)}.__P__-field-hint{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-field-error{font-size:var(--__P__-text-xs);color:var(--__P__-danger)}.__P__-field-choices{display:flex;flex-direction:column;gap:6px}.__P__-choice{display:flex;align-items:flex-start;gap:8px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);cursor:pointer}.__P__-choice input{margin-top:2px;accent-color:var(--__P__-accent)}.__P__-form-actions{display:flex;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:2px}.__P__-form-submit,.__P__-tool-approve{padding:var(--__P__-space-2) var(--__P__-space-4);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);cursor:pointer;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-submit:hover:not(:disabled),.__P__-tool-approve:hover:not(:disabled){filter:brightness(1.06)}.__P__-form-submit:disabled{opacity:.6;cursor:default}.__P__-form-skip,.__P__-tool-reject{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:transparent;color:var(--__P__-fg-muted);font:inherit;font-size:var(--__P__-text-sm);cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-skip:hover:not(:disabled),.__P__-tool-reject:hover:not(:disabled){background:var(--__P__-bg-elevated)}.__P__-form-gate{display:flex;flex-direction:column;gap:var(--__P__-space-2);padding:var(--__P__-space-3) var(--__P__-space-4) var(--__P__-space-4);border-top:1px solid var(--__P__-border);overflow-y:auto}.__P__-form-gate-title{margin:0;font-size:var(--__P__-text-base);font-weight:700;color:var(--__P__-fg)}.__P__-form-gate-desc{margin:0 0 var(--__P__-space-1);font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-form-card{display:flex;flex-direction:column;gap:var(--__P__-space-2);margin:var(--__P__-space-2) 0;padding:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-form-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.__P__-form-card-title{font-size:var(--__P__-text-sm);font-weight:700;color:var(--__P__-fg)}.__P__-form-card-desc{margin:0;font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-tool-ask-input,.__P__-tool-approval{display:flex;flex-direction:column;gap:var(--__P__-space-2);margin-top:6px;padding:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-tool-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.__P__-tool-badge{padding:2px 8px;border-radius:999px;background:var(--__P__-warning, #f59e0b);color:#1a1206;font-size:var(--__P__-text-xs);font-weight:600}.__P__-tool-title{font-size:var(--__P__-text-sm);color:var(--__P__-fg)}.__P__-tool-question{margin:0;font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-tool-desc{margin:0;font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-tool-args{margin:0;padding:var(--__P__-space-2);max-height:160px;overflow:auto;border-radius:var(--__P__-radius-sm);background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);white-space:pre-wrap;word-break:break-word}.__P__-tool-stale-note{margin:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-tool-decided{flex-direction:row;align-items:center;flex-wrap:wrap;gap:8px}.__P__-tool-decided-label{padding:2px 8px;border-radius:999px;background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-tool-decided-label[data-approved=true]{color:var(--__P__-success, #16a34a);border-color:var(--__P__-success, #16a34a)}.__P__-tool-decided-label[data-approved=false]{color:var(--__P__-danger);border-color:var(--__P__-danger)}.__P__-tool-decided-value{font-size:var(--__P__-text-sm);color:var(--__P__-fg)}\n';
|
|
910
|
+
var panel_default = '.__P__-anchor{right:16px;bottom:16px}:host([data-position="bottom-left"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{right:auto;left:16px}:host([data-position="top-right"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{bottom:auto;top:16px}.__P__-anchor{position:fixed;display:flex;flex-direction:column;align-items:flex-end;gap:var(--__P__-space-3);pointer-events:none}.__P__-anchor{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=sm]{--__P__-fab-size: 44px}.__P__-anchor[data-launcher-size=md]{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=lg]{--__P__-fab-size: 68px}.__P__-anchor>*{pointer-events:auto}.__P__-fab[data-size=sm]{--__P__-fab-size: 44px;font-size:var(--__P__-text-sm)}.__P__-fab[data-size=md]{--__P__-fab-size: 56px;font-size:14px}.__P__-fab[data-size=lg]{--__P__-fab-size: 68px;font-size:var(--__P__-text-base)}.__P__-fab{display:inline-flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);color:var(--__P__-accent-text);background:var(--__P__-accent);box-shadow:var(--__P__-shadow-fab);font-weight:600;line-height:1;transform-origin:bottom right;animation:__P__-fab-in var(--__P__-dur-base) var(--__P__-ease) both;transition:transform var(--__P__-dur-base) var(--__P__-ease),opacity var(--__P__-dur-base) var(--__P__-ease),box-shadow var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab:hover{transform:translateY(-2px)}.__P__-fab:active{transform:translateY(0)}.__P__-fab:focus-visible{outline:2px solid var(--__P__-on-accent);outline-offset:3px}.__P__-fab svg{width:24px;height:24px;flex-shrink:0}@keyframes __P__-fab-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}.__P__-fab[data-leaving]{position:absolute;right:0;bottom:0;animation:__P__-fab-out var(--__P__-dur-quick) var(--__P__-ease) forwards;pointer-events:none}:host([data-position^="top-"]) .__P__-fab[data-leaving]{bottom:auto;top:0}:host([data-position$="-left"]) .__P__-fab[data-leaving]{right:auto;left:0}@keyframes __P__-fab-out{0%{opacity:1;transform:none}to{opacity:0;transform:scale(.85)}}.__P__-fab[data-variant=circle]{width:var(--__P__-fab-size);height:var(--__P__-fab-size);border-radius:999px}.__P__-fab[data-variant=circle] .__P__-fab-label{display:none}.__P__-fab[data-variant=pill]{height:var(--__P__-fab-size);padding:0 18px 0 16px;border-radius:999px}.__P__-fab[data-variant=bar]{height:var(--__P__-fab-size);padding:0 22px;border-radius:var(--__P__-radius)}.__P__-fab[data-variant=minimal]{height:var(--__P__-fab-size);padding:0 var(--__P__-space-4);border-radius:999px;background:transparent;color:var(--__P__-accent);box-shadow:none;border:1px solid currentColor}.__P__-fab[data-variant=minimal]:hover{background:color-mix(in srgb,var(--__P__-accent) 12%,transparent)}.__P__-callout{--__P__-callout-fab-h: var(--__P__-fab-size, 56px);--__P__-callout-gap: clamp(12px, calc(var(--__P__-callout-fab-h) * .25), 22px);--__P__-callout-nudge-direction: -1;position:absolute;display:inline-flex;align-items:center;gap:var(--__P__-space-2);padding:10px 14px;background:var(--__P__-fg);color:var(--__P__-bg);border-radius:999px;font-size:var(--__P__-text-sm);font-weight:600;line-height:1.2;box-shadow:0 10px 30px -8px #00000059;pointer-events:auto;animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease);z-index:1;max-width:240px;white-space:nowrap}.__P__-callout[data-position=left]{right:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%)}.__P__-callout[data-position=right]{left:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%);--__P__-callout-nudge-direction: 1}.__P__-callout[data-position=top]{bottom:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-position=bottom]{top:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}:host([data-position$="-left"]) .__P__-callout[data-position=top],:host([data-position$="-left"]) .__P__-callout[data-position=bottom]{right:auto;left:0}.__P__-callout[data-shape=bubble]{border-radius:var(--__P__-radius-md);white-space:normal;width:max-content;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-shape=callout]{padding:12px 18px;font-size:14px;background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-callout:after{content:"";position:absolute;width:12px;height:12px;background:inherit;border-radius:2px;transform:rotate(45deg)}.__P__-callout[data-position=left]:after{right:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=right]:after{left:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=top]:after{bottom:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-position=bottom]:after{top:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}:host([data-position$="-left"]) .__P__-callout[data-position=top]:after,:host([data-position$="-left"]) .__P__-callout[data-position=bottom]:after{right:auto;left:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-animated]{animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease),__P__-callout-nudge 1.6s var(--__P__-ease-in-out) var(--__P__-dur-slow) infinite}@keyframes __P__-callout-in{0%{opacity:0}to{opacity:1}}@keyframes __P__-callout-nudge{0%,to{margin-left:0;margin-right:0}50%{margin-left:calc(6px * var(--__P__-callout-nudge-direction));margin-right:calc(-6px * var(--__P__-callout-nudge-direction))}}@media(prefers-reduced-motion:reduce){.__P__-callout[data-animated]{animation:__P__-callout-in 1ms var(--__P__-ease)}.__P__-icon-btn[data-recording=true],.__P__-typing span{animation:none}}.__P__-callout-close{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;color:inherit;opacity:.7;cursor:pointer}.__P__-callout-close:hover{opacity:1;background:#ffffff26}.__P__-callout-close svg{width:12px;height:12px}.__P__-panel{width:var(--__P__-panel-w);height:var(--__P__-panel-h);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);background:var(--__P__-bg);color:var(--__P__-fg);border-radius:var(--__P__-radius-lg);box-shadow:var(--__P__-shadow-panel);display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;animation:__P__-panel-in var(--__P__-dur-slow) var(--__P__-ease);border:1px solid var(--__P__-border)}:host([data-mode="open"]) .__P__-panel{width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));min-width:var(--__P__-resize-min-w, auto);min-height:var(--__P__-resize-min-h, auto);max-width:var(--__P__-resize-max-w, calc(100vw - 32px) );max-height:var(--__P__-resize-max-h, calc(100dvh - 32px) )}@keyframes __P__-panel-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}:host([data-mode="expanded"]) .__P__-panel{width:var(--__P__-expanded-w, 640px);height:var(--__P__-expanded-h, 820px);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}:host([data-mode="fullscreen"]){z-index:var(--__P__-z-panel)!important}:host([data-mode="fullscreen"]) .__P__-anchor{inset:0;align-items:stretch;padding:0}:host([data-mode="fullscreen"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}:host([data-mode="fullscreen"]) .__P__-fab{display:none}:host([data-mode="inline"]) .__P__-anchor,:host([data-mode="standalone"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-height:0}:host([data-mode="inline"]) .__P__-panel,:host([data-mode="standalone"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;animation:none}:host([data-mode="inline"]) .__P__-fab,:host([data-mode="standalone"]) .__P__-fab{display:none}:host([data-mode="inline"]){min-height:320px}:host([data-mode="inline"]) .__P__-panel{border-radius:var(--__P__-radius)}:host([data-mode="standalone"]) .__P__-panel{border-radius:0;border:0;box-shadow:none}:host([data-mode="modal"]){position:fixed!important;inset:0!important;z-index:var(--__P__-z-panel)!important;display:block!important;width:100vw;height:100dvh;background:var(--__P__-modal-backdrop, var(--__P__-backdrop));animation:__P__-backdrop-in var(--__P__-dur-base) var(--__P__-ease) both;--__P__-panel-w: min(960px, 92vw);--__P__-panel-h: min(720px, 88dvh)}:host([data-mode="modal"]) .__P__-anchor{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--__P__-space-6);pointer-events:none}:host([data-mode="modal"]) .__P__-panel{pointer-events:auto;width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);min-width:0;min-height:0;border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-panel);animation:__P__-modal-in var(--__P__-dur-base) var(--__P__-ease);translate:var(--__P__-modal-dx, 0px) var(--__P__-modal-dy, 0px)}:host([data-mode="modal"]) .__P__-header,:host([data-mode="modal"]) .__P__-back-header,:host([data-mode="modal"]) .__P__-home-hero{cursor:grab;touch-action:none}:host([data-mode="modal"]) .__P__-panel[data-dragging]{cursor:grabbing;user-select:none}:host([data-mode="modal"]) .__P__-panel[data-dragging] *{cursor:grabbing}:host([data-mode="modal"]) .__P__-fab{display:none}@keyframes __P__-backdrop-in{0%{background:#0000}to{background:var(--__P__-modal-backdrop, var(--__P__-backdrop))}}@keyframes __P__-modal-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}:host([data-mode="drawer"]){--__P__-panel-w: min(440px, calc(100vw - 32px) );--__P__-panel-h: 100dvh}:host([data-mode="drawer"]) .__P__-anchor{position:fixed;--__P__-inset-x: var(--__P__-panel-inset, 12px);--__P__-inset-y: var(--__P__-panel-inset, 3dvh);top:var(--__P__-inset-y);bottom:auto;right:var(--__P__-inset-x);left:auto;width:min(var(--__P__-widget-w, var(--__P__-panel-w)),calc(100vw - var(--__P__-inset-x) * 2));height:min(var(--__P__-widget-h, var(--__P__-panel-h)),calc(100dvh - var(--__P__-inset-y) * 2));padding:0;display:block;pointer-events:auto}:host([data-mode="drawer"][data-position$="-left"]) .__P__-anchor{right:auto;left:var(--__P__-inset-x)}:host([data-mode="drawer"][data-position^="bottom-"]) .__P__-anchor{top:auto;bottom:var(--__P__-inset-y)}:host([data-mode="drawer"]) .__P__-panel{width:100%;height:100%;max-width:none;max-height:none;min-width:0;min-height:0;border-radius:var(--__P__-radius, 12px);border:1px solid var(--__P__-border);box-shadow:-8px 16px 32px -12px #00000038;animation:__P__-drawer-in var(--__P__-dur-base) var(--__P__-ease)}:host([data-mode="drawer"][data-position$="-left"]) .__P__-panel{box-shadow:8px 16px 32px -12px #00000038;animation:__P__-drawer-in-left var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab[data-edge-tab]{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-2);position:fixed;top:50%;height:140px;width:auto;min-width:0;padding:10px 8px;writing-mode:vertical-rl;text-orientation:mixed;transform:translateY(-50%);transform-origin:center;animation:__P__-edge-tab-in var(--__P__-dur-base) var(--__P__-ease) both}.__P__-fab[data-edge-tab] svg{writing-mode:horizontal-tb}.__P__-fab[data-edge-tab]:hover{transform:translateY(-50%) scale(1.03)}.__P__-fab[data-edge-tab]:active{transform:translateY(-50%) scale(.97)}:host([data-position$="-right"]) .__P__-fab[data-edge-tab]{right:0;left:auto;border-radius:12px 0 0 12px;box-shadow:-6px 0 18px -8px #0000004d}:host([data-position$="-left"]) .__P__-fab[data-edge-tab]{left:0;right:auto;border-radius:0 12px 12px 0;box-shadow:6px 0 18px -8px #0000004d}.__P__-fab[data-edge-tab][data-leaving]{position:fixed;top:50%;bottom:auto;animation:__P__-edge-tab-out var(--__P__-dur-quick) var(--__P__-ease) forwards}@keyframes __P__-edge-tab-in{0%{opacity:0;transform:translateY(-50%) scale(.9)}to{opacity:1;transform:translateY(-50%) scale(1)}}@keyframes __P__-edge-tab-out{0%{opacity:1;transform:translateY(-50%) scale(1)}to{opacity:0;transform:translateY(-50%) scale(.85)}}@keyframes __P__-drawer-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes __P__-drawer-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){:host([data-mode="drawer"]) .__P__-panel,.__P__-fab[data-edge-tab]{animation:none}}.__P__-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);background:var(--__P__-bg)}.__P__-header h1{font-size:14px;font-weight:600;flex:1;letter-spacing:-.01em}.__P__-header-actions{margin-left:auto;display:flex;align-items:center;gap:var(--__P__-space-1);flex-shrink:0}.__P__-agent{flex:1;display:inline-flex;align-items:center;gap:10px;min-width:0}.__P__-agent-avatar{position:relative;width:32px;height:32px;border-radius:999px;background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:var(--__P__-text-xs);overflow:hidden;flex-shrink:0}.__P__-agent-avatar img{width:100%;height:100%;object-fit:cover}.__P__-agent-avatar:after{content:"";position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:999px;border:2px solid var(--__P__-bg);background:var(--__P__-neutral)}.__P__-agent-avatar[data-status=online]:after{background:var(--__P__-success)}.__P__-agent-avatar[data-status=away]:after{background:var(--__P__-warning)}.__P__-agent-avatar[data-status=offline]:after{background:var(--__P__-neutral)}.__P__-agent-meta{display:flex;flex-direction:column;line-height:1.15;min-width:0}.__P__-agent-meta strong{font-size:14px;font-weight:600;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-agent-meta span{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-suggestions{display:flex;flex-wrap:nowrap;gap:var(--__P__-space-2);padding:6px 14px 10px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x proximity;scrollbar-width:none;-ms-overflow-style:none;min-width:0}.__P__-suggestions::-webkit-scrollbar{display:none}.__P__-suggestions:before,.__P__-suggestions:after{content:"";flex:1 1 0;min-width:0}.__P__-suggestion{flex:0 0 auto;scroll-snap-align:center;padding:7px 14px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg);font-size:var(--__P__-text-sm);font-weight:500;white-space:nowrap;transition:background var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-suggestion:hover{border-color:var(--__P__-accent);color:var(--__P__-accent);transform:translateY(-1px)}.__P__-suggestion:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px;border-color:var(--__P__-accent)}.__P__-suggestion:active{transform:translateY(0)}.__P__-icon-btn{width:32px;height:32px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);transition:background var(--__P__-dur-quick) var(--__P__-ease),color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-icon-btn:hover{background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-icon-btn:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-icon-btn:active{background:var(--__P__-border)}.__P__-icon-btn:disabled{opacity:.45;cursor:not-allowed}.__P__-icon-btn:before{content:"";position:absolute;inset:-6px}.__P__-icon-btn{position:relative}.__P__-icon-btn svg{width:18px;height:18px}.__P__-icon-btn[data-recording=true]{color:var(--__P__-accent);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);animation:__P__-pulse 1.2s var(--__P__-ease) infinite}@keyframes __P__-pulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--__P__-accent) 40%,transparent)}50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--__P__-accent) 0%,transparent)}}.__P__-list-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.__P__-jump{position:absolute;right:14px;bottom:14px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;border:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);color:var(--__P__-fg);box-shadow:var(--__P__-shadow-panel);cursor:pointer;opacity:.85;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease);animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-jump:hover{opacity:1}.__P__-jump:active{transform:translateY(1px)}.__P__-jump svg{width:18px;height:18px}.__P__-list{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-4);padding-bottom:var(--__P__-space-8);display:flex;flex-direction:column;gap:14px;scrollbar-width:thin;scrollbar-color:var(--__P__-border-strong) transparent;scrollbar-gutter:stable}.__P__-list::-webkit-scrollbar{width:8px}.__P__-list::-webkit-scrollbar-thumb{background:var(--__P__-border-strong);border-radius:8px}.__P__-date-divider{position:sticky;top:var(--__P__-space-2);z-index:2;display:flex;justify-content:center;margin:var(--__P__-space-1) 0;pointer-events:none}.__P__-date-pill{padding:3px 10px;border-radius:999px;font-size:11px;font-weight:600;color:var(--__P__-fg-muted);background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);box-shadow:var(--__P__-shadow-card);opacity:0;pointer-events:none;transition:opacity var(--__P__-dur-base) var(--__P__-ease)}.__P__-list[data-scrolling=true] .__P__-date-pill{opacity:1;pointer-events:auto}@media(prefers-reduced-motion:reduce){.__P__-date-pill{transition:none}}.__P__-bubble-row{display:flex}.__P__-bubble-row[data-role=user]{justify-content:flex-end}.__P__-bubble-row[data-role=assistant]{justify-content:flex-start}.__P__-bubble{max-width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);line-height:1.6;font-size:14px;word-wrap:break-word;overflow-wrap:anywhere;box-shadow:0 1px 2px #0000000a,0 1px 8px -4px #0000000f;animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-bubble ::selection{background:color-mix(in srgb,var(--__P__-accent) 30%,transparent)}.__P__-bubble-row[data-role=user] .__P__-bubble ::selection{background:#fff6;color:var(--__P__-bubble-user-text)}@keyframes __P__-bubble-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-bubble-row[data-role=user] .__P__-bubble{background:var(--__P__-bubble-user);color:var(--__P__-bubble-user-text);border-bottom-right-radius:5px}.__P__-bubble-row[data-role=assistant] .__P__-bubble{background:var(--__P__-bubble-assistant);color:var(--__P__-bubble-assistant-text);border-bottom-left-radius:5px}.__P__-bubble-col{display:flex;flex-direction:column;max-width:85%;min-width:0}.__P__-bubble-row[data-role=user] .__P__-bubble-col{align-items:flex-end}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col{align-items:flex-start}.__P__-bubble-time{margin-top:3px;padding:0 4px;font-size:11px;line-height:1;color:var(--__P__-fg-muted);user-select:none}.__P__-md>*:first-child{margin-top:0}.__P__-md>*:last-child{margin-bottom:0}.__P__-md p{margin:10px 0}.__P__-md h1,.__P__-md h2,.__P__-md h3,.__P__-md h4,.__P__-md h5,.__P__-md h6{margin:18px 0 8px;line-height:1.3;letter-spacing:-.01em;font-weight:700}.__P__-md h1{font-size:1.4em}.__P__-md h2{font-size:1.22em}.__P__-md h3{font-size:1.08em}.__P__-md h4,.__P__-md h5,.__P__-md h6{font-size:1em}.__P__-md>h1:first-child,.__P__-md>h2:first-child,.__P__-md>h3:first-child,.__P__-md>h4:first-child,.__P__-md>h5:first-child,.__P__-md>h6:first-child{margin-top:0}.__P__-md ul,.__P__-md ol{padding-left:1.5em;margin:10px 0}.__P__-md ul{list-style:disc}.__P__-md ol{list-style:decimal}.__P__-md li{margin:6px 0;padding-left:2px}.__P__-md li::marker{color:var(--__P__-fg-muted)}.__P__-md li>p{margin:6px 0}.__P__-md li>ul,.__P__-md li>ol{margin:6px 0}.__P__-md strong,.__P__-md b{font-weight:650;letter-spacing:-.005em}.__P__-md em,.__P__-md i{font-style:italic}.__P__-md code{font-family:var(--__P__-font-mono);font-size:.86em;padding:1px 6px;border-radius:5px;background:color-mix(in srgb,var(--__P__-accent) 10%,transparent);color:var(--__P__-fg);border:1px solid color-mix(in srgb,var(--__P__-accent) 16%,transparent)}.__P__-md pre{font-family:var(--__P__-font-mono);font-size:12.5px;padding:12px 14px;border-radius:var(--__P__-radius-sm);background:#7f7f7f1f;overflow-x:auto;margin:var(--__P__-space-3) 0;line-height:1.5}.__P__-md pre code{padding:0;background:none}.__P__-md a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.__P__-md a:hover{text-decoration-thickness:2px}.__P__-md blockquote{margin:14px 0;padding:6px 14px;border-left:3px solid color-mix(in srgb,var(--__P__-accent) 50%,transparent);background:color-mix(in srgb,var(--__P__-accent) 5%,transparent);border-radius:0 var(--__P__-radius-sm) var(--__P__-radius-sm) 0;color:var(--__P__-fg-muted)}.__P__-md blockquote>:first-child{margin-top:0}.__P__-md blockquote>:last-child{margin-bottom:0}.__P__-md hr{border:0;height:1px;background:color-mix(in srgb,currentColor 18%,transparent);margin:var(--__P__-space-4) 0}.__P__-md table{border-collapse:collapse;margin:var(--__P__-space-3) 0;font-size:.95em;display:block;overflow-x:auto;max-width:100%;font-variant-numeric:tabular-nums}.__P__-md th,.__P__-md td{padding:6px 10px;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);text-align:left}.__P__-md th{font-weight:700;background:color-mix(in srgb,currentColor 6%,transparent)}.__P__-md h1+ul,.__P__-md h1+ol,.__P__-md h2+ul,.__P__-md h2+ol,.__P__-md h3+ul,.__P__-md h3+ol,.__P__-md h4+ul,.__P__-md h4+ol{margin-top:var(--__P__-space-1)}.__P__-loading{display:inline-flex;align-items:center;gap:var(--__P__-space-2);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-loading-spinner{width:14px;height:14px;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:__P__-spin .8s linear infinite}@keyframes __P__-spin{to{transform:rotate(1turn)}}.__P__-typing{display:inline-flex;gap:var(--__P__-space-1);padding:var(--__P__-space-1) 0}.__P__-typing span{width:5px;height:5px;border-radius:999px;background:currentColor;opacity:.4;animation:__P__-blink 1.2s var(--__P__-ease) infinite}.__P__-typing span:nth-child(2){animation-delay:.2s}.__P__-typing span:nth-child(3){animation-delay:.4s}@keyframes __P__-blink{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}.__P__-reasoning{margin:var(--__P__-space-1) 0 var(--__P__-space-2);padding-left:var(--__P__-space-3);border-left:2px solid var(--__P__-border-strong)}.__P__-reasoning-summary{display:inline-flex;align-items:center;gap:var(--__P__-space-1);cursor:pointer;list-style:none;user-select:none;color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-reasoning-summary::-webkit-details-marker{display:none}.__P__-reasoning-summary:before{content:"";width:5px;height:5px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.7;transition:transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-reasoning[open] .__P__-reasoning-summary:before{transform:rotate(45deg)}.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:__P__-reasoning-pulse 1.4s var(--__P__-ease) infinite}@keyframes __P__-reasoning-pulse{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:none}}.__P__-reasoning-body{margin-top:var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-reasoning-body>:first-child{margin-top:0}.__P__-reasoning-body>:last-child{margin-bottom:0}.__P__-tool-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2);margin-top:6px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs)}.__P__-composer{border-top:1px solid var(--__P__-border);padding:10px 12px;background:var(--__P__-bg);display:flex;flex-direction:column;gap:var(--__P__-space-2)}.__P__-composer-row{display:flex;align-items:flex-end;gap:6px}.__P__-textarea{flex:1;height:40px;max-height:160px;padding:10px 12px;border-radius:var(--__P__-radius);background:var(--__P__-bg-elevated);border:1px solid transparent;font-size:14px;line-height:1.4;transition:height var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),box-shadow var(--__P__-dur-quick) var(--__P__-ease)}.__P__-textarea:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:1px;border-color:var(--__P__-focus)}@media(pointer:coarse){.__P__-textarea,.__P__-home-search-input{font-size:16px}.__P__-textarea{height:44px}}.__P__-send{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease)}.__P__-send[data-shape=circle]{border-radius:999px}.__P__-send[data-shape=square]{border-radius:var(--__P__-radius-sm)}.__P__-send[data-shape=pill]{width:auto;padding:0 18px;border-radius:999px}.__P__-send[data-variant=filled]{background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-send[data-variant=outline]{background:transparent;color:var(--__P__-accent);border-color:var(--__P__-accent)}.__P__-send[data-variant=outline]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 10%,transparent)}.__P__-send[data-variant=ghost]{background:transparent;color:var(--__P__-accent)}.__P__-send[data-variant=ghost]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 8%,transparent)}.__P__-send:disabled{opacity:.4;cursor:not-allowed}.__P__-send:not(:disabled):hover{transform:translateY(-1px)}.__P__-send:not(:disabled):active{transform:translateY(0)}.__P__-send:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-send svg{width:18px;height:18px}.__P__-composer-actions{display:flex;gap:var(--__P__-space-1);flex-wrap:wrap}.__P__-attachments{display:flex;flex-wrap:wrap;gap:6px}.__P__-attachment-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-1);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);font-size:var(--__P__-text-xs);max-width:200px}.__P__-attachment-thumb{width:24px;height:24px;border-radius:999px;object-fit:cover;background:var(--__P__-border)}.__P__-attachment-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-attachment-remove{width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted)}.__P__-attachment-remove:hover{background:var(--__P__-border);color:var(--__P__-fg)}.__P__-dropzone{position:absolute;inset:8px;border:2px dashed var(--__P__-accent);border-radius:var(--__P__-radius);background:color-mix(in srgb,var(--__P__-accent) 8%,transparent);display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--__P__-accent);pointer-events:none;z-index:10;animation:__P__-fade-in var(--__P__-dur-quick) var(--__P__-ease)}@keyframes __P__-fade-in{0%{opacity:0}to{opacity:1}}.__P__-error{margin-top:var(--__P__-space-1);padding:8px 10px;border-radius:var(--__P__-radius-sm);background:var(--__P__-danger-bg);color:var(--__P__-danger-text);font-size:var(--__P__-text-sm);display:flex;align-items:center;gap:var(--__P__-space-2)}.__P__-error button{color:inherit;text-decoration:underline;font-size:var(--__P__-text-sm)}.__P__-history{flex:1;overflow-y:auto;padding:var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-3)}.__P__-history-footer{flex:none;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);border-top:1px solid var(--__P__-border);background:var(--__P__-surface)}.__P__-history-new{width:100%;display:flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);padding:var(--__P__-space-2) var(--__P__-space-3);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-on-accent);cursor:pointer;font-size:var(--__P__-text-sm);font-weight:600;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-history-new svg{width:16px;height:16px}.__P__-history-new:hover{filter:brightness(1.08)}.__P__-history-new:active{transform:translateY(1px)}.__P__-history-new:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-history-empty{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 16px;color:var(--__P__-fg-muted);font-size:14px;text-align:center}.__P__-history-group{display:flex;flex-direction:column;padding:0 var(--__P__-space-2)}.__P__-history-heading{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);padding:12px 8px 6px;text-transform:uppercase;letter-spacing:.04em}.__P__-history-item{all:unset;display:flex;flex-direction:column;gap:3px;padding:10px 12px;border-radius:var(--__P__-radius-md);cursor:pointer;transition:background var(--__P__-dur-base) var(--__P__-ease)}.__P__-history-item:hover{background:var(--__P__-bg-elevated)}.__P__-history-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-history-title{font-size:14px;font-weight:500;color:var(--__P__-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-preview{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-item[data-closed=true] .__P__-history-title:after{content:"\\2022";margin-left:var(--__P__-space-2);opacity:.5}.__P__-list-loading{margin:auto;padding:var(--__P__-space-6) var(--__P__-space-4);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);text-align:center}.__P__-readonly-banner{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 12px;margin:0 var(--__P__-space-3) var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);text-align:center;font-size:var(--__P__-text-sm)}.__P__-readonly-label{line-height:1.4}.__P__-readonly-cta{appearance:none;border:0;cursor:pointer;padding:var(--__P__-space-2) var(--__P__-space-4);border-radius:999px;background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-readonly-cta:hover,.__P__-readonly-cta:focus-visible{filter:brightness(1.1)}.__P__-readonly-cta:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}.__P__-composer-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 16px;margin:0 var(--__P__-space-3);border-top:1px solid var(--__P__-border);text-align:center;font-size:11px;line-height:1.4;color:var(--__P__-fg-muted)}.__P__-disclaimer{max-width:320px;margin:0 auto;opacity:.9;letter-spacing:.01em}.__P__-poweredby{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:inherit;text-decoration:none;opacity:.7;transition:opacity var(--__P__-dur-base) var(--__P__-ease);font-size:11px;letter-spacing:.02em}.__P__-poweredby:hover{opacity:1}.__P__-poweredby-logo{height:12px;width:auto;display:inline-block;vertical-align:middle}.__P__-poweredby-bar{flex:none;display:flex;align-items:center;justify-content:center;padding:6px 16px;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated)}.__P__-menu-wrap{position:relative;display:inline-flex}.__P__-menu{position:absolute;top:100%;right:0;margin-top:6px;min-width:200px;padding:6px;background:var(--__P__-bg);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);box-shadow:var(--__P__-shadow-panel);z-index:10;display:flex;flex-direction:column;gap:2px;animation:__P__-menu-in var(--__P__-dur-base) var(--__P__-ease)}@media(prefers-reduced-motion:reduce){.__P__-menu{animation:none}}@keyframes __P__-menu-in{0%{opacity:0;transform:translateY(-4px) scale(.98);transform-origin:top right}to{opacity:1;transform:none}}.__P__-menu-item{all:unset;display:flex;align-items:center;gap:10px;padding:8px 10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);border-radius:var(--__P__-radius-sm);cursor:pointer;user-select:none}.__P__-menu-item:hover{background:var(--__P__-bg-elevated)}.__P__-menu-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-menu-item[disabled]{opacity:.45;cursor:not-allowed}.__P__-menu-icon{display:inline-flex;width:16px;height:16px;color:var(--__P__-fg-muted)}.__P__-menu-icon svg{width:16px;height:16px}.__P__-menu-label{flex:1}.__P__-menu-check{display:inline-flex;color:var(--__P__-accent)}.__P__-menu-check svg{width:14px;height:14px}.__P__-resize-grip{position:absolute;width:18px;height:18px;display:flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);opacity:.45;transition:opacity var(--__P__-dur-base) var(--__P__-ease);z-index:2;touch-action:none;user-select:none}.__P__-resize-grip:hover,.__P__-resize-grip:focus-visible{opacity:1}.__P__-resize-grip svg{width:10px;height:10px}.__P__-resize-grip--bottom-left{bottom:2px;left:2px;cursor:nesw-resize;transform:scaleX(-1)}.__P__-resize-grip--bottom-right{bottom:2px;right:2px;cursor:nwse-resize}.__P__-resize-grip--top-left{top:2px;left:2px;cursor:nwse-resize;transform:rotate(180deg)}.__P__-resize-grip--top-right{top:2px;right:2px;cursor:nesw-resize;transform:scaleY(-1)}:host(:not([data-mode="open"])) .__P__-resize-grip{display:none}.__P__-messenger{display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.__P__-module{display:flex;flex-direction:column;height:100%;min-height:0}.__P__-module-scroll{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-3);display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-home{background:radial-gradient(125% 65% at 88% 0%,color-mix(in srgb,#fff 16%,transparent),transparent 55%),linear-gradient(180deg,var(--__P__-accent) 0%,var(--__P__-accent) 22%,color-mix(in srgb,var(--__P__-accent) 28%,var(--__P__-surface)) 44%,var(--__P__-surface) 70%);border-radius:var(--__P__-radius-lg) var(--__P__-radius-lg) 0 0}.__P__-home-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;background:transparent}.__P__-home-cards{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:4px 14px 16px}.__P__-module-pad{padding:var(--__P__-space-3) var(--__P__-space-3) 0}.__P__-module-empty{display:flex;flex-direction:column;align-items:center;gap:var(--__P__-space-3);padding:var(--__P__-space-8) var(--__P__-space-4);text-align:center;color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-module-retry{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border-strong);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);font-weight:600;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-module-retry:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}.__P__-module-retry:active{background:var(--__P__-border)}.__P__-module-retry:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-help-list{flex:1;min-height:0;overflow-y:auto;padding-bottom:var(--__P__-space-3)}.__P__-help-group{display:flex;flex-direction:column}.__P__-help-section-title{position:sticky;top:0;z-index:1;margin:0;padding:var(--__P__-space-3) var(--__P__-space-5) var(--__P__-space-2);font-size:var(--__P__-text-xs);font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--__P__-fg-muted);background:var(--__P__-bg)}.__P__-help-card{margin:0 var(--__P__-space-3) var(--__P__-space-3);background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden}.__P__-help-card .__P__-list-row{border-bottom:0;border-radius:0}.__P__-help-card .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-help-card .__P__-list-row:hover{background:var(--__P__-hover)}.__P__-module-cta{padding:var(--__P__-space-3);border-top:1px solid var(--__P__-border)}.__P__-tabbar{display:flex;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);flex-shrink:0}.__P__-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-1);min-height:48px;padding:var(--__P__-space-2) var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;transition:color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-tab:hover{color:var(--__P__-fg)}.__P__-tab[aria-selected=true]{color:var(--__P__-accent)}.__P__-tab:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-tab:active{background:var(--__P__-hover)}.__P__-tab-icon{position:relative;display:inline-flex}.__P__-tab-icon svg{width:22px;height:22px}.__P__-tab-badge{position:absolute;top:-4px;left:calc(50% + 6px);min-width:16px;height:16px;padding:0 4px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--__P__-accent);color:var(--__P__-on-accent);font-size:10px;font-weight:600;line-height:1}.__P__-home-hero{flex-shrink:0;padding:var(--__P__-space-5) var(--__P__-space-5) var(--__P__-space-3);color:var(--__P__-on-accent);--__P__-focus: var(--__P__-on-accent)}.__P__-home-hero-top{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-3);min-height:32px}.__P__-home-brand{font-size:14px;font-weight:600;letter-spacing:.01em;color:color-mix(in srgb,#fff 82%,transparent);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.__P__-home-brand-spacer{flex:1}.__P__-home-hero-actions{display:flex;align-items:center;gap:var(--__P__-space-2);flex-shrink:0}.__P__-home-hero-actions .__P__-icon-btn{color:#fff}.__P__-home-greeting{margin:28px 0 0;font-family:var(--__P__-font-display);font-size:var(--__P__-text-2xl);font-weight:800;line-height:1.18;letter-spacing:-.01em;overflow-wrap:anywhere}.__P__-home-lead{margin:2px 0 0;font-family:var(--__P__-font-display);font-size:var(--__P__-text-2xl);font-weight:800;line-height:1.18;letter-spacing:-.01em;color:color-mix(in srgb,var(--__P__-on-accent) 88%,transparent);overflow-wrap:anywhere}.__P__-home-avatars{display:flex}.__P__-home-avatar{width:30px;height:30px;border-radius:999px;overflow:hidden;margin-left:-10px;border:2px solid color-mix(in srgb,#fff 92%,transparent);box-shadow:0 1px 3px #0000002e;background:var(--__P__-surface);display:inline-flex;align-items:center;justify-content:center;font-size:var(--__P__-text-xs);font-weight:700;color:var(--__P__-fg)}.__P__-home-avatar:first-child{margin-left:0}.__P__-home-avatar img{width:100%;height:100%;object-fit:cover}.__P__-home-content{background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-card);overflow:hidden}.__P__-home-content-title{padding:var(--__P__-space-4) var(--__P__-space-4) var(--__P__-space-3);font-size:var(--__P__-text-sm);font-weight:700}.__P__-home-content-list{display:flex;flex-direction:column;padding:0 var(--__P__-space-2) var(--__P__-space-2)}.__P__-home-content-list .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-home-card{display:block;width:100%;text-align:left;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);padding:var(--__P__-space-4);box-shadow:var(--__P__-shadow-card)}.__P__-home-card[data-interactive=true]{cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-home-card[data-interactive=true]:hover{background:var(--__P__-bg-elevated)}.__P__-home-card[data-interactive=true]:active{transform:translateY(1px)}.__P__-home-card[data-interactive=true]:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-recent-row{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-recent-avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:999px;background:color-mix(in oklch,var(--__P__-accent) 14%,transparent);color:var(--__P__-accent)}.__P__-home-recent-avatar svg{width:20px;height:20px}.__P__-home-recent-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.__P__-home-recent-title{font-weight:600;font-size:14px}.__P__-home-recent-preview{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-home-recent-at{color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);flex-shrink:0}.__P__-home-recent-dot{width:8px;height:8px;border-radius:999px;background:var(--__P__-accent);flex-shrink:0}.__P__-home-recent-row[data-unread=true] .__P__-home-recent-title{font-weight:700}.__P__-home-status{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-status-icon svg{width:22px;height:22px;color:var(--__P__-success)}.__P__-home-status[data-level=degraded] .__P__-home-status-icon svg{color:var(--__P__-warning)}.__P__-home-status[data-level=down] .__P__-home-status-icon svg{color:var(--__P__-danger)}.__P__-home-status-text{font-weight:600;font-size:14px}.__P__-home-search{display:flex;align-items:center;gap:var(--__P__-space-2);width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);border:1px solid var(--__P__-border);background:var(--__P__-surface);text-align:left}.__P__-home-search[data-input=true]{background:var(--__P__-bg-elevated)}.__P__-home-search:hover{border-color:var(--__P__-border-strong)}.__P__-home-search:focus-visible,.__P__-home-search:focus-within{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-search-text{flex:1;color:var(--__P__-fg-muted);font-size:14px}.__P__-home-search-input{flex:1;border:0;background:transparent;font-size:14px;color:var(--__P__-fg);outline:none}.__P__-home-search-icon svg{width:18px;height:18px;color:var(--__P__-accent)}.__P__-list-row{display:flex;align-items:center;gap:var(--__P__-space-3);width:100%;min-height:44px;text-align:left;padding:var(--__P__-space-3) var(--__P__-space-2);border-radius:var(--__P__-radius-sm)}.__P__-list-row:hover{background:var(--__P__-bg-elevated)}.__P__-list-row:active{background:var(--__P__-border)}.__P__-list-row:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-list-row-body{display:flex;flex-direction:column;min-width:0;flex:1}.__P__-list-row-title{font-weight:600;font-size:var(--__P__-text-md);line-height:1.35}.__P__-list-row-sub{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);margin-top:var(--__P__-space-1);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-list-row-chevron svg{width:18px;height:18px;color:var(--__P__-accent);flex-shrink:0}.__P__-back-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);flex-shrink:0}.__P__-back-title{flex:1;text-align:center;font-size:var(--__P__-text-md);font-weight:700;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-back-spacer{width:32px;height:1px}.__P__-content{display:flex;flex-direction:column;gap:14px;width:100%;max-width:68ch;margin:0 auto}.__P__-content-hero{width:100%;border-radius:var(--__P__-radius)}.__P__-content-subtitle{color:var(--__P__-fg-muted);margin:0}.__P__-content-frame{flex:1;min-height:0;width:100%;border:0;background:#fff}.__P__-news-list{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-news-card{display:block;width:100%;text-align:left;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden;background:var(--__P__-surface)}.__P__-news-card{transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-news-card:hover{background:var(--__P__-bg-elevated)}.__P__-news-card:active{transform:translateY(1px)}.__P__-news-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-news-hero{width:100%;display:block}.__P__-news-body{display:flex;flex-direction:column;gap:6px;padding:14px 16px}.__P__-news-tags{display:flex;gap:6px;flex-wrap:wrap}.__P__-news-tag{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-accent);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);padding:2px 8px;border-radius:999px}.__P__-news-title{font-weight:700;font-size:var(--__P__-text-md)}.__P__-news-summary{color:var(--__P__-fg-muted);font-size:14px;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-modules-empty{display:flex;align-items:center;justify-content:center;position:relative}.__P__-modules-empty-close{position:absolute;top:12px;right:12px}.__P__-modules-empty-text{color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-form{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-field{display:flex;flex-direction:column;gap:4px}.__P__-field-label{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-field-req{color:var(--__P__-danger)}.__P__-field-input{width:100%;box-sizing:border-box;padding:var(--__P__-space-2) var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);color:var(--__P__-fg);font:inherit;font-size:var(--__P__-text-sm);resize:vertical;transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-field-input:focus-visible{outline:none;border-color:var(--__P__-accent)}.__P__-field[data-invalid=true] .__P__-field-input{border-color:var(--__P__-danger)}.__P__-field-hint{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-field-error{font-size:var(--__P__-text-xs);color:var(--__P__-danger)}.__P__-field-choices{display:flex;flex-direction:column;gap:6px}.__P__-choice{display:flex;align-items:flex-start;gap:8px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);cursor:pointer}.__P__-choice input{margin-top:2px;accent-color:var(--__P__-accent)}.__P__-form-actions{display:flex;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:2px}.__P__-form-submit,.__P__-tool-approve{padding:var(--__P__-space-2) var(--__P__-space-4);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);cursor:pointer;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-submit:hover:not(:disabled),.__P__-tool-approve:hover:not(:disabled){filter:brightness(1.06)}.__P__-form-submit:disabled{opacity:.6;cursor:default}.__P__-form-skip,.__P__-tool-reject{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:transparent;color:var(--__P__-fg-muted);font:inherit;font-size:var(--__P__-text-sm);cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-skip:hover:not(:disabled),.__P__-tool-reject:hover:not(:disabled){background:var(--__P__-bg-elevated)}.__P__-form-gate{display:flex;flex-direction:column;gap:var(--__P__-space-2);padding:var(--__P__-space-3) var(--__P__-space-4) var(--__P__-space-4);border-top:1px solid var(--__P__-border);max-height:60%;overflow-y:auto}.__P__-form-gate-title{margin:0;font-size:var(--__P__-text-base);font-weight:700;color:var(--__P__-fg)}.__P__-form-gate-desc{margin:0 0 var(--__P__-space-1);font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-tool-ask-input,.__P__-tool-approval{display:flex;flex-direction:column;gap:var(--__P__-space-2);margin-top:6px;padding:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-tool-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.__P__-tool-badge{padding:2px 8px;border-radius:999px;background:var(--__P__-warning, #f59e0b);color:#1a1206;font-size:var(--__P__-text-xs);font-weight:600}.__P__-tool-title{font-size:var(--__P__-text-sm);color:var(--__P__-fg)}.__P__-tool-question{margin:0;font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-tool-desc{margin:0;font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-tool-args{margin:0;padding:var(--__P__-space-2);max-height:160px;overflow:auto;border-radius:var(--__P__-radius-sm);background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);white-space:pre-wrap;word-break:break-word}.__P__-tool-stale-note{margin:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-tool-decided{flex-direction:row;align-items:center;flex-wrap:wrap;gap:8px}.__P__-tool-decided-label{padding:2px 8px;border-radius:999px;background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-tool-decided-label[data-approved=true]{color:var(--__P__-success, #16a34a);border-color:var(--__P__-success, #16a34a)}.__P__-tool-decided-label[data-approved=false]{color:var(--__P__-danger);border-color:var(--__P__-danger)}.__P__-tool-decided-value{font-size:var(--__P__-text-sm);color:var(--__P__-fg)}\n';
|
|
916
911
|
|
|
917
912
|
// src/styles/standalone.css
|
|
918
913
|
var standalone_default = ".__P__-standalone-page{margin:0;height:100vh;background:var(--__P__-bg, #fff);display:grid;place-items:stretch}\n";
|
|
@@ -1000,22 +995,22 @@ function attachAdoptedSheet(shadow, doc) {
|
|
|
1000
995
|
}
|
|
1001
996
|
}
|
|
1002
997
|
function applyThemeOverrides(host, overrides) {
|
|
1003
|
-
const
|
|
1004
|
-
if (overrides.accent) host.style.setProperty(`--${
|
|
1005
|
-
if (overrides.accentText) host.style.setProperty(`--${
|
|
1006
|
-
if (overrides.radius) host.style.setProperty(`--${
|
|
1007
|
-
if (overrides.fontFamily) host.style.setProperty(`--${
|
|
998
|
+
const p33 = BRAND.cssPrefix;
|
|
999
|
+
if (overrides.accent) host.style.setProperty(`--${p33}-accent`, overrides.accent);
|
|
1000
|
+
if (overrides.accentText) host.style.setProperty(`--${p33}-accent-text`, overrides.accentText);
|
|
1001
|
+
if (overrides.radius) host.style.setProperty(`--${p33}-radius`, overrides.radius);
|
|
1002
|
+
if (overrides.fontFamily) host.style.setProperty(`--${p33}-font`, overrides.fontFamily);
|
|
1008
1003
|
}
|
|
1009
1004
|
function applyThemeMode(host, mode) {
|
|
1010
1005
|
host.dataset.theme = mode;
|
|
1011
1006
|
}
|
|
1012
1007
|
function applySize(host, size) {
|
|
1013
|
-
const
|
|
1014
|
-
if (size.width !== void 0) host.style.setProperty(`--${
|
|
1015
|
-
if (size.height !== void 0) host.style.setProperty(`--${
|
|
1016
|
-
if (size.expanded?.width !== void 0) host.style.setProperty(`--${
|
|
1017
|
-
if (size.expanded?.height !== void 0) host.style.setProperty(`--${
|
|
1018
|
-
if (size.inset !== void 0) host.style.setProperty(`--${
|
|
1008
|
+
const p33 = BRAND.cssPrefix;
|
|
1009
|
+
if (size.width !== void 0) host.style.setProperty(`--${p33}-panel-w`, size.width);
|
|
1010
|
+
if (size.height !== void 0) host.style.setProperty(`--${p33}-panel-h`, size.height);
|
|
1011
|
+
if (size.expanded?.width !== void 0) host.style.setProperty(`--${p33}-expanded-w`, size.expanded.width);
|
|
1012
|
+
if (size.expanded?.height !== void 0) host.style.setProperty(`--${p33}-expanded-h`, size.expanded.height);
|
|
1013
|
+
if (size.inset !== void 0) host.style.setProperty(`--${p33}-panel-inset`, size.inset);
|
|
1019
1014
|
}
|
|
1020
1015
|
function applyPosition(host, pos) {
|
|
1021
1016
|
host.dataset.position = pos;
|
|
@@ -1186,11 +1181,11 @@ function toBase64Url(json) {
|
|
|
1186
1181
|
var nonEmpty = (ctx) => ctx && Object.keys(ctx).length > 0 ? ctx : void 0;
|
|
1187
1182
|
function encodeContext(user, page) {
|
|
1188
1183
|
const u = nonEmpty(user);
|
|
1189
|
-
const
|
|
1190
|
-
if (!u && !
|
|
1184
|
+
const p33 = nonEmpty(page);
|
|
1185
|
+
if (!u && !p33) return void 0;
|
|
1191
1186
|
const envelope = {};
|
|
1192
1187
|
if (u) envelope.user = u;
|
|
1193
|
-
if (
|
|
1188
|
+
if (p33) envelope.page = p33;
|
|
1194
1189
|
return toBase64Url(JSON.stringify(envelope));
|
|
1195
1190
|
}
|
|
1196
1191
|
|
|
@@ -1260,8 +1255,8 @@ function buildSendMessageRequest(params) {
|
|
|
1260
1255
|
if (Object.keys(data).length > 0) body.data = data;
|
|
1261
1256
|
return body;
|
|
1262
1257
|
}
|
|
1263
|
-
function isResolvedToolPart(
|
|
1264
|
-
return
|
|
1258
|
+
function isResolvedToolPart(p33) {
|
|
1259
|
+
return p33.state === "output" || p33.state === "error" || p33.approval?.approved !== void 0;
|
|
1265
1260
|
}
|
|
1266
1261
|
function normalizeToolRef(ref) {
|
|
1267
1262
|
if (typeof ref === "string") return ref ? { code: ref } : null;
|
|
@@ -1269,24 +1264,24 @@ function normalizeToolRef(ref) {
|
|
|
1269
1264
|
}
|
|
1270
1265
|
function messageToWireParts(m) {
|
|
1271
1266
|
const out = [];
|
|
1272
|
-
for (const
|
|
1273
|
-
if (
|
|
1274
|
-
out.push({ text:
|
|
1267
|
+
for (const p33 of m.parts) {
|
|
1268
|
+
if (p33.kind === "text" && p33.text) {
|
|
1269
|
+
out.push({ text: p33.text, type: "text" });
|
|
1275
1270
|
}
|
|
1276
|
-
if (
|
|
1277
|
-
out.push({ mediaType:
|
|
1271
|
+
if (p33.kind === "file" && p33.url) {
|
|
1272
|
+
out.push({ mediaType: p33.mediaType, type: "file", url: p33.url });
|
|
1278
1273
|
}
|
|
1279
|
-
if (
|
|
1274
|
+
if (p33.kind === "tool" && isResolvedToolPart(p33)) {
|
|
1280
1275
|
const part = {
|
|
1281
1276
|
type: "tool",
|
|
1282
|
-
toolCallId:
|
|
1283
|
-
toolName:
|
|
1284
|
-
state:
|
|
1277
|
+
toolCallId: p33.toolCallId,
|
|
1278
|
+
toolName: p33.toolName,
|
|
1279
|
+
state: p33.state
|
|
1285
1280
|
};
|
|
1286
|
-
if (
|
|
1287
|
-
if (
|
|
1288
|
-
if (
|
|
1289
|
-
if (
|
|
1281
|
+
if (p33.input !== void 0) part.input = p33.input;
|
|
1282
|
+
if (p33.output !== void 0) part.output = p33.output;
|
|
1283
|
+
if (p33.error !== void 0) part.errorText = p33.error;
|
|
1284
|
+
if (p33.approval && p33.approval.approved !== void 0) part.approval = p33.approval;
|
|
1290
1285
|
out.push(part);
|
|
1291
1286
|
}
|
|
1292
1287
|
}
|
|
@@ -1879,7 +1874,7 @@ function fromWireMessage(w) {
|
|
|
1879
1874
|
};
|
|
1880
1875
|
}
|
|
1881
1876
|
return null;
|
|
1882
|
-
}).filter((
|
|
1877
|
+
}).filter((p33) => p33 !== null);
|
|
1883
1878
|
return {
|
|
1884
1879
|
id: w.id,
|
|
1885
1880
|
role: w.role,
|
|
@@ -1909,43 +1904,43 @@ function assistantText(m) {
|
|
|
1909
1904
|
}
|
|
1910
1905
|
return out;
|
|
1911
1906
|
}
|
|
1912
|
-
function partToReactive(
|
|
1913
|
-
if (
|
|
1914
|
-
return { kind:
|
|
1907
|
+
function partToReactive(p33) {
|
|
1908
|
+
if (p33.kind === "text" || p33.kind === "reasoning") {
|
|
1909
|
+
return { kind: p33.kind, id: p33.id, textSig: signal(p33.text), doneSig: signal(p33.done) };
|
|
1915
1910
|
}
|
|
1916
|
-
if (
|
|
1911
|
+
if (p33.kind === "tool") {
|
|
1917
1912
|
return {
|
|
1918
1913
|
kind: "tool",
|
|
1919
|
-
toolCallId:
|
|
1920
|
-
toolName:
|
|
1921
|
-
inputPartialSig: signal(
|
|
1922
|
-
inputSig: signal(
|
|
1923
|
-
outputSig: signal(
|
|
1924
|
-
errorSig: signal(
|
|
1925
|
-
stateSig: signal(
|
|
1926
|
-
approvalSig: signal(
|
|
1914
|
+
toolCallId: p33.toolCallId,
|
|
1915
|
+
toolName: p33.toolName,
|
|
1916
|
+
inputPartialSig: signal(p33.inputPartial),
|
|
1917
|
+
inputSig: signal(p33.input),
|
|
1918
|
+
outputSig: signal(p33.output),
|
|
1919
|
+
errorSig: signal(p33.error),
|
|
1920
|
+
stateSig: signal(p33.state),
|
|
1921
|
+
approvalSig: signal(p33.approval)
|
|
1927
1922
|
};
|
|
1928
1923
|
}
|
|
1929
|
-
return
|
|
1924
|
+
return p33;
|
|
1930
1925
|
}
|
|
1931
|
-
function partFromReactive(
|
|
1932
|
-
if (
|
|
1933
|
-
return { kind:
|
|
1926
|
+
function partFromReactive(p33) {
|
|
1927
|
+
if (p33.kind === "text" || p33.kind === "reasoning") {
|
|
1928
|
+
return { kind: p33.kind, id: p33.id, text: p33.textSig.value, done: p33.doneSig.value };
|
|
1934
1929
|
}
|
|
1935
|
-
if (
|
|
1930
|
+
if (p33.kind === "tool") {
|
|
1936
1931
|
return {
|
|
1937
1932
|
kind: "tool",
|
|
1938
|
-
toolCallId:
|
|
1939
|
-
toolName:
|
|
1940
|
-
inputPartial:
|
|
1941
|
-
input:
|
|
1942
|
-
output:
|
|
1943
|
-
error:
|
|
1944
|
-
state:
|
|
1945
|
-
approval:
|
|
1933
|
+
toolCallId: p33.toolCallId,
|
|
1934
|
+
toolName: p33.toolName,
|
|
1935
|
+
inputPartial: p33.inputPartialSig.value,
|
|
1936
|
+
input: p33.inputSig.value,
|
|
1937
|
+
output: p33.outputSig.value,
|
|
1938
|
+
error: p33.errorSig.value,
|
|
1939
|
+
state: p33.stateSig.value,
|
|
1940
|
+
approval: p33.approvalSig.value
|
|
1946
1941
|
};
|
|
1947
1942
|
}
|
|
1948
|
-
return
|
|
1943
|
+
return p33;
|
|
1949
1944
|
}
|
|
1950
1945
|
|
|
1951
1946
|
// src/stream/reducer.ts
|
|
@@ -2000,8 +1995,8 @@ var StreamReducer = class {
|
|
|
2000
1995
|
ensureTextPart(m, "text", chunk.id);
|
|
2001
1996
|
return;
|
|
2002
1997
|
case "text-delta": {
|
|
2003
|
-
const
|
|
2004
|
-
|
|
1998
|
+
const p33 = ensureTextPart(m, "text", chunk.id);
|
|
1999
|
+
p33.textSig.value += chunk.delta;
|
|
2005
2000
|
return;
|
|
2006
2001
|
}
|
|
2007
2002
|
case "text-end":
|
|
@@ -2011,8 +2006,8 @@ var StreamReducer = class {
|
|
|
2011
2006
|
ensureTextPart(m, "reasoning", chunk.id).doneSig.value = false;
|
|
2012
2007
|
return;
|
|
2013
2008
|
case "reasoning-delta": {
|
|
2014
|
-
const
|
|
2015
|
-
|
|
2009
|
+
const p33 = ensureTextPart(m, "reasoning", chunk.id);
|
|
2010
|
+
p33.textSig.value += chunk.delta;
|
|
2016
2011
|
return;
|
|
2017
2012
|
}
|
|
2018
2013
|
case "reasoning-end":
|
|
@@ -2031,7 +2026,7 @@ var StreamReducer = class {
|
|
|
2031
2026
|
return;
|
|
2032
2027
|
case "source-url": {
|
|
2033
2028
|
const parts = m.partsSig.value;
|
|
2034
|
-
if (parts.some((
|
|
2029
|
+
if (parts.some((p33) => p33.kind === "source" && p33.sourceId === chunk.sourceId)) return;
|
|
2035
2030
|
appendPart(m, { kind: "source", sourceId: chunk.sourceId, url: chunk.url, title: chunk.title });
|
|
2036
2031
|
return;
|
|
2037
2032
|
}
|
|
@@ -2055,14 +2050,14 @@ var StreamReducer = class {
|
|
|
2055
2050
|
}
|
|
2056
2051
|
};
|
|
2057
2052
|
function ensureTextPart(m, kind, id) {
|
|
2058
|
-
const existing = m.partsSig.value.find((
|
|
2053
|
+
const existing = m.partsSig.value.find((p33) => p33.kind === kind && p33.id === id);
|
|
2059
2054
|
if (existing) return existing;
|
|
2060
2055
|
const part = { kind, id, textSig: signal2(""), doneSig: signal2(false) };
|
|
2061
2056
|
appendPart(m, part);
|
|
2062
2057
|
return part;
|
|
2063
2058
|
}
|
|
2064
2059
|
function ensureToolPart(m, toolCallId, toolName) {
|
|
2065
|
-
const existing = m.partsSig.value.find((
|
|
2060
|
+
const existing = m.partsSig.value.find((p33) => p33.kind === "tool" && p33.toolCallId === toolCallId);
|
|
2066
2061
|
if (existing) return existing;
|
|
2067
2062
|
const part = {
|
|
2068
2063
|
kind: "tool",
|
|
@@ -2087,32 +2082,32 @@ function applyTool(m, chunk) {
|
|
|
2087
2082
|
ensureToolPart(m, chunk.toolCallId, chunk.toolName);
|
|
2088
2083
|
return;
|
|
2089
2084
|
case "tool-input-delta": {
|
|
2090
|
-
const
|
|
2091
|
-
|
|
2085
|
+
const p33 = ensureToolPart(m, chunk.toolCallId);
|
|
2086
|
+
p33.inputPartialSig.value += chunk.delta;
|
|
2092
2087
|
return;
|
|
2093
2088
|
}
|
|
2094
2089
|
case "tool-input-available": {
|
|
2095
|
-
const
|
|
2096
|
-
|
|
2097
|
-
|
|
2090
|
+
const p33 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
|
|
2091
|
+
p33.inputSig.value = chunk.input;
|
|
2092
|
+
p33.stateSig.value = isAskUserInputTool(p33.toolName) ? "awaiting-input" : "awaiting";
|
|
2098
2093
|
return;
|
|
2099
2094
|
}
|
|
2100
2095
|
case "tool-approval-request": {
|
|
2101
|
-
const
|
|
2102
|
-
|
|
2103
|
-
|
|
2096
|
+
const p33 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
|
|
2097
|
+
p33.approvalSig.value = { id: chunk.approvalId };
|
|
2098
|
+
p33.stateSig.value = "awaiting-approval";
|
|
2104
2099
|
return;
|
|
2105
2100
|
}
|
|
2106
2101
|
case "tool-output-available": {
|
|
2107
|
-
const
|
|
2108
|
-
|
|
2109
|
-
|
|
2102
|
+
const p33 = ensureToolPart(m, chunk.toolCallId);
|
|
2103
|
+
p33.outputSig.value = chunk.output;
|
|
2104
|
+
p33.stateSig.value = "output";
|
|
2110
2105
|
return;
|
|
2111
2106
|
}
|
|
2112
2107
|
case "tool-output-error": {
|
|
2113
|
-
const
|
|
2114
|
-
|
|
2115
|
-
|
|
2108
|
+
const p33 = ensureToolPart(m, chunk.toolCallId);
|
|
2109
|
+
p33.errorSig.value = chunk.errorText;
|
|
2110
|
+
p33.stateSig.value = "error";
|
|
2116
2111
|
return;
|
|
2117
2112
|
}
|
|
2118
2113
|
default:
|
|
@@ -2778,16 +2773,12 @@ var TID = {
|
|
|
2778
2773
|
/** News list item — suffix `-{id}`. */
|
|
2779
2774
|
newsItem: `${p2}-news-item`,
|
|
2780
2775
|
// ── Forms + human-in-the-loop (forms / ask-input / approval) ─────
|
|
2781
|
-
/**
|
|
2776
|
+
/** Form gate root (replaces the composer, locking the chat). */
|
|
2782
2777
|
formGate: `${p2}-form-gate`,
|
|
2783
|
-
/** Inline form card root (in the transcript). */
|
|
2784
|
-
formCard: `${p2}-form-card`,
|
|
2785
2778
|
/** Form submit button. */
|
|
2786
2779
|
formSubmit: `${p2}-form-submit`,
|
|
2787
|
-
/** Form skip button (
|
|
2780
|
+
/** Form skip button (shown only when `skippable`). */
|
|
2788
2781
|
formSkip: `${p2}-form-skip`,
|
|
2789
|
-
/** Inline form-card dismiss button. */
|
|
2790
|
-
formDismiss: `${p2}-form-dismiss`,
|
|
2791
2782
|
/** A single form field control — suffix `-{name}` at the JSX site. */
|
|
2792
2783
|
formField: `${p2}-form-field`,
|
|
2793
2784
|
/** Ask-input tool root (inline form in a message bubble). */
|
|
@@ -2914,24 +2905,24 @@ import { useCallback as useCallback2, useEffect as useEffect10, useRef as useRef
|
|
|
2914
2905
|
import { useEffect as useEffect2, useRef } from "preact/hooks";
|
|
2915
2906
|
import { jsx as jsx3 } from "preact/jsx-runtime";
|
|
2916
2907
|
function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, strings }) {
|
|
2917
|
-
const
|
|
2908
|
+
const p33 = BRAND.cssPrefix;
|
|
2918
2909
|
const dragRef = useRef(null);
|
|
2919
2910
|
useEffect2(() => {
|
|
2920
2911
|
if (!panelEl) return;
|
|
2921
2912
|
const style = panelEl.style;
|
|
2922
|
-
if (resize.minWidth) style.setProperty(`--${
|
|
2923
|
-
if (resize.maxWidth) style.setProperty(`--${
|
|
2924
|
-
if (resize.minHeight) style.setProperty(`--${
|
|
2925
|
-
if (resize.maxHeight) style.setProperty(`--${
|
|
2913
|
+
if (resize.minWidth) style.setProperty(`--${p33}-resize-min-w`, resize.minWidth);
|
|
2914
|
+
if (resize.maxWidth) style.setProperty(`--${p33}-resize-max-w`, resize.maxWidth);
|
|
2915
|
+
if (resize.minHeight) style.setProperty(`--${p33}-resize-min-h`, resize.minHeight);
|
|
2916
|
+
if (resize.maxHeight) style.setProperty(`--${p33}-resize-max-h`, resize.maxHeight);
|
|
2926
2917
|
if (initialSize) {
|
|
2927
|
-
style.setProperty(`--${
|
|
2928
|
-
style.setProperty(`--${
|
|
2918
|
+
style.setProperty(`--${p33}-widget-w`, `${initialSize.width}px`);
|
|
2919
|
+
style.setProperty(`--${p33}-widget-h`, `${initialSize.height}px`);
|
|
2929
2920
|
}
|
|
2930
|
-
}, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight,
|
|
2921
|
+
}, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight, p33, initialSize]);
|
|
2931
2922
|
if (!panelEl) return null;
|
|
2932
2923
|
const isTop = position.startsWith("top-");
|
|
2933
2924
|
const isRight = position.endsWith("-right");
|
|
2934
|
-
const cornerClass = `${
|
|
2925
|
+
const cornerClass = `${p33}-resize-grip ${p33}-resize-grip--${isTop ? "bottom" : "top"}-${isRight ? "left" : "right"}`;
|
|
2935
2926
|
const onPointerDown = (e) => {
|
|
2936
2927
|
if (!panelEl) return;
|
|
2937
2928
|
const target = e.currentTarget;
|
|
@@ -2955,8 +2946,8 @@ function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, stri
|
|
|
2955
2946
|
if (!d || e.pointerId !== d.pointerId || !panelEl) return;
|
|
2956
2947
|
const dx = (e.clientX - d.startX) * d.dirX;
|
|
2957
2948
|
const dy = (e.clientY - d.startY) * d.dirY;
|
|
2958
|
-
panelEl.style.setProperty(`--${
|
|
2959
|
-
panelEl.style.setProperty(`--${
|
|
2949
|
+
panelEl.style.setProperty(`--${p33}-widget-w`, `${d.startW + dx}px`);
|
|
2950
|
+
panelEl.style.setProperty(`--${p33}-widget-h`, `${d.startH + dy}px`);
|
|
2960
2951
|
};
|
|
2961
2952
|
const onPointerUp = (e) => {
|
|
2962
2953
|
const d = dragRef.current;
|
|
@@ -3691,20 +3682,20 @@ function usePopoverMenu({ itemCount, initialFocusIndex }) {
|
|
|
3691
3682
|
// src/ui/overflow-menu.tsx
|
|
3692
3683
|
import { jsx as jsx8, jsxs as jsxs6 } from "preact/jsx-runtime";
|
|
3693
3684
|
function OverflowMenu({ items, triggerLabel }) {
|
|
3694
|
-
const
|
|
3685
|
+
const p33 = BRAND.cssPrefix;
|
|
3695
3686
|
const menu = usePopoverMenu({ itemCount: items.length });
|
|
3696
3687
|
const handleSelect = (item) => {
|
|
3697
3688
|
if (item.disabled) return;
|
|
3698
3689
|
item.onSelect();
|
|
3699
3690
|
if (!item.keepOpen) menu.close();
|
|
3700
3691
|
};
|
|
3701
|
-
return /* @__PURE__ */ jsxs6("div", { class: `${
|
|
3692
|
+
return /* @__PURE__ */ jsxs6("div", { class: `${p33}-menu-wrap`, children: [
|
|
3702
3693
|
/* @__PURE__ */ jsx8(
|
|
3703
3694
|
"button",
|
|
3704
3695
|
{
|
|
3705
3696
|
ref: menu.triggerRef,
|
|
3706
3697
|
type: "button",
|
|
3707
|
-
class: `${
|
|
3698
|
+
class: `${p33}-icon-btn`,
|
|
3708
3699
|
"aria-label": triggerLabel,
|
|
3709
3700
|
"aria-haspopup": "menu",
|
|
3710
3701
|
"aria-expanded": menu.open,
|
|
@@ -3718,7 +3709,7 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
3718
3709
|
"div",
|
|
3719
3710
|
{
|
|
3720
3711
|
ref: menu.menuRef,
|
|
3721
|
-
class: `${
|
|
3712
|
+
class: `${p33}-menu`,
|
|
3722
3713
|
role: "menu",
|
|
3723
3714
|
"aria-label": triggerLabel,
|
|
3724
3715
|
onKeyDown: menu.onMenuKey,
|
|
@@ -3728,15 +3719,15 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
3728
3719
|
{
|
|
3729
3720
|
type: "button",
|
|
3730
3721
|
role: "menuitem",
|
|
3731
|
-
class: `${
|
|
3722
|
+
class: `${p33}-menu-item`,
|
|
3732
3723
|
"aria-pressed": item.type === "switch" ? item.on : void 0,
|
|
3733
3724
|
disabled: item.disabled,
|
|
3734
3725
|
lang: item.lang,
|
|
3735
3726
|
onClick: () => handleSelect(item),
|
|
3736
3727
|
children: [
|
|
3737
|
-
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${
|
|
3738
|
-
/* @__PURE__ */ jsx8("span", { class: `${
|
|
3739
|
-
item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${
|
|
3728
|
+
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p33}-menu-icon`, children: item.icon }) : null,
|
|
3729
|
+
/* @__PURE__ */ jsx8("span", { class: `${p33}-menu-label`, children: item.label }),
|
|
3730
|
+
item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${p33}-menu-check`, "aria-hidden": "true", children: /* @__PURE__ */ jsx8(CheckIcon, {}) }) : null
|
|
3740
3731
|
]
|
|
3741
3732
|
},
|
|
3742
3733
|
item.id
|
|
@@ -4214,40 +4205,6 @@ function FormGate({ form, strings, onSubmit, onSkip }) {
|
|
|
4214
4205
|
import { useEffect as useEffect8, useLayoutEffect, useRef as useRef5, useState as useState6 } from "preact/hooks";
|
|
4215
4206
|
import { useComputed as useComputed5 } from "@preact/signals";
|
|
4216
4207
|
|
|
4217
|
-
// src/ui/form/form-card.tsx
|
|
4218
|
-
import { jsx as jsx12, jsxs as jsxs10 } from "preact/jsx-runtime";
|
|
4219
|
-
var p12 = BRAND.cssPrefix;
|
|
4220
|
-
function FormCard({ form, strings, onSubmit, onSkip }) {
|
|
4221
|
-
return /* @__PURE__ */ jsxs10("div", { class: `${p12}-form-card`, "data-testid": TID.formCard, children: [
|
|
4222
|
-
/* @__PURE__ */ jsxs10("div", { class: `${p12}-form-card-head`, children: [
|
|
4223
|
-
form.title ? /* @__PURE__ */ jsx12("strong", { class: `${p12}-form-card-title`, children: form.title }) : /* @__PURE__ */ jsx12("span", {}),
|
|
4224
|
-
/* @__PURE__ */ jsx12(
|
|
4225
|
-
"button",
|
|
4226
|
-
{
|
|
4227
|
-
type: "button",
|
|
4228
|
-
class: `${p12}-icon-btn`,
|
|
4229
|
-
onClick: onSkip,
|
|
4230
|
-
"aria-label": strings.formDismiss,
|
|
4231
|
-
title: strings.formDismiss,
|
|
4232
|
-
"data-testid": TID.formDismiss,
|
|
4233
|
-
children: /* @__PURE__ */ jsx12(CloseIcon, {})
|
|
4234
|
-
}
|
|
4235
|
-
)
|
|
4236
|
-
] }),
|
|
4237
|
-
form.description ? /* @__PURE__ */ jsx12("p", { class: `${p12}-form-card-desc`, children: form.description }) : null,
|
|
4238
|
-
/* @__PURE__ */ jsx12(
|
|
4239
|
-
DynamicForm,
|
|
4240
|
-
{
|
|
4241
|
-
fields: form.fields,
|
|
4242
|
-
strings,
|
|
4243
|
-
submitLabel: form.submitLabel ?? strings.formSubmit,
|
|
4244
|
-
onSubmit,
|
|
4245
|
-
submitTestId: TID.formSubmit
|
|
4246
|
-
}
|
|
4247
|
-
)
|
|
4248
|
-
] });
|
|
4249
|
-
}
|
|
4250
|
-
|
|
4251
4208
|
// src/ui/message-bubble.tsx
|
|
4252
4209
|
import { useComputed as useComputed4 } from "@preact/signals";
|
|
4253
4210
|
|
|
@@ -4255,7 +4212,7 @@ import { useComputed as useComputed4 } from "@preact/signals";
|
|
|
4255
4212
|
import { useEffect as useEffect7, useMemo, useRef as useRef4 } from "preact/hooks";
|
|
4256
4213
|
import { effect, signal as signal4 } from "@preact/signals";
|
|
4257
4214
|
import * as smd from "streaming-markdown";
|
|
4258
|
-
import { jsx as
|
|
4215
|
+
import { jsx as jsx12 } from "preact/jsx-runtime";
|
|
4259
4216
|
function MarkdownView({ textSig, doneSig }) {
|
|
4260
4217
|
const ref = useRef4(null);
|
|
4261
4218
|
useEffect7(() => {
|
|
@@ -4305,12 +4262,12 @@ function MarkdownView({ textSig, doneSig }) {
|
|
|
4305
4262
|
el.removeEventListener("click", onClick);
|
|
4306
4263
|
};
|
|
4307
4264
|
}, [textSig, doneSig]);
|
|
4308
|
-
return /* @__PURE__ */
|
|
4265
|
+
return /* @__PURE__ */ jsx12("div", { ref });
|
|
4309
4266
|
}
|
|
4310
4267
|
function StaticMarkdown({ text }) {
|
|
4311
4268
|
const textSig = useMemo(() => signal4(text), [text]);
|
|
4312
4269
|
const doneSig = useMemo(() => signal4(true), []);
|
|
4313
|
-
return /* @__PURE__ */
|
|
4270
|
+
return /* @__PURE__ */ jsx12(MarkdownView, { textSig, doneSig });
|
|
4314
4271
|
}
|
|
4315
4272
|
function hardenLink(a) {
|
|
4316
4273
|
const href = a.getAttribute("href") ?? "";
|
|
@@ -4324,8 +4281,8 @@ function hardenLink(a) {
|
|
|
4324
4281
|
|
|
4325
4282
|
// src/ui/tool-approval.tsx
|
|
4326
4283
|
import { useComputed as useComputed2, useSignal } from "@preact/signals";
|
|
4327
|
-
import { Fragment, jsx as
|
|
4328
|
-
var
|
|
4284
|
+
import { Fragment, jsx as jsx13, jsxs as jsxs10 } from "preact/jsx-runtime";
|
|
4285
|
+
var p12 = BRAND.cssPrefix;
|
|
4329
4286
|
function ToolApproval({ part, strings, active, onDecision }) {
|
|
4330
4287
|
const approval = useComputed2(() => part.approvalSig.value);
|
|
4331
4288
|
const input = useComputed2(() => part.inputSig.value);
|
|
@@ -4333,24 +4290,24 @@ function ToolApproval({ part, strings, active, onDecision }) {
|
|
|
4333
4290
|
const decided = approval.value?.approved !== void 0;
|
|
4334
4291
|
if (decided) {
|
|
4335
4292
|
const ap = approval.value;
|
|
4336
|
-
return /* @__PURE__ */
|
|
4337
|
-
/* @__PURE__ */
|
|
4338
|
-
/* @__PURE__ */
|
|
4339
|
-
ap?.reason ? /* @__PURE__ */
|
|
4293
|
+
return /* @__PURE__ */ jsxs10("div", { class: `${p12}-tool-approval ${p12}-tool-decided`, "data-testid": TID.toolDecision, children: [
|
|
4294
|
+
/* @__PURE__ */ jsx13("span", { class: `${p12}-tool-decided-label`, "data-approved": ap?.approved ? "true" : "false", children: ap?.approved ? strings.approved : strings.rejected }),
|
|
4295
|
+
/* @__PURE__ */ jsx13("strong", { class: `${p12}-tool-title`, children: part.toolName }),
|
|
4296
|
+
ap?.reason ? /* @__PURE__ */ jsx13("span", { class: `${p12}-tool-decided-value`, children: ap.reason }) : null
|
|
4340
4297
|
] });
|
|
4341
4298
|
}
|
|
4342
4299
|
const args = summarizeInput(input.value);
|
|
4343
|
-
return /* @__PURE__ */
|
|
4344
|
-
/* @__PURE__ */
|
|
4345
|
-
/* @__PURE__ */
|
|
4346
|
-
/* @__PURE__ */
|
|
4300
|
+
return /* @__PURE__ */ jsxs10("div", { class: `${p12}-tool-approval`, "data-testid": TID.toolApproval, children: [
|
|
4301
|
+
/* @__PURE__ */ jsxs10("div", { class: `${p12}-tool-head`, children: [
|
|
4302
|
+
/* @__PURE__ */ jsx13("span", { class: `${p12}-tool-badge`, children: strings.approvalRequired }),
|
|
4303
|
+
/* @__PURE__ */ jsx13("strong", { class: `${p12}-tool-title`, children: part.toolName })
|
|
4347
4304
|
] }),
|
|
4348
|
-
args ? /* @__PURE__ */
|
|
4349
|
-
active ? /* @__PURE__ */
|
|
4350
|
-
/* @__PURE__ */
|
|
4305
|
+
args ? /* @__PURE__ */ jsx13("pre", { class: `${p12}-tool-args`, children: args }) : null,
|
|
4306
|
+
active ? /* @__PURE__ */ jsxs10(Fragment, { children: [
|
|
4307
|
+
/* @__PURE__ */ jsx13(
|
|
4351
4308
|
"input",
|
|
4352
4309
|
{
|
|
4353
|
-
class: `${
|
|
4310
|
+
class: `${p12}-field-input`,
|
|
4354
4311
|
value: reason.value,
|
|
4355
4312
|
placeholder: strings.approvalReason,
|
|
4356
4313
|
onInput: (e) => {
|
|
@@ -4358,29 +4315,29 @@ function ToolApproval({ part, strings, active, onDecision }) {
|
|
|
4358
4315
|
}
|
|
4359
4316
|
}
|
|
4360
4317
|
),
|
|
4361
|
-
/* @__PURE__ */
|
|
4362
|
-
/* @__PURE__ */
|
|
4318
|
+
/* @__PURE__ */ jsxs10("div", { class: `${p12}-form-actions`, children: [
|
|
4319
|
+
/* @__PURE__ */ jsx13(
|
|
4363
4320
|
"button",
|
|
4364
4321
|
{
|
|
4365
4322
|
type: "button",
|
|
4366
|
-
class: `${
|
|
4323
|
+
class: `${p12}-tool-reject`,
|
|
4367
4324
|
onClick: () => onDecision(part.toolCallId, false, reason.value.trim() || void 0),
|
|
4368
4325
|
"data-testid": TID.toolReject,
|
|
4369
4326
|
children: strings.reject
|
|
4370
4327
|
}
|
|
4371
4328
|
),
|
|
4372
|
-
/* @__PURE__ */
|
|
4329
|
+
/* @__PURE__ */ jsx13(
|
|
4373
4330
|
"button",
|
|
4374
4331
|
{
|
|
4375
4332
|
type: "button",
|
|
4376
|
-
class: `${
|
|
4333
|
+
class: `${p12}-tool-approve`,
|
|
4377
4334
|
onClick: () => onDecision(part.toolCallId, true, reason.value.trim() || void 0),
|
|
4378
4335
|
"data-testid": TID.toolApprove,
|
|
4379
4336
|
children: strings.approve
|
|
4380
4337
|
}
|
|
4381
4338
|
)
|
|
4382
4339
|
] })
|
|
4383
|
-
] }) : /* @__PURE__ */
|
|
4340
|
+
] }) : /* @__PURE__ */ jsx13("p", { class: `${p12}-tool-stale-note`, children: strings.stepNoLongerActive })
|
|
4384
4341
|
] });
|
|
4385
4342
|
}
|
|
4386
4343
|
function summarizeInput(input) {
|
|
@@ -4451,49 +4408,49 @@ function num(v) {
|
|
|
4451
4408
|
}
|
|
4452
4409
|
|
|
4453
4410
|
// src/ui/tool-ask-input.tsx
|
|
4454
|
-
import { jsx as
|
|
4455
|
-
var
|
|
4411
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "preact/jsx-runtime";
|
|
4412
|
+
var p13 = BRAND.cssPrefix;
|
|
4456
4413
|
function ToolAskInput({ part, strings, active, onSubmit }) {
|
|
4457
4414
|
const state = useComputed3(() => part.stateSig.value);
|
|
4458
4415
|
const request = useComputed3(() => parseAskUserInput(part.inputSig.value));
|
|
4459
4416
|
const decided = state.value === "output" || state.value === "error";
|
|
4460
4417
|
if (decided) {
|
|
4461
|
-
return /* @__PURE__ */
|
|
4418
|
+
return /* @__PURE__ */ jsx14(DecidedSummary, { part, strings });
|
|
4462
4419
|
}
|
|
4463
4420
|
if (!active) {
|
|
4464
|
-
return /* @__PURE__ */
|
|
4465
|
-
/* @__PURE__ */
|
|
4466
|
-
/* @__PURE__ */
|
|
4421
|
+
return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-ask-input ${p13}-tool-stale`, "data-testid": TID.toolAskInput, children: [
|
|
4422
|
+
/* @__PURE__ */ jsx14(Header, { strings, title: request.value.title ?? request.value.question }),
|
|
4423
|
+
/* @__PURE__ */ jsx14("p", { class: `${p13}-tool-stale-note`, children: strings.stepNoLongerActive })
|
|
4467
4424
|
] });
|
|
4468
4425
|
}
|
|
4469
4426
|
const req = request.value;
|
|
4470
4427
|
const isConfirmation = req.responseType === "confirmation";
|
|
4471
|
-
return /* @__PURE__ */
|
|
4472
|
-
/* @__PURE__ */
|
|
4473
|
-
req.description ? /* @__PURE__ */
|
|
4474
|
-
isConfirmation ? /* @__PURE__ */
|
|
4475
|
-
isConfirmation ? /* @__PURE__ */
|
|
4476
|
-
/* @__PURE__ */
|
|
4428
|
+
return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-ask-input`, "data-testid": TID.toolAskInput, children: [
|
|
4429
|
+
/* @__PURE__ */ jsx14(Header, { strings, title: req.title }),
|
|
4430
|
+
req.description ? /* @__PURE__ */ jsx14("p", { class: `${p13}-tool-desc`, children: req.description }) : null,
|
|
4431
|
+
isConfirmation ? /* @__PURE__ */ jsx14("p", { class: `${p13}-tool-question`, children: req.question }) : null,
|
|
4432
|
+
isConfirmation ? /* @__PURE__ */ jsxs11("div", { class: `${p13}-form-actions`, children: [
|
|
4433
|
+
/* @__PURE__ */ jsx14(
|
|
4477
4434
|
"button",
|
|
4478
4435
|
{
|
|
4479
4436
|
type: "button",
|
|
4480
|
-
class: `${
|
|
4437
|
+
class: `${p13}-form-skip`,
|
|
4481
4438
|
onClick: () => onSubmit(part.toolCallId, { confirmed: false }),
|
|
4482
4439
|
"data-testid": TID.toolInputSkip,
|
|
4483
4440
|
children: strings.reject
|
|
4484
4441
|
}
|
|
4485
4442
|
),
|
|
4486
|
-
/* @__PURE__ */
|
|
4443
|
+
/* @__PURE__ */ jsx14(
|
|
4487
4444
|
"button",
|
|
4488
4445
|
{
|
|
4489
4446
|
type: "button",
|
|
4490
|
-
class: `${
|
|
4447
|
+
class: `${p13}-form-submit`,
|
|
4491
4448
|
onClick: () => onSubmit(part.toolCallId, { confirmed: true }),
|
|
4492
4449
|
"data-testid": TID.toolInputSubmit,
|
|
4493
4450
|
children: strings.approve
|
|
4494
4451
|
}
|
|
4495
4452
|
)
|
|
4496
|
-
] }) : /* @__PURE__ */
|
|
4453
|
+
] }) : /* @__PURE__ */ jsx14(
|
|
4497
4454
|
DynamicForm,
|
|
4498
4455
|
{
|
|
4499
4456
|
fields: askInputToFields(req),
|
|
@@ -4509,17 +4466,17 @@ function ToolAskInput({ part, strings, active, onSubmit }) {
|
|
|
4509
4466
|
] });
|
|
4510
4467
|
}
|
|
4511
4468
|
function Header({ strings, title }) {
|
|
4512
|
-
return /* @__PURE__ */
|
|
4513
|
-
/* @__PURE__ */
|
|
4514
|
-
title ? /* @__PURE__ */
|
|
4469
|
+
return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-head`, children: [
|
|
4470
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-tool-badge`, children: strings.inputRequired }),
|
|
4471
|
+
title ? /* @__PURE__ */ jsx14("strong", { class: `${p13}-tool-title`, children: title }) : null
|
|
4515
4472
|
] });
|
|
4516
4473
|
}
|
|
4517
4474
|
function DecidedSummary({ part, strings }) {
|
|
4518
4475
|
const output = useComputed3(() => part.outputSig.value);
|
|
4519
4476
|
const text = summarizeOutput(output.value) || strings.inputSubmitted;
|
|
4520
|
-
return /* @__PURE__ */
|
|
4521
|
-
/* @__PURE__ */
|
|
4522
|
-
/* @__PURE__ */
|
|
4477
|
+
return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-ask-input ${p13}-tool-decided`, "data-testid": TID.toolDecision, children: [
|
|
4478
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-tool-decided-label`, children: strings.inputSubmitted }),
|
|
4479
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-tool-decided-value`, children: text })
|
|
4523
4480
|
] });
|
|
4524
4481
|
}
|
|
4525
4482
|
function summarizeOutput(output) {
|
|
@@ -4534,21 +4491,21 @@ function summarizeOutput(output) {
|
|
|
4534
4491
|
}
|
|
4535
4492
|
|
|
4536
4493
|
// src/ui/tool-chip.tsx
|
|
4537
|
-
import { jsx as
|
|
4494
|
+
import { jsx as jsx15, jsxs as jsxs12 } from "preact/jsx-runtime";
|
|
4538
4495
|
function ToolChip({ part, strings }) {
|
|
4539
|
-
const
|
|
4540
|
-
return /* @__PURE__ */
|
|
4541
|
-
/* @__PURE__ */
|
|
4496
|
+
const p33 = BRAND.cssPrefix;
|
|
4497
|
+
return /* @__PURE__ */ jsxs12("span", { class: `${p33}-tool-chip`, role: "status", children: [
|
|
4498
|
+
/* @__PURE__ */ jsxs12("span", { children: [
|
|
4542
4499
|
strings.usedTool,
|
|
4543
4500
|
":"
|
|
4544
4501
|
] }),
|
|
4545
|
-
/* @__PURE__ */
|
|
4502
|
+
/* @__PURE__ */ jsx15("strong", { children: part.toolName })
|
|
4546
4503
|
] });
|
|
4547
4504
|
}
|
|
4548
4505
|
|
|
4549
4506
|
// src/ui/message-bubble.tsx
|
|
4550
|
-
import { jsx as
|
|
4551
|
-
var
|
|
4507
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "preact/jsx-runtime";
|
|
4508
|
+
var p14 = BRAND.cssPrefix;
|
|
4552
4509
|
function MessageBubble({
|
|
4553
4510
|
message,
|
|
4554
4511
|
strings,
|
|
@@ -4571,9 +4528,9 @@ function MessageBubble({
|
|
|
4571
4528
|
const working = streaming && !hasAnswerText.value;
|
|
4572
4529
|
const showStreamDots = streaming && !bufferedHold && !(reasoningVisible.value && working);
|
|
4573
4530
|
const stamp = formatStamp(message.createdAt);
|
|
4574
|
-
return /* @__PURE__ */
|
|
4575
|
-
/* @__PURE__ */
|
|
4576
|
-
bufferedHold ? /* @__PURE__ */
|
|
4531
|
+
return /* @__PURE__ */ jsx16("div", { class: `${p14}-bubble-row`, "data-role": message.role, "data-testid": tid(TID.messageBubble, message.id), children: /* @__PURE__ */ jsxs13("div", { class: `${p14}-bubble-col`, children: [
|
|
4532
|
+
/* @__PURE__ */ jsxs13("div", { class: `${p14}-bubble`, children: [
|
|
4533
|
+
bufferedHold ? /* @__PURE__ */ jsx16(LoadingSpinner, { label: strings.loading }) : partList.map((part) => /* @__PURE__ */ jsx16(
|
|
4577
4534
|
PartView,
|
|
4578
4535
|
{
|
|
4579
4536
|
part,
|
|
@@ -4586,10 +4543,10 @@ function MessageBubble({
|
|
|
4586
4543
|
},
|
|
4587
4544
|
partKey(part)
|
|
4588
4545
|
)),
|
|
4589
|
-
showStreamDots && /* @__PURE__ */
|
|
4590
|
-
message.status === "error" && message.errorText ? /* @__PURE__ */
|
|
4546
|
+
showStreamDots && /* @__PURE__ */ jsx16(TypingDots, {}),
|
|
4547
|
+
message.status === "error" && message.errorText ? /* @__PURE__ */ jsx16("div", { class: `${p14}-error`, role: "alert", children: /* @__PURE__ */ jsx16("span", { children: message.errorText }) }) : null
|
|
4591
4548
|
] }),
|
|
4592
|
-
stamp ? /* @__PURE__ */
|
|
4549
|
+
stamp ? /* @__PURE__ */ jsx16("time", { class: `${p14}-bubble-time`, dateTime: stamp.iso, title: stamp.full, children: stamp.short }) : null
|
|
4593
4550
|
] }) });
|
|
4594
4551
|
}
|
|
4595
4552
|
function formatStamp(createdAt) {
|
|
@@ -4616,11 +4573,11 @@ function PartView({
|
|
|
4616
4573
|
}) {
|
|
4617
4574
|
switch (part.kind) {
|
|
4618
4575
|
case "text":
|
|
4619
|
-
return /* @__PURE__ */
|
|
4576
|
+
return /* @__PURE__ */ jsx16(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig });
|
|
4620
4577
|
case "reasoning":
|
|
4621
|
-
return showReasoning ? /* @__PURE__ */
|
|
4578
|
+
return showReasoning ? /* @__PURE__ */ jsx16(ReasoningView, { part, active, strings }) : null;
|
|
4622
4579
|
case "tool":
|
|
4623
|
-
return /* @__PURE__ */
|
|
4580
|
+
return /* @__PURE__ */ jsx16(
|
|
4624
4581
|
ToolPartView,
|
|
4625
4582
|
{
|
|
4626
4583
|
part,
|
|
@@ -4632,9 +4589,9 @@ function PartView({
|
|
|
4632
4589
|
);
|
|
4633
4590
|
case "file":
|
|
4634
4591
|
if (part.mediaType.startsWith("image/")) {
|
|
4635
|
-
return /* @__PURE__ */
|
|
4592
|
+
return /* @__PURE__ */ jsx16("img", { src: part.url, alt: "", loading: "lazy" });
|
|
4636
4593
|
}
|
|
4637
|
-
return /* @__PURE__ */
|
|
4594
|
+
return /* @__PURE__ */ jsx16("a", { href: part.url, target: "_blank", rel: "noreferrer noopener", children: part.url });
|
|
4638
4595
|
case "source":
|
|
4639
4596
|
return null;
|
|
4640
4597
|
}
|
|
@@ -4650,22 +4607,22 @@ function ToolPartView({
|
|
|
4650
4607
|
const hasApproval = useComputed4(() => part.approvalSig.value !== void 0);
|
|
4651
4608
|
if (tool?.humanInLoop) {
|
|
4652
4609
|
if (hasApproval.value || state.value === "awaiting-approval") {
|
|
4653
|
-
return /* @__PURE__ */
|
|
4610
|
+
return /* @__PURE__ */ jsx16(ToolApproval, { part, strings, active: interactive, onDecision: tool.onDecision });
|
|
4654
4611
|
}
|
|
4655
4612
|
if (isAskUserInputTool(part.toolName) || state.value === "awaiting-input") {
|
|
4656
|
-
return /* @__PURE__ */
|
|
4613
|
+
return /* @__PURE__ */ jsx16(ToolAskInput, { part, strings, active: interactive, onSubmit: tool.onResult });
|
|
4657
4614
|
}
|
|
4658
4615
|
}
|
|
4659
|
-
return showToolCalls ? /* @__PURE__ */
|
|
4616
|
+
return showToolCalls ? /* @__PURE__ */ jsx16(ToolChip, { part, strings }) : null;
|
|
4660
4617
|
}
|
|
4661
4618
|
function ReasoningView({
|
|
4662
4619
|
part,
|
|
4663
4620
|
active,
|
|
4664
4621
|
strings
|
|
4665
4622
|
}) {
|
|
4666
|
-
return /* @__PURE__ */
|
|
4667
|
-
/* @__PURE__ */
|
|
4668
|
-
/* @__PURE__ */
|
|
4623
|
+
return /* @__PURE__ */ jsxs13("details", { class: `${p14}-reasoning`, open: active, "data-active": active ? "true" : void 0, children: [
|
|
4624
|
+
/* @__PURE__ */ jsx16("summary", { class: `${p14}-reasoning-summary`, children: /* @__PURE__ */ jsx16("span", { class: `${p14}-reasoning-label`, children: active ? strings.thinking : strings.thoughts }) }),
|
|
4625
|
+
/* @__PURE__ */ jsx16("div", { class: `${p14}-reasoning-body`, children: /* @__PURE__ */ jsx16(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig }) })
|
|
4669
4626
|
] });
|
|
4670
4627
|
}
|
|
4671
4628
|
function partKey(part) {
|
|
@@ -4682,22 +4639,22 @@ function partKey(part) {
|
|
|
4682
4639
|
}
|
|
4683
4640
|
}
|
|
4684
4641
|
function TypingDots() {
|
|
4685
|
-
return /* @__PURE__ */
|
|
4686
|
-
/* @__PURE__ */
|
|
4687
|
-
/* @__PURE__ */
|
|
4688
|
-
/* @__PURE__ */
|
|
4642
|
+
return /* @__PURE__ */ jsxs13("span", { class: `${p14}-typing`, "aria-hidden": "true", children: [
|
|
4643
|
+
/* @__PURE__ */ jsx16("span", {}),
|
|
4644
|
+
/* @__PURE__ */ jsx16("span", {}),
|
|
4645
|
+
/* @__PURE__ */ jsx16("span", {})
|
|
4689
4646
|
] });
|
|
4690
4647
|
}
|
|
4691
4648
|
function LoadingSpinner({ label }) {
|
|
4692
|
-
return /* @__PURE__ */
|
|
4693
|
-
/* @__PURE__ */
|
|
4694
|
-
/* @__PURE__ */
|
|
4649
|
+
return /* @__PURE__ */ jsxs13("span", { class: `${p14}-loading`, role: "status", children: [
|
|
4650
|
+
/* @__PURE__ */ jsx16("span", { class: `${p14}-loading-spinner`, "aria-hidden": "true" }),
|
|
4651
|
+
/* @__PURE__ */ jsx16("span", { class: `${p14}-loading-label`, children: label })
|
|
4695
4652
|
] });
|
|
4696
4653
|
}
|
|
4697
4654
|
|
|
4698
4655
|
// src/ui/message-list.tsx
|
|
4699
|
-
import { jsx as
|
|
4700
|
-
var
|
|
4656
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "preact/jsx-runtime";
|
|
4657
|
+
var p15 = BRAND.cssPrefix;
|
|
4701
4658
|
var STICK_THRESHOLD = 120;
|
|
4702
4659
|
var DIVIDER_IDLE_MS = 1200;
|
|
4703
4660
|
function MessageList({
|
|
@@ -4708,10 +4665,7 @@ function MessageList({
|
|
|
4708
4665
|
showToolCalls,
|
|
4709
4666
|
loading,
|
|
4710
4667
|
idle,
|
|
4711
|
-
tool
|
|
4712
|
-
inlineForm,
|
|
4713
|
-
onFormSubmit,
|
|
4714
|
-
onFormSkip
|
|
4668
|
+
tool
|
|
4715
4669
|
}) {
|
|
4716
4670
|
const ref = useRef5(null);
|
|
4717
4671
|
const messages = useComputed5(() => messagesSig.value);
|
|
@@ -4796,12 +4750,12 @@ function MessageList({
|
|
|
4796
4750
|
const day = dayKey(m.createdAt);
|
|
4797
4751
|
if (day && day !== prevDay) {
|
|
4798
4752
|
rows.push(
|
|
4799
|
-
/* @__PURE__ */
|
|
4753
|
+
/* @__PURE__ */ jsx17("div", { class: `${p15}-date-divider`, children: /* @__PURE__ */ jsx17("span", { class: `${p15}-date-pill`, title: fullDate(m.createdAt), children: dayLabel(m.createdAt, strings) }) }, `day:${day}`)
|
|
4800
4754
|
);
|
|
4801
4755
|
prevDay = day;
|
|
4802
4756
|
}
|
|
4803
4757
|
rows.push(
|
|
4804
|
-
/* @__PURE__ */
|
|
4758
|
+
/* @__PURE__ */ jsx17(
|
|
4805
4759
|
MessageBubble,
|
|
4806
4760
|
{
|
|
4807
4761
|
message: m,
|
|
@@ -4816,33 +4770,32 @@ function MessageList({
|
|
|
4816
4770
|
)
|
|
4817
4771
|
);
|
|
4818
4772
|
}
|
|
4819
|
-
return /* @__PURE__ */
|
|
4820
|
-
/* @__PURE__ */
|
|
4773
|
+
return /* @__PURE__ */ jsxs14("div", { class: `${p15}-list-wrap`, children: [
|
|
4774
|
+
/* @__PURE__ */ jsxs14(
|
|
4821
4775
|
"div",
|
|
4822
4776
|
{
|
|
4823
4777
|
ref,
|
|
4824
|
-
class: `${
|
|
4778
|
+
class: `${p15}-list`,
|
|
4825
4779
|
role: "log",
|
|
4826
4780
|
"aria-live": "polite",
|
|
4827
4781
|
"aria-relevant": "additions text",
|
|
4828
4782
|
"data-scrolling": scrolling ? "true" : void 0,
|
|
4829
4783
|
children: [
|
|
4830
|
-
loading && messages.value.length === 0 ? /* @__PURE__ */
|
|
4831
|
-
rows
|
|
4832
|
-
inlineForm && onFormSubmit && onFormSkip ? /* @__PURE__ */ jsx18(FormCard, { form: inlineForm, strings, onSubmit: onFormSubmit, onSkip: onFormSkip }) : null
|
|
4784
|
+
loading && messages.value.length === 0 ? /* @__PURE__ */ jsx17("div", { class: `${p15}-list-loading`, role: "status", children: strings.messagesLoading }) : null,
|
|
4785
|
+
rows
|
|
4833
4786
|
]
|
|
4834
4787
|
}
|
|
4835
4788
|
),
|
|
4836
|
-
showJump ? /* @__PURE__ */
|
|
4789
|
+
showJump ? /* @__PURE__ */ jsx17(
|
|
4837
4790
|
"button",
|
|
4838
4791
|
{
|
|
4839
4792
|
type: "button",
|
|
4840
|
-
class: `${
|
|
4793
|
+
class: `${p15}-jump`,
|
|
4841
4794
|
onClick: jumpToBottom,
|
|
4842
4795
|
"aria-label": strings.scrollToBottom,
|
|
4843
4796
|
title: strings.scrollToBottom,
|
|
4844
4797
|
"data-testid": TID.scrollToBottom,
|
|
4845
|
-
children: /* @__PURE__ */
|
|
4798
|
+
children: /* @__PURE__ */ jsx17(ChevronDownIcon, {})
|
|
4846
4799
|
}
|
|
4847
4800
|
) : null
|
|
4848
4801
|
] });
|
|
@@ -4901,7 +4854,7 @@ function startOfDay(ms) {
|
|
|
4901
4854
|
}
|
|
4902
4855
|
|
|
4903
4856
|
// src/ui/conversation-list.tsx
|
|
4904
|
-
import { Fragment as Fragment2, jsx as
|
|
4857
|
+
import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs15 } from "preact/jsx-runtime";
|
|
4905
4858
|
var log11 = logger.scope("history");
|
|
4906
4859
|
var BUCKET_TO_STRING = {
|
|
4907
4860
|
today: "dateToday",
|
|
@@ -4910,7 +4863,7 @@ var BUCKET_TO_STRING = {
|
|
|
4910
4863
|
older: "dateOlder"
|
|
4911
4864
|
};
|
|
4912
4865
|
function ConversationList({ transport, strings, visitorId, onSelect, onNewChat }) {
|
|
4913
|
-
const
|
|
4866
|
+
const p33 = BRAND.cssPrefix;
|
|
4914
4867
|
const [state, setState] = useState7("loading");
|
|
4915
4868
|
const [sessions, setChats] = useState7([]);
|
|
4916
4869
|
useEffect9(() => {
|
|
@@ -4928,38 +4881,38 @@ function ConversationList({ transport, strings, visitorId, onSelect, onNewChat }
|
|
|
4928
4881
|
cancelled = true;
|
|
4929
4882
|
};
|
|
4930
4883
|
}, [transport, visitorId]);
|
|
4931
|
-
const newChatButton = onNewChat ? /* @__PURE__ */
|
|
4932
|
-
/* @__PURE__ */
|
|
4884
|
+
const newChatButton = onNewChat ? /* @__PURE__ */ jsx18("div", { class: `${p33}-history-footer`, children: /* @__PURE__ */ jsxs15("button", { type: "button", class: `${p33}-history-new`, onClick: onNewChat, "data-testid": TID.sidebarNewChat, children: [
|
|
4885
|
+
/* @__PURE__ */ jsx18(PlusIcon, {}),
|
|
4933
4886
|
strings.historyNewChat
|
|
4934
4887
|
] }) }) : null;
|
|
4935
4888
|
if (state === "loading") {
|
|
4936
|
-
return /* @__PURE__ */
|
|
4937
|
-
/* @__PURE__ */
|
|
4889
|
+
return /* @__PURE__ */ jsxs15(Fragment2, { children: [
|
|
4890
|
+
/* @__PURE__ */ jsx18("div", { class: `${p33}-history-empty`, children: strings.historyLoading }),
|
|
4938
4891
|
newChatButton
|
|
4939
4892
|
] });
|
|
4940
4893
|
}
|
|
4941
4894
|
if (state === "error" || sessions.length === 0) {
|
|
4942
|
-
return /* @__PURE__ */
|
|
4943
|
-
/* @__PURE__ */
|
|
4895
|
+
return /* @__PURE__ */ jsxs15(Fragment2, { children: [
|
|
4896
|
+
/* @__PURE__ */ jsx18("div", { class: `${p33}-history-empty`, children: strings.historyEmpty }),
|
|
4944
4897
|
newChatButton
|
|
4945
4898
|
] });
|
|
4946
4899
|
}
|
|
4947
4900
|
const groups = groupByBucket(Date.now(), sessions);
|
|
4948
|
-
return /* @__PURE__ */
|
|
4949
|
-
/* @__PURE__ */
|
|
4950
|
-
/* @__PURE__ */
|
|
4951
|
-
group.sessions.map((chat) => /* @__PURE__ */
|
|
4901
|
+
return /* @__PURE__ */ jsxs15(Fragment2, { children: [
|
|
4902
|
+
/* @__PURE__ */ jsx18("div", { class: `${p33}-history`, role: "list", children: groups.map((group) => /* @__PURE__ */ jsxs15("div", { class: `${p33}-history-group`, children: [
|
|
4903
|
+
/* @__PURE__ */ jsx18("div", { class: `${p33}-history-heading`, children: strings[BUCKET_TO_STRING[group.bucket]] }),
|
|
4904
|
+
group.sessions.map((chat) => /* @__PURE__ */ jsxs15(
|
|
4952
4905
|
"button",
|
|
4953
4906
|
{
|
|
4954
4907
|
type: "button",
|
|
4955
4908
|
role: "listitem",
|
|
4956
|
-
class: `${
|
|
4909
|
+
class: `${p33}-history-item`,
|
|
4957
4910
|
onClick: () => onSelect(chat),
|
|
4958
4911
|
"data-closed": chat.canContinue ? void 0 : "true",
|
|
4959
4912
|
"data-testid": tid(TID.historyItem, chat.sessionId),
|
|
4960
4913
|
children: [
|
|
4961
|
-
/* @__PURE__ */
|
|
4962
|
-
chat.preview ? /* @__PURE__ */
|
|
4914
|
+
/* @__PURE__ */ jsx18("span", { class: `${p33}-history-title`, children: chat.title }),
|
|
4915
|
+
chat.preview ? /* @__PURE__ */ jsx18("span", { class: `${p33}-history-preview`, children: chat.preview }) : null
|
|
4963
4916
|
]
|
|
4964
4917
|
},
|
|
4965
4918
|
chat.sessionId
|
|
@@ -4970,21 +4923,21 @@ function ConversationList({ transport, strings, visitorId, onSelect, onNewChat }
|
|
|
4970
4923
|
}
|
|
4971
4924
|
|
|
4972
4925
|
// src/ui/chat-history-pane.tsx
|
|
4973
|
-
import { jsx as
|
|
4926
|
+
import { jsx as jsx19 } from "preact/jsx-runtime";
|
|
4974
4927
|
function ChatHistoryPane(props2) {
|
|
4975
|
-
return /* @__PURE__ */
|
|
4928
|
+
return /* @__PURE__ */ jsx19(ConversationList, { ...props2 });
|
|
4976
4929
|
}
|
|
4977
4930
|
|
|
4978
4931
|
// src/ui/suggestions.tsx
|
|
4979
|
-
import { jsx as
|
|
4980
|
-
var
|
|
4932
|
+
import { jsx as jsx20 } from "preact/jsx-runtime";
|
|
4933
|
+
var p16 = BRAND.cssPrefix;
|
|
4981
4934
|
function Suggestions({ suggestions, onPick }) {
|
|
4982
4935
|
if (suggestions.length === 0) return null;
|
|
4983
|
-
return /* @__PURE__ */
|
|
4936
|
+
return /* @__PURE__ */ jsx20("div", { class: `${p16}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx20(
|
|
4984
4937
|
"button",
|
|
4985
4938
|
{
|
|
4986
4939
|
type: "button",
|
|
4987
|
-
class: `${
|
|
4940
|
+
class: `${p16}-suggestion`,
|
|
4988
4941
|
onClick: () => onPick(s),
|
|
4989
4942
|
"data-testid": tid(TID.suggestion, i),
|
|
4990
4943
|
children: s.label
|
|
@@ -4994,8 +4947,8 @@ function Suggestions({ suggestions, onPick }) {
|
|
|
4994
4947
|
}
|
|
4995
4948
|
|
|
4996
4949
|
// src/ui/panel.tsx
|
|
4997
|
-
import { Fragment as Fragment3, jsx as
|
|
4998
|
-
var
|
|
4950
|
+
import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs16 } from "preact/jsx-runtime";
|
|
4951
|
+
var p17 = BRAND.cssPrefix;
|
|
4999
4952
|
function Panel(props2) {
|
|
5000
4953
|
const { options, onClose } = props2;
|
|
5001
4954
|
const s = options.strings;
|
|
@@ -5019,18 +4972,18 @@ function Panel(props2) {
|
|
|
5019
4972
|
}, []);
|
|
5020
4973
|
const { visible: dragOver } = useFileDrop({ containerRef, onDrop: onDropItems });
|
|
5021
4974
|
useDragMove(containerRef.current, options.mode === "modal");
|
|
5022
|
-
return /* @__PURE__ */
|
|
4975
|
+
return /* @__PURE__ */ jsxs16(
|
|
5023
4976
|
"div",
|
|
5024
4977
|
{
|
|
5025
4978
|
ref: containerRef,
|
|
5026
|
-
class: `${
|
|
4979
|
+
class: `${p17}-panel`,
|
|
5027
4980
|
role: "dialog",
|
|
5028
4981
|
"aria-modal": "false",
|
|
5029
4982
|
"aria-label": s.panelTitle,
|
|
5030
4983
|
style: { position: "relative" },
|
|
5031
4984
|
"data-testid": TID.panel,
|
|
5032
4985
|
children: [
|
|
5033
|
-
/* @__PURE__ */
|
|
4986
|
+
/* @__PURE__ */ jsx21(
|
|
5034
4987
|
PanelContent,
|
|
5035
4988
|
{
|
|
5036
4989
|
...props2,
|
|
@@ -5039,7 +4992,7 @@ function Panel(props2) {
|
|
|
5039
4992
|
composerAttachApiRef
|
|
5040
4993
|
}
|
|
5041
4994
|
),
|
|
5042
|
-
/* @__PURE__ */
|
|
4995
|
+
/* @__PURE__ */ jsx21(PoweredByBar, { poweredBy: props2.options.poweredBy })
|
|
5043
4996
|
]
|
|
5044
4997
|
}
|
|
5045
4998
|
);
|
|
@@ -5070,8 +5023,7 @@ function PanelContent(props2) {
|
|
|
5070
5023
|
onSend,
|
|
5071
5024
|
onStop,
|
|
5072
5025
|
onSuggestion,
|
|
5073
|
-
|
|
5074
|
-
inlineForm,
|
|
5026
|
+
activeForm,
|
|
5075
5027
|
onFormSubmit,
|
|
5076
5028
|
onFormSkip,
|
|
5077
5029
|
tool,
|
|
@@ -5081,12 +5033,12 @@ function PanelContent(props2) {
|
|
|
5081
5033
|
} = props2;
|
|
5082
5034
|
const s = options.strings;
|
|
5083
5035
|
let composerArea;
|
|
5084
|
-
if (
|
|
5085
|
-
composerArea = /* @__PURE__ */
|
|
5036
|
+
if (activeForm) {
|
|
5037
|
+
composerArea = /* @__PURE__ */ jsx21(FormGate, { form: activeForm, strings: s, onSubmit: onFormSubmit, onSkip: onFormSkip });
|
|
5086
5038
|
} else if (canSend) {
|
|
5087
|
-
composerArea = /* @__PURE__ */
|
|
5088
|
-
/* @__PURE__ */
|
|
5089
|
-
/* @__PURE__ */
|
|
5039
|
+
composerArea = /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
5040
|
+
/* @__PURE__ */ jsx21(Suggestions, { suggestions, onPick: onSuggestion }),
|
|
5041
|
+
/* @__PURE__ */ jsx21(
|
|
5090
5042
|
Composer,
|
|
5091
5043
|
{
|
|
5092
5044
|
options,
|
|
@@ -5101,10 +5053,10 @@ function PanelContent(props2) {
|
|
|
5101
5053
|
)
|
|
5102
5054
|
] });
|
|
5103
5055
|
} else {
|
|
5104
|
-
composerArea = /* @__PURE__ */
|
|
5056
|
+
composerArea = /* @__PURE__ */ jsx21(ReadOnlyBanner, { label: s.chatClosed, ctaLabel: s.startNewConversation, onNewChat: onClear });
|
|
5105
5057
|
}
|
|
5106
|
-
return /* @__PURE__ */
|
|
5107
|
-
view === "history" ? /* @__PURE__ */
|
|
5058
|
+
return /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
5059
|
+
view === "history" ? /* @__PURE__ */ jsx21(
|
|
5108
5060
|
HistoryHeader,
|
|
5109
5061
|
{
|
|
5110
5062
|
strings: s,
|
|
@@ -5112,22 +5064,22 @@ function PanelContent(props2) {
|
|
|
5112
5064
|
onClose,
|
|
5113
5065
|
showClose: canShowClose(options.mode, panelSize, options.actions)
|
|
5114
5066
|
}
|
|
5115
|
-
) : /* @__PURE__ */
|
|
5116
|
-
onBack ? /* @__PURE__ */
|
|
5067
|
+
) : /* @__PURE__ */ jsxs16("header", { class: `${p17}-header`, "data-testid": TID.panelHeader, children: [
|
|
5068
|
+
onBack ? /* @__PURE__ */ jsx21(
|
|
5117
5069
|
"button",
|
|
5118
5070
|
{
|
|
5119
5071
|
type: "button",
|
|
5120
|
-
class: `${
|
|
5072
|
+
class: `${p17}-icon-btn`,
|
|
5121
5073
|
onClick: onBack,
|
|
5122
5074
|
"aria-label": s.moduleBack,
|
|
5123
5075
|
title: s.moduleBack,
|
|
5124
|
-
children: /* @__PURE__ */
|
|
5076
|
+
children: /* @__PURE__ */ jsx21(BackIcon, {})
|
|
5125
5077
|
}
|
|
5126
5078
|
) : null,
|
|
5127
|
-
agent ? /* @__PURE__ */
|
|
5128
|
-
/* @__PURE__ */
|
|
5079
|
+
agent ? /* @__PURE__ */ jsx21(AgentBadge, { agent }) : /* @__PURE__ */ jsx21("h1", { children: s.panelTitle }),
|
|
5080
|
+
/* @__PURE__ */ jsx21(HeaderActions, { panelProps: props2, variant: "chat" })
|
|
5129
5081
|
] }),
|
|
5130
|
-
view === "history" ? /* @__PURE__ */
|
|
5082
|
+
view === "history" ? /* @__PURE__ */ jsx21(
|
|
5131
5083
|
ChatHistoryPane,
|
|
5132
5084
|
{
|
|
5133
5085
|
transport,
|
|
@@ -5136,9 +5088,9 @@ function PanelContent(props2) {
|
|
|
5136
5088
|
onSelect: (chat) => onSelectHistoryChat(chat.sessionId),
|
|
5137
5089
|
onNewChat
|
|
5138
5090
|
}
|
|
5139
|
-
) : /* @__PURE__ */
|
|
5140
|
-
/* @__PURE__ */
|
|
5141
|
-
/* @__PURE__ */
|
|
5091
|
+
) : /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
5092
|
+
/* @__PURE__ */ jsx21(DropZone, { visible: dragOver, strings: s }),
|
|
5093
|
+
/* @__PURE__ */ jsx21(
|
|
5142
5094
|
MessageList,
|
|
5143
5095
|
{
|
|
5144
5096
|
messagesSig,
|
|
@@ -5148,16 +5100,13 @@ function PanelContent(props2) {
|
|
|
5148
5100
|
showToolCalls: options.showToolCalls,
|
|
5149
5101
|
loading: loadingMessages,
|
|
5150
5102
|
idle: !isStreaming,
|
|
5151
|
-
tool
|
|
5152
|
-
inlineForm,
|
|
5153
|
-
onFormSubmit,
|
|
5154
|
-
onFormSkip
|
|
5103
|
+
tool
|
|
5155
5104
|
}
|
|
5156
5105
|
),
|
|
5157
5106
|
composerArea,
|
|
5158
|
-
/* @__PURE__ */
|
|
5107
|
+
/* @__PURE__ */ jsx21(ComposerFooter, { disclaimer: options.composerDisclaimer })
|
|
5159
5108
|
] }),
|
|
5160
|
-
options.size.resize?.enabled ? /* @__PURE__ */
|
|
5109
|
+
options.size.resize?.enabled ? /* @__PURE__ */ jsx21(
|
|
5161
5110
|
ResizeGrip,
|
|
5162
5111
|
{
|
|
5163
5112
|
panelEl: containerEl,
|
|
@@ -5176,55 +5125,55 @@ function HistoryHeader({
|
|
|
5176
5125
|
onClose,
|
|
5177
5126
|
showClose
|
|
5178
5127
|
}) {
|
|
5179
|
-
return /* @__PURE__ */
|
|
5180
|
-
/* @__PURE__ */
|
|
5128
|
+
return /* @__PURE__ */ jsxs16("header", { class: `${p17}-header`, children: [
|
|
5129
|
+
/* @__PURE__ */ jsx21(
|
|
5181
5130
|
"button",
|
|
5182
5131
|
{
|
|
5183
5132
|
type: "button",
|
|
5184
|
-
class: `${
|
|
5133
|
+
class: `${p17}-icon-btn`,
|
|
5185
5134
|
onClick: onBack,
|
|
5186
5135
|
"aria-label": strings.historyBack,
|
|
5187
5136
|
title: strings.historyBack,
|
|
5188
|
-
children: /* @__PURE__ */
|
|
5137
|
+
children: /* @__PURE__ */ jsx21(BackIcon, {})
|
|
5189
5138
|
}
|
|
5190
5139
|
),
|
|
5191
|
-
/* @__PURE__ */
|
|
5192
|
-
showClose ? /* @__PURE__ */
|
|
5140
|
+
/* @__PURE__ */ jsx21("h1", { children: strings.historyTitle }),
|
|
5141
|
+
showClose ? /* @__PURE__ */ jsx21(
|
|
5193
5142
|
"button",
|
|
5194
5143
|
{
|
|
5195
5144
|
type: "button",
|
|
5196
|
-
class: `${
|
|
5145
|
+
class: `${p17}-icon-btn`,
|
|
5197
5146
|
onClick: onClose,
|
|
5198
5147
|
"aria-label": strings.close,
|
|
5199
5148
|
title: strings.close,
|
|
5200
|
-
children: /* @__PURE__ */
|
|
5149
|
+
children: /* @__PURE__ */ jsx21(CloseIcon, {})
|
|
5201
5150
|
}
|
|
5202
5151
|
) : null
|
|
5203
5152
|
] });
|
|
5204
5153
|
}
|
|
5205
5154
|
function ReadOnlyBanner({ label, ctaLabel, onNewChat }) {
|
|
5206
|
-
return /* @__PURE__ */
|
|
5207
|
-
/* @__PURE__ */
|
|
5208
|
-
/* @__PURE__ */
|
|
5155
|
+
return /* @__PURE__ */ jsxs16("div", { class: `${p17}-readonly-banner`, role: "note", children: [
|
|
5156
|
+
/* @__PURE__ */ jsx21("span", { class: `${p17}-readonly-label`, children: label }),
|
|
5157
|
+
/* @__PURE__ */ jsx21("button", { type: "button", class: `${p17}-readonly-cta`, onClick: onNewChat, children: ctaLabel })
|
|
5209
5158
|
] });
|
|
5210
5159
|
}
|
|
5211
5160
|
function ComposerFooter({ disclaimer }) {
|
|
5212
5161
|
if (!disclaimer) return null;
|
|
5213
|
-
return /* @__PURE__ */
|
|
5162
|
+
return /* @__PURE__ */ jsx21("div", { class: `${p17}-composer-footer`, children: /* @__PURE__ */ jsx21("div", { class: `${p17}-disclaimer`, children: disclaimer }) });
|
|
5214
5163
|
}
|
|
5215
5164
|
function PoweredByBar({ poweredBy }) {
|
|
5216
5165
|
if (!poweredBy) return null;
|
|
5217
|
-
return /* @__PURE__ */
|
|
5166
|
+
return /* @__PURE__ */ jsx21("div", { class: `${p17}-poweredby-bar`, children: /* @__PURE__ */ jsx21(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
|
|
5218
5167
|
}
|
|
5219
5168
|
function PoweredBy({ logoUrl, text, href }) {
|
|
5220
|
-
const inner = /* @__PURE__ */
|
|
5221
|
-
logoUrl ? /* @__PURE__ */
|
|
5222
|
-
text ? /* @__PURE__ */
|
|
5169
|
+
const inner = /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
5170
|
+
logoUrl ? /* @__PURE__ */ jsx21("img", { class: `${p17}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
|
|
5171
|
+
text ? /* @__PURE__ */ jsx21("span", { children: text }) : null
|
|
5223
5172
|
] });
|
|
5224
5173
|
if (href) {
|
|
5225
|
-
return /* @__PURE__ */
|
|
5174
|
+
return /* @__PURE__ */ jsx21("a", { class: `${p17}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
|
|
5226
5175
|
}
|
|
5227
|
-
return /* @__PURE__ */
|
|
5176
|
+
return /* @__PURE__ */ jsx21("span", { class: `${p17}-poweredby`, children: inner });
|
|
5228
5177
|
}
|
|
5229
5178
|
|
|
5230
5179
|
// src/ui/form/form-controller.ts
|
|
@@ -5299,34 +5248,34 @@ function whenPasses(form, d) {
|
|
|
5299
5248
|
}
|
|
5300
5249
|
|
|
5301
5250
|
// src/ui/sidebar.tsx
|
|
5302
|
-
import { Fragment as Fragment4, jsx as
|
|
5251
|
+
import { Fragment as Fragment4, jsx as jsx22, jsxs as jsxs17 } from "preact/jsx-runtime";
|
|
5303
5252
|
function Sidebar(props2) {
|
|
5304
|
-
const
|
|
5253
|
+
const p33 = BRAND.cssPrefix;
|
|
5305
5254
|
const { site, blocks, strings, collapsed } = props2;
|
|
5306
5255
|
const navigation = blocks?.navigation ?? [];
|
|
5307
5256
|
const linkCards = blocks?.linkCards ?? [];
|
|
5308
5257
|
const toggleLabel = collapsed ? strings.expandSidebar : strings.collapseSidebar;
|
|
5309
|
-
return /* @__PURE__ */
|
|
5310
|
-
/* @__PURE__ */
|
|
5311
|
-
/* @__PURE__ */
|
|
5312
|
-
/* @__PURE__ */
|
|
5258
|
+
return /* @__PURE__ */ jsxs17("aside", { class: `${p33}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
|
|
5259
|
+
/* @__PURE__ */ jsxs17("div", { class: `${p33}-sidebar-header`, children: [
|
|
5260
|
+
/* @__PURE__ */ jsx22(SidebarBrand, { site }),
|
|
5261
|
+
/* @__PURE__ */ jsx22(
|
|
5313
5262
|
"button",
|
|
5314
5263
|
{
|
|
5315
5264
|
type: "button",
|
|
5316
|
-
class: `${
|
|
5265
|
+
class: `${p33}-sidebar-toggle`,
|
|
5317
5266
|
"aria-label": toggleLabel,
|
|
5318
5267
|
"aria-expanded": collapsed ? "false" : "true",
|
|
5319
5268
|
title: toggleLabel,
|
|
5320
5269
|
onClick: props2.onToggleCollapsed,
|
|
5321
5270
|
"data-testid": TID.sidebarToggle,
|
|
5322
|
-
children: /* @__PURE__ */
|
|
5271
|
+
children: /* @__PURE__ */ jsx22(SidebarToggleIcon, { collapsed })
|
|
5323
5272
|
}
|
|
5324
5273
|
)
|
|
5325
5274
|
] }),
|
|
5326
|
-
collapsed ? null : /* @__PURE__ */
|
|
5327
|
-
navigation.length > 0 ? /* @__PURE__ */
|
|
5328
|
-
linkCards.length > 0 ? /* @__PURE__ */
|
|
5329
|
-
props2.showConversations ? /* @__PURE__ */
|
|
5275
|
+
collapsed ? null : /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
|
5276
|
+
navigation.length > 0 ? /* @__PURE__ */ jsx22("nav", { class: `${p33}-sidebar-section`, "data-section": "navigation", children: /* @__PURE__ */ jsx22(SidebarNav, { items: navigation }) }) : null,
|
|
5277
|
+
linkCards.length > 0 ? /* @__PURE__ */ jsx22("div", { class: `${p33}-sidebar-section`, "data-section": "link-cards", children: /* @__PURE__ */ jsx22(SidebarCards, { items: linkCards }) }) : null,
|
|
5278
|
+
props2.showConversations ? /* @__PURE__ */ jsx22("div", { class: `${p33}-sidebar-conversations`, children: /* @__PURE__ */ jsx22(
|
|
5330
5279
|
ConversationList,
|
|
5331
5280
|
{
|
|
5332
5281
|
transport: props2.transport,
|
|
@@ -5340,18 +5289,18 @@ function Sidebar(props2) {
|
|
|
5340
5289
|
] });
|
|
5341
5290
|
}
|
|
5342
5291
|
function SidebarBrand({ site }) {
|
|
5343
|
-
const
|
|
5292
|
+
const p33 = BRAND.cssPrefix;
|
|
5344
5293
|
if (site?.logo?.url) {
|
|
5345
5294
|
const alt = site.logo.alt ?? site.title ?? "Logo";
|
|
5346
|
-
return /* @__PURE__ */
|
|
5347
|
-
site.logoDark?.url ? /* @__PURE__ */
|
|
5348
|
-
/* @__PURE__ */
|
|
5295
|
+
return /* @__PURE__ */ jsxs17("picture", { children: [
|
|
5296
|
+
site.logoDark?.url ? /* @__PURE__ */ jsx22("source", { srcset: site.logoDark.url, media: "(prefers-color-scheme: dark)" }) : null,
|
|
5297
|
+
/* @__PURE__ */ jsx22("img", { class: `${p33}-sidebar-logo`, src: site.logo.url, alt })
|
|
5349
5298
|
] });
|
|
5350
5299
|
}
|
|
5351
|
-
return /* @__PURE__ */
|
|
5300
|
+
return /* @__PURE__ */ jsx22("div", { class: `${p33}-sidebar-title`, children: site?.title ?? BRAND.name });
|
|
5352
5301
|
}
|
|
5353
5302
|
function SidebarToggleIcon({ collapsed }) {
|
|
5354
|
-
return /* @__PURE__ */
|
|
5303
|
+
return /* @__PURE__ */ jsx22(
|
|
5355
5304
|
"svg",
|
|
5356
5305
|
{
|
|
5357
5306
|
width: "16",
|
|
@@ -5361,38 +5310,38 @@ function SidebarToggleIcon({ collapsed }) {
|
|
|
5361
5310
|
stroke: "currentColor",
|
|
5362
5311
|
"stroke-width": "2",
|
|
5363
5312
|
"aria-hidden": "true",
|
|
5364
|
-
children: collapsed ? /* @__PURE__ */
|
|
5313
|
+
children: collapsed ? /* @__PURE__ */ jsx22("polyline", { points: "9 6 15 12 9 18" }) : /* @__PURE__ */ jsx22("polyline", { points: "15 6 9 12 15 18" })
|
|
5365
5314
|
}
|
|
5366
5315
|
);
|
|
5367
5316
|
}
|
|
5368
5317
|
function SidebarNav({ items }) {
|
|
5369
|
-
const
|
|
5370
|
-
return /* @__PURE__ */
|
|
5318
|
+
const p33 = BRAND.cssPrefix;
|
|
5319
|
+
return /* @__PURE__ */ jsx22("ul", { class: `${p33}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx22("li", { children: /* @__PURE__ */ jsxs17(
|
|
5371
5320
|
"a",
|
|
5372
5321
|
{
|
|
5373
|
-
class: `${
|
|
5322
|
+
class: `${p33}-sidebar-nav-item`,
|
|
5374
5323
|
href: item.href,
|
|
5375
5324
|
target: item.href ? "_blank" : void 0,
|
|
5376
5325
|
rel: item.href ? "noreferrer" : void 0,
|
|
5377
5326
|
children: [
|
|
5378
|
-
item.icon ? /* @__PURE__ */
|
|
5379
|
-
/* @__PURE__ */
|
|
5327
|
+
item.icon ? /* @__PURE__ */ jsx22("span", { class: `${p33}-sidebar-nav-icon`, "data-icon": item.icon }) : null,
|
|
5328
|
+
/* @__PURE__ */ jsx22("span", { class: `${p33}-sidebar-nav-label`, children: item.label })
|
|
5380
5329
|
]
|
|
5381
5330
|
}
|
|
5382
5331
|
) }, item.id ?? item.label)) });
|
|
5383
5332
|
}
|
|
5384
5333
|
function SidebarCards({ items }) {
|
|
5385
|
-
const
|
|
5386
|
-
return /* @__PURE__ */
|
|
5334
|
+
const p33 = BRAND.cssPrefix;
|
|
5335
|
+
return /* @__PURE__ */ jsx22("div", { class: `${p33}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs17(
|
|
5387
5336
|
"a",
|
|
5388
5337
|
{
|
|
5389
|
-
class: `${
|
|
5338
|
+
class: `${p33}-sidebar-card`,
|
|
5390
5339
|
href: item.href,
|
|
5391
5340
|
target: item.href ? "_blank" : void 0,
|
|
5392
5341
|
rel: item.href ? "noreferrer" : void 0,
|
|
5393
5342
|
children: [
|
|
5394
|
-
/* @__PURE__ */
|
|
5395
|
-
item.description ? /* @__PURE__ */
|
|
5343
|
+
/* @__PURE__ */ jsx22("div", { class: `${p33}-sidebar-card-label`, children: item.label }),
|
|
5344
|
+
item.description ? /* @__PURE__ */ jsx22("div", { class: `${p33}-sidebar-card-desc`, children: item.description }) : null
|
|
5396
5345
|
]
|
|
5397
5346
|
},
|
|
5398
5347
|
item.id ?? item.label
|
|
@@ -5400,11 +5349,11 @@ function SidebarCards({ items }) {
|
|
|
5400
5349
|
}
|
|
5401
5350
|
|
|
5402
5351
|
// src/ui/page-shell.tsx
|
|
5403
|
-
import { jsx as
|
|
5404
|
-
var
|
|
5352
|
+
import { jsx as jsx23, jsxs as jsxs18 } from "preact/jsx-runtime";
|
|
5353
|
+
var p18 = BRAND.cssPrefix;
|
|
5405
5354
|
function PageShell(props2) {
|
|
5406
|
-
return /* @__PURE__ */
|
|
5407
|
-
/* @__PURE__ */
|
|
5355
|
+
return /* @__PURE__ */ jsxs18("main", { class: `${p18}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
|
|
5356
|
+
/* @__PURE__ */ jsx23(
|
|
5408
5357
|
Sidebar,
|
|
5409
5358
|
{
|
|
5410
5359
|
site: props2.site,
|
|
@@ -5419,7 +5368,7 @@ function PageShell(props2) {
|
|
|
5419
5368
|
onToggleCollapsed: props2.onToggleSidebarCollapsed
|
|
5420
5369
|
}
|
|
5421
5370
|
),
|
|
5422
|
-
/* @__PURE__ */
|
|
5371
|
+
/* @__PURE__ */ jsx23("section", { class: `${p18}-page-chat`, "aria-label": "Chat", children: props2.children })
|
|
5423
5372
|
] });
|
|
5424
5373
|
}
|
|
5425
5374
|
|
|
@@ -5469,80 +5418,80 @@ var chatLayout = {
|
|
|
5469
5418
|
import { useEffect as useEffect11, useMemo as useMemo2, useState as useState8 } from "preact/hooks";
|
|
5470
5419
|
|
|
5471
5420
|
// src/ui/back-header.tsx
|
|
5472
|
-
import { jsx as
|
|
5473
|
-
var
|
|
5421
|
+
import { jsx as jsx24, jsxs as jsxs19 } from "preact/jsx-runtime";
|
|
5422
|
+
var p19 = BRAND.cssPrefix;
|
|
5474
5423
|
function TitleBar({ title, actions }) {
|
|
5475
|
-
return /* @__PURE__ */
|
|
5476
|
-
/* @__PURE__ */
|
|
5477
|
-
/* @__PURE__ */
|
|
5478
|
-
actions ?? /* @__PURE__ */
|
|
5424
|
+
return /* @__PURE__ */ jsxs19("header", { class: `${p19}-back-header`, "data-variant": "title", children: [
|
|
5425
|
+
/* @__PURE__ */ jsx24("span", { class: `${p19}-back-spacer`, "aria-hidden": "true" }),
|
|
5426
|
+
/* @__PURE__ */ jsx24("h1", { class: `${p19}-back-title`, children: title }),
|
|
5427
|
+
actions ?? /* @__PURE__ */ jsx24("span", { class: `${p19}-back-spacer`, "aria-hidden": "true" })
|
|
5479
5428
|
] });
|
|
5480
5429
|
}
|
|
5481
5430
|
function BackHeader({ title, backLabel, onBack, actions, testid }) {
|
|
5482
|
-
return /* @__PURE__ */
|
|
5483
|
-
/* @__PURE__ */
|
|
5484
|
-
/* @__PURE__ */
|
|
5485
|
-
actions ?? /* @__PURE__ */
|
|
5431
|
+
return /* @__PURE__ */ jsxs19("header", { class: `${p19}-back-header`, "data-testid": testid, children: [
|
|
5432
|
+
/* @__PURE__ */ jsx24("button", { type: "button", class: `${p19}-icon-btn`, onClick: onBack, "aria-label": backLabel, title: backLabel, children: /* @__PURE__ */ jsx24(BackIcon, {}) }),
|
|
5433
|
+
/* @__PURE__ */ jsx24("h1", { class: `${p19}-back-title`, children: title }),
|
|
5434
|
+
actions ?? /* @__PURE__ */ jsx24("span", { class: `${p19}-back-spacer`, "aria-hidden": "true" })
|
|
5486
5435
|
] });
|
|
5487
5436
|
}
|
|
5488
5437
|
|
|
5489
5438
|
// src/ui/home-search.tsx
|
|
5490
|
-
import { jsx as
|
|
5491
|
-
var
|
|
5439
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "preact/jsx-runtime";
|
|
5440
|
+
var p20 = BRAND.cssPrefix;
|
|
5492
5441
|
function HomeSearchButton({ placeholder, onActivate }) {
|
|
5493
|
-
return /* @__PURE__ */
|
|
5494
|
-
/* @__PURE__ */
|
|
5495
|
-
/* @__PURE__ */
|
|
5442
|
+
return /* @__PURE__ */ jsxs20("button", { type: "button", class: `${p20}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
|
|
5443
|
+
/* @__PURE__ */ jsx25("span", { class: `${p20}-home-search-text`, children: placeholder }),
|
|
5444
|
+
/* @__PURE__ */ jsx25("span", { class: `${p20}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx25(SearchIcon, {}) })
|
|
5496
5445
|
] });
|
|
5497
5446
|
}
|
|
5498
5447
|
function HelpSearchInput({ placeholder, value, onInput }) {
|
|
5499
|
-
return /* @__PURE__ */
|
|
5500
|
-
/* @__PURE__ */
|
|
5448
|
+
return /* @__PURE__ */ jsxs20("div", { class: `${p20}-home-search`, "data-input": "true", children: [
|
|
5449
|
+
/* @__PURE__ */ jsx25(
|
|
5501
5450
|
"input",
|
|
5502
5451
|
{
|
|
5503
5452
|
type: "search",
|
|
5504
|
-
class: `${
|
|
5453
|
+
class: `${p20}-home-search-input`,
|
|
5505
5454
|
placeholder,
|
|
5506
5455
|
value,
|
|
5507
5456
|
onInput: (e) => onInput(e.currentTarget.value),
|
|
5508
5457
|
"data-testid": TID.helpSearch
|
|
5509
5458
|
}
|
|
5510
5459
|
),
|
|
5511
|
-
/* @__PURE__ */
|
|
5460
|
+
/* @__PURE__ */ jsx25("span", { class: `${p20}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx25(SearchIcon, {}) })
|
|
5512
5461
|
] });
|
|
5513
5462
|
}
|
|
5514
5463
|
|
|
5515
5464
|
// src/ui/list-row.tsx
|
|
5516
|
-
import { jsx as
|
|
5517
|
-
var
|
|
5465
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "preact/jsx-runtime";
|
|
5466
|
+
var p21 = BRAND.cssPrefix;
|
|
5518
5467
|
function ListRow({ title, subtitle, onClick, testid }) {
|
|
5519
|
-
return /* @__PURE__ */
|
|
5520
|
-
/* @__PURE__ */
|
|
5521
|
-
/* @__PURE__ */
|
|
5522
|
-
subtitle ? /* @__PURE__ */
|
|
5468
|
+
return /* @__PURE__ */ jsxs21("button", { type: "button", class: `${p21}-list-row`, onClick, "data-testid": testid, children: [
|
|
5469
|
+
/* @__PURE__ */ jsxs21("span", { class: `${p21}-list-row-body`, children: [
|
|
5470
|
+
/* @__PURE__ */ jsx26("span", { class: `${p21}-list-row-title`, children: title }),
|
|
5471
|
+
subtitle ? /* @__PURE__ */ jsx26("span", { class: `${p21}-list-row-sub`, children: subtitle }) : null
|
|
5523
5472
|
] }),
|
|
5524
|
-
/* @__PURE__ */
|
|
5473
|
+
/* @__PURE__ */ jsx26("span", { class: `${p21}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx26(ChevronRightIcon, {}) })
|
|
5525
5474
|
] });
|
|
5526
5475
|
}
|
|
5527
5476
|
|
|
5528
5477
|
// src/ui/module-state.tsx
|
|
5529
|
-
import { jsx as
|
|
5530
|
-
var
|
|
5478
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "preact/jsx-runtime";
|
|
5479
|
+
var p22 = BRAND.cssPrefix;
|
|
5531
5480
|
function ModuleState({
|
|
5532
5481
|
tone = "info",
|
|
5533
5482
|
message,
|
|
5534
5483
|
onRetry,
|
|
5535
5484
|
strings
|
|
5536
5485
|
}) {
|
|
5537
|
-
return /* @__PURE__ */
|
|
5538
|
-
/* @__PURE__ */
|
|
5539
|
-
onRetry ? /* @__PURE__ */
|
|
5486
|
+
return /* @__PURE__ */ jsxs22("div", { class: `${p22}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
|
|
5487
|
+
/* @__PURE__ */ jsx27("span", { children: message }),
|
|
5488
|
+
onRetry ? /* @__PURE__ */ jsx27("button", { type: "button", class: `${p22}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
|
|
5540
5489
|
] });
|
|
5541
5490
|
}
|
|
5542
5491
|
|
|
5543
5492
|
// src/ui/modules/help.tsx
|
|
5544
|
-
import { jsx as
|
|
5545
|
-
var
|
|
5493
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "preact/jsx-runtime";
|
|
5494
|
+
var p23 = BRAND.cssPrefix;
|
|
5546
5495
|
var log12 = logger.scope("help");
|
|
5547
5496
|
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 });
|
|
5548
5497
|
function groupByCategory(items) {
|
|
@@ -5571,7 +5520,7 @@ function fuzzySearch(items, query) {
|
|
|
5571
5520
|
return items.map((item) => ({ item, score: Math.max(fuzzyScore(q, item.title) * 2, fuzzyScore(q, item.description ?? "")) })).filter((r) => r.score > 0).toSorted((a, b) => b.score - a.score).map((r) => r.item);
|
|
5572
5521
|
}
|
|
5573
5522
|
function ArticleRow({ article, nav }) {
|
|
5574
|
-
return /* @__PURE__ */
|
|
5523
|
+
return /* @__PURE__ */ jsx28(
|
|
5575
5524
|
ListRow,
|
|
5576
5525
|
{
|
|
5577
5526
|
title: article.title,
|
|
@@ -5608,46 +5557,46 @@ function HelpRoot({ transport, strings, config, nav, panelProps }) {
|
|
|
5608
5557
|
const results = useMemo2(() => fuzzySearch(items, query), [items, query]);
|
|
5609
5558
|
function renderBody() {
|
|
5610
5559
|
if (query.trim().length > 0) {
|
|
5611
|
-
if (results.length === 0) return /* @__PURE__ */
|
|
5612
|
-
return /* @__PURE__ */
|
|
5560
|
+
if (results.length === 0) return /* @__PURE__ */ jsx28(ModuleState, { message: strings.helpSearchEmpty, strings });
|
|
5561
|
+
return /* @__PURE__ */ jsx28("div", { class: `${p23}-help-card`, children: results.map((a) => /* @__PURE__ */ jsx28(ArticleRow, { article: a, nav }, a.id)) });
|
|
5613
5562
|
}
|
|
5614
|
-
if (state === "loading") return /* @__PURE__ */
|
|
5563
|
+
if (state === "loading") return /* @__PURE__ */ jsx28(ModuleState, { message: strings.helpLoading, strings });
|
|
5615
5564
|
if (state === "error") {
|
|
5616
|
-
return /* @__PURE__ */
|
|
5565
|
+
return /* @__PURE__ */ jsx28(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
5617
5566
|
}
|
|
5618
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
5619
|
-
return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */
|
|
5620
|
-
category ? /* @__PURE__ */
|
|
5621
|
-
/* @__PURE__ */
|
|
5567
|
+
if (items.length === 0) return /* @__PURE__ */ jsx28(ModuleState, { message: strings.helpEmpty, strings });
|
|
5568
|
+
return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs23("section", { class: `${p23}-help-group`, children: [
|
|
5569
|
+
category ? /* @__PURE__ */ jsx28("h2", { class: `${p23}-help-section-title`, children: category }) : null,
|
|
5570
|
+
/* @__PURE__ */ jsx28("div", { class: `${p23}-help-card`, children: rows.map((a) => /* @__PURE__ */ jsx28(ArticleRow, { article: a, nav }, a.id)) })
|
|
5622
5571
|
] }, category));
|
|
5623
5572
|
}
|
|
5624
|
-
return /* @__PURE__ */
|
|
5625
|
-
/* @__PURE__ */
|
|
5626
|
-
/* @__PURE__ */
|
|
5627
|
-
/* @__PURE__ */
|
|
5573
|
+
return /* @__PURE__ */ jsxs23("div", { class: `${p23}-module`, children: [
|
|
5574
|
+
/* @__PURE__ */ jsx28(TitleBar, { title: strings.helpTitle, actions: /* @__PURE__ */ jsx28(HeaderActions, { panelProps, variant: "plain" }) }),
|
|
5575
|
+
/* @__PURE__ */ jsx28("div", { class: `${p23}-module-pad`, children: /* @__PURE__ */ jsx28(HelpSearchInput, { placeholder: strings.helpSearchPlaceholder, value: query, onInput: setQuery }) }),
|
|
5576
|
+
/* @__PURE__ */ jsx28("div", { class: `${p23}-help-list`, children: renderBody() })
|
|
5628
5577
|
] });
|
|
5629
5578
|
}
|
|
5630
5579
|
var helpLayout = {
|
|
5631
5580
|
Icon: HelpIcon,
|
|
5632
|
-
Root: (props2) => /* @__PURE__ */
|
|
5581
|
+
Root: (props2) => /* @__PURE__ */ jsx28(HelpRoot, { ...props2 })
|
|
5633
5582
|
};
|
|
5634
5583
|
|
|
5635
5584
|
// src/ui/modules/home.tsx
|
|
5636
5585
|
import { useEffect as useEffect12, useState as useState9 } from "preact/hooks";
|
|
5637
5586
|
|
|
5638
5587
|
// src/ui/home-card.tsx
|
|
5639
|
-
import { jsx as
|
|
5640
|
-
var
|
|
5588
|
+
import { jsx as jsx29 } from "preact/jsx-runtime";
|
|
5589
|
+
var p24 = BRAND.cssPrefix;
|
|
5641
5590
|
function HomeCard({ onClick, children, testid }) {
|
|
5642
5591
|
if (onClick) {
|
|
5643
|
-
return /* @__PURE__ */
|
|
5592
|
+
return /* @__PURE__ */ jsx29("button", { type: "button", class: `${p24}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
|
|
5644
5593
|
}
|
|
5645
|
-
return /* @__PURE__ */
|
|
5594
|
+
return /* @__PURE__ */ jsx29("div", { class: `${p24}-home-card`, "data-testid": testid, children });
|
|
5646
5595
|
}
|
|
5647
5596
|
|
|
5648
5597
|
// src/ui/modules/home.tsx
|
|
5649
|
-
import { Fragment as Fragment5, jsx as
|
|
5650
|
-
var
|
|
5598
|
+
import { Fragment as Fragment5, jsx as jsx30, jsxs as jsxs24 } from "preact/jsx-runtime";
|
|
5599
|
+
var p25 = BRAND.cssPrefix;
|
|
5651
5600
|
var log13 = logger.scope("home");
|
|
5652
5601
|
function resolveGreeting(props2) {
|
|
5653
5602
|
const name = props2.options.userContext?.name;
|
|
@@ -5684,49 +5633,49 @@ function HomeRoot(props2) {
|
|
|
5684
5633
|
const avatars = config.userAvatars ?? [];
|
|
5685
5634
|
const status = config.status;
|
|
5686
5635
|
const contentTitle = config.contentBlockTitle ? moduleLabel(strings, config.contentBlockTitle) : strings.homeContentTitle;
|
|
5687
|
-
return /* @__PURE__ */
|
|
5688
|
-
/* @__PURE__ */
|
|
5689
|
-
/* @__PURE__ */
|
|
5690
|
-
config.brandName ? /* @__PURE__ */
|
|
5691
|
-
/* @__PURE__ */
|
|
5692
|
-
avatars.length > 0 ? /* @__PURE__ */
|
|
5693
|
-
/* @__PURE__ */
|
|
5636
|
+
return /* @__PURE__ */ jsx30("div", { class: `${p25}-module ${p25}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-scroll`, children: [
|
|
5637
|
+
/* @__PURE__ */ jsxs24("div", { class: `${p25}-home-hero`, children: [
|
|
5638
|
+
/* @__PURE__ */ jsxs24("div", { class: `${p25}-home-hero-top`, children: [
|
|
5639
|
+
config.brandName ? /* @__PURE__ */ jsx30("span", { class: `${p25}-home-brand`, "data-testid": TID.homeBrand, children: config.brandName }) : /* @__PURE__ */ jsx30("span", { class: `${p25}-home-brand-spacer`, "aria-hidden": "true" }),
|
|
5640
|
+
/* @__PURE__ */ jsxs24("div", { class: `${p25}-home-hero-actions`, children: [
|
|
5641
|
+
avatars.length > 0 ? /* @__PURE__ */ jsx30("div", { class: `${p25}-home-avatars`, children: avatars.map((a) => /* @__PURE__ */ jsx30("span", { class: `${p25}-home-avatar`, title: a.role ? `${a.name} \xB7 ${a.role}` : a.name, children: a.avatar ? /* @__PURE__ */ jsx30("img", { src: a.avatar, alt: "", loading: "lazy" }) : /* @__PURE__ */ jsx30("span", { children: initials(a.name) }) }, a.name)) }) : null,
|
|
5642
|
+
/* @__PURE__ */ jsx30(HeaderActions, { panelProps, variant: "plain" })
|
|
5694
5643
|
] })
|
|
5695
5644
|
] }),
|
|
5696
|
-
config.showGreeting !== false ? /* @__PURE__ */
|
|
5697
|
-
/* @__PURE__ */
|
|
5698
|
-
greeting.subtitle ? /* @__PURE__ */
|
|
5645
|
+
config.showGreeting !== false ? /* @__PURE__ */ jsxs24(Fragment5, { children: [
|
|
5646
|
+
/* @__PURE__ */ jsx30("h1", { class: `${p25}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
|
|
5647
|
+
greeting.subtitle ? /* @__PURE__ */ jsx30("p", { class: `${p25}-home-lead`, children: greeting.subtitle }) : null
|
|
5699
5648
|
] }) : null
|
|
5700
5649
|
] }),
|
|
5701
|
-
/* @__PURE__ */
|
|
5702
|
-
config.showSearchBar !== false ? /* @__PURE__ */
|
|
5650
|
+
/* @__PURE__ */ jsxs24("div", { class: `${p25}-home-cards`, children: [
|
|
5651
|
+
config.showSearchBar !== false ? /* @__PURE__ */ jsx30(
|
|
5703
5652
|
HomeSearchButton,
|
|
5704
5653
|
{
|
|
5705
5654
|
placeholder: strings.homeSearchPlaceholder,
|
|
5706
5655
|
onActivate: () => nav.switchToLayout("help")
|
|
5707
5656
|
}
|
|
5708
5657
|
) : null,
|
|
5709
|
-
recent ? /* @__PURE__ */
|
|
5710
|
-
/* @__PURE__ */
|
|
5711
|
-
/* @__PURE__ */
|
|
5712
|
-
/* @__PURE__ */
|
|
5713
|
-
recent.preview ? /* @__PURE__ */
|
|
5658
|
+
recent ? /* @__PURE__ */ jsx30(HomeCard, { onClick: () => nav.selectSession(recent.sessionId), testid: TID.homeRecent, children: /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-recent-row`, "data-unread": (recent.unreadCount ?? 0) > 0 ? "true" : void 0, children: [
|
|
5659
|
+
/* @__PURE__ */ jsx30("span", { class: `${p25}-home-recent-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx30(BubblesIcon, {}) }),
|
|
5660
|
+
/* @__PURE__ */ jsxs24("span", { class: `${p25}-home-recent-body`, children: [
|
|
5661
|
+
/* @__PURE__ */ jsx30("span", { class: `${p25}-home-recent-title`, children: recent.title }),
|
|
5662
|
+
recent.preview ? /* @__PURE__ */ jsx30("span", { class: `${p25}-home-recent-preview`, children: recent.preview }) : null
|
|
5714
5663
|
] }),
|
|
5715
|
-
(recent.unreadCount ?? 0) > 0 ? /* @__PURE__ */
|
|
5664
|
+
(recent.unreadCount ?? 0) > 0 ? /* @__PURE__ */ jsx30("span", { class: `${p25}-home-recent-dot`, "aria-label": "Unread" }) : null
|
|
5716
5665
|
] }) }) : null,
|
|
5717
|
-
status ? /* @__PURE__ */
|
|
5666
|
+
status ? /* @__PURE__ */ jsx30(
|
|
5718
5667
|
HomeCard,
|
|
5719
5668
|
{
|
|
5720
5669
|
onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: status.text }) : void 0,
|
|
5721
|
-
children: /* @__PURE__ */
|
|
5722
|
-
/* @__PURE__ */
|
|
5723
|
-
/* @__PURE__ */
|
|
5670
|
+
children: /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-status`, "data-level": status.level ?? "operational", children: [
|
|
5671
|
+
/* @__PURE__ */ jsx30("span", { class: `${p25}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx30(StatusOkIcon, {}) }),
|
|
5672
|
+
/* @__PURE__ */ jsx30("span", { class: `${p25}-home-status-text`, children: status.text })
|
|
5724
5673
|
] })
|
|
5725
5674
|
}
|
|
5726
5675
|
) : null,
|
|
5727
|
-
content.length > 0 ? /* @__PURE__ */
|
|
5728
|
-
/* @__PURE__ */
|
|
5729
|
-
/* @__PURE__ */
|
|
5676
|
+
content.length > 0 ? /* @__PURE__ */ jsxs24("section", { class: `${p25}-home-content`, children: [
|
|
5677
|
+
/* @__PURE__ */ jsx30("div", { class: `${p25}-home-content-title`, children: contentTitle }),
|
|
5678
|
+
/* @__PURE__ */ jsx30("div", { class: `${p25}-home-content-list`, children: content.map((item) => /* @__PURE__ */ jsx30(
|
|
5730
5679
|
ListRow,
|
|
5731
5680
|
{
|
|
5732
5681
|
title: item.title,
|
|
@@ -5742,13 +5691,13 @@ function HomeRoot(props2) {
|
|
|
5742
5691
|
}
|
|
5743
5692
|
var homeLayout = {
|
|
5744
5693
|
Icon: HomeIcon,
|
|
5745
|
-
Root: (props2) => /* @__PURE__ */
|
|
5694
|
+
Root: (props2) => /* @__PURE__ */ jsx30(HomeRoot, { ...props2 })
|
|
5746
5695
|
};
|
|
5747
5696
|
|
|
5748
5697
|
// src/ui/modules/news.tsx
|
|
5749
5698
|
import { useEffect as useEffect13, useState as useState10 } from "preact/hooks";
|
|
5750
|
-
import { jsx as
|
|
5751
|
-
var
|
|
5699
|
+
import { jsx as jsx31, jsxs as jsxs25 } from "preact/jsx-runtime";
|
|
5700
|
+
var p26 = BRAND.cssPrefix;
|
|
5752
5701
|
var log14 = logger.scope("news");
|
|
5753
5702
|
function NewsRoot({ transport, strings, config, nav, panelProps }) {
|
|
5754
5703
|
const tags = config.contentTags;
|
|
@@ -5774,38 +5723,38 @@ function NewsRoot({ transport, strings, config, nav, panelProps }) {
|
|
|
5774
5723
|
};
|
|
5775
5724
|
}, [transport, tags, reloadKey]);
|
|
5776
5725
|
function renderBody() {
|
|
5777
|
-
if (state === "loading") return /* @__PURE__ */
|
|
5726
|
+
if (state === "loading") return /* @__PURE__ */ jsx31(ModuleState, { message: strings.newsLoading, strings });
|
|
5778
5727
|
if (state === "error") {
|
|
5779
|
-
return /* @__PURE__ */
|
|
5728
|
+
return /* @__PURE__ */ jsx31(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
5780
5729
|
}
|
|
5781
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
5782
|
-
return /* @__PURE__ */
|
|
5730
|
+
if (items.length === 0) return /* @__PURE__ */ jsx31(ModuleState, { message: strings.newsEmpty, strings });
|
|
5731
|
+
return /* @__PURE__ */ jsx31("div", { class: `${p26}-news-list`, children: items.map((item) => /* @__PURE__ */ jsxs25(
|
|
5783
5732
|
"button",
|
|
5784
5733
|
{
|
|
5785
5734
|
type: "button",
|
|
5786
|
-
class: `${
|
|
5735
|
+
class: `${p26}-news-card`,
|
|
5787
5736
|
onClick: () => nav.push({ kind: "content", id: item.id, title: item.title }),
|
|
5788
5737
|
"data-testid": tid(TID.newsItem, item.id),
|
|
5789
5738
|
children: [
|
|
5790
|
-
item.image ? /* @__PURE__ */
|
|
5791
|
-
/* @__PURE__ */
|
|
5792
|
-
item.tags && item.tags.length > 0 ? /* @__PURE__ */
|
|
5793
|
-
/* @__PURE__ */
|
|
5794
|
-
item.description ? /* @__PURE__ */
|
|
5739
|
+
item.image ? /* @__PURE__ */ jsx31("img", { class: `${p26}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
|
|
5740
|
+
/* @__PURE__ */ jsxs25("span", { class: `${p26}-news-body`, children: [
|
|
5741
|
+
item.tags && item.tags.length > 0 ? /* @__PURE__ */ jsx31("span", { class: `${p26}-news-tags`, children: item.tags.map((t) => /* @__PURE__ */ jsx31("span", { class: `${p26}-news-tag`, children: t }, t)) }) : null,
|
|
5742
|
+
/* @__PURE__ */ jsx31("span", { class: `${p26}-news-title`, children: item.title }),
|
|
5743
|
+
item.description ? /* @__PURE__ */ jsx31("span", { class: `${p26}-news-summary`, children: item.description }) : null
|
|
5795
5744
|
] })
|
|
5796
5745
|
]
|
|
5797
5746
|
},
|
|
5798
5747
|
item.id
|
|
5799
5748
|
)) });
|
|
5800
5749
|
}
|
|
5801
|
-
return /* @__PURE__ */
|
|
5802
|
-
/* @__PURE__ */
|
|
5803
|
-
/* @__PURE__ */
|
|
5750
|
+
return /* @__PURE__ */ jsxs25("div", { class: `${p26}-module`, children: [
|
|
5751
|
+
/* @__PURE__ */ jsx31(TitleBar, { title: strings.newsTitle, actions: /* @__PURE__ */ jsx31(HeaderActions, { panelProps, variant: "plain" }) }),
|
|
5752
|
+
/* @__PURE__ */ jsx31("div", { class: `${p26}-module-scroll`, children: renderBody() })
|
|
5804
5753
|
] });
|
|
5805
5754
|
}
|
|
5806
5755
|
var newsLayout = {
|
|
5807
5756
|
Icon: NewsIcon,
|
|
5808
|
-
Root: (props2) => /* @__PURE__ */
|
|
5757
|
+
Root: (props2) => /* @__PURE__ */ jsx31(NewsRoot, { ...props2 })
|
|
5809
5758
|
};
|
|
5810
5759
|
|
|
5811
5760
|
// src/ui/modules/registry.ts
|
|
@@ -5817,28 +5766,28 @@ var LAYOUTS = {
|
|
|
5817
5766
|
};
|
|
5818
5767
|
|
|
5819
5768
|
// src/ui/home-tab-bar.tsx
|
|
5820
|
-
import { jsx as
|
|
5821
|
-
var
|
|
5769
|
+
import { jsx as jsx32, jsxs as jsxs26 } from "preact/jsx-runtime";
|
|
5770
|
+
var p27 = BRAND.cssPrefix;
|
|
5822
5771
|
function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
|
|
5823
|
-
return /* @__PURE__ */
|
|
5772
|
+
return /* @__PURE__ */ jsx32("nav", { class: `${p27}-tabbar`, role: "tablist", "aria-label": strings.panelTitle, children: modules.map((m) => {
|
|
5824
5773
|
const Icon = LAYOUTS[m.layout].Icon;
|
|
5825
5774
|
const selected = m.id === activeTab;
|
|
5826
5775
|
const badge = m.layout === "chat" && unreadCount > 0 ? unreadCount > 9 ? "9+" : String(unreadCount) : null;
|
|
5827
|
-
return /* @__PURE__ */
|
|
5776
|
+
return /* @__PURE__ */ jsxs26(
|
|
5828
5777
|
"button",
|
|
5829
5778
|
{
|
|
5830
5779
|
type: "button",
|
|
5831
5780
|
role: "tab",
|
|
5832
5781
|
"aria-selected": selected,
|
|
5833
|
-
class: `${
|
|
5782
|
+
class: `${p27}-tab`,
|
|
5834
5783
|
onClick: () => onSelect(m.id),
|
|
5835
5784
|
"data-testid": tid(TID.tab, m.id),
|
|
5836
5785
|
children: [
|
|
5837
|
-
/* @__PURE__ */
|
|
5838
|
-
/* @__PURE__ */
|
|
5839
|
-
badge ? /* @__PURE__ */
|
|
5786
|
+
/* @__PURE__ */ jsxs26("span", { class: `${p27}-tab-icon`, "aria-hidden": "true", children: [
|
|
5787
|
+
/* @__PURE__ */ jsx32(Icon, {}),
|
|
5788
|
+
badge ? /* @__PURE__ */ jsx32("span", { class: `${p27}-tab-badge`, "data-testid": TID.tabBadge, children: badge }) : null
|
|
5840
5789
|
] }),
|
|
5841
|
-
/* @__PURE__ */
|
|
5790
|
+
/* @__PURE__ */ jsx32("span", { class: `${p27}-tab-label`, children: moduleLabel(strings, m.label) })
|
|
5842
5791
|
]
|
|
5843
5792
|
},
|
|
5844
5793
|
m.id
|
|
@@ -5847,12 +5796,12 @@ function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
|
|
|
5847
5796
|
}
|
|
5848
5797
|
|
|
5849
5798
|
// src/ui/iframe-view.tsx
|
|
5850
|
-
import { jsx as
|
|
5851
|
-
var
|
|
5799
|
+
import { jsx as jsx33, jsxs as jsxs27 } from "preact/jsx-runtime";
|
|
5800
|
+
var p28 = BRAND.cssPrefix;
|
|
5852
5801
|
var SANDBOX = "allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads";
|
|
5853
5802
|
function IframeView({ url, title, strings, onBack, actions }) {
|
|
5854
|
-
return /* @__PURE__ */
|
|
5855
|
-
/* @__PURE__ */
|
|
5803
|
+
return /* @__PURE__ */ jsxs27("div", { class: `${p28}-module`, children: [
|
|
5804
|
+
/* @__PURE__ */ jsx33(
|
|
5856
5805
|
BackHeader,
|
|
5857
5806
|
{
|
|
5858
5807
|
title: title || strings.moduleBack,
|
|
@@ -5861,10 +5810,10 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
5861
5810
|
actions
|
|
5862
5811
|
}
|
|
5863
5812
|
),
|
|
5864
|
-
/* @__PURE__ */
|
|
5813
|
+
/* @__PURE__ */ jsx33(
|
|
5865
5814
|
"iframe",
|
|
5866
5815
|
{
|
|
5867
|
-
class: `${
|
|
5816
|
+
class: `${p28}-content-frame`,
|
|
5868
5817
|
src: url,
|
|
5869
5818
|
title: title || "content",
|
|
5870
5819
|
sandbox: SANDBOX,
|
|
@@ -5878,8 +5827,8 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
5878
5827
|
|
|
5879
5828
|
// src/ui/content-view.tsx
|
|
5880
5829
|
import { useCallback as useCallback3, useEffect as useEffect14, useState as useState11 } from "preact/hooks";
|
|
5881
|
-
import { jsx as
|
|
5882
|
-
var
|
|
5830
|
+
import { jsx as jsx34, jsxs as jsxs28 } from "preact/jsx-runtime";
|
|
5831
|
+
var p29 = BRAND.cssPrefix;
|
|
5883
5832
|
var log15 = logger.scope("content");
|
|
5884
5833
|
function ContentView({ id, title, transport, strings, onBack, actions }) {
|
|
5885
5834
|
const [item, setItem] = useState11(null);
|
|
@@ -5907,17 +5856,17 @@ function ContentView({ id, title, transport, strings, onBack, actions }) {
|
|
|
5907
5856
|
};
|
|
5908
5857
|
}, [transport, id, reloadKey]);
|
|
5909
5858
|
function renderBody() {
|
|
5910
|
-
if (failed) return /* @__PURE__ */
|
|
5911
|
-
if (item === null) return /* @__PURE__ */
|
|
5912
|
-
return /* @__PURE__ */
|
|
5913
|
-
item.image ? /* @__PURE__ */
|
|
5914
|
-
item.description ? /* @__PURE__ */
|
|
5915
|
-
item.tags && item.tags.length > 0 ? /* @__PURE__ */
|
|
5916
|
-
/* @__PURE__ */
|
|
5859
|
+
if (failed) return /* @__PURE__ */ jsx34(ModuleState, { tone: "error", message: strings.errorGeneric, onRetry: retry, strings });
|
|
5860
|
+
if (item === null) return /* @__PURE__ */ jsx34(ModuleState, { message: strings.contentLoading, strings });
|
|
5861
|
+
return /* @__PURE__ */ jsxs28("article", { class: `${p29}-content`, "data-testid": TID.contentView, children: [
|
|
5862
|
+
item.image ? /* @__PURE__ */ jsx34("img", { class: `${p29}-content-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
|
|
5863
|
+
item.description ? /* @__PURE__ */ jsx34("p", { class: `${p29}-content-subtitle`, children: item.description }) : null,
|
|
5864
|
+
item.tags && item.tags.length > 0 ? /* @__PURE__ */ jsx34("span", { class: `${p29}-news-tags`, children: item.tags.map((t) => /* @__PURE__ */ jsx34("span", { class: `${p29}-news-tag`, children: t }, t)) }) : null,
|
|
5865
|
+
/* @__PURE__ */ jsx34(StaticMarkdown, { text: item.content ?? "" })
|
|
5917
5866
|
] });
|
|
5918
5867
|
}
|
|
5919
|
-
return /* @__PURE__ */
|
|
5920
|
-
/* @__PURE__ */
|
|
5868
|
+
return /* @__PURE__ */ jsxs28("div", { class: `${p29}-module`, children: [
|
|
5869
|
+
/* @__PURE__ */ jsx34(
|
|
5921
5870
|
BackHeader,
|
|
5922
5871
|
{
|
|
5923
5872
|
title: item?.title || title || strings.moduleBack,
|
|
@@ -5927,13 +5876,13 @@ function ContentView({ id, title, transport, strings, onBack, actions }) {
|
|
|
5927
5876
|
testid: TID.backHeader
|
|
5928
5877
|
}
|
|
5929
5878
|
),
|
|
5930
|
-
/* @__PURE__ */
|
|
5879
|
+
/* @__PURE__ */ jsx34("div", { class: `${p29}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
|
|
5931
5880
|
] });
|
|
5932
5881
|
}
|
|
5933
5882
|
|
|
5934
5883
|
// src/ui/messenger-home.tsx
|
|
5935
|
-
import { jsx as
|
|
5936
|
-
var
|
|
5884
|
+
import { jsx as jsx35, jsxs as jsxs29 } from "preact/jsx-runtime";
|
|
5885
|
+
var p30 = BRAND.cssPrefix;
|
|
5937
5886
|
function MessengerHome({
|
|
5938
5887
|
panelProps,
|
|
5939
5888
|
enabledModules,
|
|
@@ -6001,12 +5950,12 @@ function MessengerHome({
|
|
|
6001
5950
|
nav: moduleNav,
|
|
6002
5951
|
panelProps
|
|
6003
5952
|
});
|
|
6004
|
-
const plainActions = /* @__PURE__ */
|
|
5953
|
+
const plainActions = /* @__PURE__ */ jsx35(HeaderActions, { panelProps, variant: "plain" });
|
|
6005
5954
|
let body;
|
|
6006
5955
|
if (top?.kind === "iframe") {
|
|
6007
|
-
body = /* @__PURE__ */
|
|
5956
|
+
body = /* @__PURE__ */ jsx35(IframeView, { url: top.url, title: top.title, strings, onBack: nav.pop, actions: plainActions });
|
|
6008
5957
|
} else if (top?.kind === "content") {
|
|
6009
|
-
body = /* @__PURE__ */
|
|
5958
|
+
body = /* @__PURE__ */ jsx35(
|
|
6010
5959
|
ContentView,
|
|
6011
5960
|
{
|
|
6012
5961
|
id: top.id,
|
|
@@ -6018,7 +5967,7 @@ function MessengerHome({
|
|
|
6018
5967
|
}
|
|
6019
5968
|
);
|
|
6020
5969
|
} else if (activeModule?.layout === "chat") {
|
|
6021
|
-
body = /* @__PURE__ */
|
|
5970
|
+
body = /* @__PURE__ */ jsx35(
|
|
6022
5971
|
PanelContent,
|
|
6023
5972
|
{
|
|
6024
5973
|
...panelProps,
|
|
@@ -6029,23 +5978,23 @@ function MessengerHome({
|
|
|
6029
5978
|
);
|
|
6030
5979
|
} else if (activeModule) {
|
|
6031
5980
|
const Root = LAYOUTS[activeModule.layout].Root;
|
|
6032
|
-
body = Root ? /* @__PURE__ */
|
|
5981
|
+
body = Root ? /* @__PURE__ */ jsx35(Root, { ...screenProps(activeModule) }, activeModule.id) : null;
|
|
6033
5982
|
} else {
|
|
6034
5983
|
body = null;
|
|
6035
5984
|
}
|
|
6036
|
-
return /* @__PURE__ */
|
|
5985
|
+
return /* @__PURE__ */ jsxs29(
|
|
6037
5986
|
"div",
|
|
6038
5987
|
{
|
|
6039
5988
|
ref: containerRef,
|
|
6040
|
-
class: `${
|
|
5989
|
+
class: `${p30}-panel ${p30}-messenger`,
|
|
6041
5990
|
role: "dialog",
|
|
6042
5991
|
"aria-modal": "false",
|
|
6043
5992
|
"aria-label": strings.panelTitle,
|
|
6044
5993
|
style: { position: "relative" },
|
|
6045
5994
|
"data-testid": TID.messengerHome,
|
|
6046
5995
|
children: [
|
|
6047
|
-
/* @__PURE__ */
|
|
6048
|
-
showTabBar ? /* @__PURE__ */
|
|
5996
|
+
/* @__PURE__ */ jsx35("div", { class: `${p30}-messenger-body`, children: body }),
|
|
5997
|
+
showTabBar ? /* @__PURE__ */ jsx35(
|
|
6049
5998
|
HomeTabBar,
|
|
6050
5999
|
{
|
|
6051
6000
|
modules: enabledModules,
|
|
@@ -6055,8 +6004,8 @@ function MessengerHome({
|
|
|
6055
6004
|
onSelect: nav.switchTab
|
|
6056
6005
|
}
|
|
6057
6006
|
) : null,
|
|
6058
|
-
/* @__PURE__ */
|
|
6059
|
-
options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */
|
|
6007
|
+
/* @__PURE__ */ jsx35(PoweredByBar, { poweredBy: options.poweredBy }),
|
|
6008
|
+
options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */ jsx35(
|
|
6060
6009
|
ResizeGrip,
|
|
6061
6010
|
{
|
|
6062
6011
|
panelEl: containerRef.current,
|
|
@@ -6073,29 +6022,29 @@ function MessengerHome({
|
|
|
6073
6022
|
}
|
|
6074
6023
|
|
|
6075
6024
|
// src/ui/modules-empty.tsx
|
|
6076
|
-
import { jsx as
|
|
6077
|
-
var
|
|
6025
|
+
import { jsx as jsx36, jsxs as jsxs30 } from "preact/jsx-runtime";
|
|
6026
|
+
var p31 = BRAND.cssPrefix;
|
|
6078
6027
|
function ModulesEmpty({ strings, onClose }) {
|
|
6079
|
-
return /* @__PURE__ */
|
|
6028
|
+
return /* @__PURE__ */ jsxs30(
|
|
6080
6029
|
"div",
|
|
6081
6030
|
{
|
|
6082
|
-
class: `${
|
|
6031
|
+
class: `${p31}-panel ${p31}-modules-empty`,
|
|
6083
6032
|
role: "dialog",
|
|
6084
6033
|
"aria-label": strings.panelTitle,
|
|
6085
6034
|
"data-testid": TID.modulesEmpty,
|
|
6086
6035
|
children: [
|
|
6087
|
-
onClose ? /* @__PURE__ */
|
|
6036
|
+
onClose ? /* @__PURE__ */ jsx36(
|
|
6088
6037
|
"button",
|
|
6089
6038
|
{
|
|
6090
6039
|
type: "button",
|
|
6091
|
-
class: `${
|
|
6040
|
+
class: `${p31}-icon-btn ${p31}-modules-empty-close`,
|
|
6092
6041
|
onClick: onClose,
|
|
6093
6042
|
"aria-label": strings.close,
|
|
6094
6043
|
title: strings.close,
|
|
6095
|
-
children: /* @__PURE__ */
|
|
6044
|
+
children: /* @__PURE__ */ jsx36(CloseIcon, {})
|
|
6096
6045
|
}
|
|
6097
6046
|
) : null,
|
|
6098
|
-
/* @__PURE__ */
|
|
6047
|
+
/* @__PURE__ */ jsx36("p", { class: `${p31}-modules-empty-text`, children: strings.modulesEmpty })
|
|
6099
6048
|
]
|
|
6100
6049
|
}
|
|
6101
6050
|
);
|
|
@@ -6122,6 +6071,7 @@ function animateTypewriter(msg, text, charsPerSecond, abort) {
|
|
|
6122
6071
|
part.textSig.value = text;
|
|
6123
6072
|
part.doneSig.value = true;
|
|
6124
6073
|
msg.status = "complete";
|
|
6074
|
+
msg.partsSig.value = [...msg.partsSig.value];
|
|
6125
6075
|
resolve();
|
|
6126
6076
|
};
|
|
6127
6077
|
if (typeof requestAnimationFrame === "undefined") {
|
|
@@ -6166,9 +6116,9 @@ function useLauncherCallout({ callout, persistence }) {
|
|
|
6166
6116
|
}
|
|
6167
6117
|
|
|
6168
6118
|
// src/ui/app.tsx
|
|
6169
|
-
import { jsx as
|
|
6119
|
+
import { jsx as jsx37, jsxs as jsxs31 } from "preact/jsx-runtime";
|
|
6170
6120
|
var log16 = logger.scope("app");
|
|
6171
|
-
var
|
|
6121
|
+
var p32 = BRAND.cssPrefix;
|
|
6172
6122
|
function App({ options, hostElement, bus }) {
|
|
6173
6123
|
const [persistence] = useState13(() => createPersistence(options.widgetId, options.storage));
|
|
6174
6124
|
const [visitorId, setVisitorId] = useState13(() => persistence.getVisitorId());
|
|
@@ -6629,8 +6579,8 @@ function App({ options, hostElement, bus }) {
|
|
|
6629
6579
|
if (!canSend) forms.fire("conversation-closed");
|
|
6630
6580
|
}, [canSend, forms]);
|
|
6631
6581
|
useEffect17(() => {
|
|
6632
|
-
if (pageArea) forms.fire("page-area");
|
|
6633
|
-
}, [pageArea, forms]);
|
|
6582
|
+
if (sessionReady && pageArea) forms.fire("page-area");
|
|
6583
|
+
}, [sessionReady, pageArea, forms]);
|
|
6634
6584
|
const idleMs = useMemo3(() => {
|
|
6635
6585
|
const secs = options.forms.list.flatMap((f) => f.triggers).filter((t) => t.kind === "idle").map((t) => Number(t.param));
|
|
6636
6586
|
return secs.length ? Math.min(...secs) * 1e3 : 0;
|
|
@@ -6868,10 +6818,9 @@ function App({ options, hostElement, bus }) {
|
|
|
6868
6818
|
bus.emit("suggestion", { text });
|
|
6869
6819
|
void handleSend(text, []);
|
|
6870
6820
|
},
|
|
6871
|
-
// Active form:
|
|
6872
|
-
//
|
|
6873
|
-
|
|
6874
|
-
inlineForm: activeForm.value && !activeForm.value.form.blocking ? activeForm.value.form : null,
|
|
6821
|
+
// Active form: replaces the composer as a gate and locks every chat action
|
|
6822
|
+
// until the visitor submits or (when skippable) skips.
|
|
6823
|
+
activeForm: activeForm.value?.form ?? null,
|
|
6875
6824
|
onFormSubmit: forms.complete,
|
|
6876
6825
|
onFormSkip: forms.skip,
|
|
6877
6826
|
tool: toolInteraction
|
|
@@ -6886,12 +6835,12 @@ function App({ options, hostElement, bus }) {
|
|
|
6886
6835
|
const renderSurface = (size) => {
|
|
6887
6836
|
const closeable = isActionVisible("close", effectiveOptions.mode, size);
|
|
6888
6837
|
if (enabledModules.length === 0) {
|
|
6889
|
-
return /* @__PURE__ */
|
|
6838
|
+
return /* @__PURE__ */ jsx37(ModulesEmpty, { strings: effectiveOptions.strings, onClose: closeable ? handleClose : void 0 });
|
|
6890
6839
|
}
|
|
6891
6840
|
if (enabledModules.length === 1 && enabledModules[0]?.layout === "chat") {
|
|
6892
|
-
return /* @__PURE__ */
|
|
6841
|
+
return /* @__PURE__ */ jsx37(Panel, { ...panelProps, panelSize: size });
|
|
6893
6842
|
}
|
|
6894
|
-
return /* @__PURE__ */
|
|
6843
|
+
return /* @__PURE__ */ jsx37(
|
|
6895
6844
|
MessengerHome,
|
|
6896
6845
|
{
|
|
6897
6846
|
panelProps: { ...panelProps, panelSize: size, onClose: closeable ? handleClose : void 0 },
|
|
@@ -6909,7 +6858,7 @@ function App({ options, hostElement, bus }) {
|
|
|
6909
6858
|
void handleSelectHistoryChat(chat.sessionId);
|
|
6910
6859
|
};
|
|
6911
6860
|
const messagesEnabled = enabledModules.some((m) => m.layout === "chat");
|
|
6912
|
-
return /* @__PURE__ */
|
|
6861
|
+
return /* @__PURE__ */ jsx37("div", { class: `${p32}-anchor`, children: /* @__PURE__ */ jsx37(
|
|
6913
6862
|
PageShell,
|
|
6914
6863
|
{
|
|
6915
6864
|
site: parsedSite,
|
|
@@ -6928,15 +6877,15 @@ function App({ options, hostElement, bus }) {
|
|
|
6928
6877
|
}
|
|
6929
6878
|
if (isInlineLike) {
|
|
6930
6879
|
const inlineSize = options.mode === "standalone" ? "fullscreen" : panelSize;
|
|
6931
|
-
return /* @__PURE__ */
|
|
6880
|
+
return /* @__PURE__ */ jsx37("div", { class: `${p32}-anchor`, children: renderSurface(inlineSize) });
|
|
6932
6881
|
}
|
|
6933
6882
|
const drawerEdgeTab = options.mode === "drawer";
|
|
6934
6883
|
const triggerOwnedByPage = options.mode === "modal";
|
|
6935
6884
|
const launcherVisible = !triggerOwnedByPage && !options.launcher.hidden && (!isOpen || launcherLeaving);
|
|
6936
6885
|
const calloutToRender = launcherVisible && !launcherLeaving && !calloutDismissed && !drawerEdgeTab ? effectiveOptions.launcher.callout : null;
|
|
6937
|
-
return /* @__PURE__ */
|
|
6886
|
+
return /* @__PURE__ */ jsxs31("div", { class: `${p32}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
|
|
6938
6887
|
isOpen ? renderSurface(panelSize) : null,
|
|
6939
|
-
launcherVisible ? /* @__PURE__ */
|
|
6888
|
+
launcherVisible ? /* @__PURE__ */ jsx37(
|
|
6940
6889
|
Launcher,
|
|
6941
6890
|
{
|
|
6942
6891
|
onToggle: handleOpen,
|
|
@@ -6946,7 +6895,7 @@ function App({ options, hostElement, bus }) {
|
|
|
6946
6895
|
edgeTab: drawerEdgeTab
|
|
6947
6896
|
}
|
|
6948
6897
|
) : null,
|
|
6949
|
-
calloutToRender ? /* @__PURE__ */
|
|
6898
|
+
calloutToRender ? /* @__PURE__ */ jsx37(
|
|
6950
6899
|
LauncherCallout,
|
|
6951
6900
|
{
|
|
6952
6901
|
callout: calloutToRender,
|