@harbour-enterprises/superdoc 0.12.28 → 0.12.30-rev.1

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.
Files changed (36) hide show
  1. package/dist/chunks/{super-editor.es-BqhRxvuD.cjs → super-editor.es-3Ibj8IyF.cjs} +90 -30
  2. package/dist/chunks/{super-editor.es-BHZKnNbD.es.js → super-editor.es-Cs2w1rLv.es.js} +103 -43
  3. package/dist/index.d.ts +2 -1
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/super-editor/ai-writer.es.js +20 -2
  6. package/dist/super-editor/chunks/{converter-Dw5A3iB_.js → converter-B3YG794p.js} +2 -2
  7. package/dist/super-editor/chunks/{docx-zipper-CmSD0g5u.js → docx-zipper-CjIsb1a6.js} +1 -1
  8. package/dist/super-editor/chunks/{editor-CgEJXwqo.js → editor-HCMuRikV.js} +73 -31
  9. package/dist/super-editor/chunks/{toolbar-DhjJ9zUU.js → toolbar-DNy-8F3W.js} +2 -2
  10. package/dist/super-editor/components/toolbar/ai-helpers.d.ts.map +1 -1
  11. package/dist/super-editor/converter.es.js +1 -1
  12. package/dist/super-editor/core/Editor.d.ts +1 -1
  13. package/dist/super-editor/core/Editor.d.ts.map +1 -1
  14. package/dist/super-editor/core/EventEmitter.d.ts +19 -9
  15. package/dist/super-editor/core/EventEmitter.d.ts.map +1 -1
  16. package/dist/super-editor/core/helpers/annotator.d.ts +5 -3
  17. package/dist/super-editor/core/helpers/annotator.d.ts.map +1 -1
  18. package/dist/super-editor/docx-zipper.es.js +2 -2
  19. package/dist/super-editor/editor.es.js +3 -3
  20. package/dist/super-editor/extensions/field-annotation/fieldAnnotationHelpers/getHeaderFooterAnnotations.d.ts +2 -0
  21. package/dist/super-editor/extensions/field-annotation/fieldAnnotationHelpers/getHeaderFooterAnnotations.d.ts.map +1 -0
  22. package/dist/super-editor/extensions/field-annotation/fieldAnnotationHelpers/index.d.ts +1 -0
  23. package/dist/super-editor/file-zipper.es.js +1 -1
  24. package/dist/super-editor/index.d.ts +1 -1
  25. package/dist/super-editor/super-editor.es.js +8 -7
  26. package/dist/super-editor/tests/e2e/test-app/dist/assets/index-BTMvkUyI.d.ts +3 -0
  27. package/dist/super-editor/tests/e2e/test-app/dist/assets/index-BTMvkUyI.d.ts.map +1 -0
  28. package/dist/super-editor/tests/e2e/test-app/vite.config.d.ts +1 -1
  29. package/dist/super-editor/toolbar.es.js +2 -2
  30. package/dist/super-editor.cjs +2 -1
  31. package/dist/super-editor.es.js +15 -14
  32. package/dist/superdoc.cjs +3 -2
  33. package/dist/superdoc.es.js +201 -200
  34. package/dist/superdoc.umd.js +91 -31
  35. package/dist/superdoc.umd.js.map +1 -1
  36. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { n as index$1, C as CommentsPluginKey, e as TrackChangesBasePluginKey, E as Editor, k as getRichTextExtensions, c as SuperInput, A as AIWriter, b as SuperEditor, d as SuperToolbar, f as createZip } from "./chunks/super-editor.es-BHZKnNbD.es.js";
2
- import { S, i, m } from "./chunks/super-editor.es-BHZKnNbD.es.js";
1
+ import { o as index$1, C as CommentsPluginKey, f as TrackChangesBasePluginKey, E as Editor, l as getRichTextExtensions, d as SuperInput, A as AIWriter, c as SuperEditor, e as SuperToolbar, g as createZip } from "./chunks/super-editor.es-Cs2w1rLv.es.js";
2
+ import { a, S, i, n } from "./chunks/super-editor.es-Cs2w1rLv.es.js";
3
3
  import { Y as effectScope, r as ref, Z as markRaw, p as process$1, _ as toRaw, a as computed, $ as isRef, a0 as isReactive, D as toRef, i as inject, q as getCurrentInstance, l as watch, y as unref, a1 as hasInjectionContext, N as reactive, u as nextTick, a2 as getCurrentScope, a3 as onScopeDispose, a4 as toRefs, g as global$1, K as shallowRef, O as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, U as onActivated, s as onDeactivated, A as createTextVNode, F as Fragment, R as Comment, m as defineComponent, E as provide, I as withDirectives, C as h, V as Teleport, S as renderSlot, W as isVNode, J as watchEffect, P as Transition, G as mergeProps, Q as vShow, H as cloneVNode, T as Text, b as createElementBlock, o as openBlock, t as toDisplayString, x as createVNode, z as withCtx, f as createBaseVNode, B as normalizeStyle, e as createCommentVNode, v as createBlock, w as withModifiers, n as normalizeClass, a5 as resolveDirective, d as renderList, c as createApp, X as onUnmounted, a6 as resolveDynamicComponent } from "./chunks/vue-IIIZMHTg.es.js";
4
4
  import { B as Buffer$2 } from "./chunks/jszip-BmWWPxfF.es.js";
5
5
  import { B as BlankDOCX } from "./chunks/blank-docx-iwdyG9RH.es.js";
@@ -344,8 +344,8 @@ function _crc32(buf, previous) {
344
344
  previous = previous.readUInt32BE(0);
345
345
  }
346
346
  let crc = ~~previous ^ -1;
347
- for (var n = 0; n < buf.length; n++) {
348
- crc = CRC_TABLE[(crc ^ buf[n]) & 255] ^ crc >>> 8;
347
+ for (var n2 = 0; n2 < buf.length; n2++) {
348
+ crc = CRC_TABLE[(crc ^ buf[n2]) & 255] ^ crc >>> 8;
349
349
  }
350
350
  return crc ^ -1;
351
351
  }
@@ -874,28 +874,28 @@ const saveAs = !IS_CLIENT ? () => {
874
874
  )
875
875
  );
