@cling-se/widget 0.14.4 → 0.14.5

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 (134) hide show
  1. package/.eslintrc.cjs +4 -4
  2. package/README.md +40 -40
  3. package/dist/AddClientCallout-BMc-v9rJ.js +46 -0
  4. package/dist/AnswerModal-Cu0Ke5pl.js +3874 -0
  5. package/dist/AttachmentItem-Co8pVvtv.js +78 -0
  6. package/dist/BaseDatePicker-P5iq-XAp.js +3183 -0
  7. package/dist/BaseUpload-BDWnWTxr.js +1977 -0
  8. package/dist/BlockMedia-B_UiePCr.js +76 -0
  9. package/dist/CCallout-Bbp9ya9n.js +59 -0
  10. package/dist/CCurrencyDropdown-Cw39vJWw.js +246 -0
  11. package/dist/CDropdownItem-BjYnhZJr.js +538 -0
  12. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +1 -0
  13. package/dist/CFormField-CeJ58aN2.js +241 -0
  14. package/dist/CPhoneFormat-BZnmeEeW.js +62 -0
  15. package/dist/CPriceInput-B07d19qq.js +112 -0
  16. package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +1 -0
  17. package/dist/ClientAutocomplete-9iM1pR9l.js +78 -0
  18. package/dist/ClientModal-fw8f6UvL.js +625 -0
  19. package/dist/ColorPicker-uu6vKe8o.js +2879 -0
  20. package/dist/CompanyModal-5t4yhKL4.js +141 -0
  21. package/dist/ContentWrapper-DwcOQ21l.js +183 -0
  22. package/dist/CoverBlockSettings-cCCXzAZ0.js +275 -0
  23. package/dist/DocAnswer-9lbgqHRX.js +36 -0
  24. package/dist/DocDetails-CoLL_tHs.js +246 -0
  25. package/dist/DocForm-DUjcuHJe.js +7273 -0
  26. package/dist/DocFormSend-LawcXcM2.js +143 -0
  27. package/dist/DocLinks-pJT9HpjR.js +38 -0
  28. package/dist/DocModalBase-xUoskL63.js +28 -0
  29. package/dist/DocPrint-ClEJBiAg.js +240 -0
  30. package/dist/DocReceipt-x_YsXPnG.js +210 -0
  31. package/dist/DocSendReminder-Dbz8CkAz.js +137 -0
  32. package/dist/DocTextEditor-AqBE7jZj.js +17181 -0
  33. package/dist/DocTimeline-hq2asPzr.js +481 -0
  34. package/dist/DocumentClient-TmtHqfiw.js +136 -0
  35. package/dist/DocumentLayout-CRAp8mfk.js +4909 -0
  36. package/dist/DocumentLogotype-emSjQ21f.js +87 -0
  37. package/dist/DocumentVoided-BOjiWBK6.js +25 -0
  38. package/dist/EmbedInput-B3LFGEee.js +113 -0
  39. package/dist/EmbedSettings-BYPJTGQf.js +72 -0
  40. package/dist/ErrorCallout-CwgYHBkg.js +28 -0
  41. package/dist/FilePreviewModal-81sSrDGg.js +81 -0
  42. package/dist/Flag-DGFvUTQZ.js +114 -0
  43. package/dist/HeaderSettings-BGpkzcbj.js +392 -0
  44. package/dist/ImageSelectModal-Cimviyuy.js +84 -0
  45. package/dist/ImageUploadWrapper-qJDHCf8T.js +1604 -0
  46. package/dist/Index-18w_qMQH.js +25 -0
  47. package/dist/Index-9_R8_myc.js +77 -0
  48. package/dist/Index-BKoXW7GK.js +84 -0
  49. package/dist/Index-BL3-tRGt.js +642 -0
  50. package/dist/Index-BNfAA-ZJ.js +154 -0
  51. package/dist/Index-BOxSvAug.js +144 -0
  52. package/dist/Index-BQgW1jlH.js +45 -0
  53. package/dist/Index-BXAqgXVi.js +150 -0
  54. package/dist/Index-BgK_WC0d.js +140 -0
  55. package/dist/Index-BkUzlQaQ.js +107 -0
  56. package/dist/Index-BpyYa9LR.js +171 -0
  57. package/dist/Index-ByzGXUoc.js +292 -0
  58. package/dist/Index-C1lsSfnX.js +52 -0
  59. package/dist/Index-C9sq_RDg.js +223 -0
  60. package/dist/Index-CDEh3GAi.js +26 -0
  61. package/dist/Index-CEG-Hiv6.js +69 -0
  62. package/dist/Index-CMUg61_b.js +33 -0
  63. package/dist/Index-CObGPoQv.js +62 -0
  64. package/dist/Index-CPNUsaOS.js +57 -0
  65. package/dist/Index-CegW1Rim.js +98 -0
  66. package/dist/Index-CoSt-Bws.js +31 -0
  67. package/dist/Index-CpDgldnz.js +70 -0
  68. package/dist/Index-CqImx-rG.js +55 -0
  69. package/dist/Index-CrOD4_xj.js +58 -0
  70. package/dist/Index-DBCNVVm5.js +24 -0
  71. package/dist/Index-DGG1S8uJ.js +559 -0
  72. package/dist/Index-DRWS2z82.js +2402 -0
  73. package/dist/Index-DXRgZZNj.js +61 -0
  74. package/dist/Index-DY5gAUnE.js +754 -0
  75. package/dist/Index-Dr7mVlBb.js +49 -0
  76. package/dist/Index-Dx944wv-.js +21 -0
  77. package/dist/Index-Eq3JlTKK.js +46 -0
  78. package/dist/Index-Sr3emNkE.js +25 -0
  79. package/dist/Index-VshOfaom.js +32 -0
  80. package/dist/InputToggleRow-CQsaayf-.js +57 -0
  81. package/dist/ManualPopover-CFXm5cQy.js +58 -0
  82. package/dist/MediaWrapper-Cn0Yr4ce.js +23 -0
  83. package/dist/NotBindingText-CNiszGqn.js +32 -0
  84. package/dist/PackageGroup-BVys9ouj.js +699 -0
  85. package/dist/PdfTerms-Bbns-jMY.js +36 -0
  86. package/dist/PdfViewer-B1zzZU4Y.js +374 -0
  87. package/dist/PlainHtml-CARRbTxi.js +20 -0
  88. package/dist/PriceHeader-CqeC9Lhb.js +339 -0
  89. package/dist/SearchApi-bB9FLxUq.js +161 -0
  90. package/dist/Setup-p3Du_uf8.js +50 -0
  91. package/dist/SmartList-P5ZfTWBb.js +83 -0
  92. package/dist/TermsSettings-CQ8TGwBV.js +102 -0
  93. package/dist/ThemeColorRow-DMWVlFRU.js +67 -0
  94. package/dist/ToggleBinding-BPaYWgqP.js +38 -0
  95. package/dist/UploadModal-9O4HTVZm.js +95 -0
  96. package/dist/VideoPlayerInput-5KybfY7N.js +93 -0
  97. package/dist/VideoPlayerSettings-xSW8tcTZ.js +61 -0
  98. package/dist/VideoSelectModal-BbaNAxGH.js +100 -0
  99. package/dist/anime.es-BrPTThYb.js +858 -0
  100. package/dist/answerDocumentMixin-S-Bmv15G.js +51 -0
  101. package/dist/color-TdtKxwVa.js +19 -0
  102. package/dist/debounce-B_0g8OVh.js +84 -0
  103. package/dist/dom-CJxkno7i.js +91 -0
  104. package/dist/favicon.ico +0 -0
  105. package/dist/focusDrawerMixin-DhsqWZUo.js +22 -0
  106. package/dist/formComponentsInstall-UG7a9vjZ.js +2499 -0
  107. package/dist/formDrawerState-BMQrWaBt.js +20 -0
  108. package/dist/formValidationMixin-DUu0omWT.js +49 -0
  109. package/dist/i18nMessages-Chz_lxGG.js +17 -0
  110. package/dist/index-B3R_uKML.js +347 -0
  111. package/dist/index-B4aiQXsr.js +166 -0
  112. package/dist/index-C50JSDKO.js +3916 -0
  113. package/dist/index-CJ9AvuZH.js +102 -0
  114. package/dist/index-Czyda2Ej.js +492 -0
  115. package/dist/index-myOYAnwV.js +81 -0
  116. package/dist/index.es.js +35 -0
  117. package/dist/index.umd.js +3148 -0
  118. package/dist/main-B9t0ybqW.js +56739 -0
  119. package/dist/mapFormMixin-ETYhBLl2.js +72 -0
  120. package/dist/omit-DtTfKAed.js +31 -0
  121. package/dist/publicSenderState-DD1lN9CR.js +21 -0
  122. package/dist/splitpanes-BHUVsCZF.js +382 -0
  123. package/dist/style.css +4 -0
  124. package/dist/throttle-qziKkJJX.js +18 -0
  125. package/dist/tinycolor-CMC8Xp7x.js +633 -0
  126. package/dist/tippy.esm-DjbYjfS2.js +1799 -0
  127. package/dist/utils-C5Rg0fQC.js +108 -0
  128. package/dist/vuedraggable.umd-CE3WmaEQ.js +3161 -0
  129. package/dist/vuex.esm-DKGl8mcw.js +467 -0
  130. package/package.json +1 -1
  131. package/tsconfig.json +26 -26
  132. package/tsconfig.node.json +10 -10
  133. package/tsconfig.paths.json +17 -17
  134. package/vite.config.ts +61 -61
