@flyfish-group/file-viewer3 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -16
- package/dist/components/3MFLoader.js +1 -1
- package/dist/components/AMFLoader.js +1 -1
- package/dist/components/AudioViewer.js +1 -1
- package/dist/components/CadViewer.js +1 -1
- package/dist/components/CodeViewer.js +1 -1
- package/dist/components/ColladaLoader.js +1 -1
- package/dist/components/DrawingViewer.js +1 -1
- package/dist/components/EdaViewer.js +1 -1
- package/dist/components/EmailViewer.js +1 -1
- package/dist/components/EpubViewer.js +1 -1
- package/dist/components/FBXLoader.js +1 -1
- package/dist/components/GLTFLoader.js +1 -1
- package/dist/components/ImageViewer.js +1 -1
- package/dist/components/KMZLoader.js +1 -1
- package/dist/components/MarkdownViewer.js +1 -1
- package/dist/components/ModelViewer.js +1 -1
- package/dist/components/OBJLoader.js +1 -1
- package/dist/components/OfdViewer.js +1 -1
- package/dist/components/PCDLoader.js +1 -1
- package/dist/components/PLYLoader.js +1 -1
- package/dist/components/PdfView.js +360 -304
- package/dist/components/PptxRender.js +1 -1
- package/dist/components/STLLoader.js +1 -1
- package/dist/components/TDSLoader.js +1 -1
- package/dist/components/USDLoader.js +1 -1
- package/dist/components/UmdViewer.js +1 -1
- package/dist/components/VRMLLoader.js +1 -1
- package/dist/components/VTKLoader.js +1 -1
- package/dist/components/XYZLoader.js +1 -1
- package/dist/components/XlsxTable.js +1 -1
- package/dist/components/__vite-browser-external.js +1 -1
- package/dist/components/_plugin-vue_export-helper.js +1 -1
- package/dist/components/ar-SA-G6X2FPQ2.js +1 -1
- package/dist/components/arc.js +1 -1
- package/dist/components/architecture-7EHR7CIX.js +1 -1
- package/dist/components/architectureDiagram-3BPJPVTR.js +1 -1
- package/dist/components/archive.js +1 -1
- package/dist/components/asyncToGenerator.js +1 -1
- package/dist/components/audio.js +1 -1
- package/dist/components/az-AZ-76LH7QW2.js +1 -1
- package/dist/components/bash.js +1 -1
- package/dist/components/bg-BG-XCXSNQG7.js +1 -1
- package/dist/components/blockDiagram-GPEHLZMM.js +1 -1
- package/dist/components/bn-BD-2XOGV67Q.js +1 -1
- package/dist/components/c4Diagram-AAUBKEIU.js +1 -1
- package/dist/components/ca-ES-6MX7JW3Y.js +1 -1
- package/dist/components/cad.js +1 -1
- package/dist/components/cfb.js +1 -1
- package/dist/components/channel.js +1 -1
- package/dist/components/chunk-2J33WTMH.js +1 -1
- package/dist/components/chunk-3OPIFGDE.js +1 -1
- package/dist/components/chunk-4BX2VUAB.js +1 -1
- package/dist/components/chunk-55IACEB6.js +1 -1
- package/dist/components/chunk-5ZQYHXKU.js +1 -1
- package/dist/components/chunk-6U3AYISY.js +1 -1
- package/dist/components/chunk-727SXJPM.js +1 -1
- package/dist/components/chunk-AGHRB4JF.js +1 -1
- package/dist/components/chunk-AQP2D5EJ.js +1 -1
- package/dist/components/chunk-BSJP7CBP.js +1 -1
- package/dist/components/chunk-CSCIHK7Q.js +1 -1
- package/dist/components/chunk-FMBD7UC4.js +1 -1
- package/dist/components/chunk-K2UTITRG.js +1 -1
- package/dist/components/chunk-KSCS5N6A.js +1 -1
- package/dist/components/chunk-L5ZTLDWV.js +1 -1
- package/dist/components/chunk-LZXEDZCA.js +1 -1
- package/dist/components/chunk-ND2GUHAM.js +1 -1
- package/dist/components/chunk-NZK2D7GU.js +1 -1
- package/dist/components/chunk-O5CBEL6O.js +1 -1
- package/dist/components/chunk-QZHKN3VN.js +1 -1
- package/dist/components/chunk-SRAX5OIU.js +1 -1
- package/dist/components/chunk-WU5MYG2G.js +1 -1
- package/dist/components/chunk-XPW4576I.js +1 -1
- package/dist/components/chunk-Z3N5DIM6.js +1 -1
- package/dist/components/chunk-ZUYEQ4TG.js +1 -1
- package/dist/components/chunk.js +1 -1
- package/dist/components/classDiagram-4FO5ZUOK.js +1 -1
- package/dist/components/classDiagram-v2-Q7XG4LA2.js +1 -1
- package/dist/components/core.js +1 -1
- package/dist/components/cose-bilkent-S5V4N54A.js +1 -1
- package/dist/components/cpp.js +1 -1
- package/dist/components/cs-CZ-2BRQDIVT.js +1 -1
- package/dist/components/csharp.js +1 -1
- package/dist/components/css.js +1 -1
- package/dist/components/cytoscape.esm.js +1 -1
- package/dist/components/da-DK-5WZEPLOC.js +1 -1
- package/dist/components/dagre-BM42HDAG.js +1 -1
- package/dist/components/dagre.js +1 -1
- package/dist/components/de-DE-XR44H4JA.js +1 -1
- package/dist/components/defaultLocale.js +1 -1
- package/dist/components/defineProperty.js +1 -1
- package/dist/components/diagram-2AECGRRQ.js +1 -1
- package/dist/components/diagram-5GNKFQAL.js +1 -1
- package/dist/components/diagram-KO2AKTUF.js +1 -1
- package/dist/components/diagram-LMA3HP47.js +1 -1
- package/dist/components/diagram-OG6HWLK6.js +1 -1
- package/dist/components/diff.js +1 -1
- package/dist/components/directory-open-01563666.js +1 -1
- package/dist/components/directory-open-4ed118d0.js +1 -1
- package/dist/components/dist.js +1 -1
- package/dist/components/dist2.js +1 -1
- package/dist/components/dist3.js +1 -1
- package/dist/components/docx-preview.js +1 -1
- package/dist/components/drawing.js +1 -1
- package/dist/components/ebook.js +1 -1
- package/dist/components/eda.js +1 -1
- package/dist/components/el-GR-BZB4AONW.js +1 -1
- package/dist/components/email.js +1 -1
- package/dist/components/en-B4ZKOASM.js +1 -1
- package/dist/components/erDiagram-TEJ5UH35.js +1 -1
- package/dist/components/es-ES-U4NZUMDT.js +1 -1
- package/dist/components/eu-ES-A7QVB2H4.js +1 -1
- package/dist/components/eventmodeling-FCH6USID.js +1 -1
- package/dist/components/fa-IR-HGAKTJCU.js +1 -1
- package/dist/components/fflate.module.js +1 -1
- package/dist/components/fi-FI-Z5N7JZ37.js +1 -1
- package/dist/components/file-open-002ab408.js +1 -1
- package/dist/components/file-open-7c801643.js +1 -1
- package/dist/components/file-save-3189631c.js +1 -1
- package/dist/components/file-save-745eba88.js +1 -1
- package/dist/components/flowDiagram-I6XJVG4X.js +1 -1
- package/dist/components/fr-FR-RHASNOE6.js +1 -1
- package/dist/components/ganttDiagram-6RSMTGT7.js +1 -1
- package/dist/components/gitGraph-WXDBUCRP.js +1 -1
- package/dist/components/gitGraphDiagram-PVQCEYII.js +1 -1
- package/dist/components/gl-ES-HMX3MZ6V.js +1 -1
- package/dist/components/go.js +1 -1
- package/dist/components/graphlib.js +1 -1
- package/dist/components/he-IL-6SHJWFNN.js +1 -1
- package/dist/components/hi-IN-IWLTKZ5I.js +1 -1
- package/dist/components/hu-HU-A5ZG7DT2.js +1 -1
- package/dist/components/id-ID-SAP4L64H.js +1 -1
- package/dist/components/image-GAAHSSAO.js +1 -1
- package/dist/components/image-blob-reduce.esm.js +1 -1
- package/dist/components/image.js +1 -1
- package/dist/components/info-J43DQDTF.js +1 -1
- package/dist/components/infoDiagram-5YYISTIA.js +1 -1
- package/dist/components/ini.js +1 -1
- package/dist/components/init.js +1 -1
- package/dist/components/ishikawaDiagram-YF4QCWOH.js +1 -1
- package/dist/components/it-IT-JPQ66NNP.js +1 -1
- package/dist/components/ja-JP-DBVTYXUO.js +1 -1
- package/dist/components/java.js +1 -1
- package/dist/components/javascript.js +1 -1
- package/dist/components/journeyDiagram-JHISSGLW.js +1 -1
- package/dist/components/json.js +1 -1
- package/dist/components/jszip.min.js +1 -1
- package/dist/components/kaa-6HZHGXH3.js +1 -1
- package/dist/components/kab-KAB-ZGHBKWFO.js +1 -1
- package/dist/components/kanban-definition-UN3LZRKU.js +1 -1
- package/dist/components/katex.js +1 -1
- package/dist/components/kk-KZ-P5N5QNE5.js +1 -1
- package/dist/components/km-KH-HSX4SM5Z.js +1 -1
- package/dist/components/ko-KR-MTYHY66A.js +1 -1
- package/dist/components/ku-TR-6OUDTVRD.js +1 -1
- package/dist/components/lib.js +1 -1
- package/dist/components/libarchive.js +1 -1
- package/dist/components/linear.js +1 -1
- package/dist/components/lt-LT-XHIRWOB4.js +1 -1
- package/dist/components/lv-LV-5QDEKY6T.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/md.js +1 -1
- package/dist/components/mermaid-parser.core.js +1 -1
- package/dist/components/mindmap-definition-RKZ34NQL.js +1 -1
- package/dist/components/model.js +1 -1
- package/dist/components/mp4.js +1 -1
- package/dist/components/mr-IN-CRQNXWMA.js +1 -1
- package/dist/components/my-MM-5M5IBNSE.js +1 -1
- package/dist/components/nb-NO-T6EIAALU.js +1 -1
- package/dist/components/nestedRender.js +1 -1
- package/dist/components/nl-NL-IS3SIHDZ.js +1 -1
- package/dist/components/nn-NO-6E72VCQL.js +1 -1
- package/dist/components/objectSpread2.js +1 -1
- package/dist/components/objectWithoutProperties.js +1 -1
- package/dist/components/oc-FR-POXYY2M6.js +1 -1
- package/dist/components/ofd.js +1 -1
- package/dist/components/ofd2.js +1 -1
- package/dist/components/ordinal.js +1 -1
- package/dist/components/pa-IN-N4M65BXN.js +1 -1
- package/dist/components/packet-YPE3B663.js +1 -1
- package/dist/components/pdf.js +1 -1
- package/dist/components/percentages-BXMCSKIN.js +1 -1
- package/dist/components/php.js +1 -1
- package/dist/components/pica.js +1 -1
- package/dist/components/pie-LRSECV5Y.js +1 -1
- package/dist/components/pie.js +1 -1
- package/dist/components/pieDiagram-4H26LBE5.js +1 -1
- package/dist/components/pl-PL-T2D74RX3.js +1 -1
- package/dist/components/postal-mime.js +1 -1
- package/dist/components/pptx.js +1 -1
- package/dist/components/prod.js +1 -1
- package/dist/components/pt-BR-5N22H2LF.js +1 -1
- package/dist/components/pt-PT-UZXXM6DQ.js +1 -1
- package/dist/components/python.js +1 -1
- package/dist/components/quadrantDiagram-W4KKPZXB.js +1 -1
- package/dist/components/radar-GUYGQ44K.js +1 -1
- package/dist/components/requirementDiagram-4Y6WPE33.js +1 -1
- package/dist/components/ro-RO-JPDTUUEW.js +1 -1
- package/dist/components/rough.esm.js +1 -1
- package/dist/components/roundRect.js +1 -1
- package/dist/components/ru-RU-B4JR7IUQ.js +1 -1
- package/dist/components/rust.js +1 -1
- package/dist/components/sankeyDiagram-5OEKKPKP.js +1 -1
- package/dist/components/sequenceDiagram-3UESZ5HK.js +1 -1
- package/dist/components/shared.js +1 -1
- package/dist/components/shared2.js +1 -1
- package/dist/components/si-LK-N5RQ5JYF.js +1 -1
- package/dist/components/sk-SK-C5VTKIMK.js +1 -1
- package/dist/components/sl-SI-NN7IZMDC.js +1 -1
- package/dist/components/sql.js +1 -1
- package/dist/components/src.js +1 -1
- package/dist/components/src2.js +1 -1
- package/dist/components/stateDiagram-AJRCARHV.js +1 -1
- package/dist/components/stateDiagram-v2-BHNVJYJU.js +1 -1
- package/dist/components/subset-shared.chunk.js +1 -1
- package/dist/components/subset-worker.chunk.js +1 -1
- package/dist/components/sv-SE-XGPEYMSR.js +1 -1
- package/dist/components/ta-IN-2NMHFXQM.js +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/th-TH-HPSO5L25.js +1 -1
- package/dist/components/three.module.js +1 -1
- package/dist/components/time.js +1 -1
- package/dist/components/timeline-definition-PNZ67QCA.js +1 -1
- package/dist/components/tr-TR-DEFEU3FU.js +1 -1
- package/dist/components/treeView-BLDUP644.js +1 -1
- package/dist/components/treemap-LRROVOQU.js +1 -1
- package/dist/components/typescript.js +1 -1
- package/dist/components/uk-UA-QMV73CPH.js +1 -1
- package/dist/components/umd.js +1 -1
- package/dist/components/use.js +1 -1
- package/dist/components/util.js +1 -1
- package/dist/components/vennDiagram-CIIHVFJN.js +1 -1
- package/dist/components/vi-VN-M7AON7JQ.js +1 -1
- package/dist/components/wardley-L42UT6IY.js +1 -1
- package/dist/components/wardleyDiagram-YWT4CUSO.js +1 -1
- package/dist/components/word.js +1 -1
- package/dist/components/worker-ref.js +1 -1
- package/dist/components/wrapAsyncGenerator.js +1 -1
- package/dist/components/xlsx.js +1 -1
- package/dist/components/xml.js +1 -1
- package/dist/components/xychartDiagram-2RQKCTM6.js +1 -1
- package/dist/components/yaml.js +1 -1
- package/dist/components/zh-CN-LNUGB5OW.js +1 -1
- package/dist/components/zh-HK-E62DVLB3.js +1 -1
- package/dist/components/zh-TW-RAJ6MFWO.js +1 -1
- package/dist/file-viewer3.css +1 -1
- package/dist/index.mjs +1 -1
- package/dist/src/package/common/printCapability.d.ts +27 -0
- package/dist/src/package/common/type.d.ts +45 -0
- package/dist/src/package/components/FileViewer/FileViewer.vue.d.ts +13 -2
- package/dist/src/package/index.d.ts +1 -1
- package/dist/src/package/vendors/pdf/PdfView.vue.d.ts +2 -1
- package/dist/src/package/vendors/xlsx/XlsxTable.view.d.ts +2 -0
- package/dist/src/package/vendors/xlsx/index.d.ts +2 -1
- package/dist/src/package/vendors/xlsx/worker/sheetjs/SheetJsModel.d.ts +4 -0
- package/package.json +8 -1
|
@@ -49,7 +49,7 @@ function N(e, t, n) {
|
|
|
49
49
|
}
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region node_modules/.pnpm/pdfjs-dist@5.7.284/node_modules/pdfjs-dist/legacy/build/pdf.mjs
|
|
52
|
-
var ee, P,
|
|
52
|
+
var ee, P, te, ne, F, re, ie, ae, oe, I, se, ce, le, ue, de, fe, pe, me, he = {
|
|
53
53
|
9306(e, t, n) {
|
|
54
54
|
var r = n(4901), i = n(6823), a = TypeError;
|
|
55
55
|
e.exports = function(e) {
|
|
@@ -168,7 +168,7 @@ var ee, P, F, te, I, ne, re, ie, ae, oe, se, ce, le, ue, de, fe, pe, me, he = {
|
|
|
168
168
|
};
|
|
169
169
|
},
|
|
170
170
|
4644(e, t, n) {
|
|
171
|
-
var r = n(7811), i = n(3724), a = n(4576), o = n(4901), s = n(34), c = n(9297), l = n(6955), u = n(6823), d = n(6699), f = n(6840), p = n(2106), m = n(1625), h = n(2787), g = n(2967), _ = n(608), v = n(3392), y = n(1181), b = y.enforce, x = y.get, S = a.Int8Array, C = S && S.prototype, w = a.Uint8ClampedArray, T = w && w.prototype, E = S && h(S), D = C && h(C), O = Object.prototype, k = a.TypeError, A = _("toStringTag"), j = v("TYPED_ARRAY_TAG"), M = "TypedArrayConstructor", N = r && !!g && l(a.opera) !== "Opera", ee = !1, P,
|
|
171
|
+
var r = n(7811), i = n(3724), a = n(4576), o = n(4901), s = n(34), c = n(9297), l = n(6955), u = n(6823), d = n(6699), f = n(6840), p = n(2106), m = n(1625), h = n(2787), g = n(2967), _ = n(608), v = n(3392), y = n(1181), b = y.enforce, x = y.get, S = a.Int8Array, C = S && S.prototype, w = a.Uint8ClampedArray, T = w && w.prototype, E = S && h(S), D = C && h(C), O = Object.prototype, k = a.TypeError, A = _("toStringTag"), j = v("TYPED_ARRAY_TAG"), M = "TypedArrayConstructor", N = r && !!g && l(a.opera) !== "Opera", ee = !1, P, te, ne, F = {
|
|
172
172
|
Int8Array: 1,
|
|
173
173
|
Uint8Array: 1,
|
|
174
174
|
Uint8ClampedArray: 1,
|
|
@@ -178,32 +178,32 @@ var ee, P, F, te, I, ne, re, ie, ae, oe, se, ce, le, ue, de, fe, pe, me, he = {
|
|
|
178
178
|
Uint32Array: 4,
|
|
179
179
|
Float32Array: 4,
|
|
180
180
|
Float64Array: 8
|
|
181
|
-
},
|
|
181
|
+
}, re = {
|
|
182
182
|
BigInt64Array: 8,
|
|
183
183
|
BigUint64Array: 8
|
|
184
|
-
},
|
|
184
|
+
}, ie = function(e) {
|
|
185
185
|
if (!s(e)) return !1;
|
|
186
186
|
var t = l(e);
|
|
187
|
-
return t === "DataView" || c(
|
|
188
|
-
},
|
|
187
|
+
return t === "DataView" || c(F, t) || c(re, t);
|
|
188
|
+
}, ae = function(e) {
|
|
189
189
|
var t = h(e);
|
|
190
190
|
if (s(t)) {
|
|
191
191
|
var n = x(t);
|
|
192
|
-
return n && c(n, M) ? n[M] :
|
|
192
|
+
return n && c(n, M) ? n[M] : ae(t);
|
|
193
193
|
}
|
|
194
|
-
},
|
|
194
|
+
}, oe = function(e) {
|
|
195
195
|
if (!s(e)) return !1;
|
|
196
196
|
var t = l(e);
|
|
197
|
-
return c(
|
|
198
|
-
},
|
|
199
|
-
if (
|
|
197
|
+
return c(F, t) || c(re, t);
|
|
198
|
+
}, I = function(e) {
|
|
199
|
+
if (oe(e)) return e;
|
|
200
200
|
throw new k("Target is not a typed array");
|
|
201
201
|
}, se = function(e) {
|
|
202
202
|
if (o(e) && (!g || m(E, e))) return e;
|
|
203
203
|
throw new k(u(e) + " is not a typed array constructor");
|
|
204
204
|
}, ce = function(e, t, n, r) {
|
|
205
205
|
if (i) {
|
|
206
|
-
if (n) for (var o in
|
|
206
|
+
if (n) for (var o in F) {
|
|
207
207
|
var s = a[o];
|
|
208
208
|
if (s && c(s.prototype, e)) try {
|
|
209
209
|
delete s.prototype[e];
|
|
@@ -220,7 +220,7 @@ var ee, P, F, te, I, ne, re, ie, ae, oe, se, ce, le, ue, de, fe, pe, me, he = {
|
|
|
220
220
|
if (i) {
|
|
221
221
|
if (g) {
|
|
222
222
|
if (n) {
|
|
223
|
-
for (r in
|
|
223
|
+
for (r in F) if (o = a[r], o && c(o, e)) try {
|
|
224
224
|
delete o[e];
|
|
225
225
|
} catch (e) {}
|
|
226
226
|
}
|
|
@@ -229,31 +229,31 @@ var ee, P, F, te, I, ne, re, ie, ae, oe, se, ce, le, ue, de, fe, pe, me, he = {
|
|
|
229
229
|
} catch (e) {}
|
|
230
230
|
else return;
|
|
231
231
|
}
|
|
232
|
-
for (r in
|
|
232
|
+
for (r in F) o = a[r], o && (!o[e] || n) && f(o, e, t);
|
|
233
233
|
}
|
|
234
234
|
};
|
|
235
|
-
for (P in
|
|
236
|
-
for (P in
|
|
235
|
+
for (P in F) te = a[P], ne = te && te.prototype, ne ? b(ne)[M] = te : N = !1;
|
|
236
|
+
for (P in re) te = a[P], ne = te && te.prototype, ne && (b(ne)[M] = te);
|
|
237
237
|
if ((!N || !o(E) || E === Function.prototype) && (E = function() {
|
|
238
238
|
throw new k("Incorrect invocation");
|
|
239
|
-
}, N)) for (P in
|
|
240
|
-
if ((!N || !D || D === O) && (D = E.prototype, N)) for (P in
|
|
239
|
+
}, N)) for (P in F) a[P] && g(a[P], E);
|
|
240
|
+
if ((!N || !D || D === O) && (D = E.prototype, N)) for (P in F) a[P] && g(a[P].prototype, D);
|
|
241
241
|
if (N && h(T) !== D && g(T, D), i && !c(D, A)) for (P in ee = !0, p(D, A, {
|
|
242
242
|
configurable: !0,
|
|
243
243
|
get: function() {
|
|
244
244
|
return s(this) ? this[j] : void 0;
|
|
245
245
|
}
|
|
246
|
-
}),
|
|
246
|
+
}), F) a[P] && d(a[P].prototype, j, P);
|
|
247
247
|
e.exports = {
|
|
248
248
|
NATIVE_ARRAY_BUFFER_VIEWS: N,
|
|
249
249
|
TYPED_ARRAY_TAG: ee && j,
|
|
250
|
-
aTypedArray:
|
|
250
|
+
aTypedArray: I,
|
|
251
251
|
aTypedArrayConstructor: se,
|
|
252
252
|
exportTypedArrayMethod: ce,
|
|
253
253
|
exportTypedArrayStaticMethod: le,
|
|
254
|
-
getTypedArrayConstructor:
|
|
255
|
-
isView:
|
|
256
|
-
isTypedArray:
|
|
254
|
+
getTypedArrayConstructor: ae,
|
|
255
|
+
isView: ie,
|
|
256
|
+
isTypedArray: oe,
|
|
257
257
|
TypedArray: E,
|
|
258
258
|
TypedArrayPrototype: D
|
|
259
259
|
};
|
|
@@ -2146,31 +2146,31 @@ var ee, P, F, te, I, ne, re, ie, ae, oe, se, ce, le, ue, de, fe, pe, me, he = {
|
|
|
2146
2146
|
9112(e, t, n) {
|
|
2147
2147
|
var r = n(6518), i = n(3724), a = n(4576), o = n(7751), s = n(9504), c = n(9565), l = n(4901), u = n(34), d = n(4376), f = n(9297), p = n(655), m = n(6198), h = n(4659), g = n(9039), _ = n(8235), v = n(4495), y = a.JSON, b = a.Number, x = a.SyntaxError, S = y && y.parse, C = o("Object", "keys"), w = Object.getOwnPropertyDescriptor, T = s("".charAt), E = s("".slice), D = s(/./.exec), O = s([].push), k = /^\d$/, A = /^[1-9]$/, j = /^[\d-]$/, M = /^[\t\n\r ]$/, N = 0, ee = 1, P = function(e, t) {
|
|
2148
2148
|
e = p(e);
|
|
2149
|
-
var n = new
|
|
2149
|
+
var n = new re(e, 0, ""), r = n.parse(), i = r.value, a = n.skip(M, r.end);
|
|
2150
2150
|
if (a < e.length) throw new x("Unexpected extra character: \"" + T(e, a) + "\" after the parsed data at: " + a);
|
|
2151
|
-
return l(t) ?
|
|
2152
|
-
},
|
|
2151
|
+
return l(t) ? te({ "": i }, "", t, r) : i;
|
|
2152
|
+
}, te = function(e, t, n, r) {
|
|
2153
2153
|
var i = e[t], a = r && i === r.value, o = a && typeof r.source == "string" ? { source: r.source } : {}, s, l, p, h, g;
|
|
2154
2154
|
if (u(i)) {
|
|
2155
2155
|
var _ = d(i), v = a ? r.nodes : _ ? [] : {};
|
|
2156
|
-
if (_) for (s = v.length, p = m(i), h = 0; h < p; h++)
|
|
2157
|
-
else for (l = C(i), p = m(l), h = 0; h < p; h++) g = l[h],
|
|
2156
|
+
if (_) for (s = v.length, p = m(i), h = 0; h < p; h++) ne(i, h, te(i, "" + h, n, h < s ? v[h] : void 0));
|
|
2157
|
+
else for (l = C(i), p = m(l), h = 0; h < p; h++) g = l[h], ne(i, g, te(i, g, n, f(v, g) ? v[g] : void 0));
|
|
2158
2158
|
}
|
|
2159
2159
|
return c(n, e, t, i, o);
|
|
2160
|
-
},
|
|
2160
|
+
}, ne = function(e, t, n) {
|
|
2161
2161
|
if (i) {
|
|
2162
2162
|
var r = w(e, t);
|
|
2163
2163
|
if (r && !r.configurable) return;
|
|
2164
2164
|
}
|
|
2165
2165
|
n === void 0 ? delete e[t] : h(e, t, n);
|
|
2166
|
-
},
|
|
2166
|
+
}, F = function(e, t, n, r) {
|
|
2167
2167
|
this.value = e, this.end = t, this.source = n, this.nodes = r;
|
|
2168
|
-
},
|
|
2168
|
+
}, re = function(e, t) {
|
|
2169
2169
|
this.source = e, this.index = t;
|
|
2170
2170
|
};
|
|
2171
|
-
|
|
2171
|
+
re.prototype = {
|
|
2172
2172
|
fork: function(e) {
|
|
2173
|
-
return new
|
|
2173
|
+
return new re(this.source, e);
|
|
2174
2174
|
},
|
|
2175
2175
|
parse: function() {
|
|
2176
2176
|
var e = this.source, t = this.skip(M, this.index), n = this.fork(t), r = T(e, t);
|
|
@@ -2186,7 +2186,7 @@ var ee, P, F, te, I, ne, re, ie, ae, oe, se, ce, le, ue, de, fe, pe, me, he = {
|
|
|
2186
2186
|
throw new x("Unexpected character: \"" + r + "\" at: " + t);
|
|
2187
2187
|
},
|
|
2188
2188
|
node: function(e, t, n, r, i) {
|
|
2189
|
-
return new
|
|
2189
|
+
return new F(t, r, e ? null : E(this.source, n, r), i);
|
|
2190
2190
|
},
|
|
2191
2191
|
object: function() {
|
|
2192
2192
|
for (var e = this.source, t = this.index + 1, n = !1, r = {}, i = {}, a = !1; t < e.length;) {
|
|
@@ -2257,20 +2257,20 @@ var ee, P, F, te, I, ne, re, ie, ae, oe, se, ce, le, ue, de, fe, pe, me, he = {
|
|
|
2257
2257
|
throw new x("Unexpected character: \"" + n + "\" at: " + t);
|
|
2258
2258
|
}
|
|
2259
2259
|
};
|
|
2260
|
-
var
|
|
2260
|
+
var ie = g(function() {
|
|
2261
2261
|
var e = "9007199254740993", t;
|
|
2262
2262
|
return S(e, function(e, n, r) {
|
|
2263
2263
|
t = r.source;
|
|
2264
2264
|
}), t !== e;
|
|
2265
|
-
}),
|
|
2265
|
+
}), ae = v && !g(function() {
|
|
2266
2266
|
return 1 / S("-0 ") != -Infinity;
|
|
2267
2267
|
});
|
|
2268
2268
|
r({
|
|
2269
2269
|
target: "JSON",
|
|
2270
2270
|
stat: !0,
|
|
2271
|
-
forced:
|
|
2271
|
+
forced: ie
|
|
2272
2272
|
}, { parse: function(e, t) {
|
|
2273
|
-
return
|
|
2273
|
+
return ae && !l(t) ? S(e) : P(e, t);
|
|
2274
2274
|
} });
|
|
2275
2275
|
},
|
|
2276
2276
|
3110(e, t, n) {
|
|
@@ -2279,15 +2279,15 @@ var ee, P, F, te, I, ne, re, ie, ae, oe, se, ce, le, ue, de, fe, pe, me, he = {
|
|
|
2279
2279
|
return x([e]) !== "[null]" || x({ a: e }) !== "{}" || x(Object(e)) !== "{}";
|
|
2280
2280
|
}), P = c(function() {
|
|
2281
2281
|
return x("\udf06\ud834") !== "\"\\udf06\\ud834\"" || x("\udead") !== "\"\\udead\"";
|
|
2282
|
-
}),
|
|
2283
|
-
var n = h(arguments), r =
|
|
2282
|
+
}), te = ee ? function(e, t) {
|
|
2283
|
+
var n = h(arguments), r = F(t);
|
|
2284
2284
|
if (!(!u(r) && (e === void 0 || f(e)))) return n[1] = function(e, t) {
|
|
2285
2285
|
if (u(r) && (t = o(r, this, b(e), t)), !f(t)) return t;
|
|
2286
2286
|
}, a(x, null, n);
|
|
2287
|
-
} : x,
|
|
2287
|
+
} : x, ne = function(e, t, n) {
|
|
2288
2288
|
var r = C(n, t - 1), i = C(n, t + 1);
|
|
2289
2289
|
return S(A, e) && !S(j, i) || S(j, e) && !S(A, r) ? "\\u" + O(w(e, 0), 16) : e;
|
|
2290
|
-
},
|
|
2290
|
+
}, F = function(e) {
|
|
2291
2291
|
if (u(e)) return e;
|
|
2292
2292
|
if (l(e)) {
|
|
2293
2293
|
for (var t = e.length, n = [], r = 0; r < t; r++) {
|
|
@@ -2308,11 +2308,11 @@ var ee, P, F, te, I, ne, re, ie, ae, oe, se, ce, le, ue, de, fe, pe, me, he = {
|
|
|
2308
2308
|
arity: 3,
|
|
2309
2309
|
forced: ee || P || !y
|
|
2310
2310
|
}, { stringify: function(e, t, n) {
|
|
2311
|
-
var r =
|
|
2311
|
+
var r = F(t), i = [], a = te(e, function(e, t) {
|
|
2312
2312
|
var n = u(r) ? o(r, this, b(e), t) : t;
|
|
2313
2313
|
return !y && d(n) ? M + (D(i, n.rawJSON) - 1) : n;
|
|
2314
2314
|
}, n);
|
|
2315
|
-
if (typeof a != "string" || (P && (a = T(a, k,
|
|
2315
|
+
if (typeof a != "string" || (P && (a = T(a, k, ne)), y)) return a;
|
|
2316
2316
|
for (var s = "", c = a.length, l = 0; l < c; l++) {
|
|
2317
2317
|
var f = C(a, l);
|
|
2318
2318
|
if (f === "\"") {
|
|
@@ -4290,7 +4290,7 @@ var En = class e {
|
|
|
4290
4290
|
return e.startsWith(`image_${A(Nn, this)}_`);
|
|
4291
4291
|
}
|
|
4292
4292
|
};
|
|
4293
|
-
|
|
4293
|
+
te = Ln;
|
|
4294
4294
|
function Rn(e, t) {
|
|
4295
4295
|
var n = this;
|
|
4296
4296
|
return a(function* () {
|
|
@@ -4308,7 +4308,7 @@ function Rn(e, t) {
|
|
|
4308
4308
|
});
|
|
4309
4309
|
let e;
|
|
4310
4310
|
if (typeof t == "string" ? (r.url = t, e = yield vt(t, "blob")) : t instanceof File ? e = r.file = t : t instanceof Blob && (e = t), e.type === "image/svg+xml") {
|
|
4311
|
-
let t =
|
|
4311
|
+
let t = te._isSVGFittingCanvas, n = new FileReader(), i = new Image(), o = new Promise((e, o) => {
|
|
4312
4312
|
i.onload = () => {
|
|
4313
4313
|
r.bitmap = i, r.isSvg = !0, e();
|
|
4314
4314
|
}, n.onload = a(function* () {
|
|
@@ -5794,7 +5794,7 @@ var Ui = /* @__PURE__ */ new WeakMap(), Wi = /* @__PURE__ */ new WeakMap(), Gi =
|
|
|
5794
5794
|
(e = A($i, this)) == null || e.abort(), M($i, this, null), (t = A(Xi, this)) == null || t.abort(), M(Xi, this, null);
|
|
5795
5795
|
}
|
|
5796
5796
|
};
|
|
5797
|
-
|
|
5797
|
+
ne = na;
|
|
5798
5798
|
function ra(e) {
|
|
5799
5799
|
var t, n;
|
|
5800
5800
|
if ((t = A(Ki, this)) != null && t.call(this)) return;
|
|
@@ -5846,7 +5846,7 @@ function ia(e) {
|
|
|
5846
5846
|
let [n, r] = e.touches;
|
|
5847
5847
|
n.identifier > r.identifier && ([n, r] = [r, n]);
|
|
5848
5848
|
let { screenX: i, screenY: a } = n, { screenX: o, screenY: s } = r, c = A(Qi, this), { touch0X: l, touch0Y: u, touch1X: d, touch1Y: f } = c, p = d - l, m = f - u, h = o - i, g = s - a, _ = Math.hypot(h, g) || 1, v = Math.hypot(p, m) || 1;
|
|
5849
|
-
if (!A(Wi, this) && Math.abs(v - _) <=
|
|
5849
|
+
if (!A(Wi, this) && Math.abs(v - _) <= ne.MIN_TOUCH_DISTANCE_TO_PINCH) return;
|
|
5850
5850
|
if (c.touch0X = i, c.touch0Y = a, c.touch1X = o, c.touch1Y = s, !A(Wi, this)) {
|
|
5851
5851
|
M(Wi, this, !0);
|
|
5852
5852
|
return;
|
|
@@ -6714,7 +6714,7 @@ var oa = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), ca =
|
|
|
6714
6714
|
(t == null ? void 0 : t.nodeName) === "DIV" && t.classList.contains("annotationContent") && t.remove();
|
|
6715
6715
|
}
|
|
6716
6716
|
};
|
|
6717
|
-
|
|
6717
|
+
F = Ma;
|
|
6718
6718
|
function Na([e, t], n, r) {
|
|
6719
6719
|
[n, r] = this.screenToPageTranslation(n, r), this.x += n / e, this.y += r / t, this._onTranslating(this.x, this.y), this.fixAndSetPosition();
|
|
6720
6720
|
}
|
|
@@ -6829,7 +6829,7 @@ function za() {
|
|
|
6829
6829
|
});
|
|
6830
6830
|
}
|
|
6831
6831
|
function Ba(e, t) {
|
|
6832
|
-
let [n, r] = this.parentDimensions, i = this.x, a = this.y, o = this.width, s = this.height, c =
|
|
6832
|
+
let [n, r] = this.parentDimensions, i = this.x, a = this.y, o = this.width, s = this.height, c = F.MIN_SIZE / n, l = F.MIN_SIZE / r, u = D(W, this, Fa).call(this, this.rotation), d = (e, t) => [u[0] * e + u[2] * t, u[1] * e + u[3] * t], f = D(W, this, Fa).call(this, 360 - this.rotation), p = (e, t) => [f[0] * e + f[2] * t, f[1] * e + f[3] * t], m, h, g = !1, _ = !1;
|
|
6833
6833
|
switch (e) {
|
|
6834
6834
|
case "topLeft":
|
|
6835
6835
|
g = !0, m = (e, t) => [0, 0], h = (e, t) => [e, t];
|
|
@@ -6856,7 +6856,7 @@ function Ba(e, t) {
|
|
|
6856
6856
|
_ = !0, m = (e, t) => [0, t / 2], h = (e, t) => [e, t / 2];
|
|
6857
6857
|
break;
|
|
6858
6858
|
}
|
|
6859
|
-
let v = m(o, s), y = h(o, s), b = d(...y), x =
|
|
6859
|
+
let v = m(o, s), y = h(o, s), b = d(...y), x = F._round(i + b[0]), S = F._round(a + b[1]), C = 1, w = 1, T, E;
|
|
6860
6860
|
if (t.fromKeyboard) ({deltaX: T, deltaY: E} = t);
|
|
6861
6861
|
else {
|
|
6862
6862
|
let { screenX: e, screenY: n } = t, [r, i] = A(ha, this);
|
|
@@ -6866,7 +6866,7 @@ function Ba(e, t) {
|
|
|
6866
6866
|
let e = Math.hypot(o, s);
|
|
6867
6867
|
C = w = Math.max(Math.min(Math.hypot(y[0] - v[0] - T, y[1] - v[1] - E) / e, 1 / o, 1 / s), c / o, l / s);
|
|
6868
6868
|
} else _ ? C = pt(Math.abs(y[0] - v[0] - T), c, 1) / o : w = pt(Math.abs(y[1] - v[1] - E), l, 1) / s;
|
|
6869
|
-
let O =
|
|
6869
|
+
let O = F._round(o * C), k = F._round(s * w);
|
|
6870
6870
|
b = d(...h(O, k));
|
|
6871
6871
|
let j = x - b[0], N = S - b[1];
|
|
6872
6872
|
A(xa, this) || M(xa, this, [
|
|
@@ -6888,9 +6888,9 @@ function Va() {
|
|
|
6888
6888
|
function Ha(e, t, n) {
|
|
6889
6889
|
let r = .7, i = n / t * r + 1 - r;
|
|
6890
6890
|
if (i === 1) return;
|
|
6891
|
-
let a = D(W, this, Fa).call(this, this.rotation), o = (e, t) => [a[0] * e + a[2] * t, a[1] * e + a[3] * t], [s, c] = this.parentDimensions, l = this.x, u = this.y, d = this.width, f = this.height, p =
|
|
6891
|
+
let a = D(W, this, Fa).call(this, this.rotation), o = (e, t) => [a[0] * e + a[2] * t, a[1] * e + a[3] * t], [s, c] = this.parentDimensions, l = this.x, u = this.y, d = this.width, f = this.height, p = F.MIN_SIZE / s, m = F.MIN_SIZE / c;
|
|
6892
6892
|
i = Math.max(Math.min(i, 1 / d, 1 / f), p / d, m / f);
|
|
6893
|
-
let h =
|
|
6893
|
+
let h = F._round(d * i), g = F._round(f * i);
|
|
6894
6894
|
if (h === d && g === f) return;
|
|
6895
6895
|
A(xa, this) || M(xa, this, [
|
|
6896
6896
|
l,
|
|
@@ -6898,7 +6898,7 @@ function Ha(e, t, n) {
|
|
|
6898
6898
|
d,
|
|
6899
6899
|
f
|
|
6900
6900
|
]);
|
|
6901
|
-
let _ = o(d / 2, f / 2), v =
|
|
6901
|
+
let _ = o(d / 2, f / 2), v = F._round(l + _[0]), y = F._round(u + _[1]), b = o(h / 2, g / 2);
|
|
6902
6902
|
this.x = v - b[0], this.y = y - b[1], this.width = h, this.height = g, this.setDims(), this.fixAndSetPosition(), this._onResizing();
|
|
6903
6903
|
}
|
|
6904
6904
|
function Ua() {
|
|
@@ -6947,7 +6947,7 @@ function Ka() {
|
|
|
6947
6947
|
this.div.addEventListener("focusin", this.focusin.bind(this), { signal: e }), this.div.addEventListener("focusout", this.focusout.bind(this), { signal: e });
|
|
6948
6948
|
}
|
|
6949
6949
|
function qa(e) {
|
|
6950
|
-
|
|
6950
|
+
F._resizerKeyboardManager.exec(this, e);
|
|
6951
6951
|
}
|
|
6952
6952
|
function Ja(e) {
|
|
6953
6953
|
var t;
|
|
@@ -7962,7 +7962,7 @@ t(ss, "strings", [
|
|
|
7962
7962
|
"src"
|
|
7963
7963
|
]);
|
|
7964
7964
|
var cs = class {};
|
|
7965
|
-
|
|
7965
|
+
re = cs, t(cs, "bools", [
|
|
7966
7966
|
"black",
|
|
7967
7967
|
"bold",
|
|
7968
7968
|
"disableFontFace",
|
|
@@ -7982,7 +7982,7 @@ ne = cs, t(cs, "bools", [
|
|
|
7982
7982
|
"loadedName",
|
|
7983
7983
|
"mimetype",
|
|
7984
7984
|
"name"
|
|
7985
|
-
]), t(cs, "OFFSET_NUMBERS", Math.ceil(
|
|
7985
|
+
]), t(cs, "OFFSET_NUMBERS", Math.ceil(re.bools.length * 2 / 8)), t(cs, "OFFSET_BBOX", re.OFFSET_NUMBERS + re.numbers.length * 8), t(cs, "OFFSET_FONT_MATRIX", re.OFFSET_BBOX + 1 + 8), t(cs, "OFFSET_DEFAULT_VMETRICS", re.OFFSET_FONT_MATRIX + 1 + 48), t(cs, "OFFSET_STRINGS", re.OFFSET_DEFAULT_VMETRICS + 1 + 6);
|
|
7986
7986
|
var ls = class {};
|
|
7987
7987
|
t(ls, "KIND", 0), t(ls, "HAS_BBOX", 1), t(ls, "HAS_BACKGROUND", 2), t(ls, "SHADING_TYPE", 3), t(ls, "N_COORD", 4), t(ls, "N_COLOR", 8), t(ls, "N_STOP", 12), t(ls, "N_FIGURES", 16);
|
|
7988
7988
|
var us = /* @__PURE__ */ new WeakMap(), ds = /* @__PURE__ */ new WeakMap(), fs = /* @__PURE__ */ new WeakMap(), ps = /* @__PURE__ */ new WeakSet(), ms = class {
|
|
@@ -9108,7 +9108,7 @@ function Xc(e, t, n, r, i, a, o, s) {
|
|
|
9108
9108
|
c[n * 2 + 1] > c[r * 2 + 1] && (f = n, n = r, r = f, f = a, a = o, o = f), c[r * 2 + 1] > c[i * 2 + 1] && (f = r, r = i, i = f, f = o, o = s, s = f), c[n * 2 + 1] > c[r * 2 + 1] && (f = n, n = r, r = f, f = a, a = o, o = f);
|
|
9109
9109
|
let p = (c[n * 2] + t.offsetX) * t.scaleX, m = (c[n * 2 + 1] + t.offsetY) * t.scaleY, h = (c[r * 2] + t.offsetX) * t.scaleX, g = (c[r * 2 + 1] + t.offsetY) * t.scaleY, _ = (c[i * 2] + t.offsetX) * t.scaleX, v = (c[i * 2 + 1] + t.offsetY) * t.scaleY;
|
|
9110
9110
|
if (m >= v) return;
|
|
9111
|
-
let y = l[a * 4], b = l[a * 4 + 1], x = l[a * 4 + 2], S = l[o * 4], C = l[o * 4 + 1], w = l[o * 4 + 2], T = l[s * 4], E = l[s * 4 + 1], D = l[s * 4 + 2], O = Math.round(m), k = Math.round(v), A, j, M, N, ee, P,
|
|
9111
|
+
let y = l[a * 4], b = l[a * 4 + 1], x = l[a * 4 + 2], S = l[o * 4], C = l[o * 4 + 1], w = l[o * 4 + 2], T = l[s * 4], E = l[s * 4 + 1], D = l[s * 4 + 2], O = Math.round(m), k = Math.round(v), A, j, M, N, ee, P, te, ne;
|
|
9112
9112
|
for (let e = O; e <= k; e++) {
|
|
9113
9113
|
if (e < g) {
|
|
9114
9114
|
let t = e < m ? 0 : (m - e) / (m - g);
|
|
@@ -9118,9 +9118,9 @@ function Xc(e, t, n, r, i, a, o, s) {
|
|
|
9118
9118
|
t = e > v ? 1 : g === v ? 0 : (g - e) / (g - v), A = h - (h - _) * t, j = S - (S - T) * t, M = C - (C - E) * t, N = w - (w - D) * t;
|
|
9119
9119
|
}
|
|
9120
9120
|
let t;
|
|
9121
|
-
t = e < m ? 0 : e > v ? 1 : (m - e) / (m - v), ee = p - (p - _) * t, P = y - (y - T) * t,
|
|
9121
|
+
t = e < m ? 0 : e > v ? 1 : (m - e) / (m - v), ee = p - (p - _) * t, P = y - (y - T) * t, te = b - (b - E) * t, ne = x - (x - D) * t;
|
|
9122
9122
|
let n = Math.round(Math.min(A, ee)), r = Math.round(Math.max(A, ee)), i = d * e + n * 4;
|
|
9123
|
-
for (let e = n; e <= r; e++) t = (A - e) / (A - ee), t < 0 ? t = 0 : t > 1 && (t = 1), u[i++] = j - (j - P) * t | 0, u[i++] = M - (M -
|
|
9123
|
+
for (let e = n; e <= r; e++) t = (A - e) / (A - ee), t < 0 ? t = 0 : t > 1 && (t = 1), u[i++] = j - (j - P) * t | 0, u[i++] = M - (M - te) * t | 0, u[i++] = N - (N - ne) * t | 0, u[i++] = 255;
|
|
9124
9124
|
}
|
|
9125
9125
|
}
|
|
9126
9126
|
var Zc = class extends Jc {
|
|
@@ -11612,11 +11612,11 @@ var id = class {
|
|
|
11612
11612
|
}
|
|
11613
11613
|
}
|
|
11614
11614
|
};
|
|
11615
|
-
|
|
11615
|
+
ie = Dd;
|
|
11616
11616
|
function Od(e) {
|
|
11617
11617
|
var t;
|
|
11618
11618
|
if (A(ld, this)) return;
|
|
11619
|
-
(t = A(pd, this)).ctx != null || (t.ctx = jd.call(
|
|
11619
|
+
(t = A(pd, this)).ctx != null || (t.ctx = jd.call(ie, A(fd, this)));
|
|
11620
11620
|
let n = A(Cd, this), r = A(xd, this);
|
|
11621
11621
|
for (let t of e) {
|
|
11622
11622
|
if (n.length > ad) {
|
|
@@ -11645,8 +11645,8 @@ function kd(e) {
|
|
|
11645
11645
|
let r = H.transform(A(Td, this), e.transform), i = Math.atan2(r[1], r[0]), a = A(bd, this)[e.fontName];
|
|
11646
11646
|
a.vertical && (i += Math.PI / 2);
|
|
11647
11647
|
let o = A(ud, this) && a.fontSubstitution || a.fontFamily;
|
|
11648
|
-
o =
|
|
11649
|
-
let s = Math.hypot(r[2], r[3]), c = s * Pd.call(
|
|
11648
|
+
o = ie.fontFamilyMap.get(o) || o;
|
|
11649
|
+
let s = Math.hypot(r[2], r[3]), c = s * Pd.call(ie, o, a, A(fd, this)), l, u;
|
|
11650
11650
|
i === 0 ? (l = r[4], u = r[5] - c) : (l = r[4] + c * Math.sin(i), u = r[5] - c * Math.cos(i));
|
|
11651
11651
|
let d = t.style;
|
|
11652
11652
|
d.left = `${(100 * l / A(hd, this)).toFixed(2)}%`, d.top = `${(100 * u / A(md, this)).toFixed(2)}%`, d.setProperty("--font-height", `${s.toFixed(2)}px`), d.fontFamily = o, n.fontSize = s, t.setAttribute("role", "presentation"), t.textContent = e.str, t.dir = e.dir, A(ud, this) && (t.dataset.fontName = a.fontSubstitutionLoadedName || e.fontName), i !== 0 && (n.angle = 180 / Math.PI * i);
|
|
@@ -11665,20 +11665,20 @@ function Ad(e) {
|
|
|
11665
11665
|
let { div: t, properties: n, ctx: r } = e, { style: i } = t;
|
|
11666
11666
|
if (n.canvasWidth !== 0 && n.hasText) {
|
|
11667
11667
|
let { fontFamily: e } = i, { canvasWidth: a, fontSize: o } = n;
|
|
11668
|
-
Md.call(
|
|
11668
|
+
Md.call(ie, r, o * A(yd, this), e);
|
|
11669
11669
|
let { width: s } = r.measureText(t.textContent);
|
|
11670
11670
|
s > 0 && i.setProperty("--scale-x", a * A(yd, this) / s);
|
|
11671
11671
|
}
|
|
11672
11672
|
n.angle !== 0 && i.setProperty("--rotate", `${n.angle}deg`);
|
|
11673
11673
|
}
|
|
11674
11674
|
function jd(e = null) {
|
|
11675
|
-
let t = D(
|
|
11675
|
+
let t = D(ie, this, Id)._.get(e || (e = ""));
|
|
11676
11676
|
if (!t) {
|
|
11677
11677
|
let n = document.createElement("canvas");
|
|
11678
11678
|
n.className = "hiddenCanvasElement", n.lang = e, document.body.append(n), t = n.getContext("2d", {
|
|
11679
11679
|
alpha: !1,
|
|
11680
11680
|
willReadFrequently: !0
|
|
11681
|
-
}), D(
|
|
11681
|
+
}), D(ie, this, Id)._.set(e, t), D(ie, this, Ld)._.set(t, {
|
|
11682
11682
|
size: 0,
|
|
11683
11683
|
family: ""
|
|
11684
11684
|
});
|
|
@@ -11686,31 +11686,31 @@ function jd(e = null) {
|
|
|
11686
11686
|
return t;
|
|
11687
11687
|
}
|
|
11688
11688
|
function Md(e, t, n) {
|
|
11689
|
-
let r = D(
|
|
11689
|
+
let r = D(ie, this, Ld)._.get(e);
|
|
11690
11690
|
t === r.size && n === r.family || (e.font = `${t}px ${n}`, r.size = t, r.family = n);
|
|
11691
11691
|
}
|
|
11692
11692
|
function Nd() {
|
|
11693
|
-
if (D(
|
|
11693
|
+
if (D(ie, this, Rd)._ !== null) return;
|
|
11694
11694
|
let e = document.createElement("div");
|
|
11695
|
-
e.style.opacity = 0, e.style.lineHeight = 1, e.style.fontSize = "1px", e.style.position = "absolute", e.textContent = "X", document.body.append(e), Rd._ = D(
|
|
11695
|
+
e.style.opacity = 0, e.style.lineHeight = 1, e.style.fontSize = "1px", e.style.position = "absolute", e.textContent = "X", document.body.append(e), Rd._ = D(ie, this, e.getBoundingClientRect().height), e.remove();
|
|
11696
11696
|
}
|
|
11697
11697
|
function Pd(e, t, n) {
|
|
11698
|
-
let r = D(
|
|
11698
|
+
let r = D(ie, this, Fd)._.get(e);
|
|
11699
11699
|
if (r) return r;
|
|
11700
|
-
let i = D(
|
|
11701
|
-
i.canvas.width = i.canvas.height = od, D(
|
|
11700
|
+
let i = D(ie, this, jd).call(this, n);
|
|
11701
|
+
i.canvas.width = i.canvas.height = od, D(ie, this, Md).call(this, i, od, e);
|
|
11702
11702
|
let a = i.measureText(""), o = a.fontBoundingBoxAscent, s = Math.abs(a.fontBoundingBoxDescent);
|
|
11703
11703
|
i.canvas.width = i.canvas.height = 0;
|
|
11704
11704
|
let c = .8;
|
|
11705
|
-
return o ? c = o / (o + s) : (et.platform.isFirefox && B("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."), t.ascent ? c = t.ascent : t.descent && (c = 1 + t.descent)), D(
|
|
11705
|
+
return o ? c = o / (o + s) : (et.platform.isFirefox && B("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."), t.ascent ? c = t.ascent : t.descent && (c = 1 + t.descent)), D(ie, this, Fd)._.set(e, c), c;
|
|
11706
11706
|
}
|
|
11707
11707
|
var Fd = { _: /* @__PURE__ */ new Map() }, Id = { _: /* @__PURE__ */ new Map() }, Ld = { _: /* @__PURE__ */ new WeakMap() }, Rd = { _: null }, zd = { _: /* @__PURE__ */ new Set() }, Bd = 100;
|
|
11708
11708
|
function Vd(e = {}) {
|
|
11709
11709
|
var t;
|
|
11710
11710
|
typeof e == "string" || e instanceof URL ? e = { url: e } : (e instanceof ArrayBuffer || ArrayBuffer.isView(e)) && (e = { data: e });
|
|
11711
|
-
let n = new Hd(), { docId: r } = n, i = e.url ? Fs(e.url) : null, a = e.data ? Is(e.data) : null, o = e.httpHeaders || null, s = e.withCredentials === !0, c = (t = e.password) == null ? null : t, l = e.range instanceof Kd ? e.range : null, u = Number.isInteger(e.rangeChunkSize) && e.rangeChunkSize > 0 ? e.rangeChunkSize : Math.pow(2, 16), d = e.worker instanceof af ? e.worker : null, f = e.verbosity, p = typeof e.docBaseUrl == "string" && !St(e.docBaseUrl) ? e.docBaseUrl : null, m = Ls(e.cMapUrl), h = e.cMapPacked !== !1, g = Ls(e.iccUrl), _ = Ls(e.standardFontDataUrl), v = Ls(e.wasmUrl), y = e.stopAtErrors !== !0, b = Number.isInteger(e.maxImageSize) && e.maxImageSize > -1 ? e.maxImageSize : -1, x = typeof e.isOffscreenCanvasSupported == "boolean" ? e.isOffscreenCanvasSupported : !_e, S = typeof e.isImageDecoderSupported == "boolean" ? e.isImageDecoderSupported : !_e && (et.platform.isFirefox || !globalThis.chrome), C = Number.isInteger(e.canvasMaxAreaInBytes) ? e.canvasMaxAreaInBytes : -1, w = typeof e.disableFontFace == "boolean" ? e.disableFontFace : _e, T = e.fontExtraProperties === !0, E = e.enableXfa === !0, D = e.ownerDocument || globalThis.document, O = e.disableRange === !0, k = e.disableStream === !0, A = e.disableAutoFetch === !0, j = e.pdfBug === !0, M = e.CanvasFactory || (_e ? jc : ac), N = e.FilterFactory || (_e ? Ac : mc), ee = e.BinaryDataFactory || (_e ? Mc : nc), P = e.enableHWA === !0,
|
|
11711
|
+
let n = new Hd(), { docId: r } = n, i = e.url ? Fs(e.url) : null, a = e.data ? Is(e.data) : null, o = e.httpHeaders || null, s = e.withCredentials === !0, c = (t = e.password) == null ? null : t, l = e.range instanceof Kd ? e.range : null, u = Number.isInteger(e.rangeChunkSize) && e.rangeChunkSize > 0 ? e.rangeChunkSize : Math.pow(2, 16), d = e.worker instanceof af ? e.worker : null, f = e.verbosity, p = typeof e.docBaseUrl == "string" && !St(e.docBaseUrl) ? e.docBaseUrl : null, m = Ls(e.cMapUrl), h = e.cMapPacked !== !1, g = Ls(e.iccUrl), _ = Ls(e.standardFontDataUrl), v = Ls(e.wasmUrl), y = e.stopAtErrors !== !0, b = Number.isInteger(e.maxImageSize) && e.maxImageSize > -1 ? e.maxImageSize : -1, x = typeof e.isOffscreenCanvasSupported == "boolean" ? e.isOffscreenCanvasSupported : !_e, S = typeof e.isImageDecoderSupported == "boolean" ? e.isImageDecoderSupported : !_e && (et.platform.isFirefox || !globalThis.chrome), C = Number.isInteger(e.canvasMaxAreaInBytes) ? e.canvasMaxAreaInBytes : -1, w = typeof e.disableFontFace == "boolean" ? e.disableFontFace : _e, T = e.fontExtraProperties === !0, E = e.enableXfa === !0, D = e.ownerDocument || globalThis.document, O = e.disableRange === !0, k = e.disableStream === !0, A = e.disableAutoFetch === !0, j = e.pdfBug === !0, M = e.CanvasFactory || (_e ? jc : ac), N = e.FilterFactory || (_e ? Ac : mc), ee = e.BinaryDataFactory || (_e ? Mc : nc), P = e.enableHWA === !0, te = e.enableWebGPU === !0 ? Hc() : Promise.resolve(!1), ne = e.useWasm !== !1, F = e.pagesMapper || new Zu(), re = typeof e.useSystemFonts == "boolean" ? e.useSystemFonts : !_e && !w, ie = typeof e.useWorkerFetch == "boolean" ? e.useWorkerFetch : !!(ee === nc && m && h && _ && v && Ot(m, document.baseURI) && Ot(_, document.baseURI) && Ot(v, document.baseURI));
|
|
11712
11712
|
Fe(f);
|
|
11713
|
-
let
|
|
11713
|
+
let ae = {
|
|
11714
11714
|
canvasFactory: new M({
|
|
11715
11715
|
ownerDocument: D,
|
|
11716
11716
|
enableHWA: P
|
|
@@ -11719,7 +11719,7 @@ function Vd(e = {}) {
|
|
|
11719
11719
|
docId: r,
|
|
11720
11720
|
ownerDocument: D
|
|
11721
11721
|
}),
|
|
11722
|
-
binaryDataFactory:
|
|
11722
|
+
binaryDataFactory: ie ? null : new ee({
|
|
11723
11723
|
cMapUrl: m,
|
|
11724
11724
|
standardFontDataUrl: _,
|
|
11725
11725
|
wasmUrl: v
|
|
@@ -11729,7 +11729,7 @@ function Vd(e = {}) {
|
|
|
11729
11729
|
verbosity: f,
|
|
11730
11730
|
port: Eu.workerPort
|
|
11731
11731
|
}), n._worker = d);
|
|
11732
|
-
let
|
|
11732
|
+
let oe = {
|
|
11733
11733
|
docId: r,
|
|
11734
11734
|
apiVersion: "5.7.284",
|
|
11735
11735
|
data: a,
|
|
@@ -11746,9 +11746,9 @@ function Vd(e = {}) {
|
|
|
11746
11746
|
isImageDecoderSupported: S,
|
|
11747
11747
|
canvasMaxAreaInBytes: C,
|
|
11748
11748
|
fontExtraProperties: T,
|
|
11749
|
-
useSystemFonts:
|
|
11750
|
-
useWasm:
|
|
11751
|
-
useWorkerFetch:
|
|
11749
|
+
useSystemFonts: re,
|
|
11750
|
+
useWasm: ne,
|
|
11751
|
+
useWorkerFetch: ie,
|
|
11752
11752
|
cMapUrl: m,
|
|
11753
11753
|
cMapPacked: h,
|
|
11754
11754
|
iccUrl: g,
|
|
@@ -11756,7 +11756,7 @@ function Vd(e = {}) {
|
|
|
11756
11756
|
wasmUrl: v,
|
|
11757
11757
|
hasGPU: !1
|
|
11758
11758
|
}
|
|
11759
|
-
},
|
|
11759
|
+
}, I = {
|
|
11760
11760
|
ownerDocument: D,
|
|
11761
11761
|
pdfBug: j,
|
|
11762
11762
|
styleElement: null,
|
|
@@ -11766,11 +11766,11 @@ function Vd(e = {}) {
|
|
|
11766
11766
|
enableXfa: E
|
|
11767
11767
|
}
|
|
11768
11768
|
};
|
|
11769
|
-
return Promise.all([d.promise,
|
|
11769
|
+
return Promise.all([d.promise, te]).then(function([, e]) {
|
|
11770
11770
|
if (n.destroyed) throw Error("Loading aborted");
|
|
11771
11771
|
if (d.destroyed) throw Error("Worker was destroyed");
|
|
11772
|
-
|
|
11773
|
-
let t = d.messageHandler.sendWithPromise("GetDocRequest",
|
|
11772
|
+
oe.evaluatorOptions.hasGPU = e;
|
|
11773
|
+
let t = d.messageHandler.sendWithPromise("GetDocRequest", oe, a ? [a.buffer] : null), c;
|
|
11774
11774
|
if (!a) if (l) c = new Jl({
|
|
11775
11775
|
pdfDataRangeTransport: l,
|
|
11776
11776
|
disableRange: O,
|
|
@@ -11789,7 +11789,7 @@ function Vd(e = {}) {
|
|
|
11789
11789
|
if (n.destroyed) throw Error("Loading aborted");
|
|
11790
11790
|
if (d.destroyed) throw Error("Worker was destroyed");
|
|
11791
11791
|
let t = new Ys(r, e, d.port);
|
|
11792
|
-
n._transport = new Sf(t, n, c,
|
|
11792
|
+
n._transport = new Sf(t, n, c, I, ae, F), t.send("Ready", null);
|
|
11793
11793
|
});
|
|
11794
11794
|
}).catch(n._capability.reject), n;
|
|
11795
11795
|
}
|
|
@@ -12310,7 +12310,7 @@ var $d = /* @__PURE__ */ new WeakMap(), ef = /* @__PURE__ */ new WeakMap(), tf =
|
|
|
12310
12310
|
return V(this, "_setupFakeWorkerGlobal", n());
|
|
12311
12311
|
}
|
|
12312
12312
|
};
|
|
12313
|
-
|
|
12313
|
+
ae = af;
|
|
12314
12314
|
function of() {
|
|
12315
12315
|
A($d, this).resolve(), A(ef, this).send("configure", { verbosity: this.verbosity });
|
|
12316
12316
|
}
|
|
@@ -12318,13 +12318,13 @@ function sf(e) {
|
|
|
12318
12318
|
M(tf, this, e), M(ef, this, new Ys("main", "worker", e)), A(ef, this).on("ready", () => {}), D(rf, this, of).call(this);
|
|
12319
12319
|
}
|
|
12320
12320
|
function cf() {
|
|
12321
|
-
if (ff._ || uf.call(
|
|
12321
|
+
if (ff._ || uf.call(ae)) {
|
|
12322
12322
|
D(rf, this, lf).call(this);
|
|
12323
12323
|
return;
|
|
12324
12324
|
}
|
|
12325
|
-
let { workerSrc: e } =
|
|
12325
|
+
let { workerSrc: e } = ae;
|
|
12326
12326
|
try {
|
|
12327
|
-
|
|
12327
|
+
ae._isSameOrigin(window.location, e) || (e = ae._createCDNWrapper(new URL(e, window.location).href));
|
|
12328
12328
|
let t = new Worker(e, { type: "module" }), n = new Ys("main", "worker", t), r = () => {
|
|
12329
12329
|
i.abort(), n.destroy(), t.terminate(), this.destroyed ? A($d, this).reject(/* @__PURE__ */ Error("Worker was destroyed")) : D(rf, this, lf).call(this);
|
|
12330
12330
|
}, i = new AbortController();
|
|
@@ -12359,7 +12359,7 @@ function cf() {
|
|
|
12359
12359
|
D(rf, this, lf).call(this);
|
|
12360
12360
|
}
|
|
12361
12361
|
function lf() {
|
|
12362
|
-
ff._ || (B("Setting up fake worker."), ff._ = !0),
|
|
12362
|
+
ff._ || (B("Setting up fake worker."), ff._ = !0), ae._setupFakeWorkerGlobal.then((e) => {
|
|
12363
12363
|
var t, n;
|
|
12364
12364
|
if (this.destroyed) {
|
|
12365
12365
|
A($d, this).reject(/* @__PURE__ */ Error("Worker was destroyed"));
|
|
@@ -12382,12 +12382,12 @@ function uf() {
|
|
|
12382
12382
|
}
|
|
12383
12383
|
}
|
|
12384
12384
|
var df = { _: 0 }, ff = { _: !1 }, pf = { _: /* @__PURE__ */ new WeakMap() };
|
|
12385
|
-
_e && (ff._ = D(
|
|
12385
|
+
_e && (ff._ = D(ae, ae, !0), Eu.workerSrc || (Eu.workerSrc = "./pdf.worker.mjs")), ae._isSameOrigin = (e, t) => {
|
|
12386
12386
|
let n = URL.parse(e);
|
|
12387
12387
|
if (!(n != null && n.origin) || n.origin === "null") return !1;
|
|
12388
12388
|
let r = new URL(t, n);
|
|
12389
12389
|
return n.origin === r.origin;
|
|
12390
|
-
},
|
|
12390
|
+
}, ae._createCDNWrapper = (e) => {
|
|
12391
12391
|
let t = `await import("${e}");`;
|
|
12392
12392
|
return URL.createObjectURL(new Blob([t], { type: "text/javascript" }));
|
|
12393
12393
|
};
|
|
@@ -12952,7 +12952,7 @@ var jf = /* @__PURE__ */ new WeakMap(), Mf = /* @__PURE__ */ new WeakMap(), Nf =
|
|
|
12952
12952
|
(e = A(jf, this)) == null || e.remove(), M(jf, this, null), M(Mf, this, null), (t = A(Pf, this)) == null || t.remove(), M(Pf, this, null);
|
|
12953
12953
|
}
|
|
12954
12954
|
};
|
|
12955
|
-
|
|
12955
|
+
oe = Hf;
|
|
12956
12956
|
function Uf() {
|
|
12957
12957
|
let e = document.createElement("div"), t = A(Bf, this)._signal;
|
|
12958
12958
|
e.addEventListener("contextmenu", kt, { signal: t }), e.className = "dropdown", e.role = "listbox", e.ariaMultiSelectable = "false", e.ariaOrientation = "vertical", e.setAttribute("data-l10n-id", "pdfjs-editor-colorpicker-dropdown"), A(Lf, this) && (e.id = `${A(Lf, this).id}_colorpicker_dropdown`);
|
|
@@ -12972,7 +12972,7 @@ function Wf(e, t) {
|
|
|
12972
12972
|
}), this.updateColor(e);
|
|
12973
12973
|
}
|
|
12974
12974
|
function Gf(e) {
|
|
12975
|
-
|
|
12975
|
+
oe._keyboardManager.exec(this, e);
|
|
12976
12976
|
}
|
|
12977
12977
|
function Kf(e) {
|
|
12978
12978
|
if (Jf.call(D(Vf, this))) {
|
|
@@ -15219,7 +15219,7 @@ var ih = /\r\n?|\n/g, ah = /* @__PURE__ */ new WeakMap(), oh = /* @__PURE__ */ n
|
|
|
15219
15219
|
super.resetAnnotationElement(e), e.resetEdited();
|
|
15220
15220
|
}
|
|
15221
15221
|
};
|
|
15222
|
-
|
|
15222
|
+
I = uh;
|
|
15223
15223
|
function dh(e) {
|
|
15224
15224
|
let t = (e) => {
|
|
15225
15225
|
this.editorDiv.style.fontSize = `calc(${e}px * var(--total-scale-factor))`, this.translate(0, -(e - A(ch, this)) * this.parentScale), M(ch, this, e), D(lh, this, mh).call(this);
|
|
@@ -15252,7 +15252,7 @@ function ph() {
|
|
|
15252
15252
|
let e = [];
|
|
15253
15253
|
this.editorDiv.normalize();
|
|
15254
15254
|
let t = null;
|
|
15255
|
-
for (let n of this.editorDiv.childNodes) (t == null ? void 0 : t.nodeType) === Node.TEXT_NODE && n.nodeName === "BR" || (e.push(hh.call(
|
|
15255
|
+
for (let n of this.editorDiv.childNodes) (t == null ? void 0 : t.nodeType) === Node.TEXT_NODE && n.nodeName === "BR" || (e.push(hh.call(I, n)), t = n);
|
|
15256
15256
|
return e.join("\n");
|
|
15257
15257
|
}
|
|
15258
15258
|
function mh() {
|
|
@@ -18980,7 +18980,7 @@ var Ay, jy, My, Ny, Py = {
|
|
|
18980
18980
|
};
|
|
18981
18981
|
},
|
|
18982
18982
|
4644(e, t, n) {
|
|
18983
|
-
var r = n(7811), i = n(3724), a = n(4576), o = n(4901), s = n(34), c = n(9297), l = n(6955), u = n(6823), d = n(6699), f = n(6840), p = n(2106), m = n(1625), h = n(2787), g = n(2967), _ = n(8227), v = n(3392), y = n(1181), b = y.enforce, x = y.get, S = a.Int8Array, C = S && S.prototype, w = a.Uint8ClampedArray, T = w && w.prototype, E = S && h(S), D = C && h(C), O = Object.prototype, k = a.TypeError, A = _("toStringTag"), j = v("TYPED_ARRAY_TAG"), M = "TypedArrayConstructor", N = r && !!g && l(a.opera) !== "Opera", ee = !1, P,
|
|
18983
|
+
var r = n(7811), i = n(3724), a = n(4576), o = n(4901), s = n(34), c = n(9297), l = n(6955), u = n(6823), d = n(6699), f = n(6840), p = n(2106), m = n(1625), h = n(2787), g = n(2967), _ = n(8227), v = n(3392), y = n(1181), b = y.enforce, x = y.get, S = a.Int8Array, C = S && S.prototype, w = a.Uint8ClampedArray, T = w && w.prototype, E = S && h(S), D = C && h(C), O = Object.prototype, k = a.TypeError, A = _("toStringTag"), j = v("TYPED_ARRAY_TAG"), M = "TypedArrayConstructor", N = r && !!g && l(a.opera) !== "Opera", ee = !1, P, te, ne, F = {
|
|
18984
18984
|
Int8Array: 1,
|
|
18985
18985
|
Uint8Array: 1,
|
|
18986
18986
|
Uint8ClampedArray: 1,
|
|
@@ -18990,32 +18990,32 @@ var Ay, jy, My, Ny, Py = {
|
|
|
18990
18990
|
Uint32Array: 4,
|
|
18991
18991
|
Float32Array: 4,
|
|
18992
18992
|
Float64Array: 8
|
|
18993
|
-
},
|
|
18993
|
+
}, re = {
|
|
18994
18994
|
BigInt64Array: 8,
|
|
18995
18995
|
BigUint64Array: 8
|
|
18996
|
-
},
|
|
18996
|
+
}, ie = function(e) {
|
|
18997
18997
|
if (!s(e)) return !1;
|
|
18998
18998
|
var t = l(e);
|
|
18999
|
-
return t === "DataView" || c(
|
|
19000
|
-
},
|
|
18999
|
+
return t === "DataView" || c(F, t) || c(re, t);
|
|
19000
|
+
}, ae = function(e) {
|
|
19001
19001
|
var t = h(e);
|
|
19002
19002
|
if (s(t)) {
|
|
19003
19003
|
var n = x(t);
|
|
19004
|
-
return n && c(n, M) ? n[M] :
|
|
19004
|
+
return n && c(n, M) ? n[M] : ae(t);
|
|
19005
19005
|
}
|
|
19006
|
-
},
|
|
19006
|
+
}, oe = function(e) {
|
|
19007
19007
|
if (!s(e)) return !1;
|
|
19008
19008
|
var t = l(e);
|
|
19009
|
-
return c(
|
|
19010
|
-
},
|
|
19011
|
-
if (
|
|
19009
|
+
return c(F, t) || c(re, t);
|
|
19010
|
+
}, I = function(e) {
|
|
19011
|
+
if (oe(e)) return e;
|
|
19012
19012
|
throw new k("Target is not a typed array");
|
|
19013
19013
|
}, se = function(e) {
|
|
19014
19014
|
if (o(e) && (!g || m(E, e))) return e;
|
|
19015
19015
|
throw new k(u(e) + " is not a typed array constructor");
|
|
19016
19016
|
}, ce = function(e, t, n, r) {
|
|
19017
19017
|
if (i) {
|
|
19018
|
-
if (n) for (var o in
|
|
19018
|
+
if (n) for (var o in F) {
|
|
19019
19019
|
var s = a[o];
|
|
19020
19020
|
if (s && c(s.prototype, e)) try {
|
|
19021
19021
|
delete s.prototype[e];
|
|
@@ -19032,7 +19032,7 @@ var Ay, jy, My, Ny, Py = {
|
|
|
19032
19032
|
if (i) {
|
|
19033
19033
|
if (g) {
|
|
19034
19034
|
if (n) {
|
|
19035
|
-
for (r in
|
|
19035
|
+
for (r in F) if (o = a[r], o && c(o, e)) try {
|
|
19036
19036
|
delete o[e];
|
|
19037
19037
|
} catch (e) {}
|
|
19038
19038
|
}
|
|
@@ -19041,31 +19041,31 @@ var Ay, jy, My, Ny, Py = {
|
|
|
19041
19041
|
} catch (e) {}
|
|
19042
19042
|
else return;
|
|
19043
19043
|
}
|
|
19044
|
-
for (r in
|
|
19044
|
+
for (r in F) o = a[r], o && (!o[e] || n) && f(o, e, t);
|
|
19045
19045
|
}
|
|
19046
19046
|
};
|
|
19047
|
-
for (P in
|
|
19048
|
-
for (P in
|
|
19047
|
+
for (P in F) te = a[P], ne = te && te.prototype, ne ? b(ne)[M] = te : N = !1;
|
|
19048
|
+
for (P in re) te = a[P], ne = te && te.prototype, ne && (b(ne)[M] = te);
|
|
19049
19049
|
if ((!N || !o(E) || E === Function.prototype) && (E = function() {
|
|
19050
19050
|
throw new k("Incorrect invocation");
|
|
19051
|
-
}, N)) for (P in
|
|
19052
|
-
if ((!N || !D || D === O) && (D = E.prototype, N)) for (P in
|
|
19051
|
+
}, N)) for (P in F) a[P] && g(a[P], E);
|
|
19052
|
+
if ((!N || !D || D === O) && (D = E.prototype, N)) for (P in F) a[P] && g(a[P].prototype, D);
|
|
19053
19053
|
if (N && h(T) !== D && g(T, D), i && !c(D, A)) for (P in ee = !0, p(D, A, {
|
|
19054
19054
|
configurable: !0,
|
|
19055
19055
|
get: function() {
|
|
19056
19056
|
return s(this) ? this[j] : void 0;
|
|
19057
19057
|
}
|
|
19058
|
-
}),
|
|
19058
|
+
}), F) a[P] && d(a[P].prototype, j, P);
|
|
19059
19059
|
e.exports = {
|
|
19060
19060
|
NATIVE_ARRAY_BUFFER_VIEWS: N,
|
|
19061
19061
|
TYPED_ARRAY_TAG: ee && j,
|
|
19062
|
-
aTypedArray:
|
|
19062
|
+
aTypedArray: I,
|
|
19063
19063
|
aTypedArrayConstructor: se,
|
|
19064
19064
|
exportTypedArrayMethod: ce,
|
|
19065
19065
|
exportTypedArrayStaticMethod: le,
|
|
19066
|
-
getTypedArrayConstructor:
|
|
19067
|
-
isView:
|
|
19068
|
-
isTypedArray:
|
|
19066
|
+
getTypedArrayConstructor: ae,
|
|
19067
|
+
isView: ie,
|
|
19068
|
+
isTypedArray: oe,
|
|
19069
19069
|
TypedArray: E,
|
|
19070
19070
|
TypedArrayPrototype: D
|
|
19071
19071
|
};
|
|
@@ -20567,31 +20567,31 @@ var Ay, jy, My, Ny, Py = {
|
|
|
20567
20567
|
9112(e, t, n) {
|
|
20568
20568
|
var r = n(6518), i = n(3724), a = n(4576), o = n(7751), s = n(9504), c = n(9565), l = n(4901), u = n(34), d = n(4376), f = n(9297), p = n(655), m = n(6198), h = n(4659), g = n(9039), _ = n(8235), v = n(4495), y = a.JSON, b = a.Number, x = a.SyntaxError, S = y && y.parse, C = o("Object", "keys"), w = Object.getOwnPropertyDescriptor, T = s("".charAt), E = s("".slice), D = s(/./.exec), O = s([].push), k = /^\d$/, A = /^[1-9]$/, j = /^[\d-]$/, M = /^[\t\n\r ]$/, N = 0, ee = 1, P = function(e, t) {
|
|
20569
20569
|
e = p(e);
|
|
20570
|
-
var n = new
|
|
20570
|
+
var n = new re(e, 0, ""), r = n.parse(), i = r.value, a = n.skip(M, r.end);
|
|
20571
20571
|
if (a < e.length) throw new x("Unexpected extra character: \"" + T(e, a) + "\" after the parsed data at: " + a);
|
|
20572
|
-
return l(t) ?
|
|
20573
|
-
},
|
|
20572
|
+
return l(t) ? te({ "": i }, "", t, r) : i;
|
|
20573
|
+
}, te = function(e, t, n, r) {
|
|
20574
20574
|
var i = e[t], a = r && i === r.value, o = a && typeof r.source == "string" ? { source: r.source } : {}, s, l, p, h, g;
|
|
20575
20575
|
if (u(i)) {
|
|
20576
20576
|
var _ = d(i), v = a ? r.nodes : _ ? [] : {};
|
|
20577
|
-
if (_) for (s = v.length, p = m(i), h = 0; h < p; h++)
|
|
20578
|
-
else for (l = C(i), p = m(l), h = 0; h < p; h++) g = l[h],
|
|
20577
|
+
if (_) for (s = v.length, p = m(i), h = 0; h < p; h++) ne(i, h, te(i, "" + h, n, h < s ? v[h] : void 0));
|
|
20578
|
+
else for (l = C(i), p = m(l), h = 0; h < p; h++) g = l[h], ne(i, g, te(i, g, n, f(v, g) ? v[g] : void 0));
|
|
20579
20579
|
}
|
|
20580
20580
|
return c(n, e, t, i, o);
|
|
20581
|
-
},
|
|
20581
|
+
}, ne = function(e, t, n) {
|
|
20582
20582
|
if (i) {
|
|
20583
20583
|
var r = w(e, t);
|
|
20584
20584
|
if (r && !r.configurable) return;
|
|
20585
20585
|
}
|
|
20586
20586
|
n === void 0 ? delete e[t] : h(e, t, n);
|
|
20587
|
-
},
|
|
20587
|
+
}, F = function(e, t, n, r) {
|
|
20588
20588
|
this.value = e, this.end = t, this.source = n, this.nodes = r;
|
|
20589
|
-
},
|
|
20589
|
+
}, re = function(e, t) {
|
|
20590
20590
|
this.source = e, this.index = t;
|
|
20591
20591
|
};
|
|
20592
|
-
|
|
20592
|
+
re.prototype = {
|
|
20593
20593
|
fork: function(e) {
|
|
20594
|
-
return new
|
|
20594
|
+
return new re(this.source, e);
|
|
20595
20595
|
},
|
|
20596
20596
|
parse: function() {
|
|
20597
20597
|
var e = this.source, t = this.skip(M, this.index), n = this.fork(t), r = T(e, t);
|
|
@@ -20607,7 +20607,7 @@ var Ay, jy, My, Ny, Py = {
|
|
|
20607
20607
|
throw new x("Unexpected character: \"" + r + "\" at: " + t);
|
|
20608
20608
|
},
|
|
20609
20609
|
node: function(e, t, n, r, i) {
|
|
20610
|
-
return new
|
|
20610
|
+
return new F(t, r, e ? null : E(this.source, n, r), i);
|
|
20611
20611
|
},
|
|
20612
20612
|
object: function() {
|
|
20613
20613
|
for (var e = this.source, t = this.index + 1, n = !1, r = {}, i = {}, a = !1; t < e.length;) {
|
|
@@ -20678,20 +20678,20 @@ var Ay, jy, My, Ny, Py = {
|
|
|
20678
20678
|
throw new x("Unexpected character: \"" + n + "\" at: " + t);
|
|
20679
20679
|
}
|
|
20680
20680
|
};
|
|
20681
|
-
var
|
|
20681
|
+
var ie = g(function() {
|
|
20682
20682
|
var e = "9007199254740993", t;
|
|
20683
20683
|
return S(e, function(e, n, r) {
|
|
20684
20684
|
t = r.source;
|
|
20685
20685
|
}), t !== e;
|
|
20686
|
-
}),
|
|
20686
|
+
}), ae = v && !g(function() {
|
|
20687
20687
|
return 1 / S("-0 ") != -Infinity;
|
|
20688
20688
|
});
|
|
20689
20689
|
r({
|
|
20690
20690
|
target: "JSON",
|
|
20691
20691
|
stat: !0,
|
|
20692
|
-
forced:
|
|
20692
|
+
forced: ie
|
|
20693
20693
|
}, { parse: function(e, t) {
|
|
20694
|
-
return
|
|
20694
|
+
return ae && !l(t) ? S(e) : P(e, t);
|
|
20695
20695
|
} });
|
|
20696
20696
|
},
|
|
20697
20697
|
3110(e, t, n) {
|
|
@@ -20700,15 +20700,15 @@ var Ay, jy, My, Ny, Py = {
|
|
|
20700
20700
|
return x([e]) !== "[null]" || x({ a: e }) !== "{}" || x(Object(e)) !== "{}";
|
|
20701
20701
|
}), P = c(function() {
|
|
20702
20702
|
return x("\udf06\ud834") !== "\"\\udf06\\ud834\"" || x("\udead") !== "\"\\udead\"";
|
|
20703
|
-
}),
|
|
20704
|
-
var n = h(arguments), r =
|
|
20703
|
+
}), te = ee ? function(e, t) {
|
|
20704
|
+
var n = h(arguments), r = F(t);
|
|
20705
20705
|
if (!(!u(r) && (e === void 0 || f(e)))) return n[1] = function(e, t) {
|
|
20706
20706
|
if (u(r) && (t = o(r, this, b(e), t)), !f(t)) return t;
|
|
20707
20707
|
}, a(x, null, n);
|
|
20708
|
-
} : x,
|
|
20708
|
+
} : x, ne = function(e, t, n) {
|
|
20709
20709
|
var r = C(n, t - 1), i = C(n, t + 1);
|
|
20710
20710
|
return S(A, e) && !S(j, i) || S(j, e) && !S(A, r) ? "\\u" + O(w(e, 0), 16) : e;
|
|
20711
|
-
},
|
|
20711
|
+
}, F = function(e) {
|
|
20712
20712
|
if (u(e)) return e;
|
|
20713
20713
|
if (l(e)) {
|
|
20714
20714
|
for (var t = e.length, n = [], r = 0; r < t; r++) {
|
|
@@ -20729,11 +20729,11 @@ var Ay, jy, My, Ny, Py = {
|
|
|
20729
20729
|
arity: 3,
|
|
20730
20730
|
forced: ee || P || !y
|
|
20731
20731
|
}, { stringify: function(e, t, n) {
|
|
20732
|
-
var r =
|
|
20732
|
+
var r = F(t), i = [], a = te(e, function(e, t) {
|
|
20733
20733
|
var n = u(r) ? o(r, this, b(e), t) : t;
|
|
20734
20734
|
return !y && d(n) ? M + (D(i, n.rawJSON) - 1) : n;
|
|
20735
20735
|
}, n);
|
|
20736
|
-
if (typeof a != "string" || (P && (a = T(a, k,
|
|
20736
|
+
if (typeof a != "string" || (P && (a = T(a, k, ne)), y)) return a;
|
|
20737
20737
|
for (var s = "", c = a.length, l = 0; l < c; l++) {
|
|
20738
20738
|
var f = C(a, l);
|
|
20739
20739
|
if (f === "\"") {
|
|
@@ -26630,39 +26630,44 @@ var WO = { create() {
|
|
|
26630
26630
|
//#endregion
|
|
26631
26631
|
//#region src/package/vendors/pdf/PdfView.vue?vue&type=script&setup=true&lang.ts
|
|
26632
26632
|
i();
|
|
26633
|
-
var GO = { class: "pdf-toolbar" }, KO = ["aria-pressed"], qO = { class: "pdf-toolbar-group" }, JO = ["disabled"], YO = { class: "pdf-page-meter" }, XO = ["disabled"], ZO = { class: "pdf-toolbar-group pdf-toolbar-group--zoom" }, QO = ["disabled"], $O = ["disabled"], ek = { class: "pdf-
|
|
26633
|
+
var GO = { class: "pdf-toolbar" }, KO = ["aria-pressed"], qO = { class: "pdf-toolbar-group" }, JO = ["disabled"], YO = { class: "pdf-page-meter" }, XO = ["disabled"], ZO = { class: "pdf-toolbar-group pdf-toolbar-group--zoom" }, QO = ["disabled"], $O = ["disabled"], ek = { class: "pdf-toolbar-group pdf-toolbar-group--rotate" }, tk = { class: "pdf-rotation-meter" }, nk = { class: "pdf-content" }, rk = {
|
|
26634
26634
|
key: 0,
|
|
26635
26635
|
class: "pdf-nav-pane"
|
|
26636
|
-
},
|
|
26636
|
+
}, ik = { class: "pdf-nav-head" }, ak = {
|
|
26637
26637
|
class: "pdf-nav-tabs",
|
|
26638
26638
|
role: "tablist",
|
|
26639
26639
|
"aria-label": "PDF 导航类型"
|
|
26640
|
-
},
|
|
26640
|
+
}, ok = ["aria-selected"], sk = ["aria-selected"], ck = {
|
|
26641
26641
|
key: 0,
|
|
26642
26642
|
class: "pdf-page-list"
|
|
26643
|
-
},
|
|
26643
|
+
}, lk = ["onClick"], uk = { class: "pdf-page-thumb" }, dk = { class: "pdf-page-label" }, fk = {
|
|
26644
26644
|
key: 1,
|
|
26645
26645
|
class: "pdf-outline-list"
|
|
26646
|
-
},
|
|
26646
|
+
}, pk = ["onClick"], mk = ["onClick"], hk = { class: "pdf-outline-title" }, gk = {
|
|
26647
26647
|
key: 0,
|
|
26648
26648
|
class: "pdf-outline-empty"
|
|
26649
|
-
},
|
|
26649
|
+
}, _k = { class: "pdf-viewport" }, vk = {
|
|
26650
26650
|
key: 0,
|
|
26651
26651
|
class: "pdf-state"
|
|
26652
|
-
},
|
|
26652
|
+
}, yk = {
|
|
26653
26653
|
key: 1,
|
|
26654
26654
|
class: "pdf-state pdf-state--error"
|
|
26655
|
-
},
|
|
26655
|
+
}, bk = .2, xk = 3, Sk = .1, Ck = 28, wk = 18, Tk = 8e6, Ek = /* @__PURE__ */ l(/* @__PURE__ */ g({
|
|
26656
26656
|
__name: "PdfView",
|
|
26657
26657
|
props: {
|
|
26658
26658
|
data: {},
|
|
26659
|
-
exportAdapter: { type: Function }
|
|
26659
|
+
exportAdapter: { type: Function },
|
|
26660
|
+
options: {}
|
|
26660
26661
|
},
|
|
26661
26662
|
setup(e) {
|
|
26662
|
-
|
|
26663
|
+
var t, n, r, i;
|
|
26664
|
+
let o = e, s = C(null), c = C(((t = o.options) == null ? void 0 : t.navigation) === !1 ? !1 : ((n = o.options) == null ? void 0 : n.defaultNavigationVisible) !== !1), l = C("pages"), u = C("loading"), g = C(""), D = C(1), O = C(0), k = C(1), A = C(!0), j = C(fe((r = (i = o.options) == null ? void 0 : i.rotation) == null ? 0 : r)), M = C([]), N = f(() => {
|
|
26665
|
+
var e;
|
|
26666
|
+
return ((e = o.options) == null ? void 0 : e.navigation) !== !1;
|
|
26667
|
+
}), ee = f(() => Array.from({ length: O.value }, (e, t) => t + 1)), P = f(() => {
|
|
26663
26668
|
let e = (t) => t.reduce((t, n) => t + 1 + e(n.items), 0);
|
|
26664
|
-
return e(
|
|
26665
|
-
}),
|
|
26669
|
+
return e(M.value);
|
|
26670
|
+
}), te = f(() => {
|
|
26666
26671
|
let e = [], t = (n, r) => {
|
|
26667
26672
|
n.forEach((n) => {
|
|
26668
26673
|
e.push({
|
|
@@ -26671,22 +26676,26 @@ var GO = { class: "pdf-toolbar" }, KO = ["aria-pressed"], qO = { class: "pdf-too
|
|
|
26671
26676
|
}), n.expanded && n.items.length && t(n.items, r + 1);
|
|
26672
26677
|
});
|
|
26673
26678
|
};
|
|
26674
|
-
return t(
|
|
26675
|
-
}),
|
|
26679
|
+
return t(M.value, 0), e;
|
|
26680
|
+
}), ne = f(() => `${Math.round(k.value * 100)}%`), F = f(() => `${j.value}°`), re = f(() => D.value > 1), ie = f(() => D.value < O.value), ae = f(() => k.value > bk), oe = f(() => k.value < xk), I = {
|
|
26676
26681
|
viewer: null,
|
|
26677
26682
|
linkService: null,
|
|
26678
26683
|
resource: null,
|
|
26679
26684
|
document: null,
|
|
26680
26685
|
search: ""
|
|
26681
|
-
},
|
|
26682
|
-
function
|
|
26686
|
+
}, se = null, ce = 0, le = !1, ue = 0;
|
|
26687
|
+
function de() {
|
|
26683
26688
|
return typeof window > "u" || !("Worker" in window) ? null : af.create({ port: WO.create() });
|
|
26684
26689
|
}
|
|
26685
|
-
function
|
|
26686
|
-
|
|
26690
|
+
function fe(e) {
|
|
26691
|
+
let t = (Math.round(e / 90) * 90 % 360 + 360) % 360;
|
|
26692
|
+
return t === 90 || t === 180 || t === 270 ? t : 0;
|
|
26693
|
+
}
|
|
26694
|
+
function pe(e) {
|
|
26695
|
+
return me.apply(this, arguments);
|
|
26687
26696
|
}
|
|
26688
|
-
function
|
|
26689
|
-
return
|
|
26697
|
+
function me() {
|
|
26698
|
+
return me = a(function* (e) {
|
|
26690
26699
|
if (e) try {
|
|
26691
26700
|
yield e.loadingTask.destroy();
|
|
26692
26701
|
} catch (e) {
|
|
@@ -26695,14 +26704,14 @@ var GO = { class: "pdf-toolbar" }, KO = ["aria-pressed"], qO = { class: "pdf-too
|
|
|
26695
26704
|
var t;
|
|
26696
26705
|
(t = e.worker) == null || t.destroy();
|
|
26697
26706
|
}
|
|
26698
|
-
}),
|
|
26707
|
+
}), me.apply(this, arguments);
|
|
26699
26708
|
}
|
|
26700
|
-
function
|
|
26709
|
+
function he(e) {
|
|
26701
26710
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
26702
26711
|
}
|
|
26703
|
-
function
|
|
26712
|
+
function ge(e, t = "outline") {
|
|
26704
26713
|
return e.map((e, n) => {
|
|
26705
|
-
let r = `${t}-${n}`, i = Array.isArray(e.items) ?
|
|
26714
|
+
let r = `${t}-${n}`, i = Array.isArray(e.items) ? ge(e.items, r) : [];
|
|
26706
26715
|
return {
|
|
26707
26716
|
id: r,
|
|
26708
26717
|
title: e.title || `目录 ${n + 1}`,
|
|
@@ -26712,36 +26721,42 @@ var GO = { class: "pdf-toolbar" }, KO = ["aria-pressed"], qO = { class: "pdf-too
|
|
|
26712
26721
|
};
|
|
26713
26722
|
});
|
|
26714
26723
|
}
|
|
26715
|
-
function
|
|
26716
|
-
return
|
|
26724
|
+
function L(e) {
|
|
26725
|
+
return _e.apply(this, arguments);
|
|
26717
26726
|
}
|
|
26718
|
-
function
|
|
26719
|
-
return
|
|
26727
|
+
function _e() {
|
|
26728
|
+
return _e = a(function* (e) {
|
|
26720
26729
|
try {
|
|
26721
26730
|
let t = yield e.getOutline();
|
|
26722
|
-
if (
|
|
26723
|
-
|
|
26731
|
+
if (le || I.document !== e) return;
|
|
26732
|
+
M.value = Array.isArray(t) ? ge(t) : [];
|
|
26724
26733
|
} catch (e) {
|
|
26725
|
-
console.warn("PDF 大纲读取失败", e),
|
|
26734
|
+
console.warn("PDF 大纲读取失败", e), M.value = [];
|
|
26726
26735
|
}
|
|
26727
|
-
}),
|
|
26736
|
+
}), _e.apply(this, arguments);
|
|
26728
26737
|
}
|
|
26729
|
-
function
|
|
26730
|
-
let r = n === "print" ? 1.75 : 1.5, i = Math.sqrt(
|
|
26738
|
+
function ve(e, t, n) {
|
|
26739
|
+
let r = n === "print" ? 1.75 : 1.5, i = Math.sqrt(Tk / Math.max(e * t, 1));
|
|
26731
26740
|
return Math.max(.75, Math.min(r, i));
|
|
26732
26741
|
}
|
|
26733
|
-
function
|
|
26734
|
-
return
|
|
26742
|
+
function ye(e) {
|
|
26743
|
+
return be.apply(this, arguments);
|
|
26735
26744
|
}
|
|
26736
|
-
function
|
|
26737
|
-
return
|
|
26738
|
-
let t =
|
|
26745
|
+
function be() {
|
|
26746
|
+
return be = a(function* (e) {
|
|
26747
|
+
let t = I.document;
|
|
26739
26748
|
if (!t) throw Error("PDF 尚未加载完成,请稍后再试");
|
|
26740
26749
|
let n = [];
|
|
26741
26750
|
for (let i = 1; i <= t.numPages; i += 1) {
|
|
26742
26751
|
var r;
|
|
26743
|
-
if (
|
|
26744
|
-
let a = yield t.getPage(i), o = a.getViewport({
|
|
26752
|
+
if (le) throw Error("PDF 已卸载,无法继续打印");
|
|
26753
|
+
let a = yield t.getPage(i), o = a.getViewport({
|
|
26754
|
+
scale: _t.PDF_TO_CSS_UNITS,
|
|
26755
|
+
rotation: j.value
|
|
26756
|
+
}), s = ve(o.width, o.height, e.mode), c = a.getViewport({
|
|
26757
|
+
scale: _t.PDF_TO_CSS_UNITS * s,
|
|
26758
|
+
rotation: j.value
|
|
26759
|
+
}), l = document.createElement("canvas"), u = l.getContext("2d");
|
|
26745
26760
|
if (!u) throw Error("当前浏览器无法创建 PDF 打印画布");
|
|
26746
26761
|
l.width = Math.ceil(c.width), l.height = Math.ceil(c.height), yield a.render({
|
|
26747
26762
|
canvas: l,
|
|
@@ -26749,169 +26764,193 @@ var GO = { class: "pdf-toolbar" }, KO = ["aria-pressed"], qO = { class: "pdf-too
|
|
|
26749
26764
|
viewport: c
|
|
26750
26765
|
}).promise;
|
|
26751
26766
|
let d = `${e.title} - 第 ${i} 页`;
|
|
26752
|
-
n.push(`<section class="pdf-export-page" style="width:${Math.ceil(o.width)}px" aria-label="${
|
|
26767
|
+
n.push(`<section class="pdf-export-page" style="width:${Math.ceil(o.width)}px" aria-label="${he(d)}"><img src="${l.toDataURL("image/png")}" alt="${he(d)}" /></section>`), l.width = 0, l.height = 0, (r = a.cleanup) == null || r.call(a);
|
|
26753
26768
|
}
|
|
26754
26769
|
return `<div class="pdf-export-document">${n.join("")}</div>`;
|
|
26755
|
-
}),
|
|
26770
|
+
}), be.apply(this, arguments);
|
|
26756
26771
|
}
|
|
26757
|
-
function
|
|
26758
|
-
return
|
|
26772
|
+
function xe() {
|
|
26773
|
+
return Se.apply(this, arguments);
|
|
26759
26774
|
}
|
|
26760
|
-
function
|
|
26761
|
-
return
|
|
26775
|
+
function Se() {
|
|
26776
|
+
return Se = a(function* () {
|
|
26762
26777
|
var e;
|
|
26763
|
-
if (!
|
|
26764
|
-
let
|
|
26765
|
-
|
|
26766
|
-
let
|
|
26778
|
+
if (!s.value) return;
|
|
26779
|
+
let t = ++ue;
|
|
26780
|
+
u.value = "loading", g.value = "", I.document = null, M.value = [], (e = o.exportAdapter) == null || e.call(o, null);
|
|
26781
|
+
let n = null;
|
|
26767
26782
|
try {
|
|
26768
|
-
var
|
|
26769
|
-
if (
|
|
26770
|
-
let e = new YS(),
|
|
26783
|
+
var r;
|
|
26784
|
+
if (le || t !== ue || !s.value) return;
|
|
26785
|
+
let e = new YS(), i = new kS({ eventBus: e }), a = new oS({
|
|
26771
26786
|
eventBus: e,
|
|
26772
|
-
linkService:
|
|
26787
|
+
linkService: i,
|
|
26773
26788
|
updateMatchesCountOnProgress: !0
|
|
26774
|
-
}),
|
|
26775
|
-
container:
|
|
26789
|
+
}), c = new xO({
|
|
26790
|
+
container: s.value,
|
|
26776
26791
|
eventBus: e,
|
|
26777
|
-
linkService:
|
|
26778
|
-
findController:
|
|
26792
|
+
linkService: i,
|
|
26793
|
+
findController: a,
|
|
26779
26794
|
l10n: new Dw("zh-CN"),
|
|
26780
26795
|
enableAutoLinking: !1
|
|
26781
26796
|
});
|
|
26782
|
-
|
|
26783
|
-
|
|
26797
|
+
I.viewer = c, I.linkService = i, i.setViewer(c), e.on("pagesinit", () => {
|
|
26798
|
+
ke(j.value), Te(), u.value = "ready", I.search && e.dispatch("find", {
|
|
26784
26799
|
type: "",
|
|
26785
|
-
query:
|
|
26800
|
+
query: I.search
|
|
26786
26801
|
});
|
|
26787
26802
|
}), e.on("pagechanging", ({ pageNumber: e }) => {
|
|
26788
|
-
|
|
26803
|
+
D.value = e;
|
|
26789
26804
|
}), e.on("scalechanging", ({ scale: e }) => {
|
|
26790
|
-
|
|
26805
|
+
k.value = R(e);
|
|
26791
26806
|
});
|
|
26792
|
-
let
|
|
26793
|
-
data:
|
|
26794
|
-
worker:
|
|
26807
|
+
let l = de(), d = Vd({
|
|
26808
|
+
data: o.data,
|
|
26809
|
+
worker: l || void 0,
|
|
26795
26810
|
cMapUrl: `https://npm.onmicrosoft.cn/pdfjs-dist@${kf}/cmaps/`,
|
|
26796
26811
|
useWorkerFetch: !0,
|
|
26797
26812
|
cMapPacked: !0,
|
|
26798
26813
|
enableXfa: !0
|
|
26799
26814
|
});
|
|
26800
|
-
|
|
26801
|
-
loadingTask:
|
|
26802
|
-
worker:
|
|
26803
|
-
},
|
|
26804
|
-
let
|
|
26805
|
-
if (
|
|
26806
|
-
|
|
26815
|
+
n = {
|
|
26816
|
+
loadingTask: d,
|
|
26817
|
+
worker: l
|
|
26818
|
+
}, I.resource = n;
|
|
26819
|
+
let f = yield d.promise;
|
|
26820
|
+
if (le || t !== ue || I.resource !== n) {
|
|
26821
|
+
I.resource === n && (I.resource = null, yield pe(n));
|
|
26807
26822
|
return;
|
|
26808
26823
|
}
|
|
26809
|
-
|
|
26824
|
+
O.value = f.numPages, D.value = 1, I.document = f, (r = o.exportAdapter) == null || r.call(o, {
|
|
26825
|
+
includeDocumentStyles: !1,
|
|
26826
|
+
toHtml: ye
|
|
26827
|
+
}), L(f), c.setDocument(f), i.setDocument(f, null);
|
|
26810
26828
|
} catch (e) {
|
|
26811
|
-
if (
|
|
26812
|
-
|
|
26829
|
+
if (I.resource === n && (I.resource = null, pe(n)), le || t !== ue) return;
|
|
26830
|
+
u.value = "error", g.value = e instanceof Error ? e.message : "PDF 加载失败";
|
|
26813
26831
|
}
|
|
26814
|
-
}),
|
|
26832
|
+
}), Se.apply(this, arguments);
|
|
26815
26833
|
}
|
|
26816
|
-
function
|
|
26834
|
+
function Ce(e) {
|
|
26817
26835
|
var t;
|
|
26818
26836
|
let n = e.getPageView(0), r = n == null ? void 0 : n.pdfPage;
|
|
26819
|
-
if (r) return r.getViewport({
|
|
26837
|
+
if (r) return r.getViewport({
|
|
26838
|
+
scale: _t.PDF_TO_CSS_UNITS,
|
|
26839
|
+
rotation: j.value
|
|
26840
|
+
}).width;
|
|
26820
26841
|
let i = n == null || (t = n.viewport) == null ? void 0 : t.width;
|
|
26821
|
-
return i &&
|
|
26842
|
+
return i && k.value ? i / k.value : 0;
|
|
26822
26843
|
}
|
|
26823
|
-
function
|
|
26844
|
+
function we(e) {
|
|
26824
26845
|
var t;
|
|
26825
|
-
let
|
|
26826
|
-
return
|
|
26846
|
+
let n = Ce(e), r = ((t = s.value) == null ? void 0 : t.clientWidth) || window.innerWidth, i = Math.max(r - Ck - wk, 96);
|
|
26847
|
+
return n ? R(i / n) : 1;
|
|
26827
26848
|
}
|
|
26828
|
-
function
|
|
26829
|
-
return Number(Math.min(
|
|
26849
|
+
function R(e) {
|
|
26850
|
+
return Number(Math.min(xk, Math.max(bk, e)).toFixed(2));
|
|
26830
26851
|
}
|
|
26831
|
-
function
|
|
26832
|
-
if (!
|
|
26833
|
-
let t =
|
|
26834
|
-
|
|
26852
|
+
function z(e) {
|
|
26853
|
+
if (!I.viewer) return;
|
|
26854
|
+
let t = R(e);
|
|
26855
|
+
I.viewer.currentScale = t, k.value = t;
|
|
26835
26856
|
}
|
|
26836
|
-
function
|
|
26837
|
-
|
|
26857
|
+
function Te() {
|
|
26858
|
+
I.viewer && (A.value = !0, z(we(I.viewer)), _(() => {
|
|
26838
26859
|
var e;
|
|
26839
|
-
(e =
|
|
26860
|
+
(e = I.viewer) == null || e.update();
|
|
26840
26861
|
}));
|
|
26841
26862
|
}
|
|
26842
|
-
function
|
|
26843
|
-
!
|
|
26844
|
-
|
|
26863
|
+
function Ee() {
|
|
26864
|
+
!A.value || !I.viewer || typeof window > "u" || (window.cancelAnimationFrame(ce), ce = window.requestAnimationFrame(() => {
|
|
26865
|
+
Te();
|
|
26845
26866
|
}));
|
|
26846
26867
|
}
|
|
26847
|
-
function
|
|
26848
|
-
|
|
26868
|
+
function De() {
|
|
26869
|
+
A.value = !1, z(k.value + Sk);
|
|
26849
26870
|
}
|
|
26850
|
-
function
|
|
26851
|
-
|
|
26871
|
+
function Oe() {
|
|
26872
|
+
A.value = !1, z(k.value - Sk);
|
|
26852
26873
|
}
|
|
26853
|
-
function
|
|
26854
|
-
|
|
26855
|
-
|
|
26856
|
-
|
|
26874
|
+
function ke(e) {
|
|
26875
|
+
let t = fe(e);
|
|
26876
|
+
j.value = t, I.viewer && (I.viewer.pagesRotation = t, _(() => {
|
|
26877
|
+
var e;
|
|
26878
|
+
if (A.value) {
|
|
26879
|
+
Te();
|
|
26880
|
+
return;
|
|
26881
|
+
}
|
|
26882
|
+
(e = I.viewer) == null || e.update();
|
|
26883
|
+
}));
|
|
26857
26884
|
}
|
|
26858
|
-
function
|
|
26859
|
-
|
|
26885
|
+
function Ae() {
|
|
26886
|
+
ke(j.value - 90);
|
|
26887
|
+
}
|
|
26888
|
+
function je() {
|
|
26889
|
+
ke(j.value + 90);
|
|
26890
|
+
}
|
|
26891
|
+
function Me(e) {
|
|
26892
|
+
if (!I.viewer || !O.value) return;
|
|
26893
|
+
let t = Math.min(O.value, Math.max(1, e));
|
|
26894
|
+
I.viewer.currentPageNumber = t, D.value = t;
|
|
26860
26895
|
}
|
|
26861
|
-
function
|
|
26862
|
-
|
|
26896
|
+
function Ne(e) {
|
|
26897
|
+
l.value = e;
|
|
26898
|
+
}
|
|
26899
|
+
function Pe() {
|
|
26900
|
+
N.value && (c.value = !c.value, _(() => {
|
|
26863
26901
|
var e;
|
|
26864
|
-
if (
|
|
26865
|
-
|
|
26902
|
+
if (A.value) {
|
|
26903
|
+
Te();
|
|
26866
26904
|
return;
|
|
26867
26905
|
}
|
|
26868
|
-
(e =
|
|
26869
|
-
});
|
|
26906
|
+
(e = I.viewer) == null || e.update();
|
|
26907
|
+
}));
|
|
26870
26908
|
}
|
|
26871
|
-
function
|
|
26872
|
-
|
|
26909
|
+
function Fe() {
|
|
26910
|
+
Te();
|
|
26873
26911
|
}
|
|
26874
|
-
function
|
|
26912
|
+
function Ie(e) {
|
|
26875
26913
|
e.items.length && (e.expanded = !e.expanded);
|
|
26876
26914
|
}
|
|
26877
|
-
function
|
|
26878
|
-
!e.dest || !
|
|
26915
|
+
function Le(e) {
|
|
26916
|
+
!e.dest || !I.linkService || I.linkService.goToDestination(e.dest);
|
|
26879
26917
|
}
|
|
26880
26918
|
return x(() => {
|
|
26881
|
-
|
|
26882
|
-
|
|
26883
|
-
}),
|
|
26919
|
+
xe(), s.value && (se = new ResizeObserver(() => {
|
|
26920
|
+
Ee();
|
|
26921
|
+
}), se.observe(s.value));
|
|
26884
26922
|
}), b(() => {
|
|
26885
26923
|
var e;
|
|
26886
|
-
|
|
26887
|
-
let
|
|
26888
|
-
|
|
26889
|
-
}), (e, t) => (S(), m("div", { class: v(["pdf-shell", { "pdf-shell--nav-hidden": !
|
|
26890
|
-
|
|
26891
|
-
|
|
26924
|
+
le = !0, ue += 1, window.cancelAnimationFrame(ce), se == null || se.disconnect(), se = null, I.viewer = null, I.linkService = null, I.document = null, M.value = [], (e = o.exportAdapter) == null || e.call(o, null);
|
|
26925
|
+
let t = I.resource;
|
|
26926
|
+
I.resource = null, pe(t);
|
|
26927
|
+
}), (e, t) => (S(), m("div", { class: v(["pdf-shell", { "pdf-shell--nav-hidden": !N.value || !c.value }]) }, [h("div", GO, [
|
|
26928
|
+
N.value ? (S(), m("button", {
|
|
26929
|
+
key: 0,
|
|
26930
|
+
class: v(["pdf-icon-button", { "pdf-icon-button--active": c.value }]),
|
|
26892
26931
|
type: "button",
|
|
26893
26932
|
title: "切换导航窗格",
|
|
26894
26933
|
"aria-label": "切换导航窗格",
|
|
26895
|
-
"aria-pressed":
|
|
26896
|
-
onClick:
|
|
26897
|
-
}, [...t[4] || (t[4] = [h("span", { class: "pdf-panel-icon" }, null, -1)])], 10, KO),
|
|
26934
|
+
"aria-pressed": c.value,
|
|
26935
|
+
onClick: Pe
|
|
26936
|
+
}, [...t[4] || (t[4] = [h("span", { class: "pdf-panel-icon" }, null, -1)])], 10, KO)) : p("", !0),
|
|
26898
26937
|
h("div", qO, [
|
|
26899
26938
|
h("button", {
|
|
26900
26939
|
class: "pdf-icon-button",
|
|
26901
26940
|
type: "button",
|
|
26902
26941
|
title: "上一页",
|
|
26903
26942
|
"aria-label": "上一页",
|
|
26904
|
-
disabled: !
|
|
26905
|
-
onClick: t[0] || (t[0] = (e) =>
|
|
26943
|
+
disabled: !re.value,
|
|
26944
|
+
onClick: t[0] || (t[0] = (e) => Me(D.value - 1))
|
|
26906
26945
|
}, [...t[5] || (t[5] = [h("span", { "aria-hidden": "true" }, "‹", -1)])], 8, JO),
|
|
26907
|
-
h("span", YO, [h("strong", null, T(
|
|
26946
|
+
h("span", YO, [h("strong", null, T(D.value), 1), h("span", null, "/ " + T(O.value || "-"), 1)]),
|
|
26908
26947
|
h("button", {
|
|
26909
26948
|
class: "pdf-icon-button",
|
|
26910
26949
|
type: "button",
|
|
26911
26950
|
title: "下一页",
|
|
26912
26951
|
"aria-label": "下一页",
|
|
26913
|
-
disabled: !
|
|
26914
|
-
onClick: t[1] || (t[1] = (e) =>
|
|
26952
|
+
disabled: !ie.value,
|
|
26953
|
+
onClick: t[1] || (t[1] = (e) => Me(D.value + 1))
|
|
26915
26954
|
}, [...t[6] || (t[6] = [h("span", { "aria-hidden": "true" }, "›", -1)])], 8, XO)
|
|
26916
26955
|
]),
|
|
26917
26956
|
h("div", ZO, [
|
|
@@ -26920,64 +26959,81 @@ var GO = { class: "pdf-toolbar" }, KO = ["aria-pressed"], qO = { class: "pdf-too
|
|
|
26920
26959
|
type: "button",
|
|
26921
26960
|
title: "缩小",
|
|
26922
26961
|
"aria-label": "缩小",
|
|
26923
|
-
disabled: !
|
|
26924
|
-
onClick:
|
|
26962
|
+
disabled: !ae.value,
|
|
26963
|
+
onClick: Oe
|
|
26925
26964
|
}, [...t[7] || (t[7] = [h("span", { "aria-hidden": "true" }, "−", -1)])], 8, QO),
|
|
26926
26965
|
h("button", {
|
|
26927
26966
|
class: "pdf-scale-button",
|
|
26928
26967
|
type: "button",
|
|
26929
26968
|
title: "适合宽度",
|
|
26930
|
-
onClick:
|
|
26931
|
-
}, T(
|
|
26969
|
+
onClick: Fe
|
|
26970
|
+
}, T(ne.value), 1),
|
|
26932
26971
|
h("button", {
|
|
26933
26972
|
class: "pdf-icon-button",
|
|
26934
26973
|
type: "button",
|
|
26935
26974
|
title: "放大",
|
|
26936
26975
|
"aria-label": "放大",
|
|
26937
|
-
disabled: !
|
|
26938
|
-
onClick:
|
|
26976
|
+
disabled: !oe.value,
|
|
26977
|
+
onClick: De
|
|
26939
26978
|
}, [...t[8] || (t[8] = [h("span", { "aria-hidden": "true" }, "+", -1)])], 8, $O)
|
|
26979
|
+
]),
|
|
26980
|
+
h("div", ek, [
|
|
26981
|
+
h("button", {
|
|
26982
|
+
class: "pdf-icon-button",
|
|
26983
|
+
type: "button",
|
|
26984
|
+
title: "向左旋转",
|
|
26985
|
+
"aria-label": "向左旋转",
|
|
26986
|
+
onClick: Ae
|
|
26987
|
+
}, [...t[9] || (t[9] = [h("span", { "aria-hidden": "true" }, "↺", -1)])]),
|
|
26988
|
+
h("span", tk, T(F.value), 1),
|
|
26989
|
+
h("button", {
|
|
26990
|
+
class: "pdf-icon-button",
|
|
26991
|
+
type: "button",
|
|
26992
|
+
title: "向右旋转",
|
|
26993
|
+
"aria-label": "向右旋转",
|
|
26994
|
+
onClick: je
|
|
26995
|
+
}, [...t[10] || (t[10] = [h("span", { "aria-hidden": "true" }, "↻", -1)])])
|
|
26940
26996
|
])
|
|
26941
|
-
]), h("div",
|
|
26942
|
-
h("div",
|
|
26943
|
-
h("div",
|
|
26997
|
+
]), h("div", nk, [N.value && c.value ? (S(), m("aside", rk, [
|
|
26998
|
+
h("div", ik, [h("span", null, T(l.value === "pages" ? "页面导航" : "目录导航"), 1), h("strong", null, T(l.value === "pages" ? `${O.value} 页` : `${P.value} 项`), 1)]),
|
|
26999
|
+
h("div", ak, [h("button", {
|
|
26944
27000
|
type: "button",
|
|
26945
27001
|
role: "tab",
|
|
26946
|
-
"aria-selected":
|
|
26947
|
-
class: v({ active:
|
|
26948
|
-
onClick: t[2] || (t[2] = (e) =>
|
|
26949
|
-
}, " 页面 ", 10,
|
|
27002
|
+
"aria-selected": l.value === "pages" ? "true" : "false",
|
|
27003
|
+
class: v({ active: l.value === "pages" }),
|
|
27004
|
+
onClick: t[2] || (t[2] = (e) => Ne("pages"))
|
|
27005
|
+
}, " 页面 ", 10, ok), h("button", {
|
|
26950
27006
|
type: "button",
|
|
26951
27007
|
role: "tab",
|
|
26952
|
-
"aria-selected":
|
|
26953
|
-
class: v({ active:
|
|
26954
|
-
onClick: t[3] || (t[3] = (e) =>
|
|
26955
|
-
}, " 目录 ", 10,
|
|
26956
|
-
|
|
27008
|
+
"aria-selected": l.value === "outline" ? "true" : "false",
|
|
27009
|
+
class: v({ active: l.value === "outline" }),
|
|
27010
|
+
onClick: t[3] || (t[3] = (e) => Ne("outline"))
|
|
27011
|
+
}, " 目录 ", 10, sk)]),
|
|
27012
|
+
l.value === "pages" ? (S(), m("div", ck, [(S(!0), m(d, null, w(ee.value, (e) => (S(), m("button", {
|
|
26957
27013
|
key: e,
|
|
26958
|
-
class: v(["pdf-page-button", { "pdf-page-button--active": e ===
|
|
27014
|
+
class: v(["pdf-page-button", { "pdf-page-button--active": e === D.value }]),
|
|
26959
27015
|
type: "button",
|
|
26960
|
-
onClick: (t) =>
|
|
26961
|
-
}, [h("span",
|
|
27016
|
+
onClick: (t) => Me(e)
|
|
27017
|
+
}, [h("span", uk, T(e), 1), h("span", dk, "第 " + T(e) + " 页", 1)], 10, lk))), 128))])) : (S(), m("div", fk, [(S(!0), m(d, null, w(te.value, (e) => (S(), m("button", {
|
|
26962
27018
|
key: e.item.id,
|
|
26963
27019
|
class: "pdf-outline-button",
|
|
26964
27020
|
type: "button",
|
|
26965
27021
|
style: y({ "--outline-depth": e.depth }),
|
|
26966
|
-
onClick: (t) =>
|
|
27022
|
+
onClick: (t) => Le(e.item)
|
|
26967
27023
|
}, [h("span", {
|
|
26968
27024
|
class: v(["pdf-outline-toggle", {
|
|
26969
27025
|
"pdf-outline-toggle--open": e.item.expanded,
|
|
26970
27026
|
"pdf-outline-toggle--empty": !e.item.items.length
|
|
26971
27027
|
}]),
|
|
26972
27028
|
"aria-hidden": "true",
|
|
26973
|
-
onClick: E((t) =>
|
|
26974
|
-
}, null, 10,
|
|
26975
|
-
])) : p("", !0), h("div",
|
|
27029
|
+
onClick: E((t) => Ie(e.item), ["stop"])
|
|
27030
|
+
}, null, 10, mk), h("span", hk, T(e.item.title), 1)], 12, pk))), 128)), P.value ? p("", !0) : (S(), m("div", gk, " 当前 PDF 没有可用目录 "))]))
|
|
27031
|
+
])) : p("", !0), h("div", _k, [h("div", {
|
|
26976
27032
|
ref_key: "container",
|
|
26977
|
-
ref:
|
|
27033
|
+
ref: s,
|
|
26978
27034
|
class: "pdf-wrapper"
|
|
26979
|
-
}, [t[
|
|
27035
|
+
}, [t[11] || (t[11] = h("div", { class: "pdfViewer" }, null, -1)), u.value === "loading" ? (S(), m("div", vk, "正在加载 PDF...")) : u.value === "error" ? (S(), m("div", yk, T(g.value), 1)) : p("", !0)], 512)])])], 2));
|
|
26980
27036
|
}
|
|
26981
|
-
}), [["__scopeId", "data-v-
|
|
27037
|
+
}), [["__scopeId", "data-v-c4719160"]]);
|
|
26982
27038
|
//#endregion
|
|
26983
|
-
export {
|
|
27039
|
+
export { Ek as default };
|