876
876
  function downloadSaveAs(blob, name = "download", opts) {
877
- const a = document.createElement("a");
878
- a.download = name;
879
- a.rel = "noopener";
877
+ const a2 = document.createElement("a");
878
+ a2.download = name;
879
+ a2.rel = "noopener";
880
880
  if (typeof blob === "string") {
881
- a.href = blob;
882
- if (a.origin !== location.origin) {
883
- if (corsEnabled(a.href)) {
881
+ a2.href = blob;
882
+ if (a2.origin !== location.origin) {
883
+ if (corsEnabled(a2.href)) {
884
884
  download$1(blob, name, opts);
885
885
  } else {
886
- a.target = "_blank";
887
- click(a);
886
+ a2.target = "_blank";
887
+ click(a2);
888
888
  }
889
889
  } else {
890
- click(a);
890
+ click(a2);
891
891
  }
892
892
  } else {
893
- a.href = URL.createObjectURL(blob);
893
+ a2.href = URL.createObjectURL(blob);
894
894
  setTimeout(function() {
895
- URL.revokeObjectURL(a.href);
895
+ URL.revokeObjectURL(a2.href);
896
896
  }, 4e4);
897
897
  setTimeout(function() {
898
- click(a);
898
+ click(a2);
899
899
  }, 0);
900
900
  }
901
901
  }
@@ -904,11 +904,11 @@ function msSaveAs(blob, name = "download", opts) {
904
904
  if (corsEnabled(blob)) {
905
905
  download$1(blob, name, opts);
906
906
  } else {
907
- const a = document.createElement("a");
908
- a.href = blob;
909
- a.target = "_blank";
907
+ const a2 = document.createElement("a");
908
+ a2.href = blob;
909
+ a2.target = "_blank";
910
910
  setTimeout(function() {
911
- click(a);
911
+ click(a2);
912
912
  });
913
913
  }
914
914
  } else {
@@ -2518,9 +2518,9 @@ function useComment(params) {
2518
2518
  const mentionElements = [...doc.querySelectorAll('span[data-type="mention"]')];
2519
2519
  const uniqueMentions = [];
2520
2520
  mentionElements.forEach((span) => {
2521
- const alreadyExists = uniqueMentions.some((m2) => {
2522
- const hasEmail = m2.email === span.getAttribute("email");
2523
- const hasName = m2.name === span.getAttribute("name");
2521
+ const alreadyExists = uniqueMentions.some((m) => {
2522
+ const hasEmail = m.email === span.getAttribute("email");
2523
+ const hasName = m.name === span.getAttribute("name");
2524
2524
  return hasEmail && hasName;
2525
2525
  });
2526
2526
  if (!alreadyExists) {
@@ -2975,8 +2975,8 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
2975
2975
  childCommentMap.get(comment.parentCommentId).push(comment);
2976
2976
  }
2977
2977
  });
2978
- const sortedParentComments = parentComments.sort((a, b) => a.createdTime - b.createdTime);
2979
- const sortedResolvedComments = resolvedComments.sort((a, b) => a.createdTime - b.createdTime);
2978
+ const sortedParentComments = parentComments.sort((a2, b) => a2.createdTime - b.createdTime);
2979
+ const sortedResolvedComments = resolvedComments.sort((a2, b) => a2.createdTime - b.createdTime);
2980
2980
  return {
2981
2981
  parentComments: sortedParentComments,
2982
2982
  resolvedComments: sortedResolvedComments
@@ -3321,7 +3321,7 @@ function plugin$1(options) {
3321
3321
  }
3322
3322
  };
3323
3323
  }
3324
- function m2(arg) {
3324
+ function m(arg) {
3325
3325
  return {
3326
3326
  $({ context, props }) {
3327
3327
  arg = typeof arg === "string" ? arg : arg({ context, props });
@@ -3355,7 +3355,7 @@ function plugin$1(options) {
3355
3355
  }
3356
3356
  const cB2 = (...args) => c2(b(args[0]), args[1], args[2]);
3357
3357
  const cE2 = (...args) => c2(e(args[0]), args[1], args[2]);
3358
- const cM2 = (...args) => c2(m2(args[0]), args[1], args[2]);
3358
+ const cM2 = (...args) => c2(m(args[0]), args[1], args[2]);
3359
3359
  const cNotM2 = (...args) => c2(notM(args[0]), args[1], args[2]);
3360
3360
  Object.assign(_plugin, {
3361
3361
  cB: cB2,
@@ -4013,14 +4013,14 @@ const colors = {
4013
4013
  function hsv2rgb(h2, s, v) {
4014
4014
  s /= 100;
4015
4015
  v /= 100;
4016
- let f = (n, k = (n + h2 / 60) % 6) => v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);
4016
+ let f = (n2, k = (n2 + h2 / 60) % 6) => v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);
4017
4017
  return [f(5) * 255, f(3) * 255, f(1) * 255];
4018
4018
  }
4019
4019
  function hsl2rgb(h2, s, l) {
4020
4020
  s /= 100;
4021
4021
  l /= 100;
4022
- let a = s * Math.min(l, 1 - l);
4023
- let f = (n, k = (n + h2 / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
4022
+ let a2 = s * Math.min(l, 1 - l);
4023
+ let f = (n2, k = (n2 + h2 / 30) % 12) => l - a2 * Math.max(Math.min(k - 3, 9 - k, 1), -1);
4024
4024
  return [f(0) * 255, f(8) * 255, f(4) * 255];
4025
4025
  }
4026
4026
  const prefix = "^\\s*";
@@ -4116,11 +4116,11 @@ function rgba(color) {
4116
4116
  } else if (color in colors) {
4117
4117
  return rgba(colors[color]);
4118
4118
  } else if (hslRegex.test(color) || hslaRegex.test(color)) {
4119
- const [h2, s, l, a] = hsla(color);
4120
- return [...hsl2rgb(h2, s, l), a];
4119
+ const [h2, s, l, a2] = hsla(color);
4120
+ return [...hsl2rgb(h2, s, l), a2];
4121
4121
  } else if (hsvRegex.test(color) || hsvaRegex.test(color)) {
4122
- const [h2, s, v, a] = hsva(color);
4123
- return [...hsv2rgb(h2, s, v), a];
4122
+ const [h2, s, v, a2] = hsva(color);
4123
+ return [...hsv2rgb(h2, s, v), a2];
4124
4124
  }
4125
4125
  throw new Error(`[seemly/rgba]: Invalid color value ${color}.`);
4126
4126
  } catch (e) {
@@ -4130,11 +4130,11 @@ function rgba(color) {
4130
4130
  function normalizeAlpha(alphaValue) {
4131
4131
  return alphaValue > 1 ? 1 : alphaValue < 0 ? 0 : alphaValue;
4132
4132
  }
4133
- function stringifyRgba(r, g, b, a) {
4134
- return `rgba(${roundChannel(r)}, ${roundChannel(g)}, ${roundChannel(b)}, ${normalizeAlpha(a)})`;
4133
+ function stringifyRgba(r, g, b, a2) {
4134
+ return `rgba(${roundChannel(r)}, ${roundChannel(g)}, ${roundChannel(b)}, ${normalizeAlpha(a2)})`;
4135
4135
  }
4136
- function compositeChannel(v1, a1, v2, a2, a) {
4137
- return roundChannel((v1 * a1 * (1 - a2) + v2 * a2) / a);
4136
+ function compositeChannel(v1, a1, v2, a2, a3) {
4137
+ return roundChannel((v1 * a1 * (1 - a2) + v2 * a2) / a3);
4138
4138
  }
4139
4139
  function composite(background, overlay2) {
4140
4140
  if (!Array.isArray(background))
@@ -4147,16 +4147,16 @@ function composite(background, overlay2) {
4147
4147
  return stringifyRgba(compositeChannel(background[0], a1, overlay2[0], a2, alpha), compositeChannel(background[1], a1, overlay2[1], a2, alpha), compositeChannel(background[2], a1, overlay2[2], a2, alpha), alpha);
4148
4148
  }
4149
4149
  function changeColor(base2, options) {
4150
- const [r, g, b, a = 1] = Array.isArray(base2) ? base2 : rgba(base2);
4150
+ const [r, g, b, a2 = 1] = Array.isArray(base2) ? base2 : rgba(base2);
4151
4151
  if (typeof options.alpha === "number") {
4152
4152
  return stringifyRgba(r, g, b, options.alpha);
4153
4153
  }
4154
- return stringifyRgba(r, g, b, a);
4154
+ return stringifyRgba(r, g, b, a2);
4155
4155
  }
4156
4156
  function scaleColor(base2, options) {
4157
- const [r, g, b, a = 1] = Array.isArray(base2) ? base2 : rgba(base2);
4157
+ const [r, g, b, a2 = 1] = Array.isArray(base2) ? base2 : rgba(base2);
4158
4158
  const { lightness = 1, alpha = 1 } = options;
4159
- return toRgbaString([r * lightness, g * lightness, b * lightness, a * alpha]);
4159
+ return toRgbaString([r * lightness, g * lightness, b * lightness, a2 * alpha]);
4160
4160
  }
4161
4161
  function roundAlpha(value) {
4162
4162
  const v = Math.round(Number(value) * 100) / 100;
@@ -6241,9 +6241,9 @@ var Scheduler = function() {
6241
6241
  return Scheduler2;
6242
6242
  }();
6243
6243
  var scheduler = new Scheduler();
6244
- var updateCount = function(n) {
6245
- !watching && n > 0 && scheduler.start();
6246
- watching += n;
6244
+ var updateCount = function(n2) {
6245
+ !watching && n2 > 0 && scheduler.start();
6246
+ watching += n2;
6247
6247
  !watching && scheduler.stop();
6248
6248
  };
6249
6249
  var skipNotifyOnElement = function(target) {
@@ -7300,9 +7300,9 @@ function isPrototype(value) {
7300
7300
  var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$a;
7301
7301
  return value === proto;
7302
7302
  }
7303
- function baseTimes(n, iteratee) {
7304
- var index2 = -1, result = Array(n);
7305
- while (++index2 < n) {
7303
+ function baseTimes(n2, iteratee) {
7304
+ var index2 = -1, result = Array(n2);
7305
+ while (++index2 < n2) {
7306
7306
  result[index2] = iteratee(index2);
7307
7307
  }
7308
7308
  return result;
@@ -13929,7 +13929,7 @@ const _sfc_main$d = {
13929
13929
  const isThreadedComment = c2.parentCommentId === parentComment.commentId;
13930
13930
  const isThisComment = c2.commentId === props.comment.commentId;
13931
13931
  return isThreadedComment || isThisComment;
13932
- }).sort((a, b) => a.commentId === props.comment.commentId && a.createdTime - b.createdTime);
13932
+ }).sort((a2, b) => a2.commentId === props.comment.commentId && a2.createdTime - b.createdTime);
13933
13933
  });
13934
13934
  const isInternalDropdownDisabled = computed(() => {
13935
13935
  if (props.comment.resolvedTime) return true;
@@ -14400,10 +14400,10 @@ var __webpack_modules__ = {
14400
14400
  } else {
14401
14401
  var options = preserveResizability && !fixedLength && maxByteLength ? { maxByteLength: maxByteLength(arrayBuffer) } : void 0;
14402
14402
  newBuffer = new ArrayBuffer2(newByteLength, options);
14403
- var a = new DataView2(arrayBuffer);
14403
+ var a2 = new DataView2(arrayBuffer);
14404
14404
  var b = new DataView2(newBuffer);
14405
14405
  var copyLength = min(newByteLength, byteLength);
14406
- for (var i2 = 0; i2 < copyLength; i2++) setInt8(b, i2, getInt8(a, i2));
14406
+ for (var i2 = 0; i2 < copyLength; i2++) setInt8(b, i2, getInt8(a2, i2));
14407
14407
  }
14408
14408
  if (!PROPER_STRUCTURED_CLONE_TRANSFER) detachTransferable(arrayBuffer);
14409
14409
  return newBuffer;
@@ -15998,8 +15998,8 @@ var __webpack_modules__ = {
15998
15998
  var ceil = Math.ceil;
15999
15999
  var floor = Math.floor;
16000
16000
  module2.exports = Math.trunc || function trunc(x) {
16001
- var n = +x;
16002
- return (n > 0 ? floor : ceil)(n);
16001
+ var n2 = +x;
16002
+ return (n2 > 0 ? floor : ceil)(n2);
16003
16003
  };
16004
16004
  }
16005
16005
  ),
@@ -18527,7 +18527,7 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
18527
18527
  return shadow2(this, "isCSSRoundSupported", globalThis.CSS?.supports?.("width: round(1.5px, 1px)"));
18528
18528
  }
18529
18529
  }
18530
- const hexNumbers = Array.from(Array(256).keys(), (n) => n.toString(16).padStart(2, "0"));
18530
+ const hexNumbers = Array.from(Array(256).keys(), (n2) => n2.toString(16).padStart(2, "0"));
18531
18531
  class Util2 {
18532
18532
  static makeHexColor(r, g, b) {
18533
18533
  return `#${hexNumbers[r]}${hexNumbers[g]}${hexNumbers[b]}`;
@@ -18579,36 +18579,36 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
18579
18579
  static transform(m1, m2) {
18580
18580
  return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]];
18581
18581
  }
18582
- static applyTransform(p, m2) {
18583
- const xt = p[0] * m2[0] + p[1] * m2[2] + m2[4];
18584
- const yt = p[0] * m2[1] + p[1] * m2[3] + m2[5];
18582
+ static applyTransform(p, m) {
18583
+ const xt = p[0] * m[0] + p[1] * m[2] + m[4];
18584
+ const yt = p[0] * m[1] + p[1] * m[3] + m[5];
18585
18585
  return [xt, yt];
18586
18586
  }
18587
- static applyInverseTransform(p, m2) {
18588
- const d = m2[0] * m2[3] - m2[1] * m2[2];
18589
- const xt = (p[0] * m2[3] - p[1] * m2[2] + m2[2] * m2[5] - m2[4] * m2[3]) / d;
18590
- const yt = (-p[0] * m2[1] + p[1] * m2[0] + m2[4] * m2[1] - m2[5] * m2[0]) / d;
18587
+ static applyInverseTransform(p, m) {
18588
+ const d = m[0] * m[3] - m[1] * m[2];
18589
+ const xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d;
18590
+ const yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d;
18591
18591
  return [xt, yt];
18592
18592
  }
18593
- static getAxialAlignedBoundingBox(r, m2) {
18594
- const p1 = this.applyTransform(r, m2);
18595
- const p2 = this.applyTransform(r.slice(2, 4), m2);
18596
- const p3 = this.applyTransform([r[0], r[3]], m2);
18597
- const p4 = this.applyTransform([r[2], r[1]], m2);
18593
+ static getAxialAlignedBoundingBox(r, m) {
18594
+ const p1 = this.applyTransform(r, m);
18595
+ const p2 = this.applyTransform(r.slice(2, 4), m);
18596
+ const p3 = this.applyTransform([r[0], r[3]], m);
18597
+ const p4 = this.applyTransform([r[2], r[1]], m);
18598
18598
  return [Math.min(p1[0], p2[0], p3[0], p4[0]), Math.min(p1[1], p2[1], p3[1], p4[1]), Math.max(p1[0], p2[0], p3[0], p4[0]), Math.max(p1[1], p2[1], p3[1], p4[1])];
18599
18599
  }
18600
- static inverseTransform(m2) {
18601
- const d = m2[0] * m2[3] - m2[1] * m2[2];
18602
- return [m2[3] / d, -m2[1] / d, -m2[2] / d, m2[0] / d, (m2[2] * m2[5] - m2[4] * m2[3]) / d, (m2[4] * m2[1] - m2[5] * m2[0]) / d];
18603
- }
18604
- static singularValueDecompose2dScale(m2) {
18605
- const transpose = [m2[0], m2[2], m2[1], m2[3]];
18606
- const a = m2[0] * transpose[0] + m2[1] * transpose[2];
18607
- const b = m2[0] * transpose[1] + m2[1] * transpose[3];
18608
- const c2 = m2[2] * transpose[0] + m2[3] * transpose[2];
18609
- const d = m2[2] * transpose[1] + m2[3] * transpose[3];
18610
- const first = (a + d) / 2;
18611
- const second = Math.sqrt((a + d) ** 2 - 4 * (a * d - c2 * b)) / 2;
18600
+ static inverseTransform(m) {
18601
+ const d = m[0] * m[3] - m[1] * m[2];
18602
+ return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d, (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d];
18603
+ }
18604
+ static singularValueDecompose2dScale(m) {
18605
+ const transpose = [m[0], m[2], m[1], m[3]];
18606
+ const a2 = m[0] * transpose[0] + m[1] * transpose[2];
18607
+ const b = m[0] * transpose[1] + m[1] * transpose[3];
18608
+ const c2 = m[2] * transpose[0] + m[3] * transpose[2];
18609
+ const d = m[2] * transpose[1] + m[3] * transpose[3];
18610
+ const first = (a2 + d) / 2;
18611
+ const second = Math.sqrt((a2 + d) ** 2 - 4 * (a2 * d - c2 * b)) / 2;
18612
18612
  const sx = first + second || 1;
18613
18613
  const sy = first - second || 1;
18614
18614
  return [Math.sqrt(sx), Math.sqrt(sy)];
@@ -18652,21 +18652,21 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
18652
18652
  minMax[2] = Math.max(minMax[2], x);
18653
18653
  minMax[3] = Math.max(minMax[3], y);
18654
18654
  }
18655
- static #getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, a, b, c2, minMax) {
18656
- if (Math.abs(a) < 1e-12) {
18655
+ static #getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, a2, b, c2, minMax) {
18656
+ if (Math.abs(a2) < 1e-12) {
18657
18657
  if (Math.abs(b) >= 1e-12) {
18658
18658
  this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, -c2 / b, minMax);
18659
18659
  }
18660
18660
  return;
18661
18661
  }
18662
- const delta = b ** 2 - 4 * c2 * a;
18662
+ const delta = b ** 2 - 4 * c2 * a2;
18663
18663
  if (delta < 0) {
18664
18664
  return;
18665
18665
  }
18666
18666
  const sqrtDelta = Math.sqrt(delta);
18667
- const a2 = 2 * a;
18668
- this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b + sqrtDelta) / a2, minMax);
18669
- this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b - sqrtDelta) / a2, minMax);
18667
+ const a22 = 2 * a2;
18668
+ this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b + sqrtDelta) / a22, minMax);
18669
+ this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b - sqrtDelta) / a22, minMax);
18670
18670
  }
18671
18671
  static bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3, minMax) {
18672
18672
  if (minMax) {
@@ -19019,12 +19019,12 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
19019
19019
  const filter = info2.filter = this.#createFilter(id);
19020
19020
  this.#addTransferMapConversion(table, table, table, filter);
19021
19021
  this.#addGrayConversion(filter);
19022
- const getSteps = (c2, n) => {
19022
+ const getSteps = (c2, n2) => {
19023
19023
  const start = fgRGB[c2] / 255;
19024
19024
  const end = bgRGB[c2] / 255;
19025
- const arr = new Array(n + 1);
19026
- for (let i2 = 0; i2 <= n; i2++) {
19027
- arr[i2] = start + i2 / n * (end - start);
19025
+ const arr = new Array(n2 + 1);
19026
+ for (let i2 = 0; i2 <= n2; i2++) {
19027
+ arr[i2] = start + i2 / n2 * (end - start);
19028
19028
  }
19029
19029
  return arr.join(",");
19030
19030
  };
@@ -19110,13 +19110,13 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
19110
19110
  [fgGray, bgGray, newFgRGB, newBgRGB] = [bgGray, fgGray, newBgRGB, newFgRGB];
19111
19111
  }
19112
19112
  this.#defs.style.color = "";
19113
- const getSteps = (fg, bg, n) => {
19113
+ const getSteps = (fg, bg, n2) => {
19114
19114
  const arr = new Array(256);
19115
- const step = (bgGray - fgGray) / n;
19115
+ const step = (bgGray - fgGray) / n2;
19116
19116
  const newStart = fg / 255;
19117
- const newStep = (bg - fg) / (255 * n);
19117
+ const newStep = (bg - fg) / (255 * n2);
19118
19118
  let prev = 0;
19119
- for (let i2 = 0; i2 <= n; i2++) {
19119
+ for (let i2 = 0; i2 <= n2; i2++) {
19120
19120
  const k = Math.round(fgGray + i2 * step);
19121
19121
  const value = newStart + i2 * newStep;
19122
19122
  for (let j = prev; j <= k; j++) {
@@ -19551,25 +19551,25 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
19551
19551
  }
19552
19552
  function getCurrentTransform(ctx2) {
19553
19553
  const {
19554
- a,
19554
+ a: a2,
19555
19555
  b,
19556
19556
  c: c2,
19557
19557
  d,
19558
19558
  e,
19559
19559
  f
19560
19560
  } = ctx2.getTransform();
19561
- return [a, b, c2, d, e, f];
19561
+ return [a2, b, c2, d, e, f];
19562
19562
  }
19563
19563
  function getCurrentTransformInverse(ctx2) {
19564
19564
  const {
19565
- a,
19565
+ a: a2,
19566
19566
  b,
19567
19567
  c: c2,
19568
19568
  d,
19569
19569
  e,
19570
19570
  f
19571
19571
  } = ctx2.getTransform().invertSelf();
19572
- return [a, b, c2, d, e, f];
19572
+ return [a2, b, c2, d, e, f];
19573
19573
  }
19574
19574
  function setLayerDimensions2(div, viewport, mustFlip = false, mustRotate = true) {
19575
19575
  if (viewport instanceof PageViewport) {
@@ -23103,29 +23103,29 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
23103
23103
  switch (cmds[i2++]) {
23104
23104
  case FontRenderOps.BEZIER_CURVE_TO:
23105
23105
  {
23106
- const [a, b, c2, d, e, f] = cmds.slice(i2, i2 + 6);
23107
- commands.push((ctx2) => ctx2.bezierCurveTo(a, b, c2, d, e, f));
23106
+ const [a2, b, c2, d, e, f] = cmds.slice(i2, i2 + 6);
23107
+ commands.push((ctx2) => ctx2.bezierCurveTo(a2, b, c2, d, e, f));
23108
23108
  i2 += 6;
23109
23109
  }
23110
23110
  break;
23111
23111
  case FontRenderOps.MOVE_TO:
23112
23112
  {
23113
- const [a, b] = cmds.slice(i2, i2 + 2);
23114
- commands.push((ctx2) => ctx2.moveTo(a, b));
23113
+ const [a2, b] = cmds.slice(i2, i2 + 2);
23114
+ commands.push((ctx2) => ctx2.moveTo(a2, b));
23115
23115
  i2 += 2;
23116
23116
  }
23117
23117
  break;
23118
23118
  case FontRenderOps.LINE_TO:
23119
23119
  {
23120
- const [a, b] = cmds.slice(i2, i2 + 2);
23121
- commands.push((ctx2) => ctx2.lineTo(a, b));
23120
+ const [a2, b] = cmds.slice(i2, i2 + 2);
23121
+ commands.push((ctx2) => ctx2.lineTo(a2, b));
23122
23122
  i2 += 2;
23123
23123
  }
23124
23124
  break;
23125
23125
  case FontRenderOps.QUADRATIC_CURVE_TO:
23126
23126
  {
23127
- const [a, b, c2, d] = cmds.slice(i2, i2 + 4);
23128
- commands.push((ctx2) => ctx2.quadraticCurveTo(a, b, c2, d));
23127
+ const [a2, b, c2, d] = cmds.slice(i2, i2 + 4);
23128
+ commands.push((ctx2) => ctx2.quadraticCurveTo(a2, b, c2, d));
23129
23129
  i2 += 4;
23130
23130
  }
23131
23131
  break;
@@ -23140,15 +23140,15 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
23140
23140
  break;
23141
23141
  case FontRenderOps.TRANSFORM:
23142
23142
  {
23143
- const [a, b, c2, d, e, f] = cmds.slice(i2, i2 + 6);
23144
- commands.push((ctx2) => ctx2.transform(a, b, c2, d, e, f));
23143
+ const [a2, b, c2, d, e, f] = cmds.slice(i2, i2 + 6);
23144
+ commands.push((ctx2) => ctx2.transform(a2, b, c2, d, e, f));
23145
23145
  i2 += 6;
23146
23146
  }
23147
23147
  break;
23148
23148
  case FontRenderOps.TRANSLATE:
23149
23149
  {
23150
- const [a, b] = cmds.slice(i2, i2 + 2);
23151
- commands.push((ctx2) => ctx2.translate(a, b));
23150
+ const [a2, b] = cmds.slice(i2, i2 + 2);
23151
+ commands.push((ctx2) => ctx2.translate(a2, b));
23152
23152
  i2 += 2;
23153
23153
  }
23154
23154
  break;
@@ -23174,19 +23174,19 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
23174
23174
  ), http = await import(
23175
23175
  /*webpackIgnore: true*/
23176
23176
  "./chunks/index-SKpROzLW.es.js"
23177
- ).then((n) => n.i), https = await import(
23177
+ ).then((n2) => n2.i), https = await import(
23178
23178
  /*webpackIgnore: true*/
23179
23179
  "./chunks/index-BrSjd1Id.es.js"
23180
- ).then((n) => n.i), url = await import(
23180
+ ).then((n2) => n2.i), url = await import(
23181
23181
  /*webpackIgnore: true*/
23182
23182
  "./chunks/url-CAZQTNP3.es.js"
23183
- ).then((n) => n.u);
23183
+ ).then((n2) => n2.u);
23184
23184
  let canvas, path2d;
23185
23185
  try {
23186
23186
  canvas = await import(
23187
23187
  /*webpackIgnore: true*/
23188
23188
  "./chunks/__vite-browser-external-CURh0WXD.es.js"
23189
- ).then((n) => n._);
23189
+ ).then((n2) => n2._);
23190
23190
  } catch {
23191
23191
  }
23192
23192
  try {
@@ -23789,13 +23789,13 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
23789
23789
  destCtx.scale(x, y);
23790
23790
  this.__originalScale(x, y);
23791
23791
  };
23792
- ctx2.transform = function ctxTransform(a, b, c2, d, e, f) {
23793
- destCtx.transform(a, b, c2, d, e, f);
23794
- this.__originalTransform(a, b, c2, d, e, f);
23792
+ ctx2.transform = function ctxTransform(a2, b, c2, d, e, f) {
23793
+ destCtx.transform(a2, b, c2, d, e, f);
23794
+ this.__originalTransform(a2, b, c2, d, e, f);
23795
23795
  };
23796
- ctx2.setTransform = function ctxSetTransform(a, b, c2, d, e, f) {
23797
- destCtx.setTransform(a, b, c2, d, e, f);
23798
- this.__originalSetTransform(a, b, c2, d, e, f);
23796
+ ctx2.setTransform = function ctxSetTransform(a2, b, c2, d, e, f) {
23797
+ destCtx.setTransform(a2, b, c2, d, e, f);
23798
+ this.__originalSetTransform(a2, b, c2, d, e, f);
23799
23799
  };
23800
23800
  ctx2.resetTransform = function ctxResetTransform() {
23801
23801
  destCtx.resetTransform();
@@ -23862,22 +23862,22 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
23862
23862
  }
23863
23863
  }
23864
23864
  function drawImageAtIntegerCoords(ctx2, srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH) {
23865
- const [a, b, c2, d, tx, ty] = getCurrentTransform(ctx2);
23865
+ const [a2, b, c2, d, tx, ty] = getCurrentTransform(ctx2);
23866
23866
  if (b === 0 && c2 === 0) {
23867
- const tlX = destX * a + tx;
23867
+ const tlX = destX * a2 + tx;
23868
23868
  const rTlX = Math.round(tlX);
23869
23869
  const tlY = destY * d + ty;
23870
23870
  const rTlY = Math.round(tlY);
23871
- const brX = (destX + destW) * a + tx;
23871
+ const brX = (destX + destW) * a2 + tx;
23872
23872
  const rWidth = Math.abs(Math.round(brX) - rTlX) || 1;
23873
23873
  const brY = (destY + destH) * d + ty;
23874
23874
  const rHeight = Math.abs(Math.round(brY) - rTlY) || 1;
23875
- ctx2.setTransform(Math.sign(a), 0, 0, Math.sign(d), rTlX, rTlY);
23875
+ ctx2.setTransform(Math.sign(a2), 0, 0, Math.sign(d), rTlX, rTlY);
23876
23876
  ctx2.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rWidth, rHeight);
23877
- ctx2.setTransform(a, b, c2, d, tx, ty);
23877
+ ctx2.setTransform(a2, b, c2, d, tx, ty);
23878
23878
  return [rWidth, rHeight];
23879
23879
  }
23880
- if (a === 0 && d === 0) {
23880
+ if (a2 === 0 && d === 0) {
23881
23881
  const tlX = destY * c2 + tx;
23882
23882
  const rTlX = Math.round(tlX);
23883
23883
  const tlY = destX * b + ty;
@@ -23888,11 +23888,11 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
23888
23888
  const rHeight = Math.abs(Math.round(brY) - rTlY) || 1;
23889
23889
  ctx2.setTransform(0, Math.sign(b), Math.sign(c2), 0, rTlX, rTlY);
23890
23890
  ctx2.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rHeight, rWidth);
23891
- ctx2.setTransform(a, b, c2, d, tx, ty);
23891
+ ctx2.setTransform(a2, b, c2, d, tx, ty);
23892
23892
  return [rHeight, rWidth];
23893
23893
  }
23894
23894
  ctx2.drawImage(srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH);
23895
- const scaleX = Math.hypot(a, b);
23895
+ const scaleX = Math.hypot(a2, b);
23896
23896
  const scaleY = Math.hypot(c2, d);
23897
23897
  return [scaleX * destW, scaleY * destH];
23898
23898
  }
@@ -24777,8 +24777,8 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
24777
24777
  this._cachedGetSinglePixelWidth = null;
24778
24778
  }
24779
24779
  }
24780
- transform(a, b, c2, d, e, f) {
24781
- this.ctx.transform(a, b, c2, d, e, f);
24780
+ transform(a2, b, c2, d, e, f) {
24781
+ this.ctx.transform(a2, b, c2, d, e, f);
24782
24782
  this._cachedScaleForStroking[0] = -1;
24783
24783
  this._cachedGetSinglePixelWidth = null;
24784
24784
  }
@@ -25038,9 +25038,9 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
25038
25038
  this.setLeading(-y);
25039
25039
  this.moveText(x, y);
25040
25040
  }
25041
- setTextMatrix(a, b, c2, d, e, f) {
25042
- this.current.textMatrix = [a, b, c2, d, e, f];
25043
- this.current.textMatrixScale = Math.hypot(a, b);
25041
+ setTextMatrix(a2, b, c2, d, e, f) {
25042
+ this.current.textMatrix = [a2, b, c2, d, e, f];
25043
+ this.current.textMatrixScale = Math.hypot(a2, b);
25044
25044
  this.current.x = this.current.lineX = 0;
25045
25045
  this.current.y = this.current.lineY = 0;
25046
25046
  }
@@ -25795,13 +25795,13 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
25795
25795
  }
25796
25796
  getSinglePixelWidth() {
25797
25797
  if (!this._cachedGetSinglePixelWidth) {
25798
- const m2 = getCurrentTransform(this.ctx);
25799
- if (m2[1] === 0 && m2[2] === 0) {
25800
- this._cachedGetSinglePixelWidth = 1 / Math.min(Math.abs(m2[0]), Math.abs(m2[3]));
25798
+ const m = getCurrentTransform(this.ctx);
25799
+ if (m[1] === 0 && m[2] === 0) {
25800
+ this._cachedGetSinglePixelWidth = 1 / Math.min(Math.abs(m[0]), Math.abs(m[3]));
25801
25801
  } else {
25802
- const absDet = Math.abs(m2[0] * m2[3] - m2[2] * m2[1]);
25803
- const normX = Math.hypot(m2[0], m2[2]);
25804
- const normY = Math.hypot(m2[1], m2[3]);
25802
+ const absDet = Math.abs(m[0] * m[3] - m[2] * m[1]);
25803
+ const normX = Math.hypot(m[0], m[2]);
25804
+ const normY = Math.hypot(m[1], m[3]);
25805
25805
  this._cachedGetSinglePixelWidth = Math.max(normX, normY) / absDet;
25806
25806
  }
25807
25807
  }
@@ -25813,14 +25813,14 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
25813
25813
  lineWidth
25814
25814
  } = this.current;
25815
25815
  const {
25816
- a,
25816
+ a: a2,
25817
25817
  b,
25818
25818
  c: c2,
25819
25819
  d
25820
25820
  } = this.ctx.getTransform();
25821
25821
  let scaleX, scaleY;
25822
25822
  if (b === 0 && c2 === 0) {
25823
- const normX = Math.abs(a);
25823
+ const normX = Math.abs(a2);
25824
25824
  const normY = Math.abs(d);
25825
25825
  if (normX === normY) {
25826
25826
  if (lineWidth === 0) {
@@ -25839,8 +25839,8 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
25839
25839
  scaleY = scaledYLineWidth < 1 ? 1 / scaledYLineWidth : 1;
25840
25840
  }
25841
25841
  } else {
25842
- const absDet = Math.abs(a * d - b * c2);
25843
- const normX = Math.hypot(a, b);
25842
+ const absDet = Math.abs(a2 * d - b * c2);
25843
+ const normX = Math.hypot(a2, b);
25844
25844
  const normY = Math.hypot(c2, d);
25845
25845
  if (lineWidth === 0) {
25846
25846
  scaleX = normY / absDet;
@@ -26899,26 +26899,26 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
26899
26899
  let match2;
26900
26900
  const iter = toParamRegExp("filename\\*((?!0\\d)\\d+)(\\*?)", "ig");
26901
26901
  while ((match2 = iter.exec(contentDispositionStr)) !== null) {
26902
- let [, n, quot, part] = match2;
26903
- n = parseInt(n, 10);
26904
- if (n in matches) {
26905
- if (n === 0) {
26902
+ let [, n2, quot, part] = match2;
26903
+ n2 = parseInt(n2, 10);
26904
+ if (n2 in matches) {
26905
+ if (n2 === 0) {
26906
26906
  break;
26907
26907
  }
26908
26908
  continue;
26909
26909
  }
26910
- matches[n] = [quot, part];
26910
+ matches[n2] = [quot, part];
26911
26911
  }
26912
26912
  const parts = [];
26913
- for (let n = 0; n < matches.length; ++n) {
26914
- if (!(n in matches)) {
26913
+ for (let n2 = 0; n2 < matches.length; ++n2) {
26914
+ if (!(n2 in matches)) {
26915
26915
  break;
26916
26916
  }
26917
- let [quot, part] = matches[n];
26917
+ let [quot, part] = matches[n2];
26918
26918
  part = rfc2616unquote(part);
26919
26919
  if (quot) {
26920
26920
  part = unescape(part);
26921
- if (n === 0) {
26921
+ if (n2 === 0) {
26922
26922
  part = rfc5987decode(part);
26923
26923
  }
26924
26924
  }
@@ -30249,15 +30249,15 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
30249
30249
  const version2 = "4.3.136";
30250
30250
  const build2 = "0cec64437";
30251
30251
  __webpack_require__$1(670);
30252
- function makeColorComp(n) {
30253
- return Math.floor(Math.max(0, Math.min(1, n)) * 255).toString(16).padStart(2, "0");
30252
+ function makeColorComp(n2) {
30253
+ return Math.floor(Math.max(0, Math.min(1, n2)) * 255).toString(16).padStart(2, "0");
30254
30254
  }
30255
30255
  function scaleAndClamp(x) {
30256
30256
  return Math.max(0, Math.min(255, 255 * x));
30257
30257
  }
30258
30258
  class ColorConverters {
30259
- static CMYK_G([c2, y, m2, k]) {
30260
- return ["G", 1 - Math.min(1, 0.3 * c2 + 0.59 * m2 + 0.11 * y + k)];
30259
+ static CMYK_G([c2, y, m, k]) {
30260
+ return ["G", 1 - Math.min(1, 0.3 * c2 + 0.59 * m + 0.11 * y + k)];
30261
30261
  }
30262
30262
  static G_CMYK([g]) {
30263
30263
  return ["CMYK", 0, 0, 0, 1 - g];
@@ -30288,11 +30288,11 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
30288
30288
  static T_rgb() {
30289
30289
  return [null];
30290
30290
  }
30291
- static CMYK_RGB([c2, y, m2, k]) {
30292
- return ["RGB", 1 - Math.min(1, c2 + k), 1 - Math.min(1, m2 + k), 1 - Math.min(1, y + k)];
30291
+ static CMYK_RGB([c2, y, m, k]) {
30292
+ return ["RGB", 1 - Math.min(1, c2 + k), 1 - Math.min(1, m + k), 1 - Math.min(1, y + k)];
30293
30293
  }
30294
- static CMYK_rgb([c2, y, m2, k]) {
30295
- return [scaleAndClamp(1 - Math.min(1, c2 + k)), scaleAndClamp(1 - Math.min(1, m2 + k)), scaleAndClamp(1 - Math.min(1, y + k))];
30294
+ static CMYK_rgb([c2, y, m, k]) {
30295
+ return [scaleAndClamp(1 - Math.min(1, c2 + k)), scaleAndClamp(1 - Math.min(1, m + k)), scaleAndClamp(1 - Math.min(1, y + k))];
30296
30296
  }
30297
30297
  static CMYK_HTML(components) {
30298
30298
  const rgb = this.CMYK_RGB(components).slice(1);
@@ -30300,10 +30300,10 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
30300
30300
  }
30301
30301
  static RGB_CMYK([r, g, b]) {
30302
30302
  const c2 = 1 - r;
30303
- const m2 = 1 - g;
30303
+ const m = 1 - g;
30304
30304
  const y = 1 - b;
30305
- const k = Math.min(c2, m2, y);
30306
- return ["CMYK", c2, m2, y, k];
30305
+ const k = Math.min(c2, m, y);
30306
+ return ["CMYK", c2, m, y, k];
30307
30307
  }
30308
30308
  }
30309
30309
  class XfaLayer2 {
@@ -33703,7 +33703,7 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
33703
33703
  };
33704
33704
  }
33705
33705
  getOutlines() {
33706
- this.#verticalEdges.sort((a, b) => a[0] - b[0] || a[1] - b[1] || a[2] - b[2]);
33706
+ this.#verticalEdges.sort((a2, b) => a2[0] - b[0] || a2[1] - b[1] || a2[2] - b[2]);
33707
33707
  const outlineVerticalEdges = [];
33708
33708
  for (const edge of this.#verticalEdges) {
33709
33709
  if (edge[3]) {
@@ -33723,7 +33723,7 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
33723
33723
  const [x, y1, y2] = edge;
33724
33724
  edges.push([x, y1, edge], [x, y2, edge]);
33725
33725
  }
33726
- edges.sort((a, b) => a[1] - b[1] || a[0] - b[0]);
33726
+ edges.sort((a2, b) => a2[1] - b[1] || a2[0] - b[0]);
33727
33727
  for (let i2 = 0, ii = edges.length; i2 < ii; i2 += 2) {
33728
33728
  const edge1 = edges[i2][2];
33729
33729
  const edge2 = edges[i2 + 1][2];
@@ -37309,7 +37309,7 @@ function removeNullCharacters(str, replaceInvisible = false) {
37309
37309
  return str;
37310
37310
  }
37311
37311
  if (replaceInvisible) {
37312
- return str.replaceAll(InvisibleCharsRegExp, (m2) => m2 === "\0" ? "" : " ");
37312
+ return str.replaceAll(InvisibleCharsRegExp, (m) => m === "\0" ? "" : " ");
37313
37313
  }
37314
37314
  return str.replaceAll("\0", "");
37315
37315
  }
@@ -37345,9 +37345,9 @@ function approximateFraction(x) {
37345
37345
  return [1, xinv];
37346
37346
  }
37347
37347
  const x_ = x > 1 ? xinv : x;
37348
- let a = 0, b = 1, c2 = 1, d = 1;
37348
+ let a2 = 0, b = 1, c2 = 1, d = 1;
37349
37349
  while (true) {
37350
- const p = a + c2, q = b + d;
37350
+ const p = a2 + c2, q = b + d;
37351
37351
  if (q > limit) {
37352
37352
  break;
37353
37353
  }
@@ -37355,13 +37355,13 @@ function approximateFraction(x) {
37355
37355
  c2 = p;
37356
37356
  d = q;
37357
37357
  } else {
37358
- a = p;
37358
+ a2 = p;
37359
37359
  b = q;
37360
37360
  }
37361
37361
  }
37362
37362
  let result;
37363
- if (x_ - a / b < c2 / d - x_) {
37364
- result = x_ === x ? [a, b] : [b, a];
37363
+ if (x_ - a2 / b < c2 / d - x_) {
37364
+ result = x_ === x ? [a2, b] : [b, a2];
37365
37365
  } else {
37366
37366
  result = x_ === x ? [c2, d] : [d, c2];
37367
37367
  }
@@ -37449,12 +37449,12 @@ function getVisibleElements({
37449
37449
  }
37450
37450
  const first = visible[0], last = visible.at(-1);
37451
37451
  if (sortByVisibility) {
37452
- visible.sort(function(a, b) {
37453
- const pc = a.percent - b.percent;
37452
+ visible.sort(function(a2, b) {
37453
+ const pc = a2.percent - b.percent;
37454
37454
  if (Math.abs(pc) > 1e-3) {
37455
37455
  return -pc;
37456
37456
  }
37457
- return a.id - b.id;
37457
+ return a2.id - b.id;
37458
37458
  });
37459
37459
  }
37460
37460
  return {
@@ -37676,12 +37676,12 @@ let noSyllablesRegExp = null;
37676
37676
  let withSyllablesRegExp = null;
37677
37677
  function normalize(text) {
37678
37678
  const syllablePositions = [];
37679
- let m2;
37680
- while ((m2 = SYLLABLES_REG_EXP.exec(text)) !== null) {
37679
+ let m;
37680
+ while ((m = SYLLABLES_REG_EXP.exec(text)) !== null) {
37681
37681
  let {
37682
37682
  index: index2
37683
- } = m2;
37684
- for (const char of m2[0]) {
37683
+ } = m;
37684
+ for (const char of m[0]) {
37685
37685
  let len = SYLLABLES_LENGTHS.get(char);
37686
37686
  if (!len) {
37687
37687
  len = char.normalize("NFD").length;
@@ -37708,8 +37708,8 @@ function normalize(text) {
37708
37708
  }
37709
37709
  }
37710
37710
  const rawDiacriticsPositions = [];
37711
- while ((m2 = DIACRITICS_REG_EXP.exec(text)) !== null) {
37712
- rawDiacriticsPositions.push([m2[0].length, m2.index]);
37711
+ while ((m = DIACRITICS_REG_EXP.exec(text)) !== null) {
37712
+ rawDiacriticsPositions.push([m[0].length, m.index]);
37713
37713
  }
37714
37714
  let normalized = text.normalize("NFD");
37715
37715
  const positions = [[0, 0]];
@@ -38868,18 +38868,18 @@ class AnnotationLayerBuilder {
38868
38868
  }
38869
38869
  }
38870
38870
  function download(blobUrl, filename) {
38871
- const a = document.createElement("a");
38872
- if (!a.click) {
38871
+ const a2 = document.createElement("a");
38872
+ if (!a2.click) {
38873
38873
  throw new Error('DownloadManager: "a.click()" is not supported.');
38874
38874
  }
38875
- a.href = blobUrl;
38876
- a.target = "_parent";
38877
- if ("download" in a) {
38878
- a.download = filename;
38875
+ a2.href = blobUrl;
38876
+ a2.target = "_parent";
38877
+ if ("download" in a2) {
38878
+ a2.download = filename;
38879
38879
  }
38880
- (document.body || document.documentElement).append(a);
38881
- a.click();
38882
- a.remove();
38880
+ (document.body || document.documentElement).append(a2);
38881
+ a2.click();
38882
+ a2.remove();
38883
38883
  }
38884
38884
  class DownloadManager {
38885
38885
  #openBlobUrls = /* @__PURE__ */ new WeakMap();
@@ -41629,8 +41629,8 @@ class TextHighlighter {
41629
41629
  let i2 = 0, iIndex = 0;
41630
41630
  const end = textContentItemsStr.length - 1;
41631
41631
  const result = [];
41632
- for (let m2 = 0, mm = matches.length; m2 < mm; m2++) {
41633
- let matchIdx = matches[m2];
41632
+ for (let m = 0, mm = matches.length; m < mm; m++) {
41633
+ let matchIdx = matches[m];
41634
41634
  while (i2 !== end && matchIdx >= iIndex + textContentItemsStr[i2].length) {
41635
41635
  iIndex += textContentItemsStr[i2].length;
41636
41636
  i2++;
@@ -41644,7 +41644,7 @@ class TextHighlighter {
41644
41644
  offset: matchIdx - iIndex
41645
41645
  }
41646
41646
  };
41647
- matchIdx += matchesLength[m2];
41647
+ matchIdx += matchesLength[m];
41648
41648
  while (i2 !== end && matchIdx > iIndex + textContentItemsStr[i2].length) {
41649
41649
  iIndex += textContentItemsStr[i2].length;
41650
41650
  i2++;
@@ -41770,9 +41770,9 @@ class TextHighlighter {
41770
41770
  let clearedUntilDivIdx = -1;
41771
41771
  for (const match2 of matches) {
41772
41772
  const begin = Math.max(clearedUntilDivIdx, match2.begin.divIdx);
41773
- for (let n = begin, end = match2.end.divIdx; n <= end; n++) {
41774
- const div = textDivs[n];
41775
- div.textContent = textContentItemsStr[n];
41773
+ for (let n2 = begin, end = match2.end.divIdx; n2 <= end; n2++) {
41774
+ const div = textDivs[n2];
41775
+ div.textContent = textContentItemsStr[n2];
41776
41776
  div.className = "";
41777
41777
  }
41778
41778
  clearedUntilDivIdx = match2.end.divIdx + 1;
@@ -45239,7 +45239,7 @@ const _sfc_main$9 = {
45239
45239
  };
45240
45240
  const processLocations = async () => {
45241
45241
  let currentBottom = 0;
45242
- renderedSizes.value.sort((a, b) => a.top - b.top).forEach((comment) => {
45242
+ renderedSizes.value.sort((a2, b) => a2.top - b.top).forEach((comment) => {
45243
45243
  if (comment.top <= currentBottom + 15) {
45244
45244
  comment.top = currentBottom + 15;
45245
45245
  }
@@ -46473,10 +46473,10 @@ const createSuperdocVueApp = () => {
46473
46473
  };
46474
46474
  const createDownload = (blob, name, extension) => {
46475
46475
  const url = URL.createObjectURL(blob);
46476
- const a = document.createElement("a");
46477
- a.href = url;
46478
- a.download = `${name}.${extension}`;
46479
- a.click();
46476
+ const a2 = document.createElement("a");
46477
+ a2.href = url;
46478
+ a2.download = `${name}.${extension}`;
46479
+ a2.click();
46480
46480
  };
46481
46481
  const cleanName = (currentName) => {
46482
46482
  if (currentName.toLowerCase().endsWith(".docx") || currentName.toLowerCase().endsWith(".pdf")) {
@@ -46559,7 +46559,7 @@ class SuperDoc extends EventEmitter {
46559
46559
  this.config.colors = shuffleArray(this.config.colors);
46560
46560
  this.userColorMap = /* @__PURE__ */ new Map();
46561
46561
  this.colorIndex = 0;
46562
- this.version = "0.12.28";
46562
+ this.version = "0.12.30-rev.1";
46563
46563
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
46564
46564
  this.superdocId = config.superdocId || v4();
46565
46565
  this.colors = this.config.colors;
@@ -47117,6 +47117,7 @@ class SuperDoc extends EventEmitter {
47117
47117
  }
47118
47118
  }
47119
47119
  export {
47120
+ a as AnnotatorHelpers,
47120
47121
  BlankDOCX,
47121
47122
  DOCX,
47122
47123
  Editor,
@@ -47129,6 +47130,6 @@ export {
47129
47130
  i as fieldAnnotationHelpers,
47130
47131
  getFileObject,
47131
47132
  getRichTextExtensions,
47132
- m as superEditorHelpers,
47133
+ n as superEditorHelpers,
47133
47134
  index$1 as trackChangesHelpers
47134
47135
  };