@@ -0,0 +1,36 @@
1
+ import { V as s } from "./PdfViewer-B1zzZU4Y.js";
2
+ import { n as t } from "./main-B9t0ybqW.js";
3
+ const n = {
4
+ name: "PdfTerms",
5
+ functional: !0,
6
+ render(r, e) {
7
+ return e.props.text ? r("div", {
8
+ class: "root"
9
+ }, [r("div", {
10
+ class: "root-title page-break"
11
+ }, [e.parent.$t("_common:terms.general")]), r("div", {
12
+ class: "term-text quill-format",
13
+ domProps: {
14
+ innerHTML: e.props.text
15
+ }
16
+ })]) : e.props.file ? r("div", [r(s, {
17
+ attrs: {
18
+ src: e.props.file.url,
19
+ docFilePath: "data.terms.file.url"
20
+ },
21
+ class: "pdf-container"
22
+ })]) : r("div");
23
+ }
24
+ }, o = null, a = null;
25
+ var l = /* @__PURE__ */ t(
26
+ n,
27
+ o,
28
+ a,
29
+ !1,
30
+ null,
31
+ "d1cc4fe9"
32
+ );
33
+ const m = l.exports;
34
+ export {
35
+ m as default
36
+ };
@@ -0,0 +1,374 @@
1
+ import { n as d, c as n, O as g } from "./main-B9t0ybqW.js";
2
+ import { e as l } from "./dom-CJxkno7i.js";
3
+ import { W as m } from "./DocumentLayout-CRAp8mfk.js";
4
+ import { w as h } from "./CDropdownItem-BjYnhZJr.js";
5
+ let c, u, p, f;
6
+ function w(a) {
7
+ return typeof a == "object" && a !== null && a.__PDFDocumentLoadingTask === !0;
8
+ }
9
+ const b = {
10
+ name: "PdfPage",
11
+ components: {
12
+ WithDimensions: m
13
+ },
14
+ props: {
15
+ src: {
16
+ type: [String, Object, Promise],
17
+ default: ""
18
+ },
19
+ page: {
20
+ type: Number,
21
+ default: 1
22
+ },
23
+ rotate: {
24
+ type: Number,
25
+ default: 0
26
+ },
27
+ scale: {
28
+ type: [Number, String],
29
+ default: "page-width"
30
+ },
31
+ resize: {
32
+ type: Boolean,
33
+ default: !0
34
+ },
35
+ annotation: {
36
+ type: Boolean,
37
+ default: !0
38
+ },
39
+ text: {
40
+ type: Boolean,
41
+ default: !0
42
+ },
43
+ pdfLoadingTask: {
44
+ type: Promise,
45
+ required: !0
46
+ },
47
+ containerClass: {
48
+ type: [Array, String],
49
+ default: ""
50
+ }
51
+ },
52
+ data() {
53
+ return {
54
+ internalSrc: this.src,
55
+ pdf: null,
56
+ pdfViewer: null,
57
+ loading: !0
58
+ };
59
+ },
60
+ watch: {
61
+ pdf(a) {
62
+ const e = a.pdfInfo || a._pdfInfo;
63
+ this.$emit("numpages", e.numPages);
64
+ },
65
+ page(a) {
66
+ this.pdf.getPage(a).then((e) => {
67
+ this.pdfViewer.setPdfPage(e), this.pdfViewer.draw();
68
+ });
69
+ },
70
+ scale(a) {
71
+ this.drawScaled(a);
72
+ },
73
+ rotate(a) {
74
+ this.pdfViewer && (this.pdfViewer.update({ scale: this.scale, rotation: a }), this.pdfViewer.draw());
75
+ }
76
+ },
77
+ mounted() {
78
+ c = window.pdfjsViewer.PDFFindController, u = window.pdfjsViewer.PDFLinkService, p = window.pdfjsViewer.PDFPageView, f = window.pdfjsViewer.EventBus, this.init();
79
+ },
80
+ beforeDestroy() {
81
+ this.pdfViewer && (this.pdfViewer.destroy(), this.pdfViewer = null);
82
+ },
83
+ methods: {
84
+ init() {
85
+ w(this.internalSrc) || (this.internalSrc = this.pdfLoadingTask, this.$emit("loading", !0));
86
+ const a = this.$refs.container, e = new f();
87
+ e.on("pagerendered", (t) => {
88
+ this.$emit("pagerendered", t);
89
+ }), this.pdfLinkService = new u({
90
+ eventBus: e,
91
+ externalLinkTarget: 2
92
+ }), this.pdfFindController = new c({
93
+ eventBus: e,
94
+ linkService: this.pdfLinkService
95
+ }), this.internalSrc.then((t) => (this.pdf = t, t.getPage(this.page))).then((t) => {
96
+ this.pdfViewer = new p({
97
+ container: a,
98
+ id: this.page,
99
+ scale: 1,
100
+ defaultViewport: t.getViewport({
101
+ scale: 1
102
+ }),
103
+ eventBus: e,
104
+ textLayerMode: this.text ? 1 : 0,
105
+ // DISABLE: 0, ENABLE: 1
106
+ annotationMode: this.annotation ? 1 : 0
107
+ // DISABLE: 0, ENABLE: 1, ENABLE_FORMS: 2, ENABLE_STORAGE: 3
108
+ }), this.pdfViewer.setPdfPage(t);
109
+ const s = {
110
+ scrollPageIntoView: (i) => {
111
+ this.$emit("link-clicked", i);
112
+ }
113
+ };
114
+ return this.pdfLinkService.setDocument(this.pdf), this.pdfLinkService.setViewer(s), this.pdfFindController.setDocument(this.pdf), this.drawScaled(this.scale);
115
+ }).catch((t) => {
116
+ this.$emit("error", t), this.loading = !1, this.$emit("loading", !1);
117
+ });
118
+ },
119
+ calculateScale(a = -1, e = -1) {
120
+ return this.pdfViewer.update({ scale: 1, rotation: this.rotate }), a === -1 && e === -1 && (a = this.$refs.container.offsetWidth), a / this.pdfViewer.viewport.width;
121
+ },
122
+ calculateScaleHeight() {
123
+ this.pdfViewer.update({ scale: 1, rotation: this.rotate });
124
+ var a = this.$refs.container.offsetHeight, e = this.$refs.container.parentElement.parentElement;
125
+ return e.offsetHeight / a;
126
+ },
127
+ async drawScaled(a) {
128
+ this.pdfViewer && (a === "page-width" ? (a = this.calculateScale(), this.$emit("update:scale", a)) : a === "page-height" && (a = this.calculateScaleHeight(), this.$emit("update:scale", a)), this.pdfViewer.update({ scale: a, rotation: this.rotate }), await this.pdfViewer.draw(), this.loading = !1, this.$emit("loading", !1));
129
+ },
130
+ resizeScale() {
131
+ this.resize && this.drawScaled("page-width");
132
+ }
133
+ }
134
+ };
135
+ var v = function() {
136
+ var e = this, t = e._self._c;
137
+ return t("div", [e.loading ? e._t("loading") : e._e(), t("div", { ref: "container", staticClass: "pdfViewer tracking-normal", class: e.containerClass }), t("WithDimensions", { on: { resize: e.resizeScale } }, [t("div", { staticClass: "w-full" })])], 2);
138
+ }, y = [], P = /* @__PURE__ */ d(
139
+ b,
140
+ v,
141
+ y,
142
+ !1,
143
+ null,
144
+ null
145
+ );
146
+ const _ = P.exports, k = {
147
+ name: "PDFToolbar",
148
+ mixins: [h],
149
+ props: {
150
+ currentPage: {
151
+ type: Number,
152
+ default: 0
153
+ },
154
+ numPages: {
155
+ type: Number,
156
+ default: 0
157
+ },
158
+ scale: {
159
+ type: [Number, String],
160
+ default: "page-width"
161
+ },
162
+ autoZoom: {
163
+ type: Boolean,
164
+ default: !0
165
+ }
166
+ },
167
+ data() {
168
+ return {
169
+ compactExpand: !1
170
+ };
171
+ },
172
+ computed: {
173
+ formattedZoom() {
174
+ return this.autoZoom ? "Auto" : Number.parseInt(this.scale * 100) + "%";
175
+ }
176
+ },
177
+ methods: {
178
+ updateZoom(a) {
179
+ this.$emit("update:scale", a), this.$emit("update:auto-zoom", a === "page-width");
180
+ },
181
+ onManualZoom(a) {
182
+ var i;
183
+ let e = ((i = a == null ? void 0 : a.target) == null ? void 0 : i.value) || "";
184
+ if (e === "Auto")
185
+ return;
186
+ e.endsWith("%") && (e = e.slice(0, -1));
187
+ const t = Number.parseFloat(e);
188
+ let s = 1;
189
+ Number.isNaN(t) || (s = t / 100, s < 0 && (s = 0), s > 5 && (s = 5)), this.updateZoom(s);
190
+ },
191
+ navigateToPage(a) {
192
+ var t, s;
193
+ let e = ((t = a == null ? void 0 : a.target) == null ? void 0 : t.value) || "";
194
+ e = Number.parseInt(e), Number.isNaN(e) && (e = this.currentPage), e < 1 && (e = 1), e > this.numPages && (e = this.numPages), e === this.currentPage && typeof ((s = a == null ? void 0 : a.target) == null ? void 0 : s.value) < "u" && (a.target.value = this.currentPage), this.$emit("navigate-to-page", e);
195
+ }
196
+ }
197
+ };
198
+ var x = function() {
199
+ var e = this, t = e._self._c;
200
+ return t("div", { staticClass: "pointer-events-none sticky top-0 z-10 flex h-10 w-full translate-y-4", class: { "translate-y-2": e.mq === "sm" } }, [t("div", { staticClass: "pointer-events-auto mx-auto inline-flex items-center justify-center rounded-full bg-gray-300/50 shadow-xl backdrop-blur-md", class: { "ml-2": e.mq === "sm" } }, [t("div", { staticClass: "ease flex h-full items-center justify-center gap-1 overflow-hidden rounded-full border border-gray-100 bg-white px-1.5 text-gray-500 transition duration-500" }, [t("div", { staticClass: "mr-2 inline-flex items-center gap-2" }, [t("input", { staticClass: "w-9 rounded-full border border-solid border-gray-200 bg-gray-100 text-center leading-loose text-gray-500", attrs: { type: "number" }, domProps: { value: e.currentPage }, on: { blur: e.navigateToPage, keyup: function(s) {
201
+ return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.navigateToPage.apply(null, arguments);
202
+ } } }), t("div", { staticClass: "text-sm font-medium" }, [e._v("/ " + e._s(e.numPages))])]), t("transition", { attrs: { name: "slide-fade" } }, [e.mq !== "sm" || e.compactExpand ? t("div", { staticClass: "button-transitions flex items-center" }, [t("div", { staticClass: "h-8 w-px bg-gray-700/10" }), t("div", { staticClass: "inline-flex items-center" }, [t("button", { staticClass: "h-10 w-10 rounded-full text-gray-400", on: { click: function(s) {
203
+ e.updateZoom(e.scale - (e.scale > 0.2 ? 0.1 : 0));
204
+ } } }, [t("CIcon", { attrs: { type: "zoomOut", size: "20" } })], 1), t("input", { key: e.scale, staticClass: "w-12 rounded-md border border-solid border-gray-200 bg-gray-100 text-center leading-loose text-gray-500", attrs: { type: "text" }, domProps: { value: e.formattedZoom }, on: { blur: e.onManualZoom, keyup: function(s) {
205
+ return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.onManualZoom.apply(null, arguments);
206
+ } } }), t("button", { staticClass: "h-10 w-10 rounded-full text-gray-400", on: { click: function(s) {
207
+ e.updateZoom(e.scale + (e.scale < 2 ? 0.1 : 0));
208
+ } } }, [t("CIcon", { attrs: { type: "zoomIn", size: "20" } })], 1)]), t("div", { staticClass: "h-8 w-px bg-gray-700/10" }), t("button", { staticClass: "h-10 w-10 rounded-full text-gray-400", on: { click: function(s) {
209
+ return e.updateZoom("page-width");
210
+ } } }, [t("CIcon", { attrs: { type: "boxBox", size: "20" } })], 1), t("div", { staticClass: "h-8 w-px bg-gray-700/10" }), t("button", { staticClass: "h-10 w-10 rounded-full text-gray-400", on: { click: function(s) {
211
+ return e.$emit("download");
212
+ } } }, [t("CIcon", { attrs: { type: "download", size: "20" } })], 1)]) : e._e()])], 1), e.mq === "sm" ? t("button", { staticClass: "h-10 w-10 rounded-full text-gray-400", on: { click: function(s) {
213
+ e.compactExpand = !e.compactExpand;
214
+ } } }, [t("CIcon", { staticClass: "duration-500", class: { "rotate-180": e.compactExpand }, attrs: { type: "chevron-right", size: "20" } })], 1) : e._e()])]);
215
+ }, C = [], $ = /* @__PURE__ */ d(
216
+ k,
217
+ x,
218
+ C,
219
+ !1,
220
+ null,
221
+ "c18582b3"
222
+ );
223
+ const V = $.exports;
224
+ function L(a, e) {
225
+ let t;
226
+ if (typeof a == "string")
227
+ t = {
228
+ url: a
229
+ };
230
+ else if (typeof a == "object" && a !== null)
231
+ t = { ...a };
232
+ else
233
+ throw new TypeError("invalid src type");
234
+ const s = window.pdfjsLib.getDocument(t).promise;
235
+ return s.__PDFDocumentLoadingTask = !0, e && e.onPassword && (s.onPassword = e.onPassword), e && e.onProgress && (s.onProgress = e.onProgress), s;
236
+ }
237
+ const o = "4.0.379", S = {
238
+ components: {
239
+ VuePdf: _,
240
+ PDFToolbar: V
241
+ },
242
+ inject: {
243
+ isPdf: {
244
+ default: !1
245
+ }
246
+ },
247
+ props: {
248
+ src: {
249
+ type: String,
250
+ default: null
251
+ },
252
+ toolbar: {
253
+ type: Boolean,
254
+ default: !0
255
+ },
256
+ docFilePath: {
257
+ type: String,
258
+ default: null
259
+ }
260
+ },
261
+ data() {
262
+ return {
263
+ pdf: null,
264
+ pdfLoadingTask: null,
265
+ hasLoadedScripts: !1,
266
+ loading: !1,
267
+ // zoom
268
+ autoZoom: !0,
269
+ scale: "page-width",
270
+ // page navigation
271
+ page: 1,
272
+ numPages: void 0,
273
+ observer: null
274
+ };
275
+ },
276
+ watch: {
277
+ src: {
278
+ immediate: !0,
279
+ async handler(a) {
280
+ this.hasLoadedScripts || (await l(
281
+ // `https://unpkg.com/pdfjs-dist@${pdfjsVersion}/build/pdf.min.mjs`
282
+ `${n.api.baseUrl}/js/pdfjs-dist@${o}/build/pdf.min.mjs`
283
+ ), await l(
284
+ // `https://unpkg.com/pdfjs-dist@${pdfjsVersion}/web/pdf_viewer.mjs`
285
+ `${n.api.baseUrl}/js/pdfjs-dist@${o}/web/pdf_viewer.mjs`
286
+ ), window.pdfjsLib.GlobalWorkerOptions.workerSrc = `${n.api.baseUrl}/js/pdfjs-dist@${o}/build/pdf.worker.min.mjs`, this.hasLoadedScripts = !0), this.setPdf(a);
287
+ }
288
+ }
289
+ },
290
+ beforeDestroy() {
291
+ this.observer && (this.observer.disconnect(), this.observer = null);
292
+ },
293
+ methods: {
294
+ createLoadingTask: L,
295
+ async setPdf(a) {
296
+ a && (this.loading = !0, this.pdfLoadingTask = this.createLoadingTask(a), this.$nextTick(() => {
297
+ this.pdfLoadingTask.then((e) => {
298
+ this.pdf = e, this.loading = !1, this.numPages = e.numPages, this.$emit("numPages", e.numPages), this.$emit("rendered"), this.toolbar && this.numPages > 1 && (this.observer = new IntersectionObserver(
299
+ (t) => {
300
+ t.forEach((s) => {
301
+ var i;
302
+ if (s.isIntersecting) {
303
+ const r = Number(
304
+ (i = s.target) == null ? void 0 : i.getAttribute("data-page")
305
+ );
306
+ this.page = r;
307
+ }
308
+ });
309
+ },
310
+ {
311
+ // root: this.$el,
312
+ rootMargin: "0px",
313
+ threshold: 0.5
314
+ }
315
+ ), this.$nextTick(() => {
316
+ var t;
317
+ (t = this.$refs.pageComponent) == null || t.forEach(
318
+ (s) => this.observer.observe(s.$el)
319
+ );
320
+ }));
321
+ });
322
+ }));
323
+ },
324
+ navigateToPage(a) {
325
+ var e, t, s;
326
+ (s = (t = (e = this.$refs.pageComponent) == null ? void 0 : e[a - 1]) == null ? void 0 : t.$el) == null || s.scrollIntoView({
327
+ behavior: "instant",
328
+ block: "start"
329
+ });
330
+ },
331
+ async download() {
332
+ if (!this.pdf)
333
+ return;
334
+ const e = (await this.pdf.getMetadata()).info.Title || "document";
335
+ this.pdf.getData().then((t) => {
336
+ const s = new Blob([t], { type: "application/pdf" }), i = URL.createObjectURL(s), r = document.createElement("a");
337
+ r.href = i, r.setAttribute("download", `${e}.pdf`), r.click();
338
+ }).catch(() => g("Failed to download PDF"));
339
+ }
340
+ }
341
+ };
342
+ var F = function() {
343
+ var e = this, t = e._self._c;
344
+ return t("div", { key: e.src, staticStyle: { "--page-border": "0" } }, [e.isPdf ? t("pre", [e._v(" ClingPDFReplaceStart:[" + e._s(e.docFilePath) + `]ClingPDFReplaceEnd
345
+ `), t("div", [e._v("This page should have been replaced with URL: " + e._s(e.src))]), e._v(`
346
+ `)]) : [e.toolbar && !e.loading ? t("PDFToolbar", { attrs: { "current-page": e.page, "num-pages": e.numPages, scale: e.scale, "auto-zoom": e.autoZoom }, on: { "update:scale": function(s) {
347
+ e.scale = s;
348
+ }, "update:autoZoom": function(s) {
349
+ e.autoZoom = s;
350
+ }, "update:auto-zoom": function(s) {
351
+ e.autoZoom = s;
352
+ }, download: e.download, "navigate-to-page": e.navigateToPage } }) : e._e(), t("div", { staticClass: "mx-auto", class: { "chapter-spacing-x max-w-full": e.autoZoom } }, [e.loading ? t("div", { staticClass: "mb-4 grid aspect-[210/297] w-full place-items-center border border-gray-100 bg-gray-50" }, [t("CIcon", { staticClass: "animate-spin text-gray-400", attrs: { type: "loader", size: "28" } })], 1) : e._e(), t("div", { class: { "overflow-x-auto": !e.autoZoom } }, e._l(e.numPages, function(s) {
353
+ return t("VuePdf", e._b({ key: s, ref: "pageComponent", refInFor: !0, staticClass: "page-shadow", attrs: { page: s, "data-page": s, scale: e.scale, resize: e.autoZoom, "container-class": "mb-4" }, on: { "update:scale": function(i) {
354
+ e.scale = i;
355
+ } } }, "VuePdf", {
356
+ ...e.$attrs,
357
+ ...e.$props,
358
+ pdfLoadingTask: e.pdfLoadingTask
359
+ }, !1), [e._t("loading", function() {
360
+ return [t("div", { staticClass: "mb-4 grid aspect-[210/297] place-items-center border border-gray-100 bg-gray-50", attrs: { slot: "loading" }, slot: "loading" }, [t("CIcon", { staticClass: "animate-spin text-gray-400", attrs: { type: "loader", size: "28" } })], 1)];
361
+ })], 2);
362
+ }), 1)])]], 2);
363
+ }, T = [], D = /* @__PURE__ */ d(
364
+ S,
365
+ F,
366
+ T,
367
+ !1,
368
+ null,
369
+ "065d6b5d"
370
+ );
371
+ const N = D.exports;
372
+ export {
373
+ N as V
374
+ };
@@ -0,0 +1,20 @@
1
+ import { n as r } from "./main-B9t0ybqW.js";
2
+ const e = {
3
+ name: "PlainHtml"
4
+ };
5
+ var o = function(t, n) {
6
+ return t("div", { staticClass: "quill-format" }, [n._t("default", function() {
7
+ return [t("div", { domProps: { innerHTML: n._s(n.props.content) } })];
8
+ })], 2);
9
+ }, s = [], a = /* @__PURE__ */ r(
10
+ e,
11
+ o,
12
+ s,
13
+ !0,
14
+ null,
15
+ null
16
+ );
17
+ const c = a.exports;
18
+ export {
19
+ c as P
20
+ };