image-salon-sdk 1.0.78 → 1.0.80
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-salon-sdk.js +574 -565
- package/dist/image-salon-sdk.umd.cjs +8 -8
- package/dist/image-salon.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/types/image-salon-types.d.ts +1 -0
- package/package.json +1 -1
package/dist/image-salon-sdk.js
CHANGED
|
@@ -5,7 +5,7 @@ var tr = (s) => {
|
|
|
5
5
|
};
|
|
6
6
|
var si = (s, e, t) => e in s ? ii(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
7
7
|
var he = (s, e, t) => si(s, typeof e != "symbol" ? e + "" : e, t), nr = (s, e, t) => e.has(s) || tr("Cannot " + t);
|
|
8
|
-
var
|
|
8
|
+
var C = (s, e, t) => (nr(s, e, "read from private field"), t ? t.call(s) : e.get(s)), z = (s, e, t) => e.has(s) ? tr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), H = (s, e, t, n) => (nr(s, e, "write to private field"), n ? n.call(s, t) : e.set(s, t), t);
|
|
9
9
|
function Ir(s) {
|
|
10
10
|
let e = typeof s;
|
|
11
11
|
if (e == "object") {
|
|
@@ -19,17 +19,17 @@ function Ir(s) {
|
|
|
19
19
|
function oi(s) {
|
|
20
20
|
return s !== null && typeof s == "object" && !Array.isArray(s);
|
|
21
21
|
}
|
|
22
|
-
let bt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),
|
|
22
|
+
let bt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), Ln = [];
|
|
23
23
|
for (let s = 0; s < bt.length; s++)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
Ln[bt[s].charCodeAt(0)] = s;
|
|
25
|
+
Ln[45] = bt.indexOf("+");
|
|
26
|
+
Ln[95] = bt.indexOf("/");
|
|
27
27
|
function Tr(s) {
|
|
28
28
|
let e = s.length * 3 / 4;
|
|
29
29
|
s[s.length - 2] == "=" ? e -= 2 : s[s.length - 1] == "=" && (e -= 1);
|
|
30
30
|
let t = new Uint8Array(e), n = 0, r = 0, i, o = 0;
|
|
31
31
|
for (let a = 0; a < s.length; a++) {
|
|
32
|
-
if (i =
|
|
32
|
+
if (i = Ln[s.charCodeAt(a)], i === void 0)
|
|
33
33
|
switch (s[a]) {
|
|
34
34
|
case "=":
|
|
35
35
|
r = 0;
|
|
@@ -117,7 +117,7 @@ function li() {
|
|
|
117
117
|
}
|
|
118
118
|
throw new Error("invalid varint");
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Bn(s, e, t) {
|
|
121
121
|
for (let i = 0; i < 28; i = i + 7) {
|
|
122
122
|
const o = s >>> i, a = !(!(o >>> 7) && e == 0), c = (a ? o | 128 : o) & 255;
|
|
123
123
|
if (t.push(c), !a)
|
|
@@ -133,7 +133,7 @@ function _n(s, e, t) {
|
|
|
133
133
|
t.push(e >>> 31 & 1);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const yn = 65536 * 65536;
|
|
137
137
|
function Ur(s) {
|
|
138
138
|
let e = s[0] == "-";
|
|
139
139
|
e && (s = s.slice(1));
|
|
@@ -141,13 +141,13 @@ function Ur(s) {
|
|
|
141
141
|
let n = 0, r = 0;
|
|
142
142
|
function i(o, a) {
|
|
143
143
|
const c = Number(s.slice(o, a));
|
|
144
|
-
r *= t, n = n * t + c, n >=
|
|
144
|
+
r *= t, n = n * t + c, n >= yn && (r = r + (n / yn | 0), n = n % yn);
|
|
145
145
|
}
|
|
146
146
|
return i(-24, -18), i(-18, -12), i(-12, -6), i(-6), [e, n, r];
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function Wn(s, e) {
|
|
149
149
|
if (e >>> 0 <= 2097151)
|
|
150
|
-
return "" + (
|
|
150
|
+
return "" + (yn * e + (s >>> 0));
|
|
151
151
|
let t = s & 16777215, n = (s >>> 24 | e << 8) >>> 0 & 16777215, r = e >> 16 & 65535, i = t + n * 6777216 + r * 6710656, o = n + r * 8147497, a = r * 2, c = 1e7;
|
|
152
152
|
i >= c && (o += Math.floor(i / c), i %= c), o >= c && (a += Math.floor(o / c), o %= c);
|
|
153
153
|
function h(l, u) {
|
|
@@ -215,7 +215,7 @@ function xr(s) {
|
|
|
215
215
|
if (!s)
|
|
216
216
|
throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support");
|
|
217
217
|
}
|
|
218
|
-
const _r = /^-?[0-9]+$/,
|
|
218
|
+
const _r = /^-?[0-9]+$/, Cn = 4294967296, un = 2147483648;
|
|
219
219
|
class Br {
|
|
220
220
|
/**
|
|
221
221
|
* Create a new instance with the given bits.
|
|
@@ -233,7 +233,7 @@ class Br {
|
|
|
233
233
|
* Convert to a native number.
|
|
234
234
|
*/
|
|
235
235
|
toNumber() {
|
|
236
|
-
let e = this.hi *
|
|
236
|
+
let e = this.hi * Cn + (this.lo >>> 0);
|
|
237
237
|
if (!Number.isSafeInteger(e))
|
|
238
238
|
throw new Error("cannot convert to safe number");
|
|
239
239
|
return e;
|
|
@@ -283,7 +283,7 @@ class Se extends Br {
|
|
|
283
283
|
throw new Error("number is no integer");
|
|
284
284
|
if (e < 0)
|
|
285
285
|
throw new Error("signed value for ulong");
|
|
286
|
-
return new Se(e, e /
|
|
286
|
+
return new Se(e, e / Cn);
|
|
287
287
|
}
|
|
288
288
|
throw new Error("unknown value " + typeof e);
|
|
289
289
|
}
|
|
@@ -291,7 +291,7 @@ class Se extends Br {
|
|
|
291
291
|
* Convert to decimal string.
|
|
292
292
|
*/
|
|
293
293
|
toString() {
|
|
294
|
-
return se ? this.toBigInt().toString() :
|
|
294
|
+
return se ? this.toBigInt().toString() : Wn(this.lo, this.hi);
|
|
295
295
|
}
|
|
296
296
|
/**
|
|
297
297
|
* Convert to native bigint.
|
|
@@ -336,9 +336,9 @@ class ve extends Br {
|
|
|
336
336
|
throw new Error("string is no integer");
|
|
337
337
|
let [t, n, r] = Ur(e);
|
|
338
338
|
if (t) {
|
|
339
|
-
if (r >
|
|
339
|
+
if (r > un || r == un && n != 0)
|
|
340
340
|
throw new Error("signed long too small");
|
|
341
|
-
} else if (r >=
|
|
341
|
+
} else if (r >= un)
|
|
342
342
|
throw new Error("signed long too large");
|
|
343
343
|
let i = new ve(n, r);
|
|
344
344
|
return t ? i.negate() : i;
|
|
@@ -347,7 +347,7 @@ class ve extends Br {
|
|
|
347
347
|
return this.ZERO;
|
|
348
348
|
if (!Number.isSafeInteger(e))
|
|
349
349
|
throw new Error("number is no integer");
|
|
350
|
-
return e > 0 ? new ve(e, e /
|
|
350
|
+
return e > 0 ? new ve(e, e / Cn) : new ve(-e, -e / Cn).negate();
|
|
351
351
|
}
|
|
352
352
|
throw new Error("unknown value " + typeof e);
|
|
353
353
|
}
|
|
@@ -355,7 +355,7 @@ class ve extends Br {
|
|
|
355
355
|
* Do we have a minus sign?
|
|
356
356
|
*/
|
|
357
357
|
isNegative() {
|
|
358
|
-
return (this.hi &
|
|
358
|
+
return (this.hi & un) !== 0;
|
|
359
359
|
}
|
|
360
360
|
/**
|
|
361
361
|
* Negate two's complement.
|
|
@@ -373,9 +373,9 @@ class ve extends Br {
|
|
|
373
373
|
return this.toBigInt().toString();
|
|
374
374
|
if (this.isNegative()) {
|
|
375
375
|
let e = this.negate();
|
|
376
|
-
return "-" +
|
|
376
|
+
return "-" + Wn(e.lo, e.hi);
|
|
377
377
|
}
|
|
378
|
-
return
|
|
378
|
+
return Wn(this.lo, this.hi);
|
|
379
379
|
}
|
|
380
380
|
/**
|
|
381
381
|
* Convert to native bigint.
|
|
@@ -539,13 +539,13 @@ function J(s, e) {
|
|
|
539
539
|
throw new Error(e);
|
|
540
540
|
}
|
|
541
541
|
const fi = 34028234663852886e22, pi = -34028234663852886e22, mi = 4294967295, gi = 2147483647, wi = -2147483648;
|
|
542
|
-
function
|
|
542
|
+
function rn(s) {
|
|
543
543
|
if (typeof s != "number")
|
|
544
544
|
throw new Error("invalid int 32: " + typeof s);
|
|
545
545
|
if (!Number.isInteger(s) || s > gi || s < wi)
|
|
546
546
|
throw new Error("invalid int 32: " + s);
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function En(s) {
|
|
549
549
|
if (typeof s != "number")
|
|
550
550
|
throw new Error("invalid uint 32: " + typeof s);
|
|
551
551
|
if (!Number.isInteger(s) || s > mi || s < 0)
|
|
@@ -620,7 +620,7 @@ class bi {
|
|
|
620
620
|
* Write a `uint32` value, an unsigned 32 bit varint.
|
|
621
621
|
*/
|
|
622
622
|
uint32(e) {
|
|
623
|
-
for (
|
|
623
|
+
for (En(e); e > 127; )
|
|
624
624
|
this.buf.push(e & 127 | 128), e = e >>> 7;
|
|
625
625
|
return this.buf.push(e), this;
|
|
626
626
|
}
|
|
@@ -628,7 +628,7 @@ class bi {
|
|
|
628
628
|
* Write a `int32` value, a signed 32 bit varint.
|
|
629
629
|
*/
|
|
630
630
|
int32(e) {
|
|
631
|
-
return
|
|
631
|
+
return rn(e), rr(e, this.buf), this;
|
|
632
632
|
}
|
|
633
633
|
/**
|
|
634
634
|
* Write a `bool` value, a variant.
|
|
@@ -668,7 +668,7 @@ class bi {
|
|
|
668
668
|
* Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
|
|
669
669
|
*/
|
|
670
670
|
fixed32(e) {
|
|
671
|
-
|
|
671
|
+
En(e);
|
|
672
672
|
let t = new Uint8Array(4);
|
|
673
673
|
return new DataView(t.buffer).setUint32(0, e, !0), this.raw(t);
|
|
674
674
|
}
|
|
@@ -676,7 +676,7 @@ class bi {
|
|
|
676
676
|
* Write a `sfixed32` value, a signed, fixed-length 32-bit integer.
|
|
677
677
|
*/
|
|
678
678
|
sfixed32(e) {
|
|
679
|
-
|
|
679
|
+
rn(e);
|
|
680
680
|
let t = new Uint8Array(4);
|
|
681
681
|
return new DataView(t.buffer).setInt32(0, e, !0), this.raw(t);
|
|
682
682
|
}
|
|
@@ -684,7 +684,7 @@ class bi {
|
|
|
684
684
|
* Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
|
|
685
685
|
*/
|
|
686
686
|
sint32(e) {
|
|
687
|
-
return
|
|
687
|
+
return rn(e), e = (e << 1 ^ e >> 31) >>> 0, rr(e, this.buf), this;
|
|
688
688
|
}
|
|
689
689
|
/**
|
|
690
690
|
* Write a `fixed64` value, a signed, fixed-length 64-bit integer.
|
|
@@ -705,21 +705,21 @@ class bi {
|
|
|
705
705
|
*/
|
|
706
706
|
int64(e) {
|
|
707
707
|
let t = ve.from(e);
|
|
708
|
-
return
|
|
708
|
+
return Bn(t.lo, t.hi, this.buf), this;
|
|
709
709
|
}
|
|
710
710
|
/**
|
|
711
711
|
* Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
|
|
712
712
|
*/
|
|
713
713
|
sint64(e) {
|
|
714
714
|
let t = ve.from(e), n = t.hi >> 31, r = t.lo << 1 ^ n, i = (t.hi << 1 | t.lo >>> 31) ^ n;
|
|
715
|
-
return
|
|
715
|
+
return Bn(r, i, this.buf), this;
|
|
716
716
|
}
|
|
717
717
|
/**
|
|
718
718
|
* Write a `uint64` value, an unsigned 64-bit varint.
|
|
719
719
|
*/
|
|
720
720
|
uint64(e) {
|
|
721
721
|
let t = Se.from(e);
|
|
722
|
-
return
|
|
722
|
+
return Bn(t.lo, t.hi, this.buf), this;
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
725
|
const or = {
|
|
@@ -742,7 +742,7 @@ function vi(s, e) {
|
|
|
742
742
|
return r.typeRegistry = [...(t = s == null ? void 0 : s.typeRegistry) !== null && t !== void 0 ? t : [], ...(n = e == null ? void 0 : e.typeRegistry) !== null && n !== void 0 ? n : []], r;
|
|
743
743
|
}
|
|
744
744
|
const Or = Symbol.for("protobuf-ts/message-type");
|
|
745
|
-
function
|
|
745
|
+
function jn(s) {
|
|
746
746
|
let e = !1;
|
|
747
747
|
const t = [];
|
|
748
748
|
for (let n = 0; n < s.length; n++) {
|
|
@@ -759,13 +759,13 @@ var ut;
|
|
|
759
759
|
(function(s) {
|
|
760
760
|
s[s.BIGINT = 0] = "BIGINT", s[s.STRING = 1] = "STRING", s[s.NUMBER = 2] = "NUMBER";
|
|
761
761
|
})(ut || (ut = {}));
|
|
762
|
-
var
|
|
762
|
+
var vn;
|
|
763
763
|
(function(s) {
|
|
764
764
|
s[s.NO = 0] = "NO", s[s.PACKED = 1] = "PACKED", s[s.UNPACKED = 2] = "UNPACKED";
|
|
765
|
-
})(
|
|
765
|
+
})(vn || (vn = {}));
|
|
766
766
|
function Ai(s) {
|
|
767
767
|
var e, t, n, r;
|
|
768
|
-
return s.localName = (e = s.localName) !== null && e !== void 0 ? e :
|
|
768
|
+
return s.localName = (e = s.localName) !== null && e !== void 0 ? e : jn(s.name), s.jsonName = (t = s.jsonName) !== null && t !== void 0 ? t : jn(s.name), s.repeat = (n = s.repeat) !== null && n !== void 0 ? n : vn.NO, s.opt = (r = s.opt) !== null && r !== void 0 ? r : s.repeat || s.oneof ? !1 : s.kind == "message", s;
|
|
769
769
|
}
|
|
770
770
|
function ki(s) {
|
|
771
771
|
if (typeof s != "object" || s === null || !s.hasOwnProperty("oneofKind"))
|
|
@@ -1146,7 +1146,7 @@ class Ni {
|
|
|
1146
1146
|
let a;
|
|
1147
1147
|
if (typeof e == "number" ? a = e : e === "" ? i = "empty string" : typeof e == "string" && (e.trim().length !== e.length ? i = "extra whitespace" : a = Number(e)), a === void 0)
|
|
1148
1148
|
break;
|
|
1149
|
-
return t == D.UINT32 ?
|
|
1149
|
+
return t == D.UINT32 ? En(a) : rn(a), a;
|
|
1150
1150
|
case D.INT64:
|
|
1151
1151
|
case D.SFIXED64:
|
|
1152
1152
|
case D.SINT64:
|
|
@@ -1316,10 +1316,10 @@ class Ii {
|
|
|
1316
1316
|
case D.INT32:
|
|
1317
1317
|
case D.SFIXED32:
|
|
1318
1318
|
case D.SINT32:
|
|
1319
|
-
return t === 0 ? o ? 0 : void 0 : (
|
|
1319
|
+
return t === 0 ? o ? 0 : void 0 : (rn(t), t);
|
|
1320
1320
|
case D.FIXED32:
|
|
1321
1321
|
case D.UINT32:
|
|
1322
|
-
return t === 0 ? o ? 0 : void 0 : (
|
|
1322
|
+
return t === 0 ? o ? 0 : void 0 : (En(t), t);
|
|
1323
1323
|
case D.FLOAT:
|
|
1324
1324
|
Xn(t);
|
|
1325
1325
|
case D.DOUBLE:
|
|
@@ -1344,7 +1344,7 @@ class Ii {
|
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function qn(s, e = ut.STRING) {
|
|
1348
1348
|
switch (s) {
|
|
1349
1349
|
case D.BOOL:
|
|
1350
1350
|
return !1;
|
|
@@ -1409,8 +1409,8 @@ class Ti {
|
|
|
1409
1409
|
if (l) {
|
|
1410
1410
|
let I = h[u];
|
|
1411
1411
|
if (a == W.LengthDelimited && d != D.STRING && d != D.BYTES) {
|
|
1412
|
-
let
|
|
1413
|
-
for (; e.pos <
|
|
1412
|
+
let E = e.uint32() + e.pos;
|
|
1413
|
+
for (; e.pos < E; )
|
|
1414
1414
|
I.push(this.scalar(e, d, f));
|
|
1415
1415
|
} else
|
|
1416
1416
|
I.push(this.scalar(e, d, f));
|
|
@@ -1419,8 +1419,8 @@ class Ti {
|
|
|
1419
1419
|
break;
|
|
1420
1420
|
case "message":
|
|
1421
1421
|
if (l) {
|
|
1422
|
-
let I = h[u],
|
|
1423
|
-
I.push(
|
|
1422
|
+
let I = h[u], E = c.T().internalBinaryRead(e, e.uint32(), n);
|
|
1423
|
+
I.push(E);
|
|
1424
1424
|
} else
|
|
1425
1425
|
h[u] = c.T().internalBinaryRead(e, e.uint32(), n, h[u]);
|
|
1426
1426
|
break;
|
|
@@ -1460,13 +1460,13 @@ class Ti {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
}
|
|
1462
1462
|
if (o === void 0) {
|
|
1463
|
-
let c =
|
|
1463
|
+
let c = qn(e.K);
|
|
1464
1464
|
o = e.K == D.BOOL ? c.toString() : c;
|
|
1465
1465
|
}
|
|
1466
1466
|
if (a === void 0)
|
|
1467
1467
|
switch (e.V.kind) {
|
|
1468
1468
|
case "scalar":
|
|
1469
|
-
a =
|
|
1469
|
+
a = qn(e.V.T, e.V.L);
|
|
1470
1470
|
break;
|
|
1471
1471
|
case "enum":
|
|
1472
1472
|
a = 0;
|
|
@@ -1541,7 +1541,7 @@ class Li {
|
|
|
1541
1541
|
case "enum":
|
|
1542
1542
|
let l = i.kind == "enum" ? D.INT32 : i.T;
|
|
1543
1543
|
if (c)
|
|
1544
|
-
if (J(Array.isArray(o)), c ==
|
|
1544
|
+
if (J(Array.isArray(o)), c == vn.PACKED)
|
|
1545
1545
|
this.packed(t, l, i.no, o);
|
|
1546
1546
|
else
|
|
1547
1547
|
for (const u of o)
|
|
@@ -1690,7 +1690,7 @@ function Ui(s) {
|
|
|
1690
1690
|
else
|
|
1691
1691
|
switch (t.kind) {
|
|
1692
1692
|
case "scalar":
|
|
1693
|
-
e[n] =
|
|
1693
|
+
e[n] = qn(t.T, t.L);
|
|
1694
1694
|
break;
|
|
1695
1695
|
case "enum":
|
|
1696
1696
|
e[n] = 0;
|
|
@@ -1763,7 +1763,7 @@ function xi(s, e, t) {
|
|
|
1763
1763
|
return !1;
|
|
1764
1764
|
break;
|
|
1765
1765
|
case "map":
|
|
1766
|
-
if (!(n.V.kind == "message" ? cr(n.V.T(),
|
|
1766
|
+
if (!(n.V.kind == "message" ? cr(n.V.T(), fn(i), fn(o)) : lr(n.V.kind == "enum" ? D.INT32 : n.V.T, fn(i), fn(o))))
|
|
1767
1767
|
return !1;
|
|
1768
1768
|
break;
|
|
1769
1769
|
case "message":
|
|
@@ -1775,7 +1775,7 @@ function xi(s, e, t) {
|
|
|
1775
1775
|
}
|
|
1776
1776
|
return !0;
|
|
1777
1777
|
}
|
|
1778
|
-
const
|
|
1778
|
+
const fn = Object.values;
|
|
1779
1779
|
function Sr(s, e, t) {
|
|
1780
1780
|
if (e === t)
|
|
1781
1781
|
return !0;
|
|
@@ -1945,7 +1945,7 @@ class Fe {
|
|
|
1945
1945
|
function Bi(s, e) {
|
|
1946
1946
|
var t, n, r;
|
|
1947
1947
|
let i = s;
|
|
1948
|
-
return i.service = e, i.localName = (t = i.localName) !== null && t !== void 0 ? t :
|
|
1948
|
+
return i.service = e, i.localName = (t = i.localName) !== null && t !== void 0 ? t : jn(i.name), i.serverStreaming = !!i.serverStreaming, i.clientStreaming = !!i.clientStreaming, i.options = (n = i.options) !== null && n !== void 0 ? n : {}, i.idempotency = (r = i.idempotency) !== null && r !== void 0 ? r : void 0, i;
|
|
1949
1949
|
}
|
|
1950
1950
|
class Gn {
|
|
1951
1951
|
constructor(e, t, n) {
|
|
@@ -1973,7 +1973,7 @@ function Oi(s, e) {
|
|
|
1973
1973
|
if (!e)
|
|
1974
1974
|
return s;
|
|
1975
1975
|
let t = {};
|
|
1976
|
-
|
|
1976
|
+
pn(s, t), pn(e, t);
|
|
1977
1977
|
for (let n of Object.keys(e)) {
|
|
1978
1978
|
let r = e[n];
|
|
1979
1979
|
switch (n) {
|
|
@@ -1984,7 +1984,7 @@ function Oi(s, e) {
|
|
|
1984
1984
|
t.binaryOptions = ai(s.binaryOptions, t.binaryOptions);
|
|
1985
1985
|
break;
|
|
1986
1986
|
case "meta":
|
|
1987
|
-
t.meta = {},
|
|
1987
|
+
t.meta = {}, pn(s.meta, t.meta), pn(e.meta, t.meta);
|
|
1988
1988
|
break;
|
|
1989
1989
|
case "interceptors":
|
|
1990
1990
|
t.interceptors = s.interceptors ? s.interceptors.concat(r) : r.concat();
|
|
@@ -1993,7 +1993,7 @@ function Oi(s, e) {
|
|
|
1993
1993
|
}
|
|
1994
1994
|
return t;
|
|
1995
1995
|
}
|
|
1996
|
-
function
|
|
1996
|
+
function pn(s, e) {
|
|
1997
1997
|
if (!s)
|
|
1998
1998
|
return;
|
|
1999
1999
|
let t = e;
|
|
@@ -2347,7 +2347,7 @@ function hr(s, e) {
|
|
|
2347
2347
|
t[r] = n % 256, n >>>= 8;
|
|
2348
2348
|
return t.set(s, 5), e === "binary" ? t : Lr(t);
|
|
2349
2349
|
}
|
|
2350
|
-
function
|
|
2350
|
+
function Zn(s, e, t) {
|
|
2351
2351
|
if (arguments.length === 1) {
|
|
2352
2352
|
let c = s, h;
|
|
2353
2353
|
try {
|
|
@@ -2360,7 +2360,7 @@ function qn(s, e, t) {
|
|
|
2360
2360
|
case "opaqueredirect":
|
|
2361
2361
|
throw new ie(`fetch response type ${c.type}`, j[j.UNKNOWN]);
|
|
2362
2362
|
}
|
|
2363
|
-
return
|
|
2363
|
+
return Zn(ji(c.headers), c.status, c.statusText);
|
|
2364
2364
|
}
|
|
2365
2365
|
let n = s, r = e >= 200 && e < 300, i = Dr(n), [o, a] = Rr(n);
|
|
2366
2366
|
return (o === void 0 || o === j.OK) && !r && (o = qi(e), a = t), [o, a, i];
|
|
@@ -2375,8 +2375,8 @@ var tt;
|
|
|
2375
2375
|
})(tt || (tt = {}));
|
|
2376
2376
|
function fr(s, e, t) {
|
|
2377
2377
|
return Hi(this, void 0, void 0, function* () {
|
|
2378
|
-
let n, r = "", i = new Uint8Array(0), o =
|
|
2379
|
-
if (
|
|
2378
|
+
let n, r = "", i = new Uint8Array(0), o = $i(e);
|
|
2379
|
+
if (Pi(s)) {
|
|
2380
2380
|
let a = s.getReader();
|
|
2381
2381
|
n = {
|
|
2382
2382
|
next: () => a.read()
|
|
@@ -2416,12 +2416,12 @@ function fr(s, e, t) {
|
|
|
2416
2416
|
}
|
|
2417
2417
|
});
|
|
2418
2418
|
}
|
|
2419
|
-
const
|
|
2419
|
+
const Pi = (s) => typeof s.getReader == "function";
|
|
2420
2420
|
function pr(s, e) {
|
|
2421
2421
|
let t = new Uint8Array(s.length + e.length);
|
|
2422
2422
|
return t.set(s), t.set(e, s.length), t;
|
|
2423
2423
|
}
|
|
2424
|
-
function
|
|
2424
|
+
function $i(s) {
|
|
2425
2425
|
switch (s) {
|
|
2426
2426
|
case "application/grpc-web-text":
|
|
2427
2427
|
case "application/grpc-web-text+proto":
|
|
@@ -2555,7 +2555,7 @@ class Zi {
|
|
|
2555
2555
|
}
|
|
2556
2556
|
serverStreaming(e, t, n) {
|
|
2557
2557
|
var r, i, o, a;
|
|
2558
|
-
let c = n, h = (r = c.format) !== null && r !== void 0 ? r : "text", l = (i = c.fetchInit) !== null && i !== void 0 ? i : {}, u = this.makeUrl(e, c), d = e.I.toBinary(t, c.binaryOptions), f = new At(), y = new Si(), F = !0, I,
|
|
2558
|
+
let c = n, h = (r = c.format) !== null && r !== void 0 ? r : "text", l = (i = c.fetchInit) !== null && i !== void 0 ? i : {}, u = this.makeUrl(e, c), d = e.I.toBinary(t, c.binaryOptions), f = new At(), y = new Si(), F = !0, I, E = new At(), R, O = new At();
|
|
2559
2559
|
return globalThis.fetch(u, Object.assign(Object.assign({}, l), {
|
|
2560
2560
|
method: "POST",
|
|
2561
2561
|
headers: dr(new globalThis.Headers(), h, c.timeout, c.meta),
|
|
@@ -2563,7 +2563,7 @@ class Zi {
|
|
|
2563
2563
|
signal: (o = n.abort) !== null && o !== void 0 ? o : null
|
|
2564
2564
|
// node-fetch@3.0.0-beta.9 rejects `undefined`
|
|
2565
2565
|
})).then((v) => {
|
|
2566
|
-
let [L, b, B] =
|
|
2566
|
+
let [L, b, B] = Zn(v);
|
|
2567
2567
|
if (f.resolve(B), L != null && L !== j.OK)
|
|
2568
2568
|
throw new ie(b ?? j[L], j[L], B);
|
|
2569
2569
|
return L != null && (I = {
|
|
@@ -2594,15 +2594,15 @@ class Zi {
|
|
|
2594
2594
|
throw new ie("missing status", j[j.INTERNAL]);
|
|
2595
2595
|
if (I.code !== "OK")
|
|
2596
2596
|
throw new ie(I.detail, I.code, R);
|
|
2597
|
-
y.notifyComplete(),
|
|
2597
|
+
y.notifyComplete(), E.resolve(I), O.resolve(R || {});
|
|
2598
2598
|
}).catch((v) => {
|
|
2599
2599
|
let L;
|
|
2600
|
-
v instanceof ie ? L = v : v instanceof Error && v.name === "AbortError" ? L = new ie(v.message, j[j.CANCELLED]) : L = new ie(v instanceof Error ? v.message : "" + v, j[j.INTERNAL]), L.methodName = e.name, L.serviceName = e.service.typeName, f.rejectPending(L), y.notifyError(L),
|
|
2601
|
-
}), new Vi(e, (a = c.meta) !== null && a !== void 0 ? a : {}, t, f.promise, y,
|
|
2600
|
+
v instanceof ie ? L = v : v instanceof Error && v.name === "AbortError" ? L = new ie(v.message, j[j.CANCELLED]) : L = new ie(v instanceof Error ? v.message : "" + v, j[j.INTERNAL]), L.methodName = e.name, L.serviceName = e.service.typeName, f.rejectPending(L), y.notifyError(L), E.rejectPending(L), O.rejectPending(L);
|
|
2601
|
+
}), new Vi(e, (a = c.meta) !== null && a !== void 0 ? a : {}, t, f.promise, y, E.promise, O.promise);
|
|
2602
2602
|
}
|
|
2603
2603
|
unary(e, t, n) {
|
|
2604
2604
|
var r, i, o, a;
|
|
2605
|
-
let c = n, h = (r = c.format) !== null && r !== void 0 ? r : "text", l = (i = c.fetchInit) !== null && i !== void 0 ? i : {}, u = this.makeUrl(e, c), d = e.I.toBinary(t, c.binaryOptions), f = new At(), y, F = new At(), I,
|
|
2605
|
+
let c = n, h = (r = c.format) !== null && r !== void 0 ? r : "text", l = (i = c.fetchInit) !== null && i !== void 0 ? i : {}, u = this.makeUrl(e, c), d = e.I.toBinary(t, c.binaryOptions), f = new At(), y, F = new At(), I, E = new At(), R, O = new At();
|
|
2606
2606
|
return globalThis.fetch(u, Object.assign(Object.assign({}, l), {
|
|
2607
2607
|
method: "POST",
|
|
2608
2608
|
headers: dr(new globalThis.Headers(), h, c.timeout, c.meta),
|
|
@@ -2610,7 +2610,7 @@ class Zi {
|
|
|
2610
2610
|
signal: (o = n.abort) !== null && o !== void 0 ? o : null
|
|
2611
2611
|
// node-fetch@3.0.0-beta.9 rejects `undefined`
|
|
2612
2612
|
})).then((v) => {
|
|
2613
|
-
let [L, b, B] =
|
|
2613
|
+
let [L, b, B] = Zn(v);
|
|
2614
2614
|
if (f.resolve(B), L != null && L !== j.OK)
|
|
2615
2615
|
throw new ie(b ?? j[L], j[L], B);
|
|
2616
2616
|
return L != null && (I = {
|
|
@@ -2647,14 +2647,14 @@ class Zi {
|
|
|
2647
2647
|
throw new ie(I.detail, I.code, R);
|
|
2648
2648
|
if (F.resolve(y), I.code !== "OK")
|
|
2649
2649
|
throw new ie(I.detail, I.code, R);
|
|
2650
|
-
|
|
2650
|
+
E.resolve(I), O.resolve(R || {});
|
|
2651
2651
|
}).catch((v) => {
|
|
2652
2652
|
let L;
|
|
2653
|
-
v instanceof ie ? L = v : v instanceof Error && v.name === "AbortError" ? L = new ie(v.message, j[j.CANCELLED]) : L = new ie(v instanceof Error ? v.message : "" + v, j[j.INTERNAL]), L.methodName = e.name, L.serviceName = e.service.typeName, f.rejectPending(L), F.rejectPending(L),
|
|
2654
|
-
}), new Di(e, (a = c.meta) !== null && a !== void 0 ? a : {}, t, f.promise, F.promise,
|
|
2653
|
+
v instanceof ie ? L = v : v instanceof Error && v.name === "AbortError" ? L = new ie(v.message, j[j.CANCELLED]) : L = new ie(v instanceof Error ? v.message : "" + v, j[j.INTERNAL]), L.methodName = e.name, L.serviceName = e.service.typeName, f.rejectPending(L), F.rejectPending(L), E.rejectPending(L), O.rejectPending(L);
|
|
2654
|
+
}), new Di(e, (a = c.meta) !== null && a !== void 0 ? a : {}, t, f.promise, F.promise, E.promise, O.promise);
|
|
2655
2655
|
}
|
|
2656
2656
|
}
|
|
2657
|
-
var
|
|
2657
|
+
var Un = /* @__PURE__ */ ((s) => (s[s.IMAGE = 0] = "IMAGE", s[s.AUDIO = 1] = "AUDIO", s[s.VIDEO = 2] = "VIDEO", s[s.ALL = 3] = "ALL", s[s.FOLDER = 4] = "FOLDER", s))(Un || {});
|
|
2658
2658
|
class Ki extends Fe {
|
|
2659
2659
|
constructor() {
|
|
2660
2660
|
super("com.hamropatro.grpc.common.SearchRequest", [
|
|
@@ -2799,7 +2799,7 @@ class Gi extends Fe {
|
|
|
2799
2799
|
T: 9
|
|
2800
2800
|
/*ScalarType.STRING*/
|
|
2801
2801
|
},
|
|
2802
|
-
{ no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType",
|
|
2802
|
+
{ no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType", Un] },
|
|
2803
2803
|
{
|
|
2804
2804
|
no: 6,
|
|
2805
2805
|
name: "extension",
|
|
@@ -2869,7 +2869,7 @@ class Ji extends Fe {
|
|
|
2869
2869
|
T: 9
|
|
2870
2870
|
/*ScalarType.STRING*/
|
|
2871
2871
|
},
|
|
2872
|
-
{ no: 2, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType",
|
|
2872
|
+
{ no: 2, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType", Un] },
|
|
2873
2873
|
{
|
|
2874
2874
|
no: 3,
|
|
2875
2875
|
name: "extension",
|
|
@@ -2969,8 +2969,8 @@ class Qi extends Fe {
|
|
|
2969
2969
|
T: 9
|
|
2970
2970
|
/*ScalarType.STRING*/
|
|
2971
2971
|
},
|
|
2972
|
-
{ no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType",
|
|
2973
|
-
{ no: 9, name: "metadata", kind: "message", T: () =>
|
|
2972
|
+
{ no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType", Un] },
|
|
2973
|
+
{ no: 9, name: "metadata", kind: "message", T: () => On }
|
|
2974
2974
|
]);
|
|
2975
2975
|
}
|
|
2976
2976
|
create(e) {
|
|
@@ -3016,7 +3016,7 @@ class Qi extends Fe {
|
|
|
3016
3016
|
break;
|
|
3017
3017
|
case /* com.hamropatro.grpc.common.FileMetadata metadata */
|
|
3018
3018
|
9:
|
|
3019
|
-
i.metadata =
|
|
3019
|
+
i.metadata = On.internalBinaryRead(e, e.uint32(), n, i.metadata);
|
|
3020
3020
|
break;
|
|
3021
3021
|
default:
|
|
3022
3022
|
let h = n.readUnknownField;
|
|
@@ -3029,7 +3029,7 @@ class Qi extends Fe {
|
|
|
3029
3029
|
return i;
|
|
3030
3030
|
}
|
|
3031
3031
|
internalBinaryWrite(e, t, n) {
|
|
3032
|
-
e.key !== "" && t.tag(1, W.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, W.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(3, W.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(4, W.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(5, W.LengthDelimited).string(e.url), e.thumborUrl !== "" && t.tag(6, W.LengthDelimited).string(e.thumborUrl), e.proxyUrl !== "" && t.tag(7, W.LengthDelimited).string(e.proxyUrl), e.type !== 0 && t.tag(8, W.Varint).int32(e.type), e.metadata &&
|
|
3032
|
+
e.key !== "" && t.tag(1, W.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, W.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(3, W.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(4, W.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(5, W.LengthDelimited).string(e.url), e.thumborUrl !== "" && t.tag(6, W.LengthDelimited).string(e.thumborUrl), e.proxyUrl !== "" && t.tag(7, W.LengthDelimited).string(e.proxyUrl), e.type !== 0 && t.tag(8, W.Varint).int32(e.type), e.metadata && On.internalBinaryWrite(e.metadata, t.tag(9, W.LengthDelimited).fork(), n).join();
|
|
3033
3033
|
let r = n.writeUnknownFields;
|
|
3034
3034
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3035
3035
|
}
|
|
@@ -3109,7 +3109,7 @@ class Yi extends Fe {
|
|
|
3109
3109
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3110
3110
|
}
|
|
3111
3111
|
}
|
|
3112
|
-
const
|
|
3112
|
+
const On = new Yi();
|
|
3113
3113
|
class es extends Fe {
|
|
3114
3114
|
constructor() {
|
|
3115
3115
|
super("com.hamropatro.grpc.common.DeleteFileRequest", [
|
|
@@ -3257,7 +3257,7 @@ class rs extends Fe {
|
|
|
3257
3257
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3258
3258
|
}
|
|
3259
3259
|
}
|
|
3260
|
-
const
|
|
3260
|
+
const Pr = new rs();
|
|
3261
3261
|
class is extends Fe {
|
|
3262
3262
|
constructor() {
|
|
3263
3263
|
super("com.hamropatro.grpc.common.GetFilesByFolderResponse", [
|
|
@@ -3317,19 +3317,19 @@ class is extends Fe {
|
|
|
3317
3317
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3318
3318
|
}
|
|
3319
3319
|
}
|
|
3320
|
-
const ss = new is(),
|
|
3320
|
+
const ss = new is(), Sn = new Gn("com.hamropatro.grpc.common.FileService", [
|
|
3321
3321
|
{ name: "createFile", options: {}, I: Vr, O: nt },
|
|
3322
3322
|
{ name: "updateFile", options: {}, I: nt, O: nt },
|
|
3323
3323
|
{ name: "deleteFile", options: {}, I: Hr, O: ns },
|
|
3324
|
-
{ name: "getFilesByFolder", options: {}, I:
|
|
3324
|
+
{ name: "getFilesByFolder", options: {}, I: Pr, O: ss },
|
|
3325
3325
|
{ name: "createUserFile", options: {}, I: Jn, O: nt },
|
|
3326
3326
|
{ name: "search", options: {}, I: Mr, O: Xi }
|
|
3327
3327
|
]);
|
|
3328
|
-
class
|
|
3328
|
+
class Mt {
|
|
3329
3329
|
constructor(e) {
|
|
3330
|
-
he(this, "typeName",
|
|
3331
|
-
he(this, "methods",
|
|
3332
|
-
he(this, "options",
|
|
3330
|
+
he(this, "typeName", Sn.typeName);
|
|
3331
|
+
he(this, "methods", Sn.methods);
|
|
3332
|
+
he(this, "options", Sn.options);
|
|
3333
3333
|
this._transport = e;
|
|
3334
3334
|
}
|
|
3335
3335
|
/**
|
|
@@ -3380,7 +3380,7 @@ class Dt {
|
|
|
3380
3380
|
const os = async (s, e, t, n, r, i) => {
|
|
3381
3381
|
var o;
|
|
3382
3382
|
try {
|
|
3383
|
-
const a = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, c = new
|
|
3383
|
+
const a = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, c = new Mt(a), h = Vr.create();
|
|
3384
3384
|
return h.name = s, h.nestedFolderName = e, h.url = t, h.type = n, h.folderName = r, await c.createFile(
|
|
3385
3385
|
h,
|
|
3386
3386
|
i
|
|
@@ -3391,7 +3391,7 @@ const os = async (s, e, t, n, r, i) => {
|
|
|
3391
3391
|
}, as = async (s, e, t) => {
|
|
3392
3392
|
var n;
|
|
3393
3393
|
try {
|
|
3394
|
-
const r = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, i = new
|
|
3394
|
+
const r = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, i = new Mt(r), o = Jn.create();
|
|
3395
3395
|
return o.url = s, o.type = e, await i.createUserFile(
|
|
3396
3396
|
o,
|
|
3397
3397
|
t
|
|
@@ -3402,7 +3402,7 @@ const os = async (s, e, t, n, r, i) => {
|
|
|
3402
3402
|
}, ls = async (s, e, t) => {
|
|
3403
3403
|
var n, r;
|
|
3404
3404
|
try {
|
|
3405
|
-
const i = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, o = (r = window.ImageSalonSDK) == null ? void 0 : r.mode, a = new
|
|
3405
|
+
const i = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, o = (r = window.ImageSalonSDK) == null ? void 0 : r.mode, a = new Mt(i), c = Jn.create();
|
|
3406
3406
|
return c.url = s, c.type = e, await a.createUserFile(
|
|
3407
3407
|
c,
|
|
3408
3408
|
{
|
|
@@ -3418,7 +3418,7 @@ const os = async (s, e, t, n, r, i) => {
|
|
|
3418
3418
|
}, cs = async (s, e, t, n) => {
|
|
3419
3419
|
var r;
|
|
3420
3420
|
try {
|
|
3421
|
-
const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new
|
|
3421
|
+
const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Mt(i), a = Pr.create();
|
|
3422
3422
|
return a.folderName = s, a.cursor = e, a.limit = t, await o.getFilesByFolder(
|
|
3423
3423
|
a,
|
|
3424
3424
|
n
|
|
@@ -3429,7 +3429,7 @@ const os = async (s, e, t, n, r, i) => {
|
|
|
3429
3429
|
}, ds = async (s, e, t = 20, n) => {
|
|
3430
3430
|
var r;
|
|
3431
3431
|
try {
|
|
3432
|
-
const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new
|
|
3432
|
+
const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Mt(i), a = Mr.create();
|
|
3433
3433
|
return a.searchValue = s, a.cursor = e, a.limit = t, await o.search(
|
|
3434
3434
|
a,
|
|
3435
3435
|
n
|
|
@@ -3440,7 +3440,7 @@ const os = async (s, e, t, n, r, i) => {
|
|
|
3440
3440
|
}, hs = async (s, e, t, n, r, i, o, a, c) => {
|
|
3441
3441
|
var h;
|
|
3442
3442
|
try {
|
|
3443
|
-
const l = (h = window.ImageSalonSDK) == null ? void 0 : h.grpcConfig, u = new
|
|
3443
|
+
const l = (h = window.ImageSalonSDK) == null ? void 0 : h.grpcConfig, u = new Mt(l), d = nt.create();
|
|
3444
3444
|
return d.key = s, d.name = e, d.nestedFolderName = t, d.url = n, d.thumborUrl = r, d.proxyUrl = i, d.type = o, d.folderName = a, await u.updateFile(
|
|
3445
3445
|
d,
|
|
3446
3446
|
c
|
|
@@ -3451,7 +3451,7 @@ const os = async (s, e, t, n, r, i) => {
|
|
|
3451
3451
|
}, us = async (s, e) => {
|
|
3452
3452
|
var t;
|
|
3453
3453
|
try {
|
|
3454
|
-
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new
|
|
3454
|
+
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new Mt(n), i = Hr.create();
|
|
3455
3455
|
return i.key = s, await r.deleteFile(
|
|
3456
3456
|
i,
|
|
3457
3457
|
e
|
|
@@ -3501,7 +3501,7 @@ class fs extends Fe {
|
|
|
3501
3501
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3502
3502
|
}
|
|
3503
3503
|
}
|
|
3504
|
-
const
|
|
3504
|
+
const $r = new fs();
|
|
3505
3505
|
class ps extends Fe {
|
|
3506
3506
|
constructor() {
|
|
3507
3507
|
super("com.hamropatro.grpc.common.CreateFolderRequest", [
|
|
@@ -3629,7 +3629,7 @@ class ms extends Fe {
|
|
|
3629
3629
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3630
3630
|
}
|
|
3631
3631
|
}
|
|
3632
|
-
const
|
|
3632
|
+
const Kn = new ms();
|
|
3633
3633
|
class gs extends Fe {
|
|
3634
3634
|
constructor() {
|
|
3635
3635
|
super("com.hamropatro.grpc.common.GetAllFoldersResponse", [
|
|
@@ -3845,20 +3845,20 @@ class bs extends Fe {
|
|
|
3845
3845
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3846
3846
|
}
|
|
3847
3847
|
}
|
|
3848
|
-
const Cs = new bs(),
|
|
3848
|
+
const Cs = new bs(), Rn = new Gn("com.hamropatro.grpc.common.FolderService", [
|
|
3849
3849
|
{ name: "createFolder", options: {}, I: Wr, O: Ct },
|
|
3850
|
-
{ name: "getFolders", options: {}, I:
|
|
3851
|
-
{ name: "getUserFolders", options: {}, I:
|
|
3850
|
+
{ name: "getFolders", options: {}, I: Kn, O: mr },
|
|
3851
|
+
{ name: "getUserFolders", options: {}, I: Kn, O: mr },
|
|
3852
3852
|
{ name: "updateFolder", options: {}, I: Ct, O: Ct },
|
|
3853
|
-
{ name: "deleteFolder", options: {}, I:
|
|
3853
|
+
{ name: "deleteFolder", options: {}, I: $r, O: Ct },
|
|
3854
3854
|
{ name: "ChangeNestedFolderName", options: {}, I: Cs, O: Ct },
|
|
3855
3855
|
{ name: "setBooleanForUserFolder", options: {}, I: gr, O: gr }
|
|
3856
3856
|
]);
|
|
3857
|
-
class
|
|
3857
|
+
class xn {
|
|
3858
3858
|
constructor(e) {
|
|
3859
|
-
he(this, "typeName",
|
|
3860
|
-
he(this, "methods",
|
|
3861
|
-
he(this, "options",
|
|
3859
|
+
he(this, "typeName", Rn.typeName);
|
|
3860
|
+
he(this, "methods", Rn.methods);
|
|
3861
|
+
he(this, "options", Rn.options);
|
|
3862
3862
|
this._transport = e;
|
|
3863
3863
|
}
|
|
3864
3864
|
/**
|
|
@@ -3915,7 +3915,7 @@ class Un {
|
|
|
3915
3915
|
}
|
|
3916
3916
|
const Es = async (s, e = 20, t) => {
|
|
3917
3917
|
var o;
|
|
3918
|
-
const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new
|
|
3918
|
+
const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new xn(n), i = Kn.create();
|
|
3919
3919
|
try {
|
|
3920
3920
|
return i.cursor = s, i.limit = e, await r.getFolders(
|
|
3921
3921
|
i,
|
|
@@ -3927,7 +3927,7 @@ const Es = async (s, e = 20, t) => {
|
|
|
3927
3927
|
}, vs = async (s, e, t, n, r) => {
|
|
3928
3928
|
var i;
|
|
3929
3929
|
try {
|
|
3930
|
-
const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new
|
|
3930
|
+
const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new xn(o), c = Wr.create();
|
|
3931
3931
|
return c.name = s, c.nestedFolderName = e, c.createdBy = t, c.forUser = n, await a.createFolder(
|
|
3932
3932
|
c,
|
|
3933
3933
|
r
|
|
@@ -3938,7 +3938,7 @@ const Es = async (s, e = 20, t) => {
|
|
|
3938
3938
|
}, As = async (s, e, t, n, r) => {
|
|
3939
3939
|
var i;
|
|
3940
3940
|
try {
|
|
3941
|
-
const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new
|
|
3941
|
+
const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new xn(o), c = Ct.create();
|
|
3942
3942
|
return c.name = e, c.key = s, c.nestedFolderName = t, c.createdBy = n, await a.updateFolder(
|
|
3943
3943
|
c,
|
|
3944
3944
|
r
|
|
@@ -3949,7 +3949,7 @@ const Es = async (s, e = 20, t) => {
|
|
|
3949
3949
|
}, ks = async (s, e) => {
|
|
3950
3950
|
var t;
|
|
3951
3951
|
try {
|
|
3952
|
-
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new
|
|
3952
|
+
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new xn(n), i = $r.create();
|
|
3953
3953
|
return i.key = s, await r.deleteFolder(
|
|
3954
3954
|
i,
|
|
3955
3955
|
e
|
|
@@ -3957,7 +3957,7 @@ const Es = async (s, e = 20, t) => {
|
|
|
3957
3957
|
} catch (n) {
|
|
3958
3958
|
throw n;
|
|
3959
3959
|
}
|
|
3960
|
-
},
|
|
3960
|
+
}, Dn = (s, e, t) => {
|
|
3961
3961
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3962
3962
|
n.setAttribute("xmlns", "http://www.w3.org/2000/svg"), n.setAttribute("width", s || "20"), n.setAttribute("height", e || "20"), n.setAttribute("viewBox", "0 0 24 24"), n.setAttribute("fill", "none"), n.setAttribute("stroke", t || "#ee3f3f"), n.setAttribute("stroke-width", "2"), n.setAttribute("stroke-linecap", "round"), n.setAttribute("stroke-linejoin", "round"), n.classList.add("lucide", "lucide-circle-alert");
|
|
3963
3963
|
const r = document.createElementNS(
|
|
@@ -3970,7 +3970,7 @@ const Es = async (s, e = 20, t) => {
|
|
|
3970
3970
|
const o = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
3971
3971
|
return o.setAttribute("x1", "12"), o.setAttribute("x2", "12.01"), o.setAttribute("y1", "16"), o.setAttribute("y2", "16"), n.appendChild(r), n.appendChild(i), n.appendChild(o), n;
|
|
3972
3972
|
};
|
|
3973
|
-
function
|
|
3973
|
+
function mn(s = "24px", e = "24px", t = "#333") {
|
|
3974
3974
|
const n = document.createElementNS(
|
|
3975
3975
|
"http://www.w3.org/2000/svg",
|
|
3976
3976
|
"svg"
|
|
@@ -4011,7 +4011,7 @@ const wr = (s) => {
|
|
|
4011
4011
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4012
4012
|
return n.setAttribute("d", "m9 11 3 3L22 4"), e.appendChild(t), e.appendChild(n), e;
|
|
4013
4013
|
};
|
|
4014
|
-
function
|
|
4014
|
+
function zn(s = "#333") {
|
|
4015
4015
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4016
4016
|
e.setAttribute("xmlns", "http://www.w3.org/2000/svg"), e.setAttribute("x", "0px"), e.setAttribute("y", "0px"), e.setAttribute("width", "18"), e.setAttribute("height", "18"), e.setAttribute("viewBox", "0 0 50 50"), e.setAttribute("fill", s);
|
|
4017
4017
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -4031,7 +4031,7 @@ function yr() {
|
|
|
4031
4031
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4032
4032
|
return t.setAttribute("d", "m15 5 4 4"), s.appendChild(e), s.appendChild(t), document.body.appendChild(s), s;
|
|
4033
4033
|
}
|
|
4034
|
-
function
|
|
4034
|
+
function en() {
|
|
4035
4035
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4036
4036
|
s.setAttribute("xmlns", "http://www.w3.org/2000/folder"), s.setAttribute("x", "0px"), s.setAttribute("y", "0px"), s.setAttribute("width", "24"), s.setAttribute("height", "24"), s.setAttribute("viewBox", "0 0 48 48");
|
|
4037
4037
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -4107,7 +4107,7 @@ function Cr() {
|
|
|
4107
4107
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
4108
4108
|
return i.setAttribute("x1", "14"), i.setAttribute("x2", "14"), i.setAttribute("y1", "11"), i.setAttribute("y2", "17"), s.appendChild(e), s.appendChild(t), s.appendChild(n), s.appendChild(r), s.appendChild(i), document.body.appendChild(s), s;
|
|
4109
4109
|
}
|
|
4110
|
-
function
|
|
4110
|
+
function Mn() {
|
|
4111
4111
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4112
4112
|
s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("width", "24"), s.setAttribute("height", "24"), s.setAttribute("viewBox", "0 0 24 24"), s.setAttribute("fill", "none"), s.setAttribute("stroke", "currentColor"), s.setAttribute("stroke-width", "2"), s.setAttribute("stroke-linecap", "round"), s.setAttribute("stroke-linejoin", "round"), s.classList.add("lucide", "lucide-upload");
|
|
4113
4113
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -4135,30 +4135,30 @@ function Q(s, e, t, n, r) {
|
|
|
4135
4135
|
let i = document.createElement(s);
|
|
4136
4136
|
return e && (i.className += e), t && (i.style.cssText = t), n && (i.textContent = n), r && r.appendChild(i), i;
|
|
4137
4137
|
}
|
|
4138
|
-
var pt,
|
|
4138
|
+
var pt, Je, Wt;
|
|
4139
4139
|
class xs {
|
|
4140
4140
|
constructor() {
|
|
4141
4141
|
z(this, pt);
|
|
4142
|
-
z(this,
|
|
4142
|
+
z(this, Je);
|
|
4143
4143
|
// Store the circle element as a private property
|
|
4144
|
-
z(this,
|
|
4144
|
+
z(this, Wt, "#fff");
|
|
4145
4145
|
H(this, pt, document.createElementNS(
|
|
4146
4146
|
"http://www.w3.org/2000/svg",
|
|
4147
4147
|
"svg"
|
|
4148
|
-
)),
|
|
4148
|
+
)), C(this, pt).setAttribute("viewBox", "25 25 50 50"), C(this, pt).classList.add("loader-svg"), H(this, Je, document.createElementNS(
|
|
4149
4149
|
"http://www.w3.org/2000/svg",
|
|
4150
4150
|
"circle"
|
|
4151
|
-
)),
|
|
4151
|
+
)), C(this, Je).setAttribute("r", "20"), C(this, Je).setAttribute("cy", "50"), C(this, Je).setAttribute("cx", "50"), C(this, Je).setAttribute("stroke", C(this, Wt)), C(this, Je).classList.add("loader-circle"), C(this, pt).appendChild(C(this, Je));
|
|
4152
4152
|
}
|
|
4153
4153
|
show(e, t) {
|
|
4154
|
-
t && (H(this,
|
|
4154
|
+
t && (H(this, Wt, t), C(this, Je).setAttribute("stroke", C(this, Wt))), e.appendChild(C(this, pt));
|
|
4155
4155
|
}
|
|
4156
4156
|
hide() {
|
|
4157
|
-
|
|
4157
|
+
C(this, pt).remove();
|
|
4158
4158
|
}
|
|
4159
4159
|
}
|
|
4160
|
-
pt = new WeakMap(),
|
|
4161
|
-
const Er = new xs(),
|
|
4160
|
+
pt = new WeakMap(), Je = new WeakMap(), Wt = new WeakMap();
|
|
4161
|
+
const Er = new xs(), gn = document.body;
|
|
4162
4162
|
class jr {
|
|
4163
4163
|
constructor() {
|
|
4164
4164
|
he(this, "main");
|
|
@@ -4181,7 +4181,7 @@ class jr {
|
|
|
4181
4181
|
"dialog-presentation",
|
|
4182
4182
|
"",
|
|
4183
4183
|
"",
|
|
4184
|
-
|
|
4184
|
+
gn
|
|
4185
4185
|
), this.main.setAttribute("role", "presentation"), this.dialogContainer = Q(
|
|
4186
4186
|
"div",
|
|
4187
4187
|
"dialog-container",
|
|
@@ -4222,9 +4222,9 @@ class jr {
|
|
|
4222
4222
|
"",
|
|
4223
4223
|
this.dialogContent
|
|
4224
4224
|
);
|
|
4225
|
-
n.appendChild(
|
|
4225
|
+
n.appendChild(zn()), n.onclick = () => this.hide();
|
|
4226
4226
|
}
|
|
4227
|
-
return e.header && this._setHeader(e), this._setBody(e), this._setFooter(e), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel",
|
|
4227
|
+
return e.header && this._setHeader(e), this._setBody(e), this._setFooter(e), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", gn.style.overflow = "hidden", this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", gn.classList.add("dialog-visible"), new Promise((n) => {
|
|
4228
4228
|
const r = (i) => () => {
|
|
4229
4229
|
this.hide(), n(i === "confirm");
|
|
4230
4230
|
};
|
|
@@ -4276,7 +4276,7 @@ class jr {
|
|
|
4276
4276
|
}, 150);
|
|
4277
4277
|
}
|
|
4278
4278
|
hide() {
|
|
4279
|
-
this.main ||
|
|
4279
|
+
this.main || gn.style.removeProperty("overflow"), this.dialog.style.transform = "scale(0.8)", this.dialog.style.transition = "transform 150ms ease-out", this.dialogBackdrop.style.opacity = "0", setTimeout(() => {
|
|
4280
4280
|
this.dialogContainer.style.opacity = "0", this.dialog.style.opacity = "0", this.dialogContent.style.opacity = "0", this.main.remove();
|
|
4281
4281
|
}, 150);
|
|
4282
4282
|
}
|
|
@@ -4284,7 +4284,7 @@ class jr {
|
|
|
4284
4284
|
e ? (Er.show(this.confirmButton), this.confirmButton.disabled = !0) : (Er.hide(), this.confirmButton.disabled = !1);
|
|
4285
4285
|
}
|
|
4286
4286
|
}
|
|
4287
|
-
const
|
|
4287
|
+
const wn = new jr(), Ce = new jr();
|
|
4288
4288
|
class _s {
|
|
4289
4289
|
constructor() {
|
|
4290
4290
|
he(this, "main");
|
|
@@ -4298,25 +4298,25 @@ class _s {
|
|
|
4298
4298
|
this.main.remove();
|
|
4299
4299
|
}
|
|
4300
4300
|
}
|
|
4301
|
-
const
|
|
4301
|
+
const Xe = new _s();
|
|
4302
4302
|
var Ye = /* @__PURE__ */ ((s) => (s[s.IMAGE = 0] = "IMAGE", s[s.AUDIO = 1] = "AUDIO", s[s.VIDEO = 2] = "VIDEO", s[s.ALL = 3] = "ALL", s[s.FOLDER = 4] = "FOLDER", s))(Ye || {});
|
|
4303
|
-
const
|
|
4303
|
+
const nn = {
|
|
4304
4304
|
0: "IMAGE",
|
|
4305
4305
|
1: "AUDIO",
|
|
4306
4306
|
2: "VIDEO",
|
|
4307
4307
|
3: "ALL",
|
|
4308
4308
|
4: "FOLDER"
|
|
4309
4309
|
};
|
|
4310
|
-
function
|
|
4310
|
+
function Vn(s) {
|
|
4311
4311
|
switch (s) {
|
|
4312
4312
|
case "image":
|
|
4313
|
-
return
|
|
4313
|
+
return nn[Ye.IMAGE];
|
|
4314
4314
|
case "video":
|
|
4315
|
-
return
|
|
4315
|
+
return nn[Ye.VIDEO];
|
|
4316
4316
|
case "audio":
|
|
4317
|
-
return
|
|
4317
|
+
return nn[Ye.AUDIO];
|
|
4318
4318
|
default:
|
|
4319
|
-
return
|
|
4319
|
+
return nn[Ye.ALL];
|
|
4320
4320
|
}
|
|
4321
4321
|
}
|
|
4322
4322
|
function Bs(s) {
|
|
@@ -4365,7 +4365,7 @@ function K(s, e) {
|
|
|
4365
4365
|
const t = document.createElement("div");
|
|
4366
4366
|
return s && (t.className = s), e && (t.id = e), t;
|
|
4367
4367
|
}
|
|
4368
|
-
function
|
|
4368
|
+
function tn(s, e, t) {
|
|
4369
4369
|
const n = document.createElement("p");
|
|
4370
4370
|
return e && (n.className = e), t && (n.id = t), s && (n.textContent = s), n;
|
|
4371
4371
|
}
|
|
@@ -4389,7 +4389,7 @@ function He(s, e, t, n, r) {
|
|
|
4389
4389
|
const i = document.createElement("button");
|
|
4390
4390
|
return e && (i.className = e), t && (i.id = t), s && (i.textContent = s), r && (i.innerHTML = r), i.disabled = n, i;
|
|
4391
4391
|
}
|
|
4392
|
-
function
|
|
4392
|
+
function Hn(s, e, t) {
|
|
4393
4393
|
const n = document.createElement("input");
|
|
4394
4394
|
return n.className = e, n.defaultValue = t, s && (n.type = s), n;
|
|
4395
4395
|
}
|
|
@@ -4456,10 +4456,10 @@ const Vs = (s) => new Promise((e, t) => {
|
|
|
4456
4456
|
return e(new Blob());
|
|
4457
4457
|
}), n.readAsArrayBuffer(s);
|
|
4458
4458
|
});
|
|
4459
|
-
var
|
|
4460
|
-
return
|
|
4459
|
+
var An = {}, Hs = { get exports() {
|
|
4460
|
+
return An;
|
|
4461
4461
|
}, set exports(s) {
|
|
4462
|
-
|
|
4462
|
+
An = s;
|
|
4463
4463
|
} };
|
|
4464
4464
|
(function(s) {
|
|
4465
4465
|
var e, t, n = {};
|
|
@@ -4472,10 +4472,10 @@ var vn = {}, Hs = { get exports() {
|
|
|
4472
4472
|
c += 4, c = y;
|
|
4473
4473
|
for (var F = 0; F < d; F++) {
|
|
4474
4474
|
a(l, c), c += 4, c += 4, c += 4, a(l, c += 4), f = a(l, c += 4);
|
|
4475
|
-
var I = a(l, c += 4),
|
|
4475
|
+
var I = a(l, c += 4), E = o(l, c += 4), R = o(l, c + 2), O = o(l, c + 4);
|
|
4476
4476
|
c += 6;
|
|
4477
4477
|
var v = a(l, c += 8);
|
|
4478
|
-
c += 4, c +=
|
|
4478
|
+
c += 4, c += E + R + O, n._readLocal(l, v, h, f, I, i);
|
|
4479
4479
|
}
|
|
4480
4480
|
return h;
|
|
4481
4481
|
}, n._readLocal = function(r, i, o, a, c, h) {
|
|
@@ -4492,8 +4492,8 @@ var vn = {}, Hs = { get exports() {
|
|
|
4492
4492
|
if (d == 0) o[F] = new Uint8Array(I.buffer.slice(i, i + a));
|
|
4493
4493
|
else {
|
|
4494
4494
|
if (d != 8) throw "unknown compression method: " + d;
|
|
4495
|
-
var
|
|
4496
|
-
n.inflateRaw(I,
|
|
4495
|
+
var E = new Uint8Array(c);
|
|
4496
|
+
n.inflateRaw(I, E), o[F] = E;
|
|
4497
4497
|
}
|
|
4498
4498
|
}
|
|
4499
4499
|
}, n.inflateRaw = function(r, i) {
|
|
@@ -4521,12 +4521,12 @@ var vn = {}, Hs = { get exports() {
|
|
|
4521
4521
|
o += 22;
|
|
4522
4522
|
var y = new Uint8Array(o), F = 0, I = [];
|
|
4523
4523
|
for (var l in h) {
|
|
4524
|
-
var
|
|
4525
|
-
I.push(F), F = n._writeHeader(y, F, l,
|
|
4524
|
+
var E = h[l];
|
|
4525
|
+
I.push(F), F = n._writeHeader(y, F, l, E, 0);
|
|
4526
4526
|
}
|
|
4527
4527
|
var R = 0, O = F;
|
|
4528
4528
|
for (var l in h)
|
|
4529
|
-
|
|
4529
|
+
E = h[l], I.push(F), F = n._writeHeader(y, F, l, E, 1, I[R++]);
|
|
4530
4530
|
var v = F - O;
|
|
4531
4531
|
return a(y, F, 101010256), F += 4, c(y, F += 4, R), c(y, F += 2, R), a(y, F += 2, v), a(y, F += 4, O), F += 4, F += 2, y.buffer;
|
|
4532
4532
|
}, n._noNeed = function(r) {
|
|
@@ -4608,12 +4608,12 @@ var vn = {}, Hs = { get exports() {
|
|
|
4608
4608
|
u(i, f, d + (T = Math.min(65535, F - d)) == F ? 1 : 0), f = n.F._copyExact(r, d, T, i, f + 8), d += T;
|
|
4609
4609
|
return f >>> 3;
|
|
4610
4610
|
}
|
|
4611
|
-
var I = h.lits,
|
|
4612
|
-
for (F > 2 && (
|
|
4611
|
+
var I = h.lits, E = h.strt, R = h.prev, O = 0, v = 0, L = 0, b = 0, B = 0, m = 0;
|
|
4612
|
+
for (F > 2 && (E[m = n.F._hash(r, 0)] = 0), d = 0; d < F; d++) {
|
|
4613
4613
|
if (B = m, d + 1 < F - 2) {
|
|
4614
4614
|
m = n.F._hash(r, d + 1);
|
|
4615
4615
|
var g = d + 1 & 32767;
|
|
4616
|
-
R[g] =
|
|
4616
|
+
R[g] = E[m], E[m] = g;
|
|
4617
4617
|
}
|
|
4618
4618
|
if (y <= d) {
|
|
4619
4619
|
(O > 14e3 || v > 26697) && F - d > 100 && (y < d && (I[O] = d - y, O += 2, y = d), f = n.F._writeBlock(d == F - 1 || y == F ? 1 : 0, I, O, b, r, L, d - L, i, f), O = v = b = 0, L = d);
|
|
@@ -4641,9 +4641,9 @@ var vn = {}, Hs = { get exports() {
|
|
|
4641
4641
|
if (I > f) {
|
|
4642
4642
|
if (y = d, (f = I) >= c) break;
|
|
4643
4643
|
d + 2 < I && (I = d + 2);
|
|
4644
|
-
for (var
|
|
4644
|
+
for (var E = 0, R = 0; R < I - 2; R++) {
|
|
4645
4645
|
var O = i - d + R + 32768 & 32767, v = O - o[O] + 32768 & 32767;
|
|
4646
|
-
v >
|
|
4646
|
+
v > E && (E = v, u = O);
|
|
4647
4647
|
}
|
|
4648
4648
|
}
|
|
4649
4649
|
}
|
|
@@ -4658,8 +4658,8 @@ var vn = {}, Hs = { get exports() {
|
|
|
4658
4658
|
}, n.F._hash = function(r, i) {
|
|
4659
4659
|
return (r[i] << 8 | r[i + 1]) + (r[i + 2] << 4) & 65535;
|
|
4660
4660
|
}, n.saved = 0, n.F._writeBlock = function(r, i, o, a, c, h, l, u, d) {
|
|
4661
|
-
var f, y, F, I,
|
|
4662
|
-
b.lhst[256]++, y = (f = n.F.getTrees())[0], F = f[1], I = f[2],
|
|
4661
|
+
var f, y, F, I, E, R, O, v, L, b = n.F.U, B = n.F._putsF, m = n.F._putsE;
|
|
4662
|
+
b.lhst[256]++, y = (f = n.F.getTrees())[0], F = f[1], I = f[2], E = f[3], R = f[4], O = f[5], v = f[6], L = f[7];
|
|
4663
4663
|
var g = 32 + (d + 3 & 7 ? 8 - (d + 3 & 7) : 0) + (l << 3), k = a + n.F.contSize(b.fltree, b.lhst) + n.F.contSize(b.fdtree, b.dhst), T = a + n.F.contSize(b.ltree, b.lhst) + n.F.contSize(b.dtree, b.dhst);
|
|
4664
4664
|
T += 14 + 3 * O + n.F.contSize(b.itree, b.ihst) + (2 * b.ihst[16] + 3 * b.ihst[17] + 7 * b.ihst[18]);
|
|
4665
4665
|
for (var N = 0; N < 286; N++) b.lhst[N] = 0;
|
|
@@ -4672,15 +4672,15 @@ var vn = {}, Hs = { get exports() {
|
|
|
4672
4672
|
} else {
|
|
4673
4673
|
var A, _;
|
|
4674
4674
|
if (U == 1 && (A = b.fltree, _ = b.fdtree), U == 2) {
|
|
4675
|
-
n.F.makeCodes(b.ltree, y), n.F.revCodes(b.ltree, y), n.F.makeCodes(b.dtree, F), n.F.revCodes(b.dtree, F), n.F.makeCodes(b.itree, I), n.F.revCodes(b.itree, I), A = b.ltree, _ = b.dtree, m(u, d,
|
|
4675
|
+
n.F.makeCodes(b.ltree, y), n.F.revCodes(b.ltree, y), n.F.makeCodes(b.dtree, F), n.F.revCodes(b.dtree, F), n.F.makeCodes(b.itree, I), n.F.revCodes(b.itree, I), A = b.ltree, _ = b.dtree, m(u, d, E - 257), m(u, d += 5, R - 1), m(u, d += 5, O - 4), d += 4;
|
|
4676
4676
|
for (var w = 0; w < O; w++) m(u, d + 3 * w, b.itree[1 + (b.ordr[w] << 1)]);
|
|
4677
4677
|
d += 3 * O, d = n.F._codeTiny(v, b.itree, u, d), d = n.F._codeTiny(L, b.itree, u, d);
|
|
4678
4678
|
}
|
|
4679
4679
|
for (var p = h, M = 0; M < o; M += 2) {
|
|
4680
4680
|
for (var x = i[M], V = x >>> 23, Z = p + (8388607 & x); p < Z; ) d = n.F._writeLit(c[p++], A, u, d);
|
|
4681
4681
|
if (V != 0) {
|
|
4682
|
-
var
|
|
4683
|
-
m(u, d = n.F._writeLit(257 +
|
|
4682
|
+
var $ = i[M + 1], q = $ >> 16, P = $ >> 8 & 255, S = 255 & $;
|
|
4683
|
+
m(u, d = n.F._writeLit(257 + P, A, u, d), V - b.of0[P]), d += b.exb[P], B(u, d = n.F._writeLit(S, _, u, d), q - b.df0[S]), d += b.dxb[S], p += V;
|
|
4684
4684
|
}
|
|
4685
4685
|
}
|
|
4686
4686
|
d = n.F._writeLit(256, A, u, d);
|
|
@@ -4738,9 +4738,9 @@ var vn = {}, Hs = { get exports() {
|
|
|
4738
4738
|
a.sort(function(v, L) {
|
|
4739
4739
|
return v.f - L.f;
|
|
4740
4740
|
});
|
|
4741
|
-
var y = a[0], F = a[1], I = 0,
|
|
4742
|
-
for (a[0] = { lit: -1, f: y.f + F.f, l: y, r: F, d: 0 };
|
|
4743
|
-
var O = n.F.setDepth(a[
|
|
4741
|
+
var y = a[0], F = a[1], I = 0, E = 1, R = 2;
|
|
4742
|
+
for (a[0] = { lit: -1, f: y.f + F.f, l: y, r: F, d: 0 }; E != u - 1; ) y = I != E && (R == u || a[I].f < a[R].f) ? a[I++] : a[R++], F = I != E && (R == u || a[I].f < a[R].f) ? a[I++] : a[R++], a[E++] = { lit: -1, f: y.f + F.f, l: y, r: F };
|
|
4743
|
+
var O = n.F.setDepth(a[E - 1], 0);
|
|
4744
4744
|
for (O > o && (n.F.restrictDepth(d, o, O), O = o), l = 0; l < u; l++) i[1 + (d[l].lit << 1)] = d[l].d;
|
|
4745
4745
|
return O;
|
|
4746
4746
|
}, n.F.setDepth = function(r, i) {
|
|
@@ -4767,8 +4767,8 @@ var vn = {}, Hs = { get exports() {
|
|
|
4767
4767
|
if (r[0] == 3 && r[1] == 0) return i || new o(0);
|
|
4768
4768
|
var a = n.F, c = a._bitsF, h = a._bitsE, l = a._decodeTiny, u = a.makeCodes, d = a.codes2map, f = a._get17, y = a.U, F = i == null;
|
|
4769
4769
|
F && (i = new o(r.length >>> 2 << 3));
|
|
4770
|
-
for (var I,
|
|
4771
|
-
if (F && (i = n.F._check(i, g + (1 << 17))), O == 1 && (I = y.flmap,
|
|
4770
|
+
for (var I, E, R = 0, O = 0, v = 0, L = 0, b = 0, B = 0, m = 0, g = 0, k = 0; R == 0; ) if (R = c(r, k, 1), O = c(r, k + 1, 2), k += 3, O != 0) {
|
|
4771
|
+
if (F && (i = n.F._check(i, g + (1 << 17))), O == 1 && (I = y.flmap, E = y.fdmap, B = 511, m = 31), O == 2) {
|
|
4772
4772
|
v = h(r, k, 5) + 257, L = h(r, k + 5, 5) + 1, b = h(r, k + 10, 4) + 4, k += 14;
|
|
4773
4773
|
for (var T = 0; T < 38; T += 2) y.itree[T] = 0, y.itree[T + 1] = 0;
|
|
4774
4774
|
var N = 1;
|
|
@@ -4776,11 +4776,11 @@ var vn = {}, Hs = { get exports() {
|
|
|
4776
4776
|
var U = h(r, k + 3 * T, 3);
|
|
4777
4777
|
y.itree[1 + (y.ordr[T] << 1)] = U, U > N && (N = U);
|
|
4778
4778
|
}
|
|
4779
|
-
k += 3 * b, u(y.itree, N), d(y.itree, N, y.imap), I = y.lmap,
|
|
4779
|
+
k += 3 * b, u(y.itree, N), d(y.itree, N, y.imap), I = y.lmap, E = y.dmap, k = l(y.imap, (1 << N) - 1, v + L, r, k, y.ttree);
|
|
4780
4780
|
var A = a._copyOut(y.ttree, 0, v, y.ltree);
|
|
4781
4781
|
B = (1 << A) - 1;
|
|
4782
4782
|
var _ = a._copyOut(y.ttree, v, L, y.dtree);
|
|
4783
|
-
m = (1 << _) - 1, u(y.ltree, A), d(y.ltree, A, I), u(y.dtree, _), d(y.dtree, _,
|
|
4783
|
+
m = (1 << _) - 1, u(y.ltree, A), d(y.ltree, A, I), u(y.dtree, _), d(y.dtree, _, E);
|
|
4784
4784
|
}
|
|
4785
4785
|
for (; ; ) {
|
|
4786
4786
|
var w = I[f(r, k) & B];
|
|
@@ -4794,17 +4794,17 @@ var vn = {}, Hs = { get exports() {
|
|
|
4794
4794
|
var x = y.ldef[p - 257];
|
|
4795
4795
|
M = g + (x >>> 3) + h(r, k, 7 & x), k += 7 & x;
|
|
4796
4796
|
}
|
|
4797
|
-
var V =
|
|
4797
|
+
var V = E[f(r, k) & m];
|
|
4798
4798
|
k += 15 & V;
|
|
4799
|
-
var Z = V >>> 4,
|
|
4800
|
-
for (k += 15 &
|
|
4799
|
+
var Z = V >>> 4, $ = y.ddef[Z], q = ($ >>> 4) + c(r, k, 15 & $);
|
|
4800
|
+
for (k += 15 & $, F && (i = n.F._check(i, g + (1 << 17))); g < M; ) i[g] = i[g++ - q], i[g] = i[g++ - q], i[g] = i[g++ - q], i[g] = i[g++ - q];
|
|
4801
4801
|
g = M;
|
|
4802
4802
|
}
|
|
4803
4803
|
}
|
|
4804
4804
|
} else {
|
|
4805
4805
|
7 & k && (k += 8 - (7 & k));
|
|
4806
|
-
var
|
|
4807
|
-
F && (i = n.F._check(i, g + S)), i.set(new o(r.buffer, r.byteOffset +
|
|
4806
|
+
var P = 4 + (k >>> 3), S = r[P - 4] | r[P - 3] << 8;
|
|
4807
|
+
F && (i = n.F._check(i, g + S)), i.set(new o(r.buffer, r.byteOffset + P, S), g), k = P + S << 3, g += S;
|
|
4808
4808
|
}
|
|
4809
4809
|
return i.length == g ? i : i.slice(0, g);
|
|
4810
4810
|
}, n.F._check = function(r, i) {
|
|
@@ -4821,7 +4821,7 @@ var vn = {}, Hs = { get exports() {
|
|
|
4821
4821
|
else {
|
|
4822
4822
|
var F = 0, I = 0;
|
|
4823
4823
|
y == 16 ? (I = 3 + l(a, c, 2), c += 2, F = h[d - 1]) : y == 17 ? (I = 3 + l(a, c, 3), c += 3) : y == 18 && (I = 11 + l(a, c, 7), c += 7);
|
|
4824
|
-
for (var
|
|
4824
|
+
for (var E = d + I; d < E; ) h[d] = F, d++;
|
|
4825
4825
|
}
|
|
4826
4826
|
}
|
|
4827
4827
|
return c;
|
|
@@ -4874,8 +4874,8 @@ var vn = {}, Hs = { get exports() {
|
|
|
4874
4874
|
a(r.fltree, 144, 8), a(r.fltree, 112, 9), a(r.fltree, 24, 7), a(r.fltree, 8, 8), n.F.makeCodes(r.fltree, 9), n.F.codes2map(r.fltree, 9, r.flmap), n.F.revCodes(r.fltree, 9), a(r.fdtree, 32, 5), n.F.makeCodes(r.fdtree, 5), n.F.codes2map(r.fdtree, 5, r.fdmap), n.F.revCodes(r.fdtree, 5), a(r.itree, 19, 0), a(r.ltree, 286, 0), a(r.dtree, 30, 0), a(r.ttree, 320, 0);
|
|
4875
4875
|
}();
|
|
4876
4876
|
})();
|
|
4877
|
-
var
|
|
4878
|
-
const
|
|
4877
|
+
var Ps = Ms({ __proto__: null, default: An }, [An]);
|
|
4878
|
+
const Ge = function() {
|
|
4879
4879
|
var s = { nextZero(l, u) {
|
|
4880
4880
|
for (; l[u] != 0; ) u++;
|
|
4881
4881
|
return u;
|
|
@@ -4904,11 +4904,11 @@ const Xe = function() {
|
|
|
4904
4904
|
return f;
|
|
4905
4905
|
} };
|
|
4906
4906
|
function e(l, u, d, f) {
|
|
4907
|
-
const y = u * d, F = i(f), I = Math.ceil(u * F / 8),
|
|
4907
|
+
const y = u * d, F = i(f), I = Math.ceil(u * F / 8), E = new Uint8Array(4 * y), R = new Uint32Array(E.buffer), { ctype: O } = f, { depth: v } = f, L = s.readUshort;
|
|
4908
4908
|
if (O == 6) {
|
|
4909
4909
|
const x = y << 2;
|
|
4910
|
-
if (v == 8) for (var b = 0; b < x; b += 4)
|
|
4911
|
-
if (v == 16) for (b = 0; b < x; b++)
|
|
4910
|
+
if (v == 8) for (var b = 0; b < x; b += 4) E[b] = l[b], E[b + 1] = l[b + 1], E[b + 2] = l[b + 2], E[b + 3] = l[b + 3];
|
|
4911
|
+
if (v == 16) for (b = 0; b < x; b++) E[b] = l[b << 1];
|
|
4912
4912
|
} else if (O == 2) {
|
|
4913
4913
|
const x = f.tabs.tRNS;
|
|
4914
4914
|
if (x == null) {
|
|
@@ -4923,10 +4923,10 @@ const Xe = function() {
|
|
|
4923
4923
|
const V = x[1], Z = x[2];
|
|
4924
4924
|
if (v == 8) for (b = 0; b < y; b++) {
|
|
4925
4925
|
var g = b << 2;
|
|
4926
|
-
B = 3 * b, R[b] = 255 << 24 | l[B + 2] << 16 | l[B + 1] << 8 | l[B], l[B] == m && l[B + 1] == V && l[B + 2] == Z && (
|
|
4926
|
+
B = 3 * b, R[b] = 255 << 24 | l[B + 2] << 16 | l[B + 1] << 8 | l[B], l[B] == m && l[B + 1] == V && l[B + 2] == Z && (E[g + 3] = 0);
|
|
4927
4927
|
}
|
|
4928
4928
|
if (v == 16) for (b = 0; b < y; b++)
|
|
4929
|
-
g = b << 2, B = 6 * b, R[b] = 255 << 24 | l[B + 4] << 16 | l[B + 2] << 8 | l[B], L(l, B) == m && L(l, B + 2) == V && L(l, B + 4) == Z && (
|
|
4929
|
+
g = b << 2, B = 6 * b, R[b] = 255 << 24 | l[B + 4] << 16 | l[B + 2] << 8 | l[B], L(l, B) == m && L(l, B + 2) == V && L(l, B + 4) == Z && (E[g + 3] = 0);
|
|
4930
4930
|
}
|
|
4931
4931
|
} else if (O == 3) {
|
|
4932
4932
|
const x = f.tabs.PLTE, V = f.tabs.tRNS, Z = V ? V.length : 0;
|
|
@@ -4935,26 +4935,26 @@ const Xe = function() {
|
|
|
4935
4935
|
for (b = 0; b < u; b++) {
|
|
4936
4936
|
g = N + b << 2;
|
|
4937
4937
|
var U = 3 * (A = l[T + (b >> 3)] >> 7 - ((7 & b) << 0) & 1);
|
|
4938
|
-
|
|
4938
|
+
E[g] = x[U], E[g + 1] = x[U + 1], E[g + 2] = x[U + 2], E[g + 3] = A < Z ? V[A] : 255;
|
|
4939
4939
|
}
|
|
4940
4940
|
}
|
|
4941
4941
|
if (v == 2) for (k = 0; k < d; k++) for (T = k * I, N = k * u, b = 0; b < u; b++)
|
|
4942
|
-
g = N + b << 2, U = 3 * (A = l[T + (b >> 2)] >> 6 - ((3 & b) << 1) & 3),
|
|
4942
|
+
g = N + b << 2, U = 3 * (A = l[T + (b >> 2)] >> 6 - ((3 & b) << 1) & 3), E[g] = x[U], E[g + 1] = x[U + 1], E[g + 2] = x[U + 2], E[g + 3] = A < Z ? V[A] : 255;
|
|
4943
4943
|
if (v == 4) for (k = 0; k < d; k++) for (T = k * I, N = k * u, b = 0; b < u; b++)
|
|
4944
|
-
g = N + b << 2, U = 3 * (A = l[T + (b >> 1)] >> 4 - ((1 & b) << 2) & 15),
|
|
4944
|
+
g = N + b << 2, U = 3 * (A = l[T + (b >> 1)] >> 4 - ((1 & b) << 2) & 15), E[g] = x[U], E[g + 1] = x[U + 1], E[g + 2] = x[U + 2], E[g + 3] = A < Z ? V[A] : 255;
|
|
4945
4945
|
if (v == 8) for (b = 0; b < y; b++) {
|
|
4946
4946
|
var A;
|
|
4947
|
-
g = b << 2, U = 3 * (A = l[b]),
|
|
4947
|
+
g = b << 2, U = 3 * (A = l[b]), E[g] = x[U], E[g + 1] = x[U + 1], E[g + 2] = x[U + 2], E[g + 3] = A < Z ? V[A] : 255;
|
|
4948
4948
|
}
|
|
4949
4949
|
} else if (O == 4) {
|
|
4950
4950
|
if (v == 8) for (b = 0; b < y; b++) {
|
|
4951
4951
|
g = b << 2;
|
|
4952
4952
|
var _ = l[w = b << 1];
|
|
4953
|
-
|
|
4953
|
+
E[g] = _, E[g + 1] = _, E[g + 2] = _, E[g + 3] = l[w + 1];
|
|
4954
4954
|
}
|
|
4955
4955
|
if (v == 16) for (b = 0; b < y; b++) {
|
|
4956
4956
|
var w;
|
|
4957
|
-
g = b << 2, _ = l[w = b << 2],
|
|
4957
|
+
g = b << 2, _ = l[w = b << 2], E[g] = _, E[g + 1] = _, E[g + 2] = _, E[g + 3] = l[w + 2];
|
|
4958
4958
|
}
|
|
4959
4959
|
} else if (O == 0) for (m = f.tabs.tRNS ? f.tabs.tRNS : -1, k = 0; k < d; k++) {
|
|
4960
4960
|
const x = k * I, V = k * u;
|
|
@@ -4971,7 +4971,7 @@ const Xe = function() {
|
|
|
4971
4971
|
else if (v == 16) for (p = 0; p < u; p++)
|
|
4972
4972
|
_ = l[x + (p << 1)], M = L(l, x + (p << 1)) == m ? 0 : 255, R[V + p] = M << 24 | _ << 16 | _ << 8 | _;
|
|
4973
4973
|
}
|
|
4974
|
-
return
|
|
4974
|
+
return E;
|
|
4975
4975
|
}
|
|
4976
4976
|
function t(l, u, d, f) {
|
|
4977
4977
|
const y = i(l), F = Math.ceil(d * y / 8), I = new Uint8Array((F + 1 + l.interlace) * f);
|
|
@@ -4984,13 +4984,13 @@ const Xe = function() {
|
|
|
4984
4984
|
const p = U[_], M = A[_];
|
|
4985
4985
|
let x = 0, V = 0, Z = T[_];
|
|
4986
4986
|
for (; Z < L; ) Z += p, V++;
|
|
4987
|
-
let
|
|
4988
|
-
for (;
|
|
4987
|
+
let $ = N[_];
|
|
4988
|
+
for (; $ < v; ) $ += M, x++;
|
|
4989
4989
|
const q = Math.ceil(x * b / 8);
|
|
4990
4990
|
o(R, O, k, x, V);
|
|
4991
|
-
let
|
|
4991
|
+
let P = 0, S = T[_];
|
|
4992
4992
|
for (; S < L; ) {
|
|
4993
|
-
let X = N[_], oe = k +
|
|
4993
|
+
let X = N[_], oe = k + P * q << 3;
|
|
4994
4994
|
for (; X < v; ) {
|
|
4995
4995
|
var w;
|
|
4996
4996
|
if (b == 1 && (w = (w = R[oe >> 3]) >> 7 - (7 & oe) & 1, g[S * m + (X >> 3)] |= w << 7 - ((7 & X) << 0)), b == 2 && (w = (w = R[oe >> 3]) >> 6 - (7 & oe) & 3, g[S * m + (X >> 2)] |= w << 6 - ((3 & X) << 1)), b == 4 && (w = (w = R[oe >> 3]) >> 4 - (7 & oe) & 15, g[S * m + (X >> 1)] |= w << 4 - ((1 & X) << 2)), b >= 8) {
|
|
@@ -4999,7 +4999,7 @@ const Xe = function() {
|
|
|
4999
4999
|
}
|
|
5000
5000
|
oe += b, X += M;
|
|
5001
5001
|
}
|
|
5002
|
-
|
|
5002
|
+
P++, S += p;
|
|
5003
5003
|
}
|
|
5004
5004
|
x * V != 0 && (k += V * (1 + q)), _ += 1;
|
|
5005
5005
|
}
|
|
@@ -5013,17 +5013,17 @@ const Xe = function() {
|
|
|
5013
5013
|
const l = { H: {} };
|
|
5014
5014
|
return l.H.N = function(u, d) {
|
|
5015
5015
|
const f = Uint8Array;
|
|
5016
|
-
let y, F, I = 0,
|
|
5016
|
+
let y, F, I = 0, E = 0, R = 0, O = 0, v = 0, L = 0, b = 0, B = 0, m = 0;
|
|
5017
5017
|
if (u[0] == 3 && u[1] == 0) return d || new f(0);
|
|
5018
5018
|
const g = l.H, k = g.b, T = g.e, N = g.R, U = g.n, A = g.A, _ = g.Z, w = g.m, p = d == null;
|
|
5019
|
-
for (p && (d = new f(u.length >>> 2 << 5)); I == 0; ) if (I = k(u, m, 1),
|
|
5020
|
-
if (p && (d = l.H.W(d, B + (1 << 17))),
|
|
5019
|
+
for (p && (d = new f(u.length >>> 2 << 5)); I == 0; ) if (I = k(u, m, 1), E = k(u, m + 1, 2), m += 3, E != 0) {
|
|
5020
|
+
if (p && (d = l.H.W(d, B + (1 << 17))), E == 1 && (y = w.J, F = w.h, L = 511, b = 31), E == 2) {
|
|
5021
5021
|
R = T(u, m, 5) + 257, O = T(u, m + 5, 5) + 1, v = T(u, m + 10, 4) + 4, m += 14;
|
|
5022
5022
|
let x = 1;
|
|
5023
5023
|
for (var M = 0; M < 38; M += 2) w.Q[M] = 0, w.Q[M + 1] = 0;
|
|
5024
5024
|
for (M = 0; M < v; M++) {
|
|
5025
|
-
const
|
|
5026
|
-
w.Q[1 + (w.X[M] << 1)] =
|
|
5025
|
+
const $ = T(u, m + 3 * M, 3);
|
|
5026
|
+
w.Q[1 + (w.X[M] << 1)] = $, $ > x && (x = $);
|
|
5027
5027
|
}
|
|
5028
5028
|
m += 3 * v, U(w.Q, x), A(w.Q, x, w.u), y = w.w, F = w.d, m = N(w.u, (1 << x) - 1, R + O, u, m, w.v);
|
|
5029
5029
|
const V = g.V(w.v, 0, R, w.C);
|
|
@@ -5044,10 +5044,10 @@ const Xe = function() {
|
|
|
5044
5044
|
const X = w.q[V - 257];
|
|
5045
5045
|
Z = B + (X >>> 3) + T(u, m, 7 & X), m += 7 & X;
|
|
5046
5046
|
}
|
|
5047
|
-
const
|
|
5048
|
-
m += 15 &
|
|
5049
|
-
const q =
|
|
5050
|
-
for (m += 15 &
|
|
5047
|
+
const $ = F[_(u, m) & b];
|
|
5048
|
+
m += 15 & $;
|
|
5049
|
+
const q = $ >>> 4, P = w.c[q], S = (P >>> 4) + k(u, m, 15 & P);
|
|
5050
|
+
for (m += 15 & P; B < Z; ) d[B] = d[B++ - S], d[B] = d[B++ - S], d[B] = d[B++ - S], d[B] = d[B++ - S];
|
|
5051
5051
|
B = Z;
|
|
5052
5052
|
}
|
|
5053
5053
|
}
|
|
@@ -5064,7 +5064,7 @@ const Xe = function() {
|
|
|
5064
5064
|
const y = new Uint8Array(f << 1);
|
|
5065
5065
|
return y.set(u, 0), y;
|
|
5066
5066
|
}, l.H.R = function(u, d, f, y, F, I) {
|
|
5067
|
-
const
|
|
5067
|
+
const E = l.H.e, R = l.H.Z;
|
|
5068
5068
|
let O = 0;
|
|
5069
5069
|
for (; O < f; ) {
|
|
5070
5070
|
const v = u[R(y, F) & d];
|
|
@@ -5073,7 +5073,7 @@ const Xe = function() {
|
|
|
5073
5073
|
if (L <= 15) I[O] = L, O++;
|
|
5074
5074
|
else {
|
|
5075
5075
|
let b = 0, B = 0;
|
|
5076
|
-
L == 16 ? (B = 3 +
|
|
5076
|
+
L == 16 ? (B = 3 + E(y, F, 2), F += 2, b = I[O - 1]) : L == 17 ? (B = 3 + E(y, F, 3), F += 3) : L == 18 && (B = 11 + E(y, F, 7), F += 7);
|
|
5077
5077
|
const m = O + B;
|
|
5078
5078
|
for (; O < m; ) I[O] = b, O++;
|
|
5079
5079
|
}
|
|
@@ -5081,26 +5081,26 @@ const Xe = function() {
|
|
|
5081
5081
|
return F;
|
|
5082
5082
|
}, l.H.V = function(u, d, f, y) {
|
|
5083
5083
|
let F = 0, I = 0;
|
|
5084
|
-
const
|
|
5084
|
+
const E = y.length >>> 1;
|
|
5085
5085
|
for (; I < f; ) {
|
|
5086
5086
|
const R = u[I + d];
|
|
5087
5087
|
y[I << 1] = 0, y[1 + (I << 1)] = R, R > F && (F = R), I++;
|
|
5088
5088
|
}
|
|
5089
|
-
for (; I <
|
|
5089
|
+
for (; I < E; ) y[I << 1] = 0, y[1 + (I << 1)] = 0, I++;
|
|
5090
5090
|
return F;
|
|
5091
5091
|
}, l.H.n = function(u, d) {
|
|
5092
5092
|
const f = l.H.m, y = u.length;
|
|
5093
|
-
let F, I,
|
|
5093
|
+
let F, I, E, R;
|
|
5094
5094
|
const O = f.j;
|
|
5095
5095
|
for (var v = 0; v <= d; v++) O[v] = 0;
|
|
5096
5096
|
for (v = 1; v < y; v += 2) O[u[v]]++;
|
|
5097
5097
|
const L = f.K;
|
|
5098
5098
|
for (F = 0, O[0] = 0, I = 1; I <= d; I++) F = F + O[I - 1] << 1, L[I] = F;
|
|
5099
|
-
for (
|
|
5099
|
+
for (E = 0; E < y; E += 2) R = u[E + 1], R != 0 && (u[E] = L[R], L[R]++);
|
|
5100
5100
|
}, l.H.A = function(u, d, f) {
|
|
5101
5101
|
const y = u.length, F = l.H.m.r;
|
|
5102
5102
|
for (let I = 0; I < y; I += 2) if (u[I + 1] != 0) {
|
|
5103
|
-
const
|
|
5103
|
+
const E = I >> 1, R = u[I + 1], O = E << 4 | R, v = d - R;
|
|
5104
5104
|
let L = u[I] << v;
|
|
5105
5105
|
const b = L + (1 << v);
|
|
5106
5106
|
for (; L != b; )
|
|
@@ -5150,21 +5150,21 @@ const Xe = function() {
|
|
|
5150
5150
|
function o(l, u, d, f, y) {
|
|
5151
5151
|
let F = i(u);
|
|
5152
5152
|
const I = Math.ceil(f * F / 8);
|
|
5153
|
-
let
|
|
5153
|
+
let E, R;
|
|
5154
5154
|
F = Math.ceil(F / 8);
|
|
5155
5155
|
let O = l[d], v = 0;
|
|
5156
5156
|
if (O > 1 && (l[d] = [0, 0, 1][O - 2]), O == 3) for (v = F; v < I; v++) l[v + 1] = l[v + 1] + (l[v + 1 - F] >>> 1) & 255;
|
|
5157
|
-
for (let L = 0; L < y; L++) if (
|
|
5157
|
+
for (let L = 0; L < y; L++) if (E = d + L * I, R = E + L + 1, O = l[R - 1], v = 0, O == 0) for (; v < I; v++) l[E + v] = l[R + v];
|
|
5158
5158
|
else if (O == 1) {
|
|
5159
|
-
for (; v < F; v++) l[
|
|
5160
|
-
for (; v < I; v++) l[
|
|
5161
|
-
} else if (O == 2) for (; v < I; v++) l[
|
|
5159
|
+
for (; v < F; v++) l[E + v] = l[R + v];
|
|
5160
|
+
for (; v < I; v++) l[E + v] = l[R + v] + l[E + v - F];
|
|
5161
|
+
} else if (O == 2) for (; v < I; v++) l[E + v] = l[R + v] + l[E + v - I];
|
|
5162
5162
|
else if (O == 3) {
|
|
5163
|
-
for (; v < F; v++) l[
|
|
5164
|
-
for (; v < I; v++) l[
|
|
5163
|
+
for (; v < F; v++) l[E + v] = l[R + v] + (l[E + v - I] >>> 1);
|
|
5164
|
+
for (; v < I; v++) l[E + v] = l[R + v] + (l[E + v - I] + l[E + v - F] >>> 1);
|
|
5165
5165
|
} else {
|
|
5166
|
-
for (; v < F; v++) l[
|
|
5167
|
-
for (; v < I; v++) l[
|
|
5166
|
+
for (; v < F; v++) l[E + v] = l[R + v] + a(0, l[E + v - I], 0);
|
|
5167
|
+
for (; v < I; v++) l[E + v] = l[R + v] + a(l[E + v - F], l[E + v - I], l[E + v - F - I]);
|
|
5168
5168
|
}
|
|
5169
5169
|
return l;
|
|
5170
5170
|
}
|
|
@@ -5175,10 +5175,10 @@ const Xe = function() {
|
|
|
5175
5175
|
function c(l, u, d) {
|
|
5176
5176
|
d.width = s.readUint(l, u), u += 4, d.height = s.readUint(l, u), u += 4, d.depth = l[u], u++, d.ctype = l[u], u++, d.compress = l[u], u++, d.filter = l[u], u++, d.interlace = l[u], u++;
|
|
5177
5177
|
}
|
|
5178
|
-
function h(l, u, d, f, y, F, I,
|
|
5178
|
+
function h(l, u, d, f, y, F, I, E, R) {
|
|
5179
5179
|
const O = Math.min(u, y), v = Math.min(d, F);
|
|
5180
5180
|
let L = 0, b = 0;
|
|
5181
|
-
for (let _ = 0; _ < v; _++) for (let w = 0; w < O; w++) if (I >= 0 &&
|
|
5181
|
+
for (let _ = 0; _ < v; _++) for (let w = 0; w < O; w++) if (I >= 0 && E >= 0 ? (L = _ * u + w << 2, b = (E + _) * y + I + w << 2) : (L = (-E + _) * u - I + w << 2, b = _ * y + w << 2), R == 0) f[b] = l[L], f[b + 1] = l[L + 1], f[b + 2] = l[L + 2], f[b + 3] = l[L + 3];
|
|
5182
5182
|
else if (R == 1) {
|
|
5183
5183
|
var B = l[L + 3] * 0.00392156862745098, m = l[L] * B, g = l[L + 1] * B, k = l[L + 2] * B, T = f[b + 3] * (1 / 255), N = f[b] * T, U = f[b + 1] * T, A = f[b + 2] * T;
|
|
5184
5184
|
const p = 1 - B, M = B + T * p, x = M == 0 ? 0 : 1 / M;
|
|
@@ -5194,7 +5194,7 @@ const Xe = function() {
|
|
|
5194
5194
|
return { decode: function(u) {
|
|
5195
5195
|
const d = new Uint8Array(u);
|
|
5196
5196
|
let f = 8;
|
|
5197
|
-
const y = s, F = y.readUshort, I = y.readUint,
|
|
5197
|
+
const y = s, F = y.readUshort, I = y.readUint, E = { tabs: {}, frames: [] }, R = new Uint8Array(d.length);
|
|
5198
5198
|
let O, v = 0, L = 0;
|
|
5199
5199
|
const b = [137, 80, 78, 71, 13, 10, 26, 10];
|
|
5200
5200
|
for (var B = 0; B < 8; B++) if (d[B] != b[B]) throw "The input is not a PNG file!";
|
|
@@ -5202,7 +5202,7 @@ const Xe = function() {
|
|
|
5202
5202
|
const _ = y.readUint(d, f);
|
|
5203
5203
|
f += 4;
|
|
5204
5204
|
const w = y.readASCII(d, f, 4);
|
|
5205
|
-
if (f += 4, w == "IHDR") c(d, f,
|
|
5205
|
+
if (f += 4, w == "IHDR") c(d, f, E);
|
|
5206
5206
|
else if (w == "iCCP") {
|
|
5207
5207
|
for (var m = f; d[m] != 0; ) m++;
|
|
5208
5208
|
y.readASCII(d, f, m - f), d[m + 1];
|
|
@@ -5213,63 +5213,63 @@ const Xe = function() {
|
|
|
5213
5213
|
} catch {
|
|
5214
5214
|
M = r(p);
|
|
5215
5215
|
}
|
|
5216
|
-
|
|
5217
|
-
} else if (w == "CgBI")
|
|
5216
|
+
E.tabs[w] = M;
|
|
5217
|
+
} else if (w == "CgBI") E.tabs[w] = d.slice(f, f + 4);
|
|
5218
5218
|
else if (w == "IDAT") {
|
|
5219
5219
|
for (B = 0; B < _; B++) R[v + B] = d[f + B];
|
|
5220
5220
|
v += _;
|
|
5221
|
-
} else if (w == "acTL")
|
|
5221
|
+
} else if (w == "acTL") E.tabs[w] = { num_frames: I(d, f), num_plays: I(d, f + 4) }, O = new Uint8Array(d.length);
|
|
5222
5222
|
else if (w == "fcTL") {
|
|
5223
|
-
L != 0 && ((A =
|
|
5223
|
+
L != 0 && ((A = E.frames[E.frames.length - 1]).data = t(E, O.slice(0, L), A.rect.width, A.rect.height), L = 0);
|
|
5224
5224
|
const p = { x: I(d, f + 12), y: I(d, f + 16), width: I(d, f + 4), height: I(d, f + 8) };
|
|
5225
5225
|
let M = F(d, f + 22);
|
|
5226
5226
|
M = F(d, f + 20) / (M == 0 ? 100 : M);
|
|
5227
5227
|
const x = { rect: p, delay: Math.round(1e3 * M), dispose: d[f + 24], blend: d[f + 25] };
|
|
5228
|
-
|
|
5228
|
+
E.frames.push(x);
|
|
5229
5229
|
} else if (w == "fdAT") {
|
|
5230
5230
|
for (B = 0; B < _ - 4; B++) O[L + B] = d[f + B + 4];
|
|
5231
5231
|
L += _ - 4;
|
|
5232
|
-
} else if (w == "pHYs")
|
|
5232
|
+
} else if (w == "pHYs") E.tabs[w] = [y.readUint(d, f), y.readUint(d, f + 4), d[f + 8]];
|
|
5233
5233
|
else if (w == "cHRM")
|
|
5234
|
-
for (
|
|
5234
|
+
for (E.tabs[w] = [], B = 0; B < 8; B++) E.tabs[w].push(y.readUint(d, f + 4 * B));
|
|
5235
5235
|
else if (w == "tEXt" || w == "zTXt") {
|
|
5236
|
-
|
|
5236
|
+
E.tabs[w] == null && (E.tabs[w] = {});
|
|
5237
5237
|
var g = y.nextZero(d, f), k = y.readASCII(d, f, g - f), T = f + _ - g - 1;
|
|
5238
5238
|
if (w == "tEXt") U = y.readASCII(d, g + 1, T);
|
|
5239
5239
|
else {
|
|
5240
5240
|
var N = n(d.slice(g + 2, g + 2 + T));
|
|
5241
5241
|
U = y.readUTF8(N, 0, N.length);
|
|
5242
5242
|
}
|
|
5243
|
-
|
|
5243
|
+
E.tabs[w][k] = U;
|
|
5244
5244
|
} else if (w == "iTXt") {
|
|
5245
|
-
|
|
5245
|
+
E.tabs[w] == null && (E.tabs[w] = {}), g = 0, m = f, g = y.nextZero(d, m), k = y.readASCII(d, m, g - m);
|
|
5246
5246
|
const p = d[m = g + 1];
|
|
5247
5247
|
var U;
|
|
5248
|
-
d[m + 1], m += 2, g = y.nextZero(d, m), y.readASCII(d, m, g - m), m = g + 1, g = y.nextZero(d, m), y.readUTF8(d, m, g - m), T = _ - ((m = g + 1) - f), p == 0 ? U = y.readUTF8(d, m, T) : (N = n(d.slice(m, m + T)), U = y.readUTF8(N, 0, N.length)),
|
|
5249
|
-
} else if (w == "PLTE")
|
|
5248
|
+
d[m + 1], m += 2, g = y.nextZero(d, m), y.readASCII(d, m, g - m), m = g + 1, g = y.nextZero(d, m), y.readUTF8(d, m, g - m), T = _ - ((m = g + 1) - f), p == 0 ? U = y.readUTF8(d, m, T) : (N = n(d.slice(m, m + T)), U = y.readUTF8(N, 0, N.length)), E.tabs[w][k] = U;
|
|
5249
|
+
} else if (w == "PLTE") E.tabs[w] = y.readBytes(d, f, _);
|
|
5250
5250
|
else if (w == "hIST") {
|
|
5251
|
-
const p =
|
|
5252
|
-
for (
|
|
5253
|
-
} else if (w == "tRNS")
|
|
5254
|
-
else if (w == "gAMA")
|
|
5255
|
-
else if (w == "sRGB")
|
|
5256
|
-
else if (w == "bKGD")
|
|
5251
|
+
const p = E.tabs.PLTE.length / 3;
|
|
5252
|
+
for (E.tabs[w] = [], B = 0; B < p; B++) E.tabs[w].push(F(d, f + 2 * B));
|
|
5253
|
+
} else if (w == "tRNS") E.ctype == 3 ? E.tabs[w] = y.readBytes(d, f, _) : E.ctype == 0 ? E.tabs[w] = F(d, f) : E.ctype == 2 && (E.tabs[w] = [F(d, f), F(d, f + 2), F(d, f + 4)]);
|
|
5254
|
+
else if (w == "gAMA") E.tabs[w] = y.readUint(d, f) / 1e5;
|
|
5255
|
+
else if (w == "sRGB") E.tabs[w] = d[f];
|
|
5256
|
+
else if (w == "bKGD") E.ctype == 0 || E.ctype == 4 ? E.tabs[w] = [F(d, f)] : E.ctype == 2 || E.ctype == 6 ? E.tabs[w] = [F(d, f), F(d, f + 2), F(d, f + 4)] : E.ctype == 3 && (E.tabs[w] = d[f]);
|
|
5257
5257
|
else if (w == "IEND") break;
|
|
5258
5258
|
f += _, y.readUint(d, f), f += 4;
|
|
5259
5259
|
}
|
|
5260
5260
|
var A;
|
|
5261
|
-
return L != 0 && ((A =
|
|
5261
|
+
return L != 0 && ((A = E.frames[E.frames.length - 1]).data = t(E, O.slice(0, L), A.rect.width, A.rect.height)), E.data = t(E, R, E.width, E.height), delete E.compress, delete E.interlace, delete E.filter, E;
|
|
5262
5262
|
}, toRGBA8: function(u) {
|
|
5263
5263
|
const d = u.width, f = u.height;
|
|
5264
5264
|
if (u.tabs.acTL == null) return [e(u.data, d, f, u).buffer];
|
|
5265
5265
|
const y = [];
|
|
5266
5266
|
u.frames[0].data == null && (u.frames[0].data = u.data);
|
|
5267
|
-
const F = d * f * 4, I = new Uint8Array(F),
|
|
5267
|
+
const F = d * f * 4, I = new Uint8Array(F), E = new Uint8Array(F), R = new Uint8Array(F);
|
|
5268
5268
|
for (let v = 0; v < u.frames.length; v++) {
|
|
5269
5269
|
const L = u.frames[v], b = L.rect.x, B = L.rect.y, m = L.rect.width, g = L.rect.height, k = e(L.data, m, g, u);
|
|
5270
5270
|
if (v != 0) for (var O = 0; O < F; O++) R[O] = I[O];
|
|
5271
5271
|
if (L.blend == 0 ? h(k, m, g, I, d, f, b, B, 0) : L.blend == 1 && h(k, m, g, I, d, f, b, B, 1), y.push(I.buffer.slice(0)), L.dispose != 0) {
|
|
5272
|
-
if (L.dispose == 1) h(
|
|
5272
|
+
if (L.dispose == 1) h(E, m, g, I, d, f, b, B, 0);
|
|
5273
5273
|
else if (L.dispose == 2) for (O = 0; O < F; O++) I[O] = R[O];
|
|
5274
5274
|
}
|
|
5275
5275
|
}
|
|
@@ -5277,7 +5277,7 @@ const Xe = function() {
|
|
|
5277
5277
|
}, _paeth: a, _copyTile: h, _bin: s };
|
|
5278
5278
|
}();
|
|
5279
5279
|
(function() {
|
|
5280
|
-
const { _copyTile: s } =
|
|
5280
|
+
const { _copyTile: s } = Ge, { _bin: e } = Ge, t = Ge._paeth;
|
|
5281
5281
|
var n = { table: function() {
|
|
5282
5282
|
const m = new Uint32Array(256);
|
|
5283
5283
|
for (let g = 0; g < 256; g++) {
|
|
@@ -5314,18 +5314,18 @@ const Xe = function() {
|
|
|
5314
5314
|
x != p && V < S && (S = V, M = x);
|
|
5315
5315
|
}
|
|
5316
5316
|
}
|
|
5317
|
-
const Z = new Uint32Array(N.buffer),
|
|
5317
|
+
const Z = new Uint32Array(N.buffer), $ = new Int16Array(g * k * 4), q = [0, 8, 2, 10, 12, 4, 14, 6, 3, 11, 1, 9, 15, 7, 13, 5];
|
|
5318
5318
|
for (p = 0; p < q.length; p++) q[p] = 255 * ((q[p] + 0.5) / 16 - 0.5);
|
|
5319
5319
|
for (let S = 0; S < k; S++) for (let X = 0; X < g; X++) {
|
|
5320
|
-
var
|
|
5321
|
-
p = 4 * (S * g + X), A != 2 ?
|
|
5320
|
+
var P;
|
|
5321
|
+
p = 4 * (S * g + X), A != 2 ? P = [i(m[p] + $[p]), i(m[p + 1] + $[p + 1]), i(m[p + 2] + $[p + 2]), i(m[p + 3] + $[p + 3])] : (V = q[4 * (3 & S) + (3 & X)], P = [i(m[p] + V), i(m[p + 1] + V), i(m[p + 2] + V), i(m[p + 3] + V)]), M = 0;
|
|
5322
5322
|
let oe = 16777215;
|
|
5323
5323
|
for (x = 0; x < _; x++) {
|
|
5324
|
-
const re = o(
|
|
5324
|
+
const re = o(P, w[x]);
|
|
5325
5325
|
re < oe && (oe = re, M = x);
|
|
5326
5326
|
}
|
|
5327
|
-
const te = w[M], Y = [
|
|
5328
|
-
A == 1 && (X != g - 1 && r(Y,
|
|
5327
|
+
const te = w[M], Y = [P[0] - te[0], P[1] - te[1], P[2] - te[2], P[3] - te[3]];
|
|
5328
|
+
A == 1 && (X != g - 1 && r(Y, $, p + 4, 7), S != k - 1 && (X != 0 && r(Y, $, p + 4 * g - 4, 3), r(Y, $, p + 4 * g, 5), X != g - 1 && r(Y, $, p + 4 * g + 4, 1))), U[p >> 2] = M, Z[p >> 2] = T[M];
|
|
5329
5329
|
}
|
|
5330
5330
|
}
|
|
5331
5331
|
function c(m, g, k, T, N) {
|
|
@@ -5335,11 +5335,11 @@ const Xe = function() {
|
|
|
5335
5335
|
const M = m.frames.length > 1;
|
|
5336
5336
|
let x, V = !1, Z = 33 + (M ? 20 : 0);
|
|
5337
5337
|
if (N.sRGB != null && (Z += 13), N.pHYs != null && (Z += 21), N.iCCP != null && (x = pako.deflate(N.iCCP), Z += 21 + x.length + 4), m.ctype == 3) {
|
|
5338
|
-
for (var
|
|
5339
|
-
Z += 8 + 3 *
|
|
5338
|
+
for (var $ = m.plte.length, q = 0; q < $; q++) m.plte[q] >>> 24 != 255 && (V = !0);
|
|
5339
|
+
Z += 8 + 3 * $ + 4 + (V ? 8 + 1 * $ + 4 : 0);
|
|
5340
5340
|
}
|
|
5341
|
-
for (var
|
|
5342
|
-
M && (Z += 38), Z += (te = m.frames[
|
|
5341
|
+
for (var P = 0; P < m.frames.length; P++)
|
|
5342
|
+
M && (Z += 38), Z += (te = m.frames[P]).cimg.length + 12, P != 0 && (Z += 4);
|
|
5343
5343
|
Z += 12;
|
|
5344
5344
|
const S = new Uint8Array(Z), X = [137, 80, 78, 71, 13, 10, 26, 10];
|
|
5345
5345
|
for (q = 0; q < 8; q++) S[q] = X[q];
|
|
@@ -5348,23 +5348,23 @@ const Xe = function() {
|
|
|
5348
5348
|
A(S, p, Y), p += 4, w(S, p, "iCCP"), p += 4, w(S, p, "ICC profile"), p += 11, p += 2, S.set(x, p), p += x.length, A(S, p, U(S, p - (Y + 4), Y + 4)), p += 4;
|
|
5349
5349
|
}
|
|
5350
5350
|
if (N.pHYs != null && (A(S, p, 9), p += 4, w(S, p, "pHYs"), p += 4, A(S, p, N.pHYs[0]), p += 4, A(S, p, N.pHYs[1]), p += 4, S[p] = N.pHYs[2], p++, A(S, p, U(S, p - 13, 13)), p += 4), M && (A(S, p, 8), p += 4, w(S, p, "acTL"), p += 4, A(S, p, m.frames.length), p += 4, A(S, p, N.loop != null ? N.loop : 0), p += 4, A(S, p, U(S, p - 12, 12)), p += 4), m.ctype == 3) {
|
|
5351
|
-
for (A(S, p, 3 * (
|
|
5351
|
+
for (A(S, p, 3 * ($ = m.plte.length)), p += 4, w(S, p, "PLTE"), p += 4, q = 0; q < $; q++) {
|
|
5352
5352
|
const Y = 3 * q, re = m.plte[q], fe = 255 & re, be = re >>> 8 & 255, ft = re >>> 16 & 255;
|
|
5353
5353
|
S[p + Y + 0] = fe, S[p + Y + 1] = be, S[p + Y + 2] = ft;
|
|
5354
5354
|
}
|
|
5355
|
-
if (p += 3 *
|
|
5356
|
-
for (A(S, p,
|
|
5357
|
-
p +=
|
|
5355
|
+
if (p += 3 * $, A(S, p, U(S, p - 3 * $ - 4, 3 * $ + 4)), p += 4, V) {
|
|
5356
|
+
for (A(S, p, $), p += 4, w(S, p, "tRNS"), p += 4, q = 0; q < $; q++) S[p + q] = m.plte[q] >>> 24 & 255;
|
|
5357
|
+
p += $, A(S, p, U(S, p - $ - 4, $ + 4)), p += 4;
|
|
5358
5358
|
}
|
|
5359
5359
|
}
|
|
5360
5360
|
let oe = 0;
|
|
5361
|
-
for (
|
|
5362
|
-
var te = m.frames[
|
|
5363
|
-
M && (A(S, p, 26), p += 4, w(S, p, "fcTL"), p += 4, A(S, p, oe++), p += 4, A(S, p, te.rect.width), p += 4, A(S, p, te.rect.height), p += 4, A(S, p, te.rect.x), p += 4, A(S, p, te.rect.y), p += 4, _(S, p, T[
|
|
5361
|
+
for (P = 0; P < m.frames.length; P++) {
|
|
5362
|
+
var te = m.frames[P];
|
|
5363
|
+
M && (A(S, p, 26), p += 4, w(S, p, "fcTL"), p += 4, A(S, p, oe++), p += 4, A(S, p, te.rect.width), p += 4, A(S, p, te.rect.height), p += 4, A(S, p, te.rect.x), p += 4, A(S, p, te.rect.y), p += 4, _(S, p, T[P]), p += 2, _(S, p, 1e3), p += 2, S[p] = te.dispose, p++, S[p] = te.blend, p++, A(S, p, U(S, p - 30, 30)), p += 4);
|
|
5364
5364
|
const Y = te.cimg;
|
|
5365
|
-
A(S, p, (
|
|
5365
|
+
A(S, p, ($ = Y.length) + (P == 0 ? 0 : 4)), p += 4;
|
|
5366
5366
|
const re = p;
|
|
5367
|
-
w(S, p,
|
|
5367
|
+
w(S, p, P == 0 ? "IDAT" : "fdAT"), p += 4, P != 0 && (A(S, p, oe++), p += 4), S.set(Y, p), p += $, A(S, p, U(S, re, p - re)), p += 4;
|
|
5368
5368
|
}
|
|
5369
5369
|
return A(S, p, 0), p += 4, w(S, p, "IEND"), p += 4, A(S, p, U(S, p - 4, 4)), p += 4, S.buffer;
|
|
5370
5370
|
}
|
|
@@ -5379,37 +5379,37 @@ const Xe = function() {
|
|
|
5379
5379
|
function l(m, g, k, T, N) {
|
|
5380
5380
|
const U = N[0], A = N[1], _ = N[2], w = N[3], p = N[4], M = N[5];
|
|
5381
5381
|
let x = 6, V = 8, Z = 255;
|
|
5382
|
-
for (var
|
|
5383
|
-
const Ne = new Uint8Array(m[
|
|
5384
|
-
for (var q = Ne.length,
|
|
5382
|
+
for (var $ = 0; $ < m.length; $++) {
|
|
5383
|
+
const Ne = new Uint8Array(m[$]);
|
|
5384
|
+
for (var q = Ne.length, P = 0; P < q; P += 4) Z &= Ne[P + 3];
|
|
5385
5385
|
}
|
|
5386
5386
|
const S = Z != 255, X = function(ae, ne, me, Ie, ge, Te) {
|
|
5387
5387
|
const pe = [];
|
|
5388
5388
|
for (var ee = 0; ee < ae.length; ee++) {
|
|
5389
5389
|
const Le = new Uint8Array(ae[ee]), Ve = new Uint32Array(Le.buffer);
|
|
5390
5390
|
var Re;
|
|
5391
|
-
let xe = 0, _e = 0,
|
|
5391
|
+
let xe = 0, _e = 0, ze = ne, st = me, Vt = Ie ? 1 : 0;
|
|
5392
5392
|
if (ee != 0) {
|
|
5393
|
-
const
|
|
5394
|
-
let
|
|
5395
|
-
for (let je = 0; je <
|
|
5393
|
+
const hn = Te || Ie || ee == 1 || pe[ee - 2].dispose != 0 ? 1 : 2;
|
|
5394
|
+
let Ht = 0, ce = 1e9;
|
|
5395
|
+
for (let je = 0; je < hn; je++) {
|
|
5396
5396
|
var Ue = new Uint8Array(ae[ee - 1 - je]);
|
|
5397
5397
|
const ot = new Uint32Array(ae[ee - 1 - je]);
|
|
5398
|
-
let Et = ne, vt = me,
|
|
5398
|
+
let Et = ne, vt = me, Pt = -1, Yt = -1;
|
|
5399
5399
|
for (let Ut = 0; Ut < me; Ut++) for (let xt = 0; xt < ne; xt++)
|
|
5400
|
-
Ve[Ae = Ut * ne + xt] != ot[Ae] && (xt < Et && (Et = xt), xt >
|
|
5401
|
-
|
|
5402
|
-
const er = (
|
|
5403
|
-
er < ce && (ce = er,
|
|
5400
|
+
Ve[Ae = Ut * ne + xt] != ot[Ae] && (xt < Et && (Et = xt), xt > Pt && (Pt = xt), Ut < vt && (vt = Ut), Ut > Yt && (Yt = Ut));
|
|
5401
|
+
Pt == -1 && (Et = vt = Pt = Yt = 0), ge && ((1 & Et) == 1 && Et--, (1 & vt) == 1 && vt--);
|
|
5402
|
+
const er = (Pt - Et + 1) * (Yt - vt + 1);
|
|
5403
|
+
er < ce && (ce = er, Ht = je, xe = Et, _e = vt, ze = Pt - Et + 1, st = Yt - vt + 1);
|
|
5404
5404
|
}
|
|
5405
|
-
Ue = new Uint8Array(ae[ee - 1 -
|
|
5405
|
+
Ue = new Uint8Array(ae[ee - 1 - Ht]), Ht == 1 && (pe[ee - 1].dispose = 2), Re = new Uint8Array(ze * st * 4), s(Ue, ne, me, Re, ze, st, -xe, -_e, 0), Vt = s(Le, ne, me, Re, ze, st, -xe, -_e, 3) ? 1 : 0, Vt == 1 ? d(Le, ne, me, Re, { x: xe, y: _e, width: ze, height: st }) : s(Le, ne, me, Re, ze, st, -xe, -_e, 0);
|
|
5406
5406
|
} else Re = Le.slice(0);
|
|
5407
|
-
pe.push({ rect: { x: xe, y: _e, width:
|
|
5407
|
+
pe.push({ rect: { x: xe, y: _e, width: ze, height: st }, img: Re, blend: Vt, dispose: 0 });
|
|
5408
5408
|
}
|
|
5409
5409
|
if (Ie) for (ee = 0; ee < pe.length; ee++) {
|
|
5410
5410
|
if ((it = pe[ee]).blend == 1) continue;
|
|
5411
|
-
const Le = it.rect, Ve = pe[ee - 1].rect, xe = Math.min(Le.x, Ve.x), _e = Math.min(Le.y, Ve.y),
|
|
5412
|
-
pe[ee - 1].dispose = 1, ee - 1 != 0 && u(ae, ne, me, pe, ee - 1,
|
|
5411
|
+
const Le = it.rect, Ve = pe[ee - 1].rect, xe = Math.min(Le.x, Ve.x), _e = Math.min(Le.y, Ve.y), ze = { x: xe, y: _e, width: Math.max(Le.x + Le.width, Ve.x + Ve.width) - xe, height: Math.max(Le.y + Le.height, Ve.y + Ve.height) - _e };
|
|
5412
|
+
pe[ee - 1].dispose = 1, ee - 1 != 0 && u(ae, ne, me, pe, ee - 1, ze, ge), u(ae, ne, me, pe, ee, ze, ge);
|
|
5413
5413
|
}
|
|
5414
5414
|
let rt = 0;
|
|
5415
5415
|
if (ae.length != 1) for (var Ae = 0; Ae < pe.length; Ae++) {
|
|
@@ -5420,7 +5420,7 @@ const Xe = function() {
|
|
|
5420
5420
|
}(m, g, k, U, A, _), oe = {}, te = [], Y = [];
|
|
5421
5421
|
if (T != 0) {
|
|
5422
5422
|
const Ne = [];
|
|
5423
|
-
for (
|
|
5423
|
+
for (P = 0; P < X.length; P++) Ne.push(X[P].img.buffer);
|
|
5424
5424
|
const ae = function(ge) {
|
|
5425
5425
|
let Te = 0;
|
|
5426
5426
|
for (var pe = 0; pe < ge.length; pe++) Te += ge[pe].byteLength;
|
|
@@ -5437,33 +5437,33 @@ const Xe = function() {
|
|
|
5437
5437
|
}
|
|
5438
5438
|
return ee.buffer;
|
|
5439
5439
|
}(Ne), ne = F(ae, T);
|
|
5440
|
-
for (
|
|
5440
|
+
for (P = 0; P < ne.plte.length; P++) te.push(ne.plte[P].est.rgba);
|
|
5441
5441
|
let me = 0;
|
|
5442
|
-
for (
|
|
5443
|
-
const Ie = (fe = X[
|
|
5442
|
+
for (P = 0; P < X.length; P++) {
|
|
5443
|
+
const Ie = (fe = X[P]).img.length;
|
|
5444
5444
|
var re = new Uint8Array(ne.inds.buffer, me >> 2, Ie >> 2);
|
|
5445
5445
|
Y.push(re);
|
|
5446
5446
|
const ge = new Uint8Array(ne.abuf, me, Ie);
|
|
5447
5447
|
M && a(fe.img, fe.rect.width, fe.rect.height, te, ge, re), fe.img.set(ge), me += Ie;
|
|
5448
5448
|
}
|
|
5449
|
-
} else for (
|
|
5450
|
-
var fe = X[
|
|
5449
|
+
} else for ($ = 0; $ < X.length; $++) {
|
|
5450
|
+
var fe = X[$];
|
|
5451
5451
|
const Ne = new Uint32Array(fe.img.buffer);
|
|
5452
5452
|
var be = fe.rect.width;
|
|
5453
|
-
for (q = Ne.length, re = new Uint8Array(q), Y.push(re),
|
|
5454
|
-
const ae = Ne[
|
|
5455
|
-
if (
|
|
5456
|
-
else if (
|
|
5453
|
+
for (q = Ne.length, re = new Uint8Array(q), Y.push(re), P = 0; P < q; P++) {
|
|
5454
|
+
const ae = Ne[P];
|
|
5455
|
+
if (P != 0 && ae == Ne[P - 1]) re[P] = re[P - 1];
|
|
5456
|
+
else if (P > be && ae == Ne[P - be]) re[P] = re[P - be];
|
|
5457
5457
|
else {
|
|
5458
5458
|
let ne = oe[ae];
|
|
5459
5459
|
if (ne == null && (oe[ae] = ne = te.length, te.push(ae), te.length >= 300)) break;
|
|
5460
|
-
re[
|
|
5460
|
+
re[P] = ne;
|
|
5461
5461
|
}
|
|
5462
5462
|
}
|
|
5463
5463
|
}
|
|
5464
5464
|
const ft = te.length;
|
|
5465
|
-
for (ft <= 256 && p == 0 && (V = ft <= 2 ? 1 : ft <= 4 ? 2 : ft <= 16 ? 4 : 8, V = Math.max(V, w)),
|
|
5466
|
-
(fe = X[
|
|
5465
|
+
for (ft <= 256 && p == 0 && (V = ft <= 2 ? 1 : ft <= 4 ? 2 : ft <= 16 ? 4 : 8, V = Math.max(V, w)), $ = 0; $ < X.length; $++) {
|
|
5466
|
+
(fe = X[$]).rect.x, fe.rect.y, be = fe.rect.width;
|
|
5467
5467
|
const Ne = fe.rect.height;
|
|
5468
5468
|
let ae = fe.img;
|
|
5469
5469
|
new Uint32Array(ae.buffer);
|
|
@@ -5471,21 +5471,21 @@ const Xe = function() {
|
|
|
5471
5471
|
if (ft <= 256 && p == 0) {
|
|
5472
5472
|
ne = Math.ceil(V * be / 8);
|
|
5473
5473
|
var We = new Uint8Array(ne * Ne);
|
|
5474
|
-
const Ie = Y[
|
|
5474
|
+
const Ie = Y[$];
|
|
5475
5475
|
for (let ge = 0; ge < Ne; ge++) {
|
|
5476
|
-
|
|
5476
|
+
P = ge * ne;
|
|
5477
5477
|
const Te = ge * be;
|
|
5478
|
-
if (V == 8) for (var de = 0; de < be; de++) We[
|
|
5479
|
-
else if (V == 4) for (de = 0; de < be; de++) We[
|
|
5480
|
-
else if (V == 2) for (de = 0; de < be; de++) We[
|
|
5481
|
-
else if (V == 1) for (de = 0; de < be; de++) We[
|
|
5478
|
+
if (V == 8) for (var de = 0; de < be; de++) We[P + de] = Ie[Te + de];
|
|
5479
|
+
else if (V == 4) for (de = 0; de < be; de++) We[P + (de >> 1)] |= Ie[Te + de] << 4 - 4 * (1 & de);
|
|
5480
|
+
else if (V == 2) for (de = 0; de < be; de++) We[P + (de >> 2)] |= Ie[Te + de] << 6 - 2 * (3 & de);
|
|
5481
|
+
else if (V == 1) for (de = 0; de < be; de++) We[P + (de >> 3)] |= Ie[Te + de] << 7 - 1 * (7 & de);
|
|
5482
5482
|
}
|
|
5483
5483
|
ae = We, x = 3, me = 1;
|
|
5484
5484
|
} else if (S == 0 && X.length == 1) {
|
|
5485
5485
|
We = new Uint8Array(be * Ne * 3);
|
|
5486
5486
|
const Ie = be * Ne;
|
|
5487
|
-
for (
|
|
5488
|
-
const ge = 3 *
|
|
5487
|
+
for (P = 0; P < Ie; P++) {
|
|
5488
|
+
const ge = 3 * P, Te = 4 * P;
|
|
5489
5489
|
We[ge] = ae[Te], We[ge + 1] = ae[Te + 1], We[ge + 2] = ae[Te + 2];
|
|
5490
5490
|
}
|
|
5491
5491
|
ae = We, x = 2, me = 3, ne = 3 * be;
|
|
@@ -5496,12 +5496,12 @@ const Xe = function() {
|
|
|
5496
5496
|
}
|
|
5497
5497
|
function u(m, g, k, T, N, U, A) {
|
|
5498
5498
|
const _ = Uint8Array, w = Uint32Array, p = new _(m[N - 1]), M = new w(m[N - 1]), x = N + 1 < m.length ? new _(m[N + 1]) : null, V = new _(m[N]), Z = new w(V.buffer);
|
|
5499
|
-
let
|
|
5499
|
+
let $ = g, q = k, P = -1, S = -1;
|
|
5500
5500
|
for (let oe = 0; oe < U.height; oe++) for (let te = 0; te < U.width; te++) {
|
|
5501
5501
|
const Y = U.x + te, re = U.y + oe, fe = re * g + Y, be = Z[fe];
|
|
5502
|
-
be == 0 || T[N - 1].dispose == 0 && M[fe] == be && (x == null || x[4 * fe + 3] != 0) || (Y <
|
|
5502
|
+
be == 0 || T[N - 1].dispose == 0 && M[fe] == be && (x == null || x[4 * fe + 3] != 0) || (Y < $ && ($ = Y), Y > P && (P = Y), re < q && (q = re), re > S && (S = re));
|
|
5503
5503
|
}
|
|
5504
|
-
|
|
5504
|
+
P == -1 && ($ = q = P = S = 0), A && ((1 & $) == 1 && $--, (1 & q) == 1 && q--), U = { x: $, y: q, width: P - $ + 1, height: S - q + 1 };
|
|
5505
5505
|
const X = T[N];
|
|
5506
5506
|
X.rect = U, X.blend = 1, X.img = new Uint8Array(U.width * U.height * 4), T[N - 1].dispose == 0 ? (s(p, g, k, X.img, U.width, U.height, -U.x, -U.y, 0), d(V, g, k, X.img, U)) : s(V, g, k, X.img, U.width, U.height, -U.x, -U.y, 0);
|
|
5507
5507
|
}
|
|
@@ -5512,9 +5512,9 @@ const Xe = function() {
|
|
|
5512
5512
|
const _ = [];
|
|
5513
5513
|
let w, p = [0, 1, 2, 3, 4];
|
|
5514
5514
|
U != -1 ? p = [U] : (g * T > 5e5 || k == 1) && (p = [0]), A && (w = { level: 0 });
|
|
5515
|
-
const M =
|
|
5515
|
+
const M = Ps;
|
|
5516
5516
|
for (var x = 0; x < p.length; x++) {
|
|
5517
|
-
for (let
|
|
5517
|
+
for (let $ = 0; $ < g; $++) y(N, m, $, T, k, p[x]);
|
|
5518
5518
|
_.push(M.deflate(N, w));
|
|
5519
5519
|
}
|
|
5520
5520
|
let V, Z = 1e9;
|
|
@@ -5550,10 +5550,10 @@ const Xe = function() {
|
|
|
5550
5550
|
const k = new Uint8Array(m), T = k.slice(0), N = new Uint32Array(T.buffer), U = I(T, g), A = U[0], _ = U[1], w = k.length, p = new Uint8Array(w >> 2);
|
|
5551
5551
|
let M;
|
|
5552
5552
|
if (k.length < 2e7) for (var x = 0; x < w; x += 4)
|
|
5553
|
-
M =
|
|
5553
|
+
M = E(A, V = k[x] * (1 / 255), Z = k[x + 1] * (1 / 255), $ = k[x + 2] * (1 / 255), q = k[x + 3] * (1 / 255)), p[x >> 2] = M.ind, N[x >> 2] = M.est.rgba;
|
|
5554
5554
|
else for (x = 0; x < w; x += 4) {
|
|
5555
|
-
var V = k[x] * 0.00392156862745098, Z = k[x + 1] * (1 / 255),
|
|
5556
|
-
for (M = A; M.left; ) M = R(M.est, V, Z,
|
|
5555
|
+
var V = k[x] * 0.00392156862745098, Z = k[x + 1] * (1 / 255), $ = k[x + 2] * (1 / 255), q = k[x + 3] * (1 / 255);
|
|
5556
|
+
for (M = A; M.left; ) M = R(M.est, V, Z, $, q) <= 0 ? M.left : M.right;
|
|
5557
5557
|
p[x >> 2] = M.ind, N[x >> 2] = M.est.rgba;
|
|
5558
5558
|
}
|
|
5559
5559
|
return { abuf: T.buffer, inds: p, plte: _ };
|
|
@@ -5582,17 +5582,17 @@ const Xe = function() {
|
|
|
5582
5582
|
for (U.sort((_, w) => w.bst.N - _.bst.N), A = 0; A < U.length; A++) U[A].ind = A;
|
|
5583
5583
|
return [N, U];
|
|
5584
5584
|
}
|
|
5585
|
-
function
|
|
5586
|
-
if (m.left == null) return m.tdst = function(x, V, Z,
|
|
5587
|
-
const
|
|
5588
|
-
return
|
|
5585
|
+
function E(m, g, k, T, N) {
|
|
5586
|
+
if (m.left == null) return m.tdst = function(x, V, Z, $, q) {
|
|
5587
|
+
const P = V - x[0], S = Z - x[1], X = $ - x[2], oe = q - x[3];
|
|
5588
|
+
return P * P + S * S + X * X + oe * oe;
|
|
5589
5589
|
}(m.est.q, g, k, T, N), m;
|
|
5590
5590
|
const U = R(m.est, g, k, T, N);
|
|
5591
5591
|
let A = m.left, _ = m.right;
|
|
5592
5592
|
U > 0 && (A = m.right, _ = m.left);
|
|
5593
|
-
const w =
|
|
5593
|
+
const w = E(A, g, k, T, N);
|
|
5594
5594
|
if (w.tdst <= U * U) return w;
|
|
5595
|
-
const p =
|
|
5595
|
+
const p = E(_, g, k, T, N);
|
|
5596
5596
|
return p.tdst < w.tdst ? p : w;
|
|
5597
5597
|
}
|
|
5598
5598
|
function R(m, g, k, T, N) {
|
|
@@ -5623,25 +5623,25 @@ const Xe = function() {
|
|
|
5623
5623
|
}
|
|
5624
5624
|
function b(m) {
|
|
5625
5625
|
const { R: g } = m, { m: k } = m, { N: T } = m, N = k[0], U = k[1], A = k[2], _ = k[3], w = T == 0 ? 0 : 1 / T, p = [g[0] - N * N * w, g[1] - N * U * w, g[2] - N * A * w, g[3] - N * _ * w, g[4] - U * N * w, g[5] - U * U * w, g[6] - U * A * w, g[7] - U * _ * w, g[8] - A * N * w, g[9] - A * U * w, g[10] - A * A * w, g[11] - A * _ * w, g[12] - _ * N * w, g[13] - _ * U * w, g[14] - _ * A * w, g[15] - _ * _ * w], M = p, x = B;
|
|
5626
|
-
let V = [Math.random(), Math.random(), Math.random(), Math.random()], Z = 0,
|
|
5627
|
-
if (T != 0) for (let
|
|
5626
|
+
let V = [Math.random(), Math.random(), Math.random(), Math.random()], Z = 0, $ = 0;
|
|
5627
|
+
if (T != 0) for (let P = 0; P < 16 && (V = x.multVec(M, V), $ = Math.sqrt(x.dot(V, V)), V = x.sml(1 / $, V), !(P != 0 && Math.abs($ - Z) < 1e-9)); P++) Z = $;
|
|
5628
5628
|
const q = [N * w, U * w, A * w, _ * w];
|
|
5629
5629
|
return { Cov: p, q, e: V, L: Z, eMq255: x.dot(x.sml(255, q), V), eMq: x.dot(V, q), rgba: (Math.round(255 * q[3]) << 24 | Math.round(255 * q[2]) << 16 | Math.round(255 * q[1]) << 8 | Math.round(255 * q[0]) << 0) >>> 0 };
|
|
5630
5630
|
}
|
|
5631
5631
|
var B = { multVec: (m, g) => [m[0] * g[0] + m[1] * g[1] + m[2] * g[2] + m[3] * g[3], m[4] * g[0] + m[5] * g[1] + m[6] * g[2] + m[7] * g[3], m[8] * g[0] + m[9] * g[1] + m[10] * g[2] + m[11] * g[3], m[12] * g[0] + m[13] * g[1] + m[14] * g[2] + m[15] * g[3]], dot: (m, g) => m[0] * g[0] + m[1] * g[1] + m[2] * g[2] + m[3] * g[3], sml: (m, g) => [m * g[0], m * g[1], m * g[2], m * g[3]] };
|
|
5632
|
-
|
|
5632
|
+
Ge.encode = function(g, k, T, N, U, A, _) {
|
|
5633
5633
|
N == null && (N = 0), _ == null && (_ = !1);
|
|
5634
5634
|
const w = l(g, k, T, N, [!1, !1, !1, 0, _, !1]);
|
|
5635
5635
|
return h(w, -1), c(w, k, T, U, A);
|
|
5636
|
-
},
|
|
5636
|
+
}, Ge.encodeLL = function(g, k, T, N, U, A, _, w) {
|
|
5637
5637
|
const p = { ctype: 0 + (N == 1 ? 0 : 2) + (U == 0 ? 0 : 4), depth: A, frames: [] }, M = (N + U) * A, x = M * k;
|
|
5638
5638
|
for (let V = 0; V < g.length; V++) p.frames.push({ rect: { x: 0, y: 0, width: k, height: T }, img: new Uint8Array(g[V]), blend: 0, dispose: 1, bpp: Math.ceil(M / 8), bpl: Math.ceil(x / 8) });
|
|
5639
5639
|
return h(p, 0, !0), c(p, k, T, _, w);
|
|
5640
|
-
},
|
|
5640
|
+
}, Ge.encode.compress = l, Ge.encode.dither = a, Ge.quantize = F, Ge.quantize.getKDtree = I, Ge.quantize.getNearest = E;
|
|
5641
5641
|
})();
|
|
5642
5642
|
const Zr = { toArrayBuffer(s, e) {
|
|
5643
5643
|
const t = s.width, n = s.height, r = t << 2, i = s.getContext("2d").getImageData(0, 0, t, n), o = new Uint32Array(i.data.buffer), a = (32 * t + 31) / 32 << 2, c = a * n, h = 122 + c, l = new ArrayBuffer(h), u = new DataView(l), d = 1 << 20;
|
|
5644
|
-
let f, y, F, I,
|
|
5644
|
+
let f, y, F, I, E = d, R = 0, O = 0, v = 0;
|
|
5645
5645
|
function L(m) {
|
|
5646
5646
|
u.setUint16(O, m, !0), O += 2;
|
|
5647
5647
|
}
|
|
@@ -5652,19 +5652,19 @@ const Zr = { toArrayBuffer(s, e) {
|
|
|
5652
5652
|
O += m;
|
|
5653
5653
|
}
|
|
5654
5654
|
L(19778), b(h), B(4), b(122), b(108), b(t), b(-n >>> 0), L(1), L(32), b(3), b(c), b(2835), b(2835), B(8), b(16711680), b(65280), b(255), b(4278190080), b(1466527264), function m() {
|
|
5655
|
-
for (; R < n &&
|
|
5656
|
-
for (I = 122 + R * a, f = 0; f < r; )
|
|
5655
|
+
for (; R < n && E > 0; ) {
|
|
5656
|
+
for (I = 122 + R * a, f = 0; f < r; ) E--, y = o[v++], F = y >>> 24, u.setUint32(I + f, y << 8 | F), f += 4;
|
|
5657
5657
|
R++;
|
|
5658
5658
|
}
|
|
5659
|
-
v < o.length ? (
|
|
5659
|
+
v < o.length ? (E = d, setTimeout(m, Zr._dly)) : e(l);
|
|
5660
5660
|
}();
|
|
5661
5661
|
}, toBlob(s, e) {
|
|
5662
5662
|
this.toArrayBuffer(s, (t) => {
|
|
5663
5663
|
e(new Blob([t], { type: "image/bmp" }));
|
|
5664
5664
|
});
|
|
5665
5665
|
}, _dly: 9 };
|
|
5666
|
-
var
|
|
5667
|
-
const Qn = typeof window < "u", Kr = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope,
|
|
5666
|
+
var Pe = { CHROME: "CHROME", FIREFOX: "FIREFOX", DESKTOP_SAFARI: "DESKTOP_SAFARI", IE: "IE", IOS: "IOS", ETC: "ETC" }, $s = { [Pe.CHROME]: 16384, [Pe.FIREFOX]: 11180, [Pe.DESKTOP_SAFARI]: 16384, [Pe.IE]: 8192, [Pe.IOS]: 4096, [Pe.ETC]: 8192 };
|
|
5667
|
+
const Qn = typeof window < "u", Kr = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, kn = Qn && window.cordova && window.cordova.require && window.cordova.require("cordova/modulemapper"), Ws = (Qn || Kr) && (kn && kn.getOriginalSymbol(window, "File") || typeof File < "u" && File), zr = (Qn || Kr) && (kn && kn.getOriginalSymbol(window, "FileReader") || typeof FileReader < "u" && FileReader);
|
|
5668
5668
|
function Yn(s, e, t = Date.now()) {
|
|
5669
5669
|
return new Promise((n) => {
|
|
5670
5670
|
const r = s.split(","), i = r[0].match(/:(.*?);/)[1], o = globalThis.atob(r[1]);
|
|
@@ -5689,12 +5689,12 @@ function Gr(s) {
|
|
|
5689
5689
|
}
|
|
5690
5690
|
function _t() {
|
|
5691
5691
|
if (_t.cachedResult !== void 0) return _t.cachedResult;
|
|
5692
|
-
let s =
|
|
5692
|
+
let s = Pe.ETC;
|
|
5693
5693
|
const { userAgent: e } = navigator;
|
|
5694
|
-
return /Chrom(e|ium)/i.test(e) ? s =
|
|
5694
|
+
return /Chrom(e|ium)/i.test(e) ? s = Pe.CHROME : /iP(ad|od|hone)/i.test(e) && /WebKit/i.test(e) ? s = Pe.IOS : /Safari/i.test(e) ? s = Pe.DESKTOP_SAFARI : /Firefox/i.test(e) ? s = Pe.FIREFOX : (/MSIE/i.test(e) || document.documentMode) && (s = Pe.IE), _t.cachedResult = s, _t.cachedResult;
|
|
5695
5695
|
}
|
|
5696
5696
|
function Jr(s, e) {
|
|
5697
|
-
const t = _t(), n =
|
|
5697
|
+
const t = _t(), n = $s[t];
|
|
5698
5698
|
let r = s, i = e, o = r * i;
|
|
5699
5699
|
const a = r > i ? i / r : r / i;
|
|
5700
5700
|
for (; o > n * n; ) {
|
|
@@ -5703,7 +5703,7 @@ function Jr(s, e) {
|
|
|
5703
5703
|
}
|
|
5704
5704
|
return { width: r, height: i };
|
|
5705
5705
|
}
|
|
5706
|
-
function
|
|
5706
|
+
function _n(s, e) {
|
|
5707
5707
|
let t, n;
|
|
5708
5708
|
try {
|
|
5709
5709
|
if (t = new OffscreenCanvas(s, e), n = t.getContext("2d"), n === null) throw new Error("getContext of OffscreenCanvas returns null");
|
|
@@ -5713,13 +5713,13 @@ function xn(s, e) {
|
|
|
5713
5713
|
return t.width = s, t.height = e, [t, n];
|
|
5714
5714
|
}
|
|
5715
5715
|
function Qr(s, e) {
|
|
5716
|
-
const { width: t, height: n } = Jr(s.width, s.height), [r, i] =
|
|
5716
|
+
const { width: t, height: n } = Jr(s.width, s.height), [r, i] = _n(t, n);
|
|
5717
5717
|
return e && /jpe?g/.test(e) && (i.fillStyle = "white", i.fillRect(0, 0, r.width, r.height)), i.drawImage(s, 0, 0, r.width, r.height), r;
|
|
5718
5718
|
}
|
|
5719
|
-
function
|
|
5720
|
-
return
|
|
5719
|
+
function bn() {
|
|
5720
|
+
return bn.cachedResult !== void 0 || (bn.cachedResult = ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && typeof document < "u" && "ontouchend" in document), bn.cachedResult;
|
|
5721
5721
|
}
|
|
5722
|
-
function
|
|
5722
|
+
function Fn(s, e = {}) {
|
|
5723
5723
|
return new Promise(function(t, n) {
|
|
5724
5724
|
let r, i;
|
|
5725
5725
|
var o = function() {
|
|
@@ -5766,7 +5766,7 @@ function kn(s, e = {}) {
|
|
|
5766
5766
|
}
|
|
5767
5767
|
};
|
|
5768
5768
|
try {
|
|
5769
|
-
if (
|
|
5769
|
+
if (bn() || [Pe.DESKTOP_SAFARI, Pe.MOBILE_SAFARI].includes(_t())) throw new Error("Skip createImageBitmap on IOS and Safari");
|
|
5770
5770
|
return createImageBitmap(s).then(function(c) {
|
|
5771
5771
|
try {
|
|
5772
5772
|
return r = c, o();
|
|
@@ -5779,12 +5779,12 @@ function kn(s, e = {}) {
|
|
|
5779
5779
|
}
|
|
5780
5780
|
});
|
|
5781
5781
|
}
|
|
5782
|
-
function
|
|
5782
|
+
function Nn(s, e, t, n, r = 1) {
|
|
5783
5783
|
return new Promise(function(i, o) {
|
|
5784
5784
|
let a;
|
|
5785
5785
|
if (e === "image/png") {
|
|
5786
5786
|
let h, l, u;
|
|
5787
|
-
return h = s.getContext("2d"), { data: l } = h.getImageData(0, 0, s.width, s.height), u =
|
|
5787
|
+
return h = s.getContext("2d"), { data: l } = h.getImageData(0, 0, s.width, s.height), u = Ge.encode([l.buffer], s.width, s.height, 4096 * r), a = new Blob([u], { type: e }), a.name = t, a.lastModified = n, c.call(this);
|
|
5788
5788
|
}
|
|
5789
5789
|
{
|
|
5790
5790
|
let h = function() {
|
|
@@ -5833,11 +5833,11 @@ function $t() {
|
|
|
5833
5833
|
let t, n, r, i;
|
|
5834
5834
|
return $t.cachedResult !== void 0 ? s($t.cachedResult) : Yn("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==", "test.jpg", Date.now()).then(function(o) {
|
|
5835
5835
|
try {
|
|
5836
|
-
return t = o,
|
|
5836
|
+
return t = o, Fn(t).then(function(a) {
|
|
5837
5837
|
try {
|
|
5838
|
-
return n = a[1],
|
|
5838
|
+
return n = a[1], Nn(n, t.type, t.name, t.lastModified).then(function(c) {
|
|
5839
5839
|
try {
|
|
5840
|
-
return r = c, ht(n),
|
|
5840
|
+
return r = c, ht(n), Fn(r).then(function(h) {
|
|
5841
5841
|
try {
|
|
5842
5842
|
return i = h[0], $t.cachedResult = i.width === 1 && i.height === 2, s($t.cachedResult);
|
|
5843
5843
|
} catch (l) {
|
|
@@ -5888,10 +5888,10 @@ function Yr(s) {
|
|
|
5888
5888
|
function ei(s, e) {
|
|
5889
5889
|
const { width: t } = s, { height: n } = s, { maxWidthOrHeight: r } = e;
|
|
5890
5890
|
let i, o = s;
|
|
5891
|
-
return isFinite(r) && (t > r || n > r) && ([o, i] =
|
|
5891
|
+
return isFinite(r) && (t > r || n > r) && ([o, i] = _n(t, n), t > n ? (o.width = r, o.height = n / t * r) : (o.width = t / n * r, o.height = r), i.drawImage(s, 0, 0, o.width, o.height), ht(s)), o;
|
|
5892
5892
|
}
|
|
5893
5893
|
function ti(s, e) {
|
|
5894
|
-
const { width: t } = s, { height: n } = s, [r, i] =
|
|
5894
|
+
const { width: t } = s, { height: n } = s, [r, i] = _n(t, n);
|
|
5895
5895
|
switch (e > 4 && e < 9 ? (r.width = n, r.height = t) : (r.width = t, r.height = n), e) {
|
|
5896
5896
|
case 2:
|
|
5897
5897
|
i.transform(-1, 0, 0, 1, t, 0);
|
|
@@ -5918,7 +5918,7 @@ function ti(s, e) {
|
|
|
5918
5918
|
}
|
|
5919
5919
|
function Ar(s, e, t = 0) {
|
|
5920
5920
|
return new Promise(function(n, r) {
|
|
5921
|
-
let i, o, a, c, h, l, u, d, f, y, F, I,
|
|
5921
|
+
let i, o, a, c, h, l, u, d, f, y, F, I, E, R, O, v, L, b, B, m;
|
|
5922
5922
|
function g(T = 5) {
|
|
5923
5923
|
if (e.signal && e.signal.aborted) throw e.signal.reason;
|
|
5924
5924
|
i += T, e.onProgress(Math.min(i, 100));
|
|
@@ -5927,7 +5927,7 @@ function Ar(s, e, t = 0) {
|
|
|
5927
5927
|
if (e.signal && e.signal.aborted) throw e.signal.reason;
|
|
5928
5928
|
i = Math.min(Math.max(T, i), 100), e.onProgress(i);
|
|
5929
5929
|
}
|
|
5930
|
-
return i = t, o = e.maxIteration || 10, a = 1024 * e.maxSizeMB * 1024, g(),
|
|
5930
|
+
return i = t, o = e.maxIteration || 10, a = 1024 * e.maxSizeMB * 1024, g(), Fn(s, e).then((function(T) {
|
|
5931
5931
|
try {
|
|
5932
5932
|
return [, c] = T, g(), h = ei(c, e), g(), new Promise(function(N, U) {
|
|
5933
5933
|
var A;
|
|
@@ -5946,13 +5946,13 @@ function Ar(s, e, t = 0) {
|
|
|
5946
5946
|
try {
|
|
5947
5947
|
return l = N, g(), $t().then((function(U) {
|
|
5948
5948
|
try {
|
|
5949
|
-
return u = U ? h : ti(h, l), g(), d = e.initialQuality || 1, f = e.fileType || s.type,
|
|
5949
|
+
return u = U ? h : ti(h, l), g(), d = e.initialQuality || 1, f = e.fileType || s.type, Nn(u, f, s.name, s.lastModified, d).then((function(A) {
|
|
5950
5950
|
try {
|
|
5951
5951
|
{
|
|
5952
5952
|
let w = function() {
|
|
5953
|
-
if (o-- && (O > a || O >
|
|
5953
|
+
if (o-- && (O > a || O > E)) {
|
|
5954
5954
|
let M, x;
|
|
5955
|
-
return M = m ? 0.95 * B.width : B.width, x = m ? 0.95 * B.height : B.height, [L, b] =
|
|
5955
|
+
return M = m ? 0.95 * B.width : B.width, x = m ? 0.95 * B.height : B.height, [L, b] = _n(M, x), b.drawImage(B, 0, 0, M, x), d *= f === "image/png" ? 0.85 : 0.95, Nn(L, f, s.name, s.lastModified, d).then(function(V) {
|
|
5956
5956
|
try {
|
|
5957
5957
|
return v = V, ht(B), B = L, O = v.size, k(Math.min(99, Math.floor((R - O) / (R - a) * 100))), w;
|
|
5958
5958
|
} catch (Z) {
|
|
@@ -5966,7 +5966,7 @@ function Ar(s, e, t = 0) {
|
|
|
5966
5966
|
};
|
|
5967
5967
|
if (y = A, g(), F = y.size > a, I = y.size > s.size, !F && !I) return k(100), n(y);
|
|
5968
5968
|
var _;
|
|
5969
|
-
return
|
|
5969
|
+
return E = s.size, R = y.size, O = R, B = u, m = !e.alwaysKeepResolution && F, (_ = (function(M) {
|
|
5970
5970
|
for (; M; ) {
|
|
5971
5971
|
if (M.then) return void M.then(_, r);
|
|
5972
5972
|
try {
|
|
@@ -6018,14 +6018,14 @@ self.addEventListener('message', async (e) => {
|
|
|
6018
6018
|
}
|
|
6019
6019
|
})
|
|
6020
6020
|
`;
|
|
6021
|
-
let
|
|
6021
|
+
let Pn;
|
|
6022
6022
|
function qs(s, e) {
|
|
6023
6023
|
return new Promise((t, n) => {
|
|
6024
|
-
|
|
6024
|
+
Pn || (Pn = function(o) {
|
|
6025
6025
|
const a = [];
|
|
6026
6026
|
return a.push(o), URL.createObjectURL(new Blob(a));
|
|
6027
6027
|
}(js));
|
|
6028
|
-
const r = new Worker(
|
|
6028
|
+
const r = new Worker(Pn);
|
|
6029
6029
|
r.addEventListener("message", function(o) {
|
|
6030
6030
|
if (e.signal && e.signal.aborted) r.terminate();
|
|
6031
6031
|
else if (o.data.progress === void 0) {
|
|
@@ -6094,7 +6094,7 @@ function Be(s, e) {
|
|
|
6094
6094
|
}
|
|
6095
6095
|
});
|
|
6096
6096
|
}
|
|
6097
|
-
Be.getDataUrlFromFile = Xr, Be.getFilefromDataUrl = Yn, Be.loadImage = Gr, Be.drawImageInCanvas = Qr, Be.drawFileInCanvas =
|
|
6097
|
+
Be.getDataUrlFromFile = Xr, Be.getFilefromDataUrl = Yn, Be.loadImage = Gr, Be.drawImageInCanvas = Qr, Be.drawFileInCanvas = Fn, Be.canvasToFile = Nn, Be.getExifOrientation = Yr, Be.handleMaxWidthOrHeight = ei, Be.followExifOrientation = ti, Be.cleanupCanvasMemory = ht, Be.isAutoOrientationInBrowser = $t, Be.approximateBelowMaximumCanvasSizeOfBrowser = Jr, Be.copyExifWithoutOrientation = qr, Be.getBrowserName = _t, Be.version = "2.0.2";
|
|
6098
6098
|
class Zs extends Fe {
|
|
6099
6099
|
constructor() {
|
|
6100
6100
|
super("com.hamropatro.grpc.common.ImageUploadRequest", [
|
|
@@ -6136,7 +6136,7 @@ class Zs extends Fe {
|
|
|
6136
6136
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
6137
6137
|
}
|
|
6138
6138
|
}
|
|
6139
|
-
const
|
|
6139
|
+
const In = new Zs();
|
|
6140
6140
|
class Ks extends Fe {
|
|
6141
6141
|
constructor() {
|
|
6142
6142
|
super("com.hamropatro.grpc.common.ImageUploadResponse", [
|
|
@@ -6201,8 +6201,8 @@ class Ks extends Fe {
|
|
|
6201
6201
|
}
|
|
6202
6202
|
}
|
|
6203
6203
|
const kr = new Ks(), $n = new Gn("com.hamropatro.grpc.common.ImageUploadService", [
|
|
6204
|
-
{ name: "Upload", options: {}, I:
|
|
6205
|
-
{ name: "UploadUserImage", options: {}, I:
|
|
6204
|
+
{ name: "Upload", options: {}, I: In, O: kr },
|
|
6205
|
+
{ name: "UploadUserImage", options: {}, I: In, O: kr }
|
|
6206
6206
|
]);
|
|
6207
6207
|
class ni {
|
|
6208
6208
|
constructor(e) {
|
|
@@ -6228,7 +6228,7 @@ class ni {
|
|
|
6228
6228
|
}
|
|
6229
6229
|
const zs = async (s, e, t = !0) => {
|
|
6230
6230
|
var o;
|
|
6231
|
-
const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new ni(n), i =
|
|
6231
|
+
const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new ni(n), i = In.create();
|
|
6232
6232
|
try {
|
|
6233
6233
|
return i.mimeType = s, t ? await r.upload(i, e) : await r.uploadUserImage(
|
|
6234
6234
|
i,
|
|
@@ -6239,7 +6239,7 @@ const zs = async (s, e, t = !0) => {
|
|
|
6239
6239
|
}
|
|
6240
6240
|
}, Xs = async (s, e) => {
|
|
6241
6241
|
var o, a;
|
|
6242
|
-
const t = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, n = (a = window.ImageSalonSDK) == null ? void 0 : a.mode, r = new ni(t), i =
|
|
6242
|
+
const t = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, n = (a = window.ImageSalonSDK) == null ? void 0 : a.mode, r = new ni(t), i = In.create();
|
|
6243
6243
|
try {
|
|
6244
6244
|
return i.mimeType = s, await r.uploadUserImage(
|
|
6245
6245
|
i,
|
|
@@ -6312,7 +6312,7 @@ function Qs(s = "24px", e = "24px", t = "#000") {
|
|
|
6312
6312
|
"M240-200h120v-240h240v240h120v-360L480-740 240-560v360Zm-80 80v-480l320-240 320 240v480H520v-240h-80v240H160Zm320-350Z"
|
|
6313
6313
|
), n.appendChild(r), n;
|
|
6314
6314
|
}
|
|
6315
|
-
var mt, we, Ee, gt, ue, ke,
|
|
6315
|
+
var mt, we, Ee, gt, ue, ke, Ze, $e, Bt, kt, at, De, Qe, Ot, Ft, Nt, wt, St, lt, Ke, It, Tt, yt, jt, sn, Oe, Rt, on, Tn, an, ct, qt, Lt, Zt, Dt, Kt, zt, Xt, ln, cn, Gt, dt, Jt, dn, Qt;
|
|
6316
6316
|
class eo {
|
|
6317
6317
|
constructor(e) {
|
|
6318
6318
|
z(this, mt);
|
|
@@ -6321,47 +6321,47 @@ class eo {
|
|
|
6321
6321
|
z(this, gt);
|
|
6322
6322
|
z(this, ue, []);
|
|
6323
6323
|
z(this, ke, []);
|
|
6324
|
-
z(this,
|
|
6325
|
-
z(this,
|
|
6324
|
+
z(this, Ze);
|
|
6325
|
+
z(this, $e);
|
|
6326
6326
|
z(this, Bt);
|
|
6327
6327
|
z(this, kt);
|
|
6328
6328
|
z(this, at, []);
|
|
6329
6329
|
z(this, De);
|
|
6330
6330
|
z(this, Qe);
|
|
6331
6331
|
z(this, Ot);
|
|
6332
|
-
z(this, zn);
|
|
6333
6332
|
z(this, Ft);
|
|
6334
6333
|
z(this, Nt);
|
|
6335
6334
|
z(this, wt);
|
|
6336
6335
|
z(this, St);
|
|
6337
6336
|
z(this, lt);
|
|
6338
|
-
z(this,
|
|
6337
|
+
z(this, Ke);
|
|
6339
6338
|
z(this, It);
|
|
6340
6339
|
z(this, Tt);
|
|
6341
6340
|
z(this, yt);
|
|
6342
|
-
z(this,
|
|
6343
|
-
z(this,
|
|
6341
|
+
z(this, jt);
|
|
6342
|
+
z(this, sn);
|
|
6344
6343
|
z(this, Oe);
|
|
6345
6344
|
z(this, Rt);
|
|
6346
|
-
z(this,
|
|
6347
|
-
z(this,
|
|
6348
|
-
z(this,
|
|
6345
|
+
z(this, on, !1);
|
|
6346
|
+
z(this, Tn);
|
|
6347
|
+
z(this, an);
|
|
6349
6348
|
z(this, ct);
|
|
6350
|
-
z(this, jt);
|
|
6351
|
-
z(this, Lt);
|
|
6352
6349
|
z(this, qt);
|
|
6350
|
+
z(this, Lt);
|
|
6353
6351
|
z(this, Zt);
|
|
6352
|
+
z(this, Dt);
|
|
6354
6353
|
z(this, Kt);
|
|
6355
6354
|
z(this, zt);
|
|
6356
6355
|
z(this, Xt);
|
|
6357
|
-
z(this, an);
|
|
6358
6356
|
z(this, ln);
|
|
6357
|
+
z(this, cn);
|
|
6359
6358
|
z(this, Gt);
|
|
6360
6359
|
z(this, dt);
|
|
6361
6360
|
z(this, Jt);
|
|
6362
|
-
z(this,
|
|
6363
|
-
|
|
6364
|
-
|
|
6361
|
+
z(this, dn);
|
|
6362
|
+
z(this, Qt);
|
|
6363
|
+
H(this, an, e.isAdmin), H(this, Ze, !1), H(this, Zt, e == null ? void 0 : e.mode), e.handleUpload && H(this, Ot, e.handleUpload.bind(this)), e != null && e.accessToken && (H(this, sn, e.accessToken), this._grpcOptionInitializer()), this._init(e).then(() => {
|
|
6364
|
+
H(this, on, !0), e != null && e.parentContainerId && this._renderView(e), this.updateWindowObject({ initialized: !0 }), this._initializeGrpcConfig(e.mode, e.endPoint);
|
|
6365
6365
|
});
|
|
6366
6366
|
}
|
|
6367
6367
|
async _init(e) {
|
|
@@ -6377,17 +6377,17 @@ class eo {
|
|
|
6377
6377
|
}
|
|
6378
6378
|
_renderView(e) {
|
|
6379
6379
|
var t, n, r;
|
|
6380
|
-
return this._isAdminOptions(e) ? (H(this,
|
|
6380
|
+
return this._isAdminOptions(e) ? (H(this, $e, !1), H(this, Bt, !1), H(this, Ft, 0), H(this, Ke, ""), H(this, yt, !1), H(this, Zt, e.mode), H(this, It, !1), H(this, Lt, ""), H(this, Rt, null), H(this, dn, e.enableDialog), this._removeToastContainer(), this._renderAdminView(e)) : (H(this, qt, ""), H(this, Dt, e == null ? void 0 : e.restrictedFileSize), H(this, Kt, e == null ? void 0 : e.localizedFileRestrictedMessage), H(this, Xt, e == null ? void 0 : e.localizedSuccessMessage), H(this, zt, e == null ? void 0 : e.localizedErrorMessage), H(this, dt, e == null ? void 0 : e.imagePreviewWidth), H(this, Jt, e == null ? void 0 : e.imagePreviewHeight), H(this, ln, (t = e == null ? void 0 : e.removeImageConfirm) == null ? void 0 : t.bind(this)), H(this, cn, (n = e == null ? void 0 : e.removeImagePreviewCB) == null ? void 0 : n.bind(this)), H(this, Gt, (r = e == null ? void 0 : e.getUploadingState) == null ? void 0 : r.bind(this)), H(this, Qt, e == null ? void 0 : e.uploadText), this._removeUserToast(), this._renderUserView(e));
|
|
6381
6381
|
}
|
|
6382
6382
|
_renderAdminView(e) {
|
|
6383
|
-
if (!
|
|
6383
|
+
if (!C(this, on)) return;
|
|
6384
6384
|
const { parentContainerId: t } = e;
|
|
6385
6385
|
if (e.isAdmin === !0)
|
|
6386
6386
|
var { buttonProps: n } = e;
|
|
6387
|
-
if (H(this, mt, document.getElementById(t)), !
|
|
6387
|
+
if (H(this, mt, document.getElementById(t)), !C(this, dn))
|
|
6388
6388
|
setTimeout(() => {
|
|
6389
6389
|
const r = this._selectedImageContainer();
|
|
6390
|
-
|
|
6390
|
+
C(this, mt).appendChild(r);
|
|
6391
6391
|
}, 0);
|
|
6392
6392
|
else {
|
|
6393
6393
|
const r = document.createElement("button");
|
|
@@ -6399,13 +6399,13 @@ class eo {
|
|
|
6399
6399
|
const o = document.createElement("span");
|
|
6400
6400
|
o.innerHTML = n != null && n.buttonIcon ? n == null ? void 0 : n.buttonIcon : "", r.type = "button", r.append(i, o), n != null && n.buttonStyle && Object.assign(r.style, n == null ? void 0 : n.buttonStyle), r.addEventListener("click", () => {
|
|
6401
6401
|
this._selectedImageContainerDialog();
|
|
6402
|
-
}),
|
|
6402
|
+
}), C(this, mt).appendChild(r);
|
|
6403
6403
|
}
|
|
6404
6404
|
}
|
|
6405
6405
|
async _grpcOptionInitializer() {
|
|
6406
6406
|
H(this, Oe, await Ss(
|
|
6407
|
-
|
|
6408
|
-
|
|
6407
|
+
C(this, sn),
|
|
6408
|
+
C(this, Zt)
|
|
6409
6409
|
));
|
|
6410
6410
|
}
|
|
6411
6411
|
_commonImageContainer() {
|
|
@@ -6413,27 +6413,27 @@ class eo {
|
|
|
6413
6413
|
H(this, Nt, K("folder-container")), H(this, wt, K("folder-list-wrapper")), this._fetchAllFolders(), H(this, we, K("browse-container"));
|
|
6414
6414
|
const e = K();
|
|
6415
6415
|
e.style.display = "flex", e.style.alignItems = "center", e.style.justifyContent = "space-between", e.style.padding = "10px 20px";
|
|
6416
|
-
const t =
|
|
6417
|
-
n.append(br()), this._createUpdateFolderDialog(n, "create"), e.append(t, n),
|
|
6416
|
+
const t = tn("Folders", "folder-title"), n = He("", "add-folder-btn");
|
|
6417
|
+
n.append(br()), this._createUpdateFolderDialog(n, "create"), e.append(t, n), C(this, Nt).append(e, C(this, wt));
|
|
6418
6418
|
const r = this._renderSearchField(), i = this._createBrowseMoreContainer(), o = this._createBrowseImageMain(), a = K("footer");
|
|
6419
6419
|
H(this, Qe, He(
|
|
6420
|
-
`Save (${(h =
|
|
6420
|
+
`Save (${(h = C(this, ue)) == null ? void 0 : h.length})`,
|
|
6421
6421
|
"dialog-btn confirm"
|
|
6422
6422
|
));
|
|
6423
6423
|
const c = K("container-right-main");
|
|
6424
|
-
return c.append(r, i, o, a),
|
|
6424
|
+
return c.append(r, i, o, a), C(this, we).append(C(this, Nt), c), { footer: a, wrapper: c };
|
|
6425
6425
|
}
|
|
6426
6426
|
_selectedImageContainer() {
|
|
6427
6427
|
const { footer: e } = this._commonImageContainer();
|
|
6428
|
-
return
|
|
6429
|
-
|
|
6430
|
-
}, e.appendChild(
|
|
6428
|
+
return C(this, Qe).onclick = () => {
|
|
6429
|
+
C(this, Ot).call(this), H(this, ue, []), H(this, ke, []);
|
|
6430
|
+
}, e.appendChild(C(this, Qe)), C(this, we);
|
|
6431
6431
|
}
|
|
6432
6432
|
_selectedImageContainerDialog() {
|
|
6433
6433
|
var r;
|
|
6434
6434
|
const { footer: e } = this._commonImageContainer();
|
|
6435
6435
|
H(this, Qe, He(
|
|
6436
|
-
`Save (${(r =
|
|
6436
|
+
`Save (${(r = C(this, ue)) == null ? void 0 : r.length})`,
|
|
6437
6437
|
"dialog-btn confirm"
|
|
6438
6438
|
));
|
|
6439
6439
|
const t = He("Cancel", "dialog-btn cancel");
|
|
@@ -6444,13 +6444,13 @@ class eo {
|
|
|
6444
6444
|
!1,
|
|
6445
6445
|
'<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="24" height="24" viewBox="0 0 50 50"> <path d="M 9.15625 6.3125 L 6.3125 9.15625 L 22.15625 25 L 6.21875 40.96875 L 9.03125 43.78125 L 25 27.84375 L 40.9375 43.78125 L 43.78125 40.9375 L 27.84375 25 L 43.6875 9.15625 L 40.84375 6.3125 L 25 22.15625 Z"></path> </svg>'
|
|
6446
6446
|
).addEventListener("click", () => {
|
|
6447
|
-
|
|
6447
|
+
wn.hide(), H(this, ue, []), H(this, ke, []);
|
|
6448
6448
|
}), t.onclick = () => {
|
|
6449
|
-
|
|
6450
|
-
},
|
|
6451
|
-
|
|
6452
|
-
}, e.append(t,
|
|
6453
|
-
content:
|
|
6449
|
+
wn.hide(), H(this, Ke, ""), H(this, ke, []), H(this, ue, []);
|
|
6450
|
+
}, C(this, Qe).onclick = () => {
|
|
6451
|
+
C(this, Ot).call(this), wn.hide(), H(this, Ke, ""), H(this, ue, []), H(this, ke, []);
|
|
6452
|
+
}, e.append(t, C(this, Qe)), wn.show({
|
|
6453
|
+
content: C(this, we)
|
|
6454
6454
|
});
|
|
6455
6455
|
}
|
|
6456
6456
|
_renderUserView(e) {
|
|
@@ -6467,10 +6467,10 @@ class eo {
|
|
|
6467
6467
|
"margin-block: 0px; font-size: 13px; color: #777",
|
|
6468
6468
|
`Max File size: ${n}MB`
|
|
6469
6469
|
);
|
|
6470
|
-
i.append(
|
|
6470
|
+
i.append(Mn(), c, h);
|
|
6471
6471
|
} else
|
|
6472
|
-
i.append(
|
|
6473
|
-
return
|
|
6472
|
+
i.append(Mn(), c);
|
|
6473
|
+
return C(this, ct).append(i), r && this._renderImagePreview(r, "", i, !0), C(this, mt).appendChild(C(this, ct)), C(this, mt);
|
|
6474
6474
|
}
|
|
6475
6475
|
_renderImagePreview(e, t, n, r = !1) {
|
|
6476
6476
|
var I;
|
|
@@ -6487,13 +6487,13 @@ class eo {
|
|
|
6487
6487
|
const l = Q(
|
|
6488
6488
|
"img",
|
|
6489
6489
|
"",
|
|
6490
|
-
`max-width: ${
|
|
6490
|
+
`max-width: ${C(this, dt) ? C(this, dt) : 230}px;max-height:${C(this, Jt) ? C(this, Jt) : 250}px;object-fit:cover;`
|
|
6491
6491
|
);
|
|
6492
6492
|
l.src = e, l.alt = t || "";
|
|
6493
6493
|
const u = this._renderImageErrorContainer();
|
|
6494
6494
|
c.appendChild(u), l.onload = () => {
|
|
6495
6495
|
f.style.display = "none", h.style.display = "none", h.remove(), u.style.display = "none", u.remove(), l.style.display = "block", f.style.display = r ? "flex" : "none";
|
|
6496
|
-
}, l.onerror = (
|
|
6496
|
+
}, l.onerror = (E) => {
|
|
6497
6497
|
h.style.display = "none", h.remove(), u.style.display = "flex", l.style.display = "none", f.style.display = "none";
|
|
6498
6498
|
};
|
|
6499
6499
|
const d = u.querySelector("#retry-image-btn");
|
|
@@ -6506,15 +6506,15 @@ class eo {
|
|
|
6506
6506
|
"width: 18px; height: 18px; display:none; cursor:pointer; align-items: center; justify-content: center; padding: 4px; position: absolute; top: -5px; right: -5px; background: #c10007; border-radius: 50%;z-index:1"
|
|
6507
6507
|
);
|
|
6508
6508
|
f.id = "remove-preview-btn";
|
|
6509
|
-
const y =
|
|
6509
|
+
const y = zn();
|
|
6510
6510
|
y.style.fill = "#fff", f == null || f.appendChild(y), f.addEventListener("click", () => {
|
|
6511
|
-
|
|
6511
|
+
C(this, ln).call(this);
|
|
6512
6512
|
});
|
|
6513
6513
|
const F = Q("button", "", "display:none");
|
|
6514
|
-
F.id = "image-preview-hidden-btn", F.addEventListener("click", (
|
|
6514
|
+
F.id = "image-preview-hidden-btn", F.addEventListener("click", (E) => {
|
|
6515
6515
|
var R;
|
|
6516
|
-
|
|
6517
|
-
}), c == null || c.append(l, f, F), (I =
|
|
6516
|
+
E.preventDefault(), E.stopPropagation(), (R = C(this, ct)) == null || R.removeChild(c), C(this, cn).call(this), this._removeUserToast(), o && (o.style.display = "flex");
|
|
6517
|
+
}), c == null || c.append(l, f, F), (I = C(this, ct)) == null || I.append(c);
|
|
6518
6518
|
}
|
|
6519
6519
|
_renderImageErrorContainer() {
|
|
6520
6520
|
const e = Q(
|
|
@@ -6544,30 +6544,41 @@ class eo {
|
|
|
6544
6544
|
const e = document.getElementById("remove-preview-btn");
|
|
6545
6545
|
e && (e.style.display = "flex");
|
|
6546
6546
|
}
|
|
6547
|
+
_showInitialPreview(e) {
|
|
6548
|
+
const t = new FileReader();
|
|
6549
|
+
t.readAsDataURL(e), t.onload = () => {
|
|
6550
|
+
this._renderUserUploading(), this._renderImagePreview(t.result, "");
|
|
6551
|
+
}, t.onerror = () => {
|
|
6552
|
+
console.error("Error reading file:", t.error);
|
|
6553
|
+
};
|
|
6554
|
+
}
|
|
6547
6555
|
async _readFileAsBase64(e) {
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
return;
|
|
6555
|
-
}
|
|
6556
|
-
H(this, Je, !0), E(this, Gt).call(this, !0);
|
|
6557
|
-
try {
|
|
6558
|
-
const n = await Nr(e);
|
|
6559
|
-
this._removeUserToast();
|
|
6560
|
-
const r = new FileReader();
|
|
6561
|
-
r.readAsDataURL(n), r.onload = () => {
|
|
6562
|
-
this._userViewUploadAndAddSelectedImageList(
|
|
6563
|
-
r.result,
|
|
6564
|
-
e
|
|
6556
|
+
if (C(this, Dt)) {
|
|
6557
|
+
const t = C(this, Dt) * 1024 * 1024;
|
|
6558
|
+
if (e.size > t) {
|
|
6559
|
+
this._renderUserToast(
|
|
6560
|
+
C(this, Kt) ? C(this, Kt) : `File size must be less than ${C(this, Dt)}MB.`,
|
|
6561
|
+
"error"
|
|
6565
6562
|
);
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6563
|
+
return;
|
|
6564
|
+
}
|
|
6565
|
+
} else {
|
|
6566
|
+
H(this, Ze, !0), C(this, Gt).call(this, !0), this._showInitialPreview(e);
|
|
6567
|
+
try {
|
|
6568
|
+
const t = await Nr(e);
|
|
6569
|
+
this._removeUserToast();
|
|
6570
|
+
const n = new FileReader();
|
|
6571
|
+
n.readAsDataURL(t), n.onload = () => {
|
|
6572
|
+
this._userViewUploadAndAddSelectedImageList(
|
|
6573
|
+
n.result,
|
|
6574
|
+
e
|
|
6575
|
+
);
|
|
6576
|
+
}, n.onerror = () => {
|
|
6577
|
+
console.error("Error reading file:", n.error);
|
|
6578
|
+
};
|
|
6579
|
+
} catch (t) {
|
|
6580
|
+
this._renderUserToast(t == null ? void 0 : t.message, "error");
|
|
6581
|
+
}
|
|
6571
6582
|
}
|
|
6572
6583
|
}
|
|
6573
6584
|
_renderUserToast(e, t = "success") {
|
|
@@ -6583,21 +6594,21 @@ class eo {
|
|
|
6583
6594
|
"margin-block:0px;font-size:14px;padding-top:3px"
|
|
6584
6595
|
);
|
|
6585
6596
|
r.textContent = e, r.style.color = t === "success" ? "#4caf50" : "#ee3f3f";
|
|
6586
|
-
const i = t === "success" ? wr("#4caf50") :
|
|
6587
|
-
i.style.width = "15px", i.style.height = "15px", n.append(i, r),
|
|
6597
|
+
const i = t === "success" ? wr("#4caf50") : Dn();
|
|
6598
|
+
i.style.width = "15px", i.style.height = "15px", n.append(i, r), C(this, ct).appendChild(n);
|
|
6588
6599
|
}
|
|
6589
6600
|
_removeUserToast() {
|
|
6590
6601
|
const e = document.getElementById("user-toast-container");
|
|
6591
6602
|
e && e.remove();
|
|
6592
6603
|
}
|
|
6593
6604
|
_renderUserViewBrowseButton() {
|
|
6594
|
-
const e =
|
|
6605
|
+
const e = Hn("file");
|
|
6595
6606
|
e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*");
|
|
6596
6607
|
const t = Q(
|
|
6597
6608
|
"a",
|
|
6598
6609
|
"user-upload-btn",
|
|
6599
6610
|
"",
|
|
6600
|
-
"Click to upload"
|
|
6611
|
+
C(this, Qt) ? C(this, Qt) : "Click to upload"
|
|
6601
6612
|
);
|
|
6602
6613
|
return t.classList.add("user-upload-btn"), t.role = "button", t.addEventListener("click", () => {
|
|
6603
6614
|
this._removeUserToast(), e.click();
|
|
@@ -6616,27 +6627,25 @@ class eo {
|
|
|
6616
6627
|
const t = Q(
|
|
6617
6628
|
"div",
|
|
6618
6629
|
"linear-loader",
|
|
6619
|
-
`width:${
|
|
6630
|
+
`width:${C(this, dt) ? C(this, dt) : 230}px;max-width:${C(this, dt) ? C(this, dt) : 230}px`
|
|
6620
6631
|
);
|
|
6621
|
-
e.appendChild(t),
|
|
6632
|
+
e.appendChild(t), C(this, ct).append(e);
|
|
6622
6633
|
}
|
|
6623
6634
|
_removeUserUploading() {
|
|
6624
6635
|
const e = document.getElementById("user-uploading");
|
|
6625
6636
|
e && e.remove();
|
|
6626
6637
|
}
|
|
6627
6638
|
async _userViewUploadAndAddSelectedImageList(e, t) {
|
|
6628
|
-
this._renderUserUploading();
|
|
6629
6639
|
try {
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
await this._uploadForUser(n, t), E(this, Xt) && this._renderUserToast(E(this, Xt), "success");
|
|
6640
|
+
const n = await Fr(e, t, C(this, Oe), !1);
|
|
6641
|
+
await this._uploadForUser(n, t), C(this, Xt) && this._renderUserToast(C(this, Xt), "success");
|
|
6633
6642
|
} catch {
|
|
6634
6643
|
this._renderUserToast(
|
|
6635
|
-
|
|
6644
|
+
C(this, zt) ? C(this, zt) : "Error uploading. Please try again later.",
|
|
6636
6645
|
"error"
|
|
6637
6646
|
);
|
|
6638
6647
|
} finally {
|
|
6639
|
-
H(this,
|
|
6648
|
+
H(this, Ze, !1), C(this, Gt).call(this, !1), this._removeUserUploading(), this._renderRemovePreviewBtn();
|
|
6640
6649
|
}
|
|
6641
6650
|
}
|
|
6642
6651
|
async _uploadForUser(e, t) {
|
|
@@ -6644,16 +6653,16 @@ class eo {
|
|
|
6644
6653
|
try {
|
|
6645
6654
|
const r = await as(
|
|
6646
6655
|
e,
|
|
6647
|
-
Ye[
|
|
6648
|
-
|
|
6656
|
+
Ye[Vn((n = t.type) == null ? void 0 : n.split("/")[0])],
|
|
6657
|
+
C(this, Oe)
|
|
6649
6658
|
);
|
|
6650
|
-
H(this,
|
|
6659
|
+
H(this, qt, r == null ? void 0 : r.response), C(this, Ot).call(this);
|
|
6651
6660
|
} catch (r) {
|
|
6652
6661
|
throw Error(r);
|
|
6653
6662
|
}
|
|
6654
6663
|
}
|
|
6655
6664
|
_createAllAndSelectedTab(e) {
|
|
6656
|
-
const t = K("select-options"), n =
|
|
6665
|
+
const t = K("select-options"), n = tn("Browse", "select"), r = tn(
|
|
6657
6666
|
"Selected",
|
|
6658
6667
|
"select",
|
|
6659
6668
|
"selected-images-tab"
|
|
@@ -6666,16 +6675,16 @@ class eo {
|
|
|
6666
6675
|
}), t.append(n, r), e.appendChild(t);
|
|
6667
6676
|
}
|
|
6668
6677
|
_renderUploadButton() {
|
|
6669
|
-
const e =
|
|
6670
|
-
e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*,video/*,audio/*,.gif"), H(this, gt, document.createElement("button")),
|
|
6678
|
+
const e = Hn("file");
|
|
6679
|
+
e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*,video/*,audio/*,.gif"), H(this, gt, document.createElement("button")), C(this, gt).className = "browse-more-btn";
|
|
6671
6680
|
const t = document.createElement("span");
|
|
6672
|
-
return t.textContent = "Upload",
|
|
6681
|
+
return t.textContent = "Upload", C(this, gt).append(Mn(), t), C(this, gt).type = "button", C(this, gt).addEventListener(
|
|
6673
6682
|
"click",
|
|
6674
6683
|
() => e.click()
|
|
6675
6684
|
), e.addEventListener("change", async () => {
|
|
6676
6685
|
const n = e.files[0];
|
|
6677
6686
|
try {
|
|
6678
|
-
H(this,
|
|
6687
|
+
H(this, Ze, !0);
|
|
6679
6688
|
const r = new FileReader();
|
|
6680
6689
|
r.readAsDataURL(n), r.onload = async () => {
|
|
6681
6690
|
await this._uploadAndAddSelectedImageList(
|
|
@@ -6684,10 +6693,10 @@ class eo {
|
|
|
6684
6693
|
);
|
|
6685
6694
|
};
|
|
6686
6695
|
} catch (r) {
|
|
6687
|
-
this._renderToastContainer(r, "error",
|
|
6696
|
+
this._renderToastContainer(r, "error", C(this, we));
|
|
6688
6697
|
}
|
|
6689
6698
|
e.value = "";
|
|
6690
|
-
}),
|
|
6699
|
+
}), C(this, gt);
|
|
6691
6700
|
}
|
|
6692
6701
|
_renderCreateFolderBtn() {
|
|
6693
6702
|
const e = document.createElement("button");
|
|
@@ -6701,42 +6710,42 @@ class eo {
|
|
|
6701
6710
|
"search-input-wrapper",
|
|
6702
6711
|
"search-input-wrapper"
|
|
6703
6712
|
);
|
|
6704
|
-
H(this, Tt,
|
|
6713
|
+
H(this, Tt, Hn("search")), C(this, Tt).value = "", C(this, Tt).addEventListener("input", (i) => {
|
|
6705
6714
|
H(this, ke, []);
|
|
6706
6715
|
const o = i.target;
|
|
6707
6716
|
e && clearTimeout(e), e = setTimeout(() => {
|
|
6708
6717
|
if (!o.value) {
|
|
6709
|
-
H(this,
|
|
6718
|
+
H(this, Ke, ""), H(this, It, !1), H(this, yt, !1), this._fetchFilesFromFolder(C(this, kt));
|
|
6710
6719
|
return;
|
|
6711
6720
|
}
|
|
6712
|
-
H(this, yt, !0), H(this,
|
|
6721
|
+
H(this, yt, !0), H(this, jt, o.value), this._search(C(this, jt));
|
|
6713
6722
|
}, 750);
|
|
6714
|
-
}),
|
|
6723
|
+
}), C(this, Tt).setAttribute("placeholder", "Search");
|
|
6715
6724
|
const r = Ls();
|
|
6716
|
-
return r.style.position = "absolute", r.style.top = "50%", r.style.left = "5%", r.style.transform = "translate(-5%, -50%)", n.append(r,
|
|
6725
|
+
return r.style.position = "absolute", r.style.top = "50%", r.style.left = "5%", r.style.transform = "translate(-5%, -50%)", n.append(r, C(this, Tt)), t.append(n), t;
|
|
6717
6726
|
}
|
|
6718
6727
|
_createBrowseMoreContainer() {
|
|
6719
|
-
H(this, St, K("browse-more-btn-container")), this._createAllAndSelectedTab(
|
|
6728
|
+
H(this, St, K("browse-more-btn-container")), this._createAllAndSelectedTab(C(this, St));
|
|
6720
6729
|
const e = this._renderUploadButton(), t = this._renderCreateFolderBtn(), n = document.createElement("div");
|
|
6721
|
-
return n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "10px", n.append(e, t),
|
|
6730
|
+
return n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "10px", n.append(e, t), C(this, St).appendChild(n), C(this, St);
|
|
6722
6731
|
}
|
|
6723
6732
|
_createBrowseImageMain() {
|
|
6724
6733
|
const e = K("browse-image-main");
|
|
6725
|
-
return H(this, Ee, K("selected-image-container")),
|
|
6726
|
-
const t =
|
|
6727
|
-
t + n >= r - 5 &&
|
|
6728
|
-
}), e.appendChild(
|
|
6734
|
+
return H(this, Ee, K("selected-image-container")), C(this, Ee).addEventListener("scroll", () => {
|
|
6735
|
+
const t = C(this, Ee).clientHeight, n = C(this, Ee).scrollTop, r = C(this, Ee).scrollHeight;
|
|
6736
|
+
t + n >= r - 5 && C(this, It) && (C(this, yt) ? this._search(C(this, jt)) : this._fetchFilesFromFolder(C(this, kt)));
|
|
6737
|
+
}), e.appendChild(C(this, Ee)), e;
|
|
6729
6738
|
}
|
|
6730
6739
|
_renderFetchingSkeletonUI() {
|
|
6731
6740
|
for (let e = 0; e < 20; e++) {
|
|
6732
6741
|
const t = K("skeleton");
|
|
6733
|
-
t.innerHTML = "",
|
|
6742
|
+
t.innerHTML = "", C(this, Ee).append(t);
|
|
6734
6743
|
}
|
|
6735
6744
|
}
|
|
6736
6745
|
_renderEmptyImageContainer() {
|
|
6737
|
-
if (
|
|
6746
|
+
if (C(this, $e) || C(this, Ze)) return;
|
|
6738
6747
|
const e = K(), t = K(), n = document.createElement("p");
|
|
6739
|
-
|
|
6748
|
+
C(this, yt) && C(this, Ft) === 0 ? (t.innerHTML = `
|
|
6740
6749
|
<svg width="300" height="300" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6741
6750
|
<g clip-path="url(#clip0_2304_257)">
|
|
6742
6751
|
<path d="M564.829 772.4H336.658V948.386H564.829V772.4Z" fill="#EBEBEB"/>
|
|
@@ -6820,14 +6829,14 @@ class eo {
|
|
|
6820
6829
|
</clipPath>
|
|
6821
6830
|
</defs>
|
|
6822
6831
|
</svg>
|
|
6823
|
-
`, n.textContent = "Looks Empty!"), e.append(t, n),
|
|
6832
|
+
`, n.textContent = "Looks Empty!"), e.append(t, n), C(this, Ee).appendChild(e);
|
|
6824
6833
|
}
|
|
6825
6834
|
_renderLoadingUI() {
|
|
6826
6835
|
const e = K("skeleton");
|
|
6827
|
-
e.innerHTML = "",
|
|
6836
|
+
e.innerHTML = "", C(this, Ee).appendChild(e);
|
|
6828
6837
|
}
|
|
6829
6838
|
_fileCardBody(e) {
|
|
6830
|
-
var st,
|
|
6839
|
+
var st, Vt, hn, Ht;
|
|
6831
6840
|
const t = K("selected-image-content"), n = K("selected-image-top-bar"), r = He(
|
|
6832
6841
|
"",
|
|
6833
6842
|
"selected-image-btn",
|
|
@@ -6839,30 +6848,30 @@ class eo {
|
|
|
6839
6848
|
(e == null ? void 0 : e.type) === Ye.IMAGE && (i = vr(e == null ? void 0 : e.url, "selected-image"), o = Ns()), (e == null ? void 0 : e.type) === Ye.VIDEO && (i = Rs(e == null ? void 0 : e.url, "uploaded-video"), o = Us()), (e == null ? void 0 : e.type) === Ye.AUDIO && (i = Ds(e == null ? void 0 : e.url, "uploaded-audio"), o = Fs());
|
|
6840
6849
|
const a = K("selected-image-wrapper");
|
|
6841
6850
|
a.setAttribute("data-key", e == null ? void 0 : e.key);
|
|
6842
|
-
const c =
|
|
6851
|
+
const c = tn(e == null ? void 0 : e.name, "selected-image-name"), h = le("", "selected-image-type");
|
|
6843
6852
|
h.append(o), n.append(h, r);
|
|
6844
6853
|
const l = K();
|
|
6845
6854
|
l.style.marginTop = "10px", l.style.display = "flex", l.style.justifyContent = "space-between", l.style.alignItems = "center", l.append(c), t.append(n, i), a.append(t, l);
|
|
6846
6855
|
const u = K("action-wrapper"), d = He("", "action-option preview"), f = le("Preview", ""), y = Ts();
|
|
6847
6856
|
d.append(y, f);
|
|
6848
|
-
const F = He("", "action-option move"), I = le("Move", ""),
|
|
6849
|
-
F.append(
|
|
6857
|
+
const F = He("", "action-option move"), I = le("Move", ""), E = Is();
|
|
6858
|
+
F.append(E, I);
|
|
6850
6859
|
const R = He("", "action-option rename"), O = le("Rename", ""), v = yr();
|
|
6851
6860
|
R.append(v, O);
|
|
6852
6861
|
const L = He("", "action-option delete"), b = le("Delete", ""), B = Cr();
|
|
6853
6862
|
L.append(B, b);
|
|
6854
|
-
const m = e.name.split(".")[0], g = e.name.split(".")[1], k =
|
|
6863
|
+
const m = e.name.split(".")[0], g = e.name.split(".")[1], k = nn[e.type], T = K("edit-form-wrapper"), N = K("move-form-wrapper"), U = K("preview-details-container"), A = K("preview-details-wrapper"), _ = K(
|
|
6855
6864
|
"preview-option-image-wrapper"
|
|
6856
6865
|
), w = K("preview-option-wrapper"), p = K("preview-option-wrapper"), M = K(
|
|
6857
6866
|
"preview-option-wrapper"
|
|
6858
6867
|
), x = K("preview-option-wrapper"), V = K(
|
|
6859
6868
|
"preview-option-wrapper"
|
|
6860
|
-
), Z = K("preview-option-wrapper"),
|
|
6869
|
+
), Z = K("preview-option-wrapper"), $ = K(
|
|
6861
6870
|
"preview-option-wrapper"
|
|
6862
6871
|
), q = vr(e.url, "preview-option-image");
|
|
6863
6872
|
_.append(q);
|
|
6864
|
-
const
|
|
6865
|
-
S.innerHTML = e.name, w.append(
|
|
6873
|
+
const P = le("File name", "preview-title"), S = K("preview-option-name");
|
|
6874
|
+
S.innerHTML = e.name, w.append(P, S);
|
|
6866
6875
|
const X = le("Folder name", "preview-title"), oe = le(
|
|
6867
6876
|
e.folderName,
|
|
6868
6877
|
"preview-option-name"
|
|
@@ -6888,7 +6897,7 @@ class eo {
|
|
|
6888
6897
|
fe
|
|
6889
6898
|
);
|
|
6890
6899
|
const be = le("Dimension", "preview-title"), ft = le(
|
|
6891
|
-
`${(st = e == null ? void 0 : e.metadata) == null ? void 0 : st.width} * ${(
|
|
6900
|
+
`${(st = e == null ? void 0 : e.metadata) == null ? void 0 : st.width} * ${(Vt = e == null ? void 0 : e.metadata) == null ? void 0 : Vt.height}`,
|
|
6892
6901
|
"preview-option-name"
|
|
6893
6902
|
);
|
|
6894
6903
|
V.append(
|
|
@@ -6910,7 +6919,7 @@ class eo {
|
|
|
6910
6919
|
e.nestedFolderName,
|
|
6911
6920
|
"preview-option-name"
|
|
6912
6921
|
);
|
|
6913
|
-
|
|
6922
|
+
$.append(
|
|
6914
6923
|
Ne,
|
|
6915
6924
|
ae
|
|
6916
6925
|
), A.append(
|
|
@@ -6918,9 +6927,9 @@ class eo {
|
|
|
6918
6927
|
w,
|
|
6919
6928
|
M,
|
|
6920
6929
|
x,
|
|
6921
|
-
((
|
|
6930
|
+
((hn = e == null ? void 0 : e.metadata) == null ? void 0 : hn.width) > 0 && ((Ht = e == null ? void 0 : e.metadata) == null ? void 0 : Ht.height) > 0 ? V : "",
|
|
6922
6931
|
Z,
|
|
6923
|
-
e.nestedFolderName ?
|
|
6932
|
+
e.nestedFolderName ? $ : ""
|
|
6924
6933
|
), U.append(
|
|
6925
6934
|
_,
|
|
6926
6935
|
A
|
|
@@ -6928,18 +6937,18 @@ class eo {
|
|
|
6928
6937
|
const ne = K("form-control"), me = document.createElement("input");
|
|
6929
6938
|
ne.appendChild(me), me.classList.add("input-field"), me.value = e.name;
|
|
6930
6939
|
const Ie = K("form-control"), ge = le("Current Folder:", "input-label"), Te = K("folder-field current");
|
|
6931
|
-
Te.textContent = e.folderName, Te.prepend(
|
|
6940
|
+
Te.textContent = e.folderName, Te.prepend(en()), Ie.append(ge, Te);
|
|
6932
6941
|
const pe = K("form-control"), ee = K();
|
|
6933
6942
|
ee.style.width = "100%", ee.style.display = "flex", ee.style.alignItems = "center", ee.style.justifyContent = "space-between";
|
|
6934
6943
|
const Re = le(
|
|
6935
6944
|
"Suggested Folder List:",
|
|
6936
6945
|
"input-label"
|
|
6937
6946
|
), Ue = le();
|
|
6938
|
-
Ue.style.display = "flex", Ue.style.alignItems = "center", Ue.style.gap = "5px", Ue.style.fontSize = "14px", Ue.textContent = "Move the file in selected folder", Ue.appendChild(
|
|
6947
|
+
Ue.style.display = "flex", Ue.style.alignItems = "center", Ue.style.gap = "5px", Ue.style.fontSize = "14px", Ue.textContent = "Move the file in selected folder", Ue.appendChild(Dn("14px", "14px", "#333")), ee.append(Re, Ue);
|
|
6939
6948
|
const rt = K();
|
|
6940
6949
|
rt.style.width = "100%", rt.style.maxHeight = "250px", rt.style.overflowY = "auto";
|
|
6941
6950
|
const Ae = document.createElement("ul");
|
|
6942
|
-
Ae.className = "folders", rt.append(Ae), pe.append(ee, rt),
|
|
6951
|
+
Ae.className = "folders", rt.append(Ae), pe.append(ee, rt), C(this, at).forEach((ce) => {
|
|
6943
6952
|
const je = this._renderEditFolderListContainer(ce);
|
|
6944
6953
|
Ae.appendChild(je);
|
|
6945
6954
|
});
|
|
@@ -6947,7 +6956,7 @@ class eo {
|
|
|
6947
6956
|
"folder-field source",
|
|
6948
6957
|
"source-folder-wrapper"
|
|
6949
6958
|
), xe = document.createElement("span");
|
|
6950
|
-
xe.id = "source-folder-name", xe.textContent =
|
|
6959
|
+
xe.id = "source-folder-name", xe.textContent = C(this, Lt) ? C(this, Lt) : e.folderName, Ve.append(en(), xe);
|
|
6951
6960
|
let _e = "";
|
|
6952
6961
|
it.append(Le, Ve), me.onchange = (ce) => {
|
|
6953
6962
|
_e = ce.target.value;
|
|
@@ -6961,7 +6970,7 @@ class eo {
|
|
|
6961
6970
|
R,
|
|
6962
6971
|
L
|
|
6963
6972
|
), d.onclick = (ce) => {
|
|
6964
|
-
ce.stopPropagation(),
|
|
6973
|
+
ce.stopPropagation(), Xe.hide(), Ce.show({
|
|
6965
6974
|
content: U,
|
|
6966
6975
|
header: m,
|
|
6967
6976
|
dialogContentStyle: {
|
|
@@ -6971,7 +6980,7 @@ class eo {
|
|
|
6971
6980
|
showCloseBtn: !0
|
|
6972
6981
|
});
|
|
6973
6982
|
}, F.onclick = (ce) => {
|
|
6974
|
-
ce.stopPropagation(),
|
|
6983
|
+
ce.stopPropagation(), Xe.hide(), Ce.show({
|
|
6975
6984
|
content: N,
|
|
6976
6985
|
header: `Move "${e.name}"`,
|
|
6977
6986
|
confirmButtonText: "Move",
|
|
@@ -6989,7 +6998,7 @@ class eo {
|
|
|
6989
6998
|
}
|
|
6990
6999
|
});
|
|
6991
7000
|
}, R.onclick = (ce) => {
|
|
6992
|
-
ce.stopPropagation(),
|
|
7001
|
+
ce.stopPropagation(), Xe.hide(), Ce.show({
|
|
6993
7002
|
content: T,
|
|
6994
7003
|
header: "Rename",
|
|
6995
7004
|
confirmButtonText: "Update",
|
|
@@ -7006,7 +7015,7 @@ class eo {
|
|
|
7006
7015
|
}
|
|
7007
7016
|
});
|
|
7008
7017
|
}, L.onclick = (ce) => {
|
|
7009
|
-
ce.stopPropagation(),
|
|
7018
|
+
ce.stopPropagation(), Xe.hide(), Ce.show({
|
|
7010
7019
|
content: "",
|
|
7011
7020
|
dialogContentStyle: {
|
|
7012
7021
|
minWidth: "32rem",
|
|
@@ -7021,20 +7030,20 @@ class eo {
|
|
|
7021
7030
|
}
|
|
7022
7031
|
});
|
|
7023
7032
|
}, r.addEventListener("click", (ce) => {
|
|
7024
|
-
ce.stopPropagation(),
|
|
7033
|
+
ce.stopPropagation(), Xe.hide(), Xe.show({
|
|
7025
7034
|
content: u,
|
|
7026
7035
|
mainContainer: n,
|
|
7027
7036
|
divId: e.key
|
|
7028
7037
|
}), H(this, Rt, e.key);
|
|
7029
7038
|
}), i.addEventListener("click", () => {
|
|
7030
|
-
const ce =
|
|
7039
|
+
const ce = C(this, ue).findIndex(
|
|
7031
7040
|
(ot) => (ot == null ? void 0 : ot.key) === (e == null ? void 0 : e.key)
|
|
7032
7041
|
);
|
|
7033
7042
|
if (t.classList.contains("checked"))
|
|
7034
|
-
t.classList.remove("checked"), ce !== -1 && (
|
|
7043
|
+
t.classList.remove("checked"), ce !== -1 && (C(this, ue).splice(ce, 1), C(this, Ft) === 1 && a.remove());
|
|
7035
7044
|
else {
|
|
7036
|
-
if (
|
|
7037
|
-
|
|
7045
|
+
if (C(this, Tn))
|
|
7046
|
+
C(this, ue).push(e);
|
|
7038
7047
|
else {
|
|
7039
7048
|
const ot = document.querySelector(
|
|
7040
7049
|
".selected-image-wrapper .checked"
|
|
@@ -7045,24 +7054,24 @@ class eo {
|
|
|
7045
7054
|
}
|
|
7046
7055
|
this._updateContent();
|
|
7047
7056
|
}), document.addEventListener("click", (ce) => {
|
|
7048
|
-
const je = document.querySelector(`#${
|
|
7049
|
-
je && (ce.composedPath().includes(je) ||
|
|
7050
|
-
}),
|
|
7057
|
+
const je = document.querySelector(`#${C(this, Rt)}`);
|
|
7058
|
+
je && (ce.composedPath().includes(je) || Xe.hide());
|
|
7059
|
+
}), C(this, ue).findIndex(
|
|
7051
7060
|
(ce) => (ce == null ? void 0 : ce.key) === (e == null ? void 0 : e.key)
|
|
7052
|
-
) !== -1 ? (t.classList.add("checked"),
|
|
7061
|
+
) !== -1 ? (t.classList.add("checked"), C(this, yt) ? C(this, Ee).prepend(a) : C(this, Ee).appendChild(a)) : C(this, Ee).appendChild(a);
|
|
7053
7062
|
}
|
|
7054
7063
|
_renderImageCard(e) {
|
|
7055
7064
|
this._fileCardBody(e);
|
|
7056
7065
|
}
|
|
7057
7066
|
_renderImageListContainer() {
|
|
7058
7067
|
var e, t;
|
|
7059
|
-
((e =
|
|
7068
|
+
((e = C(this, ke)) == null ? void 0 : e.length) > 0 && ((t = C(this, ke)) == null || t.forEach((n) => {
|
|
7060
7069
|
this._renderImageCard(n);
|
|
7061
7070
|
}));
|
|
7062
7071
|
}
|
|
7063
7072
|
_renderSelectedImageListContainer() {
|
|
7064
7073
|
var e;
|
|
7065
|
-
((e =
|
|
7074
|
+
((e = C(this, ue)) == null ? void 0 : e.length) > 0 && C(this, ue).forEach((t) => {
|
|
7066
7075
|
this._renderImageCard(t);
|
|
7067
7076
|
});
|
|
7068
7077
|
}
|
|
@@ -7082,9 +7091,9 @@ class eo {
|
|
|
7082
7091
|
const n = document.createElement("div");
|
|
7083
7092
|
n.style.position = "relative", n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "2px";
|
|
7084
7093
|
const r = document.createElement("span"), i = document.createElement("span");
|
|
7085
|
-
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, r.appendChild(
|
|
7094
|
+
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, r.appendChild(en()), n.append(r, i), t.append(n), e.children && Object.keys(e.children).length > 0) {
|
|
7086
7095
|
const v = document.createElement("button");
|
|
7087
|
-
v.classList.add("expand-icon"), v.appendChild(
|
|
7096
|
+
v.classList.add("expand-icon"), v.appendChild(mn()), n.prepend(v);
|
|
7088
7097
|
const L = document.createElement("ul");
|
|
7089
7098
|
L.className = "folders nested", t.appendChild(L), v.addEventListener("click", (b) => {
|
|
7090
7099
|
b.stopPropagation(), t.classList.toggle("active"), L.classList.toggle("visible");
|
|
@@ -7115,9 +7124,9 @@ class eo {
|
|
|
7115
7124
|
forUser: !0
|
|
7116
7125
|
};
|
|
7117
7126
|
this._createUpdateFolderDialog(c, "update", F);
|
|
7118
|
-
const I = He("", "action-option delete"),
|
|
7119
|
-
return I.append(R,
|
|
7120
|
-
v.stopPropagation(),
|
|
7127
|
+
const I = He("", "action-option delete"), E = le("Delete", ""), R = Cr();
|
|
7128
|
+
return I.append(R, E), a.append(c, I), I.onclick = (v) => {
|
|
7129
|
+
v.stopPropagation(), Xe.hide(), Ce.show({
|
|
7121
7130
|
content: "",
|
|
7122
7131
|
dialogContentStyle: {
|
|
7123
7132
|
minWidth: "32rem",
|
|
@@ -7132,15 +7141,15 @@ class eo {
|
|
|
7132
7141
|
}
|
|
7133
7142
|
});
|
|
7134
7143
|
}, o.addEventListener("click", (v) => {
|
|
7135
|
-
v.stopPropagation(),
|
|
7144
|
+
v.stopPropagation(), Xe.hide(), Xe.show({
|
|
7136
7145
|
content: a,
|
|
7137
7146
|
mainContainer: n,
|
|
7138
7147
|
divId: e.key
|
|
7139
7148
|
}), H(this, Rt, e.key);
|
|
7140
7149
|
}), n.appendChild(o), t.addEventListener("click", (v) => {
|
|
7141
7150
|
var L;
|
|
7142
|
-
v.stopPropagation(), H(this, De, e), H(this, kt, e == null ? void 0 : e.name), H(this, ue, []), H(this, ke, []), H(this,
|
|
7143
|
-
}), ((O =
|
|
7151
|
+
v.stopPropagation(), H(this, De, e), H(this, kt, e == null ? void 0 : e.name), H(this, ue, []), H(this, ke, []), H(this, Ke, ""), H(this, It, !1), (L = document.querySelector(".folder.selected")) == null || L.classList.remove("selected"), t.classList.add("selected"), this._fetchFilesFromFolder(e.name);
|
|
7152
|
+
}), ((O = C(this, De)) == null ? void 0 : O.key) === (e == null ? void 0 : e.key) && t.classList.add("selected"), t;
|
|
7144
7153
|
}
|
|
7145
7154
|
_renderEditFolderListContainer(e) {
|
|
7146
7155
|
var o;
|
|
@@ -7149,9 +7158,9 @@ class eo {
|
|
|
7149
7158
|
const n = document.createElement("div");
|
|
7150
7159
|
n.style.position = "relative", n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "2px";
|
|
7151
7160
|
const r = document.createElement("span"), i = document.createElement("span");
|
|
7152
|
-
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, r.appendChild(
|
|
7161
|
+
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, r.appendChild(en()), n.append(r, i), t.append(n), e.children && Object.keys(e.children).length > 0) {
|
|
7153
7162
|
const a = document.createElement("button");
|
|
7154
|
-
a.classList.add("expand-icon"), a.appendChild(
|
|
7163
|
+
a.classList.add("expand-icon"), a.appendChild(mn()), n.prepend(a);
|
|
7155
7164
|
const c = document.createElement("ul");
|
|
7156
7165
|
c.className = "folders nested", t.appendChild(c), a.addEventListener("click", (h) => {
|
|
7157
7166
|
h.stopPropagation(), t.classList.toggle("active"), c.classList.toggle("visible");
|
|
@@ -7167,83 +7176,83 @@ class eo {
|
|
|
7167
7176
|
"#source-folder-name"
|
|
7168
7177
|
);
|
|
7169
7178
|
c.textContent = "", c.textContent = e == null ? void 0 : e.name, (h = document.querySelector(".folder-move.selected")) == null || h.classList.remove("selected"), t.classList.add("selected");
|
|
7170
|
-
}), ((o =
|
|
7179
|
+
}), ((o = C(this, De)) == null ? void 0 : o.key) === (e == null ? void 0 : e.key) && t.classList.add("selected"), t;
|
|
7171
7180
|
}
|
|
7172
7181
|
_updateFolderListContainer() {
|
|
7173
|
-
if (
|
|
7174
|
-
if (
|
|
7182
|
+
if (C(this, Nt))
|
|
7183
|
+
if (C(this, wt).innerHTML = "", C(this, Bt)) {
|
|
7175
7184
|
const e = this._renderFolderListLoadingUI();
|
|
7176
|
-
|
|
7185
|
+
C(this, wt).appendChild(e);
|
|
7177
7186
|
} else {
|
|
7178
7187
|
const e = document.createElement("ul");
|
|
7179
|
-
e.className = "folders",
|
|
7188
|
+
e.className = "folders", C(this, wt).appendChild(e), C(this, at).forEach((t) => {
|
|
7180
7189
|
const n = this._renderFolderListContainer(t);
|
|
7181
7190
|
e.appendChild(n);
|
|
7182
|
-
}),
|
|
7191
|
+
}), C(this, Nt).appendChild(C(this, wt));
|
|
7183
7192
|
}
|
|
7184
7193
|
}
|
|
7185
7194
|
_renderToastContainer(e, t, n) {
|
|
7186
|
-
this._removeToastContainer(), H(this, lt, document.createElement("div")),
|
|
7187
|
-
const r =
|
|
7195
|
+
this._removeToastContainer(), H(this, lt, document.createElement("div")), C(this, lt).className = `message-container ${t}`;
|
|
7196
|
+
const r = tn(e, "message"), i = t === "success" ? wr() : Dn(), o = He("");
|
|
7188
7197
|
o.style.cursor = "pointer", o.style.border = "0", o.style.outline = "none", o.style.background = "transparent", o.appendChild(
|
|
7189
|
-
|
|
7198
|
+
zn(t === "error" ? "#ee3f3f" : "#4caf50")
|
|
7190
7199
|
), o.setAttribute(
|
|
7191
7200
|
"fill",
|
|
7192
7201
|
t === "error" ? "#ee3f3f" : "#4caf50"
|
|
7193
|
-
), o.onclick = () => this._removeToastContainer(),
|
|
7202
|
+
), o.onclick = () => this._removeToastContainer(), C(this, lt).append(i, r, o), n.appendChild(C(this, lt)), setTimeout(() => {
|
|
7194
7203
|
this._removeToastContainer();
|
|
7195
7204
|
}, 5e3);
|
|
7196
7205
|
}
|
|
7197
7206
|
_removeToastContainer() {
|
|
7198
|
-
|
|
7207
|
+
C(this, lt) && (C(this, lt).remove(), H(this, lt, null));
|
|
7199
7208
|
}
|
|
7200
7209
|
_updateSelectedImageListContainerUI() {
|
|
7201
7210
|
var t, n;
|
|
7202
|
-
if (!
|
|
7203
|
-
|
|
7211
|
+
if (!C(this, Ee)) return;
|
|
7212
|
+
C(this, Ee).innerHTML = "", C(this, Ze) && this._renderLoadingUI(), C(this, $e) && this._renderFetchingSkeletonUI();
|
|
7204
7213
|
const e = document.getElementById(
|
|
7205
7214
|
"search-input-wrapper"
|
|
7206
7215
|
);
|
|
7207
|
-
|
|
7216
|
+
C(this, Ft) === 0 ? (e && (e.style.visibility = "visible"), ((t = C(this, ke)) == null ? void 0 : t.length) === 0 && !C(this, $e) && !C(this, Ze) ? (C(this, Ee).classList.add(
|
|
7208
7217
|
"no-selected-image-container"
|
|
7209
|
-
), this._renderEmptyImageContainer()) : (
|
|
7218
|
+
), this._renderEmptyImageContainer()) : (C(this, Ee).classList.remove(
|
|
7210
7219
|
"no-selected-image-container"
|
|
7211
|
-
), this._renderImageListContainer())) : (e && (e.style.visibility = "hidden"), ((n =
|
|
7220
|
+
), this._renderImageListContainer())) : (e && (e.style.visibility = "hidden"), ((n = C(this, ue)) == null ? void 0 : n.length) === 0 ? (C(this, Ee).classList.add(
|
|
7212
7221
|
"no-selected-image-container"
|
|
7213
|
-
), this._renderEmptyImageContainer()) : (
|
|
7222
|
+
), this._renderEmptyImageContainer()) : (C(this, Ee).classList.remove(
|
|
7214
7223
|
"no-selected-image-container"
|
|
7215
7224
|
), this._renderSelectedImageListContainer())), this._updateContent();
|
|
7216
7225
|
}
|
|
7217
7226
|
_updateContent() {
|
|
7218
7227
|
var t, n, r;
|
|
7219
7228
|
const e = document.getElementById("selected-images-tab");
|
|
7220
|
-
e && (e.textContent = `Selected (${(t =
|
|
7229
|
+
e && (e.textContent = `Selected (${(t = C(this, ue)) == null ? void 0 : t.length})`), C(this, Qe).textContent = `Save (${(n = C(this, ue)) == null ? void 0 : n.length})`, C(this, Qe).disabled = ((r = C(this, ue)) == null ? void 0 : r.length) === 0;
|
|
7221
7230
|
}
|
|
7222
7231
|
async _uploadAndAddSelectedImageList(e, t) {
|
|
7223
7232
|
var n, r;
|
|
7224
7233
|
this._updateSelectedImageListContainerUI();
|
|
7225
7234
|
try {
|
|
7226
|
-
const i = await Fr(e, t,
|
|
7235
|
+
const i = await Fr(e, t, C(this, Oe)), o = await os(
|
|
7227
7236
|
t == null ? void 0 : t.name,
|
|
7228
7237
|
"",
|
|
7229
7238
|
i,
|
|
7230
|
-
Ye[
|
|
7231
|
-
(r =
|
|
7232
|
-
|
|
7239
|
+
Ye[Vn((n = t.type) == null ? void 0 : n.split("/")[0])],
|
|
7240
|
+
(r = C(this, De)) == null ? void 0 : r.name,
|
|
7241
|
+
C(this, Oe)
|
|
7233
7242
|
);
|
|
7234
|
-
|
|
7243
|
+
C(this, ke).unshift(o == null ? void 0 : o.response), this._renderToastContainer(
|
|
7235
7244
|
"File Uploaded Successfully",
|
|
7236
7245
|
"success",
|
|
7237
|
-
|
|
7246
|
+
C(this, we)
|
|
7238
7247
|
);
|
|
7239
7248
|
} catch {
|
|
7240
7249
|
this._renderToastContainer(
|
|
7241
7250
|
"Something went wrong while uploading file. Please try again later.",
|
|
7242
7251
|
"error",
|
|
7243
|
-
|
|
7252
|
+
C(this, we)
|
|
7244
7253
|
);
|
|
7245
7254
|
} finally {
|
|
7246
|
-
H(this,
|
|
7255
|
+
H(this, Ze, !1), this._updateSelectedImageListContainerUI();
|
|
7247
7256
|
}
|
|
7248
7257
|
}
|
|
7249
7258
|
async _updateFile(e, t) {
|
|
@@ -7257,21 +7266,21 @@ class eo {
|
|
|
7257
7266
|
t.thumborUrl,
|
|
7258
7267
|
t.proxyUrl,
|
|
7259
7268
|
t.type,
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
), r =
|
|
7269
|
+
C(this, Lt),
|
|
7270
|
+
C(this, Oe)
|
|
7271
|
+
), r = C(this, ke).find(
|
|
7263
7272
|
(i) => i.key === n.response.key
|
|
7264
7273
|
);
|
|
7265
|
-
r.name = e, this._fetchFilesFromFolder(
|
|
7274
|
+
r.name = e, this._fetchFilesFromFolder(C(this, De).name), H(this, ke, []), H(this, ue, []), this._renderToastContainer(
|
|
7266
7275
|
"File Updated Successfully",
|
|
7267
7276
|
"success",
|
|
7268
|
-
|
|
7277
|
+
C(this, we)
|
|
7269
7278
|
);
|
|
7270
7279
|
} catch {
|
|
7271
7280
|
this._renderToastContainer(
|
|
7272
7281
|
"Something went wrong while updating the file. Please try again later.",
|
|
7273
7282
|
"error",
|
|
7274
|
-
|
|
7283
|
+
C(this, we)
|
|
7275
7284
|
);
|
|
7276
7285
|
} finally {
|
|
7277
7286
|
Ce.updateUploadBtn(!1), Ce.hide(), this._updateSelectedImageListContainerUI();
|
|
@@ -7280,16 +7289,16 @@ class eo {
|
|
|
7280
7289
|
async _deleteFile(e) {
|
|
7281
7290
|
Ce.updateUploadBtn(!0);
|
|
7282
7291
|
try {
|
|
7283
|
-
await us(e,
|
|
7292
|
+
await us(e, C(this, Oe)), H(this, ke, C(this, ke).filter((t) => e !== t.key)), this._renderToastContainer(
|
|
7284
7293
|
"File Deleted Successfully",
|
|
7285
7294
|
"success",
|
|
7286
|
-
|
|
7295
|
+
C(this, we)
|
|
7287
7296
|
);
|
|
7288
7297
|
} catch {
|
|
7289
7298
|
this._renderToastContainer(
|
|
7290
7299
|
"Something went wrong while deleting the file. Please try again later.",
|
|
7291
7300
|
"error",
|
|
7292
|
-
|
|
7301
|
+
C(this, we)
|
|
7293
7302
|
);
|
|
7294
7303
|
} finally {
|
|
7295
7304
|
Ce.updateUploadBtn(!1), Ce.hide(), this._updateSelectedImageListContainerUI();
|
|
@@ -7300,17 +7309,17 @@ class eo {
|
|
|
7300
7309
|
try {
|
|
7301
7310
|
const r = await vs(
|
|
7302
7311
|
e,
|
|
7303
|
-
(n =
|
|
7312
|
+
(n = C(this, De)) == null ? void 0 : n.name,
|
|
7304
7313
|
"",
|
|
7305
7314
|
!1,
|
|
7306
|
-
|
|
7315
|
+
C(this, Oe)
|
|
7307
7316
|
);
|
|
7308
7317
|
H(this, ue, []), H(this, ke, []);
|
|
7309
|
-
const i = Os(
|
|
7318
|
+
const i = Os(C(this, at), r == null ? void 0 : r.response);
|
|
7310
7319
|
H(this, at, i), H(this, kt, e), H(this, De, { ...r == null ? void 0 : r.response, children: {} }), this._fetchFilesFromFolder(e), this._renderToastContainer(
|
|
7311
7320
|
`Folder ${e} created successfully`,
|
|
7312
7321
|
"success",
|
|
7313
|
-
|
|
7322
|
+
C(this, we)
|
|
7314
7323
|
);
|
|
7315
7324
|
} catch {
|
|
7316
7325
|
if (t > 1)
|
|
@@ -7319,7 +7328,7 @@ class eo {
|
|
|
7319
7328
|
throw this._renderToastContainer(
|
|
7320
7329
|
`Error creating folder "${e}". Either folder already exist or failed to create folder`,
|
|
7321
7330
|
"error",
|
|
7322
|
-
|
|
7331
|
+
C(this, we)
|
|
7323
7332
|
), new Error(
|
|
7324
7333
|
`Error creating folder "${e}". Either folder already exist or failed to create folder`
|
|
7325
7334
|
);
|
|
@@ -7328,7 +7337,7 @@ class eo {
|
|
|
7328
7337
|
}
|
|
7329
7338
|
}
|
|
7330
7339
|
async _upload() {
|
|
7331
|
-
return
|
|
7340
|
+
return C(this, an) ? C(this, ue) : C(this, qt);
|
|
7332
7341
|
}
|
|
7333
7342
|
async _uploadFromSource(e, t) {
|
|
7334
7343
|
this._removeUserToast();
|
|
@@ -7348,7 +7357,7 @@ class eo {
|
|
|
7348
7357
|
t
|
|
7349
7358
|
), u = await ls(
|
|
7350
7359
|
l,
|
|
7351
|
-
Ye[
|
|
7360
|
+
Ye[Vn((h = r.type) == null ? void 0 : h.split("/")[0])],
|
|
7352
7361
|
t
|
|
7353
7362
|
);
|
|
7354
7363
|
o(u);
|
|
@@ -7362,42 +7371,42 @@ class eo {
|
|
|
7362
7371
|
}
|
|
7363
7372
|
}
|
|
7364
7373
|
_uploadingState() {
|
|
7365
|
-
return
|
|
7374
|
+
return C(this, Ze);
|
|
7366
7375
|
}
|
|
7367
7376
|
async _fetchFilesFromFolder(e) {
|
|
7368
7377
|
var t, n, r;
|
|
7369
|
-
H(this,
|
|
7378
|
+
H(this, $e, !0), this._updateSelectedImageListContainerUI();
|
|
7370
7379
|
try {
|
|
7371
7380
|
const i = await cs(
|
|
7372
7381
|
e,
|
|
7373
|
-
|
|
7382
|
+
C(this, Ke),
|
|
7374
7383
|
20,
|
|
7375
|
-
|
|
7384
|
+
C(this, Oe)
|
|
7376
7385
|
), o = (t = i.response) == null ? void 0 : t.files;
|
|
7377
|
-
|
|
7386
|
+
C(this, ke).push(...o), H(this, Ke, (n = i.response) == null ? void 0 : n.nextCursor), H(this, It, (r = i.response) == null ? void 0 : r.hasMore);
|
|
7378
7387
|
} catch {
|
|
7379
7388
|
throw this._renderToastContainer(
|
|
7380
7389
|
"Error while fetching files from folder" + e,
|
|
7381
7390
|
"error",
|
|
7382
|
-
|
|
7391
|
+
C(this, we)
|
|
7383
7392
|
), new Error(
|
|
7384
7393
|
"Something went wrong. Error while fetching files from folder" + e
|
|
7385
7394
|
);
|
|
7386
7395
|
} finally {
|
|
7387
|
-
H(this,
|
|
7396
|
+
H(this, $e, !1), this._updateSelectedImageListContainerUI();
|
|
7388
7397
|
}
|
|
7389
7398
|
}
|
|
7390
7399
|
async _fetchAllFolders() {
|
|
7391
7400
|
var e, t;
|
|
7392
|
-
H(this,
|
|
7401
|
+
H(this, $e, !0), H(this, Bt, !0), this._updateSelectedImageListContainerUI(), this._updateFolderListContainer(), this._removeToastContainer();
|
|
7393
7402
|
try {
|
|
7394
|
-
const r = (await Es("", 1e3,
|
|
7403
|
+
const r = (await Es("", 1e3, C(this, Oe))).response.folder, i = Bs(r);
|
|
7395
7404
|
H(this, kt, (e = i[0]) == null ? void 0 : e.name), this._fetchFilesFromFolder((t = i[0]) == null ? void 0 : t.name), H(this, De, i[0]), H(this, at, i);
|
|
7396
7405
|
} catch {
|
|
7397
|
-
H(this,
|
|
7406
|
+
H(this, $e, !1), this._renderToastContainer(
|
|
7398
7407
|
"Folder not found. Please create a folder or try again later",
|
|
7399
7408
|
"error",
|
|
7400
|
-
|
|
7409
|
+
C(this, we)
|
|
7401
7410
|
);
|
|
7402
7411
|
} finally {
|
|
7403
7412
|
H(this, Bt, !1), this._updateFolderListContainer();
|
|
@@ -7405,23 +7414,23 @@ class eo {
|
|
|
7405
7414
|
}
|
|
7406
7415
|
async _search(e) {
|
|
7407
7416
|
var t, n;
|
|
7408
|
-
H(this,
|
|
7417
|
+
H(this, $e, !0), this._updateSelectedImageListContainerUI(), this._removeToastContainer();
|
|
7409
7418
|
try {
|
|
7410
7419
|
const r = await ds(
|
|
7411
7420
|
e,
|
|
7412
|
-
|
|
7421
|
+
C(this, Ke),
|
|
7413
7422
|
10,
|
|
7414
|
-
|
|
7423
|
+
C(this, Oe)
|
|
7415
7424
|
), i = (t = r.response) == null ? void 0 : t.items;
|
|
7416
|
-
|
|
7425
|
+
C(this, ke).push(...i), H(this, Ke, (n = r.response) == null ? void 0 : n.nextPageCursor);
|
|
7417
7426
|
} catch {
|
|
7418
7427
|
this._renderToastContainer(
|
|
7419
7428
|
"Error while searching files",
|
|
7420
7429
|
"error",
|
|
7421
|
-
|
|
7430
|
+
C(this, we)
|
|
7422
7431
|
);
|
|
7423
7432
|
} finally {
|
|
7424
|
-
H(this,
|
|
7433
|
+
H(this, $e, !1), this._updateSelectedImageListContainerUI();
|
|
7425
7434
|
}
|
|
7426
7435
|
}
|
|
7427
7436
|
async _updateFolder(e, t) {
|
|
@@ -7432,13 +7441,13 @@ class eo {
|
|
|
7432
7441
|
e,
|
|
7433
7442
|
t.nestedFolderName,
|
|
7434
7443
|
t.createdBy,
|
|
7435
|
-
|
|
7444
|
+
C(this, Oe)
|
|
7436
7445
|
);
|
|
7437
7446
|
} catch {
|
|
7438
7447
|
throw this._renderToastContainer(
|
|
7439
7448
|
"Something went wrong while updating the folder. Please try again later.",
|
|
7440
7449
|
"error",
|
|
7441
|
-
|
|
7450
|
+
C(this, we)
|
|
7442
7451
|
), new Error("Error updating the folder ");
|
|
7443
7452
|
} finally {
|
|
7444
7453
|
Ce.updateUploadBtn(!1), Ce.hide(), this._updateFolderListContainer();
|
|
@@ -7447,16 +7456,16 @@ class eo {
|
|
|
7447
7456
|
async _deleteFolder(e) {
|
|
7448
7457
|
Ce.updateUploadBtn(!0);
|
|
7449
7458
|
try {
|
|
7450
|
-
await ks(e,
|
|
7459
|
+
await ks(e, C(this, Oe)), H(this, at, C(this, at).filter((t) => t.key !== e)), this._renderToastContainer(
|
|
7451
7460
|
"Folder Deleted Successfully",
|
|
7452
7461
|
"success",
|
|
7453
|
-
|
|
7462
|
+
C(this, we)
|
|
7454
7463
|
);
|
|
7455
7464
|
} catch {
|
|
7456
7465
|
throw this._renderToastContainer(
|
|
7457
7466
|
"Something went wrong while deleting the folder. Please try again later.",
|
|
7458
7467
|
"error",
|
|
7459
|
-
|
|
7468
|
+
C(this, we)
|
|
7460
7469
|
), new Error("Error deleting the folder ");
|
|
7461
7470
|
} finally {
|
|
7462
7471
|
Ce.updateUploadBtn(!1), Ce.hide(), this._updateFolderListContainer();
|
|
@@ -7465,13 +7474,13 @@ class eo {
|
|
|
7465
7474
|
_createUpdateFolderDialog(e, t, n) {
|
|
7466
7475
|
e.addEventListener("click", (r) => {
|
|
7467
7476
|
var R, O, v, L;
|
|
7468
|
-
r.stopPropagation(),
|
|
7477
|
+
r.stopPropagation(), Xe.hide();
|
|
7469
7478
|
let i;
|
|
7470
7479
|
const o = K("edit-form-wrapper"), a = K("form-control"), c = Q(
|
|
7471
7480
|
"div",
|
|
7472
7481
|
"",
|
|
7473
7482
|
"display:flex;align-items:center;gap:5px;"
|
|
7474
|
-
), h = Qs("20px", "20px"), l =
|
|
7483
|
+
), h = Qs("20px", "20px"), l = mn("20px", "20px"), u = mn("20px", "20px"), d = (R = C(this, De)) != null && R.nestedFolderName ? (O = C(this, De)) == null ? void 0 : O.nestedFolderName : "", f = (v = C(this, De)) != null && v.name ? (L = C(this, De)) == null ? void 0 : L.name : "";
|
|
7475
7484
|
d ? c.append(
|
|
7476
7485
|
h,
|
|
7477
7486
|
l,
|
|
@@ -7483,12 +7492,12 @@ class eo {
|
|
|
7483
7492
|
F.style.position = "relative";
|
|
7484
7493
|
const I = document.createElement("input");
|
|
7485
7494
|
I.style.paddingLeft = "40px";
|
|
7486
|
-
const
|
|
7495
|
+
const E = Q(
|
|
7487
7496
|
"span",
|
|
7488
7497
|
"",
|
|
7489
7498
|
"position:absolute;top:50%;left:5%;transform:translate(-40%,-40%)"
|
|
7490
7499
|
);
|
|
7491
|
-
|
|
7500
|
+
E.appendChild(en()), I.classList.add("input-field"), F.append(I, E), t === "update" && (I.value = n.name), I.onchange = (b) => {
|
|
7492
7501
|
i = b.target.value;
|
|
7493
7502
|
}, a.append(
|
|
7494
7503
|
c,
|
|
@@ -7525,7 +7534,7 @@ class eo {
|
|
|
7525
7534
|
this.updateWindowObject({ grpcConfig: r });
|
|
7526
7535
|
}
|
|
7527
7536
|
}
|
|
7528
|
-
mt = new WeakMap(), we = new WeakMap(), Ee = new WeakMap(), gt = new WeakMap(), ue = new WeakMap(), ke = new WeakMap(),
|
|
7537
|
+
mt = new WeakMap(), we = new WeakMap(), Ee = new WeakMap(), gt = new WeakMap(), ue = new WeakMap(), ke = new WeakMap(), Ze = new WeakMap(), $e = new WeakMap(), Bt = new WeakMap(), kt = new WeakMap(), at = new WeakMap(), De = new WeakMap(), Qe = new WeakMap(), Ot = new WeakMap(), Ft = new WeakMap(), Nt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), lt = new WeakMap(), Ke = new WeakMap(), It = new WeakMap(), Tt = new WeakMap(), yt = new WeakMap(), jt = new WeakMap(), sn = new WeakMap(), Oe = new WeakMap(), Rt = new WeakMap(), on = new WeakMap(), Tn = new WeakMap(), an = new WeakMap(), ct = new WeakMap(), qt = new WeakMap(), Lt = new WeakMap(), Zt = new WeakMap(), Dt = new WeakMap(), Kt = new WeakMap(), zt = new WeakMap(), Xt = new WeakMap(), ln = new WeakMap(), cn = new WeakMap(), Gt = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), dn = new WeakMap(), Qt = new WeakMap();
|
|
7529
7538
|
export {
|
|
7530
7539
|
eo as default
|
|
7531
7540
|
};
|