@harbour-enterprises/superdoc 0.10.51 → 0.10.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { g as md, h as yd, a as bd, q as jo, J as Wo, x as wd, d as Sd, C as Dd, w as vd, c as Fd } from "./chunks/super-editor.es-B-eM0VQ9.es.js";
2
- import { R as Ib, b as Cb, f as fb } from "./chunks/super-editor.es-B-eM0VQ9.es.js";
3
- import { Y as Vl, r as W, Z as ui, p as Ge, _ as Vn, a as ae, $ as zn, a0 as ua, C as dt, i as ht, q as ji, l as wt, x as xe, a1 as kd, L as Zt, R as qt, a2 as xd, a3 as Rd, a4 as Xo, g as Ji, N as Us, M as jr, j as Ii, k as Di, h as da, U as Nd, s as Md, A as Wr, F as jt, Q as GA, m as Ct, D as mi, G as ms, B as re, V as Ld, S as Gd, W as Td, K as qi, O as Es, E as ar, P as Ud, J as Hd, T as Pd, b as ye, o as fe, t as yi, v as bi, y as zl, f as We, z as ri, e as Ze, u as hi, w as Qi, n as Xs, a5 as Zl, d as gn, c as $l, X as Od, a6 as Jd } from "./chunks/vue-D254cI7X.es.js";
1
+ import { g as md, h as yd, a as bd, q as jo, J as Wo, x as wd, d as Sd, C as Dd, w as vd, c as Fd } from "./chunks/super-editor.es-C7TOrAd0.es.js";
2
+ import { R as Ib, b as Cb, f as fb } from "./chunks/super-editor.es-C7TOrAd0.es.js";
3
+ import { Y as Vl, r as W, Z as ui, p as Ge, _ as Vn, a as ae, $ as zn, a0 as ua, C as dt, i as ht, q as ji, l as wt, x as ke, a1 as kd, L as Zt, R as qt, a2 as xd, a3 as Rd, a4 as Xo, g as Ji, N as Us, M as jr, j as Ii, k as Di, h as da, U as Nd, s as Md, A as Wr, F as jt, Q as GA, m as Ct, D as mi, G as ms, B as re, V as Ld, S as Gd, W as Td, K as qi, O as Es, E as ar, P as Ud, J as Hd, T as Pd, b as ye, o as fe, t as yi, v as bi, y as zl, f as We, z as ri, e as Ze, u as hi, w as Qi, n as Xs, a5 as Zl, d as gn, c as $l, X as Od, a6 as Jd } from "./chunks/vue-D254cI7X.es.js";
4
4
  import { B as qn } from "./chunks/jszip-ChtTJmXO.es.js";
5
5
  import { B as Yd } from "./chunks/blank-docx-BRvkcuiv.es.js";
6
6
  import { E as eg } from "./chunks/eventemitter3-Bj3oXrh_.es.js";
@@ -1147,7 +1147,7 @@ function QI(n, t) {
1147
1147
  });
1148
1148
  });
