@feedmepos/mf-miniprogram-v2 0.1.0-dev.32 → 0.1.0-dev.33

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.
@@ -1,7 +1,7 @@
1
1
  var Bi = Object.defineProperty;
2
2
  var Fi = (t, e, n) => e in t ? Bi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var be = (t, e, n) => Fi(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { defineComponent as pt, ref as ae, computed as B, resolveComponent as je, openBlock as h, createElementBlock as _, normalizeClass as Ae, createElementVNode as f, createVNode as W, toDisplayString as I, createTextVNode as Ke, createCommentVNode as U, watch as Ot, createBlock as Se, Fragment as Te, renderList as Re, normalizeStyle as Pt, reactive as qn, nextTick as $n, onBeforeUnmount as ar, withModifiers as Zn, unref as O, withDirectives as Yn, vModelText as Xn, renderSlot as Ui, onMounted as Rn, withCtx as gt, withKeys as ji } from "vue";
4
+ import { defineComponent as pt, ref as ae, computed as B, resolveComponent as je, openBlock as h, createElementBlock as _, normalizeClass as Ae, createElementVNode as f, createVNode as W, toDisplayString as I, createTextVNode as Ke, createCommentVNode as j, watch as Ot, createBlock as Se, Fragment as Te, renderList as Re, normalizeStyle as Pt, reactive as qn, nextTick as $n, onBeforeUnmount as ar, withModifiers as Zn, unref as O, withDirectives as Yn, vModelText as Xn, renderSlot as Ui, onMounted as Rn, withCtx as gt, withKeys as ji } from "vue";
5
5
  import { useCoreStore as Br, FeedMeAuth as Hi } from "@feedmepos/mf-common";
6
6
  import { useDialog as ba } from "@feedmepos/ui-library";
7
7
  import { _ as Mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -211,17 +211,17 @@ ${p}` : p;
211
211
  let y = this.rules.other.nextBulletRegex(c), w = this.rules.other.hrRegex(c), T = this.rules.other.fencesBeginRegex(c), x = this.rules.other.headingBeginRegex(c), $ = this.rules.other.htmlBeginRegex(c), C = this.rules.other.blockquoteBeginRegex(c);
212
212
  for (; t; ) {
213
213
  let M = t.split(`
214
- `, 1)[0], j;
215
- if (m = M, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), j = m) : j = m.replace(this.rules.other.tabCharGlobal, " "), T.test(m) || x.test(m) || $.test(m) || C.test(m) || y.test(m) || w.test(m)) break;
216
- if (j.search(this.rules.other.nonSpaceChar) >= c || !m.trim()) p += `
217
- ` + j.slice(c);
214
+ `, 1)[0], U;
215
+ if (m = M, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), U = m) : U = m.replace(this.rules.other.tabCharGlobal, " "), T.test(m) || x.test(m) || $.test(m) || C.test(m) || y.test(m) || w.test(m)) break;
216
+ if (U.search(this.rules.other.nonSpaceChar) >= c || !m.trim()) p += `
217
+ ` + U.slice(c);
218
218
  else {
219
219
  if (S || v.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || T.test(v) || x.test(v) || w.test(v)) break;
220
220
  p += `
221
221
  ` + m;
222
222
  }
223
223
  S = !m.trim(), u += M + `
224
- `, t = t.substring(M.length + 1), v = j.slice(c);
224
+ `, t = t.substring(M.length + 1), v = U.slice(c);
225
225
  }
226
226
  }
227
227
  s.loose || (l ? s.loose = !0 : this.rules.other.doubleBlankLine.test(u) && (l = !0)), s.items.push({ type: "list_item", raw: u, task: !!this.options.gfm && this.rules.other.listIsTask.test(p), loose: !1, text: p, tokens: [] }), s.raw += u;
@@ -2200,7 +2200,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = L, me = Y), re ==
2200
2200
  }
2201
2201
  re.name || (re.name = L), e[L] = re, re.rawDefinition = Y.bind(null, t), re.aliases && _e(re.aliases, { languageName: L });
2202
2202
  }
2203
- function j(L) {
2203
+ function U(L) {
2204
2204
  delete e[L];
2205
2205
  for (const Y of Object.keys(n))
2206
2206
  n[Y] === L && delete n[Y];
@@ -2258,7 +2258,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = L, me = Y), re ==
2258
2258
  initHighlighting: T,
2259
2259
  initHighlightingOnLoad: x,
2260
2260
  registerLanguage: M,
2261
- unregisterLanguage: j,
2261
+ unregisterLanguage: U,
2262
2262
  listLanguages: ne,
2263
2263
  getLanguage: ee,
2264
2264
  registerAliases: _e,
@@ -2515,21 +2515,21 @@ function Wa() {
2515
2515
  const J = n.createElement("template");
2516
2516
  J.content && J.content.ownerDocument && (n = J.content.ownerDocument);
2517
2517
  }
2518
- let j, ne = "", ee, _e = !1, Ce = 0;
2518
+ let U, ne = "", ee, _e = !1, Ce = 0;
2519
2519
  const V = function() {
2520
2520
  if (Ce > 0)
2521
2521
  throw Xt('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
2522
2522
  }, Q = function(d) {
2523
2523
  V(), Ce++;
2524
2524
  try {
2525
- return j.createHTML(d);
2525
+ return U.createHTML(d);
2526
2526
  } finally {
2527
2527
  Ce--;
2528
2528
  }
2529
2529
  }, pe = function(d) {
2530
2530
  V(), Ce++;
2531
2531
  try {
2532
- return j.createScriptURL(d);
2532
+ return U.createScriptURL(d);
2533
2533
  } finally {
2534
2534
  Ce--;
2535
2535
  }
@@ -2662,14 +2662,14 @@ function Wa() {
2662
2662
  throw Xt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
2663
2663
  if (typeof d.TRUSTED_TYPES_POLICY.createScriptURL != "function")
2664
2664
  throw Xt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
2665
- const X = j;
2666
- j = d.TRUSTED_TYPES_POLICY;
2665
+ const X = U;
2666
+ U = d.TRUSTED_TYPES_POLICY;
2667
2667
  try {
2668
2668
  ne = Q("");
2669
2669
  } catch (fe) {
2670
- throw j = X, fe;
2670
+ throw U = X, fe;
2671
2671
  }
2672
- } else d.TRUSTED_TYPES_POLICY === null ? (j = void 0, ne = "") : (j === void 0 && (j = we()), j && typeof ne == "string" && (ne = Q("")));
2672
+ } else d.TRUSTED_TYPES_POLICY === null ? (U = void 0, ne = "") : (U === void 0 && (U = we()), U && typeof ne == "string" && (ne = Q("")));
2673
2673
  ut && ut(d), lt = d;
2674
2674
  }, os = Oe({}, [...xr, ..._r, ...Kl]), ls = Oe({}, [...wr, ...Vl]), Ci = function(d, A, X) {
2675
2675
  return A.namespaceURI === se ? d === "svg" : A.namespaceURI === E ? d === "svg" && (X === "annotation-xml" || G[X]) : !!os[d];
@@ -2771,7 +2771,7 @@ function Wa() {
2771
2771
  X = Le && Le[0];
2772
2772
  }
2773
2773
  $t === "application/xhtml+xml" && he === se && (d = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + d + "</body></html>");
2774
- const fe = j ? Q(d) : d;
2774
+ const fe = U ? Q(d) : d;
2775
2775
  if (he === se)
2776
2776
  try {
2777
2777
  A = new p().parseFromString(fe, $t);
@@ -2928,7 +2928,7 @@ function Wa() {
2928
2928
  }, Li = Oe({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), hs = function(d) {
2929
2929
  return !Li[Cn(d)] && ct(Et, d);
2930
2930
  }, Di = function(d, A, X, fe) {
2931
- if (j && typeof v == "object" && typeof v.getAttributeType == "function" && !X)
2931
+ if (U && typeof v == "object" && typeof v.getAttributeType == "function" && !X)
2932
2932
  switch (v.getAttributeType(d, A)) {
2933
2933
  case "TrustedHTML":
2934
2934
  return Q(fe);
@@ -3060,7 +3060,7 @@ function Wa() {
3060
3060
  else {
3061
3061
  if (!Ne && !We && !ot && // eslint-disable-next-line unicorn/prefer-includes
3062
3062
  J.indexOf("<") === -1)
3063
- return j && At ? Q(J) : J;
3063
+ return U && At ? Q(J) : J;
3064
3064
  if (A = us(J), !A)
3065
3065
  return Ne ? null : At ? ne : "";
3066
3066
  }
@@ -3086,12 +3086,12 @@ function Wa() {
3086
3086
  }
3087
3087
  let Qe = ot ? A.outerHTML : A.innerHTML;
3088
3088
  return ot && $e["!doctype"] && A.ownerDocument && A.ownerDocument.doctype && A.ownerDocument.doctype.name && ct(tc, A.ownerDocument.doctype.name) && (Qe = "<!DOCTYPE " + A.ownerDocument.doctype.name + `>
3089
- ` + Qe), We && (Qe = Mn(Qe)), j && At ? Q(Qe) : Qe;
3089
+ ` + Qe), We && (Qe = Mn(Qe)), U && At ? Q(Qe) : Qe;
3090
3090
  }, e.setConfig = function() {
3091
3091
  let J = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3092
3092
  hr(J), q = !0, ce = $e, ye = D;
3093
3093
  }, e.clearConfig = function() {
3094
- lt = null, q = !1, ce = null, ye = null, j = ee, ne = "";
3094
+ lt = null, q = !1, ce = null, ye = null, U = ee, ne = "";
3095
3095
  }, e.isValidAttribute = function(J, d, A) {
3096
3096
  lt || hr({});
3097
3097
  const X = P(J), fe = P(d);
@@ -3449,7 +3449,7 @@ function lc(t) {
3449
3449
  keywords: a,
3450
3450
  contains: ["self"].concat(C)
3451
3451
  }
3452
- ]), j = {
3452
+ ]), U = {
3453
3453
  className: "params",
3454
3454
  // convert this to negative lookbehind in v12
3455
3455
  begin: /(\s*)\(/,
@@ -3544,7 +3544,7 @@ function lc(t) {
3544
3544
  3: "title.function"
3545
3545
  },
3546
3546
  label: "func.def",
3547
- contains: [j],
3547
+ contains: [U],
3548
3548
  illegal: /%/
3549
3549
  }, V = {
3550
3550
  relevance: 0,
@@ -3592,7 +3592,7 @@ function lc(t) {
3592
3592
  // eat to avoid empty params
3593
3593
  begin: /\(\)/
3594
3594
  },
3595
- j
3595
+ U
3596
3596
  ]
3597
3597
  }, L = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + t.UNDERSCORE_IDENT_RE + ")\\s*=>", Y = {
3598
3598
  match: [
@@ -3611,7 +3611,7 @@ function lc(t) {
3611
3611
  3: "title.function"
3612
3612
  },
3613
3613
  contains: [
3614
- j
3614
+ U
3615
3615
  ]
3616
3616
  };
3617
3617
  return {
@@ -3735,7 +3735,7 @@ function lc(t) {
3735
3735
  returnBegin: !0,
3736
3736
  label: "func.def",
3737
3737
  contains: [
3738
- j,
3738
+ U,
3739
3739
  t.inherit(t.TITLE_MODE, { begin: r, className: "title.function" })
3740
3740
  ]
3741
3741
  },
@@ -3755,7 +3755,7 @@ function lc(t) {
3755
3755
  {
3756
3756
  match: [/\bconstructor(?=\s*\()/],
3757
3757
  className: { 1: "title.function" },
3758
- contains: [j]
3758
+ contains: [U]
3759
3759
  },
3760
3760
  pe,
3761
3761
  V,
@@ -4199,7 +4199,7 @@ function si(t) {
4199
4199
  keywords: a,
4200
4200
  contains: ["self"].concat(C)
4201
4201
  }
4202
- ]), j = {
4202
+ ]), U = {
4203
4203
  className: "params",
4204
4204
  // convert this to negative lookbehind in v12
4205
4205
  begin: /(\s*)\(/,
@@ -4294,7 +4294,7 @@ function si(t) {
4294
4294
  3: "title.function"
4295
4295
  },
4296
4296
  label: "func.def",
4297
- contains: [j],
4297
+ contains: [U],
4298
4298
  illegal: /%/
4299
4299
  }, V = {
4300
4300
  relevance: 0,
@@ -4342,7 +4342,7 @@ function si(t) {
4342
4342
  // eat to avoid empty params
4343
4343
  begin: /\(\)/
4344
4344
  },
4345
- j
4345
+ U
4346
4346
  ]
4347
4347
  }, L = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + t.UNDERSCORE_IDENT_RE + ")\\s*=>", Y = {
4348
4348
  match: [
@@ -4361,7 +4361,7 @@ function si(t) {
4361
4361
  3: "title.function"
4362
4362
  },
4363
4363
  contains: [
4364
- j
4364
+ U
4365
4365
  ]
4366
4366
  };
4367
4367
  return {
@@ -4485,7 +4485,7 @@ function si(t) {
4485
4485
  returnBegin: !0,
4486
4486
  label: "func.def",
4487
4487
  contains: [
4488
- j,
4488
+ U,
4489
4489
  t.inherit(t.TITLE_MODE, { begin: r, className: "title.function" })
4490
4490
  ]
4491
4491
  },
@@ -4505,7 +4505,7 @@ function si(t) {
4505
4505
  {
4506
4506
  match: [/\bconstructor(?=\s*\()/],
4507
4507
  className: { 1: "title.function" },
4508
- contains: [j]
4508
+ contains: [U]
4509
4509
  },
4510
4510
  pe,
4511
4511
  V,
@@ -6365,8 +6365,8 @@ const Tc = { class: "min-w-0 flex-1 truncate text-[11px] leading-[16px] text-fm-
6365
6365
  class: "tool-card__block hljs",
6366
6366
  innerHTML: v.value
6367
6367
  }, null, 8, Ic)
6368
- ])) : U("", !0)
6369
- ])) : U("", !0)
6368
+ ])) : j("", !0)
6369
+ ])) : j("", !0)
6370
6370
  ], 2);
6371
6371
  };
6372
6372
  }
@@ -6433,7 +6433,7 @@ const Tc = { class: "min-w-0 flex-1 truncate text-[11px] leading-[16px] text-fm-
6433
6433
  key: m.id,
6434
6434
  part: m
6435
6435
  }, null, 8, ["part"]))), 128))
6436
- ])) : U("", !0)
6436
+ ])) : j("", !0)
6437
6437
  ], 2);
6438
6438
  };
6439
6439
  }
@@ -6750,17 +6750,17 @@ const cu = { class: "flex min-w-0 flex-col gap-6" }, uu = { class: "flex items-c
6750
6750
  key: o.id,
6751
6751
  class: "min-w-0 rounded-md bg-white/15 px-[8px] py-[6px]"
6752
6752
  }, [
6753
- o.note ? (h(), _("div", du, I(o.note), 1)) : U("", !0),
6753
+ o.note ? (h(), _("div", du, I(o.note), 1)) : j("", !0),
6754
6754
  f("div", pu, [
6755
6755
  f("span", fu, I(o.label), 1),
6756
- o.route && o.route !== "/" ? (h(), _("span", hu, I(o.route), 1)) : U("", !0),
6757
- o.device ? (h(), _("span", mu, I(o.device), 1)) : U("", !0),
6756
+ o.route && o.route !== "/" ? (h(), _("span", hu, I(o.route), 1)) : j("", !0),
6757
+ o.device ? (h(), _("span", mu, I(o.device), 1)) : j("", !0),
6758
6758
  o.source ? (h(), _("span", {
6759
6759
  key: 2,
6760
6760
  class: "min-w-0 truncate font-mono",
6761
6761
  title: o.source
6762
- }, I(o.source), 9, gu)) : U("", !0),
6763
- !((l = o.changes) != null && l.length) && o.hasProperties ? (h(), _("span", bu, "properties")) : U("", !0)
6762
+ }, I(o.source), 9, gu)) : j("", !0),
6763
+ !((l = o.changes) != null && l.length) && o.hasProperties ? (h(), _("span", bu, "properties")) : j("", !0)
6764
6764
  ]),
6765
6765
  (a = o.changes) != null && a.length ? (h(), _("ul", yu, [
6766
6766
  (h(!0), _(Te, null, Re(o.changes, (i) => (h(), _("li", {
@@ -6773,19 +6773,19 @@ const cu = { class: "flex min-w-0 flex-col gap-6" }, uu = { class: "flex items-c
6773
6773
  key: 0,
6774
6774
  class: "annotation-message__swatch",
6775
6775
  style: Pt({ background: e(i.before) })
6776
- }, null, 4)) : U("", !0),
6776
+ }, null, 4)) : j("", !0),
6777
6777
  Ke(I(i.before) + " ", 1),
6778
6778
  r[0] || (r[0] = f("span", { class: "opacity-70" }, "→", -1)),
6779
6779
  e(i.after) ? (h(), _("span", {
6780
6780
  key: 1,
6781
6781
  class: "annotation-message__swatch",
6782
6782
  style: Pt({ background: e(i.after) })
6783
- }, null, 4)) : U("", !0),
6783
+ }, null, 4)) : j("", !0),
6784
6784
  Ke(I(i.after), 1)
6785
6785
  ]),
6786
- i.token ? (h(), _("span", _u, I(i.token), 1)) : U("", !0)
6786
+ i.token ? (h(), _("span", _u, I(i.token), 1)) : j("", !0)
6787
6787
  ]))), 128))
6788
- ])) : U("", !0)
6788
+ ])) : j("", !0)
6789
6789
  ]);
6790
6790
  }), 128))
6791
6791
  ]);
@@ -7135,7 +7135,7 @@ const Du = { class: "my-8 flex flex-col gap-8 rounded-lg border border-fm-color-
7135
7135
  }, null, 4),
7136
7136
  f("span", Hu, I(v.value), 1)
7137
7137
  ], 8, ju))), 128))
7138
- ])) : U("", !0),
7138
+ ])) : j("", !0),
7139
7139
  o.value.length ? (h(), _("div", Gu, [
7140
7140
  (h(!0), _(Te, null, Re(o.value, (v) => (h(), _("span", {
7141
7141
  key: v.label,
@@ -7144,8 +7144,8 @@ const Du = { class: "my-8 flex flex-col gap-8 rounded-lg border border-fm-color-
7144
7144
  Ke(I(v.label) + ": ", 1),
7145
7145
  f("span", Wu, I(v.value), 1)
7146
7146
  ]))), 128))
7147
- ])) : U("", !0),
7148
- r.value ? (h(), _("p", Ku, " Loaded into the BrandKit panel — review the fields there and press Save to make it live. ")) : U("", !0)
7147
+ ])) : j("", !0),
7148
+ r.value ? (h(), _("p", Ku, " Loaded into the BrandKit panel — review the fields there and press Save to make it live. ")) : j("", !0)
7149
7149
  ]);
7150
7150
  };
7151
7151
  }
