@vtj/designer 0.14.2 → 0.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,10 +19,10 @@ import { editor as Mm } from "monaco-editor";
19
19
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
20
20
  * @name @vtj/designer
21
21
  * @author CHC chenhuachun1549@dingtalk.com
22
- * @version 0.14.2
22
+ * @version 0.14.3
23
23
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
24
24
  */
25
- const cr = "0.14.2", jm = {
25
+ const cr = "0.14.3", jm = {
26
26
  width: 390,
27
27
  height: 844
28
28
  }, Lm = {
@@ -603,16 +603,16 @@ function kh(e, t, n, o = {}) {
603
603
  deep: a,
604
604
  eventFilter: f
605
605
  });
606
- ae(y, () => G(), { flush: r });
606
+ ae(y, () => K(), { flush: r });
607
607
  let x = !1;
608
608
  const O = (z) => {
609
- g && !x || G(z);
609
+ g && !x || K(z);
610
610
  }, C = (z) => {
611
611
  g && !x || W(z);
612
612
  };
613
613
  u && l && (n instanceof Storage ? Zn(u, "storage", O, { passive: !0 }) : Zn(u, Ml, C)), g ? Ha(() => {
614
- x = !0, G();
615
- }) : G();
614
+ x = !0, K();
615
+ }) : K();
616
616
  function V(z, M) {
617
617
  if (u) {
618
618
  const U = {
@@ -649,7 +649,7 @@ function kh(e, t, n, o = {}) {
649
649
  } : U;
650
650
  } else return typeof M != "string" ? M : S.read(M);
651
651
  }
652
- function G(z) {
652
+ function K(z) {
653
653
  if (!(z && z.storageArea !== n)) {
654
654
  if (z && z.key == null) {
655
655
  b.value = E;
@@ -669,7 +669,7 @@ function kh(e, t, n, o = {}) {
669
669
  }
670
670
  }
671
671
  function W(z) {
672
- G(z.detail);
672
+ K(z.detail);
673
673
  }
674
674
  return b;
675
675
  }
@@ -689,9 +689,9 @@ function xh(e = {}) {
689
689
  const C = /* @__PURE__ */ new Set(), V = /* @__PURE__ */ new Set();
690
690
  let B = null;
691
691
  if (A === "class") {
692
- const G = x.split(/\s/g);
692
+ const K = x.split(/\s/g);
693
693
  Object.values(u).flatMap((W) => (W || "").split(/\s/g)).filter(Boolean).forEach((W) => {
694
- G.includes(W) ? C.add(W) : V.add(W);
694
+ K.includes(W) ? C.add(W) : V.add(W);
695
695
  });
696
696
  } else B = {
697
697
  key: A,
@@ -700,8 +700,8 @@ function xh(e = {}) {
700
700
  if (C.size === 0 && V.size === 0 && B === null) return;
701
701
  let $;
702
702
  p && ($ = s.document.createElement("style"), $.appendChild(document.createTextNode(Sh)), s.document.head.appendChild($));
703
- for (const G of C) O.classList.add(G);
704
- for (const G of V) O.classList.remove(G);
703
+ for (const K of C) O.classList.add(K);
704
+ for (const K of V) O.classList.remove(K);
705
705
  B && O.setAttribute(B.key, B.value), p && (s.getComputedStyle($).opacity, document.head.removeChild($));
706
706
  });
707
707
  function E(_) {
@@ -1872,18 +1872,18 @@ function tv(e) {
1872
1872
  }), o = N(() => {
1873
1873
  const C = n.value?.parent || t.current.value, V = C.nodes || C?.children || [];
1874
1874
  if (V.length) {
1875
- const B = V.findIndex((G) => G.id === n.value?.id), $ = V[B - 1];
1875
+ const B = V.findIndex((K) => K.id === n.value?.id), $ = V[B - 1];
1876
1876
  return $ ? $.directives.some(
1877
- (G) => G.name === "vIf" || G.name === "vElseIf"
1877
+ (K) => K.name === "vIf" || K.name === "vElseIf"
1878
1878
  ) : !1;
1879
1879
  }
1880
1880
  return !1;
1881
1881
  }), s = N(() => {
1882
1882
  const C = n.value?.parent || t.current.value, V = C.nodes || C?.children || [];
1883
1883
  if (V.length) {
1884
- const B = V.findIndex((G) => G.id === n.value?.id), $ = V[B + 1];
1884
+ const B = V.findIndex((K) => K.id === n.value?.id), $ = V[B + 1];
1885
1885
  return $ ? $.directives.some(
1886
- (G) => G.name === "vElse" || G.name === "vElseIf"
1886
+ (K) => K.name === "vElse" || K.name === "vElseIf"
1887
1887
  ) : !1;
1888
1888
  }
1889
1889
  return !1;
@@ -2533,7 +2533,7 @@ async function Bl(e, t) {
2533
2533
  };
2534
2534
  }
2535
2535
  function aa(e) {
2536
- const t = /```vue\n([\s\S]*?)\n```/;
2536
+ const t = /```vue\r?\n([\s\S]*?)(?:\r?\n```|$)/;
2537
2537
  return e.match(t)?.[1] ?? "";
2538
2538
  }
2539
2539
  function gv(e) {
@@ -2575,25 +2575,25 @@ function mv() {
2575
2575
  postImageTopic: E,
2576
2576
  postJsonTopic: k,
2577
2577
  cancelChat: S
2578
- } = io(), _ = "CHAT_HIDE_CODE", A = t.skeleton?.getRegion("Apps").regionRef, x = D(!1), O = D(!1), C = D(!0), V = D(!1), B = fv("LLM", n), $ = D([]), G = D([]), W = D(null), z = D(null), M = D(), U = D(), I = D(!!cn.get(_, { type: "local" })), H = D(""), Y = D(), oe = N(() => G.value.some((Q) => Q.status === "Pending")), ge = N(() => Y.value ? Y.value.mode === 2 && !Y.value.invited : !0), { height: Re } = Mo(M), Fe = async (Q) => {
2579
- const K = await r(Q);
2580
- if (K && K.success) {
2581
- const X = K.data || [];
2582
- X[0] && W.value && (W.value.image && (X[0].image = b(W.value.image)), W.value.json && (X[0].json = y(W.value.json)), W.value.type && (X[0].type = W.value.type), W.value.dataType && (X[0].dataType = W.value.dataType)), G.value = K.data;
2578
+ } = io(), _ = "CHAT_HIDE_CODE", A = t.skeleton?.getRegion("Apps").regionRef, x = D(!1), O = D(!1), C = D(!0), V = D(!1), B = fv("LLM", n), $ = D([]), K = D([]), W = D(null), z = D(null), M = D(), U = D(), I = D(!!cn.get(_, { type: "local" })), H = D(""), Y = D(), oe = N(() => K.value.some((Q) => Q.status === "Pending")), ge = N(() => Y.value ? Y.value.mode === 2 && !Y.value.invited : !0), { height: Re } = Mo(M), Fe = async (Q) => {
2579
+ const G = await r(Q);
2580
+ if (G && G.success) {
2581
+ const X = G.data || [];
2582
+ X[0] && W.value && (W.value.image && (X[0].image = b(W.value.image)), W.value.json && (X[0].json = y(W.value.json)), W.value.type && (X[0].type = W.value.type), W.value.dataType && (X[0].dataType = W.value.dataType)), K.value = G.data;
2583
2583
  }
2584
2584
  }, Qe = async (Q) => {
2585
2585
  if (x.value = !1, Y.value = await u(), !Y.value || !Q || Q.id === W.value?.fileId) return;
2586
- $.value = [], G.value = [], C.value = !0;
2587
- const K = await s(Q.id).catch(() => null);
2588
- K && K.success && ($.value = K.data), $.value.length && (C.value = !1, W.value = $.value[0], await Fe(W.value.id)), x.value = !0;
2586
+ $.value = [], K.value = [], C.value = !0;
2587
+ const G = await s(Q.id).catch(() => null);
2588
+ G && G.success && ($.value = G.data), $.value.length && (C.value = !1, W.value = $.value[0], await Fe(W.value.id)), x.value = !0;
2589
2589
  }, Pe = async (Q) => {
2590
2590
  O.value = !0;
2591
- const K = await pv(Q, t), X = await o(K).catch(() => null);
2591
+ const G = await pv(Q, t), X = await o(G).catch(() => null);
2592
2592
  if (O.value = !1, X && X.success) {
2593
2593
  const { topic: ie, chat: ce } = X.data;
2594
- ce.type = ie.type, G.value = [], $.value.unshift(ie), C.value = !1, W.value = ie;
2594
+ ce.type = ie.type, K.value = [], $.value.unshift(ie), C.value = !1, W.value = ie;
2595
2595
  const Ne = ln(ce);
2596
- G.value.push(Ne), Mt(Ne, (Je) => {
2596
+ K.value.push(Ne), Mt(Ne, (Je) => {
2597
2597
  Q.auto && Zt(Je);
2598
2598
  }), await Wt(0), U.value && U.value.scrollToBottom();
2599
2599
  } else
@@ -2601,12 +2601,12 @@ function mv() {
2601
2601
  return X;
2602
2602
  }, ct = async (Q) => {
2603
2603
  O.value = !0;
2604
- const K = await Bl(Q, t), X = await E(K);
2604
+ const G = await Bl(Q, t), X = await E(G);
2605
2605
  if (O.value = !1, X && X.success) {
2606
2606
  const { topic: ie, chat: ce } = X.data;
2607
- G.value = [], $.value.unshift(ie), C.value = !1, W.value = ie, ie.image && (ce.image = b(ie.image)), ce.type = ie.type;
2607
+ K.value = [], $.value.unshift(ie), C.value = !1, W.value = ie, ie.image && (ce.image = b(ie.image)), ce.type = ie.type;
2608
2608
  const Ne = ln(ce);
2609
- G.value.push(Ne), Mt(Ne, (Je) => {
2609
+ K.value.push(Ne), Mt(Ne, (Je) => {
2610
2610
  if (Je.status === "Error" && Je.message)
2611
2611
  return ut({
2612
2612
  model: Q.model,
@@ -2620,12 +2620,12 @@ function mv() {
2620
2620
  return X;
2621
2621
  }, yt = async (Q) => {
2622
2622
  O.value = !0;
2623
- const K = await Bl(Q, t), X = await k(K);
2623
+ const G = await Bl(Q, t), X = await k(G);
2624
2624
  if (O.value = !1, X && X.success) {
2625
2625
  const { topic: ie, chat: ce } = X.data;
2626
- G.value = [], $.value.unshift(ie), C.value = !1, W.value = ie, ie.image && (ce.image = b(ie.image)), ie.json && (ce.json = y(ie.json)), ce.type = ie.type, ce.dataType = ie.dataType;
2626
+ K.value = [], $.value.unshift(ie), C.value = !1, W.value = ie, ie.image && (ce.image = b(ie.image)), ie.json && (ce.json = y(ie.json)), ce.type = ie.type, ce.dataType = ie.dataType;
2627
2627
  const Ne = ln(ce);
2628
- G.value.push(Ne), Mt(Ne, (Je) => {
2628
+ K.value.push(Ne), Mt(Ne, (Je) => {
2629
2629
  if (Je.status === "Error" && Je.message)
2630
2630
  return ut({
2631
2631
  model: Q.model,
@@ -2640,13 +2640,13 @@ function mv() {
2640
2640
  }, ut = async (Q) => {
2641
2641
  if (!W.value) return;
2642
2642
  O.value = !0;
2643
- const K = {
2643
+ const G = {
2644
2644
  topicId: W.value.id,
2645
2645
  prompt: Q.prompt
2646
- }, X = await a(K).catch(() => null);
2646
+ }, X = await a(G).catch(() => null);
2647
2647
  if (O.value = !1, X && X.success) {
2648
2648
  const ie = ln(X.data);
2649
- G.value.push(ie), Mt(ie, (ce) => {
2649
+ K.value.push(ie), Mt(ie, (ce) => {
2650
2650
  if (ce.status === "Error" && ce.message)
2651
2651
  return ut({
2652
2652
  ...Q,
@@ -2658,26 +2658,26 @@ function mv() {
2658
2658
  await Qe(null);
2659
2659
  return X;
2660
2660
  }, Tt = async (Q) => {
2661
- const K = await l(Q.id).catch(() => null);
2662
- K && K.success && ($.value = $.value.filter((X) => X.id !== Q.id), Q.id === W.value?.id && (G.value = [], W.value = null, C.value = !0));
2661
+ const G = await l(Q.id).catch(() => null);
2662
+ G && G.success && ($.value = $.value.filter((X) => X.id !== Q.id), Q.id === W.value?.id && (K.value = [], W.value = null, C.value = !0));
2663
2663
  }, Ht = async (Q) => {
2664
2664
  if (!W.value) return;
2665
- const K = W.value?.fileId, X = t.project.value?.toDsl(), { name: ie = "" } = t.current.value || {}, ce = Q.vue || aa(Q.content);
2665
+ const G = W.value?.fileId, X = t.project.value?.toDsl(), { name: ie = "" } = t.current.value || {}, ce = Q.vue || aa(Q.content);
2666
2666
  if (ce)
2667
2667
  return await t.service.parseVue(X, {
2668
- id: K,
2668
+ id: G,
2669
2669
  name: ie,
2670
2670
  source: ce
2671
2671
  });
2672
2672
  }, Xt = (Q) => {
2673
- let K = "";
2674
- return Array.isArray(Q) && (K += `页面存在以下错误,请检查并修复:
2675
- `, K += Q.join(`;
2676
- `)), K || "请检查代码是否有错误,是否符合模版和规则要求,并改正";
2673
+ let G = "";
2674
+ return Array.isArray(Q) && (G += `页面存在以下错误,请检查并修复:
2675
+ `, G += Q.join(`;
2676
+ `)), G || "请检查代码是否有错误,是否符合模版和规则要求,并改正";
2677
2677
  }, Tn = (Q) => {
2678
- const K = Q.trim();
2679
- return K.endsWith("</template>") || K.endsWith("<\/script>") || K.endsWith("</style>");
2680
- }, Mt = async (Q, K) => {
2678
+ const G = Q.trim();
2679
+ return G.endsWith("</template>") || G.endsWith("<\/script>") || G.endsWith("</style>");
2680
+ }, Mt = async (Q, G) => {
2681
2681
  H.value = "", Q.content = "", Q.reasoning = "", Q.status = "Pending", Q.reasoning = "", Q.message = "";
2682
2682
  let X = 0;
2683
2683
  const ie = Date.now();
@@ -2690,9 +2690,9 @@ function mv() {
2690
2690
  const en = fo.content || "", zn = fo.reasoning_content || "";
2691
2691
  en && (Q.content += en), zn && (Q.reasoning += zn, X += Date.now() - ie);
2692
2692
  }
2693
- if (ce?.usage && (Q.tokens = (Q.tokens || 0) + (ce.usage.total_tokens || 0)), Ne) {
2694
- if (Q.status = "Success", Q.thinking = Math.ceil(X / 1e3), zl(Q), Q.vue && !Tn(Q.vue))
2695
- return Q.status = "Failed", Q.message = "代码不完整,似乎被截断了,可能上下文已溢出,请开启新对话!", Q.dsl = null, await d(Q), K && K(Q), null;
2693
+ if (Ne) {
2694
+ if (Q.status = "Success", Q.thinking = Math.ceil(X / 1e3), ce?.usage && (Q.tokens = (Q.tokens || 0) + (ce.usage.total_tokens || 0)), zl(Q), Q.vue && !Tn(Q.vue))
2695
+ return Q.status = "Failed", Q.message = "代码不完整,似乎被截断了,可能上下文已溢出,请开启新对话!", Q.dsl = null, null;
2696
2696
  const en = await Ht(Q).catch((zn) => (Q.message = Xt(zn), Q.status = "Error", null));
2697
2697
  if (en)
2698
2698
  try {
@@ -2700,18 +2700,18 @@ function mv() {
2700
2700
  } catch (zn) {
2701
2701
  Q.dsl = null, Q.status = "Error", Q.message = Xt(zn.message);
2702
2702
  }
2703
- await d(Q), K && K(Q);
2703
+ await d(Q), G && G(Q);
2704
2704
  }
2705
2705
  },
2706
2706
  async (ce) => {
2707
2707
  const Ne = ce.message || ce.name;
2708
- Ne === "network error" ? Q.message = "网络异常,请稍后再试" : Q.message = Ne || "请求失败,请稍后再试", Q.status = "Failed", console.warn("completions error", ce), ce?.message && Ue(ce.message, "生成错误"), await d(Q), K && K(Q);
2708
+ Ne === "network error" ? Q.message = "网络异常,请稍后再试" : Q.message = Ne || "请求失败,请稍后再试", Q.status = "Failed", console.warn("completions error", ce), ce?.message && Ue(ce.message, "生成错误"), await d(Q), G && G(Q);
2709
2709
  }
2710
2710
  ), Go;
2711
2711
  }, _t = async (Q) => {
2712
2712
  if (!W.value || !z.value || !Q) return;
2713
- const K = W.value?.fileId, X = t.project.value?.toDsl(), { name: ie = "" } = t.current.value || {}, ce = await t.service.parseVue(X, {
2714
- id: K,
2713
+ const G = W.value?.fileId, X = t.project.value?.toDsl(), { name: ie = "" } = t.current.value || {}, ce = await t.service.parseVue(X, {
2714
+ id: G,
2715
2715
  name: ie,
2716
2716
  source: Q
2717
2717
  }).catch((Ne) => Ne);
@@ -2728,33 +2728,33 @@ function mv() {
2728
2728
  }, Et = () => {
2729
2729
  U.value && !C.value && U.value.scrollToBottom();
2730
2730
  }, Ho = () => {
2731
- C.value || oe.value || G.value.map((Q) => {
2731
+ C.value || oe.value || K.value.map((Q) => {
2732
2732
  Q.collapsed = !1;
2733
2733
  });
2734
2734
  }, uo = () => {
2735
- C.value || oe.value || G.value.map((Q) => {
2735
+ C.value || oe.value || K.value.map((Q) => {
2736
2736
  Q.collapsed = !0;
2737
2737
  });
2738
2738
  }, we = (Q) => {
2739
2739
  if (!oe.value)
2740
- return Mt(Q, (K) => {
2741
- t.state.autoApply && Zt(K);
2740
+ return Mt(Q, (G) => {
2741
+ t.state.autoApply && Zt(G);
2742
2742
  });
2743
- }, Zt = (Q, K) => {
2744
- Q.dsl ? t.applyAI(Q.dsl) : K && Jt("DSL不完整,无法应用到页面"), V.value = !1, z.value = null;
2743
+ }, Zt = (Q, G) => {
2744
+ Q.dsl ? t.applyAI(Q.dsl) : G && Jt("DSL不完整,无法应用到页面"), V.value = !1, z.value = null;
2745
2745
  }, dt = (Q) => {
2746
2746
  zl(Q), z.value = Q, V.value = !0;
2747
2747
  }, Be = (Q) => {
2748
2748
  if (!W.value) return;
2749
- const K = Q.message ? Q.message : "请检查代码是否有错误,是否符合模版和规则要求,并改正";
2750
- xt(K);
2749
+ const G = Q.message ? Q.message : "请检查代码是否有错误,是否符合模版和规则要求,并改正";
2750
+ xt(G);
2751
2751
  }, On = async (Q) => {
2752
2752
  if (!W.value) return;
2753
2753
  Go && typeof Go == "function" && Go(), Q.status = "Canceled";
2754
- const K = await S(Q);
2755
- K && K.data && Object.assign(Q, K.data);
2756
- }, xt = (Q, K) => {
2757
- H.value = Q, K && (C.value = K);
2754
+ const G = await S(Q);
2755
+ G && G.data && Object.assign(Q, G.data);
2756
+ }, xt = (Q, G) => {
2757
+ H.value = Q, G && (C.value = G);
2758
2758
  }, Bn = () => {
2759
2759
  C.value || (I.value = !I.value, cn.save(_, I.value, { type: "local" }));
2760
2760
  };
@@ -2766,8 +2766,8 @@ function mv() {
2766
2766
  {
2767
2767
  immediate: !0
2768
2768
  }
2769
- ), ae(t.current, (Q, K) => {
2770
- Q?.id !== K?.id && (W.value = null);
2769
+ ), ae(t.current, (Q, G) => {
2770
+ Q?.id !== G?.id && (W.value = null);
2771
2771
  }), ae(Re, () => {
2772
2772
  U.value && oe.value && U.value.autoScrollToBottom();
2773
2773
  }), {
@@ -2780,7 +2780,7 @@ function mv() {
2780
2780
  models: B,
2781
2781
  onPostTopic: Pe,
2782
2782
  topics: $,
2783
- chats: G,
2783
+ chats: K,
2784
2784
  currentTopic: W,
2785
2785
  onPostChat: ut,
2786
2786
  loadChats: Fe,
@@ -3282,11 +3282,11 @@ function Yv(e, t) {
3282
3282
  async function b(C, V, B, $) {
3283
3283
  if (u)
3284
3284
  throw new Error(`[birpc] rpc is closed, cannot call "${C}"`);
3285
- const G = { m: C, a: V, t: $l };
3286
- $ && (G.o = !0);
3285
+ const K = { m: C, a: V, t: $l };
3286
+ $ && (K.o = !0);
3287
3287
  const W = async (oe) => n(a(oe));
3288
3288
  if (B) {
3289
- await W(G);
3289
+ await W(K);
3290
3290
  return;
3291
3291
  }
3292
3292
  if (m)
@@ -3297,9 +3297,9 @@ function Yv(e, t) {
3297
3297
  }
3298
3298
  let { promise: z, resolve: M, reject: U } = eb();
3299
3299
  const I = nb();
3300
- G.i = I;
3300
+ K.i = I;
3301
3301
  let H;
3302
- async function Y(oe = G) {
3302
+ async function Y(oe = K) {
3303
3303
  return p >= 0 && (H = Qv(() => {
3304
3304
  try {
3305
3305
  if (t.onTimeoutError?.call(g, C, V) !== !0)
@@ -3311,7 +3311,7 @@ function Yv(e, t) {
3311
3311
  }, p), typeof H == "object" && (H = H.unref?.())), f.set(I, { resolve: M, reject: U, timeoutId: H, method: C }), await W(oe), z;
3312
3312
  }
3313
3313
  try {
3314
- t.onRequest ? await t.onRequest.call(g, G, Y, M) : await Y();
3314
+ t.onRequest ? await t.onRequest.call(g, K, Y, M) : await Y();
3315
3315
  } catch (oe) {
3316
3316
  if (t.onGeneralError?.call(g, oe) !== !0)
3317
3317
  throw oe;
@@ -3342,10 +3342,10 @@ function Yv(e, t) {
3342
3342
  return _[V];
3343
3343
  if (V === "then" && !r.includes("then") && !("then" in e))
3344
3344
  return;
3345
- const B = (...G) => b(V, G, !0);
3345
+ const B = (...K) => b(V, K, !0);
3346
3346
  if (r.includes(V))
3347
3347
  return B.asEvent = B, B;
3348
- const $ = (...G) => b(V, G, !1);
3348
+ const $ = (...K) => b(V, K, !1);
3349
3349
  return $.asEvent = B, $;
3350
3350
  }
3351
3351
  });
@@ -3358,7 +3358,7 @@ function Yv(e, t) {
3358
3358
  }), f.clear(), s(O);
3359
3359
  }
3360
3360
  function x(C) {
3361
- const B = Array.from(f.values()).map(({ method: $, reject: G }) => C ? C({ method: $, reject: G }) : G(new Error(`[birpc]: rejected pending call "${$}".`)));
3361
+ const B = Array.from(f.values()).map(({ method: $, reject: K }) => C ? C({ method: $, reject: K }) : K(new Error(`[birpc]: rejected pending call "${$}".`)));
3362
3362
  return f.clear(), B;
3363
3363
  }
3364
3364
  async function O(C, ...V) {
@@ -3371,38 +3371,38 @@ function Yv(e, t) {
3371
3371
  return;
3372
3372
  }
3373
3373
  if (B.t === $l) {
3374
- const { m: $, a: G, o: W } = B;
3374
+ const { m: $, a: K, o: W } = B;
3375
3375
  let z, M, U = await (c ? c.call(g, $, e[$]) : e[$]);
3376
3376
  if (W && (U || (U = () => {
3377
3377
  })), !U)
3378
3378
  M = new Error(`[birpc] function "${$}" not found`);
3379
3379
  else
3380
3380
  try {
3381
- z = await U.apply(d === "rpc" ? g : e, G);
3381
+ z = await U.apply(d === "rpc" ? g : e, K);
3382
3382
  } catch (I) {
3383
3383
  M = I;
3384
3384
  }
3385
3385
  if (B.i) {
3386
- if (M && t.onError && t.onError.call(g, M, $, G), M && t.onFunctionError && t.onFunctionError.call(g, M, $, G) === !0)
3386
+ if (M && t.onError && t.onError.call(g, M, $, K), M && t.onFunctionError && t.onFunctionError.call(g, M, $, K) === !0)
3387
3387
  return;
3388
3388
  if (!M)
3389
3389
  try {
3390
3390
  await n(a({ t: Hl, i: B.i, r: z }), ...V);
3391
3391
  return;
3392
3392
  } catch (I) {
3393
- if (M = I, t.onGeneralError?.call(g, I, $, G) !== !0)
3393
+ if (M = I, t.onGeneralError?.call(g, I, $, K) !== !0)
3394
3394
  throw I;
3395
3395
  }
3396
3396
  try {
3397
3397
  await n(a({ t: Hl, i: B.i, e: M }), ...V);
3398
3398
  } catch (I) {
3399
- if (t.onGeneralError?.call(g, I, $, G) !== !0)
3399
+ if (t.onGeneralError?.call(g, I, $, K) !== !0)
3400
3400
  throw I;
3401
3401
  }
3402
3402
  }
3403
3403
  } else {
3404
- const { i: $, r: G, e: W } = B, z = f.get($);
3405
- z && (Jl(z.timeoutId), W ? z.reject(W) : z.resolve(G)), f.delete($);
3404
+ const { i: $, r: K, e: W } = B, z = f.get($);
3405
+ z && (Jl(z.timeoutId), W ? z.reject(W) : z.resolve(K)), f.delete($);
3406
3406
  }
3407
3407
  }
3408
3408
  return m = o(O), g;
@@ -6554,10 +6554,10 @@ var By = /* @__PURE__ */ ru({ "../../node_modules/.pnpm/speakingurl@14.0.1/node_
6554
6554
  "(",
6555
6555
  ")"
6556
6556
  ].join(""), u = function(y, E) {
6557
- var k = "-", S = "", _ = "", A = !0, x = {}, O, C, V, B, $, G, W, z, M, U, I, H, Y, oe, ge = "";
6557
+ var k = "-", S = "", _ = "", A = !0, x = {}, O, C, V, B, $, K, W, z, M, U, I, H, Y, oe, ge = "";
6558
6558
  if (typeof y != "string") return "";
6559
6559
  if (typeof E == "string" && (k = E), W = l.en, z = a.en, typeof E == "object") {
6560
- O = E.maintainCase || !1, x = E.custom && typeof E.custom == "object" ? E.custom : x, V = +E.truncate > 1 && E.truncate || !1, B = E.uric || !1, $ = E.uricNoSlash || !1, G = E.mark || !1, A = !(E.symbols === !1 || E.lang === !1), k = E.separator || k, B && (ge += c), $ && (ge += d), G && (ge += p), W = E.lang && l[E.lang] && A ? l[E.lang] : A ? l.en : {}, z = E.lang && a[E.lang] ? a[E.lang] : E.lang === !1 || E.lang === !0 ? {} : a.en, E.titleCase && typeof E.titleCase.length == "number" && Array.prototype.toString.call(E.titleCase) ? (E.titleCase.forEach(function(Re) {
6560
+ O = E.maintainCase || !1, x = E.custom && typeof E.custom == "object" ? E.custom : x, V = +E.truncate > 1 && E.truncate || !1, B = E.uric || !1, $ = E.uricNoSlash || !1, K = E.mark || !1, A = !(E.symbols === !1 || E.lang === !1), k = E.separator || k, B && (ge += c), $ && (ge += d), K && (ge += p), W = E.lang && l[E.lang] && A ? l[E.lang] : A ? l.en : {}, z = E.lang && a[E.lang] ? a[E.lang] : E.lang === !1 || E.lang === !0 ? {} : a.en, E.titleCase && typeof E.titleCase.length == "number" && Array.prototype.toString.call(E.titleCase) ? (E.titleCase.forEach(function(Re) {
6561
6561
  x[Re + ""] = Re + "";
6562
6562
  }), C = !0) : C = !!E.titleCase, E.custom && typeof E.custom.length == "number" && Array.prototype.toString.call(E.custom) && E.custom.forEach(function(Re) {
6563
6563
  x[Re + ""] = Re + "";
@@ -8927,7 +8927,7 @@ const Pw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
8927
8927
  ]));
8928
8928
  }
8929
8929
  }), Xe = uf({
8930
- loader: () => import("./Editor-DwuVqP5B.js"),
8930
+ loader: () => import("./Editor-BmWmIkUa.js"),
8931
8931
  loadingComponent: J({
8932
8932
  render() {
8933
8933
  return no("div", "正在拼命加载...");
@@ -10023,8 +10023,8 @@ const Pw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
10023
10023
  background: "",
10024
10024
  actions: ["copy"],
10025
10025
  small: "",
10026
- onClick: (G) => x($),
10027
- onAction: (G) => O($)
10026
+ onClick: (K) => x($),
10027
+ onAction: (K) => O($)
10028
10028
  }, null, 8, ["title", "onClick", "onAction"]))), 256))
10029
10029
  ]))), 256)),
10030
10030
  i(s).length ? L("", !0) : (h(), T(i(ot), { key: 0 }))
@@ -10624,7 +10624,7 @@ const Pw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
10624
10624
  }, $ = async (W) => {
10625
10625
  const z = Nf(W), M = await o.assets.getBlockMaterial(z, W.name), U = o.skeleton?.getWidget("Designer")?.widgetRef?.designer;
10626
10626
  U && M && U.setDragging(M);
10627
- }, G = () => {
10627
+ }, K = () => {
10628
10628
  const W = o.skeleton?.getWidget("Designer")?.widgetRef?.designer;
10629
10629
  W && W.setDragging(null);
10630
10630
  };
@@ -10679,7 +10679,7 @@ const Pw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
10679
10679
  onClick: (H) => B(I),
10680
10680
  draggable: i(m)?.id !== I.id,
10681
10681
  onDragstart: (H) => $(I),
10682
- onDragend: G
10682
+ onDragend: K
10683
10683
  }, null, 8, ["name", "title", "active", "editable", "tag", "tagType", "onEdit", "onCopy", "onRemove", "onClick", "draggable", "onDragstart"])
10684
10684
  ]),
10685
10685
  _: 2
@@ -10892,18 +10892,18 @@ const Pw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
10892
10892
  const C = {};
10893
10893
  if (!x.some(($) => $.slot)) return c(x);
10894
10894
  for (const $ of x) {
10895
- const G = $.slot?.name || "default";
10896
- C[G] || (C[G] = []), C[G].push($);
10895
+ const K = $.slot?.name || "default";
10896
+ C[K] || (C[K] = []), C[K].push($);
10897
10897
  }
10898
10898
  const B = [];
10899
- for (const [$, G] of Object.entries(C))
10899
+ for (const [$, K] of Object.entries(C))
10900
10900
  B.push({
10901
10901
  id: `${O.id}-${$}`,
10902
10902
  label: `#${$}`,
10903
10903
  type: "slot",
10904
10904
  model: O,
10905
10905
  disabled: !0,
10906
- children: c(G)
10906
+ children: c(K)
10907
10907
  });
10908
10908
  return B;
10909
10909
  }, c = (x) => {
@@ -10947,14 +10947,14 @@ const Pw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
10947
10947
  next: "bottom",
10948
10948
  inner: "inner"
10949
10949
  }[C];
10950
- let G = !1;
10950
+ let K = !1;
10951
10951
  if (it(V.model))
10952
- G = C === "inner", n.value?.setDropping(G ? V.model : null, "inner");
10952
+ K = C === "inner", n.value?.setDropping(K ? V.model : null, "inner");
10953
10953
  else {
10954
10954
  const W = V.model;
10955
- G = !!await n.value?.allowDrop(W, $), n.value?.setDropping(G ? W : null, "inner");
10955
+ K = !!await n.value?.allowDrop(W, $), n.value?.setDropping(K ? W : null, "inner");
10956
10956
  }
10957
- return G;
10957
+ return K;
10958
10958
  }, g = (x) => {
10959
10959
  const O = x?.model;
10960
10960
  if (!O || O.invisible || x.type === "slot") {
@@ -10969,10 +10969,10 @@ const Pw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
10969
10969
  delete M.slot, s.value?.move(M, void 0, "inner"), n.value?.setDropping(null), n.value?.setDragging(null);
10970
10970
  return;
10971
10971
  }
10972
- const $ = B.model, G = { before: "left", after: "right" }[C] || "inner";
10972
+ const $ = B.model, K = { before: "left", after: "right" }[C] || "inner";
10973
10973
  if (!await n.value?.allowDrop(
10974
10974
  $,
10975
- G
10975
+ K
10976
10976
  )) {
10977
10977
  n.value?.setDropping(null), p(), St.warning({
10978
10978
  message: `${V.model.name}不能放置到该位置`
@@ -10984,7 +10984,7 @@ const Pw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
10984
10984
  );
10985
10985
  if (z !== null) {
10986
10986
  const M = V.model;
10987
- M.slot = z, s.value?.move(M, $, G);
10987
+ M.slot = z, s.value?.move(M, $, K);
10988
10988
  } else
10989
10989
  p();
10990
10990
  n.value?.setDropping(null), n.value?.setDragging(null), t.simulator.refresh();
@@ -11421,18 +11421,18 @@ var sd = { exports: {} };
11421
11421
  else if (E) {
11422
11422
  var $ = u + y - O;
11423
11423
  if ($ >= 0 && $ < f && g[$] != -1) {
11424
- var G = c - g[$];
11425
- if (V >= G)
11424
+ var K = c - g[$];
11425
+ if (V >= K)
11426
11426
  return this.diff_bisectSplit_(r, a, V, B, l);
11427
11427
  }
11428
11428
  }
11429
11429
  }
11430
11430
  for (var W = -x + _; W <= x - A; W += 2) {
11431
- var $ = u + W, G;
11432
- W == -x || W != x && g[$ - 1] < g[$ + 1] ? G = g[$ + 1] : G = g[$ - 1] + 1;
11433
- for (var z = G - W; G < c && z < d && r.charAt(c - G - 1) == a.charAt(d - z - 1); )
11434
- G++, z++;
11435
- if (g[$] = G, G > c)
11431
+ var $ = u + W, K;
11432
+ W == -x || W != x && g[$ - 1] < g[$ + 1] ? K = g[$ + 1] : K = g[$ - 1] + 1;
11433
+ for (var z = K - W; K < c && z < d && r.charAt(c - K - 1) == a.charAt(d - z - 1); )
11434
+ K++, z++;
11435
+ if (g[$] = K, K > c)
11436
11436
  A += 2;
11437
11437
  else if (z > d)
11438
11438
  _ += 2;
@@ -11440,7 +11440,7 @@ var sd = { exports: {} };
11440
11440
  var C = u + y - W;
11441
11441
  if (C >= 0 && C < f && m[C] != -1) {
11442
11442
  var V = m[C], B = u + V - C;
11443
- if (G = c - G, V >= G)
11443
+ if (K = c - K, V >= K)
11444
11444
  return this.diff_bisectSplit_(r, a, V, B, l);
11445
11445
  }
11446
11446
  }
@@ -11509,7 +11509,7 @@ var sd = { exports: {} };
11509
11509
  return null;
11510
11510
  var d = this;
11511
11511
  function p(S, _, A) {
11512
- for (var x = S.substring(A, A + Math.floor(S.length / 4)), O = -1, C = "", V, B, $, G; (O = _.indexOf(x, O + 1)) != -1; ) {
11512
+ for (var x = S.substring(A, A + Math.floor(S.length / 4)), O = -1, C = "", V, B, $, K; (O = _.indexOf(x, O + 1)) != -1; ) {
11513
11513
  var W = d.diff_commonPrefix(
11514
11514
  S.substring(A),
11515
11515
  _.substring(O)
@@ -11517,13 +11517,13 @@ var sd = { exports: {} };
11517
11517
  S.substring(0, A),
11518
11518
  _.substring(0, O)
11519
11519
  );
11520
- C.length < z + W && (C = _.substring(O - z, O) + _.substring(O, O + W), V = S.substring(0, A - z), B = S.substring(A + W), $ = _.substring(0, O - z), G = _.substring(O + W));
11520
+ C.length < z + W && (C = _.substring(O - z, O) + _.substring(O, O + W), V = S.substring(0, A - z), B = S.substring(A + W), $ = _.substring(0, O - z), K = _.substring(O + W));
11521
11521
  }
11522
11522
  return C.length * 2 >= S.length ? [
11523
11523
  V,
11524
11524
  B,
11525
11525
  $,
11526
- G,
11526
+ K,
11527
11527
  C
11528
11528
  ] : null;
11529
11529
  }
@@ -11570,8 +11570,8 @@ var sd = { exports: {} };
11570
11570
  function a(k, S) {
11571
11571
  if (!k || !S)
11572
11572
  return 6;
11573
- var _ = k.charAt(k.length - 1), A = S.charAt(0), x = _.match(t.nonAlphaNumericRegex_), O = A.match(t.nonAlphaNumericRegex_), C = x && _.match(t.whitespaceRegex_), V = O && A.match(t.whitespaceRegex_), B = C && _.match(t.linebreakRegex_), $ = V && A.match(t.linebreakRegex_), G = B && k.match(t.blanklineEndRegex_), W = $ && S.match(t.blanklineStartRegex_);
11574
- return G || W ? 5 : B || $ ? 4 : x && !C && V ? 3 : C || V ? 2 : x || O ? 1 : 0;
11573
+ var _ = k.charAt(k.length - 1), A = S.charAt(0), x = _.match(t.nonAlphaNumericRegex_), O = A.match(t.nonAlphaNumericRegex_), C = x && _.match(t.whitespaceRegex_), V = O && A.match(t.whitespaceRegex_), B = C && _.match(t.linebreakRegex_), $ = V && A.match(t.linebreakRegex_), K = B && k.match(t.blanklineEndRegex_), W = $ && S.match(t.blanklineStartRegex_);
11574
+ return K || W ? 5 : B || $ ? 4 : x && !C && V ? 3 : C || V ? 2 : x || O ? 1 : 0;
11575
11575
  }
11576
11576
  for (var l = 1; l < r.length - 1; ) {
11577
11577
  if (r[l - 1][0] == s && r[l + 1][0] == s) {
@@ -11722,8 +11722,8 @@ var sd = { exports: {} };
11722
11722
  throw new Error("Pattern too long for this browser.");
11723
11723
  var c = this.match_alphabet_(a), d = this;
11724
11724
  function p(V, B) {
11725
- var $ = V / a.length, G = Math.abs(l - B);
11726
- return d.Match_Distance ? $ + G / d.Match_Distance : G ? 1 : $;
11725
+ var $ = V / a.length, K = Math.abs(l - B);
11726
+ return d.Match_Distance ? $ + K / d.Match_Distance : K ? 1 : $;
11727
11727
  }
11728
11728
  var u = this.Match_Threshold, f = r.indexOf(a, l);
11729
11729
  f != -1 && (u = Math.min(p(0, f), u), f = r.lastIndexOf(a, l + a.length), f != -1 && (u = Math.min(p(0, f), u)));
@@ -12652,19 +12652,19 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ge = I, oe = H), Y ==
12652
12652
  }
12653
12653
  function u(I, H, Y, oe) {
12654
12654
  const ge = /* @__PURE__ */ Object.create(null);
12655
- function Re(K, X) {
12656
- return K.keywords[X];
12655
+ function Re(G, X) {
12656
+ return G.keywords[X];
12657
12657
  }
12658
12658
  function Fe() {
12659
12659
  if (!we.keywords) {
12660
12660
  dt.addText(Be);
12661
12661
  return;
12662
12662
  }
12663
- let K = 0;
12663
+ let G = 0;
12664
12664
  we.keywordPatternRe.lastIndex = 0;
12665
12665
  let X = we.keywordPatternRe.exec(Be), ie = "";
12666
12666
  for (; X; ) {
12667
- ie += Be.substring(K, X.index);
12667
+ ie += Be.substring(G, X.index);
12668
12668
  const ce = Et.case_insensitive ? X[0].toLowerCase() : X[0], Ne = Re(we, ce);
12669
12669
  if (Ne) {
12670
12670
  const [Je, fo] = Ne;
@@ -12676,92 +12676,92 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ge = I, oe = H), Y ==
12676
12676
  }
12677
12677
  } else
12678
12678
  ie += X[0];
12679
- K = we.keywordPatternRe.lastIndex, X = we.keywordPatternRe.exec(Be);
12679
+ G = we.keywordPatternRe.lastIndex, X = we.keywordPatternRe.exec(Be);
12680
12680
  }
12681
- ie += Be.substring(K), dt.addText(ie);
12681
+ ie += Be.substring(G), dt.addText(ie);
12682
12682
  }
12683
12683
  function Qe() {
12684
12684
  if (Be === "") return;
12685
- let K = null;
12685
+ let G = null;
12686
12686
  if (typeof we.subLanguage == "string") {
12687
12687
  if (!t[we.subLanguage]) {
12688
12688
  dt.addText(Be);
12689
12689
  return;
12690
12690
  }
12691
- K = u(we.subLanguage, Be, !0, Zt[we.subLanguage]), Zt[we.subLanguage] = /** @type {CompiledMode} */
12692
- K._top;
12691
+ G = u(we.subLanguage, Be, !0, Zt[we.subLanguage]), Zt[we.subLanguage] = /** @type {CompiledMode} */
12692
+ G._top;
12693
12693
  } else
12694
- K = m(Be, we.subLanguage.length ? we.subLanguage : null);
12695
- we.relevance > 0 && (On += K.relevance), dt.__addSublanguage(K._emitter, K.language);
12694
+ G = m(Be, we.subLanguage.length ? we.subLanguage : null);
12695
+ we.relevance > 0 && (On += G.relevance), dt.__addSublanguage(G._emitter, G.language);
12696
12696
  }
12697
12697
  function Pe() {
12698
12698
  we.subLanguage != null ? Qe() : Fe(), Be = "";
12699
12699
  }
12700
- function ct(K, X) {
12701
- K !== "" && (dt.startScope(X), dt.addText(K), dt.endScope());
12700
+ function ct(G, X) {
12701
+ G !== "" && (dt.startScope(X), dt.addText(G), dt.endScope());
12702
12702
  }
12703
- function yt(K, X) {
12703
+ function yt(G, X) {
12704
12704
  let ie = 1;
12705
12705
  const ce = X.length - 1;
12706
12706
  for (; ie <= ce; ) {
12707
- if (!K._emit[ie]) {
12707
+ if (!G._emit[ie]) {
12708
12708
  ie++;
12709
12709
  continue;
12710
12710
  }
12711
- const Ne = Et.classNameAliases[K[ie]] || K[ie], Je = X[ie];
12711
+ const Ne = Et.classNameAliases[G[ie]] || G[ie], Je = X[ie];
12712
12712
  Ne ? ct(Je, Ne) : (Be = Je, Fe(), Be = ""), ie++;
12713
12713
  }
12714
12714
  }
12715
- function ut(K, X) {
12716
- return K.scope && typeof K.scope == "string" && dt.openNode(Et.classNameAliases[K.scope] || K.scope), K.beginScope && (K.beginScope._wrap ? (ct(Be, Et.classNameAliases[K.beginScope._wrap] || K.beginScope._wrap), Be = "") : K.beginScope._multi && (yt(K.beginScope, X), Be = "")), we = Object.create(K, { parent: { value: we } }), we;
12715
+ function ut(G, X) {
12716
+ return G.scope && typeof G.scope == "string" && dt.openNode(Et.classNameAliases[G.scope] || G.scope), G.beginScope && (G.beginScope._wrap ? (ct(Be, Et.classNameAliases[G.beginScope._wrap] || G.beginScope._wrap), Be = "") : G.beginScope._multi && (yt(G.beginScope, X), Be = "")), we = Object.create(G, { parent: { value: we } }), we;
12717
12717
  }
12718
- function Tt(K, X, ie) {
12719
- let ce = Q0(K.endRe, ie);
12718
+ function Tt(G, X, ie) {
12719
+ let ce = Q0(G.endRe, ie);
12720
12720
  if (ce) {
12721
- if (K["on:end"]) {
12722
- const Ne = new gi(K);
12723
- K["on:end"](X, Ne), Ne.isMatchIgnored && (ce = !1);
12721
+ if (G["on:end"]) {
12722
+ const Ne = new gi(G);
12723
+ G["on:end"](X, Ne), Ne.isMatchIgnored && (ce = !1);
12724
12724
  }
12725
12725
  if (ce) {
12726
- for (; K.endsParent && K.parent; )
12727
- K = K.parent;
12728
- return K;
12726
+ for (; G.endsParent && G.parent; )
12727
+ G = G.parent;
12728
+ return G;
12729
12729
  }
12730
12730
  }
12731
- if (K.endsWithParent)
12732
- return Tt(K.parent, X, ie);
12731
+ if (G.endsWithParent)
12732
+ return Tt(G.parent, X, ie);
12733
12733
  }
12734
- function Ht(K) {
12735
- return we.matcher.regexIndex === 0 ? (Be += K[0], 1) : (Q = !0, 0);
12734
+ function Ht(G) {
12735
+ return we.matcher.regexIndex === 0 ? (Be += G[0], 1) : (Q = !0, 0);
12736
12736
  }
12737
- function Xt(K) {
12738
- const X = K[0], ie = K.rule, ce = new gi(ie), Ne = [ie.__beforeBegin, ie["on:begin"]];
12737
+ function Xt(G) {
12738
+ const X = G[0], ie = G.rule, ce = new gi(ie), Ne = [ie.__beforeBegin, ie["on:begin"]];
12739
12739
  for (const Je of Ne)
12740
- if (Je && (Je(K, ce), ce.isMatchIgnored))
12740
+ if (Je && (Je(G, ce), ce.isMatchIgnored))
12741
12741
  return Ht(X);
12742
- return ie.skip ? Be += X : (ie.excludeBegin && (Be += X), Pe(), !ie.returnBegin && !ie.excludeBegin && (Be = X)), ut(ie, K), ie.returnBegin ? 0 : X.length;
12742
+ return ie.skip ? Be += X : (ie.excludeBegin && (Be += X), Pe(), !ie.returnBegin && !ie.excludeBegin && (Be = X)), ut(ie, G), ie.returnBegin ? 0 : X.length;
12743
12743
  }
12744
- function Tn(K) {
12745
- const X = K[0], ie = H.substring(K.index), ce = Tt(we, K, ie);
12744
+ function Tn(G) {
12745
+ const X = G[0], ie = H.substring(G.index), ce = Tt(we, G, ie);
12746
12746
  if (!ce)
12747
12747
  return _i;
12748
12748
  const Ne = we;
12749
- we.endScope && we.endScope._wrap ? (Pe(), ct(X, we.endScope._wrap)) : we.endScope && we.endScope._multi ? (Pe(), yt(we.endScope, K)) : Ne.skip ? Be += X : (Ne.returnEnd || Ne.excludeEnd || (Be += X), Pe(), Ne.excludeEnd && (Be = X));
12749
+ we.endScope && we.endScope._wrap ? (Pe(), ct(X, we.endScope._wrap)) : we.endScope && we.endScope._multi ? (Pe(), yt(we.endScope, G)) : Ne.skip ? Be += X : (Ne.returnEnd || Ne.excludeEnd || (Be += X), Pe(), Ne.excludeEnd && (Be = X));
12750
12750
  do
12751
12751
  we.scope && dt.closeNode(), !we.skip && !we.subLanguage && (On += we.relevance), we = we.parent;
12752
12752
  while (we !== ce.parent);
12753
- return ce.starts && ut(ce.starts, K), Ne.returnEnd ? 0 : X.length;
12753
+ return ce.starts && ut(ce.starts, G), Ne.returnEnd ? 0 : X.length;
12754
12754
  }
12755
12755
  function Mt() {
12756
- const K = [];
12756
+ const G = [];
12757
12757
  for (let X = we; X !== Et; X = X.parent)
12758
- X.scope && K.unshift(X.scope);
12759
- K.forEach((X) => dt.openNode(X));
12758
+ X.scope && G.unshift(X.scope);
12759
+ G.forEach((X) => dt.openNode(X));
12760
12760
  }
12761
12761
  let _t = {};
12762
- function wt(K, X) {
12762
+ function wt(G, X) {
12763
12763
  const ie = X && X[0];
12764
- if (Be += K, ie == null)
12764
+ if (Be += G, ie == null)
12765
12765
  return Pe(), 0;
12766
12766
  if (_t.type === "begin" && X.type === "end" && _t.index === X.index && ie === "") {
12767
12767
  if (Be += H.slice(X.index, X.index + 1), !s) {
@@ -12800,10 +12800,10 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ge = I, oe = H), Y ==
12800
12800
  else {
12801
12801
  for (we.matcher.considerAll(); ; ) {
12802
12802
  Bn++, Q ? Q = !1 : we.matcher.considerAll(), we.matcher.lastIndex = xt;
12803
- const K = we.matcher.exec(H);
12804
- if (!K) break;
12805
- const X = H.substring(xt, K.index), ie = wt(X, K);
12806
- xt = K.index + ie;
12803
+ const G = we.matcher.exec(H);
12804
+ if (!G) break;
12805
+ const X = H.substring(xt, G.index), ie = wt(X, G);
12806
+ xt = G.index + ie;
12807
12807
  }
12808
12808
  wt(H.substring(xt));
12809
12809
  }
@@ -12815,18 +12815,18 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ge = I, oe = H), Y ==
12815
12815
  _emitter: dt,
12816
12816
  _top: we
12817
12817
  };
12818
- } catch (K) {
12819
- if (K.message && K.message.includes("Illegal"))
12818
+ } catch (G) {
12819
+ if (G.message && G.message.includes("Illegal"))
12820
12820
  return {
12821
12821
  language: I,
12822
12822
  value: qs(H),
12823
12823
  illegal: !0,
12824
12824
  relevance: 0,
12825
12825
  _illegalBy: {
12826
- message: K.message,
12826
+ message: G.message,
12827
12827
  index: xt,
12828
12828
  context: H.slice(xt - 100, xt + 100),
12829
- mode: K.mode,
12829
+ mode: G.mode,
12830
12830
  resultSoFar: uo
12831
12831
  },
12832
12832
  _emitter: dt
@@ -12837,11 +12837,11 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ge = I, oe = H), Y ==
12837
12837
  value: qs(H),
12838
12838
  illegal: !1,
12839
12839
  relevance: 0,
12840
- errorRaised: K,
12840
+ errorRaised: G,
12841
12841
  _emitter: dt,
12842
12842
  _top: we
12843
12843
  };
12844
- throw K;
12844
+ throw G;
12845
12845
  }
12846
12846
  }
12847
12847
  function f(I) {
@@ -12958,7 +12958,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ge = I, oe = H), Y ==
12958
12958
  const H = V(I);
12959
12959
  return H && !H.disableAutodetect;
12960
12960
  }
12961
- function G(I) {
12961
+ function K(I) {
12962
12962
  I["before:highlightBlock"] && !I["before:highlightElement"] && (I["before:highlightElement"] = (H) => {
12963
12963
  I["before:highlightBlock"](
12964
12964
  Object.assign({ block: H.el }, H)
@@ -12970,7 +12970,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ge = I, oe = H), Y ==
12970
12970
  });
12971
12971
  }
12972
12972
  function W(I) {
12973
- G(I), o.push(I);
12973
+ K(I), o.push(I);
12974
12974
  }
12975
12975
  function z(I) {
12976
12976
  const H = o.indexOf(I);
@@ -13679,7 +13679,7 @@ function BE(e) {
13679
13679
  function $(I) {
13680
13680
  return t.concat("(?!", I.join("|"), ")");
13681
13681
  }
13682
- const G = {
13682
+ const K = {
13683
13683
  match: t.concat(
13684
13684
  /\b/,
13685
13685
  $([
@@ -13882,7 +13882,7 @@ function BE(e) {
13882
13882
  className: { 1: "title.function" },
13883
13883
  contains: [A]
13884
13884
  },
13885
- G,
13885
+ K,
13886
13886
  B,
13887
13887
  x,
13888
13888
  z,
@@ -15823,8 +15823,8 @@ function qE(e, t, n = "plaintext", o = "word", s = !1, r = 10, a) {
15823
15823
  if (_ === void 0) {
15824
15824
  for (const V of O) {
15825
15825
  let B = l(), $ = l();
15826
- const G = on(n, V);
15827
- A === ue.EQUAL && (u++, f++, B = c(ue.EQUAL, u, G), $ = c(ue.EQUAL, f, G)), A === ue.DELETE && (u++, B = c(ue.DELETE, u, G), $ = l()), A === ue.ADD && (f++, B = l(), $ = c(ue.ADD, f, G)), g.push({ left: B, right: $ });
15826
+ const K = on(n, V);
15827
+ A === ue.EQUAL && (u++, f++, B = c(ue.EQUAL, u, K), $ = c(ue.EQUAL, f, K)), A === ue.DELETE && (u++, B = c(ue.DELETE, u, K), $ = l()), A === ue.ADD && (f++, B = l(), $ = c(ue.ADD, f, K)), g.push({ left: B, right: $ });
15828
15828
  }
15829
15829
  break;
15830
15830
  }
@@ -15851,7 +15851,7 @@ function qE(e, t, n = "plaintext", o = "word", s = !1, r = 10, a) {
15851
15851
  const V = Math.max(S.count, _.count);
15852
15852
  for (let B = 0; B < V; B++) {
15853
15853
  B < S.count && u++, B < _.count && f++;
15854
- const [$, G] = [O[B], C[B]], W = s || O.length === C.length, z = W ? is(G, $, o) : $, M = W ? is($, G, o) : G, U = p != null && p.test($) ? ue.EQUAL : ue.DELETE, I = p != null && p.test(G) ? ue.EQUAL : ue.ADD, H = B < S.count ? c(U, u, on(n, z)) : l(), Y = B < _.count ? c(I, f, on(n, M)) : l();
15854
+ const [$, K] = [O[B], C[B]], W = s || O.length === C.length, z = W ? is(K, $, o) : $, M = W ? is($, K, o) : K, U = p != null && p.test($) ? ue.EQUAL : ue.DELETE, I = p != null && p.test(K) ? ue.EQUAL : ue.ADD, H = B < S.count ? c(U, u, on(n, z)) : l(), Y = B < _.count ? c(I, f, on(n, M)) : l();
15855
15855
  g.push({ left: H, right: Y });
15856
15856
  }
15857
15857
  }
@@ -17511,9 +17511,9 @@ const Si = /* @__PURE__ */ Sd(w1, [["render", x1]]), C1 = ["theme"], A1 = {
17511
17511
  E,
17512
17512
  k
17513
17513
  ), C = ($) => {
17514
- const G = $.type, W = $.model;
17514
+ const K = $.type, W = $.model;
17515
17515
  if (u.value)
17516
- switch (G) {
17516
+ switch (K) {
17517
17517
  case "remove":
17518
17518
  u.value.removeNode(W), S.value?.setSelected(null);
17519
17519
  break;
@@ -17546,8 +17546,8 @@ const Si = /* @__PURE__ */ Sd(w1, [["render", x1]]), C1 = ["theme"], A1 = {
17546
17546
  }
17547
17547
  }, V = ($) => {
17548
17548
  if ($ && S.value) {
17549
- const G = c.assets.componentMap.get($.name);
17550
- G && S.value.setDragging(G), S.value.setDraggingNode($);
17549
+ const K = c.assets.componentMap.get($.name);
17550
+ K && S.value.setDragging(K), S.value.setDraggingNode($);
17551
17551
  }
17552
17552
  }, B = () => {
17553
17553
  S.value && (S.value.setDraggingNode(null), S.value.setDragging(null));
@@ -17555,7 +17555,7 @@ const Si = /* @__PURE__ */ Sd(w1, [["render", x1]]), C1 = ["theme"], A1 = {
17555
17555
  return t({
17556
17556
  designer: S,
17557
17557
  mode: m
17558
- }), ($, G) => (h(), j("div", {
17558
+ }), ($, K) => (h(), j("div", {
17559
17559
  ref_key: "container",
17560
17560
  ref: n,
17561
17561
  class: "v-designer"
@@ -19044,7 +19044,7 @@ const Si = /* @__PURE__ */ Sd(w1, [["render", x1]]), C1 = ["theme"], A1 = {
19044
19044
  b.value = void 0, g.value = !0;
19045
19045
  }, $ = (z) => {
19046
19046
  b.value = z, g.value = !0;
19047
- }, G = (z) => {
19047
+ }, K = (z) => {
19048
19048
  const { name: M, modelValue: U } = z;
19049
19049
  M === "edit" && $(U), M === "remove" && t.value?.removeInject(U);
19050
19050
  }, W = (z) => {
@@ -19168,7 +19168,7 @@ const Si = /* @__PURE__ */ Sd(w1, [["render", x1]]), C1 = ["theme"], A1 = {
19168
19168
  border: "",
19169
19169
  actions: ["remove"],
19170
19170
  onClick: (I) => $(U),
19171
- onAction: G
19171
+ onAction: K
19172
19172
  }, null, 8, ["model-value", "title", "onClick"]))), 256)),
19173
19173
  a.value.length ? L("", !0) : (h(), T(i(ot), {
19174
19174
  key: 0,
@@ -22631,7 +22631,7 @@ function _x() {
22631
22631
  return pe;
22632
22632
  }).map((xe) => `(${xe})`).join(q);
22633
22633
  }
22634
- const x = /\b\B/, O = "[a-zA-Z]\\w*", C = "[a-zA-Z_]\\w*", V = "\\b\\d+(\\.\\d+)?", B = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", $ = "\\b(0b[01]+)", G = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", W = (P = {}) => {
22634
+ const x = /\b\B/, O = "[a-zA-Z]\\w*", C = "[a-zA-Z_]\\w*", V = "\\b\\d+(\\.\\d+)?", B = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", $ = "\\b(0b[01]+)", K = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", W = (P = {}) => {
22635
22635
  const q = /^#![ ]*\//;
22636
22636
  return P.binary && (P.begin = b(
22637
22637
  q,
@@ -22804,7 +22804,7 @@ function _x() {
22804
22804
  PHRASAL_WORDS_MODE: I,
22805
22805
  QUOTE_STRING_MODE: U,
22806
22806
  REGEXP_MODE: Pe,
22807
- RE_STARTERS_RE: G,
22807
+ RE_STARTERS_RE: K,
22808
22808
  SHEBANG: W,
22809
22809
  TITLE_MODE: ct,
22810
22810
  UNDERSCORE_IDENT_RE: C,
@@ -22886,7 +22886,7 @@ function _x() {
22886
22886
  console.log(`WARN: ${P}`, ...q);
22887
22887
  }, Q = (P, q) => {
22888
22888
  On[`${P}/${q}`] || (console.log(`Deprecated as of ${P}. ${q}`), On[`${P}/${q}`] = !0);
22889
- }, K = new Error();
22889
+ }, G = new Error();
22890
22890
  function X(P, q, { key: re }) {
22891
22891
  let xe = 0;
22892
22892
  const ft = P[re], pt = {}, pe = {};
@@ -22897,18 +22897,18 @@ function _x() {
22897
22897
  function ie(P) {
22898
22898
  if (Array.isArray(P.begin)) {
22899
22899
  if (P.skip || P.excludeBegin || P.returnBegin)
22900
- throw xt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), K;
22900
+ throw xt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), G;
22901
22901
  if (typeof P.beginScope != "object" || P.beginScope === null)
22902
- throw xt("beginScope must be object"), K;
22902
+ throw xt("beginScope must be object"), G;
22903
22903
  X(P, P.begin, { key: "beginScope" }), P.begin = A(P.begin, { joinWith: "" });
22904
22904
  }
22905
22905
  }
22906
22906
  function ce(P) {
22907
22907
  if (Array.isArray(P.end)) {
22908
22908
  if (P.skip || P.excludeEnd || P.returnEnd)
22909
- throw xt("skip, excludeEnd, returnEnd not compatible with endScope: {}"), K;
22909
+ throw xt("skip, excludeEnd, returnEnd not compatible with endScope: {}"), G;
22910
22910
  if (typeof P.endScope != "object" || P.endScope === null)
22911
- throw xt("endScope must be object"), K;
22911
+ throw xt("endScope must be object"), G;
22912
22912
  X(P, P.end, { key: "endScope" }), P.end = A(P.end, { joinWith: "" });
22913
22913
  }
22914
22914
  }
@@ -24108,13 +24108,13 @@ function Ax(e) {
24108
24108
  match: /\b[A-Z][A-Z_0-9]+\b/,
24109
24109
  className: "variable.constant"
24110
24110
  };
24111
- function G(H) {
24111
+ function K(H) {
24112
24112
  return t.concat("(?!", H.join("|"), ")");
24113
24113
  }
24114
24114
  const W = {
24115
24115
  match: t.concat(
24116
24116
  /\b/,
24117
- G([
24117
+ K([
24118
24118
  ...Id,
24119
24119
  "super",
24120
24120
  "import"
@@ -25963,7 +25963,7 @@ const Lx = ["innerHTML"], Ux = /* @__PURE__ */ J({
25963
25963
  createTrustedTypesPolicy: void 0,
25964
25964
  async getWorker(u, f) {
25965
25965
  let m;
25966
- return f === "json" && (m = await import("./json.worker-D1UBs5tZ.js")), ["css", "scss", "less"].includes(f) && (m = await import("./css.worker-DdCwg2F4.js")), ["html", "handlebars", "razor", "vue"].includes(f) && (m = await import("./html.worker-Bgmn5TLa.js")), ["typescript", "javascript"].includes(f) && (m = await import("./ts.worker-CtXbW5f6.js")), m = m || await import("./editor.worker-CEZ99gS2.js"), new m.default();
25966
+ return f === "json" && (m = await import("./json.worker-DyfNKmEG.js")), ["css", "scss", "less"].includes(f) && (m = await import("./css.worker--aXH2aPB.js")), ["html", "handlebars", "razor", "vue"].includes(f) && (m = await import("./html.worker-Ck_eCw9C.js")), ["typescript", "javascript"].includes(f) && (m = await import("./ts.worker-BRcnI7fF.js")), m = m || await import("./editor.worker-Bi14wvgY.js"), new m.default();
25967
25967
  }
25968
25968
  };
25969
25969
  const s = n, r = D();
@@ -26363,7 +26363,7 @@ const Lx = ["innerHTML"], Ux = /* @__PURE__ */ J({
26363
26363
  toggleHideCode: V,
26364
26364
  isHideCode: B,
26365
26365
  onFix: $,
26366
- promptText: G,
26366
+ promptText: K,
26367
26367
  fillPromptInput: W,
26368
26368
  settings: z,
26369
26369
  inputDisabled: M,
@@ -26493,7 +26493,7 @@ const Lx = ["innerHTML"], Ux = /* @__PURE__ */ J({
26493
26493
  key: 2,
26494
26494
  models: i(r),
26495
26495
  loading: i(s),
26496
- "model-value": i(G),
26496
+ "model-value": i(K),
26497
26497
  disabled: i(M),
26498
26498
  fillPromptInput: i(W),
26499
26499
  onSend: i(a),
@@ -26560,7 +26560,7 @@ const Lx = ["innerHTML"], Ux = /* @__PURE__ */ J({
26560
26560
  models: i(r),
26561
26561
  loading: i(s) || i(C),
26562
26562
  model: i(c)?.model,
26563
- "model-value": i(G),
26563
+ "model-value": i(K),
26564
26564
  disabled: i(M),
26565
26565
  "lock-model": "",
26566
26566
  onSend: i(d),