@quanta-intellect/vessel-browser 0.1.114 → 0.1.116

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.
@@ -263,20 +263,23 @@ function readSignal() {
263
263
  }
264
264
  }
265
265
  if (Listener) {
266
- const sSlot = this.observers ? this.observers.length : 0;
267
- if (!Listener.sources) {
268
- Listener.sources = [this];
269
- Listener.sourceSlots = [sSlot];
270
- } else {
271
- Listener.sources.push(this);
272
- Listener.sourceSlots.push(sSlot);
273
- }
274
- if (!this.observers) {
275
- this.observers = [Listener];
276
- this.observerSlots = [Listener.sources.length - 1];
277
- } else {
278
- this.observers.push(Listener);
279
- this.observerSlots.push(Listener.sources.length - 1);
266
+ const observers = this.observers;
267
+ if (!observers || observers[observers.length - 1] !== Listener) {
268
+ const sSlot = observers ? observers.length : 0;
269
+ if (!Listener.sources) {
270
+ Listener.sources = [this];
271
+ Listener.sourceSlots = [sSlot];
272
+ } else {
273
+ Listener.sources.push(this);
274
+ Listener.sourceSlots.push(sSlot);
275
+ }
276
+ if (!observers) {
277
+ this.observers = [Listener];
278
+ this.observerSlots = [Listener.sources.length - 1];
279
+ } else {
280
+ observers.push(Listener);
281
+ this.observerSlots.push(Listener.sources.length - 1);
282
+ }
280
283
  }
281
284
  }
282
285
  return this.value;
@@ -491,7 +494,12 @@ function resolveChildren(children2) {
491
494
  const results = [];
492
495
  for (let i = 0; i < children2.length; i++) {
493
496
  const result = resolveChildren(children2[i]);
494
- Array.isArray(result) ? results.push.apply(results, result) : results.push(result);
497
+ if (Array.isArray(result)) {
498
+ if (result.length < 32768) results.push.apply(results, result);
499
+ else for (let j = 0; j < result.length; j++) results.push(result[j]);
500
+ } else {
501
+ results.push(result);
502
+ }
495
503
  }
496
504
  return results;
497
505
  }
@@ -2301,7 +2309,7 @@ function getAgentPresence(state, currentTime = Date.now()) {
2301
2309
  }
2302
2310
  return "idle";
2303
2311
  }
2304
- var _tmpl$$p = /* @__PURE__ */ template(`<img class=tab-favicon alt>`), _tmpl$2$o = /* @__PURE__ */ template(`<span class=tab-favicon-fallback>`), _tmpl$3$l = /* @__PURE__ */ template(`<div class=tab-bar><div class=tab-list></div><div class=tab-actions><button class=tab-new data-tooltip="New window"data-tooltip-pos=left></button><button class=tab-new data-tooltip="Add active tab to group"data-tooltip-pos=left></button><button class=tab-new data-tooltip="New tab"data-tooltip-pos=left></button><button class="tab-new tab-new-private"data-tooltip="Private window"data-tooltip-pos=left><svg width=12 height=12 viewBox="0 0 16 16"fill=currentColor><path d="M8 1a7 7 0 100 14A7 7 0 008 1zm0 1.5a5.5 5.5 0 110 11 5.5 5.5 0 010-11z">`), _tmpl$4$l = /* @__PURE__ */ template(`<button><span class=tab-group-dot></span><span class=tab-group-name></span><span class=tab-group-count>`), _tmpl$5$i = /* @__PURE__ */ template(`<button class="tab-audio tab-audio-pinned">`), _tmpl$6$g = /* @__PURE__ */ template(`<div role=tab>`), _tmpl$7$d = /* @__PURE__ */ template(`<span class=tab-title>`), _tmpl$8$a = /* @__PURE__ */ template(`<button class=tab-audio>`), _tmpl$9$9 = /* @__PURE__ */ template(`<button class=tab-close>×`), _tmpl$0$7 = /* @__PURE__ */ template(`<span class=tab-agent-indicator aria-hidden=true title="Agent active on this tab">`), _tmpl$1$7 = /* @__PURE__ */ template(`<span class=tab-loading>`);
2312
+ var _tmpl$$p = /* @__PURE__ */ template(`<img class=tab-favicon alt>`), _tmpl$2$o = /* @__PURE__ */ template(`<span class=tab-favicon-fallback>`), _tmpl$3$l = /* @__PURE__ */ template(`<div class=tab-bar><div class=tab-list></div><div class=tab-actions><button class=tab-new data-tooltip="New window"data-tooltip-pos=left></button><button class=tab-new data-tooltip="Add active tab to group"data-tooltip-pos=left></button><button class=tab-new data-tooltip="New tab"data-tooltip-pos=left></button><button class="tab-new tab-new-private"data-tooltip="Private window"data-tooltip-pos=left><svg width=12 height=12 viewBox="0 0 16 16"fill=currentColor><path d="M8 1a7 7 0 100 14A7 7 0 008 1zm0 1.5a5.5 5.5 0 110 11 5.5 5.5 0 010-11z">`), _tmpl$4$l = /* @__PURE__ */ template(`<button><span class=tab-group-dot></span><span class=tab-group-name></span><span class=tab-group-count>`), _tmpl$5$i = /* @__PURE__ */ template(`<button class="tab-audio tab-audio-pinned">`), _tmpl$6$g = /* @__PURE__ */ template(`<div role=tab>`), _tmpl$7$e = /* @__PURE__ */ template(`<span class=tab-title>`), _tmpl$8$a = /* @__PURE__ */ template(`<button class=tab-audio>`), _tmpl$9$9 = /* @__PURE__ */ template(`<button class=tab-close>×`), _tmpl$0$7 = /* @__PURE__ */ template(`<span class=tab-agent-indicator aria-hidden=true title="Agent active on this tab">`), _tmpl$1$7 = /* @__PURE__ */ template(`<span class=tab-loading>`);
2305
2313
  const TAB_CLOSE_MS = 200;