@@ -7264,17 +7264,17 @@ class td {
7264
7264
  let $;
7265
7265
  const C = S[x - 1], M = S[x + 1];
7266
7266
  C && (S[x - 1] = void 0);
7267
- let j = !1;
7267
+ let U = !1;
7268
7268
  if (M) {
7269
7269
  const ee = M.oldPos - x;
7270
- j = M && 0 <= ee && ee < a;
7270
+ U = M && 0 <= ee && ee < a;
7271
7271
  }
7272
7272
  const ne = C && C.oldPos + 1 < i;
7273
- if (!j && !ne) {
7273
+ if (!U && !ne) {
7274
7274
  S[x] = void 0;
7275
7275
  continue;
7276
7276
  }
7277
- if (!ne || j && C.oldPos < M.oldPos ? $ = this.addToPath(M, !0, !1, 0, r) : $ = this.addToPath(C, !1, !0, 1, r), c = this.extractCommon($, n, e, x, r), $.oldPos + 1 >= i && c + 1 >= a)
7277
+ if (!ne || U && C.oldPos < M.oldPos ? $ = this.addToPath(M, !0, !1, 0, r) : $ = this.addToPath(C, !1, !0, 1, r), c = this.extractCommon($, n, e, x, r), $.oldPos + 1 >= i && c + 1 >= a)
7278
7278
  return l(this.buildValues($.lastComponent, n, e)) || !0;
7279
7279
  S[x] = $, $.oldPos + 1 >= i && (w = Math.min(w, x - 1)), c + 1 >= a && (y = Math.max(y, x + 1));
7280
7280
  }
@@ -7429,8 +7429,8 @@ function ad(t) {
7429
7429
  C && (y.oldFileName = "a/" + p(C[1]), y.isRename = !0);
7430
7430
  const M = /^rename to (.*)/.exec($);
7431
7431
  M && (y.newFileName = "b/" + p(M[1]), y.isRename = !0);
7432
- const j = /^copy from (.*)/.exec($);
7433
- j && (y.oldFileName = "a/" + p(j[1]), y.isCopy = !0);
7432
+ const U = /^copy from (.*)/.exec($);
7433
+ U && (y.oldFileName = "a/" + p(U[1]), y.isCopy = !0);
7434
7434
  const ne = /^copy to (.*)/.exec($);
7435
7435
  ne && (y.newFileName = "b/" + p(ne[1]), y.isCopy = !0);
7436
7436
  const ee = /^new file mode (\d+)/.exec($);
@@ -7659,14 +7659,14 @@ function id(t, e, n, r, s, o, l) {
7659
7659
  const M = Math.min(C.length, i);
7660
7660
  for (const ne of v(C.slice(0, M)))
7661
7661
  y.push(ne);
7662
- const j = {
7662
+ const U = {
7663
7663
  oldStart: S,
7664
7664
  oldLines: w - S + M,
7665
7665
  newStart: c,
7666
7666
  newLines: T - c + M,
7667
7667
  lines: y
7668
7668
  };
7669
- m.push(j), S = 0, c = 0, y = [];
7669
+ m.push(U), S = 0, c = 0, y = [];
7670
7670
  }
7671
7671
  w += C.length, T += C.length;
7672
7672
  }
@@ -7725,23 +7725,23 @@ const ld = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
7725
7725
  let T = c.oldStart, x = c.newStart;
7726
7726
  if (c.lines.forEach((C, M) => {
7727
7727
  y.push({ oldNumber: T, newNumber: x });
7728
- const j = C[0] ?? " ";
7729
- (j === "+" || j === "-") && w.push(M), j !== "+" && j !== "\\" && T++, j !== "-" && j !== "\\" && x++;
7728
+ const U = C[0] ?? " ";
7729
+ (U === "+" || U === "-") && w.push(M), U !== "+" && U !== "\\" && T++, U !== "-" && U !== "\\" && x++;
7730
7730
  }), !w.length) return [];
7731
7731
  const $ = [];
7732
7732
  for (const C of w) {
7733
- const M = Math.max(0, C - S), j = Math.min(c.lines.length - 1, C + S), ne = $[$.length - 1];
7734
- ne && M <= ne.end + 1 ? ne.end = Math.max(ne.end, j) : $.push({ start: M, end: j });
7733
+ const M = Math.max(0, C - S), U = Math.min(c.lines.length - 1, C + S), ne = $[$.length - 1];
7734
+ ne && M <= ne.end + 1 ? ne.end = Math.max(ne.end, U) : $.push({ start: M, end: U });
7735
7735
  }
7736
7736
  return $.map(({ start: C, end: M }) => {
7737
7737
  var ne, ee;
7738
- const j = c.lines.slice(C, M + 1);
7738
+ const U = c.lines.slice(C, M + 1);
7739
7739
  return {
7740
7740
  oldStart: ((ne = y[C]) == null ? void 0 : ne.oldNumber) ?? c.oldStart,
7741
7741
  newStart: ((ee = y[C]) == null ? void 0 : ee.newNumber) ?? c.newStart,
7742
- oldLines: j.filter((_e) => _e[0] !== "+" && _e[0] !== "\\").length,
7743
- newLines: j.filter((_e) => _e[0] !== "-" && _e[0] !== "\\").length,
7744
- lines: j
7742
+ oldLines: U.filter((_e) => _e[0] !== "+" && _e[0] !== "\\").length,
7743
+ newLines: U.filter((_e) => _e[0] !== "-" && _e[0] !== "\\").length,
7744
+ lines: U
7745
7745
  };
7746
7746
  });
7747
7747
  });
@@ -7805,7 +7805,7 @@ const ld = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
7805
7805
  t.diffs.length ? (h(), _("span", dd, [
7806
7806
  f("span", pd, "+" + I(i.value), 1),
7807
7807
  f("span", fd, "-" + I(u.value), 1)
7808
- ])) : U("", !0),
7808
+ ])) : j("", !0),
7809
7809
  W(y, {
7810
7810
  name: "expand_more",
7811
7811
  size: "sm",
@@ -7862,7 +7862,7 @@ const ld = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
7862
7862
  ])
7863
7863
  ], 2))), 128))
7864
7864
  ]))), 128)),
7865
- w.hunks.length === 0 ? (h(), _("div", Cd, " No textual changes to display. ")) : U("", !0)
7865
+ w.hunks.length === 0 ? (h(), _("div", Cd, " No textual changes to display. ")) : j("", !0)
7866
7866
  ])
7867
7867
  ], 8, md))), 128)) : (h(), _("div", $d, [
7868
7868
  (h(!0), _(Te, null, Re(t.files, (w) => (h(), _("div", {
@@ -7879,9 +7879,9 @@ const ld = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
7879
7879
  title: w
7880
7880
  }, I(w), 9, Rd)
7881
7881
  ]))), 128)),
7882
- t.loading ? (h(), _("p", Id, " The readable diff will appear when the agent finishes this step. ")) : U("", !0)
7882
+ t.loading ? (h(), _("p", Id, " The readable diff will appear when the agent finishes this step. ")) : j("", !0)
7883
7883
  ]))
7884
- ])) : U("", !0)
7884
+ ])) : j("", !0)
7885
7885
  ]);
7886
7886
  };
7887
7887
  }
@@ -7945,22 +7945,22 @@ const ld = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
7945
7945
  size: "sm"
7946
7946
  }),
7947
7947
  f("span", null, I(c.part.filename ?? c.part.mime), 1)
7948
- ])) : U("", !0)
7948
+ ])) : j("", !0)
7949
7949
  ], 64))), 128)),
7950
7950
  !s.value && (t.message.changedFiles.length || t.message.diffs.length) ? (h(), Se(Od, {
7951
7951
  key: 0,
7952
7952
  files: t.message.changedFiles,
7953
7953
  diffs: t.message.diffs,
7954
7954
  loading: t.message.busy && t.message.diffs.length === 0
7955
- }, null, 8, ["files", "diffs", "loading"])) : U("", !0),
7955
+ }, null, 8, ["files", "diffs", "loading"])) : j("", !0),
7956
7956
  a.value ? (h(), _("div", Ld, [
7957
7957
  W(m, {
7958
7958
  size: "md",
7959
7959
  color: "neutral-gray-300"
7960
7960
  }),
7961
7961
  p[1] || (p[1] = f("span", null, "Thinking…", -1))
7962
- ])) : U("", !0),
7963
- t.message.errorText ? (h(), _("div", Dd, I(t.message.errorText), 1)) : U("", !0),
7962
+ ])) : j("", !0),
7963
+ t.message.errorText ? (h(), _("div", Dd, I(t.message.errorText), 1)) : j("", !0),
7964
7964
  !s.value && t.canUndo ? (h(), _("div", zd, [
7965
7965
  W(S, {
7966
7966
  label: "Undo this turn",
@@ -7970,7 +7970,7 @@ const ld = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
7970
7970
  disabled: t.undoing,
7971
7971
  onClick: p[0] || (p[0] = (c) => r("undo"))
7972
7972
  }, null, 8, ["loading", "disabled"])
7973
- ])) : U("", !0)
7973
+ ])) : j("", !0)
7974
7974
  ], 2),
7975
7975
  s.value && i.value ? (h(), _("div", {
7976
7976
  key: 0,
@@ -7991,7 +7991,7 @@ const ld = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
7991
7991
  size: "sm"
7992
7992
  })),
7993
7993
  f("span", null, I(i.value), 1)
7994
- ], 10, Bd)) : U("", !0)
7994
+ ], 10, Bd)) : j("", !0)
7995
7995
  ], 2);
7996
7996
  };
7997
7997
  }
@@ -8123,7 +8123,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8123
8123
  const { added: Q, error: pe } = await gi(V, r.value.length);
8124
8124
  r.value = [...r.value, ...Q], s.value = pe;
8125
8125
  }
8126
- function j() {
8126
+ function U() {
8127
8127
  var V;
8128
8128
  i.value || r.value.length >= rn || (V = a.value) == null || V.click();
8129
8129
  }
@@ -8175,7 +8175,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8175
8175
  }, null, 8, ["name"]),
8176
8176
  f("p", Kd, I(Ce.value.title), 1),
8177
8177
  f("p", Vd, I(Ce.value.text), 1)
8178
- ])) : U("", !0)
8178
+ ])) : j("", !0)
8179
8179
  ], 544),
8180
8180
  t.chat.canUnrevert ? (h(), _("div", qd, [
8181
8181
  Q[1] || (Q[1] = f("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, "The last agent turn was undone.", -1)),
@@ -8186,7 +8186,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8186
8186
  loading: t.chat.checkpointSaving,
8187
8187
  onClick: t.chat.unrevertTurn
8188
8188
  }, null, 8, ["loading", "onClick"])
8189
- ])) : U("", !0),
8189
+ ])) : j("", !0),
8190
8190
  f("form", {
8191
8191
  class: "shrink-0 border-t border-fm-color-neutral-gray-100 p-12",
8192
8192
  onSubmit: Zn($, ["prevent"])
@@ -8216,7 +8216,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8216
8216
  })
8217
8217
  ], 8, Xd)
8218
8218
  ]))), 128))
8219
- ])) : U("", !0),
8219
+ ])) : j("", !0),
8220
8220
  f("div", Jd, [
8221
8221
  f("input", {
8222
8222
  ref_key: "fileInputEl",
@@ -8234,7 +8234,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8234
8234
  disabled: i.value || r.value.length >= O(rn),
8235
8235
  title: `Attach image (up to ${O(rn)})`,
8236
8236
  "aria-label": "Attach image",
8237
- onClick: j
8237
+ onClick: U
8238
8238
  }, null, 8, ["disabled", "title"]),
8239
8239
  Yn(f("textarea", {
8240
8240
  ref_key: "textareaEl",
@@ -8256,7 +8256,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8256
8256
  variant: "secondary",
8257
8257
  type: "button",
8258
8258
  onClick: t.chat.abort
8259
- }, null, 8, ["onClick"])) : U("", !0),
8259
+ }, null, 8, ["onClick"])) : j("", !0),
8260
8260
  W(we, {
8261
8261
  label: p.value,
8262
8262
  type: "submit",
@@ -8264,7 +8264,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8264
8264
  }, null, 8, ["label", "disabled"])
8265
8265
  ])
8266
8266
  ], 2),
8267
- s.value ? (h(), _("p", ep, I(s.value), 1)) : U("", !0)
8267
+ s.value ? (h(), _("p", ep, I(s.value), 1)) : j("", !0)
8268
8268
  ], 32)
8269
8269
  ]);
8270
8270
  };
@@ -8364,7 +8364,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8364
8364
  color: "typo-primary"
8365
8365
  }),
8366
8366
  v[3] || (v[3] = Ke(" BrandKit ", -1)),
8367
- O(r).dirtyCount.value ? (h(), _("span", ap, I(O(r).dirtyCount.value) + " unsaved ", 1)) : U("", !0)
8367
+ O(r).dirtyCount.value ? (h(), _("span", ap, I(O(r).dirtyCount.value) + " unsaved ", 1)) : j("", !0)
8368
8368
  ]),
8369
8369
  f("div", ip, [
8370
8370
  f("button", {
@@ -8404,7 +8404,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8404
8404
  color: "typo-warning"
8405
8405
  }),
8406
8406
  f("span", cp, "“" + I(O(r).state.appliedProposal) + "” applied — review the changes, then Save.", 1)
8407
- ])) : U("", !0),
8407
+ ])) : j("", !0),
8408
8408
  O(r).state.loading ? (h(), _("div", up, [
8409
8409
  W(S, {
8410
8410
  size: "lg",
@@ -8426,7 +8426,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8426
8426
  class: "w-[84px] shrink-0 fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
8427
8427
  }, [
8428
8428
  Ke(I(w.label) + " ", 1),
8429
- l("colors", w.path) ? (h(), _("span", mp, "•")) : U("", !0)
8429
+ l("colors", w.path) ? (h(), _("span", mp, "•")) : j("", !0)
8430
8430
  ], 8, hp),
8431
8431
  f("input", {
8432
8432
  type: "color",
@@ -8459,7 +8459,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8459
8459
  class: "w-[84px] shrink-0 fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
8460
8460
  }, [
8461
8461
  Ke(I(y.label) + " ", 1),
8462
- l("fonts", y.path) ? (h(), _("span", _p, "•")) : U("", !0)
8462
+ l("fonts", y.path) ? (h(), _("span", _p, "•")) : j("", !0)
8463
8463
  ], 8, xp),
8464
8464
  Yn(f("input", {
8465
8465
  id: `bk-font-${y.path}`,
@@ -8473,7 +8473,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8473
8473
  ])
8474
8474
  ], 8, vp))), 128))
8475
8475
  ]),
8476
- O(r).state.error ? (h(), _("p", kp, I(O(r).state.error), 1)) : U("", !0)
8476
+ O(r).state.error ? (h(), _("p", kp, I(O(r).state.error), 1)) : j("", !0)
8477
8477
  ])),
8478
8478
  f("footer", Sp, [
8479
8479
  O(r).state.revertKit ? (h(), Se(c, {
@@ -8554,7 +8554,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8554
8554
  style: Pt({ background: a.value })
8555
8555
  }, null, 4)
8556
8556
  ], 2),
8557
- l.value ? (h(), _("span", Ip, I(l.value.label), 1)) : U("", !0),
8557
+ l.value ? (h(), _("span", Ip, I(l.value.label), 1)) : j("", !0),
8558
8558
  f("span", {
8559
8559
  class: Ae(["color-field__caption", { "color-field__caption--muted": l.value }])
8560
8560
  }, I(i.value), 3),
@@ -8623,9 +8623,9 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8623
8623
  size: "sm",
8624
8624
  color: "typo-secondary"
8625
8625
  })
8626
- ], 8, Bp)) : U("", !0)
8626
+ ], 8, Bp)) : j("", !0)
8627
8627
  ])
8628
- ])) : U("", !0)
8628
+ ])) : j("", !0)
8629
8629
  ]);
8630
8630
  };
8631
8631
  }
@@ -8681,7 +8681,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8681
8681
  }), $ = B(() => {
8682
8682
  var D;
8683
8683
  return ((D = Jt(T.value.top)) == null ? void 0 : D.unit) ?? m.value;
8684
- }), C = B(() => n.spec.control === "box" && (w.value || !x.value)), M = B(() => n.spec.control === "box"), j = B(() => M.value ? $.value : S.value), ne = B(() => {
8684
+ }), C = B(() => n.spec.control === "box" && (w.value || !x.value)), M = B(() => n.spec.control === "box"), U = B(() => M.value ? $.value : S.value), ne = B(() => {
8685
8685
  var D;
8686
8686
  return M.value ? ((D = Jt(T.value.top)) == null ? void 0 : D.value) ?? 0 : c.value ?? "";
8687
8687
  }), ee = B(() => {
@@ -8781,7 +8781,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8781
8781
  function it(D, ie) {
8782
8782
  if (u.value) return;
8783
8783
  const te = (n.spec.step ?? 1) * (ie.shiftKey ? 10 : 1);
8784
- r("update", Tn(Y(ee.value + D * te), j.value));
8784
+ r("update", Tn(Y(ee.value + D * te), U.value));
8785
8785
  }
8786
8786
  return (D, ie) => {
8787
8787
  var Ue;
@@ -8811,7 +8811,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8811
8811
  size: "sm",
8812
8812
  color: "typo-secondary"
8813
8813
  }, null, 8, ["name"])
8814
- ], 10, Wp)) : U("", !0),
8814
+ ], 10, Wp)) : j("", !0),
8815
8815
  C.value ? (h(), _("span", Kp, I(O(Un)(T.value)), 1)) : (h(), _(Te, { key: 2 }, [
8816
8816
  f("button", {
8817
8817
  type: "button",
@@ -8855,7 +8855,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8855
8855
  ], 8, Zp)
8856
8856
  ], 64)),
8857
8857
  f("select", {
8858
- value: j.value,
8858
+ value: U.value,
8859
8859
  disabled: t.disabled,
8860
8860
  class: "style-control__unit",
8861
8861
  "aria-label": `${t.spec.label} unit`,
@@ -8892,7 +8892,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8892
8892
  }, null, 40, ef)
8893
8893
  ]);
8894
8894
  }), 64))
8895
- ])) : U("", !0),
8895
+ ])) : j("", !0),
8896
8896
  (Ue = t.spec.presets) != null && Ue.length ? (h(), _("div", tf, [
8897
8897
  (h(!0), _(Te, null, Re(t.spec.presets, (de) => (h(), _("button", {
8898
8898
  key: de,
@@ -8902,7 +8902,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8902
8902
  title: de,
8903
8903
  onClick: (le) => r("update", de)
8904
8904
  }, I(yt(de)), 11, nf))), 128))
8905
- ])) : U("", !0)
8905
+ ])) : j("", !0)
8906
8906
  ])) : t.spec.control === "ratio" ? (h(), _("div", rf, [
8907
8907
  f("input", {
8908
8908
  value: y.value,
@@ -8975,8 +8975,8 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8975
8975
  class: "style-control__text",
8976
8976
  "aria-label": `Custom ${t.spec.label}`,
8977
8977
  onChange: ie[4] || (ie[4] = (de) => r("update", de.target.value))
8978
- }, null, 40, hf)) : U("", !0)
8979
- ])) : U("", !0);
8978
+ }, null, 40, hf)) : j("", !0)
8979
+ ])) : j("", !0);
8980
8980
  };
8981
8981
  }
8982
8982
  }), gf = /* @__PURE__ */ Mt(mf, [["__scopeId", "data-v-a36ef5b0"]]), bf = { class: "properties" }, yf = {
@@ -9048,7 +9048,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
9048
9048
  color: "typo-tertiary"
9049
9049
  })
9050
9050
  ], 8, xf)
9051
- ])) : U("", !0),
9051
+ ])) : j("", !0),
9052
9052
  v.value ? (h(), _("div", _f, [
9053
9053
  f("img", {
9054
9054
  src: v.value.src,
@@ -9062,7 +9062,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
9062
9062
  }, I(v.value.name), 9, Sf),
9063
9063
  f("div", Tf, I(v.value.alt || "no alt text"), 1)
9064
9064
  ])
9065
- ])) : U("", !0),
9065
+ ])) : j("", !0),
9066
9066
  t.element.canEditText ? (h(), _("div", Ef, [
9067
9067
  f("div", Af, [
9068
9068
  x[3] || (x[3] = f("span", null, "Content", -1)),
@@ -9080,7 +9080,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
9080
9080
  size: "sm",
9081
9081
  color: "typo-tertiary"
9082
9082
  })
9083
- ], 8, Cf)) : U("", !0)
9083
+ ], 8, Cf)) : j("", !0)
9084
9084
  ]),