1149
1149
  }, !0), t._customProperties.forEach((g) => {
1150
- wt(() => xe(t[g]), (u, I) => {
1150
+ wt(() => ke(t[g]), (u, I) => {
1151
1151
  i.notifyComponentUpdate(), i.sendInspectorState(Kt), ds && i.addTimelineEvent({
1152
1152
  layerId: Hn,
1153
1153
  event: {
@@ -1792,22 +1792,22 @@ function Yn(n) {
1792
1792
  documentId: c,
1793
1793
  page: 1,
1794
1794
  selectionBounds: {}
1795
- }), O = n.selection?.selectionBounds ? { ...n.selection.selectionBounds } : { top: 0, left: 0, right: 0, bottom: 0 }, J = W(n.trackedChange), T = W(n.trackedChangeType || null), H = W(n.trackedChangeText || null), U = W(n.deletedText || null), S = W(n.resolvedTime || null), G = W(n.resolvedByEmail || null), R = W(n.resolvedByName || null), L = ({ email: ne, name: Be, superdoc: ke }) => {
1795
+ }), O = n.selection?.selectionBounds ? { ...n.selection.selectionBounds } : { top: 0, left: 0, right: 0, bottom: 0 }, J = W(n.trackedChange), T = W(n.trackedChangeType || null), H = W(n.trackedChangeText || null), U = W(n.deletedText || null), S = W(n.resolvedTime || null), G = W(n.resolvedByEmail || null), R = W(n.resolvedByName || null), L = ({ email: ne, name: Be, superdoc: xe }) => {
1796
1796
  if (S.value) return;
1797
1797
  if (S.value = Date.now(), G.value = ne, R.value = Be, J.value) {
1798
1798
  const Xe = { type: Hs.RESOLVED, comment: se() };
1799
- te(ke, Xe), ke.activeEditor?.commands?.resolveComment({ commentId: i, importedId: r });
1799
+ te(xe, Xe), xe.activeEditor?.commands?.resolveComment({ commentId: i, importedId: r });
1800
1800
  return;
1801
1801
  }
1802
1802
  const Me = { type: Hs.RESOLVED, comment: se() };
1803
- te(ke, Me), ke.activeEditor?.commands?.resolveComment({ commentId: i, importedId: r });
1803
+ te(xe, Me), xe.activeEditor?.commands?.resolveComment({ commentId: i, importedId: r });
1804
1804
  }, P = ({ isInternal: ne, superdoc: Be }) => {
1805
- const ke = I.value;
1806
- if (ke === ne) return;
1805
+ const xe = I.value;
1806
+ if (xe === ne) return;
1807
1807
  I.value = ne;
1808
1808
  const Me = {
1809
1809
  type: Hs.UPDATE,
1810
- changes: [{ key: "isInternal", value: ne, previousValue: ke }],
1810
+ changes: [{ key: "isInternal", value: ne, previousValue: xe }],
1811
1811
  comment: se()
1812
1812
  };
1813
1813
  te(Be, Me);
@@ -1816,8 +1816,8 @@ function Yn(n) {
1816
1816
  }, K = (ne) => {
1817
1817
  const { activeEditor: Be } = ne;
1818
1818
  Be?.commands.setActiveComment({ commentId: i, importedId: r });
1819
- }, V = ({ text: ne, superdoc: Be, suppressUpdate: ke }) => {
1820
- if (M.value = ne, f.value = $(ne), ke) return;
1819
+ }, V = ({ text: ne, superdoc: Be, suppressUpdate: xe }) => {
1820
+ if (M.value = ne, f.value = $(ne), xe) return;
1821
1821
  const Me = {
1822
1822
  type: Hs.UPDATE,
1823
1823
  changes: [{ key: "text", value: ne }],
@@ -1837,11 +1837,11 @@ function Yn(n) {
1837
1837
  }), Xe;
1838
1838
  }, q = (ne, Be) => {
1839
1839
  F.source = "super-editor";
1840
- const ke = Be?.getBoundingClientRect()?.top, Me = {
1841
- top: ne.top - ke,
1840
+ const xe = Be?.getBoundingClientRect()?.top, Me = {
1841
+ top: ne.top - xe,
1842
1842
  left: ne.left,
1843
1843
  right: ne.right,
1844
- bottom: ne.bottom - ke
1844
+ bottom: ne.bottom - xe
1845
1845
  };
1846
1846
  F.selectionBounds = Me;
1847
1847
  }, ee = () => k.value ? { name: k.value.name || "(Imported)", email: k.value.email } : { name: D, email: b }, te = (ne, Be) => {
@@ -2119,7 +2119,7 @@ const Ri = /* @__PURE__ */ JA("superdoc", () => {
2119
2119
  parentComments: Te,
2120
2120
  resolvedComments: Je
2121
2121
  };
2122
- }), se = (he) => D.includes(he), ne = ae(() => n.documents), Be = ae(() => t), ke = (he, ce) => {
2122
+ }), se = (he) => D.includes(he), ne = ae(() => n.documents), Be = ae(() => t), xe = (he, ce) => {
2123
2123
  const De = he.getContainerLocation(ce), Te = De.top + he.selectionBounds.top, Je = De.left + he.selectionBounds.left;
2124
2124
  return {
2125
2125
  top: Te,
@@ -2295,7 +2295,7 @@ const Ri = /* @__PURE__ */ JA("superdoc", () => {
2295
2295
  init: P,
2296
2296
  getComment: K,
2297
2297
  setActiveComment: V,
2298
- getCommentLocation: ke,
2298
+ getCommentLocation: xe,
2299
2299
  hasOverlapId: se,
2300
2300
  checkOverlaps: Me,
2301
2301
  getPendingComment: Xe,
@@ -3141,16 +3141,16 @@ function G0() {
3141
3141
  const ne = q[se], Be = ee.get(ne);
3142
3142
  if (Be !== void 0) {
3143
3143
  g.set(G, ne);
3144
- for (const ke of Be) {
3144
+ for (const xe of Be) {
3145
3145
  if (t.has(G))
3146
3146
  break;
3147
- ke(G);
3147
+ xe(G);
3148
3148
  }
3149
3149
  }
3150
3150
  if (se === 0 && !P && te !== void 0) {
3151
- const ke = te.get(ne);
3152
- if (ke !== void 0)
3153
- for (const Me of ke) {
3151
+ const xe = te.get(ne);
3152
+ if (xe !== void 0)
3153
+ for (const Me of xe) {
3154
3154
  if (t.has(G))
3155
3155
  break;
3156
3156
  Me(G);
@@ -3164,10 +3164,10 @@ function G0() {
3164
3164
  const ne = q[se], Be = te.get(ne);
3165
3165
  if (Be !== void 0) {
3166
3166
  g.set(G, ne);
3167
- for (const ke of Be) {
3167
+ for (const xe of Be) {
3168
3168
  if (t.has(G))
3169
3169
  break;
3170
- ke(G);
3170
+ xe(G);
3171
3171
  }
3172
3172
  }
3173
3173
  }
@@ -6509,7 +6509,7 @@ const VE = {
6509
6509
  const lt = be - le;
6510
6510
  return lt ? pe / lt * (nt - ee.value) : 0;
6511
6511
  }
6512
- }), ke = ae(() => `${Be.value}px`), Me = ae(() => {
6512
+ }), xe = ae(() => `${Be.value}px`), Me = ae(() => {
6513
6513
  const {
6514
6514
  value: le
6515
6515
  } = b, {
@@ -6837,7 +6837,7 @@ const VE = {
6837
6837
  yBarSizePx: q,
6838
6838
  xBarSizePx: te,
6839
6839
  yBarTopPx: ne,
6840
- xBarLeftPx: ke,
6840
+ xBarLeftPx: xe,
6841
6841
  isShowXBar: at,
6842
6842
  isShowYBar: Et,
6843
6843
  isIos: K,
@@ -7657,7 +7657,7 @@ const Fp = Ct({
7657
7657
  borderRadius: se,
7658
7658
  arrowHeight: ne,
7659
7659
  arrowOffset: Be,
7660
- arrowOffsetVertical: ke
7660
+ arrowOffsetVertical: xe
7661
7661
  }
7662
7662
  } = g.value;
7663
7663
  return {
@@ -7672,7 +7672,7 @@ const Fp = Ct({
7672
7672
  "--n-border-radius": se,
7673
7673
  "--n-arrow-height": ne,
7674
7674
  "--n-arrow-offset": Be,
7675
- "--n-arrow-offset-vertical": ke,
7675
+ "--n-arrow-offset-vertical": xe,
7676
7676
  "--n-padding": K,
7677
7677
  "--n-space": L,
7678
7678
  "--n-space-arrow": P
@@ -8537,7 +8537,7 @@ const Tp = {
8537
8537
  borderFocus: se,
8538
8538
  borderDisabled: ne,
8539
8539
  borderChecked: Be,
8540
- boxShadowFocus: ke,
8540
+ boxShadowFocus: xe,
8541
8541
  textColor: Me,
8542
8542
  textColorDisabled: Xe,
8543
8543
  checkMarkColorDisabledChecked: at,
@@ -8561,7 +8561,7 @@ const Tp = {
8561
8561
  "--n-border-focus": se,
8562
8562
  "--n-border-disabled": ne,
8563
8563
  "--n-border-disabled-checked": de,
8564
- "--n-box-shadow-focus": ke,
8564
+ "--n-box-shadow-focus": xe,
8565
8565
  "--n-color": R,
8566
8566
  "--n-color-checked": L,
8567
8567
  "--n-color-table": K,
@@ -9003,11 +9003,11 @@ const Nh = Ct({
9003
9003
  } = i, {
9004
9004
  value: Be
9005
9005
  } = r, {
9006
- value: ke
9006
+ value: xe
9007
9007
  } = A, {
9008
9008
  value: Me
9009
9009
  } = c;
9010
- return ne !== null ? Me.includes(te) : Be !== null ? Me.includes(te) && Me[Me.length - 1] !== te : ke !== null ? Me.includes(te) : !1;
9010
+ return ne !== null ? Me.includes(te) : Be !== null ? Me.includes(te) && Me[Me.length - 1] !== te : xe !== null ? Me.includes(te) : !1;
9011
9011
  }), S = ae(() => r.value === null && !u.value), G = q0(U, 300, S), R = ae(() => !!M?.enteringSubmenuRef.value), L = W(!1);
9012
9012
  mi(gl, {
9013
9013
  enteringSubmenuRef: L
@@ -9665,7 +9665,7 @@ const Nh = Ct({
9665
9665
  borderRadius: se,
9666
9666
  optionOpacityDisabled: ne,
9667
9667
  [Pi("optionIconSuffixWidth", K)]: Be,
9668
- [Pi("optionSuffixWidth", K)]: ke,
9668
+ [Pi("optionSuffixWidth", K)]: xe,
9669
9669
  [Pi("optionIconPrefixWidth", K)]: Me,
9670
9670
  [Pi("optionPrefixWidth", K)]: Xe,
9671
9671
  [Pi("fontSize", K)]: at,
@@ -9679,7 +9679,7 @@ const Nh = Ct({
9679
9679
  "--n-option-height": Et,
9680
9680
  "--n-option-prefix-width": Xe,
9681
9681
  "--n-option-icon-prefix-width": Me,
9682
- "--n-option-suffix-width": ke,
9682
+ "--n-option-suffix-width": xe,
9683
9683
  "--n-option-icon-suffix-width": Be,
9684
9684
  "--n-option-icon-size": de,
9685
9685
  "--n-divider-color": te,
@@ -10085,7 +10085,7 @@ const oQ = {
10085
10085
  class: "internal-dropdown",
10086
10086
  style: ri(u.value)
10087
10087
  }, [
10088
- bi(xe(Lh), {
10088
+ bi(ke(Lh), {
10089
10089
  trigger: "click",
10090
10090
  options: c,
10091
10091
  onSelect: b[0] || (b[0] = (D) => I(D)),
@@ -10100,7 +10100,7 @@ const oQ = {
10100
10100
  We("div", DQ, yi(g.value), 1),
10101
10101
  We("div", {
10102
10102
  class: "dropdown-caret",
10103
- innerHTML: xe(an).caretDown
10103
+ innerHTML: ke(an).caretDown
10104
10104
  }, null, 8, vQ)
10105
10105
  ])
10106
10106
  ]),
@@ -10157,23 +10157,23 @@ const RQ = { class: "card-section comment-header" }, NQ = { class: "comment-head
10157
10157
  }, null, 8, ["user"]),
10158
10158
  We("div", MQ, [
10159
10159
  We("div", LQ, yi(O.value.name), 1),
10160
- A.comment.createdTime ? (fe(), ye("div", GQ, yi(xe(xQ)(A.comment.createdTime)), 1)) : Ze("", !0)
10160
+ A.comment.createdTime ? (fe(), ye("div", GQ, yi(ke(xQ)(A.comment.createdTime)), 1)) : Ze("", !0)
10161
10161
  ])
10162
10162
  ]),
10163
10163
  We("div", TQ, [
10164
10164
  y.value ? (fe(), ye("div", {
10165
10165
  key: 0,
10166
10166
  class: "overflow-menu__icon",
10167
- innerHTML: xe(an).markDone,
10167
+ innerHTML: ke(an).markDone,
10168
10168
  onClick: Qi(k, ["stop", "prevent"])
10169
10169
  }, null, 8, UQ)) : Ze("", !0),
10170
10170
  b.value ? (fe(), ye("div", {
10171
10171
  key: 1,
10172
10172
  class: "overflow-menu__icon",
10173
- innerHTML: xe(an).rejectChange,
10173
+ innerHTML: ke(an).rejectChange,
10174
10174
  onClick: Qi(M, ["stop", "prevent"])
10175
10175
  }, null, 8, HQ)) : Ze("", !0),
10176
- D.value ? (fe(), hi(xe(Lh), {
10176
+ D.value ? (fe(), hi(ke(Lh), {
10177
10177
  key: 2,
10178
10178
  trigger: "click",
10179
10179
  options: w.value,
@@ -10187,7 +10187,7 @@ const RQ = { class: "card-section comment-header" }, NQ = { class: "comment-head
10187
10187
  }, [
10188
10188
  We("div", {
10189
10189
  class: "overflow-icon",
10190
- innerHTML: xe(an).overflow
10190
+ innerHTML: ke(an).overflow
10191
10191
  }, null, 8, PQ)
10192
10192
  ])
10193
10193
  ]),
@@ -10236,10 +10236,10 @@ const RQ = { class: "card-section comment-header" }, NQ = { class: "comment-head
10236
10236
  We("div", {
10237
10237
  class: Xs(["comment-entry", { "input-active": n.isFocused }])
10238
10238
  }, [
10239
- bi(xe(wd), {
10239
+ bi(ke(wd), {
10240
10240
  class: "superdoc-field",
10241
10241
  placeholder: "Add a comment",
10242
- modelValue: xe(A),
10242
+ modelValue: ke(A),
10243
10243
  "onUpdate:modelValue": u[0] || (u[0] = (I) => zn(A) ? A.value = I : null),
10244
10244
  users: n.users,
10245
10245
  onFocus: u[1] || (u[1] = (I) => c(!0)),
@@ -10331,7 +10331,7 @@ const RQ = { class: "card-section comment-header" }, NQ = { class: "comment-head
10331
10331
  }), A.$superdoc.activeEditor.commands.rejectTrackedChangeById(r.comment.commentId)) : g.deleteComment({ superdoc: A.$superdoc, commentId: r.comment.commentId }), qt(() => {
10332
10332
  g.lastUpdate = /* @__PURE__ */ new Date(), D.value = null;
10333
10333
  });
10334
- }, ke = () => {
10334
+ }, xe = () => {
10335
10335
  r.comment.trackedChange && A.$superdoc.activeEditor.commands.acceptTrackedChangeById(r.comment.commentId), r.comment.resolveComment({
10336
10336
  email: c.user.email,
10337
10337
  name: c.user.name,
@@ -10395,10 +10395,10 @@ const RQ = { class: "card-section comment-header" }, NQ = { class: "comment-head
10395
10395
  class: "conversation-item"
10396
10396
  }, [
10397
10397
  bi(Gh, {
10398
- config: xe(b),
10398
+ config: ke(b),
10399
10399
  timestamp: de(Se.createdTime),
10400
10400
  comment: Se,
10401
- onResolve: ke,
10401
+ onResolve: xe,
10402
10402
  onReject: Be,
10403
10403
  onOverflowSelect: (ut) => Me(ut, Se)
10404
10404
  }, null, 8, ["config", "timestamp", "comment", "onOverflowSelect"]),
@@ -10421,14 +10421,14 @@ const RQ = { class: "card-section comment-header" }, NQ = { class: "comment-head
10421
10421
  ])
10422
10422
  ])) : Ze("", !0),
10423
10423
  Se.trackedChange ? Ze("", !0) : (fe(), ye("div", em, [
10424
- !xe(F) && !$.value(Se) ? (fe(), ye("div", {
10424
+ !ke(F) && !$.value(Se) ? (fe(), ye("div", {
10425
10425
  key: 0,
10426
10426
  class: "comment",
10427
10427
  innerHTML: Se.commentText
10428
- }, null, 8, tm)) : xe(F) && !$.value(Se) ? (fe(), ye("div", im, yi(xe(J)[Se.importedId !== void 0 ? Se.importedId : Se.commentId]?.bounds), 1)) : (fe(), ye("div", nm, [
10428
+ }, null, 8, tm)) : ke(F) && !$.value(Se) ? (fe(), ye("div", im, yi(ke(J)[Se.importedId !== void 0 ? Se.importedId : Se.commentId]?.bounds), 1)) : (fe(), ye("div", nm, [
10429
10429
  bi(ul, {
10430
10430
  users: ue.value,
10431
- config: xe(b),
10431
+ config: ke(b),
10432
10432
  "include-header": !1,
10433
10433
  comment: Se
10434
10434
  }, null, 8, ["users", "config", "comment"]),
@@ -10446,18 +10446,18 @@ const RQ = { class: "card-section comment-header" }, NQ = { class: "comment-head
10446
10446
  ])),
10447
10447
  L.value(_e) ? (fe(), ye("div", Am)) : Ze("", !0)
10448
10448
  ]))), 128)),
10449
- P.value && !xe(b).readOnly ? (fe(), ye("div", om, [
10449
+ P.value && !ke(b).readOnly ? (fe(), ye("div", om, [
10450
10450
  bi(ul, {
10451
10451
  ref_key: "commentInput",
10452
10452
  ref: U,
10453
10453
  users: ue.value,
10454
- config: xe(b),
10454
+ config: ke(b),
10455
10455
  comment: r.comment
10456
10456
  }, null, 8, ["users", "config", "comment"]),
10457
- R.value && !xe(b).readOnly ? (fe(), ye("div", cm, [
10457
+ R.value && !ke(b).readOnly ? (fe(), ye("div", cm, [
10458
10458
  We("button", {
10459
10459
  class: "sd-button",
10460
- onClick: Qe[1] || (Qe[1] = Qi((...Se) => xe(I) && xe(I)(...Se), ["stop", "prevent"]))
10460
+ onClick: Qe[1] || (Qe[1] = Qi((...Se) => ke(I) && ke(I)(...Se), ["stop", "prevent"]))
10461
10461
  }, "Cancel"),
10462
10462
  We("button", {
10463
10463
  class: Xs(["sd-button primary", { disabled: !ee.value }]),
@@ -10493,13 +10493,13 @@ const RQ = { class: "card-section comment-header" }, NQ = { class: "comment-head
10493
10493
  g.value = !1;
10494
10494
  }), (f, Q) => (fe(), ye("div", hm, [
10495
10495
  n.showMainComments ? (fe(), ye("div", um, [
10496
- (fe(!0), ye(jt, null, gn(xe(c).parentComments, (y) => (fe(), ye("div", dm, [
10496
+ (fe(!0), ye(jt, null, gn(ke(c).parentComments, (y) => (fe(), ye("div", dm, [
10497
10497
  bi(ir, { comment: y }, null, 8, ["comment"])
10498
10498
  ]))), 256))
10499
10499
  ])) : Ze("", !0),
10500
10500
  I.value ? (fe(), ye("div", Im, [
10501
10501
  Q[0] || (Q[0] = We("div", { class: "comment-title" }, "Resolved", -1)),
10502
- (fe(!0), ye(jt, null, gn(xe(c).resolvedComments, (y) => (fe(), ye("div", Cm, [
10502
+ (fe(!0), ye(jt, null, gn(ke(c).resolvedComments, (y) => (fe(), ye("div", Cm, [
10503
10503
  bi(ir, { comment: y }, null, 8, ["comment"])
10504
10504
  ]))), 256))
10505
10505
  ])) : Ze("", !0)
@@ -10639,7 +10639,7 @@ var pm = {
10639
10639
  4644: (
10640
10640
  /***/
10641
10641
  (n, t, i) => {
10642
- var r = i(7811), A = i(3724), c = i(4475), g = i(4901), u = i(34), I = i(9297), f = i(6955), Q = i(6823), y = i(6699), b = i(6840), D = i(2106), w = i(1625), k = i(2787), M = i(2967), F = i(8227), O = i(3392), J = i(1181), T = J.enforce, H = J.get, U = c.Int8Array, S = U && U.prototype, G = c.Uint8ClampedArray, R = G && G.prototype, L = U && k(U), P = S && k(S), K = Object.prototype, V = c.TypeError, $ = F("toStringTag"), q = O("TYPED_ARRAY_TAG"), ee = "TypedArrayConstructor", te = r && !!M && f(c.opera) !== "Opera", se = !1, ne, Be, ke, Me = {
10642
+ var r = i(7811), A = i(3724), c = i(4475), g = i(4901), u = i(34), I = i(9297), f = i(6955), Q = i(6823), y = i(6699), b = i(6840), D = i(2106), w = i(1625), k = i(2787), M = i(2967), F = i(8227), O = i(3392), J = i(1181), T = J.enforce, H = J.get, U = c.Int8Array, S = U && U.prototype, G = c.Uint8ClampedArray, R = G && G.prototype, L = U && k(U), P = S && k(S), K = Object.prototype, V = c.TypeError, $ = F("toStringTag"), q = O("TYPED_ARRAY_TAG"), ee = "TypedArrayConstructor", te = r && !!M && f(c.opera) !== "Opera", se = !1, ne, Be, xe, Me = {
10643
10643
  Int8Array: 1,
10644
10644
  Uint8Array: 1,
10645
10645
  Uint8ClampedArray: 1,
@@ -10710,9 +10710,9 @@ var pm = {
10710
10710
  }
10711
10711
  };
10712
10712
  for (ne in Me)
10713
- Be = c[ne], ke = Be && Be.prototype, ke ? T(ke)[ee] = Be : te = !1;
10713
+ Be = c[ne], xe = Be && Be.prototype, xe ? T(xe)[ee] = Be : te = !1;
10714
10714
  for (ne in Xe)
10715
- Be = c[ne], ke = Be && Be.prototype, ke && (T(ke)[ee] = Be);
10715
+ Be = c[ne], xe = Be && Be.prototype, xe && (T(xe)[ee] = Be);
10716
10716
  if ((!te || !g(L) || L === Function.prototype) && (L = function() {
10717
10717
  throw new V("Incorrect invocation");
10718
10718
  }, te))
@@ -12840,13 +12840,13 @@ var pm = {
12840
12840
  var Te = y(Qe), Je = Ee ? X.nodes : Te ? [] : {};
12841
12841
  if (Te)
12842
12842
  for (_e = Je.length, he = w(Qe), ce = 0; ce < he; ce++)
12843
- ke(Qe, ce, Be(Qe, "" + ce, ue, ce < _e ? Je[ce] : void 0));
12843
+ xe(Qe, ce, Be(Qe, "" + ce, ue, ce < _e ? Je[ce] : void 0));
12844
12844
  else
12845
12845
  for (ut = S(Qe), he = w(ut), ce = 0; ce < he; ce++)
12846
- De = ut[ce], ke(Qe, De, Be(Qe, De, ue, b(Je, De) ? Je[De] : void 0));
12846
+ De = ut[ce], xe(Qe, De, Be(Qe, De, ue, b(Je, De) ? Je[De] : void 0));
12847
12847
  }
12848
12848
  return I(ue, de, z, Qe, Se);
12849
- }, ke = function(de, z, ue) {
12849
+ }, xe = function(de, z, ue) {
12850
12850
  if (A) {
12851
12851
  var X = G(de, z);
12852
12852
  if (X && !X.configurable) return;
@@ -13572,7 +13572,7 @@ var Ue = globalThis.pdfjsLib = {};
13572
13572
  super(e, "AbortException");
13573
13573
  }
13574
13574
  }
13575
- function ke(p) {
13575
+ function xe(p) {
13576
13576
  (typeof p != "object" || p?.length === void 0) && G("Invalid argument for bytesToString");
13577
13577
  const e = p.length, s = 8192;
13578
13578
  if (e < s)
@@ -13712,7 +13712,7 @@ var Ue = globalThis.pdfjsLib = {};
13712
13712
  else
13713
13713
  for (let e = 0; e < 32; e++)
13714
13714
  p[e] = Math.floor(Math.random() * 255);
13715
- return ke(p);
13715
+ return xe(p);
13716
13716
  }
13717
13717
  const he = "pdfjs_internal_id_", ce = {
13718
13718
  BEZIER_CURVE_TO: 0,
@@ -16702,7 +16702,7 @@ var Ue = globalThis.pdfjsLib = {};
16702
16702
  createFontFaceRule() {
16703
16703
  if (!this.data || this.disableFontFace)
16704
16704
  return null;
16705
- const e = ke(this.data), s = `url(data:${this.mimetype};base64,${btoa(e)});`;
16705
+ const e = xe(this.data), s = `url(data:${this.mimetype};base64,${btoa(e)});`;
16706
16706
  let a;
16707
16707
  if (!this.cssFontInfo)
16708
16708
  a = `@font-face {font-family:"${this.loadedName}";src:${s}}`;
@@ -31538,11 +31538,11 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
31538
31538
  for (const [ee, te] of $.entries()) {
31539
31539
  const se = document.createElement("div");
31540
31540
  se.className = "pdf-page", se.dataset.pageNumber = ee + 1, se.id = `${k}-page-${ee + 1}`, q.push(se);
31541
- const { width: ne, height: Be } = F(te), ke = 1, Me = new R9(), Xe = new N9({
31541
+ const { width: ne, height: Be } = F(te), xe = 1, Me = new R9(), Xe = new N9({
31542
31542
  container: se,
31543
31543
  id: ee + 1,
31544
- scale: ke,
31545
- defaultViewport: te.getViewport({ scale: ke }),
31544
+ scale: xe,
31545
+ defaultViewport: te.getViewport({ scale: xe }),
31546
31546
  eventBus: Me,
31547
31547
  textLayerMode: y
31548
31548
  });
@@ -31606,7 +31606,7 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
31606
31606
  id: "viewerId"
31607
31607
  }, null, 512),
31608
31608
  f.value ? Ze("", !0) : (fe(), ye("div", G9, [
31609
- bi(xe(hQ), {
31609
+ bi(ke(hQ), {
31610
31610
  class: "superdoc-pdf-viewer__spin",
31611
31611
  size: "large"
31612
31612
  })
@@ -31770,7 +31770,7 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
31770
31770
  ref: I
31771
31771
  }, [
31772
31772
  We("div", K9, [
31773
- (fe(!0), ye(jt, null, gn(xe(r), (J) => (fe(), ye("div", {
31773
+ (fe(!0), ye(jt, null, gn(ke(r), (J) => (fe(), ye("div", {
31774
31774
  key: J.commentId || J.importedId
31775
31775
  }, [
31776
31776
  We("div", {
@@ -31932,7 +31932,7 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
31932
31932
  setup(n) {
31933
31933
  const t = n, i = ae(() => t.field.options.find((A) => A.annotationId.includes(t.optionId))?.checked);
31934
31934
  return (r, A) => (fe(), ye("div", ny, [
31935
- bi(xe(Yp), {
31935
+ bi(ke(Yp), {
31936
31936
  checked: i.value,
31937
31937
  disabled: !t.isEditing
31938
31938
  }, null, 8, ["checked", "disabled"])
@@ -32064,7 +32064,7 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
32064
32064
  style: ri(c.value(f)),
32065
32065
  class: Xs(["field-container", { "field-container--no-style": f.nostyle }])
32066
32066
  }, [
32067
- (fe(), hi(Jd(xe(r)[f.field.fieldType]), {
32067
+ (fe(), hi(Jd(ke(r)[f.field.fieldType]), {
32068
32068
  class: "field-component",
32069
32069
  field: f.field,
32070
32070
  "style-override": f.style,
@@ -32268,7 +32268,7 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
32268
32268
  } = wi(r), { showAddComment: K, handleEditorLocationsUpdate: V, handleTrackedChangeUpdate: $ } = r, { proxy: q } = ji();
32269
32269
  r.proxy = q;
32270
32270
  const ee = W(null), te = W(null), se = Zt({ top: null, right: "-25px", zIndex: 101 }), ne = ae(() => q.$superdoc.activeEditor), { selectedText: Be } = Qy(ne), {
32271
- showAiLayer: ke,
32271
+ showAiLayer: xe,
32272
32272
  showAiWriter: Me,
32273
32273
  aiWriterPosition: Xe,
32274
32274
  aiLayer: at,
@@ -32505,10 +32505,10 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
32505
32505
  }, [
32506
32506
  We("div", {
32507
32507
  class: "superdoc__tools-icon",
32508
- innerHTML: xe(an).comment
32508
+ innerHTML: ke(an).comment
32509
32509
  }, null, 8, yy)
32510
32510
  ]),
32511
- xe(q).$superdoc.toolbar?.config?.aiApiKey ? (fe(), ye("div", {
32511
+ ke(q).$superdoc.toolbar?.config?.aiApiKey ? (fe(), ye("div", {
32512
32512
  key: 0,
32513
32513
  class: "tools-item",
32514
32514
  "data-id": "is-tool",
@@ -32526,15 +32526,15 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
32526
32526
  ref_key: "selectionLayer",
32527
32527
  ref: oi
32528
32528
  }, [
32529
- xe(u) && Wt.value ? (fe(), ye("div", {
32529
+ ke(u) && Wt.value ? (fe(), ye("div", {
32530
32530
  key: 0,
32531
32531
  style: ri(gr.value),
32532
32532
  class: "superdoc__temp-selection temp-selection sd-highlight sd-initial-highlight"
32533
32533
  }, null, 4)) : Ze("", !0)
32534
32534
  ], 544)) : Ze("", !0),
32535
- "hrbr-fields" in xe(y) && ee.value ? (fe(), hi(hy, {
32535
+ "hrbr-fields" in ke(y) && ee.value ? (fe(), hi(hy, {
32536
32536
  key: 1,
32537
- fields: xe(y)["hrbr-fields"],
32537
+ fields: ke(y)["hrbr-fields"],
32538
32538
  class: "superdoc__comments-layer comments-layer",
32539
32539
  style: { "z-index": "2" },
32540
32540
  ref_key: "hrbrFieldsLayer",
@@ -32547,30 +32547,30 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
32547
32547
  ref_key: "commentsLayer",
32548
32548
  ref: te,
32549
32549
  parent: ee.value,
32550
- user: xe(b),
32550
+ user: ke(b),
32551
32551
  onHighlightClick: _e
32552
32552
  }, null, 8, ["parent", "user"])) : Ze("", !0),
32553
- xe(ke) ? (fe(), hi(py, {
32553
+ ke(xe) ? (fe(), hi(py, {
32554
32554
  key: 3,
32555
32555
  class: "ai-layer",
32556
32556
  style: { "z-index": "4" },
32557
32557
  ref_key: "aiLayer",
32558
32558
  ref: at,
32559
- editor: xe(q).$superdoc.activeEditor
32559
+ editor: ke(q).$superdoc.activeEditor
32560
32560
  }, null, 8, ["editor"])) : Ze("", !0),
32561
- (fe(!0), ye(jt, null, gn(xe(A), (Ve) => (fe(), ye("div", {
32561
+ (fe(!0), ye(jt, null, gn(ke(A), (Ve) => (fe(), ye("div", {
32562
32562
  class: "superdoc__sub-document sub-document",
32563
32563
  key: Ve.id
32564
32564
  }, [
32565
- Ve.type === xe(Ia) ? (fe(), hi(U9, {
32565
+ Ve.type === ke(Ia) ? (fe(), hi(U9, {
32566
32566
  key: 0,
32567
32567
  "document-data": Ve,
32568
32568
  onSelectionChange: le,
32569
32569
  onReady: Qe,
32570
- onPageLoaded: xe(Q),
32570
+ onPageLoaded: ke(Q),
32571
32571
  onBypassSelection: Ht
32572
32572
  }, null, 8, ["document-data", "onPageLoaded"])) : Ze("", !0),
32573
- Ve.type === xe(on) ? (fe(), hi(xe(Dd), {
32573
+ Ve.type === ke(on) ? (fe(), hi(ke(Dd), {
32574
32574
  key: 1,
32575
32575
  "file-source": Ve.data,
32576
32576
  state: Ve.state,
@@ -32578,7 +32578,7 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
32578
32578
  options: $t(Ve),
32579
32579
  onPageMarginsChange: (Xt) => rt(Ve, Xt)
32580
32580
  }, null, 8, ["file-source", "state", "document-id", "options", "onPageMarginsChange"])) : Ze("", !0),
32581
- Ve.type === xe(TA) ? (fe(), hi(fy, {
32581
+ Ve.type === ke(TA) ? (fe(), hi(fy, {
32582
32582
  key: 2,
32583
32583
  onReady: me[2] || (me[2] = (Xt) => Qe(Xt, null)),
32584
32584
  onSelectionChange: le,
@@ -32589,37 +32589,38 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
32589
32589
  ])
32590
32590
  ], 512),
32591
32591
  Ai.value ? (fe(), ye("div", wy, [
32592
- xe(F) ? ms((fe(), hi(ir, {
32592
+ ke(F) ? ms((fe(), hi(ir, {
32593
32593
  key: 0,
32594
- comment: xe(F),
32594
+ comment: ke(F),
32595
32595
  "auto-focus": !0,
32596
32596
  "is-floating": !0
32597
32597
  }, null, 8, ["comment"])), [
32598
32598
  [Ke, ut]
32599
32599
  ]) : Ze("", !0),
32600
32600
  We("div", Sy, [
32601
- xe(P) && xe(G).length > 0 ? (fe(!0), ye(jt, { key: 0 }, gn(xe(k), (Ve) => (fe(), hi(j9, {
32601
+ ke(P) && ke(G).length > 0 ? (fe(!0), ye(jt, { key: 0 }, gn(ke(k), (Ve) => (fe(), hi(j9, {
32602
32602
  parent: ee.value,
32603
32603
  "current-document": Ve
32604
32604
  }, null, 8, ["parent", "current-document"]))), 256)) : Ze("", !0)
32605
32605
  ])
32606
32606
  ])) : Ze("", !0),
32607
- xe(Me) ? (fe(), ye("div", {
32607
+ ke(Me) ? (fe(), ye("div", {
32608
32608
  key: 1,
32609
32609
  class: "ai-writer-container",
32610
- style: ri(xe(Xe))
32610
+ style: ri(ke(Xe))
32611
32611
  }, [
32612
- bi(xe(Sd), {
32613
- "selected-text": xe(Be),
32614
- "handle-close": xe(z),
32615
- editor: xe(q).$superdoc.activeEditor,
32616
- "api-key": xe(q).$superdoc.toolbar?.config?.aiApiKey
32617
- }, null, 8, ["selected-text", "handle-close", "editor", "api-key"])
32612
+ bi(ke(Sd), {
32613
+ "selected-text": ke(Be),
32614
+ "handle-close": ke(z),
32615
+ editor: ke(q).$superdoc.activeEditor,
32616
+ "api-key": ke(q).$superdoc.toolbar?.config?.aiApiKey,
32617
+ endpoint: ke(q).$superdoc.config?.modules?.ai?.endpoint
32618
+ }, null, 8, ["selected-text", "handle-close", "editor", "api-key", "endpoint"])
32618
32619
  ], 4)) : Ze("", !0)
32619
32620
  ], 2);
32620
32621
  };
32621
32622
  }
32622
- }, vy = /* @__PURE__ */ Mt(Dy, [["__scopeId", "data-v-8171c246"]]), Fy = () => {
32623
+ }, vy = /* @__PURE__ */ Mt(Dy, [["__scopeId", "data-v-06753e82"]]), Fy = () => {
32623
32624
  const n = $l(vy), t = yI();
32624
32625
  n.use(t), n.directive("click-outside", ng);
32625
32626
  const i = Ri(), r = hn();
@@ -32693,7 +32694,7 @@ class hb extends eg {
32693
32694
  this.config = {
32694
32695
  ...this.config,
32695
32696
  ...t
32696
- }, this.config.colors = NI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.10.51", console.debug("🦋 [superdoc] Using SuperDoc version:", this.version), this.superdocId = t.superdocId || ig(), this.colors = this.config.colors, this.#t(), await this.#r(this.config.modules), this.#i(), this.#s(), this.user = this.config.user, this.users = this.config.users || [], this.socket = null, this.isDev = this.config.isDev || !1, this.activeEditor = null, this.comments = [], this.app.mount(this.config.selector), this.readyEditors = 0, this.isLocked = this.config.isLocked || !1, this.lockedBy = this.config.lockedBy || null, this.#a(this);
32697
+ }, this.config.colors = NI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.10.52", console.debug("🦋 [superdoc] Using SuperDoc version:", this.version), this.superdocId = t.superdocId || ig(), this.colors = this.config.colors, this.#t(), await this.#r(this.config.modules), this.#i(), this.#s(), this.user = this.config.user, this.users = this.config.users || [], this.socket = null, this.isDev = this.config.isDev || !1, this.activeEditor = null, this.comments = [], this.app.mount(this.config.selector), this.readyEditors = 0, this.isLocked = this.config.isLocked || !1, this.lockedBy = this.config.lockedBy || null, this.#a(this);
32697
32698
  }
32698
32699
  get requiredNumberOfEditors() {
32699
32700
  return this.superdocStore.documents.filter((t) => t.type === on).length;
@@ -32813,6 +32814,7 @@ class hb extends eg {
32813
32814
  documentMode: this.config.documentMode,
32814
32815
  superdoc: this,
32815
32816
  aiApiKey: this.config.modules?.ai?.apiKey,
32817
+ aiEndpoint: this.config.modules?.ai?.endpoint,
32816
32818
  ...t
32817
32819
  };
32818
32820
  this.toolbar = new vd(i), this.toolbar.on("superdoc-command", this.onToolbarCommand.bind(this)), this.toolbar.on("ai-highlight", ({ type: r, data: A }) => {