page-agent-sdk 4.24.0 → 4.24.2

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.
@@ -431,17 +431,17 @@ function te(e, t = {}) {
431
431
  ...e.extraBody ? { modelKwargs: e.extraBody } : {}
432
432
  });
433
433
  }
434
- function P(e) {
434
+ function ne(e) {
435
435
  return e.some((e, t) => t > 0 && e.getType() === "system") ? e.map((e, t) => t === 0 || e.getType() !== "system" ? e : new i({ content: typeof e.content == "string" ? `〔系统注记〕\n${e.content}` : e.content })) : e;
436
436
  }
437
- function F(e) {
438
- let t = e, n = (e) => Array.isArray(e) ? P(e) : e, r = t.invoke.bind(e), i = t.stream.bind(e);
437
+ function P(e) {
438
+ let t = e, n = (e) => Array.isArray(e) ? ne(e) : e, r = t.invoke.bind(e), i = t.stream.bind(e);
439
439
  return t.invoke = async (e, t) => r(n(e), t), t.stream = async (e, t) => i(n(e), t), e;
440
440
  }
441
- async function I(e, t = {}) {
441
+ async function F(e, t = {}) {
442
442
  if (e = j(e, M(e, t.thinkingMode, t.thinkingFallback)), (e.provider ?? "openai") === "openai") return te(e, t);
443
443
  let { ChatAnthropic: n } = await import("@langchain/anthropic");
444
- return F(new n({
444
+ return P(new n({
445
445
  apiKey: e.apiKey,
446
446
  model: e.model,
447
447
  temperature: e.thinking ? 1 : t.temperature ?? e.temperature,
@@ -458,15 +458,15 @@ async function I(e, t = {}) {
458
458
  }
459
459
  //#endregion
460
460
  //#region src/core/utils/contentParts.ts
461
- function ne(e) {
461
+ function re(e) {
462
462
  let t = e.content;
463
463
  return typeof t == "string" ? t : Array.isArray(t) ? t.map((e) => typeof e == "string" ? e : e?.type === "text" && typeof e.text == "string" ? e.text : "").join("") : "";
464
464
  }
465
- function re(e) {
465
+ function ie(e) {
466
466
  let t = e.additional_kwargs || {}, n = t.reasoning_content || t.reasoning || "";
467
467
  return !n && Array.isArray(e.content) && (n = e.content.map((e) => e?.type === "thinking" ? e.thinking ?? "" : e?.type === "thinking_delta" ? e.delta ?? e.thinking ?? "" : "").join("")), n;
468
468
  }
469
- function ie(e) {
469
+ function ae(e) {
470
470
  let t = e, n = [
471
471
  t?.additional_kwargs?.usage,
472
472
  t?.usage_metadata,
@@ -474,9 +474,9 @@ function ie(e) {
474
474
  t?.response_metadata?.token_usage,
475
475
  t?.response_metadata?.tokenUsage
476
476
  ];
477
- for (let e of n) if (e && typeof e == "object" && ae(e)) return e;
477
+ for (let e of n) if (e && typeof e == "object" && oe(e)) return e;
478
478
  }
479
- function ae(e) {
479
+ function oe(e) {
480
480
  return [
481
481
  "prompt_tokens",
482
482
  "completion_tokens",
@@ -490,8 +490,8 @@ function ae(e) {
490
490
  "outputTokens"
491
491
  ].some((t) => typeof e[t] == "number" && e[t] > 0);
492
492
  }
493
- function oe(e) {
494
- let t = ie(e);
493
+ function se(e) {
494
+ let t = ae(e);
495
495
  if (!t || typeof t != "object") return null;
496
496
  let n = t, r = Number(n.prompt_tokens ?? n.promptTokens ?? n.input_tokens ?? n.inputTokens ?? 0) || 0, i = Number(n.completion_tokens ?? n.completionTokens ?? n.output_tokens ?? n.outputTokens ?? 0) || 0, a = Number(n.total_tokens ?? n.totalTokens ?? r + i) || 0;
497
497
  if (!r && !i && !a) return null;
@@ -508,15 +508,15 @@ function oe(e) {
508
508
  //#endregion
509
509
  //#region node_modules/@vue/shared/dist/shared.esm-bundler.js
510
510
  // @__NO_SIDE_EFFECTS__
511
- function se(e) {
511
+ function ce(e) {
512
512
  let t = /* @__PURE__ */ Object.create(null);
513
513
  for (let n of e.split(",")) t[n] = 1;
514
514
  return (e) => e in t;
515
515
  }
516
- var ce = process.env.NODE_ENV === "production" ? {} : Object.freeze({}), L = process.env.NODE_ENV === "production" ? [] : Object.freeze([]), R = () => {}, le = () => !1, ue = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), de = (e) => e.startsWith("onUpdate:"), fe = Object.assign, pe = (e, t) => {
516
+ var le = process.env.NODE_ENV === "production" ? {} : Object.freeze({}), I = process.env.NODE_ENV === "production" ? [] : Object.freeze([]), L = () => {}, ue = () => !1, de = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), fe = (e) => e.startsWith("onUpdate:"), R = Object.assign, pe = (e, t) => {
517
517
  let n = e.indexOf(t);
518
518
  n > -1 && e.splice(n, 1);
519
- }, me = Object.prototype.hasOwnProperty, z = (e, t) => me.call(e, t), B = Array.isArray, V = (e) => xe(e) === "[object Map]", he = (e) => xe(e) === "[object Set]", ge = (e) => xe(e) === "[object Date]", H = (e) => typeof e == "function", _e = (e) => typeof e == "string", ve = (e) => typeof e == "symbol", U = (e) => typeof e == "object" && !!e, ye = (e) => (U(e) || H(e)) && H(e.then) && H(e.catch), be = Object.prototype.toString, xe = (e) => be.call(e), Se = (e) => xe(e).slice(8, -1), Ce = (e) => xe(e) === "[object Object]", we = (e) => _e(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Te = /* @__PURE__ */ se(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"), Ee = /* @__PURE__ */ se("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"), De = (e) => {
519
+ }, me = Object.prototype.hasOwnProperty, z = (e, t) => me.call(e, t), B = Array.isArray, V = (e) => xe(e) === "[object Map]", he = (e) => xe(e) === "[object Set]", ge = (e) => xe(e) === "[object Date]", H = (e) => typeof e == "function", _e = (e) => typeof e == "string", ve = (e) => typeof e == "symbol", U = (e) => typeof e == "object" && !!e, ye = (e) => (U(e) || H(e)) && H(e.then) && H(e.catch), be = Object.prototype.toString, xe = (e) => be.call(e), Se = (e) => xe(e).slice(8, -1), Ce = (e) => xe(e) === "[object Object]", we = (e) => _e(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Te = /* @__PURE__ */ ce(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"), Ee = /* @__PURE__ */ ce("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"), De = (e) => {
520
520
  let t = /* @__PURE__ */ Object.create(null);
521
521
  return ((n) => t[n] || (t[n] = e(n)));
522
522
  }, Oe = /-\w/g, ke = De((e) => e.replace(Oe, (e) => e.slice(1).toUpperCase())), Ae = /\B([A-Z])/g, je = De((e) => e.replace(Ae, "-$1").toLowerCase()), Me = De((e) => e.charAt(0).toUpperCase() + e.slice(1)), Ne = De((e) => e ? `on${Me(e)}` : ""), Pe = (e, t) => !Object.is(e, t), Fe = (e, ...t) => {
@@ -565,7 +565,7 @@ function Ke(e) {
565
565
  else if (U(e)) for (let n in e) e[n] && (t += n + " ");
566
566
  return t.trim();
567
567
  }
568
- var qe = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot", Je = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view", Ye = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics", Xe = /* @__PURE__ */ se(qe), Ze = /* @__PURE__ */ se(Je), Qe = /* @__PURE__ */ se(Ye), $e = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly", et = /* @__PURE__ */ se($e);
568
+ var qe = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot", Je = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view", Ye = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics", Xe = /* @__PURE__ */ ce(qe), Ze = /* @__PURE__ */ ce(Je), Qe = /* @__PURE__ */ ce(Ye), $e = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly", et = /* @__PURE__ */ ce($e);
569
569
  $e + "";
570
570
  function tt(e) {
571
571
  return !!e || e === "";
@@ -825,7 +825,7 @@ var Mt = 0, Nt = class {
825
825
  let e = t.nextDep;
826
826
  e.prevDep = t.prevDep, t.prevDep && (t.prevDep.nextDep = e), t.prevDep = ft.depsTail, t.nextDep = void 0, ft.depsTail.nextDep = t, ft.depsTail = t, ft.deps === t && (ft.deps = e);
827
827
  }
828
- return process.env.NODE_ENV !== "production" && ft.onTrack && ft.onTrack(fe({ effect: ft }, e)), t;
828
+ return process.env.NODE_ENV !== "production" && ft.onTrack && ft.onTrack(R({ effect: ft }, e)), t;
829
829
  }
830
830
  trigger(e) {
831
831
  this.version++, Mt++, this.notify(e);
@@ -833,7 +833,7 @@ var Mt = 0, Nt = class {
833
833
  notify(e) {
834
834
  yt();
835
835
  try {
836
- if (process.env.NODE_ENV !== "production") for (let t = this.subsHead; t; t = t.nextSub) t.sub.onTrigger && !(t.sub.flags & 8) && t.sub.onTrigger(fe({ effect: t.sub }, e));
836
+ if (process.env.NODE_ENV !== "production") for (let t = this.subsHead; t; t = t.nextSub) t.sub.onTrigger && !(t.sub.flags & 8) && t.sub.onTrigger(R({ effect: t.sub }, e));
837
837
  for (let e = this.subs; e; e = e.prevSub) e.sub.notify() && e.sub.dep.notify();
838
838
  } finally {
839
839
  bt();
@@ -1040,7 +1040,7 @@ function Zt(e, t, n = []) {
1040
1040
  let r = (/* @__PURE__ */ Nn(e))[t].apply(e, n);
1041
1041
  return bt(), At(), r;
1042
1042
  }
1043
- var Qt = /* @__PURE__ */ se("__proto__,__v_isRef,__isVue"), $t = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(ve));
1043
+ var Qt = /* @__PURE__ */ ce("__proto__,__v_isRef,__isVue"), $t = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(ve));
1044
1044
  function en(e) {
1045
1045
  ve(e) || (e = String(e));
1046
1046
  let t = /* @__PURE__ */ Nn(this);
@@ -1109,7 +1109,7 @@ var tn = class {
1109
1109
  function dn(e, t, n) {
1110
1110
  return function(...r) {
1111
1111
  let i = this.__v_raw, a = /* @__PURE__ */ Nn(i), o = V(a), s = e === "entries" || e === Symbol.iterator && o, c = e === "keys" && o, l = i[e](...r), u = n ? ln : t ? In : Fn;
1112
- return !t && Bt(a, "iterate", c ? Rt : Lt), fe(Object.create(l), { next() {
1112
+ return !t && Bt(a, "iterate", c ? Rt : Lt), R(Object.create(l), { next() {
1113
1113
  let { value: e, done: t } = l.next();
1114
1114
  return t ? {
1115
1115
  value: e,
@@ -1121,7 +1121,7 @@ function dn(e, t, n) {
1121
1121
  } });
1122
1122
  };
1123
1123
  }
1124
- function G(e) {
1124
+ function fn(e) {
1125
1125
  return function(...t) {
1126
1126
  if (process.env.NODE_ENV !== "production") {
1127
1127
  let n = t[0] ? `on key "${t[0]}" ` : "";
@@ -1130,7 +1130,7 @@ function G(e) {
1130
1130
  return e === "delete" ? !1 : e === "clear" ? void 0 : this;
1131
1131
  };
1132
1132
  }
1133
- function fn(e, t) {
1133
+ function pn(e, t) {
1134
1134
  let n = {
1135
1135
  get(n) {
1136
1136
  let r = this.__v_raw, i = /* @__PURE__ */ Nn(r), a = /* @__PURE__ */ Nn(n);
@@ -1153,11 +1153,11 @@ function fn(e, t) {
1153
1153
  return !e && Bt(o, "iterate", Lt), a.forEach((e, t) => n.call(r, s(e), s(t), i));
1154
1154
  }
1155
1155
  };
1156
- return fe(n, e ? {
1157
- add: G("add"),
1158
- set: G("set"),
1159
- delete: G("delete"),
1160
- clear: G("clear")
1156
+ return R(n, e ? {
1157
+ add: fn("add"),
1158
+ set: fn("set"),
1159
+ delete: fn("delete"),
1160
+ clear: fn("clear")
1161
1161
  } : {
1162
1162
  add(e) {
1163
1163
  let n = /* @__PURE__ */ Nn(this), r = un(n), i = /* @__PURE__ */ Nn(e), a = !t && !/* @__PURE__ */ jn(e) && !/* @__PURE__ */ An(e) ? i : e;
@@ -1189,11 +1189,11 @@ function fn(e, t) {
1189
1189
  n[r] = dn(r, e, t);
1190
1190
  }), n;
1191
1191
  }
1192
- function pn(e, t) {
1193
- let n = fn(e, t);
1192
+ function G(e, t) {
1193
+ let n = pn(e, t);
1194
1194
  return (t, r, i) => r === "__v_isReactive" ? !e : r === "__v_isReadonly" ? e : r === "__v_raw" ? t : Reflect.get(z(n, r) && r in t ? n : t, r, i);
1195
1195
  }
1196
- var mn = { get: /* @__PURE__ */ pn(!1, !1) }, hn = { get: /* @__PURE__ */ pn(!1, !0) }, gn = { get: /* @__PURE__ */ pn(!0, !1) }, _n = { get: /* @__PURE__ */ pn(!0, !0) };
1196
+ var mn = { get: /* @__PURE__ */ G(!1, !1) }, hn = { get: /* @__PURE__ */ G(!1, !0) }, gn = { get: /* @__PURE__ */ G(!0, !1) }, _n = { get: /* @__PURE__ */ G(!0, !0) };
1197
1197
  function vn(e, t, n) {
1198
1198
  let r = /* @__PURE__ */ Nn(n);
1199
1199
  if (r !== n && t.call(e, r)) {
@@ -1356,7 +1356,7 @@ function Xn(e, t = !1, n = Yn) {
1356
1356
  t || Jn.set(n, t = []), t.push(e);
1357
1357
  } else process.env.NODE_ENV !== "production" && !t && st("onWatcherCleanup() was called when there was no active watcher to associate with.");
1358
1358
  }
1359
- function Zn(e, t, n = ce) {
1359
+ function Zn(e, t, n = le) {
1360
1360
  let { immediate: r, deep: i, once: a, scheduler: o, augmentJob: s, call: c } = n, l = (e) => {
1361
1361
  (n.onWarn || st)("Invalid watch source: ", e, "A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.");
1362
1362
  }, u = (e) => i ? e : /* @__PURE__ */ jn(e) || i === !1 || i === 0 ? Qn(e, 1) : Qn(e), d, f, p, m, h = !1, g = !1;
@@ -1381,7 +1381,7 @@ function Zn(e, t, n = ce) {
1381
1381
  } finally {
1382
1382
  Yn = t;
1383
1383
  }
1384
- } : (f = R, process.env.NODE_ENV !== "production" && l(e)), t && i) {
1384
+ } : (f = L, process.env.NODE_ENV !== "production" && l(e)), t && i) {
1385
1385
  let e = f, t = i === !0 ? Infinity : i;
1386
1386
  f = () => Qn(e(), t);
1387
1387
  }
@@ -1562,7 +1562,7 @@ function dr(e, t, n, r) {
1562
1562
  } else process.env.NODE_ENV !== "production" && q(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`);
1563
1563
  }
1564
1564
  function fr(e, t, n, r = !0) {
1565
- let i = t ? t.vnode : null, { errorHandler: a, throwUnhandledErrorInProduction: o } = t && t.appContext.config || ce;
1565
+ let i = t ? t.vnode : null, { errorHandler: a, throwUnhandledErrorInProduction: o } = t && t.appContext.config || le;
1566
1566
  if (t) {
1567
1567
  let r = t.parent, i = t.proxy, o = process.env.NODE_ENV === "production" ? `https://vuejs.org/error-reference/#runtime-${n}` : lr[n];
1568
1568
  for (; r;) {
@@ -1642,7 +1642,7 @@ function Or(e) {
1642
1642
  var kr = (e) => e.id == null ? e.flags & 2 ? -1 : Infinity : e.id;
1643
1643
  function Ar(e) {
1644
1644
  process.env.NODE_ENV !== "production" && (e ||= /* @__PURE__ */ new Map());
1645
- let t = process.env.NODE_ENV === "production" ? R : (t) => jr(e, t);
1645
+ let t = process.env.NODE_ENV === "production" ? L : (t) => jr(e, t);
1646
1646
  try {
1647
1647
  for (hr = 0; hr < mr.length; hr++) {
1648
1648
  let e = mr[hr];
@@ -1718,7 +1718,7 @@ function Vr(e, t) {
1718
1718
  });
1719
1719
  }
1720
1720
  function Hr(e, t) {
1721
- fe(e, t);
1721
+ R(e, t);
1722
1722
  for (let n in e) n !== "__file" && !(n in t) && delete e[n];
1723
1723
  }
1724
1724
  function Ur(e) {
@@ -1799,7 +1799,7 @@ function di(e, t) {
1799
1799
  if (oi === null) return process.env.NODE_ENV !== "production" && q("withDirectives can only be used inside render functions."), e;
1800
1800
  let n = sc(oi), r = e.dirs ||= [];
1801
1801
  for (let e = 0; e < t.length; e++) {
1802
- let [i, a, o, s = ce] = t[e];
1802
+ let [i, a, o, s = le] = t[e];
1803
1803
  i && (H(i) && (i = {
1804
1804
  mounted: i,
1805
1805
  updated: i
@@ -1852,10 +1852,10 @@ var hi = /* @__PURE__ */ Symbol.for("v-scx"), gi = () => {
1852
1852
  function _i(e, t, n) {
1853
1853
  return process.env.NODE_ENV !== "production" && !H(t) && q("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."), vi(e, t, n);
1854
1854
  }
1855
- function vi(e, t, n = ce) {
1855
+ function vi(e, t, n = le) {
1856
1856
  let { immediate: r, deep: i, flush: a, once: o } = n;
1857
1857
  process.env.NODE_ENV !== "production" && !t && (r !== void 0 && q("watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature."), i !== void 0 && q("watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature."), o !== void 0 && q("watch() \"once\" option is only respected when using the watch(source, callback, options?) signature."));
1858
- let s = fe({}, n);
1858
+ let s = R({}, n);
1859
1859
  process.env.NODE_ENV !== "production" && (s.onWarn = q);
1860
1860
  let c = t && r || !t && a !== "post", l;
1861
1861
  if (Xs) {
@@ -1864,7 +1864,7 @@ function vi(e, t, n = ce) {
1864
1864
  l = e.__watcherHandles ||= [];
1865
1865
  } else if (!c) {
1866
1866
  let e = () => {};
1867
- return e.stop = R, e.resume = R, e.pause = R, e;
1867
+ return e.stop = L, e.resume = L, e.pause = L, e;
1868
1868
  }
1869
1869
  }
1870
1870
  let u = Vs;
@@ -2159,7 +2159,7 @@ function Yi(e, t = !1, n) {
2159
2159
  }
2160
2160
  // @__NO_SIDE_EFFECTS__
2161
2161
  function Xi(e, t) {
2162
- return H(e) ? /* @__PURE__ */ fe({ name: e.name }, t, { setup: e }) : e;
2162
+ return H(e) ? /* @__PURE__ */ R({ name: e.name }, t, { setup: e }) : e;
2163
2163
  }
2164
2164
  function Zi(e) {
2165
2165
  e.ids = [
@@ -2188,7 +2188,7 @@ function ta(e, t, n, r, i = !1) {
2188
2188
  q("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");
2189
2189
  return;
2190
2190
  }
2191
- let l = t && t.r, u = s.refs === ce ? s.refs = {} : s.refs, d = s.setupState, f = /* @__PURE__ */ Nn(d), p = d === ce ? le : (e) => process.env.NODE_ENV !== "production" && (z(f, e) && !/* @__PURE__ */ Ln(f[e]) && q(`Template ref "${e}" used on a non-ref value. It will not work in the production build.`), Qi.has(f[e])) || $i(u, e) ? !1 : z(f, e), m = (e, t) => !(process.env.NODE_ENV !== "production" && Qi.has(e) || t && $i(u, t));
2191
+ let l = t && t.r, u = s.refs === le ? s.refs = {} : s.refs, d = s.setupState, f = /* @__PURE__ */ Nn(d), p = d === le ? ue : (e) => process.env.NODE_ENV !== "production" && (z(f, e) && !/* @__PURE__ */ Ln(f[e]) && q(`Template ref "${e}" used on a non-ref value. It will not work in the production build.`), Qi.has(f[e])) || $i(u, e) ? !1 : z(f, e), m = (e, t) => !(process.env.NODE_ENV !== "production" && Qi.has(e) || t && $i(u, t));
2192
2192
  if (l != null && l !== c) {
2193
2193
  if (na(t), _e(l)) u[l] = null, p(l) && (d[l] = null);
2194
2194
  else if (/* @__PURE__ */ Ln(l)) {
@@ -2312,7 +2312,7 @@ function Ca(e, t, n = {}, r, i) {
2312
2312
  function wa(e) {
2313
2313
  return e.some((e) => !xs(e) || !(e.type === fs || e.type === J && !wa(e.children))) ? e : null;
2314
2314
  }
2315
- var Ta = (e) => e ? Ys(e) ? sc(e) : Ta(e.parent) : null, Ea = /* @__PURE__ */ fe(/* @__PURE__ */ Object.create(null), {
2315
+ var Ta = (e) => e ? Ys(e) ? sc(e) : Ta(e.parent) : null, Ea = /* @__PURE__ */ R(/* @__PURE__ */ Object.create(null), {
2316
2316
  $: (e) => e,
2317
2317
  $el: (e) => e.vnode.el,
2318
2318
  $data: (e) => e.data,
@@ -2330,7 +2330,7 @@ var Ta = (e) => e ? Ys(e) ? sc(e) : Ta(e.parent) : null, Ea = /* @__PURE__ */ fe
2330
2330
  },
2331
2331
  $nextTick: (e) => e.n ||= Sr.bind(e.proxy),
2332
2332
  $watch: (e) => yi.bind(e)
2333
- }), Da = (e) => e === "_" || e === "$", Oa = (e, t) => e !== ce && !e.__isScriptSetup && z(e, t), ka = {
2333
+ }), Da = (e) => e === "_" || e === "$", Oa = (e, t) => e !== le && !e.__isScriptSetup && z(e, t), ka = {
2334
2334
  get({ _: e }, t) {
2335
2335
  if (t === "__v_skip") return !0;
2336
2336
  let { ctx: n, setupState: r, data: i, props: a, accessCache: o, type: s, appContext: c } = e;
@@ -2344,21 +2344,21 @@ var Ta = (e) => e ? Ys(e) ? sc(e) : Ta(e.parent) : null, Ea = /* @__PURE__ */ fe
2344
2344
  case 3: return a[t];
2345
2345
  }
2346
2346
  else if (Oa(r, t)) return o[t] = 1, r[t];
2347
- else if (i !== ce && z(i, t)) return o[t] = 2, i[t];
2347
+ else if (i !== le && z(i, t)) return o[t] = 2, i[t];
2348
2348
  else if (z(a, t)) return o[t] = 3, a[t];
2349
- else if (n !== ce && z(n, t)) return o[t] = 4, n[t];
2349
+ else if (n !== le && z(n, t)) return o[t] = 4, n[t];
2350
2350
  else Fa && (o[t] = 0);
2351
2351
  }
2352
2352
  let l = Ea[t], u, d;
2353
2353
  if (l) return t === "$attrs" ? (Bt(e.attrs, "get", ""), process.env.NODE_ENV !== "production" && oo()) : process.env.NODE_ENV !== "production" && t === "$slots" && Bt(e, "get", t), l(e);
2354
2354
  if ((u = s.__cssModules) && (u = u[t])) return u;
2355
- if (n !== ce && z(n, t)) return o[t] = 4, n[t];
2355
+ if (n !== le && z(n, t)) return o[t] = 4, n[t];
2356
2356
  if (d = c.config.globalProperties, z(d, t)) return d[t];
2357
- process.env.NODE_ENV !== "production" && oi && (!_e(t) || t.indexOf("__v") !== 0) && (i !== ce && Da(t[0]) && z(i, t) ? q(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`) : e === oi && q(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`));
2357
+ process.env.NODE_ENV !== "production" && oi && (!_e(t) || t.indexOf("__v") !== 0) && (i !== le && Da(t[0]) && z(i, t) ? q(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`) : e === oi && q(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`));
2358
2358
  },
2359
2359
  set({ _: e }, t, n) {
2360
2360
  let { data: r, setupState: i, ctx: a } = e;
2361
- return Oa(i, t) ? (i[t] = n, !0) : process.env.NODE_ENV !== "production" && i.__isScriptSetup && z(i, t) ? (q(`Cannot mutate <script setup> binding "${t}" from Options API.`), !1) : r !== ce && z(r, t) ? (r[t] = n, !0) : z(e.props, t) ? (process.env.NODE_ENV !== "production" && q(`Attempting to mutate prop "${t}". Props are readonly.`), !1) : t[0] === "$" && t.slice(1) in e ? (process.env.NODE_ENV !== "production" && q(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`), !1) : (process.env.NODE_ENV !== "production" && t in e.appContext.config.globalProperties ? Object.defineProperty(a, t, {
2361
+ return Oa(i, t) ? (i[t] = n, !0) : process.env.NODE_ENV !== "production" && i.__isScriptSetup && z(i, t) ? (q(`Cannot mutate <script setup> binding "${t}" from Options API.`), !1) : r !== le && z(r, t) ? (r[t] = n, !0) : z(e.props, t) ? (process.env.NODE_ENV !== "production" && q(`Attempting to mutate prop "${t}". Props are readonly.`), !1) : t[0] === "$" && t.slice(1) in e ? (process.env.NODE_ENV !== "production" && q(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`), !1) : (process.env.NODE_ENV !== "production" && t in e.appContext.config.globalProperties ? Object.defineProperty(a, t, {
2362
2362
  enumerable: !0,
2363
2363
  configurable: !0,
2364
2364
  value: n
@@ -2366,7 +2366,7 @@ var Ta = (e) => e ? Ys(e) ? sc(e) : Ta(e.parent) : null, Ea = /* @__PURE__ */ fe
2366
2366
  },
2367
2367
  has({ _: { data: e, setupState: t, accessCache: n, ctx: r, appContext: i, props: a, type: o } }, s) {
2368
2368
  let c;
2369
- return !!(n[s] || e !== ce && s[0] !== "$" && z(e, s) || Oa(t, s) || z(a, s) || z(r, s) || z(Ea, s) || z(i.config.globalProperties, s) || (c = o.__cssModules) && c[s]);
2369
+ return !!(n[s] || e !== le && s[0] !== "$" && z(e, s) || Oa(t, s) || z(a, s) || z(r, s) || z(Ea, s) || z(i.config.globalProperties, s) || (c = o.__cssModules) && c[s]);
2370
2370
  },
2371
2371
  defineProperty(e, t, n) {
2372
2372
  return n.get == null ? z(n, "value") && this.set(e, t, n.value, null) : e._.accessCache[t] = 0, Reflect.defineProperty(e, t, n);
@@ -2384,7 +2384,7 @@ function Aa(e) {
2384
2384
  configurable: !0,
2385
2385
  enumerable: !1,
2386
2386
  get: () => Ea[n](e),
2387
- set: R
2387
+ set: L
2388
2388
  });
2389
2389
  }), t;
2390
2390
  }
@@ -2395,7 +2395,7 @@ function ja(e) {
2395
2395
  enumerable: !0,
2396
2396
  configurable: !0,
2397
2397
  get: () => e.props[n],
2398
- set: R
2398
+ set: L
2399
2399
  });
2400
2400
  });
2401
2401
  }
@@ -2411,7 +2411,7 @@ function Ma(e) {
2411
2411
  enumerable: !0,
2412
2412
  configurable: !0,
2413
2413
  get: () => n[e],
2414
- set: R
2414
+ set: L
2415
2415
  });
2416
2416
  }
2417
2417
  });
@@ -2451,15 +2451,15 @@ function Ia(e) {
2451
2451
  configurable: !0,
2452
2452
  enumerable: !0,
2453
2453
  get: () => t[e],
2454
- set: R
2454
+ set: L
2455
2455
  });
2456
2456
  }
2457
2457
  if (Fa = !0, a) for (let e in a) {
2458
- let t = a[e], i = H(t) ? t.bind(n, n) : H(t.get) ? t.get.bind(n, n) : R;
2459
- process.env.NODE_ENV !== "production" && i === R && q(`Computed property "${e}" has no getter.`);
2458
+ let t = a[e], i = H(t) ? t.bind(n, n) : H(t.get) ? t.get.bind(n, n) : L;
2459
+ process.env.NODE_ENV !== "production" && i === L && q(`Computed property "${e}" has no getter.`);
2460
2460
  let o = pc({
2461
2461
  get: i,
2462
- set: !H(t) && H(t.set) ? t.set.bind(n) : process.env.NODE_ENV === "production" ? R : () => {
2462
+ set: !H(t) && H(t.set) ? t.set.bind(n) : process.env.NODE_ENV === "production" ? L : () => {
2463
2463
  q(`Write operation failed: computed property "${e}" is readonly.`);
2464
2464
  }
2465
2465
  });
@@ -2491,9 +2491,9 @@ function Ia(e) {
2491
2491
  });
2492
2492
  });
2493
2493
  } else e.exposed ||= {};
2494
- x && e.render === R && (e.render = x), D != null && (e.inheritAttrs = D), O && (e.components = O), k && (e.directives = k), T && Zi(e);
2494
+ x && e.render === L && (e.render = x), D != null && (e.inheritAttrs = D), O && (e.components = O), k && (e.directives = k), T && Zi(e);
2495
2495
  }
2496
- function La(e, t, n = R) {
2496
+ function La(e, t, n = L) {
2497
2497
  B(e) && (e = Ga(e));
2498
2498
  for (let r in e) {
2499
2499
  let i = e[r], a;
@@ -2563,7 +2563,7 @@ var Ha = {
2563
2563
  };
2564
2564
  function Ua(e, t) {
2565
2565
  return t ? e ? function() {
2566
- return fe(H(e) ? e.call(this, this) : e, H(t) ? t.call(this, this) : t);
2566
+ return R(H(e) ? e.call(this, this) : e, H(t) ? t.call(this, this) : t);
2567
2567
  } : t : e;
2568
2568
  }
2569
2569
  function Wa(e, t) {
@@ -2581,15 +2581,15 @@ function Ka(e, t) {
2581
2581
  return e ? [...new Set([].concat(e, t))] : t;
2582
2582
  }
2583
2583
  function qa(e, t) {
2584
- return e ? fe(/* @__PURE__ */ Object.create(null), e, t) : t;
2584
+ return e ? R(/* @__PURE__ */ Object.create(null), e, t) : t;
2585
2585
  }
2586
2586
  function Ja(e, t) {
2587
- return e ? B(e) && B(t) ? [.../* @__PURE__ */ new Set([...e, ...t])] : fe(/* @__PURE__ */ Object.create(null), Na(e), Na(t ?? {})) : t;
2587
+ return e ? B(e) && B(t) ? [.../* @__PURE__ */ new Set([...e, ...t])] : R(/* @__PURE__ */ Object.create(null), Na(e), Na(t ?? {})) : t;
2588
2588
  }
2589
2589
  function Ya(e, t) {
2590
2590
  if (!e) return t;
2591
2591
  if (!t) return e;
2592
- let n = fe(/* @__PURE__ */ Object.create(null), e);
2592
+ let n = R(/* @__PURE__ */ Object.create(null), e);
2593
2593
  for (let r in t) n[r] = Ka(e[r], t[r]);
2594
2594
  return n;
2595
2595
  }
@@ -2597,7 +2597,7 @@ function Xa() {
2597
2597
  return {
2598
2598
  app: null,
2599
2599
  config: {
2600
- isNativeTag: le,
2600
+ isNativeTag: ue,
2601
2601
  performance: !1,
2602
2602
  globalProperties: {},
2603
2603
  optionMergeStrategies: {},
@@ -2617,7 +2617,7 @@ function Xa() {
2617
2617
  var Za = 0;
2618
2618
  function Qa(e, t) {
2619
2619
  return function(n, r = null) {
2620
- H(n) || (n = fe({}, n)), r != null && !U(r) && (process.env.NODE_ENV !== "production" && q("root props passed to app.mount() must be an object."), r = null);
2620
+ H(n) || (n = R({}, n)), r != null && !U(r) && (process.env.NODE_ENV !== "production" && q("root props passed to app.mount() must be an object."), r = null);
2621
2621
  let i = Xa(), a = /* @__PURE__ */ new WeakSet(), o = [], s = !1, c = i.app = {
2622
2622
  _uid: Za++,
2623
2623
  _component: n,
@@ -2680,7 +2680,7 @@ function Qa(e, t) {
2680
2680
  var $a = null, eo = (e, t) => t === "modelValue" || t === "model-value" ? e.modelModifiers : e[`${t}Modifiers`] || e[`${ke(t)}Modifiers`] || e[`${je(t)}Modifiers`];
2681
2681
  function to(e, t, ...n) {
2682
2682
  if (e.isUnmounted) return;
2683
- let r = e.vnode.props || ce;
2683
+ let r = e.vnode.props || le;
2684
2684
  if (process.env.NODE_ENV !== "production") {
2685
2685
  let { emitsOptions: r, propsOptions: [i] } = e;
2686
2686
  if (r) if (!(t in r)) (!i || !(Ne(ke(t)) in i)) && q(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Ne(ke(t))}" prop.`);
@@ -2711,14 +2711,14 @@ function ro(e, t, n = !1) {
2711
2711
  if (!H(e)) {
2712
2712
  let r = (e) => {
2713
2713
  let n = ro(e, t, !0);
2714
- n && (s = !0, fe(o, n));
2714
+ n && (s = !0, R(o, n));
2715
2715
  };
2716
2716
  !n && t.mixins.length && t.mixins.forEach(r), e.extends && r(e.extends), e.mixins && e.mixins.forEach(r);
2717
2717
  }
2718
- return !a && !s ? (U(e) && r.set(e, null), null) : (B(a) ? a.forEach((e) => o[e] = null) : fe(o, a), U(e) && r.set(e, o), o);
2718
+ return !a && !s ? (U(e) && r.set(e, null), null) : (B(a) ? a.forEach((e) => o[e] = null) : R(o, a), U(e) && r.set(e, o), o);
2719
2719
  }
2720
2720
  function io(e, t) {
2721
- return !e || !ue(t) ? !1 : (t = t.slice(2), t = t === "Once" ? t : t.replace(/Once$/, ""), z(e, t[0].toLowerCase() + t.slice(1)) || z(e, je(t)) || z(e, t));
2721
+ return !e || !de(t) ? !1 : (t = t.slice(2), t = t === "Once" ? t : t.replace(/Once$/, ""), z(e, t[0].toLowerCase() + t.slice(1)) || z(e, je(t)) || z(e, t));
2722
2722
  }
2723
2723
  var ao = !1;
2724
2724
  function oo() {
@@ -2754,12 +2754,12 @@ function so(e) {
2754
2754
  if (process.env.NODE_ENV !== "production" && _.patchFlag > 0 && _.patchFlag & 2048 && ([y, b] = co(_)), v && h !== !1) {
2755
2755
  let e = Object.keys(v), { shapeFlag: t } = y;
2756
2756
  if (e.length) {
2757
- if (t & 7) a && e.some(de) && (v = fo(v, a)), y = As(y, v, !1, !0);
2757
+ if (t & 7) a && e.some(fe) && (v = fo(v, a)), y = As(y, v, !1, !0);
2758
2758
  else if (process.env.NODE_ENV !== "production" && !ao && y.type !== fs) {
2759
2759
  let e = Object.keys(s), t = [], n = [];
2760
2760
  for (let r = 0, i = e.length; r < i; r++) {
2761
2761
  let i = e[r];
2762
- ue(i) ? de(i) || t.push(i[2].toLowerCase() + i.slice(3)) : n.push(i);
2762
+ de(i) ? fe(i) || t.push(i[2].toLowerCase() + i.slice(3)) : n.push(i);
2763
2763
  }
2764
2764
  n.length && q(`Extraneous non-props attributes (${n.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`), t.length && q(`Extraneous non-emits event listeners (${t.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`);
2765
2765
  }
@@ -2791,11 +2791,11 @@ function lo(e, t = !0) {
2791
2791
  }
2792
2792
  var uo = (e) => {
2793
2793
  let t;
2794
- for (let n in e) (n === "class" || n === "style" || ue(n)) && ((t ||= {})[n] = e[n]);
2794
+ for (let n in e) (n === "class" || n === "style" || de(n)) && ((t ||= {})[n] = e[n]);
2795
2795
  return t;
2796
2796
  }, fo = (e, t) => {
2797
2797
  let n = {};
2798
- for (let r in e) (!de(r) || !(r.slice(9) in t)) && (n[r] = e[r]);
2798
+ for (let r in e) (!fe(r) || !(r.slice(9) in t)) && (n[r] = e[r]);
2799
2799
  return n;
2800
2800
  }, po = (e) => e.shapeFlag & 7 || e.type === fs;
2801
2801
  function mo(e, t, n) {
@@ -2881,7 +2881,7 @@ function wo(e, t, n, r) {
2881
2881
  i && z(i, u = ke(c)) ? !a || !a.includes(u) ? n[u] = l : (s ||= {})[u] = l : io(e.emitsOptions, c) || (!(c in r) || l !== r[c]) && (r[c] = l, o = !0);
2882
2882
  }
2883
2883
  if (a) {
2884
- let t = /* @__PURE__ */ Nn(n), r = s || ce;
2884
+ let t = /* @__PURE__ */ Nn(n), r = s || le;
2885
2885
  for (let o = 0; o < a.length; o++) {
2886
2886
  let s = a[o];
2887
2887
  n[s] = To(i, t, s, r[s], e, !z(r, s));
@@ -2918,22 +2918,22 @@ function Do(e, t, n = !1) {
2918
2918
  let r = (e) => {
2919
2919
  c = !0;
2920
2920
  let [n, r] = Do(e, t, !0);
2921
- fe(o, n), r && s.push(...r);
2921
+ R(o, n), r && s.push(...r);
2922
2922
  };
2923
2923
  !n && t.mixins.length && t.mixins.forEach(r), e.extends && r(e.extends), e.mixins && e.mixins.forEach(r);
2924
2924
  }
2925
- if (!a && !c) return U(e) && r.set(e, L), L;
2925
+ if (!a && !c) return U(e) && r.set(e, I), I;
2926
2926
  if (B(a)) for (let e = 0; e < a.length; e++) {
2927
2927
  process.env.NODE_ENV !== "production" && !_e(a[e]) && q("props must be strings when using array syntax.", a[e]);
2928
2928
  let t = ke(a[e]);
2929
- Oo(t) && (o[t] = ce);
2929
+ Oo(t) && (o[t] = le);
2930
2930
  }
2931
2931
  else if (a) {
2932
2932
  process.env.NODE_ENV !== "production" && !U(a) && q("invalid props options", a);
2933
2933
  for (let e in a) {
2934
2934
  let t = ke(e);
2935
2935
  if (Oo(t)) {
2936
- let n = a[e], r = o[t] = B(n) || H(n) ? { type: n } : fe({}, n), i = r.type, c = !1, l = !0;
2936
+ let n = a[e], r = o[t] = B(n) || H(n) ? { type: n } : R({}, n), i = r.type, c = !1, l = !0;
2937
2937
  if (B(i)) for (let e = 0; e < i.length; ++e) {
2938
2938
  let t = i[e], n = H(t) && t.name;
2939
2939
  if (n === "Boolean") {
@@ -2983,7 +2983,7 @@ function jo(e, t, n, r, i) {
2983
2983
  s && !s(t, r) && q("Invalid prop: custom validator check failed for prop \"" + e + "\".");
2984
2984
  }
2985
2985
  }
2986
- var Mo = /* @__PURE__ */ se("String,Number,Boolean,Function,Symbol,BigInt");
2986
+ var Mo = /* @__PURE__ */ ce("String,Number,Boolean,Function,Symbol,BigInt");
2987
2987
  function No(e, t) {
2988
2988
  let n, r = ko(t);
2989
2989
  if (r === "null") n = e === null;
@@ -3046,7 +3046,7 @@ var Ro = (e) => e === "_" || e === "_ctx" || e === "$stable", zo = (e) => B(e) ?
3046
3046
  e ? (Uo(r, t, n), n && Ie(r, "_", e, !0)) : Vo(t, r);
3047
3047
  } else t && Ho(e, t);
3048
3048
  }, Go = (e, t, n) => {
3049
- let { vnode: r, slots: i } = e, a = !0, o = ce;
3049
+ let { vnode: r, slots: i } = e, a = !0, o = le;
3050
3050
  if (r.shapeFlag & 32) {
3051
3051
  let r = t._;
3052
3052
  r ? process.env.NODE_ENV !== "production" && Mr ? (Uo(i, t, n), Vt(e, "set", "$slots")) : n && r === 1 ? a = !1 : Uo(i, t, n) : (a = !t.$stable, Vo(t, i)), o = t;
@@ -3083,9 +3083,9 @@ function es(e, t) {
3083
3083
  Zo();
3084
3084
  let n = Be();
3085
3085
  n.__VUE__ = !0, process.env.NODE_ENV !== "production" && Jr(n.__VUE_DEVTOOLS_GLOBAL_HOOK__, n);
3086
- let { insert: r, remove: i, patchProp: a, createElement: o, createText: s, createComment: c, setText: l, setElementText: u, parentNode: d, nextSibling: f, setScopeId: p = R, insertStaticContent: m } = e, h = (e, t, n, r = null, i = null, a = null, o = void 0, s = null, c = process.env.NODE_ENV !== "production" && Mr ? !1 : !!t.dynamicChildren) => {
3086
+ let { insert: r, remove: i, patchProp: a, createElement: o, createText: s, createComment: c, setText: l, setElementText: u, parentNode: d, nextSibling: f, setScopeId: p = L, insertStaticContent: m } = e, h = (e, t, n, r = null, i = null, a = null, o = void 0, s = null, c = process.env.NODE_ENV !== "production" && Mr ? !1 : !!t.dynamicChildren) => {
3087
3087
  if (e === t) return;
3088
- e && !Ss(e, t) && (r = se(e), ne(e, i, a, !0), e = null), t.patchFlag === -2 && (c = !1, t.dynamicChildren = null);
3088
+ e && !Ss(e, t) && (r = ce(e), re(e, i, a, !0), e = null), t.patchFlag === -2 && (c = !1, t.dynamicChildren = null);
3089
3089
  let { type: l, ref: u, shapeFlag: d } = t;
3090
3090
  switch (l) {
3091
3091
  case ds:
@@ -3100,7 +3100,7 @@ function es(e, t) {
3100
3100
  case J:
3101
3101
  k(e, t, n, r, i, a, o, s, c);
3102
3102
  break;
3103
- default: d & 1 ? S(e, t, n, r, i, a, o, s, c) : d & 6 ? A(e, t, n, r, i, a, o, s, c) : d & 64 || d & 128 ? l.process(e, t, n, r, i, a, o, s, c, de) : process.env.NODE_ENV !== "production" && q("Invalid VNode type:", l, `(${typeof l})`);
3103
+ default: d & 1 ? S(e, t, n, r, i, a, o, s, c) : d & 6 ? A(e, t, n, r, i, a, o, s, c) : d & 64 || d & 128 ? l.process(e, t, n, r, i, a, o, s, c, fe) : process.env.NODE_ENV !== "production" && q("Invalid VNode type:", l, `(${typeof l})`);
3104
3104
  }
3105
3105
  u != null && i ? ta(u, e && e.ref, a, t || e, !t) : u == null && e && e.ref != null && ta(e.ref, null, a, e, !0);
3106
3106
  }, g = (e, t, n, i) => {
@@ -3175,7 +3175,7 @@ function es(e, t) {
3175
3175
  process.env.NODE_ENV !== "production" && (c.__vnode = t);
3176
3176
  let { patchFlag: l, dynamicChildren: d, dirs: f } = t;
3177
3177
  l |= e.patchFlag & 16;
3178
- let p = e.props || ce, m = t.props || ce, h;
3178
+ let p = e.props || le, m = t.props || le, h;
3179
3179
  if (n && ns(n, !1), (h = m.onVnodeBeforeUpdate) && Ls(h, n, t, e), f && fi(t, e, n, "beforeUpdate"), n && ns(n, !0), (process.env.NODE_ENV !== "production" && Mr || d && (!e.dynamicChildren || e.dynamicChildren.length !== d.length)) && (l = 0, s = !1, d = null), (p.innerHTML && m.innerHTML == null || p.textContent && m.textContent == null) && u(c, ""), d ? (D(e.dynamicChildren, d, c, n, r, ts(t, i), o), process.env.NODE_ENV !== "production" && is(e, t)) : s || te(e, t, c, null, n, r, ts(t, i), o, !1), l > 0) {
3180
3180
  if (l & 16) O(c, p, m, n, i);
3181
3181
  else if (l & 2 && p.class !== m.class && a(c, "class", null, m.class, i), l & 4 && a(c, "style", p.style, m.style, i), l & 8) {
@@ -3197,7 +3197,7 @@ function es(e, t) {
3197
3197
  }
3198
3198
  }, O = (e, t, n, r, i) => {
3199
3199
  if (t !== n) {
3200
- if (t !== ce) for (let o in t) !Te(o) && !(o in n) && a(e, o, t[o], null, i, r);
3200
+ if (t !== le) for (let o in t) !Te(o) && !(o in n) && a(e, o, t[o], null, i, r);
3201
3201
  for (let o in n) {
3202
3202
  if (Te(o)) continue;
3203
3203
  let s = n[o], c = t[o];
@@ -3212,7 +3212,7 @@ function es(e, t) {
3212
3212
  t.slotScopeIds = s, e == null ? t.shapeFlag & 512 ? i.ctx.activate(t, n, r, o, c) : j(t, n, r, i, a, o, c) : M(e, t, c);
3213
3213
  }, j = (e, t, n, r, i, a, o) => {
3214
3214
  let s = e.component = Bs(e, r, i);
3215
- if (process.env.NODE_ENV !== "production" && s.type.__hmrId && Ir(s), process.env.NODE_ENV !== "production" && (er(e), Jo(s, "mount")), ia(e) && (s.ctx.renderer = de), process.env.NODE_ENV !== "production" && Jo(s, "init"), Zs(s, !1, o), process.env.NODE_ENV !== "production" && Yo(s, "init"), process.env.NODE_ENV !== "production" && Mr && (e.el = null), s.asyncDep) {
3215
+ if (process.env.NODE_ENV !== "production" && s.type.__hmrId && Ir(s), process.env.NODE_ENV !== "production" && (er(e), Jo(s, "mount")), ia(e) && (s.ctx.renderer = fe), process.env.NODE_ENV !== "production" && Jo(s, "init"), Zs(s, !1, o), process.env.NODE_ENV !== "production" && Yo(s, "init"), process.env.NODE_ENV !== "production" && Mr && (e.el = null), s.asyncDep) {
3216
3216
  if (i && i.registerDep(s, ee, o), !e.el) {
3217
3217
  let r = s.subTree = Ds(fs);
3218
3218
  _(null, r, t, n), e.placeholder = r.el;
@@ -3246,7 +3246,7 @@ function es(e, t) {
3246
3246
  let p = so(e);
3247
3247
  process.env.NODE_ENV !== "production" && Yo(e, "render");
3248
3248
  let m = e.subTree;
3249
- e.subTree = p, process.env.NODE_ENV !== "production" && Jo(e, "patch"), h(m, p, d(m.el), se(m), e, i, a), process.env.NODE_ENV !== "production" && Yo(e, "patch"), t.el = p.el, u === null && _o(e, p.el), r && Qo(r, i), (f = t.props && t.props.onVnodeUpdated) && Qo(() => Ls(f, s, t, c), i), process.env.NODE_ENV !== "production" && Qr(e), process.env.NODE_ENV !== "production" && tr();
3249
+ e.subTree = p, process.env.NODE_ENV !== "production" && Jo(e, "patch"), h(m, p, d(m.el), ce(m), e, i, a), process.env.NODE_ENV !== "production" && Yo(e, "patch"), t.el = p.el, u === null && _o(e, p.el), r && Qo(r, i), (f = t.props && t.props.onVnodeUpdated) && Qo(() => Ls(f, s, t, c), i), process.env.NODE_ENV !== "production" && Qr(e), process.env.NODE_ENV !== "production" && tr();
3250
3250
  } else {
3251
3251
  let o, { el: s, props: c } = t, { bm: l, m: u, parent: d, root: f, type: p } = e, m = ra(t);
3252
3252
  if (ns(e, !1), l && Fe(l), !m && (o = c && c.onVnodeBeforeMount) && Ls(o, d, t), ns(e, !0), s && pe) {
@@ -3279,23 +3279,23 @@ function es(e, t) {
3279
3279
  let l = e && e.children, d = e ? e.shapeFlag : 0, f = t.children, { patchFlag: p, shapeFlag: m } = t;
3280
3280
  if (p > 0) {
3281
3281
  if (p & 128) {
3282
- F(l, f, n, r, i, a, o, s, c);
3282
+ P(l, f, n, r, i, a, o, s, c);
3283
3283
  return;
3284
3284
  } else if (p & 256) {
3285
- P(l, f, n, r, i, a, o, s, c);
3285
+ ne(l, f, n, r, i, a, o, s, c);
3286
3286
  return;
3287
3287
  }
3288
3288
  }
3289
- m & 8 ? (d & 16 && oe(l, i, a), f !== l && u(n, f)) : d & 16 ? m & 16 ? F(l, f, n, r, i, a, o, s, c) : oe(l, i, a, !0) : (d & 8 && u(n, ""), m & 16 && T(f, n, r, i, a, o, s, c));
3290
- }, P = (e, t, n, r, i, a, o, s, c) => {
3291
- e ||= L, t ||= L;
3289
+ m & 8 ? (d & 16 && se(l, i, a), f !== l && u(n, f)) : d & 16 ? m & 16 ? P(l, f, n, r, i, a, o, s, c) : se(l, i, a, !0) : (d & 8 && u(n, ""), m & 16 && T(f, n, r, i, a, o, s, c));
3290
+ }, ne = (e, t, n, r, i, a, o, s, c) => {
3291
+ e ||= I, t ||= I;
3292
3292
  let l = e.length, u = t.length, d = Math.min(l, u), f;
3293
3293
  for (f = 0; f < d; f++) {
3294
3294
  let r = t[f] = c ? Ps(t[f]) : Ns(t[f]);
3295
3295
  h(e[f], r, n, null, i, a, o, s, c);
3296
3296
  }
3297
- l > u ? oe(e, i, a, !0, !1, d) : T(t, n, r, i, a, o, s, c, d);
3298
- }, F = (e, t, n, r, i, a, o, s, c) => {
3297
+ l > u ? se(e, i, a, !0, !1, d) : T(t, n, r, i, a, o, s, c, d);
3298
+ }, P = (e, t, n, r, i, a, o, s, c) => {
3299
3299
  let l = 0, u = t.length, d = e.length - 1, f = u - 1;
3300
3300
  for (; l <= d && l <= f;) {
3301
3301
  let r = e[l], u = t[l] = c ? Ps(t[l]) : Ns(t[l]);
@@ -3314,7 +3314,7 @@ function es(e, t) {
3314
3314
  let e = f + 1, d = e < u ? t[e].el : r;
3315
3315
  for (; l <= f;) h(null, t[l] = c ? Ps(t[l]) : Ns(t[l]), n, d, i, a, o, s, c), l++;
3316
3316
  }
3317
- } else if (l > f) for (; l <= d;) ne(e[l], i, a, !0), l++;
3317
+ } else if (l > f) for (; l <= d;) re(e[l], i, a, !0), l++;
3318
3318
  else {
3319
3319
  let p = l, m = l, g = /* @__PURE__ */ new Map();
3320
3320
  for (l = m; l <= f; l++) {
@@ -3326,7 +3326,7 @@ function es(e, t) {
3326
3326
  for (l = p; l <= d; l++) {
3327
3327
  let r = e[l];
3328
3328
  if (v >= y) {
3329
- ne(r, i, a, !0);
3329
+ re(r, i, a, !0);
3330
3330
  continue;
3331
3331
  }
3332
3332
  let u;
@@ -3335,18 +3335,18 @@ function es(e, t) {
3335
3335
  u = _;
3336
3336
  break;
3337
3337
  }
3338
- u === void 0 ? ne(r, i, a, !0) : (S[u - m] = l + 1, u >= x ? x = u : b = !0, h(r, t[u], n, null, i, a, o, s, c), v++);
3338
+ u === void 0 ? re(r, i, a, !0) : (S[u - m] = l + 1, u >= x ? x = u : b = !0, h(r, t[u], n, null, i, a, o, s, c), v++);
3339
3339
  }
3340
- let C = b ? as(S) : L;
3340
+ let C = b ? as(S) : I;
3341
3341
  for (_ = C.length - 1, l = y - 1; l >= 0; l--) {
3342
3342
  let e = m + l, d = t[e], f = t[e + 1], p = e + 1 < u ? f.el || cs(f) : r;
3343
- S[l] === 0 ? h(null, d, n, p, i, a, o, s, c) : b && (_ < 0 || l !== C[_] ? I(d, n, p, 2) : _--);
3343
+ S[l] === 0 ? h(null, d, n, p, i, a, o, s, c) : b && (_ < 0 || l !== C[_] ? F(d, n, p, 2) : _--);
3344
3344
  }
3345
3345
  }
3346
- }, I = (e, t, n, a, o = null) => {
3346
+ }, F = (e, t, n, a, o = null) => {
3347
3347
  let { el: s, type: c, transition: l, children: u, shapeFlag: d } = e;
3348
3348
  if (d & 6) {
3349
- I(e.component.subTree, t, n, a);
3349
+ F(e.component.subTree, t, n, a);
3350
3350
  return;
3351
3351
  }
3352
3352
  if (d & 128) {
@@ -3354,12 +3354,12 @@ function es(e, t) {
3354
3354
  return;
3355
3355
  }
3356
3356
  if (d & 64) {
3357
- c.move(e, t, n, de);
3357
+ c.move(e, t, n, fe);
3358
3358
  return;
3359
3359
  }
3360
3360
  if (c === J) {
3361
3361
  r(s, t, n);
3362
- for (let e = 0; e < u.length; e++) I(u[e], t, n, a);
3362
+ for (let e = 0; e < u.length; e++) F(u[e], t, n, a);
3363
3363
  r(e.anchor, t, n);
3364
3364
  return;
3365
3365
  }
@@ -3380,31 +3380,31 @@ function es(e, t) {
3380
3380
  o ? o(s, u, d) : d();
3381
3381
  }
3382
3382
  else r(s, t, n);
3383
- }, ne = (e, t, n, r = !1, i = !1) => {
3383
+ }, re = (e, t, n, r = !1, i = !1) => {
3384
3384
  let { type: a, props: o, ref: s, children: c, dynamicChildren: l, shapeFlag: u, patchFlag: d, dirs: f, cacheIndex: p, memo: m } = e;
3385
3385
  if (d === -2 && (i = !1), s != null && (kt(), ta(s, null, n, e, !0), At()), p != null && (t.renderCache[p] = void 0), u & 256) {
3386
3386
  t.ctx.deactivate(e);
3387
3387
  return;
3388
3388
  }
3389
3389
  let h = u & 1 && f, g = !ra(e), _;
3390
- if (g && (_ = o && o.onVnodeBeforeUnmount) && Ls(_, t, e), u & 6) ae(e.component, n, r);
3390
+ if (g && (_ = o && o.onVnodeBeforeUnmount) && Ls(_, t, e), u & 6) oe(e.component, n, r);
3391
3391
  else {
3392
3392
  if (u & 128) {
3393
3393
  e.suspense.unmount(n, r);
3394
3394
  return;
3395
3395
  }
3396
- h && fi(e, null, t, "beforeUnmount"), u & 64 ? e.type.remove(e, t, n, de, r) : l && !l.hasOnce && (a !== J || d > 0 && d & 64) ? oe(l, t, n, !1, !0) : (a === J && d & 384 || !i && u & 16) && oe(c, t, n), r && re(e);
3396
+ h && fi(e, null, t, "beforeUnmount"), u & 64 ? e.type.remove(e, t, n, fe, r) : l && !l.hasOnce && (a !== J || d > 0 && d & 64) ? se(l, t, n, !1, !0) : (a === J && d & 384 || !i && u & 16) && se(c, t, n), r && ie(e);
3397
3397
  }
3398
3398
  let v = m != null && p == null;
3399
3399
  (g && (_ = o && o.onVnodeUnmounted) || h || v) && Qo(() => {
3400
3400
  _ && Ls(_, t, e), h && fi(e, null, t, "unmounted"), v && (e.el = null);
3401
3401
  }, n);
3402
- }, re = (e) => {
3402
+ }, ie = (e) => {
3403
3403
  let { type: t, el: n, anchor: r, transition: a } = e;
3404
3404
  if (t === J) {
3405
3405
  process.env.NODE_ENV !== "production" && e.patchFlag > 0 && e.patchFlag & 2048 && a && !a.persisted ? e.children.forEach((e) => {
3406
- e.type === fs ? i(e.el) : re(e);
3407
- }) : ie(n, r);
3406
+ e.type === fs ? i(e.el) : ie(e);
3407
+ }) : ae(n, r);
3408
3408
  return;
3409
3409
  }
3410
3410
  if (t === ps) {
@@ -3418,42 +3418,42 @@ function es(e, t) {
3418
3418
  let { leave: t, delayLeave: r } = a, i = () => t(n, o);
3419
3419
  r ? r(e.el, o, i) : i();
3420
3420
  } else o();
3421
- }, ie = (e, t) => {
3421
+ }, ae = (e, t) => {
3422
3422
  let n;
3423
3423
  for (; e !== t;) n = f(e), i(e), e = n;
3424
3424
  i(t);
3425
- }, ae = (e, t, n) => {
3425
+ }, oe = (e, t, n) => {
3426
3426
  process.env.NODE_ENV !== "production" && e.type.__hmrId && Lr(e);
3427
3427
  let { bum: r, scope: i, job: a, subTree: o, um: s, m: c, a: l } = e;
3428
- ss(c), ss(l), r && Fe(r), i.stop(), a && (a.flags |= 8, ne(o, e, t, n)), s && Qo(s, t), Qo(() => {
3428
+ ss(c), ss(l), r && Fe(r), i.stop(), a && (a.flags |= 8, re(o, e, t, n)), s && Qo(s, t), Qo(() => {
3429
3429
  e.isUnmounted = !0;
3430
3430
  }, t), process.env.NODE_ENV !== "production" && ei(e);
3431
- }, oe = (e, t, n, r = !1, i = !1, a = 0) => {
3432
- for (let o = a; o < e.length; o++) ne(e[o], t, n, r, i);
3433
- }, se = (e) => {
3434
- if (e.shapeFlag & 6) return se(e.component.subTree);
3431
+ }, se = (e, t, n, r = !1, i = !1, a = 0) => {
3432
+ for (let o = a; o < e.length; o++) re(e[o], t, n, r, i);
3433
+ }, ce = (e) => {
3434
+ if (e.shapeFlag & 6) return ce(e.component.subTree);
3435
3435
  if (e.shapeFlag & 128) return e.suspense.next();
3436
3436
  let t = f(e.anchor || e.el), n = t && t[Si];
3437
3437
  return n ? f(n) : t;
3438
- }, le = !1, ue = (e, t, n) => {
3438
+ }, ue = !1, de = (e, t, n) => {
3439
3439
  let r;
3440
- e == null ? t._vnode && (ne(t._vnode, null, null, !0), r = t._vnode.component) : h(t._vnode || null, e, t, null, null, null, n), t._vnode = e, le ||= (le = !0, Dr(r), Or(), !1);
3441
- }, de = {
3440
+ e == null ? t._vnode && (re(t._vnode, null, null, !0), r = t._vnode.component) : h(t._vnode || null, e, t, null, null, null, n), t._vnode = e, ue ||= (ue = !0, Dr(r), Or(), !1);
3441
+ }, fe = {
3442
3442
  p: h,
3443
- um: ne,
3444
- m: I,
3445
- r: re,
3443
+ um: re,
3444
+ m: F,
3445
+ r: ie,
3446
3446
  mt: j,
3447
3447
  mc: T,
3448
3448
  pc: te,
3449
3449
  pbc: D,
3450
- n: se,
3450
+ n: ce,
3451
3451
  o: e
3452
- }, fe, pe;
3453
- return t && ([fe, pe] = t(de)), {
3454
- render: ue,
3455
- hydrate: fe,
3456
- createApp: Qa(ue, fe)
3452
+ }, R, pe;
3453
+ return t && ([R, pe] = t(fe)), {
3454
+ render: de,
3455
+ hydrate: R,
3456
+ createApp: Qa(de, R)
3457
3457
  };
3458
3458
  }
3459
3459
  function ts({ type: e, props: t }, n) {
@@ -3516,7 +3516,7 @@ function vs(e, t = !1) {
3516
3516
  _s += e, e < 0 && hs && t && (hs.hasOnce = !0);
3517
3517
  }
3518
3518
  function ys(e) {
3519
- return e.dynamicChildren = _s > 0 ? hs || L : null, gs(), _s > 0 && hs && hs.push(e), e;
3519
+ return e.dynamicChildren = _s > 0 ? hs || I : null, gs(), _s > 0 && hs && hs.push(e), e;
3520
3520
  }
3521
3521
  function X(e, t, n, r, i, a) {
3522
3522
  return ys(Z(e, t, n, r, i, a, !0));
@@ -3581,13 +3581,13 @@ function Os(e, t = null, n = null, r = 0, i = null, a = !1) {
3581
3581
  if (fc(e) && (e = e.__vccOpts), t) {
3582
3582
  t = ks(t);
3583
3583
  let { class: e, style: n } = t;
3584
- e && !_e(e) && (t.class = Ke(e)), U(n) && (/* @__PURE__ */ Mn(n) && !B(n) && (n = fe({}, n)), t.style = Ve(n));
3584
+ e && !_e(e) && (t.class = Ke(e)), U(n) && (/* @__PURE__ */ Mn(n) && !B(n) && (n = R({}, n)), t.style = Ve(n));
3585
3585
  }
3586
3586
  let o = _e(e) ? 1 : ls(e) ? 128 : Ci(e) ? 64 : U(e) ? 4 : H(e) ? 2 : 0;
3587
3587
  return process.env.NODE_ENV !== "production" && o & 4 && /* @__PURE__ */ Mn(e) && (e = /* @__PURE__ */ Nn(e), q("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.", "\nComponent that was made reactive: ", e)), Z(e, t, n, r, i, o, a, !0);
3588
3588
  }
3589
3589
  function ks(e) {
3590
- return e ? /* @__PURE__ */ Mn(e) || bo(e) ? fe({}, e) : e : null;
3590
+ return e ? /* @__PURE__ */ Mn(e) || bo(e) ? R({}, e) : e : null;
3591
3591
  }
3592
3592
  function As(e, t, n = !1, r = !1) {
3593
3593
  let { props: i, ref: a, patchFlag: o, children: s, transition: c } = e, l = t ? Is(i || {}, t) : i, u = {
@@ -3670,9 +3670,9 @@ function Is(...e) {
3670
3670
  let r = e[n];
3671
3671
  for (let e in r) if (e === "class") t.class !== r.class && (t.class = Ke([t.class, r.class]));
3672
3672
  else if (e === "style") t.style = Ve([t.style, r.style]);
3673
- else if (ue(e)) {
3673
+ else if (de(e)) {
3674
3674
  let n = t[e], i = r[e];
3675
- i && n !== i && !(B(n) && n.includes(i)) ? t[e] = n ? [].concat(n, i) : i : i == null && n == null && !de(e) && (t[e] = i);
3675
+ i && n !== i && !(B(n) && n.includes(i)) ? t[e] = n ? [].concat(n, i) : i : i == null && n == null && !fe(e) && (t[e] = i);
3676
3676
  } else e !== "" && (t[e] = r[e]);
3677
3677
  }
3678
3678
  return t;
@@ -3714,15 +3714,15 @@ function Bs(e, t, n) {
3714
3714
  emitsOptions: ro(r, i),
3715
3715
  emit: null,
3716
3716
  emitted: null,
3717
- propsDefaults: ce,
3717
+ propsDefaults: le,
3718
3718
  inheritAttrs: r.inheritAttrs,
3719
- ctx: ce,
3720
- data: ce,
3721
- props: ce,
3722
- attrs: ce,
3723
- slots: ce,
3724
- refs: ce,
3725
- setupState: ce,
3719
+ ctx: le,
3720
+ data: le,
3721
+ props: le,
3722
+ attrs: le,
3723
+ slots: le,
3724
+ refs: le,
3725
+ setupState: le,
3726
3726
  setupContext: null,
3727
3727
  suspense: n,
3728
3728
  suspenseId: n ? n.pendingId : 0,
@@ -3765,7 +3765,7 @@ var Gs = (e) => {
3765
3765
  };
3766
3766
  }, Ks = () => {
3767
3767
  Vs && Vs.scope.off(), Us(null);
3768
- }, qs = /* @__PURE__ */ se("slot,component");
3768
+ }, qs = /* @__PURE__ */ ce("slot,component");
3769
3769
  function Js(e, { isNativeTag: t }) {
3770
3770
  (qs(e) || t(e)) && q("Do not use built-in or reserved HTML elements as component id: " + e);
3771
3771
  }
@@ -3820,13 +3820,13 @@ function rc(e, t, n) {
3820
3820
  if (t) {
3821
3821
  process.env.NODE_ENV !== "production" && Jo(e, "compile");
3822
3822
  let { isCustomElement: n, compilerOptions: i } = e.appContext.config, { delimiters: a, compilerOptions: o } = r;
3823
- r.render = ec(t, fe(fe({
3823
+ r.render = ec(t, R(R({
3824
3824
  isCustomElement: n,
3825
3825
  delimiters: a
3826
3826
  }, i), o)), process.env.NODE_ENV !== "production" && Yo(e, "compile");
3827
3827
  }
3828
3828
  }
3829
- e.render = r.render || R, tc && tc(e);
3829
+ e.render = r.render || L, tc && tc(e);
3830
3830
  }
3831
3831
  {
3832
3832
  let t = Gs(e);
@@ -3837,7 +3837,7 @@ function rc(e, t, n) {
3837
3837
  At(), t();
3838
3838
  }
3839
3839
  }
3840
- process.env.NODE_ENV !== "production" && !r.render && e.render === R && !t && (!ec && r.template ? q("Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".") : q("Component is missing template or render function: ", r));
3840
+ process.env.NODE_ENV !== "production" && !r.render && e.render === L && !t && (!ec && r.template ? q("Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".") : q("Component is missing template or render function: ", r));
3841
3841
  }
3842
3842
  var ic = process.env.NODE_ENV === "production" ? { get(e, t) {
3843
3843
  return Bt(e, "get", ""), e[t];
@@ -4000,7 +4000,7 @@ function hc() {
4000
4000
  };
4001
4001
  function a(e) {
4002
4002
  let t = [];
4003
- e.type.props && e.props && t.push(o("props", /* @__PURE__ */ Nn(e.props))), e.setupState !== ce && t.push(o("setup", e.setupState)), e.data !== ce && t.push(o("data", /* @__PURE__ */ Nn(e.data)));
4003
+ e.type.props && e.props && t.push(o("props", /* @__PURE__ */ Nn(e.props))), e.setupState !== le && t.push(o("setup", e.setupState)), e.data !== le && t.push(o("data", /* @__PURE__ */ Nn(e.data)));
4004
4004
  let n = c(e, "computed");
4005
4005
  n && t.push(o("computed", n));
4006
4006
  let i = c(e, "inject");
@@ -4016,7 +4016,7 @@ function hc() {
4016
4016
  ]), t;
4017
4017
  }
4018
4018
  function o(e, t) {
4019
- return t = fe({}, t), Object.keys(t).length ? [
4019
+ return t = R({}, t), Object.keys(t).length ? [
4020
4020
  "div",
4021
4021
  { style: "line-height:1.25em;margin-bottom:0.6em" },
4022
4022
  [
@@ -4075,7 +4075,7 @@ function hc() {
4075
4075
  }
4076
4076
  window.devtoolsFormatters ? window.devtoolsFormatters.push(i) : window.devtoolsFormatters = [i];
4077
4077
  }
4078
- var gc = "3.5.39", _c = process.env.NODE_ENV === "production" ? R : q;
4078
+ var gc = "3.5.39", _c = process.env.NODE_ENV === "production" ? L : q;
4079
4079
  process.env.NODE_ENV, process.env.NODE_ENV;
4080
4080
  //#endregion
4081
4081
  //#region node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
@@ -4147,7 +4147,7 @@ var bc = vc ? (e) => vc.createHTML(e) : (e) => e, xc = "http://www.w3.org/2000/s
4147
4147
  leaveFromClass: String,
4148
4148
  leaveActiveClass: String,
4149
4149
  leaveToClass: String
4150
- }, Ac = /* @__PURE__ */ fe({}, zi, kc), jc = /* @__PURE__ */ ((e) => (e.displayName = "Transition", e.props = Ac, e))((e, { slots: t }) => mc(Ui, Pc(e), t)), Mc = (e, t = []) => {
4150
+ }, Ac = /* @__PURE__ */ R({}, zi, kc), jc = /* @__PURE__ */ ((e) => (e.displayName = "Transition", e.props = Ac, e))((e, { slots: t }) => mc(Ui, Pc(e), t)), Mc = (e, t = []) => {
4151
4151
  B(e) ? e.forEach((e) => e(...t)) : e && e(...t);
4152
4152
  }, Nc = (e) => e ? B(e) ? e.some((e) => e.length > 1) : e.length > 1 : !1;
4153
4153
  function Pc(e) {
@@ -4164,7 +4164,7 @@ function Pc(e) {
4164
4164
  Rc(t, e ? c : a), Lc(t, e ? u : s), Nc(i) || Vc(t, r, h, o);
4165
4165
  });
4166
4166
  };
4167
- return fe(t, {
4167
+ return R(t, {
4168
4168
  onBeforeEnter(e) {
4169
4169
  Mc(_, [e]), Lc(e, a), Lc(e, o);
4170
4170
  },
@@ -4399,11 +4399,11 @@ function bl(e, t) {
4399
4399
  }
4400
4400
  function xl(e, t) {
4401
4401
  return H(e) || B(e) ? e : (_c(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
4402
- Expected function or array of functions, received type ${typeof e}.`), R);
4402
+ Expected function or array of functions, received type ${typeof e}.`), L);
4403
4403
  }
4404
4404
  var Sl = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) > 96 && e.charCodeAt(2) < 123, Cl = (e, t, n, r, i, a) => {
4405
4405
  let o = i === "svg";
4406
- t === "class" ? Kc(e, r, o) : t === "style" ? $c(e, n, r) : ue(t) ? de(t) || pl(e, t, n, r, a) : (t[0] === "." ? (t = t.slice(1), !0) : t[0] === "^" ? (t = t.slice(1), !1) : wl(e, t, r, o)) ? (ll(e, t, r), !e.tagName.includes("-") && (t === "value" || t === "checked" || t === "selected") && cl(e, t, r, o, a, t !== "value")) : e._isVueCE && (Tl(e, t) || e._def.__asyncLoader && (/[A-Z]/.test(t) || !_e(r))) ? ll(e, ke(t), r, a, t) : (t === "true-value" ? e._trueValue = r : t === "false-value" && (e._falseValue = r), cl(e, t, r, o));
4406
+ t === "class" ? Kc(e, r, o) : t === "style" ? $c(e, n, r) : de(t) ? fe(t) || pl(e, t, n, r, a) : (t[0] === "." ? (t = t.slice(1), !0) : t[0] === "^" ? (t = t.slice(1), !1) : wl(e, t, r, o)) ? (ll(e, t, r), !e.tagName.includes("-") && (t === "value" || t === "checked" || t === "selected") && cl(e, t, r, o, a, t !== "value")) : e._isVueCE && (Tl(e, t) || e._def.__asyncLoader && (/[A-Z]/.test(t) || !_e(r))) ? ll(e, ke(t), r, a, t) : (t === "true-value" ? e._trueValue = r : t === "false-value" && (e._falseValue = r), cl(e, t, r, o));
4407
4407
  };
4408
4408
  function wl(e, t, n, r) {
4409
4409
  if (r) return !!(t === "innerHTML" || t === "textContent" || t in e && Sl(t) && H(n));
@@ -4497,7 +4497,7 @@ var jl = {
4497
4497
  let r = je(n.key);
4498
4498
  if (t.some((e) => e === r || Fl[e] === r)) return e(n);
4499
4499
  }));
4500
- }, Ll = /* @__PURE__ */ fe({ patchProp: Cl }, Tc), Rl;
4500
+ }, Ll = /* @__PURE__ */ R({ patchProp: Cl }, Tc), Rl;
4501
4501
  function zl() {
4502
4502
  return Rl ||= $o(Ll);
4503
4503
  }
@@ -6429,52 +6429,52 @@ function vp(e) {
6429
6429
  return Array.isArray(r) && r.length && r[0] && typeof r[0].jsonPath == "string" ? r[0].jsonPath : "";
6430
6430
  }
6431
6431
  function yp(e) {
6432
- let { apiKey: t, baseUrl: s, model: c = "deepseek-v4-flash", temperature: l = .7, maxTokens: u, extraBody: d, extraConfig: f, systemPrompt: p, tools: m = [], middleware: h = [], maxToolRounds: g, maxIterations: _, maxRetries: v = 2, retryDelayMs: y = 500, stallMs: b = $u, streamMaxMs: x = td, toolTimeoutMs: S, maxParallelTools: C = 1, maxVerifyAttempts: w = 0, roundTokenBudget: T = 0, onLog: E, onLlmChange: j, imageContentFormat: M = "openai", staleReadInvalidation: te = !0, debug: P = !1 } = e, F = g ?? cp;
6433
- (!Number.isFinite(F) || F < 1) && (console.warn(`[page-agent-sdk] maxToolRounds=${F} 非法(须 ≥1 正整数),已 clamp 到 1(0/负数致主循环 while 不进 → agent 不调 LLM 静默返回兜底文案)`), F = 1);
6434
- let I = D({
6432
+ let { apiKey: t, baseUrl: s, model: c = "deepseek-v4-flash", temperature: l = .7, maxTokens: u, extraBody: d, extraConfig: f, systemPrompt: p, tools: m = [], middleware: h = [], maxToolRounds: g, maxIterations: _, maxRetries: v = 2, retryDelayMs: y = 500, stallMs: b = $u, streamMaxMs: x = td, toolTimeoutMs: S, maxParallelTools: C = 1, maxVerifyAttempts: w = 0, roundTokenBudget: T = 0, onLog: E, onLlmChange: j, imageContentFormat: M = "openai", staleReadInvalidation: te = !0, debug: ne = !1 } = e, P = g ?? cp;
6433
+ (!Number.isFinite(P) || P < 1) && (console.warn(`[page-agent-sdk] maxToolRounds=${P} 非法(须 ≥1 正整数),已 clamp 到 1(0/负数致主循环 while 不进 → agent 不调 LLM 静默返回兜底文案)`), P = 1);
6434
+ let F = D({
6435
6435
  model: c,
6436
6436
  contextWindow: e.contextWindow,
6437
6437
  maxOutputTokens: e.maxOutputTokens,
6438
6438
  vision: e.vision
6439
- }), ie = u ?? I.maxOutputTokens, ae = k(I.contextWindow), se = A(I.contextWindow);
6440
- function ce(e) {
6441
- I = e, ae = k(I.contextWindow), se = A(I.contextWindow);
6439
+ }), ae = u ?? F.maxOutputTokens, oe = k(F.contextWindow), ce = A(F.contextWindow);
6440
+ function le(e) {
6441
+ F = e, oe = k(F.contextWindow), ce = A(F.contextWindow);
6442
6442
  }
6443
- let L = /* @__PURE__ */ zn([]), R = 0, le = () => ({
6443
+ let I = /* @__PURE__ */ zn([]), L = 0, ue = () => ({
6444
6444
  retries: 0,
6445
6445
  exhausted: 0
6446
- }), ue = {
6447
- transitional_retry: le(),
6448
- completion_gate: le(),
6449
- evidence_audit_gate: le(),
6450
- zero_tool_gate: le(),
6451
- status_query_gate: le(),
6452
- ...e.pageAssertionGate === !0 ? { page_assertion_gate: le() } : {}
6453
- }, de = {
6446
+ }), de = {
6447
+ transitional_retry: ue(),
6448
+ completion_gate: ue(),
6449
+ evidence_audit_gate: ue(),
6450
+ zero_tool_gate: ue(),
6451
+ status_query_gate: ue(),
6452
+ ...e.pageAssertionGate === !0 ? { page_assertion_gate: ue() } : {}
6453
+ }, fe = {
6454
6454
  ZERO_TOOL_GATE_EXHAUSTED: "zero_tool_gate",
6455
6455
  AUDIT_GATE_EXHAUSTED: "evidence_audit_gate",
6456
6456
  COMPLETION_GATE_EXHAUSTED: "completion_gate",
6457
6457
  PAGE_ASSERTION_GATE_EXHAUSTED: "page_assertion_gate"
6458
- }, fe = [], pe = 0, me = 0, z = /* @__PURE__ */ new Set();
6458
+ }, R = [], pe = 0, me = 0, z = /* @__PURE__ */ new Set();
6459
6459
  function B(e, t) {
6460
6460
  let n = {
6461
6461
  timestamp: Date.now(),
6462
6462
  type: e,
6463
6463
  data: pp(t)
6464
6464
  };
6465
- L.value.push(n), L.value.length > lp && L.value.splice(0, L.value.length - lp), Hn(L), E?.(n), P && console.log(`%c[Agent] ${e}`, "color:#667eea;font-weight:bold", t);
6465
+ I.value.push(n), I.value.length > lp && I.value.splice(0, I.value.length - lp), Hn(I), E?.(n), ne && console.log(`%c[Agent] ${e}`, "color:#667eea;font-weight:bold", t);
6466
6466
  }
6467
6467
  let V = (e) => {
6468
- L.value.push({
6468
+ I.value.push({
6469
6469
  ...e,
6470
6470
  timestamp: typeof e.timestamp == "number" ? e.timestamp : Date.now(),
6471
6471
  data: pp(e.data)
6472
- }), L.value.length > lp && L.value.splice(0, L.value.length - lp), Hn(L);
6472
+ }), I.value.length > lp && I.value.splice(0, I.value.length - lp), Hn(I);
6473
6473
  }, he = [...h.flatMap((e) => e.tools || []), ...m], ge = e.llm ?? new n({
6474
6474
  apiKey: t,
6475
6475
  model: c,
6476
6476
  temperature: l,
6477
- maxTokens: ie,
6477
+ maxTokens: ae,
6478
6478
  maxRetries: 0,
6479
6479
  configuration: {
6480
6480
  ...s ? { baseURL: N(s) } : {},
@@ -6511,16 +6511,16 @@ function yp(e) {
6511
6511
  pin: be.has(e.name)
6512
6512
  });
6513
6513
  }
6514
- let n = Math.max(2e3, Math.round(I.contextWindow * ye)), r = O(e) + t.reduce((e, t) => e + t.tokens, 0), i = /* @__PURE__ */ new Set();
6514
+ let n = Math.max(2e3, Math.round(F.contextWindow * ye)), r = O(e) + t.reduce((e, t) => e + t.tokens, 0), i = /* @__PURE__ */ new Set();
6515
6515
  if (r > n) {
6516
6516
  let e = r, a = [];
6517
6517
  for (let e of t.filter((e) => !e.pin).sort((e, t) => t.tokens - e.tokens)) {
6518
6518
  if (r <= n) break;
6519
6519
  a.push(`${e.name}(${e.tokens})`), i.add(e.name), r -= e.tokens, e.text = "";
6520
6520
  }
6521
- a.length && console.warn(`[page-agent-sdk] 系统段超预算(${e} > ${n} tokens,窗口 ${I.contextWindow} 的 ${ye * 100}%),drop 非核心段:${a.join(", ")}(保 base/mission/workingMemory)`);
6521
+ a.length && console.warn(`[page-agent-sdk] 系统段超预算(${e} > ${n} tokens,窗口 ${F.contextWindow} 的 ${ye * 100}%),drop 非核心段:${a.join(", ")}(保 base/mission/workingMemory)`);
6522
6522
  }
6523
- return fe = t.map((e) => ({
6523
+ return R = t.map((e) => ({
6524
6524
  name: e.name,
6525
6525
  tokens: e.tokens,
6526
6526
  dropped: i.has(e.name)
@@ -6529,7 +6529,7 @@ function yp(e) {
6529
6529
  function Se(e) {
6530
6530
  let t = [new a(xe())];
6531
6531
  for (let n of e) if (n.role === "user") {
6532
- let e = n.quote ? bu(n.content, n.quote) : n.content, r = I.vision && n.images?.length ? au(e, n.images, M) : null;
6532
+ let e = n.quote ? bu(n.content, n.quote) : n.content, r = F.vision && n.images?.length ? au(e, n.images, M) : null;
6533
6533
  r ? t.push(new i({ content: r })) : n.images?.some((e) => e.description) ? t.push(new i(ou(e, n.images))) : t.push(new i(e));
6534
6534
  } else n.role === "assistant" ? t.push(new r(n.content)) : n.role === "system" && t.push(new a(n.content));
6535
6535
  return t;
@@ -6578,13 +6578,13 @@ function yp(e) {
6578
6578
  };
6579
6579
  if (rd(a) && !e._ctxRetry) {
6580
6580
  e._ctxRetry = !0;
6581
- let r = (e) => O(typeof e.content == "string" ? e.content : JSON.stringify(e.content)), a = e.messages.reduce((e, t) => e + r(t), 0), o = De(e.messages, Math.round(I.contextWindow * .3)), s = o.reduce((e, t) => e + r(t), 0);
6581
+ let r = (e) => O(typeof e.content == "string" ? e.content : JSON.stringify(e.content)), a = e.messages.reduce((e, t) => e + r(t), 0), o = De(e.messages, Math.round(F.contextWindow * .3)), s = o.reduce((e, t) => e + r(t), 0);
6582
6582
  return B("error", {
6583
6583
  stage: "context_overflow_retry",
6584
6584
  at: "launch",
6585
6585
  beforeTokens: a,
6586
6586
  afterTokens: s,
6587
- window: I.contextWindow
6587
+ window: F.contextWindow
6588
6588
  }), console.warn(`[page-agent-sdk] 上下文超限(启动)→ 激进 trim 重试:${a} → ${s} tokens`), we({
6589
6589
  ...e,
6590
6590
  messages: o
@@ -6611,12 +6611,12 @@ function yp(e) {
6611
6611
  try {
6612
6612
  for await (let e of nd(c, b, x)) {
6613
6613
  l = l ? l.concat(e) : e;
6614
- let n = ne(e);
6614
+ let n = re(e);
6615
6615
  n && t && (u += n, t({
6616
6616
  type: "text",
6617
6617
  delta: n
6618
6618
  }));
6619
- let r = re(e);
6619
+ let r = ie(e);
6620
6620
  r && t && t({
6621
6621
  type: "reasoning",
6622
6622
  delta: r
@@ -6637,13 +6637,13 @@ function yp(e) {
6637
6637
  };
6638
6638
  if (rd(a) && l === null && u === "" && !e._ctxRetry) {
6639
6639
  e._ctxRetry = !0;
6640
- let r = (e) => O(typeof e.content == "string" ? e.content : JSON.stringify(e.content)), a = e.messages.reduce((e, t) => e + r(t), 0), o = De(e.messages, Math.round(I.contextWindow * .3)), s = o.reduce((e, t) => e + r(t), 0);
6640
+ let r = (e) => O(typeof e.content == "string" ? e.content : JSON.stringify(e.content)), a = e.messages.reduce((e, t) => e + r(t), 0), o = De(e.messages, Math.round(F.contextWindow * .3)), s = o.reduce((e, t) => e + r(t), 0);
6641
6641
  return B("error", {
6642
6642
  stage: "context_overflow_retry",
6643
6643
  beforeTokens: a,
6644
6644
  afterTokens: s,
6645
- window: I.contextWindow
6646
- }), console.warn(`[page-agent-sdk] 上下文超限 → 激进 trim 重试:${a} → ${s} tokens(窗口 ${I.contextWindow})`), we({
6645
+ window: F.contextWindow
6646
+ }), console.warn(`[page-agent-sdk] 上下文超限 → 激进 trim 重试:${a} → ${s} tokens(窗口 ${F.contextWindow})`), we({
6647
6647
  ...e,
6648
6648
  messages: o
6649
6649
  }, t, n, i);
@@ -6745,8 +6745,8 @@ function yp(e) {
6745
6745
  files: e.state.files,
6746
6746
  vfsAvailable: !!e.state.files && o,
6747
6747
  toolName: e.name,
6748
- threshold: ae,
6749
- passThroughChars: se
6748
+ threshold: oe,
6749
+ passThroughChars: ce
6750
6750
  }).content, {
6751
6751
  content: a,
6752
6752
  status: "done"
@@ -6765,7 +6765,7 @@ function yp(e) {
6765
6765
  return mp(e, t);
6766
6766
  }
6767
6767
  function Oe(e) {
6768
- return !P && !E ? [] : e.map((e) => {
6768
+ return !ne && !E ? [] : e.map((e) => {
6769
6769
  let t = Ee(e), n = { role: t === "human" ? "user" : t === "ai" ? "assistant" : t }, r = typeof e.content == "string" ? e.content : JSON.stringify(e.content);
6770
6770
  r && (n.content = r.length > up ? r.slice(0, up) + `…(截断 ${r.length - up} 字符)` : r);
6771
6771
  let i = e.tool_calls;
@@ -6793,9 +6793,9 @@ function yp(e) {
6793
6793
  });
6794
6794
  }
6795
6795
  {
6796
- let e = O(p || "你是一个智能助手。"), t = Math.max(2e3, Math.round(I.contextWindow * ye));
6796
+ let e = O(p || "你是一个智能助手。"), t = Math.max(2e3, Math.round(F.contextWindow * ye));
6797
6797
  if (e > t) {
6798
- let r = `[page-agent-sdk] systemPrompt 本身(${e} tokens)超过系统段预算(${t} tokens,窗口 ${I.contextWindow} 的 ${ye * 100}%);请缩减 systemPrompt 或换更大窗口模型`;
6798
+ let r = `[page-agent-sdk] systemPrompt 本身(${e} tokens)超过系统段预算(${t} tokens,窗口 ${F.contextWindow} 的 ${ye * 100}%);请缩减 systemPrompt 或换更大窗口模型`;
6799
6799
  return console.error(r), n({
6800
6800
  type: "error",
6801
6801
  message: r,
@@ -6815,7 +6815,7 @@ function yp(e) {
6815
6815
  });
6816
6816
  let l = ep(h, (e) => we(e, n, r)), u = tp(h, Te), d = {
6817
6817
  rounds: 0,
6818
- maxToolRounds: F,
6818
+ maxToolRounds: P,
6819
6819
  invokeUsage: {
6820
6820
  prompt_tokens: 0,
6821
6821
  completion_tokens: 0,
@@ -6834,8 +6834,8 @@ function yp(e) {
6834
6834
  }])), v = /* @__PURE__ */ new Map(), y = 0, b = (e) => {
6835
6835
  let t = he.find((t) => t.name === e);
6836
6836
  return t && "writeCapable" in t ? typeof t.writeCapable == "function" || t.writeCapable === !0 : _p.has(e);
6837
- }, x = 0, S = 0, E = hp(F, _), D = null, k = 0, A = !1, j = !1;
6838
- for (; (x < F || j) && S < E && (S++, !r?.aborted);) {
6837
+ }, x = 0, S = 0, E = hp(P, _), D = null, k = 0, A = !1, j = !1;
6838
+ for (; (x < P || j) && S < E && (S++, !r?.aborted);) {
6839
6839
  if (T > 0 && d.invokeUsage.total_tokens > T) {
6840
6840
  let e = `本轮 token 预算(约 ${T})已用尽:任务在 ${x} 轮工具调用后中断,已完成的部分均保留。可继续对话,指定下一步(如「继续完成」/「只改 X」/「提高预算重试」)。`;
6841
6841
  return B("error", {
@@ -6863,7 +6863,7 @@ function yp(e) {
6863
6863
  }), U = Xf(h, {
6864
6864
  messages: c,
6865
6865
  state: U
6866
- }), c = Ce(c, gp(x, F, e.hasSubagent)), c = De(c, Math.round(I.contextWindow * .6)), B("llm_request", {
6866
+ }), c = Ce(c, gp(x, P, e.hasSubagent)), c = De(c, Math.round(F.contextWindow * .6)), B("llm_request", {
6867
6867
  round: x + 1,
6868
6868
  model: _e(),
6869
6869
  tools: he.map((e) => e.name),
@@ -6874,7 +6874,7 @@ function yp(e) {
6874
6874
  state: U
6875
6875
  });
6876
6876
  c.push(t.message);
6877
- let a = oe(t.message);
6877
+ let a = se(t.message);
6878
6878
  if (B("llm_response", {
6879
6879
  round: x + 1,
6880
6880
  content: t.content,
@@ -6886,7 +6886,7 @@ function yp(e) {
6886
6886
  }), t.content;
6887
6887
  if (!t.toolCalls.length) {
6888
6888
  {
6889
- let e = t.message?.response_metadata ?? t.message?.responseMetadata, n = e?.stop_reason ?? e?.finish_reason, r = oe(t.message);
6889
+ let e = t.message?.response_metadata ?? t.message?.responseMetadata, n = e?.stop_reason ?? e?.finish_reason, r = se(t.message);
6890
6890
  if ((n === "length" || !t.content && (r?.completion_tokens ?? 0) >= 4e3) && !A) {
6891
6891
  A = !0, j = !0, B("error", {
6892
6892
  stage: "completion_truncated_retry",
@@ -6950,7 +6950,7 @@ function yp(e) {
6950
6950
  });
6951
6951
  if (a?.kind === "feedback") {
6952
6952
  j = !0;
6953
- let e = ue[a.gate.stage];
6953
+ let e = de[a.gate.stage];
6954
6954
  e && (e.retries += 1), B("middleware", {
6955
6955
  stage: a.gate.stage,
6956
6956
  attempt: a.gate.attempt,
@@ -6960,8 +6960,8 @@ function yp(e) {
6960
6960
  continue;
6961
6961
  }
6962
6962
  if (a?.kind === "observable") {
6963
- let e = de[a.obs.code];
6964
- e && ue[e] && (ue[e].exhausted += 1), B("error", {
6963
+ let e = fe[a.obs.code];
6964
+ e && de[e] && (de[e].exhausted += 1), B("error", {
6965
6965
  stage: a.obs.code,
6966
6966
  ...a.obs.context,
6967
6967
  content: t.content.slice(0, 160)
@@ -7116,7 +7116,7 @@ function yp(e) {
7116
7116
  round: x + 1,
7117
7117
  maxParallelTools: C
7118
7118
  });
7119
- e.invalidatedCount > 0 && (c = e.messages, R += e.invalidatedCount, B("middleware", {
7119
+ e.invalidatedCount > 0 && (c = e.messages, L += e.invalidatedCount, B("middleware", {
7120
7120
  stage: "stale_read_invalidated",
7121
7121
  round: x + 1,
7122
7122
  writtenPaths: E.map((e) => vp(e.args) || "(整体)"),
@@ -7130,28 +7130,28 @@ function yp(e) {
7130
7130
  type: "done",
7131
7131
  content: ""
7132
7132
  }), "";
7133
- let M = `\n\n(提示:工具调用次数已达上限(${F} 轮 / ${E} 次迭代),以上为基于已完成操作的阶段性结果,任务可能未完成。回复「继续」或告诉我下一步重点,即可接着做。)`;
7133
+ let M = `\n\n(提示:工具调用次数已达上限(${P} 轮 / ${E} 次迭代),以上为基于已完成操作的阶段性结果,任务可能未完成。回复「继续」或告诉我下一步重点,即可接着做。)`;
7134
7134
  B("error", {
7135
7135
  stage: "react_call_limit_exceeded",
7136
7136
  rounds: x,
7137
- maxToolRounds: F,
7137
+ maxToolRounds: P,
7138
7138
  iterations: S,
7139
7139
  maxIterations: E
7140
7140
  }), n({
7141
7141
  type: "error",
7142
- message: `ReAct 循环达到调用上限(rounds=${x}/${F},iterations=${S}/${E}),已强制收口,可回复「继续」。`,
7142
+ message: `ReAct 循环达到调用上限(rounds=${x}/${P},iterations=${S}/${E}),已强制收口,可回复「继续」。`,
7143
7143
  severity: "observable",
7144
7144
  code: "REACT_CALL_LIMIT_EXCEEDED",
7145
7145
  context: {
7146
7146
  rounds: x,
7147
- maxToolRounds: F,
7147
+ maxToolRounds: P,
7148
7148
  iterations: S,
7149
7149
  maxIterations: E
7150
7150
  }
7151
7151
  });
7152
7152
  let ee = Gf(U.todos ?? [], g, z);
7153
7153
  if (ee.length) {
7154
- ue.evidence_audit_gate.exhausted += 1;
7154
+ de.evidence_audit_gate.exhausted += 1;
7155
7155
  let e = ee.map((e) => ({
7156
7156
  id: e.id,
7157
7157
  evidence: e.evidence
@@ -7215,11 +7215,11 @@ function yp(e) {
7215
7215
  }), e + M;
7216
7216
  }
7217
7217
  }
7218
- let P = "我已完成本轮能做的操作,但未能综合出最终结论。请基于上方已完成的工具操作结果继续,或告诉我下一步重点。";
7218
+ let ne = "我已完成本轮能做的操作,但未能综合出最终结论。请基于上方已完成的工具操作结果继续,或告诉我下一步重点。";
7219
7219
  return n({
7220
7220
  type: "done",
7221
- content: P + M
7222
- }), P + M;
7221
+ content: ne + M
7222
+ }), ne + M;
7223
7223
  } finally {
7224
7224
  try {
7225
7225
  await Qf(h, U);
@@ -7248,19 +7248,19 @@ function yp(e) {
7248
7248
  get allTools() {
7249
7249
  return he;
7250
7250
  },
7251
- getStaleReadsInvalidated: () => R,
7251
+ getStaleReadsInvalidated: () => L,
7252
7252
  getLlmRetries: () => pe,
7253
7253
  getLlmCallFailures: () => me,
7254
- getGateStats: () => ue,
7255
- getLastSystemSegments: () => fe,
7254
+ getGateStats: () => de,
7255
+ getLastSystemSegments: () => R,
7256
7256
  resetSessionCounters: () => {
7257
- R = 0, pe = 0, me = 0;
7258
- for (let e of Object.keys(ue)) ue[e] = le();
7257
+ L = 0, pe = 0, me = 0;
7258
+ for (let e of Object.keys(de)) de[e] = ue();
7259
7259
  },
7260
7260
  setTools: je,
7261
7261
  setLlm: Me,
7262
- setModelCaps: ce,
7263
- debugLogs: L,
7262
+ setModelCaps: le,
7263
+ debugLogs: I,
7264
7264
  getEffectiveSystemPrompt: () => xe()
7265
7265
  };
7266
7266
  }
@@ -7754,6 +7754,8 @@ var Qp = {
7754
7754
  " → 直接给判断和理由;笔记口径与个人观点分开说(「本页的立场是…;我的看法是…」)。",
7755
7755
  " 页面没写不构成不答的理由。",
7756
7756
  "",
7757
+ "已懂不查:已是通用知识或对话里已读过的内容,直接用 —— 不必为同一信息再读页面;",
7758
+ "只有要断言「页面上写了什么」时才需要读页核实。",
7757
7759
  "出处密度:只有「对页面内容的断言」才标出处(句末括注即可);概念解释、个人观点、",
7758
7760
  "过渡句一律不标。「没找到」的说明压成一句,不报检索过程。"
7759
7761
  ].join("\n"),
@@ -7769,6 +7771,8 @@ var Qp = {
7769
7771
  " → Give your judgment and reasoning directly; keep the notes' stance and your own view separate (\"this page's position is ...; my take is ...\").",
7770
7772
  " The page not covering it is never a reason to refuse.",
7771
7773
  "",
7774
+ "Known means no lookup: use general knowledge you already master, and anything already read in this conversation,",
7775
+ "directly — never re-read the page for information you already have; only claims about \"what the page says\" require reading to verify.",
7772
7776
  "Citation density: only claims about page content get a citation (a short parenthetical); concept explanations,",
7773
7777
  "personal opinions, and transitions get none. Compress \"not found\" statements to one sentence; never narrate the search process."
7774
7778
  ].join("\n"),
@@ -8967,7 +8971,7 @@ async function Kh(e, t, n, r, i, a) {
8967
8971
  } : { contextWindow: g.contextWindow }), v = t.onUsage ? {
8968
8972
  name: "sub-usage",
8969
8973
  afterModel: (e) => {
8970
- let n = oe(e.message);
8974
+ let n = se(e.message);
8971
8975
  n && t.onUsage(n);
8972
8976
  }
8973
8977
  } : void 0;
@@ -8992,7 +8996,7 @@ async function Kh(e, t, n, r, i, a) {
8992
8996
  });
8993
8997
  }
8994
8998
  let b;
8995
- !Oh(y) && y.provider === "anthropic" && (b = await I({
8999
+ !Oh(y) && y.provider === "anthropic" && (b = await F({
8996
9000
  ...y,
8997
9001
  model: e.model ?? y.model
8998
9002
  }, {
@@ -11825,32 +11829,32 @@ function rv(e, n = {}) {
11825
11829
  let N = (e) => {
11826
11830
  let t = k();
11827
11831
  return T(t, e), t;
11828
- }, te = n.largeTextThreshold ?? 200, P = (n.largeTextPaths ?? []).map((e) => {
11832
+ }, te = n.largeTextThreshold ?? 200, ne = (n.largeTextPaths ?? []).map((e) => {
11829
11833
  let t = e.lastIndexOf(".");
11830
11834
  return t > 0 ? {
11831
11835
  arrayPath: e.slice(0, t),
11832
11836
  field: e.slice(t + 1)
11833
11837
  } : null;
11834
- }).filter((e) => e !== null), F = !0;
11835
- function I() {
11836
- F = !0;
11838
+ }).filter((e) => e !== null), P = !0;
11839
+ function F() {
11840
+ P = !0;
11837
11841
  }
11838
- let ne = {
11842
+ let re = {
11839
11843
  get: () => ({
11840
11844
  schema: o,
11841
11845
  bind: c,
11842
11846
  description: u
11843
11847
  }),
11844
11848
  set: (e) => {
11845
- o = r.length ? Jp(e.schema, r).schema : e.schema, c = e.bind, u = e.description ?? "主数据对象", d = bp(o), g.length = 0, v.clear(), m(e.resources), p?.clear(), I();
11849
+ o = r.length ? Jp(e.schema, r).schema : e.schema, c = e.bind, u = e.description ?? "主数据对象", d = bp(o), g.length = 0, v.clear(), m(e.resources), p?.clear(), F();
11846
11850
  },
11847
11851
  update: (e) => {
11848
- c = e, g.length = 0, v.clear(), I();
11852
+ c = e, g.length = 0, v.clear(), F();
11849
11853
  },
11850
- markDataDirty: I,
11854
+ markDataDirty: F,
11851
11855
  consumeDataDirty: () => {
11852
- let e = F;
11853
- return F = !1, e;
11856
+ let e = P;
11857
+ return P = !1, e;
11854
11858
  },
11855
11859
  enterScope: (e) => {
11856
11860
  let t = y;
@@ -11904,14 +11908,14 @@ function rv(e, n = {}) {
11904
11908
  } : void 0,
11905
11909
  updateResource: p ? (e, t) => {
11906
11910
  let n = T_(e);
11907
- p.update(n, t), mm(c, n, t), I(), T(k(), "");
11911
+ p.update(n, t), mm(c, n, t), F(), T(k(), "");
11908
11912
  } : void 0,
11909
11913
  deleteResource: p ? (e) => p.delete(e) : void 0,
11910
11914
  listResources: p ? () => p.list() : void 0
11911
- }, re = (e) => {
11915
+ }, ie = (e) => {
11912
11916
  n.onAudit?.(e);
11913
11917
  };
11914
- function ie(e, t) {
11918
+ function ae(e, t) {
11915
11919
  let n = gm(l()), r = g.length ? g[g.length - 1].id + 1 : 1;
11916
11920
  for (g.push({
11917
11921
  id: r,
@@ -11922,7 +11926,7 @@ function rv(e, n = {}) {
11922
11926
  }); g.length > _;) g.shift();
11923
11927
  return r;
11924
11928
  }
11925
- async function ae(e, t, r, i, a) {
11929
+ async function oe(e, t, r, i, a) {
11926
11930
  if (!t || t === "") return null;
11927
11931
  let o = k();
11928
11932
  if (o === t) return null;
@@ -11944,7 +11948,7 @@ function rv(e, n = {}) {
11944
11948
  if (u.action === "restore") {
11945
11949
  await i?.reacquire();
11946
11950
  let e = k();
11947
- if (e !== o) return re({
11951
+ if (e !== o) return ie({
11948
11952
  op: "conflict_recheck",
11949
11953
  detail: `restore 裁决基于 ${o} 恢复时 ${e}(ask 窗口新修改落地,回退被拦)`,
11950
11954
  timestamp: Date.now()
@@ -11960,13 +11964,13 @@ function rv(e, n = {}) {
11960
11964
  message: `restore 裁决所锚定的快照 #${s} 已不在快照栈(可能被 maxSnapshots 淘汰)`,
11961
11965
  hint: "重新 read 拿最新值,或用 restore_data 显式指定快照 id 回退"
11962
11966
  });
11963
- km(c, gm(t.value)), I();
11967
+ km(c, gm(t.value)), F();
11964
11968
  let n = k();
11965
11969
  return T(n, a), `已回退主数据到历史快照 #${t.id}[${t.op}]。当前值:${xm(l(), 400)} (hash=${n})。请基于回退后的值重写或停止。`;
11966
11970
  }
11967
11971
  await i?.reacquire();
11968
11972
  let d = k();
11969
- return d === o ? (T(d, a), null) : (re({
11973
+ return d === o ? (T(d, a), null) : (ie({
11970
11974
  op: "conflict_recheck",
11971
11975
  detail: `裁决基于 ${o} 恢复时 ${d}(ask 窗口新修改落地,overwrite 被拦)`,
11972
11976
  timestamp: Date.now()
@@ -11976,9 +11980,9 @@ function rv(e, n = {}) {
11976
11980
  hint: "重新 read 拿最新值与 hash,基于最新值修改后再写入(单次校验,不再二次挂起)。"
11977
11981
  }));
11978
11982
  }
11979
- let oe = (e, t = !0) => {
11983
+ let se = (e, t = !0) => {
11980
11984
  e.writeCapable = t;
11981
- }, se = s(async ({ id: e }, t) => {
11985
+ }, ce = s(async ({ id: e }, t) => {
11982
11986
  let n = b(t), r = await ee();
11983
11987
  try {
11984
11988
  if (!g.length) return $({
@@ -11993,7 +11997,7 @@ function rv(e, n = {}) {
11993
11997
  hint: "用 history_data({list:true}) 查看可用快照序号"
11994
11998
  });
11995
11999
  let r = o.safeParse(t.value);
11996
- r.success || re({
12000
+ r.success || ie({
11997
12001
  op: "restore",
11998
12002
  detail: `#${t.id} 快照含当前 schema 违例 ${r.error.issues.length} 处(历史既有数据非本次写入,放行回退)`,
11999
12003
  timestamp: Date.now()
@@ -12006,7 +12010,7 @@ function rv(e, n = {}) {
12006
12010
  cur: n
12007
12011
  });
12008
12012
  }
12009
- if (!i.length) return km(c, gm(t.value)), I(), re({
12013
+ if (!i.length) return km(c, gm(t.value)), F(), ie({
12010
12014
  op: "restore",
12011
12015
  detail: `#${t.id}`,
12012
12016
  timestamp: Date.now()
@@ -12039,7 +12043,7 @@ function rv(e, n = {}) {
12039
12043
  }
12040
12044
  e.val === void 0 ? l.push(e.p) : mm(c, n, e.val), s.push(e.p);
12041
12045
  }
12042
- I(), re({
12046
+ F(), ie({
12043
12047
  op: "restore",
12044
12048
  detail: `#${t.id}(保护字段保留 ${s.length}${l.length ? `,未能回填 ${l.length}` : ""})`,
12045
12049
  timestamp: Date.now()
@@ -12054,8 +12058,8 @@ function rv(e, n = {}) {
12054
12058
  description: "把主数据回退到某个快照(不传 id 回退最近一次)。快照列表用 history_data({list:true})。",
12055
12059
  schema: t.object({ id: t.number().int().optional().describe("快照序号;不传回退最近一次") })
12056
12060
  });
12057
- oe(se);
12058
- let ce = s(async ({ id: e, jsonPath: t, list: n }) => {
12061
+ se(ce);
12062
+ let le = s(async ({ id: e, jsonPath: t, list: n }) => {
12059
12063
  if (n) {
12060
12064
  if (!g.length) return "无快照。set/edit/delete 会自动存快照。";
12061
12065
  let e = g.map((e) => {
@@ -12100,7 +12104,7 @@ function rv(e, n = {}) {
12100
12104
  jsonPath: t.string().optional().describe("只看快照的某子路径"),
12101
12105
  list: t.boolean().optional().describe("true 列出快照时间线(序号/操作/标签/时间/大小)")
12102
12106
  })
12103
- }), L = s(async ({ expr: e, queries: t, limit: n }, r) => {
12107
+ }), I = s(async ({ expr: e, queries: t, limit: n }, r) => {
12104
12108
  let i = b(r);
12105
12109
  if (typeof c != "object" || !c) return $({
12106
12110
  code: "NOT_OBJECT",
@@ -12119,7 +12123,7 @@ function rv(e, n = {}) {
12119
12123
  details: { expr: e }
12120
12124
  });
12121
12125
  }
12122
- let r = n ?? 50, o = t.slice(0, r), c = o.map((e) => `{"path":${JSON.stringify(e.path)},"index":${e.index === void 0 ? "null" : e.index},"value":${xm(Q_(e.value, i === "", P, te, {
12126
+ let r = n ?? 50, o = t.slice(0, r), c = o.map((e) => `{"path":${JSON.stringify(e.path)},"index":${e.index === void 0 ? "null" : e.index},"value":${xm(Q_(e.value, i === "", ne, te, {
12123
12127
  rootExempt: !1,
12124
12128
  rootPath: String(e.path ?? ""),
12125
12129
  fullTextPrefixes: s,
@@ -12143,7 +12147,7 @@ function rv(e, n = {}) {
12143
12147
  queries: t.array(t.string()).min(2).max(10).optional().describe("批量模式:2-10 条 JSONPath 一次取回(与 expr 同传按 queries);逐条独立返回,单条失败该项标 error 不整批"),
12144
12148
  limit: t.number().int().min(1).max(200).optional().describe("返回结果上限(批量时逐条适用),默认 50")
12145
12149
  })
12146
- }), R = s(async ({ query: e, mode: t, fuzzyThreshold: n, matchKey: r, limit: i }) => {
12150
+ }), L = s(async ({ query: e, mode: t, fuzzyThreshold: n, matchKey: r, limit: i }) => {
12147
12151
  if (c == null) return $({
12148
12152
  code: "EMPTY",
12149
12153
  message: "主数据为空,无可搜索内容"
@@ -12181,7 +12185,7 @@ function rv(e, n = {}) {
12181
12185
  matchKey: t.boolean().optional().describe("是否同时匹配 key 名,默认 true"),
12182
12186
  limit: t.number().int().min(1).max(200).optional().describe("返回上限,默认 50")
12183
12187
  })
12184
- }), le = s(async ({ script: e, mode: t, jsonPath: n }, r) => {
12188
+ }), ue = s(async ({ script: e, mode: t, jsonPath: n }, r) => {
12185
12189
  let s = b(r);
12186
12190
  if (e.length > 8e3) return $({
12187
12191
  code: "SCRIPT_TOO_LARGE",
@@ -12224,7 +12228,7 @@ function rv(e, n = {}) {
12224
12228
  if (u) {
12225
12229
  let e = await ee();
12226
12230
  try {
12227
- let n = await ae("edit", O ? w(s) : void 0, void 0, e, s);
12231
+ let n = await oe("edit", O ? w(s) : void 0, void 0, e, s);
12228
12232
  if (n !== null) return n;
12229
12233
  let r = K_({
12230
12234
  bindRef: c,
@@ -12237,13 +12241,13 @@ function rv(e, n = {}) {
12237
12241
  allowKeys: d,
12238
12242
  snapshots: g,
12239
12243
  maxSnapshots: _,
12240
- markDataDirty: I,
12244
+ markDataDirty: F,
12241
12245
  schemaErrorMode: "schema_invalid",
12242
12246
  snapshotLabel: "eval_transform_subtree",
12243
12247
  internalAfterWrite: a,
12244
12248
  protectedCtx: h
12245
12249
  });
12246
- return r.ok ? (re({
12250
+ return r.ok ? (ie({
12247
12251
  op: "edit",
12248
12252
  detail: `eval_transform_subtree @ ${u}`,
12249
12253
  timestamp: Date.now()
@@ -12260,7 +12264,7 @@ function rv(e, n = {}) {
12260
12264
  });
12261
12265
  let e = await ee();
12262
12266
  try {
12263
- let n = await ae("edit", O ? w(s) : void 0, void 0, e, s);
12267
+ let n = await oe("edit", O ? w(s) : void 0, void 0, e, s);
12264
12268
  if (n !== null) return n;
12265
12269
  let r = K_({
12266
12270
  bindRef: c,
@@ -12269,13 +12273,13 @@ function rv(e, n = {}) {
12269
12273
  allowKeys: d,
12270
12274
  snapshots: g,
12271
12275
  maxSnapshots: _,
12272
- markDataDirty: I,
12276
+ markDataDirty: F,
12273
12277
  schemaErrorMode: "schema_invalid",
12274
12278
  snapshotLabel: "eval_transform",
12275
12279
  internalAfterWrite: a,
12276
12280
  protectedCtx: h
12277
12281
  });
12278
- return r.ok ? (re({
12282
+ return r.ok ? (ie({
12279
12283
  op: "edit",
12280
12284
  detail: `eval_transform(${r.applied.length} patches)`,
12281
12285
  timestamp: Date.now()
@@ -12301,7 +12305,7 @@ function rv(e, n = {}) {
12301
12305
  });
12302
12306
  let i = await ee();
12303
12307
  try {
12304
- let e = await ae("set", O ? w(s) : void 0, n, i, s);
12308
+ let e = await oe("set", O ? w(s) : void 0, n, i, s);
12305
12309
  if (e !== null) return e;
12306
12310
  let t = a ? gm(l()) : null, r = U_({
12307
12311
  schema: o,
@@ -12309,7 +12313,7 @@ function rv(e, n = {}) {
12309
12313
  value: n,
12310
12314
  bindRef: c
12311
12315
  });
12312
- return r.ok ? (ie("edit", "eval_transform"), r.wholeParsed ? Am(c, r.assembly) : r.assembly !== null && typeof r.assembly == "object" && fm(c, r.assembly), I(), a && (a(c, t), I()), re({
12316
+ return r.ok ? (ae("edit", "eval_transform"), r.wholeParsed ? Am(c, r.assembly) : r.assembly !== null && typeof r.assembly == "object" && fm(c, r.assembly), F(), a && (a(c, t), F()), ie({
12313
12317
  op: "edit",
12314
12318
  detail: "eval_transform",
12315
12319
  timestamp: Date.now()
@@ -12337,8 +12341,8 @@ function rv(e, n = {}) {
12337
12341
  jsonPath: t.string().optional().describe("子树模式:仅对该子树执行;transform 返回值作为子树新值")
12338
12342
  })
12339
12343
  });
12340
- oe(le, (e) => e?.mode === "transform");
12341
- let ue = s(async ({ jsonPath: e, jsonPaths: t, fields: n, depth: r, offset: i, limit: a }, s) => {
12344
+ se(ue, (e) => e?.mode === "transform");
12345
+ let de = s(async ({ jsonPath: e, jsonPaths: t, fields: n, depth: r, offset: i, limit: a }, s) => {
12342
12346
  let c = b(s), f = x(s), p = l(), m, g = () => m ??= k();
12343
12347
  if (t && t.length) {
12344
12348
  let e = !1, i = t.map((t) => {
@@ -12357,7 +12361,7 @@ function rv(e, n = {}) {
12357
12361
  resolved: s,
12358
12362
  resourcesByPath: h.resourcesByPath,
12359
12363
  resourceStore: h.resourceStore
12360
- })), n && n.length && (s = ym(s, n)), r != null && (s = bm(s, r)), s = Q_(s, c === "", P, te, {
12364
+ })), n && n.length && (s = ym(s, n)), r != null && (s = bm(s, r)), s = Q_(s, c === "", ne, te, {
12361
12365
  rootExempt: !0,
12362
12366
  rootPath: i,
12363
12367
  fullTextPrefixes: f,
@@ -12405,7 +12409,7 @@ function rv(e, n = {}) {
12405
12409
  resolved: S,
12406
12410
  resourcesByPath: h.resourcesByPath,
12407
12411
  resourceStore: h.resourceStore
12408
- })), T(g(), c), n && n.length && (S = ym(S, n)), r != null && (S = bm(S, r)), S = Q_(S, c === "", P, te, {
12412
+ })), T(g(), c), n && n.length && (S = ym(S, n)), r != null && (S = bm(S, r)), S = Q_(S, c === "", ne, te, {
12409
12413
  rootExempt: !0,
12410
12414
  rootPath: _,
12411
12415
  fullTextPrefixes: f,
@@ -12428,7 +12432,7 @@ function rv(e, n = {}) {
12428
12432
  offset: t.number().int().min(0).optional().describe("数组分页起始偏移(仅数组目标,默认 0)"),
12429
12433
  limit: t.number().int().min(1).max(200).optional().describe("数组分页每页条数(默认 50,上限 200),返回切片+total/hasMore")
12430
12434
  })
12431
- }), de = s(async ({ value: e, patch: t, patches: n, del: i, dryRun: s }, u) => {
12435
+ }), fe = s(async ({ value: e, patch: t, patches: n, del: i, dryRun: s }, u) => {
12432
12436
  let f = b(u), p = "set";
12433
12437
  i ? p = "delete" : (n && n.length || t) && (p = "edit");
12434
12438
  let m = t?.value === void 0 ? e : t.value, v = await ee();
@@ -12466,19 +12470,19 @@ function rv(e, n = {}) {
12466
12470
  hint: e.spec.mode === "freeze" ? "冻结字段不可删" : "verbatim 字段不可直接删;先 resource_delete 释放"
12467
12471
  });
12468
12472
  }
12469
- let n = await ae("delete", e, void 0, v, f);
12473
+ let n = await oe("delete", e, void 0, v, f);
12470
12474
  if (n !== null) return n;
12471
12475
  if (s) {
12472
12476
  let e = gm(l());
12473
12477
  return hm(e, t.jsonPath) ? `dryRun(delete): 将删除 @ ${t.jsonPath}。预览剩余:${xm(e, 600)}。未实际写入、未入快照。` : `dryRun(delete): @ ${t.jsonPath} 不存在(无需删除)。未实际写入。`;
12474
12478
  }
12475
- ie("delete");
12479
+ ae("delete");
12476
12480
  let r = hm(c, t.jsonPath);
12477
- return I(), re({
12481
+ return F(), ie({
12478
12482
  op: "delete",
12479
12483
  detail: t.jsonPath,
12480
12484
  timestamp: Date.now()
12481
- }), a && (a(c, null), I()), T(k(), f), r ? `已删除主数据 @ ${t.jsonPath}` : `主数据 @ ${t.jsonPath} 不存在(无需删除)`;
12485
+ }), a && (a(c, null), F()), T(k(), f), r ? `已删除主数据 @ ${t.jsonPath}` : `主数据 @ ${t.jsonPath} 不存在(无需删除)`;
12482
12486
  }
12483
12487
  if (p === "edit") {
12484
12488
  if (typeof c != "object" || !c) return $({
@@ -12486,7 +12490,7 @@ function rv(e, n = {}) {
12486
12490
  message: `edit 仅适用于对象/数组主数据,当前是 ${c === void 0 ? "undefined" : typeof c}`,
12487
12491
  hint: "叶子用 write(value) 整体设置"
12488
12492
  });
12489
- let r = await ae("edit", e, void 0, v, f);
12493
+ let r = await oe("edit", e, void 0, v, f);
12490
12494
  if (r !== null) return r;
12491
12495
  let i = n && n.length ? n : [{
12492
12496
  op: t.op ?? "set",
@@ -12499,7 +12503,7 @@ function rv(e, n = {}) {
12499
12503
  allowKeys: d,
12500
12504
  snapshots: g,
12501
12505
  maxSnapshots: _,
12502
- markDataDirty: I,
12506
+ markDataDirty: F,
12503
12507
  schemaErrorMode: "zod",
12504
12508
  dryRun: s,
12505
12509
  internalAfterWrite: a,
@@ -12507,7 +12511,7 @@ function rv(e, n = {}) {
12507
12511
  });
12508
12512
  if (!l.ok) return l.error;
12509
12513
  if (s) return `dryRun(edit): ${l.applied.length} 个 patch 预检通过(schema 校验 OK)。预览结果:${xm(l.clone, 600)}。未实际写入、未入快照。`;
12510
- re({
12514
+ ie({
12511
12515
  op: "edit",
12512
12516
  detail: `${l.applied.length} 个 patch${l.applied.length > 1 ? "(批量)" : ""}`,
12513
12517
  value: l.applied.map((e) => `${e.op}@${e.jp}`),
@@ -12518,7 +12522,7 @@ function rv(e, n = {}) {
12518
12522
  }
12519
12523
  let i = vm(m);
12520
12524
  if (i.parseError) return Jl("", m, i.parseError);
12521
- let u = await ae("set", e, m, v, f);
12525
+ let u = await oe("set", e, m, v, f);
12522
12526
  if (u !== null) return u;
12523
12527
  let y = G_({
12524
12528
  bindRef: c,
@@ -12527,9 +12531,9 @@ function rv(e, n = {}) {
12527
12531
  allowKeys: d,
12528
12532
  snapshots: g,
12529
12533
  maxSnapshots: _,
12530
- audit: re,
12534
+ audit: ie,
12531
12535
  dryRun: s,
12532
- onWrite: I,
12536
+ onWrite: F,
12533
12537
  internalAfterWrite: a,
12534
12538
  protectedCtx: h,
12535
12539
  hashFn: k
@@ -12574,8 +12578,8 @@ function rv(e, n = {}) {
12574
12578
  dryRun: t.boolean().optional().describe("预检:走完整校验链但不落盘不入快照;冲突返回 VERSION_CONFLICT 不挂起")
12575
12579
  })
12576
12580
  });
12577
- oe(de);
12578
- let fe = s(async ({ jsonPath: e }) => {
12581
+ se(fe);
12582
+ let R = s(async ({ jsonPath: e }) => {
12579
12583
  let t = e || "", n = t ? Cp(o, t) : o;
12580
12584
  return n ? `schema${t ? ` @ ${t}` : ""} = ${xm(Up(n))}` : $({
12581
12585
  code: "PATH_DENIED",
@@ -12661,7 +12665,7 @@ function rv(e, n = {}) {
12661
12665
  }
12662
12666
  let f = await ee();
12663
12667
  try {
12664
- let n = await ae("set", O ? w(i) : void 0, u, f, i);
12668
+ let n = await oe("set", O ? w(i) : void 0, u, f, i);
12665
12669
  if (n !== null) return n;
12666
12670
  let r = G_({
12667
12671
  bindRef: c,
@@ -12670,9 +12674,9 @@ function rv(e, n = {}) {
12670
12674
  allowKeys: d,
12671
12675
  snapshots: g,
12672
12676
  maxSnapshots: _,
12673
- audit: re,
12677
+ audit: ie,
12674
12678
  op: "draft_commit",
12675
- onWrite: I,
12679
+ onWrite: F,
12676
12680
  internalAfterWrite: a,
12677
12681
  protectedCtx: h,
12678
12682
  hashFn: k
@@ -12686,7 +12690,7 @@ function rv(e, n = {}) {
12686
12690
  description: "把 draft_write 累积的草稿合并 + JSON.parse + 乐观锁 + schema 校验,原子提交主数据(任一步失败不写,草稿保留可修后重试;成功清草稿 + 自动快照可回退)。仅大 JSON 从零生成用;小改用 write。",
12687
12691
  schema: t.object({ draftId: t.string().describe("要提交的草稿标识(对应 draft_write 的 draftId)") })
12688
12692
  });
12689
- oe(l), me.push(i, l);
12693
+ se(l), me.push(i, l);
12690
12694
  }
12691
12695
  let z = [];
12692
12696
  if (e.resources?.length && p) {
@@ -12760,7 +12764,7 @@ function rv(e, n = {}) {
12760
12764
  }
12761
12765
  let l = await ee();
12762
12766
  try {
12763
- p.update(i, t), mm(c, i, t), T(k(), r), I();
12767
+ p.update(i, t), mm(c, i, t), T(k(), r), F();
12764
12768
  } finally {
12765
12769
  l.release();
12766
12770
  }
@@ -12774,7 +12778,7 @@ function rv(e, n = {}) {
12774
12778
  value: t.unknown().describe("新值(需符合字段 schema 类型)")
12775
12779
  })
12776
12780
  });
12777
- oe(n);
12781
+ se(n);
12778
12782
  let r = s(async () => {
12779
12783
  let e = p.list();
12780
12784
  if (!e.length) {
@@ -12805,17 +12809,17 @@ function rv(e, n = {}) {
12805
12809
  handle: t.string().optional().describe("占位符句柄(与 path 二选一)")
12806
12810
  })
12807
12811
  });
12808
- oe(i), z.push(e, n, r, i);
12812
+ se(i), z.push(e, n, r, i);
12809
12813
  }
12810
12814
  let B = [
12811
- se,
12812
12815
  ce,
12813
- L,
12814
- R,
12815
12816
  le,
12817
+ I,
12818
+ L,
12816
12819
  ue,
12817
12820
  de,
12818
12821
  fe,
12822
+ R,
12819
12823
  pe,
12820
12824
  ...me,
12821
12825
  ...z
@@ -12915,7 +12919,7 @@ function rv(e, n = {}) {
12915
12919
  };
12916
12920
  }
12917
12921
  Object.defineProperty(B, "controller", {
12918
- value: ne,
12922
+ value: re,
12919
12923
  enumerable: !1,
12920
12924
  configurable: !1,
12921
12925
  writable: !1
@@ -14367,7 +14371,7 @@ function gy(e) {
14367
14371
  function _y(e) {
14368
14372
  if (!e) return e;
14369
14373
  let t = e;
14370
- return t.__pgAnthropicShaped || t._llmType?.() !== "chat-anthropic" ? e : (t.__pgAnthropicShaped = !0, F(e));
14374
+ return t.__pgAnthropicShaped || t._llmType?.() !== "chat-anthropic" ? e : (t.__pgAnthropicShaped = !0, P(e));
14371
14375
  }
14372
14376
  function vy(e) {
14373
14377
  return !!e && typeof e == "object" && typeof e.invoke == "function" && typeof e.stream == "function";
@@ -14405,7 +14409,7 @@ function Sy(e) {
14405
14409
  return async (e) => {
14406
14410
  let t = new AbortController(), s = setTimeout(() => t.abort(), o);
14407
14411
  try {
14408
- return !l && c && (l = await I(c, {
14412
+ return !l && c && (l = await F(c, {
14409
14413
  temperature: n,
14410
14414
  maxTokens: r,
14411
14415
  thinkingFallback: "simple"
@@ -14424,7 +14428,7 @@ function Cy(e) {
14424
14428
  return async (t) => {
14425
14429
  let n = t.filter((e) => e.role === "user" || e.role === "assistant").map((e) => `${e.role === "user" ? "用户" : "助手"}: ${e.content}`).join("\n").slice(0, 800), s = new AbortController(), c = setTimeout(() => s.abort(), 1e4);
14426
14430
  try {
14427
- !o && r && (o = await I(r, {
14431
+ !o && r && (o = await F(r, {
14428
14432
  temperature: 0,
14429
14433
  maxTokens: 30,
14430
14434
  thinkingFallback: "simple"
@@ -14490,7 +14494,7 @@ function Oy(e) {
14490
14494
  return async (e) => {
14491
14495
  let t = new AbortController(), n = setTimeout(() => t.abort(), o);
14492
14496
  try {
14493
- !c && r && (c = await I(r, {
14497
+ !c && r && (c = await F(r, {
14494
14498
  temperature: 0,
14495
14499
  maxTokens: s,
14496
14500
  thinkingFallback: "simple"
@@ -17540,7 +17544,7 @@ function RC(e, t, n, r) {
17540
17544
  }), i;
17541
17545
  },
17542
17546
  afterModel: (t) => {
17543
- let n = oe(t.message);
17547
+ let n = se(t.message);
17544
17548
  n && (r.prompt_tokens = (r.prompt_tokens ?? 0) + (n.prompt_tokens ?? 0), r.completion_tokens = (r.completion_tokens ?? 0) + (n.completion_tokens ?? 0), r.total_tokens = (r.total_tokens ?? 0) + (n.total_tokens ?? 0), n.reasoning_tokens && (r.reasoning_tokens = (r.reasoning_tokens ?? 0) + n.reasoning_tokens), i++, e({
17545
17549
  type: "usage",
17546
17550
  round: i,
@@ -17584,7 +17588,7 @@ function BC(e, n, r) {
17584
17588
  prompt_tokens: 0,
17585
17589
  completion_tokens: 0,
17586
17590
  total_tokens: 0
17587
- }, o = Ay(() => Kt, () => e.conflictPolicy ?? "ask", () => G.agent?.debugLogs?.value), c = /* @__PURE__ */ Rn(0), l = ab(e.storage);
17591
+ }, o = Ay(() => Jt, () => e.conflictPolicy ?? "ask", () => G.agent?.debugLogs?.value), c = /* @__PURE__ */ Rn(0), l = ab(e.storage);
17588
17592
  l && (e.debug && l.onEvent((e) => console.log("[page-agent-sdk][storage]", e)), l.onEvent((e) => {
17589
17593
  e.type === "quota" && G.agent?.debugLogs?.value?.push({
17590
17594
  timestamp: Date.now(),
@@ -17606,7 +17610,7 @@ function BC(e, n, r) {
17606
17610
  e.debug && !d && console.warn("[page-agent-sdk][summarization] 未构造 llmInvoke(apiKey 缺失?),摘要回退零成本索引摘要");
17607
17611
  let b = /* @__PURE__ */ wn([]), x = u_(e.vfs?.initialFiles, {
17608
17612
  persist: l ? { save: (e) => {
17609
- vn.persistSave({ vfs: e });
17613
+ bn.persistSave({ vfs: e });
17610
17614
  } } : void 0,
17611
17615
  maxBytes: e.vfs?.maxBytes,
17612
17616
  poolBytes: e.vfs?.poolBytes
@@ -17626,7 +17630,7 @@ function BC(e, n, r) {
17626
17630
  data: { stage: "resume_notice" }
17627
17631
  });
17628
17632
  }), A = _b(), j = e.approval?.timeoutMs, M = j !== void 0 && Number.isFinite(j) && j > 0 ? j : j !== void 0 && (!Number.isFinite(j) || j < 0) ? 0 : 3e4, ee = (e) => {
17629
- Kt({
17633
+ Jt({
17630
17634
  type: "error",
17631
17635
  message: `确认请求(${e.toolName})${Math.round(e.waitedMs / 1e3)}s 无响应已自动拒绝 —— 当前路径无 UI 响应方;可传 approval.timeoutMs 调整(Infinity = 无限等)`,
17632
17636
  severity: "observable",
@@ -17634,7 +17638,7 @@ function BC(e, n, r) {
17634
17638
  context: e
17635
17639
  });
17636
17640
  }, N = pg((e) => {
17637
- A.lastPlanConfirmation = e, vn.persistSave({ planConfirmation: e }), G.agent?.debugLogs?.value?.push({
17641
+ A.lastPlanConfirmation = e, bn.persistSave({ planConfirmation: e }), G.agent?.debugLogs?.value?.push({
17638
17642
  timestamp: Date.now(),
17639
17643
  type: "middleware",
17640
17644
  data: {
@@ -17646,62 +17650,62 @@ function BC(e, n, r) {
17646
17650
  }, {
17647
17651
  timeoutMs: M,
17648
17652
  onAutoReject: ee
17649
- }), P = Bm({
17653
+ }), ne = Bm({
17650
17654
  getSchema: () => Ce()?.schema,
17651
17655
  getBind: () => Ce()?.bind,
17652
- onChange: (e) => Kt({
17656
+ onChange: (e) => Jt({
17653
17657
  type: "focus_change",
17654
17658
  focuses: e
17655
17659
  })
17656
- }), F = (e) => {
17660
+ }), P = (e) => {
17657
17661
  let t = Rm(Ce()?.bind, e.path);
17658
17662
  return t ? {
17659
17663
  ...e,
17660
17664
  pgId: t
17661
17665
  } : e;
17662
- }, ne = tg(), re = ng(e.memory || "");
17663
- typeof e.memory == "function" && re.refresh();
17664
- let ie = { current: null }, ae = e.data ? {
17666
+ }, re = tg(), ie = ng(e.memory || "");
17667
+ typeof e.memory == "function" && ie.refresh();
17668
+ let ae = { current: null }, oe = e.data ? {
17665
17669
  ...e.data,
17666
17670
  description: e.data.description ?? "主数据对象"
17667
- } : void 0, oe = !(e.subagents ?? []).some((e) => e._codeAsset) && ub(e.capabilities).subagent, se = e.subagents;
17668
- oe && ae?.schema && Fp(ae.schema).length && (se = [...e.subagents ?? [], dy()], console.info("[page-agent-sdk] 检测到 schema 含代码组件数组(如 components[].code),已自动装配 HTML 代码子 agent(委派编排 + vfs 工作副本 + 格式校验 + 增量 commit)。需定制(codeField/formatCheck/craftNotes 等)请显式传 createHtmlSubagent(...)"));
17669
- let ce = (se ?? []).filter((e) => !!e._codeAsset), L = /* @__PURE__ */ new Set();
17670
- for (let e of ce) {
17671
+ } : void 0, se = !(e.subagents ?? []).some((e) => e._codeAsset) && ub(e.capabilities).subagent, ce = e.subagents;
17672
+ se && oe?.schema && Fp(oe.schema).length && (ce = [...e.subagents ?? [], dy()], console.info("[page-agent-sdk] 检测到 schema 含代码组件数组(如 components[].code),已自动装配 HTML 代码子 agent(委派编排 + vfs 工作副本 + 格式校验 + 增量 commit)。需定制(codeField/formatCheck/craftNotes 等)请显式传 createHtmlSubagent(...)"));
17673
+ let le = (ce ?? []).filter((e) => !!e._codeAsset), I = /* @__PURE__ */ new Set();
17674
+ for (let e of le) {
17671
17675
  if (e._codeAsset.writablePaths.length) continue;
17672
- let t = Fp(ae?.schema, e._codeAsset.codeField);
17673
- t.length ? (e._codeAsset.writablePaths = t, Array.isArray(e.writablePaths) && (e.writablePaths = t), e._rebuildCodeAssetPaths?.(t[0]), console.info(`[page-agent-sdk][createHtmlSubagent] 未传 writablePaths,已从 schema 推断: [${t.map((e) => `'${e}'`).join(", ")}]`)) : (console.warn("[page-agent-sdk][createHtmlSubagent] 未能从 schema 推断 writablePaths(开放 schema(z.any()/z.record())/嵌套容器(如 sections[].children[])/点路径 codeField(如 props.html_code)不支持自动推断),已跳过该 html 子 agent(整体不受影响);如确需代码资产机制(vfs + 格式校验 + 增量 commit),请显式传 writablePaths(代码组件 data 区,如 ['components'])"), L.add(e));
17676
+ let t = Fp(oe?.schema, e._codeAsset.codeField);
17677
+ t.length ? (e._codeAsset.writablePaths = t, Array.isArray(e.writablePaths) && (e.writablePaths = t), e._rebuildCodeAssetPaths?.(t[0]), console.info(`[page-agent-sdk][createHtmlSubagent] 未传 writablePaths,已从 schema 推断: [${t.map((e) => `'${e}'`).join(", ")}]`)) : (console.warn("[page-agent-sdk][createHtmlSubagent] 未能从 schema 推断 writablePaths(开放 schema(z.any()/z.record())/嵌套容器(如 sections[].children[])/点路径 codeField(如 props.html_code)不支持自动推断),已跳过该 html 子 agent(整体不受影响);如确需代码资产机制(vfs + 格式校验 + 增量 commit),请显式传 writablePaths(代码组件 data 区,如 ['components'])"), I.add(e));
17674
17678
  }
17675
- let R = L.size ? ce.filter((e) => !L.has(e)) : ce, le = L.size ? (se ?? []).filter((e) => !L.has(e)) : se, ue = R.length > 0, de = R.flatMap((e) => e._codeAsset.writablePaths), fe = R.flatMap((e) => e._codeAsset.writablePaths.map((t) => `${t}.${e._codeAsset.codeField}`)), pe = e.checkpoint, me = pe !== void 0 && pe !== !1, z = me ? xg({
17679
+ let L = I.size ? le.filter((e) => !I.has(e)) : le, ue = I.size ? (ce ?? []).filter((e) => !I.has(e)) : ce, de = L.length > 0, fe = L.flatMap((e) => e._codeAsset.writablePaths), R = L.flatMap((e) => e._codeAsset.writablePaths.map((t) => `${t}.${e._codeAsset.codeField}`)), pe = e.checkpoint, me = pe !== void 0 && pe !== !1, z = me ? xg({
17676
17680
  getData: () => Ce()?.bind,
17677
17681
  consumeDataDirty: () => be?.consumeDataDirty?.() ?? !0,
17678
- slotPaths: ae ? [""] : [],
17682
+ slotPaths: oe ? [""] : [],
17679
17683
  vfsStore: x,
17680
17684
  todosMw: C,
17681
- getTodos: () => ie.current?.getState?.()?.todos ?? [],
17685
+ getTodos: () => ae.current?.getState?.()?.todos ?? [],
17682
17686
  messages: b,
17683
17687
  maxCheckpoints: pe && typeof pe == "object" ? pe.maxCheckpoints : void 0
17684
17688
  }) : null, B = !pe || typeof pe != "object" || pe.auto !== !1, V = ub(e.capabilities), he = V.dataOps, ge = V.draftWrite, H = V.automation, _e = V.domInspect && (m.vision === !0 || typeof e.images?.describe == "function"), ve = o_({
17685
17689
  ...e,
17686
17690
  locale: e.i18n?.locale,
17687
- dataOps: he && !!ae,
17691
+ dataOps: he && !!oe,
17688
17692
  domInspect: V.domInspect === !0,
17689
17693
  screenshot: _e
17690
17694
  });
17691
- if (ue) {
17692
- let e = R.map((e) => e._codeAsset.orchestratorPrompt).filter(Boolean).join("\n\n");
17695
+ if (de) {
17696
+ let e = L.map((e) => e._codeAsset.orchestratorPrompt).filter(Boolean).join("\n\n");
17693
17697
  e && (ve += "\n\n" + e);
17694
- } else ae?.schema && Pp(ae.schema) && (ve += "\n\n" + Qp.htmlDirectWriteFallback, console.warn("[page-agent-sdk] 检测到 schema 含 code 字段但未注册 html 子 agent:已自动注入「主 agent 自己写 HTML」编排(code 作普通字段直接 write,无 vfs 工作副本 / 无格式校验门禁)。如需代码资产机制(vfs + 格式校验 + 增量 commit + 主上下文 code 摘要),注册 createHtmlSubagent;若确为降级意图可忽略。"));
17695
- let U = he && ae ? rv(ae, {
17698
+ } else oe?.schema && Pp(oe.schema) && (ve += "\n\n" + Qp.htmlDirectWriteFallback, console.warn("[page-agent-sdk] 检测到 schema 含 code 字段但未注册 html 子 agent:已自动注入「主 agent 自己写 HTML」编排(code 作普通字段直接 write,无 vfs 工作副本 / 无格式校验门禁)。如需代码资产机制(vfs + 格式校验 + 增量 commit + 主上下文 code 摘要),注册 createHtmlSubagent;若确为降级意图可忽略。"));
17699
+ let U = he && oe ? rv(oe, {
17696
17700
  onAudit: e.onAudit ?? (e.debug ? (e) => console.log("[page-agent-sdk][data audit]", e) : void 0),
17697
17701
  maxSnapshots: e.maxSnapshots,
17698
17702
  onConflict: o.set,
17699
17703
  conflictWatchFields: e.conflictWatchFields,
17700
17704
  maxParallelTools: e.maxParallelTools,
17701
- vfsStore: ge || ae?.resources?.length ? x : void 0,
17702
- ...de.length ? { pgIdPaths: de } : {},
17703
- ...fe.length ? { largeTextPaths: fe } : {}
17704
- }) : [], ye = he ? U : [], be = he && ae ? U.controller ?? null : null, xe = he && ae ? U.previewWrite : void 0, Se = he && ae?.resources?.length && be?.getResourcesSnapshot ? wC({ getResourcesSnapshot: () => be?.getResourcesSnapshot?.() ?? [] }) : void 0, Ce = () => be?.get() ?? ae, we = new Set(U.map((e) => e.name)), Te = e.conflictWatchFields ?? [], Ee = !Te.includes("*") && Te.length ? new Set(Te) : void 0, De = be ? Iv({
17705
+ vfsStore: ge || oe?.resources?.length ? x : void 0,
17706
+ ...fe.length ? { pgIdPaths: fe } : {},
17707
+ ...R.length ? { largeTextPaths: R } : {}
17708
+ }) : [], ye = he ? U : [], be = he && oe ? U.controller ?? null : null, xe = he && oe ? U.previewWrite : void 0, Se = he && oe?.resources?.length && be?.getResourcesSnapshot ? wC({ getResourcesSnapshot: () => be?.getResourcesSnapshot?.() ?? [] }) : void 0, Ce = () => be?.get() ?? oe, we = new Set(U.map((e) => e.name)), Te = e.conflictWatchFields ?? [], Ee = !Te.includes("*") && Te.length ? new Set(Te) : void 0, De = be ? Iv({
17705
17709
  getBind: () => Ce()?.bind,
17706
17710
  recomputeAll: () => be.recomputeAllBaselines?.(),
17707
17711
  hasBaselines: () => be.hasBaselines?.() ?? !1,
@@ -17799,7 +17803,7 @@ function BC(e, n, r) {
17799
17803
  let Re = e.proposals ? TS(e.proposals, {
17800
17804
  emit: (e) => {
17801
17805
  try {
17802
- Kt(e);
17806
+ Jt(e);
17803
17807
  } catch {}
17804
17808
  },
17805
17809
  log: (e, t) => {
@@ -17837,7 +17841,7 @@ function BC(e, n, r) {
17837
17841
  Ye.forEach((e) => Oe.set(e.name, "builtin"));
17838
17842
  let Xe = V.focus, Ze = s(async ({ path: e, label: t }) => {
17839
17843
  let n = Ce()?.schema;
17840
- return n ? Cp(n, e) ? (P.setFocus(F({
17844
+ return n ? Cp(n, e) ? (ne.setFocus(P({
17841
17845
  path: e,
17842
17846
  ...t ? { label: t } : {}
17843
17847
  }), "agent"), `已聚焦到 ${e}${t ? `(${t})` : ""}。后续仅可写该子树(越界被拒),每轮只看到该组件结构。完成精修后调 clear_focus 退出。`) : `PATH_DENIED · 聚焦失败:path "${e}" 不在 schema 内。请先用 read 查看可操作路径再聚焦。` : "聚焦失败:当前无主数据 schema,无法聚焦。";
@@ -17848,7 +17852,7 @@ function BC(e, n, r) {
17848
17852
  path: t.string().describe("要聚焦的组件 jsonPath,如 components.3"),
17849
17853
  label: t.string().optional().describe("人类可读标签,如「导航栏」")
17850
17854
  })
17851
- }), Qe = s(async () => (P.clearFocus("agent"), "已清除聚焦,恢复全量可操作范围(可读写所有组件)。"), {
17855
+ }), Qe = s(async () => (ne.clearFocus("agent"), "已清除聚焦,恢复全量可操作范围(可读写所有组件)。"), {
17852
17856
  name: "clear_focus",
17853
17857
  description: "清除当前聚焦,退出精修模式,恢复对全部组件的读写权限。",
17854
17858
  schema: t.object({}).optional()
@@ -17856,11 +17860,11 @@ function BC(e, n, r) {
17856
17860
  let n = Ce()?.schema;
17857
17861
  if (!n) return "聚焦失败:当前无主数据 schema,无法聚焦。";
17858
17862
  if (!Cp(n, e)) return `PATH_DENIED · 聚焦失败:path "${e}" 不在 schema 内。请先用 read 查看可操作路径再聚焦。`;
17859
- P.addFocus(F({
17863
+ ne.addFocus(P({
17860
17864
  path: e,
17861
17865
  ...t ? { label: t } : {}
17862
17866
  }), "agent");
17863
- let r = P.getFocuses();
17867
+ let r = ne.getFocuses();
17864
17868
  return `已聚焦 ${e}${t ? `(${t})` : ""}(当前共 ${r.length} 个焦点:${r.map((e) => e.path).join(", ")})。后续仅可写这些子树之一(越界被拒)。`;
17865
17869
  }, {
17866
17870
  name: "add_focus",
@@ -17870,9 +17874,9 @@ function BC(e, n, r) {
17870
17874
  label: t.string().optional().describe("人类可读标签")
17871
17875
  })
17872
17876
  }), et = s(async ({ path: e }) => {
17873
- let t = P.getFocuses().length;
17874
- P.removeFocus(e, "agent");
17875
- let n = P.getFocuses();
17877
+ let t = ne.getFocuses().length;
17878
+ ne.removeFocus(e, "agent");
17879
+ let n = ne.getFocuses();
17876
17880
  return n.length === t ? `path "${e}" 不在当前焦点列表中(当前:${n.map((e) => e.path).join(", ") || "无"})。` : n.length ? `已移除焦点 ${e}(剩余 ${n.length} 个:${n.map((e) => e.path).join(", ")})。` : `已移除焦点 ${e},聚焦已清空,恢复全量操作范围。`;
17877
17881
  }, {
17878
17882
  name: "remove_focus",
@@ -17894,23 +17898,23 @@ function BC(e, n, r) {
17894
17898
  focusTools: () => tt,
17895
17899
  mcpTools: () => Ge,
17896
17900
  loadedSkillTools: () => nt
17897
- }), W = it(), at = V.planning, ot = V.missionAnchor, st = V.workingMemory, ct = V.skills, lt = V.vfs || ue;
17901
+ }), W = it(), at = V.planning, ot = V.missionAnchor, st = V.workingMemory, ct = V.skills, lt = V.vfs || de;
17898
17902
  if (lt) for (let e of g_) Oe.set(e, "builtin");
17899
17903
  if (at) for (let e of C.tools ?? []) Oe.set(e.name, "builtin");
17900
17904
  let ut = V.summarization, dt = V.agentCompression && !!p;
17901
17905
  e.debug && V.agentCompression && !p && console.warn("[page-agent-sdk][agentCompression] agentCompression 开启但 summaryLlm 不可用(或缺 apiKey / 模型不支持工具),压缩决策不启用,回退静态压缩");
17902
17906
  let ft = V.memory, pt = V.subagent, mt = pt ? Dh() : void 0, ht = e.verify?.maxAttempts ?? 2, gt = !!(e.verify?.check || e.verify?.maxAttempts || e.verify?.adversarial), _t = e.capabilities?.verify === !1, vt = (V.verify || gt && !_t) && e.verify?.enabled !== !1 && ht > 0, yt = V.contextInspector;
17903
17907
  gt && !vt && e.verify?.enabled !== !1 && console.warn("[page-agent-sdk][verify] 检测到 verify 配置(check/maxAttempts/adversarial)但未装载(capabilities.verify:false 显式关闭 或 maxAttempts≤0)");
17904
- let bt = e.subagent, xt = bt?.allowedTools ?? [], St = e.permissions?.length ? cg(e.permissions) : void 0, Ct = e.approval && (e.approval.tools !== void 0 || e.approval.confirm) ? lg({
17908
+ let bt = e.subagent, xt = bt?.allowedTools ?? [], St = e.permissions?.length ? cg(e.permissions) : void 0, Ct = e.approval?.preview === !0 && xe ? (e, t) => e === "write" ? xe(t) : null : void 0, wt = e.approval?.previewWrite || Ct ? (t, n) => e.approval?.previewWrite?.(t, n) ?? Ct?.(t, n) ?? null : void 0, Tt = e.approval && (e.approval.tools !== void 0 || e.approval.confirm) ? lg({
17905
17909
  ...e.approval,
17906
17910
  timeoutMs: e.approval.timeoutMs ?? M,
17907
17911
  onAutoReject: ee,
17908
- previewWrite: e.approval.preview === !0 && xe ? (e, t) => e === "write" ? xe(t) : null : void 0
17909
- }) : void 0, wt = [
17912
+ previewWrite: wt
17913
+ }) : void 0, Et = [
17910
17914
  ...St ? [St] : [],
17911
- ...Ct ? [Ct] : [],
17915
+ ...Tt ? [Tt] : [],
17912
17916
  ...De ? [De] : []
17913
- ], Tt = !pt || bt?.enabled === !1 ? void 0 : qh({
17917
+ ], Dt = !pt || bt?.enabled === !1 ? void 0 : qh({
17914
17918
  llm: bt?.llm ?? e.llm,
17915
17919
  allTools: () => G.agent?.allTools ?? W,
17916
17920
  allowedTools: xt.length ? xt : void 0,
@@ -17923,10 +17927,10 @@ function BC(e, n, r) {
17923
17927
  maxParallel: bt?.maxParallel,
17924
17928
  thinkingMode: bt?.thinkingMode,
17925
17929
  debug: e.debug,
17926
- getFocuses: () => P.getActiveFocuses(),
17930
+ getFocuses: () => ne.getActiveFocuses(),
17927
17931
  getSchema: () => Ce()?.schema ?? null,
17928
17932
  tracker: mt,
17929
- guardMiddleware: wt.length ? wt : void 0,
17933
+ guardMiddleware: Et.length ? Et : void 0,
17930
17934
  getVfsFiles: lt ? () => x.files : void 0,
17931
17935
  enterDataScope: be?.enterScope ? (e) => be.enterScope(e) : void 0,
17932
17936
  exitDataScope: be?.exitScope ? (e) => be.exitScope(e) : void 0,
@@ -17934,7 +17938,7 @@ function BC(e, n, r) {
17934
17938
  a.prompt_tokens = (a.prompt_tokens ?? 0) + (e.prompt_tokens ?? 0), a.completion_tokens = (a.completion_tokens ?? 0) + (e.completion_tokens ?? 0), a.total_tokens = (a.total_tokens ?? 0) + (e.total_tokens ?? 0), e.reasoning_tokens && (a.reasoning_tokens = (a.reasoning_tokens ?? 0) + e.reasoning_tokens);
17935
17939
  },
17936
17940
  timeoutMs: bt?.timeoutMs
17937
- }), Et = le?.map((e) => {
17941
+ }), Ot = ue?.map((e) => {
17938
17942
  if (!e._codeAsset) return e;
17939
17943
  let t = e._codeAsset, n = xv({
17940
17944
  writablePaths: t.writablePaths,
@@ -17951,29 +17955,29 @@ function BC(e, n, r) {
17951
17955
  ...e,
17952
17956
  middleware: r
17953
17957
  };
17954
- }), Dt = ue && pt ? Sv() : void 0, Ot = Dt ? kv({
17958
+ }), kt = de && pt ? Sv() : void 0, At = kt ? kv({
17955
17959
  getBind: () => Ce()?.bind,
17956
- writablePaths: de,
17957
- getLocked: () => Dt.locked(),
17960
+ writablePaths: fe,
17961
+ getLocked: () => kt.locked(),
17958
17962
  tools: W,
17959
- getCodeFieldPaths: () => Dv(Ce()?.bind, R.map((e) => ({
17963
+ getCodeFieldPaths: () => Dv(Ce()?.bind, L.map((e) => ({
17960
17964
  writablePaths: e._codeAsset.writablePaths,
17961
17965
  codeField: e._codeAsset.codeField
17962
17966
  })))
17963
- }) : void 0, kt = be?.getSummarizedPaths && be.clearSummarizedPaths ? Mv({
17967
+ }) : void 0, jt = be?.getSummarizedPaths && be.clearSummarizedPaths ? Mv({
17964
17968
  getSummarizedPaths: () => be.getSummarizedPaths(),
17965
17969
  clearSummarizedPaths: () => be.clearSummarizedPaths()
17966
- }) : void 0, At = pt && Et !== void 0 ? Xh(Et, {
17970
+ }) : void 0, Mt = pt && Ot !== void 0 ? Xh(Ot, {
17967
17971
  llm: e.llm,
17968
17972
  thinkingModeDefault: e.subagent?.thinkingMode,
17969
17973
  staleReadInvalidation: e.staleReadInvalidation,
17970
17974
  allTools: () => G.agent?.allTools ?? W,
17971
17975
  debug: e.debug,
17972
- getFocuses: () => P.getActiveFocuses(),
17976
+ getFocuses: () => ne.getActiveFocuses(),
17973
17977
  getSchema: () => Ce()?.schema ?? null,
17974
17978
  getBind: () => Ce()?.bind,
17975
17979
  tracker: mt,
17976
- guardMiddleware: wt.length ? wt : void 0,
17980
+ guardMiddleware: Et.length ? Et : void 0,
17977
17981
  getVfsFiles: lt ? () => x.files : void 0,
17978
17982
  enterDataScope: be?.enterScope ? (e) => be.enterScope(e) : void 0,
17979
17983
  exitDataScope: be?.exitScope ? (e) => be.exitScope(e) : void 0,
@@ -17981,30 +17985,30 @@ function BC(e, n, r) {
17981
17985
  a.prompt_tokens = (a.prompt_tokens ?? 0) + (e.prompt_tokens ?? 0), a.completion_tokens = (a.completion_tokens ?? 0) + (e.completion_tokens ?? 0), a.total_tokens = (a.total_tokens ?? 0) + (e.total_tokens ?? 0), e.reasoning_tokens && (a.reasoning_tokens = (a.reasoning_tokens ?? 0) + e.reasoning_tokens);
17982
17986
  },
17983
17987
  timeoutMs: e.subagent?.timeoutMs,
17984
- ...Dt ? {
17985
- componentLock: Dt,
17986
- resolveComponents: (e) => Cv(e, _v(Ce()?.bind, de))
17988
+ ...kt ? {
17989
+ componentLock: kt,
17990
+ resolveComponents: (e) => Cv(e, _v(Ce()?.bind, fe))
17987
17991
  } : {}
17988
- }) : void 0, jt = At ? At.controller : null, Mt = (t) => {
17992
+ }) : void 0, Nt = Mt ? Mt.controller : null, Pt = (t) => {
17989
17993
  let n = t.thinkingMode ?? e.subagent?.thinkingMode, r = n ? vy(t.llm ?? e.llm) ? "instance-noop" : "applied" : "inherited";
17990
17994
  return {
17991
17995
  ...t,
17992
17996
  ...n ? { thinkingMode: n } : {},
17993
17997
  thinkingApplied: r
17994
17998
  };
17995
- }, Nt = ["read", "fetch_document"], Pt = W.filter((e) => Nt.includes(e.name)), Ft = vt ? wg({
17999
+ }, Ft = ["read", "fetch_document"], It = W.filter((e) => Ft.includes(e.name)), Lt = vt ? wg({
17996
18000
  check: e.verify.check ?? Ag({
17997
18001
  schemas: () => Ce() ? { "": Ce().schema } : {},
17998
18002
  root: () => Ce()?.bind
17999
18003
  }),
18000
18004
  adversarial: e.verify?.adversarial ? {
18001
18005
  llm: e.llm,
18002
- tools: Pt
18006
+ tools: It
18003
18007
  } : void 0
18004
- }) : void 0, It = yt ? Wg({
18008
+ }) : void 0, Rt = yt ? Wg({
18005
18009
  contextWindow: m.contextWindow,
18006
18010
  thresholdRatio: mb(e, m.contextWindow).summaryThresholdRatio
18007
- }) : void 0, Lt = xC({
18011
+ }) : void 0, zt = xC({
18008
18012
  ...V,
18009
18013
  humanConfirm: qe,
18010
18014
  screenshot: !!Me,
@@ -18012,21 +18016,21 @@ function BC(e, n, r) {
18012
18016
  hasActions: !!e.actions && Object.keys(e.actions).length > 0,
18013
18017
  hasProposals: !!e.proposals,
18014
18018
  viewImage: !!je,
18015
- subagents: le?.map(Mt)
18016
- }, he && !!ae, { promptSoftCap: Sh(m.contextWindow, h.promptSoftCapTokens) }), Rt = V.pageContext ? CC({
18019
+ subagents: ue?.map(Pt)
18020
+ }, he && !!oe, { promptSoftCap: Sh(m.contextWindow, h.promptSoftCapTokens) }), Bt = V.pageContext ? CC({
18017
18021
  getPageInfo: () => typeof document < "u" && typeof location < "u" ? {
18018
18022
  title: document.title || "",
18019
18023
  url: location.href
18020
18024
  } : null,
18021
18025
  canReadPage: V.domInspect === !0
18022
- }) : void 0, zt = {
18026
+ }) : void 0, Vt = {
18023
18027
  epoch: 0,
18024
18028
  notices: [],
18025
18029
  readsInvalidated: 0
18026
- }, Bt = 0, Vt = {
18030
+ }, Ht = 0, Ut = {
18027
18031
  name: "hostNotice",
18028
18032
  beforeAgent: () => {
18029
- Bt = zt.epoch;
18033
+ Ht = Vt.epoch;
18030
18034
  },
18031
18035
  wrapModelCall: async (e, t) => {
18032
18036
  if (Fe) {
@@ -18044,18 +18048,18 @@ function BC(e, n, r) {
18044
18048
  });
18045
18049
  }
18046
18050
  }
18047
- if (zt.epoch > Bt) {
18048
- Bt = zt.epoch;
18049
- let t = zt.notices[zt.notices.length - 1] ?? "", n = Vd(e.messages, t || void 0, Ue);
18051
+ if (Vt.epoch > Ht) {
18052
+ Ht = Vt.epoch;
18053
+ let t = Vt.notices[Vt.notices.length - 1] ?? "", n = Vd(e.messages, t || void 0, Ue);
18050
18054
  if (n.invalidatedCount > 0) {
18051
18055
  for (let t = 0; t < n.messages.length; t++) e.messages[t] = n.messages[t];
18052
- zt.readsInvalidated += n.invalidatedCount, G.agent?.debugLogs?.value?.push({
18056
+ Vt.readsInvalidated += n.invalidatedCount, G.agent?.debugLogs?.value?.push({
18053
18057
  timestamp: Date.now(),
18054
18058
  type: "middleware",
18055
18059
  data: {
18056
18060
  stage: "host_read_invalidated",
18057
18061
  count: n.invalidatedCount,
18058
- epoch: zt.epoch,
18062
+ epoch: Vt.epoch,
18059
18063
  reason: t || void 0
18060
18064
  }
18061
18065
  });
@@ -18063,24 +18067,24 @@ function BC(e, n, r) {
18063
18067
  }
18064
18068
  return t(e);
18065
18069
  },
18066
- augmentPrompt: () => zt.notices.length ? [
18070
+ augmentPrompt: () => Vt.notices.length ? [
18067
18071
  "【宿主页面已变更】",
18068
- ...zt.notices.filter(Boolean).map((e) => `· ${e}`),
18072
+ ...Vt.notices.filter(Boolean).map((e) => `· ${e}`),
18069
18073
  V.domInspect === !0 ? "此前的页面读取/截图结果已过期,回答任何关于当前页面的问题前必须重新 read_page / get_dom 读取当前页面;不要凭此前的读取结果或记忆作答。" : "页面内容可能已变化,断言页面前先核实当前状态;不要凭此前的印象作答。"
18070
18074
  ].join("\n") : void 0,
18071
18075
  afterAgent: () => {
18072
- zt.notices.length = 0;
18076
+ Vt.notices.length = 0;
18073
18077
  }
18074
- }, Ht = Re ? {
18078
+ }, Wt = Re ? {
18075
18079
  name: "proposalNotice",
18076
18080
  augmentPrompt: () => Re.state.notices.length ? ["【内容提案裁决结果】(以此为准,不要凭提案前状态作答)", ...Re.state.notices].join("\n") : void 0,
18077
18081
  afterAgent: () => {
18078
18082
  Re.state.notices.length = 0;
18079
18083
  }
18080
- } : null, Ut = ae ? {
18084
+ } : null, Gt = oe ? {
18081
18085
  name: "dataHint",
18082
18086
  augmentPrompt: () => a_(Ce(), e.schemaHint) || void 0
18083
- } : null, Wt = e.augmentSystem ? {
18087
+ } : null, Kt = e.augmentSystem ? {
18084
18088
  name: "augmentSystem",
18085
18089
  augmentPrompt: (t) => {
18086
18090
  try {
@@ -18093,51 +18097,51 @@ function BC(e, n, r) {
18093
18097
  return;
18094
18098
  }
18095
18099
  }
18096
- } : null, Gt = db(e.onEvent), Kt = Gt.emit, qt, Jt = [], Yt = (e) => ({
18100
+ } : null, qt = db(e.onEvent), Jt = qt.emit, Yt, Xt = [], Zt = (e) => ({
18097
18101
  name: e.name,
18098
18102
  description: e.description,
18099
18103
  content: typeof e.getContent == "function" ? e.getContent() : ""
18100
- }), Xt = (e) => ({
18104
+ }), Qt = (e) => ({
18101
18105
  name: e.name,
18102
18106
  description: e.description,
18103
18107
  getContent: () => e.content
18104
- }), Zt = e.skillStorage === !1 ? null : kC({
18108
+ }), $t = e.skillStorage === !1 ? null : kC({
18105
18109
  ...typeof e.skillStorage == "object" ? e.skillStorage : {},
18106
18110
  id: e.skillStorage && typeof e.skillStorage == "object" && e.skillStorage.id ? e.skillStorage.id : `agent::${n}`
18107
- }), Qt = () => {
18108
- let t = qt ? qt.controller : null;
18111
+ }), en = () => {
18112
+ let t = Yt ? Yt.controller : null;
18109
18113
  if (t) {
18110
- let n = (e.skills || []).filter((e) => !Jt.some((t) => t.name === e.name));
18111
- t.set([...n, ...Jt]);
18114
+ let n = (e.skills || []).filter((e) => !Xt.some((t) => t.name === e.name));
18115
+ t.set([...n, ...Xt]);
18112
18116
  }
18113
18117
  G.infoTick.value++;
18114
- }, $t = async () => {
18115
- if (Zt) try {
18116
- let t = await Zt.list();
18118
+ }, tn = async () => {
18119
+ if ($t) try {
18120
+ let t = await $t.list();
18117
18121
  if (t.length) {
18118
- Jt = t.map(Xt);
18119
- let n = qt ? qt.controller : null;
18122
+ Xt = t.map(Qt);
18123
+ let n = Yt ? Yt.controller : null;
18120
18124
  if (n) {
18121
- let t = (e.skills || []).filter((e) => !Jt.some((t) => t.name === e.name));
18122
- n.set([...t, ...Jt]);
18125
+ let t = (e.skills || []).filter((e) => !Xt.some((t) => t.name === e.name));
18126
+ n.set([...t, ...Xt]);
18123
18127
  }
18124
18128
  G.infoTick.value++;
18125
18129
  }
18126
18130
  } catch {}
18127
- }, en = ut ? Eh({
18131
+ }, nn = ut ? Eh({
18128
18132
  ...h,
18129
18133
  llmInvoke: d,
18130
18134
  getRegisteredData: () => Ce() ? [{ description: Ce().description ?? "主数据对象" }] : [],
18131
18135
  preserveLastToolResults: _,
18132
18136
  ...dt ? {
18133
18137
  decideInvoke: p,
18134
- getSnapshot: () => It?.getSnapshot()
18138
+ getSnapshot: () => Rt?.getSnapshot()
18135
18139
  } : {}
18136
- }) : void 0, tn = ct ? th([
18140
+ }) : void 0, rn = ct ? th([
18137
18141
  ...V.domInspect && !(e.skills || []).some((e) => e.name === "dom-inspect") ? [QS({
18138
18142
  withScreenshot: !!Me,
18139
18143
  withDomEdit: V.domEdit,
18140
- withDataOps: he && !!ae
18144
+ withDataOps: he && !!oe
18141
18145
  })] : [],
18142
18146
  ...V.domInspect && !(e.skills || []).some((e) => e.name === "page-analysis") ? [eC({
18143
18147
  withScreenshot: !!Me,
@@ -18155,78 +18159,78 @@ function BC(e, n, r) {
18155
18159
  W = it(), G.agent && G.agent.setTools(W), G.infoTick.value++;
18156
18160
  }
18157
18161
  }) : void 0;
18158
- qt = tn;
18159
- let nn = gb([
18160
- ...Ut ? [Ut] : [],
18161
- Lt,
18162
- ...Rt ? [Rt] : [],
18163
- Vt,
18164
- ...Ht ? [Ht] : [],
18162
+ Yt = rn;
18163
+ let an = gb([
18164
+ ...Gt ? [Gt] : [],
18165
+ zt,
18166
+ ...Bt ? [Bt] : [],
18167
+ Ut,
18168
+ ...Wt ? [Wt] : [],
18165
18169
  ...ot ? [T] : [],
18166
18170
  O,
18167
18171
  k,
18168
18172
  ...at ? [C] : [],
18169
- ...tn ? [tn] : [],
18173
+ ...rn ? [rn] : [],
18170
18174
  ...lt ? [v_(x)] : [],
18171
- ...en ? [en] : [],
18172
- ...st ? [ne] : [],
18173
- ...Xe ? [P] : [],
18175
+ ...nn ? [nn] : [],
18176
+ ...st ? [re] : [],
18177
+ ...Xe ? [ne] : [],
18174
18178
  ...Se ? [Se] : [],
18175
- ...ft ? [re] : [],
18179
+ ...ft ? [ie] : [],
18176
18180
  ...St ? [St] : [],
18177
18181
  ...me && B && z ? [Sg(z)] : [],
18178
18182
  ...qe ? [N] : [],
18179
- ...Ct ? [Ct] : [],
18180
- ...De ? [De] : [],
18181
- ...Ft ? [Ft] : [],
18182
18183
  ...Tt ? [Tt] : [],
18184
+ ...De ? [De] : [],
18185
+ ...Lt ? [Lt] : [],
18186
+ ...Dt ? [Dt] : [],
18187
+ ...Mt ? [Mt] : [],
18183
18188
  ...At ? [At] : [],
18184
- ...Ot ? [Ot] : [],
18185
- ...kt ? [kt] : [],
18189
+ ...jt ? [jt] : [],
18186
18190
  ...be && pt ? [Fv({
18187
18191
  getBind: () => Ce()?.bind,
18188
18192
  getTools: () => G.agent?.allTools ?? W
18189
18193
  })] : [],
18190
- ...Wt ? [Wt] : [],
18191
- ...It ? [It] : [],
18194
+ ...Kt ? [Kt] : [],
18195
+ ...Rt ? [Rt] : [],
18192
18196
  ...Pe ? [Pe] : [],
18193
18197
  ...e.middleware || [],
18194
18198
  ...H ? [lC(a, {
18195
18199
  tokenBudget: e.tokenBudget,
18196
18200
  timeBudgetMs: e.timeBudgetMs
18197
- }, Kt)] : [],
18198
- RC(Kt, b, Ce, a)
18199
- ]), rn = e.maxMemoryRounds ?? PC;
18200
- function an(e) {
18201
+ }, Jt)] : [],
18202
+ RC(Jt, b, Ce, a)
18203
+ ]), on = e.maxMemoryRounds ?? PC;
18204
+ function sn(e) {
18201
18205
  return (e) => {
18202
- e.type !== "approval_request" && Kt(Ae(e));
18206
+ e.type !== "approval_request" && Jt(Ae(e));
18203
18207
  };
18204
18208
  }
18205
- let on = /* @__PURE__ */ Rn([]), sn = NC(), cn = /* @__PURE__ */ new Set();
18206
- function ln(e) {
18209
+ let cn = /* @__PURE__ */ Rn([]), ln = NC(), un = /* @__PURE__ */ new Set();
18210
+ function dn(e) {
18207
18211
  let t = new AbortController(), n = () => t.abort();
18208
- return e && (e.aborted ? t.abort() : e.addEventListener("abort", n, { once: !0 })), cn.add(t), {
18212
+ return e && (e.aborted ? t.abort() : e.addEventListener("abort", n, { once: !0 })), un.add(t), {
18209
18213
  controller: t,
18210
18214
  untrack: () => {
18211
- cn.delete(t), e?.removeEventListener("abort", n);
18215
+ un.delete(t), e?.removeEventListener("abort", n);
18212
18216
  }
18213
18217
  };
18214
18218
  }
18215
- function un() {
18216
- for (let e of cn) e.abort();
18217
- cn.clear();
18219
+ function fn() {
18220
+ for (let e of un) e.abort();
18221
+ un.clear();
18218
18222
  }
18219
- let dn = /* @__PURE__ */ Rn(null), G = {
18223
+ let pn = /* @__PURE__ */ Rn(null), G = {
18220
18224
  agentId: n,
18221
18225
  store: l,
18222
18226
  messages: b,
18223
18227
  vfsStore: x,
18224
- listeners: Gt.listeners,
18228
+ listeners: qt.listeners,
18225
18229
  todosMw: C,
18226
- memoryMw: re,
18230
+ memoryMw: ie,
18227
18231
  missionMw: T,
18228
- workingMemoryMw: ne,
18229
- focusMw: P,
18232
+ workingMemoryMw: re,
18233
+ focusMw: ne,
18230
18234
  agent: null,
18231
18235
  initDone: Promise.resolve(),
18232
18236
  sessionId: "",
@@ -18236,18 +18240,18 @@ function BC(e, n, r) {
18236
18240
  mcpFailed: [],
18237
18241
  checkpoint: z,
18238
18242
  dataOpsController: be,
18239
- skillsController: qt ? qt.controller : null,
18243
+ skillsController: Yt ? Yt.controller : null,
18240
18244
  infoTick: c,
18241
18245
  pendingConflict: o.pendingConflict,
18242
- pendingQuote: dn,
18243
- sessions: on,
18244
- refreshSessions: () => vn.refreshSessions(),
18246
+ pendingQuote: pn,
18247
+ sessions: cn,
18248
+ refreshSessions: () => bn.refreshSessions(),
18245
18249
  liveData: Ce,
18246
18250
  usage: a,
18247
- emit: Kt,
18248
- runSerial: sn,
18249
- trackActive: ln,
18250
- abortAllActive: un,
18251
+ emit: Jt,
18252
+ runSerial: ln,
18253
+ trackActive: dn,
18254
+ abortAllActive: fn,
18251
18255
  unloadSkillTools(e) {
18252
18256
  if (e) {
18253
18257
  let t = nt.length;
@@ -18260,31 +18264,31 @@ function BC(e, n, r) {
18260
18264
  W = it(), G.agent && G.agent.setTools(W);
18261
18265
  },
18262
18266
  applySnapshot(t) {
18263
- if (t.vfs && x.hydrate && x.hydrate(t.vfs), t.messages?.length && (b.push(...lu(t.messages, (e) => (e ? G.vfsStore?.files?.[e]?.content : void 0) || void 0)), k.markResumed()), t.todos?.length && C.reset(t.todos), t.memory && !e.memory && re.reset(t.memory), t.checkpoints?.length && z && z.importStack(t.checkpoints), t.usage && Object.assign(a, t.usage), t.mission && ot && T.setMission(t.mission), t.workingMemory && st && ne.restore(t.workingMemory), t.planConfirmation && (A.lastPlanConfirmation = t.planConfirmation), Xe) {
18267
+ if (t.vfs && x.hydrate && x.hydrate(t.vfs), t.messages?.length && (b.push(...lu(t.messages, (e) => (e ? G.vfsStore?.files?.[e]?.content : void 0) || void 0)), k.markResumed()), t.todos?.length && C.reset(t.todos), t.memory && !e.memory && ie.reset(t.memory), t.checkpoints?.length && z && z.importStack(t.checkpoints), t.usage && Object.assign(a, t.usage), t.mission && ot && T.setMission(t.mission), t.workingMemory && st && re.restore(t.workingMemory), t.planConfirmation && (A.lastPlanConfirmation = t.planConfirmation), Xe) {
18264
18268
  let n = t.focus, r = n ? Array.isArray(n) ? n : [n] : [];
18265
18269
  if (r.length) {
18266
18270
  let t = Ce()?.schema, n = t ? r.filter((e) => Cp(t, e.path)) : [];
18267
- if (n.length && (P.setFocus(null), n.forEach((e) => P.addFocus(F(e)))), e.debug && n.length < r.length) {
18271
+ if (n.length && (ne.setFocus(null), n.forEach((e) => ne.addFocus(P(e)))), e.debug && n.length < r.length) {
18268
18272
  let e = r.filter((e) => !n.includes(e)).map((e) => e.path);
18269
18273
  console.warn("[page-agent-sdk][focus] 恢复的焦点部分 path 已失效(schema 变化/无 schema),剔除:", e);
18270
18274
  }
18271
18275
  }
18272
18276
  }
18273
- hn();
18277
+ _n();
18274
18278
  },
18275
18279
  addSkill(e) {
18276
- let t = Jt.findIndex((t) => t.name === e.name);
18277
- t >= 0 ? Jt[t] = e : Jt.push(e), Qt(), Zt && Zt.put(Yt(e));
18280
+ let t = Xt.findIndex((t) => t.name === e.name);
18281
+ t >= 0 ? Xt[t] = e : Xt.push(e), en(), $t && $t.put(Zt(e));
18278
18282
  },
18279
18283
  removeSkill(e) {
18280
- let t = Jt.findIndex((t) => t.name === e);
18281
- return t < 0 ? !1 : (Jt.splice(t, 1), Qt(), Zt && Zt.remove(e), !0);
18284
+ let t = Xt.findIndex((t) => t.name === e);
18285
+ return t < 0 ? !1 : (Xt.splice(t, 1), en(), $t && $t.remove(e), !0);
18282
18286
  },
18283
18287
  listUserSkills() {
18284
- return Jt.map((e) => e.name);
18288
+ return Xt.map((e) => e.name);
18285
18289
  },
18286
18290
  getUserSkill(e) {
18287
- let t = Jt.find((t) => t.name === e);
18291
+ let t = Xt.find((t) => t.name === e);
18288
18292
  if (t) return {
18289
18293
  name: t.name,
18290
18294
  description: t.description,
@@ -18292,7 +18296,7 @@ function BC(e, n, r) {
18292
18296
  };
18293
18297
  },
18294
18298
  afterRound() {
18295
- gn(), vn.persistRuntime();
18299
+ vn(), bn.persistRuntime();
18296
18300
  },
18297
18301
  clearCodeReuse() {
18298
18302
  let e = x;
@@ -18303,9 +18307,9 @@ function BC(e, n, r) {
18303
18307
  t ??= {}, t?.mission && ot && T.setMission(t.mission);
18304
18308
  let n = e, r = (t.images ?? []).filter((e) => e && (e.dataUri || e.vfsRef || e.url));
18305
18309
  if (r.length > 4) throw Error(`[page-agent-sdk] 单轮最多 4 张图片(收到 ${r.length})`);
18306
- if (r.length && (await _n.stowImages(r), await _n.describeIfNeeded(r, n)), r.length && !m.vision && !r.every((e) => e.description)) {
18310
+ if (r.length && (await yn.stowImages(r), await yn.describeIfNeeded(r, n)), r.length && !m.vision && !r.every((e) => e.description)) {
18307
18311
  let e = "当前主模型不支持图片输入(modelCaps.vision=false)。请换多模态模型(gpt-4o/claude/qwen-vl)或 LLMConfig 声明 vision:true;或配置 images.describe 绑定识图转述(集成方识图子 agent / 自有 vision API)";
18308
- throw Kt({
18312
+ throw Jt({
18309
18313
  type: "error",
18310
18314
  message: e,
18311
18315
  severity: "recoverable",
@@ -18313,7 +18317,7 @@ function BC(e, n, r) {
18313
18317
  }), Error(`[page-agent-sdk] ${e}`);
18314
18318
  }
18315
18319
  x?.setProtectedRefs?.(jC(b));
18316
- let i = H ? t.maxAutoRetries ?? 1 : 0, a = 0, s = !1, c = an(t.signal);
18320
+ let i = H ? t.maxAutoRetries ?? 1 : 0, a = 0, s = !1, c = sn(t.signal);
18317
18321
  if (t.signal) {
18318
18322
  let e = () => o.resolve("keep_external");
18319
18323
  t.signal.aborted ? e() : t.signal.addEventListener("abort", e, { once: !0 });
@@ -18330,14 +18334,14 @@ function BC(e, n, r) {
18330
18334
  ...n ? { anchor: n } : {}
18331
18335
  };
18332
18336
  }
18333
- let i = e ?? dn.value ?? void 0;
18337
+ let i = e ?? pn.value ?? void 0;
18334
18338
  b.push({
18335
18339
  role: "user",
18336
18340
  content: n,
18337
18341
  timestamp: Date.now(),
18338
18342
  ...r.length ? { images: r } : {},
18339
18343
  ...i ? { quote: i } : {}
18340
- }), s = !0, !e && dn.value && (dn.value = null);
18344
+ }), s = !0, !e && pn.value && (pn.value = null);
18341
18345
  }
18342
18346
  try {
18343
18347
  let e = await G.agent.invoke(b, t.signal, c);
@@ -18358,7 +18362,7 @@ function BC(e, n, r) {
18358
18362
  }), G.afterRound(), l) try {
18359
18363
  await l.flush();
18360
18364
  } catch (e) {
18361
- Kt({
18365
+ Jt({
18362
18366
  type: "error",
18363
18367
  message: `落盘失败(不影响本轮回复):${e instanceof Error ? e.message : String(e)}`,
18364
18368
  severity: "observable",
@@ -18374,7 +18378,7 @@ function BC(e, n, r) {
18374
18378
  code: "MODEL_UNAVAILABLE",
18375
18379
  message: e instanceof Error ? e.message : n.message
18376
18380
  }), a < i && z?.canRestore()) {
18377
- a += 1, z.restore(), s = !0, Kt({
18381
+ a += 1, z.restore(), s = !0, Jt({
18378
18382
  type: "error",
18379
18383
  message: `致命错误自动恢复(${a}/${i}):${n.message},已回退 checkpoint 重试`,
18380
18384
  severity: "observable",
@@ -18386,7 +18390,7 @@ function BC(e, n, r) {
18386
18390
  });
18387
18391
  continue;
18388
18392
  }
18389
- throw Kt({
18393
+ throw Jt({
18390
18394
  type: "error",
18391
18395
  message: n.message,
18392
18396
  severity: n.severity,
@@ -18399,7 +18403,7 @@ function BC(e, n, r) {
18399
18403
  async batch(e, t, n) {
18400
18404
  if (await G.initDone, !e.length) return [];
18401
18405
  if (G.refCount <= 0) throw Error("page-agent-sdk: agent 已释放(unmount),拒绝排队中的 batch");
18402
- let r = [], i = an(n);
18406
+ let r = [], i = sn(n);
18403
18407
  if (x?.setProtectedRefs?.(jC(b)), n) {
18404
18408
  let e = () => o.resolve("keep_external");
18405
18409
  n.aborted ? e() : n.addEventListener("abort", e, { once: !0 });
@@ -18431,7 +18435,7 @@ function BC(e, n, r) {
18431
18435
  }), G.afterRound(), l) try {
18432
18436
  await l.flush();
18433
18437
  } catch (e) {
18434
- Kt({
18438
+ Jt({
18435
18439
  type: "error",
18436
18440
  message: `落盘失败(不影响本任务结果):${e instanceof Error ? e.message : String(e)}`,
18437
18441
  severity: "observable",
@@ -18467,7 +18471,7 @@ function BC(e, n, r) {
18467
18471
  }
18468
18472
  od(i);
18469
18473
  let c = Xl(i, "fatal");
18470
- Kt({
18474
+ Jt({
18471
18475
  type: "error",
18472
18476
  message: `批量任务 ${a + 1}/${e.length} 失败:${c.message}`,
18473
18477
  severity: "observable",
@@ -18491,16 +18495,16 @@ function BC(e, n, r) {
18491
18495
  }
18492
18496
  return r;
18493
18497
  },
18494
- switchSession: (e) => vn.switchSession(e),
18495
- exportSession: (e) => vn.exportSession(e),
18496
- importSession: (e) => vn.importSession(e),
18497
- resetSession: () => vn.resetSession(),
18498
+ switchSession: (e) => bn.switchSession(e),
18499
+ exportSession: (e) => bn.exportSession(e),
18500
+ importSession: (e) => bn.importSession(e),
18501
+ resetSession: () => bn.resetSession(),
18498
18502
  stream: async (e, t, n) => {
18499
18503
  if (!G.agent) throw Error("page-agent-sdk: agent 尚未初始化完成,请先 await mount()");
18500
18504
  let r = [...e].reverse().find((e) => e.role === "user" && e.images?.length);
18501
- if (r?.images?.length && (await _n.stowImages(r.images), await _n.describeIfNeeded(r.images, r.content), !m.vision && !r.images.every((e) => e.description))) {
18505
+ if (r?.images?.length && (await yn.stowImages(r.images), await yn.describeIfNeeded(r.images, r.content), !m.vision && !r.images.every((e) => e.description))) {
18502
18506
  let e = "当前主模型不支持图片输入(modelCaps.vision=false)。请换多模态模型(gpt-4o/claude/qwen-vl)或 LLMConfig 声明 vision:true;或配置 images.describe 绑定识图转述";
18503
- throw Kt({
18507
+ throw Jt({
18504
18508
  type: "error",
18505
18509
  message: e,
18506
18510
  severity: "recoverable",
@@ -18509,18 +18513,18 @@ function BC(e, n, r) {
18509
18513
  }
18510
18514
  x?.setProtectedRefs?.(jC(e));
18511
18515
  let i = (e) => {
18512
- t?.(Ae(e)), Kt(Ae(e)), e.type === "subagent" && (e.kind === "tool_call" || e.kind === "tool_result") && G.infoTick.value++;
18516
+ t?.(Ae(e)), Jt(Ae(e)), e.type === "subagent" && (e.kind === "tool_call" || e.kind === "tool_result") && G.infoTick.value++;
18513
18517
  };
18514
18518
  if (n) {
18515
18519
  let e = () => o.resolve("keep_external");
18516
18520
  n.aborted ? e() : n.addEventListener("abort", e, { once: !0 });
18517
18521
  }
18518
- let { controller: a, untrack: s } = ln(n);
18522
+ let { controller: a, untrack: s } = dn(n);
18519
18523
  return G.agent.stream(e, i, a.signal).finally(s);
18520
18524
  },
18521
18525
  release() {
18522
18526
  if (G.refCount--, G.refCount <= 0) {
18523
- un(), Ke = !0, l && (x.flush?.(), l.flush(), l.dispose()), Zt && Zt.dispose();
18527
+ fn(), Ke = !0, l && (x.flush?.(), l.flush(), l.dispose()), $t && $t.dispose();
18524
18528
  let e = G.mcpClosers.splice(0);
18525
18529
  e.length && Promise.allSettled(e.map((e) => e())), FC.delete(n);
18526
18530
  }
@@ -18548,7 +18552,7 @@ function BC(e, n, r) {
18548
18552
  if ((e.provider ?? "openai") === "anthropic") throw Error("[page-agent-sdk][setLlm] 切换到 Anthropic 需传 BaseChatModel 实例(动态 import 无法同步);请先 const { ChatAnthropic } = await import(\"@langchain/anthropic\") 构造实例后传入");
18549
18553
  n = te(e);
18550
18554
  }
18551
- typeof n.bindTools != "function" && e.debug && console.warn("[page-agent-sdk][setLlm] 新模型不支持 bindTools(tool calling 会失效)"), by(n, { emit: Kt }), y = t;
18555
+ typeof n.bindTools != "function" && e.debug && console.warn("[page-agent-sdk][setLlm] 新模型不支持 bindTools(tool calling 会失效)"), by(n, { emit: Jt }), y = t;
18552
18556
  let r = vy(t) ? void 0 : t;
18553
18557
  if (m = D({
18554
18558
  model: r?.model ?? t.model ?? t.modelName,
@@ -18556,31 +18560,31 @@ function BC(e, n, r) {
18556
18560
  maxOutputTokens: e.maxOutputTokens ?? r?.maxOutputTokens,
18557
18561
  vision: r?.vision ?? t.vision
18558
18562
  }), m.contextWindow < 2e5) throw Error(`[page-agent-sdk][setLlm] 新模型上下文窗口 ${m.contextWindow} 小于最小支持 ${S}(需 ≥200K 窗口模型)`);
18559
- G.agent && (G.agent.setLlm(n), G.agent.setModelCaps?.(m)), en?.setContextWindow?.(m.contextWindow), It?.setContextWindow?.(m.contextWindow), G.infoTick.value++, e.debug && console.log("[page-agent-sdk][setLlm] 重解析 modelCaps + 回灌:", m);
18563
+ G.agent && (G.agent.setLlm(n), G.agent.setModelCaps?.(m)), nn?.setContextWindow?.(m.contextWindow), Rt?.setContextWindow?.(m.contextWindow), G.infoTick.value++, e.debug && console.log("[page-agent-sdk][setLlm] 重解析 modelCaps + 回灌:", m);
18560
18564
  },
18561
18565
  setMemory(e) {
18562
- re.reset(e), typeof e == "function" && re.refresh(), G.infoTick.value++;
18566
+ ie.reset(e), typeof e == "function" && ie.refresh(), G.infoTick.value++;
18563
18567
  },
18564
18568
  refreshMemory() {
18565
- return re.refresh();
18569
+ return ie.refresh();
18566
18570
  },
18567
18571
  setSubagents(t) {
18568
- if (!jt) {
18572
+ if (!Nt) {
18569
18573
  e.debug && console.warn("[page-agent-sdk][setSubagents] 未配 subagents:[] 或 capabilities.subagent 关闭,忽略");
18570
18574
  return;
18571
18575
  }
18572
- jt.set(t), G.infoTick.value++;
18576
+ Nt.set(t), G.infoTick.value++;
18573
18577
  },
18574
18578
  addSubagent(t) {
18575
- if (!jt) {
18579
+ if (!Nt) {
18576
18580
  e.debug && console.warn("[page-agent-sdk][addSubagent] 未配 subagents:[] 或 capabilities.subagent 关闭,忽略");
18577
18581
  return;
18578
18582
  }
18579
- jt.add(t), G.infoTick.value++;
18583
+ Nt.add(t), G.infoTick.value++;
18580
18584
  },
18581
18585
  removeSubagent(t) {
18582
- if (!jt) return e.debug && console.warn("[page-agent-sdk][removeSubagent] 未配 subagents:[] 或 capabilities.subagent 关闭,忽略"), !1;
18583
- let n = jt.remove(t);
18586
+ if (!Nt) return e.debug && console.warn("[page-agent-sdk][removeSubagent] 未配 subagents:[] 或 capabilities.subagent 关闭,忽略"), !1;
18587
+ let n = Nt.remove(t);
18584
18588
  return n && G.infoTick.value++, n;
18585
18589
  },
18586
18590
  getActiveSubagents() {
@@ -18601,7 +18605,7 @@ function BC(e, n, r) {
18601
18605
  schema: e.schema,
18602
18606
  source: Oe.get(e.name) || "user"
18603
18607
  })),
18604
- skills: (qt ? qt.controller.get() : e.skills ?? []).map((e) => ({
18608
+ skills: (Yt ? Yt.controller.get() : e.skills ?? []).map((e) => ({
18605
18609
  name: e.name,
18606
18610
  description: e.description
18607
18611
  })),
@@ -18615,16 +18619,16 @@ function BC(e, n, r) {
18615
18619
  summaryThresholdRatio: h.summaryThresholdRatio ?? .5,
18616
18620
  promptSoftCap: Sh(m.contextWindow, h.promptSoftCapTokens)
18617
18621
  },
18618
- memory: re.get(),
18622
+ memory: ie.get(),
18619
18623
  staleReadsInvalidated: G.agent?.getStaleReadsInvalidated?.() ?? 0,
18620
- hostReadsInvalidated: zt.readsInvalidated,
18624
+ hostReadsInvalidated: Vt.readsInvalidated,
18621
18625
  ...Re ? { proposals: Re.snapshot() } : {},
18622
18626
  ...r ? { hostWatch: { ...r } } : {},
18623
18627
  llmRetries: G.agent?.getLlmRetries?.() ?? 0,
18624
18628
  llmCallFailures: G.agent?.getLlmCallFailures?.() ?? 0,
18625
18629
  gates: G.agent?.getGateStats?.(),
18626
18630
  systemSegments: G.agent?.getLastSystemSegments?.() ?? [],
18627
- middleware: nn.map((e) => e.name),
18631
+ middleware: an.map((e) => e.name),
18628
18632
  todos: (G.agent?.getState?.()?.todos ?? []).map((e) => ({
18629
18633
  id: e.id,
18630
18634
  content: e.content,
@@ -18637,28 +18641,28 @@ function BC(e, n, r) {
18637
18641
  planPhase: C.getPlanPhase(),
18638
18642
  mission: ot ? T.getMission() : void 0,
18639
18643
  planConfirmation: A.lastPlanConfirmation,
18640
- workingMemory: st ? ne.getWorkingMemory() : void 0,
18641
- focus: Xe ? P.getFocus() : void 0,
18642
- focuses: Xe ? P.getFocuses() : [],
18644
+ workingMemory: st ? re.getWorkingMemory() : void 0,
18645
+ focus: Xe ? ne.getFocus() : void 0,
18646
+ focuses: Xe ? ne.getFocuses() : [],
18643
18647
  actions: fC(e.actions ?? {}),
18644
18648
  subagent: {
18645
- enabled: !!Tt,
18649
+ enabled: !!Dt,
18646
18650
  maxDepth: e.subagent?.maxDepth ?? 1,
18647
18651
  maxParallel: e.subagent?.maxParallel ?? 4,
18648
18652
  timeoutMs: e.subagent?.timeoutMs === void 0 ? 18e5 : e.subagent.timeoutMs > 0 ? e.subagent.timeoutMs : 0,
18649
18653
  allowedTools: e.subagent?.allowedTools ?? [],
18650
- subagents: (jt?.get() ?? []).map(Mt),
18654
+ subagents: (Nt?.get() ?? []).map(Pt),
18651
18655
  active: mt?.getActive() ?? [],
18652
18656
  history: mt?.getHistory() ?? [],
18653
- lockedComponents: Dt?.locked() ?? {}
18657
+ lockedComponents: kt?.locked() ?? {}
18654
18658
  },
18655
18659
  verify: {
18656
- enabled: !!Ft,
18660
+ enabled: !!Lt,
18657
18661
  maxAttempts: vt ? ht : 0,
18658
18662
  adversarial: vt && !!e.verify?.adversarial
18659
18663
  },
18660
18664
  context: (() => {
18661
- let e = It?.getSnapshot();
18665
+ let e = Rt?.getSnapshot();
18662
18666
  if (e) {
18663
18667
  let t = G.agent?.getState?.()?.lastCompression;
18664
18668
  t && (e.compression = t);
@@ -18721,31 +18725,31 @@ function BC(e, n, r) {
18721
18725
  T.setMission(t), G.infoTick.value++;
18722
18726
  },
18723
18727
  getFocus() {
18724
- return Xe ? P.getFocus() : void 0;
18728
+ return Xe ? ne.getFocus() : void 0;
18725
18729
  },
18726
18730
  getFocuses() {
18727
- return Xe ? P.getFocuses() : [];
18731
+ return Xe ? ne.getFocuses() : [];
18728
18732
  },
18729
18733
  setFocus(t) {
18730
18734
  let n = zC(t, "setFocus", Xe, () => Ce()?.schema, e.debug);
18731
- return n.ok ? (P.setFocus(F(t)), e.debug && P.isInvokeActive() && console.info("[page-agent-sdk][focus] 在途流程进行中,聚焦将在下一次输入生效(当前流程不受影响)"), G.infoTick.value++, { ok: !0 }) : n;
18735
+ return n.ok ? (ne.setFocus(P(t)), e.debug && ne.isInvokeActive() && console.info("[page-agent-sdk][focus] 在途流程进行中,聚焦将在下一次输入生效(当前流程不受影响)"), G.infoTick.value++, { ok: !0 }) : n;
18732
18736
  },
18733
18737
  addFocus(t) {
18734
18738
  let n = zC(t, "addFocus", Xe, () => Ce()?.schema, e.debug);
18735
- return n.ok ? P.getFocuses().length >= 8 ? (e.debug && console.warn("[page-agent-sdk][focus] addFocus 拒绝:焦点数已达上限 8(augmentPrompt 注入每焦点子树 schema,过多致 system prompt 超预算)"), {
18739
+ return n.ok ? ne.getFocuses().length >= 8 ? (e.debug && console.warn("[page-agent-sdk][focus] addFocus 拒绝:焦点数已达上限 8(augmentPrompt 注入每焦点子树 schema,过多致 system prompt 超预算)"), {
18736
18740
  ok: !1,
18737
18741
  error: "焦点数上限 8(避免 system prompt 撑爆)"
18738
- }) : (P.addFocus(F(t)), e.debug && P.isInvokeActive() && console.info("[page-agent-sdk][focus] 在途流程进行中,聚焦将在下一次输入生效(当前流程不受影响)"), G.infoTick.value++, { ok: !0 }) : n;
18742
+ }) : (ne.addFocus(P(t)), e.debug && ne.isInvokeActive() && console.info("[page-agent-sdk][focus] 在途流程进行中,聚焦将在下一次输入生效(当前流程不受影响)"), G.infoTick.value++, { ok: !0 }) : n;
18739
18743
  },
18740
18744
  removeFocus(e) {
18741
- Xe && (P.removeFocus(e), G.infoTick.value++);
18745
+ Xe && (ne.removeFocus(e), G.infoTick.value++);
18742
18746
  },
18743
18747
  clearFocus() {
18744
- Xe && (P.clearFocus(), G.infoTick.value++);
18748
+ Xe && (ne.clearFocus(), G.infoTick.value++);
18745
18749
  },
18746
18750
  setQuote(e, t, n) {
18747
18751
  let r = yu(e ?? ""), i = Mu(n);
18748
- dn.value = r ? {
18752
+ pn.value = r ? {
18749
18753
  text: r,
18750
18754
  ...t ? { source: t } : {},
18751
18755
  ...i ? { anchor: i } : {}
@@ -18753,18 +18757,18 @@ function BC(e, n, r) {
18753
18757
  },
18754
18758
  notifyHostChange(e) {
18755
18759
  let t = typeof e?.reason == "string" ? e.reason.trim().slice(0, 200) : "";
18756
- zt.epoch += 1, t && !zt.notices.includes(t) ? zt.notices.push(t) : t || zt.notices.push(""), zt.notices.length > 5 && zt.notices.splice(0, zt.notices.length - 5), G.agent?.debugLogs?.value?.push({
18760
+ Vt.epoch += 1, t && !Vt.notices.includes(t) ? Vt.notices.push(t) : t || Vt.notices.push(""), Vt.notices.length > 5 && Vt.notices.splice(0, Vt.notices.length - 5), G.agent?.debugLogs?.value?.push({
18757
18761
  timestamp: Date.now(),
18758
18762
  type: "middleware",
18759
18763
  data: {
18760
18764
  stage: "host_change_notified",
18761
- epoch: zt.epoch,
18765
+ epoch: Vt.epoch,
18762
18766
  reason: t || void 0
18763
18767
  }
18764
18768
  }), G.infoTick.value++;
18765
18769
  },
18766
18770
  clearQuote() {
18767
- dn.value = null;
18771
+ pn.value = null;
18768
18772
  },
18769
18773
  resolveProposal(e, t, n) {
18770
18774
  let r = Re ? Re.resolve(e, t, n) : !1;
@@ -18774,13 +18778,13 @@ function BC(e, n, r) {
18774
18778
  return Re ? Re.snapshot() : null;
18775
18779
  }
18776
18780
  };
18777
- async function fn() {
18781
+ async function mn() {
18778
18782
  if (!l) return;
18779
18783
  let t = async (e) => {
18780
18784
  try {
18781
18785
  return await l.load(n, e);
18782
18786
  } catch (t) {
18783
- Kt({
18787
+ Jt({
18784
18788
  type: "error",
18785
18789
  message: `会话快照读取失败,已降级空会话:${t instanceof Error ? t.message : String(t)}`,
18786
18790
  severity: "observable",
@@ -18793,7 +18797,7 @@ function BC(e, n, r) {
18793
18797
  try {
18794
18798
  return await l.listSessions(n);
18795
18799
  } catch (e) {
18796
- return Kt({
18800
+ return Jt({
18797
18801
  type: "error",
18798
18802
  message: `会话列表读取失败,已降级新建会话:${e instanceof Error ? e.message : String(e)}`,
18799
18803
  severity: "observable",
@@ -18801,7 +18805,7 @@ function BC(e, n, r) {
18801
18805
  }), [];
18802
18806
  }
18803
18807
  }, i = Symbol("storage-ready-timeout");
18804
- await Promise.race([l.ready.then(() => "ready"), new Promise((e) => setTimeout(() => e(i), 5e3))]) === i && (console.warn("[page-agent-sdk][persist] 存储初始化 5s 未就绪(可能被其他标签页锁住),已放行;持久化暂降级内存,就绪后自动恢复"), Kt({
18808
+ await Promise.race([l.ready.then(() => "ready"), new Promise((e) => setTimeout(() => e(i), 5e3))]) === i && (console.warn("[page-agent-sdk][persist] 存储初始化 5s 未就绪(可能被其他标签页锁住),已放行;持久化暂降级内存,就绪后自动恢复"), Jt({
18805
18809
  type: "error",
18806
18810
  message: "存储初始化 5s 未就绪(IDB blocked?),已放行降级运行",
18807
18811
  severity: "observable",
@@ -18811,7 +18815,7 @@ function BC(e, n, r) {
18811
18815
  if (a.id) {
18812
18816
  G.sessionId = a.id;
18813
18817
  let e = await t(G.sessionId);
18814
- e ? (G.applySnapshot(e), Kt({
18818
+ e ? (G.applySnapshot(e), Jt({
18815
18819
  type: "session_restored",
18816
18820
  sessionId: G.sessionId,
18817
18821
  rounds: e.messages?.length ?? 0
@@ -18821,19 +18825,19 @@ function BC(e, n, r) {
18821
18825
  if (e.debug && console.log("[page-agent-sdk][restore] listSessions", n, i.length, i.map((e) => e.sessionId)), i.length) {
18822
18826
  G.sessionId = i[0].sessionId;
18823
18827
  let n = await t(G.sessionId);
18824
- n ? (G.applySnapshot(n), Kt({
18828
+ n ? (G.applySnapshot(n), Jt({
18825
18829
  type: "session_restored",
18826
18830
  sessionId: G.sessionId,
18827
18831
  rounds: n.messages?.length ?? 0
18828
18832
  }), e.debug && console.log("[page-agent-sdk][restore] 恢复会话", G.sessionId, `${n.messages?.length ?? 0} msgs`)) : e.debug && console.log("[page-agent-sdk][restore] 会话 meta 存在但快照为空", G.sessionId);
18829
18833
  } else G.sessionId = await l.createSession(n, a.title), e.debug && console.log("[page-agent-sdk][restore] 新建会话(无历史)", G.sessionId);
18830
18834
  } else G.sessionId = await l.createSession(n, a.title);
18831
- e.memory && vn.persistSave({ memory: re.get() || (typeof e.memory == "string" ? e.memory : "") }), vn.refreshSessions();
18835
+ e.memory && bn.persistSave({ memory: ie.get() || (typeof e.memory == "string" ? e.memory : "") }), bn.refreshSessions();
18832
18836
  }
18833
- async function pn() {
18834
- await $t();
18837
+ async function hn() {
18838
+ await tn();
18835
18839
  }
18836
- function mn(e) {
18840
+ function gn(e) {
18837
18841
  let t = {};
18838
18842
  for (let n of jC(e)) {
18839
18843
  let e = x.files[n];
@@ -18841,15 +18845,15 @@ function BC(e, n, r) {
18841
18845
  }
18842
18846
  return t;
18843
18847
  }
18844
- function hn() {
18848
+ function _n() {
18845
18849
  let e = MC(x.files, jC(b));
18846
18850
  for (let t of e) delete x.files[t];
18847
18851
  }
18848
- function gn() {
18849
- let e = uh(b, rn);
18852
+ function vn() {
18853
+ let e = uh(b, on);
18850
18854
  if (!e.trimmed) return;
18851
18855
  let { older: t, summary: n } = e;
18852
- if (Kt({
18856
+ if (Jt({
18853
18857
  type: "context_trimmed",
18854
18858
  dropped: t.map((e) => ({
18855
18859
  round: e.round,
@@ -18857,43 +18861,43 @@ function BC(e, n, r) {
18857
18861
  assistant: e.assistantMsgs.map((e) => e.content),
18858
18862
  steps: e.assistantMsgs.flatMap((e) => e.steps ?? [])
18859
18863
  })),
18860
- vfsResults: mn(t.flatMap((e) => [e.userMsg, ...e.assistantMsgs])),
18864
+ vfsResults: gn(t.flatMap((e) => [e.userMsg, ...e.assistantMsgs])),
18861
18865
  summary: n.content,
18862
18866
  reason: "max_memory_rounds"
18863
- }), b.splice(e.deleteFrom, e.deleteCount, n), hn(), g && d) {
18867
+ }), b.splice(e.deleteFrom, e.deleteCount, n), _n(), g && d) {
18864
18868
  let n = e.summary, { prevSeg: r } = e;
18865
18869
  (async () => {
18866
18870
  try {
18867
18871
  let e = await d(_h(t, v)), i = b.indexOf(n);
18868
18872
  if (i < 0) return;
18869
- b[i].content = lh(t, r, e), vn.persistRuntime();
18873
+ b[i].content = lh(t, r, e), bn.persistRuntime();
18870
18874
  } catch {}
18871
18875
  })();
18872
18876
  }
18873
18877
  }
18874
- let _n = hu({
18878
+ let yn = hu({
18875
18879
  getConfig: () => e.images,
18876
18880
  getVision: () => m.vision === !0,
18877
- emit: Kt,
18881
+ emit: Jt,
18878
18882
  getVfsStore: () => G.vfsStore,
18879
- noteFailure: (e, t) => vn.notePersistFailure(e, t)
18880
- }), vn = yb({
18883
+ noteFailure: (e, t) => bn.notePersistFailure(e, t)
18884
+ }), bn = yb({
18881
18885
  agentId: n,
18882
18886
  options: e,
18883
- emit: Kt,
18887
+ emit: Jt,
18884
18888
  getStore: () => l,
18885
18889
  core: G,
18886
- sessionsRef: on,
18890
+ sessionsRef: cn,
18887
18891
  sessionVars: A,
18888
18892
  messages: b,
18889
18893
  getUsage: () => a,
18890
18894
  mw: {
18891
18895
  todosMw: C,
18892
- memoryMw: re,
18896
+ memoryMw: ie,
18893
18897
  missionMw: T,
18894
- workingMemoryMw: ne,
18895
- focusMw: P,
18896
- summarizationMw: en,
18898
+ workingMemoryMw: re,
18899
+ focusMw: ne,
18900
+ summarizationMw: nn,
18897
18901
  resumeNoticeMw: k,
18898
18902
  useMission: ot,
18899
18903
  useWorkingMemory: st,
@@ -18903,13 +18907,13 @@ function BC(e, n, r) {
18903
18907
  vfsStore: x,
18904
18908
  checkpointMgr: z,
18905
18909
  conflictResolve: (e) => o.resolve(e),
18906
- abortAllActive: un,
18910
+ abortAllActive: fn,
18907
18911
  titleLlmInvoke: f
18908
18912
  });
18909
18913
  return G.initDone = (async () => {
18910
- await fn(), await pn(), e.mcp?.length && Xg({
18914
+ await mn(), await hn(), e.mcp?.length && Xg({
18911
18915
  servers: e.mcp,
18912
- emit: Kt,
18916
+ emit: Jt,
18913
18917
  isReleased: () => Ke,
18914
18918
  core: {
18915
18919
  mcpClosers: G.mcpClosers,
@@ -18931,12 +18935,12 @@ function BC(e, n, r) {
18931
18935
  },
18932
18936
  debug: e.debug
18933
18937
  });
18934
- let t = vy(e.llm) ? e.llm : await I(e.llm);
18935
- by(t, { emit: Kt }), G.agent = yp({
18938
+ let t = vy(e.llm) ? e.llm : await F(e.llm);
18939
+ by(t, { emit: Jt }), G.agent = yp({
18936
18940
  llm: t,
18937
18941
  systemPrompt: ve,
18938
18942
  tools: W,
18939
- middleware: nn,
18943
+ middleware: an,
18940
18944
  maxToolRounds: e.maxToolRounds,
18941
18945
  hasSubagent: pt,
18942
18946
  pageAssertionGate: V.domInspect === !0,
@@ -18958,7 +18962,7 @@ function BC(e, n, r) {
18958
18962
  y = e;
18959
18963
  },
18960
18964
  debug: e.debug
18961
- }), ie.current = G.agent, At && At.setReconfigureHook(() => {
18965
+ }), ae.current = G.agent, Mt && Mt.setReconfigureHook(() => {
18962
18966
  G.agent && G.agent.setTools(it());
18963
18967
  });
18964
18968
  })(), G;
@@ -19839,13 +19843,13 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
19839
19843
  }, te = (e, t) => {
19840
19844
  let [, n] = A(), r = { xt: n };
19841
19845
  return M(r), n && !t && j(r, e ? o : i), r;
19842
- }, P = (e, t, n) => {
19846
+ }, ne = (e, t, n) => {
19843
19847
  let r = { Ht: t };
19844
19848
  return M(r), t && !n && j(r, i), r;
19845
- }, [F, I] = y ? OD(g, ee) : [], ne = !b && DD(g, N, { ft: !0 }), [re, ie] = TD(g, !1, P, {
19849
+ }, [P, F] = y ? OD(g, ee) : [], re = !b && DD(g, N, { ft: !0 }), [ie, ae] = TD(g, !1, ne, {
19846
19850
  ct: m,
19847
19851
  et: m
19848
- }), ae = b && nw && new nw(((e) => {
19852
+ }), oe = b && nw && new nw(((e) => {
19849
19853
  let t = e[e.length - 1].contentRect;
19850
19854
  N({
19851
19855
  _t: !0,
@@ -19854,8 +19858,8 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
19854
19858
  }));
19855
19859
  return [
19856
19860
  () => {
19857
- ae && ae.observe(g);
19858
- let e = ne && ne(), t = F && F(), n = re(), r = O.G(((e) => {
19861
+ oe && oe.observe(g);
19862
+ let e = re && re(), t = P && P(), n = ie(), r = O.G(((e) => {
19859
19863
  let [, t] = A();
19860
19864
  j({
19861
19865
  Et: e,
@@ -19864,7 +19868,7 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
19864
19868
  }, s);
19865
19869
  }));
19866
19870
  return () => {
19867
- ae && ae.disconnect(), e && e(), t && t(), l && l(), n(), r();
19871
+ oe && oe.disconnect(), e && e(), t && t(), l && l(), n(), r();
19868
19872
  };
19869
19873
  },
19870
19874
  ({ Dt: e, zt: t, It: n }) => {
@@ -19883,8 +19887,8 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
19883
19887
  l = e(), c = t;
19884
19888
  }
19885
19889
  if (S && (j.O(), uw(x) || ow(x) ? (i = x, a = !1, o = pD, s = mD) : pw(x) ? (i = x.mutation, a = x.resize, o = x.event, s = x.env) : (i = !1, a = !1, o = !1, s = !1)), w) {
19886
- let e = ie(), t = I && I(), n = c && c();
19887
- e && Xw(r, P(e[0], e[1], w)), t && Xw(r, ee(t[0], w)), n && Xw(r, te(n[0], w));
19890
+ let e = ae(), t = F && F(), n = c && c();
19891
+ e && Xw(r, ne(e[0], e[1], w)), t && Xw(r, ee(t[0], w)), n && Xw(r, te(n[0], w));
19888
19892
  }
19889
19893
  return M(r), r;
19890
19894
  },
@@ -20013,21 +20017,21 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
20013
20017
  }, O = (e) => {
20014
20018
  let { Rt: t } = n, r = UT(h)[c] - UT(g)[c], i = 1 / T * e / r;
20015
20019
  D(i * t[l]);
20016
- }, k = r[i], A = v(), j = C(), M = A[a], ee = w(A, j) + M / 2, N = k - j[o] - ee, te = m ? 0 : N, P = (e) => {
20017
- ww(ne), _.releasePointerCapture(e.pointerId);
20018
- }, F = m || e, I = p(), ne = [
20019
- QT(f, t, P),
20020
+ }, k = r[i], A = v(), j = C(), M = A[a], ee = w(A, j) + M / 2, N = k - j[o] - ee, te = m ? 0 : N, ne = (e) => {
20021
+ ww(re), _.releasePointerCapture(e.pointerId);
20022
+ }, P = m || e, F = p(), re = [
20023
+ QT(f, t, ne),
20020
20024
  QT(f, "selectstart", ((e) => eE(e)), { D: !1 }),
20021
- QT(h, t, P),
20022
- F && QT(h, "pointermove", ((e) => O(te + e[i] - k))),
20023
- F && (() => {
20025
+ QT(h, t, ne),
20026
+ P && QT(h, "pointermove", ((e) => O(te + e[i] - k))),
20027
+ P && (() => {
20024
20028
  let e = rE(d);
20025
- I();
20029
+ F();
20026
20030
  let t = rE(d), n = {
20027
20031
  x: t.x - e.x,
20028
20032
  y: t.y - e.y
20029
20033
  };
20030
- (qC(n.x) > 3 || qC(n.y) > 3) && (p(), nE(d, e), x(n), y(I));
20034
+ (qC(n.x) > 3 || qC(n.y) > 3) && (p(), nE(d, e), x(n), y(F));
20031
20035
  })
20032
20036
  ];
20033
20037
  if (_.setPointerCapture(r.pointerId), e) O(N);
@@ -20035,9 +20039,9 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
20035
20039
  let e = gE(lD);
20036
20040
  if (e) {
20037
20041
  let { Vt: t } = n, r = e(D, O, Ww(w), N, t[l], S, !!s, ((e) => {
20038
- e ? I() : yw(ne, I);
20042
+ e ? F() : yw(re, F);
20039
20043
  }));
20040
- yw(ne, r), yw(u, Ww(r, !0));
20044
+ yw(re, r), yw(u, Ww(r, !0));
20041
20045
  }
20042
20046
  }
20043
20047
  }
@@ -20091,7 +20095,7 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
20091
20095
  }, ID = (e, t, n, r, i, a, o) => {
20092
20096
  let s, c, l, u, d, f = $w, p = 0, m = ["mouse", "pen"], h = (e) => (t) => {
20093
20097
  n.Kt || e(t);
20094
- }, g = (e) => m.includes(e.pointerType), [_, v] = Gw(), [y, b] = Gw(100), [x, S] = Gw(50), [C, w] = Gw((() => p)), [T, E] = PD(e, a, i, FD(t, a, i, h, ((e) => g(e) && P()))), { vt: D, Qt: O, bt: k } = a, { Ft: A, Ut: j, Nt: M, qt: ee, Bt: N } = T, te = (e, t) => {
20098
+ }, g = (e) => m.includes(e.pointerType), [_, v] = Gw(), [y, b] = Gw(100), [x, S] = Gw(50), [C, w] = Gw((() => p)), [T, E] = PD(e, a, i, FD(t, a, i, h, ((e) => g(e) && ne()))), { vt: D, Qt: O, bt: k } = a, { Ft: A, Ut: j, Nt: M, qt: ee, Bt: N } = T, te = (e, t) => {
20095
20099
  w();
20096
20100
  let r = (e) => {
20097
20101
  n.Kt || A(QE, e);
@@ -20101,45 +20105,45 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
20101
20105
  let e = !l || !s;
20102
20106
  p > 0 && !t ? C(Ww(r, e)) : r(e);
20103
20107
  }
20104
- }, P = () => {
20108
+ }, ne = () => {
20105
20109
  (l ? !s : !u) && (te(!0), y((() => {
20106
20110
  te(!1);
20107
20111
  })));
20108
- }, F = (e) => {
20112
+ }, P = (e) => {
20109
20113
  g(e) && (s = !0, !n.Kt && l && te(!0));
20110
- }, I = (e) => {
20114
+ }, F = (e) => {
20111
20115
  g(e) && (s = !1, !n.Kt && l && te(!1));
20112
- }, ne = (e) => {
20116
+ }, re = (e) => {
20113
20117
  A(ZE, e, !0), A(ZE, e, !1);
20114
- }, re = [
20118
+ }, ie = [
20115
20119
  w,
20116
20120
  b,
20117
20121
  S,
20118
20122
  v,
20119
20123
  () => f(),
20120
- QT(D, "pointerover", F, { A: !0 }),
20121
- QT(D, "pointerenter", F),
20122
- QT(D, "pointerleave", I),
20124
+ QT(D, "pointerover", P, { A: !0 }),
20125
+ QT(D, "pointerenter", P),
20126
+ QT(D, "pointerleave", F),
20123
20127
  QT(D, "pointermove", h(((e) => {
20124
- g(e) && c && P();
20128
+ g(e) && c && ne();
20125
20129
  }))),
20126
20130
  QT(O, "scroll", h(((e) => {
20127
20131
  _((() => {
20128
- M(), P();
20132
+ M(), ne();
20129
20133
  })), o(e), N();
20130
20134
  })))
20131
- ], ie = gE(cD);
20135
+ ], ae = gE(cD);
20132
20136
  return [
20133
- () => Ww(ww, yw(re, E())),
20137
+ () => Ww(ww, yw(ie, E())),
20134
20138
  ({ Dt: e, It: t, Zt: n, tn: a }) => {
20135
- let { nn: o, sn: s, en: m, cn: g } = a || {}, { Ct: _, ft: v } = n || {}, { B: y } = r, { M: b, P: S } = CD(), { rn: C, j: w } = i, [T, E] = e("showNativeOverlaidScrollbars"), [D, P] = e("scrollbars.theme"), [F, I] = e("scrollbars.visibility"), [re, ae] = e("scrollbars.autoHide"), [oe, se] = e("scrollbars.autoHideSuspend"), [ce] = e("scrollbars.autoHideDelay"), [L, R] = e("scrollbars.dragScroll"), [le, ue] = e("scrollbars.clickScroll"), [de, fe] = e("overflow"), pe = v && !t, me = o || s || g || _ || t, z = m || I || fe, B = T && b.x && b.y, V = !S && !ie, he = B || V, ge = (e, t, n) => {
20136
- let r = e.includes(Rw) && (F === Iw || F === "auto" && t === Rw);
20139
+ let { nn: o, sn: s, en: m, cn: g } = a || {}, { Ct: _, ft: v } = n || {}, { B: y } = r, { M: b, P: S } = CD(), { rn: C, j: w } = i, [T, E] = e("showNativeOverlaidScrollbars"), [D, ne] = e("scrollbars.theme"), [P, F] = e("scrollbars.visibility"), [ie, oe] = e("scrollbars.autoHide"), [se, ce] = e("scrollbars.autoHideSuspend"), [le] = e("scrollbars.autoHideDelay"), [I, L] = e("scrollbars.dragScroll"), [ue, de] = e("scrollbars.clickScroll"), [fe, R] = e("overflow"), pe = v && !t, me = o || s || g || _ || t, z = m || F || R, B = T && b.x && b.y, V = !S && !ae, he = B || V, ge = (e, t, n) => {
20140
+ let r = e.includes(Rw) && (P === Iw || P === "auto" && t === Rw);
20137
20141
  return A(qE, r, n), r;
20138
20142
  };
20139
- if (p = ce, (E || V) && A(BE, he), P && (A(d), A(D, !0), d = D), (se || pe) && (ne(!oe), pe && oe && (w.x || w.y ? (f(), x((() => {
20140
- f = QT(O, Rw, h(Ww(ne, !0)), { A: !0 });
20141
- }))) : ne(!0))), ae && (c = re === "move", l = re === "leave", u = re === "never", te(u, !0)), R && A(tD, L), ue && A(eD, !!le), z) {
20142
- let e = ge(de.x, C.x, !0), t = ge(de.y, C.y, !1);
20143
+ if (p = le, (E || V) && A(BE, he), ne && (A(d), A(D, !0), d = D), (ce || pe) && (re(!se), pe && se && (w.x || w.y ? (f(), x((() => {
20144
+ f = QT(O, Rw, h(Ww(re, !0)), { A: !0 });
20145
+ }))) : re(!0))), oe && (c = ie === "move", l = ie === "leave", u = ie === "never", te(u, !0)), L && A(tD, I), de && A(eD, !!ue), z) {
20146
+ let e = ge(fe.x, C.x, !0), t = ge(fe.y, C.y, !1);
20143
20147
  A(JE, !(e && t));
20144
20148
  }
20145
20149
  me && (M(), j(), N(), g && ee(), A(XE, !w.x, !0), A(XE, !w.y, !1), A(HE, y && !k));
@@ -20156,13 +20160,13 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
20156
20160
  k,
20157
20161
  j,
20158
20162
  A
20159
- ].map(((e) => mw(e) && !yT(e) && e)), N = (e) => e && _w(ee, e), te = !N(k) && C(k) ? k : p, P = E ? g : k, F = {
20163
+ ].map(((e) => mw(e) && !yT(e) && e)), N = (e) => e && _w(ee, e), te = !N(k) && C(k) ? k : p, ne = E ? g : k, P = {
20160
20164
  dt: p,
20161
20165
  vt: A,
20162
20166
  L: k,
20163
20167
  ln: j,
20164
20168
  ht: M,
20165
- gt: P,
20169
+ gt: ne,
20166
20170
  Qt: E ? h : k,
20167
20171
  an: m ? g : te,
20168
20172
  Gt: h,
@@ -20172,31 +20176,31 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
20172
20176
  un: _,
20173
20177
  yt: (e) => uT(k, EE, e),
20174
20178
  wt: (e, t) => lT(k, EE, e, t),
20175
- St: () => lT(P, EE, jE, !0)
20176
- }, { dt: I, vt: ne, ln: re, L: ie, ht: ae } = F, oe = [() => {
20177
- aT(ne, [wE, xE]), aT(I, xE), m && aT(g, [xE, wE]);
20178
- }], se = vT([
20179
+ St: () => lT(ne, EE, jE, !0)
20180
+ }, { dt: F, vt: re, ln: ie, L: ae, ht: oe } = P, se = [() => {
20181
+ aT(re, [wE, xE]), aT(F, xE), m && aT(g, [xE, wE]);
20182
+ }], ce = vT([
20183
+ oe,
20179
20184
  ae,
20180
20185
  ie,
20181
20186
  re,
20182
- ne,
20183
- I
20184
- ].find(((e) => e && !N(e)))), ce = E ? I : ae || ie, L = Ww(ww, oe);
20187
+ F
20188
+ ].find(((e) => e && !N(e)))), le = E ? F : oe || ae, I = Ww(ww, se);
20185
20189
  return [
20186
- F,
20190
+ P,
20187
20191
  () => {
20188
20192
  let e = _(), t = xT(), r = (e) => {
20189
20193
  wT(yT(e), vT(e)), CT(e);
20190
20194
  }, i = (e) => QT(e, "focusin focusout focus blur", tE, {
20191
20195
  I: !0,
20192
20196
  D: !1
20193
- }), a = "tabindex", o = nT(ie, a), s = i(t);
20194
- return iT(ne, wE, T ? "" : TE), iT(re, PE, ""), iT(ie, EE, ""), iT(ae, FE, ""), T || (iT(ie, a, o || "-1"), m && iT(g, CE, "")), wT(ce, se), wT(ne, re), wT(re || ne, !T && ie), wT(ie, ae), yw(oe, [s, () => {
20195
- let e = xT(), t = N(ie), n = t && e === ie ? I : e, s = i(n);
20196
- aT(re, PE), aT(ae, FE), aT(ie, EE), m && aT(g, CE), o ? iT(ie, a, o) : aT(ie, a), N(ae) && r(ae), t && r(ie), N(re) && r(re), cE(n), s();
20197
- }]), n && !T && (cT(ie, EE, ME), yw(oe, Ww(aT, ie, EE))), cE(!T && m && t === I && e.top === e ? ie : t), s(), se = 0, L;
20197
+ }), a = "tabindex", o = nT(ae, a), s = i(t);
20198
+ return iT(re, wE, T ? "" : TE), iT(ie, PE, ""), iT(ae, EE, ""), iT(oe, FE, ""), T || (iT(ae, a, o || "-1"), m && iT(g, CE, "")), wT(le, ce), wT(re, ie), wT(ie || re, !T && ae), wT(ae, oe), yw(se, [s, () => {
20199
+ let e = xT(), t = N(ae), n = t && e === ae ? F : e, s = i(n);
20200
+ aT(ie, PE), aT(oe, FE), aT(ae, EE), m && aT(g, CE), o ? iT(ae, a, o) : aT(ae, a), N(oe) && r(oe), t && r(ae), N(ie) && r(ie), cE(n), s();
20201
+ }]), n && !T && (cT(ae, EE, ME), yw(se, Ww(aT, ae, EE))), cE(!T && m && t === F && e.top === e ? ae : t), s(), ce = 0, I;
20198
20202
  },
20199
- L
20203
+ I
20200
20204
  ];
20201
20205
  }, RD = ({ ht: e }) => ({ Zt: t, fn: n, It: r }) => {
20202
20206
  let { $t: i } = t || {}, { Ot: a } = n;
@@ -20324,20 +20328,20 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
20324
20328
  Iw,
20325
20329
  Lw,
20326
20330
  Rw
20327
- ].map(((t) => ne(oD(t), e))), n = t(!0).concat(t()).join(" ");
20328
- u(n), u(Yw(e).map(((t) => ne(e[t], t === "x"))).join(" "), !0);
20331
+ ].map(((t) => re(oD(t), e))), n = t(!0).concat(t()).join(" ");
20332
+ u(n), u(Yw(e).map(((t) => re(e[t], t === "x"))).join(" "), !0);
20329
20333
  }, [T, E] = HC(_, Ww(KT, a)), [D, O] = HC(_, Ww(GT, a)), [k, A] = HC(_), [j] = HC(v), [M, ee] = HC(_), [N] = HC(v), [te] = HC({
20330
20334
  i: (e, t) => Bw(e, t, Cw(vw(Yw(e), Yw(t)))),
20331
20335
  o: {}
20332
- }), [P, F] = HC({
20336
+ }), [ne, P] = HC({
20333
20337
  i: (e, t) => Hw(e.T, t.T) && Hw(e.k, t.k),
20334
20338
  o: iE()
20335
- }), I = gE(cD), ne = (e, t) => `${t ? DE : OE}${zw(e)}`;
20339
+ }), F = gE(cD), re = (e, t) => `${t ? DE : OE}${zw(e)}`;
20336
20340
  return ({ Dt: o, Zt: s, fn: c, It: l }, { dn: h }) => {
20337
- let { _t: g, Ht: _, xt: v, Ct: ne, ft: re, Et: ie } = s || {}, { X: ae, Y: oe, W: se } = I && I.R(e, t, c, n, o) || {}, [ce, L] = rD(o, n), [R, le] = o("overflow"), ue = iD(R.x), de = iD(R.y), fe = g || h || v || ne || ie || L, pe = E(l), me = O(l), z = A(l), B = ee(l);
20338
- if (L && f && u(ME, !ce), fe) {
20341
+ let { _t: g, Ht: _, xt: v, Ct: re, ft: ie, Et: ae } = s || {}, { X: oe, Y: se, W: ce } = F && F.R(e, t, c, n, o) || {}, [le, I] = rD(o, n), [L, ue] = o("overflow"), de = iD(L.x), fe = iD(L.y), R = g || h || v || re || ae || I, pe = E(l), me = O(l), z = A(l), B = ee(l);
20342
+ if (I && f && u(ME, !le), R) {
20339
20343
  uT(r, wE, SE) && y(!0);
20340
- let e = oe && oe(), [t] = pe = T(l), [n] = me = D(l), i = WT(a), o = p && HT(d()), s = {
20344
+ let e = se && se(), [t] = pe = T(l), [n] = me = D(l), i = WT(a), o = p && HT(d()), s = {
20341
20345
  w: m(n.w + t.w),
20342
20346
  h: m(n.h + t.h)
20343
20347
  }, c = {
@@ -20349,8 +20353,8 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
20349
20353
  let [V, he] = B, [ge, H] = z, [_e, ve] = me, [U, ye] = pe, [be] = j({
20350
20354
  x: ge.w > 0,
20351
20355
  y: ge.h > 0
20352
- }), xe = ue && de && (be.x || be.y) || ue && be.x && !be.y || de && be.y && !be.x, Se = h || ne || ie || ye || ve || he || H || le || L || fe || _ && p, [Ce] = o("update.flowDirectionStyles"), [we, Te] = te(Ce ? Ce(a) || {} : b(), l), [Ee, De] = ne || re || Te || l ? P(x(we, !!Ce), l) : F(), Oe = C(be, R);
20353
- y(!1), Se && (w(Oe), Oe = sD(a, be), se && ae && (ae(Oe, _e, U), FT(a, se(Oe))));
20356
+ }), xe = de && fe && (be.x || be.y) || de && be.x && !be.y || fe && be.y && !be.x, Se = h || re || ae || ye || ve || he || H || ue || I || R || _ && p, [Ce] = o("update.flowDirectionStyles"), [we, Te] = te(Ce ? Ce(a) || {} : b(), l), [Ee, De] = re || ie || Te || l ? ne(x(we, !!Ce), l) : P(), Oe = C(be, L);
20357
+ y(!1), Se && (w(Oe), Oe = sD(a, be), ce && oe && (oe(Oe, _e, U), FT(a, ce(Oe))));
20354
20358
  let [ke, Ae] = N(Oe);
20355
20359
  return lT(r, wE, SE, xe), lT(i, PE, SE, xe), Xw(t, {
20356
20360
  rn: ke,
@@ -21391,12 +21395,12 @@ function iO(e = {}) {
21391
21395
  };
21392
21396
  }), x = pc(() => (n.messages.length, typeof e.canUndo == "function" && !!e.canUndo())), S = () => {
21393
21397
  e.onUndo?.() && (n.error = null);
21394
- }, C = (e) => new Date(e).toLocaleTimeString(ce, {
21398
+ }, C = (e) => new Date(e).toLocaleTimeString(le, {
21395
21399
  hour: "2-digit",
21396
21400
  minute: "2-digit"
21397
21401
  }), w = () => {
21398
21402
  let e = T.value, t = M.value;
21399
- !o.value.trim() && !e.length || (r(o.value, I.value, e.length ? [...e] : void 0, t ?? void 0), o.value = "", T.value = [], t && N());
21403
+ !o.value.trim() && !e.length || (r(o.value, F.value, e.length ? [...e] : void 0, t ?? void 0), o.value = "", T.value = [], t && N());
21400
21404
  }, T = /* @__PURE__ */ Rn([]), E = /* @__PURE__ */ Rn(""), D = /* @__PURE__ */ Rn(!1), O, k = (e) => {
21401
21405
  E.value = e, clearTimeout(O), O = setTimeout(() => {
21402
21406
  E.value = "";
@@ -21406,16 +21410,16 @@ function iO(e = {}) {
21406
21410
  if (!t.length) return;
21407
21411
  let n = 4 - T.value.length;
21408
21412
  if (n <= 0) {
21409
- k(`${L.imageCountLimitPrefix}4${L.imageCountLimitSuffix}`);
21413
+ k(`${I.imageCountLimitPrefix}4${I.imageCountLimitSuffix}`);
21410
21414
  return;
21411
21415
  }
21412
- t.length > n && k(`${L.imageCountLimitPrefix}4${L.imageCountLimitSuffix}`), D.value = !0;
21416
+ t.length > n && k(`${I.imageCountLimitPrefix}4${I.imageCountLimitSuffix}`), D.value = !0;
21413
21417
  try {
21414
21418
  for (let e of t.slice(0, n)) try {
21415
21419
  let t = await fu(e, { name: e.name });
21416
21420
  T.value.push(t);
21417
21421
  } catch (e) {
21418
- k(e instanceof tu ? `${e.message}` : L.imageInvalid);
21422
+ k(e instanceof tu ? `${e.message}` : I.imageInvalid);
21419
21423
  }
21420
21424
  } finally {
21421
21425
  D.value = !1;
@@ -21428,23 +21432,23 @@ function iO(e = {}) {
21428
21432
  e.onClearQuote?.();
21429
21433
  }, te = (e) => {
21430
21434
  e.isComposing || e.keyCode === 229 || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), w());
21431
- }, P = (e) => {
21435
+ }, ne = (e) => {
21432
21436
  o.value = a.value[e] || "", i(e);
21433
- }, F = (e) => {
21437
+ }, P = (e) => {
21434
21438
  let t = n.messages, r = t[e];
21435
21439
  if (!r || r.role !== "assistant") return !1;
21436
21440
  let i = "reasoning" in r ? r.reasoning : void 0, a = "steps" in r ? r.steps : void 0;
21437
21441
  return n.loading && e === t.length - 1 && !r.content && !i && !(a && a.length);
21438
- }, I = pc(() => (e.infoTick?.value, e.getFocuses?.() ?? [])), ne = pc(() => (e.infoTick?.value, e.getInfo?.()?.planConfirmation)), re = (t) => e.onAddFocus ? e.onAddFocus(t) : {
21442
+ }, F = pc(() => (e.infoTick?.value, e.getFocuses?.() ?? [])), re = pc(() => (e.infoTick?.value, e.getInfo?.()?.planConfirmation)), ie = (t) => e.onAddFocus ? e.onAddFocus(t) : {
21439
21443
  ok: !1,
21440
21444
  error: "focus 未启用"
21441
- }, ie = (t) => {
21445
+ }, ae = (t) => {
21442
21446
  e.onRemoveFocus?.(t);
21443
- }, ae = () => {
21447
+ }, oe = () => {
21444
21448
  e.onClearFocus?.();
21445
- }, oe = (t) => {
21449
+ }, se = (t) => {
21446
21450
  e.onFocusChipClick?.(t);
21447
- }, se = QD(e.icons), ce = e.locale ?? "zh-CN", L = nO(ce, e.dialogMessages);
21451
+ }, ce = QD(e.icons), le = e.locale ?? "zh-CN", I = nO(le, e.dialogMessages);
21448
21452
  return {
21449
21453
  chat: t,
21450
21454
  inputText: o,
@@ -21475,17 +21479,17 @@ function iO(e = {}) {
21475
21479
  quote: M,
21476
21480
  setQuote: ee,
21477
21481
  clearQuote: N,
21478
- editQueued: P,
21479
- isPendingAssistant: F,
21480
- focuses: I,
21481
- planConfirmation: ne,
21482
- addFocus: re,
21483
- removeFocus: ie,
21484
- clearFocus: ae,
21485
- focusChipClick: oe,
21486
- icons: se,
21487
- locale: ce,
21488
- messages: L,
21482
+ editQueued: ne,
21483
+ isPendingAssistant: P,
21484
+ focuses: F,
21485
+ planConfirmation: re,
21486
+ addFocus: ie,
21487
+ removeFocus: ae,
21488
+ clearFocus: oe,
21489
+ focusChipClick: se,
21490
+ icons: ce,
21491
+ locale: le,
21492
+ messages: I,
21489
21493
  toolStepView: e.toolStepView
21490
21494
  };
21491
21495
  }
@@ -21776,20 +21780,20 @@ function Dk() {
21776
21780
  }
21777
21781
  }, A = function() {
21778
21782
  return T ||= (w = wk(u, i), !0), w;
21779
- }, j = n, M = j.implementation, ee = j.createNodeIterator, N = j.createDocumentFragment, te = j.getElementsByTagName, P = r.importNode, F = Tk();
21783
+ }, j = n, M = j.implementation, ee = j.createNodeIterator, N = j.createDocumentFragment, te = j.getElementsByTagName, ne = r.importNode, P = Tk();
21780
21784
  t.isSupported = typeof fO == "function" && typeof g == "function" && M && M.createHTMLDocument !== void 0;
21781
- let I = ck, ne = lk, re = uk, ie = dk, ae = fk, oe = mk, se = hk, ce = _k, L = pk, R = null, le = GO({}, [
21785
+ let F = ck, re = lk, ie = uk, ae = dk, oe = fk, se = mk, ce = hk, le = _k, I = pk, L = null, ue = GO({}, [
21782
21786
  ...ZO,
21783
21787
  ...QO,
21784
21788
  ...$O,
21785
21789
  ...tk,
21786
21790
  ...rk
21787
- ]), ue = null, de = GO({}, [
21791
+ ]), de = null, fe = GO({}, [
21788
21792
  ...ik,
21789
21793
  ...ak,
21790
21794
  ...ok,
21791
21795
  ...sk
21792
- ]), fe = Object.seal(yO(null, {
21796
+ ]), R = Object.seal(yO(null, {
21793
21797
  tagNameCheck: {
21794
21798
  writable: !0,
21795
21799
  configurable: !1,
@@ -21864,19 +21868,19 @@ function Dk() {
21864
21868
  }, tt = function() {
21865
21869
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
21866
21870
  if (Qe && Qe === e) return;
21867
- (!e || typeof e != "object") && (e = {}), e = qO(e), Ye = Xe.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Ze = Ye === "application/xhtml+xml" ? AO : kO, R = Ek(e, "ALLOWED_TAGS", le, { transform: Ze }), ue = Ek(e, "ALLOWED_ATTR", de, { transform: Ze }), He = Ek(e, "ALLOWED_NAMESPACES", Ue, { transform: AO }), Fe = Ek(e, "ADD_URI_SAFE_ATTR", Ie, {
21871
+ (!e || typeof e != "object") && (e = {}), e = qO(e), Ye = Xe.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Ze = Ye === "application/xhtml+xml" ? AO : kO, L = Ek(e, "ALLOWED_TAGS", ue, { transform: Ze }), de = Ek(e, "ALLOWED_ATTR", fe, { transform: Ze }), He = Ek(e, "ALLOWED_NAMESPACES", Ue, { transform: AO }), Fe = Ek(e, "ADD_URI_SAFE_ATTR", Ie, {
21868
21872
  transform: Ze,
21869
21873
  base: Ie
21870
21874
  }), Ne = Ek(e, "ADD_DATA_URI_TAGS", Pe, {
21871
21875
  transform: Ze,
21872
21876
  base: Pe
21873
- }), je = Ek(e, "FORBID_CONTENTS", Me, { transform: Ze }), pe = Ek(e, "FORBID_TAGS", qO({}), { transform: Ze }), me = Ek(e, "FORBID_ATTR", qO({}), { transform: Ze }), Ae = zO(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? qO(e.USE_PROFILES) : e.USE_PROFILES : !1, B = e.ALLOW_ARIA_ATTR !== !1, V = e.ALLOW_DATA_ATTR !== !1, he = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ge = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = e.SAFE_FOR_TEMPLATES || !1, _e = e.SAFE_FOR_XML !== !1, ve = e.WHOLE_DOCUMENT || !1, Se = e.RETURN_DOM || !1, Ce = e.RETURN_DOM_FRAGMENT || !1, we = e.RETURN_TRUSTED_TYPE || !1, xe = e.FORCE_BODY || !1, Te = e.SANITIZE_DOM !== !1, Ee = e.SANITIZE_NAMED_PROPS || !1, Oe = e.KEEP_CONTENT !== !1, ke = e.IN_PLACE || !1, L = XO(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : pk, Be = typeof e.NAMESPACE == "string" ? e.NAMESPACE : ze, Ge = zO(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? qO(e.MATHML_TEXT_INTEGRATION_POINTS) : GO({}, We), qe = zO(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? qO(e.HTML_INTEGRATION_POINTS) : GO({}, Ke);
21877
+ }), je = Ek(e, "FORBID_CONTENTS", Me, { transform: Ze }), pe = Ek(e, "FORBID_TAGS", qO({}), { transform: Ze }), me = Ek(e, "FORBID_ATTR", qO({}), { transform: Ze }), Ae = zO(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? qO(e.USE_PROFILES) : e.USE_PROFILES : !1, B = e.ALLOW_ARIA_ATTR !== !1, V = e.ALLOW_DATA_ATTR !== !1, he = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ge = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = e.SAFE_FOR_TEMPLATES || !1, _e = e.SAFE_FOR_XML !== !1, ve = e.WHOLE_DOCUMENT || !1, Se = e.RETURN_DOM || !1, Ce = e.RETURN_DOM_FRAGMENT || !1, we = e.RETURN_TRUSTED_TYPE || !1, xe = e.FORCE_BODY || !1, Te = e.SANITIZE_DOM !== !1, Ee = e.SANITIZE_NAMED_PROPS || !1, Oe = e.KEEP_CONTENT !== !1, ke = e.IN_PLACE || !1, I = XO(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : pk, Be = typeof e.NAMESPACE == "string" ? e.NAMESPACE : ze, Ge = zO(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? qO(e.MATHML_TEXT_INTEGRATION_POINTS) : GO({}, We), qe = zO(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? qO(e.HTML_INTEGRATION_POINTS) : GO({}, Ke);
21874
21878
  let t = zO(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? qO(e.CUSTOM_ELEMENT_HANDLING) : yO(null);
21875
- if (fe = yO(null), zO(t, "tagNameCheck") && et(t.tagNameCheck) && (fe.tagNameCheck = t.tagNameCheck), zO(t, "attributeNameCheck") && et(t.attributeNameCheck) && (fe.attributeNameCheck = t.attributeNameCheck), zO(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (fe.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), vO(fe), H && (V = !1), Ce && (Se = !0), Ae && (R = GO({}, rk), ue = yO(null), Ae.html === !0 && (GO(R, ZO), GO(ue, ik)), Ae.svg === !0 && (GO(R, QO), GO(ue, ak), GO(ue, sk)), Ae.svgFilters === !0 && (GO(R, $O), GO(ue, ak), GO(ue, sk)), Ae.mathMl === !0 && (GO(R, tk), GO(ue, ok), GO(ue, sk))), z.tagCheck = null, z.attributeCheck = null, zO(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? z.tagCheck = e.ADD_TAGS : OO(e.ADD_TAGS) && (R === le && (R = qO(R)), GO(R, e.ADD_TAGS, Ze))), zO(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? z.attributeCheck = e.ADD_ATTR : OO(e.ADD_ATTR) && (ue === de && (ue = qO(ue)), GO(ue, e.ADD_ATTR, Ze))), zO(e, "ADD_URI_SAFE_ATTR") && OO(e.ADD_URI_SAFE_ATTR) && GO(Fe, e.ADD_URI_SAFE_ATTR, Ze), zO(e, "FORBID_CONTENTS") && OO(e.FORBID_CONTENTS) && (je === Me && (je = qO(je)), GO(je, e.FORBID_CONTENTS, Ze)), zO(e, "ADD_FORBID_CONTENTS") && OO(e.ADD_FORBID_CONTENTS) && (je === Me && (je = qO(je)), GO(je, e.ADD_FORBID_CONTENTS, Ze)), Oe && (R["#text"] = !0), ve && GO(R, [
21879
+ if (R = yO(null), zO(t, "tagNameCheck") && et(t.tagNameCheck) && (R.tagNameCheck = t.tagNameCheck), zO(t, "attributeNameCheck") && et(t.attributeNameCheck) && (R.attributeNameCheck = t.attributeNameCheck), zO(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), vO(R), H && (V = !1), Ce && (Se = !0), Ae && (L = GO({}, rk), de = yO(null), Ae.html === !0 && (GO(L, ZO), GO(de, ik)), Ae.svg === !0 && (GO(L, QO), GO(de, ak), GO(de, sk)), Ae.svgFilters === !0 && (GO(L, $O), GO(de, ak), GO(de, sk)), Ae.mathMl === !0 && (GO(L, tk), GO(de, ok), GO(de, sk))), z.tagCheck = null, z.attributeCheck = null, zO(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? z.tagCheck = e.ADD_TAGS : OO(e.ADD_TAGS) && (L === ue && (L = qO(L)), GO(L, e.ADD_TAGS, Ze))), zO(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? z.attributeCheck = e.ADD_ATTR : OO(e.ADD_ATTR) && (de === fe && (de = qO(de)), GO(de, e.ADD_ATTR, Ze))), zO(e, "ADD_URI_SAFE_ATTR") && OO(e.ADD_URI_SAFE_ATTR) && GO(Fe, e.ADD_URI_SAFE_ATTR, Ze), zO(e, "FORBID_CONTENTS") && OO(e.FORBID_CONTENTS) && (je === Me && (je = qO(je)), GO(je, e.FORBID_CONTENTS, Ze)), zO(e, "ADD_FORBID_CONTENTS") && OO(e.ADD_FORBID_CONTENTS) && (je === Me && (je = qO(je)), GO(je, e.ADD_FORBID_CONTENTS, Ze)), Oe && (L["#text"] = !0), ve && GO(L, [
21876
21880
  "html",
21877
21881
  "head",
21878
21882
  "body"
21879
- ]), R.table && (GO(R, ["tbody"]), delete pe.tbody), e.TRUSTED_TYPES_POLICY) {
21883
+ ]), L.table && (GO(L, ["tbody"]), delete pe.tbody), e.TRUSTED_TYPES_POLICY) {
21880
21884
  if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw HO("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
21881
21885
  if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw HO("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
21882
21886
  let t = S;
@@ -21955,7 +21959,7 @@ function Dk() {
21955
21959
  let t = v(e);
21956
21960
  if (t) for (let n = t.length - 1; n >= 0; --n) {
21957
21961
  let r = t[n], i = r && r.name;
21958
- if (!(typeof i != "string" || ue[Ze(i)])) try {
21962
+ if (!(typeof i != "string" || de[Ze(i)])) try {
21959
21963
  e.removeAttribute(i);
21960
21964
  } catch {}
21961
21965
  }
@@ -22011,7 +22015,7 @@ function Dk() {
22011
22015
  let t = x ? x(e) : e.ownerDocument;
22012
22016
  return ee.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
22013
22017
  }, ht = function(e) {
22014
- return e = MO(e, I, " "), e = MO(e, ne, " "), e = MO(e, re, " "), e;
22018
+ return e = MO(e, F, " "), e = MO(e, re, " "), e = MO(e, ie, " "), e;
22015
22019
  }, gt = function(e) {
22016
22020
  e.normalize();
22017
22021
  let t = x ? x(e) : e.ownerDocument, n = ee.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
@@ -22046,7 +22050,7 @@ function Dk() {
22046
22050
  let xt = function(e, t) {
22047
22051
  return !!(_e && e.hasChildNodes() && !yt(e.firstElementChild) && VO(vk, e.textContent) && VO(vk, e.innerHTML) || _e && e.namespaceURI === ze && t === "style" && yt(e.firstElementChild) || e.nodeType === Sk.processingInstruction || _e && e.nodeType === Sk.comment && VO(yk, e.data));
22048
22052
  }, St = function(e, t, n) {
22049
- if (!pe[t] && Dt(t) && (fe.tagNameCheck instanceof RegExp && VO(fe.tagNameCheck, t) || fe.tagNameCheck instanceof Function && fe.tagNameCheck(t))) return !1;
22053
+ if (!pe[t] && Dt(t) && (R.tagNameCheck instanceof RegExp && VO(R.tagNameCheck, t) || R.tagNameCheck instanceof Function && R.tagNameCheck(t))) return !1;
22050
22054
  if (Oe && !je[t]) {
22051
22055
  let t = g(e), r = h(e);
22052
22056
  if (r && t) {
@@ -22061,31 +22065,31 @@ function Dk() {
22061
22065
  }, Ct = function(e, t, n, r) {
22062
22066
  return e.length === 0 ? t : t === n || t === r ? qO(t) : t;
22063
22067
  }, wt = function(e, n) {
22064
- if (bt(F.beforeSanitizeElements, e, null), e !== n && g(e) === null) return ke && dt(e), !0;
22068
+ if (bt(P.beforeSanitizeElements, e, null), e !== n && g(e) === null) return ke && dt(e), !0;
22065
22069
  if (_t(e)) return st(e), !0;
22066
22070
  let r = Ze(b ? b(e) : e.nodeName);
22067
- if (R = Ct(F.uponSanitizeElement, R, le, ye), bt(F.uponSanitizeElement, e, {
22071
+ if (L = Ct(P.uponSanitizeElement, L, ue, ye), bt(P.uponSanitizeElement, e, {
22068
22072
  tagName: r,
22069
- allowedTags: R
22073
+ allowedTags: L
22070
22074
  }), e !== n && g(e) === null) return ke && dt(e), !0;
22071
22075
  if (xt(e, r)) return st(e), !0;
22072
- if (pe[r] || !(z.tagCheck instanceof Function && z.tagCheck(r)) && !R[r]) {
22076
+ if (pe[r] || !(z.tagCheck instanceof Function && z.tagCheck(r)) && !L[r]) {
22073
22077
  let t = St(e, r, n);
22074
- return t === !1 && bt(F.afterSanitizeElements, e, null), t;
22078
+ return t === !1 && bt(P.afterSanitizeElements, e, null), t;
22075
22079
  }
22076
22080
  if ((y ? y(e) : e.nodeType) === Sk.element && !ot(e) || (r === "noscript" || r === "noembed" || r === "noframes") && VO(bk, e.innerHTML)) return st(e), !0;
22077
22081
  if (H && e.nodeType === Sk.text) {
22078
22082
  let n = ht(e.textContent);
22079
22083
  e.textContent !== n && (EO(t.removed, { element: e.cloneNode() }), e.textContent = n);
22080
22084
  }
22081
- return bt(F.afterSanitizeElements, e, null), !1;
22085
+ return bt(P.afterSanitizeElements, e, null), !1;
22082
22086
  }, Tt = function(e, t, r) {
22083
22087
  if (me[t] || _e && t === "patchsrc" || _e && t === "for" && e !== "label" && e !== "output" || Te && (t === "id" || t === "name") && (r in n || r in $e)) return !1;
22084
- let i = ue[t] || z.attributeCheck instanceof Function && z.attributeCheck(t, e);
22085
- if (!(V && VO(ie, t)) && !(B && VO(ae, t))) {
22088
+ let i = de[t] || z.attributeCheck instanceof Function && z.attributeCheck(t, e);
22089
+ if (!(V && VO(ae, t)) && !(B && VO(oe, t))) {
22086
22090
  if (!i) {
22087
- if (!(Dt(e) && (fe.tagNameCheck instanceof RegExp && VO(fe.tagNameCheck, e) || fe.tagNameCheck instanceof Function && fe.tagNameCheck(e)) && (fe.attributeNameCheck instanceof RegExp && VO(fe.attributeNameCheck, t) || fe.attributeNameCheck instanceof Function && fe.attributeNameCheck(t, e)) || t === "is" && fe.allowCustomizedBuiltInElements && (fe.tagNameCheck instanceof RegExp && VO(fe.tagNameCheck, r) || fe.tagNameCheck instanceof Function && fe.tagNameCheck(r)))) return !1;
22088
- } else if (!Fe[t] && !VO(L, MO(r, se, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && NO(r, "data:") === 0 && Ne[e]) && !(he && !VO(oe, MO(r, se, ""))) && r) return !1;
22091
+ if (!(Dt(e) && (R.tagNameCheck instanceof RegExp && VO(R.tagNameCheck, e) || R.tagNameCheck instanceof Function && R.tagNameCheck(e)) && (R.attributeNameCheck instanceof RegExp && VO(R.attributeNameCheck, t) || R.attributeNameCheck instanceof Function && R.attributeNameCheck(t, e)) || t === "is" && R.allowCustomizedBuiltInElements && (R.tagNameCheck instanceof RegExp && VO(R.tagNameCheck, r) || R.tagNameCheck instanceof Function && R.tagNameCheck(r)))) return !1;
22092
+ } else if (!Fe[t] && !VO(I, MO(r, ce, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && NO(r, "data:") === 0 && Ne[e]) && !(he && !VO(se, MO(r, ce, ""))) && r) return !1;
22089
22093
  }
22090
22094
  return !0;
22091
22095
  }, Et = GO({}, [
@@ -22098,7 +22102,7 @@ function Dk() {
22098
22102
  "font-face-uri",
22099
22103
  "missing-glyph"
22100
22104
  ]), Dt = function(e) {
22101
- return !Et[kO(e)] && VO(ce, e);
22105
+ return !Et[kO(e)] && VO(le, e);
22102
22106
  }, Ot = function(e, t, n, r) {
22103
22107
  if (S && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
22104
22108
  case "TrustedHTML": return O(r);
@@ -22112,20 +22116,20 @@ function Dk() {
22112
22116
  lt(n, e);
22113
22117
  }
22114
22118
  }, At = function(e) {
22115
- bt(F.beforeSanitizeAttributes, e, null);
22119
+ bt(P.beforeSanitizeAttributes, e, null);
22116
22120
  let t = e.attributes;
22117
22121
  if (!t || _t(e)) return;
22118
- ue = Ct(F.uponSanitizeAttribute, ue, de, be);
22122
+ de = Ct(P.uponSanitizeAttribute, de, fe, be);
22119
22123
  let n = {
22120
22124
  attrName: "",
22121
22125
  attrValue: "",
22122
22126
  keepAttr: !0,
22123
- allowedAttributes: ue,
22127
+ allowedAttributes: de,
22124
22128
  forceKeepAttr: void 0
22125
22129
  }, r = t.length, i = Ze(e.nodeName);
22126
22130
  for (; r--;) {
22127
22131
  let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Ze(o), u = c, d = o === "value" ? u : PO(u);
22128
- if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, bt(F.uponSanitizeAttribute, e, n), d = n.attrValue, Ee && (l === "id" || l === "name") && NO(d, De) !== 0 && (lt(o, e), d = De + d), _e && VO(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
22132
+ if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, bt(P.uponSanitizeAttribute, e, n), d = n.attrValue, Ee && (l === "id" || l === "name") && NO(d, De) !== 0 && (lt(o, e), d = De + d), _e && VO(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
22129
22133
  lt(o, e);
22130
22134
  continue;
22131
22135
  }
@@ -22149,14 +22153,14 @@ function Dk() {
22149
22153
  d = Ot(i, l, s, d), d !== u && kt(e, o, s, d);
22150
22154
  }
22151
22155
  }
22152
- bt(F.afterSanitizeAttributes, e, null);
22156
+ bt(P.afterSanitizeAttributes, e, null);
22153
22157
  }, jt = function(e) {
22154
22158
  let t = null, n = mt(e);
22155
- for (bt(F.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (bt(F.uponSanitizeShadowNode, t, null), wt(t, e), At(t), vt(t.content) && jt(t.content), (y ? y(t) : t.nodeType) === Sk.element) {
22159
+ for (bt(P.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (bt(P.uponSanitizeShadowNode, t, null), wt(t, e), At(t), vt(t.content) && jt(t.content), (y ? y(t) : t.nodeType) === Sk.element) {
22156
22160
  let e = _(t);
22157
22161
  vt(e) && (Mt(e), jt(e));
22158
22162
  }
22159
- bt(F.afterSanitizeShadowDOM, e, null);
22163
+ bt(P.afterSanitizeShadowDOM, e, null);
22160
22164
  }, Mt = function(e) {
22161
22165
  let t = [{
22162
22166
  node: e,
@@ -22199,14 +22203,14 @@ function Dk() {
22199
22203
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
22200
22204
  if (Ve = !e, Ve && (e = "<!-->"), typeof e != "string" && !yt(e) && (e = JO(e), typeof e != "string")) throw HO("dirty is not a string, aborting");
22201
22205
  if (!t.isSupported) return e;
22202
- U ? (R = ye, ue = be) : tt(n), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (R = qO(R)), F.uponSanitizeAttribute.length > 0 && (ue = qO(ue)), t.removed = [];
22206
+ U ? (L = ye, de = be) : tt(n), (P.uponSanitizeElement.length > 0 || P.uponSanitizeAttribute.length > 0) && (L = qO(L)), P.uponSanitizeAttribute.length > 0 && (de = qO(de)), t.removed = [];
22203
22207
  let c = ke && typeof e != "string" && yt(e);
22204
22208
  if (c) {
22205
22209
  ft(e);
22206
22210
  let t = b ? b(e) : e.nodeName;
22207
22211
  if (typeof t == "string") {
22208
22212
  let n = Ze(t);
22209
- if (!R[n] || pe[n]) throw ct(e), HO("root node is forbidden and cannot be sanitized in-place");
22213
+ if (!L[n] || pe[n]) throw ct(e), HO("root node is forbidden and cannot be sanitized in-place");
22210
22214
  }
22211
22215
  if (_t(e)) throw ct(e), HO("root node is clobbered and cannot be sanitized in-place");
22212
22216
  try {
@@ -22235,13 +22239,13 @@ function Dk() {
22235
22239
  if (Se) {
22236
22240
  if (H && gt(i), Ce) for (s = N.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
22237
22241
  else s = i;
22238
- return (ue.shadowroot || ue.shadowrootmode) && (s = P.call(r, s, !0)), s;
22242
+ return (de.shadowroot || de.shadowrootmode) && (s = ne.call(r, s, !0)), s;
22239
22243
  }
22240
22244
  let u = ve ? i.outerHTML : i.innerHTML;
22241
- return ve && R["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && VO(gk, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), H && (u = ht(u)), S && we ? O(u) : u;
22245
+ return ve && L["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && VO(gk, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), H && (u = ht(u)), S && we ? O(u) : u;
22242
22246
  }, t.setConfig = function() {
22243
22247
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
22244
- tt(e), U = !0, ye = R, be = ue;
22248
+ tt(e), U = !0, ye = L, be = de;
22245
22249
  }, t.clearConfig = function() {
22246
22250
  Qe = null, U = !1, ye = null, be = null, S = w, C = "";
22247
22251
  }, t.isValidAttribute = function(e, t, n) {
@@ -22249,19 +22253,19 @@ function Dk() {
22249
22253
  let r = Ze(e), i = Ze(t);
22250
22254
  return Tt(r, i, n);
22251
22255
  }, t.addHook = function(e, t) {
22252
- typeof t == "function" && zO(F, e) && EO(F[e], t);
22256
+ typeof t == "function" && zO(P, e) && EO(P[e], t);
22253
22257
  }, t.removeHook = function(e, t) {
22254
- if (zO(F, e)) {
22258
+ if (zO(P, e)) {
22255
22259
  if (t !== void 0) {
22256
- let n = wO(F[e], t);
22257
- return n === -1 ? void 0 : DO(F[e], n, 1)[0];
22260
+ let n = wO(P[e], t);
22261
+ return n === -1 ? void 0 : DO(P[e], n, 1)[0];
22258
22262
  }
22259
- return TO(F[e]);
22263
+ return TO(P[e]);
22260
22264
  }
22261
22265
  }, t.removeHooks = function(e) {
22262
- zO(F, e) && (F[e] = []);
22266
+ zO(P, e) && (P[e] = []);
22263
22267
  }, t.removeAllHooks = function() {
22264
- F = Tk();
22268
+ P = Tk();
22265
22269
  }, t;
22266
22270
  }
22267
22271
  var Ok = Dk();
@@ -24739,7 +24743,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24739
24743
  end: "\"",
24740
24744
  illegal: "\\n",
24741
24745
  contains: [M]
24742
- }, te = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ }, P = function(e, t, n = {}) {
24746
+ }, te = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ }, ne = function(e, t, n = {}) {
24743
24747
  let r = a({
24744
24748
  scope: "comment",
24745
24749
  begin: e,
@@ -24755,7 +24759,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24755
24759
  });
24756
24760
  let i = y("I", "a", "is", "so", "us", "to", "at", "if", "in", "it", "on", /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, /[A-Za-z]+[-][a-z]+/, /[A-Za-z][a-z]{2,}/);
24757
24761
  return r.contains.push({ begin: _(/[ ]+/, "(", i, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), r;
24758
- }, F = P("//", "$"), I = P("/\\*", "\\*/"), ne = P("#", "$"), re = /*#__PURE__*/ Object.freeze({
24762
+ }, P = ne("//", "$"), F = ne("/\\*", "\\*/"), re = ne("#", "$"), ie = /*#__PURE__*/ Object.freeze({
24759
24763
  __proto__: null,
24760
24764
  APOS_STRING_MODE: ee,
24761
24765
  BACKSLASH_ESCAPE: M,
@@ -24765,9 +24769,9 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24765
24769
  relevance: 0
24766
24770
  },
24767
24771
  BINARY_NUMBER_RE: k,
24768
- COMMENT: P,
24769
- C_BLOCK_COMMENT_MODE: I,
24770
- C_LINE_COMMENT_MODE: F,
24772
+ COMMENT: ne,
24773
+ C_BLOCK_COMMENT_MODE: F,
24774
+ C_LINE_COMMENT_MODE: P,
24771
24775
  C_NUMBER_MODE: {
24772
24776
  scope: "number",
24773
24777
  begin: O,
@@ -24784,7 +24788,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24784
24788
  }
24785
24789
  });
24786
24790
  },
24787
- HASH_COMMENT_MODE: ne,
24791
+ HASH_COMMENT_MODE: re,
24788
24792
  IDENT_RE: T,
24789
24793
  MATCH_NOTHING_RE: w,
24790
24794
  METHOD_GUARD: {
@@ -24824,28 +24828,28 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24824
24828
  relevance: 0
24825
24829
  }
24826
24830
  });
24827
- function ie(e, t) {
24828
- e.input[e.index - 1] === "." && t.ignoreMatch();
24829
- }
24830
24831
  function ae(e, t) {
24831
- e.className !== void 0 && (e.scope = e.className, delete e.className);
24832
+ e.input[e.index - 1] === "." && t.ignoreMatch();
24832
24833
  }
24833
24834
  function oe(e, t) {
24834
- t && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = ie, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
24835
+ e.className !== void 0 && (e.scope = e.className, delete e.className);
24835
24836
  }
24836
24837
  function se(e, t) {
24837
- Array.isArray(e.illegal) && (e.illegal = y(...e.illegal));
24838
+ t && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = ae, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
24838
24839
  }
24839
24840
  function ce(e, t) {
24841
+ Array.isArray(e.illegal) && (e.illegal = y(...e.illegal));
24842
+ }
24843
+ function le(e, t) {
24840
24844
  if (e.match) {
24841
24845
  if (e.begin || e.end) throw Error("begin & end are not supported with match");
24842
24846
  e.begin = e.match, delete e.match;
24843
24847
  }
24844
24848
  }
24845
- function L(e, t) {
24849
+ function I(e, t) {
24846
24850
  e.relevance === void 0 && (e.relevance = 1);
24847
24851
  }
24848
- var R = (e, t) => {
24852
+ var L = (e, t) => {
24849
24853
  if (!e.beforeMatch) return;
24850
24854
  if (e.starts) throw Error("beforeMatch cannot be used with starts");
24851
24855
  let n = Object.assign({}, e);
@@ -24855,7 +24859,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24855
24859
  relevance: 0,
24856
24860
  contains: [Object.assign(n, { endsParent: !0 })]
24857
24861
  }, e.relevance = 0, delete n.beforeMatch;
24858
- }, le = [
24862
+ }, ue = [
24859
24863
  "of",
24860
24864
  "and",
24861
24865
  "for",
@@ -24867,24 +24871,24 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24867
24871
  "parent",
24868
24872
  "list",
24869
24873
  "value"
24870
- ], ue = "keyword";
24871
- function de(e, t, n = ue) {
24874
+ ], de = "keyword";
24875
+ function fe(e, t, n = de) {
24872
24876
  let r = Object.create(null);
24873
24877
  return typeof e == "string" ? i(n, e.split(" ")) : Array.isArray(e) ? i(n, e) : Object.keys(e).forEach(function(n) {
24874
- Object.assign(r, de(e[n], t, n));
24878
+ Object.assign(r, fe(e[n], t, n));
24875
24879
  }), r;
24876
24880
  function i(e, n) {
24877
24881
  t && (n = n.map((e) => e.toLowerCase())), n.forEach(function(t) {
24878
24882
  let n = t.split("|");
24879
- r[n[0]] = [e, fe(n[0], n[1])];
24883
+ r[n[0]] = [e, R(n[0], n[1])];
24880
24884
  });
24881
24885
  }
24882
24886
  }
24883
- function fe(e, t) {
24887
+ function R(e, t) {
24884
24888
  return t ? Number(t) : +!pe(e);
24885
24889
  }
24886
24890
  function pe(e) {
24887
- return le.includes(e.toLowerCase());
24891
+ return ue.includes(e.toLowerCase());
24888
24892
  }
24889
24893
  var me = {}, z = (e) => {
24890
24894
  console.error(e);
@@ -24982,17 +24986,17 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24982
24986
  let a = n;
24983
24987
  if (n.isCompiled) return a;
24984
24988
  [
24985
- ae,
24986
- ce,
24989
+ oe,
24990
+ le,
24987
24991
  U,
24988
- R
24992
+ L
24989
24993
  ].forEach((e) => e(n, r)), e.compilerExtensions.forEach((e) => e(n, r)), n.__beforeBegin = null, [
24990
- oe,
24991
24994
  se,
24992
- L
24995
+ ce,
24996
+ I
24993
24997
  ].forEach((e) => e(n, r)), n.isCompiled = !0;
24994
24998
  let s = null;
24995
- return typeof n.keywords == "object" && n.keywords.$pattern && (n.keywords = Object.assign({}, n.keywords), s = n.keywords.$pattern, delete n.keywords.$pattern), s ||= /\w+/, n.keywords &&= de(n.keywords, e.case_insensitive), a.keywordPatternRe = t(s, !0), r && (n.begin ||= /\B|\b/, a.beginRe = t(a.begin), !n.end && !n.endsWithParent && (n.end = /\B|\b/), n.end && (a.endRe = t(a.end)), a.terminatorEnd = p(a.end) || "", n.endsWithParent && r.terminatorEnd && (a.terminatorEnd += (n.end ? "|" : "") + r.terminatorEnd)), n.illegal && (a.illegalRe = t(n.illegal)), n.contains ||= [], n.contains = [].concat(...n.contains.map(function(e) {
24999
+ return typeof n.keywords == "object" && n.keywords.$pattern && (n.keywords = Object.assign({}, n.keywords), s = n.keywords.$pattern, delete n.keywords.$pattern), s ||= /\w+/, n.keywords &&= fe(n.keywords, e.case_insensitive), a.keywordPatternRe = t(s, !0), r && (n.begin ||= /\B|\b/, a.beginRe = t(a.begin), !n.end && !n.endsWithParent && (n.end = /\B|\b/), n.end && (a.endRe = t(a.end)), a.terminatorEnd = p(a.end) || "", n.endsWithParent && r.terminatorEnd && (a.terminatorEnd += (n.end ? "|" : "") + r.terminatorEnd)), n.illegal && (a.illegalRe = t(n.illegal)), n.contains ||= [], n.contains = [].concat(...n.contains.map(function(e) {
24996
25000
  return xe(e === "self" ? n : e);
24997
25001
  })), n.contains.forEach(function(e) {
24998
25002
  o(e, a);
@@ -25048,9 +25052,9 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25048
25052
  code: r,
25049
25053
  language: i
25050
25054
  };
25051
- ne("before:highlight", a);
25055
+ re("before:highlight", a);
25052
25056
  let o = a.result ? a.result : v(a.language, a.code, n);
25053
- return o.code = a.code, ne("after:highlight", o), o;
25057
+ return o.code = a.code, re("after:highlight", o), o;
25054
25058
  }
25055
25059
  function v(e, n, i, a) {
25056
25060
  let c = Object.create(null);
@@ -25127,7 +25131,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25127
25131
  if (e.endsWithParent) return _(e.parent, t, n);
25128
25132
  }
25129
25133
  function y(e) {
25130
- return A.matcher.regexIndex === 0 ? (N += e[0], 1) : (I = !0, 0);
25134
+ return A.matcher.regexIndex === 0 ? (N += e[0], 1) : (F = !0, 0);
25131
25135
  }
25132
25136
  function b(e) {
25133
25137
  let t = e[0], n = e.rule, i = new r(n), a = [n.__beforeBegin, n["on:begin"]];
@@ -25169,25 +25173,25 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25169
25173
  if (e !== Ee) return e;
25170
25174
  }
25171
25175
  if (r.type === "illegal" && a === "") return N += "\n", 1;
25172
- if (F > 1e5 && F > r.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
25176
+ if (P > 1e5 && P > r.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
25173
25177
  return N += a, a.length;
25174
25178
  }
25175
25179
  let D = ee(e);
25176
25180
  if (!D) throw z(s.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
25177
25181
  let O = ye(D), k = "", A = a || O, j = {}, M = new l.__emitter(l);
25178
25182
  w();
25179
- let N = "", te = 0, P = 0, F = 0, I = !1;
25183
+ let N = "", te = 0, ne = 0, P = 0, F = !1;
25180
25184
  try {
25181
25185
  if (D.__emitTokens) D.__emitTokens(n, M);
25182
25186
  else {
25183
25187
  for (A.matcher.considerAll();;) {
25184
- F++, I ? I = !1 : A.matcher.considerAll(), A.matcher.lastIndex = P;
25188
+ P++, F ? F = !1 : A.matcher.considerAll(), A.matcher.lastIndex = ne;
25185
25189
  let e = A.matcher.exec(n);
25186
25190
  if (!e) break;
25187
- let t = E(n.substring(P, e.index), e);
25188
- P = e.index + t;
25191
+ let t = E(n.substring(ne, e.index), e);
25192
+ ne = e.index + t;
25189
25193
  }
25190
- E(n.substring(P));
25194
+ E(n.substring(ne));
25191
25195
  }
25192
25196
  return M.finalize(), k = M.toHTML(), {
25193
25197
  language: e,
@@ -25205,8 +25209,8 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25205
25209
  relevance: 0,
25206
25210
  _illegalBy: {
25207
25211
  message: t.message,
25208
- index: P,
25209
- context: n.slice(P - 100, P + 100),
25212
+ index: ne,
25213
+ context: n.slice(ne - 100, ne + 100),
25210
25214
  mode: t.mode,
25211
25215
  resultSoFar: k
25212
25216
  },
@@ -25255,7 +25259,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25255
25259
  function w(e) {
25256
25260
  let t = null, n = d(e);
25257
25261
  if (u(n)) return;
25258
- if (ne("before:highlightElement", {
25262
+ if (re("before:highlightElement", {
25259
25263
  el: e,
25260
25264
  language: n
25261
25265
  }), e.dataset.highlighted) {
@@ -25275,7 +25279,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25275
25279
  }, i.secondBest && (e.secondBest = {
25276
25280
  language: i.secondBest.language,
25277
25281
  relevance: i.secondBest.relevance
25278
- }), ne("after:highlightElement", {
25282
+ }), re("after:highlightElement", {
25279
25283
  el: e,
25280
25284
  result: i,
25281
25285
  text: r
@@ -25331,27 +25335,27 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25331
25335
  let t = ee(e);
25332
25336
  return t && !t.disableAutodetect;
25333
25337
  }
25334
- function P(e) {
25338
+ function ne(e) {
25335
25339
  e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (t) => {
25336
25340
  e["before:highlightBlock"](Object.assign({ block: t.el }, t));
25337
25341
  }), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (t) => {
25338
25342
  e["after:highlightBlock"](Object.assign({ block: t.el }, t));
25339
25343
  });
25340
25344
  }
25341
- function F(e) {
25342
- P(e), a.push(e);
25345
+ function P(e) {
25346
+ ne(e), a.push(e);
25343
25347
  }
25344
- function I(e) {
25348
+ function F(e) {
25345
25349
  let t = a.indexOf(e);
25346
25350
  t !== -1 && a.splice(t, 1);
25347
25351
  }
25348
- function ne(e, t) {
25352
+ function re(e, t) {
25349
25353
  let n = e;
25350
25354
  a.forEach(function(e) {
25351
25355
  e[n] && e[n](t);
25352
25356
  });
25353
25357
  }
25354
- function ie(e) {
25358
+ function ae(e) {
25355
25359
  return V("10.7.0", "highlightBlock will be removed entirely in v12.0"), V("10.7.0", "Please use highlightElement now."), w(e);
25356
25360
  }
25357
25361
  Object.assign(e, {
@@ -25359,7 +25363,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25359
25363
  highlightAuto: S,
25360
25364
  highlightAll: k,
25361
25365
  highlightElement: w,
25362
- highlightBlock: ie,
25366
+ highlightBlock: ae,
25363
25367
  configure: T,
25364
25368
  initHighlighting: E,
25365
25369
  initHighlightingOnLoad: D,
@@ -25370,8 +25374,8 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25370
25374
  registerAliases: N,
25371
25375
  autoDetection: te,
25372
25376
  inherit: Te,
25373
- addPlugin: F,
25374
- removePlugin: I
25377
+ addPlugin: P,
25378
+ removePlugin: F
25375
25379
  }), e.debugMode = function() {
25376
25380
  o = !1;
25377
25381
  }, e.safeMode = function() {
@@ -25383,8 +25387,8 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25383
25387
  optional: g,
25384
25388
  anyNumberOfTimes: h
25385
25389
  };
25386
- for (let e in re) typeof re[e] == "object" && n(re[e]);
25387
- return Object.assign(e, re), e;
25390
+ for (let e in ie) typeof ie[e] == "object" && n(ie[e]);
25391
+ return Object.assign(e, ie), e;
25388
25392
  }, ke = Oe({});
25389
25393
  ke.newInstance = () => Oe({}), t.exports = ke, ke.HighlightJS = ke, ke.default = ke;
25390
25394
  })), QM = /* @__PURE__ */ h(((e, t) => {
@@ -27710,7 +27714,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27710
27714
  function te(e) {
27711
27715
  return t.concat("(?!", e.join("|"), ")");
27712
27716
  }
27713
- let P = {
27717
+ let ne = {
27714
27718
  match: t.concat(/\b/, te([
27715
27719
  ...s,
27716
27720
  "super",
@@ -27718,14 +27722,14 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27718
27722
  ].map((e) => `${e}\\s*\\(`)), d, t.lookahead(/\s*\(/)),
27719
27723
  className: "title.function",
27720
27724
  relevance: 0
27721
- }, F = {
27725
+ }, P = {
27722
27726
  begin: t.concat(/\./, t.lookahead(t.concat(d, /(?![0-9A-Za-z$_(])/))),
27723
27727
  end: d,
27724
27728
  excludeBegin: !0,
27725
27729
  keywords: "prototype",
27726
27730
  className: "property",
27727
27731
  relevance: 0
27728
- }, I = {
27732
+ }, F = {
27729
27733
  match: [
27730
27734
  /get|set/,
27731
27735
  /\s+/,
@@ -27737,7 +27741,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27737
27741
  3: "title.function"
27738
27742
  },
27739
27743
  contains: [{ begin: /\(\)/ }, k]
27740
- }, ne = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", re = {
27744
+ }, re = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", ie = {
27741
27745
  match: [
27742
27746
  /const|var|let/,
27743
27747
  /\s+/,
@@ -27745,7 +27749,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27745
27749
  /\s*/,
27746
27750
  /=\s*/,
27747
27751
  /(async\s*)?/,
27748
- t.lookahead(ne)
27752
+ t.lookahead(re)
27749
27753
  ],
27750
27754
  keywords: "async",
27751
27755
  className: {
@@ -27790,7 +27794,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27790
27794
  match: d + t.lookahead(":"),
27791
27795
  relevance: 0
27792
27796
  },
27793
- re,
27797
+ ie,
27794
27798
  {
27795
27799
  begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
27796
27800
  keywords: "return throw case",
@@ -27800,7 +27804,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27800
27804
  e.REGEXP_MODE,
27801
27805
  {
27802
27806
  className: "function",
27803
- begin: ne,
27807
+ begin: re,
27804
27808
  returnBegin: !0,
27805
27809
  end: "\\s*=>",
27806
27810
  contains: [{
@@ -27872,7 +27876,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27872
27876
  match: /\.\.\./,
27873
27877
  relevance: 0
27874
27878
  },
27875
- F,
27879
+ P,
27876
27880
  {
27877
27881
  match: "\\$[A-Za-z$_][0-9A-Za-z$_]*",
27878
27882
  relevance: 0
@@ -27882,10 +27886,10 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27882
27886
  className: { 1: "title.function" },
27883
27887
  contains: [k]
27884
27888
  },
27885
- P,
27889
+ ne,
27886
27890
  N,
27887
27891
  A,
27888
- I,
27892
+ F,
27889
27893
  { match: /\$[(.]/ }
27890
27894
  ]
27891
27895
  };
@@ -30151,68 +30155,68 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30151
30155
  }, te = (e = "") => ({
30152
30156
  className: "subst",
30153
30157
  variants: [{ match: i(/\\/, e, /[0\\tnr"']/) }, { match: i(/\\/, e, /u\{[0-9a-fA-F]{1,8}\}/) }]
30154
- }), P = (e = "") => ({
30158
+ }), ne = (e = "") => ({
30155
30159
  className: "subst",
30156
30160
  match: i(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/)
30157
- }), F = (e = "") => ({
30161
+ }), P = (e = "") => ({
30158
30162
  className: "subst",
30159
30163
  label: "interpol",
30160
30164
  begin: i(/\\/, e, /\(/),
30161
30165
  end: /\)/
30162
- }), I = (e = "") => ({
30166
+ }), F = (e = "") => ({
30163
30167
  begin: i(e, /"""/),
30164
30168
  end: i(/"""/, e),
30165
30169
  contains: [
30166
30170
  te(e),
30167
- P(e),
30168
- F(e)
30171
+ ne(e),
30172
+ P(e)
30169
30173
  ]
30170
- }), ne = (e = "") => ({
30174
+ }), re = (e = "") => ({
30171
30175
  begin: i(e, /"/),
30172
30176
  end: i(/"/, e),
30173
- contains: [te(e), F(e)]
30174
- }), re = {
30177
+ contains: [te(e), P(e)]
30178
+ }), ie = {
30175
30179
  className: "string",
30176
30180
  variants: [
30177
- I(),
30178
- I("#"),
30179
- I("##"),
30180
- I("###"),
30181
- ne(),
30182
- ne("#"),
30183
- ne("##"),
30184
- ne("###")
30181
+ F(),
30182
+ F("#"),
30183
+ F("##"),
30184
+ F("###"),
30185
+ re(),
30186
+ re("#"),
30187
+ re("##"),
30188
+ re("###")
30185
30189
  ]
30186
- }, ie = [e.BACKSLASH_ESCAPE, {
30190
+ }, ae = [e.BACKSLASH_ESCAPE, {
30187
30191
  begin: /\[/,
30188
30192
  end: /\]/,
30189
30193
  relevance: 0,
30190
30194
  contains: [e.BACKSLASH_ESCAPE]
30191
- }], ae = {
30195
+ }], oe = {
30192
30196
  begin: /\/[^\s](?=[^/\n]*\/)/,
30193
30197
  end: /\//,
30194
- contains: ie
30195
- }, oe = (e) => {
30198
+ contains: ae
30199
+ }, se = (e) => {
30196
30200
  let t = i(e, /\//), n = i(/\//, e);
30197
30201
  return {
30198
30202
  begin: t,
30199
30203
  end: n,
30200
- contains: [...ie, {
30204
+ contains: [...ae, {
30201
30205
  scope: "comment",
30202
30206
  begin: `#(?!.*${n})`,
30203
30207
  end: /$/
30204
30208
  }]
30205
30209
  };
30206
- }, se = {
30210
+ }, ce = {
30207
30211
  scope: "regexp",
30208
30212
  variants: [
30209
- oe("###"),
30210
- oe("##"),
30211
- oe("#"),
30212
- ae
30213
+ se("###"),
30214
+ se("##"),
30215
+ se("#"),
30216
+ oe
30213
30217
  ]
30214
- }, ce = { match: i(/`/, x, /`/) }, L = [
30215
- ce,
30218
+ }, le = { match: i(/`/, x, /`/) }, I = [
30219
+ le,
30216
30220
  {
30217
30221
  className: "variable",
30218
30222
  match: /\$\d+/
@@ -30221,7 +30225,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30221
30225
  className: "variable",
30222
30226
  match: `\\$${b}+`
30223
30227
  }
30224
- ], R = [
30228
+ ], L = [
30225
30229
  {
30226
30230
  match: /(@|#(un)?)available/,
30227
30231
  scope: "keyword",
@@ -30232,7 +30236,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30232
30236
  contains: [
30233
30237
  ...j,
30234
30238
  N,
30235
- re
30239
+ ie
30236
30240
  ]
30237
30241
  }] }
30238
30242
  },
@@ -30244,7 +30248,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30244
30248
  scope: "meta",
30245
30249
  match: i(/@/, x)
30246
30250
  }
30247
- ], le = {
30251
+ ], ue = {
30248
30252
  match: r(/\b[A-Z]/),
30249
30253
  relevance: 0,
30250
30254
  contains: [
@@ -30270,20 +30274,20 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30270
30274
  relevance: 0
30271
30275
  }
30272
30276
  ]
30273
- }, ue = {
30277
+ }, de = {
30274
30278
  begin: /</,
30275
30279
  end: />/,
30276
30280
  keywords: D,
30277
30281
  contains: [
30278
30282
  ...a,
30279
30283
  ...O,
30280
- ...R,
30284
+ ...L,
30281
30285
  A,
30282
- le
30286
+ ue
30283
30287
  ]
30284
30288
  };
30285
- le.contains.push(ue);
30286
- let de = {
30289
+ ue.contains.push(de);
30290
+ let fe = {
30287
30291
  begin: /\(/,
30288
30292
  end: /\)/,
30289
30293
  relevance: 0,
@@ -30296,21 +30300,21 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30296
30300
  relevance: 0
30297
30301
  },
30298
30302
  ...a,
30299
- se,
30303
+ ce,
30300
30304
  ...O,
30301
30305
  ...k,
30302
30306
  ...j,
30303
30307
  N,
30304
- re,
30308
+ ie,
30309
+ ...I,
30305
30310
  ...L,
30306
- ...R,
30307
- le
30311
+ ue
30308
30312
  ]
30309
- }, fe = {
30313
+ }, R = {
30310
30314
  begin: /</,
30311
30315
  end: />/,
30312
30316
  keywords: "repeat each",
30313
- contains: [...a, le]
30317
+ contains: [...a, ue]
30314
30318
  }, pe = {
30315
30319
  begin: /\(/,
30316
30320
  end: /\)/,
@@ -30332,10 +30336,10 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30332
30336
  ...O,
30333
30337
  ...j,
30334
30338
  N,
30335
- re,
30336
- ...R,
30337
- le,
30338
- de
30339
+ ie,
30340
+ ...L,
30341
+ ue,
30342
+ fe
30339
30343
  ],
30340
30344
  endsParent: !0,
30341
30345
  illegal: /["']/
@@ -30343,14 +30347,14 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30343
30347
  match: [
30344
30348
  /(func|macro)/,
30345
30349
  /\s+/,
30346
- o(ce.match, x, v)
30350
+ o(le.match, x, v)
30347
30351
  ],
30348
30352
  className: {
30349
30353
  1: "keyword",
30350
30354
  3: "title.function"
30351
30355
  },
30352
30356
  contains: [
30353
- fe,
30357
+ R,
30354
30358
  pe,
30355
30359
  t
30356
30360
  ],
@@ -30359,7 +30363,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30359
30363
  match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/],
30360
30364
  className: { 1: "keyword" },
30361
30365
  contains: [
30362
- fe,
30366
+ R,
30363
30367
  pe,
30364
30368
  t
30365
30369
  ],
@@ -30384,7 +30388,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30384
30388
  1: "keyword",
30385
30389
  3: "title"
30386
30390
  },
30387
- contains: [le],
30391
+ contains: [ue],
30388
30392
  keywords: [...p, ...f],
30389
30393
  end: /}/
30390
30394
  }, he = {
@@ -30423,7 +30427,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30423
30427
  },
30424
30428
  keywords: D,
30425
30429
  contains: [
30426
- fe,
30430
+ R,
30427
30431
  ...O,
30428
30432
  {
30429
30433
  begin: /:/,
@@ -30437,7 +30441,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30437
30441
  }
30438
30442
  ]
30439
30443
  };
30440
- for (let e of re.variants) {
30444
+ for (let e of ie.variants) {
30441
30445
  let t = e.contains.find((e) => e.label === "interpol");
30442
30446
  t.keywords = D;
30443
30447
  let n = [
@@ -30445,8 +30449,8 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30445
30449
  ...k,
30446
30450
  ...j,
30447
30451
  N,
30448
- re,
30449
- ...L
30452
+ ie,
30453
+ ...I
30450
30454
  ];
30451
30455
  t.contains = [...n, {
30452
30456
  begin: /\(/,
@@ -30472,16 +30476,16 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30472
30476
  contains: [...a],
30473
30477
  relevance: 0
30474
30478
  },
30475
- se,
30479
+ ce,
30476
30480
  ...O,
30477
30481
  ...k,
30478
30482
  ...j,
30479
30483
  N,
30480
- re,
30484
+ ie,
30485
+ ...I,
30481
30486
  ...L,
30482
- ...R,
30483
- le,
30484
- de
30487
+ ue,
30488
+ fe
30485
30489
  ]
30486
30490
  };
30487
30491
  }
@@ -30883,7 +30887,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30883
30887
  function te(e) {
30884
30888
  return t.concat("(?!", e.join("|"), ")");
30885
30889
  }
30886
- let P = {
30890
+ let ne = {
30887
30891
  match: t.concat(/\b/, te([
30888
30892
  ...s,
30889
30893
  "super",
@@ -30891,14 +30895,14 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30891
30895
  ].map((e) => `${e}\\s*\\(`)), d, t.lookahead(/\s*\(/)),
30892
30896
  className: "title.function",
30893
30897
  relevance: 0
30894
- }, F = {
30898
+ }, P = {
30895
30899
  begin: t.concat(/\./, t.lookahead(t.concat(d, /(?![0-9A-Za-z$_(])/))),
30896
30900
  end: d,
30897
30901
  excludeBegin: !0,
30898
30902
  keywords: "prototype",
30899
30903
  className: "property",
30900
30904
  relevance: 0
30901
- }, I = {
30905
+ }, F = {
30902
30906
  match: [
30903
30907
  /get|set/,
30904
30908
  /\s+/,
@@ -30910,7 +30914,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30910
30914
  3: "title.function"
30911
30915
  },
30912
30916
  contains: [{ begin: /\(\)/ }, k]
30913
- }, ne = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", re = {
30917
+ }, re = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", ie = {
30914
30918
  match: [
30915
30919
  /const|var|let/,
30916
30920
  /\s+/,
@@ -30918,7 +30922,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30918
30922
  /\s*/,
30919
30923
  /=\s*/,
30920
30924
  /(async\s*)?/,
30921
- t.lookahead(ne)
30925
+ t.lookahead(re)
30922
30926
  ],
30923
30927
  keywords: "async",
30924
30928
  className: {
@@ -30963,7 +30967,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30963
30967
  match: d + t.lookahead(":"),
30964
30968
  relevance: 0
30965
30969
  },
30966
- re,
30970
+ ie,
30967
30971
  {
30968
30972
  begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
30969
30973
  keywords: "return throw case",
@@ -30973,7 +30977,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30973
30977
  e.REGEXP_MODE,
30974
30978
  {
30975
30979
  className: "function",
30976
- begin: ne,
30980
+ begin: re,
30977
30981
  returnBegin: !0,
30978
30982
  end: "\\s*=>",
30979
30983
  contains: [{
@@ -31045,7 +31049,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
31045
31049
  match: /\.\.\./,
31046
31050
  relevance: 0
31047
31051
  },
31048
- F,
31052
+ P,
31049
31053
  {
31050
31054
  match: "\\$[A-Za-z$_][0-9A-Za-z$_]*",
31051
31055
  relevance: 0
@@ -31055,10 +31059,10 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
31055
31059
  className: { 1: "title.function" },
31056
31060
  contains: [k]
31057
31061
  },
31058
- P,
31062
+ ne,
31059
31063
  N,
31060
31064
  A,
31061
- I,
31065
+ F,
31062
31066
  { match: /\$[(.]/ }
31063
31067
  ]
31064
31068
  };
@@ -32046,13 +32050,13 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32046
32050
  e.target instanceof Element && (ee = e.target, N && clearTimeout(N), N = setTimeout(() => {
32047
32051
  ee = null;
32048
32052
  }, 2e3));
32049
- }, P = () => {
32053
+ }, ne = () => {
32050
32054
  ee = null;
32051
32055
  };
32052
32056
  return fa(() => {
32053
- t.onDropElement && (window.addEventListener("dragstart", te, !0), window.addEventListener("dragend", P, !0));
32057
+ t.onDropElement && (window.addEventListener("dragstart", te, !0), window.addEventListener("dragend", ne, !0));
32054
32058
  }), ha(() => {
32055
- window.removeEventListener("dragstart", te, !0), window.removeEventListener("dragend", P, !0), N && clearTimeout(N);
32059
+ window.removeEventListener("dragstart", te, !0), window.removeEventListener("dragend", ne, !0), N && clearTimeout(N);
32056
32060
  }), (t, n) => (Y(), X("div", OF, [K(o) ? (Y(), X("button", {
32057
32061
  key: 0,
32058
32062
  class: "undo-foot-btn",
@@ -32595,7 +32599,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32595
32599
  function te(e) {
32596
32600
  return e.kind === "pre" ? y.value.debugFlowPrep : e.kind === "wrap_up" ? y.value.debugLogsWrapUp : `${y.value.debugRoundPrefix}${e.round}${y.value.debugRoundSuffix}`;
32597
32601
  }
32598
- function P(e, t, n) {
32602
+ function ne(e, t, n) {
32599
32603
  let r = e.data?.messages ?? [];
32600
32604
  return n && t != null && t > 0 && t < r.length ? {
32601
32605
  list: r.slice(t),
@@ -32605,25 +32609,25 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32605
32609
  base: 0
32606
32610
  };
32607
32611
  }
32608
- function F(e) {
32612
+ function P(e) {
32609
32613
  return new Date(e).toLocaleTimeString(n.locale, { hour12: !1 }) + "." + String(e % 1e3).padStart(3, "0");
32610
32614
  }
32611
- function I(e) {
32615
+ function F(e) {
32612
32616
  let t = new Set(a.value);
32613
32617
  t.has(e) ? t.delete(e) : t.add(e), a.value = t;
32614
32618
  }
32615
- function ne(e) {
32619
+ function re(e) {
32616
32620
  let t = new Set(d.value);
32617
32621
  t.has(e) ? t.delete(e) : t.add(e), d.value = t;
32618
32622
  }
32619
- function re(e) {
32623
+ function ie(e) {
32620
32624
  try {
32621
32625
  return JSON.stringify(e, null, 2);
32622
32626
  } catch {
32623
32627
  return String(e);
32624
32628
  }
32625
32629
  }
32626
- let ie = {
32630
+ let ae = {
32627
32631
  system: {
32628
32632
  label: "SYSTEM",
32629
32633
  color: "#6b7280"
@@ -32649,27 +32653,27 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32649
32653
  color: "#2563eb"
32650
32654
  }
32651
32655
  };
32652
- function ae(e) {
32653
- return ie[e] || {
32656
+ function oe(e) {
32657
+ return ae[e] || {
32654
32658
  label: (e || "?").toUpperCase(),
32655
32659
  color: "#9ca3af"
32656
32660
  };
32657
32661
  }
32658
- function oe() {
32662
+ function se() {
32659
32663
  r("update:visible", !1);
32660
32664
  }
32661
- function se() {
32665
+ function ce() {
32662
32666
  a.value = /* @__PURE__ */ new Set(), A.value = /* @__PURE__ */ new Set(), j.value = /* @__PURE__ */ new Set(), r("clear");
32663
32667
  }
32664
- let ce = /* @__PURE__ */ Rn("logs"), L = /* @__PURE__ */ Rn(null), R = /* @__PURE__ */ Rn({});
32665
- async function le(e) {
32666
- if (R.value[e]) {
32667
- delete R.value[e], R.value = { ...R.value };
32668
+ let le = /* @__PURE__ */ Rn("logs"), I = /* @__PURE__ */ Rn(null), L = /* @__PURE__ */ Rn({});
32669
+ async function ue(e) {
32670
+ if (L.value[e]) {
32671
+ delete L.value[e], L.value = { ...L.value };
32668
32672
  return;
32669
32673
  }
32670
32674
  if (!n.getSkillContent) {
32671
- R.value = {
32672
- ...R.value,
32675
+ L.value = {
32676
+ ...L.value,
32673
32677
  [e]: {
32674
32678
  loading: !1,
32675
32679
  content: null,
@@ -32678,8 +32682,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32678
32682
  };
32679
32683
  return;
32680
32684
  }
32681
- R.value = {
32682
- ...R.value,
32685
+ L.value = {
32686
+ ...L.value,
32683
32687
  [e]: {
32684
32688
  loading: !0,
32685
32689
  content: null
@@ -32687,8 +32691,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32687
32691
  };
32688
32692
  try {
32689
32693
  let t = await n.getSkillContent(e);
32690
- R.value = {
32691
- ...R.value,
32694
+ L.value = {
32695
+ ...L.value,
32692
32696
  [e]: {
32693
32697
  loading: !1,
32694
32698
  content: t,
@@ -32696,8 +32700,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32696
32700
  }
32697
32701
  };
32698
32702
  } catch (t) {
32699
- R.value = {
32700
- ...R.value,
32703
+ L.value = {
32704
+ ...L.value,
32701
32705
  [e]: {
32702
32706
  loading: !1,
32703
32707
  content: null,
@@ -32706,20 +32710,20 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32706
32710
  };
32707
32711
  }
32708
32712
  }
32709
- function ue() {
32713
+ function de() {
32710
32714
  if (n.getInfo) try {
32711
- L.value = n.getInfo();
32715
+ I.value = n.getInfo();
32712
32716
  } catch {
32713
- L.value = null;
32717
+ I.value = null;
32714
32718
  }
32715
32719
  }
32716
- function de(e) {
32717
- ce.value = e, (e === "subagent" || e === "info" || e === "context") && ue();
32720
+ function fe(e) {
32721
+ le.value = e, (e === "subagent" || e === "info" || e === "context") && de();
32718
32722
  }
32719
32723
  _i(() => n.infoTick?.value, () => {
32720
- n.visible && (ce.value === "subagent" || ce.value === "info" || ce.value === "context") && ue();
32724
+ n.visible && (le.value === "subagent" || le.value === "info" || le.value === "context") && de();
32721
32725
  });
32722
- let fe = pc(() => ({
32726
+ let R = pc(() => ({
32723
32727
  pending: {
32724
32728
  label: y.value.debugTodoPending,
32725
32729
  color: "#9ca3af"
@@ -32734,7 +32738,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32734
32738
  }
32735
32739
  }));
32736
32740
  function pe(e) {
32737
- return fe.value[e]?.label ?? e;
32741
+ return R.value[e]?.label ?? e;
32738
32742
  }
32739
32743
  function me(e) {
32740
32744
  return e ? e === "builtin" ? "builtin" : e.startsWith("mcp:") ? "mcp" : "user" : "";
@@ -32749,10 +32753,10 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32749
32753
  }
32750
32754
  return `${e}ms`;
32751
32755
  }
32752
- let V = pc(() => L.value?.context), he = pc(() => {
32756
+ let V = pc(() => I.value?.context), he = pc(() => {
32753
32757
  let e = V.value;
32754
32758
  return e ? e.occupancy >= 1 ? "red" : e.thresholdRatio > 0 && e.occupancy >= e.thresholdRatio ? "yellow" : "green" : "";
32755
- }), ge = pc(() => L.value?.subagent?.active ?? []), H = pc(() => L.value?.subagent?.history ?? []), _e = pc(() => Object.entries(L.value?.subagent?.lockedComponents ?? {})), ve = pc(() => ({
32759
+ }), ge = pc(() => I.value?.subagent?.active ?? []), H = pc(() => I.value?.subagent?.history ?? []), _e = pc(() => Object.entries(I.value?.subagent?.lockedComponents ?? {})), ve = pc(() => ({
32756
32760
  running: {
32757
32761
  label: y.value.debugSubRunning,
32758
32762
  color: "#059669"
@@ -32777,23 +32781,23 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32777
32781
  default: li(() => [e.visible ? (Y(), X("div", iI, [Z("div", { class: Ke(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
32778
32782
  Z("div", aI, [Z("div", oI, [
32779
32783
  Z("button", {
32780
- class: Ke(["tab-btn", { active: ce.value === "logs" }]),
32781
- onClick: n[0] ||= (e) => de("logs")
32784
+ class: Ke(["tab-btn", { active: le.value === "logs" }]),
32785
+ onClick: n[0] ||= (e) => fe("logs")
32782
32786
  }, "🐛 " + W(y.value.debugTabLogs), 3),
32783
32787
  e.getInfo ? (Y(), X("button", {
32784
32788
  key: 0,
32785
- class: Ke(["tab-btn", { active: ce.value === "context" }]),
32786
- onClick: n[1] ||= (e) => de("context")
32789
+ class: Ke(["tab-btn", { active: le.value === "context" }]),
32790
+ onClick: n[1] ||= (e) => fe("context")
32787
32791
  }, "📊 " + W(y.value.debugTabContext), 3)) : Q("", !0),
32788
32792
  e.getInfo ? (Y(), X("button", {
32789
32793
  key: 1,
32790
- class: Ke(["tab-btn", { active: ce.value === "subagent" }]),
32791
- onClick: n[2] ||= (e) => de("subagent")
32794
+ class: Ke(["tab-btn", { active: le.value === "subagent" }]),
32795
+ onClick: n[2] ||= (e) => fe("subagent")
32792
32796
  }, "🤖 " + W(y.value.debugTabSubagent), 3)) : Q("", !0),
32793
32797
  e.getInfo ? (Y(), X("button", {
32794
32798
  key: 2,
32795
- class: Ke(["tab-btn", { active: ce.value === "info" }]),
32796
- onClick: n[3] ||= (e) => de("info")
32799
+ class: Ke(["tab-btn", { active: le.value === "info" }]),
32800
+ onClick: n[3] ||= (e) => fe("info")
32797
32801
  }, "🧬 " + W(y.value.debugTabInfo), 3)) : Q("", !0)
32798
32802
  ]), Z("div", sI, [
32799
32803
  Z("button", {
@@ -32801,19 +32805,19 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32801
32805
  title: y.value.debugCopyReport,
32802
32806
  onClick: v
32803
32807
  }, W(g.value === "report" ? "✓" : "💾"), 9, cI),
32804
- ce.value === "logs" ? (Y(), X("button", {
32808
+ le.value === "logs" ? (Y(), X("button", {
32805
32809
  key: 0,
32806
32810
  class: "hd-btn",
32807
32811
  title: y.value.debugClearLogs,
32808
- onClick: se
32812
+ onClick: ce
32809
32813
  }, "🗑️", 8, lI)) : Q("", !0),
32810
32814
  Z("button", {
32811
32815
  class: "hd-btn",
32812
32816
  title: y.value.close,
32813
- onClick: oe
32817
+ onClick: se
32814
32818
  }, "✕", 8, uI)
32815
32819
  ])]),
32816
- ce.value === "logs" ? (Y(), X("div", dI, [(Y(!0), X(J, null, Sa(b.value, (e, t) => (Y(), X("button", {
32820
+ le.value === "logs" ? (Y(), X("div", dI, [(Y(!0), X(J, null, Sa(b.value, (e, t) => (Y(), X("button", {
32817
32821
  key: t,
32818
32822
  class: Ke(["filter-chip", { active: i.value === t }]),
32819
32823
  style: Ve({ "--chip-color": e.color }),
@@ -32835,7 +32839,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32835
32839
  ref_key: "drawerContentsEl",
32836
32840
  ref: c
32837
32841
  }, [
32838
- ce.value === "context" ? (Y(), X("div", hI, [V.value ? (Y(), X(J, { key: 1 }, [V.value ? (Y(), X(J, { key: 0 }, [
32842
+ le.value === "context" ? (Y(), X("div", hI, [V.value ? (Y(), X(J, { key: 1 }, [V.value ? (Y(), X(J, { key: 0 }, [
32839
32843
  Z("div", _I, [Z("div", vI, [Z("div", {
32840
32844
  class: "ctx-bar-track",
32841
32845
  title: `${y.value.debugCtxOccupancy} ${Math.round(V.value.occupancy * 100)}%`
@@ -32874,7 +32878,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32874
32878
  V.value.compression.decision ? (Y(), X("span", II, "🤖 " + W(y.value.debugCtxAgentDecision) + W(be(V.value.compression.decision)), 1)) : Q("", !0)
32875
32879
  ])])) : Q("", !0)
32876
32880
  ], 64)) : Q("", !0)], 64)) : (Y(), X("div", gI, W(y.value.debugCtxEmpty), 1))])) : Q("", !0),
32877
- ce.value === "subagent" ? (Y(), X("div", LI, [_e.value.length ? (Y(), X("div", RI, [Z("div", zI, "🔒 " + W(y.value.debugLocksTitle) + " (" + W(_e.value.length) + ")", 1), (Y(!0), X(J, null, Sa(_e.value, ([e, t]) => (Y(), X("div", {
32881
+ le.value === "subagent" ? (Y(), X("div", LI, [_e.value.length ? (Y(), X("div", RI, [Z("div", zI, "🔒 " + W(y.value.debugLocksTitle) + " (" + W(_e.value.length) + ")", 1), (Y(!0), X(J, null, Sa(_e.value, ([e, t]) => (Y(), X("div", {
32878
32882
  key: "lock-" + e,
32879
32883
  class: "sub-task"
32880
32884
  }, "🔒 " + W(e) + " ← " + W(t), 1))), 128))])) : Q("", !0), !ge.value.length && !H.value.length ? (Y(), X("div", BI, W(y.value.debugSubagentEmpty), 1)) : (Y(), X(J, { key: 2 }, [ge.value.length ? (Y(), X("div", VI, [Z("div", HI, "▶ " + W(y.value.debugSubRunningTitle) + " (" + W(ge.value.length) + ")", 1), (Y(!0), X(J, null, Sa(ge.value, (e, t) => (Y(), X("div", {
@@ -32912,10 +32916,10 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32912
32916
  }, [
32913
32917
  Z("span", nL, W(e.kind === "tool_call" ? "🔧" : "✅"), 1),
32914
32918
  Z("span", rL, W(e.name), 1),
32915
- Z("span", iL, W(F(e.ts)), 1)
32919
+ Z("span", iL, W(P(e.ts)), 1)
32916
32920
  ]))), 128))])) : Q("", !0)
32917
32921
  ], 2))), 128))])) : Q("", !0)], 64))])) : Q("", !0),
32918
- ce.value === "logs" ? (Y(), X(J, { key: 2 }, [S.value.length === 0 ? (Y(), X("div", aL, W(y.value.debugLogsEmpty), 1)) : Q("", !0), (Y(!0), X(J, null, Sa(k.value, (e) => (Y(), X("div", {
32922
+ le.value === "logs" ? (Y(), X(J, { key: 2 }, [S.value.length === 0 ? (Y(), X("div", aL, W(y.value.debugLogsEmpty), 1)) : Q("", !0), (Y(!0), X(J, null, Sa(k.value, (e) => (Y(), X("div", {
32919
32923
  key: e.key,
32920
32924
  class: "log-group"
32921
32925
  }, [Z("div", {
@@ -32925,8 +32929,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32925
32929
  Z("span", { class: Ke(["log-group-arrow", { open: ee(e.key) }]) }, "▶", 2),
32926
32930
  Z("span", sL, W(te(e)), 1),
32927
32931
  Z("span", cL, [
32928
- Ms(W(F(e.firstTs)), 1),
32929
- e.lastTs > e.firstTs ? (Y(), X(J, { key: 0 }, [Ms(" ~ " + W(F(e.lastTs)), 1)], 64)) : Q("", !0),
32932
+ Ms(W(P(e.firstTs)), 1),
32933
+ e.lastTs > e.firstTs ? (Y(), X(J, { key: 0 }, [Ms(" ~ " + W(P(e.lastTs)), 1)], 64)) : Q("", !0),
32930
32934
  Ms(" · " + W(B(e.lastTs - e.firstTs)), 1)
32931
32935
  ]),
32932
32936
  e.toolCount ? (Y(), X("span", lL, "🔧 " + W(e.toolCount), 1)) : Q("", !0),
@@ -32942,7 +32946,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32942
32946
  style: Ve({ background: b.value[e.type].color })
32943
32947
  }, W(b.value[e.type].icon) + " " + W(b.value[e.type].label), 5),
32944
32948
  e.source ? (Y(), X("span", mL, "↳ " + W(e.source), 1)) : Q("", !0),
32945
- Z("span", hL, W(F(e.timestamp)), 1)
32949
+ Z("span", hL, W(P(e.timestamp)), 1)
32946
32950
  ]),
32947
32951
  Z("div", gL, [e.type === "context" ? (Y(), X(J, { key: 0 }, [
32948
32952
  Z("div", _L, [
@@ -32962,8 +32966,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32962
32966
  class: "msg-row"
32963
32967
  }, [Z("span", {
32964
32968
  class: "msg-role",
32965
- style: Ve({ background: ae(e.type).color })
32966
- }, W(ae(e.type).label), 5), Z("span", NL, W(e.content), 1)]))), 128))])
32969
+ style: Ve({ background: oe(e.type).color })
32970
+ }, W(oe(e.type).label), 5), Z("span", NL, W(e.content), 1)]))), 128))])
32967
32971
  ], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div", PL, [
32968
32972
  Z("span", FL, W(y.value.debugRoundPrefix) + W(e.data.round) + W(y.value.debugRoundSuffix), 1),
32969
32973
  e.data.model ? (Y(), X("span", IL, W(e.data.model), 1)) : Q("", !0),
@@ -32977,13 +32981,13 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32977
32981
  Z("button", {
32978
32982
  class: "view-toggle copy-btn",
32979
32983
  title: y.value.copy,
32980
- onClick: (t) => _(re(e.data.messages), "req" + i)
32984
+ onClick: (t) => _(ie(e.data.messages), "req" + i)
32981
32985
  }, W(g.value === "req" + i ? "✓" : "📋"), 9, BL),
32982
32986
  Z("button", {
32983
32987
  class: "view-toggle",
32984
- onClick: (e) => ne(i)
32988
+ onClick: (e) => re(i)
32985
32989
  }, W(d.value.has(i) ? y.value.debugCardView : y.value.debugRequestBody), 9, VL)
32986
- ]), d.value.has(i) ? (Y(), X("pre", JL, [Z("code", null, W(re(e.data.messages)), 1)])) : (Y(!0), X(J, { key: 0 }, Sa([P(e, r, m.value.has(i))], (e) => (Y(), X("div", {
32990
+ ]), d.value.has(i) ? (Y(), X("pre", JL, [Z("code", null, W(ie(e.data.messages)), 1)])) : (Y(!0), X(J, { key: 0 }, Sa([ne(e, r, m.value.has(i))], (e) => (Y(), X("div", {
32987
32991
  key: e.base,
32988
32992
  class: "msg-list"
32989
32993
  }, [(Y(!0), X(J, null, Sa(e.list, (t, n) => (Y(), X("div", {
@@ -32993,8 +32997,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32993
32997
  onClick: (r) => String(t.content ?? "").length > fB && p(i + ":" + (e.base + n))
32994
32998
  }, [Z("span", {
32995
32999
  class: "msg-role",
32996
- style: Ve({ background: ae(t.role).color })
32997
- }, W(ae(t.role).label), 5), Z("div", UL, [
33000
+ style: Ve({ background: oe(t.role).color })
33001
+ }, W(oe(t.role).label), 5), Z("div", UL, [
32998
33002
  t.content ? (Y(), X("span", WL, W(t.content), 1)) : Q("", !0),
32999
33003
  (Y(!0), X(J, null, Sa(t.tool_calls || [], (e, t) => (Y(), X("div", {
33000
33004
  key: t,
@@ -33007,7 +33011,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
33007
33011
  e.data.toolCalls?.length ? (Y(), X("div", $L, [(Y(!0), X(J, null, Sa(e.data.toolCalls, (e, t) => (Y(), X("div", {
33008
33012
  key: t,
33009
33013
  class: "tc-card"
33010
- }, [Z("div", eR, "🔧 " + W(e.name), 1), Z("pre", tR, W(re(e.args)), 1)]))), 128))])) : Q("", !0),
33014
+ }, [Z("div", eR, "🔧 " + W(e.name), 1), Z("pre", tR, W(ie(e.args)), 1)]))), 128))])) : Q("", !0),
33011
33015
  e.data.usage ? (Y(), X("div", nR, [
33012
33016
  Z("span", rR, "prompt: " + W(e.data.usage.prompt_tokens ?? "-"), 1),
33013
33017
  Z("span", iR, "completion: " + W(e.data.usage.completion_tokens ?? "-"), 1),
@@ -33027,85 +33031,85 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
33027
33031
  onClick: (t) => _(String(e.data.result ?? ""), "res" + i)
33028
33032
  }, W(g.value === "res" + i ? "✓" : "📋"), 9, lR)
33029
33033
  ]),
33030
- Z("pre", uR, W(re(t.data.args)), 1),
33034
+ Z("pre", uR, W(ie(t.data.args)), 1),
33031
33035
  Z("div", dR, "↓ " + W(y.value.resultLabel), 1),
33032
33036
  Z("pre", fR, W(e.data.result), 1)
33033
- ], 2)) : (Y(), X("div", pR, [Z("div", mR, [Ms(W(e.type === "tool_call" ? "🔧" : "✅") + " " + W(e.data.name) + " ", 1), e.type === "tool_call" ? (Y(), X("span", hR, W(y.value.statusRunning) + "…", 1)) : Q("", !0)]), Z("pre", gR, W(e.type === "tool_call" ? re(e.data.args) : e.data.result), 1)]))], 64)) : e.type === "error" ? (Y(), X("div", _R, W(e.data.tool ? `[${e.data.tool}] ` : "") + W(e.data.error), 1)) : Q("", !0)]),
33037
+ ], 2)) : (Y(), X("div", pR, [Z("div", mR, [Ms(W(e.type === "tool_call" ? "🔧" : "✅") + " " + W(e.data.name) + " ", 1), e.type === "tool_call" ? (Y(), X("span", hR, W(y.value.statusRunning) + "…", 1)) : Q("", !0)]), Z("pre", gR, W(e.type === "tool_call" ? ie(e.data.args) : e.data.result), 1)]))], 64)) : e.type === "error" ? (Y(), X("div", _R, W(e.data.tool ? `[${e.data.tool}] ` : "") + W(e.data.error), 1)) : Q("", !0)]),
33034
33038
  Z("div", vR, [Z("button", {
33035
33039
  class: "raw-toggle",
33036
- onClick: (e) => I(i)
33040
+ onClick: (e) => F(i)
33037
33041
  }, W(a.value.has(i) ? y.value.debugCollapseRawJson : y.value.debugViewRawJson), 9, yR), Z("button", {
33038
33042
  class: "raw-toggle",
33039
- onClick: (t) => K(XD)(re(e.data))
33043
+ onClick: (t) => K(XD)(ie(e.data))
33040
33044
  }, W(y.value.copy), 9, bR)]),
33041
- a.value.has(i) ? (Y(), X("pre", xR, [Z("code", null, W(re(e.data)), 1)])) : Q("", !0)
33042
- ]))), 128))], 512), [[Yc, ee(e.key)]])]))), 128))], 64)) : ce.value === "info" ? (Y(), X("div", SR, [L.value ? (Y(), X(J, { key: 1 }, [
33045
+ a.value.has(i) ? (Y(), X("pre", xR, [Z("code", null, W(ie(e.data)), 1)])) : Q("", !0)
33046
+ ]))), 128))], 512), [[Yc, ee(e.key)]])]))), 128))], 64)) : le.value === "info" ? (Y(), X("div", SR, [I.value ? (Y(), X(J, { key: 1 }, [
33043
33047
  Z("div", wR, [
33044
33048
  Z("div", TR, W(y.value.debugInfoBasic), 1),
33045
33049
  Z("div", ER, [
33046
- Z("div", DR, [n[6] ||= Z("span", { class: "k" }, "ID", -1), Z("span", OR, W(L.value.id), 1)]),
33047
- Z("div", kR, [Z("span", AR, W(y.value.debugModel), 1), Z("span", jR, W(L.value.model || "-"), 1)]),
33048
- Z("div", MR, [Z("span", NR, W(y.value.debugToolCount), 1), Z("span", PR, W(L.value.tools.length), 1)]),
33049
- Z("div", FR, [Z("span", IR, W(y.value.debugMiddleware), 1), Z("span", LR, W(L.value.middleware.length), 1)])
33050
+ Z("div", DR, [n[6] ||= Z("span", { class: "k" }, "ID", -1), Z("span", OR, W(I.value.id), 1)]),
33051
+ Z("div", kR, [Z("span", AR, W(y.value.debugModel), 1), Z("span", jR, W(I.value.model || "-"), 1)]),
33052
+ Z("div", MR, [Z("span", NR, W(y.value.debugToolCount), 1), Z("span", PR, W(I.value.tools.length), 1)]),
33053
+ Z("div", FR, [Z("span", IR, W(y.value.debugMiddleware), 1), Z("span", LR, W(I.value.middleware.length), 1)])
33050
33054
  ]),
33051
- Z("div", RR, [Z("span", zR, W(y.value.debugMiddlewareStack), 1), Z("span", BR, W(L.value.middleware.join(" → ") || "-"), 1)])
33055
+ Z("div", RR, [Z("span", zR, W(y.value.debugMiddlewareStack), 1), Z("span", BR, W(I.value.middleware.join(" → ") || "-"), 1)])
33052
33056
  ]),
33053
- Z("div", VR, [Z("div", HR, "🔧 " + W(y.value.debugToolsLabel) + " (" + W(L.value.tools.length) + ")", 1), (Y(!0), X(J, null, Sa(L.value.tools, (e) => (Y(), X("div", {
33057
+ Z("div", VR, [Z("div", HR, "🔧 " + W(y.value.debugToolsLabel) + " (" + W(I.value.tools.length) + ")", 1), (Y(!0), X(J, null, Sa(I.value.tools, (e) => (Y(), X("div", {
33054
33058
  key: e.name,
33055
33059
  class: "info-item"
33056
33060
  }, [Z("div", UR, [Ms(W(e.name), 1), e.source ? (Y(), X("span", {
33057
33061
  key: 0,
33058
33062
  class: Ke(["src-tag", me(e.source)])
33059
33063
  }, W(e.source), 3)) : Q("", !0)]), Z("div", WR, W(e.description), 1)]))), 128))]),
33060
- L.value.skills.length ? (Y(), X("div", GR, [Z("div", KR, [Ms("📘 " + W(y.value.debugSkillsTitle) + " (" + W(L.value.skills.length) + ")", 1), Z("span", qR, W(y.value.debugSkillsHint), 1)]), (Y(!0), X(J, null, Sa(L.value.skills, (e) => (Y(), X("div", {
33064
+ I.value.skills.length ? (Y(), X("div", GR, [Z("div", KR, [Ms("📘 " + W(y.value.debugSkillsTitle) + " (" + W(I.value.skills.length) + ")", 1), Z("span", qR, W(y.value.debugSkillsHint), 1)]), (Y(!0), X(J, null, Sa(I.value.skills, (e) => (Y(), X("div", {
33061
33065
  key: e.name,
33062
33066
  class: "info-item"
33063
33067
  }, [
33064
33068
  Z("div", {
33065
33069
  class: "info-name skill-toggle",
33066
- onClick: (t) => le(e.name)
33067
- }, [Z("span", { class: Ke(["skill-arrow", { open: !!R.value[e.name] }]) }, "▶", 2), Ms(" " + W(e.name), 1)], 8, JR),
33070
+ onClick: (t) => ue(e.name)
33071
+ }, [Z("span", { class: Ke(["skill-arrow", { open: !!L.value[e.name] }]) }, "▶", 2), Ms(" " + W(e.name), 1)], 8, JR),
33068
33072
  Z("div", YR, W(e.description), 1),
33069
- R.value[e.name] ? (Y(), X("div", XR, [R.value[e.name].loading ? (Y(), X("div", ZR, W(y.value.debugLoading), 1)) : R.value[e.name].error ? (Y(), X("div", QR, W(R.value[e.name].error), 1)) : R.value[e.name].content ? (Y(), X("pre", $R, W(R.value[e.name].content), 1)) : Q("", !0)])) : Q("", !0)
33073
+ L.value[e.name] ? (Y(), X("div", XR, [L.value[e.name].loading ? (Y(), X("div", ZR, W(y.value.debugLoading), 1)) : L.value[e.name].error ? (Y(), X("div", QR, W(L.value[e.name].error), 1)) : L.value[e.name].content ? (Y(), X("pre", $R, W(L.value[e.name].content), 1)) : Q("", !0)])) : Q("", !0)
33070
33074
  ]))), 128))])) : Q("", !0),
33071
- L.value.data ? (Y(), X("div", ez, [Z("div", tz, "📊 " + W(y.value.debugDataTitle), 1), Z("div", nz, [Z("div", rz, W(L.value.data.description || y.value.debugDataFallback), 1), Z("div", iz, W(y.value.debugSchemaPrefix) + W(L.value.data.schema ? y.value.debugSchemaDeclared : y.value.debugSchemaMissing), 1)])])) : Q("", !0),
33075
+ I.value.data ? (Y(), X("div", ez, [Z("div", tz, "📊 " + W(y.value.debugDataTitle), 1), Z("div", nz, [Z("div", rz, W(I.value.data.description || y.value.debugDataFallback), 1), Z("div", iz, W(y.value.debugSchemaPrefix) + W(I.value.data.schema ? y.value.debugSchemaDeclared : y.value.debugSchemaMissing), 1)])])) : Q("", !0),
33072
33076
  Z("div", az, [Z("div", oz, "🧬 " + W(y.value.debugSubagentTitle), 1), Z("div", sz, [
33073
- Z("div", cz, [Z("span", lz, W(y.value.debugEnabled), 1), Z("span", uz, W(L.value.subagent.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
33074
- Z("div", dz, [Z("span", fz, W(y.value.debugMaxDepth), 1), Z("span", pz, W(L.value.subagent.maxDepth), 1)]),
33075
- Z("div", mz, [Z("span", hz, W(y.value.debugMaxParallel), 1), Z("span", gz, W(L.value.subagent.maxParallel), 1)]),
33076
- Z("div", _z, [Z("span", vz, W(y.value.debugExtraTools), 1), Z("span", yz, W(L.value.subagent.allowedTools.length ? L.value.subagent.allowedTools.join(", ") : y.value.debugDefaultReadonly), 1)])
33077
+ Z("div", cz, [Z("span", lz, W(y.value.debugEnabled), 1), Z("span", uz, W(I.value.subagent.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
33078
+ Z("div", dz, [Z("span", fz, W(y.value.debugMaxDepth), 1), Z("span", pz, W(I.value.subagent.maxDepth), 1)]),
33079
+ Z("div", mz, [Z("span", hz, W(y.value.debugMaxParallel), 1), Z("span", gz, W(I.value.subagent.maxParallel), 1)]),
33080
+ Z("div", _z, [Z("span", vz, W(y.value.debugExtraTools), 1), Z("span", yz, W(I.value.subagent.allowedTools.length ? I.value.subagent.allowedTools.join(", ") : y.value.debugDefaultReadonly), 1)])
33077
33081
  ])]),
33078
- L.value.mcp?.servers?.length ? (Y(), X("div", bz, [Z("div", xz, "🔌 MCP (" + W(L.value.mcp.servers.length) + ")", 1), (Y(!0), X(J, null, Sa(L.value.mcp.servers, (e) => (Y(), X("div", {
33082
+ I.value.mcp?.servers?.length ? (Y(), X("div", bz, [Z("div", xz, "🔌 MCP (" + W(I.value.mcp.servers.length) + ")", 1), (Y(!0), X(J, null, Sa(I.value.mcp.servers, (e) => (Y(), X("div", {
33079
33083
  key: e.name,
33080
33084
  class: "info-item"
33081
33085
  }, [Z("div", Sz, [Ms(W(e.name) + " ", 1), Z("span", Cz, W(e.toolCount) + W(y.value.debugToolCountSuffix), 1)]), Z("div", wz, W(e.url), 1)]))), 128))])) : Q("", !0),
33082
- L.value.verify ? (Y(), X("div", Tz, [Z("div", Ez, "✅ " + W(y.value.debugVerifyTitle), 1), Z("div", Dz, [
33083
- Z("div", Oz, [Z("span", kz, W(y.value.debugEnabled), 1), Z("span", Az, W(L.value.verify.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
33084
- Z("div", jz, [Z("span", Mz, W(y.value.debugMaxAttempts), 1), Z("span", Nz, W(L.value.verify.maxAttempts), 1)]),
33085
- Z("div", Pz, [Z("span", Fz, W(y.value.debugAdversarial), 1), Z("span", Iz, W(L.value.verify.adversarial ? y.value.debugOn : y.value.debugOff), 1)]),
33086
- L.value.verify.adversarial ? (Y(), X("div", Lz, [Z("span", Rz, W(y.value.debugAdversarialModel), 1), Z("span", zz, W(L.value.model || "-") + W(y.value.debugSameAsMain), 1)])) : Q("", !0)
33086
+ I.value.verify ? (Y(), X("div", Tz, [Z("div", Ez, "✅ " + W(y.value.debugVerifyTitle), 1), Z("div", Dz, [
33087
+ Z("div", Oz, [Z("span", kz, W(y.value.debugEnabled), 1), Z("span", Az, W(I.value.verify.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
33088
+ Z("div", jz, [Z("span", Mz, W(y.value.debugMaxAttempts), 1), Z("span", Nz, W(I.value.verify.maxAttempts), 1)]),
33089
+ Z("div", Pz, [Z("span", Fz, W(y.value.debugAdversarial), 1), Z("span", Iz, W(I.value.verify.adversarial ? y.value.debugOn : y.value.debugOff), 1)]),
33090
+ I.value.verify.adversarial ? (Y(), X("div", Lz, [Z("span", Rz, W(y.value.debugAdversarialModel), 1), Z("span", zz, W(I.value.model || "-") + W(y.value.debugSameAsMain), 1)])) : Q("", !0)
33087
33091
  ])])) : Q("", !0),
33088
- L.value.todos.length ? (Y(), X("div", Bz, [Z("div", Vz, "📋 " + W(y.value.debugTodosTitle) + " (" + W(L.value.todos.length) + ")", 1), (Y(!0), X(J, null, Sa(L.value.todos, (e, t) => (Y(), X("div", {
33092
+ I.value.todos.length ? (Y(), X("div", Bz, [Z("div", Vz, "📋 " + W(y.value.debugTodosTitle) + " (" + W(I.value.todos.length) + ")", 1), (Y(!0), X(J, null, Sa(I.value.todos, (e, t) => (Y(), X("div", {
33089
33093
  key: t,
33090
33094
  class: "info-todo"
33091
33095
  }, [Z("span", {
33092
33096
  class: "todo-tag",
33093
- style: Ve({ background: fe.value[e.status] && fe.value[e.status].color || "#9ca3af" })
33097
+ style: Ve({ background: R.value[e.status] && R.value[e.status].color || "#9ca3af" })
33094
33098
  }, W(pe(e.status)), 5), Z("span", null, W(e.content), 1)]))), 128))])) : Q("", !0),
33095
- L.value.memory ? (Y(), X("div", Hz, [Z("div", Uz, "📝 " + W(y.value.debugMemoryTitle), 1), Z("pre", Wz, W(L.value.memory), 1)])) : Q("", !0),
33096
- L.value.lastCompression ? (Y(), X("div", Gz, [Z("div", Kz, "🗜️ " + W(y.value.debugLastCompTitle), 1), Z("div", qz, [
33097
- Z("div", Jz, [Z("span", Yz, W(y.value.debugTriggered), 1), Z("span", Xz, W(L.value.lastCompression.triggered ? "✓" : y.value.debugNotTriggered), 1)]),
33098
- Z("div", Zz, [Z("span", Qz, W(y.value.debugRoundsSummarized), 1), Z("span", $z, W(L.value.lastCompression.roundsSummarized) + " / " + W(L.value.lastCompression.roundsTotal), 1)]),
33099
- Z("div", eB, [Z("span", tB, W(y.value.debugCtxRecalled), 1), Z("span", nB, W(L.value.lastCompression.roundsRecalled) + W(y.value.debugCountSuffix), 1)]),
33100
- Z("div", rB, [Z("span", iB, W(y.value.debugMessageCount), 1), Z("span", aB, W(L.value.lastCompression.originalMessages) + " → " + W(L.value.lastCompression.compressedMessages), 1)]),
33101
- Z("div", oB, [Z("span", sB, W(y.value.debugStrategy), 1), Z("span", cB, W(L.value.lastCompression.strategy), 1)]),
33102
- L.value.lastCompression.decision ? (Y(), X("div", lB, [Z("span", uB, W(y.value.debugDecision), 1), Z("span", dB, "🤖 " + W(be(L.value.lastCompression.decision)), 1)])) : Q("", !0)
33099
+ I.value.memory ? (Y(), X("div", Hz, [Z("div", Uz, "📝 " + W(y.value.debugMemoryTitle), 1), Z("pre", Wz, W(I.value.memory), 1)])) : Q("", !0),
33100
+ I.value.lastCompression ? (Y(), X("div", Gz, [Z("div", Kz, "🗜️ " + W(y.value.debugLastCompTitle), 1), Z("div", qz, [
33101
+ Z("div", Jz, [Z("span", Yz, W(y.value.debugTriggered), 1), Z("span", Xz, W(I.value.lastCompression.triggered ? "✓" : y.value.debugNotTriggered), 1)]),
33102
+ Z("div", Zz, [Z("span", Qz, W(y.value.debugRoundsSummarized), 1), Z("span", $z, W(I.value.lastCompression.roundsSummarized) + " / " + W(I.value.lastCompression.roundsTotal), 1)]),
33103
+ Z("div", eB, [Z("span", tB, W(y.value.debugCtxRecalled), 1), Z("span", nB, W(I.value.lastCompression.roundsRecalled) + W(y.value.debugCountSuffix), 1)]),
33104
+ Z("div", rB, [Z("span", iB, W(y.value.debugMessageCount), 1), Z("span", aB, W(I.value.lastCompression.originalMessages) + " → " + W(I.value.lastCompression.compressedMessages), 1)]),
33105
+ Z("div", oB, [Z("span", sB, W(y.value.debugStrategy), 1), Z("span", cB, W(I.value.lastCompression.strategy), 1)]),
33106
+ I.value.lastCompression.decision ? (Y(), X("div", lB, [Z("span", uB, W(y.value.debugDecision), 1), Z("span", dB, "🤖 " + W(be(I.value.lastCompression.decision)), 1)])) : Q("", !0)
33103
33107
  ])])) : Q("", !0)
33104
33108
  ], 64)) : (Y(), X("div", CR, W(y.value.debugNoInfo), 1))])) : Q("", !0)
33105
33109
  ], 512)], 512)], 512)
33106
33110
  ], 2), Z("div", {
33107
33111
  class: "drawer-mask",
33108
- onClick: oe
33112
+ onClick: se
33109
33113
  })])) : Q("", !0)]),
33110
33114
  _: 1
33111
33115
  })]));
@@ -34189,4 +34193,4 @@ function bV(e) {
34189
34193
  return VC(e, JB);
34190
34194
  }
34191
34195
  //#endregion
34192
- export { uF as ApprovalBar, lb as CAPABILITIES, fb as CONTEXT_PRESETS, qB as ChatDialog, _A as ChatHeader, rI as ChatInput, yV as CodePreview, hy as CompressDecisionSchema, DF as ConflictBar, BS as DEFAULT_COMPUTED_STYLES, ZD as DEFAULT_DIALOG_ICONS, bh as DEFAULT_PROMPT_SOFT_CAP, Zg as DEFAULT_SYSTEM_PROMPT, Qg as DEFAULT_SYSTEM_PROMPT_EN, pB as DebugDrawer, OA as FocusBar, FN as HLJS_BLOCK_MAX_CHARS, iv as HTML_VOID_TAGS, ug as HUMAN_CONFIRM_TOOL_NAME, Vk as IconGlyph, tu as ImageInputError, T as LOW_CAPS_HINT_BASELINE, eO as MESSAGES_EN_US, $D as MESSAGES_ZH_CN, S as MIN_CONTEXT_WINDOW, ad as MODEL_UNAVAILABLE_GUIDANCE, qN as MessageContent, kP as MessageList, yP as MessageRow, zP as QueuedBar, yh as SOFT_CAP_MIN_WINDOW, dh as STOP_WORDS, VB as SkillPanel, um as UNSAFE_KEYS, fC as actionsToInspectInfo, dC as actionsToTools, Zl as agentError, Ug as analyzeContext, Tm as applyPatchToClone, Om as applyPatchToLive, K_ as applyPatchesToBind, bS as applyProposalOps, kp as arrayMinLength, Xl as asAgentError, Yv as buildCollectorJs, GS as buildCssPath, a_ as buildDataPrompt, Vv as buildDiagnosticsReport, ay as buildHtmlFragmentSkill, Xv as buildSandboxSrcdoc, o_ as buildSystemPrompt, Pu as captureSelectionQuote, rO as chatContextKey, G_ as commitSetToBind, ny as composeStructureThenRender, fu as compressImage, Yg as connectMcp, I as constructLlmFromConfig, te as constructOpenLlmSync, XD as copyText, yS as countOccurrences, yp as createAgent, lg as createApprovalMiddleware, iO as createChatContext, bV as createChatSdk, xg as createCheckpointManager, Sg as createCheckpointMiddleware, Ay as createConflictManager, Wg as createContextInspectorMiddleware, ly as createCraftNoteCheck, rv as createDataOps, iV as createEvalHarness, sy as createHtmlFormatCheck, ty as createHtmlRenderCheck, dy as createHtmlSubagent, pg as createHumanConfirmMiddleware, fg as createHumanConfirmTool, tV as createIdleDetector, Qy as createMemoryBackend, ng as createMemoryMiddleware, y as createProxyLlm, eV as createRagSubagent, dd as createSandboxRunner, db as createSdkEvents, NC as createSerialRunner, nb as createSessionStore, rb as createSessionStoreWithBackend, kC as createSkillStore, qh as createSubagentMiddleware, Dh as createSubagentTracker, Xh as createSubagentsMiddleware, xC as createUsageHintsMiddleware, wg as createVerifyMiddleware, u_ as createVfs, eb as createWebStorageBackend, Ag as createWriteBackCheck, od as decorateModelUnavailable, gm as deepClone, hC as defineDataToolset, Vm as defineSkill, fy as defineTool, hm as deleteByPath, gy as deriveTitle, Up as describeSchemaNode, np as detectGarbledToolCall, ff as detectTransitionalReply, Mm as diffObjects, rV as diffReport, XS as domInfoTool, tC as domInspectSkill, YS as domSearchTool, jS as domToStructure, zS as domTools, mC as domToolsStatic, Ap as elementSchemaCandidates, US as ensureDomListenerRecorder, ph as estimateMessageTokens, gh as estimateRoundTokens, O as estimateTokens, re as extractReasoningDelta, nm as extractSchemaHint, Gg as extractText, ne as extractTextDelta, ie as extractUsage, DS as fetchDocTools, pC as fetchTools, jm as findStrippedKeys, Wp as formatConstraints, Kl as formatZodIssues, pm as getByPath, MS as getDomTool, JS as getElementInfo, iC as getEnvSummary, WS as getRecordedListeners, $v as getSandboxLifecycle, Cp as getSchemaAtPath, bp as getSchemaTopKeys, xS as hashContent, Cm as hashValue, oy as htmlFragmentSkill, Zp as htmlOrchestratorPrompt, _h as indexSummarize, sC as inspectEnvTool, cC as inspectTools, vy as isChatModel, rd as isContextLengthError, kk as isIconHtml, id as isModelUnavailableError, xp as isPathAllowed, Wy as isQuotaError, dm as isUnsafePath, xd as jpEval, Jl as jsonParseError, bm as limitDepth, _S as lineDiff, E as lowCapsHint, VN as markedToHtml, zv as maskUrlCredentials, vm as maybeParseValue, Nv as measureWriteScale, Dm as moveByPath, N as normalizeBaseUrl, Jv as normalizeRenderResult, oe as normalizeUsage, A as offloadPassThroughChars, k as offloadThresholdChars, Xp as presets, Lp as projectBySchema, Ip as projectBySchemaDeep, ym as projectFields, vh as recallRounds, ey as renderInSandbox, HN as renderMarkdownHtml, Gp as renderSchemaHint, Kp as renderSchemaOverview, Yp as renderSchemaShallow, ub as resolveCapabilities, mb as resolveContextOptions, ob as resolveDialogConfig, QD as resolveDialogIcons, nO as resolveDialogMessages, ky as resolveLlm, D as resolveModelCaps, Sh as resolvePromptSoftCap, Ep as resolveSchemaPath, ab as resolveStorage, Am as restoreInPlace, km as restoreLive, Yl as routeError, Td as runSandboxedScript, fm as safeMerge, rC as safeSerialize, xm as safeStringify, rp as sanitizeGarbledContent, Nk as sanitizeIconHtml, Ik as sanitizeMessageHtml, Op as schemaHasRefinement, KS as searchDom, Cd as searchJson, gC as selectBuiltinTools, mm as setByPath, Ch as shouldTriggerCompression, Hv as stringifyDiagnosticsReport, ee as stripStainlessFetch, Qp as systemPromptHelpers, w as tableMaxOutputTokens, fh as tokenize, $ as toolError, Sp as unwrapSchema, YD as useChat, aO as useChatContext, Dp as validateAtPath, ov as validateHtmlFormat, U_ as validateRootValueLocally, W_ as validateWriteLocally, wm as watchFieldsHash, e as z, ql as zodError };
34196
+ export { uF as ApprovalBar, lb as CAPABILITIES, fb as CONTEXT_PRESETS, qB as ChatDialog, _A as ChatHeader, rI as ChatInput, yV as CodePreview, hy as CompressDecisionSchema, DF as ConflictBar, BS as DEFAULT_COMPUTED_STYLES, ZD as DEFAULT_DIALOG_ICONS, bh as DEFAULT_PROMPT_SOFT_CAP, Zg as DEFAULT_SYSTEM_PROMPT, Qg as DEFAULT_SYSTEM_PROMPT_EN, pB as DebugDrawer, OA as FocusBar, FN as HLJS_BLOCK_MAX_CHARS, iv as HTML_VOID_TAGS, ug as HUMAN_CONFIRM_TOOL_NAME, Vk as IconGlyph, tu as ImageInputError, T as LOW_CAPS_HINT_BASELINE, eO as MESSAGES_EN_US, $D as MESSAGES_ZH_CN, S as MIN_CONTEXT_WINDOW, ad as MODEL_UNAVAILABLE_GUIDANCE, qN as MessageContent, kP as MessageList, yP as MessageRow, zP as QueuedBar, yh as SOFT_CAP_MIN_WINDOW, dh as STOP_WORDS, VB as SkillPanel, um as UNSAFE_KEYS, fC as actionsToInspectInfo, dC as actionsToTools, Zl as agentError, Ug as analyzeContext, Tm as applyPatchToClone, Om as applyPatchToLive, K_ as applyPatchesToBind, bS as applyProposalOps, kp as arrayMinLength, Xl as asAgentError, Yv as buildCollectorJs, GS as buildCssPath, a_ as buildDataPrompt, Vv as buildDiagnosticsReport, ay as buildHtmlFragmentSkill, Xv as buildSandboxSrcdoc, o_ as buildSystemPrompt, Pu as captureSelectionQuote, rO as chatContextKey, G_ as commitSetToBind, ny as composeStructureThenRender, fu as compressImage, Yg as connectMcp, F as constructLlmFromConfig, te as constructOpenLlmSync, XD as copyText, yS as countOccurrences, yp as createAgent, lg as createApprovalMiddleware, iO as createChatContext, bV as createChatSdk, xg as createCheckpointManager, Sg as createCheckpointMiddleware, Ay as createConflictManager, Wg as createContextInspectorMiddleware, ly as createCraftNoteCheck, rv as createDataOps, iV as createEvalHarness, sy as createHtmlFormatCheck, ty as createHtmlRenderCheck, dy as createHtmlSubagent, pg as createHumanConfirmMiddleware, fg as createHumanConfirmTool, tV as createIdleDetector, Qy as createMemoryBackend, ng as createMemoryMiddleware, y as createProxyLlm, eV as createRagSubagent, dd as createSandboxRunner, db as createSdkEvents, NC as createSerialRunner, nb as createSessionStore, rb as createSessionStoreWithBackend, kC as createSkillStore, qh as createSubagentMiddleware, Dh as createSubagentTracker, Xh as createSubagentsMiddleware, xC as createUsageHintsMiddleware, wg as createVerifyMiddleware, u_ as createVfs, eb as createWebStorageBackend, Ag as createWriteBackCheck, od as decorateModelUnavailable, gm as deepClone, hC as defineDataToolset, Vm as defineSkill, fy as defineTool, hm as deleteByPath, gy as deriveTitle, Up as describeSchemaNode, np as detectGarbledToolCall, ff as detectTransitionalReply, Mm as diffObjects, rV as diffReport, XS as domInfoTool, tC as domInspectSkill, YS as domSearchTool, jS as domToStructure, zS as domTools, mC as domToolsStatic, Ap as elementSchemaCandidates, US as ensureDomListenerRecorder, ph as estimateMessageTokens, gh as estimateRoundTokens, O as estimateTokens, ie as extractReasoningDelta, nm as extractSchemaHint, Gg as extractText, re as extractTextDelta, ae as extractUsage, DS as fetchDocTools, pC as fetchTools, jm as findStrippedKeys, Wp as formatConstraints, Kl as formatZodIssues, pm as getByPath, MS as getDomTool, JS as getElementInfo, iC as getEnvSummary, WS as getRecordedListeners, $v as getSandboxLifecycle, Cp as getSchemaAtPath, bp as getSchemaTopKeys, xS as hashContent, Cm as hashValue, oy as htmlFragmentSkill, Zp as htmlOrchestratorPrompt, _h as indexSummarize, sC as inspectEnvTool, cC as inspectTools, vy as isChatModel, rd as isContextLengthError, kk as isIconHtml, id as isModelUnavailableError, xp as isPathAllowed, Wy as isQuotaError, dm as isUnsafePath, xd as jpEval, Jl as jsonParseError, bm as limitDepth, _S as lineDiff, E as lowCapsHint, VN as markedToHtml, zv as maskUrlCredentials, vm as maybeParseValue, Nv as measureWriteScale, Dm as moveByPath, N as normalizeBaseUrl, Jv as normalizeRenderResult, se as normalizeUsage, A as offloadPassThroughChars, k as offloadThresholdChars, Xp as presets, Lp as projectBySchema, Ip as projectBySchemaDeep, ym as projectFields, vh as recallRounds, ey as renderInSandbox, HN as renderMarkdownHtml, Gp as renderSchemaHint, Kp as renderSchemaOverview, Yp as renderSchemaShallow, ub as resolveCapabilities, mb as resolveContextOptions, ob as resolveDialogConfig, QD as resolveDialogIcons, nO as resolveDialogMessages, ky as resolveLlm, D as resolveModelCaps, Sh as resolvePromptSoftCap, Ep as resolveSchemaPath, ab as resolveStorage, Am as restoreInPlace, km as restoreLive, Yl as routeError, Td as runSandboxedScript, fm as safeMerge, rC as safeSerialize, xm as safeStringify, rp as sanitizeGarbledContent, Nk as sanitizeIconHtml, Ik as sanitizeMessageHtml, Op as schemaHasRefinement, KS as searchDom, Cd as searchJson, gC as selectBuiltinTools, mm as setByPath, Ch as shouldTriggerCompression, Hv as stringifyDiagnosticsReport, ee as stripStainlessFetch, Qp as systemPromptHelpers, w as tableMaxOutputTokens, fh as tokenize, $ as toolError, Sp as unwrapSchema, YD as useChat, aO as useChatContext, Dp as validateAtPath, ov as validateHtmlFormat, U_ as validateRootValueLocally, W_ as validateWriteLocally, wm as watchFieldsHash, e as z, ql as zodError };