@gx-design-vue/image 0.2.0-beta.21 → 0.2.0-beta.23

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/dist/image.js CHANGED
@@ -1,35 +1,11 @@
1
- import { createTypes as Ze } from "vue-types";
2
- import { createVNode as f, defineComponent as Ve, shallowRef as Te, ref as C, reactive as Xe, computed as L, watch as _, nextTick as Ye, Teleport as _e, Transition as ke, withDirectives as ze, vShow as Oe, mergeProps as We, cloneVNode as qe, watchEffect as Qe, createTextVNode as Je } from "vue";
3
- import { ExpandOutlined as Ke, OneToOneOutlined as et, CloseOutlined as tt, ZoomInOutlined as nt, ZoomOutOutlined as at, RotateRightOutlined as it, RotateLeftOutlined as rt, LeftOutlined as ot, RightOutlined as st } from "@ant-design/icons-vue";
4
- import { isServer as q, getPrefixCls as Ge, isInContainer as lt, getSlotVNode as Le, isString as ut, getScrollContainer as ct, isNumber as ft } from "@gx-design-vue/pro-utils";
5
- import { useState as Ne, onMountedOrActivated as dt } from "@gx-design-vue/pro-hooks";
6
- import { Keyframe as fe, useStyle as ht, mergeToken as gt, getTransitionProps as Ee, useProStyle as vt } from "@gx-design-vue/pro-provider";
7
- import { useThrottleFn as mt, useEventListener as $e } from "@vueuse/core";
8
- const R = Ze({
9
- func: void 0,
10
- bool: void 0,
11
- string: void 0,
12
- number: void 0,
13
- array: void 0,
14
- object: void 0,
15
- integer: void 0
16
- });
17
- R.extend([{
18
- name: "looseBool",
19
- getter: !0,
20
- type: Boolean,
21
- default: void 0
22
- }, {
23
- name: "style",
24
- getter: !0,
25
- type: [String, Object],
26
- default: void 0
27
- }, {
28
- name: "VueNode",
29
- getter: !0,
30
- type: null
31
- }]);
32
- const D = {
1
+ import { ref as A, reactive as _e, onMounted as kt, defineComponent as nt, createVNode as u, Teleport as en, Transition as Ke, withDirectives as Ye, Fragment as We, cloneVNode as Gn, vShow as Xe, shallowRef as fe, computed as _, watch as te, onUnmounted as Kn, mergeProps as Ze, watchEffect as Yn, createTextVNode as Wn, nextTick as Xn } from "vue";
2
+ import { CloseOutlined as Zn, LeftOutlined as Vn, RightOutlined as Qn, RotateLeftOutlined as qn, RotateRightOutlined as Jn, ZoomInOutlined as kn, ZoomOutOutlined as er, SwapOutlined as St } from "@ant-design/icons-vue";
3
+ import { classNames as Ee, getPrefixCls as tn, isNumber as Ve, getSlotVNode as H, isArray as nn, getSlot as tr, isServer as Ce, isInContainer as nr, getSlotsProps as rr, isString as or, getScrollContainer as ir } from "@gx-design-vue/pro-utils";
4
+ import { useState as Tt, onMountedOrActivated as ar } from "@gx-design-vue/pro-hooks";
5
+ import { Keyframe as Me, useStyle as lr, mergeToken as sr, unit as cr, getTransitionProps as Qe, useProStyle as ur } from "@gx-design-vue/pro-provider";
6
+ import { TinyColor as re } from "@ctrl/tinycolor";
7
+ import { useThrottleFn as fr, useEventListener as It } from "@vueuse/core";
8
+ const ge = {
33
9
  infinite: {
34
10
  type: Boolean,
35
11
  default: !0
@@ -38,19 +14,23 @@ const D = {
38
14
  type: Number,
39
15
  default: 2e3
40
16
  },
41
- initialIndex: {
17
+ current: {
42
18
  type: Number,
43
19
  default: 0
44
20
  },
45
21
  getContainer: {
46
22
  type: String
47
23
  }
48
- }, ue = {
49
- previewTeleported: {
50
- type: Boolean,
51
- default: !0
24
+ }, rn = {
25
+ preview: {
26
+ type: Object,
27
+ default: () => ({
28
+ current: 0,
29
+ infinite: !0,
30
+ onHideOnClickModal: !0
31
+ })
52
32
  },
53
- hideOnClickModal: {
33
+ showPreview: {
54
34
  type: Boolean,
55
35
  default: !0
56
36
  },
@@ -66,7 +46,7 @@ const D = {
66
46
  type: String,
67
47
  default: "contain"
68
48
  },
69
- lazy: R.bool,
49
+ lazy: Boolean,
70
50
  scrollContainer: {
71
51
  type: [String, Object]
72
52
  },
@@ -89,564 +69,47 @@ const D = {
89
69
  onClick: {
90
70
  type: Function
91
71
  },
92
- disablePreview: R.bool,
93
- previewSrcList: {
72
+ imageClassName: String,
73
+ imageStyle: Object,
74
+ width: Number,
75
+ height: Number,
76
+ zIndex: ge.zIndex,
77
+ getContainer: ge.getContainer
78
+ }, ne = {
79
+ previewUrls: {
94
80
  type: Array,
95
81
  default: () => []
96
82
  },
97
- imageClassName: R.string,
98
- imageStyle: R.style,
99
- width: R.number,
100
- height: R.number,
101
- zIndex: D.zIndex,
102
- infinite: D.infinite,
103
- getContainer: D.getContainer,
104
- initialIndex: {
105
- ...D.initialIndex,
106
- default: () => {
107
- }
108
- }
109
- }, pt = {
110
- urlList: {
111
- type: Array,
112
- default: () => []
113
- },
114
- teleported: ue.previewTeleported,
115
- zIndex: D.zIndex,
116
- initialIndex: D.initialIndex,
117
- infinite: D.infinite,
118
- getContainer: ue.getContainer,
119
- onHideOnClickModal: ue.hideOnClickModal,
83
+ disabled: Boolean,
84
+ zIndex: ge.zIndex,
85
+ current: ge.current,
86
+ infinite: ge.infinite,
87
+ getContainer: rn.getContainer,
88
+ onHideOnClickModal: Boolean,
89
+ countRender: [Function, Array, Object],
120
90
  icons: {
121
91
  type: Object,
122
92
  default: () => ({})
123
93
  }
124
94
  };
125
- function v(e, t) {
126
- bt(e) && (e = "100%");
127
- var n = yt(e);
128
- return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
129
- }
130
- function oe(e) {
131
- return Math.min(1, Math.max(0, e));
132
- }
133
- function bt(e) {
134
- return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
135
- }
136
- function yt(e) {
137
- return typeof e == "string" && e.indexOf("%") !== -1;
138
- }
139
- function Ue(e) {
140
- return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
141
- }
142
- function se(e) {
143
- return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
144
- }
145
- function H(e) {
146
- return e.length === 1 ? "0" + e : String(e);
147
- }
148
- function wt(e, t, n) {
149
- return {
150
- r: v(e, 255) * 255,
151
- g: v(t, 255) * 255,
152
- b: v(n, 255) * 255
153
- };
154
- }
155
- function Re(e, t, n) {
156
- e = v(e, 255), t = v(t, 255), n = v(n, 255);
157
- var a = Math.max(e, t, n), i = Math.min(e, t, n), r = 0, o = 0, l = (a + i) / 2;
158
- if (a === i)
159
- o = 0, r = 0;
160
- else {
161
- var c = a - i;
162
- switch (o = l > 0.5 ? c / (2 - a - i) : c / (a + i), a) {
163
- case e:
164
- r = (t - n) / c + (t < n ? 6 : 0);
165
- break;
166
- case t:
167
- r = (n - e) / c + 2;
168
- break;
169
- case n:
170
- r = (e - t) / c + 4;
171
- break;
172
- }
173
- r /= 6;
174
- }
175
- return { h: r, s: o, l };
176
- }
177
- function be(e, t, n) {
178
- return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
179
- }
180
- function St(e, t, n) {
181
- var a, i, r;
182
- if (e = v(e, 360), t = v(t, 100), n = v(n, 100), t === 0)
183
- i = n, r = n, a = n;
184
- else {
185
- var o = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - o;
186
- a = be(l, o, e + 1 / 3), i = be(l, o, e), r = be(l, o, e - 1 / 3);
187
- }
188
- return { r: a * 255, g: i * 255, b: r * 255 };
189
- }
190
- function De(e, t, n) {
191
- e = v(e, 255), t = v(t, 255), n = v(n, 255);
192
- var a = Math.max(e, t, n), i = Math.min(e, t, n), r = 0, o = a, l = a - i, c = a === 0 ? 0 : l / a;
193
- if (a === i)
194
- r = 0;
195
- else {
196
- switch (a) {
197
- case e:
198
- r = (t - n) / l + (t < n ? 6 : 0);
199
- break;
200
- case t:
201
- r = (n - e) / l + 2;
202
- break;
203
- case n:
204
- r = (e - t) / l + 4;
205
- break;
206
- }
207
- r /= 6;
208
- }
209
- return { h: r, s: c, v: o };
210
- }
211
- function xt(e, t, n) {
212
- e = v(e, 360) * 6, t = v(t, 100), n = v(n, 100);
213
- var a = Math.floor(e), i = e - a, r = n * (1 - t), o = n * (1 - i * t), l = n * (1 - (1 - i) * t), c = a % 6, S = [n, o, r, r, l, n][c], p = [l, n, n, o, r, r][c], E = [r, r, l, n, n, o][c];
214
- return { r: S * 255, g: p * 255, b: E * 255 };
215
- }
216
- function He(e, t, n, a) {
217
- var i = [
218
- H(Math.round(e).toString(16)),
219
- H(Math.round(t).toString(16)),
220
- H(Math.round(n).toString(16))
221
- ];
222
- return a && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join("");
223
- }
224
- function Mt(e, t, n, a, i) {
225
- var r = [
226
- H(Math.round(e).toString(16)),
227
- H(Math.round(t).toString(16)),
228
- H(Math.round(n).toString(16)),
229
- H(It(a))
230
- ];
231
- return i && r[0].startsWith(r[0].charAt(1)) && r[1].startsWith(r[1].charAt(1)) && r[2].startsWith(r[2].charAt(1)) && r[3].startsWith(r[3].charAt(1)) ? r[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) + r[3].charAt(0) : r.join("");
232
- }
233
- function It(e) {
234
- return Math.round(parseFloat(e) * 255).toString(16);
235
- }
236
- function Pe(e) {
237
- return w(e) / 255;
238
- }
239
- function w(e) {
240
- return parseInt(e, 16);
241
- }
242
- function At(e) {
243
- return {
244
- r: e >> 16,
245
- g: (e & 65280) >> 8,
246
- b: e & 255
247
- };
248
- }
249
- var Ae = {
250
- aliceblue: "#f0f8ff",
251
- antiquewhite: "#faebd7",
252
- aqua: "#00ffff",
253
- aquamarine: "#7fffd4",
254
- azure: "#f0ffff",
255
- beige: "#f5f5dc",
256
- bisque: "#ffe4c4",
257
- black: "#000000",
258
- blanchedalmond: "#ffebcd",
259
- blue: "#0000ff",
260
- blueviolet: "#8a2be2",
261
- brown: "#a52a2a",
262
- burlywood: "#deb887",
263
- cadetblue: "#5f9ea0",
264
- chartreuse: "#7fff00",
265
- chocolate: "#d2691e",
266
- coral: "#ff7f50",
267
- cornflowerblue: "#6495ed",
268
- cornsilk: "#fff8dc",
269
- crimson: "#dc143c",
270
- cyan: "#00ffff",
271
- darkblue: "#00008b",
272
- darkcyan: "#008b8b",
273
- darkgoldenrod: "#b8860b",
274
- darkgray: "#a9a9a9",
275
- darkgreen: "#006400",
276
- darkgrey: "#a9a9a9",
277
- darkkhaki: "#bdb76b",
278
- darkmagenta: "#8b008b",
279
- darkolivegreen: "#556b2f",
280
- darkorange: "#ff8c00",
281
- darkorchid: "#9932cc",
282
- darkred: "#8b0000",
283
- darksalmon: "#e9967a",
284
- darkseagreen: "#8fbc8f",
285
- darkslateblue: "#483d8b",
286
- darkslategray: "#2f4f4f",
287
- darkslategrey: "#2f4f4f",
288
- darkturquoise: "#00ced1",
289
- darkviolet: "#9400d3",
290
- deeppink: "#ff1493",
291
- deepskyblue: "#00bfff",
292
- dimgray: "#696969",
293
- dimgrey: "#696969",
294
- dodgerblue: "#1e90ff",
295
- firebrick: "#b22222",
296
- floralwhite: "#fffaf0",
297
- forestgreen: "#228b22",
298
- fuchsia: "#ff00ff",
299
- gainsboro: "#dcdcdc",
300
- ghostwhite: "#f8f8ff",
301
- goldenrod: "#daa520",
302
- gold: "#ffd700",
303
- gray: "#808080",
304
- green: "#008000",
305
- greenyellow: "#adff2f",
306
- grey: "#808080",
307
- honeydew: "#f0fff0",
308
- hotpink: "#ff69b4",
309
- indianred: "#cd5c5c",
310
- indigo: "#4b0082",
311
- ivory: "#fffff0",
312
- khaki: "#f0e68c",
313
- lavenderblush: "#fff0f5",
314
- lavender: "#e6e6fa",
315
- lawngreen: "#7cfc00",
316
- lemonchiffon: "#fffacd",
317
- lightblue: "#add8e6",
318
- lightcoral: "#f08080",
319
- lightcyan: "#e0ffff",
320
- lightgoldenrodyellow: "#fafad2",
321
- lightgray: "#d3d3d3",
322
- lightgreen: "#90ee90",
323
- lightgrey: "#d3d3d3",
324
- lightpink: "#ffb6c1",
325
- lightsalmon: "#ffa07a",
326
- lightseagreen: "#20b2aa",
327
- lightskyblue: "#87cefa",
328
- lightslategray: "#778899",
329
- lightslategrey: "#778899",
330
- lightsteelblue: "#b0c4de",
331
- lightyellow: "#ffffe0",
332
- lime: "#00ff00",
333
- limegreen: "#32cd32",
334
- linen: "#faf0e6",
335
- magenta: "#ff00ff",
336
- maroon: "#800000",
337
- mediumaquamarine: "#66cdaa",
338
- mediumblue: "#0000cd",
339
- mediumorchid: "#ba55d3",
340
- mediumpurple: "#9370db",
341
- mediumseagreen: "#3cb371",
342
- mediumslateblue: "#7b68ee",
343
- mediumspringgreen: "#00fa9a",
344
- mediumturquoise: "#48d1cc",
345
- mediumvioletred: "#c71585",
346
- midnightblue: "#191970",
347
- mintcream: "#f5fffa",
348
- mistyrose: "#ffe4e1",
349
- moccasin: "#ffe4b5",
350
- navajowhite: "#ffdead",
351
- navy: "#000080",
352
- oldlace: "#fdf5e6",
353
- olive: "#808000",
354
- olivedrab: "#6b8e23",
355
- orange: "#ffa500",
356
- orangered: "#ff4500",
357
- orchid: "#da70d6",
358
- palegoldenrod: "#eee8aa",
359
- palegreen: "#98fb98",
360
- paleturquoise: "#afeeee",
361
- palevioletred: "#db7093",
362
- papayawhip: "#ffefd5",
363
- peachpuff: "#ffdab9",
364
- peru: "#cd853f",
365
- pink: "#ffc0cb",
366
- plum: "#dda0dd",
367
- powderblue: "#b0e0e6",
368
- purple: "#800080",
369
- rebeccapurple: "#663399",
370
- red: "#ff0000",
371
- rosybrown: "#bc8f8f",
372
- royalblue: "#4169e1",
373
- saddlebrown: "#8b4513",
374
- salmon: "#fa8072",
375
- sandybrown: "#f4a460",
376
- seagreen: "#2e8b57",
377
- seashell: "#fff5ee",
378
- sienna: "#a0522d",
379
- silver: "#c0c0c0",
380
- skyblue: "#87ceeb",
381
- slateblue: "#6a5acd",
382
- slategray: "#708090",
383
- slategrey: "#708090",
384
- snow: "#fffafa",
385
- springgreen: "#00ff7f",
386
- steelblue: "#4682b4",
387
- tan: "#d2b48c",
388
- teal: "#008080",
389
- thistle: "#d8bfd8",
390
- tomato: "#ff6347",
391
- turquoise: "#40e0d0",
392
- violet: "#ee82ee",
393
- wheat: "#f5deb3",
394
- white: "#ffffff",
395
- whitesmoke: "#f5f5f5",
396
- yellow: "#ffff00",
397
- yellowgreen: "#9acd32"
398
- };
399
- function Ct(e) {
400
- var t = { r: 0, g: 0, b: 0 }, n = 1, a = null, i = null, r = null, o = !1, l = !1;
401
- return typeof e == "string" && (e = zt(e)), typeof e == "object" && (O(e.r) && O(e.g) && O(e.b) ? (t = wt(e.r, e.g, e.b), o = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : O(e.h) && O(e.s) && O(e.v) ? (a = se(e.s), i = se(e.v), t = xt(e.h, a, i), o = !0, l = "hsv") : O(e.h) && O(e.s) && O(e.l) && (a = se(e.s), r = se(e.l), t = St(e.h, a, r), o = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = Ue(n), {
402
- ok: o,
403
- format: e.format || l,
404
- r: Math.min(255, Math.max(t.r, 0)),
405
- g: Math.min(255, Math.max(t.g, 0)),
406
- b: Math.min(255, Math.max(t.b, 0)),
407
- a: n
408
- };
95
+ function dr(e, t) {
96
+ process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error(`Warning: ${t}`);
409
97
  }
410
- var Tt = "[-\\+]?\\d+%?", kt = "[-\\+]?\\d*\\.\\d+%?", N = "(?:".concat(kt, ")|(?:").concat(Tt, ")"), ye = "[\\s|\\(]+(".concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")\\s*\\)?"), we = "[\\s|\\(]+(".concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")\\s*\\)?"), T = {
411
- CSS_UNIT: new RegExp(N),
412
- rgb: new RegExp("rgb" + ye),
413
- rgba: new RegExp("rgba" + we),
414
- hsl: new RegExp("hsl" + ye),
415
- hsla: new RegExp("hsla" + we),
416
- hsv: new RegExp("hsv" + ye),
417
- hsva: new RegExp("hsva" + we),
418
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
419
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
420
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
421
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
422
- };
423
- function zt(e) {
424
- if (e = e.trim().toLowerCase(), e.length === 0)
425
- return !1;
426
- var t = !1;
427
- if (Ae[e])
428
- e = Ae[e], t = !0;
429
- else if (e === "transparent")
430
- return { r: 0, g: 0, b: 0, a: 0, format: "name" };
431
- var n = T.rgb.exec(e);
432
- return n ? { r: n[1], g: n[2], b: n[3] } : (n = T.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = T.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = T.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = T.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = T.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = T.hex8.exec(e), n ? {
433
- r: w(n[1]),
434
- g: w(n[2]),
435
- b: w(n[3]),
436
- a: Pe(n[4]),
437
- format: t ? "name" : "hex8"
438
- } : (n = T.hex6.exec(e), n ? {
439
- r: w(n[1]),
440
- g: w(n[2]),
441
- b: w(n[3]),
442
- format: t ? "name" : "hex"
443
- } : (n = T.hex4.exec(e), n ? {
444
- r: w(n[1] + n[1]),
445
- g: w(n[2] + n[2]),
446
- b: w(n[3] + n[3]),
447
- a: Pe(n[4] + n[4]),
448
- format: t ? "name" : "hex8"
449
- } : (n = T.hex3.exec(e), n ? {
450
- r: w(n[1] + n[1]),
451
- g: w(n[2] + n[2]),
452
- b: w(n[3] + n[3]),
453
- format: t ? "name" : "hex"
454
- } : !1)))))))));
455
- }
456
- function O(e) {
457
- return !!T.CSS_UNIT.exec(String(e));
458
- }
459
- var Q = (
460
- /** @class */
461
- function() {
462
- function e(t, n) {
463
- t === void 0 && (t = ""), n === void 0 && (n = {});
464
- var a;
465
- if (t instanceof e)
466
- return t;
467
- typeof t == "number" && (t = At(t)), this.originalInput = t;
468
- var i = Ct(t);
469
- this.originalInput = t, this.r = i.r, this.g = i.g, this.b = i.b, this.a = i.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (a = n.format) !== null && a !== void 0 ? a : i.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = i.ok;
470
- }
471
- return e.prototype.isDark = function() {
472
- return this.getBrightness() < 128;
473
- }, e.prototype.isLight = function() {
474
- return !this.isDark();
475
- }, e.prototype.getBrightness = function() {
476
- var t = this.toRgb();
477
- return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
478
- }, e.prototype.getLuminance = function() {
479
- var t = this.toRgb(), n, a, i, r = t.r / 255, o = t.g / 255, l = t.b / 255;
480
- return r <= 0.03928 ? n = r / 12.92 : n = Math.pow((r + 0.055) / 1.055, 2.4), o <= 0.03928 ? a = o / 12.92 : a = Math.pow((o + 0.055) / 1.055, 2.4), l <= 0.03928 ? i = l / 12.92 : i = Math.pow((l + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * a + 0.0722 * i;
481
- }, e.prototype.getAlpha = function() {
482
- return this.a;
483
- }, e.prototype.setAlpha = function(t) {
484
- return this.a = Ue(t), this.roundA = Math.round(100 * this.a) / 100, this;
485
- }, e.prototype.isMonochrome = function() {
486
- var t = this.toHsl().s;
487
- return t === 0;
488
- }, e.prototype.toHsv = function() {
489
- var t = De(this.r, this.g, this.b);
490
- return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
491
- }, e.prototype.toHsvString = function() {
492
- var t = De(this.r, this.g, this.b), n = Math.round(t.h * 360), a = Math.round(t.s * 100), i = Math.round(t.v * 100);
493
- return this.a === 1 ? "hsv(".concat(n, ", ").concat(a, "%, ").concat(i, "%)") : "hsva(".concat(n, ", ").concat(a, "%, ").concat(i, "%, ").concat(this.roundA, ")");
494
- }, e.prototype.toHsl = function() {
495
- var t = Re(this.r, this.g, this.b);
496
- return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
497
- }, e.prototype.toHslString = function() {
498
- var t = Re(this.r, this.g, this.b), n = Math.round(t.h * 360), a = Math.round(t.s * 100), i = Math.round(t.l * 100);
499
- return this.a === 1 ? "hsl(".concat(n, ", ").concat(a, "%, ").concat(i, "%)") : "hsla(".concat(n, ", ").concat(a, "%, ").concat(i, "%, ").concat(this.roundA, ")");
500
- }, e.prototype.toHex = function(t) {
501
- return t === void 0 && (t = !1), He(this.r, this.g, this.b, t);
502
- }, e.prototype.toHexString = function(t) {
503
- return t === void 0 && (t = !1), "#" + this.toHex(t);
504
- }, e.prototype.toHex8 = function(t) {
505
- return t === void 0 && (t = !1), Mt(this.r, this.g, this.b, this.a, t);
506
- }, e.prototype.toHex8String = function(t) {
507
- return t === void 0 && (t = !1), "#" + this.toHex8(t);
508
- }, e.prototype.toHexShortString = function(t) {
509
- return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t);
510
- }, e.prototype.toRgb = function() {
511
- return {
512
- r: Math.round(this.r),
513
- g: Math.round(this.g),
514
- b: Math.round(this.b),
515
- a: this.a
516
- };
517
- }, e.prototype.toRgbString = function() {
518
- var t = Math.round(this.r), n = Math.round(this.g), a = Math.round(this.b);
519
- return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(a, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(a, ", ").concat(this.roundA, ")");
520
- }, e.prototype.toPercentageRgb = function() {
521
- var t = function(n) {
522
- return "".concat(Math.round(v(n, 255) * 100), "%");
523
- };
524
- return {
525
- r: t(this.r),
526
- g: t(this.g),
527
- b: t(this.b),
528
- a: this.a
529
- };
530
- }, e.prototype.toPercentageRgbString = function() {
531
- var t = function(n) {
532
- return Math.round(v(n, 255) * 100);
533
- };
534
- return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")");
535
- }, e.prototype.toName = function() {
536
- if (this.a === 0)
537
- return "transparent";
538
- if (this.a < 1)
539
- return !1;
540
- for (var t = "#" + He(this.r, this.g, this.b, !1), n = 0, a = Object.entries(Ae); n < a.length; n++) {
541
- var i = a[n], r = i[0], o = i[1];
542
- if (t === o)
543
- return r;
544
- }
545
- return !1;
546
- }, e.prototype.toString = function(t) {
547
- var n = !!t;
548
- t = t ?? this.format;
549
- var a = !1, i = this.a < 1 && this.a >= 0, r = !n && i && (t.startsWith("hex") || t === "name");
550
- return r ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (a = this.toRgbString()), t === "prgb" && (a = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (a = this.toHexString()), t === "hex3" && (a = this.toHexString(!0)), t === "hex4" && (a = this.toHex8String(!0)), t === "hex8" && (a = this.toHex8String()), t === "name" && (a = this.toName()), t === "hsl" && (a = this.toHslString()), t === "hsv" && (a = this.toHsvString()), a || this.toHexString());
551
- }, e.prototype.toNumber = function() {
552
- return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
553
- }, e.prototype.clone = function() {
554
- return new e(this.toString());
555
- }, e.prototype.lighten = function(t) {
556
- t === void 0 && (t = 10);
557
- var n = this.toHsl();
558
- return n.l += t / 100, n.l = oe(n.l), new e(n);
559
- }, e.prototype.brighten = function(t) {
560
- t === void 0 && (t = 10);
561
- var n = this.toRgb();
562
- return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), new e(n);
563
- }, e.prototype.darken = function(t) {
564
- t === void 0 && (t = 10);
565
- var n = this.toHsl();
566
- return n.l -= t / 100, n.l = oe(n.l), new e(n);
567
- }, e.prototype.tint = function(t) {
568
- return t === void 0 && (t = 10), this.mix("white", t);
569
- }, e.prototype.shade = function(t) {
570
- return t === void 0 && (t = 10), this.mix("black", t);
571
- }, e.prototype.desaturate = function(t) {
572
- t === void 0 && (t = 10);
573
- var n = this.toHsl();
574
- return n.s -= t / 100, n.s = oe(n.s), new e(n);
575
- }, e.prototype.saturate = function(t) {
576
- t === void 0 && (t = 10);
577
- var n = this.toHsl();
578
- return n.s += t / 100, n.s = oe(n.s), new e(n);
579
- }, e.prototype.greyscale = function() {
580
- return this.desaturate(100);
581
- }, e.prototype.spin = function(t) {
582
- var n = this.toHsl(), a = (n.h + t) % 360;
583
- return n.h = a < 0 ? 360 + a : a, new e(n);
584
- }, e.prototype.mix = function(t, n) {
585
- n === void 0 && (n = 50);
586
- var a = this.toRgb(), i = new e(t).toRgb(), r = n / 100, o = {
587
- r: (i.r - a.r) * r + a.r,
588
- g: (i.g - a.g) * r + a.g,
589
- b: (i.b - a.b) * r + a.b,
590
- a: (i.a - a.a) * r + a.a
591
- };
592
- return new e(o);
593
- }, e.prototype.analogous = function(t, n) {
594
- t === void 0 && (t = 6), n === void 0 && (n = 30);
595
- var a = this.toHsl(), i = 360 / n, r = [this];
596
- for (a.h = (a.h - (i * t >> 1) + 720) % 360; --t; )
597
- a.h = (a.h + i) % 360, r.push(new e(a));
598
- return r;
599
- }, e.prototype.complement = function() {
600
- var t = this.toHsl();
601
- return t.h = (t.h + 180) % 360, new e(t);
602
- }, e.prototype.monochromatic = function(t) {
603
- t === void 0 && (t = 6);
604
- for (var n = this.toHsv(), a = n.h, i = n.s, r = n.v, o = [], l = 1 / t; t--; )
605
- o.push(new e({ h: a, s: i, v: r })), r = (r + l) % 1;
606
- return o;
607
- }, e.prototype.splitcomplement = function() {
608
- var t = this.toHsl(), n = t.h;
609
- return [
610
- this,
611
- new e({ h: (n + 72) % 360, s: t.s, l: t.l }),
612
- new e({ h: (n + 216) % 360, s: t.s, l: t.l })
613
- ];
614
- }, e.prototype.onBackground = function(t) {
615
- var n = this.toRgb(), a = new e(t).toRgb(), i = n.a + a.a * (1 - n.a);
616
- return new e({
617
- r: (n.r * n.a + a.r * a.a * (1 - n.a)) / i,
618
- g: (n.g * n.a + a.g * a.a * (1 - n.a)) / i,
619
- b: (n.b * n.a + a.b * a.a * (1 - n.a)) / i,
620
- a: i
621
- });
622
- }, e.prototype.triad = function() {
623
- return this.polyad(3);
624
- }, e.prototype.tetrad = function() {
625
- return this.polyad(4);
626
- }, e.prototype.polyad = function(t) {
627
- for (var n = this.toHsl(), a = n.h, i = [this], r = 360 / t, o = 1; o < t; o++)
628
- i.push(new e({ h: (a + o * r) % 360, s: n.s, l: n.l }));
629
- return i;
630
- }, e.prototype.equals = function(t) {
631
- return this.toRgbString() === new e(t).toRgbString();
632
- }, e;
633
- }()
634
- );
635
- const Ot = new fe("viewFadeIn", {
98
+ const gr = new Me("viewFadeIn", {
636
99
  "0%": {
637
100
  opacity: 0
638
101
  },
639
102
  "100%": {
640
103
  opacity: 1
641
104
  }
642
- }), Lt = new fe("viewFadeOut", {
105
+ }), vr = new Me("viewFadeOut", {
643
106
  "0%": {
644
107
  opacity: 1
645
108
  },
646
109
  "100%": {
647
110
  opacity: 0
648
111
  }
649
- }), Nt = new fe("viewZoomBadgeIn", {
112
+ }), pr = new Me("viewZoomBadgeIn", {
650
113
  "0%": {
651
114
  transform: "scale(0.2)",
652
115
  opacity: 0
@@ -655,7 +118,7 @@ const Ot = new fe("viewFadeIn", {
655
118
  transform: "scale(1)",
656
119
  opacity: 1
657
120
  }
658
- }), Et = new fe("viewZoomBadgeOut", {
121
+ }), hr = new Me("viewZoomBadgeOut", {
659
122
  "0%": {
660
123
  transform: "scale(1)"
661
124
  },
@@ -663,11 +126,11 @@ const Ot = new fe("viewFadeIn", {
663
126
  transform: "scale(0.2)",
664
127
  opacity: 0
665
128
  }
666
- }), Fe = (e) => ({
129
+ }), Ot = (e) => ({
667
130
  position: e || "absolute",
668
131
  inset: 0
669
132
  });
670
- function Se(e) {
133
+ function Fe(e) {
671
134
  return {
672
135
  position: e,
673
136
  top: 0,
@@ -676,143 +139,149 @@ function Se(e) {
676
139
  insetInlineStart: 0
677
140
  };
678
141
  }
679
- const $t = (e) => ({
680
- boxSizing: "border-box",
681
- margin: 0,
682
- padding: 0,
683
- color: e.colorText,
684
- fontSize: e.fontSize,
685
- lineHeight: e.lineHeight,
686
- listStyle: "none",
687
- fontFamily: e.fontFamily
688
- }), Rt = (e) => {
689
- const { componentCls: t, modalMaskBg: n, paddingSM: a, previewOperationColorDisabled: i, motionDurationSlow: r } = e, o = new Q(n).setAlpha(0.1), l = o.clone().setAlpha(0.2);
142
+ const mr = (e) => {
143
+ const { previewCls: t, modalMaskBg: n, paddingSM: r, marginXL: o, margin: i, paddingLG: a, previewOperationColorDisabled: s, previewOperationHoverColor: g, motionDurationSlow: d, iconCls: y, colorTextLightSolid: I } = e, h = new re(n).setAlpha(0.1), v = h.clone().setAlpha(0.2);
690
144
  return {
691
- [`${t}-operations`]: {
692
- ...$t(e),
145
+ [`${t}-footer`]: {
146
+ position: "fixed",
147
+ bottom: o,
148
+ left: {
149
+ _skip_check_: !0,
150
+ value: "50%"
151
+ },
693
152
  display: "flex",
694
- flexDirection: "row-reverse",
153
+ flexDirection: "column",
695
154
  alignItems: "center",
696
155
  color: e.previewOperationColor,
697
- listStyle: "none",
698
- background: o.toRgbString(),
699
- pointerEvents: "auto",
156
+ transform: "translateX(-50%)"
157
+ },
158
+ [`${t}-progress`]: {
159
+ marginBottom: i
160
+ },
161
+ [`${t}-close`]: {
162
+ position: "fixed",
163
+ top: o,
164
+ right: {
165
+ _skip_check_: !0,
166
+ value: o
167
+ },
168
+ display: "flex",
169
+ color: I,
170
+ backgroundColor: h.toRgbString(),
171
+ borderRadius: "50%",
172
+ padding: r,
173
+ outline: 0,
174
+ border: 0,
175
+ cursor: "pointer",
176
+ transition: `all ${d}`,
177
+ "&:hover": {
178
+ backgroundColor: v.toRgbString()
179
+ },
180
+ [`& > ${y}`]: {
181
+ fontSize: e.previewOperationSize
182
+ }
183
+ },
184
+ [`${t}-operations`]: {
185
+ display: "flex",
186
+ alignItems: "center",
187
+ padding: `0 ${cr(a)}`,
188
+ backgroundColor: h.toRgbString(),
189
+ borderRadius: 100,
700
190
  "&-operation": {
701
- marginInlineStart: a,
702
- padding: a,
191
+ marginInlineStart: r,
192
+ padding: r,
703
193
  cursor: "pointer",
704
- transition: `all ${r}`,
194
+ transition: `all ${d}`,
705
195
  userSelect: "none",
706
- "&:hover": {
707
- background: l.toRgbString()
196
+ [`&:not(${t}-operations-operation-disabled):hover > ${y}`]: {
197
+ color: g
708
198
  },
709
199
  "&-disabled": {
710
- color: i,
711
- pointerEvents: "none"
200
+ color: s,
201
+ cursor: "not-allowed"
712
202
  },
713
- "&:last-of-type": {
203
+ "&:first-of-type": {
714
204
  marginInlineStart: 0
205
+ },
206
+ [`& > ${y}`]: {
207
+ fontSize: e.previewOperationSize
715
208
  }
716
- },
717
- "&-progress": {
718
- position: "absolute",
719
- left: { _skip_check_: !0, value: "50%" },
720
- transform: "translateX(-50%)"
721
- },
722
- "&-icon": {
723
- fontSize: e.previewOperationSize
724
209
  }
725
210
  }
726
211
  };
727
- }, Dt = (e) => {
728
- const { modalMaskBg: t, previewOperationColorDisabled: n, zIndexPopup: a, motionDurationSlow: i } = e, r = new Q(t).setAlpha(0.1), o = r.clone().setAlpha(0.2);
212
+ }, wr = (e) => {
213
+ const { modalMaskBg: t, iconCls: n, previewOperationColorDisabled: r, previewCls: o, zIndexPopup: i, motionDurationSlow: a } = e, s = new re(t).setAlpha(0.1), g = s.clone().setAlpha(0.2);
729
214
  return {
730
- [`${e.componentCls}-switch-left, ${e.componentCls}-switch-right`]: {
215
+ [`${o}-switch-left, ${o}-switch-right`]: {
731
216
  position: "fixed",
732
217
  insetBlockStart: "50%",
733
- zIndex: a + 1,
218
+ zIndex: e.calc(i).add(1).equal(),
734
219
  display: "flex",
735
220
  alignItems: "center",
736
221
  justifyContent: "center",
737
222
  width: e.imagePreviewSwitchSize,
738
223
  height: e.imagePreviewSwitchSize,
739
- marginTop: -e.imagePreviewSwitchSize / 2,
224
+ marginTop: e.calc(e.imagePreviewSwitchSize).mul(-1).div(2).equal(),
740
225
  color: e.previewOperationColor,
741
- background: r.toRgbString(),
226
+ background: s.toRgbString(),
742
227
  borderRadius: "50%",
743
228
  transform: "translateY(-50%)",
744
229
  cursor: "pointer",
745
- transition: `all ${i}`,
746
- pointerEvents: "auto",
230
+ transition: `all ${a}`,
747
231
  userSelect: "none",
748
232
  "&:hover": {
749
- background: o.toRgbString()
233
+ background: g.toRgbString()
750
234
  },
751
235
  "&-disabled": {
752
236
  "&, &:hover": {
753
- color: n,
237
+ color: r,
754
238
  background: "transparent",
755
239
  cursor: "not-allowed",
756
- [`> ${e.iconCls}`]: {
240
+ [`> ${n}`]: {
757
241
  cursor: "not-allowed"
758
242
  }
759
243
  }
760
244
  },
761
- [`> ${e.iconCls}`]: {
245
+ [`> ${n}`]: {
762
246
  fontSize: e.previewOperationSize
763
247
  }
764
248
  },
765
- [`${e.componentCls}-switch-left`]: {
249
+ [`${o}-switch-left`]: {
766
250
  insetInlineStart: e.marginSM
767
251
  },
768
- [`${e.componentCls}-switch-right`]: {
252
+ [`${o}-switch-right`]: {
769
253
  insetInlineEnd: e.marginSM
770
254
  }
771
255
  };
772
- }, Ht = (e) => ({
256
+ }, yr = (e) => ({
773
257
  [e.componentCls]: {
258
+ height: "100%",
259
+ textAlign: "center",
260
+ pointerEvents: "none",
774
261
  "&-root": {
775
- ...Se("fixed"),
262
+ ...Fe("fixed"),
776
263
  zIndex: e.zIndexPopup,
777
264
  overflow: "auto",
778
265
  outline: 0,
779
266
  WebkitOverflowScrolling: "touch"
780
267
  },
781
- "&-wrapper": {
782
- ...Se("fixed"),
268
+ "&-wrap": {
269
+ ...Fe("fixed"),
783
270
  zIndex: e.zIndexPopup,
784
271
  overflow: "auto",
785
272
  outline: 0,
786
273
  WebkitOverflowScrolling: "touch"
787
274
  },
788
275
  "&-mask": {
789
- ...Se("fixed"),
276
+ ...Fe("fixed"),
790
277
  zIndex: e.zIndexPopupBase,
791
278
  height: "100%",
792
279
  backgroundColor: e.colorBgMask
793
280
  },
794
- "&-block": {
795
- height: "100%",
796
- textAlign: "center",
797
- pointerEvents: "none"
798
- },
799
281
  "&-body": {
800
- ...Fe(),
282
+ ...Ot(),
801
283
  overflow: "hidden"
802
284
  },
803
- "&-canvas": {
804
- ...Fe(),
805
- display: "flex",
806
- justifyContent: "center",
807
- alignItems: "center",
808
- "&::before": {
809
- display: "inline-block",
810
- width: 1,
811
- height: "50%",
812
- marginInlineEnd: -1,
813
- content: '""'
814
- }
815
- },
816
285
  "&-img": {
817
286
  maxWidth: "100%",
818
287
  maxHeight: "100%",
@@ -821,20 +290,34 @@ const $t = (e) => ({
821
290
  cursor: "grab",
822
291
  transition: `transform ${e.motionDurationSlow} ${e.motionEaseOut} 0s`,
823
292
  userSelect: "none",
824
- pointerEvents: "auto"
293
+ pointerEvents: "auto",
294
+ "&-wrapper": {
295
+ ...Ot(),
296
+ display: "flex",
297
+ justifyContent: "center",
298
+ alignItems: "center",
299
+ transition: `transform ${e.motionDurationSlow} ${e.motionEaseOut} 0s`,
300
+ "&::before": {
301
+ display: "inline-block",
302
+ width: 1,
303
+ height: "50%",
304
+ marginInlineEnd: -1,
305
+ content: '""'
306
+ }
307
+ }
825
308
  },
826
309
  "&-fade-appear, &-fade-enter": {
827
- animationName: Ot,
310
+ animationName: gr,
828
311
  animationDuration: e.motionDurationSlow,
829
312
  animationTimingFunction: "linear"
830
313
  },
831
314
  "&-fade-leave": {
832
- animationName: Lt,
315
+ animationName: vr,
833
316
  animationDuration: e.motionDurationSlow,
834
317
  animationTimingFunction: "linear"
835
318
  },
836
319
  "&-zoom-appear, &-zoom-enter": {
837
- animationName: Nt,
320
+ animationName: pr,
838
321
  opacity: 0,
839
322
  animationTimingFunction: e.motionEaseOutCirc,
840
323
  animationFillMode: "both",
@@ -846,7 +329,7 @@ const $t = (e) => ({
846
329
  animationPlayState: "running"
847
330
  },
848
331
  "&-zoom-leave": {
849
- animationName: Et,
332
+ animationName: hr,
850
333
  animationDuration: e.motionDurationSlow,
851
334
  animationTimingFunction: e.motionEaseOutBack,
852
335
  animationFillMode: "both"
@@ -864,339 +347,1801 @@ const $t = (e) => ({
864
347
  zIndex: e.zIndexPopup + 1,
865
348
  width: "100%"
866
349
  },
867
- "&": [Rt(e), Dt(e)]
350
+ "&": [mr(e), wr(e)]
868
351
  });
869
- function Pt(e) {
870
- return ht("ImageView", (t) => {
871
- const n = gt(t, {
352
+ function br(e) {
353
+ return lr("ImageViewer", (t) => {
354
+ const n = sr(t, {
872
355
  zIndexPopup: t.zIndexPopupBase + 80,
873
- previewOperationColorDisabled: new Q(t.colorTextLightSolid).setAlpha(0.25).toRgbString(),
874
- modalMaskBg: new Q("#000").setAlpha(0.45).toRgbString(),
356
+ previewOperationColorDisabled: new re(t.colorTextLightSolid).setAlpha(0.25).toRgbString(),
357
+ previewOperationHoverColor: new re(t.colorTextLightSolid).setAlpha(0.85).toRgbString(),
358
+ modalMaskBg: new re("#000").setAlpha(0.45).toRgbString(),
875
359
  // FIXME: Shared Token
876
- previewOperationColor: new Q(t.colorTextLightSolid).toRgbString(),
360
+ previewOperationColor: new re(t.colorTextLightSolid).toRgbString(),
877
361
  previewOperationSize: t.fontSizeIcon * 1.5,
878
362
  // FIXME: fontSizeIconLG
879
363
  imagePreviewSwitchSize: t.controlHeightLG,
880
- iconCls: "anticon"
364
+ iconCls: "anticon",
365
+ previewCls: t.componentCls
881
366
  });
882
- return [Ht(n)];
367
+ return [yr(n)];
883
368
  }, e);
884
369
  }
885
- const Y = {
886
- tab: "Tab",
887
- enter: "Enter",
888
- space: "Space",
889
- left: "ArrowLeft",
890
- // 37
891
- up: "ArrowUp",
892
- // 38
893
- right: "ArrowRight",
894
- // 39
895
- down: "ArrowDown",
896
- // 40
897
- esc: "Escape",
898
- delete: "Delete",
899
- backspace: "Backspace"
900
- }, le = function(e, t, n, a = !1) {
901
- e && t && n && e.addEventListener(t, n, a);
902
- }, xe = function(e, t, n, a = !1) {
903
- e && t && n && e.removeEventListener(t, n, a);
904
- }, X = {
905
- CONTAIN: {
906
- name: "contain",
907
- icon: f(Ke, null, null)
370
+ function Sr(e) {
371
+ const t = e.getBoundingClientRect(), n = document.documentElement;
372
+ return {
373
+ left: t.left + (window.scrollX || n.scrollLeft) - (n.clientLeft || document.body.clientLeft || 0),
374
+ top: t.top + (window.scrollY || n.scrollTop) - (n.clientTop || document.body.clientTop || 0)
375
+ };
376
+ }
377
+ function Tr() {
378
+ const e = document.documentElement.clientWidth, t = window.innerHeight || document.documentElement.clientHeight;
379
+ return {
380
+ width: e,
381
+ height: t
382
+ };
383
+ }
384
+ function Et(e, t, n, r) {
385
+ const o = t + n, i = (n - r) / 2;
386
+ if (n > r) {
387
+ if (t > 0)
388
+ return {
389
+ [e]: i
390
+ };
391
+ if (t < 0 && o < r)
392
+ return {
393
+ [e]: -i
394
+ };
395
+ } else if (t < 0 || o > r)
396
+ return {
397
+ [e]: t < 0 ? i : -i
398
+ };
399
+ return {};
400
+ }
401
+ function Ir(e, t, n, r) {
402
+ const { width: o, height: i } = Tr();
403
+ let a = null;
404
+ return e <= o && t <= i ? a = {
405
+ x: 0,
406
+ y: 0
407
+ } : (e > o || t > i) && (a = {
408
+ ...Et("x", n, e, o),
409
+ ...Et("y", r, t, i)
410
+ }), a;
411
+ }
412
+ let on = !1;
413
+ try {
414
+ const e = Object.defineProperty({}, "passive", {
415
+ get() {
416
+ on = !0;
417
+ }
418
+ });
419
+ window.addEventListener("testPassive", null, e), window.removeEventListener("testPassive", null, e);
420
+ } catch {
421
+ }
422
+ function k(e, t, n, r) {
423
+ if (e && e.addEventListener) {
424
+ let o = r;
425
+ o === void 0 && on && (t === "touchstart" || t === "touchmove" || t === "wheel") && (o = { passive: !1 }), e.addEventListener(t, n, o);
426
+ }
427
+ return {
428
+ remove: () => {
429
+ e && e.removeEventListener && e.removeEventListener(t, n);
430
+ }
431
+ };
432
+ }
433
+ const c = {
434
+ /**
435
+ * MAC_ENTER
436
+ */
437
+ MAC_ENTER: 3,
438
+ /**
439
+ * BACKSPACE
440
+ */
441
+ BACKSPACE: 8,
442
+ /**
443
+ * TAB
444
+ */
445
+ TAB: 9,
446
+ /**
447
+ * NUMLOCK on FF/Safari Mac
448
+ */
449
+ NUM_CENTER: 12,
450
+ // NUMLOCK on FF/Safari Mac
451
+ /**
452
+ * ENTER
453
+ */
454
+ ENTER: 13,
455
+ /**
456
+ * SHIFT
457
+ */
458
+ SHIFT: 16,
459
+ /**
460
+ * CTRL
461
+ */
462
+ CTRL: 17,
463
+ /**
464
+ * ALT
465
+ */
466
+ ALT: 18,
467
+ /**
468
+ * PAUSE
469
+ */
470
+ PAUSE: 19,
471
+ /**
472
+ * CAPS_LOCK
473
+ */
474
+ CAPS_LOCK: 20,
475
+ /**
476
+ * ESC
477
+ */
478
+ ESC: 27,
479
+ /**
480
+ * SPACE
481
+ */
482
+ SPACE: 32,
483
+ /**
484
+ * PAGE_UP
485
+ */
486
+ PAGE_UP: 33,
487
+ // also NUM_NORTH_EAST
488
+ /**
489
+ * PAGE_DOWN
490
+ */
491
+ PAGE_DOWN: 34,
492
+ // also NUM_SOUTH_EAST
493
+ /**
494
+ * END
495
+ */
496
+ END: 35,
497
+ // also NUM_SOUTH_WEST
498
+ /**
499
+ * HOME
500
+ */
501
+ HOME: 36,
502
+ // also NUM_NORTH_WEST
503
+ /**
504
+ * LEFT
505
+ */
506
+ LEFT: 37,
507
+ // also NUM_WEST
508
+ /**
509
+ * UP
510
+ */
511
+ UP: 38,
512
+ // also NUM_NORTH
513
+ /**
514
+ * RIGHT
515
+ */
516
+ RIGHT: 39,
517
+ // also NUM_EAST
518
+ /**
519
+ * DOWN
520
+ */
521
+ DOWN: 40,
522
+ // also NUM_SOUTH
523
+ /**
524
+ * PRINT_SCREEN
525
+ */
526
+ PRINT_SCREEN: 44,
527
+ /**
528
+ * INSERT
529
+ */
530
+ INSERT: 45,
531
+ // also NUM_INSERT
532
+ /**
533
+ * DELETE
534
+ */
535
+ DELETE: 46,
536
+ // also NUM_DELETE
537
+ /**
538
+ * ZERO
539
+ */
540
+ ZERO: 48,
541
+ /**
542
+ * ONE
543
+ */
544
+ ONE: 49,
545
+ /**
546
+ * TWO
547
+ */
548
+ TWO: 50,
549
+ /**
550
+ * THREE
551
+ */
552
+ THREE: 51,
553
+ /**
554
+ * FOUR
555
+ */
556
+ FOUR: 52,
557
+ /**
558
+ * FIVE
559
+ */
560
+ FIVE: 53,
561
+ /**
562
+ * SIX
563
+ */
564
+ SIX: 54,
565
+ /**
566
+ * SEVEN
567
+ */
568
+ SEVEN: 55,
569
+ /**
570
+ * EIGHT
571
+ */
572
+ EIGHT: 56,
573
+ /**
574
+ * NINE
575
+ */
576
+ NINE: 57,
577
+ /**
578
+ * QUESTION_MARK
579
+ */
580
+ QUESTION_MARK: 63,
581
+ // needs localization
582
+ /**
583
+ * A
584
+ */
585
+ A: 65,
586
+ /**
587
+ * B
588
+ */
589
+ B: 66,
590
+ /**
591
+ * C
592
+ */
593
+ C: 67,
594
+ /**
595
+ * D
596
+ */
597
+ D: 68,
598
+ /**
599
+ * E
600
+ */
601
+ E: 69,
602
+ /**
603
+ * F
604
+ */
605
+ F: 70,
606
+ /**
607
+ * G
608
+ */
609
+ G: 71,
610
+ /**
611
+ * H
612
+ */
613
+ H: 72,
614
+ /**
615
+ * I
616
+ */
617
+ I: 73,
618
+ /**
619
+ * J
620
+ */
621
+ J: 74,
622
+ /**
623
+ * K
624
+ */
625
+ K: 75,
626
+ /**
627
+ * L
628
+ */
629
+ L: 76,
630
+ /**
631
+ * M
632
+ */
633
+ M: 77,
634
+ /**
635
+ * N
636
+ */
637
+ N: 78,
638
+ /**
639
+ * O
640
+ */
641
+ O: 79,
642
+ /**
643
+ * P
644
+ */
645
+ P: 80,
646
+ /**
647
+ * Q
648
+ */
649
+ Q: 81,
650
+ /**
651
+ * R
652
+ */
653
+ R: 82,
654
+ /**
655
+ * S
656
+ */
657
+ S: 83,
658
+ /**
659
+ * T
660
+ */
661
+ T: 84,
662
+ /**
663
+ * U
664
+ */
665
+ U: 85,
666
+ /**
667
+ * V
668
+ */
669
+ V: 86,
670
+ /**
671
+ * W
672
+ */
673
+ W: 87,
674
+ /**
675
+ * X
676
+ */
677
+ X: 88,
678
+ /**
679
+ * Y
680
+ */
681
+ Y: 89,
682
+ /**
683
+ * Z
684
+ */
685
+ Z: 90,
686
+ /**
687
+ * META
688
+ */
689
+ META: 91,
690
+ // WIN_KEY_LEFT
691
+ /**
692
+ * WIN_KEY_RIGHT
693
+ */
694
+ WIN_KEY_RIGHT: 92,
695
+ /**
696
+ * CONTEXT_MENU
697
+ */
698
+ CONTEXT_MENU: 93,
699
+ /**
700
+ * NUM_ZERO
701
+ */
702
+ NUM_ZERO: 96,
703
+ /**
704
+ * NUM_ONE
705
+ */
706
+ NUM_ONE: 97,
707
+ /**
708
+ * NUM_TWO
709
+ */
710
+ NUM_TWO: 98,
711
+ /**
712
+ * NUM_THREE
713
+ */
714
+ NUM_THREE: 99,
715
+ /**
716
+ * NUM_FOUR
717
+ */
718
+ NUM_FOUR: 100,
719
+ /**
720
+ * NUM_FIVE
721
+ */
722
+ NUM_FIVE: 101,
723
+ /**
724
+ * NUM_SIX
725
+ */
726
+ NUM_SIX: 102,
727
+ /**
728
+ * NUM_SEVEN
729
+ */
730
+ NUM_SEVEN: 103,
731
+ /**
732
+ * NUM_EIGHT
733
+ */
734
+ NUM_EIGHT: 104,
735
+ /**
736
+ * NUM_NINE
737
+ */
738
+ NUM_NINE: 105,
739
+ /**
740
+ * NUM_MULTIPLY
741
+ */
742
+ NUM_MULTIPLY: 106,
743
+ /**
744
+ * NUM_PLUS
745
+ */
746
+ NUM_PLUS: 107,
747
+ /**
748
+ * NUM_MINUS
749
+ */
750
+ NUM_MINUS: 109,
751
+ /**
752
+ * NUM_PERIOD
753
+ */
754
+ NUM_PERIOD: 110,
755
+ /**
756
+ * NUM_DIVISION
757
+ */
758
+ NUM_DIVISION: 111,
759
+ /**
760
+ * F1
761
+ */
762
+ F1: 112,
763
+ /**
764
+ * F2
765
+ */
766
+ F2: 113,
767
+ /**
768
+ * F3
769
+ */
770
+ F3: 114,
771
+ /**
772
+ * F4
773
+ */
774
+ F4: 115,
775
+ /**
776
+ * F5
777
+ */
778
+ F5: 116,
779
+ /**
780
+ * F6
781
+ */
782
+ F6: 117,
783
+ /**
784
+ * F7
785
+ */
786
+ F7: 118,
787
+ /**
788
+ * F8
789
+ */
790
+ F8: 119,
791
+ /**
792
+ * F9
793
+ */
794
+ F9: 120,
795
+ /**
796
+ * F10
797
+ */
798
+ F10: 121,
799
+ /**
800
+ * F11
801
+ */
802
+ F11: 122,
803
+ /**
804
+ * F12
805
+ */
806
+ F12: 123,
807
+ /**
808
+ * NUMLOCK
809
+ */
810
+ NUMLOCK: 144,
811
+ /**
812
+ * SEMICOLON
813
+ */
814
+ SEMICOLON: 186,
815
+ // needs localization
816
+ /**
817
+ * DASH
818
+ */
819
+ DASH: 189,
820
+ // needs localization
821
+ /**
822
+ * EQUALS
823
+ */
824
+ EQUALS: 187,
825
+ // needs localization
826
+ /**
827
+ * COMMA
828
+ */
829
+ COMMA: 188,
830
+ // needs localization
831
+ /**
832
+ * PERIOD
833
+ */
834
+ PERIOD: 190,
835
+ // needs localization
836
+ /**
837
+ * SLASH
838
+ */
839
+ SLASH: 191,
840
+ // needs localization
841
+ /**
842
+ * APOSTROPHE
843
+ */
844
+ APOSTROPHE: 192,
845
+ // needs localization
846
+ /**
847
+ * SINGLE_QUOTE
848
+ */
849
+ SINGLE_QUOTE: 222,
850
+ // needs localization
851
+ /**
852
+ * OPEN_SQUARE_BRACKET
853
+ */
854
+ OPEN_SQUARE_BRACKET: 219,
855
+ // needs localization
856
+ /**
857
+ * BACKSLASH
858
+ */
859
+ BACKSLASH: 220,
860
+ // needs localization
861
+ /**
862
+ * CLOSE_SQUARE_BRACKET
863
+ */
864
+ CLOSE_SQUARE_BRACKET: 221,
865
+ // needs localization
866
+ /**
867
+ * WIN_KEY
868
+ */
869
+ WIN_KEY: 224,
870
+ /**
871
+ * MAC_FF_META
872
+ */
873
+ MAC_FF_META: 224,
874
+ // Firefox (Gecko) fires this for the meta key instead of 91
875
+ /**
876
+ * WIN_IME
877
+ */
878
+ WIN_IME: 229,
879
+ // ======================== Function ========================
880
+ /**
881
+ * whether text and modified key is entered at the same time.
882
+ */
883
+ isTextModifyingKeyEvent: function(t) {
884
+ const { keyCode: n } = t;
885
+ if (t.altKey && !t.ctrlKey || t.metaKey || // Function keys don't generate text
886
+ n >= c.F1 && n <= c.F12)
887
+ return !1;
888
+ switch (n) {
889
+ case c.ALT:
890
+ case c.CAPS_LOCK:
891
+ case c.CONTEXT_MENU:
892
+ case c.CTRL:
893
+ case c.DOWN:
894
+ case c.END:
895
+ case c.ESC:
896
+ case c.HOME:
897
+ case c.INSERT:
898
+ case c.LEFT:
899
+ case c.MAC_FF_META:
900
+ case c.META:
901
+ case c.NUMLOCK:
902
+ case c.NUM_CENTER:
903
+ case c.PAGE_DOWN:
904
+ case c.PAGE_UP:
905
+ case c.PAUSE:
906
+ case c.PRINT_SCREEN:
907
+ case c.RIGHT:
908
+ case c.SHIFT:
909
+ case c.UP:
910
+ case c.WIN_KEY:
911
+ case c.WIN_KEY_RIGHT:
912
+ return !1;
913
+ default:
914
+ return !0;
915
+ }
908
916
  },
909
- ORIGINAL: {
910
- name: "original",
911
- icon: f(et, null, null)
917
+ /**
918
+ * whether character is entered.
919
+ */
920
+ isCharacterKey: function(t) {
921
+ if (t >= c.ZERO && t <= c.NINE || t >= c.NUM_ZERO && t <= c.NUM_MULTIPLY || t >= c.A && t <= c.Z || window.navigator.userAgent.includes("WebKit") && t === 0)
922
+ return !0;
923
+ switch (t) {
924
+ case c.SPACE:
925
+ case c.QUESTION_MARK:
926
+ case c.NUM_PLUS:
927
+ case c.NUM_MINUS:
928
+ case c.NUM_PERIOD:
929
+ case c.NUM_DIVISION:
930
+ case c.SEMICOLON:
931
+ case c.DASH:
932
+ case c.EQUALS:
933
+ case c.COMMA:
934
+ case c.PERIOD:
935
+ case c.SLASH:
936
+ case c.APOSTROPHE:
937
+ case c.SINGLE_QUOTE:
938
+ case c.OPEN_SQUARE_BRACKET:
939
+ case c.BACKSLASH:
940
+ case c.CLOSE_SQUARE_BRACKET:
941
+ return !0;
942
+ default:
943
+ return !1;
944
+ }
945
+ }
946
+ };
947
+ let an = (e) => setTimeout(e, 16), ln = (e) => clearTimeout(e);
948
+ typeof window < "u" && "requestAnimationFrame" in window && (an = (e) => window.requestAnimationFrame(e), ln = (e) => window.cancelAnimationFrame(e));
949
+ let Ct = 0;
950
+ const rt = /* @__PURE__ */ new Map();
951
+ function sn(e) {
952
+ rt.delete(e);
953
+ }
954
+ function qe(e, t = 1) {
955
+ Ct += 1;
956
+ const n = Ct;
957
+ function r(o) {
958
+ if (o === 0)
959
+ sn(n), e();
960
+ else {
961
+ const i = an(() => {
962
+ r(o - 1);
963
+ });
964
+ rt.set(n, i);
965
+ }
966
+ }
967
+ return r(t), n;
968
+ }
969
+ qe.cancel = (e) => {
970
+ const t = rt.get(e);
971
+ return sn(t), ln(t);
972
+ };
973
+ function Or(e) {
974
+ const t = A(null), n = _e({ ...e }), r = A([]), o = (i) => {
975
+ t.value === null && (r.value = [], t.value = qe(() => {
976
+ let a;
977
+ r.value.forEach((s) => {
978
+ a = { ...a, ...s };
979
+ }), Object.assign(n, a), t.value = null;
980
+ })), r.value.push(i);
981
+ };
982
+ return kt(() => {
983
+ t.value && qe.cancel(t.value);
984
+ }), [n, o];
985
+ }
986
+ const Er = /* @__PURE__ */ nt({
987
+ name: "Operations",
988
+ inheritAttrs: !1,
989
+ props: {
990
+ open: Boolean,
991
+ count: {
992
+ type: Number,
993
+ default: 0
994
+ },
995
+ current: {
996
+ type: Number,
997
+ default: 0
998
+ },
999
+ showSwitch: Boolean,
1000
+ showProgress: Boolean,
1001
+ prefixCls: String,
1002
+ hashId: String,
1003
+ zIndex: ne.zIndex,
1004
+ icons: ne.icons,
1005
+ infinite: ne.infinite,
1006
+ getContainer: ne.getContainer,
1007
+ countRender: ne.countRender,
1008
+ tools: Array,
1009
+ onClose: Function,
1010
+ onActive: Function
1011
+ },
1012
+ setup(e) {
1013
+ const t = (n, r) => {
1014
+ var o;
1015
+ n.preventDefault(), n.stopPropagation(), (o = e.onActive) == null || o.call(e, r);
1016
+ };
1017
+ return () => {
1018
+ const {
1019
+ prefixCls: n,
1020
+ hashId: r,
1021
+ tools: o
1022
+ } = e, i = Qe(`${e.prefixCls}-fade`), a = `${n}-operations-operation`, s = `${n}-operations-icon`;
1023
+ return u(en, {
1024
+ to: e.getContainer || "body"
1025
+ }, {
1026
+ default: () => [u(Ke, i, {
1027
+ default: () => {
1028
+ var g, d, y, I;
1029
+ return [Ye(u("div", {
1030
+ class: Ee(`${n}-operations-wrapper`, r),
1031
+ style: {
1032
+ zIndex: e.zIndex
1033
+ }
1034
+ }, [((g = e.icons) == null ? void 0 : g.close) === null ? null : u("button", {
1035
+ class: `${n}-close ${r}`,
1036
+ onClick: e.onClose
1037
+ }, [((d = e.icons) == null ? void 0 : d.close) || u(Zn, null, null)]), e.showSwitch && u(We, null, [u("div", {
1038
+ class: Ee(`${n}-switch-left ${r}`, {
1039
+ [`${n}-switch-left-disabled`]: e.infinite ? !1 : e.current === 0
1040
+ }),
1041
+ onClick: (h) => t(h, -1)
1042
+ }, [((y = e.icons) == null ? void 0 : y.left) || u(Vn, null, null)]), u("div", {
1043
+ className: Ee(`${n}-switch-right ${r}`, {
1044
+ [`${n}-switch-right-disabled`]: e.infinite ? !1 : e.current === e.count - 1
1045
+ }),
1046
+ onClick: (h) => t(h, 1)
1047
+ }, [((I = e.icons) == null ? void 0 : I.right) || u(Qn, null, null)])]), u("div", {
1048
+ class: `${n}-footer ${r}`
1049
+ }, [e.showProgress && u("div", {
1050
+ class: `${n}-progress`
1051
+ }, [e.countRender ? e.countRender(e.current + 1, e.count) : `${e.current + 1} / ${e.count}`]), u("div", {
1052
+ class: `${e.prefixCls}-operations`
1053
+ }, [o == null ? void 0 : o.map(({
1054
+ icon: h,
1055
+ onClick: v,
1056
+ type: C,
1057
+ disabled: S
1058
+ }) => u("div", {
1059
+ class: Ee(a, {
1060
+ [`${e.prefixCls}-operations-operation-disabled`]: S && (S == null ? void 0 : S.value)
1061
+ }),
1062
+ onClick: v,
1063
+ key: C
1064
+ }, [Gn(h, {
1065
+ class: s
1066
+ })]))])])]), [[Xe, e.open]])];
1067
+ }
1068
+ })]
1069
+ });
1070
+ };
1071
+ }
1072
+ });
1073
+ var cn = typeof global == "object" && global && global.Object === Object && global, Cr = typeof self == "object" && self && self.Object === Object && self, M = cn || Cr || Function("return this")(), x = M.Symbol, un = Object.prototype, _r = un.hasOwnProperty, Ar = un.toString, de = x ? x.toStringTag : void 0;
1074
+ function $r(e) {
1075
+ var t = _r.call(e, de), n = e[de];
1076
+ try {
1077
+ e[de] = void 0;
1078
+ var r = !0;
1079
+ } catch {
1080
+ }
1081
+ var o = Ar.call(e);
1082
+ return r && (t ? e[de] = n : delete e[de]), o;
1083
+ }
1084
+ var xr = Object.prototype, Mr = xr.toString;
1085
+ function Pr(e) {
1086
+ return Mr.call(e);
1087
+ }
1088
+ var Nr = "[object Null]", Lr = "[object Undefined]", _t = x ? x.toStringTag : void 0;
1089
+ function W(e) {
1090
+ return e == null ? e === void 0 ? Lr : Nr : _t && _t in Object(e) ? $r(e) : Pr(e);
1091
+ }
1092
+ function X(e) {
1093
+ return e != null && typeof e == "object";
1094
+ }
1095
+ var jr = "[object Symbol]";
1096
+ function ot(e) {
1097
+ return typeof e == "symbol" || X(e) && W(e) == jr;
1098
+ }
1099
+ function fn(e, t) {
1100
+ for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r; )
1101
+ o[n] = t(e[n], n, e);
1102
+ return o;
1103
+ }
1104
+ var U = Array.isArray, Rr = 1 / 0, At = x ? x.prototype : void 0, $t = At ? At.toString : void 0;
1105
+ function dn(e) {
1106
+ if (typeof e == "string")
1107
+ return e;
1108
+ if (U(e))
1109
+ return fn(e, dn) + "";
1110
+ if (ot(e))
1111
+ return $t ? $t.call(e) : "";
1112
+ var t = e + "";
1113
+ return t == "0" && 1 / e == -Rr ? "-0" : t;
1114
+ }
1115
+ function K(e) {
1116
+ var t = typeof e;
1117
+ return e != null && (t == "object" || t == "function");
1118
+ }
1119
+ function Dr(e) {
1120
+ return e;
1121
+ }
1122
+ var Ur = "[object AsyncFunction]", zr = "[object Function]", Fr = "[object GeneratorFunction]", Br = "[object Proxy]";
1123
+ function gn(e) {
1124
+ if (!K(e))
1125
+ return !1;
1126
+ var t = W(e);
1127
+ return t == zr || t == Fr || t == Ur || t == Br;
1128
+ }
1129
+ var Be = M["__core-js_shared__"], xt = function() {
1130
+ var e = /[^.]+$/.exec(Be && Be.keys && Be.keys.IE_PROTO || "");
1131
+ return e ? "Symbol(src)_1." + e : "";
1132
+ }();
1133
+ function Hr(e) {
1134
+ return !!xt && xt in e;
1135
+ }
1136
+ var Gr = Function.prototype, Kr = Gr.toString;
1137
+ function Z(e) {
1138
+ if (e != null) {
1139
+ try {
1140
+ return Kr.call(e);
1141
+ } catch {
1142
+ }
1143
+ try {
1144
+ return e + "";
1145
+ } catch {
1146
+ }
1147
+ }
1148
+ return "";
1149
+ }
1150
+ var Yr = /[\\^$.*+?()[\]{}|]/g, Wr = /^\[object .+?Constructor\]$/, Xr = Function.prototype, Zr = Object.prototype, Vr = Xr.toString, Qr = Zr.hasOwnProperty, qr = RegExp(
1151
+ "^" + Vr.call(Qr).replace(Yr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1152
+ );
1153
+ function Jr(e) {
1154
+ if (!K(e) || Hr(e))
1155
+ return !1;
1156
+ var t = gn(e) ? qr : Wr;
1157
+ return t.test(Z(e));
1158
+ }
1159
+ function kr(e, t) {
1160
+ return e == null ? void 0 : e[t];
1161
+ }
1162
+ function V(e, t) {
1163
+ var n = kr(e, t);
1164
+ return Jr(n) ? n : void 0;
1165
+ }
1166
+ var Je = V(M, "WeakMap"), Mt = Object.create, eo = /* @__PURE__ */ function() {
1167
+ function e() {
1168
+ }
1169
+ return function(t) {
1170
+ if (!K(t))
1171
+ return {};
1172
+ if (Mt)
1173
+ return Mt(t);
1174
+ e.prototype = t;
1175
+ var n = new e();
1176
+ return e.prototype = void 0, n;
1177
+ };
1178
+ }();
1179
+ function to(e, t, n) {
1180
+ switch (n.length) {
1181
+ case 0:
1182
+ return e.call(t);
1183
+ case 1:
1184
+ return e.call(t, n[0]);
1185
+ case 2:
1186
+ return e.call(t, n[0], n[1]);
1187
+ case 3:
1188
+ return e.call(t, n[0], n[1], n[2]);
1189
+ }
1190
+ return e.apply(t, n);
1191
+ }
1192
+ function no(e, t) {
1193
+ var n = -1, r = e.length;
1194
+ for (t || (t = Array(r)); ++n < r; )
1195
+ t[n] = e[n];
1196
+ return t;
1197
+ }
1198
+ var ro = 800, oo = 16, io = Date.now;
1199
+ function ao(e) {
1200
+ var t = 0, n = 0;
1201
+ return function() {
1202
+ var r = io(), o = oo - (r - n);
1203
+ if (n = r, o > 0) {
1204
+ if (++t >= ro)
1205
+ return arguments[0];
1206
+ } else
1207
+ t = 0;
1208
+ return e.apply(void 0, arguments);
1209
+ };
1210
+ }
1211
+ function lo(e) {
1212
+ return function() {
1213
+ return e;
1214
+ };
1215
+ }
1216
+ var xe = function() {
1217
+ try {
1218
+ var e = V(Object, "defineProperty");
1219
+ return e({}, "", {}), e;
1220
+ } catch {
1221
+ }
1222
+ }(), so = xe ? function(e, t) {
1223
+ return xe(e, "toString", {
1224
+ configurable: !0,
1225
+ enumerable: !1,
1226
+ value: lo(t),
1227
+ writable: !0
1228
+ });
1229
+ } : Dr, co = ao(so);
1230
+ function uo(e, t) {
1231
+ for (var n = -1, r = e == null ? 0 : e.length; ++n < r && t(e[n], n, e) !== !1; )
1232
+ ;
1233
+ return e;
1234
+ }
1235
+ var fo = 9007199254740991, go = /^(?:0|[1-9]\d*)$/;
1236
+ function it(e, t) {
1237
+ var n = typeof e;
1238
+ return t = t ?? fo, !!t && (n == "number" || n != "symbol" && go.test(e)) && e > -1 && e % 1 == 0 && e < t;
1239
+ }
1240
+ function vn(e, t, n) {
1241
+ t == "__proto__" && xe ? xe(e, t, {
1242
+ configurable: !0,
1243
+ enumerable: !0,
1244
+ value: n,
1245
+ writable: !0
1246
+ }) : e[t] = n;
1247
+ }
1248
+ function pn(e, t) {
1249
+ return e === t || e !== e && t !== t;
1250
+ }
1251
+ var vo = Object.prototype, po = vo.hasOwnProperty;
1252
+ function at(e, t, n) {
1253
+ var r = e[t];
1254
+ (!(po.call(e, t) && pn(r, n)) || n === void 0 && !(t in e)) && vn(e, t, n);
1255
+ }
1256
+ function me(e, t, n, r) {
1257
+ var o = !n;
1258
+ n || (n = {});
1259
+ for (var i = -1, a = t.length; ++i < a; ) {
1260
+ var s = t[i], g = void 0;
1261
+ g === void 0 && (g = e[s]), o ? vn(n, s, g) : at(n, s, g);
912
1262
  }
913
- }, Ft = function() {
914
- return !q && !!window.navigator.userAgent.match(/firefox/i);
915
- }, je = Ft() ? "DOMMouseScroll" : "mousewheel";
916
- function Me(e) {
917
- let t = !1;
918
- return function(...n) {
919
- t || (t = !0, window.requestAnimationFrame(() => {
920
- e.apply(this, n), t = !1;
921
- }));
1263
+ return n;
1264
+ }
1265
+ var Pt = Math.max;
1266
+ function ho(e, t, n) {
1267
+ return t = Pt(t === void 0 ? e.length - 1 : t, 0), function() {
1268
+ for (var r = arguments, o = -1, i = Pt(r.length - t, 0), a = Array(i); ++o < i; )
1269
+ a[o] = r[t + o];
1270
+ o = -1;
1271
+ for (var s = Array(t + 1); ++o < t; )
1272
+ s[o] = r[o];
1273
+ return s[t] = n(a), to(e, this, s);
1274
+ };
1275
+ }
1276
+ var mo = 9007199254740991;
1277
+ function lt(e) {
1278
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= mo;
1279
+ }
1280
+ function hn(e) {
1281
+ return e != null && lt(e.length) && !gn(e);
1282
+ }
1283
+ var wo = Object.prototype;
1284
+ function st(e) {
1285
+ var t = e && e.constructor, n = typeof t == "function" && t.prototype || wo;
1286
+ return e === n;
1287
+ }
1288
+ function yo(e, t) {
1289
+ for (var n = -1, r = Array(e); ++n < e; )
1290
+ r[n] = t(n);
1291
+ return r;
1292
+ }
1293
+ var bo = "[object Arguments]";
1294
+ function Nt(e) {
1295
+ return X(e) && W(e) == bo;
1296
+ }
1297
+ var mn = Object.prototype, So = mn.hasOwnProperty, To = mn.propertyIsEnumerable, ct = Nt(/* @__PURE__ */ function() {
1298
+ return arguments;
1299
+ }()) ? Nt : function(e) {
1300
+ return X(e) && So.call(e, "callee") && !To.call(e, "callee");
1301
+ };
1302
+ function Io() {
1303
+ return !1;
1304
+ }
1305
+ var wn = typeof exports == "object" && exports && !exports.nodeType && exports, Lt = wn && typeof module == "object" && module && !module.nodeType && module, Oo = Lt && Lt.exports === wn, jt = Oo ? M.Buffer : void 0, Eo = jt ? jt.isBuffer : void 0, yn = Eo || Io, Co = "[object Arguments]", _o = "[object Array]", Ao = "[object Boolean]", $o = "[object Date]", xo = "[object Error]", Mo = "[object Function]", Po = "[object Map]", No = "[object Number]", Lo = "[object Object]", jo = "[object RegExp]", Ro = "[object Set]", Do = "[object String]", Uo = "[object WeakMap]", zo = "[object ArrayBuffer]", Fo = "[object DataView]", Bo = "[object Float32Array]", Ho = "[object Float64Array]", Go = "[object Int8Array]", Ko = "[object Int16Array]", Yo = "[object Int32Array]", Wo = "[object Uint8Array]", Xo = "[object Uint8ClampedArray]", Zo = "[object Uint16Array]", Vo = "[object Uint32Array]", m = {};
1306
+ m[Bo] = m[Ho] = m[Go] = m[Ko] = m[Yo] = m[Wo] = m[Xo] = m[Zo] = m[Vo] = !0;
1307
+ m[Co] = m[_o] = m[zo] = m[Ao] = m[Fo] = m[$o] = m[xo] = m[Mo] = m[Po] = m[No] = m[Lo] = m[jo] = m[Ro] = m[Do] = m[Uo] = !1;
1308
+ function Qo(e) {
1309
+ return X(e) && lt(e.length) && !!m[W(e)];
1310
+ }
1311
+ function ut(e) {
1312
+ return function(t) {
1313
+ return e(t);
1314
+ };
1315
+ }
1316
+ var bn = typeof exports == "object" && exports && !exports.nodeType && exports, ve = bn && typeof module == "object" && module && !module.nodeType && module, qo = ve && ve.exports === bn, He = qo && cn.process, oe = function() {
1317
+ try {
1318
+ var e = ve && ve.require && ve.require("util").types;
1319
+ return e || He && He.binding && He.binding("util");
1320
+ } catch {
1321
+ }
1322
+ }(), Rt = oe && oe.isTypedArray, Jo = Rt ? ut(Rt) : Qo, ko = Object.prototype, ei = ko.hasOwnProperty;
1323
+ function Sn(e, t) {
1324
+ var n = U(e), r = !n && ct(e), o = !n && !r && yn(e), i = !n && !r && !o && Jo(e), a = n || r || o || i, s = a ? yo(e.length, String) : [], g = s.length;
1325
+ for (var d in e)
1326
+ (t || ei.call(e, d)) && !(a && // Safari 9 has enumerable `arguments.length` in strict mode.
1327
+ (d == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
1328
+ o && (d == "offset" || d == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
1329
+ i && (d == "buffer" || d == "byteLength" || d == "byteOffset") || // Skip index properties.
1330
+ it(d, g))) && s.push(d);
1331
+ return s;
1332
+ }
1333
+ function Tn(e, t) {
1334
+ return function(n) {
1335
+ return e(t(n));
1336
+ };
1337
+ }
1338
+ var ti = Tn(Object.keys, Object), ni = Object.prototype, ri = ni.hasOwnProperty;
1339
+ function oi(e) {
1340
+ if (!st(e))
1341
+ return ti(e);
1342
+ var t = [];
1343
+ for (var n in Object(e))
1344
+ ri.call(e, n) && n != "constructor" && t.push(n);
1345
+ return t;
1346
+ }
1347
+ function ft(e) {
1348
+ return hn(e) ? Sn(e) : oi(e);
1349
+ }
1350
+ function ii(e) {
1351
+ var t = [];
1352
+ if (e != null)
1353
+ for (var n in Object(e))
1354
+ t.push(n);
1355
+ return t;
1356
+ }
1357
+ var ai = Object.prototype, li = ai.hasOwnProperty;
1358
+ function si(e) {
1359
+ if (!K(e))
1360
+ return ii(e);
1361
+ var t = st(e), n = [];
1362
+ for (var r in e)
1363
+ r == "constructor" && (t || !li.call(e, r)) || n.push(r);
1364
+ return n;
1365
+ }
1366
+ function dt(e) {
1367
+ return hn(e) ? Sn(e, !0) : si(e);
1368
+ }
1369
+ var ci = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, ui = /^\w*$/;
1370
+ function fi(e, t) {
1371
+ if (U(e))
1372
+ return !1;
1373
+ var n = typeof e;
1374
+ return n == "number" || n == "symbol" || n == "boolean" || e == null || ot(e) ? !0 : ui.test(e) || !ci.test(e) || t != null && e in Object(t);
1375
+ }
1376
+ var pe = V(Object, "create");
1377
+ function di() {
1378
+ this.__data__ = pe ? pe(null) : {}, this.size = 0;
1379
+ }
1380
+ function gi(e) {
1381
+ var t = this.has(e) && delete this.__data__[e];
1382
+ return this.size -= t ? 1 : 0, t;
1383
+ }
1384
+ var vi = "__lodash_hash_undefined__", pi = Object.prototype, hi = pi.hasOwnProperty;
1385
+ function mi(e) {
1386
+ var t = this.__data__;
1387
+ if (pe) {
1388
+ var n = t[e];
1389
+ return n === vi ? void 0 : n;
1390
+ }
1391
+ return hi.call(t, e) ? t[e] : void 0;
1392
+ }
1393
+ var wi = Object.prototype, yi = wi.hasOwnProperty;
1394
+ function bi(e) {
1395
+ var t = this.__data__;
1396
+ return pe ? t[e] !== void 0 : yi.call(t, e);
1397
+ }
1398
+ var Si = "__lodash_hash_undefined__";
1399
+ function Ti(e, t) {
1400
+ var n = this.__data__;
1401
+ return this.size += this.has(e) ? 0 : 1, n[e] = pe && t === void 0 ? Si : t, this;
1402
+ }
1403
+ function Y(e) {
1404
+ var t = -1, n = e == null ? 0 : e.length;
1405
+ for (this.clear(); ++t < n; ) {
1406
+ var r = e[t];
1407
+ this.set(r[0], r[1]);
1408
+ }
1409
+ }
1410
+ Y.prototype.clear = di;
1411
+ Y.prototype.delete = gi;
1412
+ Y.prototype.get = mi;
1413
+ Y.prototype.has = bi;
1414
+ Y.prototype.set = Ti;
1415
+ function Ii() {
1416
+ this.__data__ = [], this.size = 0;
1417
+ }
1418
+ function Pe(e, t) {
1419
+ for (var n = e.length; n--; )
1420
+ if (pn(e[n][0], t))
1421
+ return n;
1422
+ return -1;
1423
+ }
1424
+ var Oi = Array.prototype, Ei = Oi.splice;
1425
+ function Ci(e) {
1426
+ var t = this.__data__, n = Pe(t, e);
1427
+ if (n < 0)
1428
+ return !1;
1429
+ var r = t.length - 1;
1430
+ return n == r ? t.pop() : Ei.call(t, n, 1), --this.size, !0;
1431
+ }
1432
+ function _i(e) {
1433
+ var t = this.__data__, n = Pe(t, e);
1434
+ return n < 0 ? void 0 : t[n][1];
1435
+ }
1436
+ function Ai(e) {
1437
+ return Pe(this.__data__, e) > -1;
1438
+ }
1439
+ function $i(e, t) {
1440
+ var n = this.__data__, r = Pe(n, e);
1441
+ return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
1442
+ }
1443
+ function L(e) {
1444
+ var t = -1, n = e == null ? 0 : e.length;
1445
+ for (this.clear(); ++t < n; ) {
1446
+ var r = e[t];
1447
+ this.set(r[0], r[1]);
1448
+ }
1449
+ }
1450
+ L.prototype.clear = Ii;
1451
+ L.prototype.delete = Ci;
1452
+ L.prototype.get = _i;
1453
+ L.prototype.has = Ai;
1454
+ L.prototype.set = $i;
1455
+ var he = V(M, "Map");
1456
+ function xi() {
1457
+ this.size = 0, this.__data__ = {
1458
+ hash: new Y(),
1459
+ map: new (he || L)(),
1460
+ string: new Y()
922
1461
  };
923
1462
  }
924
- const jt = /* @__PURE__ */ Ve({
925
- props: pt,
926
- emits: ["close", "switch"],
1463
+ function Mi(e) {
1464
+ var t = typeof e;
1465
+ return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
1466
+ }
1467
+ function Ne(e, t) {
1468
+ var n = e.__data__;
1469
+ return Mi(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
1470
+ }
1471
+ function Pi(e) {
1472
+ var t = Ne(this, e).delete(e);
1473
+ return this.size -= t ? 1 : 0, t;
1474
+ }
1475
+ function Ni(e) {
1476
+ return Ne(this, e).get(e);
1477
+ }
1478
+ function Li(e) {
1479
+ return Ne(this, e).has(e);
1480
+ }
1481
+ function ji(e, t) {
1482
+ var n = Ne(this, e), r = n.size;
1483
+ return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
1484
+ }
1485
+ function z(e) {
1486
+ var t = -1, n = e == null ? 0 : e.length;
1487
+ for (this.clear(); ++t < n; ) {
1488
+ var r = e[t];
1489
+ this.set(r[0], r[1]);
1490
+ }
1491
+ }
1492
+ z.prototype.clear = xi;
1493
+ z.prototype.delete = Pi;
1494
+ z.prototype.get = Ni;
1495
+ z.prototype.has = Li;
1496
+ z.prototype.set = ji;
1497
+ var Ri = "Expected a function";
1498
+ function gt(e, t) {
1499
+ if (typeof e != "function" || t != null && typeof t != "function")
1500
+ throw new TypeError(Ri);
1501
+ var n = function() {
1502
+ var r = arguments, o = t ? t.apply(this, r) : r[0], i = n.cache;
1503
+ if (i.has(o))
1504
+ return i.get(o);
1505
+ var a = e.apply(this, r);
1506
+ return n.cache = i.set(o, a) || i, a;
1507
+ };
1508
+ return n.cache = new (gt.Cache || z)(), n;
1509
+ }
1510
+ gt.Cache = z;
1511
+ var Di = 500;
1512
+ function Ui(e) {
1513
+ var t = gt(e, function(r) {
1514
+ return n.size === Di && n.clear(), r;
1515
+ }), n = t.cache;
1516
+ return t;
1517
+ }
1518
+ var zi = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Fi = /\\(\\)?/g, Bi = Ui(function(e) {
1519
+ var t = [];
1520
+ return e.charCodeAt(0) === 46 && t.push(""), e.replace(zi, function(n, r, o, i) {
1521
+ t.push(o ? i.replace(Fi, "$1") : r || n);
1522
+ }), t;
1523
+ });
1524
+ function Hi(e) {
1525
+ return e == null ? "" : dn(e);
1526
+ }
1527
+ function ie(e, t) {
1528
+ return U(e) ? e : fi(e, t) ? [e] : Bi(Hi(e));
1529
+ }
1530
+ var Gi = 1 / 0;
1531
+ function Le(e) {
1532
+ if (typeof e == "string" || ot(e))
1533
+ return e;
1534
+ var t = e + "";
1535
+ return t == "0" && 1 / e == -Gi ? "-0" : t;
1536
+ }
1537
+ function In(e, t) {
1538
+ t = ie(t, e);
1539
+ for (var n = 0, r = t.length; e != null && n < r; )
1540
+ e = e[Le(t[n++])];
1541
+ return n && n == r ? e : void 0;
1542
+ }
1543
+ function vt(e, t) {
1544
+ for (var n = -1, r = t.length, o = e.length; ++n < r; )
1545
+ e[o + n] = t[n];
1546
+ return e;
1547
+ }
1548
+ var Dt = x ? x.isConcatSpreadable : void 0;
1549
+ function Ki(e) {
1550
+ return U(e) || ct(e) || !!(Dt && e && e[Dt]);
1551
+ }
1552
+ function Yi(e, t, n, r, o) {
1553
+ var i = -1, a = e.length;
1554
+ for (n || (n = Ki), o || (o = []); ++i < a; ) {
1555
+ var s = e[i];
1556
+ n(s) ? vt(o, s) : o[o.length] = s;
1557
+ }
1558
+ return o;
1559
+ }
1560
+ function Wi(e) {
1561
+ var t = e == null ? 0 : e.length;
1562
+ return t ? Yi(e) : [];
1563
+ }
1564
+ function On(e) {
1565
+ return co(ho(e, void 0, Wi), e + "");
1566
+ }
1567
+ var pt = Tn(Object.getPrototypeOf, Object), Xi = "[object Object]", Zi = Function.prototype, Vi = Object.prototype, En = Zi.toString, Qi = Vi.hasOwnProperty, qi = En.call(Object);
1568
+ function Ji(e) {
1569
+ if (!X(e) || W(e) != Xi)
1570
+ return !1;
1571
+ var t = pt(e);
1572
+ if (t === null)
1573
+ return !0;
1574
+ var n = Qi.call(t, "constructor") && t.constructor;
1575
+ return typeof n == "function" && n instanceof n && En.call(n) == qi;
1576
+ }
1577
+ function ki(e, t, n) {
1578
+ var r = -1, o = e.length;
1579
+ t < 0 && (t = -t > o ? 0 : o + t), n = n > o ? o : n, n < 0 && (n += o), o = t > n ? 0 : n - t >>> 0, t >>>= 0;
1580
+ for (var i = Array(o); ++r < o; )
1581
+ i[r] = e[r + t];
1582
+ return i;
1583
+ }
1584
+ function ea() {
1585
+ this.__data__ = new L(), this.size = 0;
1586
+ }
1587
+ function ta(e) {
1588
+ var t = this.__data__, n = t.delete(e);
1589
+ return this.size = t.size, n;
1590
+ }
1591
+ function na(e) {
1592
+ return this.__data__.get(e);
1593
+ }
1594
+ function ra(e) {
1595
+ return this.__data__.has(e);
1596
+ }
1597
+ var oa = 200;
1598
+ function ia(e, t) {
1599
+ var n = this.__data__;
1600
+ if (n instanceof L) {
1601
+ var r = n.__data__;
1602
+ if (!he || r.length < oa - 1)
1603
+ return r.push([e, t]), this.size = ++n.size, this;
1604
+ n = this.__data__ = new z(r);
1605
+ }
1606
+ return n.set(e, t), this.size = n.size, this;
1607
+ }
1608
+ function ae(e) {
1609
+ var t = this.__data__ = new L(e);
1610
+ this.size = t.size;
1611
+ }
1612
+ ae.prototype.clear = ea;
1613
+ ae.prototype.delete = ta;
1614
+ ae.prototype.get = na;
1615
+ ae.prototype.has = ra;
1616
+ ae.prototype.set = ia;
1617
+ function aa(e, t) {
1618
+ return e && me(t, ft(t), e);
1619
+ }
1620
+ function la(e, t) {
1621
+ return e && me(t, dt(t), e);
1622
+ }
1623
+ var Cn = typeof exports == "object" && exports && !exports.nodeType && exports, Ut = Cn && typeof module == "object" && module && !module.nodeType && module, sa = Ut && Ut.exports === Cn, zt = sa ? M.Buffer : void 0, Ft = zt ? zt.allocUnsafe : void 0;
1624
+ function ca(e, t) {
1625
+ if (t)
1626
+ return e.slice();
1627
+ var n = e.length, r = Ft ? Ft(n) : new e.constructor(n);
1628
+ return e.copy(r), r;
1629
+ }
1630
+ function ua(e, t) {
1631
+ for (var n = -1, r = e == null ? 0 : e.length, o = 0, i = []; ++n < r; ) {
1632
+ var a = e[n];
1633
+ t(a, n, e) && (i[o++] = a);
1634
+ }
1635
+ return i;
1636
+ }
1637
+ function _n() {
1638
+ return [];
1639
+ }
1640
+ var fa = Object.prototype, da = fa.propertyIsEnumerable, Bt = Object.getOwnPropertySymbols, ht = Bt ? function(e) {
1641
+ return e == null ? [] : (e = Object(e), ua(Bt(e), function(t) {
1642
+ return da.call(e, t);
1643
+ }));
1644
+ } : _n;
1645
+ function ga(e, t) {
1646
+ return me(e, ht(e), t);
1647
+ }
1648
+ var va = Object.getOwnPropertySymbols, An = va ? function(e) {
1649
+ for (var t = []; e; )
1650
+ vt(t, ht(e)), e = pt(e);
1651
+ return t;
1652
+ } : _n;
1653
+ function pa(e, t) {
1654
+ return me(e, An(e), t);
1655
+ }
1656
+ function $n(e, t, n) {
1657
+ var r = t(e);
1658
+ return U(e) ? r : vt(r, n(e));
1659
+ }
1660
+ function ha(e) {
1661
+ return $n(e, ft, ht);
1662
+ }
1663
+ function xn(e) {
1664
+ return $n(e, dt, An);
1665
+ }
1666
+ var ke = V(M, "DataView"), et = V(M, "Promise"), tt = V(M, "Set"), Ht = "[object Map]", ma = "[object Object]", Gt = "[object Promise]", Kt = "[object Set]", Yt = "[object WeakMap]", Wt = "[object DataView]", wa = Z(ke), ya = Z(he), ba = Z(et), Sa = Z(tt), Ta = Z(Je), N = W;
1667
+ (ke && N(new ke(new ArrayBuffer(1))) != Wt || he && N(new he()) != Ht || et && N(et.resolve()) != Gt || tt && N(new tt()) != Kt || Je && N(new Je()) != Yt) && (N = function(e) {
1668
+ var t = W(e), n = t == ma ? e.constructor : void 0, r = n ? Z(n) : "";
1669
+ if (r)
1670
+ switch (r) {
1671
+ case wa:
1672
+ return Wt;
1673
+ case ya:
1674
+ return Ht;
1675
+ case ba:
1676
+ return Gt;
1677
+ case Sa:
1678
+ return Kt;
1679
+ case Ta:
1680
+ return Yt;
1681
+ }
1682
+ return t;
1683
+ });
1684
+ var Ia = Object.prototype, Oa = Ia.hasOwnProperty;
1685
+ function Ea(e) {
1686
+ var t = e.length, n = new e.constructor(t);
1687
+ return t && typeof e[0] == "string" && Oa.call(e, "index") && (n.index = e.index, n.input = e.input), n;
1688
+ }
1689
+ var Xt = M.Uint8Array;
1690
+ function mt(e) {
1691
+ var t = new e.constructor(e.byteLength);
1692
+ return new Xt(t).set(new Xt(e)), t;
1693
+ }
1694
+ function Ca(e, t) {
1695
+ var n = t ? mt(e.buffer) : e.buffer;
1696
+ return new e.constructor(n, e.byteOffset, e.byteLength);
1697
+ }
1698
+ var _a = /\w*$/;
1699
+ function Aa(e) {
1700
+ var t = new e.constructor(e.source, _a.exec(e));
1701
+ return t.lastIndex = e.lastIndex, t;
1702
+ }
1703
+ var Zt = x ? x.prototype : void 0, Vt = Zt ? Zt.valueOf : void 0;
1704
+ function $a(e) {
1705
+ return Vt ? Object(Vt.call(e)) : {};
1706
+ }
1707
+ function xa(e, t) {
1708
+ var n = t ? mt(e.buffer) : e.buffer;
1709
+ return new e.constructor(n, e.byteOffset, e.length);
1710
+ }
1711
+ var Ma = "[object Boolean]", Pa = "[object Date]", Na = "[object Map]", La = "[object Number]", ja = "[object RegExp]", Ra = "[object Set]", Da = "[object String]", Ua = "[object Symbol]", za = "[object ArrayBuffer]", Fa = "[object DataView]", Ba = "[object Float32Array]", Ha = "[object Float64Array]", Ga = "[object Int8Array]", Ka = "[object Int16Array]", Ya = "[object Int32Array]", Wa = "[object Uint8Array]", Xa = "[object Uint8ClampedArray]", Za = "[object Uint16Array]", Va = "[object Uint32Array]";
1712
+ function Qa(e, t, n) {
1713
+ var r = e.constructor;
1714
+ switch (t) {
1715
+ case za:
1716
+ return mt(e);
1717
+ case Ma:
1718
+ case Pa:
1719
+ return new r(+e);
1720
+ case Fa:
1721
+ return Ca(e, n);
1722
+ case Ba:
1723
+ case Ha:
1724
+ case Ga:
1725
+ case Ka:
1726
+ case Ya:
1727
+ case Wa:
1728
+ case Xa:
1729
+ case Za:
1730
+ case Va:
1731
+ return xa(e, n);
1732
+ case Na:
1733
+ return new r();
1734
+ case La:
1735
+ case Da:
1736
+ return new r(e);
1737
+ case ja:
1738
+ return Aa(e);
1739
+ case Ra:
1740
+ return new r();
1741
+ case Ua:
1742
+ return $a(e);
1743
+ }
1744
+ }
1745
+ function qa(e) {
1746
+ return typeof e.constructor == "function" && !st(e) ? eo(pt(e)) : {};
1747
+ }
1748
+ var Ja = "[object Map]";
1749
+ function ka(e) {
1750
+ return X(e) && N(e) == Ja;
1751
+ }
1752
+ var Qt = oe && oe.isMap, el = Qt ? ut(Qt) : ka, tl = "[object Set]";
1753
+ function nl(e) {
1754
+ return X(e) && N(e) == tl;
1755
+ }
1756
+ var qt = oe && oe.isSet, rl = qt ? ut(qt) : nl, ol = 1, il = 2, al = 4, Mn = "[object Arguments]", ll = "[object Array]", sl = "[object Boolean]", cl = "[object Date]", ul = "[object Error]", Pn = "[object Function]", fl = "[object GeneratorFunction]", dl = "[object Map]", gl = "[object Number]", Nn = "[object Object]", vl = "[object RegExp]", pl = "[object Set]", hl = "[object String]", ml = "[object Symbol]", wl = "[object WeakMap]", yl = "[object ArrayBuffer]", bl = "[object DataView]", Sl = "[object Float32Array]", Tl = "[object Float64Array]", Il = "[object Int8Array]", Ol = "[object Int16Array]", El = "[object Int32Array]", Cl = "[object Uint8Array]", _l = "[object Uint8ClampedArray]", Al = "[object Uint16Array]", $l = "[object Uint32Array]", p = {};
1757
+ p[Mn] = p[ll] = p[yl] = p[bl] = p[sl] = p[cl] = p[Sl] = p[Tl] = p[Il] = p[Ol] = p[El] = p[dl] = p[gl] = p[Nn] = p[vl] = p[pl] = p[hl] = p[ml] = p[Cl] = p[_l] = p[Al] = p[$l] = !0;
1758
+ p[ul] = p[Pn] = p[wl] = !1;
1759
+ function Ae(e, t, n, r, o, i) {
1760
+ var a, s = t & ol, g = t & il, d = t & al;
1761
+ if (n && (a = o ? n(e, r, o, i) : n(e)), a !== void 0)
1762
+ return a;
1763
+ if (!K(e))
1764
+ return e;
1765
+ var y = U(e);
1766
+ if (y) {
1767
+ if (a = Ea(e), !s)
1768
+ return no(e, a);
1769
+ } else {
1770
+ var I = N(e), h = I == Pn || I == fl;
1771
+ if (yn(e))
1772
+ return ca(e, s);
1773
+ if (I == Nn || I == Mn || h && !o) {
1774
+ if (a = g || h ? {} : qa(e), !s)
1775
+ return g ? pa(e, la(a, e)) : ga(e, aa(a, e));
1776
+ } else {
1777
+ if (!p[I])
1778
+ return o ? e : {};
1779
+ a = Qa(e, I, s);
1780
+ }
1781
+ }
1782
+ i || (i = new ae());
1783
+ var v = i.get(e);
1784
+ if (v)
1785
+ return v;
1786
+ i.set(e, a), rl(e) ? e.forEach(function(T) {
1787
+ a.add(Ae(T, t, n, T, e, i));
1788
+ }) : el(e) && e.forEach(function(T, w) {
1789
+ a.set(w, Ae(T, t, n, w, e, i));
1790
+ });
1791
+ var C = d ? g ? xn : ha : g ? dt : ft, S = y ? void 0 : C(e);
1792
+ return uo(S || e, function(T, w) {
1793
+ S && (w = T, T = e[w]), at(a, w, Ae(T, t, n, w, e, i));
1794
+ }), a;
1795
+ }
1796
+ function xl(e, t) {
1797
+ return e != null && t in Object(e);
1798
+ }
1799
+ function Ml(e, t, n) {
1800
+ t = ie(t, e);
1801
+ for (var r = -1, o = t.length, i = !1; ++r < o; ) {
1802
+ var a = Le(t[r]);
1803
+ if (!(i = e != null && n(e, a)))
1804
+ break;
1805
+ e = e[a];
1806
+ }
1807
+ return i || ++r != o ? i : (o = e == null ? 0 : e.length, !!o && lt(o) && it(a, o) && (U(e) || ct(e)));
1808
+ }
1809
+ function Pl(e, t) {
1810
+ return e != null && Ml(e, t, xl);
1811
+ }
1812
+ function Nl(e) {
1813
+ var t = e == null ? 0 : e.length;
1814
+ return t ? e[t - 1] : void 0;
1815
+ }
1816
+ function Ll(e, t) {
1817
+ return t.length < 2 ? e : In(e, ki(t, 0, -1));
1818
+ }
1819
+ function jl(e, t) {
1820
+ return t = ie(t, e), e = Ll(e, t), e == null || delete e[Le(Nl(t))];
1821
+ }
1822
+ function Rl(e) {
1823
+ return Ji(e) ? void 0 : e;
1824
+ }
1825
+ var Dl = 1, Ul = 2, zl = 4, Fl = On(function(e, t) {
1826
+ var n = {};
1827
+ if (e == null)
1828
+ return n;
1829
+ var r = !1;
1830
+ t = fn(t, function(i) {
1831
+ return i = ie(i, e), r || (r = i.length > 1), i;
1832
+ }), me(e, xn(e), n), r && (n = Ae(n, Dl | Ul | zl, Rl));
1833
+ for (var o = t.length; o--; )
1834
+ jl(n, t[o]);
1835
+ return n;
1836
+ });
1837
+ function Bl(e, t, n, r) {
1838
+ if (!K(e))
1839
+ return e;
1840
+ t = ie(t, e);
1841
+ for (var o = -1, i = t.length, a = i - 1, s = e; s != null && ++o < i; ) {
1842
+ var g = Le(t[o]), d = n;
1843
+ if (g === "__proto__" || g === "constructor" || g === "prototype")
1844
+ return e;
1845
+ if (o != a) {
1846
+ var y = s[g];
1847
+ d = void 0, d === void 0 && (d = K(y) ? y : it(t[o + 1]) ? [] : {});
1848
+ }
1849
+ at(s, g, d), s = s[g];
1850
+ }
1851
+ return e;
1852
+ }
1853
+ function Hl(e, t, n) {
1854
+ for (var r = -1, o = t.length, i = {}; ++r < o; ) {
1855
+ var a = t[r], s = In(e, a);
1856
+ n(s, a) && Bl(i, ie(a, e), s);
1857
+ }
1858
+ return i;
1859
+ }
1860
+ function Gl(e, t) {
1861
+ return Hl(e, t, function(n, r) {
1862
+ return Pl(e, r);
1863
+ });
1864
+ }
1865
+ var Kl = On(function(e, t) {
1866
+ return e == null ? {} : Gl(e, t);
1867
+ });
1868
+ const G = {
1869
+ x: 0,
1870
+ y: 0
1871
+ }, ee = {
1872
+ rotateLeft: u(qn, null, null),
1873
+ rotateRight: u(Jn, null, null),
1874
+ zoomIn: u(kn, null, null),
1875
+ zoomOut: u(er, null, null),
1876
+ flipX: u(St, null, null),
1877
+ flipY: u(St, {
1878
+ rotate: 90
1879
+ }, null)
1880
+ }, Ln = ["close", "left", "right", "rotateRight", "rotateRight", "zoomOut", "flipX", "flipY", "rotateLeft"], Yl = /* @__PURE__ */ nt({
1881
+ name: "GImageViewer",
1882
+ props: ne,
1883
+ inheritAttrs: !1,
1884
+ emits: ["close", "switch", "afterClose"],
1885
+ emit: Object,
927
1886
  setup: (e, {
928
1887
  emit: t,
929
- expose: n
1888
+ expose: n,
1889
+ slots: r
930
1890
  }) => {
931
- var ie, re, $, Z, Ce;
932
- let a = null, i = null, r = null;
933
- const o = Ge({
934
- suffixCls: "image-viewer"
1891
+ const o = tn({
1892
+ suffixCls: "image-view"
935
1893
  }), {
936
- wrapSSR: l,
937
- hashId: c
938
- } = Pt(o), S = Te(!1), [p, E] = Ne(!1), [k, x] = Ne(!1), z = C(!0), h = C(e.initialIndex), P = C(null), F = C(null), W = C(X.CONTAIN), m = Xe({
939
- transform: {
940
- scale: 1,
941
- deg: 0,
942
- offsetX: 0,
943
- offsetY: 0,
944
- enableTransition: !1
1894
+ wrapSSR: i,
1895
+ hashId: a
1896
+ } = br(o), [s, g] = Tt(!1), [d, y] = Tt(!1), I = A(null), h = A(e.current), v = fe(1), C = fe(0), S = fe(!1), T = _e({
1897
+ x: 1,
1898
+ y: 1
1899
+ }), [w, j] = Or(G), le = fe({
1900
+ wheelDirection: 0
1901
+ }), F = fe(), $ = _e({
1902
+ originX: 0,
1903
+ originY: 0,
1904
+ deltaX: 0,
1905
+ deltaY: 0
1906
+ }), B = _e(/* @__PURE__ */ new Map()), Q = _(() => new Map(Array.from(B).map(([l, {
1907
+ url: b
1908
+ }]) => [l, b]))), we = _(() => Q.value.get(h.value)), q = _(() => Q.value.size), se = _(() => Array.from(Q.value.keys())), R = _(() => se.value.indexOf(h.value)), ye = _(() => q.value > 1), ce = _(() => q.value >= 1);
1909
+ te(s, (l) => {
1910
+ l && (d.value = !0);
1911
+ });
1912
+ const f = (l) => {
1913
+ h.value = l;
1914
+ };
1915
+ te(() => e.current, (l) => {
1916
+ Ve(l) && f(l);
1917
+ });
1918
+ function O(l, b) {
1919
+ B.set(l, {
1920
+ url: b,
1921
+ loading: !0,
1922
+ canPreview: !1
1923
+ });
1924
+ }
1925
+ const P = () => {
1926
+ y(!1), h.value = e.current;
1927
+ }, je = () => {
1928
+ v.value = 1, C.value = 0, T.x = 1, T.y = 1, j(G), t("close");
1929
+ }, Re = (l) => {
1930
+ S.value || I.value === (l == null ? void 0 : l.target) && P();
1931
+ }, De = () => {
1932
+ const l = B.get(h.value);
1933
+ l && (l.loading = !1, l.canPreview = !0);
1934
+ }, be = (l) => {
1935
+ const b = B.get(h.value);
1936
+ b && (b.loading = !1, b.canPreview = !1), l.target.alt = "加载失败";
1937
+ }, Se = () => {
1938
+ if (R.value > 0 || e.infinite) {
1939
+ const l = R.value - 1 < 0 ? e.previewUrls.length - 1 : R.value - 1;
1940
+ f(se.value[l]);
945
1941
  }
946
- }), J = L(() => e.urlList.length > 1), G = L(() => h.value === 0), K = L(() => h.value === e.urlList.length - 1), ee = L(() => e.urlList[h.value]), te = L(() => {
947
- const {
948
- scale: s,
949
- deg: I,
950
- offsetX: d,
951
- offsetY: y,
952
- enableTransition: b
953
- } = m.transform, A = {
954
- transform: `scale(${s}) rotate(${I}deg)`,
955
- transition: b ? "transform .3s" : "",
956
- marginLeft: `${d}px`,
957
- marginTop: `${y}px`
958
- };
959
- return W.value.name === X.CONTAIN.name && (A.maxWidth = A.maxHeight = "100%"), A;
960
- }), ne = () => {
961
- xe(document, "keydown", a), xe(document, je, i), a = null, i = null;
962
- }, de = () => {
963
- ne(), t("close"), m.transform = {
964
- scale: 1,
965
- deg: 0,
966
- offsetX: 0,
967
- offsetY: 0,
968
- enableTransition: !1
969
- };
970
- }, he = (s) => {
971
- S.value ? S.value = !1 : P.value === (s == null ? void 0 : s.target) && (x(!1), h.value = e.initialIndex);
972
- }, ae = () => {
973
- m.transform = {
974
- scale: 1,
975
- deg: 0,
976
- offsetX: 0,
977
- offsetY: 0,
978
- enableTransition: !1
979
- };
980
- }, j = () => {
981
- if (G.value && !e.infinite) return;
982
- const s = e.urlList.length;
983
- h.value = (h.value - 1 + s) % s;
984
- }, u = () => {
985
- if (K.value && !e.infinite) return;
986
- const s = e.urlList.length;
987
- h.value = (h.value + 1) % s;
988
- }, M = () => {
989
- if (z.value) return;
990
- const s = Object.keys(X), I = Object.values(X), d = W.value.name, b = (I.findIndex((A) => A.name === d) + 1) % s.length;
991
- W.value = X[s[b]], ae();
992
- }, g = (s, I = {}) => {
993
- if (z.value) return;
994
- const {
995
- zoomRate: d,
996
- rotateDeg: y,
997
- enableTransition: b
998
- } = {
999
- zoomRate: 0.2,
1000
- rotateDeg: 90,
1001
- enableTransition: !0,
1002
- ...I
1003
- };
1004
- switch (s) {
1005
- case "zoomOut":
1006
- m.transform.scale > 0.2 && (m.transform.scale = Number.parseFloat((m.transform.scale - d).toFixed(3)));
1007
- break;
1008
- case "zoomIn":
1009
- m.transform.scale = Number.parseFloat((m.transform.scale + d).toFixed(3));
1010
- break;
1011
- case "clocelise":
1012
- m.transform.deg += y;
1013
- break;
1014
- case "anticlocelise":
1015
- m.transform.deg -= y;
1016
- break;
1942
+ }, Te = () => {
1943
+ if (R.value < q.value - 1 || e.infinite) {
1944
+ const l = R.value + 1 > e.previewUrls.length - 1 ? 0 : R.value + 1;
1945
+ f(se.value[l]);
1017
1946
  }
1018
- m.transform.enableTransition = b;
1019
- }, B = () => {
1020
- a = Me((s) => {
1021
- switch (s.code) {
1022
- case Y.esc:
1023
- x(!1);
1024
- break;
1025
- case Y.space:
1026
- M();
1027
- break;
1028
- case Y.left:
1029
- j();
1030
- break;
1031
- case Y.up:
1032
- g("zoomIn");
1033
- break;
1034
- case Y.right:
1035
- u();
1036
- break;
1037
- case Y.down:
1038
- g("zoomOut");
1039
- break;
1040
- }
1041
- }), i = Me((s) => {
1042
- (s.wheelDelta ? s.wheelDelta : -s.detail) > 0 ? g("zoomIn", {
1043
- zoomRate: 0.015,
1044
- enableTransition: !1
1045
- }) : g("zoomOut", {
1046
- zoomRate: 0.015,
1047
- enableTransition: !1
1048
- });
1049
- }), le(document, "keydown", a), le(document, je, i);
1050
- }, V = () => {
1051
- z.value = !1;
1052
- }, ge = (s) => {
1053
- z.value = !1, s.target.alt = "加载失败";
1054
- }, U = Te(), ve = (s) => {
1055
- if (z.value || s.button !== 0) return;
1056
- s.preventDefault(), s.stopPropagation(), clearTimeout(U.value), S.value = !0;
1057
- const {
1058
- offsetX: I,
1059
- offsetY: d
1060
- } = m.transform, y = s.pageX, b = s.pageY;
1061
- r = Me((A) => {
1062
- m.transform = {
1063
- ...m.transform,
1064
- offsetX: I + A.pageX - y,
1065
- offsetY: d + A.pageY - b
1066
- };
1067
- }), le(document, "mousemove", r), le(document, "mouseup", () => {
1068
- xe(document, "mousemove", r), p.value && k.value && (U.value = setTimeout(() => {
1069
- S.value = !1;
1070
- }));
1071
- });
1072
- }, me = [{
1073
- icon: ((ie = e.icons) == null ? void 0 : ie.close) || f(tt, null, null),
1074
- onClick: (s) => {
1075
- s.stopPropagation(), x(!1);
1076
- },
1077
- type: "close"
1078
- }, {
1079
- icon: ((re = e.icons) == null ? void 0 : re.zoomIn) || f(nt, null, null),
1080
- onClick: (s) => {
1081
- s.stopPropagation(), g("zoomIn");
1082
- },
1947
+ }, J = (l) => {
1948
+ l ? v.value += 0.5 : v.value++, j(G);
1949
+ }, ue = (l) => {
1950
+ v.value > 1 && (l ? v.value -= 0.5 : v.value--), j(G);
1951
+ }, Ue = () => {
1952
+ C.value += 90;
1953
+ }, jn = () => {
1954
+ C.value -= 90;
1955
+ }, Rn = () => {
1956
+ T.x = -T.x;
1957
+ }, Dn = () => {
1958
+ T.y = -T.y;
1959
+ }, wt = [{
1960
+ icon: H(r, e.icons, "zoomIn") || ee.zoomIn,
1961
+ onClick: () => J(),
1083
1962
  type: "zoomIn"
1084
1963
  }, {
1085
- icon: (($ = e.icons) == null ? void 0 : $.zoomOut) || f(at, null, null),
1086
- onClick: (s) => {
1087
- s.stopPropagation(), g("zoomOut");
1088
- },
1089
- type: "zoomOut"
1964
+ icon: H(r, e.icons, "zoomOut") || ee.zoomOut,
1965
+ onClick: () => ue(),
1966
+ type: "zoomOut",
1967
+ disabled: _(() => v.value === 1)
1090
1968
  }, {
1091
- icon: ((Z = e.icons) == null ? void 0 : Z.rotateRight) || f(it, null, null),
1092
- onClick: (s) => {
1093
- s.stopPropagation(), g("anticlocelise");
1094
- },
1969
+ icon: H(r, e.icons, "rotateRight") || ee.rotateRight,
1970
+ onClick: Ue,
1095
1971
  type: "rotateRight"
1096
1972
  }, {
1097
- icon: ((Ce = e.icons) == null ? void 0 : Ce.rotateLeft) || f(rt, null, null),
1098
- onClick: (s) => {
1099
- s.stopPropagation(), g("clocelise");
1100
- },
1973
+ icon: H(r, e.icons, "rotateLeft") || ee.rotateLeft,
1974
+ onClick: jn,
1101
1975
  type: "rotateLeft"
1102
- }];
1103
- return _(ee, () => {
1104
- Ye(() => {
1105
- F.value.complete || (z.value = !0);
1976
+ }, {
1977
+ icon: H(r, e.icons, "flipX") || ee.flipX,
1978
+ onClick: Rn,
1979
+ type: "flipX"
1980
+ }, {
1981
+ icon: H(r, e.icons, "flipY") || ee.flipY,
1982
+ onClick: Dn,
1983
+ type: "flipY"
1984
+ }], yt = () => {
1985
+ if (s.value && S.value && F.value) {
1986
+ const l = F.value.offsetWidth * v.value, b = F.value.offsetHeight * v.value, {
1987
+ left: D,
1988
+ top: E
1989
+ } = Sr(F.value), Ie = C.value % 180 !== 0;
1990
+ S.value = !1;
1991
+ const Oe = Ir(Ie ? b : l, Ie ? l : b, D, E);
1992
+ Oe && j({
1993
+ ...Oe
1994
+ });
1995
+ }
1996
+ }, Un = (l) => {
1997
+ l.button === 0 && (l.preventDefault(), l.stopPropagation(), $.deltaX = l.pageX - w.x, $.deltaY = l.pageY - w.y, $.originX = w.x, $.originY = w.y, S.value = !0);
1998
+ }, bt = (l) => {
1999
+ s.value && S.value && j({
2000
+ x: l.pageX - $.deltaX,
2001
+ y: l.pageY - $.deltaY
1106
2002
  });
1107
- }), _(h, (s) => {
1108
- ae(), t("switch", s);
1109
- }), _(p, (s) => {
1110
- s && (k.value = s);
1111
- }), _([() => p.value, () => P.value], ([s, I]) => {
1112
- var d, y;
1113
- s && I && (B(), (y = (d = P.value) == null ? void 0 : d.focus) == null || y.call(d));
2003
+ }, zn = (l) => {
2004
+ if (!s.value) return;
2005
+ l.preventDefault();
2006
+ const b = l.deltaY;
2007
+ le.value = {
2008
+ wheelDirection: b
2009
+ };
2010
+ }, Fn = (l) => {
2011
+ !s.value || !ye.value || (l.keyCode === c.LEFT ? Se() : l.keyCode === c.RIGHT && Te());
2012
+ }, Bn = () => {
2013
+ s.value && (v.value !== 1 && (v.value = 1), (w.x !== G.x || w.y !== G.y) && j(G));
2014
+ };
2015
+ let ze = () => {
2016
+ };
2017
+ return kt(() => {
2018
+ te(() => e.previewUrls, (l) => {
2019
+ nn(l) && l.forEach((b, D) => {
2020
+ O(D, b);
2021
+ });
2022
+ }, {
2023
+ flush: "post",
2024
+ immediate: !0
2025
+ }), te([() => s.value, S], () => {
2026
+ ze();
2027
+ let l, b;
2028
+ const D = k(window, "mouseup", yt, !1), E = k(window, "mousemove", bt, !1), Ie = k(window, "wheel", zn, {
2029
+ passive: !1
2030
+ }), Oe = k(window, "keydown", Fn, !1);
2031
+ try {
2032
+ window.top !== window.self && (l = k(window.top, "mouseup", yt, !1), b = k(window.top, "mousemove", bt, !1));
2033
+ } catch (Hn) {
2034
+ dr(!1, `[vc-image] ${Hn}`);
2035
+ }
2036
+ ze = () => {
2037
+ D.remove(), E.remove(), Ie.remove(), Oe.remove(), l && l.remove(), b && b.remove();
2038
+ };
2039
+ }, {
2040
+ flush: "post",
2041
+ immediate: !0
2042
+ }), te([le], () => {
2043
+ const {
2044
+ wheelDirection: l
2045
+ } = le.value;
2046
+ l > 0 ? ue(!0) : l < 0 && J(!0);
2047
+ });
2048
+ }), Kn(() => {
2049
+ ze();
1114
2050
  }), n({
1115
- setOpen: E
2051
+ setOpen: g
1116
2052
  }), () => {
1117
- const s = Ee(`${o}-fade`), I = Ee(`${o}-zoom`);
1118
- return l(f(_e, {
1119
- to: e.getContainer || "body",
1120
- disabled: !e.teleported
2053
+ const l = Qe(`${o}-fade`), b = Qe(`${o}-zoom`), D = {};
2054
+ for (const E in e.icons)
2055
+ D[E] = H(r, e.icons, E);
2056
+ return i(u(We, null, [u(en, {
2057
+ to: e.getContainer || "body"
1121
2058
  }, {
1122
- default: () => [p.value && f("div", {
1123
- class: `${o}-root ${c.value}`
1124
- }, [f(ke, s, {
1125
- default: () => [ze(f("div", {
1126
- class: `${o}-mask ${c.value}`
1127
- }, null), [[Oe, p.value && k.value]])]
1128
- }), f("div", {
1129
- ref: P,
2059
+ default: () => [s.value && u(We, null, [u("div", {
2060
+ class: `${o}-root ${a.value}`
2061
+ }, [u(Ke, l, {
2062
+ default: () => [Ye(u("div", {
2063
+ class: `${o}-mask ${a.value}`
2064
+ }, null), [[Xe, s.value && d.value]])]
2065
+ }), u("div", {
2066
+ ref: I,
1130
2067
  tabindex: -1,
1131
- class: [`${o}-wrapper`, `${c.value}`],
1132
- onClick: (d) => e.onHideOnClickModal && he(d)
1133
- }, [f(ke, We(I, {
1134
- onAfterLeave: () => de()
2068
+ class: [`${o}-wrap`, `${a.value}`],
2069
+ onClick: (E) => e.onHideOnClickModal && Re(E)
2070
+ }, [u(Ke, Ze(b, {
2071
+ onAfterLeave: () => je()
1135
2072
  }), {
1136
- default: () => {
1137
- var d, y;
1138
- return [ze(f("div", {
1139
- class: `${o}-block ${c.value}`
1140
- }, [f("div", {
1141
- class: `${o}-content ${c.value}`
1142
- }, [f("div", {
1143
- class: `${o}-body ${c.value}`
1144
- }, [f("div", {
1145
- class: `${o}-operations-wrapper ${c.value}`,
1146
- onClick: (b) => b.stopPropagation()
1147
- }, [f("ul", {
1148
- class: `${o}-operations ${c.value}`
1149
- }, [me.map(({
1150
- icon: b,
1151
- onClick: A,
1152
- type: pe
1153
- }) => f("li", {
1154
- class: `${o}-operations-operation ${c.value}`,
1155
- onClick: A,
1156
- key: pe
1157
- }, [qe(b, {
1158
- class: `${o}-operations-icon ${c.value}`
1159
- })]))])]), f("div", {
1160
- class: `${o}-canvas ${c.value}`
1161
- }, [e.urlList.map((b, A) => f("img", {
1162
- ref: F,
1163
- class: `${o}-img ${c.value}`,
1164
- style: {
1165
- ...te.value,
1166
- display: A === h.value ? "block" : "none"
1167
- },
1168
- key: b,
1169
- src: b,
1170
- onLoad: () => V(),
1171
- onError: (pe) => ge(pe),
1172
- onMousedown: ve
1173
- }, null))]), J.value && f("div", {
1174
- class: [`${o}-switch-left`, h.value === 0 && !e.infinite ? `${o}-switch-left-disabled` : "", `${c.value}`],
1175
- onClick: () => j()
1176
- }, [((d = e.icons) == null ? void 0 : d.left) || f(ot, null, null)]), J.value && f("div", {
1177
- class: [`${o}-switch-right`, h.value === e.urlList.length - 1 && !e.infinite ? `${o}-switch-right-disabled` : "", `${c.value}`],
1178
- onClick: () => u()
1179
- }, [((y = e.icons) == null ? void 0 : y.right) || f(st, null, null)])])])]), [[Oe, p.value && k.value]])];
1180
- }
1181
- })])])]
1182
- }));
2073
+ default: () => [Ye(u("div", {
2074
+ role: "dialog",
2075
+ class: `${o} ${a.value}`
2076
+ }, [u("div", {
2077
+ class: `${o}-content ${a.value}`
2078
+ }, [u("div", {
2079
+ class: `${o}-body ${a.value}`
2080
+ }, [u("div", {
2081
+ class: `${o}-img-wrapper ${a.value}`,
2082
+ style: {
2083
+ transform: `translate3d(${w.x}px, ${w.y}px, 0)`
2084
+ }
2085
+ }, [u("img", {
2086
+ onMousedown: Un,
2087
+ onDblclick: Bn,
2088
+ ref: F,
2089
+ class: `${o}-img ${a.value}`,
2090
+ src: we.value,
2091
+ onLoad: () => De(),
2092
+ onError: (E) => be(E),
2093
+ style: {
2094
+ transform: `scale3d(${T.x * v.value}, ${T.y * v.value}, 1) rotate(${C.value}deg)`
2095
+ }
2096
+ }, null)])])])]), [[Xe, s.value && d.value]])]
2097
+ })])])])]
2098
+ }), s.value && d.value && u(Er, {
2099
+ open: s.value && d.value,
2100
+ hashId: a.value,
2101
+ count: e.previewUrls.length,
2102
+ current: h.value,
2103
+ zIndex: e.zIndex + 1,
2104
+ getContainer: e.getContainer,
2105
+ prefixCls: o,
2106
+ icons: Fl(D, wt.map(({
2107
+ type: E
2108
+ }) => E)),
2109
+ tools: wt,
2110
+ infinite: e.infinite,
2111
+ countRender: tr(r, e, "countRenders"),
2112
+ showSwitch: ye.value,
2113
+ showProgress: ce.value,
2114
+ onClose: P,
2115
+ onActive: (E) => E > 0 ? Te() : Se()
2116
+ }, null)]));
1183
2117
  };
1184
2118
  }
1185
- }), Ie = {
2119
+ }), Ge = {
1186
2120
  width: "100%",
1187
2121
  height: "100%"
1188
- }, Bt = (e) => ({
2122
+ }, Wl = () => ({
2123
+ position: "absolute",
2124
+ inset: 0,
2125
+ display: "flex",
2126
+ alignItems: "center",
2127
+ justifyContent: "center",
2128
+ cursor: "pointer",
2129
+ opacity: 0
2130
+ }), Xl = (e) => ({
1189
2131
  [e.componentCls]: {
1190
2132
  display: "inline-block",
1191
2133
  position: "relative",
1192
2134
  overflow: "hidden",
1193
2135
  "&-inner": {
1194
- ...Ie,
2136
+ ...Ge,
1195
2137
  verticalAlign: "top",
1196
- opacity: 1
2138
+ opacity: 1,
2139
+ [`&${e.componentCls}-inner-preview`]: {
2140
+ userSelect: "none"
2141
+ }
1197
2142
  },
1198
2143
  "&-placeholder": {
1199
- ...Ie,
2144
+ ...Ge,
1200
2145
  backgroundColor: e.colorBgContainerDisabled,
1201
2146
  backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",
1202
2147
  backgroundRepeat: "no-repeat",
@@ -1204,173 +2149,172 @@ const jt = /* @__PURE__ */ Ve({
1204
2149
  backgroundSize: "30%"
1205
2150
  },
1206
2151
  "&-error": {
1207
- ...Ie,
2152
+ ...Ge,
1208
2153
  display: "flex",
1209
2154
  alignItems: "center",
1210
2155
  justifyContent: "center",
1211
2156
  color: e.colorText,
1212
2157
  backgroundColor: e.colorBgContainerDisabled
1213
2158
  },
1214
- "&-preview": {
1215
- cursor: "pointer"
1216
- }
2159
+ "&-preview": Wl()
1217
2160
  }
1218
- }), Vt = (e) => e && e.nodeType === Node.ELEMENT_NODE;
1219
- let Be = "";
1220
- const ce = /* @__PURE__ */ Ve({
1221
- props: ue,
2161
+ }), Zl = (e) => e && e.nodeType === Node.ELEMENT_NODE;
2162
+ let Jt = "";
2163
+ const Vl = [...Ln, "fallback", "placeholder"], $e = /* @__PURE__ */ nt({
2164
+ props: rn,
1222
2165
  name: "GImage",
1223
2166
  emits: ["error", "click", "load"],
1224
2167
  slots: Object,
1225
2168
  setup(e, {
1226
2169
  slots: t,
1227
2170
  emit: n,
1228
- attrs: a
2171
+ attrs: r
1229
2172
  }) {
1230
- const i = Ge({
2173
+ const o = tn({
1231
2174
  suffixCls: "image"
1232
2175
  }), {
1233
- wrapSSR: r,
1234
- hashId: o
1235
- } = vt("Image", [Bt], i), l = C(), c = C(""), S = C(!1), p = C(!0), E = C(!1), k = C(null), x = C();
1236
- let z, h;
1237
- const P = L(() => !q && e.fit ? {
2176
+ wrapSSR: i,
2177
+ hashId: a
2178
+ } = ur("Image", [Xl], o), s = A(), g = A(""), d = A(!1), y = A(!0), I = A(!1), h = A(null), v = A();
2179
+ let C, S;
2180
+ const T = _(() => !Ce && e.fit ? {
1238
2181
  "object-fit": e.fit
1239
- } : {}), F = L(() => {
2182
+ } : {}), w = _(() => {
1240
2183
  const {
1241
- previewSrcList: u
1242
- } = e;
1243
- return Array.isArray(u) && u.length > 0;
1244
- }), W = L(() => {
2184
+ previewUrls: f
2185
+ } = e.preview;
2186
+ return nn(f) && f.length > 0 || e.showPreview;
2187
+ }), j = _(() => {
1245
2188
  const {
1246
- src: u,
1247
- previewSrcList: M,
1248
- initialIndex: g
1249
- } = e;
1250
- if (g || g === 0) return M.length >= g ? g : 0;
1251
- let B = 0;
1252
- const V = M.indexOf(u);
1253
- return V >= 0 && (B = V), B;
1254
- }), m = (u) => {
1255
- c.value = e.src, p.value = !1, S.value = !1, n("load", u);
1256
- }, J = (u) => {
1257
- p.value = !1, S.value = !0, n("error", u);
1258
- }, G = () => {
1259
- if (q) return;
1260
- p.value = !0, S.value = !1;
1261
- const u = new Image();
1262
- u.onload = (M) => m(M), u.onerror = J, Object.keys(a || {}).forEach((M) => {
1263
- if (M.toLowerCase() === "onload") return;
1264
- const g = (a || {})[M];
1265
- u.setAttribute(M, g);
1266
- }), u.src = e.src;
1267
- }, K = mt(te, 200), ee = () => {
1268
- q || !x.value || !K || (z(), x.value = void 0);
2189
+ previewUrls: f = [],
2190
+ current: O = 0
2191
+ } = e.preview;
2192
+ if (Ve(O)) return f.length >= O ? O : 0;
2193
+ const P = f.indexOf(e.src);
2194
+ return P >= 0 ? P : 0;
2195
+ }), le = (f) => {
2196
+ g.value = e.src, y.value = !1, d.value = !1, n("load", f);
2197
+ }, F = (f) => {
2198
+ y.value = !1, d.value = !0, n("error", f);
2199
+ }, $ = () => {
2200
+ if (Ce) return;
2201
+ y.value = !0, d.value = !1;
2202
+ const f = new Image();
2203
+ f.onload = (O) => le(O), f.onerror = F, Object.keys(r || {}).forEach((O) => {
2204
+ if (O.toLowerCase() === "onload") return;
2205
+ const P = (r || {})[O];
2206
+ f.setAttribute(O, P);
2207
+ }), f.src = e.src;
2208
+ }, B = fr(we, 200), Q = () => {
2209
+ Ce || !v.value || !B || (C(), v.value = void 0);
1269
2210
  };
1270
- function te() {
1271
- lt(k.value, x.value) && (G(), ee());
2211
+ function we() {
2212
+ nr(h.value, v.value) && ($(), Q());
1272
2213
  }
1273
- const ne = async () => {
1274
- if (q) return;
1275
- await Ye();
2214
+ const q = async () => {
2215
+ if (Ce) return;
2216
+ await Xn();
1276
2217
  const {
1277
- scrollContainer: u
2218
+ scrollContainer: f
1278
2219
  } = e;
1279
- Vt(u) ? x.value = u : ut(u) && u !== "" ? x.value = document.querySelector(u) ?? void 0 : k.value && (x.value = ct(k.value)), x.value && (z = $e(x, "scroll", K), setTimeout(() => te(), 200));
1280
- }, de = (u) => {
1281
- if (u.ctrlKey) {
1282
- if (u.deltaY < 0)
1283
- return u.preventDefault(), !1;
1284
- if (u.deltaY > 0)
1285
- return u.preventDefault(), !1;
2220
+ Zl(f) ? v.value = f : or(f) && f !== "" ? v.value = document.querySelector(f) ?? void 0 : h.value && (v.value = ir(h.value)), v.value && (C = It(v, "scroll", B), setTimeout(() => we(), 200));
2221
+ }, se = (f) => {
2222
+ if (f.ctrlKey) {
2223
+ if (f.deltaY < 0)
2224
+ return f.preventDefault(), !1;
2225
+ if (f.deltaY > 0)
2226
+ return f.preventDefault(), !1;
1286
2227
  }
1287
- }, he = () => {
1288
- !F.value || e.disablePreview || (h = $e("wheel", de, {
2228
+ }, R = () => {
2229
+ w.value && (S = It("wheel", se, {
1289
2230
  passive: !1
1290
- }), Be = document.body.style.overflow, document.body.style.overflow = "hidden", E.value = !0);
1291
- }, ae = () => {
1292
- h == null || h(), document.body.style.overflow = Be, E.value = !1;
2231
+ }), Jt = document.body.style.overflow, document.body.style.overflow = "hidden", I.value = !0);
2232
+ }, ye = () => {
2233
+ S == null || S(), document.body.style.overflow = Jt, I.value = !1;
1293
2234
  };
1294
- _(() => e.src, () => {
1295
- e.lazy ? (p.value = !0, S.value = !1, ee(), ne()) : G();
2235
+ te(() => e.src, () => {
2236
+ e.lazy ? (y.value = !0, d.value = !1, Q(), q()) : $();
2237
+ }), Yn(() => {
2238
+ var f, O;
2239
+ w.value && I.value ? (f = s.value) == null || f.setOpen(!0) : (O = s.value) == null || O.setOpen(!1);
1296
2240
  });
1297
- const j = (u) => ft(u) ? u + "px" : u;
1298
- return dt(() => {
1299
- e.lazy ? ne() : G();
2241
+ const ce = (f) => Ve(f) ? f + "px" : f;
2242
+ return ar(() => {
2243
+ e.lazy ? q() : $();
1300
2244
  }), () => {
2245
+ var ue;
1301
2246
  const {
1302
- crossorigin: u,
1303
- decoding: M,
1304
- alt: g,
1305
- sizes: B,
1306
- srcset: V,
1307
- usemap: ge,
1308
- class: U,
1309
- style: ve = {}
1310
- } = a, me = {
1311
- crossorigin: u,
1312
- decoding: M,
1313
- alt: g,
1314
- sizes: B,
1315
- srcset: V,
1316
- usemap: ge,
2247
+ crossorigin: f,
2248
+ decoding: O,
2249
+ alt: P,
2250
+ sizes: je,
2251
+ srcset: Re,
2252
+ usemap: De,
2253
+ class: be,
2254
+ style: Se = {}
2255
+ } = r, Te = {
2256
+ crossorigin: f,
2257
+ decoding: O,
2258
+ alt: P,
2259
+ sizes: je,
2260
+ srcset: Re,
2261
+ usemap: De,
1317
2262
  style: {
1318
- ...P.value,
1319
- height: e.height ? j(e.height) : void 0
2263
+ ...T.value,
2264
+ height: e.height ? ce(e.height) : void 0
1320
2265
  }
1321
- }, ie = Le(t, e, "fallback"), re = Le(t, e, "placeholder");
1322
- return Qe(() => {
1323
- var $, Z;
1324
- F.value && E.value ? ($ = l.value) == null || $.setOpen(!0) : (Z = l.value) == null || Z.setOpen(!1);
1325
- }), r(f("div", {
2266
+ }, J = rr(Vl, t, e, {
2267
+ render: !0
2268
+ });
2269
+ return i(u("div", {
1326
2270
  class: {
1327
- [`${o.value}`]: !0,
1328
- [`${i}`]: !0,
1329
- [`${U}`]: !!U
2271
+ [`${a.value}`]: !0,
2272
+ [`${o}`]: !0,
2273
+ [`${be}`]: !!be
1330
2274
  },
1331
- ref: ($) => k.value = $,
2275
+ ref: (Ue) => h.value = Ue,
1332
2276
  style: {
1333
- width: e.width ? j(e.width) : void 0,
1334
- height: e.height ? j(e.height) : void 0,
2277
+ width: e.width ? ce(e.width) : void 0,
2278
+ height: e.height ? ce(e.height) : void 0,
1335
2279
  display: e.lazy ? "block" : void 0,
1336
- ...ve
2280
+ ...Se
1337
2281
  },
1338
2282
  onClick: () => {
1339
2283
  n("click");
1340
2284
  }
1341
- }, [p.value ? re || f("div", {
1342
- class: `${i}-placeholder ${o.value}`
1343
- }, null) : S.value ? ie || f("div", {
1344
- class: `${i}-error ${o.value}`
1345
- }, [Je("加载失败")]) : c.value && f("img", We(me, {
2285
+ }, [y.value ? J.placeholder || u("div", {
2286
+ class: `${o}-placeholder ${a.value}`
2287
+ }, null) : d.value ? J.fallback || u("div", {
2288
+ class: `${o}-error ${a.value}`
2289
+ }, [Wn("加载失败")]) : g.value && u("img", Ze(Te, {
1346
2290
  class: {
1347
- [`${o.value}`]: !0,
2291
+ [`${a.value}`]: !0,
1348
2292
  [`${e.imageClassName}`]: !!e.imageClassName,
1349
- [`${i}-inner`]: !0,
1350
- [`${i}-preview`]: F.value
2293
+ [`${o}-inner`]: !0,
2294
+ [`${o}-inner-preview`]: w.value
1351
2295
  },
1352
2296
  alt: e.alt,
1353
- src: c.value,
1354
- onClick: () => he()
1355
- }), null), f(jt, {
1356
- ref: l,
1357
- zIndex: e.zIndex,
1358
- infinite: e.infinite,
1359
- initialIndex: W.value,
1360
- urlList: e.previewSrcList,
1361
- getContainer: e.getContainer,
1362
- onHideOnClickModal: e.hideOnClickModal,
1363
- onClose: () => ae()
1364
- }, null)]));
2297
+ src: g.value
2298
+ }), null), w.value && u("div", {
2299
+ class: `${o}-preview ${a.value}`,
2300
+ onClick: () => R()
2301
+ }, null), w.value && u(Yl, Ze({
2302
+ ref: s
2303
+ }, e.preview, Kl(J, Ln), {
2304
+ previewUrls: ((ue = e.preview) == null ? void 0 : ue.previewUrls) || [e.src],
2305
+ current: j.value,
2306
+ onClose: () => ye()
2307
+ }), null)]));
1365
2308
  };
1366
2309
  }
1367
2310
  });
1368
- ce.isGImage = !0;
1369
- ce.install = (e) => (e.component(ce.name, ce), e);
2311
+ $e.isGImage = !0;
2312
+ $e.install = (e) => (e.component($e.name, $e), e);
1370
2313
  export {
1371
- ce as GImage,
1372
- jt as ImageViewer,
1373
- ce as default,
1374
- ue as imagePorps,
1375
- pt as imageViewProps
2314
+ $e as GImage,
2315
+ Yl as ImagePreview,
2316
+ ge as baseProps,
2317
+ $e as default,
2318
+ rn as imagePorps,
2319
+ ne as imagePreviewProps
1376
2320
  };