@kedataindo/docflow-vue 0.0.40 → 0.0.42

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.
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  var Hh = Object.defineProperty;
2
2
  var qh = (e, t, i) => t in e ? Hh(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
3
  var Ni = (e, t, i) => qh(e, typeof t != "symbol" ? t + "" : t, i);
4
- import { createEditor as jh, definePlugin as ft, FontSizeExtension as $h, setSearchQuery as Vh, clearSearch as Wh, getSearchState as Gh, searchNext as Kh, searchPrev as Xh, replaceCurrent as Jh, replaceAll as Zh, sanitizePastedHTML as Qh } from "@kedataindo/docflow-core";
4
+ import { createEditor as jh, definePlugin as dt, FontSizeExtension as $h, setSearchQuery as Vh, clearSearch as Wh, getSearchState as Gh, searchNext as Kh, searchPrev as Xh, replaceCurrent as Jh, replaceAll as Zh, sanitizePastedHTML as Qh } from "@kedataindo/docflow-core";
5
5
  import { httpKeyStorage as dM, localStorageKeyStorage as pM, memoryKeyStorage as mM, openaiCompatibleProvider as hM, toAIStreamFn as bM } from "@kedataindo/docflow-core";
6
- import { ref as G, shallowRef as Yh, computed as ce, onMounted as cn, onUnmounted as jt, watch as Ee, unref as S, nextTick as tr, inject as eb, provide as tb, defineComponent as at, openBlock as M, createElementBlock as I, Fragment as Oe, renderList as Ie, normalizeStyle as ot, createElementVNode as k, createCommentVNode as se, createBlock as Ke, Teleport as ib, toDisplayString as D, normalizeClass as ge, h as al, withDirectives as Ce, withKeys as fi, vModelText as Ne, createVNode as te, withModifiers as we, Transition as Da, withCtx as Sn, resolveDynamicComponent as ni, createTextVNode as Fe, renderSlot as Qn, vModelSelect as yd, toRaw as ko, normalizeProps as pc, guardReactiveProps as mc, vModelCheckbox as wo, vModelRadio as za } from "vue";
6
+ import { ref as G, shallowRef as Yh, computed as ce, onMounted as cn, onUnmounted as jt, watch as Ee, unref as S, nextTick as tr, inject as eb, provide as tb, defineComponent as at, openBlock as M, createElementBlock as I, Fragment as Oe, renderList as Ie, normalizeStyle as ot, createElementVNode as k, createCommentVNode as se, createBlock as Ke, Teleport as ib, toDisplayString as D, normalizeClass as ge, h as al, withDirectives as Ce, withKeys as fi, vModelText as Ne, createVNode as te, withModifiers as _e, Transition as Da, withCtx as Sn, resolveDynamicComponent as ni, createTextVNode as Fe, renderSlot as Qn, vModelSelect as yd, toRaw as ko, normalizeProps as pc, guardReactiveProps as mc, vModelCheckbox as wo, vModelRadio as za } from "vue";
7
7
  import { VirtualPageOverlay as nb, getPageSize as rb, PAGE_SIZES as _o } from "@kedataindo/docflow-layout-engine";
8
8
  function ab(e) {
9
9
  const t = G(null), i = Yh(null), n = G(!1), r = ce(() => {
@@ -193,6 +193,9 @@ const kd = {
193
193
  heading1: "Heading 1",
194
194
  heading2: "Heading 2",
195
195
  heading3: "Heading 3",
196
+ heading4: "Heading 4",
197
+ heading5: "Heading 5",
198
+ heading6: "Heading 6",
196
199
  alignIndent: "Align & indent",
197
200
  alignLeft: "Align left",
198
201
  alignCenter: "Align center",
@@ -729,6 +732,9 @@ const kd = {
729
732
  heading1: "Judul 1",
730
733
  heading2: "Judul 2",
731
734
  heading3: "Judul 3",
735
+ heading4: "Judul 4",
736
+ heading5: "Judul 5",
737
+ heading6: "Judul 6",
732
738
  alignIndent: "Perataan & indentasi",
733
739
  alignLeft: "Rata kiri",
734
740
  alignCenter: "Rata tengah",
@@ -3345,7 +3351,7 @@ const ci = ne("x", [
3345
3351
  k("button", {
3346
3352
  type: "button",
3347
3353
  class: ge(["flex items-center gap-0.5 rounded px-2 py-0.5 text-[13px] transition-colors", p.value === H ? "bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300" : "text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800"]),
3348
- onClick: we((V) => A(H), ["stop"]),
3354
+ onClick: _e((V) => A(H), ["stop"]),
3349
3355
  onMouseenter: (V) => U(H)
3350
3356
  }, D(T.value[H].label), 43, G0),
3351
3357
  te(Da, {
@@ -3389,7 +3395,7 @@ const ci = ne("x", [
3389
3395
  key: ue.action,
3390
3396
  type: "button",
3391
3397
  class: "flex w-full items-center justify-between gap-6 px-4 py-2 text-left hover:bg-slate-50 dark:hover:bg-white/5",
3392
- onClick: we((le) => q(ue.action), ["stop"])
3398
+ onClick: _e((le) => q(ue.action), ["stop"])
3393
3399
  }, [
3394
3400
  k("span", tg, [
3395
3401
  ue.icon ? (M(), Ke(ni(ue.icon), {
@@ -3408,7 +3414,7 @@ const ci = ne("x", [
3408
3414
  key: 2,
3409
3415
  type: "button",
3410
3416
  class: "flex w-full items-center justify-between gap-6 px-4 py-2 text-left hover:bg-slate-50 dark:hover:bg-white/5",
3411
- onClick: we((ue) => q(V.action), ["stop"])
3417
+ onClick: _e((ue) => q(V.action), ["stop"])
3412
3418
  }, [
3413
3419
  k("span", ag, [
3414
3420
  V.icon ? (M(), Ke(ni(V.icon), {
@@ -3469,7 +3475,7 @@ const ci = ne("x", [
3469
3475
  type: "button",
3470
3476
  class: "flex h-8 items-center gap-1.5 rounded-full py-0.5 pl-0.5 pr-1.5 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",
3471
3477
  title: e.userName,
3472
- onClick: we(X, ["stop"])
3478
+ onClick: _e(X, ["stop"])
3473
3479
  }, [
3474
3480
  e.userAvatar && !y.value ? (M(), I("img", {
3475
3481
  key: 0,
@@ -3508,7 +3514,7 @@ const ci = ne("x", [
3508
3514
  type: "button",
3509
3515
  class: "flex h-8 w-8 items-center justify-center rounded-full text-slate-500 transition-colors hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-800",
3510
3516
  title: "More",
3511
- onClick: we(F, ["stop"])
3517
+ onClick: _e(F, ["stop"])
3512
3518
  }, [
3513
3519
  te(S(Td), { class: "h-[18px] w-[18px]" })
3514
3520
  ]),
@@ -3826,7 +3832,7 @@ const ci = ne("x", [
3826
3832
  if ((re = n.editor) != null && re.isActive("highlight")) return "#ffff00";
3827
3833
  });
3828
3834
  function b(Y, B) {
3829
- var Je, ut, dt;
3835
+ var Je, ut, pt;
3830
3836
  const re = n.actions[Y];
3831
3837
  if (typeof re == "function")
3832
3838
  re(B);
@@ -3834,16 +3840,16 @@ const ci = ne("x", [
3834
3840
  const Ai = (ut = (Je = n.editor) == null ? void 0 : Je.commands) == null ? void 0 : ut[Y];
3835
3841
  typeof Ai == "function" && Ai(B);
3836
3842
  }
3837
- (dt = n.editor) == null || dt.commands.focus(), R.value = null;
3843
+ (pt = n.editor) == null || pt.commands.focus(), R.value = null;
3838
3844
  }
3839
3845
  function h(Y) {
3840
- var re, Je, ut, dt;
3846
+ var re, Je, ut, pt;
3841
3847
  const B = (re = n.editor) == null ? void 0 : re.chain().focus();
3842
3848
  if (!B) {
3843
3849
  R.value = null;
3844
3850
  return;
3845
3851
  }
3846
- Y === "setTextColor" ? (Je = B.unsetColor) == null || Je.call(B).run() : Y === "setHighlight" && ((ut = B.unsetHighlight) == null || ut.call(B).run()), (dt = n.editor) == null || dt.commands.focus(), R.value = null;
3852
+ Y === "setTextColor" ? (Je = B.unsetColor) == null || Je.call(B).run() : Y === "setHighlight" && ((ut = B.unsetHighlight) == null || ut.call(B).run()), (pt = n.editor) == null || pt.commands.focus(), R.value = null;
3847
3853
  }
3848
3854
  const v = ["toggleHeading1", "toggleHeading2", "toggleHeading3", "toggleHeading4", "toggleHeading5", "toggleHeading6"], g = ["alignLeft", "alignCenter", "alignRight", "alignJustify"], x = ["toggleBulletList", "toggleOrderedList", "toggleTaskList"], y = ["setLink", "insertImage", "insertTable", "toggleBlockquote", "toggleCodeBlock", "insertFootnote", "insertPageBreak", "setPageBreak", "togglePageBreak", "addPageBreak"], w = ["setTextColor", "setHighlight"], C = ce(() => o.value.flatMap((Y) => Y.items)), T = ce(() => C.value.filter((Y) => g.includes(Y.action))), L = ce(() => C.value.filter((Y) => x.includes(Y.action))), _ = ce(() => C.value.filter((Y) => y.includes(Y.action))), A = ce(() => C.value.filter((Y) => w.includes(Y.action))), z = ce(() => A.value.find((Y) => Y.action === "setTextColor")), F = ce(() => A.value.find((Y) => Y.action === "setHighlight")), W = ce(
3849
3855
  () => C.value.filter(
@@ -3956,16 +3962,16 @@ const ci = ne("x", [
3956
3962
  if (re) {
3957
3963
  for (const ut of re)
3958
3964
  if (ut.type.name === "textStyle" && ut.attrs.fontSize) {
3959
- const dt = parseInt(ut.attrs.fontSize, 10);
3960
- if (!isNaN(dt)) return dt;
3965
+ const pt = parseInt(ut.attrs.fontSize, 10);
3966
+ if (!isNaN(pt)) return pt;
3961
3967
  }
3962
3968
  }
3963
3969
  if ((Je = Y.view) != null && Je.dom) {
3964
3970
  const ut = parseFloat(getComputedStyle(Y.view.dom).fontSize);
3965
3971
  if (!isNaN(ut)) {
3966
- const dt = Math.round(ut);
3972
+ const pt = Math.round(ut);
3967
3973
  return he.reduce(
3968
- (Pt, Ft) => Math.abs(Ft - dt) < Math.abs(Pt - dt) ? Ft : Pt
3974
+ (Pt, Ft) => Math.abs(Ft - pt) < Math.abs(Pt - pt) ? Ft : Pt
3969
3975
  );
3970
3976
  }
3971
3977
  }
@@ -3975,7 +3981,7 @@ const ci = ne("x", [
3975
3981
  if (!n.editor) return;
3976
3982
  const B = Ue.value, re = he.indexOf(B);
3977
3983
  let Je;
3978
- re >= 0 ? Je = he[Math.min(Math.max(re + Y, 0), he.length - 1)] : Y < 0 ? Je = [...he].reverse().find((dt) => dt < B) ?? he[0] : Je = he.find((dt) => dt > B) ?? B, n.editor.commands.setFontSize(`${Je}px`), n.editor.commands.focus();
3984
+ re >= 0 ? Je = he[Math.min(Math.max(re + Y, 0), he.length - 1)] : Y < 0 ? Je = [...he].reverse().find((pt) => pt < B) ?? he[0] : Je = he.find((pt) => pt > B) ?? B, n.editor.commands.setFontSize(`${Je}px`), n.editor.commands.focus();
3979
3985
  }
3980
3986
  const ye = G(null);
3981
3987
  function Le(Y) {
@@ -4008,7 +4014,7 @@ const ci = ne("x", [
4008
4014
  title: S(i)("toolbar.undo"),
4009
4015
  "aria-label": S(i)("toolbar.undo"),
4010
4016
  disabled: !e.editor,
4011
- onMousedown: B[0] || (B[0] = we(() => {
4017
+ onMousedown: B[0] || (B[0] = _e(() => {
4012
4018
  }, ["prevent"])),
4013
4019
  onClick: N
4014
4020
  }, [
@@ -4020,7 +4026,7 @@ const ci = ne("x", [
4020
4026
  title: S(i)("toolbar.redo"),
4021
4027
  "aria-label": S(i)("toolbar.redo"),
4022
4028
  disabled: !e.editor,
4023
- onMousedown: B[1] || (B[1] = we(() => {
4029
+ onMousedown: B[1] || (B[1] = _e(() => {
4024
4030
  }, ["prevent"])),
4025
4031
  onClick: H
4026
4032
  }, [
@@ -4032,7 +4038,7 @@ const ci = ne("x", [
4032
4038
  class: ge([Ht, "w-8"]),
4033
4039
  title: S(i)("toolbar.print"),
4034
4040
  "aria-label": S(i)("toolbar.print"),
4035
- onMousedown: B[2] || (B[2] = we(() => {
4041
+ onMousedown: B[2] || (B[2] = _e(() => {
4036
4042
  }, ["prevent"])),
4037
4043
  onClick: V
4038
4044
  }, [
@@ -4044,7 +4050,7 @@ const ci = ne("x", [
4044
4050
  title: S(i)("toolbar.spelling"),
4045
4051
  "aria-label": S(i)("toolbar.spelling"),
4046
4052
  disabled: !e.editor,
4047
- onMousedown: B[3] || (B[3] = we(() => {
4053
+ onMousedown: B[3] || (B[3] = _e(() => {
4048
4054
  }, ["prevent"]))
4049
4055
  }, [
4050
4056
  te(S(Pd), { class: "h-[18px] w-[18px]" })
@@ -4054,7 +4060,7 @@ const ci = ne("x", [
4054
4060
  class: ge([Ht, "px-2 text-xs"]),
4055
4061
  title: S(i)("toolbar.zoom"),
4056
4062
  "aria-label": S(i)("toolbar.zoom"),
4057
- onMousedown: B[4] || (B[4] = we(() => {
4063
+ onMousedown: B[4] || (B[4] = _e(() => {
4058
4064
  }, ["prevent"]))
4059
4065
  }, D(S(i)("toolbar.zoom")), 43, qg),
4060
4066
  B[40] || (B[40] = k("span", { class: "mx-1 h-5 w-px flex-shrink-0 bg-slate-200 dark:bg-white/10" }, null, -1)),
@@ -4065,9 +4071,9 @@ const ci = ne("x", [
4065
4071
  title: S(i)("toolbar.paragraphStyle"),
4066
4072
  "aria-label": S(i)("toolbar.paragraphStyle"),
4067
4073
  disabled: !e.editor,
4068
- onMousedown: B[5] || (B[5] = we(() => {
4074
+ onMousedown: B[5] || (B[5] = _e(() => {
4069
4075
  }, ["prevent"])),
4070
- onClick: B[6] || (B[6] = we((re) => X("heading"), ["stop"]))
4076
+ onClick: B[6] || (B[6] = _e((re) => X("heading"), ["stop"]))
4071
4077
  }, [
4072
4078
  k("span", Vg, D(fe.value), 1),
4073
4079
  te(S(gi), { class: "h-3.5 w-3.5 flex-shrink-0 text-slate-400" })
@@ -4078,7 +4084,7 @@ const ci = ne("x", [
4078
4084
  type: "button",
4079
4085
  class: ge(["flex w-full items-center px-3 py-1.5 text-left hover:bg-slate-50 dark:hover:bg-white/5", le.value === re.value ? "text-blue-600 dark:text-blue-300" : "text-slate-700 dark:text-slate-200"]),
4080
4086
  disabled: !e.editor,
4081
- onMousedown: B[7] || (B[7] = we(() => {
4087
+ onMousedown: B[7] || (B[7] = _e(() => {
4082
4088
  }, ["prevent"])),
4083
4089
  onClick: (Je) => ue(re.value)
4084
4090
  }, D(re.label), 43, Gg))), 128))
@@ -4091,9 +4097,9 @@ const ci = ne("x", [
4091
4097
  title: S(i)("toolbar.fontFamily"),
4092
4098
  "aria-label": S(i)("toolbar.fontFamily"),
4093
4099
  disabled: !e.editor,
4094
- onMousedown: B[8] || (B[8] = we(() => {
4100
+ onMousedown: B[8] || (B[8] = _e(() => {
4095
4101
  }, ["prevent"])),
4096
- onClick: B[9] || (B[9] = we((re) => X("font"), ["stop"]))
4102
+ onClick: B[9] || (B[9] = _e((re) => X("font"), ["stop"]))
4097
4103
  }, [
4098
4104
  k("span", Jg, D(J.value), 1),
4099
4105
  te(S(gi), { class: "h-3.5 w-3.5 flex-shrink-0 text-slate-400" })
@@ -4103,7 +4109,7 @@ const ci = ne("x", [
4103
4109
  key: re.value,
4104
4110
  type: "button",
4105
4111
  class: ge(["flex w-full items-center px-3 py-1.5 text-left hover:bg-slate-50 dark:hover:bg-white/5", $.value === re.value ? "text-blue-600 dark:text-blue-300" : "text-slate-700 dark:text-slate-200"]),
4106
- onMousedown: B[10] || (B[10] = we(() => {
4112
+ onMousedown: B[10] || (B[10] = _e(() => {
4107
4113
  }, ["prevent"])),
4108
4114
  onClick: (Je) => de(re.value)
4109
4115
  }, D(re.label), 43, Qg)), 64))
@@ -4115,7 +4121,7 @@ const ci = ne("x", [
4115
4121
  title: S(i)("toolbar.decreaseFontSize"),
4116
4122
  "aria-label": S(i)("toolbar.decreaseFontSize"),
4117
4123
  disabled: !e.editor,
4118
- onMousedown: B[11] || (B[11] = we((re) => $e(-1), ["prevent"]))
4124
+ onMousedown: B[11] || (B[11] = _e((re) => $e(-1), ["prevent"]))
4119
4125
  }, [
4120
4126
  te(S(fl), { class: "h-3.5 w-3.5" })
4121
4127
  ], 42, Yg),
@@ -4130,8 +4136,8 @@ const ci = ne("x", [
4130
4136
  onFocus: Le,
4131
4137
  onInput: Q,
4132
4138
  onKeydown: [
4133
- B[12] || (B[12] = fi(we((re) => re.target.blur(), ["prevent"]), ["enter"])),
4134
- fi(we(ri, ["prevent"]), ["esc"])
4139
+ B[12] || (B[12] = fi(_e((re) => re.target.blur(), ["prevent"]), ["enter"])),
4140
+ fi(_e(ri, ["prevent"]), ["esc"])
4135
4141
  ],
4136
4142
  onBlur: Pe
4137
4143
  }, null, 40, ev),
@@ -4141,7 +4147,7 @@ const ci = ne("x", [
4141
4147
  title: S(i)("toolbar.increaseFontSize"),
4142
4148
  "aria-label": S(i)("toolbar.increaseFontSize"),
4143
4149
  disabled: !e.editor,
4144
- onMousedown: B[13] || (B[13] = we((re) => $e(1), ["prevent"]))
4150
+ onMousedown: B[13] || (B[13] = _e((re) => $e(1), ["prevent"]))
4145
4151
  }, [
4146
4152
  te(S(sn), { class: "h-3.5 w-3.5" })
4147
4153
  ], 42, tv),
@@ -4156,7 +4162,7 @@ const ci = ne("x", [
4156
4162
  f(re) ? Ov : Ev
4157
4163
  ]),
4158
4164
  disabled: !e.editor,
4159
- onMousedown: B[14] || (B[14] = we(() => {
4165
+ onMousedown: B[14] || (B[14] = _e(() => {
4160
4166
  }, ["prevent"])),
4161
4167
  onClick: (Je) => p(re)
4162
4168
  }, [
@@ -4173,9 +4179,9 @@ const ci = ne("x", [
4173
4179
  title: z.value.label ?? "Text color",
4174
4180
  "aria-label": z.value.label ?? "Text color",
4175
4181
  disabled: !e.editor,
4176
- onMousedown: B[15] || (B[15] = we(() => {
4182
+ onMousedown: B[15] || (B[15] = _e(() => {
4177
4183
  }, ["prevent"])),
4178
- onClick: B[16] || (B[16] = we((re) => X("textColor"), ["stop"]))
4184
+ onClick: B[16] || (B[16] = _e((re) => X("textColor"), ["stop"]))
4179
4185
  }, [
4180
4186
  te(S(wc), { class: "h-[18px] w-[18px]" })
4181
4187
  ], 42, sv),
@@ -4195,9 +4201,9 @@ const ci = ne("x", [
4195
4201
  title: F.value.label ?? "Highlight",
4196
4202
  "aria-label": F.value.label ?? "Highlight",
4197
4203
  disabled: !e.editor,
4198
- onMousedown: B[20] || (B[20] = we(() => {
4204
+ onMousedown: B[20] || (B[20] = _e(() => {
4199
4205
  }, ["prevent"])),
4200
- onClick: B[21] || (B[21] = we((re) => X("highlight"), ["stop"]))
4206
+ onClick: B[21] || (B[21] = _e((re) => X("highlight"), ["stop"]))
4201
4207
  }, [
4202
4208
  te(S(kc), { class: "h-[18px] w-[18px]" })
4203
4209
  ], 42, lv),
@@ -4218,9 +4224,9 @@ const ci = ne("x", [
4218
4224
  title: S(i)("toolbar.lists"),
4219
4225
  "aria-label": S(i)("toolbar.lists"),
4220
4226
  disabled: !e.editor,
4221
- onMousedown: B[25] || (B[25] = we(() => {
4227
+ onMousedown: B[25] || (B[25] = _e(() => {
4222
4228
  }, ["prevent"])),
4223
- onClick: B[26] || (B[26] = we((re) => X("lists"), ["stop"]))
4229
+ onClick: B[26] || (B[26] = _e((re) => X("lists"), ["stop"]))
4224
4230
  }, [
4225
4231
  te(S(en), { class: "h-[18px] w-[18px]" }),
4226
4232
  te(S(gi), { class: "h-3 w-3 text-slate-400" })
@@ -4231,7 +4237,7 @@ const ci = ne("x", [
4231
4237
  type: "button",
4232
4238
  class: ge(["flex w-full items-center gap-2.5 px-3 py-1.5 text-left hover:bg-slate-50 dark:hover:bg-white/5", f(re) ? "text-blue-600 dark:text-blue-300" : "text-slate-700 dark:text-slate-200"]),
4233
4239
  disabled: !e.editor,
4234
- onMousedown: B[27] || (B[27] = we(() => {
4240
+ onMousedown: B[27] || (B[27] = _e(() => {
4235
4241
  }, ["prevent"])),
4236
4242
  onClick: (Je) => q(re)
4237
4243
  }, [
@@ -4250,9 +4256,9 @@ const ci = ne("x", [
4250
4256
  title: S(i)("toolbar.alignment"),
4251
4257
  "aria-label": S(i)("toolbar.alignment"),
4252
4258
  disabled: !e.editor,
4253
- onMousedown: B[28] || (B[28] = we(() => {
4259
+ onMousedown: B[28] || (B[28] = _e(() => {
4254
4260
  }, ["prevent"])),
4255
- onClick: B[29] || (B[29] = we((re) => X("align"), ["stop"]))
4261
+ onClick: B[29] || (B[29] = _e((re) => X("align"), ["stop"]))
4256
4262
  }, [
4257
4263
  (M(), Ke(ni(j.value), { class: "h-[18px] w-[18px]" })),
4258
4264
  te(S(gi), { class: "h-3 w-3 text-slate-400" })
@@ -4263,7 +4269,7 @@ const ci = ne("x", [
4263
4269
  type: "button",
4264
4270
  class: ge(["flex w-full items-center gap-2.5 px-3 py-1.5 text-left hover:bg-slate-50 dark:hover:bg-white/5", f(re) ? "text-blue-600 dark:text-blue-300" : "text-slate-700 dark:text-slate-200"]),
4265
4271
  disabled: !e.editor,
4266
- onMousedown: B[30] || (B[30] = we(() => {
4272
+ onMousedown: B[30] || (B[30] = _e(() => {
4267
4273
  }, ["prevent"])),
4268
4274
  onClick: (Je) => q(re)
4269
4275
  }, [
@@ -4282,9 +4288,9 @@ const ci = ne("x", [
4282
4288
  title: S(i)("toolbar.insert"),
4283
4289
  "aria-label": S(i)("toolbar.insert"),
4284
4290
  disabled: !e.editor,
4285
- onMousedown: B[31] || (B[31] = we(() => {
4291
+ onMousedown: B[31] || (B[31] = _e(() => {
4286
4292
  }, ["prevent"])),
4287
- onClick: B[32] || (B[32] = we((re) => X("insert"), ["stop"]))
4293
+ onClick: B[32] || (B[32] = _e((re) => X("insert"), ["stop"]))
4288
4294
  }, [
4289
4295
  te(S(sn), { class: "h-4 w-4" }),
4290
4296
  k("span", yv, D(S(i)("toolbar.insert")), 1),
@@ -4296,7 +4302,7 @@ const ci = ne("x", [
4296
4302
  type: "button",
4297
4303
  class: ge(["flex w-full items-center gap-2.5 px-3 py-1.5 text-left hover:bg-slate-50 dark:hover:bg-white/5", f(re) ? "text-blue-600 dark:text-blue-300" : "text-slate-700 dark:text-slate-200"]),
4298
4304
  disabled: !e.editor,
4299
- onMousedown: B[33] || (B[33] = we(() => {
4305
+ onMousedown: B[33] || (B[33] = _e(() => {
4300
4306
  }, ["prevent"])),
4301
4307
  onClick: (Je) => q(re)
4302
4308
  }, [
@@ -4462,7 +4468,7 @@ const ci = ne("x", [
4462
4468
  "data-testid": "bubble-menu",
4463
4469
  class: "docs-editor-bubble-menu fixed z-50 flex gap-1 rounded-xl border border-slate-200 bg-white p-1.5 shadow-2xl dark:border-white/10 dark:bg-[#0c1329]",
4464
4470
  style: ot(m.value),
4465
- onMousedown: v[1] || (v[1] = we(() => {
4471
+ onMousedown: v[1] || (v[1] = _e(() => {
4466
4472
  }, ["prevent"]))
4467
4473
  }, [
4468
4474
  o.value ? (M(), I(Oe, { key: 0 }, [
@@ -5251,7 +5257,7 @@ const ci = ne("x", [
5251
5257
  k("div", Bx, [
5252
5258
  k("form", {
5253
5259
  class: "space-y-3.5",
5254
- onSubmit: we(K, ["prevent"])
5260
+ onSubmit: _e(K, ["prevent"])
5255
5261
  }, [
5256
5262
  k("div", null, [
5257
5263
  k("label", Ux, D(S(r)("sidebars.references.form.type")), 1),
@@ -8555,7 +8561,7 @@ class Ot {
8555
8561
  return To[t] = i, i.prototype.jsonID = t, i;
8556
8562
  }
8557
8563
  }
8558
- class ct {
8564
+ class ft {
8559
8565
  /**
8560
8566
  @internal
8561
8567
  */
@@ -8566,13 +8572,13 @@ class ct {
8566
8572
  Create a successful step result.
8567
8573
  */
8568
8574
  static ok(t) {
8569
- return new ct(t, null);
8575
+ return new ft(t, null);
8570
8576
  }
8571
8577
  /**
8572
8578
  Create a failed step result.
8573
8579
  */
8574
8580
  static fail(t) {
8575
- return new ct(null, t);
8581
+ return new ft(null, t);
8576
8582
  }
8577
8583
  /**
8578
8584
  Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given
@@ -8581,10 +8587,10 @@ class ct {
8581
8587
  */
8582
8588
  static fromReplace(t, i, n, r) {
8583
8589
  try {
8584
- return ct.ok(t.replace(i, n, r));
8590
+ return ft.ok(t.replace(i, n, r));
8585
8591
  } catch (a) {
8586
8592
  if (a instanceof Hr)
8587
- return ct.fail(a.message);
8593
+ return ft.fail(a.message);
8588
8594
  throw a;
8589
8595
  }
8590
8596
  }
@@ -8606,7 +8612,7 @@ class nn extends Ot {
8606
8612
  }
8607
8613
  apply(t) {
8608
8614
  let i = t.slice(this.from, this.to), n = t.resolve(this.from), r = n.node(n.sharedDepth(this.to)), a = new pe(lu(i.content, (s, o) => !s.isAtom || !o.type.allowsMarkType(this.mark.type) ? s : s.mark(this.mark.addToSet(s.marks)), r), i.openStart, i.openEnd);
8609
- return ct.fromReplace(t, this.from, this.to, a);
8615
+ return ft.fromReplace(t, this.from, this.to, a);
8610
8616
  }
8611
8617
  invert() {
8612
8618
  return new vi(this.from, this.to, this.mark);
@@ -8645,7 +8651,7 @@ class vi extends Ot {
8645
8651
  }
8646
8652
  apply(t) {
8647
8653
  let i = t.slice(this.from, this.to), n = new pe(lu(i.content, (r) => r.mark(this.mark.removeFromSet(r.marks)), t), i.openStart, i.openEnd);
8648
- return ct.fromReplace(t, this.from, this.to, n);
8654
+ return ft.fromReplace(t, this.from, this.to, n);
8649
8655
  }
8650
8656
  invert() {
8651
8657
  return new nn(this.from, this.to, this.mark);
@@ -8685,9 +8691,9 @@ class rn extends Ot {
8685
8691
  apply(t) {
8686
8692
  let i = t.nodeAt(this.pos);
8687
8693
  if (!i)
8688
- return ct.fail("No node at mark step's position");
8694
+ return ft.fail("No node at mark step's position");
8689
8695
  let n = i.type.create(i.attrs, null, this.mark.addToSet(i.marks));
8690
- return ct.fromReplace(t, this.pos, this.pos + 1, new pe(ie.from(n), 0, i.isLeaf ? 0 : 1));
8696
+ return ft.fromReplace(t, this.pos, this.pos + 1, new pe(ie.from(n), 0, i.isLeaf ? 0 : 1));
8691
8697
  }
8692
8698
  invert(t) {
8693
8699
  let i = t.nodeAt(this.pos);
@@ -8729,9 +8735,9 @@ class In extends Ot {
8729
8735
  apply(t) {
8730
8736
  let i = t.nodeAt(this.pos);
8731
8737
  if (!i)
8732
- return ct.fail("No node at mark step's position");
8738
+ return ft.fail("No node at mark step's position");
8733
8739
  let n = i.type.create(i.attrs, null, this.mark.removeFromSet(i.marks));
8734
- return ct.fromReplace(t, this.pos, this.pos + 1, new pe(ie.from(n), 0, i.isLeaf ? 0 : 1));
8740
+ return ft.fromReplace(t, this.pos, this.pos + 1, new pe(ie.from(n), 0, i.isLeaf ? 0 : 1));
8735
8741
  }
8736
8742
  invert(t) {
8737
8743
  let i = t.nodeAt(this.pos);
@@ -8768,7 +8774,7 @@ class st extends Ot {
8768
8774
  super(), this.from = t, this.to = i, this.slice = n, this.structure = r;
8769
8775
  }
8770
8776
  apply(t) {
8771
- return this.structure && wl(t, this.from, this.to) ? ct.fail("Structure replace would overwrite content") : ct.fromReplace(t, this.from, this.to, this.slice);
8777
+ return this.structure && wl(t, this.from, this.to) ? ft.fail("Structure replace would overwrite content") : ft.fromReplace(t, this.from, this.to, this.slice);
8772
8778
  }
8773
8779
  getMap() {
8774
8780
  return new Kt([this.from, this.to - this.from, this.slice.size]);
@@ -8807,7 +8813,7 @@ class st extends Ot {
8807
8813
  }
8808
8814
  st.MAP_BIAS = 1;
8809
8815
  Ot.jsonID("replace", st);
8810
- class pt extends Ot {
8816
+ class mt extends Ot {
8811
8817
  /**
8812
8818
  Create a replace-around step with the given range and gap.
8813
8819
  `insert` should be the point in the slice into which the content
@@ -8819,12 +8825,12 @@ class pt extends Ot {
8819
8825
  }
8820
8826
  apply(t) {
8821
8827
  if (this.structure && (wl(t, this.from, this.gapFrom) || wl(t, this.gapTo, this.to)))
8822
- return ct.fail("Structure gap-replace would overwrite content");
8828
+ return ft.fail("Structure gap-replace would overwrite content");
8823
8829
  let i = t.slice(this.gapFrom, this.gapTo);
8824
8830
  if (i.openStart || i.openEnd)
8825
- return ct.fail("Gap is not a flat range");
8831
+ return ft.fail("Gap is not a flat range");
8826
8832
  let n = this.slice.insertAt(this.insert, i.content);
8827
- return n ? ct.fromReplace(t, this.from, this.to, n) : ct.fail("Content does not fit in gap");
8833
+ return n ? ft.fromReplace(t, this.from, this.to, n) : ft.fail("Content does not fit in gap");
8828
8834
  }
8829
8835
  getMap() {
8830
8836
  return new Kt([
@@ -8838,11 +8844,11 @@ class pt extends Ot {
8838
8844
  }
8839
8845
  invert(t) {
8840
8846
  let i = this.gapTo - this.gapFrom;
8841
- return new pt(this.from, this.from + this.slice.size + i, this.from + this.insert, this.from + this.insert + i, t.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);
8847
+ return new mt(this.from, this.from + this.slice.size + i, this.from + this.insert, this.from + this.insert + i, t.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);
8842
8848
  }
8843
8849
  map(t) {
8844
8850
  let i = t.mapResult(this.from, 1), n = t.mapResult(this.to, -1), r = this.from == this.gapFrom ? i.pos : t.map(this.gapFrom, -1), a = this.to == this.gapTo ? n.pos : t.map(this.gapTo, 1);
8845
- return i.deletedAcross && n.deletedAcross || r < i.pos || a > n.pos ? null : new pt(i.pos, n.pos, r, a, this.slice, this.insert, this.structure);
8851
+ return i.deletedAcross && n.deletedAcross || r < i.pos || a > n.pos ? null : new mt(i.pos, n.pos, r, a, this.slice, this.insert, this.structure);
8846
8852
  }
8847
8853
  toJSON() {
8848
8854
  let t = {
@@ -8861,10 +8867,10 @@ class pt extends Ot {
8861
8867
  static fromJSON(t, i) {
8862
8868
  if (typeof i.from != "number" || typeof i.to != "number" || typeof i.gapFrom != "number" || typeof i.gapTo != "number" || typeof i.insert != "number")
8863
8869
  throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");
8864
- return new pt(i.from, i.to, i.gapFrom, i.gapTo, pe.fromJSON(t, i.slice), i.insert, !!i.structure);
8870
+ return new mt(i.from, i.to, i.gapFrom, i.gapTo, pe.fromJSON(t, i.slice), i.insert, !!i.structure);
8865
8871
  }
8866
8872
  }
8867
- Ot.jsonID("replaceAround", pt);
8873
+ Ot.jsonID("replaceAround", mt);
8868
8874
  function wl(e, t, i) {
8869
8875
  let n = e.resolve(t), r = i - t, a = n.depth;
8870
8876
  for (; r > 0 && a > 0 && n.indexAfter(a) == n.node(a).childCount; )
@@ -8965,7 +8971,7 @@ function Py(e, t, i) {
8965
8971
  let d = ie.empty, m = 0;
8966
8972
  for (let b = a, h = !1; b > i; b--)
8967
8973
  h || r.after(b + 1) < r.end(b) ? (h = !0, d = ie.from(r.node(b).copy(d)), m++) : u++;
8968
- e.step(new pt(l, u, s, o, new pe(f.append(d), p, m), f.size - p, !0));
8974
+ e.step(new mt(l, u, s, o, new pe(f.append(d), p, m), f.size - p, !0));
8969
8975
  }
8970
8976
  function cu(e, t, i = null, n = e) {
8971
8977
  let r = Fy(e, t), a = r && By(n, t);
@@ -9001,7 +9007,7 @@ function Uy(e, t, i) {
9001
9007
  n = ie.from(i[s].type.create(i[s].attrs, n));
9002
9008
  }
9003
9009
  let r = t.start, a = t.end;
9004
- e.step(new pt(r, a, r, a, new pe(n, 0, 0), i.length, !0));
9010
+ e.step(new mt(r, a, r, a, new pe(n, 0, 0), i.length, !0));
9005
9011
  }
9006
9012
  function Hy(e, t, i, n, r) {
9007
9013
  if (!n.isTextblock)
@@ -9017,7 +9023,7 @@ function Hy(e, t, i, n, r) {
9017
9023
  }
9018
9024
  u === !1 && dp(e, s, o, a), uu(e, e.mapping.slice(a).map(o, 1), n, void 0, u === null);
9019
9025
  let f = e.mapping.slice(a), p = f.map(o, 1), d = f.map(o + s.nodeSize, 1);
9020
- return e.step(new pt(p, d, p + 1, d - 1, new pe(ie.from(n.create(l, null, s.marks)), 0, 0), 1, !0)), u === !0 && fp(e, s, o, a), !1;
9026
+ return e.step(new mt(p, d, p + 1, d - 1, new pe(ie.from(n.create(l, null, s.marks)), 0, 0), 1, !0)), u === !0 && fp(e, s, o, a), !1;
9021
9027
  }
9022
9028
  });
9023
9029
  }
@@ -9055,7 +9061,7 @@ function jy(e, t, i, n, r) {
9055
9061
  return e.replaceWith(t, t + a.nodeSize, s);
9056
9062
  if (!i.validContent(a.content))
9057
9063
  throw new RangeError("Invalid content for node type " + i.name);
9058
- e.step(new pt(t, t + a.nodeSize, t + 1, t + a.nodeSize - 1, new pe(ie.from(s), 0, 0), 1, !0));
9064
+ e.step(new mt(t, t + a.nodeSize, t + 1, t + a.nodeSize - 1, new pe(ie.from(s), 0, 0), 1, !0));
9059
9065
  }
9060
9066
  function Ui(e, t, i = 1, n) {
9061
9067
  let r = e.resolve(t), a = r.depth - i, s = n && n[n.length - 1] || r.parent;
@@ -9210,7 +9216,7 @@ class Xy {
9210
9216
  for (; s && o && a.childCount == 1; )
9211
9217
  a = a.firstChild.content, s--, o--;
9212
9218
  let l = new pe(a, s, o);
9213
- return t > -1 ? new pt(n.pos, t, this.$to.pos, this.$to.end(), l, i) : l.size || n.pos != this.$to.pos ? new st(n.pos, r.pos, l) : null;
9219
+ return t > -1 ? new mt(n.pos, t, this.$to.pos, this.$to.end(), l, i) : l.size || n.pos != this.$to.pos ? new st(n.pos, r.pos, l) : null;
9214
9220
  }
9215
9221
  // Find a position on the start spine of `this.unplaced` that has
9216
9222
  // content that can be moved somewhere on the frontier. Returns two
@@ -9476,13 +9482,13 @@ class Yn extends Ot {
9476
9482
  apply(t) {
9477
9483
  let i = t.nodeAt(this.pos);
9478
9484
  if (!i)
9479
- return ct.fail("No node at attribute step's position");
9485
+ return ft.fail("No node at attribute step's position");
9480
9486
  let n = /* @__PURE__ */ Object.create(null);
9481
9487
  for (let a in i.attrs)
9482
9488
  n[a] = i.attrs[a];
9483
9489
  n[this.attr] = this.value;
9484
9490
  let r = i.type.create(n, null, i.marks);
9485
- return ct.fromReplace(t, this.pos, this.pos + 1, new pe(ie.from(r), 0, i.isLeaf ? 0 : 1));
9491
+ return ft.fromReplace(t, this.pos, this.pos + 1, new pe(ie.from(r), 0, i.isLeaf ? 0 : 1));
9486
9492
  }
9487
9493
  getMap() {
9488
9494
  return Kt.empty;
@@ -9517,7 +9523,7 @@ class $r extends Ot {
9517
9523
  i[r] = t.attrs[r];
9518
9524
  i[this.attr] = this.value;
9519
9525
  let n = t.type.create(i, t.content, t.marks);
9520
- return ct.ok(n);
9526
+ return ft.ok(n);
9521
9527
  }
9522
9528
  getMap() {
9523
9529
  return Kt.empty;
@@ -10049,7 +10055,7 @@ class to {
10049
10055
  return Ae.between(t.resolve(this.anchor), t.resolve(this.head));
10050
10056
  }
10051
10057
  }
10052
- class _e extends Me {
10058
+ class Se extends Me {
10053
10059
  /**
10054
10060
  Create a node selection. Does not verify the validity of its
10055
10061
  argument.
@@ -10060,13 +10066,13 @@ class _e extends Me {
10060
10066
  }
10061
10067
  map(t, i) {
10062
10068
  let { deleted: n, pos: r } = i.mapResult(this.anchor), a = t.resolve(r);
10063
- return n ? Me.near(a) : new _e(a);
10069
+ return n ? Me.near(a) : new Se(a);
10064
10070
  }
10065
10071
  content() {
10066
10072
  return new pe(ie.from(this.node), 0, 0);
10067
10073
  }
10068
10074
  eq(t) {
10069
- return t instanceof _e && t.anchor == this.anchor;
10075
+ return t instanceof Se && t.anchor == this.anchor;
10070
10076
  }
10071
10077
  toJSON() {
10072
10078
  return { type: "node", anchor: this.anchor };
@@ -10080,13 +10086,13 @@ class _e extends Me {
10080
10086
  static fromJSON(t, i) {
10081
10087
  if (typeof i.anchor != "number")
10082
10088
  throw new RangeError("Invalid input for NodeSelection.fromJSON");
10083
- return new _e(t.resolve(i.anchor));
10089
+ return new Se(t.resolve(i.anchor));
10084
10090
  }
10085
10091
  /**
10086
10092
  Create a node selection from non-resolved positions.
10087
10093
  */
10088
10094
  static create(t, i) {
10089
- return new _e(t.resolve(i));
10095
+ return new Se(t.resolve(i));
10090
10096
  }
10091
10097
  /**
10092
10098
  Determines whether the given node may be selected as a node
@@ -10096,8 +10102,8 @@ class _e extends Me {
10096
10102
  return !t.isText && t.type.spec.selectable !== !1;
10097
10103
  }
10098
10104
  }
10099
- _e.prototype.visible = !1;
10100
- Me.jsonID("node", _e);
10105
+ Se.prototype.visible = !1;
10106
+ Me.jsonID("node", Se);
10101
10107
  class fu {
10102
10108
  constructor(t) {
10103
10109
  this.anchor = t;
@@ -10108,7 +10114,7 @@ class fu {
10108
10114
  }
10109
10115
  resolve(t) {
10110
10116
  let i = t.resolve(this.anchor), n = i.nodeAfter;
10111
- return n && _e.isSelectable(n) ? new _e(i) : Me.near(i);
10117
+ return n && Se.isSelectable(n) ? new Se(i) : Me.near(i);
10112
10118
  }
10113
10119
  }
10114
10120
  class Jt extends Me {
@@ -10160,8 +10166,8 @@ function Xn(e, t, i, n, r, a = !1) {
10160
10166
  for (let s = n - (r > 0 ? 0 : 1); r > 0 ? s < t.childCount : s >= 0; s += r) {
10161
10167
  let o = t.child(s);
10162
10168
  if (o.isAtom) {
10163
- if (!a && _e.isSelectable(o))
10164
- return _e.create(e, i - (r < 0 ? o.nodeSize : 0));
10169
+ if (!a && Se.isSelectable(o))
10170
+ return Se.create(e, i - (r < 0 ? o.nodeSize : 0));
10165
10171
  } else {
10166
10172
  let l = Xn(e, o, i + r, r < 0 ? o.childCount : 0, r, a);
10167
10173
  if (l)
@@ -10176,7 +10182,7 @@ function Wc(e, t, i) {
10176
10182
  if (n < t)
10177
10183
  return;
10178
10184
  let r = e.steps[n];
10179
- if (!(r instanceof st || r instanceof pt))
10185
+ if (!(r instanceof st || r instanceof mt))
10180
10186
  return;
10181
10187
  let a = e.mapping.maps[n], s;
10182
10188
  a.forEach((o, l, u, f) => {
@@ -10336,9 +10342,9 @@ function a2(e, t = null) {
10336
10342
  for (l = s; r && !r.node; )
10337
10343
  r = r.parent;
10338
10344
  let p = r.node;
10339
- if (r && p.isAtom && _e.isSelectable(p) && r.parent && !(p.isInline && n2(i.focusNode, i.focusOffset, r.dom))) {
10345
+ if (r && p.isAtom && Se.isSelectable(p) && r.parent && !(p.isInline && n2(i.focusNode, i.focusOffset, r.dom))) {
10340
10346
  let d = r.posBefore;
10341
- u = new _e(s == d ? o : n.resolve(d));
10347
+ u = new Se(s == d ? o : n.resolve(d));
10342
10348
  }
10343
10349
  } else {
10344
10350
  if (i instanceof e.dom.ownerDocument.defaultView.Selection && i.rangeCount > 1) {
@@ -10421,7 +10427,7 @@ function o2(e) {
10421
10427
  n ? t.collapse(i.parentNode, Pn(i) + 1) : t.collapse(i, 0), !n && !e.state.selection.visible && ta && Ap <= 11 && (i.disabled = !0, i.disabled = !1);
10422
10428
  }
10423
10429
  function l2(e, t) {
10424
- if (t instanceof _e) {
10430
+ if (t instanceof Se) {
10425
10431
  let i = e.docView.descAt(t.from);
10426
10432
  i != e.lastSelectedViewDesc && (Yc(e), i && i.selectNode(), e.lastSelectedViewDesc = i);
10427
10433
  } else
@@ -10462,17 +10468,17 @@ function ef(e, t, i) {
10462
10468
  } else if (n.empty) {
10463
10469
  if (e.endOfTextblock(t > 0 ? "forward" : "backward")) {
10464
10470
  let r = Al(e.state, t);
10465
- return r && r instanceof _e ? Ji(e, r) : !1;
10471
+ return r && r instanceof Se ? Ji(e, r) : !1;
10466
10472
  } else if (!(ii && i.indexOf("m") > -1)) {
10467
10473
  let r = n.$head, a = r.textOffset ? null : t < 0 ? r.nodeBefore : r.nodeAfter, s;
10468
10474
  if (!a || a.isText)
10469
10475
  return !1;
10470
10476
  let o = t < 0 ? r.pos - a.nodeSize : r.pos;
10471
- return a.isAtom || (s = e.docView.descAt(o)) && !s.contentDOM ? _e.isSelectable(a) ? Ji(e, new _e(t < 0 ? e.state.doc.resolve(r.pos - a.nodeSize) : r)) : mu ? Ji(e, new Ae(e.state.doc.resolve(t < 0 ? o : o + a.nodeSize))) : !1 : !1;
10477
+ return a.isAtom || (s = e.docView.descAt(o)) && !s.contentDOM ? Se.isSelectable(a) ? Ji(e, new Se(t < 0 ? e.state.doc.resolve(r.pos - a.nodeSize) : r)) : mu ? Ji(e, new Ae(e.state.doc.resolve(t < 0 ? o : o + a.nodeSize))) : !1 : !1;
10472
10478
  }
10473
10479
  } else return !1;
10474
10480
  else {
10475
- if (n instanceof _e && n.node.isInline)
10481
+ if (n instanceof Se && n.node.isInline)
10476
10482
  return Ji(e, new Ae(t > 0 ? n.$to : n.$from));
10477
10483
  {
10478
10484
  let r = Al(e.state, t);
@@ -10628,7 +10634,7 @@ function nf(e, t, i) {
10628
10634
  let { $from: r, $to: a } = n;
10629
10635
  if (!r.parent.inlineContent || e.endOfTextblock(t < 0 ? "up" : "down")) {
10630
10636
  let s = Al(e.state, t);
10631
- if (s && s instanceof _e)
10637
+ if (s && s instanceof Se)
10632
10638
  return Ji(e, s);
10633
10639
  }
10634
10640
  if (!r.parent.inlineContent) {
@@ -10942,22 +10948,22 @@ function S2(e, t) {
10942
10948
  if (t == -1)
10943
10949
  return !1;
10944
10950
  let i = e.state.doc.resolve(t), n = i.nodeAfter;
10945
- return n && n.isAtom && _e.isSelectable(n) ? (ra(e, new _e(i)), !0) : !1;
10951
+ return n && n.isAtom && Se.isSelectable(n) ? (ra(e, new Se(i)), !0) : !1;
10946
10952
  }
10947
10953
  function C2(e, t) {
10948
10954
  if (t == -1)
10949
10955
  return !1;
10950
10956
  let i = e.state.selection, n, r;
10951
- i instanceof _e && (n = i.node);
10957
+ i instanceof Se && (n = i.node);
10952
10958
  let a = e.state.doc.resolve(t);
10953
10959
  for (let s = a.depth + 1; s > 0; s--) {
10954
10960
  let o = s > a.depth ? a.nodeAfter : a.node(s);
10955
- if (_e.isSelectable(o)) {
10961
+ if (Se.isSelectable(o)) {
10956
10962
  n && i.$from.depth > 0 && s >= i.$from.depth && a.before(i.$from.depth + 1) == i.$from.pos ? r = a.before(i.$from.depth) : r = a.before(s);
10957
10963
  break;
10958
10964
  }
10959
10965
  }
10960
- return r != null ? (ra(e, _e.create(e.state.doc, r)), !0) : !1;
10966
+ return r != null ? (ra(e, Se.create(e.state.doc, r)), !0) : !1;
10961
10967
  }
10962
10968
  function A2(e, t, i, n, r) {
10963
10969
  return bu(e, "handleClickOn", t, i, n) || e.someProp("handleClick", (a) => a(e, t, n)) || (r ? C2(e, i) : S2(e, i));
@@ -10983,8 +10989,8 @@ function Bp(e, t, i) {
10983
10989
  let s = a > r.depth ? r.nodeAfter : r.node(a), o = r.before(a);
10984
10990
  if (s.inlineContent)
10985
10991
  return Ae.create(n, o + 1, o + 1 + s.content.size);
10986
- if (i && _e.isSelectable(s))
10987
- return _e.create(n, o);
10992
+ if (i && Se.isSelectable(s))
10993
+ return Se.create(n, o);
10988
10994
  }
10989
10995
  return null;
10990
10996
  }
@@ -11030,7 +11036,7 @@ class M2 extends Hp {
11030
11036
  const o = r ? null : n.target, l = o ? t.docView.nearestDesc(o, !0) : null;
11031
11037
  this.target = l && l.nodeDOM.nodeType == 1 ? l.nodeDOM : null;
11032
11038
  let { selection: u } = t.state;
11033
- n.button == 0 && (a.type.spec.draggable && a.type.spec.selectable !== !1 || u instanceof _e && u.from <= s && u.to > s) && (this.mightDrag = {
11039
+ n.button == 0 && (a.type.spec.draggable && a.type.spec.selectable !== !1 || u instanceof Se && u.from <= s && u.to > s) && (this.mightDrag = {
11034
11040
  node: a,
11035
11041
  pos: s,
11036
11042
  addAttr: !!(this.target && !this.target.draggable),
@@ -11217,12 +11223,12 @@ di.dragstart = (e, t) => {
11217
11223
  if (n && n.done(), !i.dataTransfer)
11218
11224
  return;
11219
11225
  let r = e.state.selection, a = r.empty ? null : e.posAtCoords(na(i)), s;
11220
- if (!(a && a.pos >= r.from && a.pos <= (r instanceof _e ? r.to - 1 : r.to))) {
11226
+ if (!(a && a.pos >= r.from && a.pos <= (r instanceof Se ? r.to - 1 : r.to))) {
11221
11227
  if (n && n.mightDrag)
11222
- s = _e.create(e.state.doc, n.mightDrag.pos);
11228
+ s = Se.create(e.state.doc, n.mightDrag.pos);
11223
11229
  else if (i.target && i.target.nodeType == 1) {
11224
11230
  let p = e.docView.nearestDesc(i.target, !0);
11225
- p && p.node.type.spec.draggable && p != e.docView && (s = _e.create(e.state.doc, p.posBefore));
11231
+ p && p.node.type.spec.draggable && p != e.docView && (s = Se.create(e.state.doc, p.posBefore));
11226
11232
  }
11227
11233
  }
11228
11234
  let o = (s || e.state.selection).content(), { dom: l, text: u, slice: f } = zp(e, o);
@@ -11271,8 +11277,8 @@ function U2(e, t, i) {
11271
11277
  if (f ? l.replaceRangeWith(u, u, a.content.firstChild) : l.replaceRange(u, u, a), l.doc.eq(p))
11272
11278
  return;
11273
11279
  let d = l.doc.resolve(u);
11274
- if (f && _e.isSelectable(a.content.firstChild) && d.nodeAfter && d.nodeAfter.sameMarkup(a.content.firstChild))
11275
- l.setSelection(new _e(d));
11280
+ if (f && Se.isSelectable(a.content.firstChild) && d.nodeAfter && d.nodeAfter.sameMarkup(a.content.firstChild))
11281
+ l.setSelection(new Se(d));
11276
11282
  else {
11277
11283
  let m = l.mapping.map(o);
11278
11284
  l.mapping.maps[l.mapping.maps.length - 1].forEach((b, h, v, g) => m = g), l.setSelection(Mp(e, d, l.doc.resolve(m)));
@@ -11961,13 +11967,13 @@ const Jp = (e, t, i) => {
11961
11967
  let a = r.nodeBefore;
11962
11968
  if (am(e, r, t, -1))
11963
11969
  return !0;
11964
- if (n.parent.content.size == 0 && (nr(a, "end") || _e.isSelectable(a)))
11970
+ if (n.parent.content.size == 0 && (nr(a, "end") || Se.isSelectable(a)))
11965
11971
  for (let s = n.depth; ; s--) {
11966
11972
  let o = eo(e.doc, n.before(s), n.after(s), pe.empty);
11967
11973
  if (o && o.slice.size < o.to - o.from) {
11968
11974
  if (t) {
11969
11975
  let l = e.tr.step(o);
11970
- l.setSelection(nr(a, "end") ? Me.findFrom(l.doc.resolve(l.mapping.map(r.pos, -1)), -1) : _e.create(l.doc, r.pos - a.nodeSize)), t(l.scrollIntoView());
11976
+ l.setSelection(nr(a, "end") ? Me.findFrom(l.doc.resolve(l.mapping.map(r.pos, -1)), -1) : Se.create(l.doc, r.pos - a.nodeSize)), t(l.scrollIntoView());
11971
11977
  }
11972
11978
  return !0;
11973
11979
  }
@@ -12035,7 +12041,7 @@ const Qp = (e, t, i) => {
12035
12041
  a = ku(n);
12036
12042
  }
12037
12043
  let s = a && a.nodeBefore;
12038
- return !s || !_e.isSelectable(s) ? !1 : (t && t(e.tr.setSelection(_e.create(e.doc, a.pos - s.nodeSize)).scrollIntoView()), !0);
12044
+ return !s || !Se.isSelectable(s) ? !1 : (t && t(e.tr.setSelection(Se.create(e.doc, a.pos - s.nodeSize)).scrollIntoView()), !0);
12039
12045
  };
12040
12046
  function ku(e) {
12041
12047
  if (!e.parent.type.spec.isolating)
@@ -12061,12 +12067,12 @@ const em = (e, t, i) => {
12061
12067
  let a = r.nodeAfter;
12062
12068
  if (am(e, r, t, 1))
12063
12069
  return !0;
12064
- if (n.parent.content.size == 0 && (nr(a, "start") || _e.isSelectable(a))) {
12070
+ if (n.parent.content.size == 0 && (nr(a, "start") || Se.isSelectable(a))) {
12065
12071
  let s = eo(e.doc, n.before(), n.after(), pe.empty);
12066
12072
  if (s && s.slice.size < s.to - s.from) {
12067
12073
  if (t) {
12068
12074
  let o = e.tr.step(s);
12069
- o.setSelection(nr(a, "start") ? Me.findFrom(o.doc.resolve(o.mapping.map(r.pos)), 1) : _e.create(o.doc, o.mapping.map(r.pos))), t(o.scrollIntoView());
12075
+ o.setSelection(nr(a, "start") ? Me.findFrom(o.doc.resolve(o.mapping.map(r.pos)), 1) : Se.create(o.doc, o.mapping.map(r.pos))), t(o.scrollIntoView());
12070
12076
  }
12071
12077
  return !0;
12072
12078
  }
@@ -12082,7 +12088,7 @@ const em = (e, t, i) => {
12082
12088
  a = wu(n);
12083
12089
  }
12084
12090
  let s = a && a.nodeAfter;
12085
- return !s || !_e.isSelectable(s) ? !1 : (t && t(e.tr.setSelection(_e.create(e.doc, a.pos)).scrollIntoView()), !0);
12091
+ return !s || !Se.isSelectable(s) ? !1 : (t && t(e.tr.setSelection(Se.create(e.doc, a.pos)).scrollIntoView()), !0);
12086
12092
  };
12087
12093
  function wu(e) {
12088
12094
  if (!e.parent.type.spec.isolating)
@@ -12096,7 +12102,7 @@ function wu(e) {
12096
12102
  return null;
12097
12103
  }
12098
12104
  const Y2 = (e, t) => {
12099
- let i = e.selection, n = i instanceof _e, r;
12105
+ let i = e.selection, n = i instanceof Se, r;
12100
12106
  if (n) {
12101
12107
  if (i.node.isTextblock || !fn(e.doc, i.from))
12102
12108
  return !1;
@@ -12105,12 +12111,12 @@ const Y2 = (e, t) => {
12105
12111
  return !1;
12106
12112
  if (t) {
12107
12113
  let a = e.tr.join(r);
12108
- n && a.setSelection(_e.create(a.doc, r - e.doc.resolve(r).nodeBefore.nodeSize)), t(a.scrollIntoView());
12114
+ n && a.setSelection(Se.create(a.doc, r - e.doc.resolve(r).nodeBefore.nodeSize)), t(a.scrollIntoView());
12109
12115
  }
12110
12116
  return !0;
12111
12117
  }, ek = (e, t) => {
12112
12118
  let i = e.selection, n;
12113
- if (i instanceof _e) {
12119
+ if (i instanceof Se) {
12114
12120
  if (i.node.isTextblock || !fn(e.doc, i.to))
12115
12121
  return !1;
12116
12122
  n = i.to;
@@ -12172,7 +12178,7 @@ const ik = (e, t) => {
12172
12178
  function nk(e) {
12173
12179
  return (t, i) => {
12174
12180
  let { $from: n, $to: r } = t.selection;
12175
- if (t.selection instanceof _e && t.selection.node.isBlock)
12181
+ if (t.selection instanceof Se && t.selection.node.isBlock)
12176
12182
  return !n.parentOffset || !Ui(t.doc, n.pos) ? !1 : (i && i(t.tr.split(n.pos).scrollIntoView()), !0);
12177
12183
  if (!n.depth)
12178
12184
  return !1;
@@ -12200,7 +12206,7 @@ function nk(e) {
12200
12206
  }
12201
12207
  const rk = nk(), ak = (e, t) => {
12202
12208
  let { $from: i, to: n } = e.selection, r, a = i.sharedDepth(n);
12203
- return a == 0 ? !1 : (r = i.before(a), t && t(e.tr.setSelection(_e.create(e.doc, r))), !0);
12209
+ return a == 0 ? !1 : (r = i.before(a), t && t(e.tr.setSelection(Se.create(e.doc, r))), !0);
12204
12210
  };
12205
12211
  function sk(e, t, i) {
12206
12212
  let n = t.nodeBefore, r = t.nodeAfter, a = t.index();
@@ -12217,7 +12223,7 @@ function am(e, t, i, n) {
12217
12223
  for (let g = s.length - 1; g >= 0; g--)
12218
12224
  b = ie.from(s[g].create(null, b));
12219
12225
  b = ie.from(r.copy(b));
12220
- let h = e.tr.step(new pt(t.pos - 1, m, t.pos, m, new pe(b, 1, 0), s.length, !0)), v = h.doc.resolve(m + 2 * s.length);
12226
+ let h = e.tr.step(new mt(t.pos - 1, m, t.pos, m, new pe(b, 1, 0), s.length, !0)), v = h.doc.resolve(m + 2 * s.length);
12221
12227
  v.nodeAfter && v.nodeAfter.type == r.type && fn(h.doc, v.pos) && h.join(v.pos), i(h.scrollIntoView());
12222
12228
  }
12223
12229
  return !0;
@@ -12237,7 +12243,7 @@ function am(e, t, i, n) {
12237
12243
  let g = ie.empty;
12238
12244
  for (let y = b.length - 1; y >= 0; y--)
12239
12245
  g = ie.from(b[y].copy(g));
12240
- let x = e.tr.step(new pt(t.pos - b.length, t.pos + a.nodeSize, t.pos + v, t.pos + a.nodeSize - v, new pe(g, b.length, 0), 0, !0));
12246
+ let x = e.tr.step(new mt(t.pos - b.length, t.pos + a.nodeSize, t.pos + v, t.pos + a.nodeSize - v, new pe(g, b.length, 0), 0, !0));
12241
12247
  i(x.scrollIntoView());
12242
12248
  }
12243
12249
  return !0;
@@ -12329,7 +12335,7 @@ function dk(e, t, i, n, r) {
12329
12335
  let a = ie.empty;
12330
12336
  for (let f = i.length - 1; f >= 0; f--)
12331
12337
  a = ie.from(i[f].type.create(i[f].attrs, a));
12332
- e.step(new pt(t.start - (n ? 2 : 0), t.end, t.start, t.end, new pe(a, 0, 0), i.length, !0));
12338
+ e.step(new mt(t.start - (n ? 2 : 0), t.end, t.start, t.end, new pe(a, 0, 0), i.length, !0));
12333
12339
  let s = 0;
12334
12340
  for (let f = 0; f < i.length; f++)
12335
12341
  i[f].type == r && (s = f + 1);
@@ -12346,7 +12352,7 @@ function pk(e) {
12346
12352
  }
12347
12353
  function mk(e, t, i, n) {
12348
12354
  let r = e.tr, a = n.end, s = n.$to.end(n.depth);
12349
- a < s && (r.step(new pt(a - 1, s, a, s, new pe(ie.from(i.create(null, n.parent.copy())), 1, 0), 1, !0)), n = new us(r.doc.resolve(n.$from.pos), r.doc.resolve(s), n.depth));
12355
+ a < s && (r.step(new mt(a - 1, s, a, s, new pe(ie.from(i.create(null, n.parent.copy())), 1, 0), 1, !0)), n = new us(r.doc.resolve(n.$from.pos), r.doc.resolve(s), n.depth));
12350
12356
  const o = ur(n);
12351
12357
  if (o == null)
12352
12358
  return !1;
@@ -12365,7 +12371,7 @@ function hk(e, t, i) {
12365
12371
  if (!u.canReplace(f + (o ? 0 : 1), f + 1, s.content.append(l ? ie.empty : ie.from(r))))
12366
12372
  return !1;
12367
12373
  let p = a.pos, d = p + s.nodeSize;
12368
- return n.step(new pt(p - (o ? 1 : 0), d + (l ? 1 : 0), p + 1, d - 1, new pe((o ? ie.empty : ie.from(r.copy(ie.empty))).append(l ? ie.empty : ie.from(r.copy(ie.empty))), o ? 0 : 1, l ? 0 : 1), o ? 0 : 1)), t(n.scrollIntoView()), !0;
12374
+ return n.step(new mt(p - (o ? 1 : 0), d + (l ? 1 : 0), p + 1, d - 1, new pe((o ? ie.empty : ie.from(r.copy(ie.empty))).append(l ? ie.empty : ie.from(r.copy(ie.empty))), o ? 0 : 1, l ? 0 : 1), o ? 0 : 1)), t(n.scrollIntoView()), !0;
12369
12375
  }
12370
12376
  function bk(e) {
12371
12377
  return function(t, i) {
@@ -12380,7 +12386,7 @@ function bk(e) {
12380
12386
  return !1;
12381
12387
  if (i) {
12382
12388
  let u = l.lastChild && l.lastChild.type == o.type, f = ie.from(u ? e.create() : null), p = new pe(ie.from(e.create(null, ie.from(o.type.create(null, f)))), u ? 3 : 1, 0), d = a.start, m = a.end;
12383
- i(t.tr.step(new pt(d - (u ? 3 : 1), m, d, m, p, 1, !0)).scrollIntoView());
12389
+ i(t.tr.step(new mt(d - (u ? 3 : 1), m, d, m, p, 1, !0)).scrollIntoView());
12384
12390
  }
12385
12391
  return !0;
12386
12392
  };
@@ -12520,7 +12526,7 @@ function Ye(...e) {
12520
12526
  function xk(e) {
12521
12527
  return typeof e == "function";
12522
12528
  }
12523
- function gt(e, t = void 0, ...i) {
12529
+ function vt(e, t = void 0, ...i) {
12524
12530
  return xk(e) ? t ? e.bind(t)(...i) : e(...i) : e;
12525
12531
  }
12526
12532
  function lm(e, t) {
@@ -12555,9 +12561,9 @@ class $t {
12555
12561
  }, this.config = {
12556
12562
  ...this.config,
12557
12563
  ...t
12558
- }, this.name = this.config.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = gt(At(this, "addOptions", {
12564
+ }, this.name = this.config.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = vt(At(this, "addOptions", {
12559
12565
  name: this.name
12560
- }))), this.storage = gt(At(this, "addStorage", {
12566
+ }))), this.storage = vt(At(this, "addStorage", {
12561
12567
  name: this.name,
12562
12568
  options: this.options
12563
12569
  })) || {};
@@ -12574,9 +12580,9 @@ class $t {
12574
12580
  }
12575
12581
  extend(t = {}) {
12576
12582
  const i = new $t(t);
12577
- return i.parent = this, this.child = i, i.name = t.name ? t.name : i.parent.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${i.name}".`), i.options = gt(At(i, "addOptions", {
12583
+ return i.parent = this, this.child = i, i.name = t.name ? t.name : i.parent.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${i.name}".`), i.options = vt(At(i, "addOptions", {
12578
12584
  name: i.name
12579
- })), i.storage = gt(At(i, "addStorage", {
12585
+ })), i.storage = vt(At(i, "addStorage", {
12580
12586
  name: i.name,
12581
12587
  options: i.options
12582
12588
  })), i;
@@ -12606,9 +12612,9 @@ class lt {
12606
12612
  }, this.config = {
12607
12613
  ...this.config,
12608
12614
  ...t
12609
- }, this.name = this.config.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = gt(At(this, "addOptions", {
12615
+ }, this.name = this.config.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = vt(At(this, "addOptions", {
12610
12616
  name: this.name
12611
- }))), this.storage = gt(At(this, "addStorage", {
12617
+ }))), this.storage = vt(At(this, "addStorage", {
12612
12618
  name: this.name,
12613
12619
  options: this.options
12614
12620
  })) || {};
@@ -12625,9 +12631,9 @@ class lt {
12625
12631
  }
12626
12632
  extend(t = {}) {
12627
12633
  const i = new lt({ ...this.config, ...t });
12628
- return i.parent = this, this.child = i, i.name = t.name ? t.name : i.parent.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${i.name}".`), i.options = gt(At(i, "addOptions", {
12634
+ return i.parent = this, this.child = i, i.name = t.name ? t.name : i.parent.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${i.name}".`), i.options = vt(At(i, "addOptions", {
12629
12635
  name: i.name
12630
- })), i.storage = gt(At(i, "addStorage", {
12636
+ })), i.storage = vt(At(i, "addStorage", {
12631
12637
  name: i.name,
12632
12638
  options: i.options
12633
12639
  })), i;
@@ -12904,7 +12910,7 @@ function Vk(e, t, i) {
12904
12910
  if (n < t)
12905
12911
  return;
12906
12912
  const r = e.steps[n];
12907
- if (!(r instanceof st || r instanceof pt))
12913
+ if (!(r instanceof st || r instanceof mt))
12908
12914
  return;
12909
12915
  const a = e.mapping.maps[n];
12910
12916
  let s = 0;
@@ -13252,7 +13258,7 @@ function pf(e, t) {
13252
13258
  name: n.name,
13253
13259
  options: n.options,
13254
13260
  storage: n.storage
13255
- }, a = gt(At(n, "group", r));
13261
+ }, a = vt(At(n, "group", r));
13256
13262
  return typeof a != "string" ? !1 : a.split(" ").includes("list");
13257
13263
  }
13258
13264
  function Du(e, { checkChildren: t = !0, ignoreWhitespace: i = !1 } = {}) {
@@ -13328,7 +13334,7 @@ const Ow = (e, t = {}) => ({ tr: i, state: n, dispatch: r }) => {
13328
13334
  return i.selection.$anchor.sameParent(i.selection.$head) && (s = i.selection.$anchor.parent.attrs), a.isTextblock ? r().command(({ commands: o }) => uf(a, { ...s, ...t })(i) ? !0 : o.clearNodes()).command(({ state: o }) => uf(a, { ...s, ...t })(o, n)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
13329
13335
  }, Dw = (e) => ({ tr: t, dispatch: i }) => {
13330
13336
  if (i) {
13331
- const { doc: n } = t, r = Cn(e, 0, n.content.size), a = _e.create(n, r);
13337
+ const { doc: n } = t, r = Cn(e, 0, n.content.size), a = Se.create(n, r);
13332
13338
  t.setSelection(a);
13333
13339
  }
13334
13340
  return !0;
@@ -13351,7 +13357,7 @@ function mf(e, t) {
13351
13357
  }
13352
13358
  const Iw = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: i, dispatch: n, editor: r }) => {
13353
13359
  const { selection: a, doc: s } = t, { $from: o, $to: l } = a, u = r.extensionManager.attributes, f = Ya(u, o.node().type.name, o.node().attrs);
13354
- if (a instanceof _e && a.node.isBlock)
13360
+ if (a instanceof Se && a.node.isBlock)
13355
13361
  return !o.parentOffset || !Ui(s, o.pos) ? !1 : (n && (e && mf(i, r.extensionManager.splittableMarks), t.split(o.pos).scrollIntoView()), !0);
13356
13362
  if (!o.parent.isBlock)
13357
13363
  return !1;
@@ -13798,7 +13804,7 @@ function t_(e) {
13798
13804
  return new Cu({
13799
13805
  find: e.find,
13800
13806
  handler: ({ state: t, range: i, match: n }) => {
13801
- const r = gt(e.getAttributes, void 0, n);
13807
+ const r = vt(e.getAttributes, void 0, n);
13802
13808
  if (r === !1 || r === null)
13803
13809
  return null;
13804
13810
  const { tr: a } = t, s = n[n.length - 1], o = n[0];
@@ -13817,7 +13823,7 @@ function i_(e) {
13817
13823
  return new Cu({
13818
13824
  find: e.find,
13819
13825
  handler: ({ state: t, range: i, match: n }) => {
13820
- const r = gt(e.getAttributes, void 0, n) || {}, { tr: a } = t, s = i.from;
13826
+ const r = vt(e.getAttributes, void 0, n) || {}, { tr: a } = t, s = i.from;
13821
13827
  let o = i.to;
13822
13828
  const l = e.type.create(r);
13823
13829
  if (n[1]) {
@@ -13838,7 +13844,7 @@ function n_(e) {
13838
13844
  return new Cu({
13839
13845
  find: e.find,
13840
13846
  handler: ({ state: t, range: i, match: n, chain: r }) => {
13841
- const a = gt(e.getAttributes, void 0, n) || {}, s = t.tr.delete(i.from, i.to), l = s.doc.resolve(i.from).blockRange(), u = l && cu(l, e.type, a);
13847
+ const a = vt(e.getAttributes, void 0, n) || {}, s = t.tr.delete(i.from, i.to), l = s.doc.resolve(i.from).blockRange(), u = l && cu(l, e.type, a);
13842
13848
  if (!u)
13843
13849
  return null;
13844
13850
  if (s.wrap(l, u), e.keepMarks && e.editor) {
@@ -13865,9 +13871,9 @@ let Be = class Ml {
13865
13871
  }, this.config = {
13866
13872
  ...this.config,
13867
13873
  ...t
13868
- }, this.name = this.config.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = gt(At(this, "addOptions", {
13874
+ }, this.name = this.config.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = vt(At(this, "addOptions", {
13869
13875
  name: this.name
13870
- }))), this.storage = gt(At(this, "addStorage", {
13876
+ }))), this.storage = vt(At(this, "addStorage", {
13871
13877
  name: this.name,
13872
13878
  options: this.options
13873
13879
  })) || {};
@@ -13884,9 +13890,9 @@ let Be = class Ml {
13884
13890
  }
13885
13891
  extend(t = {}) {
13886
13892
  const i = new Ml(t);
13887
- return i.parent = this, this.child = i, i.name = t.name ? t.name : i.parent.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${i.name}".`), i.options = gt(At(i, "addOptions", {
13893
+ return i.parent = this, this.child = i, i.name = t.name ? t.name : i.parent.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${i.name}".`), i.options = vt(At(i, "addOptions", {
13888
13894
  name: i.name
13889
- })), i.storage = gt(At(i, "addStorage", {
13895
+ })), i.storage = vt(At(i, "addStorage", {
13890
13896
  name: i.name,
13891
13897
  options: i.options
13892
13898
  })), i;
@@ -13896,7 +13902,7 @@ function bm(e) {
13896
13902
  return new wk({
13897
13903
  find: e.find,
13898
13904
  handler: ({ state: t, range: i, match: n, pasteEvent: r }) => {
13899
- const a = gt(e.getAttributes, void 0, n, r);
13905
+ const a = vt(e.getAttributes, void 0, n, r);
13900
13906
  if (a === !1 || a === null)
13901
13907
  return null;
13902
13908
  const { tr: s } = t, o = n[n.length - 1], l = n[0];
@@ -15560,7 +15566,7 @@ function K_({ $from: e, $to: t }) {
15560
15566
  function X_(e, t, i) {
15561
15567
  const n = (t || e).selection, r = (t || e).doc;
15562
15568
  let a, s;
15563
- if (n instanceof _e && (s = n.node.type.spec.tableRole)) {
15569
+ if (n instanceof Se && (s = n.node.type.spec.tableRole)) {
15564
15570
  if (s == "cell" || s == "header_cell") a = Qe.create(r, n.from);
15565
15571
  else if (s == "row") {
15566
15572
  const o = r.resolve(n.from + 1);
@@ -16740,7 +16746,7 @@ const Va = ({ editor: e }) => {
16740
16746
  storage: e.storage
16741
16747
  };
16742
16748
  return {
16743
- tableRole: gt(At(e, "tableRole", t))
16749
+ tableRole: vt(At(e, "tableRole", t))
16744
16750
  };
16745
16751
  }
16746
16752
  }), U3 = Be.create({
@@ -19990,8 +19996,8 @@ c.Engine.prototype.processCitationCluster = function(e, t, i, n) {
19990
19996
  if (B.position = g[1].position, B["first-reference-note-number"] = g[1]["first-reference-note-number"], B["first-container-reference-note-number"] = g[1]["first-container-reference-note-number"], B["near-note"] = g[1]["near-note"], g[1]["first-reference-note-number"] = 0, g[1]["first-container-reference-note-number"] = 0, g[1]["near-note"] = !1, this.registry.citationreg.citationsByItemId[Ue] && this.opt.xclass === "note" && this.opt.has_disambiguate) {
19991
19997
  var re = this.registry.registry[g[0].id]["citation-count"], Je = this.registry.citationreg.citationsByItemId[Ue].length;
19992
19998
  if (this.registry.registry[g[0].id]["citation-count"] = this.registry.citationreg.citationsByItemId[Ue].length, typeof re == "number") {
19993
- var ut = re < 2, dt = Je < 2;
19994
- if (ut !== dt)
19999
+ var ut = re < 2, pt = Je < 2;
20000
+ if (ut !== pt)
19995
20001
  for (var Y = 0, Ai = this.registry.citationreg.citationsByItemId[Ue].length; Y < Ai; Y++)
19996
20002
  X[this.registry.registry[g[0].id].ambig] = !0, this.tmp.taintedCitationIDs[this.registry.citationreg.citationsByItemId[Ue][Y].citationID] = !0;
19997
20003
  } else
@@ -20002,24 +20008,24 @@ c.Engine.prototype.processCitationCluster = function(e, t, i, n) {
20002
20008
  if (typeof J[ye] > "u" && he.properties.mode !== "author-only")
20003
20009
  $[$e] = he.properties.noteIndex, J[ye] = he.properties.noteIndex, de[ye] = he.properties.noteIndex, g[1].position = c.POSITION_FIRST;
20004
20010
  else {
20005
- var ai = !1, qi = !1, vt = null;
20011
+ var ai = !1, qi = !1, xt = null;
20006
20012
  if (u > 0)
20007
- var vt = ee[u - 1];
20013
+ var xt = ee[u - 1];
20008
20014
  var mn = ee[u];
20009
20015
  if (u > 0) {
20010
20016
  var fr = 1;
20011
- vt.properties.mode === "author-only" && u > 1 && (fr = 2);
20017
+ xt.properties.mode === "author-only" && u > 1 && (fr = 2);
20012
20018
  var dr = u - fr;
20013
- ee[dr].sortedItems.length && (Pt = ee[dr].sortedItems.slice(-1)[0][1].id, Ft = ee[u - fr].sortedItems.slice(-1)[0][1]["locator-extra"]), vt.sortedItems.length && vt.sortedItems[0].slice(-1)[0].legislation_id && (Pt = vt.sortedItems[0].slice(-1)[0].legislation_id);
20019
+ ee[dr].sortedItems.length && (Pt = ee[dr].sortedItems.slice(-1)[0][1].id, Ft = ee[u - fr].sortedItems.slice(-1)[0][1]["locator-extra"]), xt.sortedItems.length && xt.sortedItems[0].slice(-1)[0].legislation_id && (Pt = xt.sortedItems[0].slice(-1)[0].legislation_id);
20014
20020
  }
20015
- if (u > 0 && p === 0 && vt.properties.noteIndex !== mn.properties.noteIndex) {
20016
- var hn = !1, ji = vt.sortedItems[0][0].id;
20017
- if (vt.sortedItems[0][0].legislation_id && (ji = vt.sortedItems[0][0].legislation_id), ji == $e && vt.properties.noteIndex >= mn.properties.noteIndex - 1) {
20018
- var po = vt.sortedItems[0][1]["locator-extra"], Ti = mn.sortedItems[0][1]["locator-extra"];
20019
- (C[vt.properties.noteIndex] === 1 || vt.properties.noteIndex === 0) && po === Ti && (hn = !0);
20021
+ if (u > 0 && p === 0 && xt.properties.noteIndex !== mn.properties.noteIndex) {
20022
+ var hn = !1, ji = xt.sortedItems[0][0].id;
20023
+ if (xt.sortedItems[0][0].legislation_id && (ji = xt.sortedItems[0][0].legislation_id), ji == $e && xt.properties.noteIndex >= mn.properties.noteIndex - 1) {
20024
+ var po = xt.sortedItems[0][1]["locator-extra"], Ti = mn.sortedItems[0][1]["locator-extra"];
20025
+ (C[xt.properties.noteIndex] === 1 || xt.properties.noteIndex === 0) && po === Ti && (hn = !0);
20020
20026
  }
20021
20027
  hn ? ai = !0 : qi = !0;
20022
- } else p > 0 && Pe == $e && ri == Le || p === 0 && u > 0 && vt.properties.noteIndex == mn.properties.noteIndex && vt.sortedItems.length && Pt == $e && Ft == Le ? ai = !0 : qi = !0;
20028
+ } else p > 0 && Pe == $e && ri == Le || p === 0 && u > 0 && xt.properties.noteIndex == mn.properties.noteIndex && xt.sortedItems.length && Pt == $e && Ft == Le ? ai = !0 : qi = !0;
20023
20029
  var Bt, si, pr, oi, bn;
20024
20030
  ai && (p > 0 ? Bt = he.sortedItems[p - 1][1] : Bt = ee[u - 1].sortedItems[0][1], Bt.locator ? (Bt.label ? pr = Bt.label : pr = "", si = "" + Bt.locator + pr) : si = Bt.locator, Q ? (Gt ? bn = Gt : bn = "", oi = "" + Q + bn) : oi = Q), ai && si && !oi && (ai = !1, qi = !0), ai && (!si && oi ? g[1].position = c.POSITION_IBID_WITH_LOCATOR : !si && !oi || si && oi === si ? g[1].position = c.POSITION_IBID : si && oi && oi !== si ? g[1].position = c.POSITION_IBID_WITH_LOCATOR : (ai = !1, qi = !0)), qi && (g[1].position = c.POSITION_CONTAINER_SUBSEQUENT, typeof $[$e] > "u" ? $[$e] = he.properties.noteIndex : g[1].position = c.POSITION_SUBSEQUENT), (qi || ai) && (he.properties.mode === "author-only" && (g[1].position = c.POSITION_FIRST), de[ye] != he.properties.noteIndex && (g[1]["first-container-reference-note-number"] = de[ye], this.registry.registry[g[0].id] && (this.registry.registry[g[0].id]["first-container-reference-note-number"] = de[ye])), $[$e] != he.properties.noteIndex && (g[1]["first-reference-note-number"] = $[$e], this.registry.registry[g[0].id] && (this.registry.registry[g[0].id]["first-reference-note-number"] = $[$e])));
20025
20031
  }
@@ -26345,42 +26351,42 @@ function m4(e) {
26345
26351
  var t;
26346
26352
  return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (t = d4.get(e)) !== null && t !== void 0 ? t : e;
26347
26353
  }
26348
- var bt;
26354
+ var gt;
26349
26355
  (function(e) {
26350
26356
  e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z";
26351
- })(bt || (bt = {}));
26357
+ })(gt || (gt = {}));
26352
26358
  const h4 = 32;
26353
26359
  var an;
26354
26360
  (function(e) {
26355
26361
  e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
26356
26362
  })(an || (an = {}));
26357
26363
  function Vl(e) {
26358
- return e >= bt.ZERO && e <= bt.NINE;
26364
+ return e >= gt.ZERO && e <= gt.NINE;
26359
26365
  }
26360
26366
  function b4(e) {
26361
- return e >= bt.UPPER_A && e <= bt.UPPER_F || e >= bt.LOWER_A && e <= bt.LOWER_F;
26367
+ return e >= gt.UPPER_A && e <= gt.UPPER_F || e >= gt.LOWER_A && e <= gt.LOWER_F;
26362
26368
  }
26363
26369
  function g4(e) {
26364
- return e >= bt.UPPER_A && e <= bt.UPPER_Z || e >= bt.LOWER_A && e <= bt.LOWER_Z || Vl(e);
26370
+ return e >= gt.UPPER_A && e <= gt.UPPER_Z || e >= gt.LOWER_A && e <= gt.LOWER_Z || Vl(e);
26365
26371
  }
26366
26372
  function v4(e) {
26367
- return e === bt.EQUALS || g4(e);
26373
+ return e === gt.EQUALS || g4(e);
26368
26374
  }
26369
- var ht;
26375
+ var bt;
26370
26376
  (function(e) {
26371
26377
  e[e.EntityStart = 0] = "EntityStart", e[e.NumericStart = 1] = "NumericStart", e[e.NumericDecimal = 2] = "NumericDecimal", e[e.NumericHex = 3] = "NumericHex", e[e.NamedEntity = 4] = "NamedEntity";
26372
- })(ht || (ht = {}));
26378
+ })(bt || (bt = {}));
26373
26379
  var Fi;
26374
26380
  (function(e) {
26375
26381
  e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
26376
26382
  })(Fi || (Fi = {}));
26377
26383
  class x4 {
26378
26384
  constructor(t, i, n) {
26379
- this.decodeTree = t, this.emitCodePoint = i, this.errors = n, this.state = ht.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = Fi.Strict;
26385
+ this.decodeTree = t, this.emitCodePoint = i, this.errors = n, this.state = bt.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = Fi.Strict;
26380
26386
  }
26381
26387
  /** Resets the instance to make it reusable. */
26382
26388
  startEntity(t) {
26383
- this.decodeMode = t, this.state = ht.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
26389
+ this.decodeMode = t, this.state = bt.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
26384
26390
  }
26385
26391
  /**
26386
26392
  * Write an entity to the decoder. This can be called multiple times with partial entities.
@@ -26395,15 +26401,15 @@ class x4 {
26395
26401
  */
26396
26402
  write(t, i) {
26397
26403
  switch (this.state) {
26398
- case ht.EntityStart:
26399
- return t.charCodeAt(i) === bt.NUM ? (this.state = ht.NumericStart, this.consumed += 1, this.stateNumericStart(t, i + 1)) : (this.state = ht.NamedEntity, this.stateNamedEntity(t, i));
26400
- case ht.NumericStart:
26404
+ case bt.EntityStart:
26405
+ return t.charCodeAt(i) === gt.NUM ? (this.state = bt.NumericStart, this.consumed += 1, this.stateNumericStart(t, i + 1)) : (this.state = bt.NamedEntity, this.stateNamedEntity(t, i));
26406
+ case bt.NumericStart:
26401
26407
  return this.stateNumericStart(t, i);
26402
- case ht.NumericDecimal:
26408
+ case bt.NumericDecimal:
26403
26409
  return this.stateNumericDecimal(t, i);
26404
- case ht.NumericHex:
26410
+ case bt.NumericHex:
26405
26411
  return this.stateNumericHex(t, i);
26406
- case ht.NamedEntity:
26412
+ case bt.NamedEntity:
26407
26413
  return this.stateNamedEntity(t, i);
26408
26414
  }
26409
26415
  }
@@ -26417,7 +26423,7 @@ class x4 {
26417
26423
  * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
26418
26424
  */
26419
26425
  stateNumericStart(t, i) {
26420
- return i >= t.length ? -1 : (t.charCodeAt(i) | h4) === bt.LOWER_X ? (this.state = ht.NumericHex, this.consumed += 1, this.stateNumericHex(t, i + 1)) : (this.state = ht.NumericDecimal, this.stateNumericDecimal(t, i));
26426
+ return i >= t.length ? -1 : (t.charCodeAt(i) | h4) === gt.LOWER_X ? (this.state = bt.NumericHex, this.consumed += 1, this.stateNumericHex(t, i + 1)) : (this.state = bt.NumericDecimal, this.stateNumericDecimal(t, i));
26421
26427
  }
26422
26428
  addToNumericResult(t, i, n, r) {
26423
26429
  if (i !== n) {
@@ -26482,11 +26488,11 @@ class x4 {
26482
26488
  var n;
26483
26489
  if (this.consumed <= i)
26484
26490
  return (n = this.errors) === null || n === void 0 || n.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
26485
- if (t === bt.SEMI)
26491
+ if (t === gt.SEMI)
26486
26492
  this.consumed += 1;
26487
26493
  else if (this.decodeMode === Fi.Strict)
26488
26494
  return 0;
26489
- return this.emitCodePoint(m4(this.result), this.consumed), this.errors && (t !== bt.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
26495
+ return this.emitCodePoint(m4(this.result), this.consumed), this.errors && (t !== gt.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
26490
26496
  }
26491
26497
  /**
26492
26498
  * Parses a named entity.
@@ -26508,7 +26514,7 @@ class x4 {
26508
26514
  (a === 0 || // And there should be no invalid characters.
26509
26515
  v4(s)) ? 0 : this.emitNotTerminatedNamedEntity();
26510
26516
  if (r = n[this.treeIndex], a = (r & an.VALUE_LENGTH) >> 14, a !== 0) {
26511
- if (s === bt.SEMI)
26517
+ if (s === gt.SEMI)
26512
26518
  return this.emitNamedEntityData(this.treeIndex, a, this.consumed + this.excess);
26513
26519
  this.decodeMode !== Fi.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
26514
26520
  }
@@ -26548,15 +26554,15 @@ class x4 {
26548
26554
  end() {
26549
26555
  var t;
26550
26556
  switch (this.state) {
26551
- case ht.NamedEntity:
26557
+ case bt.NamedEntity:
26552
26558
  return this.result !== 0 && (this.decodeMode !== Fi.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
26553
- case ht.NumericDecimal:
26559
+ case bt.NumericDecimal:
26554
26560
  return this.emitNumericEntity(0, 2);
26555
- case ht.NumericHex:
26561
+ case bt.NumericHex:
26556
26562
  return this.emitNumericEntity(0, 3);
26557
- case ht.NumericStart:
26563
+ case bt.NumericStart:
26558
26564
  return (t = this.errors) === null || t === void 0 || t.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
26559
- case ht.EntityStart:
26565
+ case bt.EntityStart:
26560
26566
  return 0;
26561
26567
  }
26562
26568
  }
@@ -30793,7 +30799,7 @@ const i6 = lt.create({
30793
30799
  })];
30794
30800
  }
30795
30801
  });
30796
- ft({
30802
+ dt({
30797
30803
  id: "formatting",
30798
30804
  tiptapExtensions: [r_],
30799
30805
  toolbar: [
@@ -30806,7 +30812,7 @@ ft({
30806
30812
  function Gn(e) {
30807
30813
  return (t) => t.commands.toggleHeading({ level: e });
30808
30814
  }
30809
- ft({
30815
+ dt({
30810
30816
  id: "headings",
30811
30817
  toolbar: [
30812
30818
  { id: "heading-1", label: "Heading 1", action: "toggleHeading1", iconComponent: "Heading1" },
@@ -30830,7 +30836,7 @@ ft({
30830
30836
  toggleHeading6: Gn(6)
30831
30837
  }
30832
30838
  });
30833
- ft({
30839
+ dt({
30834
30840
  id: "lists",
30835
30841
  tiptapExtensions: [a_, o_.configure({ nested: !0 })],
30836
30842
  toolbar: [
@@ -30847,7 +30853,7 @@ ft({
30847
30853
  function Ka(e) {
30848
30854
  return (t) => t.commands.setTextAlign(e);
30849
30855
  }
30850
- ft({
30856
+ dt({
30851
30857
  id: "alignment",
30852
30858
  tiptapExtensions: [
30853
30859
  l_.configure({ types: ["heading", "paragraph"] })
@@ -30865,7 +30871,7 @@ ft({
30865
30871
  alignJustify: Ka("justify")
30866
30872
  }
30867
30873
  });
30868
- ft({
30874
+ dt({
30869
30875
  id: "link",
30870
30876
  tiptapExtensions: [I_.configure({ openOnClick: !0 })],
30871
30877
  toolbar: [
@@ -30895,7 +30901,7 @@ function r6() {
30895
30901
  }, document.body.appendChild(t), t.click();
30896
30902
  });
30897
30903
  }
30898
- ft({
30904
+ dt({
30899
30905
  id: "image",
30900
30906
  tiptapExtensions: [L_],
30901
30907
  toolbar: [{ id: "insert-image", label: "Image", action: "insertImage", iconComponent: "Image" }],
@@ -31032,7 +31038,7 @@ var a6 = B3.extend({
31032
31038
  };
31033
31039
  }
31034
31040
  });
31035
- ft({
31041
+ dt({
31036
31042
  id: "table",
31037
31043
  tiptapExtensions: [
31038
31044
  a6.configure({ resizable: !1 }),
@@ -31045,18 +31051,18 @@ ft({
31045
31051
  ],
31046
31052
  slashCommands: [{ name: "Table", command: "insertTable" }]
31047
31053
  });
31048
- ft({
31054
+ dt({
31049
31055
  id: "blockquote",
31050
31056
  toolbar: [{ id: "blockquote", label: "Blockquote", action: "toggleBlockquote", iconComponent: "Quote" }],
31051
31057
  slashCommands: [{ name: "Blockquote", command: "toggleBlockquote" }]
31052
31058
  });
31053
- ft({
31059
+ dt({
31054
31060
  id: "code-block",
31055
31061
  toolbar: [{ id: "code-block", label: "Code Block", action: "toggleCodeBlock", iconComponent: "Code" }],
31056
31062
  slashCommands: [{ name: "Code Block", command: "toggleCodeBlock" }]
31057
31063
  });
31058
31064
  function l6(e = {}) {
31059
- return ft({
31065
+ return dt({
31060
31066
  id: "placeholder",
31061
31067
  tiptapExtensions: [
31062
31068
  j3.configure({
@@ -31101,7 +31107,7 @@ var u6 = Be.create({
31101
31107
  };
31102
31108
  }
31103
31109
  });
31104
- ft({
31110
+ dt({
31105
31111
  id: "pageBreak",
31106
31112
  tiptapExtensions: [u6],
31107
31113
  toolbar: [
@@ -31180,7 +31186,7 @@ var c6 = Be.create({
31180
31186
  };
31181
31187
  }
31182
31188
  });
31183
- ft({
31189
+ dt({
31184
31190
  id: "footnote",
31185
31191
  tiptapExtensions: [c6],
31186
31192
  toolbar: [
@@ -31381,7 +31387,7 @@ var m6 = lt.create({
31381
31387
  };
31382
31388
  }
31383
31389
  });
31384
- ft({
31390
+ dt({
31385
31391
  id: "toc",
31386
31392
  tiptapExtensions: [h6, b6, g6, m6],
31387
31393
  slashCommands: [{ name: "Table of contents", description: "Daftar isi", command: "insertToc" }],
@@ -31390,7 +31396,7 @@ ft({
31390
31396
  refreshToc: (e) => yh(e)
31391
31397
  }
31392
31398
  });
31393
- ft({
31399
+ dt({
31394
31400
  id: "font-size",
31395
31401
  tiptapExtensions: [$h],
31396
31402
  commands: {
@@ -31400,7 +31406,7 @@ ft({
31400
31406
  }
31401
31407
  }
31402
31408
  });
31403
- ft({
31409
+ dt({
31404
31410
  id: "text-color",
31405
31411
  tiptapExtensions: [V3],
31406
31412
  toolbar: [
@@ -31426,7 +31432,7 @@ var v6 = K3.extend({
31426
31432
  return ["mark", Ye(this.options.HTMLAttributes, e), 0];
31427
31433
  }
31428
31434
  });
31429
- ft({
31435
+ dt({
31430
31436
  id: "highlight",
31431
31437
  tiptapExtensions: [
31432
31438
  v6.configure({
@@ -46148,7 +46154,7 @@ var z6 = class {
46148
46154
  }
46149
46155
  };
46150
46156
  function ud(e) {
46151
- const t = e.storage.citation;
46157
+ const t = e.storage.citationEngine;
46152
46158
  return (t == null ? void 0 : t.engine) ?? null;
46153
46159
  }
46154
46160
  var N6 = Be.create({
@@ -46220,10 +46226,10 @@ function wh(e, t) {
46220
46226
  };
46221
46227
  }
46222
46228
  function or(e) {
46223
- return e.storage.citation ? e.storage.citation.engine ?? null : null;
46229
+ return e.storage.citationEngine ? e.storage.citationEngine.engine ?? null : null;
46224
46230
  }
46225
46231
  var I6 = lt.create({
46226
- name: "citation",
46232
+ name: "citationEngine",
46227
46233
  addStorage() {
46228
46234
  return {
46229
46235
  engine: null
@@ -46271,6 +46277,25 @@ var I6 = lt.create({
46271
46277
  const s = e.storage.editorContext;
46272
46278
  (a = (r = s == null ? void 0 : s.citation) == null ? void 0 : r.onSourcesChange) == null || a.call(r, t.getCitedSourceIds());
46273
46279
  }
46280
+ {
46281
+ const s = [];
46282
+ if (e.state.doc.descendants((o, l) => {
46283
+ if (o.type.name === "footnote" && o.attrs.sourceId) {
46284
+ const u = o.attrs.citationId;
46285
+ if (!u) return !0;
46286
+ const f = t.renderCluster(u);
46287
+ f && f !== o.attrs.content && s.push({ pos: l, content: f });
46288
+ }
46289
+ return !0;
46290
+ }), s.length > 0) {
46291
+ const o = e.state.tr;
46292
+ for (const { pos: l, content: u } of s) {
46293
+ const f = e.state.doc.nodeAt(l);
46294
+ f && o.setNodeMarkup(l, void 0, { ...f.attrs, content: u });
46295
+ }
46296
+ e.view.dispatch(o);
46297
+ }
46298
+ }
46274
46299
  }
46275
46300
  }), R6 = Be.create({
46276
46301
  name: "citation",
@@ -46359,7 +46384,7 @@ function cd(e, t, i) {
46359
46384
  const n = wh(t, i);
46360
46385
  return n.type === "footnote" && !e.schema.nodes.footnote ? !1 : e.chain().focus().insertContent({ type: n.type, attrs: n.attrs }).run();
46361
46386
  }
46362
- ft({
46387
+ dt({
46363
46388
  id: "citation",
46364
46389
  tiptapExtensions: [I6, R6, N6],
46365
46390
  toolbar: [{ id: "insert-citation", label: "Citation", action: "insertCitation", iconComponent: "Quote" }],
@@ -46403,10 +46428,10 @@ ft({
46403
46428
  const t = e.storage.editorContext, i = t == null ? void 0 : t.citation;
46404
46429
  if (!i) return;
46405
46430
  const n = typeof i.sources == "function" ? i.sources() : i.sources, r = new z6({ sources: n, style: i.style });
46406
- e.storage.citation.engine = r;
46431
+ e.storage.citationEngine.engine = r;
46407
46432
  },
46408
46433
  onDestroy(e) {
46409
- e.storage.citation.engine = null;
46434
+ e.storage.citationEngine.engine = null;
46410
46435
  }
46411
46436
  }
46412
46437
  });
@@ -46437,7 +46462,7 @@ function P6(e, t, i) {
46437
46462
  const n = e.steps.length - 1;
46438
46463
  if (n < t) return;
46439
46464
  const r = e.steps[n];
46440
- if (!(r instanceof st || r instanceof pt)) return;
46465
+ if (!(r instanceof st || r instanceof mt)) return;
46441
46466
  const a = e.mapping.maps[n];
46442
46467
  let s = 0;
46443
46468
  a.forEach((o, l, u, f) => {
@@ -46744,7 +46769,7 @@ var F6 = lt.create({
46744
46769
  (t = e.abort) == null || t.abort(), e.abort = null, e.preview = null;
46745
46770
  }
46746
46771
  });
46747
- ft({
46772
+ dt({
46748
46773
  id: "ai",
46749
46774
  // The `tiptap-markdown` `Markdown` extension is registered alongside AI so
46750
46775
  // that `editor.storage.markdown.parser` is available on every editor that
@@ -47079,7 +47104,7 @@ var U6 = Be.create({
47079
47104
  };
47080
47105
  }
47081
47106
  });
47082
- ft({
47107
+ dt({
47083
47108
  id: "smart-elements",
47084
47109
  tiptapExtensions: [
47085
47110
  U6,
@@ -47230,7 +47255,7 @@ var K6 = lt.create({
47230
47255
  ];
47231
47256
  }
47232
47257
  });
47233
- ft({
47258
+ dt({
47234
47259
  id: "slash-menu",
47235
47260
  tiptapExtensions: [K6],
47236
47261
  hooks: {
@@ -47548,7 +47573,7 @@ const Z6 = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
47548
47573
  k("div", bA, [
47549
47574
  k("form", {
47550
47575
  class: "space-y-2",
47551
- onSubmit: we(T, ["prevent"])
47576
+ onSubmit: _e(T, ["prevent"])
47552
47577
  }, [
47553
47578
  Ce(k("textarea", {
47554
47579
  "onUpdate:modelValue": Z[0] || (Z[0] = (U) => o.value = U),
@@ -47556,7 +47581,7 @@ const Z6 = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
47556
47581
  disabled: l.value,
47557
47582
  placeholder: h.value ? S(r)("sidebars.ai.draftPlaceholder") : S(r)("sidebars.ai.promptPlaceholder"),
47558
47583
  class: "w-full min-h-[55px] resize-none rounded-xl border border-slate-200 bg-white p-2.5 text-xs text-slate-800 transition-all focus:border-cyan-500/50 focus:shadow-cyan focus:outline-none disabled:opacity-60 dark:border-white/10 dark:bg-white/[0.02] dark:text-slate-100 dark:focus:border-cyan-500/30",
47559
- onKeydown: fi(we(T, ["exact", "prevent"]), ["enter"])
47584
+ onKeydown: fi(_e(T, ["exact", "prevent"]), ["enter"])
47560
47585
  }, null, 40, gA), [
47561
47586
  [Ne, o.value]
47562
47587
  ]),
@@ -47764,7 +47789,7 @@ const Z6 = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
47764
47789
  l.value === "active" ? (M(), I("div", YA, [
47765
47790
  k("form", {
47766
47791
  class: "space-y-2",
47767
- onSubmit: we(f, ["prevent"])
47792
+ onSubmit: _e(f, ["prevent"])
47768
47793
  }, [
47769
47794
  Ce(k("textarea", {
47770
47795
  "onUpdate:modelValue": v[2] || (v[2] = (g) => a.value = g),
@@ -47895,7 +47920,7 @@ const Z6 = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
47895
47920
  s.value ? (M(), I("form", {
47896
47921
  key: 0,
47897
47922
  class: "space-y-2 animate-fadeIn",
47898
- onSubmit: we(o, ["prevent"])
47923
+ onSubmit: _e(o, ["prevent"])
47899
47924
  }, [
47900
47925
  Ce(k("input", {
47901
47926
  "onUpdate:modelValue": f[2] || (f[2] = (p) => a.value = p),
@@ -47947,7 +47972,7 @@ const Z6 = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
47947
47972
  return (a, s) => e.isOpen ? (M(), I("div", {
47948
47973
  key: 0,
47949
47974
  class: "fixed inset-0 z-50 flex items-center justify-center bg-slate-900/50 p-4 backdrop-blur-sm",
47950
- onClick: s[1] || (s[1] = we((o) => n("close"), ["self"]))
47975
+ onClick: s[1] || (s[1] = _e((o) => n("close"), ["self"]))
47951
47976
  }, [
47952
47977
  k("div", D8, [
47953
47978
  k("div", z8, [
@@ -48067,7 +48092,7 @@ const Z6 = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
48067
48092
  }), (g, x) => e.isOpen ? (M(), I("div", {
48068
48093
  key: 0,
48069
48094
  class: "fixed inset-0 z-50 flex items-center justify-center bg-slate-900/50 p-4 backdrop-blur-sm",
48070
- onClick: x[10] || (x[10] = we((y) => r("close"), ["self"]))
48095
+ onClick: x[10] || (x[10] = _e((y) => r("close"), ["self"]))
48071
48096
  }, [
48072
48097
  k("div", mT, [
48073
48098
  k("div", hT, [
@@ -48266,7 +48291,7 @@ const Z6 = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
48266
48291
  type: "text",
48267
48292
  placeholder: S(i)("editor.findReplace.replacePlaceholder"),
48268
48293
  class: "min-w-0 flex-1 rounded-lg border border-slate-200 bg-transparent px-2.5 py-1.5 text-sm text-slate-800 focus:border-cyan-500 focus:outline-none dark:border-slate-600 dark:text-slate-100",
48269
- onKeydown: fi(we(b, ["prevent"]), ["enter"])
48294
+ onKeydown: fi(_e(b, ["prevent"]), ["enter"])
48270
48295
  }, null, 40, UT), [
48271
48296
  [Ne, o.value]
48272
48297
  ]),
@@ -48339,7 +48364,7 @@ const Z6 = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
48339
48364
  return (b, h) => e.isOpen ? (M(), I("div", {
48340
48365
  key: 0,
48341
48366
  class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
48342
- onClick: we(d, ["self"]),
48367
+ onClick: _e(d, ["self"]),
48343
48368
  onKeydown: m
48344
48369
  }, [
48345
48370
  k("div", $T, [
@@ -48650,7 +48675,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
48650
48675
  }
48651
48676
  }), Y = () => {
48652
48677
  var O, E, P;
48653
- return ((P = (E = (O = Q.value) == null ? void 0 : O.storage) == null ? void 0 : E.citation) == null ? void 0 : P.engine) ?? null;
48678
+ return ((P = (E = (O = Q.value) == null ? void 0 : O.storage) == null ? void 0 : E.citationEngine) == null ? void 0 : P.engine) ?? null;
48654
48679
  }, B = () => {
48655
48680
  var O;
48656
48681
  (O = Y()) == null || O.updateSources($.value), n("citation-sources-change", $.value);
@@ -48660,7 +48685,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
48660
48685
  $.value = $.value.map((E) => E.id === O.id ? O : E), B();
48661
48686
  }, ut = (O) => {
48662
48687
  $.value = $.value.filter((E) => E.id !== O), B();
48663
- }, dt = (O) => {
48688
+ }, pt = (O) => {
48664
48689
  var E;
48665
48690
  J.value = O, (E = Y()) == null || E.setStyle(O), n("update:citation-style", O);
48666
48691
  }, Ai = (O) => {
@@ -48693,7 +48718,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
48693
48718
  Pt.value = !1;
48694
48719
  }
48695
48720
  }
48696
- }, vt = async (O) => {
48721
+ }, xt = async (O) => {
48697
48722
  const E = i.citation;
48698
48723
  if (!(!(E != null && E.onImportBibliography) || Pt.value)) {
48699
48724
  Pt.value = !0, Ft.value = "";
@@ -48724,10 +48749,10 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
48724
48749
  const xe = 12, Re = 180, Ve = be.top - 48, qe = (be.left + be.right) / 2;
48725
48750
  if (typeof window > "u")
48726
48751
  return { top: Math.max(xe, Ve), left: qe };
48727
- const Se = Math.min(
48752
+ const we = Math.min(
48728
48753
  Re,
48729
48754
  Math.max(0, window.innerWidth / 2 - xe)
48730
- ), ke = xe + Se, ve = window.innerWidth - xe - Se, Te = Math.max(xe, window.innerHeight - 48);
48755
+ ), ke = xe + we, ve = window.innerWidth - xe - we, Te = Math.max(xe, window.innerHeight - 48);
48731
48756
  return {
48732
48757
  top: Math.min(Te, Math.max(xe, Ve)),
48733
48758
  left: Math.min(ve, Math.max(ke, qe))
@@ -48783,16 +48808,16 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
48783
48808
  const { selection: P } = Q.value.state, be = Q.value.view.coordsAtPos(P.head);
48784
48809
  if (be && E) {
48785
48810
  const xe = Array.from(E.querySelectorAll(".rm-page-break")), Re = O.getBoundingClientRect(), Ve = be.top - Re.top + O.scrollTop;
48786
- let qe = 1, Se = !1;
48811
+ let qe = 1, we = !1;
48787
48812
  for (let ke = 0; ke < xe.length; ke++) {
48788
48813
  const ve = xe[ke].querySelector(".breaker");
48789
48814
  if (ve instanceof HTMLElement && Ve < ve.offsetTop) {
48790
- Bt.value = qe, Se = !0;
48815
+ Bt.value = qe, we = !0;
48791
48816
  break;
48792
48817
  }
48793
48818
  qe++;
48794
48819
  }
48795
- Se || (Bt.value = qe);
48820
+ we || (Bt.value = qe);
48796
48821
  } else
48797
48822
  Bt.value = 1;
48798
48823
  } catch {
@@ -48828,14 +48853,14 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
48828
48853
  E.style.setProperty("--rm-header-margin-top", Ve), E.style.setProperty("--rm-footer-margin-bottom", qe), Q.value.view.dispatch(Q.value.state.tr), setTimeout(() => {
48829
48854
  requestAnimationFrame(() => {
48830
48855
  if (!Q.value || Q.value.view.dom !== E) return;
48831
- const Se = (Te, je) => {
48856
+ const we = (Te, je) => {
48832
48857
  let He = P, Ge = be;
48833
48858
  return je && li.value ? (He = Mt.value.replace(/{total}/g, O), Ge = Dt.value.replace(/{total}/g, O)) : Vi.value && Te % 2 === 0 && (He = Wi.value.replace(/{total}/g, O), Ge = la.value.replace(/{total}/g, O)), {
48834
48859
  left: He.replace(/{page}/g, ho(Te - 1)),
48835
48860
  right: Ge.replace(/{page}/g, ho(Te - 1))
48836
48861
  };
48837
48862
  }, ke = (Te, je, He) => {
48838
- const Ge = Se(je, He), We = Te.querySelector(".rm-page-header-left"), tt = Te.querySelector(".rm-page-header-right");
48863
+ const Ge = we(je, He), We = Te.querySelector(".rm-page-header-left"), tt = Te.querySelector(".rm-page-header-right");
48839
48864
  We && (We.innerHTML = Ge.left), tt && (tt.innerHTML = Ge.right);
48840
48865
  }, ve = E.querySelector(".rm-first-page-header");
48841
48866
  ve && ke(ve, 1, !0), Array.from(E.querySelectorAll(".rm-page-break .rm-page-header")).forEach((Te, je) => {
@@ -48860,8 +48885,8 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
48860
48885
  const E = Q.value.storage.PaginationPlus;
48861
48886
  !E || !(E.pageHeight !== O.pageHeight || E.pageWidth !== O.pageWidth || E.marginTop !== O.marginTop || E.marginBottom !== O.marginBottom || E.marginLeft !== O.marginLeft || E.marginRight !== O.marginRight || E.pageGap !== O.pageGap || E.contentMarginTop !== O.contentMarginTop || E.contentMarginBottom !== O.contentMarginBottom || E.pageBreakBackground !== O.pageBreakBackground || E.enabled !== O.enabled) || (E.pageHeight = O.pageHeight, E.pageWidth = O.pageWidth, E.marginTop = O.marginTop, E.marginBottom = O.marginBottom, E.marginLeft = O.marginLeft, E.marginRight = O.marginRight, E.pageGap = O.pageGap, E.contentMarginTop = O.contentMarginTop, E.contentMarginBottom = O.contentMarginBottom, E.pageBreakBackground = O.pageBreakBackground, E.enabled = O.enabled, Q.value.view.dispatch(Q.value.state.tr));
48862
48887
  }, { deep: !0 }), Ee(Pe, (O) => {
48863
- var E, P, be, xe, Re, Ve, qe, Se;
48864
- O && Q.value && (!y.value && !w.value && !C.value && !T.value && (y.value = ((P = (E = Q.value.storage.PaginationPlus) == null ? void 0 : E.appliedConfig) == null ? void 0 : P.headerLeft) || "", w.value = ((xe = (be = Q.value.storage.PaginationPlus) == null ? void 0 : be.appliedConfig) == null ? void 0 : xe.headerRight) || "", C.value = ((Ve = (Re = Q.value.storage.PaginationPlus) == null ? void 0 : Re.appliedConfig) == null ? void 0 : Ve.footerLeft) || "", T.value = ((Se = (qe = Q.value.storage.PaginationPlus) == null ? void 0 : qe.appliedConfig) == null ? void 0 : Se.footerRight) || ""), ui(), ri.value && n("ready", ri.value), Q.value.on("selectionUpdate", () => {
48888
+ var E, P, be, xe, Re, Ve, qe, we;
48889
+ O && Q.value && (!y.value && !w.value && !C.value && !T.value && (y.value = ((P = (E = Q.value.storage.PaginationPlus) == null ? void 0 : E.appliedConfig) == null ? void 0 : P.headerLeft) || "", w.value = ((xe = (be = Q.value.storage.PaginationPlus) == null ? void 0 : be.appliedConfig) == null ? void 0 : xe.headerRight) || "", C.value = ((Ve = (Re = Q.value.storage.PaginationPlus) == null ? void 0 : Re.appliedConfig) == null ? void 0 : Ve.footerLeft) || "", T.value = ((we = (qe = Q.value.storage.PaginationPlus) == null ? void 0 : qe.appliedConfig) == null ? void 0 : we.footerRight) || ""), ui(), ri.value && n("ready", ri.value), Q.value.on("selectionUpdate", () => {
48865
48890
  dr(), Oi();
48866
48891
  }), Q.value.on("transaction", () => {
48867
48892
  Oi(), mn(), ue();
@@ -48885,8 +48910,8 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
48885
48910
  if (He) {
48886
48911
  const Ge = He.getBoundingClientRect(), We = ve.clientY - Ge.top, tt = Ei.value * 37.795;
48887
48912
  if (We >= 0 && We <= Math.max(tt, 40) + 15) {
48888
- let xt = null;
48889
- He.classList.contains("rm-page-break") && (xt = He.querySelector(".rm-page-header")), xt || (xt = document.querySelector(".rm-page-header, .rm-first-page-header")), xt && Aa(ve);
48913
+ let ct = null;
48914
+ He.classList.contains("rm-page-break") && (ct = He.querySelector(".rm-page-header")), ct || (ct = document.querySelector(".rm-page-header, .rm-first-page-header")), ct && Aa(ve);
48890
48915
  }
48891
48916
  }
48892
48917
  }), Q.value.view.dom.addEventListener("dblclick", (ve) => {
@@ -48929,7 +48954,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
48929
48954
  if (!Q.value) return;
48930
48955
  Q.value.chain().focus().unsetLink().run(), vr.value = !1;
48931
48956
  }
48932
- const Sa = G(f.value), gn = G(u.value), mt = G({
48957
+ const Sa = G(f.value), gn = G(u.value), ht = G({
48933
48958
  top: Gi(o.value.top),
48934
48959
  bottom: Gi(o.value.bottom),
48935
48960
  left: Gi(o.value.left),
@@ -48942,7 +48967,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
48942
48967
  return Math.round(O * Sr);
48943
48968
  }
48944
48969
  const Ah = () => {
48945
- Sa.value = f.value, gn.value = u.value, mt.value = {
48970
+ Sa.value = f.value, gn.value = u.value, ht.value = {
48946
48971
  top: Gi(o.value.top),
48947
48972
  bottom: Gi(o.value.bottom),
48948
48973
  left: Gi(o.value.left),
@@ -48953,16 +48978,16 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
48953
48978
  const P = typeof E == "number" ? E : Number(E);
48954
48979
  return Number.isFinite(P) ? Math.min(xr, Math.max(Kn, P)) : Kn;
48955
48980
  };
48956
- f.value = Sa.value, u.value = gn.value, mt.value = {
48957
- top: O(mt.value.top),
48958
- bottom: O(mt.value.bottom),
48959
- left: O(mt.value.left),
48960
- right: O(mt.value.right)
48981
+ f.value = Sa.value, u.value = gn.value, ht.value = {
48982
+ top: O(ht.value.top),
48983
+ bottom: O(ht.value.bottom),
48984
+ left: O(ht.value.left),
48985
+ right: O(ht.value.right)
48961
48986
  }, o.value = {
48962
- top: Ca(mt.value.top),
48963
- bottom: Ca(mt.value.bottom),
48964
- left: Ca(mt.value.left),
48965
- right: Ca(mt.value.right)
48987
+ top: Ca(ht.value.top),
48988
+ bottom: Ca(ht.value.bottom),
48989
+ left: Ca(ht.value.left),
48990
+ right: Ca(ht.value.right)
48966
48991
  }, n("update:pageSize", f.value), n("update:orientation", gn.value), n("update:margins", { ...o.value }), ya.value = !1;
48967
48992
  }, xo = G(!1), vn = { value: null }, Oh = () => {
48968
48993
  mr.value = Ei.value, hr.value = Mi.value, ca.value = li.value, fa.value = Vi.value, ua.value = !0;
@@ -48990,8 +49015,8 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
48990
49015
  document.removeEventListener("mousedown", E.onOutsideMouseDown), window.removeEventListener("resize", E.onResize), window.removeEventListener("scroll", E.onWindowScroll), (be = hn.value) == null || be.removeEventListener("scroll", E.onScroll), E.overlay.remove(), E.generatedContent && (E.generatedContent.style.visibility = ""), E.targetHeader.classList.remove("rm-header-active"), vn.value = null, xo.value = !1, O && (li.value && E.isFirstPage ? Mt.value = P : Vi.value && E.pageIndex % 2 === 0 ? Wi.value = P : y.value = P, ui(), ee());
48991
49016
  }, Qu = (O) => {
48992
49017
  if (!O.targetHeader.parentNode || !Q.value) return;
48993
- const E = Q.value.view.dom, P = O.targetHeader.getBoundingClientRect(), be = E.getBoundingClientRect(), xe = getComputedStyle(E), Re = parseFloat(xe.getPropertyValue("--rm-margin-left")) || 0, Ve = parseFloat(xe.getPropertyValue("--rm-margin-right")) || 0, qe = O.targetHeader.querySelector(".rm-page-header-content"), Se = (qe == null ? void 0 : qe.getBoundingClientRect()) ?? P, ke = O.isFirstPage ? P.left : P.left + Re, ve = O.isFirstPage ? P.right : P.right - Ve, Te = Math.max(0, ke - be.left), je = Math.max(0, be.right - ve);
48994
- O.overlay.style.left = `${ke}px`, O.overlay.style.top = `${Se.top}px`, O.overlay.style.width = `${Math.max(ve - ke, 1)}px`, O.overlay.style.height = `${Math.max(Se.height, 24)}px`, O.activeBar.style.setProperty("--rm-header-bar-left", `${-Te}px`), O.activeBar.style.setProperty("--rm-header-bar-width", `${be.width}px`), O.activeBar.style.setProperty("--rm-header-bar-padding-left", `${Te}px`), O.activeBar.style.setProperty("--rm-header-bar-padding-right", `${je}px`);
49018
+ const E = Q.value.view.dom, P = O.targetHeader.getBoundingClientRect(), be = E.getBoundingClientRect(), xe = getComputedStyle(E), Re = parseFloat(xe.getPropertyValue("--rm-margin-left")) || 0, Ve = parseFloat(xe.getPropertyValue("--rm-margin-right")) || 0, qe = O.targetHeader.querySelector(".rm-page-header-content"), we = (qe == null ? void 0 : qe.getBoundingClientRect()) ?? P, ke = O.isFirstPage ? P.left : P.left + Re, ve = O.isFirstPage ? P.right : P.right - Ve, Te = Math.max(0, ke - be.left), je = Math.max(0, be.right - ve);
49019
+ O.overlay.style.left = `${ke}px`, O.overlay.style.top = `${we.top}px`, O.overlay.style.width = `${Math.max(ve - ke, 1)}px`, O.overlay.style.height = `${Math.max(we.height, 24)}px`, O.activeBar.style.setProperty("--rm-header-bar-left", `${-Te}px`), O.activeBar.style.setProperty("--rm-header-bar-width", `${be.width}px`), O.activeBar.style.setProperty("--rm-header-bar-padding-left", `${Te}px`), O.activeBar.style.setProperty("--rm-header-bar-padding-right", `${je}px`);
48995
49020
  }, Aa = (O) => {
48996
49021
  var fc, dc;
48997
49022
  const E = vn.value;
@@ -49010,10 +49035,10 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49010
49035
  if (!xe && Ve < 2) return;
49011
49036
  const qe = P.querySelector(".rm-page-header-content");
49012
49037
  qe && (qe.style.visibility = "hidden");
49013
- const Se = document.createElement("div");
49014
- Se.className = "rm-header-edit-input", Se.contentEditable = "true", Se.setAttribute("role", "textbox"), Se.setAttribute("aria-label", s("editor.headerFooter.header") || "Header"), Se.dataset.placeholder = s("editor.headerFooter.headerPlaceholder") || "Header", Se.innerHTML = Nh(Ve);
49038
+ const we = document.createElement("div");
49039
+ we.className = "rm-header-edit-input", we.contentEditable = "true", we.setAttribute("role", "textbox"), we.setAttribute("aria-label", s("editor.headerFooter.header") || "Header"), we.dataset.placeholder = s("editor.headerFooter.headerPlaceholder") || "Header", we.innerHTML = Nh(Ve);
49015
49040
  const ke = document.createElement("div");
49016
- ke.className = "rm-header-edit-overlay", ke.appendChild(Se);
49041
+ ke.className = "rm-header-edit-overlay", ke.appendChild(we);
49017
49042
  const ve = document.createElement("div");
49018
49043
  ve.className = "rm-google-docs-header-bar", ve.innerHTML = `
49019
49044
  <span class="rm-header-label">${s("editor.headerFooter.header") || "Header"}</span>
@@ -49049,7 +49074,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49049
49074
  }, tt = {
49050
49075
  targetHeader: P,
49051
49076
  overlay: ke,
49052
- input: Se,
49077
+ input: we,
49053
49078
  activeBar: ve,
49054
49079
  generatedContent: qe,
49055
49080
  isFirstPage: xe,
@@ -49061,10 +49086,10 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49061
49086
  onWindowScroll: He
49062
49087
  };
49063
49088
  vn.value = tt, xo.value = !0;
49064
- const xt = ve.querySelector(".rm-diff-cb");
49065
- xt == null || xt.addEventListener("mousedown", (De) => {
49089
+ const ct = ve.querySelector(".rm-diff-cb");
49090
+ ct == null || ct.addEventListener("mousedown", (De) => {
49066
49091
  De.stopPropagation();
49067
- }), xt == null || xt.addEventListener("change", (De) => {
49092
+ }), ct == null || ct.addEventListener("change", (De) => {
49068
49093
  De.stopPropagation();
49069
49094
  const zi = De.target.checked;
49070
49095
  Ki(!0), zi && (Mt.value = "", Dt.value = ""), li.value = zi, ui();
@@ -49094,11 +49119,11 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49094
49119
  De.stopPropagation(), De.preventDefault();
49095
49120
  }), $n == null || $n.addEventListener("click", (De) => {
49096
49121
  De.stopPropagation(), Ki(!1), zh();
49097
- }), Se.addEventListener("blur", We), document.addEventListener("mousedown", Ge), window.addEventListener("resize", Te), window.addEventListener("scroll", He), (dc = hn.value) == null || dc.addEventListener("scroll", je), requestAnimationFrame(() => {
49122
+ }), we.addEventListener("blur", We), document.addEventListener("mousedown", Ge), window.addEventListener("resize", Te), window.addEventListener("scroll", He), (dc = hn.value) == null || dc.addEventListener("scroll", je), requestAnimationFrame(() => {
49098
49123
  vn.value === tt && Qu(tt);
49099
- }), Se.focus();
49124
+ }), we.focus();
49100
49125
  const Vn = window.getSelection(), yo = document.createRange();
49101
- yo.selectNodeContents(Se), yo.collapse(!1), Vn == null || Vn.removeAllRanges(), Vn == null || Vn.addRange(yo);
49126
+ yo.selectNodeContents(we), yo.collapse(!1), Vn == null || Vn.removeAllRanges(), Vn == null || Vn.addRange(yo);
49102
49127
  }, Ta = () => {
49103
49128
  var O, E, P, be;
49104
49129
  Q.value && (br.value = C.value || ((E = (O = Q.value.storage.PaginationPlus) == null ? void 0 : O.appliedConfig) == null ? void 0 : E.footerLeft) || "", gr.value = T.value || ((be = (P = Q.value.storage.PaginationPlus) == null ? void 0 : P.appliedConfig) == null ? void 0 : be.footerRight) || "", xa.value = !0);
@@ -49282,8 +49307,8 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49282
49307
  const xe = E.selection.head, Re = be.create({ content: "" }), Ve = E.tr.insert(xe, Re);
49283
49308
  P.dispatch(Ve), P.focus(), setTimeout(() => {
49284
49309
  Oa();
49285
- const qe = document.querySelectorAll(".docs-footnote-item-text"), Se = qe[qe.length - 1];
49286
- Se && (Se.scrollIntoView({ behavior: "smooth", block: "nearest" }), Se.focus());
49310
+ const qe = document.querySelectorAll(".docs-footnote-item-text"), we = qe[qe.length - 1];
49311
+ we && (we.scrollIntoView({ behavior: "smooth", block: "nearest" }), we.focus());
49287
49312
  }, 160);
49288
49313
  } else nc[O] ? nc[O]() : n("menu-click", O);
49289
49314
  }, yr = (O) => {
@@ -49303,29 +49328,35 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49303
49328
  if (!Q.value || !Pe.value) return;
49304
49329
  const O = Q.value.view.dom, E = O.querySelector("[data-rm-pagination]");
49305
49330
  if (!E) return;
49306
- const P = (Se) => {
49331
+ const P = (we) => {
49307
49332
  var Te, je, He;
49308
49333
  const ke = document.createElement("div");
49309
- if (ke.className = "docs-footnote-item-text", Se.hasAttribute("data-footnote-source-id")) {
49310
- const Ge = Se.getAttribute("data-citation-id") ?? "", We = (je = (Te = Q.value) == null ? void 0 : Te.storage) == null ? void 0 : je.citation, tt = ((He = We == null ? void 0 : We.engine) == null ? void 0 : He.renderCluster(Ge)) ?? "";
49311
- return ke.classList.add("docs-footnote-item-text--citation"), tt ? ke.innerHTML = tt : ke.setAttribute("data-empty", "true"), ke;
49334
+ if (ke.className = "docs-footnote-item-text", we.hasAttribute("data-footnote-source-id")) {
49335
+ const Ge = we.getAttribute("data-citation-id") ?? "", We = (je = (Te = Q.value) == null ? void 0 : Te.storage) == null ? void 0 : je.citationEngine, tt = ((He = We == null ? void 0 : We.engine) == null ? void 0 : He.renderCluster(Ge)) ?? "";
49336
+ if (ke.classList.add("docs-footnote-item-text--citation"), tt)
49337
+ ke.innerHTML = tt;
49338
+ else {
49339
+ const ct = we.getAttribute("data-footnote-content") ?? "";
49340
+ ct ? ke.innerHTML = ct : ke.setAttribute("data-empty", "true");
49341
+ }
49342
+ return ke;
49312
49343
  }
49313
- const ve = Se.getAttribute("data-footnote-content") ?? "";
49344
+ const ve = we.getAttribute("data-footnote-content") ?? "";
49314
49345
  return ke.contentEditable = "true", ke.textContent = ve, ve || ke.setAttribute("data-empty", "true"), ke.addEventListener("input", () => {
49315
49346
  ke.removeAttribute("data-empty"), ke.textContent || ke.setAttribute("data-empty", "true");
49316
49347
  }), ke.addEventListener("blur", () => {
49317
49348
  var We;
49318
49349
  const Ge = ((We = ke.textContent) == null ? void 0 : We.trim()) ?? "";
49319
- Uh(Se, Ge);
49350
+ Uh(we, Ge);
49320
49351
  }), ke;
49321
49352
  }, be = Array.from(E.querySelectorAll(".rm-page-break")), xe = Array.from(O.querySelectorAll(".docs-footnote-ref"));
49322
49353
  if (be.length === 0) {
49323
49354
  xe.forEach((je, He) => {
49324
49355
  je.textContent = String(He + 1);
49325
49356
  });
49326
- const Se = Le.value;
49327
- if (!Se || ((qe = Se.querySelector(".docs-pageless-footnotes")) == null || qe.remove(), xe.length === 0)) return;
49328
- const ke = Se.querySelector(".docs-pageless-footnotes");
49357
+ const we = Le.value;
49358
+ if (!we || ((qe = we.querySelector(".docs-pageless-footnotes")) == null || qe.remove(), xe.length === 0)) return;
49359
+ const ke = we.querySelector(".docs-pageless-footnotes");
49329
49360
  if (ke != null && ke.querySelector(".docs-footnote-item-text:focus")) return;
49330
49361
  const ve = document.createElement("div");
49331
49362
  ve.className = "docs-page-footnotes docs-pageless-footnotes";
@@ -49337,12 +49368,12 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49337
49368
  We.className = "docs-footnote-item-num", We.textContent = String(He + 1);
49338
49369
  const tt = P(je);
49339
49370
  je.dataset.footnoteItemId = `fn-pageless-${He}`, Ge.id = `fn-pageless-${He}`, Ge.appendChild(We), Ge.appendChild(tt), ve.appendChild(Ge);
49340
- }), Se.appendChild(ve);
49371
+ }), we.appendChild(ve);
49341
49372
  return;
49342
49373
  }
49343
49374
  const Re = /* @__PURE__ */ new Map();
49344
- be.forEach((Se, ke) => Re.set(ke, [])), xe.forEach((Se) => {
49345
- const ke = Se.getBoundingClientRect().top;
49375
+ be.forEach((we, ke) => Re.set(ke, [])), xe.forEach((we) => {
49376
+ const ke = we.getBoundingClientRect().top;
49346
49377
  let ve = be.length - 1;
49347
49378
  for (let Te = 0; Te < be.length - 1; Te++) {
49348
49379
  const je = be[Te].querySelector(".breaker");
@@ -49351,29 +49382,29 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49351
49382
  break;
49352
49383
  }
49353
49384
  }
49354
- Re.get(ve).push(Se);
49385
+ Re.get(ve).push(we);
49355
49386
  });
49356
49387
  let Ve = 1;
49357
- be.forEach((Se, ke) => {
49388
+ be.forEach((we, ke) => {
49358
49389
  const ve = Re.get(ke) ?? [], Te = Ve;
49359
- Ve += ve.length, ve.forEach((tt, xt) => {
49360
- tt.textContent = String(Te + xt);
49390
+ Ve += ve.length, ve.forEach((tt, ct) => {
49391
+ tt.textContent = String(Te + ct);
49361
49392
  });
49362
- const je = Se.querySelector(".docs-page-footnotes");
49393
+ const je = we.querySelector(".docs-page-footnotes");
49363
49394
  if (je != null && je.querySelector(".docs-footnote-item-text:focus") || (je == null || je.remove(), ve.length === 0)) return;
49364
49395
  const He = document.createElement("div");
49365
49396
  He.className = "docs-page-footnotes";
49366
49397
  const Ge = document.createElement("div");
49367
- Ge.className = "docs-footnotes-sep", He.appendChild(Ge), ve.forEach((tt, xt) => {
49398
+ Ge.className = "docs-footnotes-sep", He.appendChild(Ge), ve.forEach((tt, ct) => {
49368
49399
  const Yt = document.createElement("div");
49369
49400
  Yt.className = "docs-footnote-item";
49370
49401
  const xn = document.createElement("sup");
49371
- xn.className = "docs-footnote-item-num", xn.textContent = String(Te + xt);
49402
+ xn.className = "docs-footnote-item-num", xn.textContent = String(Te + ct);
49372
49403
  const Ma = P(tt);
49373
- tt.dataset.footnoteItemId = `fn-${ke}-${xt}`, Yt.id = `fn-${ke}-${xt}`, Yt.appendChild(xn), Yt.appendChild(Ma), He.appendChild(Yt);
49404
+ tt.dataset.footnoteItemId = `fn-${ke}-${ct}`, Yt.id = `fn-${ke}-${ct}`, Yt.appendChild(xn), Yt.appendChild(Ma), He.appendChild(Yt);
49374
49405
  });
49375
- const We = Se.querySelector(".breaker");
49376
- We ? We.insertBefore(He, We.firstChild) : Se.appendChild(He);
49406
+ const We = we.querySelector(".breaker");
49407
+ We ? We.insertBefore(He, We.firstChild) : we.appendChild(He);
49377
49408
  });
49378
49409
  };
49379
49410
  Ee(Pe, (O) => {
@@ -49411,7 +49442,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49411
49442
  }), Q.value.on("selectionUpdate", () => {
49412
49443
  Ea(100);
49413
49444
  });
49414
- const E = Q.value.storage.citation;
49445
+ const E = Q.value.storage.citationEngine;
49415
49446
  (P = E == null ? void 0 : E.engine) == null || P.onChange(() => {
49416
49447
  Ea(30);
49417
49448
  }), window.addEventListener("resize", ac);
@@ -49544,9 +49575,9 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49544
49575
  onCreate: re,
49545
49576
  onUpdate: Je,
49546
49577
  onRemove: ut,
49547
- "onUpdate:style": dt,
49578
+ "onUpdate:style": pt,
49548
49579
  onImportDoi: qi,
49549
- onImportBibliography: vt
49580
+ onImportBibliography: xt
49550
49581
  }, null, 8, ["sources", "active-style", "picker-mode", "can-import", "importing", "import-message"])) : se("", !0),
49551
49582
  j.value === "comments" ? (M(), Ke(r8, {
49552
49583
  key: 3,
@@ -49879,7 +49910,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49879
49910
  k("div", null, [
49880
49911
  k("label", cE, D(S(s)("editor.pageSetup.top")), 1),
49881
49912
  Ce(k("input", {
49882
- "onUpdate:modelValue": E[43] || (E[43] = (P) => mt.value.top = P),
49913
+ "onUpdate:modelValue": E[43] || (E[43] = (P) => ht.value.top = P),
49883
49914
  type: "number",
49884
49915
  min: Kn,
49885
49916
  max: S(xr),
@@ -49888,7 +49919,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49888
49919
  }, null, 8, fE), [
49889
49920
  [
49890
49921
  Ne,
49891
- mt.value.top,
49922
+ ht.value.top,
49892
49923
  void 0,
49893
49924
  { number: !0 }
49894
49925
  ]
@@ -49897,7 +49928,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49897
49928
  k("div", null, [
49898
49929
  k("label", dE, D(S(s)("editor.pageSetup.bottom")), 1),
49899
49930
  Ce(k("input", {
49900
- "onUpdate:modelValue": E[44] || (E[44] = (P) => mt.value.bottom = P),
49931
+ "onUpdate:modelValue": E[44] || (E[44] = (P) => ht.value.bottom = P),
49901
49932
  type: "number",
49902
49933
  min: Kn,
49903
49934
  max: S(xr),
@@ -49906,7 +49937,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49906
49937
  }, null, 8, pE), [
49907
49938
  [
49908
49939
  Ne,
49909
- mt.value.bottom,
49940
+ ht.value.bottom,
49910
49941
  void 0,
49911
49942
  { number: !0 }
49912
49943
  ]
@@ -49915,7 +49946,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49915
49946
  k("div", null, [
49916
49947
  k("label", mE, D(S(s)("editor.pageSetup.left")), 1),
49917
49948
  Ce(k("input", {
49918
- "onUpdate:modelValue": E[45] || (E[45] = (P) => mt.value.left = P),
49949
+ "onUpdate:modelValue": E[45] || (E[45] = (P) => ht.value.left = P),
49919
49950
  type: "number",
49920
49951
  min: Kn,
49921
49952
  max: S(xr),
@@ -49924,7 +49955,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49924
49955
  }, null, 8, hE), [
49925
49956
  [
49926
49957
  Ne,
49927
- mt.value.left,
49958
+ ht.value.left,
49928
49959
  void 0,
49929
49960
  { number: !0 }
49930
49961
  ]
@@ -49933,7 +49964,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49933
49964
  k("div", null, [
49934
49965
  k("label", bE, D(S(s)("editor.pageSetup.right")), 1),
49935
49966
  Ce(k("input", {
49936
- "onUpdate:modelValue": E[46] || (E[46] = (P) => mt.value.right = P),
49967
+ "onUpdate:modelValue": E[46] || (E[46] = (P) => ht.value.right = P),
49937
49968
  type: "number",
49938
49969
  min: Kn,
49939
49970
  max: S(xr),
@@ -49942,7 +49973,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49942
49973
  }, null, 8, gE), [
49943
49974
  [
49944
49975
  Ne,
49945
- mt.value.right,
49976
+ ht.value.right,
49946
49977
  void 0,
49947
49978
  { number: !0 }
49948
49979
  ]
@@ -49966,7 +49997,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
49966
49997
  ])) : se("", !0)
49967
49998
  ]));
49968
49999
  }
49969
- }), oM = /* @__PURE__ */ Yl(yE, [["__scopeId", "data-v-bf29fce6"]]), kE = { class: "docs-editor-pages flex flex-col items-center gap-10" }, wE = ["data-page-index"], _E = ["data-node-type", "data-from", "data-to"], SE = ["innerHTML"], CE = {
50000
+ }), oM = /* @__PURE__ */ Yl(yE, [["__scopeId", "data-v-f738cd05"]]), kE = { class: "docs-editor-pages flex flex-col items-center gap-10" }, wE = ["data-page-index"], _E = ["data-node-type", "data-from", "data-to"], SE = ["innerHTML"], CE = {
49970
50001
  key: 1,
49971
50002
  class: "docs-editor-page__block-fallback flex justify-between text-sm text-slate-700"
49972
50003
  }, AE = { class: "docs-editor-page__block-type font-medium" }, TE = { class: "docs-editor-page__block-range text-slate-500" }, lM = /* @__PURE__ */ at({
@@ -50224,7 +50255,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
50224
50255
  fi((C) => f(w.id), ["enter"]),
50225
50256
  fi(p, ["esc"])
50226
50257
  ],
50227
- onClick: y[3] || (y[3] = we(() => {
50258
+ onClick: y[3] || (y[3] = _e(() => {
50228
50259
  }, ["stop"]))
50229
50260
  }, null, 40, BE), [
50230
50261
  [Ne, l.value]
@@ -50235,7 +50266,7 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
50235
50266
  key: 0,
50236
50267
  type: "button",
50237
50268
  class: ge(["rounded-full p-1 text-slate-500 opacity-0 transition-opacity hover:bg-slate-200/70 group-hover:opacity-100 dark:hover:bg-slate-700/70", { "opacity-100": s.value === w.id }]),
50238
- onClick: we((C) => m(w.id), ["stop"])
50269
+ onClick: _e((C) => m(w.id), ["stop"])
50239
50270
  }, [
50240
50271
  te(S(Td), { class: "h-3.5 w-3.5" })
50241
50272
  ], 10, HE)) : se("", !0),
@@ -50243,13 +50274,13 @@ const nO = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
50243
50274
  k("button", {
50244
50275
  type: "button",
50245
50276
  class: "flex w-full items-center px-3 py-1.5 text-xs hover:bg-slate-50 dark:hover:bg-slate-700/50",
50246
- onClick: we((C) => u(w), ["stop"])
50277
+ onClick: _e((C) => u(w), ["stop"])
50247
50278
  }, D(S(i)("documentTabs.rename")), 9, jE),
50248
50279
  k("button", {
50249
50280
  type: "button",
50250
50281
  class: "flex w-full items-center px-3 py-1.5 text-xs text-red-600 dark:text-red-400 hover:bg-slate-50 dark:hover:bg-slate-700/50 disabled:opacity-40",
50251
50282
  disabled: e.tabs.length <= 1,
50252
- onClick: we((C) => d(w.id), ["stop"])
50283
+ onClick: _e((C) => d(w.id), ["stop"])
50253
50284
  }, D(S(i)("documentTabs.delete")), 9, $E)
50254
50285
  ])) : se("", !0)
50255
50286
  ])