2306
2314
  function stringToHue(str) {
2307
2315
  let hash = 0;
@@ -2490,7 +2498,7 @@ const TabBar = () => {
2490
2498
  insert(_el$12, (() => {
2491
2499
  var _c$ = memo(() => !!!tab.isPinned);
2492
2500
  return () => _c$() && [memo(() => memo(() => !!modelActiveTabIds().has(tab.id))() && _tmpl$0$7()), (() => {
2493
- var _el$14 = _tmpl$7$d();
2501
+ var _el$14 = _tmpl$7$e();
2494
2502
  insert(_el$14, () => tab.title || "New Tab");
2495
2503
  return _el$14;
2496
2504
  })(), createComponent(Show, {
@@ -3026,7 +3034,7 @@ const SEARCH_ENGINE_PRESETS = {
3026
3034
  ecosia: { label: "Ecosia", url: "https://www.ecosia.org/search?q=" },
3027
3035
  kagi: { label: "Kagi", url: "https://kagi.com/search?q=" }
3028
3036
  };
3029
- var _tmpl$$n = /* @__PURE__ */ template(`<div class=private-badge title="Private Browsing - history and cookies are not saved"><svg width=12 height=12 viewBox="0 0 16 16"fill=currentColor><path d="M8 1a7 7 0 100 14A7 7 0 008 1zm0 1.5a5.5 5.5 0 110 11 5.5 5.5 0 010-11zM5.5 7a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zm3.5 3.5c0-1-1.5-2-2.5-2s-2.5 1-2.5 2"></path></svg><span>Private`), _tmpl$2$m = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z">`), _tmpl$3$j = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z"></path><line x1=2 y1=12 x2=12 y2=2 stroke=currentColor stroke-width=1.5>`), _tmpl$4$j = /* @__PURE__ */ template(`<div class=security-indicator-wrapper><button>`), _tmpl$5$g = /* @__PURE__ */ template(`<div id=address-autocomplete class=autocomplete-dropdown role=listbox>`), _tmpl$6$f = /* @__PURE__ */ template(`<div><span class=agent-status-dot aria-hidden=true></span><span class=agent-status-text>`), _tmpl$7$c = /* @__PURE__ */ template(`<button class="agent-status-badge recent"title="Open the What Changed timeline"style=cursor:pointer;font-size:11px><span class=agent-status-dot aria-hidden=true style=background:#f59e0b></span><span class=agent-status-text>What Changed?`), _tmpl$8$9 = /* @__PURE__ */ template(`<span class=page-diff-burst-meta>Updated <!> times over `), _tmpl$9$8 = /* @__PURE__ */ template(`<div class=page-diff-burst-history><div class=page-diff-burst-history-label>Recent detections`), _tmpl$0$6 = /* @__PURE__ */ template(`<div class=page-diff-popup><div class=page-diff-popup-header><div class=page-diff-popup-header-copy><span>Compared with your last visit</span><span class=page-diff-burst-meta>Previous snapshot from </span></div><div style=display:flex;gap:8px;align-items:center><button class=nav-btn title="Open the full What Changed timeline"style="height:24px;min-width:auto;padding:0 8px">Timeline</button><button class=page-diff-popup-close>&times;`), _tmpl$1$6 = /* @__PURE__ */ template(`<svg><path d="M3 3 L11 3 L11 9 Q7 13 3 9 Z"fill=none stroke=currentColor stroke-width=1.2 stroke-linejoin=round></svg>`, false, true, false), _tmpl$10$6 = /* @__PURE__ */ template(`<svg><line x1=2 y1=12 x2=12 y2=2 stroke=currentColor stroke-width=1.4 stroke-linecap=round></svg>`, false, true, false), _tmpl$11$6 = /* @__PURE__ */ template(`<button class=nav-btn data-tooltip="Reader Mode"><svg width=14 height=14 viewBox="0 0 14 14"><rect x=2 y=1 width=10 height=12 rx=1 fill=none stroke=currentColor stroke-width=1.2></rect><line x1=4 y1=4 x2=10 y2=4 stroke=currentColor stroke-width=1></line><line x1=4 y1=6.5 x2=10 y2=6.5 stroke=currentColor stroke-width=1></line><line x1=4 y1=9 x2=8 y2=9 stroke=currentColor stroke-width=1>`), _tmpl$12$6 = /* @__PURE__ */ template(`<button class=nav-btn data-tooltip="Dev Tools"><svg width=14 height=14 viewBox="0 0 14 14"><polyline points="3,5 1,7 3,9"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></polyline><polyline points="11,5 13,7 11,9"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></polyline><line x1=8.5 y1=2 x2=5.5 y2=12 stroke=currentColor stroke-width=1.2 stroke-linecap=round>`), _tmpl$13$5 = /* @__PURE__ */ template(`<span class=nav-btn-badge>`), _tmpl$14$5 = /* @__PURE__ */ template(`<button class="nav-btn nav-btn-sidebar"><svg width=14 height=14 viewBox="0 0 14 14"><rect x=1 y=1 width=12 height=12 rx=1.5 fill=none stroke=currentColor stroke-width=1.2></rect><line x1=9 y1=1 x2=9 y2=13 stroke=currentColor stroke-width=1.2>`), _tmpl$15$5 = /* @__PURE__ */ template(`<button class=nav-btn data-tooltip="Clear Data">`), _tmpl$16$4 = /* @__PURE__ */ template(`<button class=nav-btn data-tooltip=Settings><svg width=14 height=14 viewBox="0 0 14 14"><circle cx=7 cy=7 r=2 fill=none stroke=currentColor stroke-width=1.2></circle><path d="M7 1v2M7 11v2M1 7h2M11 7h2M2.8 2.8l1.4 1.4M9.8 9.8l1.4 1.4M11.2 2.8l-1.4 1.4M4.2 9.8l-1.4 1.4"stroke=currentColor stroke-width=1 stroke-linecap=round>`), _tmpl$17$4 = /* @__PURE__ */ template(`<div class=address-bar><div class=nav-controls><button class=nav-btn data-tooltip=Back><svg width=14 height=14 viewBox="0 0 14 14"><path d="M9 2L4 7l5 5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=nav-btn data-tooltip=Forward><svg width=14 height=14 viewBox="0 0 14 14"><path d="M5 2l5 5-5 5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=nav-btn data-tooltip=Reload><svg width=14 height=14 viewBox="0 0 14 14"><path d="M2.5 7a4.5 4.5 0 1 1 1 3"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round></path><path d="M2 4v3.5h3.5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button></div><div class=url-shell><form class=url-form><input class=url-input type=text placeholder="Search or enter URL"autocomplete=off aria-autocomplete=list aria-controls=address-autocomplete></form></div><div class=toolbar-actions><button class=nav-btn><svg width=14 height=14 viewBox="0 0 14 14">`), _tmpl$18$4 = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z"></path><circle cx=7 cy=8 r=0.8 fill=white>`), _tmpl$19$4 = /* @__PURE__ */ template(`<div role=option><span class=autocomplete-icon></span><span class=autocomplete-text><span class=autocomplete-title></span><span class=autocomplete-url>`), _tmpl$20$4 = /* @__PURE__ */ template(`<div class=page-diff-burst-row><span class=page-diff-burst-time></span><span class=page-diff-burst-summary>`), _tmpl$21$4 = /* @__PURE__ */ template(`<span class=page-diff-burst-summary-section>`), _tmpl$22$4 = /* @__PURE__ */ template(`<span class=page-diff-burst-summary-part><span>`), _tmpl$23$4 = /* @__PURE__ */ template(`<div class=page-diff-snippet><span class=page-diff-snippet-label>Before</span><span class=page-diff-snippet-text>`), _tmpl$24$4 = /* @__PURE__ */ template(`<div class=page-diff-snippet><span class=page-diff-snippet-label>After</span><span class=page-diff-snippet-text>`), _tmpl$25$3 = /* @__PURE__ */ template(`<div class=page-diff-snippets>`), _tmpl$26$3 = /* @__PURE__ */ template(`<div class=page-diff-list-group><span class=page-diff-list-label>Added</span><ul class=page-diff-list>`), _tmpl$27$3 = /* @__PURE__ */ template(`<div class=page-diff-list-group><span class=page-diff-list-label>Removed</span><ul class=page-diff-list>`), _tmpl$28$3 = /* @__PURE__ */ template(`<div><div class=page-diff-item-header><div class=page-diff-badges><span class=page-diff-kind></span><span class=page-diff-section></span></div><span class=page-diff-summary>`), _tmpl$29$2 = /* @__PURE__ */ template(`<li>`);
3037
+ var _tmpl$$n = /* @__PURE__ */ template(`<div class=private-badge title="Private Browsing - history and cookies are not saved"><svg width=12 height=12 viewBox="0 0 16 16"fill=currentColor><path d="M8 1a7 7 0 100 14A7 7 0 008 1zm0 1.5a5.5 5.5 0 110 11 5.5 5.5 0 010-11zM5.5 7a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zm3.5 3.5c0-1-1.5-2-2.5-2s-2.5 1-2.5 2"></path></svg><span>Private`), _tmpl$2$m = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z">`), _tmpl$3$j = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z"></path><line x1=2 y1=12 x2=12 y2=2 stroke=currentColor stroke-width=1.5>`), _tmpl$4$j = /* @__PURE__ */ template(`<div class=security-indicator-wrapper><button>`), _tmpl$5$g = /* @__PURE__ */ template(`<div id=address-autocomplete class=autocomplete-dropdown role=listbox>`), _tmpl$6$f = /* @__PURE__ */ template(`<div><span class=agent-status-dot aria-hidden=true></span><span class=agent-status-text>`), _tmpl$7$d = /* @__PURE__ */ template(`<button class="agent-status-badge recent"title="Open the What Changed timeline"style=cursor:pointer;font-size:11px><span class=agent-status-dot aria-hidden=true style=background:#f59e0b></span><span class=agent-status-text>What Changed?`), _tmpl$8$9 = /* @__PURE__ */ template(`<span class=page-diff-burst-meta>Updated <!> times over `), _tmpl$9$8 = /* @__PURE__ */ template(`<div class=page-diff-burst-history><div class=page-diff-burst-history-label>Recent detections`), _tmpl$0$6 = /* @__PURE__ */ template(`<div class=page-diff-popup><div class=page-diff-popup-header><div class=page-diff-popup-header-copy><span>Compared with your last visit</span><span class=page-diff-burst-meta>Previous snapshot from </span></div><div style=display:flex;gap:8px;align-items:center><button class=nav-btn title="Open the full What Changed timeline"style="height:24px;min-width:auto;padding:0 8px">Timeline</button><button class=page-diff-popup-close>&times;`), _tmpl$1$6 = /* @__PURE__ */ template(`<svg><path d="M3 3 L11 3 L11 9 Q7 13 3 9 Z"fill=none stroke=currentColor stroke-width=1.2 stroke-linejoin=round></svg>`, false, true, false), _tmpl$10$6 = /* @__PURE__ */ template(`<svg><line x1=2 y1=12 x2=12 y2=2 stroke=currentColor stroke-width=1.4 stroke-linecap=round></svg>`, false, true, false), _tmpl$11$6 = /* @__PURE__ */ template(`<button class=nav-btn data-tooltip="Reader Mode"><svg width=14 height=14 viewBox="0 0 14 14"><rect x=2 y=1 width=10 height=12 rx=1 fill=none stroke=currentColor stroke-width=1.2></rect><line x1=4 y1=4 x2=10 y2=4 stroke=currentColor stroke-width=1></line><line x1=4 y1=6.5 x2=10 y2=6.5 stroke=currentColor stroke-width=1></line><line x1=4 y1=9 x2=8 y2=9 stroke=currentColor stroke-width=1>`), _tmpl$12$6 = /* @__PURE__ */ template(`<button class=nav-btn data-tooltip="Dev Tools"><svg width=14 height=14 viewBox="0 0 14 14"><polyline points="3,5 1,7 3,9"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></polyline><polyline points="11,5 13,7 11,9"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></polyline><line x1=8.5 y1=2 x2=5.5 y2=12 stroke=currentColor stroke-width=1.2 stroke-linecap=round>`), _tmpl$13$5 = /* @__PURE__ */ template(`<span class=nav-btn-badge>`), _tmpl$14$5 = /* @__PURE__ */ template(`<button class="nav-btn nav-btn-sidebar"><svg width=14 height=14 viewBox="0 0 14 14"><rect x=1 y=1 width=12 height=12 rx=1.5 fill=none stroke=currentColor stroke-width=1.2></rect><line x1=9 y1=1 x2=9 y2=13 stroke=currentColor stroke-width=1.2>`), _tmpl$15$5 = /* @__PURE__ */ template(`<button class=nav-btn data-tooltip="Clear Data">`), _tmpl$16$4 = /* @__PURE__ */ template(`<button class=nav-btn data-tooltip=Settings><svg width=14 height=14 viewBox="0 0 14 14"><circle cx=7 cy=7 r=2 fill=none stroke=currentColor stroke-width=1.2></circle><path d="M7 1v2M7 11v2M1 7h2M11 7h2M2.8 2.8l1.4 1.4M9.8 9.8l1.4 1.4M11.2 2.8l-1.4 1.4M4.2 9.8l-1.4 1.4"stroke=currentColor stroke-width=1 stroke-linecap=round>`), _tmpl$17$4 = /* @__PURE__ */ template(`<div class=address-bar><div class=nav-controls><button class=nav-btn data-tooltip=Back><svg width=14 height=14 viewBox="0 0 14 14"><path d="M9 2L4 7l5 5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=nav-btn data-tooltip=Forward><svg width=14 height=14 viewBox="0 0 14 14"><path d="M5 2l5 5-5 5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=nav-btn data-tooltip=Reload><svg width=14 height=14 viewBox="0 0 14 14"><path d="M2.5 7a4.5 4.5 0 1 1 1 3"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round></path><path d="M2 4v3.5h3.5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button></div><div class=url-shell><form class=url-form><input class=url-input type=text placeholder="Search or enter URL"autocomplete=off aria-autocomplete=list aria-controls=address-autocomplete></form></div><div class=toolbar-actions><button class=nav-btn><svg width=14 height=14 viewBox="0 0 14 14">`), _tmpl$18$4 = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z"></path><circle cx=7 cy=8 r=0.8 fill=white>`), _tmpl$19$4 = /* @__PURE__ */ template(`<div role=option><span class=autocomplete-icon></span><span class=autocomplete-text><span class=autocomplete-title></span><span class=autocomplete-url>`), _tmpl$20$4 = /* @__PURE__ */ template(`<div class=page-diff-burst-row><span class=page-diff-burst-time></span><span class=page-diff-burst-summary>`), _tmpl$21$4 = /* @__PURE__ */ template(`<span class=page-diff-burst-summary-section>`), _tmpl$22$4 = /* @__PURE__ */ template(`<span class=page-diff-burst-summary-part><span>`), _tmpl$23$4 = /* @__PURE__ */ template(`<div class=page-diff-snippet><span class=page-diff-snippet-label>Before</span><span class=page-diff-snippet-text>`), _tmpl$24$4 = /* @__PURE__ */ template(`<div class=page-diff-snippet><span class=page-diff-snippet-label>After</span><span class=page-diff-snippet-text>`), _tmpl$25$3 = /* @__PURE__ */ template(`<div class=page-diff-snippets>`), _tmpl$26$3 = /* @__PURE__ */ template(`<div class=page-diff-list-group><span class=page-diff-list-label>Added</span><ul class=page-diff-list>`), _tmpl$27$3 = /* @__PURE__ */ template(`<div class=page-diff-list-group><span class=page-diff-list-label>Removed</span><ul class=page-diff-list>`), _tmpl$28$3 = /* @__PURE__ */ template(`<div><div class=page-diff-item-header><div class=page-diff-badges><span class=page-diff-kind></span><span class=page-diff-section></span></div><span class=page-diff-summary>`), _tmpl$29$3 = /* @__PURE__ */ template(`<li>`);
3030
3038
  const AddressBar = (props) => {
3031
3039
  const {
3032
3040
  activeTab,
@@ -3479,7 +3487,7 @@ const AddressBar = (props) => {
3479
3487
  return pageDiff();
3480
3488
  },
3481
3489
  get children() {
3482
- var _el$18 = _tmpl$7$c();
3490
+ var _el$18 = _tmpl$7$d();
3483
3491
  _el$18.$$click = () => void openDiffTimeline();
3484
3492
  return _el$18;
3485
3493
  }
@@ -3600,7 +3608,7 @@ const AddressBar = (props) => {
3600
3608
  return change.addedItems;
3601
3609
  },
3602
3610
  children: (item) => (() => {
3603
- var _el$80 = _tmpl$29$2();
3611
+ var _el$80 = _tmpl$29$3();
3604
3612
  insert(_el$80, item);
3605
3613
  return _el$80;
3606
3614
  })()
@@ -3619,7 +3627,7 @@ const AddressBar = (props) => {
3619
3627
  return change.removedItems;
3620
3628
  },
3621
3629
  children: (item) => (() => {
3622
- var _el$81 = _tmpl$29$2();
3630
+ var _el$81 = _tmpl$29$3();
3623
3631
  insert(_el$81, item);
3624
3632
  return _el$81;
3625
3633
  })()
@@ -3870,7 +3878,7 @@ const HighlightNotifications = (props) => {
3870
3878
  });
3871
3879
  };
3872
3880
  delegateEvents(["click"]);
3873
- var _tmpl$$k = /* @__PURE__ */ template(`<div class=download-toast-stack aria-live=polite>`), _tmpl$2$k = /* @__PURE__ */ template(`<span class=download-toast-done>&#10003;`), _tmpl$3$i = /* @__PURE__ */ template(`<span class=download-toast-failed>!`), _tmpl$4$i = /* @__PURE__ */ template(`<div class=download-toast-bar-track><div class=download-toast-bar-fill>`), _tmpl$5$f = /* @__PURE__ */ template(`<div class=download-toast-size>`), _tmpl$6$e = /* @__PURE__ */ template(`<div class="download-toast-size download-toast-size-done"> downloaded`), _tmpl$7$b = /* @__PURE__ */ template(`<div class=download-toast role=status><div class=download-toast-header><span class=download-toast-filename>`);
3881
+ var _tmpl$$k = /* @__PURE__ */ template(`<div class=download-toast-stack aria-live=polite>`), _tmpl$2$k = /* @__PURE__ */ template(`<span class=download-toast-done>&#10003;`), _tmpl$3$i = /* @__PURE__ */ template(`<span class=download-toast-failed>!`), _tmpl$4$i = /* @__PURE__ */ template(`<div class=download-toast-bar-track><div class=download-toast-bar-fill>`), _tmpl$5$f = /* @__PURE__ */ template(`<div class=download-toast-size>`), _tmpl$6$e = /* @__PURE__ */ template(`<div class="download-toast-size download-toast-size-done"> downloaded`), _tmpl$7$c = /* @__PURE__ */ template(`<div class=download-toast role=status><div class=download-toast-header><span class=download-toast-filename>`);
3874
3882
  const TOAST_DONE_DURATION_MS = 4200;
3875
3883
  const TOAST_EXIT_MS = 300;
3876
3884
  function formatBytes$1(bytes) {
@@ -3967,7 +3975,7 @@ const DownloadToast = () => {
3967
3975
  return downloads();
3968
3976
  },
3969
3977
  children: (dl) => (() => {
3970
- var _el$2 = _tmpl$7$b(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild;
3978
+ var _el$2 = _tmpl$7$c(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild;
3971
3979
  insert(_el$4, () => dl.filename);
3972
3980
  insert(_el$3, createComponent(Show, {
3973
3981
  get when() {
@@ -4334,7 +4342,7 @@ function formatTime(iso, options) {
4334
4342
  ...options?.includeSeconds && { second: "2-digit" }
4335
4343
  });
4336
4344
  }
4337
- var _tmpl$$g = /* @__PURE__ */ template(`<div class=agent-summary-hud>`), _tmpl$2$g = /* @__PURE__ */ template(`<span class=agent-transcript-live><span class=agent-transcript-live-dot aria-hidden=true></span>Live`), _tmpl$3$f = /* @__PURE__ */ template(`<div class=agent-transcript-list>`), _tmpl$4$f = /* @__PURE__ */ template(`<aside class=agent-transcript-dock><div class=agent-transcript-header><div class=agent-transcript-title-row><span class=agent-transcript-title>Agent Transcript</span></div><div class=agent-transcript-actions><button class=agent-transcript-icon></button><button class=agent-transcript-icon data-tooltip=Hide>×`), _tmpl$5$d = /* @__PURE__ */ template(`<span class=agent-summary-live-dot aria-hidden=true>`), _tmpl$6$d = /* @__PURE__ */ template(`<span class=agent-summary-text>: `), _tmpl$7$a = /* @__PURE__ */ template(`<article><div class=agent-transcript-meta><span class=agent-transcript-badge></span><span class=agent-transcript-time></span></div><div class=agent-transcript-text>`);
4345
+ var _tmpl$$g = /* @__PURE__ */ template(`<div class=agent-summary-hud>`), _tmpl$2$g = /* @__PURE__ */ template(`<span class=agent-transcript-live><span class=agent-transcript-live-dot aria-hidden=true></span>Live`), _tmpl$3$f = /* @__PURE__ */ template(`<div class=agent-transcript-list>`), _tmpl$4$f = /* @__PURE__ */ template(`<aside class=agent-transcript-dock><div class=agent-transcript-header><div class=agent-transcript-title-row><span class=agent-transcript-title>Agent Transcript</span></div><div class=agent-transcript-actions><button class=agent-transcript-icon></button><button class=agent-transcript-icon data-tooltip=Hide>×`), _tmpl$5$d = /* @__PURE__ */ template(`<span class=agent-summary-live-dot aria-hidden=true>`), _tmpl$6$d = /* @__PURE__ */ template(`<span class=agent-summary-text>: `), _tmpl$7$b = /* @__PURE__ */ template(`<article><div class=agent-transcript-meta><span class=agent-transcript-badge></span><span class=agent-transcript-time></span></div><div class=agent-transcript-text>`);
4338
4346
  const AgentTranscriptDock = () => {
4339
4347
  const {
4340
4348
  runtimeState: runtimeState2
@@ -4426,7 +4434,7 @@ const AgentTranscriptDock = () => {
4426
4434
  return visibleEntries();
4427
4435
  },
4428
4436
  children: (entry) => (() => {
4429
- var _el$12 = _tmpl$7$a(), _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$13.nextSibling;
4437
+ var _el$12 = _tmpl$7$b(), _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$13.nextSibling;
4430
4438
  insert(_el$14, () => entry.title || entry.kind);
4431
4439
  insert(_el$15, () => formatTime(entry.updatedAt));
4432
4440
  insert(_el$16, () => entry.text);
@@ -4861,7 +4869,101 @@ function useAnimatedPresence(isOpen, exitDurationMs) {
4861
4869
  });
4862
4870
  return { visible, closing };
4863
4871
  }
4864
- var _tmpl$$f = /* @__PURE__ */ template(`<div class=command-bar-no-provider><p>Configure a chat provider to start using the AI assistant.</p><button class=command-bar-no-provider-btn>Open Settings <kbd>Ctrl+,`), _tmpl$2$f = /* @__PURE__ */ template(`<div class=command-bar-recent><span class=command-bar-recent-label>Recent</span><div class=command-bar-recent-list>`), _tmpl$3$e = /* @__PURE__ */ template(`<span>Try "summarize" or ask a question`), _tmpl$4$e = /* @__PURE__ */ template(`<div class=command-bar-overlay><div class=command-bar><form><div class=command-bar-icon><svg width=16 height=16 viewBox="0 0 16 16"><circle cx=8 cy=8 r=6 fill=none stroke=var(--accent-primary) stroke-width=1.5></circle><circle cx=6 cy=7 r=0.8 fill=var(--accent-primary)></circle><circle cx=10 cy=7 r=0.8 fill=var(--accent-primary)></circle><path d="M6 10c0.5 0.8 3.5 0.8 4 0"fill=none stroke=var(--accent-primary) stroke-width=0.8 stroke-linecap=round></path></svg></div><input class=command-bar-input type=text></form><div class=command-bar-hints><span><kbd>Enter</kbd> to ask</span><span><kbd>Esc</kbd> to close`), _tmpl$5$c = /* @__PURE__ */ template(`<button class=command-bar-recent-item type=button>`), _tmpl$6$c = /* @__PURE__ */ template(`<span>Set up a provider in Settings first`);
4872
+ function useProviderAuthSetup(options = {}) {
4873
+ const [codexAuthStatus, setCodexAuthStatus] = createSignal("idle");
4874
+ const [codexAccountEmail, setCodexAccountEmail] = createSignal("");
4875
+ const [codexAuthError, setCodexAuthError] = createSignal("");
4876
+ const [openRouterAuthStatus, setOpenRouterAuthStatus] = createSignal("idle");
4877
+ const [openRouterAuthError, setOpenRouterAuthError] = createSignal("");
4878
+ const markProviderConnected = (providerId, hasApiKey) => {
4879
+ setCodexAuthStatus(providerId === "openai_codex" && hasApiKey ? "connected" : "idle");
4880
+ setOpenRouterAuthStatus(providerId === "openrouter" && hasApiKey ? "connected" : "idle");
4881
+ };
4882
+ const startCodexAuth = async () => {
4883
+ setCodexAuthStatus("waiting");
4884
+ setCodexAuthError("");
4885
+ try {
4886
+ const result = await window.vessel.codex.startAuth();
4887
+ if (result.ok) {
4888
+ setCodexAccountEmail(result.accountEmail);
4889
+ setCodexAuthStatus("connected");
4890
+ await options.onCodexConnected?.();
4891
+ } else {
4892
+ setCodexAuthStatus("error");
4893
+ setCodexAuthError(result.error);
4894
+ }
4895
+ } catch (err) {
4896
+ setCodexAuthStatus("error");
4897
+ setCodexAuthError(err instanceof Error ? err.message : "Unknown error");
4898
+ }
4899
+ };
4900
+ const disconnectCodex = async () => {
4901
+ await window.vessel.codex.disconnect();
4902
+ setCodexAuthStatus("idle");
4903
+ setCodexAccountEmail("");
4904
+ await options.onCodexDisconnected?.();
4905
+ };
4906
+ const startOpenRouterAuth = async () => {
4907
+ setOpenRouterAuthStatus("waiting");
4908
+ setOpenRouterAuthError("");
4909
+ try {
4910
+ const result = await window.vessel.openrouter.startAuth();
4911
+ if (result.ok) {
4912
+ setOpenRouterAuthStatus("connected");
4913
+ await options.onOpenRouterConnected?.(result);
4914
+ } else {
4915
+ setOpenRouterAuthStatus("error");
4916
+ setOpenRouterAuthError(result.error);
4917
+ }
4918
+ } catch (err) {
4919
+ const message = err instanceof Error ? err.message : "Unknown error";
4920
+ setOpenRouterAuthStatus("error");
4921
+ setOpenRouterAuthError(message);
4922
+ }
4923
+ };
4924
+ onMount(() => {
4925
+ const unsubCodex = window.vessel.codex.onAuthStatus((payload) => {
4926
+ if (payload.status === "waiting") {
4927
+ setCodexAuthStatus("waiting");
4928
+ } else if (payload.status === "exchanging") {
4929
+ setCodexAuthStatus("exchanging");
4930
+ } else if (payload.status === "error") {
4931
+ setCodexAuthStatus("error");
4932
+ setCodexAuthError(payload.error || "Unknown error");
4933
+ }
4934
+ });
4935
+ const unsubOpenRouter = window.vessel.openrouter.onAuthStatus((payload) => {
4936
+ if (payload.status === "waiting") {
4937
+ setOpenRouterAuthStatus("waiting");
4938
+ } else if (payload.status === "exchanging") {
4939
+ setOpenRouterAuthStatus("exchanging");
4940
+ } else if (payload.status === "connected") {
4941
+ setOpenRouterAuthStatus("connected");
4942
+ } else if (payload.status === "error") {
4943
+ setOpenRouterAuthStatus("error");
4944
+ setOpenRouterAuthError(payload.error || "Unknown error");
4945
+ }
4946
+ });
4947
+ onCleanup(() => {
4948
+ unsubCodex();
4949
+ unsubOpenRouter();
4950
+ });
4951
+ });
4952
+ return {
4953
+ codexAuthStatus,
4954
+ codexAccountEmail,
4955
+ setCodexAccountEmail,
4956
+ codexAuthError,
4957
+ setCodexAuthError,
4958
+ openRouterAuthStatus,
4959
+ openRouterAuthError,
4960
+ markProviderConnected,
4961
+ startCodexAuth,
4962
+ disconnectCodex,
4963
+ startOpenRouterAuth
4964
+ };
4965
+ }
4966
+ var _tmpl$$f = /* @__PURE__ */ template(`<p class=command-bar-no-provider-error>`), _tmpl$2$f = /* @__PURE__ */ template(`<div class=command-bar-no-provider><p>Start with OpenRouter's free model router, or open Settings for more providers.</p><button class=command-bar-no-provider-btn></button><button class=command-bar-no-provider-link>More options`), _tmpl$3$e = /* @__PURE__ */ template(`<div class=command-bar-recent><span class=command-bar-recent-label>Recent</span><div class=command-bar-recent-list>`), _tmpl$4$e = /* @__PURE__ */ template(`<span>Try "summarize" or ask a question`), _tmpl$5$c = /* @__PURE__ */ template(`<div class=command-bar-overlay><div class=command-bar><form><div class=command-bar-icon><svg width=16 height=16 viewBox="0 0 16 16"><circle cx=8 cy=8 r=6 fill=none stroke=var(--accent-primary) stroke-width=1.5></circle><circle cx=6 cy=7 r=0.8 fill=var(--accent-primary)></circle><circle cx=10 cy=7 r=0.8 fill=var(--accent-primary)></circle><path d="M6 10c0.5 0.8 3.5 0.8 4 0"fill=none stroke=var(--accent-primary) stroke-width=0.8 stroke-linecap=round></path></svg></div><input class=command-bar-input type=text></form><div class=command-bar-hints><span><kbd>Enter</kbd> to ask</span><span><kbd>Esc</kbd> to close`), _tmpl$6$c = /* @__PURE__ */ template(`<button class=command-bar-recent-item type=button>`), _tmpl$7$a = /* @__PURE__ */ template(`<span>Set up a provider in Settings first`);
4865
4967
  const COMMAND_BAR_EXIT_MS = 200;
4866
4968
  const CommandBar = () => {
4867
4969
  const {
@@ -4881,8 +4983,18 @@ const CommandBar = () => {
4881
4983
  cancel
4882
4984
  } = useAI();
4883
4985
  const [input, setInput] = createSignal("");
4884
- const [settings] = createResource(() => commandBarOpen2(), async (open) => open ? window.vessel.settings.get() : null);
4986
+ let inputRef;
4987
+ const [settings, {
4988
+ refetch: refetchSettings
4989
+ }] = createResource(() => commandBarOpen2(), async (open) => open ? window.vessel.settings.get() : null);
4990
+ const providerAuth = useProviderAuthSetup({
4991
+ onOpenRouterConnected: async () => {
4992
+ await refetchSettings();
4993
+ setTimeout(() => inputRef?.focus(), 0);
4994
+ }
4995
+ });
4885
4996
  const hasProvider = () => settings()?.chatProvider !== null && settings()?.chatProvider !== void 0;
4997
+ const openRouterWorking = () => providerAuth.openRouterAuthStatus() === "waiting" || providerAuth.openRouterAuthStatus() === "exchanging";
4886
4998
  const handleSubmit = async (e) => {
4887
4999
  e.preventDefault();
4888
5000
  const val = input().trim();
@@ -4908,6 +5020,7 @@ const CommandBar = () => {
4908
5020
  }
4909
5021
  };
4910
5022
  const setRef = (el) => {
5023
+ inputRef = el;
4911
5024
  setTimeout(() => el.focus(), 0);
4912
5025
  };
4913
5026
  return createComponent(Show, {
@@ -4915,8 +5028,8 @@ const CommandBar = () => {
4915
5028
  return visible();
4916
5029
  },
4917
5030
  get children() {
4918
- var _el$ = _tmpl$4$e(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$10 = _el$3.nextSibling, _el$11 = _el$10.firstChild;
4919
- _el$11.nextSibling;
5031
+ var _el$ = _tmpl$5$c(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$12 = _el$3.nextSibling, _el$13 = _el$12.firstChild;
5032
+ _el$13.nextSibling;
4920
5033
  addEventListener(_el$, "click", closeCommandBar, true);
4921
5034
  _el$2.$$click = (e) => e.stopPropagation();
4922
5035
  _el$3.addEventListener("submit", handleSubmit);
@@ -4929,43 +5042,62 @@ const CommandBar = () => {
4929
5042
  return !hasProvider();
4930
5043
  },
4931
5044
  get children() {
4932
- var _el$6 = _tmpl$$f(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
4933
- _el$8.$$click = () => {
5045
+ var _el$6 = _tmpl$2$f(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling;
5046
+ _el$8.$$click = () => void providerAuth.startOpenRouterAuth();
5047
+ insert(_el$8, createComponent(Show, {
5048
+ get when() {
5049
+ return !openRouterWorking();
5050
+ },
5051
+ fallback: "Opening OpenRouter...",
5052
+ children: "Start free with OpenRouter"
5053
+ }));
5054
+ _el$9.$$click = () => {
4934
5055
  closeCommandBar();
4935
5056
  openSettings();
4936
5057
  };
5058
+ insert(_el$6, createComponent(Show, {
5059
+ get when() {
5060
+ return providerAuth.openRouterAuthStatus() === "error";
5061
+ },
5062
+ get children() {
5063
+ var _el$0 = _tmpl$$f();
5064
+ insert(_el$0, () => providerAuth.openRouterAuthError());
5065
+ return _el$0;
5066
+ }
5067
+ }), null);
5068
+ createRenderEffect(() => _el$8.disabled = openRouterWorking());
4937
5069
  return _el$6;
4938
5070
  }
4939
- }), _el$10);
5071
+ }), _el$12);
4940
5072
  insert(_el$2, createComponent(Show, {
4941
5073
  get when() {
4942
5074
  return memo(() => !!(hasProvider() && recentQueries2().length > 0))() && !input().trim();
4943
5075
  },
4944
5076
  get children() {
4945
- var _el$9 = _tmpl$2$f(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
4946
- insert(_el$1, createComponent(For, {
5077
+ var _el$1 = _tmpl$3$e(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
5078
+ insert(_el$11, createComponent(For, {
4947
5079
  get each() {
4948
5080
  return recentQueries2();
4949
5081
  },
4950
5082
  children: (q) => (() => {
4951
- var _el$14 = _tmpl$5$c();
4952
- _el$14.$$click = () => void handleRecentClick(q);
4953
- insert(_el$14, q);
4954
- return _el$14;
5083
+ var _el$16 = _tmpl$6$c();
5084
+ _el$16.$$click = () => void handleRecentClick(q);
5085
+ insert(_el$16, q);
5086
+ return _el$16;
4955
5087
  })()
4956
5088
  }));
4957
- return _el$9;
5089
+ return _el$1;
4958
5090
  }
4959
- }), _el$10);
4960
- insert(_el$10, createComponent(Show, {
5091
+ }), _el$12);
5092
+ insert(_el$12, createComponent(Show, {
4961
5093
  get when() {
4962
5094
  return hasProvider();
4963
5095
  },
4964
5096
  get fallback() {
4965
- return _tmpl$6$c();
5097
+ return _tmpl$7$a();
4966
5098
  },
4967
5099
  get children() {
4968
- return _tmpl$3$e();
5100
+ return _tmpl$4$e();
4969
5101
  }
4970
5102
  }), null);
4971
5103
  createRenderEffect((_p$) => {
@@ -5136,22 +5268,49 @@ function buildAndRememberBookmarkContext(args) {
5136
5268
  rememberedSummary: remembered?.summary ?? null
5137
5269
  });
5138
5270
  }
5139
- const {
5140
- entries,
5141
- setPrototypeOf,
5142
- isFrozen,
5143
- getPrototypeOf,
5144
- getOwnPropertyDescriptor
5145
- } = Object;
5146
- let {
5147
- freeze,
5148
- seal,
5149
- create
5150
- } = Object;
5151
- let {
5152
- apply,
5153
- construct
5154
- } = typeof Reflect !== "undefined" && Reflect;
5271
+ function _arrayLikeToArray(r, a) {
5272
+ (null == a || a > r.length) && (a = r.length);
5273
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
5274
+ return n;
5275
+ }
5276
+ function _arrayWithHoles(r) {
5277
+ if (Array.isArray(r)) return r;
5278
+ }
5279
+ function _iterableToArrayLimit(r, l) {
5280
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
5281
+ if (null != t) {
5282
+ var e, n, i, u, a = [], f = true, o = false;
5283
+ try {
5284
+ if (i = (t = t.call(r)).next, 0 === l) ;
5285
+ else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ;
5286
+ } catch (r2) {
5287
+ o = true, n = r2;
5288
+ } finally {
5289
+ try {
5290
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
5291
+ } finally {
5292
+ if (o) throw n;
5293
+ }
5294
+ }
5295
+ return a;
5296
+ }
5297
+ }
5298
+ function _nonIterableRest() {
5299
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5300
+ }
5301
+ function _slicedToArray(r, e) {
5302
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
5303
+ }
5304
+ function _unsupportedIterableToArray(r, a) {
5305
+ if (r) {
5306
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
5307
+ var t = {}.toString.call(r).slice(8, -1);
5308
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
5309
+ }
5310
+ }
5311
+ const entries = Object.entries, setPrototypeOf = Object.setPrototypeOf, isFrozen = Object.isFrozen, getPrototypeOf = Object.getPrototypeOf, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
5312
+ let freeze = Object.freeze, seal = Object.seal, create = Object.create;
5313
+ let _ref = typeof Reflect !== "undefined" && Reflect, apply = _ref.apply, construct = _ref.construct;
5155
5314
  if (!freeze) {
5156
5315
  freeze = function freeze2(x) {
5157
5316
  return x;
@@ -5252,7 +5411,10 @@ function cleanArray(array) {
5252
5411
  }
5253
5412
  function clone(object) {
5254
5413
  const newObject = create(null);
5255
- for (const [property, value] of entries(object)) {
5414
+ for (const _ref2 of entries(object)) {
5415
+ var _ref3 = _slicedToArray(_ref2, 2);
5416
+ const property = _ref3[0];
5417
+ const value = _ref3[1];
5256
5418
  const isPropertyExist = objectHasOwnProperty(object, property);
5257
5419
  if (isPropertyExist) {
5258
5420
  if (arrayIsArray(value)) {
@@ -5337,13 +5499,13 @@ const svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "
5337
5499
  const mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
5338
5500
  const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
5339
5501
  const text = freeze(["#text"]);
5340
- const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]);
5502
+ const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]);
5341
5503
  const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
5342
5504
  const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
5343
5505
  const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
5344
- const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
5345
- const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
5346
- const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm);
5506
+ const MUSTACHE_EXPR = seal(/{{[\w\W]*|^[\w\W]*}}/g);
5507
+ const ERB_EXPR = seal(/<%[\w\W]*|^[\w\W]*%>/g);
5508
+ const TMPLIT_EXPR = seal(/\${[\w\W]*/g);
5347
5509
  const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
5348
5510
  const ARIA_ATTR = seal(/^aria-[\-\w]+$/);
5349
5511
  const IS_ALLOWED_URI = seal(
@@ -5357,26 +5519,22 @@ const ATTR_WHITESPACE = seal(
5357
5519
  );
5358
5520
  const DOCTYPE_NAME = seal(/^html$/i);
5359
5521
  const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
5360
- var EXPRESSIONS = /* @__PURE__ */ Object.freeze({
5361
- __proto__: null,
5362
- ARIA_ATTR,
5363
- ATTR_WHITESPACE,
5364
- CUSTOM_ELEMENT,
5365
- DATA_ATTR,
5366
- DOCTYPE_NAME,
5367
- ERB_EXPR,
5368
- IS_ALLOWED_URI,
5369
- IS_SCRIPT_OR_DATA,
5370
- MUSTACHE_EXPR,
5371
- TMPLIT_EXPR
5372
- });
5373
5522
  const NODE_TYPE = {
5374
5523
  element: 1,
5524
+ attribute: 2,
5375
5525
  text: 3,
5526
+ cdataSection: 4,
5527
+ entityReference: 5,
5528
+ // Deprecated
5529
+ entityNode: 6,
5376
5530
  // Deprecated
5377
5531
  progressingInstruction: 7,
5378
5532
  comment: 8,
5379
- document: 9
5533
+ document: 9,
5534
+ documentType: 10,
5535
+ documentFragment: 11,
5536
+ notation: 12
5537
+ // Deprecated
5380
5538
  };
5381
5539
  const getGlobal = function getGlobal2() {
5382
5540
  return typeof window === "undefined" ? null : window;
@@ -5421,34 +5579,30 @@ const _createHooksMap = function _createHooksMap2() {
5421
5579
  function createDOMPurify() {
5422
5580
  let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
5423
5581
  const DOMPurify = (root2) => createDOMPurify(root2);
5424
- DOMPurify.version = "3.4.2";
5582
+ DOMPurify.version = "3.4.7";
5425
5583
  DOMPurify.removed = [];
5426
5584
  if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
5427
5585
  DOMPurify.isSupported = false;
5428
5586
  return DOMPurify;
5429
5587
  }
5430
- let {
5431
- document: document2
5432
- } = window2;
5588
+ let document2 = window2.document;
5433
5589
  const originalDocument = document2;
5434
5590
  const currentScript = originalDocument.currentScript;
5435
- const {
5436
- DocumentFragment,
5437
- HTMLTemplateElement,
5438
- Node,
5439
- Element,
5440
- NodeFilter,
5441
- NamedNodeMap = window2.NamedNodeMap || window2.MozNamedAttrMap,
5442
- HTMLFormElement,
5443
- DOMParser,
5444
- trustedTypes
5445
- } = window2;
5591
+ window2.DocumentFragment;
5592
+ const HTMLTemplateElement = window2.HTMLTemplateElement, Node = window2.Node, Element = window2.Element, NodeFilter = window2.NodeFilter, _window$NamedNodeMap = window2.NamedNodeMap;
5593
+ _window$NamedNodeMap === void 0 ? window2.NamedNodeMap || window2.MozNamedAttrMap : _window$NamedNodeMap;
5594
+ window2.HTMLFormElement;
5595
+ const DOMParser = window2.DOMParser, trustedTypes = window2.trustedTypes;
5446
5596
  const ElementPrototype = Element.prototype;
5447
5597
  const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
5448
5598
  const remove = lookupGetter(ElementPrototype, "remove");
5449
5599
  const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
5450
5600
  const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
5451
5601
  const getParentNode = lookupGetter(ElementPrototype, "parentNode");
5602
+ const getShadowRoot = lookupGetter(ElementPrototype, "shadowRoot");
5603
+ const getAttributes = lookupGetter(ElementPrototype, "attributes");
5604
+ const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeType") : null;
5605
+ const getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeName") : null;
5452
5606
  if (typeof HTMLTemplateElement === "function") {
5453
5607
  const template2 = document2.createElement("template");
5454
5608
  if (template2.content && template2.content.ownerDocument) {
@@ -5457,30 +5611,12 @@ function createDOMPurify() {
5457
5611
  }
5458
5612
  let trustedTypesPolicy;
5459
5613
  let emptyHTML = "";
5460
- const {
5461
- implementation,
5462
- createNodeIterator,
5463
- createDocumentFragment,
5464
- getElementsByTagName
5465
- } = document2;
5466
- const {
5467
- importNode
5468
- } = originalDocument;
5614
+ const _document = document2, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;
5615
+ const importNode = originalDocument.importNode;
5469
5616
  let hooks = _createHooksMap();
5470
5617
  DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
5471
- const {
5472
- MUSTACHE_EXPR: MUSTACHE_EXPR2,
5473
- ERB_EXPR: ERB_EXPR2,
5474
- TMPLIT_EXPR: TMPLIT_EXPR2,
5475
- DATA_ATTR: DATA_ATTR2,
5476
- ARIA_ATTR: ARIA_ATTR2,
5477
- IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2,
5478
- ATTR_WHITESPACE: ATTR_WHITESPACE2,
5479
- CUSTOM_ELEMENT: CUSTOM_ELEMENT2
5480
- } = EXPRESSIONS;
5481
- let {
5482
- IS_ALLOWED_URI: IS_ALLOWED_URI$1
5483
- } = EXPRESSIONS;
5618
+ const MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, TMPLIT_EXPR$1 = TMPLIT_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE, CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;
5619
+ let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
5484
5620
  let ALLOWED_TAGS = null;
5485
5621
  const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
5486
5622
  let ALLOWED_ATTR = null;
@@ -5708,6 +5844,12 @@ function createDOMPurify() {
5708
5844
  emptyHTML = trustedTypesPolicy.createHTML("");
5709
5845
  }
5710
5846
  }
5847
+ if ((hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) && ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
5848
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
5849
+ }
5850
+ if (hooks.uponSanitizeAttribute.length > 0 && ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
5851
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
5852
+ }
5711
5853
  if (freeze) {
5712
5854
  freeze(cfg);
5713
5855
  }
@@ -5841,11 +5983,77 @@ function createDOMPurify() {
5841
5983
  null
5842
5984
  );
5843
5985
  };
5986
+ const _scrubTemplateExpressions = function _scrubTemplateExpressions2(node) {
5987
+ node.normalize();
5988
+ const walker = createNodeIterator.call(
5989
+ node.ownerDocument || node,
5990
+ node,
5991
+ // eslint-disable-next-line no-bitwise
5992
+ NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION,
5993
+ null
5994
+ );
5995
+ let currentNode = walker.nextNode();
5996
+ while (currentNode) {
5997
+ let data = currentNode.data;
5998
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
5999
+ data = stringReplace(data, expr, " ");
6000
+ });
6001
+ currentNode.data = data;
6002
+ currentNode = walker.nextNode();
6003
+ }
6004
+ };
5844
6005
  const _isClobbered = function _isClobbered2(element) {
5845
- return element instanceof HTMLFormElement && (typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function");
6006
+ const realTagName = getNodeName ? getNodeName(element) : null;
6007
+ if (typeof realTagName !== "string") {
6008
+ return false;
6009
+ }
6010
+ if (transformCaseFunc(realTagName) !== "form") {
6011
+ return false;
6012
+ }
6013
+ return typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || // Realm-safe NamedNodeMap detection: equality against the cached
6014
+ // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
6015
+ // makes the direct read diverge from the cached read; a clean form
6016
+ // (same-realm OR foreign-realm) has both reads pointing at the same
6017
+ // canonical NamedNodeMap.
6018
+ element.attributes !== getAttributes(element) || typeof element.removeAttribute !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
6019
+ // returns the integer 1 for any Element regardless of realm; direct
6020
+ // read on a clobbered form (e.g. <input name="nodeType">) returns
6021
+ // the named child element. Cheap addition — nodeType is read from
6022
+ // an internal slot, no serialization cost — and removes a residual
6023
+ // clobbering surface used by several mXSS / PI / comment branches
6024
+ // in _sanitizeElements that compare currentNode.nodeType directly.
6025
+ element.nodeType !== getNodeType(element) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
6026
+ // "childNodes" shadows the prototype getter. Direct reads of
6027
+ // form.childNodes from a clobbered form return the named child
6028
+ // instead of the real NodeList, so any walk that reads it directly
6029
+ // skips the form's real children. Compare the direct read to the
6030
+ // cached Node.prototype getter — when the form's named-property
6031
+ // getter intercepts the read, the two values differ and we flag
6032
+ // the form. This catches every clobbering child type (input,
6033
+ // select, etc.) regardless of whether the named child happens to
6034
+ // carry a numeric .length, which a typeof-based probe would miss
6035
+ // (e.g. HTMLSelectElement.length is a defined unsigned-long).
6036
+ element.childNodes !== getChildNodes(element);
6037
+ };
6038
+ const _isDocumentFragment = function _isDocumentFragment2(value) {
6039
+ if (!getNodeType || typeof value !== "object" || value === null) {
6040
+ return false;
6041
+ }
6042
+ try {
6043
+ return getNodeType(value) === NODE_TYPE.documentFragment;
6044
+ } catch (_) {
6045
+ return false;
6046
+ }
5846
6047
  };
5847
6048
  const _isNode = function _isNode2(value) {
5848
- return typeof Node === "function" && value instanceof Node;
6049
+ if (!getNodeType || typeof value !== "object" || value === null) {
6050
+ return false;
6051
+ }
6052
+ try {
6053
+ return typeof getNodeType(value) === "number";
6054
+ } catch (_) {
6055
+ return false;
6056
+ }
5849
6057
  };
5850
6058
  function _executeHooks(hooks2, currentNode, data) {
5851
6059
  arrayForEach(hooks2, (hook) => {
@@ -5890,8 +6098,8 @@ function createDOMPurify() {
5890
6098
  }
5891
6099
  }
5892
6100
  if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
5893
- const parentNode = getParentNode(currentNode) || currentNode.parentNode;
5894
- const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
6101
+ const parentNode = getParentNode(currentNode);
6102
+ const childNodes = getChildNodes(currentNode);
5895
6103
  if (childNodes && parentNode) {
5896
6104
  const childCount = childNodes.length;
5897
6105
  for (let i = childCount - 1; i >= 0; --i) {
@@ -5903,7 +6111,8 @@ function createDOMPurify() {
5903
6111
  _forceRemove(currentNode);
5904
6112
  return true;
5905
6113
  }
5906
- if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
6114
+ const nt = getNodeType ? getNodeType(currentNode) : currentNode.nodeType;
6115
+ if (nt === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
5907
6116
  _forceRemove(currentNode);
5908
6117
  return true;
5909
6118
  }
@@ -5913,7 +6122,7 @@ function createDOMPurify() {
5913
6122
  }
5914
6123
  if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
5915
6124
  content = currentNode.textContent;
5916
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
6125
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
5917
6126
  content = stringReplace(content, expr, " ");
5918
6127
  });
5919
6128
  if (currentNode.textContent !== content) {
@@ -5934,8 +6143,8 @@ function createDOMPurify() {
5934
6143
  return false;
5935
6144
  }
5936
6145
  const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
5937
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName)) ;
5938
- else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName)) ;
6146
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ;
6147
+ else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ;
5939
6148
  else if (!nameIsPermitted || FORBID_ATTR[lcName]) {
5940
6149
  if (
5941
6150
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
@@ -5949,9 +6158,9 @@ function createDOMPurify() {
5949
6158
  return false;
5950
6159
  }
5951
6160
  } else if (URI_SAFE_ATTRIBUTES[lcName]) ;
5952
- else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE2, ""))) ;
6161
+ else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) ;
5953
6162
  else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) ;
5954
- else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA2, stringReplace(value, ATTR_WHITESPACE2, ""))) ;
6163
+ else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) ;
5955
6164
  else if (value) {
5956
6165
  return false;
5957
6166
  } else ;
@@ -5959,13 +6168,11 @@ function createDOMPurify() {
5959
6168
  };
5960
6169
  const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]);
5961
6170
  const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
5962
- return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT2, tagName);
6171
+ return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
5963
6172
  };
5964
6173
  const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
5965
6174
  _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
5966
- const {
5967
- attributes
5968
- } = currentNode;
6175
+ const attributes = currentNode.attributes;
5969
6176
  if (!attributes || _isClobbered(currentNode)) {
5970
6177
  return;
5971
6178
  }
@@ -5979,11 +6186,7 @@ function createDOMPurify() {
5979
6186
  let l = attributes.length;
5980
6187
  while (l--) {
5981
6188
  const attr = attributes[l];
5982
- const {
5983
- name,
5984
- namespaceURI,
5985
- value: attrValue
5986
- } = attr;
6189
+ const name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
5987
6190
  const lcName = transformCaseFunc(name);
5988
6191
  const initValue = attrValue;
5989
6192
  let value = name === "value" ? initValue : stringTrim(initValue);
@@ -6017,7 +6220,7 @@ function createDOMPurify() {
6017
6220
  continue;
6018
6221
  }
6019
6222
  if (SAFE_FOR_TEMPLATES) {
6020
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
6223
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
6021
6224
  value = stringReplace(value, expr, " ");
6022
6225
  });
6023
6226
  }
@@ -6068,12 +6271,50 @@ function createDOMPurify() {
6068
6271
  _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
6069
6272
  _sanitizeElements(shadowNode);
6070
6273
  _sanitizeAttributes(shadowNode);
6071
- if (shadowNode.content instanceof DocumentFragment) {
6274
+ if (_isDocumentFragment(shadowNode.content)) {
6072
6275
  _sanitizeShadowDOM2(shadowNode.content);
6073
6276
  }
6277
+ const shadowNodeType = getNodeType ? getNodeType(shadowNode) : shadowNode.nodeType;
6278
+ if (shadowNodeType === NODE_TYPE.element) {
6279
+ const innerSr = getShadowRoot ? getShadowRoot(shadowNode) : shadowNode.shadowRoot;
6280
+ if (_isDocumentFragment(innerSr)) {
6281
+ _sanitizeAttachedShadowRoots2(innerSr);
6282
+ _sanitizeShadowDOM2(innerSr);
6283
+ }
6284
+ }
6074
6285
  }
6075
6286
  _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
6076
6287
  };
6288
+ const _sanitizeAttachedShadowRoots2 = function _sanitizeAttachedShadowRoots(root2) {
6289
+ const nodeType = getNodeType ? getNodeType(root2) : root2.nodeType;
6290
+ if (nodeType === NODE_TYPE.element) {
6291
+ const sr = getShadowRoot ? getShadowRoot(root2) : root2.shadowRoot;
6292
+ if (_isDocumentFragment(sr)) {
6293
+ _sanitizeAttachedShadowRoots2(sr);
6294
+ _sanitizeShadowDOM2(sr);
6295
+ }
6296
+ }
6297
+ const childNodes = getChildNodes ? getChildNodes(root2) : root2.childNodes;
6298
+ if (!childNodes) {
6299
+ return;
6300
+ }
6301
+ const snapshot = [];
6302
+ arrayForEach(childNodes, (child) => {
6303
+ arrayPush(snapshot, child);
6304
+ });
6305
+ for (const child of snapshot) {
6306
+ _sanitizeAttachedShadowRoots2(child);
6307
+ }
6308
+ if (nodeType === NODE_TYPE.element) {
6309
+ const rootName = getNodeName ? getNodeName(root2) : null;
6310
+ if (typeof rootName === "string" && transformCaseFunc(rootName) === "template") {
6311
+ const content = root2.content;
6312
+ if (_isDocumentFragment(content)) {
6313
+ _sanitizeAttachedShadowRoots2(content);
6314
+ }
6315
+ }
6316
+ }
6317
+ };
6077
6318
  DOMPurify.sanitize = function(dirty) {
6078
6319
  let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6079
6320
  let body = null;
@@ -6101,14 +6342,18 @@ function createDOMPurify() {
6101
6342
  IN_PLACE = false;
6102
6343
  }
6103
6344
  if (IN_PLACE) {
6104
- const nn = dirty.nodeName;
6345
+ const nn = getNodeName ? getNodeName(dirty) : dirty.nodeName;
6105
6346
  if (typeof nn === "string") {
6106
6347
  const tagName = transformCaseFunc(nn);
6107
6348
  if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
6108
6349
  throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
6109
6350
  }
6110
6351
  }
6111
- } else if (dirty instanceof Node) {
6352
+ if (_isClobbered(dirty)) {
6353
+ throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
6354
+ }
6355
+ _sanitizeAttachedShadowRoots2(dirty);
6356
+ } else if (_isNode(dirty)) {
6112
6357
  body = _initDocument("<!---->");
6113
6358
  importedNode = body.ownerDocument.importNode(dirty, true);
6114
6359
  if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") {
@@ -6118,6 +6363,7 @@ function createDOMPurify() {
6118
6363
  } else {
6119
6364
  body.appendChild(importedNode);
6120
6365
  }
6366
+ _sanitizeAttachedShadowRoots2(importedNode);
6121
6367
  } else {
6122
6368
  if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
6123
6369
  dirty.indexOf("<") === -1) {
@@ -6135,21 +6381,19 @@ function createDOMPurify() {
6135
6381
  while (currentNode = nodeIterator.nextNode()) {
6136
6382
  _sanitizeElements(currentNode);
6137
6383
  _sanitizeAttributes(currentNode);
6138
- if (currentNode.content instanceof DocumentFragment) {
6384
+ if (_isDocumentFragment(currentNode.content)) {
6139
6385
  _sanitizeShadowDOM2(currentNode.content);
6140
6386
  }
6141
6387
  }
6142
6388
  if (IN_PLACE) {
6389
+ if (SAFE_FOR_TEMPLATES) {
6390
+ _scrubTemplateExpressions(dirty);
6391
+ }
6143
6392
  return dirty;
6144
6393
  }
6145
6394
  if (RETURN_DOM) {
6146
6395
  if (SAFE_FOR_TEMPLATES) {
6147
- body.normalize();
6148
- let html2 = body.innerHTML;
6149
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
6150
- html2 = stringReplace(html2, expr, " ");
6151
- });
6152
- body.innerHTML = html2;
6396
+ _scrubTemplateExpressions(body);
6153
6397
  }
6154
6398
  if (RETURN_DOM_FRAGMENT) {
6155
6399
  returnNode = createDocumentFragment.call(body.ownerDocument);
@@ -6169,7 +6413,7 @@ function createDOMPurify() {
6169
6413
  serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
6170
6414
  }
6171
6415
  if (SAFE_FOR_TEMPLATES) {
6172
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
6416
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
6173
6417
  serializedHTML = stringReplace(serializedHTML, expr, " ");
6174
6418
  });
6175
6419
  }
@@ -6817,7 +7061,7 @@ function renderKitPrompt(kit, values) {
6817
7061
  (_, key) => values[key] ?? ""
6818
7062
  );
6819
7063
  }
6820
- var _tmpl$$d = /* @__PURE__ */ template(`<div class=kit-upsell><div class=kit-upsell-icon aria-hidden=true></div><p class=kit-upsell-title>Vessel Premium</p><p class=kit-upsell-body>Automation Kits are a premium feature. Upgrade to unlock pre-built workflows you can launch with one click.</p><button class="agent-primary-button kit-upsell-btn"type=button>Start 7-day free trial — $5.99/mo after`), _tmpl$2$d = /* @__PURE__ */ template(`<div class=kit-list-header><span class=agent-panel-title>Automation Kits <span class=kit-beta-tag>Beta</span></span><div class=kit-list-header-actions><span class=kit-list-count> kits</span><button class=kit-install-btn type=button title="Install a kit from a .kit.json file">+ Install`), _tmpl$3$c = /* @__PURE__ */ template(`<div class=kit-install-error><span></span><button class=kit-install-error-dismiss type=button aria-label=Dismiss>×`), _tmpl$4$c = /* @__PURE__ */ template(`<div class=kit-list>`), _tmpl$5$b = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Scheduled</span><span class=kit-list-count>`), _tmpl$6$b = /* @__PURE__ */ template(`<div class=kit-sched-list>`), _tmpl$7$9 = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Recent Activity</span><span class=kit-list-count>`), _tmpl$8$8 = /* @__PURE__ */ template(`<div class=kit-activity-list>`), _tmpl$9$7 = /* @__PURE__ */ template(`<div class=kit-form-header><button class=kit-back-btn type=button title="Back to kits"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M9 11L5 7l4-4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg>Back</button><div class=kit-form-title>`), _tmpl$0$5 = /* @__PURE__ */ template(`<p class=kit-form-desc>`), _tmpl$1$5 = /* @__PURE__ */ template(`<div class=kit-form-fields>`), _tmpl$10$5 = /* @__PURE__ */ template(`<p class=kit-form-estimate>Estimated run time: ~<!> min`), _tmpl$11$5 = /* @__PURE__ */ template(`<button class="agent-primary-button kit-run-btn"type=button>`), _tmpl$12$5 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Date &amp; time</label><input class=kit-form-input type=datetime-local>`), _tmpl$13$4 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Time of day</label><input class="kit-form-input kit-schedule-time"type=time>`), _tmpl$14$4 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Day</label><select class=kit-form-input>`), _tmpl$15$4 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Time</label><input class="kit-form-input kit-schedule-time"type=time>`), _tmpl$16$3 = /* @__PURE__ */ template(`<p class=kit-schedule-error>`), _tmpl$17$3 = /* @__PURE__ */ template(`<div class=kit-schedule-form><div class=kit-schedule-types></div><p class=kit-schedule-note>Schedules run only while Vessel is open. Missed runs are skipped.</p><button class="agent-primary-button kit-schedule-btn"type=button>`), _tmpl$18$3 = /* @__PURE__ */ template(`<div class=kit-schedule-section><label class=kit-schedule-toggle><input type=checkbox>Schedule for later`), _tmpl$19$3 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Run at</label><input type=datetime-local class="kit-form-input kit-schedule-time">`), _tmpl$20$3 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Day</label><select class="kit-form-input kit-schedule-time">`), _tmpl$21$3 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Time</label><input type=time class="kit-form-input kit-schedule-time">`), _tmpl$22$3 = /* @__PURE__ */ template(`<div class=sched-edit-backdrop><div class=sched-edit-panel><div class=sched-edit-header><span class=sched-edit-title>Edit schedule</span><span class=sched-edit-job-name></span></div><div class=kit-schedule-types></div><div class=sched-edit-actions><button class=kit-back-btn type=button>Cancel</button><button class=agent-primary-button type=button>Save`), _tmpl$23$3 = /* @__PURE__ */ template(`<section class=automation-panel>`), _tmpl$24$3 = /* @__PURE__ */ template(`<div class=kit-card-meta>~<!> min`), _tmpl$25$2 = /* @__PURE__ */ template(`<button class=kit-remove-btn type=button>×`), _tmpl$26$2 = /* @__PURE__ */ template(`<div class=kit-card role=button tabindex=0><span class=kit-card-icon aria-hidden=true></span><div class=kit-card-body><div class=kit-card-name></div><div class=kit-card-desc>`), _tmpl$27$2 = /* @__PURE__ */ template(`<svg class=kit-card-caret width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M5 3l4 4-4 4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>`), _tmpl$28$2 = /* @__PURE__ */ template(`<div class=kit-sched-next>Next: `), _tmpl$29$1 = /* @__PURE__ */ template(`<div class=sched-context-menu><button class=sched-ctx-item type=button>Edit task</button><button class=sched-ctx-item type=button>Edit schedule</button><div class=sched-ctx-divider></div><button class=sched-ctx-item type=button></button><button class="sched-ctx-item sched-ctx-danger"type=button>Delete`), _tmpl$30$1 = /* @__PURE__ */ template(`<div class=kit-sched-card><span class="kit-card-icon kit-sched-icon"aria-hidden=true></span><div class=kit-sched-body><div class=kit-sched-name></div><div class=kit-sched-meta></div></div><div class=kit-sched-actions><button class=kit-sched-toggle type=button></button><button class=kit-remove-btn type=button title="Delete schedule"aria-label="Delete schedule">×`), _tmpl$31$1 = /* @__PURE__ */ template(`<div class=kit-activity-output>`), _tmpl$32$1 = /* @__PURE__ */ template(`<div class=kit-activity-card><div class=kit-activity-header><div class=kit-activity-title><span class="kit-card-icon kit-sched-icon"aria-hidden=true></span><div class=kit-activity-title-copy><div class=kit-sched-name></div><div class=kit-activity-time></div></div></div><span class=kit-activity-badge>`), _tmpl$33$1 = /* @__PURE__ */ template(`<div class="kit-activity-output kit-activity-placeholder">`), _tmpl$34$1 = /* @__PURE__ */ template(`<span class=kit-form-required aria-hidden=true>*`), _tmpl$35$1 = /* @__PURE__ */ template(`<textarea class=kit-form-textarea rows=3>`), _tmpl$36$1 = /* @__PURE__ */ template(`<p class=kit-form-hint>`), _tmpl$37$1 = /* @__PURE__ */ template(`<div class=kit-form-field><label class=kit-form-label>`), _tmpl$38$1 = /* @__PURE__ */ template(`<input class=kit-form-input>`), _tmpl$39$1 = /* @__PURE__ */ template(`<span class=kit-run-spinner aria-hidden=true>`), _tmpl$40$1 = /* @__PURE__ */ template(`<label class=kit-schedule-type-option><input type=radio name=sched-type>`), _tmpl$41$1 = /* @__PURE__ */ template(`<option>`), _tmpl$42$1 = /* @__PURE__ */ template(`<label class=kit-schedule-type-option><input type=radio name=edit-sched-type>`);
7064
+ var _tmpl$$d = /* @__PURE__ */ template(`<div class=kit-upsell><div class=kit-upsell-icon aria-hidden=true></div><p class=kit-upsell-title>Vessel Premium</p><p class=kit-upsell-body>Automation Kits are a premium feature. Upgrade to unlock pre-built workflows you can launch with one click.</p><button class="agent-primary-button kit-upsell-btn"type=button>Start 7-day free trial — $5.99/mo after`), _tmpl$2$d = /* @__PURE__ */ template(`<div class=kit-list-header><span class=agent-panel-title>Automation Kits <span class=kit-beta-tag>Beta</span></span><div class=kit-list-header-actions><span class=kit-list-count> kits</span><button class=kit-install-btn type=button title="Install a kit from a .kit.json file">+ Install`), _tmpl$3$c = /* @__PURE__ */ template(`<div class=kit-install-error><span></span><button class=kit-install-error-dismiss type=button aria-label=Dismiss>×`), _tmpl$4$c = /* @__PURE__ */ template(`<div class=kit-list>`), _tmpl$5$b = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Scheduled</span><span class=kit-list-count>`), _tmpl$6$b = /* @__PURE__ */ template(`<div class=kit-sched-list>`), _tmpl$7$9 = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Recent Activity</span><span class=kit-list-count>`), _tmpl$8$8 = /* @__PURE__ */ template(`<div class=kit-activity-list>`), _tmpl$9$7 = /* @__PURE__ */ template(`<div class=kit-form-header><button class=kit-back-btn type=button title="Back to kits"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M9 11L5 7l4-4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg>Back</button><div class=kit-form-title>`), _tmpl$0$5 = /* @__PURE__ */ template(`<p class=kit-form-desc>`), _tmpl$1$5 = /* @__PURE__ */ template(`<div class=kit-form-fields>`), _tmpl$10$5 = /* @__PURE__ */ template(`<p class=kit-form-estimate>Estimated run time: ~<!> min`), _tmpl$11$5 = /* @__PURE__ */ template(`<button class="agent-primary-button kit-run-btn"type=button>`), _tmpl$12$5 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Date &amp; time</label><input class=kit-form-input type=datetime-local>`), _tmpl$13$4 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Time of day</label><input class="kit-form-input kit-schedule-time"type=time>`), _tmpl$14$4 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Day</label><select class=kit-form-input>`), _tmpl$15$4 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Time</label><input class="kit-form-input kit-schedule-time"type=time>`), _tmpl$16$3 = /* @__PURE__ */ template(`<p class=kit-schedule-error>`), _tmpl$17$3 = /* @__PURE__ */ template(`<div class=kit-schedule-form><div class=kit-schedule-types></div><p class=kit-schedule-note>Schedules run only while Vessel is open. Missed runs are skipped.</p><button class="agent-primary-button kit-schedule-btn"type=button>`), _tmpl$18$3 = /* @__PURE__ */ template(`<div class=kit-schedule-section><label class=kit-schedule-toggle><input type=checkbox>Schedule for later`), _tmpl$19$3 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Run at</label><input type=datetime-local class="kit-form-input kit-schedule-time">`), _tmpl$20$3 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Day</label><select class="kit-form-input kit-schedule-time">`), _tmpl$21$3 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Time</label><input type=time class="kit-form-input kit-schedule-time">`), _tmpl$22$3 = /* @__PURE__ */ template(`<div class=sched-edit-backdrop><div class=sched-edit-panel><div class=sched-edit-header><span class=sched-edit-title>Edit schedule</span><span class=sched-edit-job-name></span></div><div class=kit-schedule-types></div><div class=sched-edit-actions><button class=kit-back-btn type=button>Cancel</button><button class=agent-primary-button type=button>Save`), _tmpl$23$3 = /* @__PURE__ */ template(`<section class=automation-panel>`), _tmpl$24$3 = /* @__PURE__ */ template(`<div class=kit-card-meta>~<!> min`), _tmpl$25$2 = /* @__PURE__ */ template(`<button class=kit-remove-btn type=button>×`), _tmpl$26$2 = /* @__PURE__ */ template(`<div class=kit-card role=button tabindex=0><span class=kit-card-icon aria-hidden=true></span><div class=kit-card-body><div class=kit-card-name></div><div class=kit-card-desc>`), _tmpl$27$2 = /* @__PURE__ */ template(`<svg class=kit-card-caret width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M5 3l4 4-4 4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>`), _tmpl$28$2 = /* @__PURE__ */ template(`<div class=kit-sched-next>Next: `), _tmpl$29$2 = /* @__PURE__ */ template(`<div class=sched-context-menu><button class=sched-ctx-item type=button>Edit task</button><button class=sched-ctx-item type=button>Edit schedule</button><div class=sched-ctx-divider></div><button class=sched-ctx-item type=button></button><button class="sched-ctx-item sched-ctx-danger"type=button>Delete`), _tmpl$30$1 = /* @__PURE__ */ template(`<div class=kit-sched-card><span class="kit-card-icon kit-sched-icon"aria-hidden=true></span><div class=kit-sched-body><div class=kit-sched-name></div><div class=kit-sched-meta></div></div><div class=kit-sched-actions><button class=kit-sched-toggle type=button></button><button class=kit-remove-btn type=button title="Delete schedule"aria-label="Delete schedule">×`), _tmpl$31$1 = /* @__PURE__ */ template(`<div class=kit-activity-output>`), _tmpl$32$1 = /* @__PURE__ */ template(`<div class=kit-activity-card><div class=kit-activity-header><div class=kit-activity-title><span class="kit-card-icon kit-sched-icon"aria-hidden=true></span><div class=kit-activity-title-copy><div class=kit-sched-name></div><div class=kit-activity-time></div></div></div><span class=kit-activity-badge>`), _tmpl$33$1 = /* @__PURE__ */ template(`<div class="kit-activity-output kit-activity-placeholder">`), _tmpl$34$1 = /* @__PURE__ */ template(`<span class=kit-form-required aria-hidden=true>*`), _tmpl$35$1 = /* @__PURE__ */ template(`<textarea class=kit-form-textarea rows=3>`), _tmpl$36$1 = /* @__PURE__ */ template(`<p class=kit-form-hint>`), _tmpl$37$1 = /* @__PURE__ */ template(`<div class=kit-form-field><label class=kit-form-label>`), _tmpl$38$1 = /* @__PURE__ */ template(`<input class=kit-form-input>`), _tmpl$39$1 = /* @__PURE__ */ template(`<span class=kit-run-spinner aria-hidden=true>`), _tmpl$40$1 = /* @__PURE__ */ template(`<label class=kit-schedule-type-option><input type=radio name=sched-type>`), _tmpl$41$1 = /* @__PURE__ */ template(`<option>`), _tmpl$42$1 = /* @__PURE__ */ template(`<label class=kit-schedule-type-option><input type=radio name=edit-sched-type>`);
6821
7065
  const ICON_MAP = {
6822
7066
  BookOpen: book_open_default,
6823
7067
  Tag: tag_default,
@@ -7277,7 +7521,7 @@ const AutomationTab = (props) => {
7277
7521
  return openMenuJobId() === job.id;
7278
7522
  },
7279
7523
  get children() {
7280
- var _el$94 = _tmpl$29$1(), _el$95 = _el$94.firstChild, _el$96 = _el$95.nextSibling, _el$97 = _el$96.nextSibling, _el$98 = _el$97.nextSibling, _el$99 = _el$98.nextSibling;
7524
+ var _el$94 = _tmpl$29$2(), _el$95 = _el$94.firstChild, _el$96 = _el$95.nextSibling, _el$97 = _el$96.nextSibling, _el$98 = _el$97.nextSibling, _el$99 = _el$98.nextSibling;
7281
7525
  _el$94.$$click = (e) => e.stopPropagation();
7282
7526
  _el$95.$$click = () => handleOpenEditTask(job);
7283
7527
  _el$96.$$click = () => handleOpenEditSchedule(job);
@@ -8519,7 +8763,7 @@ const PageDiffTimeline = () => {
8519
8763
  })();
8520
8764
  };
8521
8765
  const vesselLogo = "" + new URL("vessel-logo-transparent-IT25qr-Z.png", import.meta.url).href;
8522
- var _tmpl$$a = /* @__PURE__ */ template(`<div class="message-content markdown-content">`), _tmpl$2$a = /* @__PURE__ */ template(`<div class=premium-inline-offer><div class=premium-inline-kicker>Vessel Premium</div><div class=premium-inline-title></div><p class=premium-inline-copy></p><div class=premium-inline-actions><button class="agent-primary-button premium-inline-primary"type=button>Start 7-day free trial — $5.99/mo after</button><button class="agent-control-button premium-inline-secondary"type=button>View details`), _tmpl$3$9 = /* @__PURE__ */ template(`<span class=sidebar-tab-badge>`), _tmpl$4$9 = /* @__PURE__ */ template(`<button class=agent-primary-button type=button>Undo last action`), _tmpl$5$8 = /* @__PURE__ */ template(`<div class=agent-section-title>Pending approvals`), _tmpl$6$8 = /* @__PURE__ */ template(`<button class=agent-section-toggle type=button>`), _tmpl$7$6 = /* @__PURE__ */ template(`<section class=agent-panel><div class=agent-panel-header><div><div class=agent-panel-title>Supervisor</div><div class=agent-panel-subtitle></div></div><span class=agent-status-pill></span></div><div class=agent-panel-controls><button class=agent-control-button type=button></button><button class=agent-control-button type=button>Restore session</button></div><div class=agent-muted></div><div class=agent-section-header><div class=agent-section-title>Recent actions`), _tmpl$8$5 = /* @__PURE__ */ template(`<span class=bookmark-status-pill>Saved`), _tmpl$9$4 = /* @__PURE__ */ template(`<div class=bookmark-export-message>`), _tmpl$0$3 = /* @__PURE__ */ template(`<div class=bookmark-save-body><div class=bookmark-export-actions><button class=bookmark-secondary-button type=button>Import HTML</button><button class=bookmark-secondary-button type=button>Import JSON`), _tmpl$1$3 = /* @__PURE__ */ template(`<div class=bookmark-save-card><div class=bookmark-current-title></div><div class=bookmark-current-url></div><div class=bookmark-save-controls><button class=bookmark-primary-button type=button>Save page</button></div><textarea class=bookmark-note-input placeholder="Optional note about why this matters"rows=2></textarea><textarea class=bookmark-note-input placeholder="Intent: what is this page for?"rows=1></textarea><textarea class=bookmark-note-input placeholder="Expected content: what should be here?"rows=1></textarea><input class=bookmark-input placeholder="Key fields (comma-separated)"><textarea class=bookmark-note-input placeholder="Agent hints (one key:value per line)"rows=2>`), _tmpl$10$3 = /* @__PURE__ */ template(`<section class=bookmark-panel><div class=bookmark-panel-header><div><div class=bookmark-panel-title>Bookmarks</div><div class=bookmark-panel-subtitle></div></div></div><input class="bookmark-input bookmark-search-input"placeholder="Search titles, URLs, notes, and folders"><div class=bookmark-export-card><div><div class=bookmark-panel-title>Export</div><div class=bookmark-panel-subtitle>Save browser-ready HTML or a full Vessel archive</div></div><div class=bookmark-export-actions><button class=bookmark-secondary-button type=button>Browser HTML</button><button class=bookmark-secondary-button type=button>HTML + notes</button><button class=bookmark-secondary-button type=button>Vessel JSON</button></div></div><div class=bookmark-import-shell><button class=bookmark-save-toggle type=button><span class=bookmark-save-toggle-copy><span class=bookmark-save-toggle-title>Import Bookmarks</span><span class=bookmark-save-toggle-subtitle>Import from HTML or Vessel JSON</span></span><span class=bookmark-save-toggle-caret aria-hidden=true>▾</span></button></div><div class=bookmark-save-shell><button class=bookmark-save-toggle type=button><span class=bookmark-save-toggle-copy><span class=bookmark-save-toggle-title>Save Current Page</span><span class=bookmark-save-toggle-subtitle>Manual bookmark save options</span></span><span class=bookmark-save-toggle-caret aria-hidden=true>▾</span></button></div><form class=bookmark-folder-create><div class=bookmark-folder-form-fields><input class=bookmark-input placeholder="Create a folder"><input class=bookmark-input placeholder="Optional one-line summary"></div><button class=bookmark-secondary-button type=submit>New folder</button></form><div class=bookmark-folder-list>`), _tmpl$11$3 = /* @__PURE__ */ template(`<div class=checkpoint-timeline>`), _tmpl$12$3 = /* @__PURE__ */ template(`<section class="agent-panel checkpoint-panel"><div class=agent-panel-header><div><div class=agent-panel-title>Checkpoints</div><div class=agent-panel-subtitle></div></div></div><div class=agent-panel-body><div class=agent-checkpoint-row><input class=agent-input placeholder="Checkpoint name"><textarea class=agent-textarea rows=2 placeholder="Optional note for this checkpoint"></textarea><button class=agent-primary-button type=button>Save checkpoint</button></div><div class=agent-section-title>Recent checkpoints`), _tmpl$13$2 = /* @__PURE__ */ template(`<button class=history-entry><span class=history-entry-title>Load more history</span><span class=history-entry-url>Showing <!> of `), _tmpl$14$2 = /* @__PURE__ */ template(`<p class=history-empty>No browsing history yet.`), _tmpl$15$2 = /* @__PURE__ */ template(`<div class=history-panel><div class=history-panel-header><span class=history-panel-title>Browsing History</span><div class=history-panel-actions><button class=history-clear-btn>Clear</button><button class=history-clear-btn>Export HTML</button><button class=history-clear-btn>Export JSON</button><button class=history-clear-btn>Import</button></div></div><div class=history-list>`), _tmpl$16$1 = /* @__PURE__ */ template(`<section class=agent-panel><div class=agent-panel-header><div class=agent-panel-title>What Changed</div><div class=agent-panel-subtitle>`), _tmpl$17$1 = /* @__PURE__ */ template(`<div class="kit-upsell premium-chat-banner"><p class=kit-upsell-title>Vessel Premium</p><p class="kit-upsell-body premium-chat-banner-body">Give the built-in agent a bigger toolbox and longer runway: screenshots, saved sessions, workflow tracking, table extraction, and up to 1,000 tool calls per turn.</p><div class="premium-inline-actions premium-chat-banner-actions"><button class="agent-primary-button premium-inline-primary"type=button>Start 7-day free trial — $5.99/mo after</button><button class="agent-control-button premium-inline-secondary"type=button>See Premium`), _tmpl$18$1 = /* @__PURE__ */ template(`<span>`), _tmpl$19$1 = /* @__PURE__ */ template(`<div><div class=streaming-status><span class=streaming-pulse aria-hidden=true></span><span>Generating`), _tmpl$20$1 = /* @__PURE__ */ template(`<div class="message message-assistant"><div class=message-content>`), _tmpl$21$1 = /* @__PURE__ */ template(`<div class=sidebar-empty><svg class=sidebar-empty-icon width=48 height=48 viewBox="0 0 48 48"aria-hidden=true><line x1=8 y1=8 x2=24 y2=5 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=24 y1=5 x2=40 y2=10 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=8 y1=8 x2=6 y2=24 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=40 y1=10 x2=44 y2=26 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=6 y1=24 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=44 y1=26 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=10 y1=38 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=38 y1=40 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=8 y1=8 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=24 y1=5 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=40 y1=10 x2=32 y2=20 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=20 y1=18 x2=32 y2=20 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.3></line><line x1=6 y1=24 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=20 y1=18 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=32 y1=20 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=44 y1=26 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=18 y1=30 x2=36 y2=30 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.25></line><line x1=18 y1=30 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=36 y1=30 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=18 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><line x1=36 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><circle cx=8 cy=8 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=24 cy=5 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=40 cy=10 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.7></circle><circle cx=6 cy=24 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=44 cy=26 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=10 cy=38 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=38 cy=40 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=24 cy=44 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=20 cy=18 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.85></circle><circle cx=32 cy=20 r=4 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.9></circle><circle cx=18 cy=30 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.75></circle><circle cx=36 cy=30 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.8></circle></svg><p class=sidebar-empty-title>Your move.</p><p class=sidebar-empty-hint>Configure a provider in Settings (Ctrl+,) then ask anything about the current page or beyond.`), _tmpl$22$1 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Stop generating"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><rect x=2 y=2 width=10 height=10 rx=1.5 fill=currentColor></rect></svg>Stop`), _tmpl$23$1 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Retry last prompt"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M11.5 7a4.5 4.5 0 1 1-1.3-3.2"stroke=currentColor stroke-width=1.5 stroke-linecap=round></path><path d="M10.5 1v3h-3"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg>Retry`), _tmpl$24$1 = /* @__PURE__ */ template(`<div class=chat-actions>`), _tmpl$25$1 = /* @__PURE__ */ template(`<div class=highlight-nav><button class=highlight-nav-btn type=button title="Previous highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><path d="M8 10L4 6l4-4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=highlight-nav-label type=button title="Go to current highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><circle cx=6 cy=6 r=3 fill="rgba(196, 160, 90, 0.6)"stroke="rgba(196, 160, 90, 0.9)"stroke-width=1></circle></svg></button><button class=highlight-nav-btn type=button title="Next highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><path d="M4 2l4 4-4 4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>`), _tmpl$26$1 = /* @__PURE__ */ template(`<button class=chat-queue-clear type=button>Clear queue`), _tmpl$27$1 = /* @__PURE__ */ template(`<div class=chat-queue-list>`), _tmpl$28$1 = /* @__PURE__ */ template(`<div class=chat-queue-status><div class=chat-queue-status-row><span>`), _tmpl$29 = /* @__PURE__ */ template(`<div class=sidebar-input-area><textarea class=sidebar-input rows=2></textarea><button class=sidebar-send>`), _tmpl$30 = /* @__PURE__ */ template(`<div class=sidebar><div class=sidebar-resize-handle></div><div class=sidebar-header><div class=sidebar-brand><img class=sidebar-logo alt=Vessel><span class=sidebar-brand-text>Vessel Browser</span></div><div class=sidebar-header-actions><button class=sidebar-clear title="Clear chat">Clear</button><button class=sidebar-close title="Close AI chat (Esc)"aria-label="Close AI chat"><svg width=14 height=14 viewBox="0 0 14 14"aria-hidden=true><path d="M3.5 3.5l7 7M10.5 3.5l-7 7"fill=none stroke=currentColor stroke-width=1.4 stroke-linecap=round></path></svg></button></div></div><div class=sidebar-tabs role=tablist><button class=sidebar-tab role=tab>Supervisor</button><button class=sidebar-tab role=tab>Bookmarks</button><button class=sidebar-tab role=tab>Checkpoints</button><button class=sidebar-tab role=tab>Chat</button><button class=sidebar-tab role=tab>Automate</button><button class=sidebar-tab role=tab>History</button><button class=sidebar-tab role=tab>Changes</button><button class=sidebar-tab role=tab>Research<span class=sidebar-tab-beta>Beta</span></button></div><div class=sidebar-messages><div>`), _tmpl$31 = /* @__PURE__ */ template(`<div class=agent-muted>No pending approvals.`), _tmpl$32 = /* @__PURE__ */ template(`<div class="agent-card agent-card-approval"><div class=agent-card-approval-stripe aria-hidden=true></div><div class=agent-card-title></div><div class=agent-card-copy></div><div class=agent-card-copy></div><div class=agent-card-actions><button class=agent-primary-button type=button>Approve</button><button class=agent-control-button type=button>Reject`), _tmpl$33 = /* @__PURE__ */ template(`<div class=agent-muted>No actions yet.`), _tmpl$34 = /* @__PURE__ */ template(`<div class=agent-muted>Recent actions are collapsed to reduce noise.`), _tmpl$35 = /* @__PURE__ */ template(`<div class="agent-card-copy success">`), _tmpl$36 = /* @__PURE__ */ template(`<div class="agent-card-copy error">`), _tmpl$37 = /* @__PURE__ */ template(`<div class=agent-card><div class=agent-action-row><span class=agent-card-title></span><span></span></div><div class=agent-card-copy>`), _tmpl$38 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>`), _tmpl$39 = /* @__PURE__ */ template(`<div class=bookmark-folder-summary>`), _tmpl$40 = /* @__PURE__ */ template(`<div class=bookmark-folder-actions><button class=bookmark-ghost-button type=button>Rename</button><button class=bookmark-ghost-button type=button>Export</button><button class="bookmark-ghost-button danger"type=button>Delete`), _tmpl$41 = /* @__PURE__ */ template(`<button class=bookmark-ghost-button type=button>Keep bookmarks`), _tmpl$42 = /* @__PURE__ */ template(`<div class=bookmark-folder-delete-confirm><p class=bookmark-delete-prompt>Delete "<!>"?</p><div class=bookmark-delete-options><button class="bookmark-ghost-button danger"type=button></button><button class=bookmark-ghost-button type=button>Cancel`), _tmpl$43 = /* @__PURE__ */ template(`<div class=bookmark-folder-edit><div class=bookmark-folder-form-fields><input class=bookmark-input><input class=bookmark-input placeholder="Optional one-line summary"></div><button class=bookmark-secondary-button type=button>Save</button><button class=bookmark-ghost-button type=button>Cancel`), _tmpl$44 = /* @__PURE__ */ template(`<div class=bookmark-items>`), _tmpl$45 = /* @__PURE__ */ template(`<div class=bookmark-folder-section><div class="bookmark-folder-header clickable"role=button tabindex=0><div class=bookmark-folder-overview><span class=bookmark-folder-chevron aria-hidden=true>▸</span><div><div class=bookmark-folder-name></div><div class=bookmark-folder-meta> saved`), _tmpl$46 = /* @__PURE__ */ template(`<div class=bookmark-folder-collapsed-hint>Click to view saved links.`), _tmpl$47 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>No bookmarks in this folder yet.`), _tmpl$48 = /* @__PURE__ */ template(`<div class=bookmark-item-note>`), _tmpl$49 = /* @__PURE__ */ template(`<div><strong>Intent:</strong> `), _tmpl$50 = /* @__PURE__ */ template(`<div><strong>Expected:</strong> `), _tmpl$51 = /* @__PURE__ */ template(`<div><strong>Key fields:</strong> `), _tmpl$52 = /* @__PURE__ */ template(`<div><strong>Hints:</strong> `), _tmpl$53 = /* @__PURE__ */ template(`<div class=bookmark-folder-edit><input class=bookmark-input placeholder="Bookmark title"><textarea class=bookmark-note-input rows=2 placeholder="Why this bookmark matters"></textarea><textarea class=bookmark-note-input rows=1 placeholder=Intent></textarea><textarea class=bookmark-note-input rows=1 placeholder="Expected content"></textarea><input class=bookmark-input placeholder="Key fields (comma-separated)"><textarea class=bookmark-note-input rows=2 placeholder="Agent hints (one key:value per line)"></textarea><div class=bookmark-item-footer><button class=bookmark-secondary-button type=button>Save edits</button><button class=bookmark-ghost-button type=button>Cancel`), _tmpl$54 = /* @__PURE__ */ template(`<div class=bookmark-item><button class=bookmark-item-link type=button><span class=bookmark-item-title></span><span class=bookmark-item-url></span></button><div class=bookmark-item-footer><span class=bookmark-item-time></span><button class=bookmark-ghost-button type=button></button><button class="bookmark-ghost-button danger"type=button>Remove`), _tmpl$55 = /* @__PURE__ */ template(`<div class=agent-muted>No checkpoints yet.`), _tmpl$56 = /* @__PURE__ */ template(`<span class=checkpoint-timeline-line>`), _tmpl$57 = /* @__PURE__ */ template(`<div class=checkpoint-timeline-item><div class=checkpoint-timeline-rail><span class=checkpoint-timeline-dot></span></div><div class=checkpoint-timeline-content><div class=checkpoint-timeline-name></div><div class=checkpoint-timeline-time></div><textarea class=agent-textarea rows=2 placeholder="Add a note..."></textarea><button class=agent-control-button type=button>Restore`), _tmpl$58 = /* @__PURE__ */ template(`<button class=history-entry><span class=history-entry-title></span><span class=history-entry-url></span><span class=history-entry-time>`), _tmpl$59 = /* @__PURE__ */ template(`<div class="kit-upsell premium-chat-banner"><p class=kit-upsell-title>Vessel Premium</p><p class="kit-upsell-body premium-chat-banner-body">The Diff timeline is a premium feature. Upgrade to see a full history of what changed on this page.</p><div class="premium-inline-actions premium-chat-banner-actions"><button class="agent-primary-button premium-inline-primary"type=button>Start 7-day free trial — $5.99/mo after</button><button class="agent-control-button premium-inline-secondary"type=button>See Premium`), _tmpl$60 = /* @__PURE__ */ template(`<div>`), _tmpl$61 = /* @__PURE__ */ template(`<div class=thinking-state><div class=thinking-orb aria-hidden=true><span></span><span></span><span></span></div><div class=thinking-copy><div class=thinking-title>Thinking`), _tmpl$62 = /* @__PURE__ */ template(`<div class=chat-approval-detail>`), _tmpl$63 = /* @__PURE__ */ template(`<div class=chat-approval><div class=chat-approval-icon aria-hidden=true><svg width=16 height=16 viewBox="0 0 16 16"fill=none><path d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM7.25 4.75a.75.75 0 011.5 0v3.5a.75.75 0 01-1.5 0v-3.5zM8 11.5a.75.75 0 110-1.5.75.75 0 010 1.5z"fill=currentColor></path></svg></div><div class=chat-approval-body><div class=chat-approval-title>Approval needed: <strong></strong></div><div class=chat-approval-detail></div><div class=chat-approval-actions><button class="chat-approval-btn chat-approval-approve"type=button>Approve</button><button class="chat-approval-btn chat-approval-reject"type=button>Reject`), _tmpl$64 = /* @__PURE__ */ template(`<div class=chat-queue-item><span class=chat-queue-text></span><button class=chat-queue-remove type=button>×`);
8766
+ var _tmpl$$a = /* @__PURE__ */ template(`<div class="message-content markdown-content">`), _tmpl$2$a = /* @__PURE__ */ template(`<div class=premium-inline-offer><div class=premium-inline-kicker>Vessel Premium</div><div class=premium-inline-title></div><p class=premium-inline-copy></p><div class=premium-inline-actions><button class="agent-primary-button premium-inline-primary"type=button>Start 7-day free trial — $5.99/mo after</button><button class="agent-control-button premium-inline-secondary"type=button>View details`), _tmpl$3$9 = /* @__PURE__ */ template(`<span class=sidebar-tab-badge>`), _tmpl$4$9 = /* @__PURE__ */ template(`<button class=agent-primary-button type=button>Undo last action`), _tmpl$5$8 = /* @__PURE__ */ template(`<div class=agent-section-title>Pending approvals`), _tmpl$6$8 = /* @__PURE__ */ template(`<button class=agent-section-toggle type=button>`), _tmpl$7$6 = /* @__PURE__ */ template(`<section class=agent-panel><div class=agent-panel-header><div><div class=agent-panel-title>Supervisor</div><div class=agent-panel-subtitle></div></div><span class=agent-status-pill></span></div><div class=agent-panel-controls><button class=agent-control-button type=button></button><button class=agent-control-button type=button>Restore session</button></div><div class=agent-muted></div><div class=agent-section-header><div class=agent-section-title>Recent actions`), _tmpl$8$5 = /* @__PURE__ */ template(`<span class=bookmark-status-pill>Saved`), _tmpl$9$4 = /* @__PURE__ */ template(`<div class=bookmark-export-message>`), _tmpl$0$3 = /* @__PURE__ */ template(`<div class=bookmark-save-body><div class=bookmark-export-actions><button class=bookmark-secondary-button type=button>Import HTML</button><button class=bookmark-secondary-button type=button>Import JSON`), _tmpl$1$3 = /* @__PURE__ */ template(`<div class=bookmark-save-card><div class=bookmark-current-title></div><div class=bookmark-current-url></div><div class=bookmark-save-controls><button class=bookmark-primary-button type=button>Save page</button></div><textarea class=bookmark-note-input placeholder="Optional note about why this matters"rows=2></textarea><textarea class=bookmark-note-input placeholder="Intent: what is this page for?"rows=1></textarea><textarea class=bookmark-note-input placeholder="Expected content: what should be here?"rows=1></textarea><input class=bookmark-input placeholder="Key fields (comma-separated)"><textarea class=bookmark-note-input placeholder="Agent hints (one key:value per line)"rows=2>`), _tmpl$10$3 = /* @__PURE__ */ template(`<section class=bookmark-panel><div class=bookmark-panel-header><div><div class=bookmark-panel-title>Bookmarks</div><div class=bookmark-panel-subtitle></div></div></div><input class="bookmark-input bookmark-search-input"placeholder="Search titles, URLs, notes, and folders"><div class=bookmark-export-card><div><div class=bookmark-panel-title>Export</div><div class=bookmark-panel-subtitle>Save browser-ready HTML or a full Vessel archive</div></div><div class=bookmark-export-actions><button class=bookmark-secondary-button type=button>Browser HTML</button><button class=bookmark-secondary-button type=button>HTML + notes</button><button class=bookmark-secondary-button type=button>Vessel JSON</button></div></div><div class=bookmark-import-shell><button class=bookmark-save-toggle type=button><span class=bookmark-save-toggle-copy><span class=bookmark-save-toggle-title>Import Bookmarks</span><span class=bookmark-save-toggle-subtitle>Import from HTML or Vessel JSON</span></span><span class=bookmark-save-toggle-caret aria-hidden=true>▾</span></button></div><div class=bookmark-save-shell><button class=bookmark-save-toggle type=button><span class=bookmark-save-toggle-copy><span class=bookmark-save-toggle-title>Save Current Page</span><span class=bookmark-save-toggle-subtitle>Manual bookmark save options</span></span><span class=bookmark-save-toggle-caret aria-hidden=true>▾</span></button></div><form class=bookmark-folder-create><div class=bookmark-folder-form-fields><input class=bookmark-input placeholder="Create a folder"><input class=bookmark-input placeholder="Optional one-line summary"></div><button class=bookmark-secondary-button type=submit>New folder</button></form><div class=bookmark-folder-list>`), _tmpl$11$3 = /* @__PURE__ */ template(`<div class=checkpoint-timeline>`), _tmpl$12$3 = /* @__PURE__ */ template(`<section class="agent-panel checkpoint-panel"><div class=agent-panel-header><div><div class=agent-panel-title>Checkpoints</div><div class=agent-panel-subtitle></div></div></div><div class=agent-panel-body><div class=agent-checkpoint-row><input class=agent-input placeholder="Checkpoint name"><textarea class=agent-textarea rows=2 placeholder="Optional note for this checkpoint"></textarea><button class=agent-primary-button type=button>Save checkpoint</button></div><div class=agent-section-title>Recent checkpoints`), _tmpl$13$2 = /* @__PURE__ */ template(`<button class=history-entry><span class=history-entry-title>Load more history</span><span class=history-entry-url>Showing <!> of `), _tmpl$14$2 = /* @__PURE__ */ template(`<p class=history-empty>No browsing history yet.`), _tmpl$15$2 = /* @__PURE__ */ template(`<div class=history-panel><div class=history-panel-header><span class=history-panel-title>Browsing History</span><div class=history-panel-actions><button class=history-clear-btn>Clear</button><button class=history-clear-btn>Export HTML</button><button class=history-clear-btn>Export JSON</button><button class=history-clear-btn>Import</button></div></div><div class=history-list>`), _tmpl$16$1 = /* @__PURE__ */ template(`<section class=agent-panel><div class=agent-panel-header><div class=agent-panel-title>What Changed</div><div class=agent-panel-subtitle>`), _tmpl$17$1 = /* @__PURE__ */ template(`<div class="kit-upsell premium-chat-banner"><p class=kit-upsell-title>Vessel Premium</p><p class="kit-upsell-body premium-chat-banner-body">Give the built-in agent a bigger toolbox and longer runway: screenshots, saved sessions, workflow tracking, table extraction, and up to 1,000 tool calls per turn.</p><div class="premium-inline-actions premium-chat-banner-actions"><button class="agent-primary-button premium-inline-primary"type=button>Start 7-day free trial — $5.99/mo after</button><button class="agent-control-button premium-inline-secondary"type=button>See Premium`), _tmpl$18$1 = /* @__PURE__ */ template(`<span>`), _tmpl$19$1 = /* @__PURE__ */ template(`<div><div class=streaming-status><span class=streaming-pulse aria-hidden=true></span><span>Generating`), _tmpl$20$1 = /* @__PURE__ */ template(`<div class="message message-assistant"><div class=message-content>`), _tmpl$21$1 = /* @__PURE__ */ template(`<div class=sidebar-empty><svg class=sidebar-empty-icon width=48 height=48 viewBox="0 0 48 48"aria-hidden=true><line x1=8 y1=8 x2=24 y2=5 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=24 y1=5 x2=40 y2=10 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=8 y1=8 x2=6 y2=24 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=40 y1=10 x2=44 y2=26 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=6 y1=24 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=44 y1=26 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=10 y1=38 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=38 y1=40 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=8 y1=8 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=24 y1=5 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=40 y1=10 x2=32 y2=20 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=20 y1=18 x2=32 y2=20 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.3></line><line x1=6 y1=24 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=20 y1=18 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=32 y1=20 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=44 y1=26 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=18 y1=30 x2=36 y2=30 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.25></line><line x1=18 y1=30 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=36 y1=30 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=18 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><line x1=36 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><circle cx=8 cy=8 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=24 cy=5 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=40 cy=10 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.7></circle><circle cx=6 cy=24 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=44 cy=26 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=10 cy=38 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=38 cy=40 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=24 cy=44 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=20 cy=18 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.85></circle><circle cx=32 cy=20 r=4 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.9></circle><circle cx=18 cy=30 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.75></circle><circle cx=36 cy=30 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.8></circle></svg><p class=sidebar-empty-title>Your move.</p><p class=sidebar-empty-hint>Configure a provider in Settings (Ctrl+,) then ask anything about the current page or beyond.`), _tmpl$22$1 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Stop generating"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><rect x=2 y=2 width=10 height=10 rx=1.5 fill=currentColor></rect></svg>Stop`), _tmpl$23$1 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Retry last prompt"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M11.5 7a4.5 4.5 0 1 1-1.3-3.2"stroke=currentColor stroke-width=1.5 stroke-linecap=round></path><path d="M10.5 1v3h-3"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg>Retry`), _tmpl$24$1 = /* @__PURE__ */ template(`<div class=chat-actions>`), _tmpl$25$1 = /* @__PURE__ */ template(`<div class=highlight-nav><button class=highlight-nav-btn type=button title="Previous highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><path d="M8 10L4 6l4-4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=highlight-nav-label type=button title="Go to current highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><circle cx=6 cy=6 r=3 fill="rgba(196, 160, 90, 0.6)"stroke="rgba(196, 160, 90, 0.9)"stroke-width=1></circle></svg></button><button class=highlight-nav-btn type=button title="Next highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><path d="M4 2l4 4-4 4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>`), _tmpl$26$1 = /* @__PURE__ */ template(`<button class=chat-queue-clear type=button>Clear queue`), _tmpl$27$1 = /* @__PURE__ */ template(`<div class=chat-queue-list>`), _tmpl$28$1 = /* @__PURE__ */ template(`<div class=chat-queue-status><div class=chat-queue-status-row><span>`), _tmpl$29$1 = /* @__PURE__ */ template(`<div class=sidebar-input-area><textarea class=sidebar-input rows=2></textarea><button class=sidebar-send>`), _tmpl$30 = /* @__PURE__ */ template(`<div class=sidebar><div class=sidebar-resize-handle></div><div class=sidebar-header><div class=sidebar-brand><img class=sidebar-logo alt=Vessel><span class=sidebar-brand-text>Vessel Browser</span></div><div class=sidebar-header-actions><button class=sidebar-clear title="Clear chat">Clear</button><button class=sidebar-close title="Close AI chat (Esc)"aria-label="Close AI chat"><svg width=14 height=14 viewBox="0 0 14 14"aria-hidden=true><path d="M3.5 3.5l7 7M10.5 3.5l-7 7"fill=none stroke=currentColor stroke-width=1.4 stroke-linecap=round></path></svg></button></div></div><div class=sidebar-tabs role=tablist><button class=sidebar-tab role=tab>Supervisor</button><button class=sidebar-tab role=tab>Bookmarks</button><button class=sidebar-tab role=tab>Checkpoints</button><button class=sidebar-tab role=tab>Chat</button><button class=sidebar-tab role=tab>Automate</button><button class=sidebar-tab role=tab>History</button><button class=sidebar-tab role=tab>Changes</button><button class=sidebar-tab role=tab>Research<span class=sidebar-tab-beta>Beta</span></button></div><div class=sidebar-messages><div>`), _tmpl$31 = /* @__PURE__ */ template(`<div class=agent-muted>No pending approvals.`), _tmpl$32 = /* @__PURE__ */ template(`<div class="agent-card agent-card-approval"><div class=agent-card-approval-stripe aria-hidden=true></div><div class=agent-card-title></div><div class=agent-card-copy></div><div class=agent-card-copy></div><div class=agent-card-actions><button class=agent-primary-button type=button>Approve</button><button class=agent-control-button type=button>Reject`), _tmpl$33 = /* @__PURE__ */ template(`<div class=agent-muted>No actions yet.`), _tmpl$34 = /* @__PURE__ */ template(`<div class=agent-muted>Recent actions are collapsed to reduce noise.`), _tmpl$35 = /* @__PURE__ */ template(`<div class="agent-card-copy success">`), _tmpl$36 = /* @__PURE__ */ template(`<div class="agent-card-copy error">`), _tmpl$37 = /* @__PURE__ */ template(`<div class=agent-card><div class=agent-action-row><span class=agent-card-title></span><span></span></div><div class=agent-card-copy>`), _tmpl$38 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>`), _tmpl$39 = /* @__PURE__ */ template(`<div class=bookmark-folder-summary>`), _tmpl$40 = /* @__PURE__ */ template(`<div class=bookmark-folder-actions><button class=bookmark-ghost-button type=button>Rename</button><button class=bookmark-ghost-button type=button>Export</button><button class="bookmark-ghost-button danger"type=button>Delete`), _tmpl$41 = /* @__PURE__ */ template(`<button class=bookmark-ghost-button type=button>Keep bookmarks`), _tmpl$42 = /* @__PURE__ */ template(`<div class=bookmark-folder-delete-confirm><p class=bookmark-delete-prompt>Delete "<!>"?</p><div class=bookmark-delete-options><button class="bookmark-ghost-button danger"type=button></button><button class=bookmark-ghost-button type=button>Cancel`), _tmpl$43 = /* @__PURE__ */ template(`<div class=bookmark-folder-edit><div class=bookmark-folder-form-fields><input class=bookmark-input><input class=bookmark-input placeholder="Optional one-line summary"></div><button class=bookmark-secondary-button type=button>Save</button><button class=bookmark-ghost-button type=button>Cancel`), _tmpl$44 = /* @__PURE__ */ template(`<div class=bookmark-items>`), _tmpl$45 = /* @__PURE__ */ template(`<div class=bookmark-folder-section><div class="bookmark-folder-header clickable"role=button tabindex=0><div class=bookmark-folder-overview><span class=bookmark-folder-chevron aria-hidden=true>▸</span><div><div class=bookmark-folder-name></div><div class=bookmark-folder-meta> saved`), _tmpl$46 = /* @__PURE__ */ template(`<div class=bookmark-folder-collapsed-hint>Click to view saved links.`), _tmpl$47 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>No bookmarks in this folder yet.`), _tmpl$48 = /* @__PURE__ */ template(`<div class=bookmark-item-note>`), _tmpl$49 = /* @__PURE__ */ template(`<div><strong>Intent:</strong> `), _tmpl$50 = /* @__PURE__ */ template(`<div><strong>Expected:</strong> `), _tmpl$51 = /* @__PURE__ */ template(`<div><strong>Key fields:</strong> `), _tmpl$52 = /* @__PURE__ */ template(`<div><strong>Hints:</strong> `), _tmpl$53 = /* @__PURE__ */ template(`<div class=bookmark-folder-edit><input class=bookmark-input placeholder="Bookmark title"><textarea class=bookmark-note-input rows=2 placeholder="Why this bookmark matters"></textarea><textarea class=bookmark-note-input rows=1 placeholder=Intent></textarea><textarea class=bookmark-note-input rows=1 placeholder="Expected content"></textarea><input class=bookmark-input placeholder="Key fields (comma-separated)"><textarea class=bookmark-note-input rows=2 placeholder="Agent hints (one key:value per line)"></textarea><div class=bookmark-item-footer><button class=bookmark-secondary-button type=button>Save edits</button><button class=bookmark-ghost-button type=button>Cancel`), _tmpl$54 = /* @__PURE__ */ template(`<div class=bookmark-item><button class=bookmark-item-link type=button><span class=bookmark-item-title></span><span class=bookmark-item-url></span></button><div class=bookmark-item-footer><span class=bookmark-item-time></span><button class=bookmark-ghost-button type=button></button><button class="bookmark-ghost-button danger"type=button>Remove`), _tmpl$55 = /* @__PURE__ */ template(`<div class=agent-muted>No checkpoints yet.`), _tmpl$56 = /* @__PURE__ */ template(`<span class=checkpoint-timeline-line>`), _tmpl$57 = /* @__PURE__ */ template(`<div class=checkpoint-timeline-item><div class=checkpoint-timeline-rail><span class=checkpoint-timeline-dot></span></div><div class=checkpoint-timeline-content><div class=checkpoint-timeline-name></div><div class=checkpoint-timeline-time></div><textarea class=agent-textarea rows=2 placeholder="Add a note..."></textarea><button class=agent-control-button type=button>Restore`), _tmpl$58 = /* @__PURE__ */ template(`<button class=history-entry><span class=history-entry-title></span><span class=history-entry-url></span><span class=history-entry-time>`), _tmpl$59 = /* @__PURE__ */ template(`<div class="kit-upsell premium-chat-banner"><p class=kit-upsell-title>Vessel Premium</p><p class="kit-upsell-body premium-chat-banner-body">The Diff timeline is a premium feature. Upgrade to see a full history of what changed on this page.</p><div class="premium-inline-actions premium-chat-banner-actions"><button class="agent-primary-button premium-inline-primary"type=button>Start 7-day free trial — $5.99/mo after</button><button class="agent-control-button premium-inline-secondary"type=button>See Premium`), _tmpl$60 = /* @__PURE__ */ template(`<div>`), _tmpl$61 = /* @__PURE__ */ template(`<div class=thinking-state><div class=thinking-orb aria-hidden=true><span></span><span></span><span></span></div><div class=thinking-copy><div class=thinking-title>Thinking`), _tmpl$62 = /* @__PURE__ */ template(`<div class=chat-approval-detail>`), _tmpl$63 = /* @__PURE__ */ template(`<div class=chat-approval><div class=chat-approval-icon aria-hidden=true><svg width=16 height=16 viewBox="0 0 16 16"fill=none><path d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM7.25 4.75a.75.75 0 011.5 0v3.5a.75.75 0 01-1.5 0v-3.5zM8 11.5a.75.75 0 110-1.5.75.75 0 010 1.5z"fill=currentColor></path></svg></div><div class=chat-approval-body><div class=chat-approval-title>Approval needed: <strong></strong></div><div class=chat-approval-detail></div><div class=chat-approval-actions><button class="chat-approval-btn chat-approval-approve"type=button>Approve</button><button class="chat-approval-btn chat-approval-reject"type=button>Reject`), _tmpl$64 = /* @__PURE__ */ template(`<div class=chat-queue-item><span class=chat-queue-text></span><button class=chat-queue-remove type=button>×`);
8523
8767
  const UNSORTED_FOLDER = {
8524
8768
  id: "unsorted",
8525
8769
  name: "Unsorted",
@@ -10069,7 +10313,7 @@ ${contextBlock}` : contextBlock);
10069
10313
  return _el$141;
10070
10314
  }
10071
10315
  }), (() => {
10072
- var _el$146 = _tmpl$29(), _el$147 = _el$146.firstChild, _el$148 = _el$147.nextSibling;
10316
+ var _el$146 = _tmpl$29$1(), _el$147 = _el$146.firstChild, _el$148 = _el$147.nextSibling;
10073
10317
  _el$147.$$keydown = (e) => {
10074
10318
  if (e.key === "Enter" && !e.shiftKey) {
10075
10319
  e.preventDefault();
@@ -10599,8 +10843,9 @@ const PROVIDERS = {
10599
10843
  openrouter: {
10600
10844
  id: "openrouter",
10601
10845
  name: "OpenRouter",
10602
- defaultModel: "anthropic/claude-sonnet-4",
10846
+ defaultModel: "openrouter/free",
10603
10847
  models: [
10848
+ "openrouter/free",
10604
10849
  "anthropic/claude-sonnet-4",
10605
10850
  "anthropic/claude-haiku-4",
10606
10851
  "openai/gpt-4o",
@@ -10792,7 +11037,7 @@ const SettingsGeneral = (props) => {
10792
11037
  })();
10793
11038
  };
10794
11039
  delegateEvents(["click", "input"]);
10795
- var _tmpl$$7 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-provider>Provider</label><select id=chat-provider class="settings-input settings-select">`), _tmpl$2$7 = /* @__PURE__ */ template(`<div style=display:flex;align-items:center;gap:8px><span style=width:8px;height:8px;border-radius:50%;background:var(--success);display:inline-block></span><span>Connected as `), _tmpl$3$6 = /* @__PURE__ */ template(`<p class=settings-hint><button type=button class=settings-link-btn>Disconnect`), _tmpl$4$6 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label>Account`), _tmpl$5$5 = /* @__PURE__ */ template(`<span class=settings-label-optional> (optional)`), _tmpl$6$5 = /* @__PURE__ */ template(`<p class=settings-hint>An API key is already stored securely for this provider. Leave this blank to keep it, or enter a new key to replace it.`), _tmpl$7$4 = /* @__PURE__ */ template(`<p class=settings-hint>If your endpoint requires authentication, enter the API key or bearer token here.`), _tmpl$8$3 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-api-key>API Key</label><input id=chat-api-key class=settings-input type=password>`), _tmpl$9$2 = /* @__PURE__ */ template(`<select id=chat-model class="settings-input settings-select"style=flex:1>`), _tmpl$0$1 = /* @__PURE__ */ template(`<p class=settings-hint style=color:var(--error)>Could not fetch models — check your API key and connection.`), _tmpl$1$1 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-model>Model</label><div style=display:flex;gap:6px;align-items:center><button type=button class=settings-refresh-btn title="Refresh model list">↺`), _tmpl$10$1 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-base-url>Base URL</label><input id=chat-base-url class=settings-input>`), _tmpl$11$1 = /* @__PURE__ */ template(`<p class=settings-hint>Vessel auto-detects the active model from your configured <code>llama-server</code> base URL. For agent loops, run <code>llama-server</code> with <code>--ctx-size 16384</code> minimum and <code>32768</code> recommended.`), _tmpl$12$1 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-reasoning-effort>Reasoning Level</label><select id=chat-reasoning-effort class="settings-input settings-select"></select><p class=settings-hint>Applies to providers and models that expose reasoning controls. Off requests no reasoning where supported and otherwise leaves the model at its normal behavior; Max requests the strongest supported reasoning tier.`), _tmpl$13$1 = /* @__PURE__ */ template(`<input id=max-tool-iterations class=settings-input type=number min=10 max=1000 placeholder=200>`), _tmpl$14$1 = /* @__PURE__ */ template(`<div class=settings-category-panel><div class=settings-callout><div class=settings-callout-title>External Agent Control</div><p class=settings-callout-copy>Vessel is configured to run under an external harness such as Hermes Agent or OpenClaw. Provider and model selection are not configured inside Vessel.</p></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Enable Chat Assistant</span></label><p class=settings-hint>Adds a Chat tab to the sidebar for conversing with an AI provider of your choice.</p></div><div class=settings-field><label class=settings-label for=mcp-port>MCP Port</label><input id=mcp-port class=settings-input placeholder=3100><p class=settings-hint>External harnesses connect to Vessel at <code>http://127.0.0.1:&lt;port&gt;/mcp</code>. Changing this value restarts the MCP server immediately.</p><div class=settings-inline-actions><button type=button class=settings-secondary-btn>Regenerate MCP token</button></div></div><div class=settings-field><label class=settings-label for=max-tool-iterations>Max Tool Iterations</label><p class=settings-hint></p></div><div class=settings-field><label class=settings-label for=agent-transcript-mode>Agent Transcript Monitor</label><select id=agent-transcript-mode class="settings-input settings-select"><option value=off>Off</option><option value=summary>Summary HUD</option><option value=full>Full transcript</option></select><p class=settings-hint>Controls the in-browser transcript monitor when an external harness publishes reasoning or status updates into Vessel via the <code>vessel_publish_transcript</code> MCP tool. Summary HUD shows a compact 2-line status surface; Full transcript shows the recent entry list.</p></div><div class=settings-field><label class=settings-label for=obsidian-vault-path>Obsidian Vault Path</label><input id=obsidian-vault-path class=settings-input placeholder=/home/you/Documents/MyVault><p class=settings-hint>Optional. When set, Vessel memory tools can write markdown notes into this vault for research breadcrumbs and summaries.`), _tmpl$15$1 = /* @__PURE__ */ template(`<option>`), _tmpl$16 = /* @__PURE__ */ template(`<p class=settings-hint style=color:var(--accent-primary)> <button type=button class=settings-link-btn>Cancel`), _tmpl$17 = /* @__PURE__ */ template(`<div>`), _tmpl$18 = /* @__PURE__ */ template(`<p class=settings-hint style=color:var(--error)>`), _tmpl$19 = /* @__PURE__ */ template(`<button type=button class=settings-btn>Try Again`), _tmpl$20 = /* @__PURE__ */ template(`<div><button type=button class=settings-btn>Connect with ChatGPT</button><p class=settings-hint>Sign in with your ChatGPT Plus or Pro subscription. A browser tab will open where you'll authorize Vessel.`), _tmpl$21 = /* @__PURE__ */ template(`<input id=chat-model class=settings-input style=flex:1>`), _tmpl$22 = /* @__PURE__ */ template(`<p class=settings-hint style=color:var(--accent-primary)>`), _tmpl$23 = /* @__PURE__ */ template(`<p class=settings-hint>`), _tmpl$24 = /* @__PURE__ */ template(`<div class="settings-input settings-input-disabled"title="Upgrade to Vessel Premium for unlimited tool iterations">50`), _tmpl$25 = /* @__PURE__ */ template(`<div class=settings-health-issues>`), _tmpl$26 = /* @__PURE__ */ template(`<div class=settings-health><div class=settings-callout-title>Runtime Health</div><p class=settings-hint>MCP status: <strong></strong> `), _tmpl$27 = /* @__PURE__ */ template(`<p class=settings-hint>Active endpoint: <code>`), _tmpl$28 = /* @__PURE__ */ template(`<div class=settings-health-issue><strong></strong><div>`);
11040
+ var _tmpl$$7 = /* @__PURE__ */ template(`<p class=settings-hint style=color:var(--error)>`), _tmpl$2$7 = /* @__PURE__ */ template(`<div class=settings-callout><div class=settings-callout-title>Start With Free AI</div><p class=settings-callout-copy>Connect OpenRouter and Vessel will use the free model router automatically.</p><div class=settings-inline-actions style=margin-top:12px><button type=button class=settings-secondary-btn>`), _tmpl$3$6 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-provider>Provider</label><select id=chat-provider class="settings-input settings-select">`), _tmpl$4$6 = /* @__PURE__ */ template(`<div style=display:flex;align-items:center;gap:8px><span style=width:8px;height:8px;border-radius:50%;background:var(--success);display:inline-block></span><span>Connected as `), _tmpl$5$5 = /* @__PURE__ */ template(`<p class=settings-hint><button type=button class=settings-link-btn>Disconnect`), _tmpl$6$5 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label>Account`), _tmpl$7$4 = /* @__PURE__ */ template(`<span class=settings-label-optional> (optional)`), _tmpl$8$3 = /* @__PURE__ */ template(`<p class=settings-hint>An API key is already stored securely for this provider. Leave this blank to keep it, or enter a new key to replace it.`), _tmpl$9$2 = /* @__PURE__ */ template(`<p class=settings-hint>If your endpoint requires authentication, enter the API key or bearer token here.`), _tmpl$0$1 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-api-key>API Key</label><input id=chat-api-key class=settings-input type=password>`), _tmpl$1$1 = /* @__PURE__ */ template(`<select id=chat-model class="settings-input settings-select"style=flex:1>`), _tmpl$10$1 = /* @__PURE__ */ template(`<p class=settings-hint style=color:var(--error)>Could not fetch models — check your API key and connection.`), _tmpl$11$1 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-model>Model</label><div style=display:flex;gap:6px;align-items:center><button type=button class=settings-refresh-btn title="Refresh model list">↺`), _tmpl$12$1 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-base-url>Base URL</label><input id=chat-base-url class=settings-input>`), _tmpl$13$1 = /* @__PURE__ */ template(`<p class=settings-hint>Vessel auto-detects the active model from your configured <code>llama-server</code> base URL. For agent loops, run <code>llama-server</code> with <code>--ctx-size 16384</code> minimum and <code>32768</code> recommended.`), _tmpl$14$1 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-reasoning-effort>Reasoning Level</label><select id=chat-reasoning-effort class="settings-input settings-select"></select><p class=settings-hint>Applies to providers and models that expose reasoning controls. Off requests no reasoning where supported and otherwise leaves the model at its normal behavior; Max requests the strongest supported reasoning tier.`), _tmpl$15$1 = /* @__PURE__ */ template(`<input id=max-tool-iterations class=settings-input type=number min=10 max=1000 placeholder=200>`), _tmpl$16 = /* @__PURE__ */ template(`<div class=settings-category-panel><div class=settings-callout><div class=settings-callout-title>External Agent Control</div><p class=settings-callout-copy>Vessel is configured to run under an external harness such as Hermes Agent or OpenClaw. Provider and model selection are not configured inside Vessel.</p></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Enable Chat Assistant</span></label><p class=settings-hint>Adds a Chat tab to the sidebar for conversing with an AI provider of your choice.</p></div><div class=settings-field><label class=settings-label for=mcp-port>MCP Port</label><input id=mcp-port class=settings-input placeholder=3100><p class=settings-hint>External harnesses connect to Vessel at <code>http://127.0.0.1:&lt;port&gt;/mcp</code>. Changing this value restarts the MCP server immediately.</p><div class=settings-inline-actions><button type=button class=settings-secondary-btn>Regenerate MCP token</button></div></div><div class=settings-field><label class=settings-label for=max-tool-iterations>Max Tool Iterations</label><p class=settings-hint></p></div><div class=settings-field><label class=settings-label for=agent-transcript-mode>Agent Transcript Monitor</label><select id=agent-transcript-mode class="settings-input settings-select"><option value=off>Off</option><option value=summary>Summary HUD</option><option value=full>Full transcript</option></select><p class=settings-hint>Controls the in-browser transcript monitor when an external harness publishes reasoning or status updates into Vessel via the <code>vessel_publish_transcript</code> MCP tool. Summary HUD shows a compact 2-line status surface; Full transcript shows the recent entry list.</p></div><div class=settings-field><label class=settings-label for=obsidian-vault-path>Obsidian Vault Path</label><input id=obsidian-vault-path class=settings-input placeholder=/home/you/Documents/MyVault><p class=settings-hint>Optional. When set, Vessel memory tools can write markdown notes into this vault for research breadcrumbs and summaries.`), _tmpl$17 = /* @__PURE__ */ template(`<option>`), _tmpl$18 = /* @__PURE__ */ template(`<p class=settings-hint style=color:var(--accent-primary)> <button type=button class=settings-link-btn>Cancel`), _tmpl$19 = /* @__PURE__ */ template(`<div>`), _tmpl$20 = /* @__PURE__ */ template(`<button type=button class=settings-btn>Try Again`), _tmpl$21 = /* @__PURE__ */ template(`<div><button type=button class=settings-btn>Connect with ChatGPT</button><p class=settings-hint>Sign in with your ChatGPT Plus or Pro subscription. A browser tab will open where you'll authorize Vessel.`), _tmpl$22 = /* @__PURE__ */ template(`<input id=chat-model class=settings-input style=flex:1>`), _tmpl$23 = /* @__PURE__ */ template(`<p class=settings-hint style=color:var(--accent-primary)>`), _tmpl$24 = /* @__PURE__ */ template(`<p class=settings-hint>`), _tmpl$25 = /* @__PURE__ */ template(`<div class="settings-input settings-input-disabled"title="Upgrade to Vessel Premium for unlimited tool iterations">50`), _tmpl$26 = /* @__PURE__ */ template(`<div class=settings-health-issues>`), _tmpl$27 = /* @__PURE__ */ template(`<div class=settings-health><div class=settings-callout-title>Runtime Health</div><p class=settings-hint>MCP status: <strong></strong> `), _tmpl$28 = /* @__PURE__ */ template(`<p class=settings-hint>Active endpoint: <code>`), _tmpl$29 = /* @__PURE__ */ template(`<div class=settings-health-issue><strong></strong><div>`);
10796
11041
  const CHAT_PROVIDERS$1 = Object.values(PROVIDERS).map((p) => ({
10797
11042
  id: p.id,
10798
11043
  name: p.name,
@@ -10822,17 +11067,48 @@ const REASONING_EFFORT_OPTIONS = [{
10822
11067
  const SettingsAgent = (props) => {
10823
11068
  const [mcpTokenMessage, setMcpTokenMessage] = createSignal(null);
10824
11069
  const chatMeta = () => CHAT_PROVIDERS$1.find((p) => p.id === props.chat.providerId()) ?? CHAT_PROVIDERS$1[0];
11070
+ const openRouterConnecting = () => props.chat.openRouterAuthStatus() === "waiting" || props.chat.openRouterAuthStatus() === "exchanging";
10825
11071
  return (() => {
10826
- var _el$ = _tmpl$14$1(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$35 = _el$3.nextSibling, _el$36 = _el$35.firstChild, _el$37 = _el$36.nextSibling, _el$38 = _el$37.nextSibling, _el$39 = _el$38.nextSibling, _el$40 = _el$39.firstChild, _el$41 = _el$35.nextSibling, _el$42 = _el$41.firstChild, _el$44 = _el$42.nextSibling, _el$45 = _el$41.nextSibling, _el$46 = _el$45.firstChild, _el$47 = _el$46.nextSibling, _el$48 = _el$45.nextSibling, _el$49 = _el$48.firstChild, _el$50 = _el$49.nextSibling;
10827
- _el$5.$$click = () => props.chat.setEnabled(!props.chat.enabled());
11072
+ var _el$ = _tmpl$16(), _el$2 = _el$.firstChild, _el$9 = _el$2.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, _el$41 = _el$9.nextSibling, _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling, _el$44 = _el$43.nextSibling, _el$45 = _el$44.nextSibling, _el$46 = _el$45.firstChild, _el$47 = _el$41.nextSibling, _el$48 = _el$47.firstChild, _el$50 = _el$48.nextSibling, _el$51 = _el$47.nextSibling, _el$52 = _el$51.firstChild, _el$53 = _el$52.nextSibling, _el$54 = _el$51.nextSibling, _el$55 = _el$54.firstChild, _el$56 = _el$55.nextSibling;
11073
+ insert(_el$, createComponent(Show, {
11074
+ get when() {
11075
+ return !props.chat.enabled() || props.chat.providerId() === "openrouter" && !props.chat.hasStoredApiKey();
11076
+ },
11077
+ get children() {
11078
+ var _el$3 = _tmpl$2$7(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild;
11079
+ _el$7.$$click = () => props.chat.startOpenRouterAuth();
11080
+ insert(_el$7, createComponent(Show, {
11081
+ get when() {
11082
+ return !openRouterConnecting();
11083
+ },
11084
+ get fallback() {
11085
+ return props.chat.openRouterAuthStatus() === "exchanging" ? "Finishing setup..." : "Opening OpenRouter...";
11086
+ },
11087
+ children: "Start free with OpenRouter"
11088
+ }));
11089
+ insert(_el$3, createComponent(Show, {
11090
+ get when() {
11091
+ return props.chat.openRouterAuthStatus() === "error";
11092
+ },
11093
+ get children() {
11094
+ var _el$8 = _tmpl$$7();
11095
+ insert(_el$8, () => props.chat.openRouterAuthError());
11096
+ return _el$8;
11097
+ }
11098
+ }), null);
11099
+ createRenderEffect(() => _el$7.disabled = openRouterConnecting());
11100
+ return _el$3;
11101
+ }
11102
+ }), _el$9);
11103
+ _el$1.$$click = () => props.chat.setEnabled(!props.chat.enabled());
10828
11104
  insert(_el$, createComponent(Show, {
10829
11105
  get when() {
10830
11106
  return props.chat.enabled();
10831
11107
  },
10832
11108
  get children() {
10833
11109
  return [(() => {
10834
- var _el$6 = _tmpl$$7(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
10835
- _el$8.addEventListener("change", (e) => {
11110
+ var _el$10 = _tmpl$3$6(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling;
11111
+ _el$12.addEventListener("change", (e) => {
10836
11112
  const id = e.currentTarget.value;
10837
11113
  props.chat.setProviderId(id);
10838
11114
  props.chat.setModel("");
@@ -10841,32 +11117,32 @@ const SettingsAgent = (props) => {
10841
11117
  props.chat.setHasStoredApiKey(false);
10842
11118
  props.chat.resetProviderModels();
10843
11119
  });
10844
- insert(_el$8, createComponent(For, {
11120
+ insert(_el$12, createComponent(For, {
10845
11121
  each: CHAT_PROVIDERS$1,
10846
11122
  children: (p) => (() => {
10847
- var _el$51 = _tmpl$15$1();
10848
- insert(_el$51, () => p.name);
10849
- createRenderEffect(() => _el$51.value = p.id);
10850
- return _el$51;
11123
+ var _el$57 = _tmpl$17();
11124
+ insert(_el$57, () => p.name);
11125
+ createRenderEffect(() => _el$57.value = p.id);
11126
+ return _el$57;
10851
11127
  })()
10852
11128
  }));
10853
- createRenderEffect(() => _el$8.value = props.chat.providerId());
10854
- return _el$6;
11129
+ createRenderEffect(() => _el$12.value = props.chat.providerId());
11130
+ return _el$10;
10855
11131
  })(), createComponent(Show, {
10856
11132
  get when() {
10857
11133
  return props.chat.providerType() === "codex_oauth";
10858
11134
  },
10859
11135
  get children() {
10860
- var _el$9 = _tmpl$4$6();
10861
- _el$9.firstChild;
10862
- insert(_el$9, createComponent(Show, {
11136
+ var _el$13 = _tmpl$6$5();
11137
+ _el$13.firstChild;
11138
+ insert(_el$13, createComponent(Show, {
10863
11139
  get when() {
10864
11140
  return props.chat.codexAuthStatus() === "connected";
10865
11141
  },
10866
11142
  get fallback() {
10867
11143
  return (() => {
10868
- var _el$52 = _tmpl$17();
10869
- insert(_el$52, createComponent(Show, {
11144
+ var _el$58 = _tmpl$19();
11145
+ insert(_el$58, createComponent(Show, {
10870
11146
  get when() {
10871
11147
  return props.chat.codexAuthStatus() === "waiting" || props.chat.codexAuthStatus() === "exchanging";
10872
11148
  },
@@ -10877,297 +11153,297 @@ const SettingsAgent = (props) => {
10877
11153
  },
10878
11154
  get fallback() {
10879
11155
  return (() => {
10880
- var _el$58 = _tmpl$20(), _el$59 = _el$58.firstChild;
10881
- _el$59.$$click = () => props.chat.startCodexAuth();
10882
- return _el$58;
11156
+ var _el$64 = _tmpl$21(), _el$65 = _el$64.firstChild;
11157
+ _el$65.$$click = () => props.chat.startCodexAuth();
11158
+ return _el$64;
10883
11159
  })();
10884
11160
  },
10885
11161
  get children() {
10886
11162
  return [(() => {
10887
- var _el$56 = _tmpl$18();
10888
- insert(_el$56, () => props.chat.codexAuthError());
10889
- return _el$56;
11163
+ var _el$62 = _tmpl$$7();
11164
+ insert(_el$62, () => props.chat.codexAuthError());
11165
+ return _el$62;
10890
11166
  })(), (() => {
10891
- var _el$57 = _tmpl$19();
10892
- _el$57.$$click = () => props.chat.startCodexAuth();
10893
- return _el$57;
11167
+ var _el$63 = _tmpl$20();
11168
+ _el$63.$$click = () => props.chat.startCodexAuth();
11169
+ return _el$63;
10894
11170
  })()];
10895
11171
  }
10896
11172
  });
10897
11173
  },
10898
11174
  get children() {
10899
- var _el$53 = _tmpl$16(), _el$54 = _el$53.firstChild, _el$55 = _el$54.nextSibling;
10900
- insert(_el$53, createComponent(Show, {
11175
+ var _el$59 = _tmpl$18(), _el$60 = _el$59.firstChild, _el$61 = _el$60.nextSibling;
11176
+ insert(_el$59, createComponent(Show, {
10901
11177
  get when() {
10902
11178
  return props.chat.codexAuthStatus() === "waiting";
10903
11179
  },
10904
11180
  fallback: "Exchanging authorization...",
10905
11181
  children: "Waiting for browser login..."
10906
- }), _el$54);
10907
- _el$55.$$click = () => window.vessel.codex.cancelAuth();
10908
- return _el$53;
11182
+ }), _el$60);
11183
+ _el$61.$$click = () => window.vessel.codex.cancelAuth();
11184
+ return _el$59;
10909
11185
  }
10910
11186
  }));
10911
- return _el$52;
11187
+ return _el$58;
10912
11188
  })();
10913
11189
  },
10914
11190
  get children() {
10915
11191
  return [(() => {
10916
- var _el$1 = _tmpl$2$7(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
10917
- _el$11.firstChild;
10918
- insert(_el$11, () => props.chat.codexAccountEmail() || "ChatGPT", null);
10919
- return _el$1;
11192
+ var _el$15 = _tmpl$4$6(), _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
11193
+ _el$17.firstChild;
11194
+ insert(_el$17, () => props.chat.codexAccountEmail() || "ChatGPT", null);
11195
+ return _el$15;
10920
11196
  })(), (() => {
10921
- var _el$13 = _tmpl$3$6(), _el$14 = _el$13.firstChild;
10922
- _el$14.$$click = () => props.chat.disconnectCodex();
10923
- return _el$13;
11197
+ var _el$19 = _tmpl$5$5(), _el$20 = _el$19.firstChild;
11198
+ _el$20.$$click = () => props.chat.disconnectCodex();
11199
+ return _el$19;
10924
11200
  })()];
10925
11201
  }
10926
11202
  }), null);
10927
- return _el$9;
11203
+ return _el$13;
10928
11204
  }
10929
11205
  }), createComponent(Show, {
10930
11206
  get when() {
10931
11207
  return memo(() => props.chat.providerType() !== "codex_oauth")() && (chatMeta().requiresKey || props.chat.providerId() === "custom");
10932
11208
  },
10933
11209
  get children() {
10934
- var _el$15 = _tmpl$8$3(), _el$16 = _el$15.firstChild;
10935
- _el$16.firstChild;
10936
- var _el$19 = _el$16.nextSibling;
10937
- insert(_el$16, createComponent(Show, {
11210
+ var _el$21 = _tmpl$0$1(), _el$22 = _el$21.firstChild;
11211
+ _el$22.firstChild;
11212
+ var _el$25 = _el$22.nextSibling;
11213
+ insert(_el$22, createComponent(Show, {
10938
11214
  get when() {
10939
11215
  return !chatMeta().requiresKey;
10940
11216
  },
10941
11217
  get children() {
10942
- return _tmpl$5$5();
11218
+ return _tmpl$7$4();
10943
11219
  }
10944
11220
  }), null);
10945
- _el$19.$$input = (e) => {
11221
+ _el$25.$$input = (e) => {
10946
11222
  props.chat.setApiKey(e.currentTarget.value);
10947
11223
  if (e.currentTarget.value.trim()) {
10948
11224
  props.chat.setHasStoredApiKey(true);
10949
11225
  }
10950
11226
  };
10951
- setAttribute(_el$19, "spellcheck", false);
10952
- insert(_el$15, createComponent(Show, {
11227
+ setAttribute(_el$25, "spellcheck", false);
11228
+ insert(_el$21, createComponent(Show, {
10953
11229
  get when() {
10954
11230
  return memo(() => !!props.chat.hasStoredApiKey())() && !props.chat.apiKey().trim();
10955
11231
  },
10956
11232
  get children() {
10957
- return _tmpl$6$5();
11233
+ return _tmpl$8$3();
10958
11234
  }
10959
11235
  }), null);
10960
- insert(_el$15, createComponent(Show, {
11236
+ insert(_el$21, createComponent(Show, {
10961
11237
  get when() {
10962
11238
  return props.chat.providerId() === "custom";
10963
11239
  },
10964
11240
  get children() {
10965
- return _tmpl$7$4();
11241
+ return _tmpl$9$2();
10966
11242
  }
10967
11243
  }), null);
10968
- createRenderEffect(() => setAttribute(_el$19, "placeholder", props.chat.hasStoredApiKey() && !props.chat.apiKey().trim() ? "Stored securely. Enter a new key to replace it." : chatMeta().keyPlaceholder || "Bearer token or API key"));
10969
- createRenderEffect(() => _el$19.value = props.chat.apiKey());
10970
- return _el$15;
11244
+ createRenderEffect(() => setAttribute(_el$25, "placeholder", props.chat.hasStoredApiKey() && !props.chat.apiKey().trim() ? "Stored securely. Enter a new key to replace it." : chatMeta().keyPlaceholder || "Bearer token or API key"));
11245
+ createRenderEffect(() => _el$25.value = props.chat.apiKey());
11246
+ return _el$21;
10971
11247
  }
10972
11248
  }), (() => {
10973
- var _el$22 = _tmpl$1$1(), _el$23 = _el$22.firstChild, _el$24 = _el$23.nextSibling, _el$26 = _el$24.firstChild;
10974
- insert(_el$24, createComponent(Show, {
11249
+ var _el$28 = _tmpl$11$1(), _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$32 = _el$30.firstChild;
11250
+ insert(_el$30, createComponent(Show, {
10975
11251
  get when() {
10976
11252
  return props.chat.providerModels().length > 0;
10977
11253
  },
10978
11254
  get fallback() {
10979
11255
  return (() => {
10980
- var _el$60 = _tmpl$21();
10981
- _el$60.$$input = (e) => props.chat.setModel(e.currentTarget.value);
10982
- setAttribute(_el$60, "spellcheck", false);
10983
- createRenderEffect(() => setAttribute(_el$60, "placeholder", props.chat.modelFetchState() === "loading" ? "Fetching models…" : chatMeta().requiresKey && !props.chat.apiKey().trim() && !props.chat.hasStoredApiKey() ? "Enter API key to load models" : chatMeta().defaultModel || "model name"));
10984
- createRenderEffect(() => _el$60.value = props.chat.model());
10985
- return _el$60;
11256
+ var _el$66 = _tmpl$22();
11257
+ _el$66.$$input = (e) => props.chat.setModel(e.currentTarget.value);
11258
+ setAttribute(_el$66, "spellcheck", false);
11259
+ createRenderEffect(() => setAttribute(_el$66, "placeholder", props.chat.modelFetchState() === "loading" ? "Fetching models…" : chatMeta().requiresKey && !props.chat.apiKey().trim() && !props.chat.hasStoredApiKey() ? "Enter API key to load models" : chatMeta().defaultModel || "model name"));
11260
+ createRenderEffect(() => _el$66.value = props.chat.model());
11261
+ return _el$66;
10986
11262
  })();
10987
11263
  },
10988
11264
  get children() {
10989
- var _el$25 = _tmpl$9$2();
10990
- _el$25.addEventListener("change", (e) => props.chat.setModel(e.currentTarget.value));
10991
- insert(_el$25, createComponent(For, {
11265
+ var _el$31 = _tmpl$1$1();
11266
+ _el$31.addEventListener("change", (e) => props.chat.setModel(e.currentTarget.value));
11267
+ insert(_el$31, createComponent(For, {
10992
11268
  get each() {
10993
11269
  return props.chat.providerModels();
10994
11270
  },
10995
11271
  children: (m) => (() => {
10996
- var _el$61 = _tmpl$15$1();
10997
- _el$61.value = m;
10998
- insert(_el$61, m);
10999
- return _el$61;
11272
+ var _el$67 = _tmpl$17();
11273
+ _el$67.value = m;
11274
+ insert(_el$67, m);
11275
+ return _el$67;
11000
11276
  })()
11001
11277
  }));
11002
- createRenderEffect(() => _el$25.value = props.chat.model());
11003
- return _el$25;
11278
+ createRenderEffect(() => _el$31.value = props.chat.model());
11279
+ return _el$31;
11004
11280
  }
11005
- }), _el$26);
11006
- _el$26.$$click = () => props.chat.doFetchModels();
11007
- insert(_el$22, createComponent(Show, {
11281
+ }), _el$32);
11282
+ _el$32.$$click = () => props.chat.doFetchModels();
11283
+ insert(_el$28, createComponent(Show, {
11008
11284
  get when() {
11009
11285
  return props.chat.modelFetchState() === "error";
11010
11286
  },
11011
11287
  get children() {
11012
- return _tmpl$0$1();
11288
+ return _tmpl$10$1();
11013
11289
  }
11014
11290
  }), null);
11015
- insert(_el$22, createComponent(Show, {
11291
+ insert(_el$28, createComponent(Show, {
11016
11292
  get when() {
11017
11293
  return props.chat.modelFetchWarning();
11018
11294
  },
11019
11295
  children: (warning) => (() => {
11020
- var _el$62 = _tmpl$22();
11021
- insert(_el$62, warning);
11022
- return _el$62;
11296
+ var _el$68 = _tmpl$23();
11297
+ insert(_el$68, warning);
11298
+ return _el$68;
11023
11299
  })()
11024
11300
  }), null);
11025
- createRenderEffect(() => _el$26.disabled = props.chat.modelFetchState() === "loading");
11026
- return _el$22;
11301
+ createRenderEffect(() => _el$32.disabled = props.chat.modelFetchState() === "loading");
11302
+ return _el$28;
11027
11303
  })(), createComponent(Show, {
11028
11304
  get when() {
11029
11305
  return chatMeta().needsBaseUrl || props.chat.providerId() === "custom";
11030
11306
  },
11031
11307
  get children() {
11032
- var _el$28 = _tmpl$10$1(), _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling;
11033
- _el$30.$$input = (e) => props.chat.setBaseUrl(e.currentTarget.value);
11034
- setAttribute(_el$30, "spellcheck", false);
11035
- createRenderEffect(() => setAttribute(_el$30, "placeholder", chatMeta().defaultBaseUrl ?? "https://..."));
11036
- createRenderEffect(() => _el$30.value = props.chat.baseUrl());
11037
- return _el$28;
11308
+ var _el$34 = _tmpl$12$1(), _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling;
11309
+ _el$36.$$input = (e) => props.chat.setBaseUrl(e.currentTarget.value);
11310
+ setAttribute(_el$36, "spellcheck", false);
11311
+ createRenderEffect(() => setAttribute(_el$36, "placeholder", chatMeta().defaultBaseUrl ?? "https://..."));
11312
+ createRenderEffect(() => _el$36.value = props.chat.baseUrl());
11313
+ return _el$34;
11038
11314
  }
11039
11315
  }), createComponent(Show, {
11040
11316
  get when() {
11041
11317
  return props.chat.providerId() === "llama_cpp";
11042
11318
  },
11043
11319
  get children() {
11044
- return _tmpl$11$1();
11320
+ return _tmpl$13$1();
11045
11321
  }
11046
11322
  }), (() => {
11047
- var _el$32 = _tmpl$12$1(), _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling;
11048
- _el$34.addEventListener("change", (e) => props.chat.setReasoningEffort(e.currentTarget.value));
11049
- insert(_el$34, createComponent(For, {
11323
+ var _el$38 = _tmpl$14$1(), _el$39 = _el$38.firstChild, _el$40 = _el$39.nextSibling;
11324
+ _el$40.addEventListener("change", (e) => props.chat.setReasoningEffort(e.currentTarget.value));
11325
+ insert(_el$40, createComponent(For, {
11050
11326
  each: REASONING_EFFORT_OPTIONS,
11051
11327
  children: (option) => (() => {
11052
- var _el$63 = _tmpl$15$1();
11053
- insert(_el$63, () => option.label);
11054
- createRenderEffect(() => _el$63.value = option.value);
11055
- return _el$63;
11328
+ var _el$69 = _tmpl$17();
11329
+ insert(_el$69, () => option.label);
11330
+ createRenderEffect(() => _el$69.value = option.value);
11331
+ return _el$69;
11056
11332
  })()
11057
11333
  }));
11058
- createRenderEffect(() => _el$34.value = props.chat.reasoningEffort());
11059
- return _el$32;
11334
+ createRenderEffect(() => _el$40.value = props.chat.reasoningEffort());
11335
+ return _el$38;
11060
11336
  })()];
11061
11337
  }
11062
- }), _el$35);
11063
- _el$37.$$input = (e) => props.setMcpPort(e.currentTarget.value);
11064
- setAttribute(_el$37, "spellcheck", false);
11065
- _el$40.$$click = async () => {
11338
+ }), _el$41);
11339
+ _el$43.$$input = (e) => props.setMcpPort(e.currentTarget.value);
11340
+ setAttribute(_el$43, "spellcheck", false);
11341
+ _el$46.$$click = async () => {
11066
11342
  const result = await window.vessel.settings.regenerateMcpToken();
11067
11343
  setMcpTokenMessage(result ? "MCP token regenerated. Update any external client config using Vessel's auth file." : "MCP server is not running, so no token was regenerated.");
11068
11344
  };
11069
- insert(_el$35, createComponent(Show, {
11345
+ insert(_el$41, createComponent(Show, {
11070
11346
  get when() {
11071
11347
  return mcpTokenMessage();
11072
11348
  },
11073
11349
  children: (message) => (() => {
11074
- var _el$64 = _tmpl$23();
11075
- insert(_el$64, message);
11076
- return _el$64;
11350
+ var _el$70 = _tmpl$24();
11351
+ insert(_el$70, message);
11352
+ return _el$70;
11077
11353
  })()
11078
11354
  }), null);
11079
- insert(_el$41, createComponent(Show, {
11355
+ insert(_el$47, createComponent(Show, {
11080
11356
  get when() {
11081
11357
  return props.premiumActive();
11082
11358
  },
11083
11359
  get fallback() {
11084
- return _tmpl$24();
11360
+ return _tmpl$25();
11085
11361
  },
11086
11362
  get children() {
11087
- var _el$43 = _tmpl$13$1();
11088
- _el$43.$$input = (e) => props.setMaxToolIterations(e.currentTarget.value);
11089
- createRenderEffect(() => _el$43.value = props.maxToolIterations());
11090
- return _el$43;
11363
+ var _el$49 = _tmpl$15$1();
11364
+ _el$49.$$input = (e) => props.setMaxToolIterations(e.currentTarget.value);
11365
+ createRenderEffect(() => _el$49.value = props.maxToolIterations());
11366
+ return _el$49;
11091
11367
  }
11092
- }), _el$44);
11093
- insert(_el$44, createComponent(Show, {
11368
+ }), _el$50);
11369
+ insert(_el$50, createComponent(Show, {
11094
11370
  get when() {
11095
11371
  return props.premiumActive();
11096
11372
  },
11097
11373
  fallback: "Free tier: 50 tool calls per conversation turn. Upgrade to Vessel Premium to customize this limit (up to 1,000).",
11098
11374
  children: "Maximum number of tool calls the AI agent can make per conversation turn before pausing. Higher values let the agent complete longer multi-step workflows without stopping. Range: 10–1000."
11099
11375
  }));
11100
- _el$47.addEventListener("change", (e) => props.setAgentTranscriptMode(e.currentTarget.value));
11376
+ _el$53.addEventListener("change", (e) => props.setAgentTranscriptMode(e.currentTarget.value));
11101
11377
  insert(_el$, createComponent(Show, {
11102
11378
  get when() {
11103
11379
  return props.health();
11104
11380
  },
11105
11381
  children: (currentHealth) => (() => {
11106
- var _el$66 = _tmpl$26(), _el$67 = _el$66.firstChild, _el$68 = _el$67.nextSibling, _el$69 = _el$68.firstChild, _el$70 = _el$69.nextSibling;
11107
- _el$70.nextSibling;
11108
- insert(_el$70, () => currentHealth().mcp.status);
11109
- insert(_el$68, () => currentHealth().mcp.message, null);
11110
- insert(_el$66, createComponent(Show, {
11382
+ var _el$72 = _tmpl$27(), _el$73 = _el$72.firstChild, _el$74 = _el$73.nextSibling, _el$75 = _el$74.firstChild, _el$76 = _el$75.nextSibling;
11383
+ _el$76.nextSibling;
11384
+ insert(_el$76, () => currentHealth().mcp.status);
11385
+ insert(_el$74, () => currentHealth().mcp.message, null);
11386
+ insert(_el$72, createComponent(Show, {
11111
11387
  get when() {
11112
11388
  return currentHealth().mcp.endpoint;
11113
11389
  },
11114
11390
  children: (endpoint) => (() => {
11115
- var _el$73 = _tmpl$27(), _el$74 = _el$73.firstChild, _el$75 = _el$74.nextSibling;
11116
- insert(_el$75, endpoint);
11117
- return _el$73;
11391
+ var _el$79 = _tmpl$28(), _el$80 = _el$79.firstChild, _el$81 = _el$80.nextSibling;
11392
+ insert(_el$81, endpoint);
11393
+ return _el$79;
11118
11394
  })()
11119
11395
  }), null);
11120
- insert(_el$66, createComponent(Show, {
11396
+ insert(_el$72, createComponent(Show, {
11121
11397
  get when() {
11122
11398
  return currentHealth().startupIssues.length > 0;
11123
11399
  },
11124
11400
  get children() {
11125
- var _el$72 = _tmpl$25();
11126
- insert(_el$72, () => currentHealth().startupIssues.map((issue) => (() => {
11127
- var _el$76 = _tmpl$28(), _el$77 = _el$76.firstChild, _el$78 = _el$77.nextSibling;
11128
- insert(_el$77, () => issue.title);
11129
- insert(_el$78, () => issue.detail);
11130
- insert(_el$76, createComponent(Show, {
11401
+ var _el$78 = _tmpl$26();
11402
+ insert(_el$78, () => currentHealth().startupIssues.map((issue) => (() => {
11403
+ var _el$82 = _tmpl$29(), _el$83 = _el$82.firstChild, _el$84 = _el$83.nextSibling;
11404
+ insert(_el$83, () => issue.title);
11405
+ insert(_el$84, () => issue.detail);
11406
+ insert(_el$82, createComponent(Show, {
11131
11407
  get when() {
11132
11408
  return issue.action;
11133
11409
  },
11134
11410
  children: (action) => (() => {
11135
- var _el$79 = _tmpl$17();
11136
- insert(_el$79, action);
11137
- return _el$79;
11411
+ var _el$85 = _tmpl$19();
11412
+ insert(_el$85, action);
11413
+ return _el$85;
11138
11414
  })()
11139
11415
  }), null);
11140
11416
  createRenderEffect((_p$) => {
11141
11417
  var _v$3 = !!(issue.severity === "warning"), _v$4 = !!(issue.severity === "error");
11142
- _v$3 !== _p$.e && _el$76.classList.toggle("warning", _p$.e = _v$3);
11143
- _v$4 !== _p$.t && _el$76.classList.toggle("error", _p$.t = _v$4);
11418
+ _v$3 !== _p$.e && _el$82.classList.toggle("warning", _p$.e = _v$3);
11419
+ _v$4 !== _p$.t && _el$82.classList.toggle("error", _p$.t = _v$4);
11144
11420
  return _p$;
11145
11421
  }, {
11146
11422
  e: void 0,
11147
11423
  t: void 0
11148
11424
  });
11149
- return _el$76;
11425
+ return _el$82;
11150
11426
  })()));
11151
- return _el$72;
11427
+ return _el$78;
11152
11428
  }
11153
11429
  }), null);
11154
- return _el$66;
11430
+ return _el$72;
11155
11431
  })()
11156
- }), _el$48);
11157
- _el$50.$$input = (e) => props.setObsidianVaultPath(e.currentTarget.value);
11158
- setAttribute(_el$50, "spellcheck", false);
11432
+ }), _el$54);
11433
+ _el$56.$$input = (e) => props.setObsidianVaultPath(e.currentTarget.value);
11434
+ setAttribute(_el$56, "spellcheck", false);
11159
11435
  createRenderEffect((_p$) => {
11160
11436
  var _v$ = !!props.chat.enabled(), _v$2 = props.chat.enabled();
11161
- _v$ !== _p$.e && _el$5.classList.toggle("on", _p$.e = _v$);
11162
- _v$2 !== _p$.t && setAttribute(_el$5, "aria-checked", _p$.t = _v$2);
11437
+ _v$ !== _p$.e && _el$1.classList.toggle("on", _p$.e = _v$);
11438
+ _v$2 !== _p$.t && setAttribute(_el$1, "aria-checked", _p$.t = _v$2);
11163
11439
  return _p$;
11164
11440
  }, {
11165
11441
  e: void 0,
11166
11442
  t: void 0
11167
11443
  });
11168
- createRenderEffect(() => _el$37.value = props.mcpPort());
11169
- createRenderEffect(() => _el$47.value = props.agentTranscriptMode());
11170
- createRenderEffect(() => _el$50.value = props.obsidianVaultPath());
11444
+ createRenderEffect(() => _el$43.value = props.mcpPort());
11445
+ createRenderEffect(() => _el$53.value = props.agentTranscriptMode());
11446
+ createRenderEffect(() => _el$56.value = props.obsidianVaultPath());
11171
11447
  return _el$;
11172
11448
  })();
11173
11449
  };
@@ -13017,7 +13293,7 @@ const Settings = () => {
13017
13293
  setPremiumCodeSent(false);
13018
13294
  };
13019
13295
  const [chatEnabled, setChatEnabled] = createSignal(false);
13020
- const [chatProviderId, setChatProviderId] = createSignal("anthropic");
13296
+ const [chatProviderId, setChatProviderId] = createSignal("openrouter");
13021
13297
  const [chatApiKey, setChatApiKey] = createSignal("");
13022
13298
  const [chatHasStoredApiKey, setChatHasStoredApiKey] = createSignal(false);
13023
13299
  const [chatModel, setChatModel] = createSignal("");
@@ -13028,9 +13304,24 @@ const Settings = () => {
13028
13304
  const [providerModels, setProviderModels] = createSignal([]);
13029
13305
  const [modelFetchState, setModelFetchState] = createSignal("idle");
13030
13306
  const [modelFetchWarning, setModelFetchWarning] = createSignal(null);
13031
- const [codexAuthStatus, setCodexAuthStatus] = createSignal("idle");
13032
- const [codexAccountEmail, setCodexAccountEmail] = createSignal("");
13033
- const [codexAuthError, setCodexAuthError] = createSignal("");
13307
+ const providerAuth = useProviderAuthSetup({
13308
+ onCodexConnected: () => {
13309
+ setChatHasStoredApiKey(true);
13310
+ },
13311
+ onCodexDisconnected: () => {
13312
+ setChatHasStoredApiKey(false);
13313
+ },
13314
+ onOpenRouterConnected: async (result) => {
13315
+ setChatEnabled(true);
13316
+ setChatProviderId("openrouter");
13317
+ setChatApiKey("");
13318
+ setChatHasStoredApiKey(true);
13319
+ setChatModel(result.model || PROVIDERS.openrouter.defaultModel);
13320
+ setChatBaseUrl(PROVIDERS.openrouter.defaultBaseUrl);
13321
+ setChatReasoningEffort("off");
13322
+ await loadState();
13323
+ }
13324
+ });
13034
13325
  const resetProviderModels = () => {
13035
13326
  setProviderModels([]);
13036
13327
  setModelFetchState("idle");
@@ -13075,30 +13366,6 @@ const Settings = () => {
13075
13366
  setModelFetchState("error");
13076
13367
  });
13077
13368
  };
13078
- const startCodexAuth = async () => {
13079
- setCodexAuthStatus("waiting");
13080
- setCodexAuthError("");
13081
- try {
13082
- const result = await window.vessel.codex.startAuth();
13083
- if (result.ok) {
13084
- setCodexAccountEmail(result.accountEmail);
13085
- setCodexAuthStatus("connected");
13086
- setChatHasStoredApiKey(true);
13087
- } else {
13088
- setCodexAuthStatus("error");
13089
- setCodexAuthError(result.error);
13090
- }
13091
- } catch (err) {
13092
- setCodexAuthStatus("error");
13093
- setCodexAuthError(err instanceof Error ? err.message : "Unknown error");
13094
- }
13095
- };
13096
- const disconnectCodex = async () => {
13097
- await window.vessel.codex.disconnect();
13098
- setCodexAuthStatus("idle");
13099
- setCodexAccountEmail("");
13100
- setChatHasStoredApiKey(false);
13101
- };
13102
13369
  createEffect(() => {
13103
13370
  if (!chatEnabled()) return;
13104
13371
  const meta = chatProviderMeta();
@@ -13142,9 +13409,7 @@ const Settings = () => {
13142
13409
  setChatHasStoredApiKey(false);
13143
13410
  setChatReasoningEffort("off");
13144
13411
  }
13145
- if (cp?.id === "openai_codex" && cp.hasApiKey) {
13146
- setCodexAuthStatus("connected");
13147
- }
13412
+ providerAuth.markProviderConnected(cp?.id, cp?.hasApiKey === true);
13148
13413
  setTelemetryEnabled(settings.telemetryEnabled !== false);
13149
13414
  const dp = settings.domainPolicy ?? {
13150
13415
  allowedDomains: [],
@@ -13191,20 +13456,9 @@ const Settings = () => {
13191
13456
  });
13192
13457
  }
13193
13458
  });
13194
- const unsubCodex = window.vessel.codex.onAuthStatus((payload) => {
13195
- if (payload.status === "waiting") {
13196
- setCodexAuthStatus("waiting");
13197
- } else if (payload.status === "exchanging") {
13198
- setCodexAuthStatus("exchanging");
13199
- } else if (payload.status === "error") {
13200
- setCodexAuthStatus("error");
13201
- setCodexAuthError(payload.error || "Unknown error");
13202
- }
13203
- });
13204
13459
  onCleanup(() => {
13205
13460
  unsubscribe2();
13206
13461
  unsubscribePremium();
13207
- unsubCodex();
13208
13462
  });
13209
13463
  });
13210
13464
  createEffect(() => {
@@ -13357,34 +13611,39 @@ const Settings = () => {
13357
13611
  },
13358
13612
  get children() {
13359
13613
  return createComponent(SettingsAgent, {
13360
- chat: {
13361
- enabled: chatEnabled,
13362
- setEnabled: setChatEnabled,
13363
- providerId: chatProviderId,
13364
- setProviderId: setChatProviderId,
13365
- apiKey: chatApiKey,
13366
- setApiKey: setChatApiKey,
13367
- hasStoredApiKey: chatHasStoredApiKey,
13368
- setHasStoredApiKey: setChatHasStoredApiKey,
13369
- model: chatModel,
13370
- setModel: setChatModel,
13371
- baseUrl: chatBaseUrl,
13372
- setBaseUrl: setChatBaseUrl,
13373
- reasoningEffort: chatReasoningEffort,
13374
- setReasoningEffort: setChatReasoningEffort,
13375
- providerModels,
13376
- modelFetchState,
13377
- modelFetchWarning,
13378
- doFetchModels,
13379
- resetProviderModels,
13380
- codexAuthStatus,
13381
- codexAccountEmail,
13382
- setCodexAccountEmail,
13383
- codexAuthError,
13384
- setCodexAuthError,
13385
- providerType,
13386
- startCodexAuth,
13387
- disconnectCodex
13614
+ get chat() {
13615
+ return {
13616
+ enabled: chatEnabled,
13617
+ setEnabled: setChatEnabled,
13618
+ providerId: chatProviderId,
13619
+ setProviderId: setChatProviderId,
13620
+ apiKey: chatApiKey,
13621
+ setApiKey: setChatApiKey,
13622
+ hasStoredApiKey: chatHasStoredApiKey,
13623
+ setHasStoredApiKey: setChatHasStoredApiKey,
13624
+ model: chatModel,
13625
+ setModel: setChatModel,
13626
+ baseUrl: chatBaseUrl,
13627
+ setBaseUrl: setChatBaseUrl,
13628
+ reasoningEffort: chatReasoningEffort,
13629
+ setReasoningEffort: setChatReasoningEffort,
13630
+ providerModels,
13631
+ modelFetchState,
13632
+ modelFetchWarning,
13633
+ doFetchModels,
13634
+ resetProviderModels,
13635
+ codexAuthStatus: providerAuth.codexAuthStatus,
13636
+ codexAccountEmail: providerAuth.codexAccountEmail,
13637
+ setCodexAccountEmail: providerAuth.setCodexAccountEmail,
13638
+ codexAuthError: providerAuth.codexAuthError,
13639
+ setCodexAuthError: providerAuth.setCodexAuthError,
13640
+ openRouterAuthStatus: providerAuth.openRouterAuthStatus,
13641
+ openRouterAuthError: providerAuth.openRouterAuthError,
13642
+ providerType,
13643
+ startCodexAuth: providerAuth.startCodexAuth,
13644
+ disconnectCodex: providerAuth.disconnectCodex,
13645
+ startOpenRouterAuth: providerAuth.startOpenRouterAuth
13646
+ };
13388
13647
  },
13389
13648
  mcpPort,
13390
13649
  setMcpPort,