@flyfish-group/file-viewer 1.0.0 → 1.0.3
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 +2 -2
- package/dist/components/ImageViewer.js +841 -584
- package/dist/components/MarkdownViewer.js +432 -413
- package/dist/components/PdfView.js +6641 -6474
- package/dist/components/PptxRender.js +1800 -1787
- package/dist/components/XlsxTable.js +25698 -20699
- package/dist/components/_commonjsHelpers.js +1 -1
- package/dist/components/docx-preview.js +5622 -0
- package/dist/components/index.js +736 -646
- package/dist/components/worker-ref.js +8 -8
- package/dist/index.umd.js +144 -209
- package/dist/style.css +10 -10
- package/dist/worker/pdf.worker.js +31 -31
- package/dist/worker/pptx.worker.js +7 -7
- package/dist/worker/sheet.worker.js +24 -24
- package/dist/worker/xlsx.worker.js +17 -17
- package/package.json +10 -10
- package/dist/components/docx-preview.min.js +0 -5354
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { n as
|
|
1
|
+
import { defineComponent as ke, computed as je } from "vue";
|
|
2
|
+
import { n as $e } from "./index.js";
|
|
3
3
|
/*!
|
|
4
4
|
* Viewer.js v1.11.6
|
|
5
5
|
* https://fengyuanchen.github.io/viewerjs
|
|
@@ -9,75 +9,75 @@ import { n as ue } from "./index.js";
|
|
|
9
9
|
*
|
|
10
10
|
* Date: 2023-09-17T03:16:38.052Z
|
|
11
11
|
*/
|
|
12
|
-
function
|
|
13
|
-
var i = Object.keys(
|
|
12
|
+
function Vt(e, t) {
|
|
13
|
+
var i = Object.keys(e);
|
|
14
14
|
if (Object.getOwnPropertySymbols) {
|
|
15
|
-
var
|
|
16
|
-
t && (
|
|
17
|
-
return Object.getOwnPropertyDescriptor(
|
|
18
|
-
})), i.push.apply(i,
|
|
15
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
16
|
+
t && (r = r.filter(function(n) {
|
|
17
|
+
return Object.getOwnPropertyDescriptor(e, n).enumerable;
|
|
18
|
+
})), i.push.apply(i, r);
|
|
19
19
|
}
|
|
20
20
|
return i;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function At(e) {
|
|
23
23
|
for (var t = 1; t < arguments.length; t++) {
|
|
24
24
|
var i = arguments[t] != null ? arguments[t] : {};
|
|
25
|
-
t % 2 ?
|
|
26
|
-
|
|
27
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
28
|
-
Object.defineProperty(
|
|
25
|
+
t % 2 ? Vt(Object(i), !0).forEach(function(r) {
|
|
26
|
+
Ye(e, r, i[r]);
|
|
27
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(i)) : Vt(Object(i)).forEach(function(r) {
|
|
28
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(i, r));
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
return
|
|
31
|
+
return e;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Tt(e) {
|
|
34
34
|
"@babel/helpers - typeof";
|
|
35
|
-
return
|
|
35
|
+
return Tt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
36
36
|
return typeof t;
|
|
37
37
|
} : function(t) {
|
|
38
38
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
39
|
-
},
|
|
39
|
+
}, Tt(e);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
if (!(
|
|
41
|
+
function Fe(e, t) {
|
|
42
|
+
if (!(e instanceof t))
|
|
43
43
|
throw new TypeError("Cannot call a class as a function");
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Rt(e, t) {
|
|
46
46
|
for (var i = 0; i < t.length; i++) {
|
|
47
|
-
var
|
|
48
|
-
|
|
47
|
+
var r = t[i];
|
|
48
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, ye(r.key), r);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
return t &&
|
|
51
|
+
function Me(e, t, i) {
|
|
52
|
+
return t && Rt(e.prototype, t), i && Rt(e, i), Object.defineProperty(e, "prototype", {
|
|
53
53
|
writable: !1
|
|
54
|
-
}),
|
|
54
|
+
}), e;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
return t =
|
|
56
|
+
function Ye(e, t, i) {
|
|
57
|
+
return t = ye(t), t in e ? Object.defineProperty(e, t, {
|
|
58
58
|
value: i,
|
|
59
59
|
enumerable: !0,
|
|
60
60
|
configurable: !0,
|
|
61
61
|
writable: !0
|
|
62
|
-
}) :
|
|
62
|
+
}) : e[t] = i, e;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
if (typeof
|
|
66
|
-
return
|
|
67
|
-
var i =
|
|
64
|
+
function We(e, t) {
|
|
65
|
+
if (typeof e != "object" || e === null)
|
|
66
|
+
return e;
|
|
67
|
+
var i = e[Symbol.toPrimitive];
|
|
68
68
|
if (i !== void 0) {
|
|
69
|
-
var
|
|
70
|
-
if (typeof
|
|
71
|
-
return
|
|
69
|
+
var r = i.call(e, t || "default");
|
|
70
|
+
if (typeof r != "object")
|
|
71
|
+
return r;
|
|
72
72
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
73
73
|
}
|
|
74
|
-
return (t === "string" ? String : Number)(
|
|
74
|
+
return (t === "string" ? String : Number)(e);
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
var t =
|
|
76
|
+
function ye(e) {
|
|
77
|
+
var t = We(e, "string");
|
|
78
78
|
return typeof t == "symbol" ? t : String(t);
|
|
79
79
|
}
|
|
80
|
-
var
|
|
80
|
+
var kt = {
|
|
81
81
|
/**
|
|
82
82
|
* Enable a modal backdrop, specify `static` for a backdrop
|
|
83
83
|
* which doesn't close the modal on click.
|
|
@@ -282,126 +282,126 @@ var It = {
|
|
|
282
282
|
zoomed: null,
|
|
283
283
|
play: null,
|
|
284
284
|
stop: null
|
|
285
|
-
},
|
|
286
|
-
function
|
|
287
|
-
return typeof
|
|
285
|
+
}, Xe = '<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>', bt = typeof window != "undefined" && typeof window.document != "undefined", $ = bt ? window : {}, G = bt && $.document.documentElement ? "ontouchstart" in $.document.documentElement : !1, xt = bt ? "PointerEvent" in $ : !1, g = "viewer", ft = "move", we = "switch", it = "zoom", lt = "".concat(g, "-active"), He = "".concat(g, "-close"), dt = "".concat(g, "-fade"), _t = "".concat(g, "-fixed"), qe = "".concat(g, "-fullscreen"), jt = "".concat(g, "-fullscreen-exit"), Y = "".concat(g, "-hide"), Ue = "".concat(g, "-hide-md-down"), Be = "".concat(g, "-hide-sm-down"), Ke = "".concat(g, "-hide-xs-down"), L = "".concat(g, "-in"), rt = "".concat(g, "-invisible"), Z = "".concat(g, "-loading"), Ge = "".concat(g, "-move"), $t = "".concat(g, "-open"), H = "".concat(g, "-show"), A = "".concat(g, "-transition"), J = "click", St = "dblclick", Ft = "dragstart", Mt = "focusin", Yt = "keydown", z = "load", W = "error", Ze = G ? "touchend touchcancel" : "mouseup", Je = G ? "touchmove" : "mousemove", Qe = G ? "touchstart" : "mousedown", Wt = xt ? "pointerdown" : Qe, Xt = xt ? "pointermove" : Je, Ht = xt ? "pointerup pointercancel" : Ze, qt = "resize", P = "transitionend", Ut = "wheel", Bt = "ready", Kt = "show", Gt = "shown", Zt = "hide", Jt = "hidden", Qt = "view", at = "viewed", te = "move", ee = "moved", ie = "rotate", re = "rotated", ne = "scale", ae = "scaled", se = "zoom", oe = "zoomed", le = "play", ue = "stop", gt = "".concat(g, "Action"), It = /\s\s*/, ut = ["zoom-in", "zoom-out", "one-to-one", "reset", "prev", "play", "next", "rotate-left", "rotate-right", "flip-horizontal", "flip-vertical"];
|
|
286
|
+
function st(e) {
|
|
287
|
+
return typeof e == "string";
|
|
288
288
|
}
|
|
289
|
-
var
|
|
290
|
-
function
|
|
291
|
-
return typeof
|
|
289
|
+
var ti = Number.isNaN || $.isNaN;
|
|
290
|
+
function O(e) {
|
|
291
|
+
return typeof e == "number" && !ti(e);
|
|
292
292
|
}
|
|
293
|
-
function
|
|
294
|
-
return typeof
|
|
293
|
+
function U(e) {
|
|
294
|
+
return typeof e == "undefined";
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
return
|
|
296
|
+
function Q(e) {
|
|
297
|
+
return Tt(e) === "object" && e !== null;
|
|
298
298
|
}
|
|
299
|
-
var
|
|
300
|
-
function
|
|
301
|
-
if (!
|
|
299
|
+
var ei = Object.prototype.hasOwnProperty;
|
|
300
|
+
function B(e) {
|
|
301
|
+
if (!Q(e))
|
|
302
302
|
return !1;
|
|
303
303
|
try {
|
|
304
|
-
var t =
|
|
305
|
-
return t && i &&
|
|
306
|
-
} catch {
|
|
304
|
+
var t = e.constructor, i = t.prototype;
|
|
305
|
+
return t && i && ei.call(i, "isPrototypeOf");
|
|
306
|
+
} catch (r) {
|
|
307
307
|
return !1;
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
function p(
|
|
311
|
-
return typeof
|
|
310
|
+
function p(e) {
|
|
311
|
+
return typeof e == "function";
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
if (
|
|
315
|
-
if (Array.isArray(
|
|
316
|
-
var i =
|
|
317
|
-
for (
|
|
313
|
+
function y(e, t) {
|
|
314
|
+
if (e && p(t))
|
|
315
|
+
if (Array.isArray(e) || O(e.length)) {
|
|
316
|
+
var i = e.length, r;
|
|
317
|
+
for (r = 0; r < i && t.call(e, e[r], r, e) !== !1; r += 1)
|
|
318
318
|
;
|
|
319
319
|
} else
|
|
320
|
-
|
|
321
|
-
t.call(
|
|
320
|
+
Q(e) && Object.keys(e).forEach(function(n) {
|
|
321
|
+
t.call(e, e[n], n, e);
|
|
322
322
|
});
|
|
323
|
-
return
|
|
323
|
+
return e;
|
|
324
324
|
}
|
|
325
325
|
var N = Object.assign || function(t) {
|
|
326
|
-
for (var i = arguments.length,
|
|
327
|
-
|
|
328
|
-
return
|
|
329
|
-
|
|
326
|
+
for (var i = arguments.length, r = new Array(i > 1 ? i - 1 : 0), n = 1; n < i; n++)
|
|
327
|
+
r[n - 1] = arguments[n];
|
|
328
|
+
return Q(t) && r.length > 0 && r.forEach(function(a) {
|
|
329
|
+
Q(a) && Object.keys(a).forEach(function(s) {
|
|
330
330
|
t[s] = a[s];
|
|
331
331
|
});
|
|
332
332
|
}), t;
|
|
333
|
-
},
|
|
334
|
-
function
|
|
335
|
-
var i =
|
|
336
|
-
|
|
337
|
-
|
|
333
|
+
}, ii = /^(?:width|height|left|top|marginLeft|marginTop)$/;
|
|
334
|
+
function V(e, t) {
|
|
335
|
+
var i = e.style;
|
|
336
|
+
y(t, function(r, n) {
|
|
337
|
+
ii.test(n) && O(r) && (r += "px"), i[n] = r;
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
return
|
|
340
|
+
function ri(e) {
|
|
341
|
+
return st(e) ? e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">") : e;
|
|
342
342
|
}
|
|
343
|
-
function
|
|
344
|
-
return !
|
|
343
|
+
function q(e, t) {
|
|
344
|
+
return !e || !t ? !1 : e.classList ? e.classList.contains(t) : e.className.indexOf(t) > -1;
|
|
345
345
|
}
|
|
346
|
-
function f(
|
|
347
|
-
if (!(!
|
|
348
|
-
if (
|
|
349
|
-
|
|
350
|
-
f(
|
|
346
|
+
function f(e, t) {
|
|
347
|
+
if (!(!e || !t)) {
|
|
348
|
+
if (O(e.length)) {
|
|
349
|
+
y(e, function(r) {
|
|
350
|
+
f(r, t);
|
|
351
351
|
});
|
|
352
352
|
return;
|
|
353
353
|
}
|
|
354
|
-
if (
|
|
355
|
-
|
|
354
|
+
if (e.classList) {
|
|
355
|
+
e.classList.add(t);
|
|
356
356
|
return;
|
|
357
357
|
}
|
|
358
|
-
var i =
|
|
359
|
-
i ? i.indexOf(t) < 0 && (
|
|
358
|
+
var i = e.className.trim();
|
|
359
|
+
i ? i.indexOf(t) < 0 && (e.className = "".concat(i, " ").concat(t)) : e.className = t;
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
function
|
|
363
|
-
if (!(!
|
|
364
|
-
if (
|
|
365
|
-
|
|
366
|
-
|
|
362
|
+
function m(e, t) {
|
|
363
|
+
if (!(!e || !t)) {
|
|
364
|
+
if (O(e.length)) {
|
|
365
|
+
y(e, function(i) {
|
|
366
|
+
m(i, t);
|
|
367
367
|
});
|
|
368
368
|
return;
|
|
369
369
|
}
|
|
370
|
-
if (
|
|
371
|
-
|
|
370
|
+
if (e.classList) {
|
|
371
|
+
e.classList.remove(t);
|
|
372
372
|
return;
|
|
373
373
|
}
|
|
374
|
-
|
|
374
|
+
e.className.indexOf(t) >= 0 && (e.className = e.className.replace(t, ""));
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function ot(e, t, i) {
|
|
378
378
|
if (t) {
|
|
379
|
-
if (
|
|
380
|
-
|
|
381
|
-
|
|
379
|
+
if (O(e.length)) {
|
|
380
|
+
y(e, function(r) {
|
|
381
|
+
ot(r, t, i);
|
|
382
382
|
});
|
|
383
383
|
return;
|
|
384
384
|
}
|
|
385
|
-
i ? f(
|
|
385
|
+
i ? f(e, t) : m(e, t);
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
|
-
var
|
|
389
|
-
function
|
|
390
|
-
return
|
|
388
|
+
var ni = /([a-z\d])([A-Z])/g;
|
|
389
|
+
function Dt(e) {
|
|
390
|
+
return e.replace(ni, "$1-$2").toLowerCase();
|
|
391
391
|
}
|
|
392
|
-
function
|
|
393
|
-
return
|
|
392
|
+
function K(e, t) {
|
|
393
|
+
return Q(e[t]) ? e[t] : e.dataset ? e.dataset[t] : e.getAttribute("data-".concat(Dt(t)));
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
|
|
395
|
+
function Ot(e, t, i) {
|
|
396
|
+
Q(i) ? e[t] = i : e.dataset ? e.dataset[t] = i : e.setAttribute("data-".concat(Dt(t)), i);
|
|
397
397
|
}
|
|
398
|
-
var
|
|
399
|
-
var
|
|
400
|
-
if (
|
|
398
|
+
var Ee = function() {
|
|
399
|
+
var e = !1;
|
|
400
|
+
if (bt) {
|
|
401
401
|
var t = !1, i = function() {
|
|
402
|
-
},
|
|
402
|
+
}, r = Object.defineProperty({}, "once", {
|
|
403
403
|
get: function() {
|
|
404
|
-
return
|
|
404
|
+
return e = !0, t;
|
|
405
405
|
},
|
|
406
406
|
/**
|
|
407
407
|
* This setter can fix a `TypeError` in strict mode
|
|
@@ -412,121 +412,121 @@ var re = function() {
|
|
|
412
412
|
t = a;
|
|
413
413
|
}
|
|
414
414
|
});
|
|
415
|
-
|
|
415
|
+
$.addEventListener("test", i, r), $.removeEventListener("test", i, r);
|
|
416
416
|
}
|
|
417
|
-
return
|
|
417
|
+
return e;
|
|
418
418
|
}();
|
|
419
|
-
function b(
|
|
420
|
-
var
|
|
421
|
-
t.trim().split(
|
|
422
|
-
if (!
|
|
423
|
-
var s =
|
|
424
|
-
s && s[a] && s[a][i] && (
|
|
419
|
+
function b(e, t, i) {
|
|
420
|
+
var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, n = i;
|
|
421
|
+
t.trim().split(It).forEach(function(a) {
|
|
422
|
+
if (!Ee) {
|
|
423
|
+
var s = e.listeners;
|
|
424
|
+
s && s[a] && s[a][i] && (n = s[a][i], delete s[a][i], Object.keys(s[a]).length === 0 && delete s[a], Object.keys(s).length === 0 && delete e.listeners);
|
|
425
425
|
}
|
|
426
|
-
|
|
426
|
+
e.removeEventListener(a, n, r);
|
|
427
427
|
});
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
var
|
|
431
|
-
t.trim().split(
|
|
432
|
-
if (
|
|
433
|
-
var s =
|
|
434
|
-
|
|
435
|
-
delete
|
|
436
|
-
for (var
|
|
429
|
+
function v(e, t, i) {
|
|
430
|
+
var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, n = i;
|
|
431
|
+
t.trim().split(It).forEach(function(a) {
|
|
432
|
+
if (r.once && !Ee) {
|
|
433
|
+
var s = e.listeners, o = s === void 0 ? {} : s;
|
|
434
|
+
n = function() {
|
|
435
|
+
delete o[a][i], e.removeEventListener(a, n, r);
|
|
436
|
+
for (var l = arguments.length, h = new Array(l), c = 0; c < l; c++)
|
|
437
437
|
h[c] = arguments[c];
|
|
438
|
-
i.apply(
|
|
439
|
-
},
|
|
438
|
+
i.apply(e, h);
|
|
439
|
+
}, o[a] || (o[a] = {}), o[a][i] && e.removeEventListener(a, o[a][i], r), o[a][i] = n, e.listeners = o;
|
|
440
440
|
}
|
|
441
|
-
|
|
441
|
+
e.addEventListener(a, n, r);
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
|
-
function
|
|
445
|
-
var
|
|
446
|
-
return p(Event) && p(CustomEvent) ?
|
|
444
|
+
function x(e, t, i, r) {
|
|
445
|
+
var n;
|
|
446
|
+
return p(Event) && p(CustomEvent) ? n = new CustomEvent(t, At({
|
|
447
447
|
bubbles: !0,
|
|
448
448
|
cancelable: !0,
|
|
449
449
|
detail: i
|
|
450
|
-
},
|
|
450
|
+
}, r)) : (n = document.createEvent("CustomEvent"), n.initCustomEvent(t, !0, !0, i)), e.dispatchEvent(n);
|
|
451
451
|
}
|
|
452
|
-
function
|
|
453
|
-
var t =
|
|
452
|
+
function ai(e) {
|
|
453
|
+
var t = e.getBoundingClientRect();
|
|
454
454
|
return {
|
|
455
455
|
left: t.left + (window.pageXOffset - document.documentElement.clientLeft),
|
|
456
456
|
top: t.top + (window.pageYOffset - document.documentElement.clientTop)
|
|
457
457
|
};
|
|
458
458
|
}
|
|
459
|
-
function
|
|
460
|
-
var t =
|
|
461
|
-
|
|
462
|
-
var
|
|
459
|
+
function vt(e) {
|
|
460
|
+
var t = e.rotate, i = e.scaleX, r = e.scaleY, n = e.translateX, a = e.translateY, s = [];
|
|
461
|
+
O(n) && n !== 0 && s.push("translateX(".concat(n, "px)")), O(a) && a !== 0 && s.push("translateY(".concat(a, "px)")), O(t) && t !== 0 && s.push("rotate(".concat(t, "deg)")), O(i) && i !== 1 && s.push("scaleX(".concat(i, ")")), O(r) && r !== 1 && s.push("scaleY(".concat(r, ")"));
|
|
462
|
+
var o = s.length ? s.join(" ") : "none";
|
|
463
463
|
return {
|
|
464
|
-
WebkitTransform:
|
|
465
|
-
msTransform:
|
|
466
|
-
transform:
|
|
464
|
+
WebkitTransform: o,
|
|
465
|
+
msTransform: o,
|
|
466
|
+
transform: o
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
|
-
function
|
|
470
|
-
return
|
|
471
|
-
}
|
|
472
|
-
var
|
|
473
|
-
function
|
|
474
|
-
var
|
|
475
|
-
if (
|
|
476
|
-
return i(
|
|
477
|
-
var
|
|
478
|
-
return
|
|
479
|
-
i(
|
|
480
|
-
},
|
|
481
|
-
var s =
|
|
482
|
-
s !== null &&
|
|
483
|
-
}),
|
|
484
|
-
}
|
|
485
|
-
function
|
|
486
|
-
switch (
|
|
469
|
+
function si(e) {
|
|
470
|
+
return st(e) ? decodeURIComponent(e.replace(/^.*\//, "").replace(/[?&#].*$/, "")) : "";
|
|
471
|
+
}
|
|
472
|
+
var yt = $.navigator && /Version\/\d+(\.\d+)+?\s+Safari/i.test($.navigator.userAgent);
|
|
473
|
+
function Te(e, t, i) {
|
|
474
|
+
var r = document.createElement("img");
|
|
475
|
+
if (e.naturalWidth && !yt)
|
|
476
|
+
return i(e.naturalWidth, e.naturalHeight), r;
|
|
477
|
+
var n = document.body || document.documentElement;
|
|
478
|
+
return r.onload = function() {
|
|
479
|
+
i(r.width, r.height), yt || n.removeChild(r);
|
|
480
|
+
}, y(t.inheritedAttributes, function(a) {
|
|
481
|
+
var s = e.getAttribute(a);
|
|
482
|
+
s !== null && r.setAttribute(a, s);
|
|
483
|
+
}), r.src = e.src, yt || (r.style.cssText = "left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;", n.appendChild(r)), r;
|
|
484
|
+
}
|
|
485
|
+
function ht(e) {
|
|
486
|
+
switch (e) {
|
|
487
487
|
case 2:
|
|
488
|
-
return
|
|
488
|
+
return Ke;
|
|
489
489
|
case 3:
|
|
490
|
-
return
|
|
490
|
+
return Be;
|
|
491
491
|
case 4:
|
|
492
|
-
return
|
|
492
|
+
return Ue;
|
|
493
493
|
default:
|
|
494
494
|
return "";
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
function
|
|
498
|
-
var t =
|
|
499
|
-
return
|
|
500
|
-
delete t[
|
|
501
|
-
var s = Math.abs(
|
|
497
|
+
function oi(e) {
|
|
498
|
+
var t = At({}, e), i = [];
|
|
499
|
+
return y(e, function(r, n) {
|
|
500
|
+
delete t[n], y(t, function(a) {
|
|
501
|
+
var s = Math.abs(r.startX - a.startX), o = Math.abs(r.startY - a.startY), u = Math.abs(r.endX - a.endX), l = Math.abs(r.endY - a.endY), h = Math.sqrt(s * s + o * o), c = Math.sqrt(u * u + l * l), d = (c - h) / h;
|
|
502
502
|
i.push(d);
|
|
503
503
|
});
|
|
504
|
-
}), i.sort(function(
|
|
505
|
-
return Math.abs(
|
|
504
|
+
}), i.sort(function(r, n) {
|
|
505
|
+
return Math.abs(r) < Math.abs(n);
|
|
506
506
|
}), i[0];
|
|
507
507
|
}
|
|
508
|
-
function
|
|
509
|
-
var i =
|
|
508
|
+
function ct(e, t) {
|
|
509
|
+
var i = e.pageX, r = e.pageY, n = {
|
|
510
510
|
endX: i,
|
|
511
|
-
endY:
|
|
511
|
+
endY: r
|
|
512
512
|
};
|
|
513
|
-
return t ?
|
|
513
|
+
return t ? n : At({
|
|
514
514
|
timeStamp: Date.now(),
|
|
515
515
|
startX: i,
|
|
516
|
-
startY:
|
|
517
|
-
},
|
|
518
|
-
}
|
|
519
|
-
function
|
|
520
|
-
var t = 0, i = 0,
|
|
521
|
-
return
|
|
522
|
-
var a =
|
|
523
|
-
t += a, i += s,
|
|
524
|
-
}), t /=
|
|
516
|
+
startY: r
|
|
517
|
+
}, n);
|
|
518
|
+
}
|
|
519
|
+
function li(e) {
|
|
520
|
+
var t = 0, i = 0, r = 0;
|
|
521
|
+
return y(e, function(n) {
|
|
522
|
+
var a = n.startX, s = n.startY;
|
|
523
|
+
t += a, i += s, r += 1;
|
|
524
|
+
}), t /= r, i /= r, {
|
|
525
525
|
pageX: t,
|
|
526
526
|
pageY: i
|
|
527
527
|
};
|
|
528
528
|
}
|
|
529
|
-
var
|
|
529
|
+
var ui = {
|
|
530
530
|
render: function() {
|
|
531
531
|
this.initContainer(), this.initViewer(), this.initList(), this.renderViewer();
|
|
532
532
|
},
|
|
@@ -541,39 +541,39 @@ var Le = {
|
|
|
541
541
|
};
|
|
542
542
|
},
|
|
543
543
|
initViewer: function() {
|
|
544
|
-
var t = this.options, i = this.parent,
|
|
545
|
-
t.inline && (
|
|
544
|
+
var t = this.options, i = this.parent, r;
|
|
545
|
+
t.inline && (r = {
|
|
546
546
|
width: Math.max(i.offsetWidth, t.minWidth),
|
|
547
547
|
height: Math.max(i.offsetHeight, t.minHeight)
|
|
548
|
-
}, this.parentData =
|
|
548
|
+
}, this.parentData = r), (this.fulled || !r) && (r = this.containerData), this.viewerData = N({}, r);
|
|
549
549
|
},
|
|
550
550
|
renderViewer: function() {
|
|
551
|
-
this.options.inline && !this.fulled &&
|
|
551
|
+
this.options.inline && !this.fulled && V(this.viewer, this.viewerData);
|
|
552
552
|
},
|
|
553
553
|
initList: function() {
|
|
554
|
-
var t = this, i = this.element,
|
|
555
|
-
|
|
556
|
-
var
|
|
557
|
-
if (
|
|
554
|
+
var t = this, i = this.element, r = this.options, n = this.list, a = [];
|
|
555
|
+
n.innerHTML = "", y(this.images, function(s, o) {
|
|
556
|
+
var u = s.src, l = s.alt || si(u), h = t.getImageURL(s);
|
|
557
|
+
if (u || h) {
|
|
558
558
|
var c = document.createElement("li"), d = document.createElement("img");
|
|
559
|
-
|
|
560
|
-
var
|
|
561
|
-
|
|
562
|
-
}),
|
|
559
|
+
y(r.inheritedAttributes, function(_) {
|
|
560
|
+
var w = s.getAttribute(_);
|
|
561
|
+
w !== null && d.setAttribute(_, w);
|
|
562
|
+
}), r.navbar && (d.src = u || h), d.alt = l, d.setAttribute("data-original-url", h || u), c.setAttribute("data-index", o), c.setAttribute("data-viewer-action", "view"), c.setAttribute("role", "button"), r.keyboard && c.setAttribute("tabindex", 0), c.appendChild(d), n.appendChild(c), a.push(c);
|
|
563
563
|
}
|
|
564
|
-
}), this.items = a,
|
|
565
|
-
var
|
|
566
|
-
|
|
567
|
-
b(
|
|
564
|
+
}), this.items = a, y(a, function(s) {
|
|
565
|
+
var o = s.firstElementChild, u, l;
|
|
566
|
+
Ot(o, "filled", !0), r.loading && f(s, Z), v(o, z, u = function(c) {
|
|
567
|
+
b(o, W, l), r.loading && m(s, Z), t.loadImage(c);
|
|
568
568
|
}, {
|
|
569
569
|
once: !0
|
|
570
|
-
}),
|
|
571
|
-
b(
|
|
570
|
+
}), v(o, W, l = function() {
|
|
571
|
+
b(o, z, u), r.loading && m(s, Z);
|
|
572
572
|
}, {
|
|
573
573
|
once: !0
|
|
574
574
|
});
|
|
575
|
-
}),
|
|
576
|
-
f(
|
|
575
|
+
}), r.transition && v(i, at, function() {
|
|
576
|
+
f(n, A);
|
|
577
577
|
}, {
|
|
578
578
|
once: !0
|
|
579
579
|
});
|
|
@@ -581,63 +581,63 @@ var Le = {
|
|
|
581
581
|
renderList: function() {
|
|
582
582
|
var t = this.index, i = this.items[t];
|
|
583
583
|
if (i) {
|
|
584
|
-
var
|
|
585
|
-
|
|
586
|
-
width: s * this.length -
|
|
587
|
-
},
|
|
584
|
+
var r = i.nextElementSibling, n = parseInt(window.getComputedStyle(r || i).marginLeft, 10), a = i.offsetWidth, s = a + n;
|
|
585
|
+
V(this.list, N({
|
|
586
|
+
width: s * this.length - n
|
|
587
|
+
}, vt({
|
|
588
588
|
translateX: (this.viewerData.width - a) / 2 - s * t
|
|
589
589
|
})));
|
|
590
590
|
}
|
|
591
591
|
},
|
|
592
592
|
resetList: function() {
|
|
593
593
|
var t = this.list;
|
|
594
|
-
t.innerHTML = "",
|
|
594
|
+
t.innerHTML = "", m(t, A), V(t, vt({
|
|
595
595
|
translateX: 0
|
|
596
596
|
}));
|
|
597
597
|
},
|
|
598
598
|
initImage: function(t) {
|
|
599
|
-
var i = this,
|
|
599
|
+
var i = this, r = this.options, n = this.image, a = this.viewerData, s = this.footer.offsetHeight, o = a.width, u = Math.max(a.height - s, s), l = this.imageData || {}, h;
|
|
600
600
|
this.imageInitializing = {
|
|
601
601
|
abort: function() {
|
|
602
602
|
h.onload = null;
|
|
603
603
|
}
|
|
604
|
-
}, h =
|
|
605
|
-
var _ = c / d,
|
|
606
|
-
i.imageInitializing = !1,
|
|
607
|
-
var
|
|
608
|
-
left:
|
|
604
|
+
}, h = Te(n, r, function(c, d) {
|
|
605
|
+
var _ = c / d, w = Math.max(0, Math.min(1, r.initialCoverage)), S = o, I = u;
|
|
606
|
+
i.imageInitializing = !1, u * _ > o ? I = o / _ : S = u * _, w = O(w) ? w : 0.9, S = Math.min(S * w, c), I = Math.min(I * w, d);
|
|
607
|
+
var D = (o - S) / 2, C = (u - I) / 2, T = {
|
|
608
|
+
left: D,
|
|
609
609
|
top: C,
|
|
610
|
-
x,
|
|
610
|
+
x: D,
|
|
611
611
|
y: C,
|
|
612
|
-
width:
|
|
613
|
-
height:
|
|
612
|
+
width: S,
|
|
613
|
+
height: I,
|
|
614
614
|
oldRatio: 1,
|
|
615
|
-
ratio:
|
|
615
|
+
ratio: S / c,
|
|
616
616
|
aspectRatio: _,
|
|
617
617
|
naturalWidth: c,
|
|
618
618
|
naturalHeight: d
|
|
619
|
-
},
|
|
620
|
-
|
|
619
|
+
}, k = N({}, T);
|
|
620
|
+
r.rotatable && (T.rotate = l.rotate || 0, k.rotate = 0), r.scalable && (T.scaleX = l.scaleX || 1, T.scaleY = l.scaleY || 1, k.scaleX = 1, k.scaleY = 1), i.imageData = T, i.initialImageData = k, t && t();
|
|
621
621
|
});
|
|
622
622
|
},
|
|
623
623
|
renderImage: function(t) {
|
|
624
|
-
var i = this,
|
|
625
|
-
if (
|
|
626
|
-
width:
|
|
627
|
-
height:
|
|
624
|
+
var i = this, r = this.image, n = this.imageData;
|
|
625
|
+
if (V(r, N({
|
|
626
|
+
width: n.width,
|
|
627
|
+
height: n.height,
|
|
628
628
|
// XXX: Not to use translateX/Y to avoid image shaking when zooming
|
|
629
|
-
marginLeft:
|
|
630
|
-
marginTop:
|
|
631
|
-
},
|
|
632
|
-
if ((this.viewing || this.moving || this.rotating || this.scaling || this.zooming) && this.options.transition &&
|
|
629
|
+
marginLeft: n.x,
|
|
630
|
+
marginTop: n.y
|
|
631
|
+
}, vt(n))), t)
|
|
632
|
+
if ((this.viewing || this.moving || this.rotating || this.scaling || this.zooming) && this.options.transition && q(r, A)) {
|
|
633
633
|
var a = function() {
|
|
634
634
|
i.imageRendering = !1, t();
|
|
635
635
|
};
|
|
636
636
|
this.imageRendering = {
|
|
637
637
|
abort: function() {
|
|
638
|
-
b(
|
|
638
|
+
b(r, P, a);
|
|
639
639
|
}
|
|
640
|
-
},
|
|
640
|
+
}, v(r, P, a, {
|
|
641
641
|
once: !0
|
|
642
642
|
});
|
|
643
643
|
} else
|
|
@@ -647,25 +647,25 @@ var Le = {
|
|
|
647
647
|
var t = this.image;
|
|
648
648
|
t && (this.viewing && this.viewing.abort(), t.parentNode.removeChild(t), this.image = null, this.title.innerHTML = "");
|
|
649
649
|
}
|
|
650
|
-
},
|
|
650
|
+
}, hi = {
|
|
651
651
|
bind: function() {
|
|
652
|
-
var t = this.options, i = this.viewer,
|
|
653
|
-
|
|
652
|
+
var t = this.options, i = this.viewer, r = this.canvas, n = this.element.ownerDocument;
|
|
653
|
+
v(i, J, this.onClick = this.click.bind(this)), v(i, Ft, this.onDragStart = this.dragstart.bind(this)), v(r, Wt, this.onPointerDown = this.pointerdown.bind(this)), v(n, Xt, this.onPointerMove = this.pointermove.bind(this)), v(n, Ht, this.onPointerUp = this.pointerup.bind(this)), v(n, Yt, this.onKeyDown = this.keydown.bind(this)), v(window, qt, this.onResize = this.resize.bind(this)), t.zoomable && t.zoomOnWheel && v(i, Ut, this.onWheel = this.wheel.bind(this), {
|
|
654
654
|
passive: !1,
|
|
655
655
|
capture: !0
|
|
656
|
-
}), t.toggleOnDblclick &&
|
|
656
|
+
}), t.toggleOnDblclick && v(r, St, this.onDblclick = this.dblclick.bind(this));
|
|
657
657
|
},
|
|
658
658
|
unbind: function() {
|
|
659
|
-
var t = this.options, i = this.viewer,
|
|
660
|
-
b(i,
|
|
659
|
+
var t = this.options, i = this.viewer, r = this.canvas, n = this.element.ownerDocument;
|
|
660
|
+
b(i, J, this.onClick), b(i, Ft, this.onDragStart), b(r, Wt, this.onPointerDown), b(n, Xt, this.onPointerMove), b(n, Ht, this.onPointerUp), b(n, Yt, this.onKeyDown), b(window, qt, this.onResize), t.zoomable && t.zoomOnWheel && b(i, Ut, this.onWheel, {
|
|
661
661
|
passive: !1,
|
|
662
662
|
capture: !0
|
|
663
|
-
}), t.toggleOnDblclick && b(
|
|
663
|
+
}), t.toggleOnDblclick && b(r, St, this.onDblclick);
|
|
664
664
|
}
|
|
665
|
-
},
|
|
665
|
+
}, ci = {
|
|
666
666
|
click: function(t) {
|
|
667
|
-
var i = this.options,
|
|
668
|
-
switch (!a &&
|
|
667
|
+
var i = this.options, r = this.imageData, n = t.target, a = K(n, gt);
|
|
668
|
+
switch (!a && n.localName === "img" && n.parentElement.localName === "li" && (n = n.parentElement, a = K(n, gt)), G && t.isTrusted && n === this.canvas && clearTimeout(this.clickCanvasTimeout), a) {
|
|
669
669
|
case "mix":
|
|
670
670
|
this.played ? this.stop() : i.inline ? this.fulled ? this.exit() : this.full() : this.hide();
|
|
671
671
|
break;
|
|
@@ -673,7 +673,7 @@ var Le = {
|
|
|
673
673
|
this.pointerMoved || this.hide();
|
|
674
674
|
break;
|
|
675
675
|
case "view":
|
|
676
|
-
this.view(
|
|
676
|
+
this.view(K(n, "index"));
|
|
677
677
|
break;
|
|
678
678
|
case "zoom-in":
|
|
679
679
|
this.zoom(0.1, !0);
|
|
@@ -703,30 +703,30 @@ var Le = {
|
|
|
703
703
|
this.rotate(90);
|
|
704
704
|
break;
|
|
705
705
|
case "flip-horizontal":
|
|
706
|
-
this.scaleX(-
|
|
706
|
+
this.scaleX(-r.scaleX || -1);
|
|
707
707
|
break;
|
|
708
708
|
case "flip-vertical":
|
|
709
|
-
this.scaleY(-
|
|
709
|
+
this.scaleY(-r.scaleY || -1);
|
|
710
710
|
break;
|
|
711
711
|
default:
|
|
712
712
|
this.played && this.stop();
|
|
713
713
|
}
|
|
714
714
|
},
|
|
715
715
|
dblclick: function(t) {
|
|
716
|
-
t.preventDefault(), this.viewed && t.target === this.image && (
|
|
716
|
+
t.preventDefault(), this.viewed && t.target === this.image && (G && t.isTrusted && clearTimeout(this.doubleClickImageTimeout), this.toggle(t.isTrusted ? t : t.detail && t.detail.originalEvent));
|
|
717
717
|
},
|
|
718
718
|
load: function() {
|
|
719
719
|
var t = this;
|
|
720
720
|
this.timeout && (clearTimeout(this.timeout), this.timeout = !1);
|
|
721
|
-
var i = this.element,
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
t.viewed = !0, t.viewing = !1, p(
|
|
721
|
+
var i = this.element, r = this.options, n = this.image, a = this.index, s = this.viewerData;
|
|
722
|
+
m(n, rt), r.loading && m(this.canvas, Z), n.style.cssText = "height:0;" + "margin-left:".concat(s.width / 2, "px;") + "margin-top:".concat(s.height / 2, "px;") + "max-width:none!important;position:relative;width:0;", this.initImage(function() {
|
|
723
|
+
ot(n, Ge, r.movable), ot(n, A, r.transition), t.renderImage(function() {
|
|
724
|
+
t.viewed = !0, t.viewing = !1, p(r.viewed) && v(i, at, r.viewed, {
|
|
725
725
|
once: !0
|
|
726
|
-
}),
|
|
726
|
+
}), x(i, at, {
|
|
727
727
|
originalImage: t.images[a],
|
|
728
728
|
index: a,
|
|
729
|
-
image:
|
|
729
|
+
image: n
|
|
730
730
|
}, {
|
|
731
731
|
cancelable: !1
|
|
732
732
|
});
|
|
@@ -734,14 +734,14 @@ var Le = {
|
|
|
734
734
|
});
|
|
735
735
|
},
|
|
736
736
|
loadImage: function(t) {
|
|
737
|
-
var i = t.target,
|
|
738
|
-
|
|
739
|
-
var
|
|
740
|
-
a *
|
|
737
|
+
var i = t.target, r = i.parentNode, n = r.offsetWidth || 30, a = r.offsetHeight || 50, s = !!K(i, "filled");
|
|
738
|
+
Te(i, this.options, function(o, u) {
|
|
739
|
+
var l = o / u, h = n, c = a;
|
|
740
|
+
a * l > n ? s ? h = a * l : c = n / l : s ? c = n / l : h = a * l, V(i, N({
|
|
741
741
|
width: h,
|
|
742
742
|
height: c
|
|
743
|
-
},
|
|
744
|
-
translateX: (
|
|
743
|
+
}, vt({
|
|
744
|
+
translateX: (n - h) / 2,
|
|
745
745
|
translateY: (a - c) / 2
|
|
746
746
|
})));
|
|
747
747
|
});
|
|
@@ -749,14 +749,14 @@ var Le = {
|
|
|
749
749
|
keydown: function(t) {
|
|
750
750
|
var i = this.options;
|
|
751
751
|
if (i.keyboard) {
|
|
752
|
-
var
|
|
753
|
-
switch (
|
|
752
|
+
var r = t.keyCode || t.which || t.charCode;
|
|
753
|
+
switch (r) {
|
|
754
754
|
case 13:
|
|
755
755
|
this.viewer.contains(t.target) && this.click(t);
|
|
756
756
|
break;
|
|
757
757
|
}
|
|
758
758
|
if (this.fulled)
|
|
759
|
-
switch (
|
|
759
|
+
switch (r) {
|
|
760
760
|
case 27:
|
|
761
761
|
this.played ? this.stop() : i.inline ? this.fulled && this.exit() : this.hide();
|
|
762
762
|
break;
|
|
@@ -786,34 +786,34 @@ var Le = {
|
|
|
786
786
|
t.target.localName === "img" && t.preventDefault();
|
|
787
787
|
},
|
|
788
788
|
pointerdown: function(t) {
|
|
789
|
-
var i = this.options,
|
|
789
|
+
var i = this.options, r = this.pointers, n = t.buttons, a = t.button;
|
|
790
790
|
if (this.pointerMoved = !1, !(!this.viewed || this.showing || this.viewing || this.hiding || (t.type === "mousedown" || t.type === "pointerdown" && t.pointerType === "mouse") && // No primary button (Usually the left button)
|
|
791
|
-
(
|
|
792
|
-
t.preventDefault(), t.changedTouches ?
|
|
793
|
-
|
|
794
|
-
}) :
|
|
795
|
-
var s = i.movable ?
|
|
796
|
-
i.zoomOnTouch && i.zoomable && Object.keys(
|
|
791
|
+
(O(n) && n !== 1 || O(a) && a !== 0 || t.ctrlKey))) {
|
|
792
|
+
t.preventDefault(), t.changedTouches ? y(t.changedTouches, function(o) {
|
|
793
|
+
r[o.identifier] = ct(o);
|
|
794
|
+
}) : r[t.pointerId || 0] = ct(t);
|
|
795
|
+
var s = i.movable ? ft : !1;
|
|
796
|
+
i.zoomOnTouch && i.zoomable && Object.keys(r).length > 1 ? s = it : i.slideOnTouch && (t.pointerType === "touch" || t.type === "touchstart") && this.isSwitchable() && (s = we), i.transition && (s === ft || s === it) && m(this.image, A), this.action = s;
|
|
797
797
|
}
|
|
798
798
|
},
|
|
799
799
|
pointermove: function(t) {
|
|
800
|
-
var i = this.pointers,
|
|
801
|
-
!this.viewed || !
|
|
802
|
-
N(i[
|
|
803
|
-
}) : N(i[t.pointerId || 0] || {},
|
|
800
|
+
var i = this.pointers, r = this.action;
|
|
801
|
+
!this.viewed || !r || (t.preventDefault(), t.changedTouches ? y(t.changedTouches, function(n) {
|
|
802
|
+
N(i[n.identifier] || {}, ct(n, !0));
|
|
803
|
+
}) : N(i[t.pointerId || 0] || {}, ct(t, !0)), this.change(t));
|
|
804
804
|
},
|
|
805
805
|
pointerup: function(t) {
|
|
806
|
-
var i = this,
|
|
807
|
-
t.changedTouches ?
|
|
808
|
-
s = a[
|
|
809
|
-
}) : (s = a[t.pointerId || 0], delete a[t.pointerId || 0]),
|
|
810
|
-
|
|
806
|
+
var i = this, r = this.options, n = this.action, a = this.pointers, s;
|
|
807
|
+
t.changedTouches ? y(t.changedTouches, function(o) {
|
|
808
|
+
s = a[o.identifier], delete a[o.identifier];
|
|
809
|
+
}) : (s = a[t.pointerId || 0], delete a[t.pointerId || 0]), n && (t.preventDefault(), r.transition && (n === ft || n === it) && f(this.image, A), this.action = !1, G && n !== it && s && Date.now() - s.timeStamp < 500 && (clearTimeout(this.clickCanvasTimeout), clearTimeout(this.doubleClickImageTimeout), r.toggleOnDblclick && this.viewed && t.target === this.image ? this.imageClicked ? (this.imageClicked = !1, this.doubleClickImageTimeout = setTimeout(function() {
|
|
810
|
+
x(i.image, St, {
|
|
811
811
|
originalEvent: t
|
|
812
812
|
});
|
|
813
813
|
}, 50)) : (this.imageClicked = !0, this.doubleClickImageTimeout = setTimeout(function() {
|
|
814
814
|
i.imageClicked = !1;
|
|
815
|
-
}, 500)) : (this.imageClicked = !1,
|
|
816
|
-
|
|
815
|
+
}, 500)) : (this.imageClicked = !1, r.backdrop && r.backdrop !== "static" && t.target === this.canvas && (this.clickCanvasTimeout = setTimeout(function() {
|
|
816
|
+
x(i.canvas, J, {
|
|
817
817
|
originalEvent: t
|
|
818
818
|
});
|
|
819
819
|
}, 50)))));
|
|
@@ -827,10 +827,10 @@ var Le = {
|
|
|
827
827
|
this.stop();
|
|
828
828
|
return;
|
|
829
829
|
}
|
|
830
|
-
|
|
831
|
-
|
|
830
|
+
y(this.player.getElementsByTagName("img"), function(i) {
|
|
831
|
+
v(i, z, t.loadImage.bind(t), {
|
|
832
832
|
once: !0
|
|
833
|
-
}),
|
|
833
|
+
}), x(i, z);
|
|
834
834
|
});
|
|
835
835
|
}
|
|
836
836
|
},
|
|
@@ -840,38 +840,38 @@ var Le = {
|
|
|
840
840
|
this.wheeling = !0, setTimeout(function() {
|
|
841
841
|
i.wheeling = !1;
|
|
842
842
|
}, 50);
|
|
843
|
-
var
|
|
844
|
-
t.deltaY ?
|
|
843
|
+
var r = Number(this.options.zoomRatio) || 0.1, n = 1;
|
|
844
|
+
t.deltaY ? n = t.deltaY > 0 ? 1 : -1 : t.wheelDelta ? n = -t.wheelDelta / 120 : t.detail && (n = t.detail > 0 ? 1 : -1), this.zoom(-n * r, !0, null, t);
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
|
-
},
|
|
847
|
+
}, fi = {
|
|
848
848
|
/** Show the viewer (only available in modal mode)
|
|
849
849
|
* @param {boolean} [immediate=false] - Indicates if show the viewer immediately or not.
|
|
850
850
|
* @returns {Viewer} this
|
|
851
851
|
*/
|
|
852
852
|
show: function() {
|
|
853
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, i = this.element,
|
|
854
|
-
if (
|
|
853
|
+
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, i = this.element, r = this.options;
|
|
854
|
+
if (r.inline || this.showing || this.isShown || this.showing)
|
|
855
855
|
return this;
|
|
856
856
|
if (!this.ready)
|
|
857
857
|
return this.build(), this.ready && this.show(t), this;
|
|
858
|
-
if (p(
|
|
858
|
+
if (p(r.show) && v(i, Kt, r.show, {
|
|
859
859
|
once: !0
|
|
860
|
-
}),
|
|
860
|
+
}), x(i, Kt) === !1 || !this.ready)
|
|
861
861
|
return this;
|
|
862
862
|
this.hiding && this.transitioning.abort(), this.showing = !0, this.open();
|
|
863
|
-
var
|
|
864
|
-
if (
|
|
863
|
+
var n = this.viewer;
|
|
864
|
+
if (m(n, Y), n.setAttribute("role", "dialog"), n.setAttribute("aria-labelledby", this.title.id), n.setAttribute("aria-modal", !0), n.removeAttribute("aria-hidden"), r.transition && !t) {
|
|
865
865
|
var a = this.shown.bind(this);
|
|
866
866
|
this.transitioning = {
|
|
867
867
|
abort: function() {
|
|
868
|
-
b(
|
|
868
|
+
b(n, P, a), m(n, L);
|
|
869
869
|
}
|
|
870
|
-
}, f(
|
|
870
|
+
}, f(n, A), n.initialOffsetWidth = n.offsetWidth, v(n, P, a, {
|
|
871
871
|
once: !0
|
|
872
|
-
}), f(
|
|
872
|
+
}), f(n, L);
|
|
873
873
|
} else
|
|
874
|
-
f(
|
|
874
|
+
f(n, L), this.shown();
|
|
875
875
|
return this;
|
|
876
876
|
},
|
|
877
877
|
/**
|
|
@@ -880,32 +880,32 @@ var Le = {
|
|
|
880
880
|
* @returns {Viewer} this
|
|
881
881
|
*/
|
|
882
882
|
hide: function() {
|
|
883
|
-
var t = this, i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1,
|
|
884
|
-
if (
|
|
883
|
+
var t = this, i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, r = this.element, n = this.options;
|
|
884
|
+
if (n.inline || this.hiding || !(this.isShown || this.showing))
|
|
885
885
|
return this;
|
|
886
|
-
if (p(
|
|
886
|
+
if (p(n.hide) && v(r, Zt, n.hide, {
|
|
887
887
|
once: !0
|
|
888
|
-
}),
|
|
888
|
+
}), x(r, Zt) === !1)
|
|
889
889
|
return this;
|
|
890
890
|
this.showing && this.transitioning.abort(), this.hiding = !0, this.played ? this.stop() : this.viewing && this.viewing.abort();
|
|
891
|
-
var a = this.viewer, s = this.image,
|
|
892
|
-
|
|
891
|
+
var a = this.viewer, s = this.image, o = function() {
|
|
892
|
+
m(a, L), t.hidden();
|
|
893
893
|
};
|
|
894
|
-
if (
|
|
895
|
-
var
|
|
896
|
-
c && c.target === a && (b(a,
|
|
897
|
-
},
|
|
898
|
-
|
|
894
|
+
if (n.transition && !i) {
|
|
895
|
+
var u = function h(c) {
|
|
896
|
+
c && c.target === a && (b(a, P, h), t.hidden());
|
|
897
|
+
}, l = function() {
|
|
898
|
+
q(a, A) ? (v(a, P, u), m(a, L)) : o();
|
|
899
899
|
};
|
|
900
900
|
this.transitioning = {
|
|
901
901
|
abort: function() {
|
|
902
|
-
t.viewed &&
|
|
902
|
+
t.viewed && q(s, A) ? b(s, P, l) : q(a, A) && b(a, P, u);
|
|
903
903
|
}
|
|
904
|
-
}, this.viewed &&
|
|
904
|
+
}, this.viewed && q(s, A) ? (v(s, P, l, {
|
|
905
905
|
once: !0
|
|
906
|
-
}), this.zoomTo(0, !1, null, null, !0)) :
|
|
906
|
+
}), this.zoomTo(0, !1, null, null, !0)) : l();
|
|
907
907
|
} else
|
|
908
|
-
|
|
908
|
+
o();
|
|
909
909
|
return this;
|
|
910
910
|
},
|
|
911
911
|
/**
|
|
@@ -920,40 +920,40 @@ var Le = {
|
|
|
920
920
|
if (!this.isShown)
|
|
921
921
|
return this.index = i, this.show();
|
|
922
922
|
this.viewing && this.viewing.abort();
|
|
923
|
-
var
|
|
924
|
-
if (
|
|
925
|
-
var
|
|
926
|
-
|
|
927
|
-
}), c.src =
|
|
923
|
+
var r = this.element, n = this.options, a = this.title, s = this.canvas, o = this.items[i], u = o.querySelector("img"), l = K(u, "originalUrl"), h = u.getAttribute("alt"), c = document.createElement("img");
|
|
924
|
+
if (y(n.inheritedAttributes, function(I) {
|
|
925
|
+
var D = u.getAttribute(I);
|
|
926
|
+
D !== null && c.setAttribute(I, D);
|
|
927
|
+
}), c.src = l, c.alt = h, p(n.view) && v(r, Qt, n.view, {
|
|
928
928
|
once: !0
|
|
929
|
-
}),
|
|
929
|
+
}), x(r, Qt, {
|
|
930
930
|
originalImage: this.images[i],
|
|
931
931
|
index: i,
|
|
932
932
|
image: c
|
|
933
933
|
}) === !1 || !this.isShown || this.hiding || this.played)
|
|
934
934
|
return this;
|
|
935
935
|
var d = this.items[this.index];
|
|
936
|
-
d && (
|
|
936
|
+
d && (m(d, lt), d.removeAttribute("aria-selected")), f(o, lt), o.setAttribute("aria-selected", !0), n.focus && o.focus(), this.image = c, this.viewed = !1, this.index = i, this.imageData = {}, f(c, rt), n.loading && f(s, Z), s.innerHTML = "", s.appendChild(c), this.renderList(), a.innerHTML = "";
|
|
937
937
|
var _ = function() {
|
|
938
|
-
var
|
|
939
|
-
a.innerHTML =
|
|
940
|
-
},
|
|
941
|
-
return
|
|
938
|
+
var D = t.imageData, C = Array.isArray(n.title) ? n.title[1] : n.title;
|
|
939
|
+
a.innerHTML = ri(p(C) ? C.call(t, c, D) : "".concat(h, " (").concat(D.naturalWidth, " × ").concat(D.naturalHeight, ")"));
|
|
940
|
+
}, w, S;
|
|
941
|
+
return v(r, at, _, {
|
|
942
942
|
once: !0
|
|
943
943
|
}), this.viewing = {
|
|
944
944
|
abort: function() {
|
|
945
|
-
b(
|
|
945
|
+
b(r, at, _), c.complete ? t.imageRendering ? t.imageRendering.abort() : t.imageInitializing && t.imageInitializing.abort() : (c.src = "", b(c, z, w), t.timeout && clearTimeout(t.timeout));
|
|
946
946
|
}
|
|
947
|
-
}, c.complete ? this.load() : (
|
|
948
|
-
b(c,
|
|
947
|
+
}, c.complete ? this.load() : (v(c, z, w = function() {
|
|
948
|
+
b(c, W, S), t.load();
|
|
949
949
|
}, {
|
|
950
950
|
once: !0
|
|
951
|
-
}),
|
|
952
|
-
b(c, z,
|
|
951
|
+
}), v(c, W, S = function() {
|
|
952
|
+
b(c, z, w), t.timeout && (clearTimeout(t.timeout), t.timeout = !1), m(c, rt), n.loading && m(t.canvas, Z);
|
|
953
953
|
}, {
|
|
954
954
|
once: !0
|
|
955
955
|
}), this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(function() {
|
|
956
|
-
|
|
956
|
+
m(c, rt), t.timeout = !1;
|
|
957
957
|
}, 1e3)), this;
|
|
958
958
|
},
|
|
959
959
|
/**
|
|
@@ -973,8 +973,8 @@ var Le = {
|
|
|
973
973
|
* @returns {Viewer} this
|
|
974
974
|
*/
|
|
975
975
|
next: function() {
|
|
976
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, i = this.length - 1,
|
|
977
|
-
return
|
|
976
|
+
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, i = this.length - 1, r = this.index + 1;
|
|
977
|
+
return r > i && (r = t ? 0 : i), this.view(r), this;
|
|
978
978
|
},
|
|
979
979
|
/**
|
|
980
980
|
* Move the image with relative offsets.
|
|
@@ -983,8 +983,8 @@ var Le = {
|
|
|
983
983
|
* @returns {Viewer} this
|
|
984
984
|
*/
|
|
985
985
|
move: function(t) {
|
|
986
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t,
|
|
987
|
-
return this.moveTo(
|
|
986
|
+
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, r = this.imageData;
|
|
987
|
+
return this.moveTo(U(t) ? t : r.x + Number(t), U(i) ? i : r.y + Number(i)), this;
|
|
988
988
|
},
|
|
989
989
|
/**
|
|
990
990
|
* Move the image to an absolute point.
|
|
@@ -994,29 +994,29 @@ var Le = {
|
|
|
994
994
|
* @returns {Viewer} this
|
|
995
995
|
*/
|
|
996
996
|
moveTo: function(t) {
|
|
997
|
-
var i = this,
|
|
998
|
-
if (t = Number(t),
|
|
999
|
-
var
|
|
1000
|
-
if (
|
|
1001
|
-
if (p(s.move) &&
|
|
997
|
+
var i = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, a = this.element, s = this.options, o = this.imageData;
|
|
998
|
+
if (t = Number(t), r = Number(r), this.viewed && !this.played && s.movable) {
|
|
999
|
+
var u = o.x, l = o.y, h = !1;
|
|
1000
|
+
if (O(t) ? h = !0 : t = u, O(r) ? h = !0 : r = l, h) {
|
|
1001
|
+
if (p(s.move) && v(a, te, s.move, {
|
|
1002
1002
|
once: !0
|
|
1003
|
-
}),
|
|
1003
|
+
}), x(a, te, {
|
|
1004
1004
|
x: t,
|
|
1005
|
-
y:
|
|
1006
|
-
oldX:
|
|
1007
|
-
oldY:
|
|
1008
|
-
originalEvent:
|
|
1005
|
+
y: r,
|
|
1006
|
+
oldX: u,
|
|
1007
|
+
oldY: l,
|
|
1008
|
+
originalEvent: n
|
|
1009
1009
|
}) === !1)
|
|
1010
1010
|
return this;
|
|
1011
|
-
|
|
1012
|
-
i.moving = !1, p(s.moved) &&
|
|
1011
|
+
o.x = t, o.y = r, o.left = t, o.top = r, this.moving = !0, this.renderImage(function() {
|
|
1012
|
+
i.moving = !1, p(s.moved) && v(a, ee, s.moved, {
|
|
1013
1013
|
once: !0
|
|
1014
|
-
}),
|
|
1014
|
+
}), x(a, ee, {
|
|
1015
1015
|
x: t,
|
|
1016
|
-
y:
|
|
1017
|
-
oldX:
|
|
1018
|
-
oldY:
|
|
1019
|
-
originalEvent:
|
|
1016
|
+
y: r,
|
|
1017
|
+
oldX: u,
|
|
1018
|
+
oldY: l,
|
|
1019
|
+
originalEvent: n
|
|
1020
1020
|
}, {
|
|
1021
1021
|
cancelable: !1
|
|
1022
1022
|
});
|
|
@@ -1039,20 +1039,20 @@ var Le = {
|
|
|
1039
1039
|
* @returns {Viewer} this
|
|
1040
1040
|
*/
|
|
1041
1041
|
rotateTo: function(t) {
|
|
1042
|
-
var i = this,
|
|
1043
|
-
if (t = Number(t),
|
|
1042
|
+
var i = this, r = this.element, n = this.options, a = this.imageData;
|
|
1043
|
+
if (t = Number(t), O(t) && this.viewed && !this.played && n.rotatable) {
|
|
1044
1044
|
var s = a.rotate;
|
|
1045
|
-
if (p(
|
|
1045
|
+
if (p(n.rotate) && v(r, ie, n.rotate, {
|
|
1046
1046
|
once: !0
|
|
1047
|
-
}),
|
|
1047
|
+
}), x(r, ie, {
|
|
1048
1048
|
degree: t,
|
|
1049
1049
|
oldDegree: s
|
|
1050
1050
|
}) === !1)
|
|
1051
1051
|
return this;
|
|
1052
1052
|
a.rotate = t, this.rotating = !0, this.renderImage(function() {
|
|
1053
|
-
i.rotating = !1, p(
|
|
1053
|
+
i.rotating = !1, p(n.rotated) && v(r, re, n.rotated, {
|
|
1054
1054
|
once: !0
|
|
1055
|
-
}),
|
|
1055
|
+
}), x(r, re, {
|
|
1056
1056
|
degree: t,
|
|
1057
1057
|
oldDegree: s
|
|
1058
1058
|
}, {
|
|
@@ -1085,27 +1085,27 @@ var Le = {
|
|
|
1085
1085
|
* @returns {Viewer} this
|
|
1086
1086
|
*/
|
|
1087
1087
|
scale: function(t) {
|
|
1088
|
-
var i = this,
|
|
1089
|
-
if (t = Number(t),
|
|
1090
|
-
var
|
|
1091
|
-
if (
|
|
1092
|
-
if (p(a.scale) &&
|
|
1088
|
+
var i = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, n = this.element, a = this.options, s = this.imageData;
|
|
1089
|
+
if (t = Number(t), r = Number(r), this.viewed && !this.played && a.scalable) {
|
|
1090
|
+
var o = s.scaleX, u = s.scaleY, l = !1;
|
|
1091
|
+
if (O(t) ? l = !0 : t = o, O(r) ? l = !0 : r = u, l) {
|
|
1092
|
+
if (p(a.scale) && v(n, ne, a.scale, {
|
|
1093
1093
|
once: !0
|
|
1094
|
-
}),
|
|
1094
|
+
}), x(n, ne, {
|
|
1095
1095
|
scaleX: t,
|
|
1096
|
-
scaleY:
|
|
1097
|
-
oldScaleX:
|
|
1098
|
-
oldScaleY:
|
|
1096
|
+
scaleY: r,
|
|
1097
|
+
oldScaleX: o,
|
|
1098
|
+
oldScaleY: u
|
|
1099
1099
|
}) === !1)
|
|
1100
1100
|
return this;
|
|
1101
|
-
s.scaleX = t, s.scaleY =
|
|
1102
|
-
i.scaling = !1, p(a.scaled) &&
|
|
1101
|
+
s.scaleX = t, s.scaleY = r, this.scaling = !0, this.renderImage(function() {
|
|
1102
|
+
i.scaling = !1, p(a.scaled) && v(n, ae, a.scaled, {
|
|
1103
1103
|
once: !0
|
|
1104
|
-
}),
|
|
1104
|
+
}), x(n, ae, {
|
|
1105
1105
|
scaleX: t,
|
|
1106
|
-
scaleY:
|
|
1107
|
-
oldScaleX:
|
|
1108
|
-
oldScaleY:
|
|
1106
|
+
scaleY: r,
|
|
1107
|
+
oldScaleX: o,
|
|
1108
|
+
oldScaleY: u
|
|
1109
1109
|
}, {
|
|
1110
1110
|
cancelable: !1
|
|
1111
1111
|
});
|
|
@@ -1123,8 +1123,8 @@ var Le = {
|
|
|
1123
1123
|
* @returns {Viewer} this
|
|
1124
1124
|
*/
|
|
1125
1125
|
zoom: function(t) {
|
|
1126
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1,
|
|
1127
|
-
return t = Number(t), t < 0 ? t = 1 / (1 - t) : t = 1 + t, this.zoomTo(a.width * t / a.naturalWidth, i,
|
|
1126
|
+
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, a = this.imageData;
|
|
1127
|
+
return t = Number(t), t < 0 ? t = 1 / (1 - t) : t = 1 + t, this.zoomTo(a.width * t / a.naturalWidth, i, r, n), this;
|
|
1128
1128
|
},
|
|
1129
1129
|
/**
|
|
1130
1130
|
* Zoom the image to an absolute ratio.
|
|
@@ -1136,16 +1136,16 @@ var Le = {
|
|
|
1136
1136
|
* @returns {Viewer} this
|
|
1137
1137
|
*/
|
|
1138
1138
|
zoomTo: function(t) {
|
|
1139
|
-
var i = this,
|
|
1140
|
-
if (t = Math.max(0, t),
|
|
1139
|
+
var i = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, o = this.element, u = this.options, l = this.pointers, h = this.imageData, c = h.x, d = h.y, _ = h.width, w = h.height, S = h.naturalWidth, I = h.naturalHeight;
|
|
1140
|
+
if (t = Math.max(0, t), O(t) && this.viewed && !this.played && (s || u.zoomable)) {
|
|
1141
1141
|
if (!s) {
|
|
1142
|
-
var
|
|
1143
|
-
t = Math.min(Math.max(t,
|
|
1142
|
+
var D = Math.max(0.01, u.minZoomRatio), C = Math.min(100, u.maxZoomRatio);
|
|
1143
|
+
t = Math.min(Math.max(t, D), C);
|
|
1144
1144
|
}
|
|
1145
1145
|
if (a)
|
|
1146
1146
|
switch (a.type) {
|
|
1147
1147
|
case "wheel":
|
|
1148
|
-
|
|
1148
|
+
u.zoomRatio >= 0.055 && t > 0.95 && t < 1.05 && (t = 1);
|
|
1149
1149
|
break;
|
|
1150
1150
|
case "pointermove":
|
|
1151
1151
|
case "touchmove":
|
|
@@ -1153,34 +1153,34 @@ var Le = {
|
|
|
1153
1153
|
t > 0.99 && t < 1.01 && (t = 1);
|
|
1154
1154
|
break;
|
|
1155
1155
|
}
|
|
1156
|
-
var
|
|
1157
|
-
if (p(
|
|
1156
|
+
var T = S * t, k = I * t, F = T - _, R = k - w, M = h.ratio;
|
|
1157
|
+
if (p(u.zoom) && v(o, se, u.zoom, {
|
|
1158
1158
|
once: !0
|
|
1159
|
-
}),
|
|
1159
|
+
}), x(o, se, {
|
|
1160
1160
|
ratio: t,
|
|
1161
|
-
oldRatio:
|
|
1161
|
+
oldRatio: M,
|
|
1162
1162
|
originalEvent: a
|
|
1163
1163
|
}) === !1)
|
|
1164
1164
|
return this;
|
|
1165
1165
|
if (this.zooming = !0, a) {
|
|
1166
|
-
var
|
|
1166
|
+
var tt = ai(this.viewer), X = l && Object.keys(l).length > 0 ? li(l) : {
|
|
1167
1167
|
pageX: a.pageX,
|
|
1168
1168
|
pageY: a.pageY
|
|
1169
1169
|
};
|
|
1170
|
-
h.x -=
|
|
1170
|
+
h.x -= F * ((X.pageX - tt.left - c) / _), h.y -= R * ((X.pageY - tt.top - d) / w);
|
|
1171
1171
|
} else
|
|
1172
|
-
|
|
1173
|
-
h.left = h.x, h.top = h.y, h.width =
|
|
1174
|
-
i.zooming = !1, p(
|
|
1172
|
+
B(n) && O(n.x) && O(n.y) ? (h.x -= F * ((n.x - c) / _), h.y -= R * ((n.y - d) / w)) : (h.x -= F / 2, h.y -= R / 2);
|
|
1173
|
+
h.left = h.x, h.top = h.y, h.width = T, h.height = k, h.oldRatio = M, h.ratio = t, this.renderImage(function() {
|
|
1174
|
+
i.zooming = !1, p(u.zoomed) && v(o, oe, u.zoomed, {
|
|
1175
1175
|
once: !0
|
|
1176
|
-
}),
|
|
1176
|
+
}), x(o, oe, {
|
|
1177
1177
|
ratio: t,
|
|
1178
|
-
oldRatio:
|
|
1178
|
+
oldRatio: M,
|
|
1179
1179
|
originalEvent: a
|
|
1180
1180
|
}, {
|
|
1181
1181
|
cancelable: !1
|
|
1182
1182
|
});
|
|
1183
|
-
}),
|
|
1183
|
+
}), r && this.tooltip();
|
|
1184
1184
|
}
|
|
1185
1185
|
return this;
|
|
1186
1186
|
},
|
|
@@ -1193,27 +1193,27 @@ var Le = {
|
|
|
1193
1193
|
var t = this, i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
1194
1194
|
if (!this.isShown || this.played)
|
|
1195
1195
|
return this;
|
|
1196
|
-
var
|
|
1197
|
-
if (p(
|
|
1196
|
+
var r = this.element, n = this.options;
|
|
1197
|
+
if (p(n.play) && v(r, le, n.play, {
|
|
1198
1198
|
once: !0
|
|
1199
|
-
}),
|
|
1199
|
+
}), x(r, le) === !1)
|
|
1200
1200
|
return this;
|
|
1201
|
-
var a = this.player, s = this.loadImage.bind(this),
|
|
1202
|
-
if (this.played = !0, this.onLoadWhenPlay = s, i && this.requestFullscreen(i), f(a,
|
|
1203
|
-
var
|
|
1204
|
-
|
|
1201
|
+
var a = this.player, s = this.loadImage.bind(this), o = [], u = 0, l = 0;
|
|
1202
|
+
if (this.played = !0, this.onLoadWhenPlay = s, i && this.requestFullscreen(i), f(a, H), y(this.items, function(d, _) {
|
|
1203
|
+
var w = d.querySelector("img"), S = document.createElement("img");
|
|
1204
|
+
S.src = K(w, "originalUrl"), S.alt = w.getAttribute("alt"), S.referrerPolicy = w.referrerPolicy, u += 1, f(S, dt), ot(S, A, n.transition), q(d, lt) && (f(S, L), l = _), o.push(S), v(S, z, s, {
|
|
1205
1205
|
once: !0
|
|
1206
|
-
}), a.appendChild(
|
|
1207
|
-
}),
|
|
1206
|
+
}), a.appendChild(S);
|
|
1207
|
+
}), O(n.interval) && n.interval > 0) {
|
|
1208
1208
|
var h = function d() {
|
|
1209
|
-
clearTimeout(t.playing.timeout),
|
|
1209
|
+
clearTimeout(t.playing.timeout), m(o[l], L), l -= 1, l = l >= 0 ? l : u - 1, f(o[l], L), t.playing.timeout = setTimeout(d, n.interval);
|
|
1210
1210
|
}, c = function d() {
|
|
1211
|
-
clearTimeout(t.playing.timeout),
|
|
1211
|
+
clearTimeout(t.playing.timeout), m(o[l], L), l += 1, l = l < u ? l : 0, f(o[l], L), t.playing.timeout = setTimeout(d, n.interval);
|
|
1212
1212
|
};
|
|
1213
|
-
|
|
1213
|
+
u > 1 && (this.playing = {
|
|
1214
1214
|
prev: h,
|
|
1215
1215
|
next: c,
|
|
1216
|
-
timeout: setTimeout(c,
|
|
1216
|
+
timeout: setTimeout(c, n.interval)
|
|
1217
1217
|
});
|
|
1218
1218
|
}
|
|
1219
1219
|
return this;
|
|
@@ -1223,51 +1223,51 @@ var Le = {
|
|
|
1223
1223
|
var t = this;
|
|
1224
1224
|
if (!this.played)
|
|
1225
1225
|
return this;
|
|
1226
|
-
var i = this.element,
|
|
1227
|
-
if (p(
|
|
1226
|
+
var i = this.element, r = this.options;
|
|
1227
|
+
if (p(r.stop) && v(i, ue, r.stop, {
|
|
1228
1228
|
once: !0
|
|
1229
|
-
}),
|
|
1229
|
+
}), x(i, ue) === !1)
|
|
1230
1230
|
return this;
|
|
1231
|
-
var
|
|
1232
|
-
return clearTimeout(this.playing.timeout), this.playing = !1, this.played = !1,
|
|
1231
|
+
var n = this.player;
|
|
1232
|
+
return clearTimeout(this.playing.timeout), this.playing = !1, this.played = !1, y(n.getElementsByTagName("img"), function(a) {
|
|
1233
1233
|
b(a, z, t.onLoadWhenPlay);
|
|
1234
|
-
}),
|
|
1234
|
+
}), m(n, H), n.innerHTML = "", this.exitFullscreen(), this;
|
|
1235
1235
|
},
|
|
1236
1236
|
// Enter modal mode (only available in inline mode)
|
|
1237
1237
|
full: function() {
|
|
1238
|
-
var t = this, i = this.options,
|
|
1239
|
-
return !this.isShown || this.played || this.fulled || !i.inline ? this : (this.fulled = !0, this.open(), f(this.button,
|
|
1238
|
+
var t = this, i = this.options, r = this.viewer, n = this.image, a = this.list;
|
|
1239
|
+
return !this.isShown || this.played || this.fulled || !i.inline ? this : (this.fulled = !0, this.open(), f(this.button, jt), i.transition && (m(a, A), this.viewed && m(n, A)), f(r, _t), r.setAttribute("role", "dialog"), r.setAttribute("aria-labelledby", this.title.id), r.setAttribute("aria-modal", !0), r.removeAttribute("style"), V(r, {
|
|
1240
1240
|
zIndex: i.zIndex
|
|
1241
1241
|
}), i.focus && this.enforceFocus(), this.initContainer(), this.viewerData = N({}, this.containerData), this.renderList(), this.viewed && this.initImage(function() {
|
|
1242
1242
|
t.renderImage(function() {
|
|
1243
1243
|
i.transition && setTimeout(function() {
|
|
1244
|
-
f(
|
|
1244
|
+
f(n, A), f(a, A);
|
|
1245
1245
|
}, 0);
|
|
1246
1246
|
});
|
|
1247
1247
|
}), this);
|
|
1248
1248
|
},
|
|
1249
1249
|
// Exit modal mode (only available in inline mode)
|
|
1250
1250
|
exit: function() {
|
|
1251
|
-
var t = this, i = this.options,
|
|
1252
|
-
return !this.isShown || this.played || !this.fulled || !i.inline ? this : (this.fulled = !1, this.close(),
|
|
1251
|
+
var t = this, i = this.options, r = this.viewer, n = this.image, a = this.list;
|
|
1252
|
+
return !this.isShown || this.played || !this.fulled || !i.inline ? this : (this.fulled = !1, this.close(), m(this.button, jt), i.transition && (m(a, A), this.viewed && m(n, A)), i.focus && this.clearEnforceFocus(), r.removeAttribute("role"), r.removeAttribute("aria-labelledby"), r.removeAttribute("aria-modal"), m(r, _t), V(r, {
|
|
1253
1253
|
zIndex: i.zIndexInline
|
|
1254
1254
|
}), this.viewerData = N({}, this.parentData), this.renderViewer(), this.renderList(), this.viewed && this.initImage(function() {
|
|
1255
1255
|
t.renderImage(function() {
|
|
1256
1256
|
i.transition && setTimeout(function() {
|
|
1257
|
-
f(
|
|
1257
|
+
f(n, A), f(a, A);
|
|
1258
1258
|
}, 0);
|
|
1259
1259
|
});
|
|
1260
1260
|
}), this);
|
|
1261
1261
|
},
|
|
1262
1262
|
// Show the current ratio of the image with percentage
|
|
1263
1263
|
tooltip: function() {
|
|
1264
|
-
var t = this, i = this.options,
|
|
1265
|
-
return !this.viewed || this.played || !i.tooltip ? this : (
|
|
1266
|
-
i.transition ? (
|
|
1267
|
-
|
|
1264
|
+
var t = this, i = this.options, r = this.tooltipBox, n = this.imageData;
|
|
1265
|
+
return !this.viewed || this.played || !i.tooltip ? this : (r.textContent = "".concat(Math.round(n.ratio * 100), "%"), this.tooltipping ? clearTimeout(this.tooltipping) : i.transition ? (this.fading && x(r, P), f(r, H), f(r, dt), f(r, A), r.removeAttribute("aria-hidden"), r.initialOffsetWidth = r.offsetWidth, f(r, L)) : (f(r, H), r.removeAttribute("aria-hidden")), this.tooltipping = setTimeout(function() {
|
|
1266
|
+
i.transition ? (v(r, P, function() {
|
|
1267
|
+
m(r, H), m(r, dt), m(r, A), r.setAttribute("aria-hidden", !0), t.fading = !1;
|
|
1268
1268
|
}, {
|
|
1269
1269
|
once: !0
|
|
1270
|
-
}),
|
|
1270
|
+
}), m(r, L), t.fading = !0) : (m(r, H), r.setAttribute("aria-hidden", !0)), t.tooltipping = !1;
|
|
1271
1271
|
}, 1e3), this);
|
|
1272
1272
|
},
|
|
1273
1273
|
/**
|
|
@@ -1285,30 +1285,30 @@ var Le = {
|
|
|
1285
1285
|
},
|
|
1286
1286
|
// Update viewer when images changed
|
|
1287
1287
|
update: function() {
|
|
1288
|
-
var t = this, i = this.element,
|
|
1289
|
-
if (
|
|
1288
|
+
var t = this, i = this.element, r = this.options, n = this.isImg;
|
|
1289
|
+
if (n && !i.parentNode)
|
|
1290
1290
|
return this.destroy();
|
|
1291
1291
|
var a = [];
|
|
1292
|
-
if (
|
|
1293
|
-
p(
|
|
1292
|
+
if (y(n ? [i] : i.querySelectorAll("img"), function(l) {
|
|
1293
|
+
p(r.filter) ? r.filter.call(t, l) && a.push(l) : t.getImageURL(l) && a.push(l);
|
|
1294
1294
|
}), !a.length)
|
|
1295
1295
|
return this;
|
|
1296
1296
|
if (this.images = a, this.length = a.length, this.ready) {
|
|
1297
1297
|
var s = [];
|
|
1298
|
-
if (
|
|
1299
|
-
var c =
|
|
1298
|
+
if (y(this.items, function(l, h) {
|
|
1299
|
+
var c = l.querySelector("img"), d = a[h];
|
|
1300
1300
|
d && c ? (d.src !== c.src || d.alt !== c.alt) && s.push(h) : s.push(h);
|
|
1301
|
-
}),
|
|
1301
|
+
}), V(this.list, {
|
|
1302
1302
|
width: "auto"
|
|
1303
1303
|
}), this.initList(), this.isShown)
|
|
1304
1304
|
if (this.length) {
|
|
1305
1305
|
if (this.viewed) {
|
|
1306
|
-
var
|
|
1307
|
-
if (
|
|
1308
|
-
this.viewed = !1, this.view(Math.max(Math.min(this.index -
|
|
1306
|
+
var o = s.indexOf(this.index);
|
|
1307
|
+
if (o >= 0)
|
|
1308
|
+
this.viewed = !1, this.view(Math.max(Math.min(this.index - o, this.length - 1), 0));
|
|
1309
1309
|
else {
|
|
1310
|
-
var
|
|
1311
|
-
f(
|
|
1310
|
+
var u = this.items[this.index];
|
|
1311
|
+
f(u, lt), u.setAttribute("aria-selected", !0);
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
1314
|
} else
|
|
@@ -1320,57 +1320,57 @@ var Le = {
|
|
|
1320
1320
|
// Destroy the viewer
|
|
1321
1321
|
destroy: function() {
|
|
1322
1322
|
var t = this.element, i = this.options;
|
|
1323
|
-
return t[
|
|
1323
|
+
return t[g] ? (this.destroyed = !0, this.ready ? (this.played && this.stop(), i.inline ? (this.fulled && this.exit(), this.unbind()) : this.isShown ? (this.viewing && (this.imageRendering ? this.imageRendering.abort() : this.imageInitializing && this.imageInitializing.abort()), this.hiding && this.transitioning.abort(), this.hidden()) : this.showing && (this.transitioning.abort(), this.hidden()), this.ready = !1, this.viewer.parentNode.removeChild(this.viewer)) : i.inline && (this.delaying ? this.delaying.abort() : this.initializing && this.initializing.abort()), i.inline || b(t, J, this.onStart), t[g] = void 0, this) : this;
|
|
1324
1324
|
}
|
|
1325
|
-
},
|
|
1325
|
+
}, di = {
|
|
1326
1326
|
getImageURL: function(t) {
|
|
1327
1327
|
var i = this.options.url;
|
|
1328
|
-
return
|
|
1328
|
+
return st(i) ? i = t.getAttribute(i) : p(i) ? i = i.call(this, t) : i = "", i;
|
|
1329
1329
|
},
|
|
1330
1330
|
enforceFocus: function() {
|
|
1331
1331
|
var t = this;
|
|
1332
|
-
this.clearEnforceFocus(),
|
|
1333
|
-
var
|
|
1334
|
-
if (!(
|
|
1335
|
-
for (;
|
|
1336
|
-
if (
|
|
1332
|
+
this.clearEnforceFocus(), v(document, Mt, this.onFocusin = function(i) {
|
|
1333
|
+
var r = t.viewer, n = i.target;
|
|
1334
|
+
if (!(n === document || n === r || r.contains(n))) {
|
|
1335
|
+
for (; n; ) {
|
|
1336
|
+
if (n.getAttribute("tabindex") !== null || n.getAttribute("aria-modal") === "true")
|
|
1337
1337
|
return;
|
|
1338
|
-
|
|
1338
|
+
n = n.parentElement;
|
|
1339
1339
|
}
|
|
1340
|
-
|
|
1340
|
+
r.focus();
|
|
1341
1341
|
}
|
|
1342
1342
|
});
|
|
1343
1343
|
},
|
|
1344
1344
|
clearEnforceFocus: function() {
|
|
1345
|
-
this.onFocusin && (b(document,
|
|
1345
|
+
this.onFocusin && (b(document, Mt, this.onFocusin), this.onFocusin = null);
|
|
1346
1346
|
},
|
|
1347
1347
|
open: function() {
|
|
1348
1348
|
var t = this.body;
|
|
1349
|
-
f(t,
|
|
1349
|
+
f(t, $t), this.scrollbarWidth > 0 && (t.style.paddingRight = "".concat(this.scrollbarWidth + (parseFloat(this.initialBodyComputedPaddingRight) || 0), "px"));
|
|
1350
1350
|
},
|
|
1351
1351
|
close: function() {
|
|
1352
1352
|
var t = this.body;
|
|
1353
|
-
|
|
1353
|
+
m(t, $t), this.scrollbarWidth > 0 && (t.style.paddingRight = this.initialBodyPaddingRight);
|
|
1354
1354
|
},
|
|
1355
1355
|
shown: function() {
|
|
1356
|
-
var t = this.element, i = this.options,
|
|
1357
|
-
this.fulled = !0, this.isShown = !0, this.render(), this.bind(), this.showing = !1, i.focus && (
|
|
1356
|
+
var t = this.element, i = this.options, r = this.viewer;
|
|
1357
|
+
this.fulled = !0, this.isShown = !0, this.render(), this.bind(), this.showing = !1, i.focus && (r.focus(), this.enforceFocus()), p(i.shown) && v(t, Gt, i.shown, {
|
|
1358
1358
|
once: !0
|
|
1359
|
-
}),
|
|
1359
|
+
}), x(t, Gt) !== !1 && this.ready && this.isShown && !this.hiding && this.view(this.index);
|
|
1360
1360
|
},
|
|
1361
1361
|
hidden: function() {
|
|
1362
|
-
var t = this.element, i = this.options,
|
|
1363
|
-
i.fucus && this.clearEnforceFocus(), this.close(), this.unbind(), f(
|
|
1362
|
+
var t = this.element, i = this.options, r = this.viewer;
|
|
1363
|
+
i.fucus && this.clearEnforceFocus(), this.close(), this.unbind(), f(r, Y), r.removeAttribute("role"), r.removeAttribute("aria-labelledby"), r.removeAttribute("aria-modal"), r.setAttribute("aria-hidden", !0), this.resetList(), this.resetImage(), this.fulled = !1, this.viewed = !1, this.isShown = !1, this.hiding = !1, this.destroyed || (p(i.hidden) && v(t, Jt, i.hidden, {
|
|
1364
1364
|
once: !0
|
|
1365
|
-
}),
|
|
1365
|
+
}), x(t, Jt, null, {
|
|
1366
1366
|
cancelable: !1
|
|
1367
1367
|
}));
|
|
1368
1368
|
},
|
|
1369
1369
|
requestFullscreen: function(t) {
|
|
1370
1370
|
var i = this.element.ownerDocument;
|
|
1371
1371
|
if (this.fulled && !(i.fullscreenElement || i.webkitFullscreenElement || i.mozFullScreenElement || i.msFullscreenElement)) {
|
|
1372
|
-
var
|
|
1373
|
-
|
|
1372
|
+
var r = i.documentElement;
|
|
1373
|
+
r.requestFullscreen ? B(t) ? r.requestFullscreen(t) : r.requestFullscreen() : r.webkitRequestFullscreen ? r.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) : r.mozRequestFullScreen ? r.mozRequestFullScreen() : r.msRequestFullscreen && r.msRequestFullscreen();
|
|
1374
1374
|
}
|
|
1375
1375
|
},
|
|
1376
1376
|
exitFullscreen: function() {
|
|
@@ -1378,25 +1378,25 @@ var Le = {
|
|
|
1378
1378
|
this.fulled && (t.fullscreenElement || t.webkitFullscreenElement || t.mozFullScreenElement || t.msFullscreenElement) && (t.exitFullscreen ? t.exitFullscreen() : t.webkitExitFullscreen ? t.webkitExitFullscreen() : t.mozCancelFullScreen ? t.mozCancelFullScreen() : t.msExitFullscreen && t.msExitFullscreen());
|
|
1379
1379
|
},
|
|
1380
1380
|
change: function(t) {
|
|
1381
|
-
var i = this.options,
|
|
1382
|
-
if (
|
|
1383
|
-
var a =
|
|
1381
|
+
var i = this.options, r = this.pointers, n = r[Object.keys(r)[0]];
|
|
1382
|
+
if (n) {
|
|
1383
|
+
var a = n.endX - n.startX, s = n.endY - n.startY;
|
|
1384
1384
|
switch (this.action) {
|
|
1385
|
-
case
|
|
1385
|
+
case ft:
|
|
1386
1386
|
(a !== 0 || s !== 0) && (this.pointerMoved = !0, this.move(a, s, t));
|
|
1387
1387
|
break;
|
|
1388
|
-
case
|
|
1389
|
-
this.zoom(
|
|
1388
|
+
case it:
|
|
1389
|
+
this.zoom(oi(r), !1, null, t);
|
|
1390
1390
|
break;
|
|
1391
|
-
case
|
|
1391
|
+
case we: {
|
|
1392
1392
|
this.action = "switched";
|
|
1393
|
-
var
|
|
1394
|
-
|
|
1393
|
+
var o = Math.abs(a);
|
|
1394
|
+
o > 1 && o > Math.abs(s) && (this.pointers = {}, a > 1 ? this.prev(i.loop) : a < -1 && this.next(i.loop));
|
|
1395
1395
|
break;
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
|
-
|
|
1399
|
-
|
|
1398
|
+
y(r, function(u) {
|
|
1399
|
+
u.startX = u.endX, u.startY = u.endY;
|
|
1400
1400
|
});
|
|
1401
1401
|
}
|
|
1402
1402
|
},
|
|
@@ -1404,29 +1404,29 @@ var Le = {
|
|
|
1404
1404
|
var t = this.imageData, i = this.viewerData;
|
|
1405
1405
|
return this.length > 1 && t.x >= 0 && t.y >= 0 && t.width <= i.width && t.height <= i.height;
|
|
1406
1406
|
}
|
|
1407
|
-
},
|
|
1407
|
+
}, vi = $.Viewer, gi = function(e) {
|
|
1408
1408
|
return function() {
|
|
1409
|
-
return
|
|
1409
|
+
return e += 1, e;
|
|
1410
1410
|
};
|
|
1411
|
-
}(-1),
|
|
1412
|
-
function
|
|
1411
|
+
}(-1), _e = /* @__PURE__ */ function() {
|
|
1412
|
+
function e(t) {
|
|
1413
1413
|
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1414
|
-
if (
|
|
1414
|
+
if (Fe(this, e), !t || t.nodeType !== 1)
|
|
1415
1415
|
throw new Error("The first argument is required and must be an element.");
|
|
1416
|
-
this.element = t, this.options = N({},
|
|
1416
|
+
this.element = t, this.options = N({}, kt, B(i) && i), this.action = !1, this.fading = !1, this.fulled = !1, this.hiding = !1, this.imageClicked = !1, this.imageData = {}, this.index = this.options.initialViewIndex, this.isImg = !1, this.isShown = !1, this.length = 0, this.moving = !1, this.played = !1, this.playing = !1, this.pointers = {}, this.ready = !1, this.rotating = !1, this.scaling = !1, this.showing = !1, this.timeout = !1, this.tooltipping = !1, this.viewed = !1, this.viewing = !1, this.wheeling = !1, this.zooming = !1, this.pointerMoved = !1, this.id = gi(), this.init();
|
|
1417
1417
|
}
|
|
1418
|
-
return
|
|
1418
|
+
return Me(e, [{
|
|
1419
1419
|
key: "init",
|
|
1420
1420
|
value: function() {
|
|
1421
|
-
var i = this,
|
|
1422
|
-
if (!
|
|
1423
|
-
|
|
1424
|
-
var a =
|
|
1425
|
-
if (
|
|
1426
|
-
p(
|
|
1427
|
-
}), this.isImg = a, this.length = s.length, this.images = s, this.initBody(),
|
|
1428
|
-
var
|
|
1429
|
-
if (
|
|
1421
|
+
var i = this, r = this.element, n = this.options;
|
|
1422
|
+
if (!r[g]) {
|
|
1423
|
+
r[g] = this, n.focus && !n.keyboard && (n.focus = !1);
|
|
1424
|
+
var a = r.localName === "img", s = [];
|
|
1425
|
+
if (y(a ? [r] : r.querySelectorAll("img"), function(l) {
|
|
1426
|
+
p(n.filter) ? n.filter.call(i, l) && s.push(l) : i.getImageURL(l) && s.push(l);
|
|
1427
|
+
}), this.isImg = a, this.length = s.length, this.images = s, this.initBody(), U(document.createElement(g).style.transition) && (n.transition = !1), n.inline) {
|
|
1428
|
+
var o = 0, u = function() {
|
|
1429
|
+
if (o += 1, o === i.length) {
|
|
1430
1430
|
var h;
|
|
1431
1431
|
i.initializing = !1, i.delaying = {
|
|
1432
1432
|
abort: function() {
|
|
@@ -1439,30 +1439,30 @@ var Le = {
|
|
|
1439
1439
|
};
|
|
1440
1440
|
this.initializing = {
|
|
1441
1441
|
abort: function() {
|
|
1442
|
-
|
|
1443
|
-
h.complete || (b(h, z,
|
|
1442
|
+
y(s, function(h) {
|
|
1443
|
+
h.complete || (b(h, z, u), b(h, W, u));
|
|
1444
1444
|
});
|
|
1445
1445
|
}
|
|
1446
|
-
},
|
|
1447
|
-
if (
|
|
1448
|
-
|
|
1446
|
+
}, y(s, function(l) {
|
|
1447
|
+
if (l.complete)
|
|
1448
|
+
u();
|
|
1449
1449
|
else {
|
|
1450
1450
|
var h, c;
|
|
1451
|
-
|
|
1452
|
-
b(
|
|
1451
|
+
v(l, z, h = function() {
|
|
1452
|
+
b(l, W, c), u();
|
|
1453
1453
|
}, {
|
|
1454
1454
|
once: !0
|
|
1455
|
-
}),
|
|
1456
|
-
b(
|
|
1455
|
+
}), v(l, W, c = function() {
|
|
1456
|
+
b(l, z, h), u();
|
|
1457
1457
|
}, {
|
|
1458
1458
|
once: !0
|
|
1459
1459
|
});
|
|
1460
1460
|
}
|
|
1461
1461
|
});
|
|
1462
1462
|
} else
|
|
1463
|
-
|
|
1464
|
-
var h =
|
|
1465
|
-
h.localName === "img" && (!p(
|
|
1463
|
+
v(r, J, this.onStart = function(l) {
|
|
1464
|
+
var h = l.target;
|
|
1465
|
+
h.localName === "img" && (!p(n.filter) || n.filter.call(i, h)) && i.view(i.images.indexOf(h));
|
|
1466
1466
|
});
|
|
1467
1467
|
}
|
|
1468
1468
|
}
|
|
@@ -1470,48 +1470,48 @@ var Le = {
|
|
|
1470
1470
|
key: "build",
|
|
1471
1471
|
value: function() {
|
|
1472
1472
|
if (!this.ready) {
|
|
1473
|
-
var i = this.element,
|
|
1474
|
-
a.innerHTML =
|
|
1475
|
-
var s = a.querySelector(".".concat(
|
|
1476
|
-
if (this.parent =
|
|
1477
|
-
f(s,
|
|
1478
|
-
}),
|
|
1479
|
-
var d = document.createElement("ul"), _ =
|
|
1480
|
-
_ || f(
|
|
1481
|
-
var
|
|
1482
|
-
if (!(!
|
|
1483
|
-
var
|
|
1484
|
-
|
|
1473
|
+
var i = this.element, r = this.options, n = i.parentNode, a = document.createElement("div");
|
|
1474
|
+
a.innerHTML = Xe;
|
|
1475
|
+
var s = a.querySelector(".".concat(g, "-container")), o = s.querySelector(".".concat(g, "-title")), u = s.querySelector(".".concat(g, "-toolbar")), l = s.querySelector(".".concat(g, "-navbar")), h = s.querySelector(".".concat(g, "-button")), c = s.querySelector(".".concat(g, "-canvas"));
|
|
1476
|
+
if (this.parent = n, this.viewer = s, this.title = o, this.toolbar = u, this.navbar = l, this.button = h, this.canvas = c, this.footer = s.querySelector(".".concat(g, "-footer")), this.tooltipBox = s.querySelector(".".concat(g, "-tooltip")), this.player = s.querySelector(".".concat(g, "-player")), this.list = s.querySelector(".".concat(g, "-list")), s.id = "".concat(g).concat(this.id), o.id = "".concat(g, "Title").concat(this.id), f(o, r.title ? ht(Array.isArray(r.title) ? r.title[0] : r.title) : Y), f(l, r.navbar ? ht(r.navbar) : Y), ot(h, Y, !r.button), r.keyboard && h.setAttribute("tabindex", 0), r.backdrop && (f(s, "".concat(g, "-backdrop")), !r.inline && r.backdrop !== "static" && Ot(c, gt, "hide")), st(r.className) && r.className && r.className.split(It).forEach(function(T) {
|
|
1477
|
+
f(s, T);
|
|
1478
|
+
}), r.toolbar) {
|
|
1479
|
+
var d = document.createElement("ul"), _ = B(r.toolbar), w = ut.slice(0, 3), S = ut.slice(7, 9), I = ut.slice(9);
|
|
1480
|
+
_ || f(u, ht(r.toolbar)), y(_ ? r.toolbar : ut, function(T, k) {
|
|
1481
|
+
var F = _ && B(T), R = _ ? Dt(k) : T, M = F && !U(T.show) ? T.show : T;
|
|
1482
|
+
if (!(!M || !r.zoomable && w.indexOf(R) !== -1 || !r.rotatable && S.indexOf(R) !== -1 || !r.scalable && I.indexOf(R) !== -1)) {
|
|
1483
|
+
var tt = F && !U(T.size) ? T.size : T, X = F && !U(T.click) ? T.click : T, j = document.createElement("li");
|
|
1484
|
+
r.keyboard && j.setAttribute("tabindex", 0), j.setAttribute("role", "button"), f(j, "".concat(g, "-").concat(R)), p(X) || Ot(j, gt, R), O(M) && f(j, ht(M)), ["small", "large"].indexOf(tt) !== -1 ? f(j, "".concat(g, "-").concat(tt)) : R === "play" && f(j, "".concat(g, "-large")), p(X) && v(j, J, X), d.appendChild(j);
|
|
1485
1485
|
}
|
|
1486
|
-
}),
|
|
1486
|
+
}), u.appendChild(d);
|
|
1487
1487
|
} else
|
|
1488
|
-
f(
|
|
1489
|
-
if (!
|
|
1490
|
-
var
|
|
1491
|
-
f(
|
|
1492
|
-
|
|
1488
|
+
f(u, Y);
|
|
1489
|
+
if (!r.rotatable) {
|
|
1490
|
+
var D = u.querySelectorAll('li[class*="rotate"]');
|
|
1491
|
+
f(D, rt), y(D, function(T) {
|
|
1492
|
+
u.appendChild(T);
|
|
1493
1493
|
});
|
|
1494
1494
|
}
|
|
1495
|
-
if (
|
|
1496
|
-
f(h,
|
|
1497
|
-
zIndex:
|
|
1498
|
-
}), window.getComputedStyle(
|
|
1495
|
+
if (r.inline)
|
|
1496
|
+
f(h, qe), V(s, {
|
|
1497
|
+
zIndex: r.zIndexInline
|
|
1498
|
+
}), window.getComputedStyle(n).position === "static" && V(n, {
|
|
1499
1499
|
position: "relative"
|
|
1500
|
-
}),
|
|
1500
|
+
}), n.insertBefore(s, i.nextSibling);
|
|
1501
1501
|
else {
|
|
1502
|
-
f(h,
|
|
1503
|
-
zIndex:
|
|
1502
|
+
f(h, He), f(s, _t), f(s, dt), f(s, Y), V(s, {
|
|
1503
|
+
zIndex: r.zIndex
|
|
1504
1504
|
});
|
|
1505
|
-
var C =
|
|
1506
|
-
|
|
1505
|
+
var C = r.container;
|
|
1506
|
+
st(C) && (C = i.ownerDocument.querySelector(C)), C || (C = this.body), C.appendChild(s);
|
|
1507
1507
|
}
|
|
1508
|
-
if (
|
|
1508
|
+
if (r.inline && (this.render(), this.bind(), this.isShown = !0), this.ready = !0, p(r.ready) && v(i, Bt, r.ready, {
|
|
1509
1509
|
once: !0
|
|
1510
|
-
}),
|
|
1510
|
+
}), x(i, Bt) === !1) {
|
|
1511
1511
|
this.ready = !1;
|
|
1512
1512
|
return;
|
|
1513
1513
|
}
|
|
1514
|
-
this.ready &&
|
|
1514
|
+
this.ready && r.inline && this.view(this.index);
|
|
1515
1515
|
}
|
|
1516
1516
|
}
|
|
1517
1517
|
/**
|
|
@@ -1521,7 +1521,7 @@ var Le = {
|
|
|
1521
1521
|
}], [{
|
|
1522
1522
|
key: "noConflict",
|
|
1523
1523
|
value: function() {
|
|
1524
|
-
return window.Viewer =
|
|
1524
|
+
return window.Viewer = vi, e;
|
|
1525
1525
|
}
|
|
1526
1526
|
/**
|
|
1527
1527
|
* Change the default options.
|
|
@@ -1530,49 +1530,300 @@ var Le = {
|
|
|
1530
1530
|
}, {
|
|
1531
1531
|
key: "setDefaults",
|
|
1532
1532
|
value: function(i) {
|
|
1533
|
-
N(
|
|
1533
|
+
N(kt, B(i) && i);
|
|
1534
1534
|
}
|
|
1535
|
-
}]),
|
|
1535
|
+
}]), e;
|
|
1536
1536
|
}();
|
|
1537
|
-
N(
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1537
|
+
N(_e.prototype, ui, hi, ci, fi, di);
|
|
1538
|
+
var mi = typeof global == "object" && global && global.Object === Object && global, Se = mi, pi = typeof self == "object" && self && self.Object === Object && self, bi = Se || pi || Function("return this")(), Ct = bi, yi = Ct.Symbol, mt = yi, Oe = Object.prototype, wi = Oe.hasOwnProperty, Ei = Oe.toString, et = mt ? mt.toStringTag : void 0;
|
|
1539
|
+
function Ti(e) {
|
|
1540
|
+
var t = wi.call(e, et), i = e[et];
|
|
1541
|
+
try {
|
|
1542
|
+
e[et] = void 0;
|
|
1543
|
+
var r = !0;
|
|
1544
|
+
} catch (a) {
|
|
1545
|
+
}
|
|
1546
|
+
var n = Ei.call(e);
|
|
1547
|
+
return r && (t ? e[et] = i : delete e[et]), n;
|
|
1548
|
+
}
|
|
1549
|
+
var _i = Object.prototype, Si = _i.toString;
|
|
1550
|
+
function Oi(e) {
|
|
1551
|
+
return Si.call(e);
|
|
1552
|
+
}
|
|
1553
|
+
var Ai = "[object Null]", xi = "[object Undefined]", he = mt ? mt.toStringTag : void 0;
|
|
1554
|
+
function Nt(e) {
|
|
1555
|
+
return e == null ? e === void 0 ? xi : Ai : he && he in Object(e) ? Ti(e) : Oi(e);
|
|
1556
|
+
}
|
|
1557
|
+
function Lt(e) {
|
|
1558
|
+
return e != null && typeof e == "object";
|
|
1559
|
+
}
|
|
1560
|
+
var Ii = Array.isArray, Di = Ii;
|
|
1561
|
+
function zt(e) {
|
|
1562
|
+
var t = typeof e;
|
|
1563
|
+
return e != null && (t == "object" || t == "function");
|
|
1564
|
+
}
|
|
1565
|
+
function Ae(e) {
|
|
1566
|
+
return e;
|
|
1567
|
+
}
|
|
1568
|
+
var Ci = "[object AsyncFunction]", Ni = "[object Function]", Li = "[object GeneratorFunction]", zi = "[object Proxy]";
|
|
1569
|
+
function xe(e) {
|
|
1570
|
+
if (!zt(e))
|
|
1571
|
+
return !1;
|
|
1572
|
+
var t = Nt(e);
|
|
1573
|
+
return t == Ni || t == Li || t == Ci || t == zi;
|
|
1574
|
+
}
|
|
1575
|
+
var Pi = Ct["__core-js_shared__"], wt = Pi, ce = function() {
|
|
1576
|
+
var e = /[^.]+$/.exec(wt && wt.keys && wt.keys.IE_PROTO || "");
|
|
1577
|
+
return e ? "Symbol(src)_1." + e : "";
|
|
1578
|
+
}();
|
|
1579
|
+
function Vi(e) {
|
|
1580
|
+
return !!ce && ce in e;
|
|
1581
|
+
}
|
|
1582
|
+
var Ri = Function.prototype, ki = Ri.toString;
|
|
1583
|
+
function ji(e) {
|
|
1584
|
+
if (e != null) {
|
|
1585
|
+
try {
|
|
1586
|
+
return ki.call(e);
|
|
1587
|
+
} catch (t) {
|
|
1588
|
+
}
|
|
1589
|
+
try {
|
|
1590
|
+
return e + "";
|
|
1591
|
+
} catch (t) {
|
|
1544
1592
|
}
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
function
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
var
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1593
|
+
}
|
|
1594
|
+
return "";
|
|
1595
|
+
}
|
|
1596
|
+
var $i = /[\\^$.*+?()[\]{}|]/g, Fi = /^\[object .+?Constructor\]$/, Mi = Function.prototype, Yi = Object.prototype, Wi = Mi.toString, Xi = Yi.hasOwnProperty, Hi = RegExp(
|
|
1597
|
+
"^" + Wi.call(Xi).replace($i, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1598
|
+
);
|
|
1599
|
+
function qi(e) {
|
|
1600
|
+
if (!zt(e) || Vi(e))
|
|
1601
|
+
return !1;
|
|
1602
|
+
var t = xe(e) ? Hi : Fi;
|
|
1603
|
+
return t.test(ji(e));
|
|
1604
|
+
}
|
|
1605
|
+
function Ui(e, t) {
|
|
1606
|
+
return e == null ? void 0 : e[t];
|
|
1607
|
+
}
|
|
1608
|
+
function Bi(e, t) {
|
|
1609
|
+
var i = Ui(e, t);
|
|
1610
|
+
return qi(i) ? i : void 0;
|
|
1611
|
+
}
|
|
1612
|
+
function Ki(e, t, i) {
|
|
1613
|
+
switch (i.length) {
|
|
1614
|
+
case 0:
|
|
1615
|
+
return e.call(t);
|
|
1616
|
+
case 1:
|
|
1617
|
+
return e.call(t, i[0]);
|
|
1618
|
+
case 2:
|
|
1619
|
+
return e.call(t, i[0], i[1]);
|
|
1620
|
+
case 3:
|
|
1621
|
+
return e.call(t, i[0], i[1], i[2]);
|
|
1622
|
+
}
|
|
1623
|
+
return e.apply(t, i);
|
|
1624
|
+
}
|
|
1625
|
+
var Gi = 800, Zi = 16, Ji = Date.now;
|
|
1626
|
+
function Qi(e) {
|
|
1627
|
+
var t = 0, i = 0;
|
|
1628
|
+
return function() {
|
|
1629
|
+
var r = Ji(), n = Zi - (r - i);
|
|
1630
|
+
if (i = r, n > 0) {
|
|
1631
|
+
if (++t >= Gi)
|
|
1632
|
+
return arguments[0];
|
|
1633
|
+
} else
|
|
1634
|
+
t = 0;
|
|
1635
|
+
return e.apply(void 0, arguments);
|
|
1636
|
+
};
|
|
1637
|
+
}
|
|
1638
|
+
function tr(e) {
|
|
1639
|
+
return function() {
|
|
1640
|
+
return e;
|
|
1641
|
+
};
|
|
1642
|
+
}
|
|
1643
|
+
var er = function() {
|
|
1644
|
+
try {
|
|
1645
|
+
var e = Bi(Object, "defineProperty");
|
|
1646
|
+
return e({}, "", {}), e;
|
|
1647
|
+
} catch (t) {
|
|
1648
|
+
}
|
|
1649
|
+
}(), pt = er, ir = pt ? function(e, t) {
|
|
1650
|
+
return pt(e, "toString", {
|
|
1651
|
+
configurable: !0,
|
|
1652
|
+
enumerable: !1,
|
|
1653
|
+
value: tr(t),
|
|
1654
|
+
writable: !0
|
|
1655
|
+
});
|
|
1656
|
+
} : Ae, rr = ir, nr = Qi(rr), ar = nr, sr = 9007199254740991, or = /^(?:0|[1-9]\d*)$/;
|
|
1657
|
+
function Ie(e, t) {
|
|
1658
|
+
var i = typeof e;
|
|
1659
|
+
return t = t == null ? sr : t, !!t && (i == "number" || i != "symbol" && or.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
1660
|
+
}
|
|
1661
|
+
function De(e, t, i) {
|
|
1662
|
+
t == "__proto__" && pt ? pt(e, t, {
|
|
1663
|
+
configurable: !0,
|
|
1664
|
+
enumerable: !0,
|
|
1665
|
+
value: i,
|
|
1666
|
+
writable: !0
|
|
1667
|
+
}) : e[t] = i;
|
|
1668
|
+
}
|
|
1669
|
+
function Ce(e, t) {
|
|
1670
|
+
return e === t || e !== e && t !== t;
|
|
1671
|
+
}
|
|
1672
|
+
var lr = Object.prototype, ur = lr.hasOwnProperty;
|
|
1673
|
+
function Ne(e, t, i) {
|
|
1674
|
+
var r = e[t];
|
|
1675
|
+
(!(ur.call(e, t) && Ce(r, i)) || i === void 0 && !(t in e)) && De(e, t, i);
|
|
1676
|
+
}
|
|
1677
|
+
function hr(e, t, i, r) {
|
|
1678
|
+
var n = !i;
|
|
1679
|
+
i || (i = {});
|
|
1680
|
+
for (var a = -1, s = t.length; ++a < s; ) {
|
|
1681
|
+
var o = t[a], u = r ? r(i[o], e[o], o, i, e) : void 0;
|
|
1682
|
+
u === void 0 && (u = e[o]), n ? De(i, o, u) : Ne(i, o, u);
|
|
1683
|
+
}
|
|
1684
|
+
return i;
|
|
1685
|
+
}
|
|
1686
|
+
var fe = Math.max;
|
|
1687
|
+
function cr(e, t, i) {
|
|
1688
|
+
return t = fe(t === void 0 ? e.length - 1 : t, 0), function() {
|
|
1689
|
+
for (var r = arguments, n = -1, a = fe(r.length - t, 0), s = Array(a); ++n < a; )
|
|
1690
|
+
s[n] = r[t + n];
|
|
1691
|
+
n = -1;
|
|
1692
|
+
for (var o = Array(t + 1); ++n < t; )
|
|
1693
|
+
o[n] = r[n];
|
|
1694
|
+
return o[t] = i(s), Ki(e, this, o);
|
|
1695
|
+
};
|
|
1696
|
+
}
|
|
1697
|
+
function fr(e, t) {
|
|
1698
|
+
return ar(cr(e, t, Ae), e + "");
|
|
1699
|
+
}
|
|
1700
|
+
var dr = 9007199254740991;
|
|
1701
|
+
function Le(e) {
|
|
1702
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= dr;
|
|
1703
|
+
}
|
|
1704
|
+
function Pt(e) {
|
|
1705
|
+
return e != null && Le(e.length) && !xe(e);
|
|
1706
|
+
}
|
|
1707
|
+
function vr(e, t, i) {
|
|
1708
|
+
if (!zt(i))
|
|
1709
|
+
return !1;
|
|
1710
|
+
var r = typeof t;
|
|
1711
|
+
return (r == "number" ? Pt(i) && Ie(t, i.length) : r == "string" && t in i) ? Ce(i[t], e) : !1;
|
|
1712
|
+
}
|
|
1713
|
+
function gr(e) {
|
|
1714
|
+
return fr(function(t, i) {
|
|
1715
|
+
var r = -1, n = i.length, a = n > 1 ? i[n - 1] : void 0, s = n > 2 ? i[2] : void 0;
|
|
1716
|
+
for (a = e.length > 3 && typeof a == "function" ? (n--, a) : void 0, s && vr(i[0], i[1], s) && (a = n < 3 ? void 0 : a, n = 1), t = Object(t); ++r < n; ) {
|
|
1717
|
+
var o = i[r];
|
|
1718
|
+
o && e(t, o, r, a);
|
|
1719
|
+
}
|
|
1720
|
+
return t;
|
|
1721
|
+
});
|
|
1722
|
+
}
|
|
1723
|
+
var mr = Object.prototype;
|
|
1724
|
+
function ze(e) {
|
|
1725
|
+
var t = e && e.constructor, i = typeof t == "function" && t.prototype || mr;
|
|
1726
|
+
return e === i;
|
|
1727
|
+
}
|
|
1728
|
+
function pr(e, t) {
|
|
1729
|
+
for (var i = -1, r = Array(e); ++i < e; )
|
|
1730
|
+
r[i] = t(i);
|
|
1731
|
+
return r;
|
|
1732
|
+
}
|
|
1733
|
+
var br = "[object Arguments]";
|
|
1734
|
+
function de(e) {
|
|
1735
|
+
return Lt(e) && Nt(e) == br;
|
|
1736
|
+
}
|
|
1737
|
+
var Pe = Object.prototype, yr = Pe.hasOwnProperty, wr = Pe.propertyIsEnumerable, Er = de(function() {
|
|
1738
|
+
return arguments;
|
|
1739
|
+
}()) ? de : function(e) {
|
|
1740
|
+
return Lt(e) && yr.call(e, "callee") && !wr.call(e, "callee");
|
|
1741
|
+
}, Tr = Er;
|
|
1742
|
+
function _r() {
|
|
1743
|
+
return !1;
|
|
1744
|
+
}
|
|
1745
|
+
var Ve = typeof exports == "object" && exports && !exports.nodeType && exports, ve = Ve && typeof module == "object" && module && !module.nodeType && module, Sr = ve && ve.exports === Ve, ge = Sr ? Ct.Buffer : void 0, Or = ge ? ge.isBuffer : void 0, Ar = Or || _r, xr = Ar, Ir = "[object Arguments]", Dr = "[object Array]", Cr = "[object Boolean]", Nr = "[object Date]", Lr = "[object Error]", zr = "[object Function]", Pr = "[object Map]", Vr = "[object Number]", Rr = "[object Object]", kr = "[object RegExp]", jr = "[object Set]", $r = "[object String]", Fr = "[object WeakMap]", Mr = "[object ArrayBuffer]", Yr = "[object DataView]", Wr = "[object Float32Array]", Xr = "[object Float64Array]", Hr = "[object Int8Array]", qr = "[object Int16Array]", Ur = "[object Int32Array]", Br = "[object Uint8Array]", Kr = "[object Uint8ClampedArray]", Gr = "[object Uint16Array]", Zr = "[object Uint32Array]", E = {};
|
|
1746
|
+
E[Wr] = E[Xr] = E[Hr] = E[qr] = E[Ur] = E[Br] = E[Kr] = E[Gr] = E[Zr] = !0;
|
|
1747
|
+
E[Ir] = E[Dr] = E[Mr] = E[Cr] = E[Yr] = E[Nr] = E[Lr] = E[zr] = E[Pr] = E[Vr] = E[Rr] = E[kr] = E[jr] = E[$r] = E[Fr] = !1;
|
|
1748
|
+
function Jr(e) {
|
|
1749
|
+
return Lt(e) && Le(e.length) && !!E[Nt(e)];
|
|
1750
|
+
}
|
|
1751
|
+
function Qr(e) {
|
|
1752
|
+
return function(t) {
|
|
1753
|
+
return e(t);
|
|
1754
|
+
};
|
|
1755
|
+
}
|
|
1756
|
+
var Re = typeof exports == "object" && exports && !exports.nodeType && exports, nt = Re && typeof module == "object" && module && !module.nodeType && module, tn = nt && nt.exports === Re, Et = tn && Se.process, en = function() {
|
|
1757
|
+
try {
|
|
1758
|
+
var e = nt && nt.require && nt.require("util").types;
|
|
1759
|
+
return e || Et && Et.binding && Et.binding("util");
|
|
1760
|
+
} catch (t) {
|
|
1761
|
+
}
|
|
1762
|
+
}(), me = en, pe = me && me.isTypedArray, rn = pe ? Qr(pe) : Jr, nn = rn, an = Object.prototype, sn = an.hasOwnProperty;
|
|
1763
|
+
function on(e, t) {
|
|
1764
|
+
var i = Di(e), r = !i && Tr(e), n = !i && !r && xr(e), a = !i && !r && !n && nn(e), s = i || r || n || a, o = s ? pr(e.length, String) : [], u = o.length;
|
|
1765
|
+
for (var l in e)
|
|
1766
|
+
(t || sn.call(e, l)) && !(s && (l == "length" || n && (l == "offset" || l == "parent") || a && (l == "buffer" || l == "byteLength" || l == "byteOffset") || Ie(l, u))) && o.push(l);
|
|
1767
|
+
return o;
|
|
1768
|
+
}
|
|
1769
|
+
function ln(e, t) {
|
|
1770
|
+
return function(i) {
|
|
1771
|
+
return e(t(i));
|
|
1772
|
+
};
|
|
1773
|
+
}
|
|
1774
|
+
var un = ln(Object.keys, Object), hn = un, cn = Object.prototype, fn = cn.hasOwnProperty;
|
|
1775
|
+
function dn(e) {
|
|
1776
|
+
if (!ze(e))
|
|
1777
|
+
return hn(e);
|
|
1778
|
+
var t = [];
|
|
1779
|
+
for (var i in Object(e))
|
|
1780
|
+
fn.call(e, i) && i != "constructor" && t.push(i);
|
|
1781
|
+
return t;
|
|
1782
|
+
}
|
|
1783
|
+
function vn(e) {
|
|
1784
|
+
return Pt(e) ? on(e) : dn(e);
|
|
1785
|
+
}
|
|
1786
|
+
var gn = Object.prototype, mn = gn.hasOwnProperty;
|
|
1787
|
+
gr(function(e, t) {
|
|
1788
|
+
if (ze(t) || Pt(t)) {
|
|
1789
|
+
hr(t, vn(t), e);
|
|
1790
|
+
return;
|
|
1791
|
+
}
|
|
1792
|
+
for (var i in t)
|
|
1793
|
+
mn.call(t, i) && Ne(e, i, t[i]);
|
|
1794
|
+
});
|
|
1795
|
+
var pn = function() {
|
|
1796
|
+
var e = this, t = e.$createElement, i = e._self._c || t;
|
|
1797
|
+
return i("div", [e._t("default", null, { images: e.images, options: e.options })], 2);
|
|
1798
|
+
}, bn = [];
|
|
1799
|
+
function yn(e, t, i, r, n, a, s, o) {
|
|
1800
|
+
var u = typeof e == "function" ? e.options : e;
|
|
1801
|
+
t && (u.render = t, u.staticRenderFns = i, u._compiled = !0), r && (u.functional = !0), a && (u._scopeId = "data-v-" + a);
|
|
1802
|
+
var l;
|
|
1803
|
+
if (s ? (l = function(d) {
|
|
1804
|
+
d = d || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !d && typeof __VUE_SSR_CONTEXT__ != "undefined" && (d = __VUE_SSR_CONTEXT__), n && n.call(this, d), d && d._registeredComponents && d._registeredComponents.add(s);
|
|
1805
|
+
}, u._ssrRegister = l) : n && (l = o ? function() {
|
|
1806
|
+
n.call(
|
|
1807
|
+
this,
|
|
1808
|
+
(u.functional ? this.parent : this).$root.$options.shadowRoot
|
|
1809
|
+
);
|
|
1810
|
+
} : n), l)
|
|
1811
|
+
if (u.functional) {
|
|
1812
|
+
u._injectStyles = l;
|
|
1813
|
+
var h = u.render;
|
|
1814
|
+
u.render = function(_, w) {
|
|
1815
|
+
return l.call(w), h(_, w);
|
|
1565
1816
|
};
|
|
1566
1817
|
} else {
|
|
1567
|
-
var c =
|
|
1568
|
-
|
|
1818
|
+
var c = u.beforeCreate;
|
|
1819
|
+
u.beforeCreate = c ? [].concat(c, l) : [l];
|
|
1569
1820
|
}
|
|
1570
1821
|
return {
|
|
1571
|
-
exports:
|
|
1572
|
-
options:
|
|
1822
|
+
exports: e,
|
|
1823
|
+
options: u
|
|
1573
1824
|
};
|
|
1574
1825
|
}
|
|
1575
|
-
const
|
|
1826
|
+
const wn = {
|
|
1576
1827
|
props: {
|
|
1577
1828
|
images: {
|
|
1578
1829
|
type: Array
|
|
@@ -1633,47 +1884,53 @@ const $e = {
|
|
|
1633
1884
|
this.$viewer && this.$viewer.destroy();
|
|
1634
1885
|
},
|
|
1635
1886
|
createViewer() {
|
|
1636
|
-
this.$viewer = new
|
|
1887
|
+
this.$viewer = new _e(this.$el, this.options), this.$emit("inited", this.$viewer);
|
|
1637
1888
|
}
|
|
1638
1889
|
}
|
|
1639
|
-
},
|
|
1640
|
-
var
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1890
|
+
}, be = {};
|
|
1891
|
+
var En = /* @__PURE__ */ yn(
|
|
1892
|
+
wn,
|
|
1893
|
+
pn,
|
|
1894
|
+
bn,
|
|
1895
|
+
!1,
|
|
1896
|
+
Tn,
|
|
1897
|
+
null,
|
|
1898
|
+
null,
|
|
1899
|
+
null
|
|
1900
|
+
);
|
|
1901
|
+
function Tn(e) {
|
|
1902
|
+
for (let t in be)
|
|
1903
|
+
this[t] = be[t];
|
|
1904
|
+
}
|
|
1905
|
+
var _n = /* @__PURE__ */ function() {
|
|
1906
|
+
return En.exports;
|
|
1907
|
+
}();
|
|
1908
|
+
const Sn = /* @__PURE__ */ ke({
|
|
1652
1909
|
__name: "ImageViewer",
|
|
1653
1910
|
props: {
|
|
1654
1911
|
image: null
|
|
1655
1912
|
},
|
|
1656
|
-
setup(
|
|
1657
|
-
const t =
|
|
1658
|
-
return { __sfc: !0, props: t, images: i, VueViewer:
|
|
1913
|
+
setup(e) {
|
|
1914
|
+
const t = e, i = je(() => t.image ? [{ src: t.image, index: 0 }] : []);
|
|
1915
|
+
return { __sfc: !0, props: t, images: i, VueViewer: _n };
|
|
1659
1916
|
}
|
|
1660
1917
|
});
|
|
1661
|
-
var
|
|
1662
|
-
var t = this, i = t._self._c,
|
|
1663
|
-
return i(
|
|
1664
|
-
return i("img", { key:
|
|
1918
|
+
var On = function() {
|
|
1919
|
+
var t = this, i = t._self._c, r = t._self._setupProxy;
|
|
1920
|
+
return i(r.VueViewer, { staticStyle: { height: "100%" }, attrs: { images: r.images } }, t._l(r.images, function(n) {
|
|
1921
|
+
return i("img", { key: n.index, staticClass: "image", attrs: { alt: "图片", src: n.src } });
|
|
1665
1922
|
}), 0);
|
|
1666
|
-
},
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1923
|
+
}, An = [], xn = /* @__PURE__ */ $e(
|
|
1924
|
+
Sn,
|
|
1925
|
+
On,
|
|
1926
|
+
An,
|
|
1670
1927
|
!1,
|
|
1671
1928
|
null,
|
|
1672
1929
|
"b0f61c51",
|
|
1673
1930
|
null,
|
|
1674
1931
|
null
|
|
1675
1932
|
);
|
|
1676
|
-
const
|
|
1933
|
+
const Cn = xn.exports;
|
|
1677
1934
|
export {
|
|
1678
|
-
|
|
1935
|
+
Cn as default
|
|
1679
1936
|
};
|