9085
9085
  f("textarea", {
9086
9086
  value: t.textValue,
@@ -9090,7 +9090,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
9090
9090
  "aria-label": "Element text",
9091
9091
  onInput: x[2] || (x[2] = (C) => r("change", { key: "text", value: C.target.value }))
9092
9092
  }, null, 40, $f)
9093
- ])) : U("", !0),
9093
+ ])) : j("", !0),
9094
9094
  (h(!0), _(Te, null, Re(p.value, (C) => (h(), _("div", {
9095
9095
  key: C.key,
9096
9096
  class: "properties__section"
@@ -9107,7 +9107,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
9107
9107
  color: "typo-tertiary"
9108
9108
  }, null, 8, ["name"]),
9109
9109
  f("span", null, I(C.label), 1),
9110
- c(C.keys) ? (h(), _("span", If, I(c(C.keys)), 1)) : U("", !0)
9110
+ c(C.keys) ? (h(), _("span", If, I(c(C.keys)), 1)) : j("", !0)
9111
9111
  ], 8, Rf),
9112
9112
  m.value.has(C.key) ? (h(), _("div", Nf, [
9113
9113
  (h(!0), _(Te, null, Re(C.keys, (M) => (h(), _("div", {
@@ -9125,14 +9125,14 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
9125
9125
  disabled: t.disabled,
9126
9126
  title: y(M),
9127
9127
  "aria-label": y(M),
9128
- onClick: (j) => r("reset", { key: M })
9128
+ onClick: (U) => r("reset", { key: M })
9129
9129
  }, [
9130
9130
  W($, {
9131
9131
  name: "undo",
9132
9132
  size: "sm",
9133
9133
  color: "typo-tertiary"
9134
9134
  })
9135
- ], 8, Mf)) : U("", !0)
9135
+ ], 8, Mf)) : j("", !0)
9136
9136
  ]),
9137
9137
  f("div", Lf, [
9138
9138
  O(Ht)(M).control === "color" ? (h(), Se(Up, {
@@ -9141,18 +9141,18 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
9141
9141
  label: O(Ht)(M).label,
9142
9142
  presets: s.value,
9143
9143
  disabled: t.disabled,
9144
- onUpdate: (j) => r("change", { key: M, value: j })
9144
+ onUpdate: (U) => r("change", { key: M, value: U })
9145
9145
  }, null, 8, ["value", "label", "presets", "disabled", "onUpdate"])) : (h(), Se(gf, {
9146
9146
  key: 1,
9147
9147
  spec: O(Ht)(M),
9148
9148
  value: t.values[M] ?? "",
9149
9149
  "font-presets": o.value,
9150
9150
  disabled: t.disabled,
9151
- onUpdate: (j) => r("change", { key: M, value: j })
9151
+ onUpdate: (U) => r("change", { key: M, value: U })
9152
9152
  }, null, 8, ["spec", "value", "font-presets", "disabled", "onUpdate"]))
9153
9153
  ])
9154
9154
  ], 2))), 128))
9155
- ])) : U("", !0)
9155
+ ])) : j("", !0)
9156
9156
  ]))), 128))
9157
9157
  ]);
9158
9158
  };
@@ -9192,31 +9192,28 @@ const Uf = { class: "relative flex h-full min-w-0 flex-col bg-fm-color-neutral-w
9192
9192
  }, Wf = { class: "flex h-[40px] items-center justify-between gap-8 border-b border-fm-color-neutral-gray-100 px-[10px]" }, Kf = { class: "min-w-0 truncate fm-typo-en-body-sm-600 text-fm-color-typo-primary" }, Vf = { class: "flex shrink-0 items-center gap-4" }, qf = ["disabled"], Zf = {
9193
9193
  key: 0,
9194
9194
  class: "m-0 shrink-0 bg-fm-color-error-light px-[10px] py-[5px] text-[11px] leading-[15px] text-fm-color-error"
9195
- }, Yf = { class: "flex min-h-0 flex-col gap-6 overflow-y-auto p-[8px]" }, Xf = { class: "flex min-w-0 items-center gap-6" }, Jf = ["aria-label", "onClick"], Qf = ["onClick"], eh = { class: "flex shrink-0 items-center gap-[1px]" }, th = ["aria-pressed", "aria-label", "onClick"], nh = {
9195
+ }, Yf = { class: "flex min-h-0 flex-col gap-6 overflow-y-auto p-[8px]" }, Xf = { class: "flex min-w-0 items-center gap-6" }, Jf = ["aria-label", "onClick"], Qf = ["onClick"], eh = ["aria-pressed", "aria-label", "onClick"], th = {
9196
9196
  key: 0,
9197
9197
  class: "preview__mini-dot"
9198
- }, rh = ["disabled", "title", "aria-label", "onClick"], sh = ["onClick"], ah = ["onUpdate:modelValue", "placeholder", "onPaste", "onDrop"], ih = {
9199
- key: 0,
9200
- class: "flex flex-wrap gap-[6px]"
9201
- }, oh = ["src", "alt"], lh = ["aria-label", "onClick"], ch = {
9198
+ }, nh = ["onClick"], rh = ["onUpdate:modelValue", "placeholder", "onPaste", "onDrop"], sh = { class: "flex flex-wrap items-center gap-[6px]" }, ah = ["disabled", "title", "aria-label", "onClick"], ih = ["src", "alt"], oh = ["aria-label", "onClick"], lh = {
9202
9199
  key: 2,
9203
9200
  class: "preview__error-tray"
9204
- }, uh = ["aria-expanded"], dh = {
9201
+ }, ch = ["aria-expanded"], uh = {
9205
9202
  key: 0,
9206
9203
  class: "preview__error-list"
9207
- }, ph = { class: "flex items-center justify-between gap-8" }, fh = { key: 0 }, hh = {
9204
+ }, dh = { class: "flex items-center justify-between gap-8" }, ph = { key: 0 }, fh = {
9208
9205
  key: 0,
9209
9206
  class: "truncate"
9210
- }, mh = {
9207
+ }, hh = {
9211
9208
  key: 3,
9212
9209
  class: "preview__device-wrap"
9213
- }, gh = { class: "preview__device" }, bh = ["src"], yh = {
9210
+ }, mh = { class: "preview__device" }, gh = ["src"], bh = {
9214
9211
  class: "preview__overlays",
9215
9212
  "aria-hidden": "true"
9216
- }, vh = {
9213
+ }, yh = {
9217
9214
  key: 4,
9218
9215
  class: "flex h-full items-center justify-center p-24 text-center"
9219
- }, xh = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _h = { class: "preview__bottom-controls" }, Hn = 20, wh = 0.35, oa = "mpv2:annotation-style-editor-open", kh = /* @__PURE__ */ pt({
9216
+ }, vh = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xh = { class: "preview__bottom-controls" }, Hn = 20, _h = 0.35, oa = "mpv2:annotation-style-editor-open", wh = /* @__PURE__ */ pt({
9220
9217
  __name: "PreviewPanel",
9221
9218
  props: {
9222
9219
  chat: {}
@@ -9231,7 +9228,7 @@ const Uf = { class: "relative flex h-full min-w-0 flex-col bg-fm-color-neutral-w
9231
9228
  { key: "iphone-15", label: "iPhone 15", width: 393, height: 852 },
9232
9229
  { key: "pixel-8", label: "Pixel 8", width: 412, height: 915 },
9233
9230
  { key: "galaxy-s24", label: "Galaxy S24", width: 360, height: 780 }
9234
- ], j = M.map((g) => ({ label: `${g.label} · ${g.width}×${g.height}`, value: g.key })), ne = B(() => M.find((g) => g.key === o.value) ?? M[0]), ee = B(() => {
9231
+ ], U = M.map((g) => ({ label: `${g.label} · ${g.width}×${g.height}`, value: g.key })), ne = B(() => M.find((g) => g.key === o.value) ?? M[0]), ee = B(() => {
9235
9232
  const g = ne.value.width + Hn, E = ne.value.height + Hn;
9236
9233
  return {
9237
9234
  "--device-width": `${ne.value.width}px`,
@@ -9290,7 +9287,7 @@ const Uf = { class: "relative flex h-full min-w-0 flex-col bg-fm-color-neutral-w
9290
9287
  const g = p.value;
9291
9288
  if (!g) return;
9292
9289
  const E = ne.value.width + Hn, Z = ne.value.height + Hn, se = Math.min(1, Math.max(0, g.clientWidth - ue() * 2) / E, Math.max(0, g.clientHeight - ue() * 2) / Z);
9293
- v.value = Number(Math.max(wh, se).toFixed(4));
9290
+ v.value = Number(Math.max(_h, se).toFixed(4));
9294
9291
  }
9295
9292
  function Me() {
9296
9293
  try {
@@ -9606,7 +9603,7 @@ ${Yu(g.map(ve))}`;
9606
9603
  W(Z, {
9607
9604
  modelValue: o.value,
9608
9605
  "onUpdate:modelValue": E[0] || (E[0] = (G) => o.value = G),
9609
- items: O(j),
9606
+ items: O(U),
9610
9607
  width: 188,
9611
9608
  disabled: !e.chat.previewUrl,
9612
9609
  placeholder: "Device"
@@ -9657,7 +9654,7 @@ ${Yu(g.map(ve))}`;
9657
9654
  class: "preview__brandkit-panel",
9658
9655
  onSaved: E[1] || (E[1] = (G) => e.chat.previewUrl && $e()),
9659
9656
  onClose: E[2] || (E[2] = (G) => O(r).state.panelOpen = !1)
9660
- })) : U("", !0),
9657
+ })) : j("", !0),
9661
9658
  m.value.length ? (h(), _("section", Gf, [
9662
9659
  f("div", Wf, [
9663
9660
  f("span", Kf, I(m.value.length) + " annotation" + I(m.value.length === 1 ? "" : "s"), 1),
@@ -9698,7 +9695,7 @@ ${Yu(g.map(ve))}`;
9698
9695
  class: "hidden",
9699
9696
  onChange: ye
9700
9697
  }, null, 544),
9701
- c.value ? (h(), _("p", Zf, I(c.value), 1)) : U("", !0),
9698
+ c.value ? (h(), _("p", Zf, I(c.value), 1)) : j("", !0),
9702
9699
  f("div", Yf, [
9703
9700
  (h(!0), _(Te, null, Re(m.value, (G) => {
9704
9701
  var mt, Ut, Zt, $t;
@@ -9727,39 +9724,23 @@ ${Yu(g.map(ve))}`;
9727
9724
  Ke(I(kt(G.status)), 1)
9728
9725
  ]),
9729
9726
  _: 2
9730
- }, 1032, ["variant"])) : U("", !0),
9731
- f("div", eh, [
9732
- (Ut = G.payload) != null && Ut.element ? (h(), _("button", {
9733
- key: 0,
9734
- type: "button",
9735
- class: Ae(["preview__mini-icon-button", { "preview__mini-icon-button--active": ke(G.id) }]),
9736
- "aria-pressed": ke(G.id),
9737
- "aria-label": `Edit properties for annotation #${G.id}`,
9738
- title: "Edit properties",
9739
- onClick: (Je) => Ne(G.id)
9740
- }, [
9741
- W(he, {
9742
- name: "tune",
9743
- size: "sm",
9744
- color: ke(G.id) ? "primary" : "typo-secondary"
9745
- }, null, 8, ["color"]),
9746
- G.changed && !ke(G.id) ? (h(), _("span", nh)) : U("", !0)
9747
- ], 10, th)) : U("", !0),
9748
- f("button", {
9749
- type: "button",
9750
- class: "preview__mini-icon-button",
9751
- disabled: pe.value || t.chat.sending,
9752
- title: pe.value ? `Up to ${O(rn)} images per message` : "Attach an image — or paste / drop one on the note",
9753
- "aria-label": `Attach an image to annotation #${G.id}`,
9754
- onClick: (Je) => ce(G)
9755
- }, [
9756
- W(he, {
9757
- name: "add_photo_alternate",
9758
- size: "sm",
9759
- color: pe.value || t.chat.sending ? "typo-disabled" : "typo-secondary"
9760
- }, null, 8, ["color"])
9761
- ], 8, rh)
9762
- ]),
9727
+ }, 1032, ["variant"])) : j("", !0),
9728
+ (Ut = G.payload) != null && Ut.element ? (h(), _("button", {
9729
+ key: 1,
9730
+ type: "button",
9731
+ class: Ae(["preview__mini-icon-button", { "preview__mini-icon-button--active": ke(G.id) }]),
9732
+ "aria-pressed": ke(G.id),
9733
+ "aria-label": `Edit properties for annotation #${G.id}`,
9734
+ title: "Edit properties",
9735
+ onClick: (Je) => Ne(G.id)
9736
+ }, [
9737
+ W(he, {
9738
+ name: "tune",
9739
+ size: "sm",
9740
+ color: ke(G.id) ? "primary" : "typo-secondary"
9741
+ }, null, 8, ["color"]),
9742
+ G.changed && !ke(G.id) ? (h(), _("span", th)) : j("", !0)
9743
+ ], 10, eh)) : j("", !0),
9763
9744
  f("button", {
9764
9745
  type: "button",
9765
9746
  class: "preview__mini-icon-button preview__mini-icon-button--danger",
@@ -9772,7 +9753,7 @@ ${Yu(g.map(ve))}`;
9772
9753
  size: "sm",
9773
9754
  color: "typo-tertiary"
9774
9755
  })
9775
- ], 8, sh)
9756
+ ], 8, nh)
9776
9757
  ]),
9777
9758
  Yn(f("textarea", {
9778
9759
  "onUpdate:modelValue": (Je) => G.feedback = Je,
@@ -9783,10 +9764,25 @@ ${Yu(g.map(ve))}`;
9783
9764
  onDragover: E[3] || (E[3] = Zn(() => {
9784
9765
  }, ["prevent"])),
9785
9766
  onDrop: (Je) => ot(Je, G)
9786
- }, null, 40, ah), [
9767
+ }, null, 40, rh), [
9787
9768
  [Xn, G.feedback]
9788
9769
  ]),
9789
- G.attachments.length ? (h(), _("div", ih, [
9770
+ f("div", sh, [
9771
+ f("button", {
9772
+ type: "button",
9773
+ class: "preview__attachment-add",
9774
+ disabled: pe.value || t.chat.sending,
9775
+ title: pe.value ? `Up to ${O(rn)} images per message` : "Attach an image — or paste / drop one on the note",
9776
+ "aria-label": `Attach an image to annotation #${G.id}`,
9777
+ onClick: (Je) => ce(G)
9778
+ }, [
9779
+ W(he, {
9780
+ name: "add_photo_alternate",
9781
+ size: "sm",
9782
+ color: pe.value || t.chat.sending ? "typo-disabled" : "typo-secondary"
9783
+ }, null, 8, ["color"]),
9784
+ E[7] || (E[7] = f("span", null, "Image", -1))
9785
+ ], 8, ah),
9790
9786
  (h(!0), _(Te, null, Re(G.attachments, (Je) => (h(), _("div", {
9791
9787
  key: Je.id,
9792
9788
  class: "relative"
@@ -9795,7 +9791,7 @@ ${Yu(g.map(ve))}`;
9795
9791
  src: Je.url,
9796
9792
  alt: Je.filename || "attached image",
9797
9793
  class: "preview__attachment"
9798
- }, null, 8, oh),
9794
+ }, null, 8, ih),
9799
9795
  f("button", {
9800
9796
  type: "button",
9801
9797
  class: "preview__attachment-remove",
@@ -9807,11 +9803,11 @@ ${Yu(g.map(ve))}`;
9807
9803
  size: "sm",
9808
9804
  color: "typo-white"
9809
9805
  })
9810
- ], 8, lh)
9806
+ ], 8, oh)
9811
9807
  ]))), 128))
