lianshu-editor 1.0.147 → 1.0.149

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  var fp = Object.defineProperty;
2
2
  var dp = (e, t, n) => t in e ? fp(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var je = (e, t, n) => dp(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { defineComponent as Ne, ref as j, onMounted as ln, nextTick as Ct, onBeforeUnmount as or, h as Ya, openBlock as O, createElementBlock as U, createElementVNode as b, createVNode as z, unref as P, toDisplayString as we, Fragment as Tt, renderList as Lt, normalizeStyle as Ht, normalizeClass as X, createBlock as Ie, createCommentVNode as te, computed as ne, inject as Dn, resolveDynamicComponent as na, withDirectives as lt, withKeys as at, vModelText as Rt, onUnmounted as Fs, watch as gt, Teleport as us, withModifiers as oe, getCurrentInstance as hp, toRaw as Sd, provide as Qr, reactive as gp, readonly as pp, resolveComponent as Ji, vShow as Qa, createTextVNode as Nn, withCtx as Nt, markRaw as Hn, Transition as Dd, toRef as bo, renderSlot as mp } from "vue";
4
+ import { defineComponent as Ne, ref as j, onMounted as ln, nextTick as Ct, onBeforeUnmount as or, h as Ya, openBlock as O, createElementBlock as F, createElementVNode as b, createVNode as z, unref as P, toDisplayString as we, Fragment as Tt, renderList as Lt, normalizeStyle as Ht, normalizeClass as X, createBlock as Ie, createCommentVNode as te, computed as ne, inject as Dn, resolveDynamicComponent as na, withDirectives as lt, withKeys as at, vModelText as Rt, onUnmounted as Fs, watch as gt, Teleport as us, withModifiers as oe, getCurrentInstance as hp, toRaw as Sd, provide as Qr, reactive as gp, readonly as pp, resolveComponent as Ji, vShow as Qa, createTextVNode as Nn, withCtx as Nt, markRaw as Hn, Transition as Dd, toRef as bo, renderSlot as mp } from "vue";
5
5
  import { nodeViewProps as ga, NodeViewWrapper as en, NodeViewContent as Uu, VueNodeViewRenderer as Kt, VueRenderer as Fu, useEditor as Hu, EditorContent as zu } from "@tiptap/vue-3";
6
6
  import { isTextSelection as bp, posToDOMRect as Od, getText as Ap, getTextSerializersFromSchema as Ep, Node as Wt, mergeAttributes as Qt, textblockTypeInputRule as yp, InputRule as ju, Extension as pa } from "@tiptap/core";
7
7
  import Tp from "@tiptap/extension-code-block-lowlight";
@@ -308,14 +308,14 @@ const Yp = async (e, t, n) => {
308
308
  x: n,
309
309
  y: r
310
310
  }, g = Ju(a), p = Vu(g), m = await s.getDimensions(l), A = g === "y", E = A ? "top" : "left", k = A ? "bottom" : "right", C = A ? "clientHeight" : "clientWidth", T = i.reference[p] + i.reference[g] - h[g] - i.floating[p], I = h[g] - i.reference[g], S = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
311
- let B = S ? S[C] : 0;
312
- (!B || !await (s.isElement == null ? void 0 : s.isElement(S))) && (B = o.floating[C] || i.floating[p]);
313
- const D = T / 2 - I / 2, N = B / 2 - m[p] / 2 - 1, _ = On(f[E], N), F = On(f[k], N), L = _, x = B - m[p] - F, M = B / 2 - m[p] / 2 + D, Q = qo(L, M, x), G = !u.arrow && hn(a) != null && M !== Q && i.reference[p] / 2 - (M < L ? _ : F) - m[p] / 2 < 0, W = G ? M < L ? M - L : M - x : 0;
311
+ let R = S ? S[C] : 0;
312
+ (!R || !await (s.isElement == null ? void 0 : s.isElement(S))) && (R = o.floating[C] || i.floating[p]);
313
+ const D = T / 2 - I / 2, N = R / 2 - m[p] / 2 - 1, _ = On(f[E], N), U = On(f[k], N), L = _, M = R - m[p] - U, x = R / 2 - m[p] / 2 + D, Q = qo(L, x, M), G = !u.arrow && hn(a) != null && x !== Q && i.reference[p] / 2 - (x < L ? _ : U) - m[p] / 2 < 0, W = G ? x < L ? x - L : x - M : 0;
314
314
  return {
315
315
  [g]: h[g] + W,
316
316
  data: {
317
317
  [g]: Q,
318
- centerOffset: M - Q - W,
318
+ centerOffset: x - Q - W,
319
319
  ...G && {
320
320
  alignmentOffset: W
321
321
  }
@@ -369,21 +369,21 @@ const Wp = function(e) {
369
369
  placement: S
370
370
  }
371
371
  };
372
- const B = I.map((_) => {
373
- const F = hn(_.placement);
374
- return [_.placement, F && c ? (
372
+ const R = I.map((_) => {
373
+ const U = hn(_.placement);
374
+ return [_.placement, U && c ? (
375
375
  // Check along the mainAxis and main crossAxis side.
376
- _.overflows.slice(0, 2).reduce((L, x) => L + x, 0)
376
+ _.overflows.slice(0, 2).reduce((L, M) => L + M, 0)
377
377
  ) : (
378
378
  // Check only the mainAxis.
379
379
  _.overflows[0]
380
380
  ), _.overflows];
381
- }).sort((_, F) => _[1] - F[1]), N = ((a = B.filter((_) => _[2].slice(
381
+ }).sort((_, U) => _[1] - U[1]), N = ((a = R.filter((_) => _[2].slice(
382
382
  0,
383
383
  // Aligned placements should not check their opposite crossAxis
384
384
  // side.
385
385
  hn(_[0]) ? 2 : 3
386
- ).every((F) => F <= 0))[0]) == null ? void 0 : a[0]) || B[0][0];
386
+ ).every((U) => U <= 0))[0]) == null ? void 0 : a[0]) || R[0][0];
387
387
  return N !== o ? {
388
388
  data: {
389
389
  index: E + 1,
@@ -421,24 +421,24 @@ const Wp = function(e) {
421
421
  return {};
422
422
  const E = sn(a), k = Cn(o), C = sn(o) === o, T = await (u.isRTL == null ? void 0 : u.isRTL(l.floating)), I = h || (C || !m ? [fs(o)] : Bp(o)), S = p !== "none";
423
423
  !h && S && I.push(...Hp(o, m, p, T));
424
- const B = [o, ...I], D = await u.detectOverflow(t, A), N = [];
424
+ const R = [o, ...I], D = await u.detectOverflow(t, A), N = [];
425
425
  let _ = ((r = i.flip) == null ? void 0 : r.overflows) || [];
426
426
  if (c && N.push(D[E]), f) {
427
- const M = Pd(a, s, T);
428
- N.push(D[M[0]], D[M[1]]);
427
+ const x = Pd(a, s, T);
428
+ N.push(D[x[0]], D[x[1]]);
429
429
  }
430
430
  if (_ = [..._, {
431
431
  placement: a,
432
432
  overflows: N
433
- }], !N.every((M) => M <= 0)) {
434
- var F, L;
435
- const M = (((F = i.flip) == null ? void 0 : F.index) || 0) + 1, Q = B[M];
433
+ }], !N.every((x) => x <= 0)) {
434
+ var U, L;
435
+ const x = (((U = i.flip) == null ? void 0 : U.index) || 0) + 1, Q = R[x];
436
436
  if (Q && (!(f === "alignment" ? k !== Cn(Q) : !1) || // We leave the current main axis only if every placement on that axis
437
437
  // overflows the main axis.
438
438
  _.every((K) => Cn(K.placement) === k ? K.overflows[0] > 0 : !0)))
439
439
  return {
440
440
  data: {
441
- index: M,
441
+ index: x,
442
442
  overflows: _
443
443
  },
444
444
  reset: {
@@ -449,8 +449,8 @@ const Wp = function(e) {
449
449
  if (!G)
450
450
  switch (g) {
451
451
  case "bestFit": {
452
- var x;
453
- const W = (x = _.filter((K) => {
452
+ var M;
453
+ const W = (M = _.filter((K) => {
454
454
  if (S) {
455
455
  const fe = Cn(K.placement);
456
456
  return fe === k || // Create a bias to the `y` side axis due to horizontal
@@ -458,7 +458,7 @@ const Wp = function(e) {
458
458
  fe === "y";
459
459
  }
460
460
  return !0;
461
- }).map((K) => [K.placement, K.overflows.filter((fe) => fe > 0).reduce((fe, Be) => fe + Be, 0)]).sort((K, fe) => K[1] - fe[1])[0]) == null ? void 0 : x[0];
461
+ }).map((K) => [K.placement, K.overflows.filter((fe) => fe > 0).reduce((fe, Be) => fe + Be, 0)]).sort((K, fe) => K[1] - fe[1])[0]) == null ? void 0 : M[0];
462
462
  W && (G = W);
463
463
  break;
464
464
  }
@@ -570,24 +570,24 @@ const Vp = function(e) {
570
570
  return f.find((A) => u > A.left - g.left && u < A.right + g.right && l > A.top - g.top && l < A.bottom + g.bottom) || h;
571
571
  if (f.length >= 2) {
572
572
  if (Cn(n) === "y") {
573
- const _ = f[0], F = f[f.length - 1], L = sn(n) === "top", x = _.top, M = F.bottom, Q = L ? _.left : F.left, G = L ? _.right : F.right, W = G - Q, K = M - x;
573
+ const _ = f[0], U = f[f.length - 1], L = sn(n) === "top", M = _.top, x = U.bottom, Q = L ? _.left : U.left, G = L ? _.right : U.right, W = G - Q, K = x - M;
574
574
  return {
575
- top: x,
576
- bottom: M,
575
+ top: M,
576
+ bottom: x,
577
577
  left: Q,
578
578
  right: G,
579
579
  width: W,
580
580
  height: K,
581
581
  x: Q,
582
- y: x
582
+ y: M
583
583
  };
584
584
  }
585
- const A = sn(n) === "left", E = Dt(...f.map((_) => _.right)), k = On(...f.map((_) => _.left)), C = f.filter((_) => A ? _.left === k : _.right === E), T = C[0].top, I = C[C.length - 1].bottom, S = k, B = E, D = B - S, N = I - T;
585
+ const A = sn(n) === "left", E = Dt(...f.map((_) => _.right)), k = On(...f.map((_) => _.left)), C = f.filter((_) => A ? _.left === k : _.right === E), T = C[0].top, I = C[C.length - 1].bottom, S = k, R = E, D = R - S, N = I - T;
586
586
  return {
587
587
  top: T,
588
588
  bottom: I,
589
589
  left: S,
590
- right: B,
590
+ right: R,
591
591
  width: D,
592
592
  height: N,
593
593
  x: S,
@@ -739,15 +739,15 @@ const Xp = function(e) {
739
739
  let A, E;
740
740
  f === "top" || f === "bottom" ? (A = f, E = h === (await (s.isRTL == null ? void 0 : s.isRTL(o.floating)) ? "start" : "end") ? "left" : "right") : (E = f, A = h === "end" ? "top" : "bottom");
741
741
  const k = m - c.top - c.bottom, C = p - c.left - c.right, T = On(m - c[A], k), I = On(p - c[E], C), S = !t.middlewareData.shift;
742
- let B = T, D = I;
743
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (D = C), (r = t.middlewareData.shift) != null && r.enabled.y && (B = k), S && !h) {
744
- const _ = Dt(c.left, 0), F = Dt(c.right, 0), L = Dt(c.top, 0), x = Dt(c.bottom, 0);
745
- g ? D = p - 2 * (_ !== 0 || F !== 0 ? _ + F : Dt(c.left, c.right)) : B = m - 2 * (L !== 0 || x !== 0 ? L + x : Dt(c.top, c.bottom));
742
+ let R = T, D = I;
743
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (D = C), (r = t.middlewareData.shift) != null && r.enabled.y && (R = k), S && !h) {
744
+ const _ = Dt(c.left, 0), U = Dt(c.right, 0), L = Dt(c.top, 0), M = Dt(c.bottom, 0);
745
+ g ? D = p - 2 * (_ !== 0 || U !== 0 ? _ + U : Dt(c.left, c.right)) : R = m - 2 * (L !== 0 || M !== 0 ? L + M : Dt(c.top, c.bottom));
746
746
  }
747
747
  await u({
748
748
  ...t,
749
749
  availableWidth: D,
750
- availableHeight: B
750
+ availableHeight: R
751
751
  });
752
752
  const N = await s.getDimensions(o.floating);
753
753
  return p !== N.width || m !== N.height ? {
@@ -5226,8 +5226,8 @@ function Lb(e) {
5226
5226
  });
5227
5227
  const S = k && k[I];
5228
5228
  if (S) {
5229
- const B = (T + I) % t * 2, D = s[B];
5230
- D == null || D != S && s[B + 1] == 1 ? (s[B] = S, s[B + 1] = 1) : D == S && s[B + 1]++;
5229
+ const R = (T + I) % t * 2, D = s[R];
5230
+ D == null || D != S && s[R + 1] == 1 ? (s[R] = S, s[R + 1] = 1) : D == S && s[R + 1]++;
5231
5231
  }
5232
5232
  }
5233
5233
  }
@@ -7072,7 +7072,7 @@ const df = ie("youtube", [
7072
7072
  const u = o.target;
7073
7073
  n("select", u.value);
7074
7074
  };
7075
- return (o, u) => (O(), U("div", PA, [
7075
+ return (o, u) => (O(), F("div", PA, [
7076
7076
  b("div", UA, [
7077
7077
  b("button", {
7078
7078
  class: "clear-btn",
@@ -7084,7 +7084,7 @@ const df = ie("youtube", [
7084
7084
  ], 8, FA)
7085
7085
  ]),
7086
7086
  b("div", HA, [
7087
- (O(), U(Tt, null, Lt(r, (l) => b("button", {
7087
+ (O(), F(Tt, null, Lt(r, (l) => b("button", {
7088
7088
  key: l,
7089
7089
  class: X(["color-item", { active: e.currentColor === l }]),
7090
7090
  style: Ht({ backgroundColor: l }),
@@ -7202,7 +7202,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7202
7202
  s.value = !1, o.value = !1;
7203
7203
  }, S = () => {
7204
7204
  s.value = !1, o.value = !1, i.value = !1, u.value = !1, W.value = !1;
7205
- }, B = (re) => {
7205
+ }, R = (re) => {
7206
7206
  n.editor && (re ? n.editor.chain().focus().setColor(re).run() : n.editor.chain().focus().unsetColor().run(), s.value = !1);
7207
7207
  }, D = (re) => {
7208
7208
  n.editor && (re ? n.editor.chain().focus().setHighlight({ color: re }).run() : n.editor.chain().focus().unsetHighlight().run(), o.value = !1);
@@ -7215,7 +7215,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7215
7215
  });
7216
7216
  }, _ = () => {
7217
7217
  u.value = !1, l.value = "";
7218
- }, F = () => {
7218
+ }, U = () => {
7219
7219
  if (!n.editor) return;
7220
7220
  const re = l.value.trim();
7221
7221
  if (!re || re === "https://") {
@@ -7247,11 +7247,11 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7247
7247
  }
7248
7248
  _();
7249
7249
  }
7250
- }, x = () => {
7250
+ }, M = () => {
7251
7251
  if (!n.editor) return;
7252
7252
  const { from: re, to: ae } = n.editor.state.selection, Se = re !== ae ? n.editor.state.doc.textBetween(re, ae) : "";
7253
7253
  n.editor.commands.showAIPromptInput(Se), S();
7254
- }, M = () => {
7254
+ }, x = () => {
7255
7255
  n.editor && n.editor.chain().focus().unsetAllMarks().run();
7256
7256
  }, Q = Dn("editorTemplateConfig", j(void 0)), G = ne(() => Q.value), W = j(!1), K = j(""), fe = j(null), Be = () => {
7257
7257
  I(), i.value = !1, u.value = !1, W.value = !W.value, K.value = "", W.value && Ct(() => {
@@ -7273,7 +7273,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7273
7273
  };
7274
7274
  return (re, ae) => {
7275
7275
  var Se, Je, ge, Z, he, Pe, pe;
7276
- return O(), U("div", WA, [
7276
+ return O(), F("div", WA, [
7277
7277
  b("div", $A, [
7278
7278
  b("div", GA, [
7279
7279
  b("button", {
@@ -7287,8 +7287,8 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7287
7287
  class: X(["dropdown-icon", { open: i.value }])
7288
7288
  }, null, 8, ["class"])
7289
7289
  ], 2),
7290
- i.value ? (O(), U("div", VA, [
7291
- (O(), U(Tt, null, Lt(a, (Te) => b("div", {
7290
+ i.value ? (O(), F("div", VA, [
7291
+ (O(), F(Tt, null, Lt(a, (Te) => b("div", {
7292
7292
  key: Te.value,
7293
7293
  class: X(["heading-option", { active: p(Te) }]),
7294
7294
  onClick: (Ue) => A(Te)
@@ -7343,7 +7343,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7343
7343
  ], 2),
7344
7344
  b("button", {
7345
7345
  class: "toolbar-btn",
7346
- onClick: M,
7346
+ onClick: x,
7347
7347
  title: "清除格式"
7348
7348
  }, [
7349
7349
  z(P(Z0), { size: 16 })
@@ -7363,11 +7363,11 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7363
7363
  style: Ht({ backgroundColor: E.value || "currentColor" })
7364
7364
  }, null, 4)
7365
7365
  ]),
7366
- s.value ? (O(), U("div", t2, [
7366
+ s.value ? (O(), F("div", t2, [
7367
7367
  z(tr, {
7368
7368
  type: "text",
7369
7369
  "current-color": E.value,
7370
- onSelect: B
7370
+ onSelect: R
7371
7371
  }, null, 8, ["current-color"])
7372
7372
  ])) : te("", !0)
7373
7373
  ]),
@@ -7383,7 +7383,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7383
7383
  style: Ht({ backgroundColor: k.value || "transparent" })
7384
7384
  }, null, 4)
7385
7385
  ]),
7386
- o.value ? (O(), U("div", r2, [
7386
+ o.value ? (O(), F("div", r2, [
7387
7387
  z(tr, {
7388
7388
  type: "background",
7389
7389
  "current-color": k.value,
@@ -7412,7 +7412,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7412
7412
  }, [
7413
7413
  z(P(TA), { size: 16 })
7414
7414
  ], 2),
7415
- u.value ? (O(), U("div", s2, [
7415
+ u.value ? (O(), F("div", s2, [
7416
7416
  b("div", o2, [
7417
7417
  ae[7] || (ae[7] = b("span", null, "添加链接", -1)),
7418
7418
  b("button", {
@@ -7431,15 +7431,15 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7431
7431
  class: "link-input",
7432
7432
  placeholder: "输入链接地址...",
7433
7433
  onKeydown: [
7434
- at(F, ["enter"]),
7434
+ at(U, ["enter"]),
7435
7435
  at(_, ["esc"])
7436
7436
  ]
7437
7437
  }, null, 544), [
7438
7438
  [Rt, l.value]
7439
7439
  ]),
7440
- f.value.length > 0 ? (O(), U("div", l2, [
7440
+ f.value.length > 0 ? (O(), F("div", l2, [
7441
7441
  ae[8] || (ae[8] = b("div", { class: "document-list-header" }, "或选择文档", -1)),
7442
- (O(!0), U(Tt, null, Lt(f.value, (Te) => (O(), U("div", {
7442
+ (O(!0), F(Tt, null, Lt(f.value, (Te) => (O(), F("div", {
7443
7443
  key: Te.id,
7444
7444
  class: "document-item",
7445
7445
  onClick: (Ue) => L(Te)
@@ -7456,7 +7456,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7456
7456
  }, "取消"),
7457
7457
  b("button", {
7458
7458
  class: "link-btn-apply",
7459
- onClick: F,
7459
+ onClick: U,
7460
7460
  disabled: !l.value.trim()
7461
7461
  }, we((pe = e.editor) != null && pe.isActive("link") ? "更新" : "添加"), 9, d2)
7462
7462
  ])
@@ -7467,13 +7467,13 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7467
7467
  b("div", h2, [
7468
7468
  b("button", {
7469
7469
  class: "toolbar-btn ai-btn",
7470
- onClick: x,
7470
+ onClick: M,
7471
7471
  title: "AI 写作"
7472
7472
  }, [
7473
7473
  z(P(Js), { size: 16 })
7474
7474
  ])
7475
7475
  ]),
7476
- G.value ? (O(), U(Tt, { key: 0 }, [
7476
+ G.value ? (O(), F(Tt, { key: 0 }, [
7477
7477
  ae[10] || (ae[10] = b("div", { class: "toolbar-divider" }, null, -1)),
7478
7478
  b("div", g2, [
7479
7479
  b("div", p2, [
@@ -7484,7 +7484,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7484
7484
  }, [
7485
7485
  z(P(hl), { size: 16 })
7486
7486
  ]),
7487
- W.value ? (O(), U("div", m2, [
7487
+ W.value ? (O(), F("div", m2, [
7488
7488
  b("div", b2, [
7489
7489
  ae[9] || (ae[9] = b("span", null, "保存为模板", -1)),
7490
7490
  b("button", {
@@ -7525,7 +7525,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7525
7525
  ])
7526
7526
  ])
7527
7527
  ], 64)) : te("", !0),
7528
- s.value || o.value || i.value || u.value || W.value ? (O(), U("div", {
7528
+ s.value || o.value || i.value || u.value || W.value ? (O(), F("div", {
7529
7529
  key: 1,
7530
7530
  class: "color-overlay",
7531
7531
  onClick: S
@@ -7551,7 +7551,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7551
7551
  editor: {}
7552
7552
  },
7553
7553
  setup(e) {
7554
- const t = e, n = Dn("editorTheme", "light"), r = ne(() => typeof n == "object" && (n != null && n.value) ? n.value === "dark" : n === "dark"), a = j(!1), i = j(null), s = j(!1), o = j(!1), u = j([]), l = j(!1), c = j(null), f = j(!1), h = j(!1), g = j(!1), p = j(!1), m = j(!1), A = j(!1), E = j(!1), k = j(!1), C = j(!1), T = j(!1), I = j(!1), S = j(!1), B = ne(() => {
7554
+ const t = e, n = Dn("editorTheme", "light"), r = ne(() => typeof n == "object" && (n != null && n.value) ? n.value === "dark" : n === "dark"), a = j(!1), i = j(null), s = j(!1), o = j(!1), u = j([]), l = j(!1), c = j(null), f = j(!1), h = j(!1), g = j(!1), p = j(!1), m = j(!1), A = j(!1), E = j(!1), k = j(!1), C = j(!1), T = j(!1), I = j(!1), S = j(!1), R = ne(() => {
7555
7555
  if (!c.value) return !1;
7556
7556
  const ee = c.value;
7557
7557
  return window.innerWidth - ee.right < 160 + 240 + 40;
@@ -7568,7 +7568,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7568
7568
  return ee[0];
7569
7569
  const Y = Math.min(...ee.map((me) => me.left)), Re = Math.min(...ee.map((me) => me.top)), Ye = Math.max(...ee.map((me) => me.right)), se = Math.max(...ee.map((me) => me.bottom));
7570
7570
  return new DOMRect(Y, Re, Ye - Y, se - Re);
7571
- }, F = ne(() => {
7571
+ }, U = ne(() => {
7572
7572
  var Re;
7573
7573
  if (!c.value) return {};
7574
7574
  const ee = c.value;
@@ -7609,7 +7609,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7609
7609
  transform: "translate(-50%, -50%)",
7610
7610
  zIndex: 1e3
7611
7611
  };
7612
- }), x = ne(() => {
7612
+ }), M = ne(() => {
7613
7613
  var Re;
7614
7614
  if (!c.value) return {};
7615
7615
  const ee = c.value, Y = ee.left + ee.width / 2;
@@ -7628,7 +7628,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7628
7628
  transform: "translate(-50%, -50%)",
7629
7629
  zIndex: 1e3
7630
7630
  };
7631
- }), M = ne(() => {
7631
+ }), x = ne(() => {
7632
7632
  var Re;
7633
7633
  if (!c.value) return {};
7634
7634
  const ee = c.value, Y = ee.right - 1;
@@ -7948,17 +7948,17 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7948
7948
  }), gt(() => t.editor, (ee, Y) => {
7949
7949
  Y && Ec(Y), ee && (Ac(ee), K());
7950
7950
  }, { immediate: !0 }), (ee, Y) => (O(), Ie(us, { to: "body" }, [
7951
- a.value && c.value ? (O(), U("div", {
7951
+ a.value && c.value ? (O(), F("div", {
7952
7952
  key: 0,
7953
7953
  class: "cell-highlight",
7954
- style: Ht(F.value)
7954
+ style: Ht(U.value)
7955
7955
  }, [
7956
- s.value ? (O(), U("div", I2)) : (O(), U("div", k2)),
7956
+ s.value ? (O(), F("div", I2)) : (O(), F("div", k2)),
7957
7957
  Y[6] || (Y[6] = b("div", { class: "highlight-line bottom-line-full" }, null, -1)),
7958
- o.value ? (O(), U("div", w2)) : (O(), U("div", C2)),
7958
+ o.value ? (O(), F("div", w2)) : (O(), F("div", C2)),
7959
7959
  Y[7] || (Y[7] = b("div", { class: "highlight-line right-line" }, null, -1))
7960
7960
  ], 4)) : te("", !0),
7961
- a.value && i.value && o.value ? (O(), U("div", {
7961
+ a.value && i.value && o.value ? (O(), F("div", {
7962
7962
  key: 1,
7963
7963
  class: X(["table-row-handle", { "theme-dark": r.value }]),
7964
7964
  style: Ht(L.value),
@@ -7968,7 +7968,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7968
7968
  b("div", {
7969
7969
  class: X(["handle-trigger row-trigger", { "opacity-0": T.value || f.value }])
7970
7970
  }, null, 2),
7971
- T.value || f.value ? (O(), U("button", {
7971
+ T.value || f.value ? (O(), F("button", {
7972
7972
  key: 0,
7973
7973
  class: "handle-btn",
7974
7974
  onClick: oe(ce, ["stop"]),
@@ -7983,7 +7983,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
7983
7983
  b("i")
7984
7984
  ], -1)
7985
7985
  ])])) : te("", !0),
7986
- f.value ? (O(), U("div", {
7986
+ f.value ? (O(), F("div", {
7987
7987
  key: 1,
7988
7988
  class: "table-menu",
7989
7989
  style: Ht(Q.value)
@@ -8011,9 +8011,9 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
8011
8011
  z(P(xr), { size: 14 }),
8012
8012
  Y[11] || (Y[11] = b("span", null, "文本颜色", -1))
8013
8013
  ]),
8014
- p.value ? (O(), U("div", {
8014
+ p.value ? (O(), F("div", {
8015
8015
  key: 0,
8016
- class: X(["color-picker-dropdown", { "show-left": B.value }]),
8016
+ class: X(["color-picker-dropdown", { "show-left": R.value }]),
8017
8017
  onClick: Y[0] || (Y[0] = oe(() => {
8018
8018
  }, ["stop"]))
8019
8019
  }, [
@@ -8031,9 +8031,9 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
8031
8031
  z(P(ts), { size: 14 }),
8032
8032
  Y[12] || (Y[12] = b("span", null, "背景颜色", -1))
8033
8033
  ]),
8034
- m.value ? (O(), U("div", {
8034
+ m.value ? (O(), F("div", {
8035
8035
  key: 0,
8036
- class: X(["color-picker-dropdown", { "show-left": B.value }]),
8036
+ class: X(["color-picker-dropdown", { "show-left": R.value }]),
8037
8037
  onClick: Y[1] || (Y[1] = oe(() => {
8038
8038
  }, ["stop"]))
8039
8039
  }, [
@@ -8053,17 +8053,17 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
8053
8053
  ])
8054
8054
  ], 4)) : te("", !0)
8055
8055
  ], 38)) : te("", !0),
8056
- a.value && i.value && s.value ? (O(), U("div", {
8056
+ a.value && i.value && s.value ? (O(), F("div", {
8057
8057
  key: 2,
8058
8058
  class: X(["table-col-handle", { "theme-dark": r.value }]),
8059
- style: Ht(x.value),
8059
+ style: Ht(M.value),
8060
8060
  onMouseenter: kt,
8061
8061
  onMouseleave: Un
8062
8062
  }, [
8063
8063
  b("div", {
8064
8064
  class: X(["handle-trigger col-trigger", { "opacity-0": I.value || h.value }])
8065
8065
  }, null, 2),
8066
- I.value || h.value ? (O(), U("button", {
8066
+ I.value || h.value ? (O(), F("button", {
8067
8067
  key: 0,
8068
8068
  class: "handle-btn",
8069
8069
  onClick: oe(nt, ["stop"]),
@@ -8071,7 +8071,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
8071
8071
  }, [
8072
8072
  z(P(fA), { size: 14 })
8073
8073
  ])) : te("", !0),
8074
- h.value ? (O(), U("div", {
8074
+ h.value ? (O(), F("div", {
8075
8075
  key: 1,
8076
8076
  class: "table-menu",
8077
8077
  style: Ht(G.value)
@@ -8099,9 +8099,9 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
8099
8099
  z(P(xr), { size: 14 }),
8100
8100
  Y[18] || (Y[18] = b("span", null, "文本颜色", -1))
8101
8101
  ]),
8102
- A.value ? (O(), U("div", {
8102
+ A.value ? (O(), F("div", {
8103
8103
  key: 0,
8104
- class: X(["color-picker-dropdown", { "show-left": B.value }]),
8104
+ class: X(["color-picker-dropdown", { "show-left": R.value }]),
8105
8105
  onClick: Y[2] || (Y[2] = oe(() => {
8106
8106
  }, ["stop"]))
8107
8107
  }, [
@@ -8119,9 +8119,9 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
8119
8119
  z(P(ts), { size: 14 }),
8120
8120
  Y[19] || (Y[19] = b("span", null, "背景颜色", -1))
8121
8121
  ]),
8122
- E.value ? (O(), U("div", {
8122
+ E.value ? (O(), F("div", {
8123
8123
  key: 0,
8124
- class: X(["color-picker-dropdown", { "show-left": B.value }]),
8124
+ class: X(["color-picker-dropdown", { "show-left": R.value }]),
8125
8125
  onClick: Y[3] || (Y[3] = oe(() => {
8126
8126
  }, ["stop"]))
8127
8127
  }, [
@@ -8141,17 +8141,17 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
8141
8141
  ])
8142
8142
  ], 4)) : te("", !0)
8143
8143
  ], 38)) : te("", !0),
8144
- a.value && i.value ? (O(), U("div", {
8144
+ a.value && i.value ? (O(), F("div", {
8145
8145
  key: 3,
8146
8146
  class: X(["table-cell-handle", { "theme-dark": r.value }]),
8147
- style: Ht(M.value),
8147
+ style: Ht(x.value),
8148
8148
  onMouseenter: Ci,
8149
8149
  onMouseleave: Ni
8150
8150
  }, [
8151
8151
  b("div", {
8152
8152
  class: X(["handle-trigger cell-trigger", { "opacity-0": S.value || g.value }])
8153
8153
  }, null, 2),
8154
- S.value || g.value ? (O(), U("button", {
8154
+ S.value || g.value ? (O(), F("button", {
8155
8155
  key: 0,
8156
8156
  class: "handle-btn",
8157
8157
  onClick: oe(Ge, ["stop"]),
@@ -8163,7 +8163,7 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
8163
8163
  b("i")
8164
8164
  ], -1)
8165
8165
  ])])) : te("", !0),
8166
- g.value ? (O(), U("div", {
8166
+ g.value ? (O(), F("div", {
8167
8167
  key: 1,
8168
8168
  class: "table-menu",
8169
8169
  style: Ht(W.value)
@@ -8176,9 +8176,9 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
8176
8176
  z(P(xr), { size: 14 }),
8177
8177
  Y[24] || (Y[24] = b("span", null, "文本颜色", -1))
8178
8178
  ]),
8179
- k.value ? (O(), U("div", {
8179
+ k.value ? (O(), F("div", {
8180
8180
  key: 0,
8181
- class: X(["color-picker-dropdown", { "show-left": B.value }]),
8181
+ class: X(["color-picker-dropdown", { "show-left": R.value }]),
8182
8182
  onClick: Y[4] || (Y[4] = oe(() => {
8183
8183
  }, ["stop"]))
8184
8184
  }, [
@@ -8196,9 +8196,9 @@ const WA = { class: "bubble-toolbar" }, $A = { class: "toolbar-group" }, GA = {
8196
8196
  z(P(ts), { size: 14 }),
8197
8197
  Y[25] || (Y[25] = b("span", null, "背景颜色", -1))
8198
8198
  ]),
8199
- C.value ? (O(), U("div", {
8199
+ C.value ? (O(), F("div", {
8200
8200
  key: 0,
8201
- class: X(["color-picker-dropdown", { "show-left": B.value }]),
8201
+ class: X(["color-picker-dropdown", { "show-left": R.value }]),
8202
8202
  onClick: Y[5] || (Y[5] = oe(() => {
8203
8203
  }, ["stop"]))
8204
8204
  }, [
@@ -20671,8 +20671,8 @@ var O3 = function(t, n) {
20671
20671
  function L3(e) {
20672
20672
  var t, n = e.state, r = e.name, a = e.options, i = n.elements.arrow, s = n.modifiersData.popperOffsets, o = Mn(n.placement), u = Il(o), l = [Yt, un].indexOf(o) >= 0, c = l ? "height" : "width";
20673
20673
  if (!(!i || !s)) {
20674
- var f = O3(a.padding, n), h = vl(i), g = u === "y" ? jt : Yt, p = u === "y" ? on : un, m = n.rects.reference[c] + n.rects.reference[u] - s[u] - n.rects.popper[c], A = s[u] - n.rects.reference[u], E = bi(i), k = E ? u === "y" ? E.clientHeight || 0 : E.clientWidth || 0 : 0, C = m / 2 - A / 2, T = f[g], I = k - h[c] - f[p], S = k / 2 - h[c] / 2 + C, B = La(T, S, I), D = u;
20675
- n.modifiersData[r] = (t = {}, t[D] = B, t.centerOffset = B - S, t);
20674
+ var f = O3(a.padding, n), h = vl(i), g = u === "y" ? jt : Yt, p = u === "y" ? on : un, m = n.rects.reference[c] + n.rects.reference[u] - s[u] - n.rects.popper[c], A = s[u] - n.rects.reference[u], E = bi(i), k = E ? u === "y" ? E.clientHeight || 0 : E.clientWidth || 0 : 0, C = m / 2 - A / 2, T = f[g], I = k - h[c] - f[p], S = k / 2 - h[c] / 2 + C, R = La(T, S, I), D = u;
20675
+ n.modifiersData[r] = (t = {}, t[D] = R, t.centerOffset = R - S, t);
20676
20676
  }
20677
20677
  }
20678
20678
  function R3(e) {
@@ -20707,10 +20707,10 @@ function U3(e) {
20707
20707
  function Ef(e) {
20708
20708
  var t, n = e.popper, r = e.popperRect, a = e.placement, i = e.variation, s = e.offsets, o = e.position, u = e.gpuAcceleration, l = e.adaptive, c = e.roundOffsets, f = e.isFixed, h = c === !0 ? U3(s) : typeof c == "function" ? c(s) : s, g = h.x, p = g === void 0 ? 0 : g, m = h.y, A = m === void 0 ? 0 : m, E = s.hasOwnProperty("x"), k = s.hasOwnProperty("y"), C = Yt, T = jt, I = window;
20709
20709
  if (l) {
20710
- var S = bi(n), B = "clientHeight", D = "clientWidth";
20711
- if (S === En(n) && (S = hr(n), Pn(S).position !== "static" && o === "absolute" && (B = "scrollHeight", D = "scrollWidth")), S = S, a === jt || (a === Yt || a === un) && i === Xa) {
20710
+ var S = bi(n), R = "clientHeight", D = "clientWidth";
20711
+ if (S === En(n) && (S = hr(n), Pn(S).position !== "static" && o === "absolute" && (R = "scrollHeight", D = "scrollWidth")), S = S, a === jt || (a === Yt || a === un) && i === Xa) {
20712
20712
  T = on;
20713
- var N = f && I.visualViewport ? I.visualViewport.height : S[B];
20713
+ var N = f && I.visualViewport ? I.visualViewport.height : S[R];
20714
20714
  A -= N - r.height, A *= u ? 1 : -1;
20715
20715
  }
20716
20716
  if (a === Yt || (a === jt || a === on) && i === Xa) {
@@ -20719,14 +20719,14 @@ function Ef(e) {
20719
20719
  p -= _ - r.width, p *= u ? 1 : -1;
20720
20720
  }
20721
20721
  }
20722
- var F = Object.assign({
20722
+ var U = Object.assign({
20723
20723
  position: o
20724
20724
  }, l && P3);
20725
20725
  if (u) {
20726
20726
  var L;
20727
- return Object.assign({}, F, (L = {}, L[T] = k ? "0" : "", L[C] = E ? "0" : "", L.transform = (I.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + A + "px)" : "translate3d(" + p + "px, " + A + "px, 0)", L));
20727
+ return Object.assign({}, U, (L = {}, L[T] = k ? "0" : "", L[C] = E ? "0" : "", L.transform = (I.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + A + "px)" : "translate3d(" + p + "px, " + A + "px, 0)", L));
20728
20728
  }
20729
- return Object.assign({}, F, (t = {}, t[T] = k ? A + "px" : "", t[C] = E ? p + "px" : "", t.transform = "", t));
20729
+ return Object.assign({}, U, (t = {}, t[T] = k ? A + "px" : "", t[C] = E ? p + "px" : "", t.transform = "", t));
20730
20730
  }
20731
20731
  function F3(e) {
20732
20732
  var t = e.state, n = e.options, r = n.gpuAcceleration, a = r === void 0 ? !0 : r, i = n.adaptive, s = i === void 0 ? !0 : i, o = n.roundOffsets, u = o === void 0 ? !0 : o, l = {
@@ -20920,17 +20920,17 @@ function ei(e, t) {
20920
20920
  reference: T,
20921
20921
  element: E,
20922
20922
  placement: a
20923
- }), S = du(Object.assign({}, E, I)), B = c === va ? S : T, D = {
20924
- top: C.top - B.top + m.top,
20925
- bottom: B.bottom - C.bottom + m.bottom,
20926
- left: C.left - B.left + m.left,
20927
- right: B.right - C.right + m.right
20923
+ }), S = du(Object.assign({}, E, I)), R = c === va ? S : T, D = {
20924
+ top: C.top - R.top + m.top,
20925
+ bottom: R.bottom - C.bottom + m.bottom,
20926
+ left: C.left - R.left + m.left,
20927
+ right: R.right - C.right + m.right
20928
20928
  }, N = e.modifiersData.offset;
20929
20929
  if (c === va && N) {
20930
20930
  var _ = N[a];
20931
- Object.keys(D).forEach(function(F) {
20932
- var L = [un, on].indexOf(F) >= 0 ? 1 : -1, x = [jt, on].indexOf(F) >= 0 ? "y" : "x";
20933
- D[F] += _[x] * L;
20931
+ Object.keys(D).forEach(function(U) {
20932
+ var L = [un, on].indexOf(U) >= 0 ? 1 : -1, M = [jt, on].indexOf(U) >= 0 ? "y" : "x";
20933
+ D[U] += _[M] * L;
20934
20934
  });
20935
20935
  }
20936
20936
  return D;
@@ -20973,28 +20973,28 @@ function Z3(e) {
20973
20973
  flipVariations: p,
20974
20974
  allowedAutoPlacements: m
20975
20975
  }) : Se);
20976
- }, []), I = t.rects.reference, S = t.rects.popper, B = /* @__PURE__ */ new Map(), D = !0, N = T[0], _ = 0; _ < T.length; _++) {
20977
- var F = T[_], L = Mn(F), x = ca(F) === sa, M = [jt, on].indexOf(L) >= 0, Q = M ? "width" : "height", G = ei(t, {
20978
- placement: F,
20976
+ }, []), I = t.rects.reference, S = t.rects.popper, R = /* @__PURE__ */ new Map(), D = !0, N = T[0], _ = 0; _ < T.length; _++) {
20977
+ var U = T[_], L = Mn(U), M = ca(U) === sa, x = [jt, on].indexOf(L) >= 0, Q = x ? "width" : "height", G = ei(t, {
20978
+ placement: U,
20979
20979
  boundary: c,
20980
20980
  rootBoundary: f,
20981
20981
  altBoundary: h,
20982
20982
  padding: l
20983
- }), W = M ? x ? un : Yt : x ? on : jt;
20983
+ }), W = x ? M ? un : Yt : M ? on : jt;
20984
20984
  I[Q] > S[Q] && (W = rs(W));
20985
20985
  var K = rs(W), fe = [];
20986
20986
  if (i && fe.push(G[L] <= 0), o && fe.push(G[W] <= 0, G[K] <= 0), fe.every(function(ae) {
20987
20987
  return ae;
20988
20988
  })) {
20989
- N = F, D = !1;
20989
+ N = U, D = !1;
20990
20990
  break;
20991
20991
  }
20992
- B.set(F, fe);
20992
+ R.set(U, fe);
20993
20993
  }
20994
20994
  if (D)
20995
20995
  for (var Be = p ? 3 : 1, _e = function(Se) {
20996
20996
  var Je = T.find(function(ge) {
20997
- var Z = B.get(ge);
20997
+ var Z = R.get(ge);
20998
20998
  if (Z)
20999
20999
  return Z.slice(0, Se).every(function(he) {
21000
21000
  return he;
@@ -21108,7 +21108,7 @@ function uE(e) {
21108
21108
  rootBoundary: l,
21109
21109
  padding: f,
21110
21110
  altBoundary: c
21111
- }), E = Mn(t.placement), k = ca(t.placement), C = !k, T = Il(E), I = oE(T), S = t.modifiersData.popperOffsets, B = t.rects.reference, D = t.rects.popper, N = typeof m == "function" ? m(Object.assign({}, t.rects, {
21111
+ }), E = Mn(t.placement), k = ca(t.placement), C = !k, T = Il(E), I = oE(T), S = t.modifiersData.popperOffsets, R = t.rects.reference, D = t.rects.popper, N = typeof m == "function" ? m(Object.assign({}, t.rects, {
21112
21112
  placement: t.placement
21113
21113
  })) : m, _ = typeof N == "number" ? {
21114
21114
  mainAxis: N,
@@ -21116,20 +21116,20 @@ function uE(e) {
21116
21116
  } : Object.assign({
21117
21117
  mainAxis: 0,
21118
21118
  altAxis: 0
21119
- }, N), F = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, L = {
21119
+ }, N), U = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, L = {
21120
21120
  x: 0,
21121
21121
  y: 0
21122
21122
  };
21123
21123
  if (S) {
21124
21124
  if (i) {
21125
- var x, M = T === "y" ? jt : Yt, Q = T === "y" ? on : un, G = T === "y" ? "height" : "width", W = S[T], K = W + A[M], fe = W - A[Q], Be = g ? -D[G] / 2 : 0, _e = k === sa ? B[G] : D[G], ze = k === sa ? -D[G] : -B[G], re = t.elements.arrow, ae = g && re ? vl(re) : {
21125
+ var M, x = T === "y" ? jt : Yt, Q = T === "y" ? on : un, G = T === "y" ? "height" : "width", W = S[T], K = W + A[x], fe = W - A[Q], Be = g ? -D[G] / 2 : 0, _e = k === sa ? R[G] : D[G], ze = k === sa ? -D[G] : -R[G], re = t.elements.arrow, ae = g && re ? vl(re) : {
21126
21126
  width: 0,
21127
21127
  height: 0
21128
- }, Se = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : p1(), Je = Se[M], ge = Se[Q], Z = La(0, B[G], ae[G]), he = C ? B[G] / 2 - Be - Z - Je - _.mainAxis : _e - Z - Je - _.mainAxis, Pe = C ? -B[G] / 2 + Be + Z + ge + _.mainAxis : ze + Z + ge + _.mainAxis, pe = t.elements.arrow && bi(t.elements.arrow), Te = pe ? T === "y" ? pe.clientTop || 0 : pe.clientLeft || 0 : 0, Ue = (x = F == null ? void 0 : F[T]) != null ? x : 0, Ae = W + he - Ue - Te, ct = W + Pe - Ue, ce = La(g ? ys(K, Ae) : K, W, g ? Mr(fe, ct) : fe);
21128
+ }, Se = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : p1(), Je = Se[x], ge = Se[Q], Z = La(0, R[G], ae[G]), he = C ? R[G] / 2 - Be - Z - Je - _.mainAxis : _e - Z - Je - _.mainAxis, Pe = C ? -R[G] / 2 + Be + Z + ge + _.mainAxis : ze + Z + ge + _.mainAxis, pe = t.elements.arrow && bi(t.elements.arrow), Te = pe ? T === "y" ? pe.clientTop || 0 : pe.clientLeft || 0 : 0, Ue = (M = U == null ? void 0 : U[T]) != null ? M : 0, Ae = W + he - Ue - Te, ct = W + Pe - Ue, ce = La(g ? ys(K, Ae) : K, W, g ? Mr(fe, ct) : fe);
21129
21129
  S[T] = ce, L[T] = ce - W;
21130
21130
  }
21131
21131
  if (o) {
21132
- var nt, Ge = T === "x" ? jt : Yt, ft = T === "x" ? on : un, Qe = S[I], dt = I === "y" ? "height" : "width", mr = Qe + A[Ge], zr = Qe - A[ft], Bt = [jt, Yt].indexOf(E) !== -1, kt = (nt = F == null ? void 0 : F[I]) != null ? nt : 0, Un = Bt ? mr : Qe - B[dt] - D[dt] - kt + _.altAxis, Ci = Bt ? Qe + B[dt] + D[dt] - kt - _.altAxis : zr, Ni = g && Bt ? D3(Un, Qe, Ci) : La(g ? Un : mr, Qe, g ? Ci : zr);
21132
+ var nt, Ge = T === "x" ? jt : Yt, ft = T === "x" ? on : un, Qe = S[I], dt = I === "y" ? "height" : "width", mr = Qe + A[Ge], zr = Qe - A[ft], Bt = [jt, Yt].indexOf(E) !== -1, kt = (nt = U == null ? void 0 : U[I]) != null ? nt : 0, Un = Bt ? mr : Qe - R[dt] - D[dt] - kt + _.altAxis, Ci = Bt ? Qe + R[dt] + D[dt] - kt - _.altAxis : zr, Ni = g && Bt ? D3(Un, Qe, Ci) : La(g ? Un : mr, Qe, g ? Ci : zr);
21133
21133
  S[I] = Ni, L[I] = Ni - Qe;
21134
21134
  }
21135
21135
  t.modifiersData[r] = L;
@@ -21276,7 +21276,7 @@ function AE(e) {
21276
21276
  c.reset = !1, T = -1;
21277
21277
  continue;
21278
21278
  }
21279
- var I = c.orderedModifiers[T], S = I.fn, B = I.options, D = B === void 0 ? {} : B, N = I.name;
21279
+ var I = c.orderedModifiers[T], S = I.fn, R = I.options, D = R === void 0 ? {} : R, N = I.name;
21280
21280
  typeof S == "function" && (c = S({
21281
21281
  state: c,
21282
21282
  options: D,
@@ -21432,30 +21432,30 @@ const vE = Ne({
21432
21432
  class: "v3-no-result"
21433
21433
  };
21434
21434
  function ME(e, t, n, r, a, i) {
21435
- return O(), U("div", IE, [
21435
+ return O(), F("div", IE, [
21436
21436
  b("div", {
21437
21437
  ref: "bodyInner",
21438
21438
  class: X([e.platform, "v3-body-inner"])
21439
21439
  }, [
21440
- e.orderedKeys.length ? (O(!0), U(Tt, { key: 0 }, Lt(e.orderedKeys, (s) => (O(), U("div", {
21440
+ e.orderedKeys.length ? (O(!0), F(Tt, { key: 0 }, Lt(e.orderedKeys, (s) => (O(), F("div", {
21441
21441
  id: s,
21442
21442
  key: s,
21443
21443
  class: "v3-group"
21444
21444
  }, [
21445
- e.hasGroupNames ? lt((O(), U("h5", {
21445
+ e.hasGroupNames ? lt((O(), F("h5", {
21446
21446
  key: 0,
21447
21447
  class: X(e.isSticky ? "v3-sticky" : "")
21448
21448
  }, we(e.groupNames[s]), 3)), [
21449
21449
  [Qa, e.emojis[s]]
21450
21450
  ]) : te("", !0),
21451
21451
  lt(b("div", wE, [
21452
- (O(!0), U(Tt, null, Lt(e.emojis[s], (o) => (O(), U("button", {
21452
+ (O(!0), F(Tt, null, Lt(e.emojis[s], (o) => (O(), F("button", {
21453
21453
  key: o.r,
21454
21454
  type: "button",
21455
21455
  onMouseenter: (u) => e.handleMouseEnter(o),
21456
21456
  onClick: (u) => e.handleClick(o)
21457
21457
  }, [
21458
- e.native ? (O(), U("span", NE, we(e.unicodeToEmoji(o.r)), 1)) : (O(), U("img", {
21458
+ e.native ? (O(), F("span", NE, we(e.unicodeToEmoji(o.r)), 1)) : (O(), F("img", {
21459
21459
  key: 1,
21460
21460
  src: e.EMOJI_REMOTE_SRC + `/${o.r}.png`,
21461
21461
  alt: o.n[0],
@@ -21465,7 +21465,7 @@ function ME(e, t, n, r, a, i) {
21465
21465
  ], 512), [
21466
21466
  [Qa, e.emojis[s]]
21467
21467
  ])
21468
- ], 8, kE))), 128)) : (O(), U("span", xE, " No emoji has been found! "))
21468
+ ], 8, kE))), 128)) : (O(), F("span", xE, " No emoji has been found! "))
21469
21469
  ], 2)
21470
21470
  ]);
21471
21471
  }
@@ -21524,9 +21524,9 @@ const HE = Ne({
21524
21524
  class: "v3-search"
21525
21525
  }, GE = ["placeholder"];
21526
21526
  function qE(e, t, n, r, a, i) {
21527
- return e.hasGroupIcons || e.hasSearch ? (O(), U("div", zE, [
21528
- e.hasGroupIcons ? (O(), U("div", jE, [
21529
- (O(!0), U(Tt, null, Lt(e.orderedGroups, (s) => (O(), U("button", {
21527
+ return e.hasGroupIcons || e.hasSearch ? (O(), F("div", zE, [
21528
+ e.hasGroupIcons ? (O(), F("div", jE, [
21529
+ (O(!0), F(Tt, null, Lt(e.orderedGroups, (s) => (O(), F("button", {
21530
21530
  key: s.key,
21531
21531
  type: "button",
21532
21532
  class: X(["v3-group", {
@@ -21545,8 +21545,8 @@ function qE(e, t, n, r, a, i) {
21545
21545
  ], 8, QE)
21546
21546
  ], 10, YE))), 128))
21547
21547
  ])) : te("", !0),
21548
- e.hasGroupIcons && e.hasSearch ? (O(), U("div", WE)) : te("", !0),
21549
- e.hasSearch ? (O(), U("div", $E, [
21548
+ e.hasGroupIcons && e.hasSearch ? (O(), F("div", WE)) : te("", !0),
21549
+ e.hasSearch ? (O(), F("div", $E, [
21550
21550
  lt(b("input", {
21551
21551
  "onUpdate:modelValue": t[0] || (t[0] = (s) => e.searchValue = s),
21552
21552
  type: "text",
@@ -21601,7 +21601,7 @@ const JE = Ne({
21601
21601
  }
21602
21602
  }), ZE = { class: "v3-foot-left" }, XE = { key: 0 }, ey = ["alt", "src"], ty = { class: "v3-text" }, ny = { class: "v3-text" }, ry = ["onClick"];
21603
21603
  function ay(e, t, n, r, a, i) {
21604
- return O(), U("div", {
21604
+ return O(), F("div", {
21605
21605
  class: "v3-footer",
21606
21606
  onMouseleave: t[2] || (t[2] = (s) => e.updateSkinToneState(!1))
21607
21607
  }, [
@@ -21609,7 +21609,7 @@ function ay(e, t, n, r, a, i) {
21609
21609
  b("span", {
21610
21610
  class: X([e.platform, "v3-icon"])
21611
21611
  }, [
21612
- e.native || e.hasError ? (O(), U("span", XE, we(e.unicodeToEmoji(e.emoji.r)), 1)) : (O(), U("img", {
21612
+ e.native || e.hasError ? (O(), F("span", XE, we(e.unicodeToEmoji(e.emoji.r)), 1)) : (O(), F("img", {
21613
21613
  key: 1,
21614
21614
  alt: e.unicodeToEmoji(e.emoji.r),
21615
21615
  src: e.emoji.src,
@@ -21618,7 +21618,7 @@ function ay(e, t, n, r, a, i) {
21618
21618
  ], 2),
21619
21619
  b("span", ty, " :" + we(e.emoji[e.EMOJI_NAME_KEY][1] || e.emoji[e.EMOJI_NAME_KEY][0]) + ": ", 1)
21620
21620
  ]),
21621
- e.hasSkinTones ? (O(), U(Tt, { key: 0 }, [
21621
+ e.hasSkinTones ? (O(), F(Tt, { key: 0 }, [
21622
21622
  b("button", {
21623
21623
  type: "button",
21624
21624
  class: "v3-tone",
@@ -21632,7 +21632,7 @@ function ay(e, t, n, r, a, i) {
21632
21632
  b("div", {
21633
21633
  class: X([e.skinTone ? "v3-is-open" : "", "v3-skin-tones"])
21634
21634
  }, [
21635
- (O(!0), U(Tt, null, Lt(e.SKIN_TONES, (s) => (O(), U("button", {
21635
+ (O(!0), F(Tt, null, Lt(e.SKIN_TONES, (s) => (O(), F("button", {
21636
21636
  key: s,
21637
21637
  type: "button",
21638
21638
  class: X(["v3-skin-tone-" + s, "v3-skin-tone"]),
@@ -21744,9 +21744,9 @@ const sy = Ne({
21744
21744
  }, uy = { class: "v3-input-picker-root" }, ly = ["value"], cy = ["value"], fy = ["src"];
21745
21745
  function dy(e, t, n, r, a, i) {
21746
21746
  const s = Ji("Header"), o = Ji("Body"), u = Ji("Footer");
21747
- return e.isInputType ? (O(), U("div", oy, [
21747
+ return e.isInputType ? (O(), F("div", oy, [
21748
21748
  b("div", uy, [
21749
- e.type === "input" ? (O(), U("input", {
21749
+ e.type === "input" ? (O(), F("input", {
21750
21750
  key: 0,
21751
21751
  ref: "elem",
21752
21752
  value: e.input,
@@ -21754,7 +21754,7 @@ function dy(e, t, n, r, a, i) {
21754
21754
  class: "v3-emoji-picker-input",
21755
21755
  onInput: t[0] || (t[0] = (...l) => e.onChangeText && e.onChangeText(...l)),
21756
21756
  onBlur: t[1] || (t[1] = (...l) => e.updateCursor && e.updateCursor(...l))
21757
- }, null, 40, ly)) : (O(), U("textarea", {
21757
+ }, null, 40, ly)) : (O(), F("textarea", {
21758
21758
  key: 1,
21759
21759
  ref: "elem",
21760
21760
  value: e.input,
@@ -21786,7 +21786,7 @@ function dy(e, t, n, r, a, i) {
21786
21786
  ], 2)
21787
21787
  ], 2)
21788
21788
  ])
21789
- ])) : (O(), U("div", {
21789
+ ])) : (O(), F("div", {
21790
21790
  key: 1,
21791
21791
  class: X(["v3-emoji-picker", "v3-color-theme-" + e.colorTheme])
21792
21792
  }, [
@@ -21962,7 +21962,7 @@ const my = {
21962
21962
  };
21963
21963
  return gt(() => n.title, (g) => {
21964
21964
  g !== a.value && (a.value = g || "");
21965
- }), (g, p) => (O(), U("div", {
21965
+ }), (g, p) => (O(), F("div", {
21966
21966
  class: "document-title-wrapper",
21967
21967
  onMouseenter: p[4] || (p[4] = (m) => i.value = !0),
21968
21968
  onMouseleave: p[5] || (p[5] = (m) => i.value = !1)
@@ -21980,7 +21980,7 @@ const my = {
21980
21980
  lt(b("div", {
21981
21981
  class: X(["title-icon-actions", { "is-active": s.value || o.value, "is-dark": e.theme === "dark" }])
21982
21982
  }, [
21983
- e.backlinks && e.backlinks.length > 0 ? (O(), U("button", {
21983
+ e.backlinks && e.backlinks.length > 0 ? (O(), F("button", {
21984
21984
  key: 0,
21985
21985
  class: "title-action-btn backlink-btn",
21986
21986
  onClick: oe(c, ["stop", "prevent"]),
@@ -22006,7 +22006,7 @@ const my = {
22006
22006
  ], 2), [
22007
22007
  [Qa, e.editable && (i.value || s.value || o.value)]
22008
22008
  ]),
22009
- o.value ? (O(), U("div", yy, [
22009
+ o.value ? (O(), F("div", yy, [
22010
22010
  b("div", {
22011
22011
  class: "title-picker-overlay",
22012
22012
  onClick: p[2] || (p[2] = (m) => o.value = !1)
@@ -22014,7 +22014,7 @@ const my = {
22014
22014
  b("div", Ty, [
22015
22015
  p[7] || (p[7] = b("div", { class: "backlinks-header" }, "链接到此页面", -1)),
22016
22016
  b("div", vy, [
22017
- (O(!0), U(Tt, null, Lt(e.backlinks, (m) => (O(), U("div", {
22017
+ (O(!0), F(Tt, null, Lt(e.backlinks, (m) => (O(), F("div", {
22018
22018
  key: m.id,
22019
22019
  class: "backlink-item",
22020
22020
  onClick: (A) => f(m.id)
@@ -22028,7 +22028,7 @@ const my = {
22028
22028
  ])
22029
22029
  ])
22030
22030
  ])) : te("", !0),
22031
- s.value ? (O(), U("div", wy, [
22031
+ s.value ? (O(), F("div", wy, [
22032
22032
  b("div", {
22033
22033
  class: "title-picker-overlay",
22034
22034
  onClick: p[3] || (p[3] = (m) => s.value = !1)
@@ -25664,138 +25664,138 @@ var Vt;
25664
25664
  (function(e) {
25665
25665
  e.NO_QUIRKS = "no-quirks", e.QUIRKS = "quirks", e.LIMITED_QUIRKS = "limited-quirks";
25666
25666
  })(Vt || (Vt = {}));
25667
- var R;
25667
+ var B;
25668
25668
  (function(e) {
25669
25669
  e.A = "a", e.ADDRESS = "address", e.ANNOTATION_XML = "annotation-xml", e.APPLET = "applet", e.AREA = "area", e.ARTICLE = "article", e.ASIDE = "aside", e.B = "b", e.BASE = "base", e.BASEFONT = "basefont", e.BGSOUND = "bgsound", e.BIG = "big", e.BLOCKQUOTE = "blockquote", e.BODY = "body", e.BR = "br", e.BUTTON = "button", e.CAPTION = "caption", e.CENTER = "center", e.CODE = "code", e.COL = "col", e.COLGROUP = "colgroup", e.DD = "dd", e.DESC = "desc", e.DETAILS = "details", e.DIALOG = "dialog", e.DIR = "dir", e.DIV = "div", e.DL = "dl", e.DT = "dt", e.EM = "em", e.EMBED = "embed", e.FIELDSET = "fieldset", e.FIGCAPTION = "figcaption", e.FIGURE = "figure", e.FONT = "font", e.FOOTER = "footer", e.FOREIGN_OBJECT = "foreignObject", e.FORM = "form", e.FRAME = "frame", e.FRAMESET = "frameset", e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e.HEAD = "head", e.HEADER = "header", e.HGROUP = "hgroup", e.HR = "hr", e.HTML = "html", e.I = "i", e.IMG = "img", e.IMAGE = "image", e.INPUT = "input", e.IFRAME = "iframe", e.KEYGEN = "keygen", e.LABEL = "label", e.LI = "li", e.LINK = "link", e.LISTING = "listing", e.MAIN = "main", e.MALIGNMARK = "malignmark", e.MARQUEE = "marquee", e.MATH = "math", e.MENU = "menu", e.META = "meta", e.MGLYPH = "mglyph", e.MI = "mi", e.MO = "mo", e.MN = "mn", e.MS = "ms", e.MTEXT = "mtext", e.NAV = "nav", e.NOBR = "nobr", e.NOFRAMES = "noframes", e.NOEMBED = "noembed", e.NOSCRIPT = "noscript", e.OBJECT = "object", e.OL = "ol", e.OPTGROUP = "optgroup", e.OPTION = "option", e.P = "p", e.PARAM = "param", e.PLAINTEXT = "plaintext", e.PRE = "pre", e.RB = "rb", e.RP = "rp", e.RT = "rt", e.RTC = "rtc", e.RUBY = "ruby", e.S = "s", e.SCRIPT = "script", e.SEARCH = "search", e.SECTION = "section", e.SELECT = "select", e.SOURCE = "source", e.SMALL = "small", e.SPAN = "span", e.STRIKE = "strike", e.STRONG = "strong", e.STYLE = "style", e.SUB = "sub", e.SUMMARY = "summary", e.SUP = "sup", e.TABLE = "table", e.TBODY = "tbody", e.TEMPLATE = "template", e.TEXTAREA = "textarea", e.TFOOT = "tfoot", e.TD = "td", e.TH = "th", e.THEAD = "thead", e.TITLE = "title", e.TR = "tr", e.TRACK = "track", e.TT = "tt", e.U = "u", e.UL = "ul", e.SVG = "svg", e.VAR = "var", e.WBR = "wbr", e.XMP = "xmp";
25670
- })(R || (R = {}));
25670
+ })(B || (B = {}));
25671
25671
  var d;
25672
25672
  (function(e) {
25673
25673
  e[e.UNKNOWN = 0] = "UNKNOWN", e[e.A = 1] = "A", e[e.ADDRESS = 2] = "ADDRESS", e[e.ANNOTATION_XML = 3] = "ANNOTATION_XML", e[e.APPLET = 4] = "APPLET", e[e.AREA = 5] = "AREA", e[e.ARTICLE = 6] = "ARTICLE", e[e.ASIDE = 7] = "ASIDE", e[e.B = 8] = "B", e[e.BASE = 9] = "BASE", e[e.BASEFONT = 10] = "BASEFONT", e[e.BGSOUND = 11] = "BGSOUND", e[e.BIG = 12] = "BIG", e[e.BLOCKQUOTE = 13] = "BLOCKQUOTE", e[e.BODY = 14] = "BODY", e[e.BR = 15] = "BR", e[e.BUTTON = 16] = "BUTTON", e[e.CAPTION = 17] = "CAPTION", e[e.CENTER = 18] = "CENTER", e[e.CODE = 19] = "CODE", e[e.COL = 20] = "COL", e[e.COLGROUP = 21] = "COLGROUP", e[e.DD = 22] = "DD", e[e.DESC = 23] = "DESC", e[e.DETAILS = 24] = "DETAILS", e[e.DIALOG = 25] = "DIALOG", e[e.DIR = 26] = "DIR", e[e.DIV = 27] = "DIV", e[e.DL = 28] = "DL", e[e.DT = 29] = "DT", e[e.EM = 30] = "EM", e[e.EMBED = 31] = "EMBED", e[e.FIELDSET = 32] = "FIELDSET", e[e.FIGCAPTION = 33] = "FIGCAPTION", e[e.FIGURE = 34] = "FIGURE", e[e.FONT = 35] = "FONT", e[e.FOOTER = 36] = "FOOTER", e[e.FOREIGN_OBJECT = 37] = "FOREIGN_OBJECT", e[e.FORM = 38] = "FORM", e[e.FRAME = 39] = "FRAME", e[e.FRAMESET = 40] = "FRAMESET", e[e.H1 = 41] = "H1", e[e.H2 = 42] = "H2", e[e.H3 = 43] = "H3", e[e.H4 = 44] = "H4", e[e.H5 = 45] = "H5", e[e.H6 = 46] = "H6", e[e.HEAD = 47] = "HEAD", e[e.HEADER = 48] = "HEADER", e[e.HGROUP = 49] = "HGROUP", e[e.HR = 50] = "HR", e[e.HTML = 51] = "HTML", e[e.I = 52] = "I", e[e.IMG = 53] = "IMG", e[e.IMAGE = 54] = "IMAGE", e[e.INPUT = 55] = "INPUT", e[e.IFRAME = 56] = "IFRAME", e[e.KEYGEN = 57] = "KEYGEN", e[e.LABEL = 58] = "LABEL", e[e.LI = 59] = "LI", e[e.LINK = 60] = "LINK", e[e.LISTING = 61] = "LISTING", e[e.MAIN = 62] = "MAIN", e[e.MALIGNMARK = 63] = "MALIGNMARK", e[e.MARQUEE = 64] = "MARQUEE", e[e.MATH = 65] = "MATH", e[e.MENU = 66] = "MENU", e[e.META = 67] = "META", e[e.MGLYPH = 68] = "MGLYPH", e[e.MI = 69] = "MI", e[e.MO = 70] = "MO", e[e.MN = 71] = "MN", e[e.MS = 72] = "MS", e[e.MTEXT = 73] = "MTEXT", e[e.NAV = 74] = "NAV", e[e.NOBR = 75] = "NOBR", e[e.NOFRAMES = 76] = "NOFRAMES", e[e.NOEMBED = 77] = "NOEMBED", e[e.NOSCRIPT = 78] = "NOSCRIPT", e[e.OBJECT = 79] = "OBJECT", e[e.OL = 80] = "OL", e[e.OPTGROUP = 81] = "OPTGROUP", e[e.OPTION = 82] = "OPTION", e[e.P = 83] = "P", e[e.PARAM = 84] = "PARAM", e[e.PLAINTEXT = 85] = "PLAINTEXT", e[e.PRE = 86] = "PRE", e[e.RB = 87] = "RB", e[e.RP = 88] = "RP", e[e.RT = 89] = "RT", e[e.RTC = 90] = "RTC", e[e.RUBY = 91] = "RUBY", e[e.S = 92] = "S", e[e.SCRIPT = 93] = "SCRIPT", e[e.SEARCH = 94] = "SEARCH", e[e.SECTION = 95] = "SECTION", e[e.SELECT = 96] = "SELECT", e[e.SOURCE = 97] = "SOURCE", e[e.SMALL = 98] = "SMALL", e[e.SPAN = 99] = "SPAN", e[e.STRIKE = 100] = "STRIKE", e[e.STRONG = 101] = "STRONG", e[e.STYLE = 102] = "STYLE", e[e.SUB = 103] = "SUB", e[e.SUMMARY = 104] = "SUMMARY", e[e.SUP = 105] = "SUP", e[e.TABLE = 106] = "TABLE", e[e.TBODY = 107] = "TBODY", e[e.TEMPLATE = 108] = "TEMPLATE", e[e.TEXTAREA = 109] = "TEXTAREA", e[e.TFOOT = 110] = "TFOOT", e[e.TD = 111] = "TD", e[e.TH = 112] = "TH", e[e.THEAD = 113] = "THEAD", e[e.TITLE = 114] = "TITLE", e[e.TR = 115] = "TR", e[e.TRACK = 116] = "TRACK", e[e.TT = 117] = "TT", e[e.U = 118] = "U", e[e.UL = 119] = "UL", e[e.SVG = 120] = "SVG", e[e.VAR = 121] = "VAR", e[e.WBR = 122] = "WBR", e[e.XMP = 123] = "XMP";
25674
25674
  })(d || (d = {}));
25675
25675
  const rv = /* @__PURE__ */ new Map([
25676
- [R.A, d.A],
25677
- [R.ADDRESS, d.ADDRESS],
25678
- [R.ANNOTATION_XML, d.ANNOTATION_XML],
25679
- [R.APPLET, d.APPLET],
25680
- [R.AREA, d.AREA],
25681
- [R.ARTICLE, d.ARTICLE],
25682
- [R.ASIDE, d.ASIDE],
25683
- [R.B, d.B],
25684
- [R.BASE, d.BASE],
25685
- [R.BASEFONT, d.BASEFONT],
25686
- [R.BGSOUND, d.BGSOUND],
25687
- [R.BIG, d.BIG],
25688
- [R.BLOCKQUOTE, d.BLOCKQUOTE],
25689
- [R.BODY, d.BODY],
25690
- [R.BR, d.BR],
25691
- [R.BUTTON, d.BUTTON],
25692
- [R.CAPTION, d.CAPTION],
25693
- [R.CENTER, d.CENTER],
25694
- [R.CODE, d.CODE],
25695
- [R.COL, d.COL],
25696
- [R.COLGROUP, d.COLGROUP],
25697
- [R.DD, d.DD],
25698
- [R.DESC, d.DESC],
25699
- [R.DETAILS, d.DETAILS],
25700
- [R.DIALOG, d.DIALOG],
25701
- [R.DIR, d.DIR],
25702
- [R.DIV, d.DIV],
25703
- [R.DL, d.DL],
25704
- [R.DT, d.DT],
25705
- [R.EM, d.EM],
25706
- [R.EMBED, d.EMBED],
25707
- [R.FIELDSET, d.FIELDSET],
25708
- [R.FIGCAPTION, d.FIGCAPTION],
25709
- [R.FIGURE, d.FIGURE],
25710
- [R.FONT, d.FONT],
25711
- [R.FOOTER, d.FOOTER],
25712
- [R.FOREIGN_OBJECT, d.FOREIGN_OBJECT],
25713
- [R.FORM, d.FORM],
25714
- [R.FRAME, d.FRAME],
25715
- [R.FRAMESET, d.FRAMESET],
25716
- [R.H1, d.H1],
25717
- [R.H2, d.H2],
25718
- [R.H3, d.H3],
25719
- [R.H4, d.H4],
25720
- [R.H5, d.H5],
25721
- [R.H6, d.H6],
25722
- [R.HEAD, d.HEAD],
25723
- [R.HEADER, d.HEADER],
25724
- [R.HGROUP, d.HGROUP],
25725
- [R.HR, d.HR],
25726
- [R.HTML, d.HTML],
25727
- [R.I, d.I],
25728
- [R.IMG, d.IMG],
25729
- [R.IMAGE, d.IMAGE],
25730
- [R.INPUT, d.INPUT],
25731
- [R.IFRAME, d.IFRAME],
25732
- [R.KEYGEN, d.KEYGEN],
25733
- [R.LABEL, d.LABEL],
25734
- [R.LI, d.LI],
25735
- [R.LINK, d.LINK],
25736
- [R.LISTING, d.LISTING],
25737
- [R.MAIN, d.MAIN],
25738
- [R.MALIGNMARK, d.MALIGNMARK],
25739
- [R.MARQUEE, d.MARQUEE],
25740
- [R.MATH, d.MATH],
25741
- [R.MENU, d.MENU],
25742
- [R.META, d.META],
25743
- [R.MGLYPH, d.MGLYPH],
25744
- [R.MI, d.MI],
25745
- [R.MO, d.MO],
25746
- [R.MN, d.MN],
25747
- [R.MS, d.MS],
25748
- [R.MTEXT, d.MTEXT],
25749
- [R.NAV, d.NAV],
25750
- [R.NOBR, d.NOBR],
25751
- [R.NOFRAMES, d.NOFRAMES],
25752
- [R.NOEMBED, d.NOEMBED],
25753
- [R.NOSCRIPT, d.NOSCRIPT],
25754
- [R.OBJECT, d.OBJECT],
25755
- [R.OL, d.OL],
25756
- [R.OPTGROUP, d.OPTGROUP],
25757
- [R.OPTION, d.OPTION],
25758
- [R.P, d.P],
25759
- [R.PARAM, d.PARAM],
25760
- [R.PLAINTEXT, d.PLAINTEXT],
25761
- [R.PRE, d.PRE],
25762
- [R.RB, d.RB],
25763
- [R.RP, d.RP],
25764
- [R.RT, d.RT],
25765
- [R.RTC, d.RTC],
25766
- [R.RUBY, d.RUBY],
25767
- [R.S, d.S],
25768
- [R.SCRIPT, d.SCRIPT],
25769
- [R.SEARCH, d.SEARCH],
25770
- [R.SECTION, d.SECTION],
25771
- [R.SELECT, d.SELECT],
25772
- [R.SOURCE, d.SOURCE],
25773
- [R.SMALL, d.SMALL],
25774
- [R.SPAN, d.SPAN],
25775
- [R.STRIKE, d.STRIKE],
25776
- [R.STRONG, d.STRONG],
25777
- [R.STYLE, d.STYLE],
25778
- [R.SUB, d.SUB],
25779
- [R.SUMMARY, d.SUMMARY],
25780
- [R.SUP, d.SUP],
25781
- [R.TABLE, d.TABLE],
25782
- [R.TBODY, d.TBODY],
25783
- [R.TEMPLATE, d.TEMPLATE],
25784
- [R.TEXTAREA, d.TEXTAREA],
25785
- [R.TFOOT, d.TFOOT],
25786
- [R.TD, d.TD],
25787
- [R.TH, d.TH],
25788
- [R.THEAD, d.THEAD],
25789
- [R.TITLE, d.TITLE],
25790
- [R.TR, d.TR],
25791
- [R.TRACK, d.TRACK],
25792
- [R.TT, d.TT],
25793
- [R.U, d.U],
25794
- [R.UL, d.UL],
25795
- [R.SVG, d.SVG],
25796
- [R.VAR, d.VAR],
25797
- [R.WBR, d.WBR],
25798
- [R.XMP, d.XMP]
25676
+ [B.A, d.A],
25677
+ [B.ADDRESS, d.ADDRESS],
25678
+ [B.ANNOTATION_XML, d.ANNOTATION_XML],
25679
+ [B.APPLET, d.APPLET],
25680
+ [B.AREA, d.AREA],
25681
+ [B.ARTICLE, d.ARTICLE],
25682
+ [B.ASIDE, d.ASIDE],
25683
+ [B.B, d.B],
25684
+ [B.BASE, d.BASE],
25685
+ [B.BASEFONT, d.BASEFONT],
25686
+ [B.BGSOUND, d.BGSOUND],
25687
+ [B.BIG, d.BIG],
25688
+ [B.BLOCKQUOTE, d.BLOCKQUOTE],
25689
+ [B.BODY, d.BODY],
25690
+ [B.BR, d.BR],
25691
+ [B.BUTTON, d.BUTTON],
25692
+ [B.CAPTION, d.CAPTION],
25693
+ [B.CENTER, d.CENTER],
25694
+ [B.CODE, d.CODE],
25695
+ [B.COL, d.COL],
25696
+ [B.COLGROUP, d.COLGROUP],
25697
+ [B.DD, d.DD],
25698
+ [B.DESC, d.DESC],
25699
+ [B.DETAILS, d.DETAILS],
25700
+ [B.DIALOG, d.DIALOG],
25701
+ [B.DIR, d.DIR],
25702
+ [B.DIV, d.DIV],
25703
+ [B.DL, d.DL],
25704
+ [B.DT, d.DT],
25705
+ [B.EM, d.EM],
25706
+ [B.EMBED, d.EMBED],
25707
+ [B.FIELDSET, d.FIELDSET],
25708
+ [B.FIGCAPTION, d.FIGCAPTION],
25709
+ [B.FIGURE, d.FIGURE],
25710
+ [B.FONT, d.FONT],
25711
+ [B.FOOTER, d.FOOTER],
25712
+ [B.FOREIGN_OBJECT, d.FOREIGN_OBJECT],
25713
+ [B.FORM, d.FORM],
25714
+ [B.FRAME, d.FRAME],
25715
+ [B.FRAMESET, d.FRAMESET],
25716
+ [B.H1, d.H1],
25717
+ [B.H2, d.H2],
25718
+ [B.H3, d.H3],
25719
+ [B.H4, d.H4],
25720
+ [B.H5, d.H5],
25721
+ [B.H6, d.H6],
25722
+ [B.HEAD, d.HEAD],
25723
+ [B.HEADER, d.HEADER],
25724
+ [B.HGROUP, d.HGROUP],
25725
+ [B.HR, d.HR],
25726
+ [B.HTML, d.HTML],
25727
+ [B.I, d.I],
25728
+ [B.IMG, d.IMG],
25729
+ [B.IMAGE, d.IMAGE],
25730
+ [B.INPUT, d.INPUT],
25731
+ [B.IFRAME, d.IFRAME],
25732
+ [B.KEYGEN, d.KEYGEN],
25733
+ [B.LABEL, d.LABEL],
25734
+ [B.LI, d.LI],
25735
+ [B.LINK, d.LINK],
25736
+ [B.LISTING, d.LISTING],
25737
+ [B.MAIN, d.MAIN],
25738
+ [B.MALIGNMARK, d.MALIGNMARK],
25739
+ [B.MARQUEE, d.MARQUEE],
25740
+ [B.MATH, d.MATH],
25741
+ [B.MENU, d.MENU],
25742
+ [B.META, d.META],
25743
+ [B.MGLYPH, d.MGLYPH],
25744
+ [B.MI, d.MI],
25745
+ [B.MO, d.MO],
25746
+ [B.MN, d.MN],
25747
+ [B.MS, d.MS],
25748
+ [B.MTEXT, d.MTEXT],
25749
+ [B.NAV, d.NAV],
25750
+ [B.NOBR, d.NOBR],
25751
+ [B.NOFRAMES, d.NOFRAMES],
25752
+ [B.NOEMBED, d.NOEMBED],
25753
+ [B.NOSCRIPT, d.NOSCRIPT],
25754
+ [B.OBJECT, d.OBJECT],
25755
+ [B.OL, d.OL],
25756
+ [B.OPTGROUP, d.OPTGROUP],
25757
+ [B.OPTION, d.OPTION],
25758
+ [B.P, d.P],
25759
+ [B.PARAM, d.PARAM],
25760
+ [B.PLAINTEXT, d.PLAINTEXT],
25761
+ [B.PRE, d.PRE],
25762
+ [B.RB, d.RB],
25763
+ [B.RP, d.RP],
25764
+ [B.RT, d.RT],
25765
+ [B.RTC, d.RTC],
25766
+ [B.RUBY, d.RUBY],
25767
+ [B.S, d.S],
25768
+ [B.SCRIPT, d.SCRIPT],
25769
+ [B.SEARCH, d.SEARCH],
25770
+ [B.SECTION, d.SECTION],
25771
+ [B.SELECT, d.SELECT],
25772
+ [B.SOURCE, d.SOURCE],
25773
+ [B.SMALL, d.SMALL],
25774
+ [B.SPAN, d.SPAN],
25775
+ [B.STRIKE, d.STRIKE],
25776
+ [B.STRONG, d.STRONG],
25777
+ [B.STYLE, d.STYLE],
25778
+ [B.SUB, d.SUB],
25779
+ [B.SUMMARY, d.SUMMARY],
25780
+ [B.SUP, d.SUP],
25781
+ [B.TABLE, d.TABLE],
25782
+ [B.TBODY, d.TBODY],
25783
+ [B.TEMPLATE, d.TEMPLATE],
25784
+ [B.TEXTAREA, d.TEXTAREA],
25785
+ [B.TFOOT, d.TFOOT],
25786
+ [B.TD, d.TD],
25787
+ [B.TH, d.TH],
25788
+ [B.THEAD, d.THEAD],
25789
+ [B.TITLE, d.TITLE],
25790
+ [B.TR, d.TR],
25791
+ [B.TRACK, d.TRACK],
25792
+ [B.TT, d.TT],
25793
+ [B.U, d.U],
25794
+ [B.UL, d.UL],
25795
+ [B.SVG, d.SVG],
25796
+ [B.VAR, d.VAR],
25797
+ [B.WBR, d.WBR],
25798
+ [B.XMP, d.XMP]
25799
25799
  ]);
25800
25800
  function so(e) {
25801
25801
  var t;
@@ -25891,16 +25891,16 @@ const V = d, av = {
25891
25891
  [$.XML]: /* @__PURE__ */ new Set(),
25892
25892
  [$.XMLNS]: /* @__PURE__ */ new Set()
25893
25893
  }, vu = /* @__PURE__ */ new Set([V.H1, V.H2, V.H3, V.H4, V.H5, V.H6]), iv = /* @__PURE__ */ new Set([
25894
- R.STYLE,
25895
- R.SCRIPT,
25896
- R.XMP,
25897
- R.IFRAME,
25898
- R.NOEMBED,
25899
- R.NOFRAMES,
25900
- R.PLAINTEXT
25894
+ B.STYLE,
25895
+ B.SCRIPT,
25896
+ B.XMP,
25897
+ B.IFRAME,
25898
+ B.NOEMBED,
25899
+ B.NOFRAMES,
25900
+ B.PLAINTEXT
25901
25901
  ]);
25902
25902
  function sv(e, t) {
25903
- return iv.has(e) || t && e === R.NOSCRIPT;
25903
+ return iv.has(e) || t && e === B.NOSCRIPT;
25904
25904
  }
25905
25905
  var v;
25906
25906
  (function(e) {
@@ -28633,7 +28633,7 @@ let vh = class {
28633
28633
  ...Gf,
28634
28634
  ...n
28635
28635
  };
28636
- t ?? (t = r.treeAdapter.createElement(R.TEMPLATE, $.HTML, []));
28636
+ t ?? (t = r.treeAdapter.createElement(B.TEMPLATE, $.HTML, []));
28637
28637
  const a = r.treeAdapter.createElement("documentmock", $.HTML, []), i = new this(r, a, t);
28638
28638
  return i.fragmentContextID === d.TEMPLATE && i.tmplInsertionModeStack.unshift(w.IN_TEMPLATE), i._initTokenizerForFragmentParsing(), i._insertFakeRootElement(), i._resetInsertionMode(), i._findFormInFragmentContext(), i;
28639
28639
  }
@@ -28692,7 +28692,7 @@ let vh = class {
28692
28692
  _findFormInFragmentContext() {
28693
28693
  let t = this.fragmentContext;
28694
28694
  for (; t; ) {
28695
- if (this.treeAdapter.getTagName(t) === R.FORM) {
28695
+ if (this.treeAdapter.getTagName(t) === B.FORM) {
28696
28696
  this.formElement = t;
28697
28697
  break;
28698
28698
  }
@@ -28777,7 +28777,7 @@ let vh = class {
28777
28777
  }
28778
28778
  /** @protected */
28779
28779
  _insertFakeRootElement() {
28780
- const t = this.treeAdapter.createElement(R.HTML, $.HTML, []);
28780
+ const t = this.treeAdapter.createElement(B.HTML, $.HTML, []);
28781
28781
  this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(t, null), this.treeAdapter.appendChild(this.openElements.current, t), this.openElements.push(t, d.HTML);
28782
28782
  }
28783
28783
  /** @protected */
@@ -28826,7 +28826,7 @@ let vh = class {
28826
28826
  if (!this.currentNotInHTML)
28827
28827
  return !1;
28828
28828
  let n, r;
28829
- return this.openElements.stackTop === 0 && this.fragmentContext ? (n = this.fragmentContext, r = this.fragmentContextID) : { current: n, currentTagId: r } = this.openElements, t.tagID === d.SVG && this.treeAdapter.getTagName(n) === R.ANNOTATION_XML && this.treeAdapter.getNamespaceURI(n) === $.MATHML ? !1 : (
28829
+ return this.openElements.stackTop === 0 && this.fragmentContext ? (n = this.fragmentContext, r = this.fragmentContextID) : { current: n, currentTagId: r } = this.openElements, t.tagID === d.SVG && this.treeAdapter.getTagName(n) === B.ANNOTATION_XML && this.treeAdapter.getNamespaceURI(n) === $.MATHML ? !1 : (
28830
28830
  // Check that `current` is not an integration point for HTML or MathML elements.
28831
28831
  this.tokenizer.inForeignNode || // If it _is_ an integration point, then we might have to check that it is not an HTML
28832
28832
  // integration point.
@@ -29629,7 +29629,7 @@ function Xv(e, t) {
29629
29629
  n === d.HEAD || n === d.BODY || n === d.HTML || n === d.BR ? Ua(e, t) : e._err(t, H.endTagWithoutMatchingOpenElement);
29630
29630
  }
29631
29631
  function Ua(e, t) {
29632
- e._insertFakeElement(R.HEAD, d.HEAD), e.headElement = e.openElements.current, e.insertionMode = w.IN_HEAD, e._processToken(t);
29632
+ e._insertFakeElement(B.HEAD, d.HEAD), e.headElement = e.openElements.current, e.insertionMode = w.IN_HEAD, e._processToken(t);
29633
29633
  }
29634
29634
  function yn(e, t) {
29635
29635
  switch (t.tagID) {
@@ -29794,7 +29794,7 @@ function aI(e, t) {
29794
29794
  }
29795
29795
  }
29796
29796
  function za(e, t) {
29797
- e._insertFakeElement(R.BODY, d.BODY), e.insertionMode = w.IN_BODY, oo(e, t);
29797
+ e._insertFakeElement(B.BODY, d.BODY), e.insertionMode = w.IN_BODY, oo(e, t);
29798
29798
  }
29799
29799
  function oo(e, t) {
29800
29800
  switch (t.type) {
@@ -29875,7 +29875,7 @@ function gI(e, t) {
29875
29875
  e.openElements.hasInScope(d.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(d.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, $.HTML), e.framesetOk = !1;
29876
29876
  }
29877
29877
  function pI(e, t) {
29878
- const n = e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);
29878
+ const n = e.activeFormattingElements.getElementEntryInScopeWithTagName(B.A);
29879
29879
  n && ($l(e, t), e.openElements.remove(n.element), e.activeFormattingElements.removeEntry(n)), e._reconstructActiveFormattingElements(), e._insertElement(t, $.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t);
29880
29880
  }
29881
29881
  function mI(e, t) {
@@ -29907,7 +29907,7 @@ function vI(e, t) {
29907
29907
  e.openElements.hasInButtonScope(d.P) && e._closePElement(), e._appendElement(t, $.HTML), e.framesetOk = !1, t.ackSelfClosing = !0;
29908
29908
  }
29909
29909
  function II(e, t) {
29910
- t.tagName = R.IMG, t.tagID = d.IMG, wh(e, t);
29910
+ t.tagName = B.IMG, t.tagID = d.IMG, wh(e, t);
29911
29911
  }
29912
29912
  function kI(e, t) {
29913
29913
  e._insertElement(t, $.HTML), e.skipNextNewLine = !0, e.tokenizer.state = zt.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = !1, e.insertionMode = w.TEXT;
@@ -30170,7 +30170,7 @@ function BI(e) {
30170
30170
  t || (e.formElement = null), (n || t) && e.openElements.hasInScope(d.FORM) && (e.openElements.generateImpliedEndTags(), t ? e.openElements.popUntilTagNamePopped(d.FORM) : n && e.openElements.remove(n));
30171
30171
  }
30172
30172
  function PI(e) {
30173
- e.openElements.hasInButtonScope(d.P) || e._insertFakeElement(R.P, d.P), e._closePElement();
30173
+ e.openElements.hasInButtonScope(d.P) || e._insertFakeElement(B.P, d.P), e._closePElement();
30174
30174
  }
30175
30175
  function UI(e) {
30176
30176
  e.openElements.hasInListItemScope(d.LI) && (e.openElements.generateImpliedEndTagsWithExclusion(d.LI), e.openElements.popUntilTagNamePopped(d.LI));
@@ -30187,7 +30187,7 @@ function zI(e, t) {
30187
30187
  e.openElements.hasInScope(n) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n), e.activeFormattingElements.clearToLastMarker());
30188
30188
  }
30189
30189
  function jI(e) {
30190
- e._reconstructActiveFormattingElements(), e._insertFakeElement(R.BR, d.BR), e.openElements.pop(), e.framesetOk = !1;
30190
+ e._reconstructActiveFormattingElements(), e._insertFakeElement(B.BR, d.BR), e.openElements.pop(), e.framesetOk = !1;
30191
30191
  }
30192
30192
  function Nh(e, t) {
30193
30193
  const n = t.tagName, r = t.tagID;
@@ -30334,13 +30334,13 @@ function WI(e, t) {
30334
30334
  e.openElements.clearBackToTableContext(), e._insertElement(t, $.HTML), e.insertionMode = w.IN_COLUMN_GROUP;
30335
30335
  }
30336
30336
  function $I(e, t) {
30337
- e.openElements.clearBackToTableContext(), e._insertFakeElement(R.COLGROUP, d.COLGROUP), e.insertionMode = w.IN_COLUMN_GROUP, ql(e, t);
30337
+ e.openElements.clearBackToTableContext(), e._insertFakeElement(B.COLGROUP, d.COLGROUP), e.insertionMode = w.IN_COLUMN_GROUP, ql(e, t);
30338
30338
  }
30339
30339
  function GI(e, t) {
30340
30340
  e.openElements.clearBackToTableContext(), e._insertElement(t, $.HTML), e.insertionMode = w.IN_TABLE_BODY;
30341
30341
  }
30342
30342
  function qI(e, t) {
30343
- e.openElements.clearBackToTableContext(), e._insertFakeElement(R.TBODY, d.TBODY), e.insertionMode = w.IN_TABLE_BODY, lo(e, t);
30343
+ e.openElements.clearBackToTableContext(), e._insertFakeElement(B.TBODY, d.TBODY), e.insertionMode = w.IN_TABLE_BODY, lo(e, t);
30344
30344
  }
30345
30345
  function VI(e, t) {
30346
30346
  e.openElements.hasInTableScope(d.TABLE) && (e.openElements.popUntilTagNamePopped(d.TABLE), e._resetInsertionMode(), e._processStartTag(t));
@@ -30518,7 +30518,7 @@ function lo(e, t) {
30518
30518
  }
30519
30519
  case d.TH:
30520
30520
  case d.TD: {
30521
- e.openElements.clearBackToTableBodyContext(), e._insertFakeElement(R.TR, d.TR), e.insertionMode = w.IN_ROW, co(e, t);
30521
+ e.openElements.clearBackToTableBodyContext(), e._insertFakeElement(B.TR, d.TR), e.insertionMode = w.IN_ROW, co(e, t);
30522
30522
  break;
30523
30523
  }
30524
30524
  case d.CAPTION:
@@ -30872,24 +30872,24 @@ const Ek = /* @__PURE__ */ Uh(/["&\u00A0]/g, /* @__PURE__ */ new Map([
30872
30872
  [62, "&gt;"],
30873
30873
  [160, "&nbsp;"]
30874
30874
  ])), Tk = /* @__PURE__ */ new Set([
30875
- R.AREA,
30876
- R.BASE,
30877
- R.BASEFONT,
30878
- R.BGSOUND,
30879
- R.BR,
30880
- R.COL,
30881
- R.EMBED,
30882
- R.FRAME,
30883
- R.HR,
30884
- R.IMG,
30885
- R.INPUT,
30886
- R.KEYGEN,
30887
- R.LINK,
30888
- R.META,
30889
- R.PARAM,
30890
- R.SOURCE,
30891
- R.TRACK,
30892
- R.WBR
30875
+ B.AREA,
30876
+ B.BASE,
30877
+ B.BASEFONT,
30878
+ B.BGSOUND,
30879
+ B.BR,
30880
+ B.COL,
30881
+ B.EMBED,
30882
+ B.FRAME,
30883
+ B.HR,
30884
+ B.IMG,
30885
+ B.INPUT,
30886
+ B.KEYGEN,
30887
+ B.LINK,
30888
+ B.META,
30889
+ B.PARAM,
30890
+ B.SOURCE,
30891
+ B.TRACK,
30892
+ B.WBR
30893
30893
  ]);
30894
30894
  function vk(e, t) {
30895
30895
  return t.treeAdapter.isElementNode(e) && t.treeAdapter.getNamespaceURI(e) === $.HTML && Tk.has(t.treeAdapter.getTagName(e));
@@ -30901,7 +30901,7 @@ function kk(e, t) {
30901
30901
  }
30902
30902
  function wk(e, t) {
30903
30903
  let n = "";
30904
- const r = t.treeAdapter.isElementNode(e) && t.treeAdapter.getTagName(e) === R.TEMPLATE && t.treeAdapter.getNamespaceURI(e) === $.HTML ? t.treeAdapter.getTemplateContent(e) : e, a = t.treeAdapter.getChildNodes(r);
30904
+ const r = t.treeAdapter.isElementNode(e) && t.treeAdapter.getTagName(e) === B.TEMPLATE && t.treeAdapter.getNamespaceURI(e) === $.HTML ? t.treeAdapter.getTemplateContent(e) : e, a = t.treeAdapter.getChildNodes(r);
30905
30905
  if (a)
30906
30906
  for (const i of a)
30907
30907
  n += Fh(i, t);
@@ -32166,7 +32166,7 @@ var Vl = Kh.exports;
32166
32166
  function S(W) {
32167
32167
  return c = W, f.push(c), f.length;
32168
32168
  }
32169
- function B(W) {
32169
+ function R(W) {
32170
32170
  var K = c;
32171
32171
  return f[f.length - 1] = c = W, K;
32172
32172
  }
@@ -32235,13 +32235,13 @@ var Vl = Kh.exports;
32235
32235
  case ":":
32236
32236
  switch (A()) {
32237
32237
  case "name":
32238
- h.name = a.trim(), a = "", B("before-value");
32238
+ h.name = a.trim(), a = "", R("before-value");
32239
32239
  break;
32240
32240
  case "before-selector":
32241
32241
  a += i, _("selector"), S("selector");
32242
32242
  break;
32243
32243
  case "before-value":
32244
- B("value"), a += i;
32244
+ R("value"), a += i;
32245
32245
  break;
32246
32246
  default:
32247
32247
  a += i;
@@ -32253,7 +32253,7 @@ var Vl = Kh.exports;
32253
32253
  case "name":
32254
32254
  case "before-value":
32255
32255
  case "value":
32256
- a.trim().length > 0 && (h.value = a.trim(), N()), B("before-name");
32256
+ a.trim().length > 0 && (h.value = a.trim(), N()), R("before-name");
32257
32257
  break;
32258
32258
  case "value-paren":
32259
32259
  a += i;
@@ -32275,7 +32275,7 @@ var Vl = Kh.exports;
32275
32275
  a += i;
32276
32276
  break;
32277
32277
  }
32278
- h.text = a.trim(), N(), B("before-name"), u = u + 1;
32278
+ h.text = a.trim(), N(), R("before-name"), u = u + 1;
32279
32279
  break;
32280
32280
  case "at-group":
32281
32281
  switch (h.name = a.trim(), h.type) {
@@ -32299,7 +32299,7 @@ var Vl = Kh.exports;
32299
32299
  a += i;
32300
32300
  break;
32301
32301
  case "before-value":
32302
- B("value"), a += i;
32302
+ R("value"), a += i;
32303
32303
  break;
32304
32304
  }
32305
32305
  break;
@@ -32337,10 +32337,10 @@ var Vl = Kh.exports;
32337
32337
  i === "'" && T(-1) !== "\\" && I();
32338
32338
  break;
32339
32339
  case "before-at-value":
32340
- B("at-value"), S(i === '"' ? "double-string" : "single-string");
32340
+ R("at-value"), S(i === '"' ? "double-string" : "single-string");
32341
32341
  break;
32342
32342
  case "before-value":
32343
- B("value"), S(i === '"' ? "double-string" : "single-string");
32343
+ R("value"), S(i === '"' ? "double-string" : "single-string");
32344
32344
  break;
32345
32345
  case "comment":
32346
32346
  break;
@@ -32361,10 +32361,10 @@ var Vl = Kh.exports;
32361
32361
  case "name":
32362
32362
  case "value":
32363
32363
  if (C("*")) {
32364
- var F = k("*/");
32365
- F && D(F + 1);
32364
+ var U = k("*/");
32365
+ U && D(U + 1);
32366
32366
  } else
32367
- A() == "before-value" && B("value"), a += i;
32367
+ A() == "before-value" && R("value"), a += i;
32368
32368
  break;
32369
32369
  default:
32370
32370
  C("*") ? (_("comment"), S("comment"), D()) : a += i;
@@ -32380,7 +32380,7 @@ var Vl = Kh.exports;
32380
32380
  a += i, _("selector"), S("selector");
32381
32381
  break;
32382
32382
  case "before-value":
32383
- B("value"), a += i;
32383
+ R("value"), a += i;
32384
32384
  break;
32385
32385
  default:
32386
32386
  a += i;
@@ -32394,11 +32394,11 @@ var Vl = Kh.exports;
32394
32394
  a += i;
32395
32395
  break;
32396
32396
  case "before-value":
32397
- B("value"), a += i;
32397
+ R("value"), a += i;
32398
32398
  break;
32399
32399
  default:
32400
- for (var L = !1, x, M, Q = 0, G = p.length; !L && Q < G; ++Q)
32401
- M = p[Q], x = M.name || M, E(x) && (L = !0, _(x), S(M.state || "at-group"), D(x.length), M.prefix && (h.prefix = M.prefix), M.type && (h.type = M.type));
32400
+ for (var L = !1, M, x, Q = 0, G = p.length; !L && Q < G; ++Q)
32401
+ x = p[Q], M = x.name || x, E(M) && (L = !0, _(M), S(x.state || "at-group"), D(M.length), x.prefix && (h.prefix = x.prefix), x.type && (h.type = x.type));
32402
32402
  L || (a += i);
32403
32403
  break;
32404
32404
  }
@@ -32409,7 +32409,7 @@ var Vl = Kh.exports;
32409
32409
  S("value-paren");
32410
32410
  break;
32411
32411
  case "before-value":
32412
- B("value");
32412
+ R("value");
32413
32413
  break;
32414
32414
  }
32415
32415
  a += i;
@@ -32420,7 +32420,7 @@ var Vl = Kh.exports;
32420
32420
  I();
32421
32421
  break;
32422
32422
  case "before-value":
32423
- B("value");
32423
+ R("value");
32424
32424
  break;
32425
32425
  }
32426
32426
  a += i;
@@ -32431,13 +32431,13 @@ var Vl = Kh.exports;
32431
32431
  _("selector"), S("selector");
32432
32432
  break;
32433
32433
  case "before-name":
32434
- _("property"), B("name");
32434
+ _("property"), R("name");
32435
32435
  break;
32436
32436
  case "before-value":
32437
- B("value");
32437
+ R("value");
32438
32438
  break;
32439
32439
  case "before-at-value":
32440
- B("at-value");
32440
+ R("at-value");
32441
32441
  break;
32442
32442
  }
32443
32443
  a += i;
@@ -32454,8 +32454,8 @@ var Wh = Qh.exports, $h = { exports: {} };
32454
32454
  var r, a, i, s;
32455
32455
  function o(I, S) {
32456
32456
  S || (S = {}), r = !!S.comments, i = !!S.position, a = 0, s = Array.isArray(I) ? I.slice() : n(I);
32457
- for (var B, D = [], N; N = l(); )
32458
- B = E(N), B && D.push(B);
32457
+ for (var R, D = [], N; N = l(); )
32458
+ R = E(N), R && D.push(R);
32459
32459
  return {
32460
32460
  type: "stylesheet",
32461
32461
  stylesheet: {
@@ -32465,10 +32465,10 @@ var Wh = Qh.exports, $h = { exports: {} };
32465
32465
  }
32466
32466
  function u(I, S) {
32467
32467
  S || (S = {});
32468
- for (var B, D = ["type", "name", "value"], N = {}, _ = 0; _ < D.length; ++_)
32469
- B = D[_], I[B] && (N[B] = S[B] || I[B]);
32468
+ for (var R, D = ["type", "name", "value"], N = {}, _ = 0; _ < D.length; ++_)
32469
+ R = D[_], I[R] && (N[R] = S[R] || I[R]);
32470
32470
  for (D = Object.keys(S), _ = 0; _ < D.length; ++_)
32471
- B = D[_], N[B] || (N[B] = S[B]);
32471
+ R = D[_], N[R] || (N[R] = S[R]);
32472
32472
  return i && (N.position = {
32473
32473
  start: I.start,
32474
32474
  end: I.end
@@ -32510,8 +32510,8 @@ var Wh = Qh.exports, $h = { exports: {} };
32510
32510
  return u(I);
32511
32511
  }
32512
32512
  function A(I) {
32513
- function S(B) {
32514
- return B.trim();
32513
+ function S(R) {
32514
+ return R.trim();
32515
32515
  }
32516
32516
  return u(I, {
32517
32517
  type: "rule",
@@ -32550,9 +32550,9 @@ var Wh = Qh.exports, $h = { exports: {} };
32550
32550
  }
32551
32551
  }
32552
32552
  function k(I) {
32553
- for (var S, B = [], D; (D = l()) && I && I(D); )
32554
- S = E(D), S && B.push(S);
32555
- return D && D.type !== "end" && s.unshift(D), B;
32553
+ for (var S, R = [], D; (D = l()) && I && I(D); )
32554
+ S = E(D), S && R.push(S);
32555
+ return D && D.type !== "end" && s.unshift(D), R;
32556
32556
  }
32557
32557
  function C() {
32558
32558
  return k(function(I) {
@@ -32590,8 +32590,8 @@ var tw = $h.exports, Gh = { exports: {} };
32590
32590
  function f(T) {
32591
32591
  var I = "", S = T.prefix || "";
32592
32592
  T.name && (I = " " + T.name);
32593
- var B = T.type !== "page";
32594
- return "@" + S + T.type + I + o + m(T, B) + s;
32593
+ var R = T.type !== "page";
32594
+ return "@" + S + T.type + I + o + m(T, R) + s;
32595
32595
  }
32596
32596
  function h(T) {
32597
32597
  return n ? "/*" + (T.text || "") + "*/" + s : "";
@@ -32601,14 +32601,14 @@ var tw = $h.exports, Gh = { exports: {} };
32601
32601
  return T.selectors ? I = T.selectors.join("," + s) : (I = "@" + T.type, I += T.name ? " " + T.name : ""), l() + I + o + m(T) + s;
32602
32602
  }
32603
32603
  function p(T, I) {
32604
- return T.reduce(function(S, B) {
32605
- var D = B.type === "comment" ? h(B) : I(B);
32604
+ return T.reduce(function(S, R) {
32605
+ var D = R.type === "comment" ? h(R) : I(R);
32606
32606
  return D && S.push(D), S;
32607
32607
  }, []);
32608
32608
  }
32609
32609
  function m(T, I) {
32610
- var S = T.declarations, B = E;
32611
- return T.rules && (S = T.rules, B = g), S = A(S, B), S && (S = s + S + (I ? "" : s)), "{" + S + l() + "}";
32610
+ var S = T.declarations, R = E;
32611
+ return T.rules && (S = T.rules, R = g), S = A(S, R), S && (S = s + S + (I ? "" : s)), "{" + S + l() + "}";
32612
32612
  }
32613
32613
  function A(T, I) {
32614
32614
  if (!T)
@@ -33174,8 +33174,8 @@ var sd;
33174
33174
  N[N.Legacy = 0] = "Legacy", N[N.Strict = 1] = "Strict", N[N.Attribute = 2] = "Attribute";
33175
33175
  })(h || (e.DecodingMode = h = {}));
33176
33176
  class g {
33177
- constructor(_, F, L) {
33178
- this.decodeTree = _, this.emitCodePoint = F, this.errors = L, this.state = f.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = h.Strict, this.runConsumed = 0;
33177
+ constructor(_, U, L) {
33178
+ this.decodeTree = _, this.emitCodePoint = U, this.errors = L, this.state = f.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = h.Strict, this.runConsumed = 0;
33179
33179
  }
33180
33180
  /** Resets the instance to make it reusable. */
33181
33181
  startEntity(_) {
@@ -33192,18 +33192,18 @@ var sd;
33192
33192
  * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
33193
33193
  * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
33194
33194
  */
33195
- write(_, F) {
33195
+ write(_, U) {
33196
33196
  switch (this.state) {
33197
33197
  case f.EntityStart:
33198
- return _.charCodeAt(F) === i.NUM ? (this.state = f.NumericStart, this.consumed += 1, this.stateNumericStart(_, F + 1)) : (this.state = f.NamedEntity, this.stateNamedEntity(_, F));
33198
+ return _.charCodeAt(U) === i.NUM ? (this.state = f.NumericStart, this.consumed += 1, this.stateNumericStart(_, U + 1)) : (this.state = f.NamedEntity, this.stateNamedEntity(_, U));
33199
33199
  case f.NumericStart:
33200
- return this.stateNumericStart(_, F);
33200
+ return this.stateNumericStart(_, U);
33201
33201
  case f.NumericDecimal:
33202
- return this.stateNumericDecimal(_, F);
33202
+ return this.stateNumericDecimal(_, U);
33203
33203
  case f.NumericHex:
33204
- return this.stateNumericHex(_, F);
33204
+ return this.stateNumericHex(_, U);
33205
33205
  case f.NamedEntity:
33206
- return this.stateNamedEntity(_, F);
33206
+ return this.stateNamedEntity(_, U);
33207
33207
  }
33208
33208
  }
33209
33209
  /**
@@ -33215,8 +33215,8 @@ var sd;
33215
33215
  * @param offset The current offset.
33216
33216
  * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
33217
33217
  */
33218
- stateNumericStart(_, F) {
33219
- return F >= _.length ? -1 : (_.charCodeAt(F) | s) === i.LOWER_X ? (this.state = f.NumericHex, this.consumed += 1, this.stateNumericHex(_, F + 1)) : (this.state = f.NumericDecimal, this.stateNumericDecimal(_, F));
33218
+ stateNumericStart(_, U) {
33219
+ return U >= _.length ? -1 : (_.charCodeAt(U) | s) === i.LOWER_X ? (this.state = f.NumericHex, this.consumed += 1, this.stateNumericHex(_, U + 1)) : (this.state = f.NumericDecimal, this.stateNumericDecimal(_, U));
33220
33220
  }
33221
33221
  /**
33222
33222
  * Parses a hexadecimal numeric entity.
@@ -33227,12 +33227,12 @@ var sd;
33227
33227
  * @param offset The current offset.
33228
33228
  * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
33229
33229
  */
33230
- stateNumericHex(_, F) {
33231
- for (; F < _.length; ) {
33232
- const L = _.charCodeAt(F);
33230
+ stateNumericHex(_, U) {
33231
+ for (; U < _.length; ) {
33232
+ const L = _.charCodeAt(U);
33233
33233
  if (o(L) || u(L)) {
33234
- const x = L <= i.NINE ? L - i.ZERO : (L | s) - i.LOWER_A + 10;
33235
- this.result = this.result * 16 + x, this.consumed++, F++;
33234
+ const M = L <= i.NINE ? L - i.ZERO : (L | s) - i.LOWER_A + 10;
33235
+ this.result = this.result * 16 + M, this.consumed++, U++;
33236
33236
  } else
33237
33237
  return this.emitNumericEntity(L, 3);
33238
33238
  }
@@ -33247,11 +33247,11 @@ var sd;
33247
33247
  * @param offset The current offset.
33248
33248
  * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
33249
33249
  */
33250
- stateNumericDecimal(_, F) {
33251
- for (; F < _.length; ) {
33252
- const L = _.charCodeAt(F);
33250
+ stateNumericDecimal(_, U) {
33251
+ for (; U < _.length; ) {
33252
+ const L = _.charCodeAt(U);
33253
33253
  if (o(L))
33254
- this.result = this.result * 10 + (L - i.ZERO), this.consumed++, F++;
33254
+ this.result = this.result * 10 + (L - i.ZERO), this.consumed++, U++;
33255
33255
  else
33256
33256
  return this.emitNumericEntity(L, 2);
33257
33257
  }
@@ -33270,9 +33270,9 @@ var sd;
33270
33270
  * was consumed.
33271
33271
  * @returns The number of characters that were consumed.
33272
33272
  */
33273
- emitNumericEntity(_, F) {
33273
+ emitNumericEntity(_, U) {
33274
33274
  var L;
33275
- if (this.consumed <= F)
33275
+ if (this.consumed <= U)
33276
33276
  return (L = this.errors) === null || L === void 0 || L.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
33277
33277
  if (_ === i.SEMI)
33278
33278
  this.consumed += 1;
@@ -33289,44 +33289,44 @@ var sd;
33289
33289
  * @param offset The current offset.
33290
33290
  * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
33291
33291
  */
33292
- stateNamedEntity(_, F) {
33292
+ stateNamedEntity(_, U) {
33293
33293
  const { decodeTree: L } = this;
33294
- let x = L[this.treeIndex], M = (x & a.BinTrieFlags.VALUE_LENGTH) >> 14;
33295
- for (; F < _.length; ) {
33296
- if (M === 0 && x & a.BinTrieFlags.FLAG13) {
33297
- const G = (x & a.BinTrieFlags.BRANCH_LENGTH) >> 7;
33294
+ let M = L[this.treeIndex], x = (M & a.BinTrieFlags.VALUE_LENGTH) >> 14;
33295
+ for (; U < _.length; ) {
33296
+ if (x === 0 && M & a.BinTrieFlags.FLAG13) {
33297
+ const G = (M & a.BinTrieFlags.BRANCH_LENGTH) >> 7;
33298
33298
  if (this.runConsumed === 0) {
33299
- const W = x & a.BinTrieFlags.JUMP_TABLE;
33300
- if (_.charCodeAt(F) !== W)
33299
+ const W = M & a.BinTrieFlags.JUMP_TABLE;
33300
+ if (_.charCodeAt(U) !== W)
33301
33301
  return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity();
33302
- F++, this.excess++, this.runConsumed++;
33302
+ U++, this.excess++, this.runConsumed++;
33303
33303
  }
33304
33304
  for (; this.runConsumed < G; ) {
33305
- if (F >= _.length)
33305
+ if (U >= _.length)
33306
33306
  return -1;
33307
33307
  const W = this.runConsumed - 1, K = L[this.treeIndex + 1 + (W >> 1)], fe = W % 2 === 0 ? K & 255 : K >> 8 & 255;
33308
- if (_.charCodeAt(F) !== fe)
33308
+ if (_.charCodeAt(U) !== fe)
33309
33309
  return this.runConsumed = 0, this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity();
33310
- F++, this.excess++, this.runConsumed++;
33310
+ U++, this.excess++, this.runConsumed++;
33311
33311
  }
33312
- this.runConsumed = 0, this.treeIndex += 1 + (G >> 1), x = L[this.treeIndex], M = (x & a.BinTrieFlags.VALUE_LENGTH) >> 14;
33312
+ this.runConsumed = 0, this.treeIndex += 1 + (G >> 1), M = L[this.treeIndex], x = (M & a.BinTrieFlags.VALUE_LENGTH) >> 14;
33313
33313
  }
33314
- if (F >= _.length)
33314
+ if (U >= _.length)
33315
33315
  break;
33316
- const Q = _.charCodeAt(F);
33317
- if (Q === i.SEMI && M !== 0 && x & a.BinTrieFlags.FLAG13)
33318
- return this.emitNamedEntityData(this.treeIndex, M, this.consumed + this.excess);
33319
- if (this.treeIndex = m(L, x, this.treeIndex + Math.max(1, M), Q), this.treeIndex < 0)
33316
+ const Q = _.charCodeAt(U);
33317
+ if (Q === i.SEMI && x !== 0 && M & a.BinTrieFlags.FLAG13)
33318
+ return this.emitNamedEntityData(this.treeIndex, x, this.consumed + this.excess);
33319
+ if (this.treeIndex = m(L, M, this.treeIndex + Math.max(1, x), Q), this.treeIndex < 0)
33320
33320
  return this.result === 0 || // If we are parsing an attribute
33321
33321
  this.decodeMode === h.Attribute && // We shouldn't have consumed any characters after the entity,
33322
- (M === 0 || // And there should be no invalid characters.
33322
+ (x === 0 || // And there should be no invalid characters.
33323
33323
  c(Q)) ? 0 : this.emitNotTerminatedNamedEntity();
33324
- if (x = L[this.treeIndex], M = (x & a.BinTrieFlags.VALUE_LENGTH) >> 14, M !== 0) {
33324
+ if (M = L[this.treeIndex], x = (M & a.BinTrieFlags.VALUE_LENGTH) >> 14, x !== 0) {
33325
33325
  if (Q === i.SEMI)
33326
- return this.emitNamedEntityData(this.treeIndex, M, this.consumed + this.excess);
33327
- this.decodeMode !== h.Strict && !(x & a.BinTrieFlags.FLAG13) && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
33326
+ return this.emitNamedEntityData(this.treeIndex, x, this.consumed + this.excess);
33327
+ this.decodeMode !== h.Strict && !(M & a.BinTrieFlags.FLAG13) && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
33328
33328
  }
33329
- F++, this.excess++;
33329
+ U++, this.excess++;
33330
33330
  }
33331
33331
  return -1;
33332
33332
  }
@@ -33337,8 +33337,8 @@ var sd;
33337
33337
  */
33338
33338
  emitNotTerminatedNamedEntity() {
33339
33339
  var _;
33340
- const { result: F, decodeTree: L } = this, x = (L[F] & a.BinTrieFlags.VALUE_LENGTH) >> 14;
33341
- return this.emitNamedEntityData(F, x, this.consumed), (_ = this.errors) === null || _ === void 0 || _.missingSemicolonAfterCharacterReference(), this.consumed;
33340
+ const { result: U, decodeTree: L } = this, M = (L[U] & a.BinTrieFlags.VALUE_LENGTH) >> 14;
33341
+ return this.emitNamedEntityData(U, M, this.consumed), (_ = this.errors) === null || _ === void 0 || _.missingSemicolonAfterCharacterReference(), this.consumed;
33342
33342
  }
33343
33343
  /**
33344
33344
  * Emit a named entity.
@@ -33349,9 +33349,9 @@ var sd;
33349
33349
  *
33350
33350
  * @returns The number of characters consumed.
33351
33351
  */
33352
- emitNamedEntityData(_, F, L) {
33353
- const { decodeTree: x } = this;
33354
- return this.emitCodePoint(F === 1 ? x[_] & ~(a.BinTrieFlags.VALUE_LENGTH | a.BinTrieFlags.FLAG13) : x[_ + 1], L), F === 3 && this.emitCodePoint(x[_ + 2], L), L;
33352
+ emitNamedEntityData(_, U, L) {
33353
+ const { decodeTree: M } = this;
33354
+ return this.emitCodePoint(U === 1 ? M[_] & ~(a.BinTrieFlags.VALUE_LENGTH | a.BinTrieFlags.FLAG13) : M[_ + 1], L), U === 3 && this.emitCodePoint(M[_ + 2], L), L;
33355
33355
  }
33356
33356
  /**
33357
33357
  * Signal to the parser that the end of the input was reached.
@@ -33379,44 +33379,44 @@ var sd;
33379
33379
  e.EntityDecoder = g;
33380
33380
  function p(N) {
33381
33381
  let _ = "";
33382
- const F = new g(N, (L) => _ += (0, t.fromCodePoint)(L));
33383
- return function(x, M) {
33382
+ const U = new g(N, (L) => _ += (0, t.fromCodePoint)(L));
33383
+ return function(M, x) {
33384
33384
  let Q = 0, G = 0;
33385
- for (; (G = x.indexOf("&", G)) >= 0; ) {
33386
- _ += x.slice(Q, G), F.startEntity(M);
33387
- const K = F.write(
33388
- x,
33385
+ for (; (G = M.indexOf("&", G)) >= 0; ) {
33386
+ _ += M.slice(Q, G), U.startEntity(x);
33387
+ const K = U.write(
33388
+ M,
33389
33389
  // Skip the "&"
33390
33390
  G + 1
33391
33391
  );
33392
33392
  if (K < 0) {
33393
- Q = G + F.end();
33393
+ Q = G + U.end();
33394
33394
  break;
33395
33395
  }
33396
33396
  Q = G + K, G = K === 0 ? Q + 1 : Q;
33397
33397
  }
33398
- const W = _ + x.slice(Q);
33398
+ const W = _ + M.slice(Q);
33399
33399
  return _ = "", W;
33400
33400
  };
33401
33401
  }
33402
- function m(N, _, F, L) {
33403
- const x = (_ & a.BinTrieFlags.BRANCH_LENGTH) >> 7, M = _ & a.BinTrieFlags.JUMP_TABLE;
33404
- if (x === 0)
33405
- return M !== 0 && L === M ? F : -1;
33406
- if (M) {
33407
- const K = L - M;
33408
- return K < 0 || K >= x ? -1 : N[F + K] - 1;
33402
+ function m(N, _, U, L) {
33403
+ const M = (_ & a.BinTrieFlags.BRANCH_LENGTH) >> 7, x = _ & a.BinTrieFlags.JUMP_TABLE;
33404
+ if (M === 0)
33405
+ return x !== 0 && L === x ? U : -1;
33406
+ if (x) {
33407
+ const K = L - x;
33408
+ return K < 0 || K >= M ? -1 : N[U + K] - 1;
33409
33409
  }
33410
- const Q = x + 1 >> 1;
33411
- let G = 0, W = x - 1;
33410
+ const Q = M + 1 >> 1;
33411
+ let G = 0, W = M - 1;
33412
33412
  for (; G <= W; ) {
33413
- const K = G + W >>> 1, fe = K >> 1, _e = N[F + fe] >> (K & 1) * 8 & 255;
33413
+ const K = G + W >>> 1, fe = K >> 1, _e = N[U + fe] >> (K & 1) * 8 & 255;
33414
33414
  if (_e < L)
33415
33415
  G = K + 1;
33416
33416
  else if (_e > L)
33417
33417
  W = K - 1;
33418
33418
  else
33419
- return N[F + Q + K];
33419
+ return N[U + Q + K];
33420
33420
  }
33421
33421
  return -1;
33422
33422
  }
@@ -33441,9 +33441,9 @@ var sd;
33441
33441
  } }), Object.defineProperty(e, "replaceCodePoint", { enumerable: !0, get: function() {
33442
33442
  return S.replaceCodePoint;
33443
33443
  } });
33444
- var B = oi;
33444
+ var R = oi;
33445
33445
  Object.defineProperty(e, "htmlDecodeTree", { enumerable: !0, get: function() {
33446
- return B.htmlDecodeTree;
33446
+ return R.htmlDecodeTree;
33447
33447
  } });
33448
33448
  var D = ui;
33449
33449
  Object.defineProperty(e, "xmlDecodeTree", { enumerable: !0, get: function() {
@@ -33787,8 +33787,8 @@ var ww = { replaceVariables: kw, findVariableValue: ng }, { decode: Cw } = Xh, z
33787
33787
  m = m || {};
33788
33788
  var A = zn.parseCSS(p), E = [], k = "style", C = {}, T = m.removeInlinedSelectors ? /* @__PURE__ */ new Set() : null;
33789
33789
  m.styleAttributeName && (k = m.styleAttributeName);
33790
- function I(x) {
33791
- var M = x[0], Q = x[1], G = new zn.Selector(M), W = G.parsed();
33790
+ function I(M) {
33791
+ var x = M[0], Q = M[1], G = new zn.Selector(x), W = G.parsed();
33792
33792
  if (W) {
33793
33793
  for (var K = s(W), fe = 0; fe < W.length; ++fe) {
33794
33794
  var Be = W[fe];
@@ -33801,11 +33801,11 @@ var ww = { replaceVariables: kw, findVariableValue: ng }, { decode: Cw } = Xh, z
33801
33801
  }
33802
33802
  if (K) {
33803
33803
  var re = W[W.length - 1], ae = re.pseudos;
33804
- re.pseudos = u(re.pseudos), M = W.toString(), re.pseudos = ae;
33804
+ re.pseudos = u(re.pseudos), x = W.toString(), re.pseudos = ae;
33805
33805
  }
33806
33806
  var Se;
33807
33807
  try {
33808
- Se = g(M);
33808
+ Se = g(x);
33809
33809
  } catch {
33810
33810
  return;
33811
33811
  }
@@ -33864,84 +33864,84 @@ var ww = { replaceVariables: kw, findVariableValue: ng }, { decode: Cw } = Xh, z
33864
33864
  }
33865
33865
  }
33866
33866
  ct(Q, G);
33867
- }), Je && T && T.add(x[0]);
33867
+ }), Je && T && T.add(M[0]);
33868
33868
  }
33869
33869
  }
33870
- function S(x) {
33871
- Object.keys(x.styleProps).length;
33872
- var M = [];
33873
- Object.keys(x.styleProps).forEach(function(G) {
33874
- for (var W = x.styleProps[G]; typeof W < "u"; )
33875
- M.push(W), W = W.nextProp;
33876
- }), M.sort(function(G, W) {
33870
+ function S(M) {
33871
+ Object.keys(M.styleProps).length;
33872
+ var x = [];
33873
+ Object.keys(M.styleProps).forEach(function(G) {
33874
+ for (var W = M.styleProps[G]; typeof W < "u"; )
33875
+ x.push(W), W = W.nextProp;
33876
+ }), x.sort(function(G, W) {
33877
33877
  return G.compareFunc(W);
33878
33878
  });
33879
- var Q = M.filter(function(G) {
33879
+ var Q = x.filter(function(G) {
33880
33880
  return m.resolveCSSVariables && G.prop.indexOf("--") === 0 ? !1 : G.prop !== "content";
33881
33881
  }).map(function(G) {
33882
- return m.resolveCSSVariables && (G.value = od.replaceVariables(x, G.value)), G.prop + ": " + G.value.replace(/["]/g, "'") + ";";
33882
+ return m.resolveCSSVariables && (G.value = od.replaceVariables(M, G.value)), G.prop + ": " + G.value.replace(/["]/g, "'") + ";";
33883
33883
  }).join(" ");
33884
- Q && g(x).attr(k, Q);
33885
- }
33886
- function B(x) {
33887
- if (x.pseudoElementType && x.styleProps.content) {
33888
- var M = i(x);
33889
- M.img ? (x.name = "img", g(x).attr("src", M.img)) : g(x).text(M);
33890
- var Q = x.pseudoElementParent;
33891
- x.pseudoElementType === "before" ? g(Q).prepend(x) : g(Q).append(x);
33892
- }
33893
- }
33894
- function D(x, M) {
33895
- if (x.name) {
33896
- var Q = x.name.toUpperCase();
33897
- if (t[M + "Elements"].indexOf(Q) > -1) {
33898
- for (var G in x.styleProps)
33899
- if (x.styleProps[G].prop === M) {
33900
- var W = x.styleProps[G].value;
33884
+ Q && g(M).attr(k, Q);
33885
+ }
33886
+ function R(M) {
33887
+ if (M.pseudoElementType && M.styleProps.content) {
33888
+ var x = i(M);
33889
+ x.img ? (M.name = "img", g(M).attr("src", x.img)) : g(M).text(x);
33890
+ var Q = M.pseudoElementParent;
33891
+ M.pseudoElementType === "before" ? g(Q).prepend(M) : g(Q).append(M);
33892
+ }
33893
+ }
33894
+ function D(M, x) {
33895
+ if (M.name) {
33896
+ var Q = M.name.toUpperCase();
33897
+ if (t[x + "Elements"].indexOf(Q) > -1) {
33898
+ for (var G in M.styleProps)
33899
+ if (M.styleProps[G].prop === x) {
33900
+ var W = M.styleProps[G].value;
33901
33901
  if (m.preserveImportant && (W = r(W)), W.match(/(px|auto)/)) {
33902
33902
  var K = W.replace("px", "");
33903
- g(x).attr(M, K);
33903
+ g(M).attr(x, K);
33904
33904
  return;
33905
33905
  }
33906
33906
  if (t.tableElements.indexOf(Q) > -1 && W.match(/\%/)) {
33907
- g(x).attr(M, W);
33907
+ g(M).attr(x, W);
33908
33908
  return;
33909
33909
  }
33910
33910
  }
33911
33911
  }
33912
33912
  }
33913
33913
  }
33914
- function N(x) {
33915
- return x.indexOf("url(") !== 0 ? x : x.replace(/^url\((["'])?([^"']+)\1\)$/, "$2");
33914
+ function N(M) {
33915
+ return M.indexOf("url(") !== 0 ? M : M.replace(/^url\((["'])?([^"']+)\1\)$/, "$2");
33916
33916
  }
33917
- function _(x) {
33918
- if (x.name) {
33919
- var M = x.name.toUpperCase(), Q = Object.keys(t.styleToAttribute);
33920
- if (t.tableElements.indexOf(M) > -1) {
33921
- for (var G in x.styleProps)
33922
- if (Q.indexOf(x.styleProps[G].prop) > -1) {
33923
- var W = t.styleToAttribute[x.styleProps[G].prop], K = x.styleProps[G].value;
33917
+ function _(M) {
33918
+ if (M.name) {
33919
+ var x = M.name.toUpperCase(), Q = Object.keys(t.styleToAttribute);
33920
+ if (t.tableElements.indexOf(x) > -1) {
33921
+ for (var G in M.styleProps)
33922
+ if (Q.indexOf(M.styleProps[G].prop) > -1) {
33923
+ var W = t.styleToAttribute[M.styleProps[G].prop], K = M.styleProps[G].value;
33924
33924
  if (m.preserveImportant && (K = r(K)), W === "background" && (K = N(K)), /(linear|radial)-gradient\(/i.test(K))
33925
33925
  continue;
33926
- g(x).attr(W, K);
33926
+ g(M).attr(W, K);
33927
33927
  }
33928
33928
  }
33929
33929
  }
33930
33930
  }
33931
- if (A.forEach(I), E.forEach(S), m.inlinePseudoElements && E.forEach(B), m.applyWidthAttributes && E.forEach(function(x) {
33932
- D(x, "width");
33933
- }), m.applyHeightAttributes && E.forEach(function(x) {
33934
- D(x, "height");
33931
+ if (A.forEach(I), E.forEach(S), m.inlinePseudoElements && E.forEach(R), m.applyWidthAttributes && E.forEach(function(M) {
33932
+ D(M, "width");
33933
+ }), m.applyHeightAttributes && E.forEach(function(M) {
33934
+ D(M, "height");
33935
33935
  }), m.applyAttributesTableElements && E.forEach(_), m.insertPreservedExtraCss && m.extraCss) {
33936
- var F = zn.getPreservedText(m.extraCss, {
33936
+ var U = zn.getPreservedText(m.extraCss, {
33937
33937
  mediaQueries: m.preserveMediaQueries,
33938
33938
  fontFaces: m.preserveFontFaces,
33939
33939
  keyFrames: m.preserveKeyFrames,
33940
33940
  preservedSelectors: m.preservedSelectors
33941
33941
  });
33942
- if (F) {
33942
+ if (U) {
33943
33943
  var L = null;
33944
- m.insertPreservedExtraCss !== !0 ? L = g(m.insertPreservedExtraCss) : (L = g("head"), L.length || (L = g("body")), L.length || (L = g.root())), L.first().append("<style>" + F + "</style>");
33944
+ m.insertPreservedExtraCss !== !0 ? L = g(m.insertPreservedExtraCss) : (L = g("head"), L.length || (L = g("body")), L.length || (L = g.root())), L.first().append("<style>" + U + "</style>");
33945
33945
  }
33946
33946
  }
33947
33947
  return T;
@@ -33984,8 +33984,8 @@ var ww = { replaceVariables: kw, findVariableValue: ng }, { decode: Cw } = Xh, z
33984
33984
  }
33985
33985
  var S = k[C].match(/counter\s*\(\s*(.*?)\s*(,\s*(.*?)\s*)?\s*\)/i);
33986
33986
  if (S && S[1] in g.counterProps) {
33987
- var B = g.counterProps[S[1]];
33988
- E.push(a(B, S[3]));
33987
+ var R = g.counterProps[S[1]];
33988
+ E.push(a(R, S[3]));
33989
33989
  continue;
33990
33990
  }
33991
33991
  var D = k[C].match(/attr\s*\(\s*(.*?)\s*\)/i);
@@ -34127,13 +34127,13 @@ const ja = /* @__PURE__ */ w1(Mw), Sw = {
34127
34127
  console.error("[模板] 删除失败:", g);
34128
34128
  }
34129
34129
  };
34130
- return (f, h) => (O(), U("div", {
34130
+ return (f, h) => (O(), F("div", {
34131
34131
  class: X(["template-panel", { "tp-dark": e.isDark }])
34132
34132
  }, [
34133
34133
  h[1] || (h[1] = b("div", { class: "tp-header" }, [
34134
34134
  b("span", { class: "tp-title" }, "模板")
34135
34135
  ], -1)),
34136
- a.value ? (O(), U("div", Fw, [
34136
+ a.value ? (O(), F("div", Fw, [
34137
34137
  lt(b("input", {
34138
34138
  ref_key: "editInputRef",
34139
34139
  ref: s,
@@ -34158,9 +34158,9 @@ const ja = /* @__PURE__ */ w1(Mw), Sw = {
34158
34158
  disabled: !i.value.trim()
34159
34159
  }, "保存", 8, zw)
34160
34160
  ])
34161
- ])) : (O(), U("div", Sw, [
34162
- e.templates.length === 0 ? (O(), U("div", Dw, " 暂无模板 ")) : te("", !0),
34163
- (O(!0), U(Tt, null, Lt(e.templates, (g) => (O(), U("div", {
34161
+ ])) : (O(), F("div", Sw, [
34162
+ e.templates.length === 0 ? (O(), F("div", Dw, " 暂无模板 ")) : te("", !0),
34163
+ (O(!0), F(Tt, null, Lt(e.templates, (g) => (O(), F("div", {
34164
34164
  key: g.id,
34165
34165
  class: "tp-item",
34166
34166
  onClick: (p) => f.$emit("select", g)
@@ -34203,8 +34203,8 @@ const ja = /* @__PURE__ */ w1(Mw), Sw = {
34203
34203
  if (o.value)
34204
34204
  try {
34205
34205
  u.value = await o.value.getTemplates();
34206
- } catch (x) {
34207
- console.error("[模板] 加载失败:", x);
34206
+ } catch (M) {
34207
+ console.error("[模板] 加载失败:", M);
34208
34208
  }
34209
34209
  };
34210
34210
  ln(() => {
@@ -34214,10 +34214,10 @@ const ja = /* @__PURE__ */ w1(Mw), Sw = {
34214
34214
  let p = null;
34215
34215
  const m = () => {
34216
34216
  if (!h.value || !f.value) return;
34217
- const x = h.value.getBoundingClientRect(), M = f.value.getBoundingClientRect();
34217
+ const M = h.value.getBoundingClientRect(), x = f.value.getBoundingClientRect();
34218
34218
  g.value = {
34219
- top: `${x.top}px`,
34220
- left: `${M.right + 6}px`
34219
+ top: `${M.top}px`,
34220
+ left: `${x.right + 6}px`
34221
34221
  };
34222
34222
  }, A = () => {
34223
34223
  p && clearTimeout(p), l(), m(), c.value = !0;
@@ -34227,25 +34227,25 @@ const ja = /* @__PURE__ */ w1(Mw), Sw = {
34227
34227
  }, 200);
34228
34228
  }, k = () => {
34229
34229
  p && clearTimeout(p);
34230
- }, C = (x) => {
34231
- r("select", `template:${x.id}`), c.value = !1;
34230
+ }, C = (M) => {
34231
+ r("select", `template:${M.id}`), c.value = !1;
34232
34232
  }, T = j(!1), I = j(""), S = j({ top: "0px", left: "0px" });
34233
- let B = null;
34234
- const D = (x, M) => {
34235
- B && clearTimeout(B);
34236
- const G = x.currentTarget.getBoundingClientRect();
34237
- B = setTimeout(() => {
34238
- I.value = M, S.value = {
34233
+ let R = null;
34234
+ const D = (M, x) => {
34235
+ R && clearTimeout(R);
34236
+ const G = M.currentTarget.getBoundingClientRect();
34237
+ R = setTimeout(() => {
34238
+ I.value = x, S.value = {
34239
34239
  left: `${G.left + G.width / 2}px`,
34240
34240
  top: `${G.bottom + 8}px`
34241
34241
  }, T.value = !0;
34242
34242
  }, 200);
34243
34243
  }, N = () => {
34244
- B && clearTimeout(B), T.value = !1;
34244
+ R && clearTimeout(R), T.value = !1;
34245
34245
  }, _ = j(0);
34246
- return t({ onKeyDown: ({ event: x }) => !1, resetSelection: () => {
34246
+ return t({ onKeyDown: ({ event: M }) => !1, resetSelection: () => {
34247
34247
  _.value = 0;
34248
- }, loadTemplates: l }), (x, M) => (O(), U("div", {
34248
+ }, loadTemplates: l }), (M, x) => (O(), F("div", {
34249
34249
  ref_key: "panelRef",
34250
34250
  ref: f,
34251
34251
  class: X(["block-menu-panel", { "bmp-dark": i.value }])
@@ -34253,178 +34253,178 @@ const ja = /* @__PURE__ */ w1(Mw), Sw = {
34253
34253
  b("div", Yw, [
34254
34254
  b("div", {
34255
34255
  class: X(["toolbar-item", { "is-active": e.currentBlockType === "paragraph" }]),
34256
- onClick: M[0] || (M[0] = (Q) => x.$emit("select", "paragraph")),
34257
- onMouseenter: M[1] || (M[1] = (Q) => D(Q, "正文")),
34256
+ onClick: x[0] || (x[0] = (Q) => M.$emit("select", "paragraph")),
34257
+ onMouseenter: x[1] || (x[1] = (Q) => D(Q, "正文")),
34258
34258
  onMouseleave: N
34259
34259
  }, [
34260
34260
  z(P(xr), { size: 18 })
34261
34261
  ], 34),
34262
34262
  b("div", {
34263
34263
  class: X(["toolbar-item", { "is-active": e.currentBlockType === "heading1" }]),
34264
- onClick: M[2] || (M[2] = (Q) => x.$emit("select", "heading1")),
34265
- onMouseenter: M[3] || (M[3] = (Q) => D(Q, "标题 1")),
34264
+ onClick: x[2] || (x[2] = (Q) => M.$emit("select", "heading1")),
34265
+ onMouseenter: x[3] || (x[3] = (Q) => D(Q, "标题 1")),
34266
34266
  onMouseleave: N
34267
- }, [...M[26] || (M[26] = [
34267
+ }, [...x[26] || (x[26] = [
34268
34268
  b("span", { class: "heading-text" }, "H1", -1)
34269
34269
  ])], 34),
34270
34270
  b("div", {
34271
34271
  class: X(["toolbar-item", { "is-active": e.currentBlockType === "heading2" }]),
34272
- onClick: M[4] || (M[4] = (Q) => x.$emit("select", "heading2")),
34273
- onMouseenter: M[5] || (M[5] = (Q) => D(Q, "标题 2")),
34272
+ onClick: x[4] || (x[4] = (Q) => M.$emit("select", "heading2")),
34273
+ onMouseenter: x[5] || (x[5] = (Q) => D(Q, "标题 2")),
34274
34274
  onMouseleave: N
34275
- }, [...M[27] || (M[27] = [
34275
+ }, [...x[27] || (x[27] = [
34276
34276
  b("span", { class: "heading-text" }, "H2", -1)
34277
34277
  ])], 34),
34278
34278
  b("div", {
34279
34279
  class: X(["toolbar-item", { "is-active": e.currentBlockType === "heading3" }]),
34280
- onClick: M[6] || (M[6] = (Q) => x.$emit("select", "heading3")),
34281
- onMouseenter: M[7] || (M[7] = (Q) => D(Q, "标题 3")),
34280
+ onClick: x[6] || (x[6] = (Q) => M.$emit("select", "heading3")),
34281
+ onMouseenter: x[7] || (x[7] = (Q) => D(Q, "标题 3")),
34282
34282
  onMouseleave: N
34283
- }, [...M[28] || (M[28] = [
34283
+ }, [...x[28] || (x[28] = [
34284
34284
  b("span", { class: "heading-text" }, "H3", -1)
34285
34285
  ])], 34),
34286
34286
  b("div", {
34287
34287
  class: X(["toolbar-item", { "is-active": e.currentBlockType === "bulletList" }]),
34288
- onClick: M[8] || (M[8] = (Q) => x.$emit("select", "bulletList")),
34289
- onMouseenter: M[9] || (M[9] = (Q) => D(Q, "无序列表")),
34288
+ onClick: x[8] || (x[8] = (Q) => M.$emit("select", "bulletList")),
34289
+ onMouseenter: x[9] || (x[9] = (Q) => D(Q, "无序列表")),
34290
34290
  onMouseleave: N
34291
34291
  }, [
34292
34292
  z(P(ml), { size: 18 })
34293
34293
  ], 34),
34294
34294
  b("div", {
34295
34295
  class: X(["toolbar-item", { "is-active": e.currentBlockType === "orderedList" }]),
34296
- onClick: M[10] || (M[10] = (Q) => x.$emit("select", "orderedList")),
34297
- onMouseenter: M[11] || (M[11] = (Q) => D(Q, "有序列表")),
34296
+ onClick: x[10] || (x[10] = (Q) => M.$emit("select", "orderedList")),
34297
+ onMouseenter: x[11] || (x[11] = (Q) => D(Q, "有序列表")),
34298
34298
  onMouseleave: N
34299
34299
  }, [
34300
34300
  z(P(pl), { size: 18 })
34301
34301
  ], 34),
34302
34302
  b("div", {
34303
34303
  class: X(["toolbar-item", { "is-active": e.currentBlockType === "taskList" }]),
34304
- onClick: M[12] || (M[12] = (Q) => x.$emit("select", "taskList")),
34305
- onMouseenter: M[13] || (M[13] = (Q) => D(Q, "任务列表")),
34304
+ onClick: x[12] || (x[12] = (Q) => M.$emit("select", "taskList")),
34305
+ onMouseenter: x[13] || (x[13] = (Q) => D(Q, "任务列表")),
34306
34306
  onMouseleave: N
34307
34307
  }, [
34308
34308
  z(P(t1), { size: 18 })
34309
34309
  ], 34),
34310
34310
  b("div", {
34311
34311
  class: X(["toolbar-item", { "is-active": e.currentBlockType === "blockquote" }]),
34312
- onClick: M[14] || (M[14] = (Q) => x.$emit("select", "blockquote")),
34313
- onMouseenter: M[15] || (M[15] = (Q) => D(Q, "引用")),
34312
+ onClick: x[14] || (x[14] = (Q) => M.$emit("select", "blockquote")),
34313
+ onMouseenter: x[15] || (x[15] = (Q) => D(Q, "引用")),
34314
34314
  onMouseleave: N
34315
34315
  }, [
34316
34316
  z(P(r1), { size: 18 })
34317
34317
  ], 34),
34318
34318
  b("div", {
34319
34319
  class: X(["toolbar-item", { "is-active": e.currentBlockType === "codeBlock" }]),
34320
- onClick: M[16] || (M[16] = (Q) => x.$emit("select", "codeBlock")),
34321
- onMouseenter: M[17] || (M[17] = (Q) => D(Q, "代码块")),
34320
+ onClick: x[16] || (x[16] = (Q) => M.$emit("select", "codeBlock")),
34321
+ onMouseenter: x[17] || (x[17] = (Q) => D(Q, "代码块")),
34322
34322
  onMouseleave: N
34323
34323
  }, [
34324
34324
  z(P(sA), { size: 18 })
34325
34325
  ], 34)
34326
34326
  ]),
34327
- M[38] || (M[38] = b("div", { class: "menu-divider" }, null, -1)),
34328
- M[39] || (M[39] = b("div", { class: "section-title" }, "插入", -1)),
34327
+ x[38] || (x[38] = b("div", { class: "menu-divider" }, null, -1)),
34328
+ x[39] || (x[39] = b("div", { class: "section-title" }, "插入", -1)),
34329
34329
  b("div", Qw, [
34330
34330
  b("div", {
34331
34331
  class: X(["list-item", { "is-active": e.currentBlockType === "table" }]),
34332
- onClick: M[18] || (M[18] = (Q) => x.$emit("select", "table"))
34332
+ onClick: x[18] || (x[18] = (Q) => M.$emit("select", "table"))
34333
34333
  }, [
34334
34334
  b("div", Kw, [
34335
34335
  z(P(LA), { size: 18 })
34336
34336
  ]),
34337
- M[29] || (M[29] = b("div", { class: "list-item-content" }, [
34337
+ x[29] || (x[29] = b("div", { class: "list-item-content" }, [
34338
34338
  b("span", { class: "list-item-title" }, "表格"),
34339
34339
  b("span", { class: "list-item-desc" }, "插入 3x3 表格")
34340
34340
  ], -1))
34341
34341
  ], 2),
34342
34342
  b("div", {
34343
34343
  class: X(["list-item", { "is-active": e.currentBlockType === "colorBlock" }]),
34344
- onClick: M[19] || (M[19] = (Q) => x.$emit("select", "colorBlock"))
34344
+ onClick: x[19] || (x[19] = (Q) => M.$emit("select", "colorBlock"))
34345
34345
  }, [
34346
34346
  b("div", Ww, [
34347
34347
  z(P(n1), { size: 18 })
34348
34348
  ]),
34349
- M[30] || (M[30] = b("div", { class: "list-item-content" }, [
34349
+ x[30] || (x[30] = b("div", { class: "list-item-content" }, [
34350
34350
  b("span", { class: "list-item-title" }, "彩色块"),
34351
34351
  b("span", { class: "list-item-desc" }, "添加带颜色的提示块")
34352
34352
  ], -1))
34353
34353
  ], 2),
34354
34354
  b("div", {
34355
34355
  class: X(["list-item", { "is-active": e.currentBlockType === "linkCard" }]),
34356
- onClick: M[20] || (M[20] = (Q) => x.$emit("select", "linkCard"))
34356
+ onClick: x[20] || (x[20] = (Q) => M.$emit("select", "linkCard"))
34357
34357
  }, [
34358
34358
  b("div", $w, [
34359
34359
  z(P(vA), { size: 18 })
34360
34360
  ]),
34361
- M[31] || (M[31] = b("div", { class: "list-item-content" }, [
34361
+ x[31] || (x[31] = b("div", { class: "list-item-content" }, [
34362
34362
  b("span", { class: "list-item-title" }, "链接卡片"),
34363
34363
  b("span", { class: "list-item-desc" }, "嵌入链接预览卡片")
34364
34364
  ], -1))
34365
34365
  ], 2),
34366
34366
  b("div", {
34367
34367
  class: "list-item",
34368
- onClick: M[21] || (M[21] = (Q) => x.$emit("select", "videoEmbed"))
34368
+ onClick: x[21] || (x[21] = (Q) => M.$emit("select", "videoEmbed"))
34369
34369
  }, [
34370
34370
  b("div", Gw, [
34371
34371
  z(P(ns), { size: 18 })
34372
34372
  ]),
34373
- M[32] || (M[32] = b("div", { class: "list-item-content" }, [
34373
+ x[32] || (x[32] = b("div", { class: "list-item-content" }, [
34374
34374
  b("span", { class: "list-item-title" }, "视频"),
34375
34375
  b("span", { class: "list-item-desc" }, "嵌入 B站 / YouTube 视频")
34376
34376
  ], -1))
34377
34377
  ]),
34378
34378
  b("div", {
34379
34379
  class: X(["list-item", { "is-active": e.currentBlockType === "horizontalRule" }]),
34380
- onClick: M[22] || (M[22] = (Q) => x.$emit("select", "horizontalRule"))
34380
+ onClick: x[22] || (x[22] = (Q) => M.$emit("select", "horizontalRule"))
34381
34381
  }, [
34382
34382
  b("div", qw, [
34383
34383
  z(P(kA), { size: 18 })
34384
34384
  ]),
34385
- M[33] || (M[33] = b("div", { class: "list-item-content" }, [
34385
+ x[33] || (x[33] = b("div", { class: "list-item-content" }, [
34386
34386
  b("span", { class: "list-item-title" }, "分割线"),
34387
34387
  b("span", { class: "list-item-desc" }, "插入水平分割线")
34388
34388
  ], -1))
34389
34389
  ], 2),
34390
34390
  b("div", {
34391
34391
  class: "list-item",
34392
- onClick: M[23] || (M[23] = (Q) => x.$emit("select", "imageUpload"))
34392
+ onClick: x[23] || (x[23] = (Q) => M.$emit("select", "imageUpload"))
34393
34393
  }, [
34394
34394
  b("div", Vw, [
34395
34395
  z(P(X0), { size: 18 })
34396
34396
  ]),
34397
- M[34] || (M[34] = b("div", { class: "list-item-content" }, [
34397
+ x[34] || (x[34] = b("div", { class: "list-item-content" }, [
34398
34398
  b("span", { class: "list-item-title" }, "图片"),
34399
34399
  b("span", { class: "list-item-desc" }, "上传本地图片")
34400
34400
  ], -1))
34401
34401
  ]),
34402
34402
  b("div", {
34403
34403
  class: "list-item",
34404
- onClick: M[24] || (M[24] = (Q) => x.$emit("select", "videoUpload"))
34404
+ onClick: x[24] || (x[24] = (Q) => M.$emit("select", "videoUpload"))
34405
34405
  }, [
34406
34406
  b("div", Jw, [
34407
34407
  z(P(BA), { size: 18 })
34408
34408
  ]),
34409
- M[35] || (M[35] = b("div", { class: "list-item-content" }, [
34409
+ x[35] || (x[35] = b("div", { class: "list-item-content" }, [
34410
34410
  b("span", { class: "list-item-title" }, "视频上传"),
34411
34411
  b("span", { class: "list-item-desc" }, "上传本地视频")
34412
34412
  ], -1))
34413
34413
  ]),
34414
34414
  b("div", {
34415
34415
  class: "list-item",
34416
- onClick: M[25] || (M[25] = (Q) => x.$emit("select", "aiImage"))
34416
+ onClick: x[25] || (x[25] = (Q) => M.$emit("select", "aiImage"))
34417
34417
  }, [
34418
34418
  b("div", Zw, [
34419
34419
  z(P(qs), { size: 18 })
34420
34420
  ]),
34421
- M[36] || (M[36] = b("div", { class: "list-item-content" }, [
34421
+ x[36] || (x[36] = b("div", { class: "list-item-content" }, [
34422
34422
  b("span", { class: "list-item-title" }, "AI 图片"),
34423
34423
  b("span", { class: "list-item-desc" }, "输入描述,AI 生成图片")
34424
34424
  ], -1))
34425
34425
  ])
34426
34426
  ]),
34427
- o.value ? (O(), U("div", {
34427
+ o.value ? (O(), F("div", {
34428
34428
  key: 0,
34429
34429
  ref_key: "templateTriggerRef",
34430
34430
  ref: h,
@@ -34435,7 +34435,7 @@ const ja = /* @__PURE__ */ w1(Mw), Sw = {
34435
34435
  b("div", Xw, [
34436
34436
  z(P(hl), { size: 18 })
34437
34437
  ]),
34438
- M[37] || (M[37] = b("div", { class: "list-item-content" }, [
34438
+ x[37] || (x[37] = b("div", { class: "list-item-content" }, [
34439
34439
  b("span", { class: "list-item-title" }, "模板"),
34440
34440
  b("span", { class: "list-item-desc" }, "插入已保存的模板")
34441
34441
  ], -1)),
@@ -34445,7 +34445,7 @@ const ja = /* @__PURE__ */ w1(Mw), Sw = {
34445
34445
  })
34446
34446
  ], 544)) : te("", !0),
34447
34447
  (O(), Ie(us, { to: "body" }, [
34448
- c.value ? (O(), U("div", {
34448
+ c.value ? (O(), F("div", {
34449
34449
  key: 0,
34450
34450
  class: "template-sub-wrapper",
34451
34451
  style: Ht(g.value),
@@ -34462,7 +34462,7 @@ const ja = /* @__PURE__ */ w1(Mw), Sw = {
34462
34462
  ], 36)) : te("", !0)
34463
34463
  ])),
34464
34464
  (O(), Ie(us, { to: "body" }, [
34465
- T.value ? (O(), U("div", {
34465
+ T.value ? (O(), F("div", {
34466
34466
  key: 0,
34467
34467
  class: "block-menu-tooltip",
34468
34468
  style: Ht(S.value)
@@ -34543,8 +34543,8 @@ const eC = {
34543
34543
  } else {
34544
34544
  const _ = n.editor.state.doc.nodeAt(n.currentNodePos);
34545
34545
  if (_) {
34546
- const F = n.currentNodePos + _.nodeSize;
34547
- n.editor.chain().focus().insertContentAt(F, {
34546
+ const U = n.currentNodePos + _.nodeSize;
34547
+ n.editor.chain().focus().insertContentAt(U, {
34548
34548
  type: "aiImageLoader",
34549
34549
  attrs: {
34550
34550
  prompt: D,
@@ -34567,14 +34567,14 @@ const eC = {
34567
34567
  if (N === "codeBlock")
34568
34568
  return "codeBlock";
34569
34569
  const _ = n.editor.state.doc.resolve(n.currentNodePos);
34570
- for (let F = _.depth; F > 0; F--) {
34571
- const x = _.node(F).type.name;
34572
- if (x === "bulletList") return "bulletList";
34573
- if (x === "orderedList") return "orderedList";
34574
- if (x === "taskList") return "taskList";
34575
- if (x === "blockquote") return "blockquote";
34576
- if (x === "codeBlock") return "codeBlock";
34577
- if (x === "colorBlock") return "colorBlock";
34570
+ for (let U = _.depth; U > 0; U--) {
34571
+ const M = _.node(U).type.name;
34572
+ if (M === "bulletList") return "bulletList";
34573
+ if (M === "orderedList") return "orderedList";
34574
+ if (M === "taskList") return "taskList";
34575
+ if (M === "blockquote") return "blockquote";
34576
+ if (M === "codeBlock") return "codeBlock";
34577
+ if (M === "colorBlock") return "colorBlock";
34578
34578
  }
34579
34579
  if (N === "paragraph")
34580
34580
  return "paragraph";
@@ -34613,10 +34613,10 @@ const eC = {
34613
34613
  const {
34614
34614
  convertToParagraph: N,
34615
34615
  convertToHeading: _,
34616
- convertToBulletList: F,
34616
+ convertToBulletList: U,
34617
34617
  convertToOrderedList: L,
34618
- convertToTaskList: x,
34619
- convertToBlockquote: M,
34618
+ convertToTaskList: M,
34619
+ convertToBlockquote: x,
34620
34620
  convertToCodeBlock: Q
34621
34621
  } = i1(n.editor);
34622
34622
  switch (D) {
@@ -34633,16 +34633,16 @@ const eC = {
34633
34633
  _(3), c();
34634
34634
  break;
34635
34635
  case "bulletList":
34636
- F(), c();
34636
+ U(), c();
34637
34637
  break;
34638
34638
  case "orderedList":
34639
34639
  L(), c();
34640
34640
  break;
34641
34641
  case "taskList":
34642
- x(), c();
34642
+ M(), c();
34643
34643
  break;
34644
34644
  case "blockquote":
34645
- M(), c();
34645
+ x(), c();
34646
34646
  break;
34647
34647
  case "colorBlock":
34648
34648
  k();
@@ -34654,7 +34654,7 @@ const eC = {
34654
34654
  Q(), c();
34655
34655
  break;
34656
34656
  case "horizontalRule":
34657
- B();
34657
+ R();
34658
34658
  break;
34659
34659
  case "table":
34660
34660
  E();
@@ -34749,7 +34749,7 @@ const eC = {
34749
34749
  c(), window.dispatchEvent(new CustomEvent("editor-trigger-image-upload"));
34750
34750
  }, S = () => {
34751
34751
  c(), window.dispatchEvent(new CustomEvent("editor-trigger-video-upload"));
34752
- }, B = () => {
34752
+ }, R = () => {
34753
34753
  if (!(!n.editor || n.currentNodePos === void 0)) {
34754
34754
  if (m.value) {
34755
34755
  const D = n.editor.state.doc.nodeAt(n.currentNodePos);
@@ -34759,13 +34759,13 @@ const eC = {
34759
34759
  c();
34760
34760
  }
34761
34761
  };
34762
- return (D, N) => e.show ? (O(), U("div", eC, [
34762
+ return (D, N) => e.show ? (O(), F("div", eC, [
34763
34763
  b("div", {
34764
34764
  class: "menu-overlay",
34765
34765
  onClick: c
34766
34766
  }),
34767
34767
  b("div", tC, [
34768
- s.value ? (O(), U("div", nC, [
34768
+ s.value ? (O(), F("div", nC, [
34769
34769
  b("div", rC, [
34770
34770
  z(P(qs), {
34771
34771
  size: 18,
@@ -34894,7 +34894,7 @@ const eC = {
34894
34894
  onMouseleave: h
34895
34895
  }, {
34896
34896
  default: Nt(() => [
34897
- t.editor.isEditable ? (O(), U("div", {
34897
+ t.editor.isEditable ? (O(), F("div", {
34898
34898
  key: 0,
34899
34899
  class: X(["handle-container", { visible: a.value || i.value, "in-list": f.value }]),
34900
34900
  contenteditable: "false"
@@ -34918,22 +34918,22 @@ const eC = {
34918
34918
  }, null, 8, ["editor", "show", "current-node-pos"])) : te("", !0)
34919
34919
  ], 2)) : te("", !0),
34920
34920
  b("div", oC, [
34921
- t.editor.isEditable ? (O(), U("input", {
34921
+ t.editor.isEditable ? (O(), F("input", {
34922
34922
  key: 0,
34923
34923
  type: "text",
34924
34924
  class: "code-description",
34925
34925
  value: A.node.attrs.description || "",
34926
34926
  onInput: p,
34927
34927
  placeholder: "添加代码说明..."
34928
- }, null, 40, uC)) : (O(), U("span", lC, we(A.node.attrs.description || ""), 1)),
34928
+ }, null, 40, uC)) : (O(), F("span", lC, we(A.node.attrs.description || ""), 1)),
34929
34929
  b("div", cC, [
34930
- t.editor.isEditable ? (O(), U("div", fC, [
34930
+ t.editor.isEditable ? (O(), F("div", fC, [
34931
34931
  b("div", {
34932
34932
  class: "language-selector",
34933
34933
  onClick: l
34934
34934
  }, [
34935
34935
  b("span", null, we(u.value), 1),
34936
- (O(), U("svg", {
34936
+ (O(), F("svg", {
34937
34937
  class: X(["dropdown-arrow", { open: s.value }]),
34938
34938
  viewBox: "0 0 12 12",
34939
34939
  width: "10",
@@ -34945,20 +34945,20 @@ const eC = {
34945
34945
  }, null, -1)
34946
34946
  ])], 2))
34947
34947
  ]),
34948
- s.value ? (O(), U("div", dC, [
34948
+ s.value ? (O(), F("div", dC, [
34949
34949
  b("div", {
34950
34950
  class: "language-dropdown-overlay",
34951
34951
  onClick: E[1] || (E[1] = (k) => s.value = !1)
34952
34952
  }),
34953
34953
  b("div", hC, [
34954
- (O(), U(Tt, null, Lt(o, (k) => b("div", {
34954
+ (O(), F(Tt, null, Lt(o, (k) => b("div", {
34955
34955
  key: k.value,
34956
34956
  class: X(["language-option", { active: A.node.attrs.language === k.value }]),
34957
34957
  onClick: (C) => c(k.value)
34958
34958
  }, we(k.label), 11, gC)), 64))
34959
34959
  ])
34960
34960
  ])) : te("", !0)
34961
- ])) : (O(), U("span", pC, we(u.value), 1)),
34961
+ ])) : (O(), F("span", pC, we(u.value), 1)),
34962
34962
  b("button", {
34963
34963
  class: X(["copy-button", { copied: n.value }]),
34964
34964
  onClick: m,
@@ -35331,7 +35331,7 @@ function lg(e) {
35331
35331
  excludeEnd: !0,
35332
35332
  keywords: o,
35333
35333
  contains: I
35334
- }, B = {
35334
+ }, R = {
35335
35335
  variants: [
35336
35336
  // class Car extends vehicle
35337
35337
  {
@@ -35418,7 +35418,7 @@ function lg(e) {
35418
35418
  label: "func.def",
35419
35419
  contains: [S],
35420
35420
  illegal: /%/
35421
- }, F = {
35421
+ }, U = {
35422
35422
  relevance: 0,
35423
35423
  match: /\b[A-Z][A-Z_0-9]+\b/,
35424
35424
  className: "variable.constant"
@@ -35426,7 +35426,7 @@ function lg(e) {
35426
35426
  function L(K) {
35427
35427
  return t.concat("(?!", K.join("|"), ")");
35428
35428
  }
35429
- const x = {
35429
+ const M = {
35430
35430
  match: t.concat(
35431
35431
  /\b/,
35432
35432
  L([
@@ -35439,7 +35439,7 @@ function lg(e) {
35439
35439
  ),
35440
35440
  className: "title.function",
35441
35441
  relevance: 0
35442
- }, M = {
35442
+ }, x = {
35443
35443
  begin: t.concat(/\./, t.lookahead(
35444
35444
  t.concat(r, /(?![0-9A-Za-z$_(])/)
35445
35445
  )),
@@ -35616,7 +35616,7 @@ function lg(e) {
35616
35616
  match: /\.\.\./,
35617
35617
  relevance: 0
35618
35618
  },
35619
- M,
35619
+ x,
35620
35620
  // hack: prevents detection of keywords in some circumstances
35621
35621
  // .keyword()
35622
35622
  // $keyword = x
@@ -35629,9 +35629,9 @@ function lg(e) {
35629
35629
  className: { 1: "title.function" },
35630
35630
  contains: [S]
35631
35631
  },
35632
- x,
35633
- F,
35634
- B,
35632
+ M,
35633
+ U,
35634
+ R,
35635
35635
  Q,
35636
35636
  {
35637
35637
  match: /\$[(.]/
@@ -35986,7 +35986,7 @@ function kC(e) {
35986
35986
  excludeEnd: !0,
35987
35987
  keywords: o,
35988
35988
  contains: I
35989
- }, B = {
35989
+ }, R = {
35990
35990
  variants: [
35991
35991
  // class Car extends vehicle
35992
35992
  {
@@ -36073,7 +36073,7 @@ function kC(e) {
36073
36073
  label: "func.def",
36074
36074
  contains: [S],
36075
36075
  illegal: /%/
36076
- }, F = {
36076
+ }, U = {
36077
36077
  relevance: 0,
36078
36078
  match: /\b[A-Z][A-Z_0-9]+\b/,
36079
36079
  className: "variable.constant"
@@ -36081,7 +36081,7 @@ function kC(e) {
36081
36081
  function L(K) {
36082
36082
  return t.concat("(?!", K.join("|"), ")");
36083
36083
  }
36084
- const x = {
36084
+ const M = {
36085
36085
  match: t.concat(
36086
36086
  /\b/,
36087
36087
  L([
@@ -36094,7 +36094,7 @@ function kC(e) {
36094
36094
  ),
36095
36095
  className: "title.function",
36096
36096
  relevance: 0
36097
- }, M = {
36097
+ }, x = {
36098
36098
  begin: t.concat(/\./, t.lookahead(
36099
36099
  t.concat(r, /(?![0-9A-Za-z$_(])/)
36100
36100
  )),
@@ -36271,7 +36271,7 @@ function kC(e) {
36271
36271
  match: /\.\.\./,
36272
36272
  relevance: 0
36273
36273
  },
36274
- M,
36274
+ x,
36275
36275
  // hack: prevents detection of keywords in some circumstances
36276
36276
  // .keyword()
36277
36277
  // $keyword = x
@@ -36284,9 +36284,9 @@ function kC(e) {
36284
36284
  className: { 1: "title.function" },
36285
36285
  contains: [S]
36286
36286
  },
36287
- x,
36288
- F,
36289
- B,
36287
+ M,
36288
+ U,
36289
+ R,
36290
36290
  Q,
36291
36291
  {
36292
36292
  match: /\$[(.]/
@@ -37384,7 +37384,7 @@ function yg(e) {
37384
37384
  e.C_BLOCK_COMMENT_MODE,
37385
37385
  c,
37386
37386
  l
37387
- ], B = {
37387
+ ], R = {
37388
37388
  // This mode covers expression context where we can't expect a function
37389
37389
  // definition and shouldn't highlight anything that looks like one:
37390
37390
  // `return some()`, `else if()`, `(x*sum(1, 2))`
@@ -37505,7 +37505,7 @@ function yg(e) {
37505
37505
  illegal: "</",
37506
37506
  classNameAliases: { "function.dispatch": "built_in" },
37507
37507
  contains: [].concat(
37508
- B,
37508
+ R,
37509
37509
  D,
37510
37510
  I,
37511
37511
  S,
@@ -37960,11 +37960,11 @@ function CC(e) {
37960
37960
  begin: /<<<[ \t]*(?:(\w+)|"(\w+)")\n/,
37961
37961
  end: /[ \t]*(\w+)\b/,
37962
37962
  contains: e.QUOTE_STRING_MODE.contains.concat(u),
37963
- "on:begin": (M, Q) => {
37964
- Q.data._beginMatch = M[1] || M[2];
37963
+ "on:begin": (x, Q) => {
37964
+ Q.data._beginMatch = x[1] || x[2];
37965
37965
  },
37966
- "on:end": (M, Q) => {
37967
- Q.data._beginMatch !== M[1] && Q.ignoreMatch();
37966
+ "on:end": (x, Q) => {
37967
+ Q.data._beginMatch !== x[1] && Q.ignoreMatch();
37968
37968
  }
37969
37969
  }, h = e.END_SAME_AS_BEGIN({
37970
37970
  begin: /<<<[ \t]*'(\w+)'\n/,
@@ -38192,14 +38192,14 @@ function CC(e) {
38192
38192
  "stdClass"
38193
38193
  ], T = {
38194
38194
  keyword: E,
38195
- literal: ((M) => {
38195
+ literal: ((x) => {
38196
38196
  const Q = [];
38197
- return M.forEach((G) => {
38197
+ return x.forEach((G) => {
38198
38198
  Q.push(G), G.toLowerCase() === G ? Q.push(G.toUpperCase()) : Q.push(G.toLowerCase());
38199
38199
  }), Q;
38200
38200
  })(A),
38201
38201
  built_in: k
38202
- }, I = (M) => M.map((Q) => Q.replace(/\|\d+$/, "")), S = { variants: [
38202
+ }, I = (x) => x.map((Q) => Q.replace(/\|\d+$/, "")), S = { variants: [
38203
38203
  {
38204
38204
  match: [
38205
38205
  /new/,
@@ -38213,14 +38213,14 @@ function CC(e) {
38213
38213
  4: "title.class"
38214
38214
  }
38215
38215
  }
38216
- ] }, B = t.concat(r, "\\b(?!\\()"), D = { variants: [
38216
+ ] }, R = t.concat(r, "\\b(?!\\()"), D = { variants: [
38217
38217
  {
38218
38218
  match: [
38219
38219
  t.concat(
38220
38220
  /::/,
38221
38221
  t.lookahead(/(?!class\b)/)
38222
38222
  ),
38223
- B
38223
+ R
38224
38224
  ],
38225
38225
  scope: { 2: "variable.constant" }
38226
38226
  },
@@ -38238,7 +38238,7 @@ function CC(e) {
38238
38238
  /::/,
38239
38239
  t.lookahead(/(?!class\b)/)
38240
38240
  ),
38241
- B
38241
+ R
38242
38242
  ],
38243
38243
  scope: {
38244
38244
  1: "title.class",
@@ -38283,7 +38283,7 @@ function CC(e) {
38283
38283
  m,
38284
38284
  S
38285
38285
  ]
38286
- }, F = {
38286
+ }, U = {
38287
38287
  relevance: 0,
38288
38288
  match: [
38289
38289
  /\b/,
@@ -38296,7 +38296,7 @@ function CC(e) {
38296
38296
  scope: { 3: "title.function.invoke" },
38297
38297
  contains: [_]
38298
38298
  };
38299
- _.contains.push(F);
38299
+ _.contains.push(U);
38300
38300
  const L = [
38301
38301
  N,
38302
38302
  D,
@@ -38304,7 +38304,7 @@ function CC(e) {
38304
38304
  p,
38305
38305
  m,
38306
38306
  S
38307
- ], x = {
38307
+ ], M = {
38308
38308
  begin: t.concat(
38309
38309
  /#\[\s*\\?/,
38310
38310
  t.either(
@@ -38352,7 +38352,7 @@ function CC(e) {
38352
38352
  case_insensitive: !1,
38353
38353
  keywords: T,
38354
38354
  contains: [
38355
- x,
38355
+ M,
38356
38356
  e.HASH_COMMENT_MODE,
38357
38357
  e.COMMENT("//", "$"),
38358
38358
  e.COMMENT(
@@ -38386,7 +38386,7 @@ function CC(e) {
38386
38386
  match: /\$this\b/
38387
38387
  },
38388
38388
  s,
38389
- F,
38389
+ U,
38390
38390
  D,
38391
38391
  {
38392
38392
  match: [
@@ -38424,7 +38424,7 @@ function CC(e) {
38424
38424
  keywords: T,
38425
38425
  contains: [
38426
38426
  "self",
38427
- x,
38427
+ M,
38428
38428
  s,
38429
38429
  D,
38430
38430
  e.C_BLOCK_COMMENT_MODE,
@@ -39745,7 +39745,7 @@ function LC(e) {
39745
39745
  label: "interpol",
39746
39746
  begin: $e(/\\/, ce, /\(/),
39747
39747
  end: /\)/
39748
- }), B = (ce = "") => ({
39748
+ }), R = (ce = "") => ({
39749
39749
  begin: $e(ce, /"""/),
39750
39750
  end: $e(/"""/, ce),
39751
39751
  contains: [
@@ -39763,10 +39763,10 @@ function LC(e) {
39763
39763
  }), N = {
39764
39764
  className: "string",
39765
39765
  variants: [
39766
- B(),
39767
- B("#"),
39768
- B("##"),
39769
- B("###"),
39766
+ R(),
39767
+ R("#"),
39768
+ R("##"),
39769
+ R("###"),
39770
39770
  D(),
39771
39771
  D("#"),
39772
39772
  D("##"),
@@ -39780,7 +39780,7 @@ function LC(e) {
39780
39780
  relevance: 0,
39781
39781
  contains: [e.BACKSLASH_ESCAPE]
39782
39782
  }
39783
- ], F = {
39783
+ ], U = {
39784
39784
  begin: /\/[^\s](?=[^/\n]*\/)/,
39785
39785
  end: /\//,
39786
39786
  contains: _
@@ -39798,22 +39798,22 @@ function LC(e) {
39798
39798
  }
39799
39799
  ]
39800
39800
  };
39801
- }, x = {
39801
+ }, M = {
39802
39802
  scope: "regexp",
39803
39803
  variants: [
39804
39804
  L("###"),
39805
39805
  L("##"),
39806
39806
  L("#"),
39807
- F
39807
+ U
39808
39808
  ]
39809
- }, M = { match: $e(/`/, Tn, /`/) }, Q = {
39809
+ }, x = { match: $e(/`/, Tn, /`/) }, Q = {
39810
39810
  className: "variable",
39811
39811
  match: /\$\d+/
39812
39812
  }, G = {
39813
39813
  className: "variable",
39814
39814
  match: `\\$${Ls}+`
39815
39815
  }, W = [
39816
- M,
39816
+ x,
39817
39817
  Q,
39818
39818
  G
39819
39819
  ], K = {
@@ -39898,7 +39898,7 @@ function LC(e) {
39898
39898
  "self",
39899
39899
  ae,
39900
39900
  ...r,
39901
- x,
39901
+ M,
39902
39902
  ...c,
39903
39903
  ...g,
39904
39904
  ...A,
@@ -39954,7 +39954,7 @@ function LC(e) {
39954
39954
  match: [
39955
39955
  /(func|macro)/,
39956
39956
  /\s+/,
39957
- St(M.match, Tn, Qo)
39957
+ St(x.match, Tn, Qo)
39958
39958
  ],
39959
39959
  className: {
39960
39960
  1: "keyword",
@@ -40101,7 +40101,7 @@ function LC(e) {
40101
40101
  contains: [...r],
40102
40102
  relevance: 0
40103
40103
  },
40104
- x,
40104
+ M,
40105
40105
  ...c,
40106
40106
  ...g,
40107
40107
  ...A,
@@ -40931,9 +40931,9 @@ function BC(e) {
40931
40931
  };
40932
40932
  function T(I, {
40933
40933
  exceptions: S,
40934
- when: B
40934
+ when: R
40935
40935
  } = {}) {
40936
- const D = B;
40936
+ const D = R;
40937
40937
  return S = S || [], I.map((N) => N.match(/\|\d+$/) || S.includes(N) ? N : D(N) ? `${N}|0` : N);
40938
40938
  }
40939
40939
  return {
@@ -46691,7 +46691,7 @@ const L_ = /* @__PURE__ */ Ne({
46691
46691
  onMouseleave: h
46692
46692
  }, {
46693
46693
  default: Nt(() => [
46694
- !c.value && !f.value && p.editor.isEditable ? (O(), U("div", {
46694
+ !c.value && !f.value && p.editor.isEditable ? (O(), F("div", {
46695
46695
  key: 0,
46696
46696
  class: X(["handle-container", { visible: n.value || r.value, "in-list": l.value }]),
46697
46697
  contenteditable: "false"
@@ -46704,7 +46704,7 @@ const L_ = /* @__PURE__ */ Ne({
46704
46704
  key: 0,
46705
46705
  class: "block-type-svg",
46706
46706
  size: 16
46707
- })) : (O(), U("span", {
46707
+ })) : (O(), F("span", {
46708
46708
  key: 1,
46709
46709
  class: X(["block-type-icon", s.value.class])
46710
46710
  }, we(s.value.text), 3))
@@ -46871,20 +46871,20 @@ const U_ = P_.extend({
46871
46871
  onMouseleave: a
46872
46872
  }, {
46873
46873
  default: Nt(() => [
46874
- n.value ? (O(), U("div", {
46874
+ n.value ? (O(), F("div", {
46875
46875
  key: 0,
46876
46876
  class: "color-picker-bar",
46877
46877
  contenteditable: "false",
46878
46878
  onMouseenter: u[0] || (u[0] = (l) => r.value = !0),
46879
46879
  onMouseleave: i
46880
46880
  }, [
46881
- (O(!0), U(Tt, null, Lt(P(ha), (l) => (O(), U("div", {
46881
+ (O(!0), F(Tt, null, Lt(P(ha), (l) => (O(), F("div", {
46882
46882
  key: l.name,
46883
46883
  class: X(["color-option", [`option-${l.name}`, { active: e.node.attrs.color === l.name }]]),
46884
46884
  onClick: oe((c) => s(l.name), ["stop", "prevent"]),
46885
46885
  title: l.label
46886
46886
  }, [
46887
- e.node.attrs.color === l.name ? (O(), U("svg", H_, [...u[4] || (u[4] = [
46887
+ e.node.attrs.color === l.name ? (O(), F("svg", H_, [...u[4] || (u[4] = [
46888
46888
  b("polyline", { points: "20 6 9 17 4 12" }, null, -1)
46889
46889
  ])])) : te("", !0)
46890
46890
  ], 10, F_))), 128))
@@ -47091,9 +47091,9 @@ ${c}` : c;
47091
47091
  `, e = e.substring(p.length + 1), c = !0), !c) {
47092
47092
  let E = this.rules.other.nextBulletRegex(A), k = this.rules.other.hrRegex(A), C = this.rules.other.fencesBeginRegex(A), T = this.rules.other.headingBeginRegex(A), I = this.rules.other.htmlBeginRegex(A), S = this.rules.other.blockquoteBeginRegex(A);
47093
47093
  for (; e; ) {
47094
- let B = e.split(`
47094
+ let R = e.split(`
47095
47095
  `, 1)[0], D;
47096
- if (p = B, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), D = p) : D = p.replace(this.rules.other.tabCharGlobal, " "), C.test(p) || T.test(p) || I.test(p) || S.test(p) || E.test(p) || k.test(p)) break;
47096
+ if (p = R, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), D = p) : D = p.replace(this.rules.other.tabCharGlobal, " "), C.test(p) || T.test(p) || I.test(p) || S.test(p) || E.test(p) || k.test(p)) break;
47097
47097
  if (D.search(this.rules.other.nonSpaceChar) >= A || !p.trim()) h += `
47098
47098
  ` + D.slice(A);
47099
47099
  else {
@@ -47101,8 +47101,8 @@ ${c}` : c;
47101
47101
  h += `
47102
47102
  ` + p;
47103
47103
  }
47104
- m = !p.trim(), f += B + `
47105
- `, e = e.substring(B.length + 1), g = D.slice(A);
47104
+ m = !p.trim(), f += R + `
47105
+ `, e = e.substring(R.length + 1), g = D.slice(A);
47106
47106
  }
47107
47107
  }
47108
47108
  s.loose || (u ? s.loose = !0 : this.rules.other.doubleBlankLine.test(f) && (u = !0)), s.items.push({ type: "list_item", raw: f, task: !!this.options.gfm && this.rules.other.listIsTask.test(h), loose: !1, text: h, tokens: [] }), s.raw += f;
@@ -48208,7 +48208,7 @@ const ha = [
48208
48208
  z(P(V0), { size: 16 })
48209
48209
  ])
48210
48210
  ], 40, Lx),
48211
- !n.value && e.editor.isEditable ? (O(), U("div", Hx, [
48211
+ !n.value && e.editor.isEditable ? (O(), F("div", Hx, [
48212
48212
  b("button", {
48213
48213
  class: "toolbar-btn",
48214
48214
  onClick: oe(o, ["stop", "prevent"]),
@@ -48236,7 +48236,7 @@ const ha = [
48236
48236
  z(P(qn), { size: 14 })
48237
48237
  ])
48238
48238
  ])) : te("", !0),
48239
- n.value ? (O(), U("div", zx, [
48239
+ n.value ? (O(), F("div", zx, [
48240
48240
  b("div", jx, [
48241
48241
  h[6] || (h[6] = b("label", null, "链接地址", -1)),
48242
48242
  lt(b("input", {
@@ -48446,7 +48446,7 @@ const ha = [
48446
48446
  onDblclick: h[1] || (h[1] = oe((g) => e.editor.isEditable ? u() : null, ["prevent"])),
48447
48447
  contenteditable: "false"
48448
48448
  }, we(s.value), 41, qx),
48449
- !n.value && e.editor.isEditable ? (O(), U("div", Vx, [
48449
+ !n.value && e.editor.isEditable ? (O(), F("div", Vx, [
48450
48450
  b("button", {
48451
48451
  class: "toolbar-btn",
48452
48452
  onClick: oe(o, ["stop", "prevent"]),
@@ -48474,7 +48474,7 @@ const ha = [
48474
48474
  z(P(qn), { size: 14 })
48475
48475
  ])
48476
48476
  ])) : te("", !0),
48477
- n.value ? (O(), U("div", Jx, [
48477
+ n.value ? (O(), F("div", Jx, [
48478
48478
  b("div", Zx, [
48479
48479
  h[6] || (h[6] = b("label", null, "链接地址", -1)),
48480
48480
  lt(b("input", {
@@ -48627,7 +48627,7 @@ const ha = [
48627
48627
  };
48628
48628
  return (h, g) => (O(), Ie(P(en), { class: "video-embed-block-wrapper" }, {
48629
48629
  default: Nt(() => [
48630
- i.value && !n.value ? (O(), U("div", iM, [
48630
+ i.value && !n.value ? (O(), F("div", iM, [
48631
48631
  b("div", {
48632
48632
  class: X(["video-platform-badge", `platform-${e.node.attrs.platform}`])
48633
48633
  }, [
@@ -48646,7 +48646,7 @@ const ha = [
48646
48646
  }, null, 8, sM)
48647
48647
  ], 32)
48648
48648
  ])) : te("", !0),
48649
- !i.value && !n.value ? (O(), U("div", {
48649
+ !i.value && !n.value ? (O(), F("div", {
48650
48650
  key: 1,
48651
48651
  class: "video-empty",
48652
48652
  contenteditable: "false",
@@ -48658,7 +48658,7 @@ const ha = [
48658
48658
  g[4] || (g[4] = b("div", { class: "video-empty-text" }, "点击添加视频链接", -1)),
48659
48659
  g[5] || (g[5] = b("div", { class: "video-empty-hint" }, "支持 B站 / YouTube", -1))
48660
48660
  ])) : te("", !0),
48661
- !n.value && i.value && e.editor.isEditable ? (O(), U("div", uM, [
48661
+ !n.value && i.value && e.editor.isEditable ? (O(), F("div", uM, [
48662
48662
  b("button", {
48663
48663
  class: "toolbar-btn",
48664
48664
  onClick: oe(l, ["stop", "prevent"]),
@@ -48678,7 +48678,7 @@ const ha = [
48678
48678
  z(P(qn), { size: 14 })
48679
48679
  ])
48680
48680
  ])) : te("", !0),
48681
- n.value ? (O(), U("div", lM, [
48681
+ n.value ? (O(), F("div", lM, [
48682
48682
  b("div", cM, [
48683
48683
  z(P(ns), {
48684
48684
  size: 18,
@@ -48702,7 +48702,7 @@ const ha = [
48702
48702
  [Rt, r.value]
48703
48703
  ])
48704
48704
  ]),
48705
- u.value.platform !== "unknown" ? (O(), U("div", dM, [
48705
+ u.value.platform !== "unknown" ? (O(), F("div", dM, [
48706
48706
  b("div", {
48707
48707
  class: X(["preview-badge", `platform-${u.value.platform}`])
48708
48708
  }, [
@@ -48873,7 +48873,7 @@ const AM = Wt.create({
48873
48873
  if (!r.value) return !1;
48874
48874
  const u = r.value.onKeyDown({ event: o });
48875
48875
  return typeof u == "string" ? (i(u), !0) : u;
48876
- } }), (o, u) => (O(), U("div", EM, [
48876
+ } }), (o, u) => (O(), F("div", EM, [
48877
48877
  z(rg, {
48878
48878
  ref_key: "menuPanel",
48879
48879
  ref: r,
@@ -49105,18 +49105,18 @@ const AM = Wt.create({
49105
49105
  }])
49106
49106
  }, {
49107
49107
  default: Nt(() => [
49108
- o.value ? (O(), U("div", kM, [...h[0] || (h[0] = [
49108
+ o.value ? (O(), F("div", kM, [...h[0] || (h[0] = [
49109
49109
  b("span", { class: "thinking-dot" }, null, -1),
49110
49110
  b("span", { class: "thinking-dot" }, null, -1),
49111
49111
  b("span", { class: "thinking-dot" }, null, -1),
49112
49112
  b("span", { class: "thinking-text" }, "炼书正在思考...", -1)
49113
- ])])) : (O(), U("div", {
49113
+ ])])) : (O(), F("div", {
49114
49114
  key: 1,
49115
49115
  class: "streaming-preview-content",
49116
49116
  innerHTML: i.value
49117
49117
  }, null, 8, wM)),
49118
- s.value && n.value && !o.value ? (O(), U("span", CM)) : te("", !0),
49119
- u.value ? (O(), U("div", NM, [
49118
+ s.value && n.value && !o.value ? (O(), F("span", CM)) : te("", !0),
49119
+ u.value ? (O(), F("div", NM, [
49120
49120
  b("button", {
49121
49121
  class: "confirm-btn accept",
49122
49122
  onClick: l,
@@ -49646,7 +49646,7 @@ const OM = Wt.create({
49646
49646
  }])
49647
49647
  }, {
49648
49648
  default: Nt(() => [
49649
- e.node.attrs.status === "generating" ? (O(), U("div", QM, [
49649
+ e.node.attrs.status === "generating" ? (O(), F("div", QM, [
49650
49650
  c[2] || (c[2] = b("div", { class: "loader-icon" }, [
49651
49651
  b("div", { class: "spinner" })
49652
49652
  ], -1)),
@@ -49654,7 +49654,7 @@ const OM = Wt.create({
49654
49654
  c[1] || (c[1] = b("p", { class: "loader-title" }, "AI 正在绘制...", -1)),
49655
49655
  b("p", WM, '"' + we(e.node.attrs.prompt) + '"', 1)
49656
49656
  ])
49657
- ])) : e.node.attrs.status === "success" ? (O(), U("div", $M, [
49657
+ ])) : e.node.attrs.status === "success" ? (O(), F("div", $M, [
49658
49658
  b("img", {
49659
49659
  src: e.node.attrs.src,
49660
49660
  alt: e.node.attrs.prompt,
@@ -49664,7 +49664,7 @@ const OM = Wt.create({
49664
49664
  b("div", { class: "success-icon" }, "✓"),
49665
49665
  b("p", null, "生成完成,正在替换...")
49666
49666
  ], -1))
49667
- ])) : e.node.attrs.status === "error" ? (O(), U("div", qM, [
49667
+ ])) : e.node.attrs.status === "error" ? (O(), F("div", qM, [
49668
49668
  b("div", VM, [
49669
49669
  z(P(uA), { size: 32 })
49670
49670
  ]),
@@ -50201,7 +50201,7 @@ const aS = Wt.create({
50201
50201
  const s = i.i || i.emoji || i;
50202
50202
  n.command({ emoji: s });
50203
50203
  };
50204
- return t({ onKeyDown: ({ event: i }) => i.key === "Escape" }), (i, s) => (O(), U("div", mS, [
50204
+ return t({ onKeyDown: ({ event: i }) => i.key === "Escape" }), (i, s) => (O(), F("div", mS, [
50205
50205
  z(P(I1), {
50206
50206
  native: !0,
50207
50207
  "display-recent": !0,
@@ -50420,14 +50420,14 @@ const aS = Wt.create({
50420
50420
  h.value = 0, f.value = [], m.value = 1, A.value = !1, I(1);
50421
50421
  }, 200);
50422
50422
  }, I = async (_) => {
50423
- const F = s.items[c.value];
50424
- if (!F) {
50423
+ const U = s.items[c.value];
50424
+ if (!U) {
50425
50425
  f.value = [];
50426
50426
  return;
50427
50427
  }
50428
50428
  _ === 1 ? g.value = !0 : p.value = !0;
50429
50429
  try {
50430
- const L = await F(l.value, _);
50430
+ const L = await U(l.value, _);
50431
50431
  _ === 1 ? f.value = L.items : f.value = [...f.value, ...L.items], A.value = L.hasMore, m.value = _;
50432
50432
  } catch (L) {
50433
50433
  console.error("[MentionList] 获取数据失败:", L), _ === 1 && (f.value = []);
@@ -50436,9 +50436,9 @@ const aS = Wt.create({
50436
50436
  }
50437
50437
  }, S = () => {
50438
50438
  if (!u.value || !A.value || p.value) return;
50439
- const { scrollTop: _, scrollHeight: F, clientHeight: L } = u.value;
50440
- _ + L >= F - 40 && I(m.value + 1);
50441
- }, B = (_) => {
50439
+ const { scrollTop: _, scrollHeight: U, clientHeight: L } = u.value;
50440
+ _ + L >= U - 40 && I(m.value + 1);
50441
+ }, R = (_) => {
50442
50442
  s.command(_);
50443
50443
  }, D = (_) => {
50444
50444
  _ && _.scrollIntoView({ block: "nearest" });
@@ -50449,14 +50449,14 @@ const aS = Wt.create({
50449
50449
  if (_.key === "ArrowDown")
50450
50450
  return _.preventDefault(), h.value === -1 ? h.value = 0 : h.value = Math.min(f.value.length - 1, h.value + 1), h.value >= f.value.length - 2 && A.value && !p.value && I(m.value + 1), !0;
50451
50451
  if (_.key === "Enter")
50452
- return _.preventDefault(), h.value !== -1 && f.value[h.value] && B(f.value[h.value]), !0;
50452
+ return _.preventDefault(), h.value !== -1 && f.value[h.value] && R(f.value[h.value]), !0;
50453
50453
  if (_.key === "Tab") {
50454
50454
  _.preventDefault();
50455
- const L = (E.value.findIndex((x) => x.key === c.value) + 1) % E.value.length;
50455
+ const L = (E.value.findIndex((M) => M.key === c.value) + 1) % E.value.length;
50456
50456
  return k(E.value[L].key), !0;
50457
50457
  }
50458
50458
  return !1;
50459
- } }), (_, F) => (O(), U("div", {
50459
+ } }), (_, U) => (O(), F("div", {
50460
50460
  class: X(["mention-list", { "theme-dark": r.value, dark: r.value }])
50461
50461
  }, [
50462
50462
  b("div", wS, [
@@ -50468,7 +50468,7 @@ const aS = Wt.create({
50468
50468
  lt(b("input", {
50469
50469
  ref_key: "searchInput",
50470
50470
  ref: o,
50471
- "onUpdate:modelValue": F[0] || (F[0] = (L) => l.value = L),
50471
+ "onUpdate:modelValue": U[0] || (U[0] = (L) => l.value = L),
50472
50472
  type: "text",
50473
50473
  class: "mention-search-input",
50474
50474
  placeholder: "搜索闪念、文档、知识库...",
@@ -50479,10 +50479,10 @@ const aS = Wt.create({
50479
50479
  ])
50480
50480
  ]),
50481
50481
  b("div", NS, [
50482
- (O(!0), U(Tt, null, Lt(E.value, (L) => (O(), U("button", {
50482
+ (O(!0), F(Tt, null, Lt(E.value, (L) => (O(), F("button", {
50483
50483
  key: L.key,
50484
50484
  class: X(["mention-tab", { active: c.value === L.key }]),
50485
- onClick: (x) => k(L.key)
50485
+ onClick: (M) => k(L.key)
50486
50486
  }, [
50487
50487
  (O(), Ie(na(a[L.key]), {
50488
50488
  size: 14,
@@ -50497,19 +50497,19 @@ const aS = Wt.create({
50497
50497
  ref: u,
50498
50498
  onScroll: S
50499
50499
  }, [
50500
- g.value && f.value.length === 0 ? (O(), U("div", MS, [...F[1] || (F[1] = [
50500
+ g.value && f.value.length === 0 ? (O(), F("div", MS, [...U[1] || (U[1] = [
50501
50501
  b("span", null, "加载中...", -1)
50502
- ])])) : f.value.length === 0 ? (O(), U("div", SS, [
50502
+ ])])) : f.value.length === 0 ? (O(), F("div", SS, [
50503
50503
  b("span", null, we(l.value ? "未找到匹配项" : "暂无数据"), 1)
50504
- ])) : (O(), U(Tt, { key: 2 }, [
50505
- (O(!0), U(Tt, null, Lt(f.value, (L, x) => (O(), U("button", {
50504
+ ])) : (O(), F(Tt, { key: 2 }, [
50505
+ (O(!0), F(Tt, null, Lt(f.value, (L, M) => (O(), F("button", {
50506
50506
  key: L.id,
50507
- class: X(["mention-item", { selected: x === h.value }]),
50508
- onClick: (M) => B(L),
50509
- onMouseenter: (M) => h.value = x,
50507
+ class: X(["mention-item", { selected: M === h.value }]),
50508
+ onClick: (x) => R(L),
50509
+ onMouseenter: (x) => h.value = M,
50510
50510
  ref_for: !0,
50511
- ref: (M) => {
50512
- x === h.value && D(M);
50511
+ ref: (x) => {
50512
+ M === h.value && D(x);
50513
50513
  }
50514
50514
  }, [
50515
50515
  b("span", OS, [
@@ -50517,10 +50517,10 @@ const aS = Wt.create({
50517
50517
  ]),
50518
50518
  b("div", LS, [
50519
50519
  b("span", RS, we(L.label), 1),
50520
- L.description ? (O(), U("span", BS, we(L.description), 1)) : te("", !0)
50520
+ L.description ? (O(), F("span", BS, we(L.description), 1)) : te("", !0)
50521
50521
  ])
50522
50522
  ], 42, DS))), 128)),
50523
- p.value ? (O(), U("div", PS, [...F[2] || (F[2] = [
50523
+ p.value ? (O(), F("div", PS, [...U[2] || (U[2] = [
50524
50524
  b("span", null, "加载更多...", -1)
50525
50525
  ])])) : te("", !0)
50526
50526
  ], 64))
@@ -50622,20 +50622,54 @@ const aS = Wt.create({
50622
50622
  r.value = !0, document.body.style.overflow = "hidden";
50623
50623
  }, o = () => {
50624
50624
  r.value = !1, document.body.style.overflow = "";
50625
- }, u = async () => {
50625
+ }, u = () => {
50626
+ if (!n.value || !n.value.src) return;
50627
+ const f = n.value.src, h = n.value.naturalWidth, g = n.value.naturalHeight;
50626
50628
  try {
50627
- if (n.value) {
50628
- const f = document.createElement("canvas");
50629
- f.width = n.value.naturalWidth, f.height = n.value.naturalHeight;
50630
- const h = f.getContext("2d");
50631
- h == null || h.drawImage(n.value, 0, 0), f.toBlob(async (g) => {
50632
- g && await navigator.clipboard.write([
50633
- new ClipboardItem({ "image/png": g })
50634
- ]);
50629
+ const p = new Promise(async (m, A) => {
50630
+ var S, R;
50631
+ let E;
50632
+ try {
50633
+ let D;
50634
+ if (typeof window < "u" && ((R = (S = window.__TAURI__) == null ? void 0 : S.core) != null && R.invoke))
50635
+ try {
50636
+ const _ = await window.__TAURI__.core.invoke("fetch_image", { url: f }), U = atob(_), L = new Array(U.length);
50637
+ for (let x = 0; x < U.length; x++)
50638
+ L[x] = U.charCodeAt(x);
50639
+ const M = new Uint8Array(L);
50640
+ D = new Blob([M]);
50641
+ } catch (_) {
50642
+ console.warn("Tauri fetch_image returned error, fallback to web fetch", _), D = await (await fetch(f)).blob();
50643
+ }
50644
+ else
50645
+ D = await (await fetch(f)).blob();
50646
+ const N = URL.createObjectURL(D);
50647
+ E = new Image(), E.src = N, await new Promise((_, U) => {
50648
+ E.onload = _, E.onerror = U;
50649
+ });
50650
+ } catch (D) {
50651
+ console.warn("Fetch image failed, fallback to original", D), E = new Image(), E.crossOrigin = "anonymous", E.src = f, await new Promise((N) => {
50652
+ E.onload = N, E.onerror = N;
50653
+ });
50654
+ }
50655
+ const k = document.createElement("canvas"), C = E.naturalWidth || h || 800, T = E.naturalHeight || g || 600;
50656
+ k.width = C, k.height = T;
50657
+ const I = k.getContext("2d");
50658
+ I == null || I.drawImage(E, 0, 0, C, T), k.toBlob((D) => {
50659
+ D ? m(D) : A(new Error("Canvas toBlob failed"));
50635
50660
  }, "image/png");
50636
- }
50637
- } catch (f) {
50638
- console.error("复制图片失败:", f);
50661
+ });
50662
+ navigator.clipboard.write([
50663
+ new ClipboardItem({ "image/png": p })
50664
+ ]).then(() => {
50665
+ a.value = !0, setTimeout(() => {
50666
+ a.value = !1;
50667
+ }, 2e3);
50668
+ }).catch((m) => {
50669
+ console.error("写入剪贴板最后阶段失败:", m);
50670
+ });
50671
+ } catch (p) {
50672
+ console.error("调用剪贴板同步阶段失败:", p);
50639
50673
  }
50640
50674
  }, l = () => {
50641
50675
  if (!t.editor) return;
@@ -50669,7 +50703,7 @@ const aS = Wt.create({
50669
50703
  onClick: oe(i, ["stop"]),
50670
50704
  onDblclick: oe(s, ["stop"])
50671
50705
  }, null, 40, HS),
50672
- !e.node.attrs.uploading && e.editor.isEditable ? (O(), U("div", zS, [
50706
+ !e.node.attrs.uploading && e.editor.isEditable ? (O(), F("div", zS, [
50673
50707
  b("button", {
50674
50708
  class: "toolbar-btn",
50675
50709
  onClick: oe(s, ["stop"]),
@@ -50709,14 +50743,14 @@ const aS = Wt.create({
50709
50743
  z(P(_r), { size: 16 })
50710
50744
  ])
50711
50745
  ])) : te("", !0),
50712
- e.node.attrs.uploading ? (O(), U("div", jS, [...h[2] || (h[2] = [
50746
+ e.node.attrs.uploading ? (O(), F("div", jS, [...h[2] || (h[2] = [
50713
50747
  b("div", { class: "upload-spinner" }, null, -1),
50714
50748
  b("span", { class: "upload-text" }, "正在上传...", -1)
50715
50749
  ])])) : te("", !0),
50716
50750
  (O(), Ie(us, { to: "body" }, [
50717
50751
  z(Dd, { name: "fade" }, {
50718
50752
  default: Nt(() => [
50719
- r.value ? (O(), U("div", {
50753
+ r.value ? (O(), F("div", {
50720
50754
  key: 0,
50721
50755
  class: "image-preview-overlay",
50722
50756
  onClick: o
@@ -50748,7 +50782,7 @@ const aS = Wt.create({
50748
50782
  _: 1
50749
50783
  }, 8, ["class"]));
50750
50784
  }
50751
- }), KS = /* @__PURE__ */ tt(QS, [["__scopeId", "data-v-87cb2c31"]]), mc = Wt.create({
50785
+ }), KS = /* @__PURE__ */ tt(QS, [["__scopeId", "data-v-506b5ad6"]]), mc = Wt.create({
50752
50786
  name: "imageUpload",
50753
50787
  addOptions() {
50754
50788
  return {
@@ -50884,7 +50918,7 @@ const aS = Wt.create({
50884
50918
  onClick: r[0] || (r[0] = oe(() => {
50885
50919
  }, ["stop"]))
50886
50920
  }, null, 8, WS),
50887
- !e.node.attrs.uploading && e.editor.isEditable ? (O(), U("div", $S, [
50921
+ !e.node.attrs.uploading && e.editor.isEditable ? (O(), F("div", $S, [
50888
50922
  b("button", {
50889
50923
  class: "toolbar-btn delete-btn",
50890
50924
  onClick: r[1] || (r[1] = oe(
@@ -50897,7 +50931,7 @@ const aS = Wt.create({
50897
50931
  z(P(_r), { size: 16 })
50898
50932
  ])
50899
50933
  ])) : te("", !0),
50900
- e.node.attrs.uploading ? (O(), U("div", GS, [...r[2] || (r[2] = [
50934
+ e.node.attrs.uploading ? (O(), F("div", GS, [...r[2] || (r[2] = [
50901
50935
  b("div", { class: "upload-spinner" }, null, -1),
50902
50936
  b("span", { class: "upload-text" }, "正在上传...", -1)
50903
50937
  ])])) : te("", !0)
@@ -51655,11 +51689,11 @@ const oD = { class: "editor-footer-slot" }, uD = /* @__PURE__ */ Ne({
51655
51689
  return Ae = !0, !1;
51656
51690
  }), !Ae;
51657
51691
  }, {
51658
- startAIStream: B,
51692
+ startAIStream: R,
51659
51693
  streamContent: D,
51660
51694
  endAIStream: N,
51661
51695
  cancelAIStream: _,
51662
- getStreamStatus: F
51696
+ getStreamStatus: U
51663
51697
  } = E_(E, r.onAiImageGenerate, l);
51664
51698
  iD(E, {
51665
51699
  hasMentionConfig: !!r.mentionConfig,
@@ -51669,9 +51703,9 @@ const oD = { class: "editor-footer-slot" }, uD = /* @__PURE__ */ Ne({
51669
51703
  onMentionHover: (Z) => a("mention-hover", Z),
51670
51704
  onMentionHoverEnd: () => a("mention-hover-end")
51671
51705
  },
51672
- aiStreamControls: { startAIStream: B, streamContent: D, endAIStream: N, cancelAIStream: _ }
51706
+ aiStreamControls: { startAIStream: R, streamContent: D, endAIStream: N, cancelAIStream: _ }
51673
51707
  });
51674
- const { getHTML: L, getMarkdown: x, getJSON: M, getText: Q, setMarkdown: G, setHTML: W, setJSON: K } = k1(E, {
51708
+ const { getHTML: L, getMarkdown: M, getJSON: x, getText: Q, setMarkdown: G, setHTML: W, setJSON: K } = k1(E, {
51675
51709
  getTitle: () => s.value,
51676
51710
  setTitle: (Z) => {
51677
51711
  s.value = Z, a("update:title", Z);
@@ -51696,8 +51730,8 @@ const oD = { class: "editor-footer-slot" }, uD = /* @__PURE__ */ Ne({
51696
51730
  scrollToHeading: Be,
51697
51731
  // 内容导出方法
51698
51732
  getHTML: L,
51699
- getMarkdown: x,
51700
- getJSON: M,
51733
+ getMarkdown: M,
51734
+ getJSON: x,
51701
51735
  getText: Q,
51702
51736
  // 内容导入方法
51703
51737
  setMarkdown: G,
@@ -51707,11 +51741,11 @@ const oD = { class: "editor-footer-slot" }, uD = /* @__PURE__ */ Ne({
51707
51741
  getMinimalHTML: Je,
51708
51742
  getArtisticHTML: ge,
51709
51743
  // AI 流式输出方法
51710
- startAIStream: B,
51744
+ startAIStream: R,
51711
51745
  streamContent: D,
51712
51746
  endAIStream: N,
51713
51747
  cancelAIStream: _,
51714
- getStreamStatus: F,
51748
+ getStreamStatus: U,
51715
51749
  // 微信公众号导出
51716
51750
  copyToWechat: _e,
51717
51751
  getWechatThemes: ze,
@@ -51719,7 +51753,7 @@ const oD = { class: "editor-footer-slot" }, uD = /* @__PURE__ */ Ne({
51719
51753
  getWechatSamplePreview: re,
51720
51754
  getWechatPreviewHtml: ae,
51721
51755
  getWechatThemeCssById: Se
51722
- }), (Z, he) => (O(), U("div", {
51756
+ }), (Z, he) => (O(), F("div", {
51723
51757
  class: X(["document-editor", `theme-${r.theme}`]),
51724
51758
  ref_key: "editorWrapper",
51725
51759
  ref: i,
@@ -52313,8 +52347,8 @@ const gD = { class: "flash-toolbar" }, pD = { class: "toolbar-left" }, mD = { cl
52313
52347
  r.format === "markdown" ? a("update:modelValue", T.getMarkdown()) : r.format === "json" ? a("update:modelValue", JSON.stringify(T.getJSON())) : a("update:modelValue", T.getHTML());
52314
52348
  },
52315
52349
  editorProps: {
52316
- handleDrop: (T, I, S, B) => {
52317
- if (!B && I.dataTransfer && I.dataTransfer.files && I.dataTransfer.files[0]) {
52350
+ handleDrop: (T, I, S, R) => {
52351
+ if (!R && I.dataTransfer && I.dataTransfer.files && I.dataTransfer.files[0]) {
52318
52352
  const D = I.dataTransfer.files[0];
52319
52353
  if (D.type.startsWith("image/"))
52320
52354
  return I.preventDefault(), f(D, T, I), !0;
@@ -52323,12 +52357,12 @@ const gD = { class: "flash-toolbar" }, pD = { class: "toolbar-left" }, mD = { cl
52323
52357
  },
52324
52358
  handlePaste: (T, I, S) => {
52325
52359
  var D;
52326
- const B = (D = I.clipboardData) == null ? void 0 : D.items;
52327
- if (B) {
52328
- for (let N = 0; N < B.length; N++)
52329
- if (B[N].type.startsWith("image/")) {
52360
+ const R = (D = I.clipboardData) == null ? void 0 : D.items;
52361
+ if (R) {
52362
+ for (let N = 0; N < R.length; N++)
52363
+ if (R[N].type.startsWith("image/")) {
52330
52364
  I.preventDefault();
52331
- const _ = B[N].getAsFile();
52365
+ const _ = R[N].getAsFile();
52332
52366
  return _ && f(_, T, I), !0;
52333
52367
  }
52334
52368
  }
@@ -52344,10 +52378,10 @@ const gD = { class: "flash-toolbar" }, pD = { class: "toolbar-left" }, mD = { cl
52344
52378
  if (r.format === "markdown" ? I = i.value.getMarkdown() : r.format === "json" ? I = JSON.stringify(i.value.getJSON()) : I = i.value.getHTML(), !(I === T))
52345
52379
  if (r.format === "json")
52346
52380
  try {
52347
- const B = JSON.parse(T);
52348
- i.value.commands.setContent(B, !1);
52349
- } catch (B) {
52350
- console.error("Failed to load JSON content:", B);
52381
+ const R = JSON.parse(T);
52382
+ i.value.commands.setContent(R, !1);
52383
+ } catch (R) {
52384
+ console.error("Failed to load JSON content:", R);
52351
52385
  }
52352
52386
  else r.format === "markdown" ? i.value.commands.setContent(T, {
52353
52387
  contentType: "markdown",
@@ -52392,8 +52426,8 @@ const gD = { class: "flash-toolbar" }, pD = { class: "toolbar-left" }, mD = { cl
52392
52426
  setHTML: k,
52393
52427
  setJSON: C
52394
52428
  }), (T, I) => {
52395
- var S, B, D, N;
52396
- return O(), U("div", {
52429
+ var S, R, D, N;
52430
+ return O(), F("div", {
52397
52431
  class: X(["flash-editor", { "theme-dark": e.theme === "dark" }])
52398
52432
  }, [
52399
52433
  b("div", gD, [
@@ -52414,7 +52448,7 @@ const gD = { class: "flash-toolbar" }, pD = { class: "toolbar-left" }, mD = { cl
52414
52448
  z(P(SA), { size: 18 })
52415
52449
  ], 2),
52416
52450
  b("button", {
52417
- class: X(["toolbar-btn", { "is-active": (B = P(i)) == null ? void 0 : B.isActive("bold") }]),
52451
+ class: X(["toolbar-btn", { "is-active": (R = P(i)) == null ? void 0 : R.isActive("bold") }]),
52418
52452
  onClick: s,
52419
52453
  title: "加粗"
52420
52454
  }, [
@@ -52541,7 +52575,7 @@ const gD = { class: "flash-toolbar" }, pD = { class: "toolbar-left" }, mD = { cl
52541
52575
  });
52542
52576
  a = c;
52543
52577
  const f = (m, A) => {
52544
- var E, k, C, T, I, S, B, D, N, _, F, L, x, M, Q, G;
52578
+ var E, k, C, T, I, S, R, D, N, _, U, L, M, x, Q, G;
52545
52579
  switch (m) {
52546
52580
  case "setEditable":
52547
52581
  (E = o.value) == null || E.setEditable(A.editable);
@@ -52561,7 +52595,7 @@ const gD = { class: "flash-toolbar" }, pD = { class: "toolbar-left" }, mD = { cl
52561
52595
  (S = o.value) == null || S.chain().focus().toggleItalic().run();
52562
52596
  break;
52563
52597
  case "toggleBulletList":
52564
- (B = o.value) == null || B.chain().focus().toggleBulletList().run();
52598
+ (R = o.value) == null || R.chain().focus().toggleBulletList().run();
52565
52599
  break;
52566
52600
  case "toggleOrderedList":
52567
52601
  (D = o.value) == null || D.chain().focus().toggleOrderedList().run();
@@ -52573,13 +52607,13 @@ const gD = { class: "flash-toolbar" }, pD = { class: "toolbar-left" }, mD = { cl
52573
52607
  A.url && ((_ = o.value) == null || _.chain().focus().setUploadingImage({ src: A.url }).run());
52574
52608
  break;
52575
52609
  case "insertLink":
52576
- A.url && ((F = o.value) == null || F.chain().focus().setLink({ href: A.url }).run());
52610
+ A.url && ((U = o.value) == null || U.chain().focus().setLink({ href: A.url }).run());
52577
52611
  break;
52578
52612
  case "getEditorContent":
52579
52613
  const W = {
52580
52614
  html: (L = o.value) == null ? void 0 : L.getHTML(),
52581
- json: (x = o.value) == null ? void 0 : x.getJSON(),
52582
- text: (M = o.value) == null ? void 0 : M.getText()
52615
+ json: (M = o.value) == null ? void 0 : M.getJSON(),
52616
+ text: (x = o.value) == null ? void 0 : x.getText()
52583
52617
  };
52584
52618
  u("editorContent", W);
52585
52619
  break;
@@ -52630,7 +52664,7 @@ const gD = { class: "flash-toolbar" }, pD = { class: "toolbar-left" }, mD = { cl
52630
52664
  var m;
52631
52665
  return ((m = o.value) == null ? void 0 : m.getText()) || "";
52632
52666
  }
52633
- }), (m, A) => (O(), U("div", {
52667
+ }), (m, A) => (O(), F("div", {
52634
52668
  class: X(["mobile-editor", { "theme-dark": e.theme === "dark" }])
52635
52669
  }, [
52636
52670
  b("div", AD, [
@@ -52670,13 +52704,13 @@ const gD = { class: "flash-toolbar" }, pD = { class: "toolbar-left" }, mD = { cl
52670
52704
  if (!i.value) return n.availableTags;
52671
52705
  const L = i.value.toLowerCase();
52672
52706
  return n.availableTags.filter(
52673
- (x) => x.name.toLowerCase().includes(L)
52707
+ (M) => M.name.toLowerCase().includes(L)
52674
52708
  );
52675
52709
  }), g = ne(() => {
52676
52710
  if (!i.value) return !1;
52677
52711
  const L = i.value.toLowerCase();
52678
- return h.value.some((x) => x.name.toLowerCase() === L);
52679
- }), p = ne(() => a.value && (h.value.length > 0 || i.value.length > 0)), m = (L) => n.modelValue.some((x) => x.id === L.id), A = () => {
52712
+ return h.value.some((M) => M.name.toLowerCase() === L);
52713
+ }), p = ne(() => a.value && (h.value.length > 0 || i.value.length > 0)), m = (L) => n.modelValue.some((M) => M.id === L.id), A = () => {
52680
52714
  f.value && (a.value = !0, Ct(() => {
52681
52715
  var L;
52682
52716
  (L = s.value) == null || L.focus();
@@ -52693,20 +52727,20 @@ const gD = { class: "flash-toolbar" }, pD = { class: "toolbar-left" }, mD = { cl
52693
52727
  l();
52694
52728
  }, T = (L) => {
52695
52729
  if (!i.value && n.modelValue.length > 0) {
52696
- const x = n.modelValue[n.modelValue.length - 1];
52697
- B(x);
52730
+ const M = n.modelValue[n.modelValue.length - 1];
52731
+ R(M);
52698
52732
  }
52699
52733
  }, I = (L) => {
52700
- m(L) ? B(L) : S(L), i.value = "", a.value = !0, Ct(() => {
52701
- var x;
52702
- (x = s.value) == null || x.focus();
52734
+ m(L) ? R(L) : S(L), i.value = "", a.value = !0, Ct(() => {
52735
+ var M;
52736
+ (M = s.value) == null || M.focus();
52703
52737
  });
52704
52738
  }, S = (L) => {
52705
- const x = [...n.modelValue, L];
52706
- r("update:modelValue", x), r("add", L);
52707
- }, B = (L) => {
52708
- const x = n.modelValue.filter((M) => M.id !== L.id);
52709
- r("update:modelValue", x), r("remove", L);
52739
+ const M = [...n.modelValue, L];
52740
+ r("update:modelValue", M), r("add", L);
52741
+ }, R = (L) => {
52742
+ const M = n.modelValue.filter((x) => x.id !== L.id);
52743
+ r("update:modelValue", M), r("remove", L);
52710
52744
  }, D = () => {
52711
52745
  if (h.value.length > 0 && o.value < h.value.length) {
52712
52746
  const L = h.value[o.value];
@@ -52717,41 +52751,41 @@ const gD = { class: "flash-toolbar" }, pD = { class: "toolbar-left" }, mD = { cl
52717
52751
  }, N = () => {
52718
52752
  if (!i.value.trim()) return;
52719
52753
  const L = n.availableTags.find(
52720
- (x) => x.name.toLowerCase() === i.value.toLowerCase()
52754
+ (M) => M.name.toLowerCase() === i.value.toLowerCase()
52721
52755
  );
52722
52756
  L ? m(L) || S(L) : r("create", i.value.trim()), i.value = "", E();
52723
52757
  }, _ = (L) => {
52724
52758
  if (!p.value) return;
52725
- const x = h.value.length + (i.value && !g.value ? 1 : 0);
52726
- x !== 0 && (o.value = (o.value + L + x) % x);
52727
- }, F = (L) => {
52759
+ const M = h.value.length + (i.value && !g.value ? 1 : 0);
52760
+ M !== 0 && (o.value = (o.value + L + M) % M);
52761
+ }, U = (L) => {
52728
52762
  L.altKey && L.metaKey && L.key.toLowerCase() === "k" && (L.preventDefault(), a.value ? k() : E());
52729
52763
  };
52730
52764
  return ln(() => {
52731
- document.addEventListener("keydown", F);
52765
+ document.addEventListener("keydown", U);
52732
52766
  }), Fs(() => {
52733
- document.removeEventListener("keydown", F);
52767
+ document.removeEventListener("keydown", U);
52734
52768
  }), gt(i, () => {
52735
52769
  o.value = 0;
52736
- }), (L, x) => (O(), U("div", {
52770
+ }), (L, M) => (O(), F("div", {
52737
52771
  class: X(["tag-input", { "theme-dark": e.theme === "dark" }])
52738
52772
  }, [
52739
52773
  b("div", {
52740
52774
  class: "tag-list",
52741
52775
  onClick: A
52742
52776
  }, [
52743
- (O(!0), U(Tt, null, Lt(e.modelValue, (M) => (O(), U("div", {
52744
- key: M.id,
52777
+ (O(!0), F(Tt, null, Lt(e.modelValue, (x) => (O(), F("div", {
52778
+ key: x.id,
52745
52779
  class: "tag-item"
52746
52780
  }, [
52747
52781
  b("span", yD, [
52748
- b("span", TD, we(M.name), 1)
52782
+ b("span", TD, we(x.name), 1)
52749
52783
  ]),
52750
52784
  b("button", {
52751
52785
  class: "tag-remove-btn",
52752
- onClick: oe((Q) => B(M), ["stop"]),
52786
+ onClick: oe((Q) => R(x), ["stop"]),
52753
52787
  title: "移除标签"
52754
- }, [...x[3] || (x[3] = [
52788
+ }, [...M[3] || (M[3] = [
52755
52789
  b("svg", {
52756
52790
  width: "10",
52757
52791
  height: "10",
@@ -52782,7 +52816,7 @@ const gD = { class: "flash-toolbar" }, pD = { class: "toolbar-left" }, mD = { cl
52782
52816
  lt(b("input", {
52783
52817
  ref_key: "inputRef",
52784
52818
  ref: s,
52785
- "onUpdate:modelValue": x[0] || (x[0] = (M) => i.value = M),
52819
+ "onUpdate:modelValue": M[0] || (M[0] = (x) => i.value = x),
52786
52820
  type: "text",
52787
52821
  class: "inline-input",
52788
52822
  placeholder: "",
@@ -52791,47 +52825,47 @@ const gD = { class: "flash-toolbar" }, pD = { class: "toolbar-left" }, mD = { cl
52791
52825
  at(oe(D, ["prevent"]), ["enter"]),
52792
52826
  at(k, ["esc"]),
52793
52827
  at(T, ["delete"]),
52794
- x[1] || (x[1] = at(oe((M) => _(-1), ["prevent"]), ["up"])),
52795
- x[2] || (x[2] = at(oe((M) => _(1), ["prevent"]), ["down"]))
52828
+ M[1] || (M[1] = at(oe((x) => _(-1), ["prevent"]), ["up"])),
52829
+ M[2] || (M[2] = at(oe((x) => _(1), ["prevent"]), ["down"]))
52796
52830
  ],
52797
52831
  onBlur: C
52798
52832
  }, null, 40, wD), [
52799
52833
  [Rt, i.value]
52800
52834
  ]),
52801
- p.value ? (O(), U("div", CD, [
52835
+ p.value ? (O(), F("div", CD, [
52802
52836
  b("div", ND, [
52803
- (O(!0), U(Tt, null, Lt(h.value, (M, Q) => (O(), U("div", {
52804
- key: M.id,
52805
- class: X(["dropdown-item", { "is-active": o.value === Q, "is-selected": m(M) }]),
52806
- onMousedown: oe((G) => I(M), ["prevent"])
52837
+ (O(!0), F(Tt, null, Lt(h.value, (x, Q) => (O(), F("div", {
52838
+ key: x.id,
52839
+ class: X(["dropdown-item", { "is-active": o.value === Q, "is-selected": m(x) }]),
52840
+ onMousedown: oe((G) => I(x), ["prevent"])
52807
52841
  }, [
52808
52842
  b("span", {
52809
52843
  class: "tag-color-indicator",
52810
- style: Ht({ background: M.color || "#22c55e" })
52844
+ style: Ht({ background: x.color || "#22c55e" })
52811
52845
  }, null, 4),
52812
- b("span", xD, we(M.name), 1),
52813
- m(M) ? (O(), U("svg", MD, [...x[4] || (x[4] = [
52846
+ b("span", xD, we(x.name), 1),
52847
+ m(x) ? (O(), F("svg", MD, [...M[4] || (M[4] = [
52814
52848
  b("polyline", { points: "20 6 9 17 4 12" }, null, -1)
52815
52849
  ])])) : te("", !0)
52816
52850
  ], 42, _D))), 128)),
52817
- i.value && !g.value ? (O(), U("div", {
52851
+ i.value && !g.value ? (O(), F("div", {
52818
52852
  key: 0,
52819
52853
  class: X(["dropdown-item create-new", { "is-active": o.value === h.value.length }]),
52820
52854
  onMousedown: oe(N, ["prevent"])
52821
52855
  }, [
52822
- x[6] || (x[6] = b("div", { class: "create-icon-wrapper" }, "#", -1)),
52856
+ M[6] || (M[6] = b("div", { class: "create-icon-wrapper" }, "#", -1)),
52823
52857
  b("span", SD, [
52824
- x[5] || (x[5] = Nn("创建 ", -1)),
52858
+ M[5] || (M[5] = Nn("创建 ", -1)),
52825
52859
  b("span", DD, we(i.value), 1)
52826
52860
  ]),
52827
- x[7] || (x[7] = b("span", { class: "create-hint" }, "回车创建", -1))
52861
+ M[7] || (M[7] = b("span", { class: "create-hint" }, "回车创建", -1))
52828
52862
  ], 34)) : te("", !0)
52829
52863
  ])
52830
52864
  ])) : te("", !0)
52831
52865
  ], 512), [
52832
52866
  [Qa, f.value]
52833
52867
  ]),
52834
- f.value ? te("", !0) : (O(), U("button", {
52868
+ f.value ? te("", !0) : (O(), F("button", {
52835
52869
  key: 0,
52836
52870
  ref: "addBtnRef",
52837
52871
  class: "tag-add-btn",
@@ -52896,7 +52930,7 @@ const gD = { class: "flash-toolbar" }, pD = { class: "toolbar-left" }, mD = { cl
52896
52930
  u && u();
52897
52931
  }), (c, f) => (O(), Ie(Dd, { name: "ai-companion-fade" }, {
52898
52932
  default: Nt(() => [
52899
- e.visible && e.message ? (O(), U("div", {
52933
+ e.visible && e.message ? (O(), F("div", {
52900
52934
  key: 0,
52901
52935
  ref_key: "companionRef",
52902
52936
  ref: a,