9812
- ])) : U("", !0),
9808
+ ]),
9813
9809
  ke(G.id) && (($t = G.payload) != null && $t.element) ? (h(), Se(zf, {
9814
- key: 1,
9810
+ key: 0,
9815
9811
  element: G.payload.element,
9816
9812
  values: G.draftStyles,
9817
9813
  "before-values": G.beforeStyles,
@@ -9822,12 +9818,12 @@ ${Yu(g.map(ve))}`;
9822
9818
  onChange: At,
9823
9819
  onReset: Lt,
9824
9820
  onResetAll: Dt
9825
- }, null, 8, ["element", "values", "before-values", "text-value", "before-text", "presets", "disabled"])) : U("", !0)
9821
+ }, null, 8, ["element", "values", "before-values", "text-value", "before-text", "presets", "disabled"])) : j("", !0)
9826
9822
  ], 2);
9827
9823
  }), 128))
9828
9824
  ])
9829
- ])) : U("", !0),
9830
- S.value.length ? (h(), _("section", ch, [
9825
+ ])) : j("", !0),
9826
+ S.value.length ? (h(), _("section", lh, [
9831
9827
  f("button", {
9832
9828
  type: "button",
9833
9829
  class: "preview__error-summary",
@@ -9840,21 +9836,21 @@ ${Yu(g.map(ve))}`;
9840
9836
  size: "sm",
9841
9837
  color: "typo-secondary"
9842
9838
  })
9843
- ], 8, uh),
9844
- T.value ? (h(), _("div", dh, [
9839
+ ], 8, ch),
9840
+ T.value ? (h(), _("div", uh, [
9845
9841
  (h(!0), _(Te, null, Re(S.value, (G) => (h(), _("div", {
9846
9842
  key: G.id,
9847
9843
  class: "preview__error-item"
9848
9844
  }, [
9849
- f("div", ph, [
9845
+ f("div", dh, [
9850
9846
  f("strong", null, I(G.kind), 1),
9851
9847
  f("span", null, I(Ue(G.timestamp)), 1)
9852
9848
  ]),
9853
9849
  f("div", null, [
9854
9850
  Ke(I(G.message), 1),
9855
- G.count > 1 ? (h(), _("span", fh, " ×" + I(G.count), 1)) : U("", !0)
9851
+ G.count > 1 ? (h(), _("span", ph, " ×" + I(G.count), 1)) : j("", !0)
9856
9852
  ]),
9857
- te(G) ? (h(), _("div", hh, I(te(G)), 1)) : U("", !0)
9853
+ te(G) ? (h(), _("div", fh, I(te(G)), 1)) : j("", !0)
9858
9854
  ]))), 128)),
9859
9855
  f("button", {
9860
9856
  type: "button",
@@ -9864,15 +9860,15 @@ ${Yu(g.map(ve))}`;
9864
9860
  S.value = [], T.value = !1;
9865
9861
  })
9866
9862
  }, "Clear")
9867
- ])) : U("", !0)
9868
- ])) : U("", !0),
9869
- e.chat.previewUrl ? (h(), _("div", mh, [
9863
+ ])) : j("", !0)
9864
+ ])) : j("", !0),
9865
+ e.chat.previewUrl ? (h(), _("div", hh, [
9870
9866
  f("div", {
9871
9867
  class: "preview__device-stage",
9872
9868
  style: Pt(ee.value)
9873
9869
  }, [
9874
- f("div", gh, [
9875
- E[8] || (E[8] = f("div", { class: "preview__speaker" }, null, -1)),
9870
+ f("div", mh, [
9871
+ E[9] || (E[9] = f("div", { class: "preview__speaker" }, null, -1)),
9876
9872
  (h(), _("iframe", {
9877
9873
  ref_key: "iframeEl",
9878
9874
  ref: u,
@@ -9882,15 +9878,15 @@ ${Yu(g.map(ve))}`;
9882
9878
  title: "merchant preview",
9883
9879
  allow: "camera",
9884
9880
  onLoad: qe
9885
- }, null, 40, bh)),
9886
- f("div", yh, [
9881
+ }, null, 40, gh)),
9882
+ f("div", bh, [
9887
9883
  a.value && ((b = tt.value) != null && b.rect) ? (h(), _("div", {
9888
9884
  key: 0,
9889
9885
  class: Ae(["preview__annotation-hover", { "preview__annotation-tag-inside": F(tt.value.rect) }]),
9890
9886
  style: Pt(Ge.value)
9891
- }, [...E[7] || (E[7] = [
9887
+ }, [...E[8] || (E[8] = [
9892
9888
  f("span", null, "Inspect", -1)
9893
- ])], 6)) : U("", !0),
9889
+ ])], 6)) : j("", !0),
9894
9890
  (h(!0), _(Te, null, Re(m.value, (G) => (h(), _("div", {
9895
9891
  key: `marker-${G.id}`,
9896
9892
  class: Ae(["preview__annotation-marker", { "preview__annotation-marker--selected": i.value === G.id }]),
@@ -9902,21 +9898,21 @@ ${Yu(g.map(ve))}`;
9902
9898
  style: Pt(Ie.value)
9903
9899
  }, [
9904
9900
  f("span", null, "#" + I(_e.value.id), 1)
9905
- ], 6)) : U("", !0)
9901
+ ], 6)) : j("", !0)
9906
9902
  ])
9907
9903
  ])
9908
9904
  ], 4)
9909
- ])) : (h(), _("div", vh, [
9905
+ ])) : (h(), _("div", yh, [
9910
9906
  f("div", null, [
9911
9907
  W(he, {
9912
9908
  name: "visibility",
9913
9909
  size: "xl",
9914
9910
  color: "typo-tertiary"
9915
9911
  }),
9916
- f("p", xh, I(L.value), 1)
9912
+ f("p", vh, I(L.value), 1)
9917
9913
  ])
9918
9914
  ])),
9919
- f("div", _h, [
9915
+ f("div", xh, [
9920
9916
  W(se, {
9921
9917
  size: "md",
9922
9918
  variant: "secondary",
@@ -9930,7 +9926,7 @@ ${Yu(g.map(ve))}`;
9930
9926
  ]);
9931
9927
  };
9932
9928
  }
9933
- }), Sh = /* @__PURE__ */ Mt(kh, [["__scopeId", "data-v-c128912e"]]), Th = { class: "flex justify-end gap-8" }, Eh = /* @__PURE__ */ pt({
9929
+ }), kh = /* @__PURE__ */ Mt(wh, [["__scopeId", "data-v-7597f131"]]), Sh = { class: "flex justify-end gap-8" }, Th = /* @__PURE__ */ pt({
9934
9930
  __name: "RenameSessionDialog",
9935
9931
  props: {
9936
9932
  initialTitle: {}
@@ -9956,7 +9952,7 @@ ${Yu(g.map(ve))}`;
9956
9952
  placeholder: "e.g. Homepage banner redesign",
9957
9953
  rules: [(m) => !!m.trim() || "Name is required"]
9958
9954
  }, null, 8, ["modelValue", "rules"]),
9959
- f("div", Th, [
9955
+ f("div", Sh, [
9960
9956
  W(u, {
9961
9957
  label: "Cancel",
9962
9958
  variant: "tertiary",
@@ -9976,7 +9972,7 @@ ${Yu(g.map(ve))}`;
9976
9972
  });
9977
9973
  };
9978
9974
  }
9979
- }), Ah = ({ onSseError: t, onSseEvent: e, responseTransformer: n, responseValidator: r, sseDefaultRetryDelay: s, sseMaxRetryAttempts: o, sseMaxRetryDelay: l, sseSleepFn: a, url: i, ...u }) => {
9975
+ }), Eh = ({ onSseError: t, onSseEvent: e, responseTransformer: n, responseValidator: r, sseDefaultRetryDelay: s, sseMaxRetryAttempts: o, sseMaxRetryDelay: l, sseSleepFn: a, url: i, ...u }) => {
9980
9976
  let p;
9981
9977
  const v = a ?? ((c) => new Promise((y) => setTimeout(y, c)));
9982
9978
  return { stream: async function* () {
@@ -10003,8 +9999,8 @@ ${Yu(g.map(ve))}`;
10003
9999
  w.addEventListener("abort", M);
10004
10000
  try {
10005
10001
  for (; ; ) {
10006
- const { done: j, value: ne } = await $.read();
10007
- if (j)
10002
+ const { done: U, value: ne } = await $.read();
10003
+ if (U)
10008
10004
  break;
10009
10005
  C += ne;
10010
10006
  const ee = C.split(`
@@ -10056,13 +10052,13 @@ ${Yu(g.map(ve))}`;
10056
10052
  }
10057
10053
  }
10058
10054
  }() };
10059
- }, Ch = async (t, e) => {
10055
+ }, Ah = async (t, e) => {
10060
10056
  const n = typeof e == "function" ? await e(t) : e;
10061
10057
  if (n)
10062
10058
  return t.scheme === "bearer" ? `Bearer ${n}` : t.scheme === "basic" ? `Basic ${btoa(n)}` : n;
10063
- }, $h = {
10059
+ }, Ch = {
10064
10060
  bodySerializer: (t) => JSON.stringify(t, (e, n) => typeof n == "bigint" ? n.toString() : n)
10065
- }, Rh = (t) => {
10061
+ }, $h = (t) => {
10066
10062
  switch (t) {
10067
10063
  case "label":
10068
10064
  return ".";
@@ -10073,7 +10069,7 @@ ${Yu(g.map(ve))}`;
10073
10069
  default:
10074
10070
  return "&";
10075
10071
  }
10076
- }, Ih = (t) => {
10072
+ }, Rh = (t) => {
10077
10073
  switch (t) {
10078
10074
  case "form":
10079
10075
  return ",";
@@ -10084,7 +10080,7 @@ ${Yu(g.map(ve))}`;
10084
10080
  default:
10085
10081
  return ",";
10086
10082
  }
10087
- }, Nh = (t) => {
10083
+ }, Ih = (t) => {
10088
10084
  switch (t) {
10089
10085
  case "label":
10090
10086
  return ".";
@@ -10097,7 +10093,7 @@ ${Yu(g.map(ve))}`;
10097
10093
  }
10098
10094
  }, vi = ({ allowReserved: t, explode: e, name: n, style: r, value: s }) => {
10099
10095
  if (!e) {
10100
- const a = (t ? s : s.map((i) => encodeURIComponent(i))).join(Ih(r));
10096
+ const a = (t ? s : s.map((i) => encodeURIComponent(i))).join(Rh(r));
10101
10097
  switch (r) {
10102
10098
  case "label":
10103
10099
  return `.${a}`;
@@ -10109,7 +10105,7 @@ ${Yu(g.map(ve))}`;
10109
10105
  return `${n}=${a}`;
10110
10106
  }
10111
10107
  }
10112
- const o = Rh(r), l = s.map((a) => r === "label" || r === "simple" ? t ? a : encodeURIComponent(a) : fr({
10108
+ const o = $h(r), l = s.map((a) => r === "label" || r === "simple" ? t ? a : encodeURIComponent(a) : fr({
10113
10109
  allowReserved: t,
10114
10110
  name: n,
10115
10111
  value: a
@@ -10141,15 +10137,15 @@ ${Yu(g.map(ve))}`;
10141
10137
  return u;
10142
10138
  }
10143
10139
  }
10144
- const l = Nh(r), a = Object.entries(s).map(([i, u]) => fr({
10140
+ const l = Ih(r), a = Object.entries(s).map(([i, u]) => fr({
10145
10141
  allowReserved: t,
10146
10142
  name: r === "deepObject" ? `${n}[${i}]` : i,
10147
10143
  value: u
10148
10144
  })).join(l);
10149
10145
  return r === "label" || r === "matrix" ? l + a : a;
10150
- }, Oh = /\{[^{}]+\}/g, Ph = ({ path: t, url: e }) => {
10146
+ }, Nh = /\{[^{}]+\}/g, Oh = ({ path: t, url: e }) => {
10151
10147
  let n = e;
10152
- const r = e.match(Oh);
10148
+ const r = e.match(Nh);
10153
10149
  if (r)
10154
10150
  for (const s of r) {
10155
10151
  let o = !1, l = s.substring(1, s.length - 1), a = "simple";
@@ -10182,10 +10178,10 @@ ${Yu(g.map(ve))}`;
10182
10178
  n = n.replace(s, u);
10183
10179
  }
10184
10180
  return n;
10185
- }, Mh = ({ baseUrl: t, path: e, query: n, querySerializer: r, url: s }) => {
10181
+ }, Ph = ({ baseUrl: t, path: e, query: n, querySerializer: r, url: s }) => {
10186
10182
  const o = s.startsWith("/") ? s : `/${s}`;
10187
10183
  let l = (t ?? "") + o;
10188
- e && (l = Ph({ path: e, url: l }));
10184
+ e && (l = Oh({ path: e, url: l }));
10189
10185
  let a = n ? r(n) : "";
10190
10186
  return a.startsWith("?") && (a = a.substring(1)), a && (l += `?${a}`), l;
10191
10187
  }, _i = ({ allowReserved: t, array: e, object: n } = {}) => (s) => {
@@ -10224,7 +10220,7 @@ ${Yu(g.map(ve))}`;
10224
10220
  }
10225
10221
  }
10226
10222
  return o.join("&");
10227
- }, Lh = (t) => {
10223
+ }, Mh = (t) => {
10228
10224
  var n;
10229
10225
  if (!t)
10230
10226
  return "stream";
@@ -10239,14 +10235,14 @@ ${Yu(g.map(ve))}`;
10239
10235
  if (e.startsWith("text/"))
10240
10236
  return "text";
10241
10237
  }
10242
- }, Dh = (t, e) => {
10238
+ }, Lh = (t, e) => {
10243
10239
  var n, r;
10244
10240
  return e ? !!(t.headers.has(e) || (n = t.query) != null && n[e] || (r = t.headers.get("Cookie")) != null && r.includes(`${e}=`)) : !1;
10245
- }, zh = async ({ security: t, ...e }) => {
10241
+ }, Dh = async ({ security: t, ...e }) => {
10246
10242
  for (const n of t) {
10247
- if (Dh(e, n.name))
10243
+ if (Lh(e, n.name))
10248
10244
  continue;
10249
- const r = await Ch(n, e.auth);
10245
+ const r = await Ah(n, e.auth);
10250
10246
  if (!r)
10251
10247
  continue;
10252
10248
  const s = n.name ?? "Authorization";
@@ -10263,7 +10259,7 @@ ${Yu(g.map(ve))}`;
10263
10259
  break;
10264
10260
  }
10265
10261
  }
10266
- }, la = (t) => Mh({
10262
+ }, la = (t) => Ph({
10267
10263
  baseUrl: t.baseUrl,
10268
10264
  path: t.path,
10269
10265
  query: t.query,
@@ -10316,11 +10312,11 @@ class Tr {
10316
10312
  return this._fns = [...this._fns, e], this._fns.length - 1;
10317
10313
  }
10318
10314
  }
10319
- const Bh = () => ({
10315
+ const zh = () => ({
10320
10316
  error: new Tr(),
10321
10317
  request: new Tr(),
10322
10318
  response: new Tr()
10323
- }), Fh = _i({
10319
+ }), Bh = _i({
10324
10320
  allowReserved: !1,
10325
10321
  array: {
10326
10322
  explode: !0,
@@ -10330,17 +10326,17 @@ const Bh = () => ({
10330
10326
  explode: !0,
10331
10327
  style: "deepObject"
10332
10328
  }
10333
- }), Uh = {
10329
+ }), Fh = {
10334
10330
  "Content-Type": "application/json"
10335
10331
  }, ki = (t = {}) => ({
10336
- ...$h,
10337
- headers: Uh,
10332
+ ...Ch,
10333
+ headers: Fh,
10338
10334
  parseAs: "auto",
10339
- querySerializer: Fh,
10335
+ querySerializer: Bh,
10340
10336
  ...t
10341
10337
  }), Si = (t = {}) => {
10342
10338
  let e = ca(ki(), t);
10343
- const n = () => ({ ...e }), r = (i) => (e = ca(e, i), n()), s = Bh(), o = async (i) => {
10339
+ const n = () => ({ ...e }), r = (i) => (e = ca(e, i), n()), s = zh(), o = async (i) => {
10344
10340
  const u = {
10345
10341
  ...e,
10346
10342
  ...i,
@@ -10348,7 +10344,7 @@ const Bh = () => ({
10348
10344
  headers: wi(e.headers, i.headers),
10349
10345
  serializedBody: void 0
10350
10346
  };
10351
- u.security && await zh({
10347
+ u.security && await Dh({
10352
10348
  ...u,
10353
10349
  security: u.security
10354
10350
  }), u.requestValidator && await u.requestValidator(u), u.body && u.bodySerializer && (u.serializedBody = u.bodySerializer(u.body)), (u.serializedBody === void 0 || u.serializedBody === "") && u.headers.delete("Content-Type");
@@ -10377,7 +10373,7 @@ const Bh = () => ({
10377
10373
  data: {},
10378
10374
  ...y
10379
10375
  };
10380
- const C = (u.parseAs === "auto" ? Lh(c.headers.get("Content-Type")) : u.parseAs) ?? "json";
10376
+ const C = (u.parseAs === "auto" ? Mh(c.headers.get("Content-Type")) : u.parseAs) ?? "json";
10381
10377
  let M;
10382
10378
  switch (C) {
10383
10379
  case "arrayBuffer":
@@ -10418,7 +10414,7 @@ const Bh = () => ({
10418
10414
  const u = (p) => l({ ...p, method: i });
10419
10415
  return u.sse = async (p) => {
10420
10416
  const { opts: v, url: m } = await o(p);
10421
- return Ah({
10417
+ return Eh({
10422
10418
  ...v,
10423
10419
  body: v.body,
10424
10420
  headers: v.headers,
@@ -10443,16 +10439,16 @@ const Bh = () => ({
10443
10439
  setConfig: r,
10444
10440
  trace: a("TRACE")
10445
10441
  };
10446
- }, jh = Si(ki({
10442
+ }, Uh = Si(ki({
10447
10443
  baseUrl: "http://localhost:4096"
10448
10444
  }));
10449
10445
  class Ve {
10450
10446
  constructor(e) {
10451
- be(this, "_client", jh);
10447
+ be(this, "_client", Uh);
10452
10448
  e != null && e.client && (this._client = e.client);
10453
10449
  }
10454
10450
  }
10455
- class Hh extends Ve {
10451
+ class jh extends Ve {
10456
10452
  /**
10457
10453
  * Get events
10458
10454
  */
@@ -10463,7 +10459,7 @@ class Hh extends Ve {
10463
10459
  });
10464
10460
  }
10465
10461
  }
10466
- class Gh extends Ve {
10462
+ class Hh extends Ve {
10467
10463
  /**
10468
10464
  * List all projects
10469
10465
  */
@@ -10483,7 +10479,7 @@ class Gh extends Ve {
10483
10479
  });
10484
10480
  }
10485
10481
  }
10486
- class Wh extends Ve {
10482
+ class Gh extends Ve {
10487
10483
  /**
10488
10484
  * List all PTY sessions
10489
10485
  */
@@ -10547,7 +10543,7 @@ class Wh extends Ve {
10547
10543
  });
10548
10544
  }
10549
10545
  }
10550
- class Kh extends Ve {
10546
+ class Wh extends Ve {
10551
10547
  /**
10552
10548
  * Get config info
10553
10549
  */
@@ -10580,7 +10576,7 @@ class Kh extends Ve {
10580
10576
  });
10581
10577
  }
10582
10578
  }
10583
- class Vh extends Ve {
10579
+ class Kh extends Ve {
10584
10580
  /**
10585
10581
  * List all tool IDs (including built-in and dynamically registered)
10586
10582
  */
@@ -10600,7 +10596,7 @@ class Vh extends Ve {
10600
10596
  });
10601
10597
  }
10602
10598
  }
10603
- class qh extends Ve {
10599
+ class Vh extends Ve {
10604
10600
  /**
10605
10601
  * Dispose the current instance
10606
10602
  */
@@ -10611,7 +10607,7 @@ class qh extends Ve {
10611
10607
  });
10612
10608
  }
10613
10609
  }
10614
- class Zh extends Ve {
10610
+ class qh extends Ve {
10615
10611
  /**
10616
10612
  * Get the current path
10617
10613
  */
@@ -10622,7 +10618,7 @@ class Zh extends Ve {
10622
10618
  });
10623
10619
  }
10624
10620
  }
10625
- class Yh extends Ve {
10621
+ class Zh extends Ve {
10626
10622
  /**
10627
10623
  * Get VCS info for the current instance
10628
10624
  */
@@ -10633,7 +10629,7 @@ class Yh extends Ve {
10633
10629
  });
10634
10630
  }
10635
10631
  }
10636
- class Xh extends Ve {
10632
+ class Yh extends Ve {
10637
10633
  /**
10638
10634
  * List all sessions
10639
10635
  */
@@ -10882,7 +10878,7 @@ class Xh extends Ve {
10882
10878
  });
10883
10879
  }
10884
10880
  }
10885
- class Jh extends Ve {
10881
+ class Xh extends Ve {
10886
10882
  /**
10887
10883
  * List all commands
10888
10884
  */
@@ -10893,7 +10889,7 @@ class Jh extends Ve {
10893
10889
  });
10894
10890
  }
10895
10891
  }
10896
- class Qh extends Ve {
10892
+ class Jh extends Ve {
10897
10893
  /**
10898
10894
  * Authorize a provider using OAuth
10899
10895
  */
@@ -10921,10 +10917,10 @@ class Qh extends Ve {
10921
10917
  });
10922
10918
  }
10923
10919
  }
10924
- class em extends Ve {
10920
+ class Qh extends Ve {
10925
10921
  constructor() {
10926
10922
  super(...arguments);
10927
- be(this, "oauth", new Qh({ client: this._client }));
10923
+ be(this, "oauth", new Jh({ client: this._client }));
10928
10924
  }
10929
10925
  /**
10930
10926
  * List all providers
@@ -10945,7 +10941,7 @@ class em extends Ve {
10945
10941
  });
10946
10942
  }
10947
10943
  }
10948
- class tm extends Ve {
10944
+ class em extends Ve {
10949
10945
  /**
10950
10946
  * Find text in files
10951
10947
  */
@@ -10974,7 +10970,7 @@ class tm extends Ve {
10974
10970
  });
10975
10971
  }
10976
10972
  }
10977
- class nm extends Ve {
10973
+ class tm extends Ve {
10978
10974
  /**
10979
10975
  * List files and directories
10980
10976
  */
@@ -11003,7 +10999,7 @@ class nm extends Ve {
11003
10999
  });
11004
11000
  }
11005
11001
  }
11006
- class rm extends Ve {
11002
+ class nm extends Ve {
11007
11003
  /**
11008
11004
  * Write a log entry to the server logs
11009
11005
  */
@@ -11082,7 +11078,7 @@ class Ti extends Ve {
11082
11078
  });
11083
11079
  }
11084
11080
  }
11085
- class sm extends Ve {
11081
+ class rm extends Ve {
11086
11082
  constructor() {
11087
11083
  super(...arguments);
11088
11084
  be(this, "auth", new Ti({ client: this._client }));
@@ -11128,7 +11124,7 @@ class sm extends Ve {
11128
11124
  });
11129
11125
  }
11130
11126
  }
11131
- class am extends Ve {
11127
+ class sm extends Ve {
11132
11128
  /**
11133
11129
  * Get LSP server status
11134
11130
  */
@@ -11139,7 +11135,7 @@ class am extends Ve {
11139
11135
  });
11140
11136
  }
11141
11137
  }
11142
- class im extends Ve {
11138
+ class am extends Ve {
11143
11139
  /**
11144
11140
  * Get formatter status
11145
11141
  */
@@ -11150,7 +11146,7 @@ class im extends Ve {
11150
11146
  });
11151
11147
  }
11152
11148
  }
11153
- class om extends Ve {
11149
+ class im extends Ve {
11154
11150
  /**
11155
11151
  * Get the next TUI request from the queue
11156
11152
  */
@@ -11174,10 +11170,10 @@ class om extends Ve {
11174
11170
  });
11175
11171
  }
11176
11172
  }
11177
- class lm extends Ve {
11173
+ class om extends Ve {
11178
11174
  constructor() {
11179
11175
  super(...arguments);
11180
- be(this, "control", new om({ client: this._client }));
11176
+ be(this, "control", new im({ client: this._client }));
11181
11177
  }
11182
11178
  /**
11183
11179
  * Append prompt to the TUI
@@ -11286,7 +11282,7 @@ class lm extends Ve {
11286
11282
  });
11287
11283
  }
11288
11284
  }
11289
- class cm extends Ve {
11285
+ class lm extends Ve {
11290
11286
  /**
11291
11287
  * Get events
11292
11288
  */
@@ -11297,29 +11293,29 @@ class cm extends Ve {
11297
11293
  });
11298
11294
  }
11299
11295
  }
11300
- class um extends Ve {
11296
+ class cm extends Ve {
11301
11297
  constructor() {
11302
11298
  super(...arguments);
11303
- be(this, "global", new Hh({ client: this._client }));
11304
- be(this, "project", new Gh({ client: this._client }));
11305
- be(this, "pty", new Wh({ client: this._client }));
11306
- be(this, "config", new Kh({ client: this._client }));
11307
- be(this, "tool", new Vh({ client: this._client }));
11308
- be(this, "instance", new qh({ client: this._client }));
11309
- be(this, "path", new Zh({ client: this._client }));
11310
- be(this, "vcs", new Yh({ client: this._client }));
11311
- be(this, "session", new Xh({ client: this._client }));
11312
- be(this, "command", new Jh({ client: this._client }));
11313
- be(this, "provider", new em({ client: this._client }));
11314
- be(this, "find", new tm({ client: this._client }));
11315
- be(this, "file", new nm({ client: this._client }));
11316
- be(this, "app", new rm({ client: this._client }));
11317
- be(this, "mcp", new sm({ client: this._client }));
11318
- be(this, "lsp", new am({ client: this._client }));
11319
- be(this, "formatter", new im({ client: this._client }));
11320
- be(this, "tui", new lm({ client: this._client }));
11299
+ be(this, "global", new jh({ client: this._client }));
11300
+ be(this, "project", new Hh({ client: this._client }));
11301
+ be(this, "pty", new Gh({ client: this._client }));
11302
+ be(this, "config", new Wh({ client: this._client }));
11303
+ be(this, "tool", new Kh({ client: this._client }));
11304
+ be(this, "instance", new Vh({ client: this._client }));
11305
+ be(this, "path", new qh({ client: this._client }));
11306
+ be(this, "vcs", new Zh({ client: this._client }));
11307
+ be(this, "session", new Yh({ client: this._client }));
11308
+ be(this, "command", new Xh({ client: this._client }));
11309
+ be(this, "provider", new Qh({ client: this._client }));
11310
+ be(this, "find", new em({ client: this._client }));
11311
+ be(this, "file", new tm({ client: this._client }));
11312
+ be(this, "app", new nm({ client: this._client }));
11313
+ be(this, "mcp", new rm({ client: this._client }));
11314
+ be(this, "lsp", new sm({ client: this._client }));
11315
+ be(this, "formatter", new am({ client: this._client }));
11316
+ be(this, "tui", new om({ client: this._client }));
11321
11317
  be(this, "auth", new Ti({ client: this._client }));
11322
- be(this, "event", new cm({ client: this._client }));
11318
+ be(this, "event", new lm({ client: this._client }));
11323
11319
  }
11324
11320
  /**
11325
11321
  * Respond to a permission request
@@ -11335,7 +11331,7 @@ class um extends Ve {
11335
11331
  });
11336
11332
  }
11337
11333
  }
11338
- function dm(t, e, n, r) {
11334
+ function um(t, e, n, r) {
11339
11335
  var o;
11340
11336
  if (!(r != null && r.throwOnError) || t instanceof Error)
11341
11337
  return t;
@@ -11354,14 +11350,14 @@ function ua(t, e) {
11354
11350
  const n = (t == null ? void 0 : t.method) ?? "?", r = (t == null ? void 0 : t.url) ?? "?", s = e == null ? void 0 : e.status, o = e == null ? void 0 : e.statusText;
11355
11351
  return `${n} ${r}${s ? " → " + s : ""}${o ? " " + o : ""}`;
11356
11352
  }
11357
- function pm(t, e) {
11353
+ function dm(t, e) {
11358
11354
  if (t)
11359
11355
  return e && (t === e || t === encodeURIComponent(e)) ? e : t;
11360
11356
  }
11361
- function fm(t, e) {
11357
+ function pm(t, e) {
11362
11358
  if (t.method !== "GET" && t.method !== "HEAD")
11363
11359
  return t;
11364
- const n = pm(t.headers.get("x-opencode-directory"), e);
11360
+ const n = dm(t.headers.get("x-opencode-directory"), e);
11365
11361
  if (!n)
11366
11362
  return t;
11367
11363
  const r = new URL(t.url);
@@ -11369,7 +11365,7 @@ function fm(t, e) {
11369
11365
  const s = new Request(r, t);
11370
11366
  return s.headers.delete("x-opencode-directory"), s;
11371
11367
  }
11372
- function hm(t) {
11368
+ function fm(t) {
11373
11369
  t != null && t.fetch || (t = {
11374
11370
  ...t,
11375
11371
  fetch: (r) => (r.timeout = !1, fetch(r))
@@ -11378,15 +11374,15 @@ function hm(t) {
11378
11374
  "x-opencode-directory": encodeURIComponent(t.directory)
11379
11375
  });
11380
11376
  const e = Si(t);
11381
- return e.interceptors.request.use((n) => fm(n, t == null ? void 0 : t.directory)), e.interceptors.error.use(dm), new um({ client: e });
11377
+ return e.interceptors.request.use((n) => pm(n, t == null ? void 0 : t.directory)), e.interceptors.error.use(um), new cm({ client: e });
11382
11378
  }
11383
11379
  function da() {
11384
11380
  return { pending: [], active: null };
11385
11381
  }
11386
- function mm(t, e) {
11382
+ function hm(t, e) {
11387
11383
  return { ...t, pending: [...t.pending, e] };
11388
11384
  }
11389
- function gm(t) {
11385
+ function mm(t) {
11390
11386
  if (t.active || t.pending.length === 0) return { queue: t, item: null };
11391
11387
  const e = t.pending[0];
11392
11388
  return {
@@ -11400,11 +11396,11 @@ function pa(t) {
11400
11396
  item: t.active
11401
11397
  };
11402
11398
  }
11403
- function bm() {
11399
+ function gm() {
11404
11400
  return { lastTimestamp: 0, counter: 0 };
11405
11401
  }
11406
11402
  const fa = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", Gn = 14;
11407
- function ym(t, e = Date.now(), n) {
11403
+ function bm(t, e = Date.now(), n) {
11408
11404
  e !== t.lastTimestamp && (t.lastTimestamp = e, t.counter = 0), t.counter++;
11409
11405
  const s = (BigInt(e) * 0x1000n + BigInt(t.counter)).toString(16).padStart(12, "0").slice(-12), o = crypto.getRandomValues(new Uint8Array(Gn));
11410
11406
  if (o.length < Gn)
@@ -11414,7 +11410,7 @@ function ym(t, e = Date.now(), n) {
11414
11410
  l += fa[o[a] % fa.length];
11415
11411
  return `msg_${s}${l}`;
11416
11412
  }
11417
- const vm = 200, xm = 50, _m = 4 * 60 * 1e3, wm = 6 * 60 * 1e3, ha = 10;
11413
+ const ym = 200, vm = 50, xm = 4 * 60 * 1e3, _m = 6 * 60 * 1e3, ha = 10;
11418
11414
  function En(t) {
11419
11415
  if (t && typeof t == "object" && "name" in t && "data" in t) {
11420
11416
  const { name: e, data: n } = t, r = typeof n.message == "string" ? n.message : void 0;
@@ -11422,13 +11418,13 @@ function En(t) {
11422
11418
  }
11423
11419
  return "Unknown error";
11424
11420
  }
11425
- function km(t) {
11421
+ function wm(t) {
11426
11422
  return t.type === "text" ? { kind: "text", id: t.id, text: t.text } : t.type === "reasoning" ? { kind: "reasoning", id: t.id, text: t.text } : t.type === "tool" ? { kind: "tool", id: t.id, tool: t.tool, state: t.state } : t.type === "file" ? { kind: "file", id: t.id, mime: t.mime, filename: t.filename, url: t.url } : null;
11427
11423
  }
11428
- function Sm() {
11429
- const t = ae("idle"), e = ae("No session selected"), n = ae(null), r = ae(!1), s = ae(null), o = ae(!1), l = ae(!1), a = ae(null), i = ae(null), u = ae(null), p = ae(!1), v = ae(!1), m = ae(0), S = ae(null), c = ae(!1), y = ae(!1), w = ae([]), T = qn({}), x = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Set(), C = ae(da()), M = B(() => C.value.pending.map((k) => k.message)), j = ae(0);
11424
+ function km() {
11425
+ const t = ae("idle"), e = ae("No session selected"), n = ae(null), r = ae(!1), s = ae(null), o = ae(!1), l = ae(!1), a = ae(null), i = ae(null), u = ae(null), p = ae(!1), v = ae(!1), m = ae(0), S = ae(null), c = ae(!1), y = ae(!1), w = ae([]), T = qn({}), x = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Set(), C = ae(da()), M = B(() => C.value.pending.map((k) => k.message)), U = ae(0);
11430
11426
  let ne = null, ee = 0, _e = 0, Ce = !1;
11431
- const V = bm(), Q = /* @__PURE__ */ new Map();
11427
+ const V = gm(), Q = /* @__PURE__ */ new Map();
11432
11428
  let pe = null, we = null;
11433
11429
  function ge() {
11434
11430
  pe !== null && (clearTimeout(pe), pe = null), we !== null && (cancelAnimationFrame(we), we = null);
@@ -11443,7 +11439,7 @@ function Sm() {
11443
11439
  const ve = oe.parts.find((Be) => Be.id === K.partID);
11444
11440
  ve && (ve.kind === "text" || ve.kind === "reasoning") ? ve.text += K.text : ve || oe.parts.push({ kind: "text", id: K.partID, text: K.text }), R = !0;
11445
11441
  }
11446
- Q.size === 0 && ge(), R && j.value++;
11442
+ Q.size === 0 && ge(), R && U.value++;
11447
11443
  }
11448
11444
  function Y() {
11449
11445
  Q.clear(), ge();
@@ -11453,12 +11449,12 @@ function Sm() {
11453
11449
  pe = null, we = requestAnimationFrame(() => {
11454
11450
  we = null, L();
11455
11451
  });
11456
- }, xm));
11452
+ }, vm));
11457
11453
  }
11458
11454
  function me() {
11459
11455
  Y(), w.value = [];
11460
11456
  for (const k of Object.keys(T)) delete T[k];
11461
- x.clear(), $.clear(), j.value++;
11457
+ x.clear(), $.clear(), U.value++;
11462
11458
  }
11463
11459
  function N() {
11464
11460
  _e++, C.value = da(), Ce = !1, o.value = !1, l.value = !1;
@@ -11480,7 +11476,7 @@ function Sm() {
11480
11476
  diffs: [],
11481
11477
  busy: !0
11482
11478
  };
11483
- return T[k] = oe, w.value.push(k), x.set(k, k), j.value++, oe;
11479
+ return T[k] = oe, w.value.push(k), x.set(k, k), U.value++, oe;
11484
11480
  }
11485
11481
  function Fe(k) {
11486
11482
  return w.value.map((R) => T[R]).filter((R) => (R == null ? void 0 : R.role) === "assistant" && R.parentId === k);
@@ -11514,17 +11510,17 @@ function Sm() {
11514
11510
  const H = Fe(k), K = H[H.length - 1];
11515
11511
  if (!K) return;
11516
11512
  const oe = R.map(ze).filter((ve) => !!ve);
11517
- K.diffs = oe, K.changedFiles = oe.map((ve) => ve.file), j.value++;
11513
+ K.diffs = oe, K.changedFiles = oe.map((ve) => ve.file), U.value++;
11518
11514
  }
11519
11515
  function yt(k, R) {
11520
11516
  if (R.type === "patch") {
11521
- k.changedFiles = [.../* @__PURE__ */ new Set([...k.changedFiles, ...R.files])], k.parentId && Me(k.parentId), j.value++;
11517
+ k.changedFiles = [.../* @__PURE__ */ new Set([...k.changedFiles, ...R.files])], k.parentId && Me(k.parentId), U.value++;
11522
11518
  return;
11523
11519
  }
11524
- const H = km(R);
11520
+ const H = wm(R);
11525
11521
  if (!H) return;
11526
11522
  const K = k.parts.findIndex((oe) => oe.id === H.id);
11527
- K === -1 ? k.parts.push(H) : k.parts[K] = H, j.value++;
11523
+ K === -1 ? k.parts.push(H) : k.parts[K] = H, U.value++;
11528
11524
  }
11529
11525
  function ft(k) {
11530
11526
  if (k.sessionID !== a.value) return;
@@ -11546,7 +11542,7 @@ function Sm() {
11546
11542
  if (!ne) return;
11547
11543
  const { data: R, error: H } = await ne.session.messages({
11548
11544
  path: { id: k },
11549
- query: { limit: vm }
11545
+ query: { limit: ym }
11550
11546
  });
11551
11547
  if (H) throw new Error(En(H));
11552
11548
  Et(R ?? []);
@@ -11597,7 +11593,7 @@ function Sm() {
11597
11593
  const R = pa(C.value);
11598
11594
  C.value = R.queue;
11599
11595
  const H = R.item;
11600
- H && (H.failureText ? (H.message.promptState = "failed", H.message.errorText = H.failureText) : delete H.message.promptState, j.value++), k && Ne();
11596
+ H && (H.failureText ? (H.message.promptState = "failed", H.message.errorText = H.failureText) : delete H.message.promptState, U.value++), k && Ne();
11601
11597
  }
11602
11598
  function de() {
11603
11599
  let k = null;
@@ -11607,7 +11603,7 @@ function Sm() {
11607
11603
  (K == null ? void 0 : K.role) === "assistant" && (K.busy = !1);
11608
11604
  }
11609
11605
  const R = C.value.active;
11610
- R ? R.accepted ? (k = R.message.id, Ue(!1)) : R.idleObserved = !0 : Ne(), k && le(k).finally(() => Ne()), j.value++;
11606
+ R ? R.accepted ? (k = R.message.id, Ue(!1)) : R.idleObserved = !0 : Ne(), k && le(k).finally(() => Ne()), U.value++;
11611
11607
  }
11612
11608
  async function le(k) {
11613
11609
  if (!(!u.value || !i.value || p.value)) {
@@ -11675,7 +11671,7 @@ function Sm() {
11675
11671
  t.value === "ready" && (e.value = "Ready"), de();
11676
11672
  else if (K.type === "session.error" && (!K.properties.sessionID || K.properties.sessionID === a.value)) {
11677
11673
  const ve = En(K.properties.error), Be = C.value.active;
11678
- Be && (Be.failureText = ve, Be.message.promptState = "failed", j.value++), e.value = `Session error: ${ve}`;
11674
+ Be && (Be.failureText = ve, Be.message.promptState = "failed", U.value++), e.value = `Session error: ${ve}`;
11679
11675
  }
11680
11676
  }
11681
11677
  if (k !== ee) return;
@@ -11722,7 +11718,7 @@ function Sm() {
11722
11718
  try {
11723
11719
  const H = new URLSearchParams();
11724
11720
  k.businessId && H.set("businessId", k.businessId), k.sessionId && H.set("sessionId", k.sessionId);
11725
- const K = new AbortController(), oe = window.setTimeout(() => K.abort(), _m);
11721
+ const K = new AbortController(), oe = window.setTimeout(() => K.abort(), xm);
11726
11722
  let ve;
11727
11723
  try {
11728
11724
  ve = await en(Qt(`/api/start${H.size ? `?${H}` : ""}`), {
@@ -11741,7 +11737,7 @@ function Sm() {
11741
11737
  "x-miniprogram-business-id": k.businessId ?? "",
11742
11738
  "x-miniprogram-session-id": Ze
11743
11739
  };
11744
- E && (Z.Authorization = E), ne = hm({
11740
+ E && (Z.Authorization = E), ne = fm({
11745
11741
  baseUrl: Qt("/api/opencode"),
11746
11742
  headers: Z,
11747
11743
  fetch: (se) => {
@@ -11771,7 +11767,7 @@ function Sm() {
11771
11767
  if (!u.value || !i.value || !n.value || p.value)
11772
11768
  return s.value = "A live session is required to restart the preview server.", !1;
11773
11769
  r.value = !0, s.value = null;
11774
- const k = new AbortController(), R = window.setTimeout(() => k.abort(), wm);
11770
+ const k = new AbortController(), R = window.setTimeout(() => k.abort(), _m);
11775
11771
  try {
11776
11772
  const H = await en(
11777
11773
  Qt(
@@ -11804,16 +11800,16 @@ function Sm() {
11804
11800
  }
11805
11801
  function ye(k) {
11806
11802
  const { message: R } = k;
11807
- T[R.key] = R, w.value.push(R.key), j.value++;
11803
+ T[R.key] = R, w.value.push(R.key), U.value++;
11808
11804
  }
11809
11805
  function ke(k, R) {
11810
11806
  k.failureText = Ye(R), k.message.promptState = "failed", k.message.errorText = k.failureText, l.value = !1;
11811
11807
  const H = pa(C.value);
11812
- C.value = H.queue, e.value = `Failed to send: ${k.failureText}`, j.value++;
11808
+ C.value = H.queue, e.value = `Failed to send: ${k.failureText}`, U.value++;
11813
11809
  }
11814
11810
  async function Ne() {
11815
11811
  if (Ce || C.value.active || l.value || c.value || !ne || !a.value || p.value || t.value !== "ready") return;
11816
- const k = gm(C.value);
11812
+ const k = mm(C.value);
11817
11813
  if (!k.item) return;
11818
11814
  C.value = k.queue;
11819
11815
  const R = k.item, H = _e, K = ne, oe = a.value;
@@ -11824,7 +11820,7 @@ function Sm() {
11824
11820
  if (H !== _e || ne !== K || a.value !== oe || C.value.active !== R) return;
11825
11821
  const Be = ve.length ? `[The attached image file${ve.length > 1 ? "s are" : " is"} saved on this machine at: ${ve.join(", ")} (outside the repo). If the task needs the actual file as an asset, move it into the app (e.g. src/assets/) — do not try to recreate it. If it is only a visual reference, leave it where it is.]` : "", Ze = [R.text.trim(), Be].filter(Boolean).join(`
11826
11822
 
11827
- `), xt = ym(V);
11823
+ `), xt = bm(V);
11828
11824
  R.message.id = xt, x.set(xt, R.message.key), $.add(xt), l.value = !0;
11829
11825
  const { error: g } = await K.session.promptAsync({
11830
11826
  path: { id: oe },
@@ -11842,7 +11838,7 @@ function Sm() {
11842
11838
  }
11843
11839
  });
11844
11840
  if (g) throw new Error(En(g));
11845
- R.accepted = !0, R.message.promptState = R.failureText ? "failed" : "running", j.value++, R.idleObserved && (Ue(!1), le(xt).finally(() => Ne()));
11841
+ R.accepted = !0, R.message.promptState = R.failureText ? "failed" : "running", U.value++, R.idleObserved && (Ue(!1), le(xt).finally(() => Ne()));
11846
11842
  } catch (ve) {
11847
11843
  H === _e && C.value.active === R && ke(R, ve);
11848
11844
  } finally {
@@ -11876,13 +11872,13 @@ function Sm() {
11876
11872
  busy: !1,
11877
11873
  promptState: "queued"
11878
11874
  };
11879
- return C.value = mm(C.value, {
11875
+ return C.value = hm(C.value, {
11880
11876
  message: oe,
11881
11877
  text: H,
11882
11878
  attachments: R,
11883
11879
  accepted: !1,
11884
11880
  idleObserved: !1
11885
- }), j.value++, Ne(), !0;
11881
+ }), U.value++, Ne(), !0;
11886
11882
  }
11887
11883
  async function At(k) {
11888
11884
  if (!u.value || !i.value || !a.value || p.value || l.value || c.value) return !1;
@@ -11944,7 +11940,7 @@ function Sm() {
11944
11940
  messagesOrder: w,
11945
11941
  messagesByKey: T,
11946
11942
  queuedMessages: M,
11947
- revision: j,
11943
+ revision: U,
11948
11944
  init: We,
11949
11945
  reset: F,
11950
11946
  suspend: vt,
@@ -11956,12 +11952,12 @@ function Sm() {
11956
11952
  restartPreviewServer: q
11957
11953
  });
11958
11954
  }
11959
- const ma = ["pointerdown", "pointermove", "keydown", "wheel", "touchstart"], Tm = 6e4, Em = 1e3;
11960
- function Am(t) {
11955
+ const ma = ["pointerdown", "pointermove", "keydown", "wheel", "touchstart"], Sm = 6e4, Tm = 1e3;
11956
+ function Em(t) {
11961
11957
  let e = Date.now(), n = 0, r = null;
11962
11958
  function s() {
11963
11959
  const l = Date.now();
11964
- l - n < Em || (n = l, e = l);
11960
+ l - n < Tm || (n = l, e = l);
11965
11961
  }
11966
11962
  function o() {
11967
11963
  if (!t.isEligible() || t.isActive()) {
@@ -11973,7 +11969,7 @@ function Am(t) {
11973
11969
  Rn(() => {
11974
11970
  e = Date.now();
11975
11971
  for (const l of ma) window.addEventListener(l, s, { passive: !0 });
11976
- r = window.setInterval(o, Tm);
11972
+ r = window.setInterval(o, Sm);
11977
11973
  }), ar(() => {
11978
11974
  for (const l of ma) window.removeEventListener(l, s);
11979
11975
  r !== null && window.clearInterval(r);
@@ -11985,10 +11981,10 @@ function Er(t) {
11985
11981
  function Ar(t) {
11986
11982
  return t === "active" ? "Active" : t === "needs_attention" ? "Needs attention" : "Archived";
11987
11983
  }
11988
- function Cm(t) {
11984
+ function Am(t) {
11989
11985
  return t === "succeeded" ? "success" : t === "failed" ? "error" : t === "queued" || t === "running" ? "info" : "neutral";
11990
11986
  }
11991
- function $m(t) {
11987
+ function Cm(t) {
11992
11988
  switch (t) {
11993
11989
  case "queued":
11994
11990
  return "Queued";
@@ -12002,7 +11998,7 @@ function $m(t) {
12002
11998
  return "No build yet";
12003
11999
  }
12004
12000
  }
12005
- function Rm(t) {
12001
+ function $m(t) {
12006
12002
  switch (t) {
12007
12003
  case "ready":
12008
12004
  return "Ready";
@@ -12014,20 +12010,20 @@ function Rm(t) {
12014
12010
  return "Not set up";
12015
12011
  }
12016
12012
  }
12017
- const Im = ["preview", "published", "rolled_back"];
12013
+ const Rm = ["preview", "published", "rolled_back"];
12018
12014
  function Ei(t) {
12019
- return Im.includes(t.status);
12015
+ return Rm.includes(t.status);
12020
12016
  }
12021
- function Nm(t) {
12017
+ function Im(t) {
12022
12018
  return t.is_live === 1 ? "Live" : t.build_status === "queued" || t.build_status === "running" ? "Building" : t.build_status === "failed" ? "Failed" : t.build_status === "succeeded" ? "Ready" : "Draft";
12023
12019
  }
12024
- function Om(t) {
12020
+ function Nm(t) {
12025
12021
  return t.is_live === 1 ? "primary" : t.build_status === "succeeded" ? "success" : t.build_status === "queued" || t.build_status === "running" ? "info" : t.build_status === "failed" ? "error" : "neutral";
12026
12022
  }
12027
- function Pm(t) {
12023
+ function Om(t) {
12028
12024
  return t === "ready" ? "success" : t === "error" ? "error" : t === "idle" ? "neutral" : "warning";
12029
12025
  }
12030
- function Mm() {
12026
+ function Pm() {
12031
12027
  const t = ae(an() || Dr), e = ae(null), n = ae([]), r = ae([]), s = ae(null), o = ae([]), l = ae(!1), a = ae(!1), i = ae("Project ready"), u = ae(null), p = ae(null), v = B(() => r.value[0] ?? null), m = B(() => {
12032
12028
  var N;
12033
12029
  return ((N = e.value) == null ? void 0 : N.provisioningStatus) === "ready";
@@ -12098,7 +12094,7 @@ function Mm() {
12098
12094
  const F = r.value.find((ue) => ue.id === N);
12099
12095
  u.value = N, await C(F);
12100
12096
  }
12101
- async function j(N = {}) {
12097
+ async function U(N = {}) {
12102
12098
  if (c(), !m.value)
12103
12099
  throw new Error("Set up the v2 project before creating a session");
12104
12100
  a.value = !0;
@@ -12305,7 +12301,7 @@ function Mm() {
12305
12301
  refreshSessions: T,
12306
12302
  refreshReleases: x,
12307
12303
  selectRelease: M,
12308
- createSession: j,
12304
+ createSession: U,
12309
12305
  sessionChanges: ne,
12310
12306
  refreshWorkspaceState: ee,
12311
12307
  refreshCheckpoints: _e,
@@ -12320,90 +12316,90 @@ function Mm() {
12320
12316
  rollbackToV1: re
12321
12317
  });
12322
12318
  }
12323
- const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, zm = ["title", "onClick"], Bm = {
12319
+ const Mm = ["aria-label", "title"], Lm = { class: "flex flex-col gap-[4px]" }, Dm = ["title", "onClick"], zm = {
12324
12320
  key: 0,
12325
12321
  class: "min-w-0 flex-1 truncate fm-typo-en-body-md-600"
12326
- }, Fm = {
12322
+ }, Bm = {
12327
12323
  key: 1,
12328
12324
  class: "rounded-full bg-fm-color-neutral-gray-100 px-[8px] py-[2px] fm-typo-en-body-xs-600 text-fm-color-typo-secondary"
12329
- }, Um = { class: "mt-auto flex flex-col gap-[8px]" }, jm = ["title"], Hm = {
12325
+ }, Fm = { class: "mt-auto flex flex-col gap-[8px]" }, Um = ["title"], jm = {
12330
12326
  key: 2,
12331
12327
  class: "min-w-0 truncate"
12332
- }, Gm = {
12328
+ }, Hm = {
12333
12329
  key: 0,
12334
12330
  class: "flex min-w-0 flex-1 flex-col overflow-auto bg-fm-color-neutral-white"
12335
- }, Wm = { class: "flex shrink-0 items-center justify-between gap-16 border-b border-fm-color-neutral-gray-100 px-24 py-16" }, Km = { class: "flex w-full max-w-[760px] flex-col gap-16 p-24" }, Vm = { class: "rounded-lg border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white p-16" }, qm = { class: "flex items-center justify-between gap-16" }, Zm = { class: "min-w-0" }, Ym = { class: "m-0 fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Xm = { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Jm = {
12331
+ }, Gm = { class: "flex shrink-0 items-center justify-between gap-16 border-b border-fm-color-neutral-gray-100 px-24 py-16" }, Wm = { class: "flex w-full max-w-[760px] flex-col gap-16 p-24" }, Km = { class: "rounded-lg border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white p-16" }, Vm = { class: "flex items-center justify-between gap-16" }, qm = { class: "min-w-0" }, Zm = { class: "m-0 fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Ym = { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Xm = {
12336
12332
  key: 0,
12337
12333
  class: "m-0 mt-12 break-words fm-typo-en-body-sm-400 text-fm-color-typo-error"
12338
- }, Qm = {
12334
+ }, Jm = {
12339
12335
  key: 1,
12340
12336
  class: "workspace__workspace-main flex min-w-0 flex-1 flex-col"
12341
- }, eg = { class: "relative flex h-[52px] shrink-0 items-center justify-between gap-8 border-b border-fm-color-neutral-gray-100 px-16" }, tg = { class: "flex min-w-0 items-center gap-8" }, ng = { class: "min-w-0 truncate fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, rg = { class: "truncate" }, sg = { class: "flex shrink-0 items-center gap-4" }, ag = { class: "max-w-[280px] truncate" }, ig = { class: "absolute left-16 top-[52px] z-20 max-h-[360px] w-[320px] overflow-y-auto rounded-lg border border-fm-color-neutral-gray-200 bg-fm-color-neutral-white py-[4px] shadow-lg" }, og = ["onClick"], lg = { class: "min-w-0 flex-1" }, cg = { class: "truncate fm-typo-en-body-md-600 text-fm-color-typo-primary" }, ug = { class: "mt-2 truncate fm-typo-en-body-xs-400 text-fm-color-typo-tertiary" }, dg = {
12337
+ }, Qm = { class: "relative flex h-[52px] shrink-0 items-center justify-between gap-8 border-b border-fm-color-neutral-gray-100 px-16" }, eg = { class: "flex min-w-0 items-center gap-8" }, tg = { class: "min-w-0 truncate fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ng = { class: "truncate" }, rg = { class: "flex shrink-0 items-center gap-4" }, sg = { class: "max-w-[280px] truncate" }, ag = { class: "absolute left-16 top-[52px] z-20 max-h-[360px] w-[320px] overflow-y-auto rounded-lg border border-fm-color-neutral-gray-200 bg-fm-color-neutral-white py-[4px] shadow-lg" }, ig = ["onClick"], og = { class: "min-w-0 flex-1" }, lg = { class: "truncate fm-typo-en-body-md-600 text-fm-color-typo-primary" }, cg = { class: "mt-2 truncate fm-typo-en-body-xs-400 text-fm-color-typo-tertiary" }, ug = {
12342
12338
  key: 0,
12343
12339
  class: "px-[12px] py-[10px] fm-typo-en-body-sm-400 text-fm-color-typo-tertiary"
12344
- }, pg = {
12340
+ }, dg = {
12345
12341
  key: 0,
12346
12342
  class: "max-h-[320px] shrink-0 overflow-y-auto border-b border-fm-color-neutral-gray-100 bg-fm-color-neutral-white"
12347
- }, fg = { class: "flex items-center justify-between gap-12 border-b border-fm-color-neutral-gray-100 px-16 py-10" }, hg = {
12343
+ }, pg = { class: "flex items-center justify-between gap-12 border-b border-fm-color-neutral-gray-100 px-16 py-10" }, fg = {
12348
12344
  key: 0,
12349
12345
  class: "border-b border-fm-color-system-error-100 bg-fm-color-system-error-50 px-16 py-8 fm-typo-en-body-sm-400 text-fm-color-typo-error"
12350
- }, mg = {
12346
+ }, hg = {
12351
12347
  key: 1,
12352
12348
  class: "divide-y divide-fm-color-neutral-gray-100"
12353
- }, gg = { class: "min-w-0" }, bg = { class: "flex min-w-0 flex-wrap items-center gap-6" }, yg = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, vg = { class: "mt-3 flex flex-wrap items-center gap-8 fm-typo-en-body-xs-400 text-fm-color-typo-secondary" }, xg = { class: "font-mono" }, _g = {
12349
+ }, mg = { class: "min-w-0" }, gg = { class: "flex min-w-0 flex-wrap items-center gap-6" }, bg = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, yg = { class: "mt-3 flex flex-wrap items-center gap-8 fm-typo-en-body-xs-400 text-fm-color-typo-secondary" }, vg = { class: "font-mono" }, xg = {
12354
12350
  key: 0,
12355
12351
  class: "font-mono"
12356
- }, wg = { key: 1 }, kg = {
12352
+ }, _g = { key: 1 }, wg = {
12357
12353
  key: 0,
12358
12354
  class: "m-0 mt-3 truncate fm-typo-en-body-xs-400 text-fm-color-typo-secondary"
12359
- }, Sg = {
12355
+ }, kg = {
12360
12356
  key: 1,
12361
12357
  class: "m-0 mt-3 truncate fm-typo-en-body-xs-400 text-fm-color-typo-error"
12362
- }, Tg = {
12358
+ }, Sg = {
12363
12359
  key: 2,
12364
12360
  class: "px-16 py-14 fm-typo-en-body-sm-400 text-fm-color-typo-tertiary"
12365
- }, Eg = {
12361
+ }, Tg = {
12366
12362
  key: 1,
12367
12363
  class: "flex shrink-0 items-center justify-between gap-16 border-b border-fm-color-system-warning-300 bg-fm-color-system-warning-50 px-16 py-8"
12368
- }, Ag = { class: "min-w-0 truncate fm-typo-en-body-sm-400 text-fm-color-typo-warning" }, Cg = {
12364
+ }, Eg = { class: "min-w-0 truncate fm-typo-en-body-sm-400 text-fm-color-typo-warning" }, Ag = {
12369
12365
  key: 0,
12370
12366
  class: "absolute inset-0 z-20 cursor-col-resize"
12371
- }, $g = {
12367
+ }, Cg = {
12372
12368
  key: 1,
12373
12369
  class: "workspace__suspend-overlay absolute inset-0 z-40 flex items-center justify-center p-24"
12374
- }, Rg = { class: "flex w-full max-w-[400px] flex-col items-center gap-12 rounded-lg border border-fm-color-neutral-gray-200 bg-fm-color-neutral-white p-24 text-center shadow-lg" }, Ig = ["aria-valuenow"], Ng = {
12370
+ }, $g = { class: "flex w-full max-w-[400px] flex-col items-center gap-12 rounded-lg border border-fm-color-neutral-gray-200 bg-fm-color-neutral-white p-24 text-center shadow-lg" }, Rg = ["aria-valuenow"], Ig = {
12375
12371
  key: 2,
12376
12372
  class: "flex min-w-0 flex-1 flex-col overflow-auto bg-fm-color-neutral-white"
12377
- }, Og = { class: "flex shrink-0 items-center justify-between gap-16 border-b border-fm-color-neutral-gray-100 px-24 py-16" }, Pg = { class: "flex shrink-0 items-center gap-8" }, Mg = { class: "flex w-full max-w-[920px] flex-col gap-24 p-24" }, Lg = { class: "rounded-lg border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white" }, Dg = { class: "flex flex-col gap-16 p-16" }, zg = { class: "flex items-center justify-between gap-16" }, Bg = { class: "min-w-0" }, Fg = { class: "m-0 fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Ug = { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, jg = { class: "flex shrink-0 items-center gap-6" }, Hg = { class: "flex flex-wrap items-center gap-8" }, Gg = { class: "rounded-lg border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white" }, Wg = { class: "flex items-center justify-between gap-16 border-b border-fm-color-neutral-gray-100 px-16 py-12" }, Kg = { class: "flex items-center gap-12" }, Vg = {
12373
+ }, Ng = { class: "flex shrink-0 items-center justify-between gap-16 border-b border-fm-color-neutral-gray-100 px-24 py-16" }, Og = { class: "flex shrink-0 items-center gap-8" }, Pg = { class: "flex w-full max-w-[920px] flex-col gap-24 p-24" }, Mg = { class: "rounded-lg border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white" }, Lg = { class: "flex flex-col gap-16 p-16" }, Dg = { class: "flex items-center justify-between gap-16" }, zg = { class: "min-w-0" }, Bg = { class: "m-0 fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Fg = { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ug = { class: "flex shrink-0 items-center gap-6" }, jg = { class: "flex flex-wrap items-center gap-8" }, Hg = { class: "rounded-lg border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white" }, Gg = { class: "flex items-center justify-between gap-16 border-b border-fm-color-neutral-gray-100 px-16 py-12" }, Wg = { class: "flex items-center gap-12" }, Kg = {
12378
12374
  key: 0,
12379
12375
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
12380
- }, qg = { class: "font-mono text-fm-color-typo-secondary" }, Zg = {
12376
+ }, Vg = { class: "font-mono text-fm-color-typo-secondary" }, qg = {
12381
12377
  key: 0,
12382
12378
  class: "flex flex-col items-center gap-6 p-24 text-center"
12383
- }, Yg = {
12379
+ }, Zg = {
12384
12380
  key: 1,
12385
12381
  class: "divide-y divide-fm-color-neutral-gray-100"
12386
- }, Xg = ["onClick"], Jg = { class: "flex min-w-0 flex-wrap items-center gap-[6px]" }, Qg = { class: "inline-flex min-w-0 items-center gap-[4px] truncate fm-typo-en-body-md-600 text-fm-color-typo-primary" }, eb = { class: "mt-4 flex min-w-0 flex-wrap items-center gap-8 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, tb = { class: "font-mono text-fm-color-typo-tertiary" }, nb = { class: "font-mono text-fm-color-typo-tertiary" }, rb = { class: "flex shrink-0 flex-wrap items-center justify-end gap-4" }, sb = { class: "rounded-lg border border-fm-color-system-warning-300 bg-fm-color-neutral-white" }, ab = { class: "flex items-center justify-between gap-16 p-16" }, ib = {
12382
+ }, Yg = ["onClick"], Xg = { class: "flex min-w-0 flex-wrap items-center gap-[6px]" }, Jg = { class: "inline-flex min-w-0 items-center gap-[4px] truncate fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Qg = { class: "mt-4 flex min-w-0 flex-wrap items-center gap-8 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, eb = { class: "font-mono text-fm-color-typo-tertiary" }, tb = { class: "font-mono text-fm-color-typo-tertiary" }, nb = { class: "flex shrink-0 flex-wrap items-center justify-end gap-4" }, rb = { class: "rounded-lg border border-fm-color-system-warning-300 bg-fm-color-neutral-white" }, sb = { class: "flex items-center justify-between gap-16 p-16" }, ab = {
12387
12383
  key: 3,
12388
12384
  class: "flex min-w-0 flex-1 flex-col overflow-auto bg-fm-color-neutral-white"
12389
- }, ob = { class: "flex shrink-0 items-center justify-between gap-16 border-b border-fm-color-neutral-gray-100 px-24 py-16" }, lb = { class: "flex w-full max-w-[920px] flex-col gap-8 p-24" }, cb = ["onClick", "onKeydown"], ub = { class: "min-w-0" }, db = { class: "flex min-w-0 flex-wrap items-center gap-[6px]" }, pb = { class: "truncate fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, fb = { class: "mt-4 flex flex-wrap items-center gap-x-8 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, hb = {
12385
+ }, ib = { class: "flex shrink-0 items-center justify-between gap-16 border-b border-fm-color-neutral-gray-100 px-24 py-16" }, ob = { class: "flex w-full max-w-[920px] flex-col gap-8 p-24" }, lb = ["onClick", "onKeydown"], cb = { class: "min-w-0" }, ub = { class: "flex min-w-0 flex-wrap items-center gap-[6px]" }, db = { class: "truncate fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, pb = { class: "mt-4 flex flex-wrap items-center gap-x-8 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, fb = {
12390
12386
  key: 0,
12391
12387
  class: "font-mono"
12392
- }, mb = {
12388
+ }, hb = {
12393
12389
  key: 1,
12394
12390
  class: "text-fm-color-typo-error"
12395
- }, gb = {
12391
+ }, mb = {
12396
12392
  key: 0,
12397
12393
  class: "mt-4 truncate fm-typo-en-body-sm-400 text-fm-color-typo-error"
12398
- }, bb = { class: "flex shrink-0 items-center gap-4" }, yb = {
12394
+ }, gb = { class: "flex shrink-0 items-center gap-4" }, bb = {
12399
12395
  key: 0,
12400
12396
  class: "flex flex-col items-center gap-8 rounded-lg border border-dashed border-fm-color-neutral-gray-200 p-24 text-center"
12401
- }, ga = "mpv2:sidebar-collapsed", Cr = "mpv2:chat-column-width", vb = 440, Wn = 320, $r = 720, xb = 360, _b = 30 * 60 * 1e3, wb = /* @__PURE__ */ pt({
12397
+ }, ga = "mpv2:sidebar-collapsed", Cr = "mpv2:chat-column-width", yb = 440, Wn = 320, $r = 720, vb = 360, xb = 30 * 60 * 1e3, _b = /* @__PURE__ */ pt({
12402
12398
  __name: "ControlPlaneView",
12403
12399
  setup(t) {
12404
- const e = Br(), n = Sm(), r = Mm(), s = ba(), o = ae("workspace"), l = ae(!1), a = ae(yi(ga, !1)), i = ae(!1), u = ae(null), p = ae(Bf(Cr, vb)), v = ae(!1);
12400
+ const e = Br(), n = km(), r = Pm(), s = ba(), o = ae("workspace"), l = ae(!1), a = ae(yi(ga, !1)), i = ae(!1), u = ae(null), p = ae(Bf(Cr, yb)), v = ae(!1);
12405
12401
  let m = null, S = null, c = null, y = "", w = "", T = null;
12406
- const x = B(() => r.sessions.find((b) => b.status === "active") ?? null), $ = ae(!1), C = ae(!1), M = ae(!1), j = ae(!1), ne = ae(!1), ee = B(
12402
+ const x = B(() => r.sessions.find((b) => b.status === "active") ?? null), $ = ae(!1), C = ae(!1), M = ae(!1), U = ae(!1), ne = ae(!1), ee = B(
12407
12403
  () => r.sessions.find((b) => b.id === n.workspaceSessionId) ?? x.value
12408
12404
  ), _e = B(
12409
12405
  () => ee.value ? se(ee.value) : "Workspace"
@@ -12441,7 +12437,7 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12441
12437
  function Me() {
12442
12438
  var z;
12443
12439
  const b = ((z = u.value) == null ? void 0 : z.clientWidth) ?? 0;
12444
- return b ? Math.max(Wn, Math.min($r, b - xb)) : $r;
12440
+ return b ? Math.max(Wn, Math.min($r, b - vb)) : $r;
12445
12441
  }
12446
12442
  function ze(b) {
12447
12443
  return Math.round(Math.min(Me(), Math.max(Wn, b)));
@@ -12489,7 +12485,7 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12489
12485
  ]);
12490
12486
  }
12491
12487
  async function te() {
12492
- if (j.value = !1, r.syncBusiness(), await r.refreshProject().catch((z) => {
12488
+ if (U.value = !1, r.syncBusiness(), await r.refreshProject().catch((z) => {
12493
12489
  r.statusText = Ye(z);
12494
12490
  }), !r.isProvisioned) {
12495
12491
  r.sessions = [], r.releases = [];
@@ -12545,7 +12541,7 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12545
12541
  async function Ue(b = "save") {
12546
12542
  if (!r.isProvisioned) return;
12547
12543
  const z = await r.createSession({ archiveCodeAction: b });
12548
- o.value = "workspace", M.value = !1, j.value = !1, await n.init({ businessId: r.businessId, sessionId: z.sessionId }), await ie().catch(() => {
12544
+ o.value = "workspace", M.value = !1, U.value = !1, await n.init({ businessId: r.businessId, sessionId: z.sessionId }), await ie().catch(() => {
12549
12545
  });
12550
12546
  }
12551
12547
  async function de() {
@@ -12709,22 +12705,22 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12709
12705
  return b.status === "rolled_back" ? "Restore live" : "Set live";
12710
12706
  }
12711
12707
  async function oe(b) {
12712
- $.value = !1, o.value = "workspace", M.value = !1, j.value = !1, await n.init({ businessId: r.businessId, sessionId: b.id, readOnly: b.status !== "active" }), await ie().catch(() => {
12708
+ $.value = !1, o.value = "workspace", M.value = !1, U.value = !1, await n.init({ businessId: r.businessId, sessionId: b.id, readOnly: b.status !== "active" }), await ie().catch(() => {
12713
12709
  });
12714
12710
  }
12715
12711
  async function ve(b) {
12716
- $.value = !1, await r.resumeSession(b.id), o.value = "workspace", M.value = !1, j.value = !1, await n.init({ businessId: r.businessId, sessionId: b.id }), await ie().catch(() => {
12712
+ $.value = !1, await r.resumeSession(b.id), o.value = "workspace", M.value = !1, U.value = !1, await n.init({ businessId: r.businessId, sessionId: b.id }), await ie().catch(() => {
12717
12713
  });
12718
12714
  }
12719
12715
  async function Be() {
12720
12716
  const b = n.workspaceSessionId;
12721
- b && (await r.resumeSession(b), M.value = !1, j.value = !1, await n.init({ businessId: r.businessId, sessionId: b }), await ie().catch(() => {
12717
+ b && (await r.resumeSession(b), M.value = !1, U.value = !1, await n.init({ businessId: r.businessId, sessionId: b }), await ie().catch(() => {
12722
12718
  }));
12723
12719
  }
12724
12720
  function Ze(b) {
12725
12721
  s.open({
12726
12722
  title: "Rename session",
12727
- dialogComponent: Eh,
12723
+ dialogComponent: Th,
12728
12724
  dialogComponentProps: {
12729
12725
  initialTitle: b.title,
12730
12726
  onSubmit: (z) => {
@@ -12736,7 +12732,7 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12736
12732
  });
12737
12733
  }
12738
12734
  function xt() {
12739
- j.value = !0, n.suspend("Paused after 30 minutes of inactivity");
12735
+ U.value = !0, n.suspend("Paused after 30 minutes of inactivity");
12740
12736
  }
12741
12737
  async function g() {
12742
12738
  if (!ne.value) {
@@ -12744,23 +12740,23 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12744
12740
  try {
12745
12741
  const b = n.workspaceSessionId;
12746
12742
  if (!b) {
12747
- j.value = !1, await te();
12743
+ U.value = !1, await te();
12748
12744
  return;
12749
12745
  }
12750
12746
  await r.refreshSessions().catch(() => {
12751
12747
  });
12752
12748
  const z = r.sessions.find((De) => De.id === b);
12753
- j.value = !1, z && z.status !== "active" ? (M.value = !0, await n.init({ businessId: r.businessId, sessionId: b, readOnly: !0 })) : await n.init({ businessId: r.businessId, sessionId: b });
12749
+ U.value = !1, z && z.status !== "active" ? (M.value = !0, await n.init({ businessId: r.businessId, sessionId: b, readOnly: !0 })) : await n.init({ businessId: r.businessId, sessionId: b });
12754
12750
  } finally {
12755
12751
  ne.value = !1;
12756
12752
  }
12757
12753
  }
12758
12754
  }
12759
- Am({
12760
- timeoutMs: _b,
12755
+ Em({
12756
+ timeoutMs: xb,
12761
12757
  // Only a live workspace generates keep-alive traffic worth stopping; the
12762
12758
  // read-only/empty states are already quiet.
12763
- isEligible: () => !j.value && !n.readOnly && !!n.workspaceSessionId && n.status === "ready",
12759
+ isEligible: () => !U.value && !n.readOnly && !!n.workspaceSessionId && n.status === "ready",
12764
12760
  // Submission is short-lived now that prompts use promptAsync; agentBusy and
12765
12761
  // queued prompts keep idle suspension from interrupting FIFO work.
12766
12762
  isActive: () => n.sending || n.agentBusy || n.queuedMessages.length > 0 || Y.value || ne.value,
@@ -12821,9 +12817,9 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12821
12817
  size: "md",
12822
12818
  color: "typo-secondary"
12823
12819
  }, null, 8, ["name"])
12824
- ], 8, Lm)
12820
+ ], 8, Mm)
12825
12821
  ], 2),
12826
- f("nav", Dm, [
12822
+ f("nav", Lm, [
12827
12823
  (h(), _(Te, null, Re(Fe, (P) => f("button", {
12828
12824
  key: P.key,
12829
12825
  type: "button",
@@ -12839,11 +12835,11 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12839
12835
  color: o.value === P.key ? "primary" : "typo-secondary",
12840
12836
  size: "md"
12841
12837
  }, null, 8, ["name", "color"]),
12842
- F.value ? U("", !0) : (h(), _("span", Bm, I(P.label), 1)),
12843
- !F.value && P.key === "sessions" ? (h(), _("span", Fm, I(O(r).sessions.length), 1)) : U("", !0)
12844
- ], 10, zm)), 64))
12838
+ F.value ? j("", !0) : (h(), _("span", zm, I(P.label), 1)),
12839
+ !F.value && P.key === "sessions" ? (h(), _("span", Bm, I(O(r).sessions.length), 1)) : j("", !0)
12840
+ ], 10, Dm)), 64))
12845
12841
  ]),
12846
- f("div", Um, [
12842
+ f("div", Fm, [
12847
12843
  O(r).statusText ? (h(), _("p", {
12848
12844
  key: 0,
12849
12845
  class: Ae(["m-0 flex items-center rounded-md bg-fm-color-neutral-gray-100 fm-typo-en-body-xs-400 text-fm-color-typo-secondary", F.value ? "justify-center px-[6px] py-[8px]" : "gap-[6px] px-[10px] py-[6px]"]),
@@ -12858,10 +12854,10 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12858
12854
  name: "info",
12859
12855
  size: "sm",
12860
12856
  color: "typo-secondary"
12861
- })) : U("", !0),
12862
- F.value ? U("", !0) : (h(), _("span", Hm, I(O(r).statusText), 1))
12863
- ], 10, jm)) : U("", !0),
12864
- O(r).isProvisioned ? U("", !0) : (h(), Se(G, {
12857
+ })) : j("", !0),
12858
+ F.value ? j("", !0) : (h(), _("span", jm, I(O(r).statusText), 1))
12859
+ ], 10, Um)) : j("", !0),
12860
+ O(r).isProvisioned ? j("", !0) : (h(), Se(G, {
12865
12861
  key: 1,
12866
12862
  icon: "source",
12867
12863
  label: F.value ? void 0 : "Set up v2 project",
@@ -12879,9 +12875,9 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12879
12875
  }, null, 8, ["label", "disabled", "loading", "title"])
12880
12876
  ])
12881
12877
  ], 2),
12882
- O(r).isProvisioned ? o.value === "workspace" ? (h(), _("main", Qm, [
12883
- f("div", eg, [
12884
- f("div", tg, [
12878
+ O(r).isProvisioned ? o.value === "workspace" ? (h(), _("main", Jm, [
12879
+ f("div", Qm, [
12880
+ f("div", eg, [
12885
12881
  f("button", {
12886
12882
  type: "button",
12887
12883
  class: "flex min-w-0 cursor-pointer items-center gap-[6px] rounded-md border-0 bg-transparent px-[8px] py-[6px] text-left hover:bg-fm-color-neutral-gray-100",
@@ -12892,7 +12888,7 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12892
12888
  color: "primary",
12893
12889
  size: "md"
12894
12890
  }),
12895
- f("span", ng, I(_e.value), 1),
12891
+ f("span", tg, I(_e.value), 1),
12896
12892
  ee.value ? (h(), Se(Tt, {
12897
12893
  key: 0,
12898
12894
  variant: O(Er)(ee.value.status)
@@ -12901,7 +12897,7 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12901
12897
  Ke(I(O(Ar)(ee.value.status)), 1)
12902
12898
  ]),
12903
12899
  _: 1
12904
- }, 8, ["variant"])) : U("", !0),
12900
+ }, 8, ["variant"])) : j("", !0),
12905
12901
  W(De, {
12906
12902
  name: "expand_more",
12907
12903
  color: "typo-secondary",
@@ -12915,10 +12911,10 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12915
12911
  title: "Rename session",
12916
12912
  "aria-label": "Rename session",
12917
12913
  onClick: z[1] || (z[1] = (P) => Ze(ee.value))
12918
- })) : U("", !0),
12919
- O(n).readOnly ? U("", !0) : (h(), Se(Tt, {
12914
+ })) : j("", !0),
12915
+ O(n).readOnly ? j("", !0) : (h(), Se(Tt, {
12920
12916
  key: 1,
12921
- variant: O(Pm)(O(n).status),
12917
+ variant: O(Om)(O(n).status),
12922
12918
  class: "min-w-0 max-w-[240px]"
12923
12919
  }, {
12924
12920
  default: gt(() => [
@@ -12926,13 +12922,13 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12926
12922
  key: 0,
12927
12923
  size: "md",
12928
12924
  color: "system-warning-300"
12929
- })) : U("", !0),
12930
- f("span", rg, I(O(n).statusText), 1)
12925
+ })) : j("", !0),
12926
+ f("span", ng, I(O(n).statusText), 1)
12931
12927
  ]),
12932
12928
  _: 1
12933
12929
  }, 8, ["variant"]))
12934
12930
  ]),
12935
- f("div", sg, [
12931
+ f("div", rg, [
12936
12932
  ee.value ? (h(), _("button", {
12937
12933
  key: 0,
12938
12934
  type: "button",
@@ -12946,12 +12942,12 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12946
12942
  key: 0,
12947
12943
  size: "md",
12948
12944
  color: "neutral-gray-300"
12949
- })) : U("", !0),
12950
- f("span", ag, I(me.value), 1)
12945
+ })) : j("", !0),
12946
+ f("span", sg, I(me.value), 1)
12951
12947
  ]),
12952
12948
  _: 1
12953
12949
  }, 8, ["variant"])
12954
- ])) : U("", !0),
12950
+ ])) : j("", !0),
12955
12951
  ee.value && ee.value.status === "active" ? (h(), Se(G, {
12956
12952
  key: 1,
12957
12953
  icon: "save",
@@ -12960,7 +12956,7 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12960
12956
  loading: O(r).checkpointBusy,
12961
12957
  disabled: O(n).agentBusy || O(n).checkpointSaving || O(r).checkpointBusy,
12962
12958
  onClick: Ge
12963
- }, null, 8, ["loading", "disabled"])) : U("", !0),
12959
+ }, null, 8, ["loading", "disabled"])) : j("", !0),
12964
12960
  ee.value && ee.value.status === "active" ? (h(), Se(G, {
12965
12961
  key: 2,
12966
12962
  icon: "build",
@@ -12969,23 +12965,23 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12969
12965
  disabled: !re.value,
12970
12966
  loading: O(r).busy,
12971
12967
  onClick: tt
12972
- }, null, 8, ["disabled", "loading"])) : U("", !0)
12968
+ }, null, 8, ["disabled", "loading"])) : j("", !0)
12973
12969
  ]),
12974
12970
  $.value ? (h(), _(Te, { key: 0 }, [
12975
12971
  f("div", {
12976
12972
  class: "fixed inset-0 z-10",
12977
12973
  onClick: z[2] || (z[2] = (P) => $.value = !1)
12978
12974
  }),
12979
- f("div", ig, [
12975
+ f("div", ag, [
12980
12976
  (h(!0), _(Te, null, Re(O(r).sessions, (P) => (h(), _("button", {
12981
12977
  key: P.id,
12982
12978
  type: "button",
12983
12979
  class: Ae(["flex w-full cursor-pointer items-center gap-8 border-0 bg-transparent px-[12px] py-[8px] text-left hover:bg-fm-color-neutral-gray-100", P.id === O(n).workspaceSessionId ? "bg-fm-color-primary-oats" : ""]),
12984
12980
  onClick: (lt) => oe(P)
12985
12981
  }, [
12986
- f("div", lg, [
12987
- f("div", cg, I(se(P)), 1),
12988
- f("div", ug, I(he(P.updated_at)), 1)
12982
+ f("div", og, [
12983
+ f("div", lg, I(se(P)), 1),
12984
+ f("div", cg, I(he(P.updated_at)), 1)
12989
12985
  ]),
12990
12986
  W(Tt, {
12991
12987
  variant: O(Er)(P.status)
@@ -12995,13 +12991,13 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
12995
12991
  ]),
12996
12992
  _: 2
12997
12993
  }, 1032, ["variant"])
12998
- ], 10, og))), 128)),
12999
- O(r).sessions.length ? U("", !0) : (h(), _("div", dg, " No sessions yet. "))
12994
+ ], 10, ig))), 128)),
12995
+ O(r).sessions.length ? j("", !0) : (h(), _("div", ug, " No sessions yet. "))
13000
12996
  ])
13001
- ], 64)) : U("", !0)
12997
+ ], 64)) : j("", !0)
13002
12998
  ]),
13003
- C.value && ee.value ? (h(), _("section", pg, [
13004
- f("div", fg, [
12999
+ C.value && ee.value ? (h(), _("section", dg, [
13000
+ f("div", pg, [
13005
13001
  z[6] || (z[6] = f("div", { class: "min-w-0" }, [
13006
13002
  f("p", { class: "m-0 fm-typo-en-body-md-600 text-fm-color-typo-primary" }, "Checkpoint history"),
13007
13003
  f("p", { class: "m-0 mt-2 fm-typo-en-body-xs-400 text-fm-color-typo-secondary" }, " Code and agent context are tracked separately. Restoring code creates a new commit on main. ")
@@ -13013,15 +13009,15 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13013
13009
  onClick: z[3] || (z[3] = (P) => ie(!0))
13014
13010
  }, null, 8, ["loading"])
13015
13011
  ]),
13016
- (Zt = O(r).workspaceState) != null && Zt.checkpointError || O(n).checkpointError ? (h(), _("div", hg, I((($t = O(r).workspaceState) == null ? void 0 : $t.checkpointError) || O(n).checkpointError), 1)) : U("", !0),
13017
- O(r).checkpoints.length ? (h(), _("div", mg, [
13012
+ (Zt = O(r).workspaceState) != null && Zt.checkpointError || O(n).checkpointError ? (h(), _("div", fg, I((($t = O(r).workspaceState) == null ? void 0 : $t.checkpointError) || O(n).checkpointError), 1)) : j("", !0),
13013
+ O(r).checkpoints.length ? (h(), _("div", hg, [
13018
13014
  (h(!0), _(Te, null, Re(O(r).checkpoints, (P) => (h(), _("div", {
13019
13015
  key: P.id,
13020
13016
  class: "flex items-center justify-between gap-16 px-16 py-10"
13021
13017
  }, [
13022
- f("div", gg, [
13023
- f("div", bg, [
13024
- f("span", yg, I(ht(P)), 1),
13018
+ f("div", mg, [
13019
+ f("div", gg, [
13020
+ f("span", bg, I(ht(P)), 1),
13025
13021
  W(Tt, {
13026
13022
  variant: vt(P),
13027
13023
  size: "sm"
@@ -13041,14 +13037,14 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13041
13037
  _: 2
13042
13038
  }, 1032, ["variant"])
13043
13039
  ]),
13044
- f("div", vg, [
13040
+ f("div", yg, [
13045
13041
  f("span", null, I(he(P.created_at)), 1),
13046
- f("span", xg, I(P.id), 1),
13047
- P.verified_remote_sha ? (h(), _("span", _g, I(P.verified_remote_sha.slice(0, 7)), 1)) : U("", !0),
13048
- P.file_count ? (h(), _("span", wg, I(P.file_count) + " file" + I(P.file_count === 1 ? "" : "s") + " · +" + I(P.additions) + " −" + I(P.deletions), 1)) : U("", !0)
13042
+ f("span", vg, I(P.id), 1),
13043
+ P.verified_remote_sha ? (h(), _("span", xg, I(P.verified_remote_sha.slice(0, 7)), 1)) : j("", !0),
13044
+ P.file_count ? (h(), _("span", _g, I(P.file_count) + " file" + I(P.file_count === 1 ? "" : "s") + " · +" + I(P.additions) + " −" + I(P.deletions), 1)) : j("", !0)
13049
13045
  ]),
13050
- P.summary ? (h(), _("p", kg, I(P.summary), 1)) : U("", !0),
13051
- P.error_message ? (h(), _("p", Sg, I(P.error_stage) + ": " + I(P.error_message), 1)) : U("", !0)
13046
+ P.summary ? (h(), _("p", wg, I(P.summary), 1)) : j("", !0),
13047
+ P.error_message ? (h(), _("p", kg, I(P.error_stage) + ": " + I(P.error_message), 1)) : j("", !0)
13052
13048
  ]),
13053
13049
  W(G, {
13054
13050
  label: "Restore",
@@ -13058,26 +13054,26 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13058
13054
  onClick: (lt) => q(P)
13059
13055
  }, null, 8, ["disabled", "onClick"])
13060
13056
  ]))), 128))
13061
- ])) : (h(), _("div", Tg, " No checkpoints yet. Save manually or complete an agent turn to create one. "))
13062
- ])) : U("", !0),
13063
- O(n).readOnly && O(n).workspaceSessionId ? (h(), _("div", Eg, [
13064
- f("span", Ag, I(M.value ? "This session was archived after being idle. Resume it to keep working with the agent." : "You are viewing an archived session. Resume it to continue working with the agent."), 1),
13057
+ ])) : (h(), _("div", Sg, " No checkpoints yet. Save manually or complete an agent turn to create one. "))
13058
+ ])) : j("", !0),
13059
+ O(n).readOnly && O(n).workspaceSessionId ? (h(), _("div", Tg, [
13060
+ f("span", Eg, I(M.value ? "This session was archived after being idle. Resume it to keep working with the agent." : "You are viewing an archived session. Resume it to continue working with the agent."), 1),
13065
13061
  W(G, {
13066
13062
  label: "Resume session",
13067
13063
  icon: "restart_alt",
13068
13064
  loading: O(r).busy,
13069
13065
  onClick: Be
13070
13066
  }, null, 8, ["loading"])
13071
- ])) : U("", !0),
13067
+ ])) : j("", !0),
13072
13068
  f("div", {
13073
13069
  ref_key: "workspaceSplitEl",
13074
13070
  ref: u,
13075
13071
  class: "workspace__split relative flex min-h-0 min-w-0 flex-1",
13076
13072
  style: Pt(ue.value)
13077
13073
  }, [
13078
- v.value ? (h(), _("div", Cg)) : U("", !0),
13079
- j.value ? (h(), _("div", $g, [
13080
- f("div", Rg, [
13074
+ v.value ? (h(), _("div", Ag)) : j("", !0),
13075
+ U.value ? (h(), _("div", Cg, [
13076
+ f("div", $g, [
13081
13077
  W(De, {
13082
13078
  name: "pause_circle",
13083
13079
  size: "xl",
@@ -13092,7 +13088,7 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13092
13088
  onClick: g
13093
13089
  }, null, 8, ["loading"])
13094
13090
  ])
13095
- ])) : U("", !0),
13091
+ ])) : j("", !0),
13096
13092
  W(tp, {
13097
13093
  chat: O(n),
13098
13094
  class: "workspace__chat shrink-0"
@@ -13111,19 +13107,19 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13111
13107
  }, [...z[9] || (z[9] = [
13112
13108
  f("span", { class: "w-px bg-fm-color-neutral-gray-100 transition group-hover:bg-fm-color-primary group-focus-visible:bg-fm-color-primary" }, null, -1),
13113
13109
  f("span", { class: "pointer-events-none absolute inset-y-0 left-1/2 hidden w-[3px] -translate-x-1/2 rounded-full bg-fm-color-primary opacity-20 group-hover:block group-focus-visible:block" }, null, -1)
13114
- ])], 40, Ig),
13115
- W(Sh, {
13110
+ ])], 40, Rg),
13111
+ W(kh, {
13116
13112
  chat: O(n),
13117
13113
  class: "min-w-0 flex-1"
13118
13114
  }, null, 8, ["chat"])
13119
13115
  ], 4)
13120
- ])) : o.value === "releases" ? (h(), _("main", Ng, [
13121
- f("header", Og, [
13116
+ ])) : o.value === "releases" ? (h(), _("main", Ig, [
13117
+ f("header", Ng, [
13122
13118
  z[10] || (z[10] = f("div", { class: "min-w-0" }, [
13123
13119
  f("h2", { class: "m-0 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, "Releases"),
13124
13120
  f("p", { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Build from the active session, preview the release, then publish when it is ready. ")
13125
13121
  ], -1)),
13126
- f("div", Pg, [
13122
+ f("div", Og, [
13127
13123
  W(G, {
13128
13124
  label: "Open live app",
13129
13125
  icon: "open_in_new",
@@ -13140,18 +13136,18 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13140
13136
  }, null, 8, ["disabled", "loading"])
13141
13137
  ])
13142
13138
  ]),
13143
- f("div", Mg, [
13144
- f("section", Lg, [
13139
+ f("div", Pg, [
13140
+ f("section", Mg, [
13145
13141
  z[12] || (z[12] = f("div", { class: "border-b border-fm-color-neutral-gray-100 px-16 py-12" }, [
13146
13142
  f("h3", { class: "m-0 fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, "Latest release")
13147
13143
  ], -1)),
13148
- f("div", Dg, [
13149
- f("div", zg, [
13150
- f("div", Bg, [
13151
- f("p", Fg, I(Ce.value), 1),
13152
- f("p", Ug, I(V.value), 1)
13144
+ f("div", Lg, [
13145
+ f("div", Dg, [
13146
+ f("div", zg, [
13147
+ f("p", Bg, I(Ce.value), 1),
13148
+ f("p", Fg, I(V.value), 1)
13153
13149
  ]),
13154
- f("div", jg, [
13150
+ f("div", Ug, [
13155
13151
  ((Je = O(r).latestRelease) == null ? void 0 : Je.id) === ((vn = we.value) == null ? void 0 : vn.id) ? (h(), Se(Tt, {
13156
13152
  key: 0,
13157
13153
  variant: "primary",
@@ -13161,19 +13157,19 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13161
13157
  Ke(" Live ", -1)
13162
13158
  ])]),
13163
13159
  _: 1
13164
- })) : U("", !0),
13160
+ })) : j("", !0),
13165
13161
  W(Tt, {
13166
- variant: O(Cm)(Q.value),
13162
+ variant: O(Am)(Q.value),
13167
13163
  size: "sm"
13168
13164
  }, {
13169
13165
  default: gt(() => [
13170
- Ke(I(O($m)(Q.value)), 1)
13166
+ Ke(I(O(Cm)(Q.value)), 1)
13171
13167
  ]),
13172
13168
  _: 1
13173
13169
  }, 8, ["variant"])
13174
13170
  ])
13175
13171
  ]),
13176
- f("div", Hg, [
13172
+ f("div", jg, [
13177
13173
  W(G, {
13178
13174
  label: O(r).latestRelease ? K(O(r).latestRelease) : "Set live",
13179
13175
  icon: "publish",
@@ -13194,18 +13190,18 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13194
13190
  icon: "open_in_new",
13195
13191
  variant: "tertiary",
13196
13192
  onClick: ke
13197
- })) : U("", !0)
13193
+ })) : j("", !0)
13198
13194
  ])
13199
13195
  ])
13200
13196
  ]),
13201
- f("section", Gg, [
13202
- f("div", Wg, [
13197
+ f("section", Hg, [
13198
+ f("div", Gg, [
13203
13199
  z[14] || (z[14] = f("h3", { class: "m-0 fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, "Recent releases", -1)),
13204
- f("div", Kg, [
13205
- we.value ? (h(), _("div", Vg, [
13200
+ f("div", Wg, [
13201
+ we.value ? (h(), _("div", Kg, [
13206
13202
  z[13] || (z[13] = Ke(" Live: ", -1)),
13207
- f("span", qg, I(we.value.id), 1)
13208
- ])) : U("", !0),
13203
+ f("span", Vg, I(we.value.id), 1)
13204
+ ])) : j("", !0),
13209
13205
  W(G, {
13210
13206
  label: "Refresh",
13211
13207
  icon: "refresh",
@@ -13215,7 +13211,7 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13215
13211
  }, null, 8, ["loading"])
13216
13212
  ])
13217
13213
  ]),
13218
- O(r).releases.length === 0 ? (h(), _("div", Zg, [
13214
+ O(r).releases.length === 0 ? (h(), _("div", qg, [
13219
13215
  W(De, {
13220
13216
  name: "rocket_launch",
13221
13217
  size: "xl",
@@ -13223,7 +13219,7 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13223
13219
  }),
13224
13220
  z[15] || (z[15] = f("p", { class: "m-0 fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, "No releases yet", -1)),
13225
13221
  z[16] || (z[16] = f("p", { class: "m-0 fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, " Build from the active session to create a release you can preview and publish. ", -1))
13226
- ])) : (h(), _("div", Yg, [
13222
+ ])) : (h(), _("div", Zg, [
13227
13223
  (h(!0), _(Te, null, Re(O(r).releases, (P) => (h(), _("div", {
13228
13224
  key: P.id,
13229
13225
  class: Ae(["flex items-center gap-16 px-16 py-12", E(P)])
@@ -13233,8 +13229,8 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13233
13229
  class: "min-w-0 flex-1 cursor-pointer border-0 bg-transparent p-0 text-left",
13234
13230
  onClick: (lt) => Dt(P)
13235
13231
  }, [
13236
- f("div", Jg, [
13237
- f("span", Qg, [
13232
+ f("div", Xg, [
13233
+ f("span", Jg, [
13238
13234
  W(De, {
13239
13235
  name: "space_dashboard",
13240
13236
  color: "typo-tertiary",
@@ -13243,22 +13239,22 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13243
13239
  Ke(" " + I(P.session_title || "Manual release"), 1)
13244
13240
  ]),
13245
13241
  W(Tt, {
13246
- variant: O(Om)(P),
13242
+ variant: O(Nm)(P),
13247
13243
  size: "sm"
13248
13244
  }, {
13249
13245
  default: gt(() => [
13250
- Ke(I(O(Nm)(P)), 1)
13246
+ Ke(I(O(Im)(P)), 1)
13251
13247
  ]),
13252
13248
  _: 2
13253
13249
  }, 1032, ["variant"])
13254
13250
  ]),
13255
- f("div", eb, [
13251
+ f("div", Qg, [
13256
13252
  f("span", null, I(he(P.created_at)), 1),
13257
- f("span", tb, I(P.id), 1),
13258
- f("span", nb, I(P.source_commit_sha.slice(0, 7)), 1)
13253
+ f("span", eb, I(P.id), 1),
13254
+ f("span", tb, I(P.source_commit_sha.slice(0, 7)), 1)
13259
13255
  ])
13260
- ], 8, Xg),
13261
- f("div", rb, [
13256
+ ], 8, Yg),
13257
+ f("div", nb, [
13262
13258
  W(G, {
13263
13259
  icon: "open_in_new",
13264
13260
  variant: "tertiary",
@@ -13277,13 +13273,13 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13277
13273
  icon: "receipt_long",
13278
13274
  variant: "tertiary",
13279
13275
  onClick: (lt) => R(P)
13280
- }, null, 8, ["onClick"])) : U("", !0)
13276
+ }, null, 8, ["onClick"])) : j("", !0)
13281
13277
  ])
13282
13278
  ], 2))), 128))
13283
13279
  ]))
13284
13280
  ]),
13285
- f("section", sb, [
13286
- f("div", ab, [
13281
+ f("section", rb, [
13282
+ f("div", sb, [
13287
13283
  z[17] || (z[17] = f("div", { class: "min-w-0" }, [
13288
13284
  f("h3", { class: "m-0 fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, "Fallback"),
13289
13285
  f("p", { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Restore the merchant back to the current v1 miniprogram. ")
@@ -13299,8 +13295,8 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13299
13295
  ])
13300
13296
  ])
13301
13297
  ])
13302
- ])) : (h(), _("main", ib, [
13303
- f("header", ob, [
13298
+ ])) : (h(), _("main", ab, [
13299
+ f("header", ib, [
13304
13300
  z[18] || (z[18] = f("div", { class: "min-w-0" }, [
13305
13301
  f("h2", { class: "m-0 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, "Sessions"),
13306
13302
  f("p", { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Switch between active and archived sessions without exposing internal identifiers. ")
@@ -13313,7 +13309,7 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13313
13309
  onClick: le
13314
13310
  }, null, 8, ["disabled", "loading"])
13315
13311
  ]),
13316
- f("div", lb, [
13312
+ f("div", ob, [
13317
13313
  (h(!0), _(Te, null, Re(O(r).sessions, (P) => (h(), _("div", {
13318
13314
  key: P.id,
13319
13315
  role: "button",
@@ -13322,9 +13318,9 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13322
13318
  onClick: (lt) => oe(P),
13323
13319
  onKeydown: ji((lt) => oe(P), ["enter"])
13324
13320
  }, [
13325
- f("div", ub, [
13326
- f("div", db, [
13327
- f("span", pb, I(se(P)), 1),
13321
+ f("div", cb, [
13322
+ f("div", ub, [
13323
+ f("span", db, I(se(P)), 1),
13328
13324
  P.has_live_release ? (h(), Se(Tt, {
13329
13325
  key: 0,
13330
13326
  variant: "primary",
@@ -13343,16 +13339,16 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13343
13339
  Ke(I(P.release_count) + " release" + I(P.release_count > 1 ? "s" : ""), 1)
13344
13340
  ]),
13345
13341
  _: 2
13346
- }, 1024)) : U("", !0)
13342
+ }, 1024)) : j("", !0)
13347
13343
  ]),
13348
- f("div", fb, [
13344
+ f("div", pb, [
13349
13345
  f("span", null, "Updated " + I(he(P.updated_at)), 1),
13350
- P.last_durable_commit_sha ? (h(), _("span", hb, " Saved " + I(P.last_durable_commit_sha.slice(0, 7)), 1)) : U("", !0),
13351
- P.checkpoint_status === "local_only" || P.checkpoint_status === "failed" ? (h(), _("span", mb, " Save incomplete ")) : U("", !0)
13346
+ P.last_durable_commit_sha ? (h(), _("span", fb, " Saved " + I(P.last_durable_commit_sha.slice(0, 7)), 1)) : j("", !0),
13347
+ P.checkpoint_status === "local_only" || P.checkpoint_status === "failed" ? (h(), _("span", hb, " Save incomplete ")) : j("", !0)
13352
13348
  ]),
13353
- P.status === "needs_attention" && P.attention_error ? (h(), _("div", gb, I(P.attention_action) + ": " + I(P.attention_error), 1)) : U("", !0)
13349
+ P.status === "needs_attention" && P.attention_error ? (h(), _("div", mb, I(P.attention_action) + ": " + I(P.attention_error), 1)) : j("", !0)
13354
13350
  ]),
13355
- f("div", bb, [
13351
+ f("div", gb, [
13356
13352
  W(Tt, {
13357
13353
  variant: O(Er)(P.status)
13358
13354
  }, {
@@ -13372,15 +13368,15 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13372
13368
  variant: "tertiary",
13373
13369
  disabled: O(r).busy,
13374
13370
  onClick: Zn((lt) => ve(P), ["stop"])
13375
- }, null, 8, ["disabled", "onClick"])) : U("", !0),
13371
+ }, null, 8, ["disabled", "onClick"])) : j("", !0),
13376
13372
  W(De, {
13377
13373
  name: "chevron_right",
13378
13374
  color: "typo-secondary",
13379
13375
  size: "md"
13380
13376
  })
13381
13377
  ])
13382
- ], 42, cb))), 128)),
13383
- O(r).sessions.length ? U("", !0) : (h(), _("div", yb, [
13378
+ ], 42, lb))), 128)),
13379
+ O(r).sessions.length ? j("", !0) : (h(), _("div", bb, [
13384
13380
  W(De, {
13385
13381
  name: "history",
13386
13382
  size: "xl",
@@ -13398,8 +13394,8 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13398
13394
  }, null, 8, ["disabled", "loading"])
13399
13395
  ]))
13400
13396
  ])
13401
- ])) : (h(), _("main", Gm, [
13402
- f("header", Wm, [
13397
+ ])) : (h(), _("main", Hm, [
13398
+ f("header", Gm, [
13403
13399
  z[5] || (z[5] = f("div", { class: "min-w-0" }, [
13404
13400
  f("h2", { class: "m-0 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, "Set up v2 project"),
13405
13401
  f("p", { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Create the merchant app repository and prepare live previews. Live traffic stays on v1 until a release is published. ")
@@ -13411,12 +13407,12 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13411
13407
  onClick: de
13412
13408
  }, null, 8, ["loading"])
13413
13409
  ]),
13414
- f("div", Km, [
13415
- f("section", Vm, [
13416
- f("div", qm, [
13417
- f("div", Zm, [
13418
- f("p", Ym, I(((mt = O(r).project) == null ? void 0 : mt.provisioningStatus) === "failed" ? "Setup failed" : "Project is not set up yet"), 1),
13419
- f("p", Xm, I(((Ut = O(r).project) == null ? void 0 : Ut.repoName) ?? "miniprogram repository"), 1)
13410
+ f("div", Wm, [
13411
+ f("section", Km, [
13412
+ f("div", Vm, [
13413
+ f("div", qm, [
13414
+ f("p", Zm, I(((mt = O(r).project) == null ? void 0 : mt.provisioningStatus) === "failed" ? "Setup failed" : "Project is not set up yet"), 1),
13415
+ f("p", Ym, I(((Ut = O(r).project) == null ? void 0 : Ut.repoName) ?? "miniprogram repository"), 1)
13420
13416
  ]),
13421
13417
  W(Tt, {
13422
13418
  variant: O(r).provisioningFailed ? "error" : "neutral"
@@ -13424,20 +13420,20 @@ const Lm = ["aria-label", "title"], Dm = { class: "flex flex-col gap-[4px]" }, z
13424
13420
  default: gt(() => {
13425
13421
  var P;
13426
13422
  return [
13427
- Ke(I(O(Rm)((P = O(r).project) == null ? void 0 : P.provisioningStatus)), 1)
13423
+ Ke(I(O($m)((P = O(r).project) == null ? void 0 : P.provisioningStatus)), 1)
13428
13424
  ];
13429
13425
  }),
13430
13426
  _: 1
13431
13427
  }, 8, ["variant"])
13432
13428
  ]),
13433
- L.value ? (h(), _("p", Jm, I(L.value), 1)) : U("", !0)
13429
+ L.value ? (h(), _("p", Xm, I(L.value), 1)) : j("", !0)
13434
13430
  ])
13435
13431
  ])
13436
13432
  ]))
13437
13433
  ], 2);
13438
13434
  };
13439
13435
  }
13440
- }), Cb = /* @__PURE__ */ Mt(wb, [["__scopeId", "data-v-7c371ce3"]]);
13436
+ }), Ab = /* @__PURE__ */ Mt(_b, [["__scopeId", "data-v-7c371ce3"]]);
13441
13437
  export {
13442
- Cb as default
13438
+ Ab as default
13443
13439
  };