image-salon-sdk 1.0.77 → 1.0.78
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 +801 -813
- package/dist/image-salon-sdk.umd.cjs +8 -8
- package/package.json +1 -1
package/dist/image-salon-sdk.js
CHANGED
|
@@ -5,8 +5,8 @@ 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 E = (s, e, t) => (nr(s, e, "read from private field"), t ? t.call(s) : e.get(s)),
|
|
9
|
-
function
|
|
8
|
+
var E = (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
|
+
function Ir(s) {
|
|
10
10
|
let e = typeof s;
|
|
11
11
|
if (e == "object") {
|
|
12
12
|
if (Array.isArray(s))
|
|
@@ -96,10 +96,10 @@ var G;
|
|
|
96
96
|
function ai(s, e) {
|
|
97
97
|
return Object.assign(Object.assign({}, s), e);
|
|
98
98
|
}
|
|
99
|
-
var
|
|
99
|
+
var W;
|
|
100
100
|
(function(s) {
|
|
101
101
|
s[s.Varint = 0] = "Varint", s[s.Bit64 = 1] = "Bit64", s[s.LengthDelimited = 2] = "LengthDelimited", s[s.StartGroup = 3] = "StartGroup", s[s.EndGroup = 4] = "EndGroup", s[s.Bit32 = 5] = "Bit32";
|
|
102
|
-
})(
|
|
102
|
+
})(W || (W = {}));
|
|
103
103
|
function li() {
|
|
104
104
|
let s = 0, e = 0;
|
|
105
105
|
for (let n = 0; n < 28; n += 7) {
|
|
@@ -415,22 +415,22 @@ class ui {
|
|
|
415
415
|
skip(e) {
|
|
416
416
|
let t = this.pos;
|
|
417
417
|
switch (e) {
|
|
418
|
-
case
|
|
418
|
+
case W.Varint:
|
|
419
419
|
for (; this.buf[this.pos++] & 128; )
|
|
420
420
|
;
|
|
421
421
|
break;
|
|
422
|
-
case
|
|
422
|
+
case W.Bit64:
|
|
423
423
|
this.pos += 4;
|
|
424
|
-
case
|
|
424
|
+
case W.Bit32:
|
|
425
425
|
this.pos += 4;
|
|
426
426
|
break;
|
|
427
|
-
case
|
|
427
|
+
case W.LengthDelimited:
|
|
428
428
|
let n = this.uint32();
|
|
429
429
|
this.pos += n;
|
|
430
430
|
break;
|
|
431
|
-
case
|
|
431
|
+
case W.StartGroup:
|
|
432
432
|
let r;
|
|
433
|
-
for (; (r = this.tag()[1]) !==
|
|
433
|
+
for (; (r = this.tag()[1]) !== W.EndGroup; )
|
|
434
434
|
this.skip(r);
|
|
435
435
|
break;
|
|
436
436
|
default:
|
|
@@ -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 Wn(s) {
|
|
746
746
|
let e = !1;
|
|
747
747
|
const t = [];
|
|
748
748
|
for (let n = 0; n < s.length; n++) {
|
|
@@ -765,7 +765,7 @@ var En;
|
|
|
765
765
|
})(En || (En = {}));
|
|
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 : Wn(s.name), s.jsonName = (t = s.jsonName) !== null && t !== void 0 ? t : Wn(s.name), s.repeat = (n = s.repeat) !== null && n !== void 0 ? n : En.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"))
|
|
@@ -779,7 +779,7 @@ function ki(s) {
|
|
|
779
779
|
return !1;
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
|
-
class
|
|
782
|
+
class Fi {
|
|
783
783
|
constructor(e) {
|
|
784
784
|
var t;
|
|
785
785
|
this.fields = (t = e.fields) !== null && t !== void 0 ? t : [];
|
|
@@ -965,7 +965,7 @@ function et(s, e) {
|
|
|
965
965
|
return s.toString();
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
class
|
|
968
|
+
class Ni {
|
|
969
969
|
constructor(e) {
|
|
970
970
|
this.info = e;
|
|
971
971
|
}
|
|
@@ -981,7 +981,7 @@ class Fi {
|
|
|
981
981
|
// Cannot parse JSON <type of jsonValue> for <type name>#<fieldName>.
|
|
982
982
|
assert(e, t, n) {
|
|
983
983
|
if (!e) {
|
|
984
|
-
let r =
|
|
984
|
+
let r = Ir(n);
|
|
985
985
|
throw (r == "number" || r == "boolean") && (r = n.toString()), new Error(`Cannot parse JSON ${r} for ${this.info.typeName}#${t}`);
|
|
986
986
|
}
|
|
987
987
|
}
|
|
@@ -1195,7 +1195,7 @@ class Fi {
|
|
|
1195
1195
|
this.assert(!1, r + (i ? " - " + i : ""), e);
|
|
1196
1196
|
}
|
|
1197
1197
|
}
|
|
1198
|
-
class
|
|
1198
|
+
class Ii {
|
|
1199
1199
|
constructor(e) {
|
|
1200
1200
|
var t;
|
|
1201
1201
|
this.fields = (t = e.fields) !== null && t !== void 0 ? t : [];
|
|
@@ -1344,7 +1344,7 @@ class Ni {
|
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function jn(s, e = ut.STRING) {
|
|
1348
1348
|
switch (s) {
|
|
1349
1349
|
case D.BOOL:
|
|
1350
1350
|
return !1;
|
|
@@ -1407,26 +1407,26 @@ class Ti {
|
|
|
1407
1407
|
case "enum":
|
|
1408
1408
|
let d = c.kind == "enum" ? D.INT32 : c.T, f = c.kind == "scalar" ? c.L : void 0;
|
|
1409
1409
|
if (l) {
|
|
1410
|
-
let
|
|
1411
|
-
if (a ==
|
|
1410
|
+
let I = h[u];
|
|
1411
|
+
if (a == W.LengthDelimited && d != D.STRING && d != D.BYTES) {
|
|
1412
1412
|
let C = e.uint32() + e.pos;
|
|
1413
1413
|
for (; e.pos < C; )
|
|
1414
|
-
|
|
1414
|
+
I.push(this.scalar(e, d, f));
|
|
1415
1415
|
} else
|
|
1416
|
-
|
|
1416
|
+
I.push(this.scalar(e, d, f));
|
|
1417
1417
|
} else
|
|
1418
1418
|
h[u] = this.scalar(e, d, f);
|
|
1419
1419
|
break;
|
|
1420
1420
|
case "message":
|
|
1421
1421
|
if (l) {
|
|
1422
|
-
let
|
|
1423
|
-
|
|
1422
|
+
let I = h[u], C = c.T().internalBinaryRead(e, e.uint32(), n);
|
|
1423
|
+
I.push(C);
|
|
1424
1424
|
} else
|
|
1425
1425
|
h[u] = c.T().internalBinaryRead(e, e.uint32(), n, h[u]);
|
|
1426
1426
|
break;
|
|
1427
1427
|
case "map":
|
|
1428
|
-
let [y,
|
|
1429
|
-
h[u][y] =
|
|
1428
|
+
let [y, F] = this.mapEntry(c, e, n);
|
|
1429
|
+
h[u][y] = F;
|
|
1430
1430
|
break;
|
|
1431
1431
|
}
|
|
1432
1432
|
}
|
|
@@ -1460,13 +1460,13 @@ class Ti {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
}
|
|
1462
1462
|
if (o === void 0) {
|
|
1463
|
-
let c =
|
|
1463
|
+
let c = jn(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 = jn(e.V.T, e.V.L);
|
|
1470
1470
|
break;
|
|
1471
1471
|
case "enum":
|
|
1472
1472
|
a = 0;
|
|
@@ -1567,7 +1567,7 @@ class Li {
|
|
|
1567
1567
|
r !== !1 && (r === !0 ? G.onWrite : r)(this.info.typeName, e, t);
|
|
1568
1568
|
}
|
|
1569
1569
|
mapEntry(e, t, n, r, i) {
|
|
1570
|
-
e.tag(n.no,
|
|
1570
|
+
e.tag(n.no, W.LengthDelimited), e.fork();
|
|
1571
1571
|
let o = r;
|
|
1572
1572
|
switch (n.K) {
|
|
1573
1573
|
case D.INT32:
|
|
@@ -1595,7 +1595,7 @@ class Li {
|
|
|
1595
1595
|
e.join();
|
|
1596
1596
|
}
|
|
1597
1597
|
message(e, t, n, r, i) {
|
|
1598
|
-
i !== void 0 && (n.internalBinaryWrite(i, e.tag(r,
|
|
1598
|
+
i !== void 0 && (n.internalBinaryWrite(i, e.tag(r, W.LengthDelimited).fork(), t), e.join());
|
|
1599
1599
|
}
|
|
1600
1600
|
/**
|
|
1601
1601
|
* Write a single scalar value.
|
|
@@ -1610,7 +1610,7 @@ class Li {
|
|
|
1610
1610
|
packed(e, t, n, r) {
|
|
1611
1611
|
if (!r.length)
|
|
1612
1612
|
return;
|
|
1613
|
-
J(t !== D.BYTES && t !== D.STRING), e.tag(n,
|
|
1613
|
+
J(t !== D.BYTES && t !== D.STRING), e.tag(n, W.LengthDelimited), e.fork();
|
|
1614
1614
|
let [, i] = this.scalarInfo(t);
|
|
1615
1615
|
for (let o = 0; o < r.length; o++)
|
|
1616
1616
|
e[i](r[o]);
|
|
@@ -1627,13 +1627,13 @@ class Li {
|
|
|
1627
1627
|
* If argument `value` is omitted, [2] is always false.
|
|
1628
1628
|
*/
|
|
1629
1629
|
scalarInfo(e, t) {
|
|
1630
|
-
let n =
|
|
1630
|
+
let n = W.Varint, r, i = t === void 0, o = t === 0;
|
|
1631
1631
|
switch (e) {
|
|
1632
1632
|
case D.INT32:
|
|
1633
1633
|
r = "int32";
|
|
1634
1634
|
break;
|
|
1635
1635
|
case D.STRING:
|
|
1636
|
-
o = i || !t.length, n =
|
|
1636
|
+
o = i || !t.length, n = W.LengthDelimited, r = "string";
|
|
1637
1637
|
break;
|
|
1638
1638
|
case D.BOOL:
|
|
1639
1639
|
o = t === !1, r = "bool";
|
|
@@ -1642,10 +1642,10 @@ class Li {
|
|
|
1642
1642
|
r = "uint32";
|
|
1643
1643
|
break;
|
|
1644
1644
|
case D.DOUBLE:
|
|
1645
|
-
n =
|
|
1645
|
+
n = W.Bit64, r = "double";
|
|
1646
1646
|
break;
|
|
1647
1647
|
case D.FLOAT:
|
|
1648
|
-
n =
|
|
1648
|
+
n = W.Bit32, r = "float";
|
|
1649
1649
|
break;
|
|
1650
1650
|
case D.INT64:
|
|
1651
1651
|
o = i || ve.from(t).isZero(), r = "int64";
|
|
@@ -1654,19 +1654,19 @@ class Li {
|
|
|
1654
1654
|
o = i || Se.from(t).isZero(), r = "uint64";
|
|
1655
1655
|
break;
|
|
1656
1656
|
case D.FIXED64:
|
|
1657
|
-
o = i || Se.from(t).isZero(), n =
|
|
1657
|
+
o = i || Se.from(t).isZero(), n = W.Bit64, r = "fixed64";
|
|
1658
1658
|
break;
|
|
1659
1659
|
case D.BYTES:
|
|
1660
|
-
o = i || !t.byteLength, n =
|
|
1660
|
+
o = i || !t.byteLength, n = W.LengthDelimited, r = "bytes";
|
|
1661
1661
|
break;
|
|
1662
1662
|
case D.FIXED32:
|
|
1663
|
-
n =
|
|
1663
|
+
n = W.Bit32, r = "fixed32";
|
|
1664
1664
|
break;
|
|
1665
1665
|
case D.SFIXED32:
|
|
1666
|
-
n =
|
|
1666
|
+
n = W.Bit32, r = "sfixed32";
|
|
1667
1667
|
break;
|
|
1668
1668
|
case D.SFIXED64:
|
|
1669
|
-
o = i || ve.from(t).isZero(), n =
|
|
1669
|
+
o = i || ve.from(t).isZero(), n = W.Bit64, r = "sfixed64";
|
|
1670
1670
|
break;
|
|
1671
1671
|
case D.SINT32:
|
|
1672
1672
|
r = "sint32";
|
|
@@ -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] = jn(t.T, t.L);
|
|
1694
1694
|
break;
|
|
1695
1695
|
case "enum":
|
|
1696
1696
|
e[n] = 0;
|
|
@@ -1806,9 +1806,9 @@ function cr(s, e, t) {
|
|
|
1806
1806
|
return !0;
|
|
1807
1807
|
}
|
|
1808
1808
|
const _i = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
|
|
1809
|
-
class
|
|
1809
|
+
class Fe {
|
|
1810
1810
|
constructor(e, t, n) {
|
|
1811
|
-
this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(Ai), this.options = n ?? {}, this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, _i), { [Or]: { value: this } })), this.refTypeCheck = new
|
|
1811
|
+
this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(Ai), this.options = n ?? {}, this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, _i), { [Or]: { value: this } })), this.refTypeCheck = new Fi(this), this.refJsonReader = new Ni(this), this.refJsonWriter = new Ii(this), this.refBinReader = new Ti(this), this.refBinWriter = new Li(this);
|
|
1812
1812
|
}
|
|
1813
1813
|
create(e) {
|
|
1814
1814
|
let t = Ui(this);
|
|
@@ -1908,7 +1908,7 @@ class Ie {
|
|
|
1908
1908
|
let r = n ?? this.create();
|
|
1909
1909
|
return this.refJsonReader.read(e, r, t), r;
|
|
1910
1910
|
}
|
|
1911
|
-
throw new Error(`Unable to parse message ${this.typeName} from JSON ${
|
|
1911
|
+
throw new Error(`Unable to parse message ${this.typeName} from JSON ${Ir(e)}.`);
|
|
1912
1912
|
}
|
|
1913
1913
|
/**
|
|
1914
1914
|
* This is an internal method. If you just want to write a message
|
|
@@ -1945,7 +1945,7 @@ class Ie {
|
|
|
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 : Wn(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) {
|
|
@@ -2000,10 +2000,10 @@ function fn(s, e) {
|
|
|
2000
2000
|
for (let [n, r] of Object.entries(s))
|
|
2001
2001
|
r instanceof Date ? t[n] = new Date(r.getTime()) : Array.isArray(r) ? t[n] = r.concat() : t[n] = r;
|
|
2002
2002
|
}
|
|
2003
|
-
var
|
|
2003
|
+
var qe;
|
|
2004
2004
|
(function(s) {
|
|
2005
2005
|
s[s.PENDING = 0] = "PENDING", s[s.REJECTED = 1] = "REJECTED", s[s.RESOLVED = 2] = "RESOLVED";
|
|
2006
|
-
})(
|
|
2006
|
+
})(qe || (qe = {}));
|
|
2007
2007
|
class At {
|
|
2008
2008
|
/**
|
|
2009
2009
|
* @param preventUnhandledRejectionWarning - prevents the warning
|
|
@@ -2018,7 +2018,7 @@ class At {
|
|
|
2018
2018
|
* others.
|
|
2019
2019
|
*/
|
|
2020
2020
|
constructor(e = !0) {
|
|
2021
|
-
this._state =
|
|
2021
|
+
this._state = qe.PENDING, this._promise = new Promise((t, n) => {
|
|
2022
2022
|
this._resolve = t, this._reject = n;
|
|
2023
2023
|
}), e && this._promise.catch((t) => {
|
|
2024
2024
|
});
|
|
@@ -2039,29 +2039,29 @@ class At {
|
|
|
2039
2039
|
* Resolve the promise. Throws if the promise is already resolved or rejected.
|
|
2040
2040
|
*/
|
|
2041
2041
|
resolve(e) {
|
|
2042
|
-
if (this.state !==
|
|
2043
|
-
throw new Error(`cannot resolve ${
|
|
2044
|
-
this._resolve(e), this._state =
|
|
2042
|
+
if (this.state !== qe.PENDING)
|
|
2043
|
+
throw new Error(`cannot resolve ${qe[this.state].toLowerCase()}`);
|
|
2044
|
+
this._resolve(e), this._state = qe.RESOLVED;
|
|
2045
2045
|
}
|
|
2046
2046
|
/**
|
|
2047
2047
|
* Reject the promise. Throws if the promise is already resolved or rejected.
|
|
2048
2048
|
*/
|
|
2049
2049
|
reject(e) {
|
|
2050
|
-
if (this.state !==
|
|
2051
|
-
throw new Error(`cannot reject ${
|
|
2052
|
-
this._reject(e), this._state =
|
|
2050
|
+
if (this.state !== qe.PENDING)
|
|
2051
|
+
throw new Error(`cannot reject ${qe[this.state].toLowerCase()}`);
|
|
2052
|
+
this._reject(e), this._state = qe.REJECTED;
|
|
2053
2053
|
}
|
|
2054
2054
|
/**
|
|
2055
2055
|
* Resolve the promise. Ignore if not pending.
|
|
2056
2056
|
*/
|
|
2057
2057
|
resolvePending(e) {
|
|
2058
|
-
this._state ===
|
|
2058
|
+
this._state === qe.PENDING && this.resolve(e);
|
|
2059
2059
|
}
|
|
2060
2060
|
/**
|
|
2061
2061
|
* Reject the promise. Ignore if not pending.
|
|
2062
2062
|
*/
|
|
2063
2063
|
rejectPending(e) {
|
|
2064
|
-
this._state ===
|
|
2064
|
+
this._state === qe.PENDING && this.reject(e);
|
|
2065
2065
|
}
|
|
2066
2066
|
}
|
|
2067
2067
|
class Si {
|
|
@@ -2166,7 +2166,7 @@ class Si {
|
|
|
2166
2166
|
if (t)
|
|
2167
2167
|
if (t.p) {
|
|
2168
2168
|
const n = t.p;
|
|
2169
|
-
J(n.state ==
|
|
2169
|
+
J(n.state == qe.PENDING, "iterator contract broken"), "value" in e ? n.resolve(e) : n.reject(e), delete t.p;
|
|
2170
2170
|
} else
|
|
2171
2171
|
t.q.push(e);
|
|
2172
2172
|
}
|
|
@@ -2289,10 +2289,10 @@ function Me(s, e, t, n, r) {
|
|
|
2289
2289
|
return o(t, r, n);
|
|
2290
2290
|
}
|
|
2291
2291
|
}
|
|
2292
|
-
var
|
|
2292
|
+
var j;
|
|
2293
2293
|
(function(s) {
|
|
2294
2294
|
s[s.OK = 0] = "OK", s[s.CANCELLED = 1] = "CANCELLED", s[s.UNKNOWN = 2] = "UNKNOWN", s[s.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT", s[s.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", s[s.NOT_FOUND = 5] = "NOT_FOUND", s[s.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", s[s.PERMISSION_DENIED = 7] = "PERMISSION_DENIED", s[s.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", s[s.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED", s[s.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", s[s.ABORTED = 10] = "ABORTED", s[s.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", s[s.UNIMPLEMENTED = 12] = "UNIMPLEMENTED", s[s.INTERNAL = 13] = "INTERNAL", s[s.UNAVAILABLE = 14] = "UNAVAILABLE", s[s.DATA_LOSS = 15] = "DATA_LOSS";
|
|
2295
|
-
})(
|
|
2295
|
+
})(j || (j = {}));
|
|
2296
2296
|
var Hi = function(s, e, t, n) {
|
|
2297
2297
|
function r(i) {
|
|
2298
2298
|
return i instanceof t ? i : new t(function(o) {
|
|
@@ -2330,12 +2330,12 @@ function dr(s, e, t, n, r) {
|
|
|
2330
2330
|
s.append(i, a);
|
|
2331
2331
|
if (s.set("Content-Type", e === "text" ? "application/grpc-web-text" : "application/grpc-web+proto"), e == "text" && s.set("Accept", "application/grpc-web-text"), s.set("X-Grpc-Web", "1"), typeof t == "number") {
|
|
2332
2332
|
if (t <= 0)
|
|
2333
|
-
throw new ie(`timeout ${t} ms exceeded`,
|
|
2333
|
+
throw new ie(`timeout ${t} ms exceeded`, j[j.DEADLINE_EXCEEDED]);
|
|
2334
2334
|
s.set("grpc-timeout", `${t}m`);
|
|
2335
2335
|
} else if (t) {
|
|
2336
2336
|
const i = t.getTime(), o = Date.now();
|
|
2337
2337
|
if (i <= o)
|
|
2338
|
-
throw new ie(`deadline ${t} exceeded`,
|
|
2338
|
+
throw new ie(`deadline ${t} exceeded`, j[j.DEADLINE_EXCEEDED]);
|
|
2339
2339
|
s.set("grpc-timeout", `${i - o}m`);
|
|
2340
2340
|
}
|
|
2341
2341
|
return s;
|
|
@@ -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 qn(s, e, t) {
|
|
2351
2351
|
if (arguments.length === 1) {
|
|
2352
2352
|
let c = s, h;
|
|
2353
2353
|
try {
|
|
@@ -2358,16 +2358,16 @@ function jn(s, e, t) {
|
|
|
2358
2358
|
case "error":
|
|
2359
2359
|
case "opaque":
|
|
2360
2360
|
case "opaqueredirect":
|
|
2361
|
-
throw new ie(`fetch response type ${c.type}`,
|
|
2361
|
+
throw new ie(`fetch response type ${c.type}`, j[j.UNKNOWN]);
|
|
2362
2362
|
}
|
|
2363
|
-
return
|
|
2363
|
+
return qn(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
|
-
return (o === void 0 || o ===
|
|
2366
|
+
return (o === void 0 || o === j.OK) && !r && (o = qi(e), a = t), [o, a, i];
|
|
2367
2367
|
}
|
|
2368
2368
|
function ur(s) {
|
|
2369
|
-
let e =
|
|
2370
|
-
return [t ??
|
|
2369
|
+
let e = Wi(s), [t, n] = Rr(e), r = Dr(e);
|
|
2370
|
+
return [t ?? j.OK, n, r];
|
|
2371
2371
|
}
|
|
2372
2372
|
var tt;
|
|
2373
2373
|
(function(s) {
|
|
@@ -2376,7 +2376,7 @@ var tt;
|
|
|
2376
2376
|
function fr(s, e, t) {
|
|
2377
2377
|
return Hi(this, void 0, void 0, function* () {
|
|
2378
2378
|
let n, r = "", i = new Uint8Array(0), o = Pi(e);
|
|
2379
|
-
if (
|
|
2379
|
+
if ($i(s)) {
|
|
2380
2380
|
let a = s.getReader();
|
|
2381
2381
|
n = {
|
|
2382
2382
|
next: () => a.read()
|
|
@@ -2409,14 +2409,14 @@ function fr(s, e, t) {
|
|
|
2409
2409
|
if (i.length === 0)
|
|
2410
2410
|
break;
|
|
2411
2411
|
if (i[0] !== tt.TRAILER || i.length < 5)
|
|
2412
|
-
throw new ie("premature EOF",
|
|
2412
|
+
throw new ie("premature EOF", j[j.DATA_LOSS]);
|
|
2413
2413
|
t(tt.TRAILER, i.subarray(5));
|
|
2414
2414
|
break;
|
|
2415
2415
|
}
|
|
2416
2416
|
}
|
|
2417
2417
|
});
|
|
2418
2418
|
}
|
|
2419
|
-
const
|
|
2419
|
+
const $i = (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;
|
|
@@ -2431,24 +2431,24 @@ function Pi(s) {
|
|
|
2431
2431
|
return "binary";
|
|
2432
2432
|
case void 0:
|
|
2433
2433
|
case null:
|
|
2434
|
-
throw new ie("missing response content type",
|
|
2434
|
+
throw new ie("missing response content type", j[j.INTERNAL]);
|
|
2435
2435
|
default:
|
|
2436
|
-
throw new ie("unexpected response content type: " + s,
|
|
2436
|
+
throw new ie("unexpected response content type: " + s, j[j.INTERNAL]);
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
2439
2439
|
function Rr(s) {
|
|
2440
2440
|
let e, t, n = s["grpc-message"];
|
|
2441
2441
|
if (n !== void 0) {
|
|
2442
2442
|
if (Array.isArray(n))
|
|
2443
|
-
return [
|
|
2443
|
+
return [j.INTERNAL, "invalid grpc-web message"];
|
|
2444
2444
|
t = n;
|
|
2445
2445
|
}
|
|
2446
2446
|
let r = s["grpc-status"];
|
|
2447
2447
|
if (r !== void 0) {
|
|
2448
2448
|
if (Array.isArray(r))
|
|
2449
|
-
return [
|
|
2450
|
-
if (e = parseInt(r, 10),
|
|
2451
|
-
return [
|
|
2449
|
+
return [j.INTERNAL, "invalid grpc-web status"];
|
|
2450
|
+
if (e = parseInt(r, 10), j[e] === void 0)
|
|
2451
|
+
return [j.INTERNAL, "invalid grpc-web status"];
|
|
2452
2452
|
}
|
|
2453
2453
|
return [e, t];
|
|
2454
2454
|
}
|
|
@@ -2465,7 +2465,7 @@ function Dr(s) {
|
|
|
2465
2465
|
}
|
|
2466
2466
|
return e;
|
|
2467
2467
|
}
|
|
2468
|
-
function
|
|
2468
|
+
function Wi(s) {
|
|
2469
2469
|
let e = {};
|
|
2470
2470
|
for (let t of String.fromCharCode.apply(String, s).trim().split(`\r
|
|
2471
2471
|
`)) {
|
|
@@ -2479,46 +2479,46 @@ function $i(s) {
|
|
|
2479
2479
|
}
|
|
2480
2480
|
return e;
|
|
2481
2481
|
}
|
|
2482
|
-
function
|
|
2482
|
+
function ji(s) {
|
|
2483
2483
|
let e = {};
|
|
2484
2484
|
return s.forEach((t, n) => {
|
|
2485
2485
|
let r = e[n];
|
|
2486
2486
|
typeof r == "string" ? e[n] = [r, t] : Array.isArray(r) ? r.push(t) : e[n] = t;
|
|
2487
2487
|
}), e;
|
|
2488
2488
|
}
|
|
2489
|
-
function
|
|
2489
|
+
function qi(s) {
|
|
2490
2490
|
switch (s) {
|
|
2491
2491
|
case 200:
|
|
2492
|
-
return
|
|
2492
|
+
return j.OK;
|
|
2493
2493
|
case 400:
|
|
2494
|
-
return
|
|
2494
|
+
return j.INVALID_ARGUMENT;
|
|
2495
2495
|
case 401:
|
|
2496
|
-
return
|
|
2496
|
+
return j.UNAUTHENTICATED;
|
|
2497
2497
|
case 403:
|
|
2498
|
-
return
|
|
2498
|
+
return j.PERMISSION_DENIED;
|
|
2499
2499
|
case 404:
|
|
2500
|
-
return
|
|
2500
|
+
return j.NOT_FOUND;
|
|
2501
2501
|
case 409:
|
|
2502
|
-
return
|
|
2502
|
+
return j.ABORTED;
|
|
2503
2503
|
case 412:
|
|
2504
|
-
return
|
|
2504
|
+
return j.FAILED_PRECONDITION;
|
|
2505
2505
|
case 429:
|
|
2506
|
-
return
|
|
2506
|
+
return j.RESOURCE_EXHAUSTED;
|
|
2507
2507
|
case 499:
|
|
2508
|
-
return
|
|
2508
|
+
return j.CANCELLED;
|
|
2509
2509
|
case 500:
|
|
2510
|
-
return
|
|
2510
|
+
return j.UNKNOWN;
|
|
2511
2511
|
case 501:
|
|
2512
|
-
return
|
|
2512
|
+
return j.UNIMPLEMENTED;
|
|
2513
2513
|
case 503:
|
|
2514
|
-
return
|
|
2514
|
+
return j.UNAVAILABLE;
|
|
2515
2515
|
case 504:
|
|
2516
|
-
return
|
|
2516
|
+
return j.DEADLINE_EXCEEDED;
|
|
2517
2517
|
default:
|
|
2518
|
-
return
|
|
2518
|
+
return j.UNKNOWN;
|
|
2519
2519
|
}
|
|
2520
2520
|
}
|
|
2521
|
-
class
|
|
2521
|
+
class Zi {
|
|
2522
2522
|
constructor(e) {
|
|
2523
2523
|
this.defaultOptions = e;
|
|
2524
2524
|
}
|
|
@@ -2546,16 +2546,16 @@ class qi {
|
|
|
2546
2546
|
return n.endsWith("/") && (n = n.substring(0, n.length - 1)), `${n}/${e.service.typeName}/${e.name}`;
|
|
2547
2547
|
}
|
|
2548
2548
|
clientStreaming(e) {
|
|
2549
|
-
const t = new ie("Client streaming is not supported by grpc-web",
|
|
2549
|
+
const t = new ie("Client streaming is not supported by grpc-web", j[j.UNIMPLEMENTED]);
|
|
2550
2550
|
throw t.methodName = e.name, t.serviceName = e.service.typeName, t;
|
|
2551
2551
|
}
|
|
2552
2552
|
duplex(e) {
|
|
2553
|
-
const t = new ie("Duplex streaming is not supported by grpc-web",
|
|
2553
|
+
const t = new ie("Duplex streaming is not supported by grpc-web", j[j.UNIMPLEMENTED]);
|
|
2554
2554
|
throw t.methodName = e.name, t.serviceName = e.service.typeName, t;
|
|
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(),
|
|
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, C = 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,46 +2563,46 @@ class qi {
|
|
|
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] =
|
|
2567
|
-
if (f.resolve(B), L != null && L !==
|
|
2568
|
-
throw new ie(b ??
|
|
2569
|
-
return L != null && (
|
|
2570
|
-
code:
|
|
2571
|
-
detail: b ??
|
|
2566
|
+
let [L, b, B] = qn(v);
|
|
2567
|
+
if (f.resolve(B), L != null && L !== j.OK)
|
|
2568
|
+
throw new ie(b ?? j[L], j[L], B);
|
|
2569
|
+
return L != null && (I = {
|
|
2570
|
+
code: j[L],
|
|
2571
|
+
detail: b ?? j[L]
|
|
2572
2572
|
}), v;
|
|
2573
2573
|
}).then((v) => {
|
|
2574
2574
|
if (!v.body)
|
|
2575
|
-
throw new ie("missing response body",
|
|
2575
|
+
throw new ie("missing response body", j[j.INTERNAL]);
|
|
2576
2576
|
return fr(v.body, v.headers.get("content-type"), (L, b) => {
|
|
2577
2577
|
switch (L) {
|
|
2578
2578
|
case tt.DATA:
|
|
2579
|
-
y.notifyMessage(e.O.fromBinary(b, c.binaryOptions)),
|
|
2579
|
+
y.notifyMessage(e.O.fromBinary(b, c.binaryOptions)), F = !1;
|
|
2580
2580
|
break;
|
|
2581
2581
|
case tt.TRAILER:
|
|
2582
2582
|
let B, m;
|
|
2583
|
-
[B, m, R] = ur(b),
|
|
2584
|
-
code:
|
|
2585
|
-
detail: m ??
|
|
2583
|
+
[B, m, R] = ur(b), I = {
|
|
2584
|
+
code: j[B],
|
|
2585
|
+
detail: m ?? j[B]
|
|
2586
2586
|
};
|
|
2587
2587
|
break;
|
|
2588
2588
|
}
|
|
2589
2589
|
});
|
|
2590
2590
|
}).then(() => {
|
|
2591
|
-
if (!R && !
|
|
2592
|
-
throw new ie("missing trailers",
|
|
2593
|
-
if (!
|
|
2594
|
-
throw new ie("missing status",
|
|
2595
|
-
if (
|
|
2596
|
-
throw new ie(
|
|
2597
|
-
y.notifyComplete(), C.resolve(
|
|
2591
|
+
if (!R && !F)
|
|
2592
|
+
throw new ie("missing trailers", j[j.DATA_LOSS]);
|
|
2593
|
+
if (!I)
|
|
2594
|
+
throw new ie("missing status", j[j.INTERNAL]);
|
|
2595
|
+
if (I.code !== "OK")
|
|
2596
|
+
throw new ie(I.detail, I.code, R);
|
|
2597
|
+
y.notifyComplete(), C.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,
|
|
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), C.rejectPending(L), O.rejectPending(L);
|
|
2601
2601
|
}), new Vi(e, (a = c.meta) !== null && a !== void 0 ? a : {}, t, f.promise, y, C.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,
|
|
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, C = 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,52 +2610,52 @@ class qi {
|
|
|
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] =
|
|
2614
|
-
if (f.resolve(B), L != null && L !==
|
|
2615
|
-
throw new ie(b ??
|
|
2616
|
-
return L != null && (
|
|
2617
|
-
code:
|
|
2618
|
-
detail: b ??
|
|
2613
|
+
let [L, b, B] = qn(v);
|
|
2614
|
+
if (f.resolve(B), L != null && L !== j.OK)
|
|
2615
|
+
throw new ie(b ?? j[L], j[L], B);
|
|
2616
|
+
return L != null && (I = {
|
|
2617
|
+
code: j[L],
|
|
2618
|
+
detail: b ?? j[L]
|
|
2619
2619
|
}), v;
|
|
2620
2620
|
}).then((v) => {
|
|
2621
2621
|
if (!v.body)
|
|
2622
|
-
throw new ie("missing response body",
|
|
2622
|
+
throw new ie("missing response body", j[j.INTERNAL]);
|
|
2623
2623
|
return fr(v.body, v.headers.get("content-type"), (L, b) => {
|
|
2624
2624
|
switch (L) {
|
|
2625
2625
|
case tt.DATA:
|
|
2626
2626
|
if (y)
|
|
2627
|
-
throw new ie("unary call received 2nd message",
|
|
2627
|
+
throw new ie("unary call received 2nd message", j[j.DATA_LOSS]);
|
|
2628
2628
|
y = e.O.fromBinary(b, c.binaryOptions);
|
|
2629
2629
|
break;
|
|
2630
2630
|
case tt.TRAILER:
|
|
2631
2631
|
let B, m;
|
|
2632
|
-
[B, m, R] = ur(b),
|
|
2633
|
-
code:
|
|
2634
|
-
detail: m ??
|
|
2632
|
+
[B, m, R] = ur(b), I = {
|
|
2633
|
+
code: j[B],
|
|
2634
|
+
detail: m ?? j[B]
|
|
2635
2635
|
};
|
|
2636
2636
|
break;
|
|
2637
2637
|
}
|
|
2638
2638
|
});
|
|
2639
2639
|
}).then(() => {
|
|
2640
2640
|
if (!R && y)
|
|
2641
|
-
throw new ie("missing trailers",
|
|
2642
|
-
if (!
|
|
2643
|
-
throw new ie("missing status",
|
|
2644
|
-
if (!y &&
|
|
2645
|
-
throw new ie("expected error status",
|
|
2641
|
+
throw new ie("missing trailers", j[j.DATA_LOSS]);
|
|
2642
|
+
if (!I)
|
|
2643
|
+
throw new ie("missing status", j[j.INTERNAL]);
|
|
2644
|
+
if (!y && I.code === "OK")
|
|
2645
|
+
throw new ie("expected error status", j[j.DATA_LOSS]);
|
|
2646
2646
|
if (!y)
|
|
2647
|
-
throw new ie(
|
|
2648
|
-
if (
|
|
2649
|
-
throw new ie(
|
|
2650
|
-
C.resolve(
|
|
2647
|
+
throw new ie(I.detail, I.code, R);
|
|
2648
|
+
if (F.resolve(y), I.code !== "OK")
|
|
2649
|
+
throw new ie(I.detail, I.code, R);
|
|
2650
|
+
C.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,
|
|
2654
|
-
}), new Di(e, (a = c.meta) !== null && a !== void 0 ? a : {}, t, 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), C.rejectPending(L), O.rejectPending(L);
|
|
2654
|
+
}), new Di(e, (a = c.meta) !== null && a !== void 0 ? a : {}, t, f.promise, F.promise, C.promise, O.promise);
|
|
2655
2655
|
}
|
|
2656
2656
|
}
|
|
2657
2657
|
var Ln = /* @__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))(Ln || {});
|
|
2658
|
-
class
|
|
2658
|
+
class Ki extends Fe {
|
|
2659
2659
|
constructor() {
|
|
2660
2660
|
super("com.hamropatro.grpc.common.SearchRequest", [
|
|
2661
2661
|
{
|
|
@@ -2713,13 +2713,13 @@ class zi extends Ie {
|
|
|
2713
2713
|
return i;
|
|
2714
2714
|
}
|
|
2715
2715
|
internalBinaryWrite(e, t, n) {
|
|
2716
|
-
e.searchValue !== "" && t.tag(1,
|
|
2716
|
+
e.searchValue !== "" && t.tag(1, W.LengthDelimited).string(e.searchValue), e.cursor !== "" && t.tag(2, W.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(3, W.Varint).int32(e.limit);
|
|
2717
2717
|
let r = n.writeUnknownFields;
|
|
2718
2718
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
2719
2719
|
}
|
|
2720
2720
|
}
|
|
2721
|
-
const Mr = new
|
|
2722
|
-
class
|
|
2721
|
+
const Mr = new Ki();
|
|
2722
|
+
class zi extends Fe {
|
|
2723
2723
|
constructor() {
|
|
2724
2724
|
super("com.hamropatro.grpc.common.SearchResult", [
|
|
2725
2725
|
{ no: 1, name: "items", kind: "message", repeat: 1, T: () => nt },
|
|
@@ -2761,14 +2761,14 @@ class Ki extends Ie {
|
|
|
2761
2761
|
}
|
|
2762
2762
|
internalBinaryWrite(e, t, n) {
|
|
2763
2763
|
for (let i = 0; i < e.items.length; i++)
|
|
2764
|
-
nt.internalBinaryWrite(e.items[i], t.tag(1,
|
|
2765
|
-
e.nextPageCursor !== "" && t.tag(2,
|
|
2764
|
+
nt.internalBinaryWrite(e.items[i], t.tag(1, W.LengthDelimited).fork(), n).join();
|
|
2765
|
+
e.nextPageCursor !== "" && t.tag(2, W.LengthDelimited).string(e.nextPageCursor);
|
|
2766
2766
|
let r = n.writeUnknownFields;
|
|
2767
2767
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
2768
2768
|
}
|
|
2769
2769
|
}
|
|
2770
|
-
const Xi = new
|
|
2771
|
-
class Gi extends
|
|
2770
|
+
const Xi = new zi();
|
|
2771
|
+
class Gi extends Fe {
|
|
2772
2772
|
constructor() {
|
|
2773
2773
|
super("com.hamropatro.grpc.common.CreateFileRequest", [
|
|
2774
2774
|
{
|
|
@@ -2853,13 +2853,13 @@ class Gi extends Ie {
|
|
|
2853
2853
|
return i;
|
|
2854
2854
|
}
|
|
2855
2855
|
internalBinaryWrite(e, t, n) {
|
|
2856
|
-
e.name !== "" && t.tag(1,
|
|
2856
|
+
e.name !== "" && t.tag(1, W.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(2, W.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(3, W.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(4, W.LengthDelimited).string(e.url), e.type !== 0 && t.tag(5, W.Varint).int32(e.type), e.extension !== "" && t.tag(6, W.LengthDelimited).string(e.extension);
|
|
2857
2857
|
let r = n.writeUnknownFields;
|
|
2858
2858
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
2859
2859
|
}
|
|
2860
2860
|
}
|
|
2861
2861
|
const Vr = new Gi();
|
|
2862
|
-
class Ji extends
|
|
2862
|
+
class Ji extends Fe {
|
|
2863
2863
|
constructor() {
|
|
2864
2864
|
super("com.hamropatro.grpc.common.CreateUserFileRequest", [
|
|
2865
2865
|
{
|
|
@@ -2911,13 +2911,13 @@ class Ji extends Ie {
|
|
|
2911
2911
|
return i;
|
|
2912
2912
|
}
|
|
2913
2913
|
internalBinaryWrite(e, t, n) {
|
|
2914
|
-
e.url !== "" && t.tag(1,
|
|
2914
|
+
e.url !== "" && t.tag(1, W.LengthDelimited).string(e.url), e.type !== 0 && t.tag(2, W.Varint).int32(e.type), e.extension !== "" && t.tag(3, W.LengthDelimited).string(e.extension);
|
|
2915
2915
|
let r = n.writeUnknownFields;
|
|
2916
2916
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
2917
2917
|
}
|
|
2918
2918
|
}
|
|
2919
2919
|
const Jn = new Ji();
|
|
2920
|
-
class
|
|
2920
|
+
class Qi extends Fe {
|
|
2921
2921
|
constructor() {
|
|
2922
2922
|
super("com.hamropatro.grpc.common.File", [
|
|
2923
2923
|
{
|
|
@@ -3029,13 +3029,13 @@ class Yi extends Ie {
|
|
|
3029
3029
|
return i;
|
|
3030
3030
|
}
|
|
3031
3031
|
internalBinaryWrite(e, t, n) {
|
|
3032
|
-
e.key !== "" && t.tag(1,
|
|
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 && Bn.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
|
}
|
|
3036
3036
|
}
|
|
3037
|
-
const nt = new
|
|
3038
|
-
class
|
|
3037
|
+
const nt = new Qi();
|
|
3038
|
+
class Yi extends Fe {
|
|
3039
3039
|
constructor() {
|
|
3040
3040
|
super("com.hamropatro.grpc.common.FileMetadata", [
|
|
3041
3041
|
{
|
|
@@ -3104,13 +3104,13 @@ class Qi extends Ie {
|
|
|
3104
3104
|
return i;
|
|
3105
3105
|
}
|
|
3106
3106
|
internalBinaryWrite(e, t, n) {
|
|
3107
|
-
e.height !== 0 && t.tag(1,
|
|
3107
|
+
e.height !== 0 && t.tag(1, W.Varint).int32(e.height), e.width !== 0 && t.tag(2, W.Varint).int32(e.width), e.backgroundColor !== "" && t.tag(3, W.LengthDelimited).string(e.backgroundColor), e.aspectRatio !== 0 && t.tag(4, W.Bit64).double(e.aspectRatio);
|
|
3108
3108
|
let r = n.writeUnknownFields;
|
|
3109
3109
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3110
3110
|
}
|
|
3111
3111
|
}
|
|
3112
|
-
const Bn = new
|
|
3113
|
-
class es extends
|
|
3112
|
+
const Bn = new Yi();
|
|
3113
|
+
class es extends Fe {
|
|
3114
3114
|
constructor() {
|
|
3115
3115
|
super("com.hamropatro.grpc.common.DeleteFileRequest", [
|
|
3116
3116
|
{
|
|
@@ -3146,13 +3146,13 @@ class es extends Ie {
|
|
|
3146
3146
|
return i;
|
|
3147
3147
|
}
|
|
3148
3148
|
internalBinaryWrite(e, t, n) {
|
|
3149
|
-
e.key !== "" && t.tag(1,
|
|
3149
|
+
e.key !== "" && t.tag(1, W.LengthDelimited).string(e.key);
|
|
3150
3150
|
let r = n.writeUnknownFields;
|
|
3151
3151
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3152
3152
|
}
|
|
3153
3153
|
}
|
|
3154
3154
|
const Hr = new es();
|
|
3155
|
-
class ts extends
|
|
3155
|
+
class ts extends Fe {
|
|
3156
3156
|
constructor() {
|
|
3157
3157
|
super("com.hamropatro.grpc.common.DeleteFileResponse", [
|
|
3158
3158
|
{
|
|
@@ -3188,13 +3188,13 @@ class ts extends Ie {
|
|
|
3188
3188
|
return i;
|
|
3189
3189
|
}
|
|
3190
3190
|
internalBinaryWrite(e, t, n) {
|
|
3191
|
-
e.isDeleted !== !1 && t.tag(1,
|
|
3191
|
+
e.isDeleted !== !1 && t.tag(1, W.Varint).bool(e.isDeleted);
|
|
3192
3192
|
let r = n.writeUnknownFields;
|
|
3193
3193
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3194
3194
|
}
|
|
3195
3195
|
}
|
|
3196
3196
|
const ns = new ts();
|
|
3197
|
-
class rs extends
|
|
3197
|
+
class rs extends Fe {
|
|
3198
3198
|
constructor() {
|
|
3199
3199
|
super("com.hamropatro.grpc.common.GetFilesByFolderRequest", [
|
|
3200
3200
|
{
|
|
@@ -3252,13 +3252,13 @@ class rs extends Ie {
|
|
|
3252
3252
|
return i;
|
|
3253
3253
|
}
|
|
3254
3254
|
internalBinaryWrite(e, t, n) {
|
|
3255
|
-
e.folderName !== "" && t.tag(1,
|
|
3255
|
+
e.folderName !== "" && t.tag(1, W.LengthDelimited).string(e.folderName), e.cursor !== "" && t.tag(2, W.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(3, W.Varint).int32(e.limit);
|
|
3256
3256
|
let r = n.writeUnknownFields;
|
|
3257
3257
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3258
3258
|
}
|
|
3259
3259
|
}
|
|
3260
|
-
const
|
|
3261
|
-
class is extends
|
|
3260
|
+
const $r = new rs();
|
|
3261
|
+
class is extends Fe {
|
|
3262
3262
|
constructor() {
|
|
3263
3263
|
super("com.hamropatro.grpc.common.GetFilesByFolderResponse", [
|
|
3264
3264
|
{ no: 1, name: "files", kind: "message", repeat: 1, T: () => nt },
|
|
@@ -3311,8 +3311,8 @@ class is extends Ie {
|
|
|
3311
3311
|
}
|
|
3312
3312
|
internalBinaryWrite(e, t, n) {
|
|
3313
3313
|
for (let i = 0; i < e.files.length; i++)
|
|
3314
|
-
nt.internalBinaryWrite(e.files[i], t.tag(1,
|
|
3315
|
-
e.nextCursor !== "" && t.tag(2,
|
|
3314
|
+
nt.internalBinaryWrite(e.files[i], t.tag(1, W.LengthDelimited).fork(), n).join();
|
|
3315
|
+
e.nextCursor !== "" && t.tag(2, W.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, W.Varint).bool(e.hasMore);
|
|
3316
3316
|
let r = n.writeUnknownFields;
|
|
3317
3317
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3318
3318
|
}
|
|
@@ -3321,7 +3321,7 @@ const ss = new is(), On = 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: $r, O: ss },
|
|
3325
3325
|
{ name: "createUserFile", options: {}, I: Jn, O: nt },
|
|
3326
3326
|
{ name: "search", options: {}, I: Mr, O: Xi }
|
|
3327
3327
|
]);
|
|
@@ -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 Dt(i), a =
|
|
3421
|
+
const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Dt(i), a = $r.create();
|
|
3422
3422
|
return a.folderName = s, a.cursor = e, a.limit = t, await o.getFilesByFolder(
|
|
3423
3423
|
a,
|
|
3424
3424
|
n
|
|
@@ -3460,7 +3460,7 @@ const os = async (s, e, t, n, r, i) => {
|
|
|
3460
3460
|
throw n;
|
|
3461
3461
|
}
|
|
3462
3462
|
};
|
|
3463
|
-
class fs extends
|
|
3463
|
+
class fs extends Fe {
|
|
3464
3464
|
constructor() {
|
|
3465
3465
|
super("com.hamropatro.grpc.common.DeleteFolderRequest", [
|
|
3466
3466
|
{
|
|
@@ -3496,13 +3496,13 @@ class fs extends Ie {
|
|
|
3496
3496
|
return i;
|
|
3497
3497
|
}
|
|
3498
3498
|
internalBinaryWrite(e, t, n) {
|
|
3499
|
-
e.key !== "" && t.tag(1,
|
|
3499
|
+
e.key !== "" && t.tag(1, W.LengthDelimited).string(e.key);
|
|
3500
3500
|
let r = n.writeUnknownFields;
|
|
3501
3501
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3502
3502
|
}
|
|
3503
3503
|
}
|
|
3504
3504
|
const Pr = new fs();
|
|
3505
|
-
class ps extends
|
|
3505
|
+
class ps extends Fe {
|
|
3506
3506
|
constructor() {
|
|
3507
3507
|
super("com.hamropatro.grpc.common.CreateFolderRequest", [
|
|
3508
3508
|
{
|
|
@@ -3571,13 +3571,13 @@ class ps extends Ie {
|
|
|
3571
3571
|
return i;
|
|
3572
3572
|
}
|
|
3573
3573
|
internalBinaryWrite(e, t, n) {
|
|
3574
|
-
e.name !== "" && t.tag(1,
|
|
3574
|
+
e.name !== "" && t.tag(1, W.LengthDelimited).string(e.name), e.nestedFolderName !== "" && t.tag(2, W.LengthDelimited).string(e.nestedFolderName), e.createdBy !== "" && t.tag(3, W.LengthDelimited).string(e.createdBy), e.forUser !== !1 && t.tag(4, W.Varint).bool(e.forUser);
|
|
3575
3575
|
let r = n.writeUnknownFields;
|
|
3576
3576
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3577
3577
|
}
|
|
3578
3578
|
}
|
|
3579
|
-
const
|
|
3580
|
-
class ms extends
|
|
3579
|
+
const Wr = new ps();
|
|
3580
|
+
class ms extends Fe {
|
|
3581
3581
|
constructor() {
|
|
3582
3582
|
super("com.hamropatro.grpc.common.GetAllFoldersRequest", [
|
|
3583
3583
|
{
|
|
@@ -3624,13 +3624,13 @@ class ms extends Ie {
|
|
|
3624
3624
|
return i;
|
|
3625
3625
|
}
|
|
3626
3626
|
internalBinaryWrite(e, t, n) {
|
|
3627
|
-
e.cursor !== "" && t.tag(1,
|
|
3627
|
+
e.cursor !== "" && t.tag(1, W.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(2, W.Varint).int32(e.limit);
|
|
3628
3628
|
let r = n.writeUnknownFields;
|
|
3629
3629
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3630
3630
|
}
|
|
3631
3631
|
}
|
|
3632
|
-
const
|
|
3633
|
-
class gs extends
|
|
3632
|
+
const Zn = new ms();
|
|
3633
|
+
class gs extends Fe {
|
|
3634
3634
|
constructor() {
|
|
3635
3635
|
super("com.hamropatro.grpc.common.GetAllFoldersResponse", [
|
|
3636
3636
|
{ no: 1, name: "folder", kind: "message", repeat: 1, T: () => Ct },
|
|
@@ -3683,14 +3683,14 @@ class gs extends Ie {
|
|
|
3683
3683
|
}
|
|
3684
3684
|
internalBinaryWrite(e, t, n) {
|
|
3685
3685
|
for (let i = 0; i < e.folder.length; i++)
|
|
3686
|
-
Ct.internalBinaryWrite(e.folder[i], t.tag(1,
|
|
3687
|
-
e.nextCursor !== "" && t.tag(2,
|
|
3686
|
+
Ct.internalBinaryWrite(e.folder[i], t.tag(1, W.LengthDelimited).fork(), n).join();
|
|
3687
|
+
e.nextCursor !== "" && t.tag(2, W.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, W.Varint).bool(e.hasMore);
|
|
3688
3688
|
let r = n.writeUnknownFields;
|
|
3689
3689
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3690
3690
|
}
|
|
3691
3691
|
}
|
|
3692
3692
|
const mr = new gs();
|
|
3693
|
-
class ws extends
|
|
3693
|
+
class ws extends Fe {
|
|
3694
3694
|
constructor() {
|
|
3695
3695
|
super("com.hamropatro.grpc.common.Empty", []);
|
|
3696
3696
|
}
|
|
@@ -3707,7 +3707,7 @@ class ws extends Ie {
|
|
|
3707
3707
|
}
|
|
3708
3708
|
}
|
|
3709
3709
|
const gr = new ws();
|
|
3710
|
-
class ys extends
|
|
3710
|
+
class ys extends Fe {
|
|
3711
3711
|
constructor() {
|
|
3712
3712
|
super("com.hamropatro.grpc.common.Folder", [
|
|
3713
3713
|
{
|
|
@@ -3787,13 +3787,13 @@ class ys extends Ie {
|
|
|
3787
3787
|
return i;
|
|
3788
3788
|
}
|
|
3789
3789
|
internalBinaryWrite(e, t, n) {
|
|
3790
|
-
e.key !== "" && t.tag(1,
|
|
3790
|
+
e.key !== "" && t.tag(1, W.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, W.LengthDelimited).string(e.name), e.nestedFolderName !== "" && t.tag(3, W.LengthDelimited).string(e.nestedFolderName), e.createdBy !== "" && t.tag(4, W.LengthDelimited).string(e.createdBy), e.forUser !== !1 && t.tag(5, W.Varint).bool(e.forUser);
|
|
3791
3791
|
let r = n.writeUnknownFields;
|
|
3792
3792
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3793
3793
|
}
|
|
3794
3794
|
}
|
|
3795
3795
|
const Ct = new ys();
|
|
3796
|
-
class bs extends
|
|
3796
|
+
class bs extends Fe {
|
|
3797
3797
|
constructor() {
|
|
3798
3798
|
super("com.hamropatro.grpc.common.ChangeNestedFolderRequest", [
|
|
3799
3799
|
{
|
|
@@ -3840,15 +3840,15 @@ class bs extends Ie {
|
|
|
3840
3840
|
return i;
|
|
3841
3841
|
}
|
|
3842
3842
|
internalBinaryWrite(e, t, n) {
|
|
3843
|
-
e.folderKey !== "" && t.tag(1,
|
|
3843
|
+
e.folderKey !== "" && t.tag(1, W.LengthDelimited).string(e.folderKey), e.nestedFolderName !== "" && t.tag(2, W.LengthDelimited).string(e.nestedFolderName);
|
|
3844
3844
|
let r = n.writeUnknownFields;
|
|
3845
3845
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3846
3846
|
}
|
|
3847
3847
|
}
|
|
3848
3848
|
const Cs = new bs(), Sn = new Gn("com.hamropatro.grpc.common.FolderService", [
|
|
3849
|
-
{ name: "createFolder", options: {}, I:
|
|
3850
|
-
{ name: "getFolders", options: {}, I:
|
|
3851
|
-
{ name: "getUserFolders", options: {}, I:
|
|
3849
|
+
{ name: "createFolder", options: {}, I: Wr, O: Ct },
|
|
3850
|
+
{ name: "getFolders", options: {}, I: Zn, O: mr },
|
|
3851
|
+
{ name: "getUserFolders", options: {}, I: Zn, O: mr },
|
|
3852
3852
|
{ name: "updateFolder", options: {}, I: Ct, O: Ct },
|
|
3853
3853
|
{ name: "deleteFolder", options: {}, I: Pr, O: Ct },
|
|
3854
3854
|
{ name: "ChangeNestedFolderName", options: {}, I: Cs, O: Ct },
|
|
@@ -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 Un(n), i =
|
|
3918
|
+
const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new Un(n), i = Zn.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 Un(o), c =
|
|
3930
|
+
const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new Un(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
|
|
@@ -3982,7 +3982,7 @@ function pn(s = "24px", e = "24px", t = "#333") {
|
|
|
3982
3982
|
"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"
|
|
3983
3983
|
), n.appendChild(r), n;
|
|
3984
3984
|
}
|
|
3985
|
-
function
|
|
3985
|
+
function Fs() {
|
|
3986
3986
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3987
3987
|
s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("width", "12"), s.setAttribute("height", "12"), 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-music-4");
|
|
3988
3988
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -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 Kn(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 Yt() {
|
|
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");
|
|
@@ -4045,7 +4045,7 @@ function Qt() {
|
|
|
4045
4045
|
"M40,12H8c-2.2,0-4,1.8-4,4v20c0,2.2,1.8,4,4,4h32c2.2,0,4-1.8,4-4V16C44,13.8,42.2,12,40,12z"
|
|
4046
4046
|
), s.appendChild(e), s.appendChild(t), s;
|
|
4047
4047
|
}
|
|
4048
|
-
function
|
|
4048
|
+
function Ns() {
|
|
4049
4049
|
const s = "http://www.w3.org/2000/svg", e = document.createElementNS(s, "svg");
|
|
4050
4050
|
e.setAttribute("width", "12"), e.setAttribute("height", "12"), e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "3"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.classList.add("lucide", "lucide-image");
|
|
4051
4051
|
const t = document.createElementNS(s, "rect");
|
|
@@ -4055,7 +4055,7 @@ function Fs() {
|
|
|
4055
4055
|
const r = document.createElementNS(s, "path");
|
|
4056
4056
|
return r.setAttribute("d", "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"), e.appendChild(t), e.appendChild(n), e.appendChild(r), document.body.appendChild(e), e;
|
|
4057
4057
|
}
|
|
4058
|
-
function
|
|
4058
|
+
function Is() {
|
|
4059
4059
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4060
4060
|
s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("height", "24px"), s.setAttribute("viewBox", "0 -960 960 960"), s.setAttribute("width", "24px"), s.setAttribute("fill", "currentColor");
|
|
4061
4061
|
const e = document.createElementNS(
|
|
@@ -4131,17 +4131,17 @@ function Us() {
|
|
|
4131
4131
|
const n = document.createElementNS(s, "rect");
|
|
4132
4132
|
return n.setAttribute("x", "2"), n.setAttribute("y", "6"), n.setAttribute("width", "14"), n.setAttribute("height", "12"), n.setAttribute("rx", "2"), e.appendChild(t), e.appendChild(n), document.body.appendChild(e), e;
|
|
4133
4133
|
}
|
|
4134
|
-
function
|
|
4134
|
+
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
4138
|
var pt, Ge, Pt;
|
|
4139
4139
|
class xs {
|
|
4140
4140
|
constructor() {
|
|
4141
|
-
|
|
4142
|
-
|
|
4141
|
+
z(this, pt);
|
|
4142
|
+
z(this, Ge);
|
|
4143
4143
|
// Store the circle element as a private property
|
|
4144
|
-
|
|
4144
|
+
z(this, Pt, "#fff");
|
|
4145
4145
|
H(this, pt, document.createElementNS(
|
|
4146
4146
|
"http://www.w3.org/2000/svg",
|
|
4147
4147
|
"svg"
|
|
@@ -4159,7 +4159,7 @@ class xs {
|
|
|
4159
4159
|
}
|
|
4160
4160
|
pt = new WeakMap(), Ge = new WeakMap(), Pt = new WeakMap();
|
|
4161
4161
|
const Er = new xs(), mn = document.body;
|
|
4162
|
-
class
|
|
4162
|
+
class jr {
|
|
4163
4163
|
constructor() {
|
|
4164
4164
|
he(this, "main");
|
|
4165
4165
|
he(this, "dialogContainer");
|
|
@@ -4173,56 +4173,56 @@ class Zr {
|
|
|
4173
4173
|
he(this, "cancelButton");
|
|
4174
4174
|
he(this, "confirmCallback");
|
|
4175
4175
|
he(this, "cancelCallback");
|
|
4176
|
-
this.main =
|
|
4176
|
+
this.main = Q("div"), this.dialog = Q("div"), this.confirmCallback = void 0, this.cancelCallback = void 0;
|
|
4177
4177
|
}
|
|
4178
4178
|
_init(e) {
|
|
4179
|
-
this.main =
|
|
4179
|
+
this.main = Q(
|
|
4180
4180
|
"div",
|
|
4181
4181
|
"dialog-presentation",
|
|
4182
4182
|
"",
|
|
4183
4183
|
"",
|
|
4184
4184
|
mn
|
|
4185
|
-
), this.main.setAttribute("role", "presentation"), this.dialogContainer =
|
|
4185
|
+
), this.main.setAttribute("role", "presentation"), this.dialogContainer = Q(
|
|
4186
4186
|
"div",
|
|
4187
4187
|
"dialog-container",
|
|
4188
4188
|
"",
|
|
4189
4189
|
"",
|
|
4190
4190
|
this.main
|
|
4191
|
-
), this.dialogBackdrop =
|
|
4191
|
+
), this.dialogBackdrop = Q(
|
|
4192
4192
|
"div",
|
|
4193
4193
|
"dialog-backdrop",
|
|
4194
4194
|
"",
|
|
4195
4195
|
"",
|
|
4196
4196
|
this.dialogContainer
|
|
4197
|
-
), this.dialog =
|
|
4197
|
+
), this.dialog = Q("div", "dialog", "", "", this.dialogContainer), this.dialog.setAttribute("tabIndex", "-1");
|
|
4198
4198
|
const t = document.activeElement;
|
|
4199
|
-
if (t && t !== document.body && (t.blur(), this.dialog.focus()), this.dialog.className = "dialog", this.dialogContent =
|
|
4199
|
+
if (t && t !== document.body && (t.blur(), this.dialog.focus()), this.dialog.className = "dialog", this.dialogContent = Q(
|
|
4200
4200
|
"div",
|
|
4201
4201
|
"dialog-content",
|
|
4202
4202
|
"",
|
|
4203
4203
|
"",
|
|
4204
4204
|
this.dialog
|
|
4205
|
-
), e != null && e.dialogContentStyle && Object.assign(this.dialogContent.style, e.dialogContentStyle), this.confirmButton =
|
|
4205
|
+
), e != null && e.dialogContentStyle && Object.assign(this.dialogContent.style, e.dialogContentStyle), this.confirmButton = Q(
|
|
4206
4206
|
"button",
|
|
4207
4207
|
"dialog-btn confirm",
|
|
4208
4208
|
"",
|
|
4209
4209
|
"",
|
|
4210
4210
|
this.dialogFooter
|
|
4211
|
-
), this.confirmButton.type = "button", this.cancelButton =
|
|
4211
|
+
), this.confirmButton.type = "button", this.cancelButton = Q(
|
|
4212
4212
|
"button",
|
|
4213
4213
|
"dialog-btn cancel",
|
|
4214
4214
|
"",
|
|
4215
4215
|
"",
|
|
4216
4216
|
this.dialogFooter
|
|
4217
4217
|
), this.cancelButton.type = "button", e.showCloseBtn) {
|
|
4218
|
-
const n =
|
|
4218
|
+
const n = Q(
|
|
4219
4219
|
"button",
|
|
4220
4220
|
"dialog-close-btn",
|
|
4221
4221
|
"",
|
|
4222
4222
|
"",
|
|
4223
4223
|
this.dialogContent
|
|
4224
4224
|
);
|
|
4225
|
-
n.appendChild(
|
|
4225
|
+
n.appendChild(Kn()), n.onclick = () => this.hide();
|
|
4226
4226
|
}
|
|
4227
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", mn.style.overflow = "hidden", this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", mn.classList.add("dialog-visible"), new Promise((n) => {
|
|
4228
4228
|
const r = (i) => () => {
|
|
@@ -4232,7 +4232,7 @@ class Zr {
|
|
|
4232
4232
|
});
|
|
4233
4233
|
}
|
|
4234
4234
|
_setHeader(e) {
|
|
4235
|
-
if (this.dialogHeader =
|
|
4235
|
+
if (this.dialogHeader = Q(
|
|
4236
4236
|
"div",
|
|
4237
4237
|
"dialog-header",
|
|
4238
4238
|
"",
|
|
@@ -4241,7 +4241,7 @@ class Zr {
|
|
|
4241
4241
|
), !e.header)
|
|
4242
4242
|
this.dialogHeader.innerHTML = "";
|
|
4243
4243
|
else if (typeof e.header == "string") {
|
|
4244
|
-
const t =
|
|
4244
|
+
const t = Q(
|
|
4245
4245
|
"h4",
|
|
4246
4246
|
"dialog-header-text",
|
|
4247
4247
|
"",
|
|
@@ -4253,7 +4253,7 @@ class Zr {
|
|
|
4253
4253
|
this.dialogHeader.innerHTML = "", this.dialogHeader.appendChild(e.header);
|
|
4254
4254
|
}
|
|
4255
4255
|
_setBody(e) {
|
|
4256
|
-
this.dialogBody =
|
|
4256
|
+
this.dialogBody = Q(
|
|
4257
4257
|
"div",
|
|
4258
4258
|
"dialog-body",
|
|
4259
4259
|
"",
|
|
@@ -4262,7 +4262,7 @@ class Zr {
|
|
|
4262
4262
|
), typeof e.content == "string" ? this.dialogBody.innerHTML = e.content : (this.dialogBody.innerHTML = "", this.dialogBody.appendChild(e.content));
|
|
4263
4263
|
}
|
|
4264
4264
|
_setFooter(e) {
|
|
4265
|
-
this.dialogFooter =
|
|
4265
|
+
this.dialogFooter = Q(
|
|
4266
4266
|
"div",
|
|
4267
4267
|
"dialog-footer",
|
|
4268
4268
|
"",
|
|
@@ -4284,22 +4284,22 @@ class Zr {
|
|
|
4284
4284
|
e ? (Er.show(this.confirmButton), this.confirmButton.disabled = !0) : (Er.hide(), this.confirmButton.disabled = !1);
|
|
4285
4285
|
}
|
|
4286
4286
|
}
|
|
4287
|
-
const gn = new
|
|
4287
|
+
const gn = new jr(), Ce = new jr();
|
|
4288
4288
|
class _s {
|
|
4289
4289
|
constructor() {
|
|
4290
4290
|
he(this, "main");
|
|
4291
4291
|
he(this, "dialogBody");
|
|
4292
|
-
this.main =
|
|
4292
|
+
this.main = Q("div"), this.dialogBody = Q("div"), this.hide();
|
|
4293
4293
|
}
|
|
4294
4294
|
show(e) {
|
|
4295
|
-
this.main =
|
|
4295
|
+
this.main = Q("div", "popover", "", "", e.mainContainer), this.dialogBody = Q("div", "popover-body", "", "", this.main), this.main.id = e.divId, this.dialogBody.append(e.content);
|
|
4296
4296
|
}
|
|
4297
4297
|
hide() {
|
|
4298
4298
|
this.main.remove();
|
|
4299
4299
|
}
|
|
4300
4300
|
}
|
|
4301
|
-
const
|
|
4302
|
-
var
|
|
4301
|
+
const ze = new _s();
|
|
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
4303
|
const tn = {
|
|
4304
4304
|
0: "IMAGE",
|
|
4305
4305
|
1: "AUDIO",
|
|
@@ -4310,13 +4310,13 @@ const tn = {
|
|
|
4310
4310
|
function Mn(s) {
|
|
4311
4311
|
switch (s) {
|
|
4312
4312
|
case "image":
|
|
4313
|
-
return tn[
|
|
4313
|
+
return tn[Ye.IMAGE];
|
|
4314
4314
|
case "video":
|
|
4315
|
-
return tn[
|
|
4315
|
+
return tn[Ye.VIDEO];
|
|
4316
4316
|
case "audio":
|
|
4317
|
-
return tn[
|
|
4317
|
+
return tn[Ye.AUDIO];
|
|
4318
4318
|
default:
|
|
4319
|
-
return tn[
|
|
4319
|
+
return tn[Ye.ALL];
|
|
4320
4320
|
}
|
|
4321
4321
|
}
|
|
4322
4322
|
function Bs(s) {
|
|
@@ -4361,7 +4361,7 @@ const Ss = async (s, e) => {
|
|
|
4361
4361
|
meta: t
|
|
4362
4362
|
};
|
|
4363
4363
|
};
|
|
4364
|
-
function
|
|
4364
|
+
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
|
}
|
|
@@ -4405,7 +4405,7 @@ function Ms(s, e) {
|
|
|
4405
4405
|
});
|
|
4406
4406
|
}), Object.freeze(s);
|
|
4407
4407
|
}
|
|
4408
|
-
function
|
|
4408
|
+
function qr(s, e) {
|
|
4409
4409
|
return new Promise(function(t, n) {
|
|
4410
4410
|
let r;
|
|
4411
4411
|
return Vs(s).then(function(i) {
|
|
@@ -4470,12 +4470,12 @@ var vn = {}, Hs = { get exports() {
|
|
|
4470
4470
|
o(l, c += 2);
|
|
4471
4471
|
var f = a(l, c += 2), y = a(l, c += 4);
|
|
4472
4472
|
c += 4, c = y;
|
|
4473
|
-
for (var
|
|
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
|
|
4475
|
+
var I = a(l, c += 4), C = 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 += C + R + O, n._readLocal(l, v, h, f,
|
|
4478
|
+
c += 4, c += C + 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) {
|
|
@@ -4485,15 +4485,15 @@ var vn = {}, Hs = { get exports() {
|
|
|
4485
4485
|
u(r, i += 2), u(r, i += 4), i += 4;
|
|
4486
4486
|
var f = l(r, i += 8), y = l(r, i += 2);
|
|
4487
4487
|
i += 2;
|
|
4488
|
-
var
|
|
4489
|
-
if (i += f, i += y, h) o[
|
|
4488
|
+
var F = n.bin.readUTF8(r, i, f);
|
|
4489
|
+
if (i += f, i += y, h) o[F] = { size: c, csize: a };
|
|
4490
4490
|
else {
|
|
4491
|
-
var
|
|
4492
|
-
if (d == 0) o[
|
|
4491
|
+
var I = new Uint8Array(r.buffer, i);
|
|
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
4495
|
var C = new Uint8Array(c);
|
|
4496
|
-
n.inflateRaw(
|
|
4496
|
+
n.inflateRaw(I, C), o[F] = C;
|
|
4497
4497
|
}
|
|
4498
4498
|
}
|
|
4499
4499
|
}, n.inflateRaw = function(r, i) {
|
|
@@ -4519,16 +4519,16 @@ var vn = {}, Hs = { get exports() {
|
|
|
4519
4519
|
}
|
|
4520
4520
|
for (var l in h) o += h[l].file.length + 30 + 46 + 2 * n.bin.sizeUTF8(l);
|
|
4521
4521
|
o += 22;
|
|
4522
|
-
var y = new Uint8Array(o),
|
|
4522
|
+
var y = new Uint8Array(o), F = 0, I = [];
|
|
4523
4523
|
for (var l in h) {
|
|
4524
4524
|
var C = h[l];
|
|
4525
|
-
|
|
4525
|
+
I.push(F), F = n._writeHeader(y, F, l, C, 0);
|
|
4526
4526
|
}
|
|
4527
|
-
var R = 0, O =
|
|
4527
|
+
var R = 0, O = F;
|
|
4528
4528
|
for (var l in h)
|
|
4529
|
-
C = h[l],
|
|
4530
|
-
var v =
|
|
4531
|
-
return a(y,
|
|
4529
|
+
C = h[l], I.push(F), F = n._writeHeader(y, F, l, C, 1, I[R++]);
|
|
4530
|
+
var v = F - O;
|
|
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) {
|
|
4533
4533
|
var i = r.split(".").pop().toLowerCase();
|
|
4534
4534
|
return "png,jpg,jpeg,zip".indexOf(i) != -1;
|
|
@@ -4602,46 +4602,46 @@ var vn = {}, Hs = { get exports() {
|
|
|
4602
4602
|
} }, n.F = {}, n.F.deflateRaw = function(r, i, o, a) {
|
|
4603
4603
|
var c = [[0, 0, 0, 0, 0], [4, 4, 8, 4, 0], [4, 5, 16, 8, 0], [4, 6, 16, 16, 0], [4, 10, 16, 32, 0], [8, 16, 32, 32, 0], [8, 16, 128, 128, 0], [8, 32, 128, 256, 0], [32, 128, 258, 1024, 1], [32, 258, 258, 4096, 1]][a], h = n.F.U, l = n.F._goodIndex;
|
|
4604
4604
|
n.F._hash;
|
|
4605
|
-
var u = n.F._putsE, d = 0, f = o << 3, y = 0,
|
|
4605
|
+
var u = n.F._putsE, d = 0, f = o << 3, y = 0, F = r.length;
|
|
4606
4606
|
if (a == 0) {
|
|
4607
|
-
for (; d <
|
|
4608
|
-
u(i, f, d + (T = Math.min(65535,
|
|
4607
|
+
for (; d < F; )
|
|
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
|
|
4612
|
-
for (
|
|
4613
|
-
if (B = m, d + 1 <
|
|
4611
|
+
var I = h.lits, C = h.strt, R = h.prev, O = 0, v = 0, L = 0, b = 0, B = 0, m = 0;
|
|
4612
|
+
for (F > 2 && (C[m = n.F._hash(r, 0)] = 0), d = 0; d < F; d++) {
|
|
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
4616
|
R[g] = C[m], C[m] = g;
|
|
4617
4617
|
}
|
|
4618
4618
|
if (y <= d) {
|
|
4619
|
-
(O > 14e3 || v > 26697) &&
|
|
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);
|
|
4620
4620
|
var k = 0;
|
|
4621
|
-
d <
|
|
4622
|
-
var T = k >>> 16,
|
|
4621
|
+
d < F - 2 && (k = n.F._bestMatch(r, d, R, B, Math.min(c[2], F - d), c[3]));
|
|
4622
|
+
var T = k >>> 16, N = 65535 & k;
|
|
4623
4623
|
if (k != 0) {
|
|
4624
|
-
|
|
4624
|
+
N = 65535 & k;
|
|
4625
4625
|
var U = l(T = k >>> 16, h.of0);
|
|
4626
4626
|
h.lhst[257 + U]++;
|
|
4627
|
-
var A = l(
|
|
4628
|
-
h.dhst[A]++, b += h.exb[U] + h.dxb[A],
|
|
4627
|
+
var A = l(N, h.df0);
|
|
4628
|
+
h.dhst[A]++, b += h.exb[U] + h.dxb[A], I[O] = T << 23 | d - y, I[O + 1] = N << 16 | U << 8 | A, O += 2, y = d + T;
|
|
4629
4629
|
} else h.lhst[r[d]]++;
|
|
4630
4630
|
v++;
|
|
4631
4631
|
}
|
|
4632
4632
|
}
|
|
4633
|
-
for (L == d && r.length != 0 || (y < d && (
|
|
4633
|
+
for (L == d && r.length != 0 || (y < d && (I[O] = d - y, O += 2, y = d), f = n.F._writeBlock(1, I, O, b, r, L, d - L, i, f), O = 0, v = 0, O = v = b = 0, L = d); 7 & f; ) f++;
|
|
4634
4634
|
return f >>> 3;
|
|
4635
4635
|
}, n.F._bestMatch = function(r, i, o, a, c, h) {
|
|
4636
4636
|
var l = 32767 & i, u = o[l], d = l - u + 32768 & 32767;
|
|
4637
4637
|
if (u == l || a != n.F._hash(r, i - d)) return 0;
|
|
4638
|
-
for (var f = 0, y = 0,
|
|
4638
|
+
for (var f = 0, y = 0, F = Math.min(32767, i); d <= F && --h != 0 && u != l; ) {
|
|
4639
4639
|
if (f == 0 || r[i + f] == r[i + f - d]) {
|
|
4640
|
-
var
|
|
4641
|
-
if (
|
|
4642
|
-
if (y = d, (f =
|
|
4643
|
-
d + 2 <
|
|
4644
|
-
for (var C = 0, R = 0; R <
|
|
4640
|
+
var I = n.F._howLong(r, i, d);
|
|
4641
|
+
if (I > f) {
|
|
4642
|
+
if (y = d, (f = I) >= c) break;
|
|
4643
|
+
d + 2 < I && (I = d + 2);
|
|
4644
|
+
for (var C = 0, R = 0; R < I - 2; R++) {
|
|
4645
4645
|
var O = i - d + R + 32768 & 32767, v = O - o[O] + 32768 & 32767;
|
|
4646
4646
|
v > C && (C = v, u = O);
|
|
4647
4647
|
}
|
|
@@ -4658,13 +4658,13 @@ 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,
|
|
4662
|
-
b.lhst[256]++, y = (f = n.F.getTrees())[0],
|
|
4661
|
+
var f, y, F, I, C, 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], C = 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
|
-
for (var
|
|
4666
|
-
for (
|
|
4667
|
-
for (
|
|
4665
|
+
for (var N = 0; N < 286; N++) b.lhst[N] = 0;
|
|
4666
|
+
for (N = 0; N < 30; N++) b.dhst[N] = 0;
|
|
4667
|
+
for (N = 0; N < 19; N++) b.ihst[N] = 0;
|
|
4668
4668
|
var U = g < k && g < T ? 0 : k < T ? 1 : 2;
|
|
4669
4669
|
if (B(u, d, r), B(u, d + 1, U), d += 3, U == 0) {
|
|
4670
4670
|
for (; 7 & d; ) d++;
|
|
@@ -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,
|
|
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, C - 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
|
-
for (var x = i[M], V = x >>> 23,
|
|
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 P = i[M + 1],
|
|
4683
|
-
m(u, d = n.F._writeLit(257 +
|
|
4682
|
+
var P = i[M + 1], q = P >> 16, $ = P >> 8 & 255, S = 255 & P;
|
|
4683
|
+
m(u, d = n.F._writeLit(257 + $, A, u, d), V - b.of0[$]), d += b.exb[$], 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,8 +4738,8 @@ 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],
|
|
4742
|
-
for (a[0] = { lit: -1, f: y.f +
|
|
4741
|
+
var y = a[0], F = a[1], I = 0, C = 1, R = 2;
|
|
4742
|
+
for (a[0] = { lit: -1, f: y.f + F.f, l: y, r: F, d: 0 }; C != u - 1; ) y = I != C && (R == u || a[I].f < a[R].f) ? a[I++] : a[R++], F = I != C && (R == u || a[I].f < a[R].f) ? a[I++] : a[R++], a[C++] = { lit: -1, f: y.f + F.f, l: y, r: F };
|
|
4743
4743
|
var O = n.F.setDepth(a[C - 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;
|
|
@@ -4765,25 +4765,25 @@ var vn = {}, Hs = { get exports() {
|
|
|
4765
4765
|
}, n.F.inflate = function(r, i) {
|
|
4766
4766
|
var o = Uint8Array;
|
|
4767
4767
|
if (r[0] == 3 && r[1] == 0) return i || new o(0);
|
|
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,
|
|
4769
|
-
|
|
4770
|
-
for (var
|
|
4771
|
-
if (
|
|
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
|
+
F && (i = new o(r.length >>> 2 << 3));
|
|
4770
|
+
for (var I, C, 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, C = 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
|
-
var
|
|
4774
|
+
var N = 1;
|
|
4775
4775
|
for (T = 0; T < b; T++) {
|
|
4776
4776
|
var U = h(r, k + 3 * T, 3);
|
|
4777
|
-
y.itree[1 + (y.ordr[T] << 1)] = U, U >
|
|
4777
|
+
y.itree[1 + (y.ordr[T] << 1)] = U, U > N && (N = U);
|
|
4778
4778
|
}
|
|
4779
|
-
k += 3 * b, u(y.itree,
|
|
4779
|
+
k += 3 * b, u(y.itree, N), d(y.itree, N, y.imap), I = y.lmap, C = 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,
|
|
4783
|
+
m = (1 << _) - 1, u(y.ltree, A), d(y.ltree, A, I), u(y.dtree, _), d(y.dtree, _, C);
|
|
4784
4784
|
}
|
|
4785
4785
|
for (; ; ) {
|
|
4786
|
-
var w =
|
|
4786
|
+
var w = I[f(r, k) & B];
|
|
4787
4787
|
k += 15 & w;
|
|
4788
4788
|
var p = w >>> 4;
|
|
4789
4789
|
if (!(p >>> 8)) i[g++] = p;
|
|
@@ -4796,15 +4796,15 @@ var vn = {}, Hs = { get exports() {
|
|
|
4796
4796
|
}
|
|
4797
4797
|
var V = C[f(r, k) & m];
|
|
4798
4798
|
k += 15 & V;
|
|
4799
|
-
var
|
|
4800
|
-
for (k += 15 & P,
|
|
4799
|
+
var Z = V >>> 4, P = y.ddef[Z], q = (P >>> 4) + c(r, k, 15 & P);
|
|
4800
|
+
for (k += 15 & P, 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
|
-
|
|
4806
|
+
var $ = 4 + (k >>> 3), S = r[$ - 4] | r[$ - 3] << 8;
|
|
4807
|
+
F && (i = n.F._check(i, g + S)), i.set(new o(r.buffer, r.byteOffset + $, S), g), k = $ + 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) {
|
|
@@ -4819,9 +4819,9 @@ var vn = {}, Hs = { get exports() {
|
|
|
4819
4819
|
var y = f >>> 4;
|
|
4820
4820
|
if (y <= 15) h[d] = y, d++;
|
|
4821
4821
|
else {
|
|
4822
|
-
var
|
|
4823
|
-
y == 16 ? (
|
|
4824
|
-
for (var C = d +
|
|
4822
|
+
var F = 0, I = 0;
|
|
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 C = d + I; d < C; ) h[d] = F, d++;
|
|
4825
4825
|
}
|
|
4826
4826
|
}
|
|
4827
4827
|
return c;
|
|
@@ -4839,7 +4839,7 @@ var vn = {}, Hs = { get exports() {
|
|
|
4839
4839
|
for (o = 0, d[0] = 0, a = 1; a <= i; a++) o = o + d[a - 1] << 1, y[a] = o;
|
|
4840
4840
|
for (c = 0; c < u; c += 2) (h = r[c + 1]) != 0 && (r[c] = y[h], y[h]++);
|
|
4841
4841
|
}, n.F.codes2map = function(r, i, o) {
|
|
4842
|
-
for (var a = r.length, c = n.F.U.rev15, h = 0; h < a; h += 2) if (r[h + 1] != 0) for (var l = h >> 1, u = r[h + 1], d = l << 4 | u, f = i - u, y = r[h] << f,
|
|
4842
|
+
for (var a = r.length, c = n.F.U.rev15, h = 0; h < a; h += 2) if (r[h + 1] != 0) for (var l = h >> 1, u = r[h + 1], d = l << 4 | u, f = i - u, y = r[h] << f, F = y + (1 << f); y != F; )
|
|
4843
4843
|
o[c[y] >>> 15 - i] = d, y++;
|
|
4844
4844
|
}, n.F.revCodes = function(r, i) {
|
|
4845
4845
|
for (var o = n.F.U.rev15, a = 15 - i, c = 0; c < r.length; c += 2) {
|
|
@@ -4874,7 +4874,7 @@ 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
|
|
4877
|
+
var $s = Ms({ __proto__: null, default: vn }, [vn]);
|
|
4878
4878
|
const Xe = function() {
|
|
4879
4879
|
var s = { nextZero(l, u) {
|
|
4880
4880
|
for (; l[u] != 0; ) u++;
|
|
@@ -4895,7 +4895,7 @@ const Xe = function() {
|
|
|
4895
4895
|
return f;
|
|
4896
4896
|
}, pad: (l) => l.length < 2 ? `0${l}` : l, readUTF8(l, u, d) {
|
|
4897
4897
|
let f, y = "";
|
|
4898
|
-
for (let
|
|
4898
|
+
for (let F = 0; F < d; F++) y += `%${s.pad(l[u + F].toString(16))}`;
|
|
4899
4899
|
try {
|
|
4900
4900
|
f = decodeURIComponent(y);
|
|
4901
4901
|
} catch {
|
|
@@ -4904,7 +4904,7 @@ const Xe = function() {
|
|
|
4904
4904
|
return f;
|
|
4905
4905
|
} };
|
|
4906
4906
|
function e(l, u, d, f) {
|
|
4907
|
-
const y = u * d,
|
|
4907
|
+
const y = u * d, F = i(f), I = Math.ceil(u * F / 8), C = new Uint8Array(4 * y), R = new Uint32Array(C.buffer), { ctype: O } = f, { depth: v } = f, L = s.readUshort;
|
|
4908
4908
|
if (O == 6) {
|
|
4909
4909
|
const x = y << 2;
|
|
4910
4910
|
if (v == 8) for (var b = 0; b < x; b += 4) C[b] = l[b], C[b + 1] = l[b + 1], C[b + 2] = l[b + 2], C[b + 3] = l[b + 3];
|
|
@@ -4920,31 +4920,31 @@ const Xe = function() {
|
|
|
4920
4920
|
B = 6 * b, R[b] = 255 << 24 | l[B + 4] << 16 | l[B + 2] << 8 | l[B];
|
|
4921
4921
|
} else {
|
|
4922
4922
|
var m = x[0];
|
|
4923
|
-
const V = x[1],
|
|
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] ==
|
|
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 && (C[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) ==
|
|
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 && (C[g + 3] = 0);
|
|
4930
4930
|
}
|
|
4931
4931
|
} else if (O == 3) {
|
|
4932
|
-
const x = f.tabs.PLTE, V = f.tabs.tRNS,
|
|
4932
|
+
const x = f.tabs.PLTE, V = f.tabs.tRNS, Z = V ? V.length : 0;
|
|
4933
4933
|
if (v == 1) for (var k = 0; k < d; k++) {
|
|
4934
|
-
var T = k *
|
|
4934
|
+
var T = k * I, N = k * u;
|
|
4935
4935
|
for (b = 0; b < u; b++) {
|
|
4936
|
-
g =
|
|
4936
|
+
g = N + b << 2;
|
|
4937
4937
|
var U = 3 * (A = l[T + (b >> 3)] >> 7 - ((7 & b) << 0) & 1);
|
|
4938
|
-
C[g] = x[U], C[g + 1] = x[U + 1], C[g + 2] = x[U + 2], C[g + 3] = A <
|
|
4938
|
+
C[g] = x[U], C[g + 1] = x[U + 1], C[g + 2] = x[U + 2], C[g + 3] = A < Z ? V[A] : 255;
|
|
4939
4939
|
}
|
|
4940
4940
|
}
|
|
4941
|
-
if (v == 2) for (k = 0; k < d; k++) for (T = k *
|
|
4942
|
-
g =
|
|
4943
|
-
if (v == 4) for (k = 0; k < d; k++) for (T = k *
|
|
4944
|
-
g =
|
|
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), C[g] = x[U], C[g + 1] = x[U + 1], C[g + 2] = x[U + 2], C[g + 3] = A < Z ? V[A] : 255;
|
|
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), C[g] = x[U], C[g + 1] = x[U + 1], C[g + 2] = x[U + 2], C[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]), C[g] = x[U], C[g + 1] = x[U + 1], C[g + 2] = x[U + 2], C[g + 3] = A <
|
|
4947
|
+
g = b << 2, U = 3 * (A = l[b]), C[g] = x[U], C[g + 1] = x[U + 1], C[g + 2] = x[U + 2], C[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++) {
|
|
@@ -4957,7 +4957,7 @@ const Xe = function() {
|
|
|
4957
4957
|
g = b << 2, _ = l[w = b << 2], C[g] = _, C[g + 1] = _, C[g + 2] = _, C[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
|
-
const x = k *
|
|
4960
|
+
const x = k * I, V = k * u;
|
|
4961
4961
|
if (v == 1) for (var p = 0; p < u; p++) {
|
|
4962
4962
|
var M = (_ = 255 * (l[x + (p >>> 3)] >>> 7 - (7 & p) & 1)) == 255 * m ? 0 : 255;
|
|
4963
4963
|
R[V + p] = M << 24 | _ << 16 | _ << 8 | _;
|
|
@@ -4974,34 +4974,34 @@ const Xe = function() {
|
|
|
4974
4974
|
return C;
|
|
4975
4975
|
}
|
|
4976
4976
|
function t(l, u, d, f) {
|
|
4977
|
-
const y = i(l),
|
|
4978
|
-
return u = l.tabs.CgBI ? r(u,
|
|
4977
|
+
const y = i(l), F = Math.ceil(d * y / 8), I = new Uint8Array((F + 1 + l.interlace) * f);
|
|
4978
|
+
return u = l.tabs.CgBI ? r(u, I) : n(u, I), l.interlace == 0 ? u = o(u, l, 0, d, f) : l.interlace == 1 && (u = function(R, O) {
|
|
4979
4979
|
const v = O.width, L = O.height, b = i(O), B = b >> 3, m = Math.ceil(v * b / 8), g = new Uint8Array(L * m);
|
|
4980
4980
|
let k = 0;
|
|
4981
|
-
const T = [0, 0, 4, 0, 2, 0, 1],
|
|
4981
|
+
const T = [0, 0, 4, 0, 2, 0, 1], N = [0, 4, 0, 2, 0, 1, 0], U = [8, 8, 8, 4, 4, 2, 2], A = [8, 8, 4, 4, 2, 2, 1];
|
|
4982
4982
|
let _ = 0;
|
|
4983
4983
|
for (; _ < 7; ) {
|
|
4984
4984
|
const p = U[_], M = A[_];
|
|
4985
|
-
let x = 0, V = 0,
|
|
4986
|
-
for (;
|
|
4987
|
-
let P =
|
|
4985
|
+
let x = 0, V = 0, Z = T[_];
|
|
4986
|
+
for (; Z < L; ) Z += p, V++;
|
|
4987
|
+
let P = N[_];
|
|
4988
4988
|
for (; P < v; ) P += M, x++;
|
|
4989
|
-
const
|
|
4989
|
+
const q = Math.ceil(x * b / 8);
|
|
4990
4990
|
o(R, O, k, x, V);
|
|
4991
|
-
let
|
|
4991
|
+
let $ = 0, S = T[_];
|
|
4992
4992
|
for (; S < L; ) {
|
|
4993
|
-
let X =
|
|
4993
|
+
let X = N[_], oe = k + $ * 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) {
|
|
4997
4997
|
const te = S * m + X * B;
|
|
4998
|
-
for (let
|
|
4998
|
+
for (let Y = 0; Y < B; Y++) g[te + Y] = R[(oe >> 3) + Y];
|
|
4999
4999
|
}
|
|
5000
5000
|
oe += b, X += M;
|
|
5001
5001
|
}
|
|
5002
|
-
|
|
5002
|
+
$++, S += p;
|
|
5003
5003
|
}
|
|
5004
|
-
x * V != 0 && (k += V * (1 +
|
|
5004
|
+
x * V != 0 && (k += V * (1 + q)), _ += 1;
|
|
5005
5005
|
}
|
|
5006
5006
|
return g;
|
|
5007
5007
|
}(u, l)), u;
|
|
@@ -5013,11 +5013,11 @@ 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,
|
|
5016
|
+
let y, F, I = 0, C = 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
|
-
const g = l.H, k = g.b, T = g.e,
|
|
5019
|
-
for (p && (d = new f(u.length >>> 2 << 5));
|
|
5020
|
-
if (p && (d = l.H.W(d, B + (1 << 17))), C == 1 && (y = w.J,
|
|
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), C = k(u, m + 1, 2), m += 3, C != 0) {
|
|
5020
|
+
if (p && (d = l.H.W(d, B + (1 << 17))), C == 1 && (y = w.J, F = w.h, L = 511, b = 31), C == 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;
|
|
@@ -5025,11 +5025,11 @@ const Xe = function() {
|
|
|
5025
5025
|
const P = T(u, m + 3 * M, 3);
|
|
5026
5026
|
w.Q[1 + (w.X[M] << 1)] = P, P > x && (x = P);
|
|
5027
5027
|
}
|
|
5028
|
-
m += 3 * v, U(w.Q, x), A(w.Q, x, w.u), y = w.w,
|
|
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);
|
|
5030
5030
|
L = (1 << V) - 1;
|
|
5031
|
-
const
|
|
5032
|
-
b = (1 <<
|
|
5031
|
+
const Z = g.V(w.v, R, O, w.D);
|
|
5032
|
+
b = (1 << Z) - 1, U(w.C, V), A(w.C, V, y), U(w.D, Z), A(w.D, Z, F);
|
|
5033
5033
|
}
|
|
5034
5034
|
for (; ; ) {
|
|
5035
5035
|
const x = y[_(u, m) & L];
|
|
@@ -5039,16 +5039,16 @@ const Xe = function() {
|
|
|
5039
5039
|
else {
|
|
5040
5040
|
if (V == 256) break;
|
|
5041
5041
|
{
|
|
5042
|
-
let
|
|
5042
|
+
let Z = B + V - 254;
|
|
5043
5043
|
if (V > 264) {
|
|
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 P =
|
|
5047
|
+
const P = F[_(u, m) & b];
|
|
5048
5048
|
m += 15 & P;
|
|
5049
|
-
const
|
|
5050
|
-
for (m += 15 &
|
|
5051
|
-
B =
|
|
5049
|
+
const q = P >>> 4, $ = w.c[q], S = ($ >>> 4) + k(u, m, 15 & $);
|
|
5050
|
+
for (m += 15 & $; B < Z; ) d[B] = d[B++ - S], d[B] = d[B++ - S], d[B] = d[B++ - S], d[B] = d[B++ - S];
|
|
5051
|
+
B = Z;
|
|
5052
5052
|
}
|
|
5053
5053
|
}
|
|
5054
5054
|
}
|
|
@@ -5063,54 +5063,54 @@ const Xe = function() {
|
|
|
5063
5063
|
if (d <= f) return u;
|
|
5064
5064
|
const y = new Uint8Array(f << 1);
|
|
5065
5065
|
return y.set(u, 0), y;
|
|
5066
|
-
}, l.H.R = function(u, d, f, y,
|
|
5066
|
+
}, l.H.R = function(u, d, f, y, F, I) {
|
|
5067
5067
|
const C = l.H.e, R = l.H.Z;
|
|
5068
5068
|
let O = 0;
|
|
5069
5069
|
for (; O < f; ) {
|
|
5070
|
-
const v = u[R(y,
|
|
5071
|
-
|
|
5070
|
+
const v = u[R(y, F) & d];
|
|
5071
|
+
F += 15 & v;
|
|
5072
5072
|
const L = v >>> 4;
|
|
5073
|
-
if (L <= 15)
|
|
5073
|
+
if (L <= 15) I[O] = L, O++;
|
|
5074
5074
|
else {
|
|
5075
5075
|
let b = 0, B = 0;
|
|
5076
|
-
L == 16 ? (B = 3 + C(y,
|
|
5076
|
+
L == 16 ? (B = 3 + C(y, F, 2), F += 2, b = I[O - 1]) : L == 17 ? (B = 3 + C(y, F, 3), F += 3) : L == 18 && (B = 11 + C(y, F, 7), F += 7);
|
|
5077
5077
|
const m = O + B;
|
|
5078
|
-
for (; O < m; )
|
|
5078
|
+
for (; O < m; ) I[O] = b, O++;
|
|
5079
5079
|
}
|
|
5080
5080
|
}
|
|
5081
|
-
return
|
|
5081
|
+
return F;
|
|
5082
5082
|
}, l.H.V = function(u, d, f, y) {
|
|
5083
|
-
let
|
|
5083
|
+
let F = 0, I = 0;
|
|
5084
5084
|
const C = y.length >>> 1;
|
|
5085
|
-
for (;
|
|
5086
|
-
const R = u[
|
|
5087
|
-
y[
|
|
5085
|
+
for (; I < f; ) {
|
|
5086
|
+
const R = u[I + d];
|
|
5087
|
+
y[I << 1] = 0, y[1 + (I << 1)] = R, R > F && (F = R), I++;
|
|
5088
5088
|
}
|
|
5089
|
-
for (;
|
|
5090
|
-
return
|
|
5089
|
+
for (; I < C; ) y[I << 1] = 0, y[1 + (I << 1)] = 0, I++;
|
|
5090
|
+
return F;
|
|
5091
5091
|
}, l.H.n = function(u, d) {
|
|
5092
5092
|
const f = l.H.m, y = u.length;
|
|
5093
|
-
let
|
|
5093
|
+
let F, I, C, 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
|
-
for (
|
|
5098
|
+
for (F = 0, O[0] = 0, I = 1; I <= d; I++) F = F + O[I - 1] << 1, L[I] = F;
|
|
5099
5099
|
for (C = 0; C < y; C += 2) R = u[C + 1], R != 0 && (u[C] = L[R], L[R]++);
|
|
5100
5100
|
}, l.H.A = function(u, d, f) {
|
|
5101
|
-
const y = u.length,
|
|
5102
|
-
for (let
|
|
5103
|
-
const C =
|
|
5104
|
-
let L = u[
|
|
5101
|
+
const y = u.length, F = l.H.m.r;
|
|
5102
|
+
for (let I = 0; I < y; I += 2) if (u[I + 1] != 0) {
|
|
5103
|
+
const C = I >> 1, R = u[I + 1], O = C << 4 | R, v = d - R;
|
|
5104
|
+
let L = u[I] << v;
|
|
5105
5105
|
const b = L + (1 << v);
|
|
5106
5106
|
for (; L != b; )
|
|
5107
|
-
f[
|
|
5107
|
+
f[F[L] >>> 15 - d] = O, L++;
|
|
5108
5108
|
}
|
|
5109
5109
|
}, l.H.l = function(u, d) {
|
|
5110
5110
|
const f = l.H.m.r, y = 15 - d;
|
|
5111
|
-
for (let
|
|
5112
|
-
const
|
|
5113
|
-
u[
|
|
5111
|
+
for (let F = 0; F < u.length; F += 2) {
|
|
5112
|
+
const I = u[F] << d - u[F + 1];
|
|
5113
|
+
u[F] = f[I] >>> y;
|
|
5114
5114
|
}
|
|
5115
5115
|
}, l.H.M = function(u, d, f) {
|
|
5116
5116
|
f <<= 7 & d;
|
|
@@ -5137,8 +5137,8 @@ const Xe = function() {
|
|
|
5137
5137
|
let y = d;
|
|
5138
5138
|
y = (2863311530 & y) >>> 1 | (1431655765 & y) << 1, y = (3435973836 & y) >>> 2 | (858993459 & y) << 2, y = (4042322160 & y) >>> 4 | (252645135 & y) << 4, y = (4278255360 & y) >>> 8 | (16711935 & y) << 8, u.r[d] = (y >>> 16 | y << 16) >>> 17;
|
|
5139
5139
|
}
|
|
5140
|
-
function f(y,
|
|
5141
|
-
for (;
|
|
5140
|
+
function f(y, F, I) {
|
|
5141
|
+
for (; F-- != 0; ) y.push(0, I);
|
|
5142
5142
|
}
|
|
5143
5143
|
for (d = 0; d < 32; d++) u.q[d] = u.S[d] << 3 | u.T[d], u.c[d] = u.p[d] << 4 | u.z[d];
|
|
5144
5144
|
f(u._, 144, 8), f(u._, 112, 9), f(u._, 24, 7), f(u._, 8, 8), l.H.n(u._, 9), l.H.A(u._, 9, u.J), l.H.l(u._, 9), f(u.$, 32, 5), l.H.n(u.$, 5), l.H.A(u.$, 5, u.h), l.H.l(u.$, 5), f(u.Q, 19, 0), f(u.C, 286, 0), f(u.D, 30, 0), f(u.v, 320, 0);
|
|
@@ -5148,45 +5148,45 @@ const Xe = function() {
|
|
|
5148
5148
|
return [1, null, 3, 1, 2, null, 4][l.ctype] * l.depth;
|
|
5149
5149
|
}
|
|
5150
5150
|
function o(l, u, d, f, y) {
|
|
5151
|
-
let
|
|
5152
|
-
const
|
|
5151
|
+
let F = i(u);
|
|
5152
|
+
const I = Math.ceil(f * F / 8);
|
|
5153
5153
|
let C, R;
|
|
5154
|
-
|
|
5154
|
+
F = Math.ceil(F / 8);
|
|
5155
5155
|
let O = l[d], v = 0;
|
|
5156
|
-
if (O > 1 && (l[d] = [0, 0, 1][O - 2]), O == 3) for (v =
|
|
5157
|
-
for (let L = 0; L < y; L++) if (C = d + L *
|
|
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 (C = d + L * I, R = C + L + 1, O = l[R - 1], v = 0, O == 0) for (; v < I; v++) l[C + v] = l[R + v];
|
|
5158
5158
|
else if (O == 1) {
|
|
5159
|
-
for (; v <
|
|
5160
|
-
for (; v <
|
|
5161
|
-
} else if (O == 2) for (; v <
|
|
5159
|
+
for (; v < F; v++) l[C + v] = l[R + v];
|
|
5160
|
+
for (; v < I; v++) l[C + v] = l[R + v] + l[C + v - F];
|
|
5161
|
+
} else if (O == 2) for (; v < I; v++) l[C + v] = l[R + v] + l[C + v - I];
|
|
5162
5162
|
else if (O == 3) {
|
|
5163
|
-
for (; v <
|
|
5164
|
-
for (; v <
|
|
5163
|
+
for (; v < F; v++) l[C + v] = l[R + v] + (l[C + v - I] >>> 1);
|
|
5164
|
+
for (; v < I; v++) l[C + v] = l[R + v] + (l[C + v - I] + l[C + v - F] >>> 1);
|
|
5165
5165
|
} else {
|
|
5166
|
-
for (; v <
|
|
5167
|
-
for (; v <
|
|
5166
|
+
for (; v < F; v++) l[C + v] = l[R + v] + a(0, l[C + v - I], 0);
|
|
5167
|
+
for (; v < I; v++) l[C + v] = l[R + v] + a(l[C + v - F], l[C + v - I], l[C + v - F - I]);
|
|
5168
5168
|
}
|
|
5169
5169
|
return l;
|
|
5170
5170
|
}
|
|
5171
5171
|
function a(l, u, d) {
|
|
5172
|
-
const f = l + u - d, y = f - l,
|
|
5173
|
-
return y * y <=
|
|
5172
|
+
const f = l + u - d, y = f - l, F = f - u, I = f - d;
|
|
5173
|
+
return y * y <= F * F && y * y <= I * I ? l : F * F <= I * I ? u : d;
|
|
5174
5174
|
}
|
|
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,
|
|
5179
|
-
const O = Math.min(u, y), v = Math.min(d,
|
|
5178
|
+
function h(l, u, d, f, y, F, I, C, R) {
|
|
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 (
|
|
5181
|
+
for (let _ = 0; _ < v; _++) for (let w = 0; w < O; w++) if (I >= 0 && C >= 0 ? (L = _ * u + w << 2, b = (C + _) * y + I + w << 2) : (L = (-C + _) * 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
|
-
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),
|
|
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;
|
|
5185
|
-
f[b + 3] = 255 * M, f[b + 0] = (m +
|
|
5185
|
+
f[b + 3] = 255 * M, f[b + 0] = (m + N * p) * x, f[b + 1] = (g + U * p) * x, f[b + 2] = (k + A * p) * x;
|
|
5186
5186
|
} else if (R == 2)
|
|
5187
|
-
B = l[L + 3], m = l[L], g = l[L + 1], k = l[L + 2], T = f[b + 3],
|
|
5187
|
+
B = l[L + 3], m = l[L], g = l[L + 1], k = l[L + 2], T = f[b + 3], N = f[b], U = f[b + 1], A = f[b + 2], B == T && m == N && g == U && k == A ? (f[b] = 0, f[b + 1] = 0, f[b + 2] = 0, f[b + 3] = 0) : (f[b] = m, f[b + 1] = g, f[b + 2] = k, f[b + 3] = B);
|
|
5188
5188
|
else if (R == 3) {
|
|
5189
|
-
if (B = l[L + 3], m = l[L], g = l[L + 1], k = l[L + 2], T = f[b + 3],
|
|
5189
|
+
if (B = l[L + 3], m = l[L], g = l[L + 1], k = l[L + 2], T = f[b + 3], N = f[b], U = f[b + 1], A = f[b + 2], B == T && m == N && g == U && k == A) continue;
|
|
5190
5190
|
if (B < 220 && T > 20) return !1;
|
|
5191
5191
|
}
|
|
5192
5192
|
return !0;
|
|
@@ -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,
|
|
5197
|
+
const y = s, F = y.readUshort, I = y.readUint, C = { 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!";
|
|
@@ -5218,12 +5218,12 @@ const Xe = function() {
|
|
|
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") C.tabs[w] = { num_frames:
|
|
5221
|
+
} else if (w == "acTL") C.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
5223
|
L != 0 && ((A = C.frames[C.frames.length - 1]).data = t(C, O.slice(0, L), A.rect.width, A.rect.height), L = 0);
|
|
5224
|
-
const p = { x:
|
|
5225
|
-
let M =
|
|
5226
|
-
M =
|
|
5224
|
+
const p = { x: I(d, f + 12), y: I(d, f + 16), width: I(d, f + 4), height: I(d, f + 8) };
|
|
5225
|
+
let M = F(d, f + 22);
|
|
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
|
C.frames.push(x);
|
|
5229
5229
|
} else if (w == "fdAT") {
|
|
@@ -5237,23 +5237,23 @@ const Xe = function() {
|
|
|
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
|
-
var
|
|
5241
|
-
U = y.readUTF8(
|
|
5240
|
+
var N = n(d.slice(g + 2, g + 2 + T));
|
|
5241
|
+
U = y.readUTF8(N, 0, N.length);
|
|
5242
5242
|
}
|
|
5243
5243
|
C.tabs[w][k] = U;
|
|
5244
5244
|
} else if (w == "iTXt") {
|
|
5245
5245
|
C.tabs[w] == null && (C.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) : (
|
|
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)), C.tabs[w][k] = U;
|
|
5249
5249
|
} else if (w == "PLTE") C.tabs[w] = y.readBytes(d, f, _);
|
|
5250
5250
|
else if (w == "hIST") {
|
|
5251
5251
|
const p = C.tabs.PLTE.length / 3;
|
|
5252
|
-
for (C.tabs[w] = [], B = 0; B < p; B++) C.tabs[w].push(
|
|
5253
|
-
} else if (w == "tRNS") C.ctype == 3 ? C.tabs[w] = y.readBytes(d, f, _) : C.ctype == 0 ? C.tabs[w] =
|
|
5252
|
+
for (C.tabs[w] = [], B = 0; B < p; B++) C.tabs[w].push(F(d, f + 2 * B));
|
|
5253
|
+
} else if (w == "tRNS") C.ctype == 3 ? C.tabs[w] = y.readBytes(d, f, _) : C.ctype == 0 ? C.tabs[w] = F(d, f) : C.ctype == 2 && (C.tabs[w] = [F(d, f), F(d, f + 2), F(d, f + 4)]);
|
|
5254
5254
|
else if (w == "gAMA") C.tabs[w] = y.readUint(d, f) / 1e5;
|
|
5255
5255
|
else if (w == "sRGB") C.tabs[w] = d[f];
|
|
5256
|
-
else if (w == "bKGD") C.ctype == 0 || C.ctype == 4 ? C.tabs[w] = [
|
|
5256
|
+
else if (w == "bKGD") C.ctype == 0 || C.ctype == 4 ? C.tabs[w] = [F(d, f)] : C.ctype == 2 || C.ctype == 6 ? C.tabs[w] = [F(d, f), F(d, f + 2), F(d, f + 4)] : C.ctype == 3 && (C.tabs[w] = d[f]);
|
|
5257
5257
|
else if (w == "IEND") break;
|
|
5258
5258
|
f += _, y.readUint(d, f), f += 4;
|
|
5259
5259
|
}
|
|
@@ -5264,13 +5264,13 @@ const Xe = function() {
|
|
|
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
|
|
5267
|
+
const F = d * f * 4, I = new Uint8Array(F), C = 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
|
-
if (v != 0) for (var O = 0; O <
|
|
5271
|
-
if (L.blend == 0 ? h(k, m, g,
|
|
5272
|
-
if (L.dispose == 1) h(C, m, g,
|
|
5273
|
-
else if (L.dispose == 2) for (O = 0; O <
|
|
5270
|
+
if (v != 0) for (var O = 0; O < F; O++) R[O] = I[O];
|
|
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(C, m, g, I, d, f, b, B, 0);
|
|
5273
|
+
else if (L.dispose == 2) for (O = 0; O < F; O++) I[O] = R[O];
|
|
5274
5274
|
}
|
|
5275
5275
|
}
|
|
5276
5276
|
return y;
|
|
@@ -5287,7 +5287,7 @@ const Xe = function() {
|
|
|
5287
5287
|
}
|
|
5288
5288
|
return m;
|
|
5289
5289
|
}(), update(m, g, k, T) {
|
|
5290
|
-
for (let
|
|
5290
|
+
for (let N = 0; N < T; N++) m = n.table[255 & (m ^ g[k + N])] ^ m >>> 8;
|
|
5291
5291
|
return m;
|
|
5292
5292
|
}, crc: (m, g, k) => 4294967295 ^ n.update(4294967295, m, g, k) };
|
|
5293
5293
|
function r(m, g, k, T) {
|
|
@@ -5297,10 +5297,10 @@ const Xe = function() {
|
|
|
5297
5297
|
return Math.max(0, Math.min(255, m));
|
|
5298
5298
|
}
|
|
5299
5299
|
function o(m, g) {
|
|
5300
|
-
const k = m[0] - g[0], T = m[1] - g[1],
|
|
5301
|
-
return k * k + T * T +
|
|
5300
|
+
const k = m[0] - g[0], T = m[1] - g[1], N = m[2] - g[2], U = m[3] - g[3];
|
|
5301
|
+
return k * k + T * T + N * N + U * U;
|
|
5302
5302
|
}
|
|
5303
|
-
function a(m, g, k, T,
|
|
5303
|
+
function a(m, g, k, T, N, U, A) {
|
|
5304
5304
|
A == null && (A = 1);
|
|
5305
5305
|
const _ = T.length, w = [];
|
|
5306
5306
|
for (var p = 0; p < _; p++) {
|
|
@@ -5314,102 +5314,102 @@ const Xe = function() {
|
|
|
5314
5314
|
x != p && V < S && (S = V, M = x);
|
|
5315
5315
|
}
|
|
5316
5316
|
}
|
|
5317
|
-
const
|
|
5318
|
-
for (p = 0; p <
|
|
5317
|
+
const Z = new Uint32Array(N.buffer), P = new Int16Array(g * k * 4), q = [0, 8, 2, 10, 12, 4, 14, 6, 3, 11, 1, 9, 15, 7, 13, 5];
|
|
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 $;
|
|
5321
|
+
p = 4 * (S * g + X), A != 2 ? $ = [i(m[p] + P[p]), i(m[p + 1] + P[p + 1]), i(m[p + 2] + P[p + 2]), i(m[p + 3] + P[p + 3])] : (V = q[4 * (3 & S) + (3 & X)], $ = [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($, w[x]);
|
|
5325
5325
|
re < oe && (oe = re, M = x);
|
|
5326
5326
|
}
|
|
5327
|
-
const te = w[M],
|
|
5328
|
-
A == 1 && (X != g - 1 && r(
|
|
5327
|
+
const te = w[M], Y = [$[0] - te[0], $[1] - te[1], $[2] - te[2], $[3] - te[3]];
|
|
5328
|
+
A == 1 && (X != g - 1 && r(Y, P, p + 4, 7), S != k - 1 && (X != 0 && r(Y, P, p + 4 * g - 4, 3), r(Y, P, p + 4 * g, 5), X != g - 1 && r(Y, P, p + 4 * g + 4, 1))), U[p >> 2] = M, Z[p >> 2] = T[M];
|
|
5329
5329
|
}
|
|
5330
5330
|
}
|
|
5331
|
-
function c(m, g, k, T,
|
|
5332
|
-
|
|
5331
|
+
function c(m, g, k, T, N) {
|
|
5332
|
+
N == null && (N = {});
|
|
5333
5333
|
const { crc: U } = n, A = e.writeUint, _ = e.writeUshort, w = e.writeASCII;
|
|
5334
5334
|
let p = 8;
|
|
5335
5335
|
const M = m.frames.length > 1;
|
|
5336
|
-
let x, V = !1,
|
|
5337
|
-
if (
|
|
5338
|
-
for (var P = m.plte.length,
|
|
5339
|
-
|
|
5340
|
-
}
|
|
5341
|
-
for (var
|
|
5342
|
-
M && (
|
|
5343
|
-
|
|
5344
|
-
const S = new Uint8Array(
|
|
5345
|
-
for (
|
|
5346
|
-
if (A(S, p, 13), p += 4, w(S, p, "IHDR"), p += 4, A(S, p, g), p += 4, A(S, p, k), p += 4, S[p] = m.depth, p++, S[p] = m.ctype, p++, S[p] = 0, p++, S[p] = 0, p++, S[p] = 0, p++, A(S, p, U(S, p - 17, 17)), p += 4,
|
|
5347
|
-
const
|
|
5348
|
-
A(S, p,
|
|
5349
|
-
}
|
|
5350
|
-
if (
|
|
5351
|
-
for (A(S, p, 3 * (P = m.plte.length)), p += 4, w(S, p, "PLTE"), p += 4,
|
|
5352
|
-
const
|
|
5353
|
-
S[p +
|
|
5336
|
+
let x, V = !1, Z = 33 + (M ? 20 : 0);
|
|
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 P = m.plte.length, q = 0; q < P; q++) m.plte[q] >>> 24 != 255 && (V = !0);
|
|
5339
|
+
Z += 8 + 3 * P + 4 + (V ? 8 + 1 * P + 4 : 0);
|
|
5340
|
+
}
|
|
5341
|
+
for (var $ = 0; $ < m.frames.length; $++)
|
|
5342
|
+
M && (Z += 38), Z += (te = m.frames[$]).cimg.length + 12, $ != 0 && (Z += 4);
|
|
5343
|
+
Z += 12;
|
|
5344
|
+
const S = new Uint8Array(Z), X = [137, 80, 78, 71, 13, 10, 26, 10];
|
|
5345
|
+
for (q = 0; q < 8; q++) S[q] = X[q];
|
|
5346
|
+
if (A(S, p, 13), p += 4, w(S, p, "IHDR"), p += 4, A(S, p, g), p += 4, A(S, p, k), p += 4, S[p] = m.depth, p++, S[p] = m.ctype, p++, S[p] = 0, p++, S[p] = 0, p++, S[p] = 0, p++, A(S, p, U(S, p - 17, 17)), p += 4, N.sRGB != null && (A(S, p, 1), p += 4, w(S, p, "sRGB"), p += 4, S[p] = N.sRGB, p++, A(S, p, U(S, p - 5, 5)), p += 4), N.iCCP != null) {
|
|
5347
|
+
const Y = 13 + x.length;
|
|
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
|
+
}
|
|
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 * (P = m.plte.length)), p += 4, w(S, p, "PLTE"), p += 4, q = 0; q < P; q++) {
|
|
5352
|
+
const Y = 3 * q, re = m.plte[q], fe = 255 & re, be = re >>> 8 & 255, ft = re >>> 16 & 255;
|
|
5353
|
+
S[p + Y + 0] = fe, S[p + Y + 1] = be, S[p + Y + 2] = ft;
|
|
5354
5354
|
}
|
|
5355
5355
|
if (p += 3 * P, A(S, p, U(S, p - 3 * P - 4, 3 * P + 4)), p += 4, V) {
|
|
5356
|
-
for (A(S, p, P), p += 4, w(S, p, "tRNS"), p += 4,
|
|
5356
|
+
for (A(S, p, P), p += 4, w(S, p, "tRNS"), p += 4, q = 0; q < P; q++) S[p + q] = m.plte[q] >>> 24 & 255;
|
|
5357
5357
|
p += P, A(S, p, U(S, p - P - 4, P + 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[
|
|
5364
|
-
const
|
|
5365
|
-
A(S, p, (P =
|
|
5361
|
+
for ($ = 0; $ < m.frames.length; $++) {
|
|
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[$]), 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
|
+
const Y = te.cimg;
|
|
5365
|
+
A(S, p, (P = Y.length) + ($ == 0 ? 0 : 4)), p += 4;
|
|
5366
5366
|
const re = p;
|
|
5367
|
-
w(S, p,
|
|
5367
|
+
w(S, p, $ == 0 ? "IDAT" : "fdAT"), p += 4, $ != 0 && (A(S, p, oe++), p += 4), S.set(Y, p), 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
|
}
|
|
5371
5371
|
function h(m, g, k) {
|
|
5372
5372
|
for (let T = 0; T < m.frames.length; T++) {
|
|
5373
|
-
const
|
|
5374
|
-
|
|
5375
|
-
const U =
|
|
5376
|
-
|
|
5373
|
+
const N = m.frames[T];
|
|
5374
|
+
N.rect.width;
|
|
5375
|
+
const U = N.rect.height, A = new Uint8Array(U * N.bpl + U);
|
|
5376
|
+
N.cimg = f(N.img, U, N.bpp, N.bpl, A, g, k);
|
|
5377
5377
|
}
|
|
5378
5378
|
}
|
|
5379
|
-
function l(m, g, k, T,
|
|
5380
|
-
const U =
|
|
5381
|
-
let x = 6, V = 8,
|
|
5379
|
+
function l(m, g, k, T, N) {
|
|
5380
|
+
const U = N[0], A = N[1], _ = N[2], w = N[3], p = N[4], M = N[5];
|
|
5381
|
+
let x = 6, V = 8, Z = 255;
|
|
5382
5382
|
for (var P = 0; P < m.length; P++) {
|
|
5383
|
-
const
|
|
5384
|
-
for (var
|
|
5383
|
+
const Ne = new Uint8Array(m[P]);
|
|
5384
|
+
for (var q = Ne.length, $ = 0; $ < q; $ += 4) Z &= Ne[$ + 3];
|
|
5385
5385
|
}
|
|
5386
|
-
const S =
|
|
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, Ke = ne, st = me, Mt = Ie ? 1 : 0;
|
|
5392
5392
|
if (ee != 0) {
|
|
5393
|
-
const dn = Te ||
|
|
5393
|
+
const dn = Te || Ie || ee == 1 || pe[ee - 2].dispose != 0 ? 1 : 2;
|
|
5394
5394
|
let Vt = 0, ce = 1e9;
|
|
5395
|
-
for (let
|
|
5396
|
-
var Ue = new Uint8Array(ae[ee - 1 -
|
|
5397
|
-
const ot = new Uint32Array(ae[ee - 1 -
|
|
5398
|
-
let Et = ne, vt = me, Ht = -1,
|
|
5395
|
+
for (let je = 0; je < dn; je++) {
|
|
5396
|
+
var Ue = new Uint8Array(ae[ee - 1 - je]);
|
|
5397
|
+
const ot = new Uint32Array(ae[ee - 1 - je]);
|
|
5398
|
+
let Et = ne, vt = me, Ht = -1, Qt = -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 > Ht && (Ht = xt), Ut < vt && (vt = Ut), Ut >
|
|
5401
|
-
Ht == -1 && (Et = vt = Ht =
|
|
5402
|
-
const er = (Ht - Et + 1) * (
|
|
5403
|
-
er < ce && (ce = er, Vt =
|
|
5400
|
+
Ve[Ae = Ut * ne + xt] != ot[Ae] && (xt < Et && (Et = xt), xt > Ht && (Ht = xt), Ut < vt && (vt = Ut), Ut > Qt && (Qt = Ut));
|
|
5401
|
+
Ht == -1 && (Et = vt = Ht = Qt = 0), ge && ((1 & Et) == 1 && Et--, (1 & vt) == 1 && vt--);
|
|
5402
|
+
const er = (Ht - Et + 1) * (Qt - vt + 1);
|
|
5403
|
+
er < ce && (ce = er, Vt = je, xe = Et, _e = vt, Ke = Ht - Et + 1, st = Qt - vt + 1);
|
|
5404
5404
|
}
|
|
5405
|
-
Ue = new Uint8Array(ae[ee - 1 - Vt]), Vt == 1 && (pe[ee - 1].dispose = 2), Re = new Uint8Array(
|
|
5405
|
+
Ue = new Uint8Array(ae[ee - 1 - Vt]), Vt == 1 && (pe[ee - 1].dispose = 2), Re = new Uint8Array(Ke * st * 4), s(Ue, ne, me, Re, Ke, st, -xe, -_e, 0), Mt = s(Le, ne, me, Re, Ke, st, -xe, -_e, 3) ? 1 : 0, Mt == 1 ? d(Le, ne, me, Re, { x: xe, y: _e, width: Ke, height: st }) : s(Le, ne, me, Re, Ke, 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: Ke, height: st }, img: Re, blend: Mt, dispose: 0 });
|
|
5408
5408
|
}
|
|
5409
|
-
if (
|
|
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), Ke = { 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, Ke, ge), u(ae, ne, me, pe, ee, Ke, ge);
|
|
5413
5413
|
}
|
|
5414
5414
|
let rt = 0;
|
|
5415
5415
|
if (ae.length != 1) for (var Ae = 0; Ae < pe.length; Ae++) {
|
|
@@ -5417,10 +5417,10 @@ const Xe = function() {
|
|
|
5417
5417
|
rt += (it = pe[Ae]).rect.width * it.rect.height;
|
|
5418
5418
|
}
|
|
5419
5419
|
return pe;
|
|
5420
|
-
}(m, g, k, U, A, _), oe = {}, te = [],
|
|
5420
|
+
}(m, g, k, U, A, _), oe = {}, te = [], Y = [];
|
|
5421
5421
|
if (T != 0) {
|
|
5422
|
-
const
|
|
5423
|
-
for (
|
|
5422
|
+
const Ne = [];
|
|
5423
|
+
for ($ = 0; $ < X.length; $++) Ne.push(X[$].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;
|
|
@@ -5436,133 +5436,133 @@ const Xe = function() {
|
|
|
5436
5436
|
Re += rt;
|
|
5437
5437
|
}
|
|
5438
5438
|
return ee.buffer;
|
|
5439
|
-
}(
|
|
5440
|
-
for (
|
|
5439
|
+
}(Ne), ne = F(ae, T);
|
|
5440
|
+
for ($ = 0; $ < ne.plte.length; $++) te.push(ne.plte[$].est.rgba);
|
|
5441
5441
|
let me = 0;
|
|
5442
|
-
for (
|
|
5443
|
-
const
|
|
5444
|
-
var re = new Uint8Array(ne.inds.buffer, me >> 2,
|
|
5445
|
-
|
|
5446
|
-
const ge = new Uint8Array(ne.abuf, me,
|
|
5447
|
-
M && a(fe.img, fe.rect.width, fe.rect.height, te, ge, re), fe.img.set(ge), me +=
|
|
5442
|
+
for ($ = 0; $ < X.length; $++) {
|
|
5443
|
+
const Ie = (fe = X[$]).img.length;
|
|
5444
|
+
var re = new Uint8Array(ne.inds.buffer, me >> 2, Ie >> 2);
|
|
5445
|
+
Y.push(re);
|
|
5446
|
+
const ge = new Uint8Array(ne.abuf, me, Ie);
|
|
5447
|
+
M && a(fe.img, fe.rect.width, fe.rect.height, te, ge, re), fe.img.set(ge), me += Ie;
|
|
5448
5448
|
}
|
|
5449
5449
|
} else for (P = 0; P < X.length; P++) {
|
|
5450
5450
|
var fe = X[P];
|
|
5451
|
-
const
|
|
5451
|
+
const Ne = new Uint32Array(fe.img.buffer);
|
|
5452
5452
|
var be = fe.rect.width;
|
|
5453
|
-
for (
|
|
5454
|
-
const ae =
|
|
5455
|
-
if (
|
|
5456
|
-
else if (
|
|
5453
|
+
for (q = Ne.length, re = new Uint8Array(q), Y.push(re), $ = 0; $ < q; $++) {
|
|
5454
|
+
const ae = Ne[$];
|
|
5455
|
+
if ($ != 0 && ae == Ne[$ - 1]) re[$] = re[$ - 1];
|
|
5456
|
+
else if ($ > be && ae == Ne[$ - be]) re[$] = re[$ - 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[$] = ne;
|
|
5461
5461
|
}
|
|
5462
5462
|
}
|
|
5463
5463
|
}
|
|
5464
5464
|
const ft = te.length;
|
|
5465
5465
|
for (ft <= 256 && p == 0 && (V = ft <= 2 ? 1 : ft <= 4 ? 2 : ft <= 16 ? 4 : 8, V = Math.max(V, w)), P = 0; P < X.length; P++) {
|
|
5466
5466
|
(fe = X[P]).rect.x, fe.rect.y, be = fe.rect.width;
|
|
5467
|
-
const
|
|
5467
|
+
const Ne = fe.rect.height;
|
|
5468
5468
|
let ae = fe.img;
|
|
5469
5469
|
new Uint32Array(ae.buffer);
|
|
5470
5470
|
let ne = 4 * be, me = 4;
|
|
5471
5471
|
if (ft <= 256 && p == 0) {
|
|
5472
5472
|
ne = Math.ceil(V * be / 8);
|
|
5473
|
-
var
|
|
5474
|
-
const
|
|
5475
|
-
for (let ge = 0; ge <
|
|
5476
|
-
|
|
5473
|
+
var We = new Uint8Array(ne * Ne);
|
|
5474
|
+
const Ie = Y[P];
|
|
5475
|
+
for (let ge = 0; ge < Ne; ge++) {
|
|
5476
|
+
$ = ge * ne;
|
|
5477
5477
|
const Te = ge * be;
|
|
5478
|
-
if (V == 8) for (var de = 0; de < be; de++) $
|
|
5479
|
-
else if (V == 4) for (de = 0; de < be; de++) $
|
|
5480
|
-
else if (V == 2) for (de = 0; de < be; de++) $
|
|
5481
|
-
else if (V == 1) for (de = 0; de < be; de++) $
|
|
5478
|
+
if (V == 8) for (var de = 0; de < be; de++) We[$ + de] = Ie[Te + de];
|
|
5479
|
+
else if (V == 4) for (de = 0; de < be; de++) We[$ + (de >> 1)] |= Ie[Te + de] << 4 - 4 * (1 & de);
|
|
5480
|
+
else if (V == 2) for (de = 0; de < be; de++) We[$ + (de >> 2)] |= Ie[Te + de] << 6 - 2 * (3 & de);
|
|
5481
|
+
else if (V == 1) for (de = 0; de < be; de++) We[$ + (de >> 3)] |= Ie[Te + de] << 7 - 1 * (7 & de);
|
|
5482
5482
|
}
|
|
5483
|
-
ae =
|
|
5483
|
+
ae = We, x = 3, me = 1;
|
|
5484
5484
|
} else if (S == 0 && X.length == 1) {
|
|
5485
|
-
|
|
5486
|
-
const
|
|
5487
|
-
for (
|
|
5488
|
-
const ge = 3 *
|
|
5489
|
-
|
|
5485
|
+
We = new Uint8Array(be * Ne * 3);
|
|
5486
|
+
const Ie = be * Ne;
|
|
5487
|
+
for ($ = 0; $ < Ie; $++) {
|
|
5488
|
+
const ge = 3 * $, Te = 4 * $;
|
|
5489
|
+
We[ge] = ae[Te], We[ge + 1] = ae[Te + 1], We[ge + 2] = ae[Te + 2];
|
|
5490
5490
|
}
|
|
5491
|
-
ae =
|
|
5491
|
+
ae = We, x = 2, me = 3, ne = 3 * be;
|
|
5492
5492
|
}
|
|
5493
5493
|
fe.img = ae, fe.bpl = ne, fe.bpp = me;
|
|
5494
5494
|
}
|
|
5495
5495
|
return { ctype: x, depth: V, plte: te, frames: X };
|
|
5496
5496
|
}
|
|
5497
|
-
function u(m, g, k, T,
|
|
5498
|
-
const _ = Uint8Array, w = Uint32Array, p = new _(m[
|
|
5499
|
-
let P = g,
|
|
5497
|
+
function u(m, g, k, T, N, U, A) {
|
|
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 P = g, q = k, $ = -1, S = -1;
|
|
5500
5500
|
for (let oe = 0; oe < U.height; oe++) for (let te = 0; te < U.width; te++) {
|
|
5501
|
-
const
|
|
5502
|
-
be == 0 || T[
|
|
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 < P && (P = Y), Y > $ && ($ = Y), re < q && (q = re), re > S && (S = re));
|
|
5503
5503
|
}
|
|
5504
|
-
|
|
5505
|
-
const X = T[
|
|
5506
|
-
X.rect = U, X.blend = 1, X.img = new Uint8Array(U.width * U.height * 4), T[
|
|
5504
|
+
$ == -1 && (P = q = $ = S = 0), A && ((1 & P) == 1 && P--, (1 & q) == 1 && q--), U = { x: P, y: q, width: $ - P + 1, height: S - q + 1 };
|
|
5505
|
+
const X = T[N];
|
|
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
|
}
|
|
5508
|
-
function d(m, g, k, T,
|
|
5509
|
-
s(m, g, k, T,
|
|
5508
|
+
function d(m, g, k, T, N) {
|
|
5509
|
+
s(m, g, k, T, N.width, N.height, -N.x, -N.y, 2);
|
|
5510
5510
|
}
|
|
5511
|
-
function f(m, g, k, T,
|
|
5511
|
+
function f(m, g, k, T, N, U, A) {
|
|
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 = $s;
|
|
5516
5516
|
for (var x = 0; x < p.length; x++) {
|
|
5517
|
-
for (let P = 0; P < g; P++) y(
|
|
5518
|
-
_.push(M.deflate(
|
|
5517
|
+
for (let P = 0; P < g; P++) y(N, m, P, T, k, p[x]);
|
|
5518
|
+
_.push(M.deflate(N, w));
|
|
5519
5519
|
}
|
|
5520
|
-
let V,
|
|
5521
|
-
for (x = 0; x < _.length; x++) _[x].length <
|
|
5520
|
+
let V, Z = 1e9;
|
|
5521
|
+
for (x = 0; x < _.length; x++) _[x].length < Z && (V = x, Z = _[x].length);
|
|
5522
5522
|
return _[V];
|
|
5523
5523
|
}
|
|
5524
|
-
function y(m, g, k, T,
|
|
5524
|
+
function y(m, g, k, T, N, U) {
|
|
5525
5525
|
const A = k * T;
|
|
5526
5526
|
let _ = A + k;
|
|
5527
5527
|
if (m[_] = U, _++, U == 0) if (T < 500) for (var w = 0; w < T; w++) m[_ + w] = g[A + w];
|
|
5528
5528
|
else m.set(new Uint8Array(g.buffer, A, T), _);
|
|
5529
5529
|
else if (U == 1) {
|
|
5530
|
-
for (w = 0; w <
|
|
5531
|
-
for (w =
|
|
5530
|
+
for (w = 0; w < N; w++) m[_ + w] = g[A + w];
|
|
5531
|
+
for (w = N; w < T; w++) m[_ + w] = g[A + w] - g[A + w - N] + 256 & 255;
|
|
5532
5532
|
} else if (k == 0) {
|
|
5533
|
-
for (w = 0; w <
|
|
5534
|
-
if (U == 2) for (w =
|
|
5535
|
-
if (U == 3) for (w =
|
|
5536
|
-
if (U == 4) for (w =
|
|
5533
|
+
for (w = 0; w < N; w++) m[_ + w] = g[A + w];
|
|
5534
|
+
if (U == 2) for (w = N; w < T; w++) m[_ + w] = g[A + w];
|
|
5535
|
+
if (U == 3) for (w = N; w < T; w++) m[_ + w] = g[A + w] - (g[A + w - N] >> 1) + 256 & 255;
|
|
5536
|
+
if (U == 4) for (w = N; w < T; w++) m[_ + w] = g[A + w] - t(g[A + w - N], 0, 0) + 256 & 255;
|
|
5537
5537
|
} else {
|
|
5538
5538
|
if (U == 2) for (w = 0; w < T; w++) m[_ + w] = g[A + w] + 256 - g[A + w - T] & 255;
|
|
5539
5539
|
if (U == 3) {
|
|
5540
|
-
for (w = 0; w <
|
|
5541
|
-
for (w =
|
|
5540
|
+
for (w = 0; w < N; w++) m[_ + w] = g[A + w] + 256 - (g[A + w - T] >> 1) & 255;
|
|
5541
|
+
for (w = N; w < T; w++) m[_ + w] = g[A + w] + 256 - (g[A + w - T] + g[A + w - N] >> 1) & 255;
|
|
5542
5542
|
}
|
|
5543
5543
|
if (U == 4) {
|
|
5544
|
-
for (w = 0; w <
|
|
5545
|
-
for (w =
|
|
5544
|
+
for (w = 0; w < N; w++) m[_ + w] = g[A + w] + 256 - t(0, g[A + w - T], 0) & 255;
|
|
5545
|
+
for (w = N; w < T; w++) m[_ + w] = g[A + w] + 256 - t(g[A + w - N], g[A + w - T], g[A + w - N - T]) & 255;
|
|
5546
5546
|
}
|
|
5547
5547
|
}
|
|
5548
5548
|
}
|
|
5549
|
-
function
|
|
5550
|
-
const k = new Uint8Array(m), T = k.slice(0),
|
|
5549
|
+
function F(m, g) {
|
|
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 = C(A, V = k[x] * (1 / 255),
|
|
5553
|
+
M = C(A, V = k[x] * (1 / 255), Z = k[x + 1] * (1 / 255), P = 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,
|
|
5556
|
-
for (M = A; M.left; ) M = R(M.est, V,
|
|
5557
|
-
p[x >> 2] = M.ind,
|
|
5555
|
+
var V = k[x] * 0.00392156862745098, Z = k[x + 1] * (1 / 255), P = k[x + 2] * (1 / 255), q = k[x + 3] * (1 / 255);
|
|
5556
|
+
for (M = A; M.left; ) M = R(M.est, V, Z, P, q) <= 0 ? M.left : M.right;
|
|
5557
|
+
p[x >> 2] = M.ind, N[x >> 2] = M.est.rgba;
|
|
5558
5558
|
}
|
|
5559
5559
|
return { abuf: T.buffer, inds: p, plte: _ };
|
|
5560
5560
|
}
|
|
5561
|
-
function
|
|
5561
|
+
function I(m, g, k) {
|
|
5562
5562
|
k == null && (k = 1e-4);
|
|
5563
|
-
const T = new Uint32Array(m.buffer),
|
|
5564
|
-
|
|
5565
|
-
const U = [
|
|
5563
|
+
const T = new Uint32Array(m.buffer), N = { i0: 0, i1: m.length, bst: null, est: null, tdst: 0, left: null, right: null };
|
|
5564
|
+
N.bst = L(m, N.i0, N.i1), N.est = b(N.bst);
|
|
5565
|
+
const U = [N];
|
|
5566
5566
|
for (; U.length < g; ) {
|
|
5567
5567
|
let _ = 0, w = 0;
|
|
5568
5568
|
for (var A = 0; A < U.length; A++) U[A].est.L > _ && (_ = U[A].est.L, w = A);
|
|
@@ -5580,68 +5580,68 @@ const Xe = function() {
|
|
|
5580
5580
|
V.est = b(V.bst), p.left = x, p.right = V, U[w] = x, U.push(V);
|
|
5581
5581
|
}
|
|
5582
5582
|
for (U.sort((_, w) => w.bst.N - _.bst.N), A = 0; A < U.length; A++) U[A].ind = A;
|
|
5583
|
-
return [
|
|
5584
|
-
}
|
|
5585
|
-
function C(m, g, k, T,
|
|
5586
|
-
if (m.left == null) return m.tdst = function(x, V,
|
|
5587
|
-
const
|
|
5588
|
-
return
|
|
5589
|
-
}(m.est.q, g, k, T,
|
|
5590
|
-
const U = R(m.est, g, k, T,
|
|
5583
|
+
return [N, U];
|
|
5584
|
+
}
|
|
5585
|
+
function C(m, g, k, T, N) {
|
|
5586
|
+
if (m.left == null) return m.tdst = function(x, V, Z, P, q) {
|
|
5587
|
+
const $ = V - x[0], S = Z - x[1], X = P - x[2], oe = q - x[3];
|
|
5588
|
+
return $ * $ + S * S + X * X + oe * oe;
|
|
5589
|
+
}(m.est.q, g, k, T, N), m;
|
|
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 = C(A, g, k, T,
|
|
5593
|
+
const w = C(A, g, k, T, N);
|
|
5594
5594
|
if (w.tdst <= U * U) return w;
|
|
5595
|
-
const p = C(_, g, k, T,
|
|
5595
|
+
const p = C(_, g, k, T, N);
|
|
5596
5596
|
return p.tdst < w.tdst ? p : w;
|
|
5597
5597
|
}
|
|
5598
|
-
function R(m, g, k, T,
|
|
5598
|
+
function R(m, g, k, T, N) {
|
|
5599
5599
|
const { e: U } = m;
|
|
5600
|
-
return U[0] * g + U[1] * k + U[2] * T + U[3] *
|
|
5600
|
+
return U[0] * g + U[1] * k + U[2] * T + U[3] * N - m.eMq;
|
|
5601
5601
|
}
|
|
5602
|
-
function O(m, g, k, T,
|
|
5602
|
+
function O(m, g, k, T, N, U) {
|
|
5603
5603
|
for (T -= 4; k < T; ) {
|
|
5604
|
-
for (; v(m, k,
|
|
5605
|
-
for (; v(m, T,
|
|
5604
|
+
for (; v(m, k, N) <= U; ) k += 4;
|
|
5605
|
+
for (; v(m, T, N) > U; ) T -= 4;
|
|
5606
5606
|
if (k >= T) break;
|
|
5607
5607
|
const A = g[k >> 2];
|
|
5608
5608
|
g[k >> 2] = g[T >> 2], g[T >> 2] = A, k += 4, T -= 4;
|
|
5609
5609
|
}
|
|
5610
|
-
for (; v(m, k,
|
|
5610
|
+
for (; v(m, k, N) > U; ) k -= 4;
|
|
5611
5611
|
return k + 4;
|
|
5612
5612
|
}
|
|
5613
5613
|
function v(m, g, k) {
|
|
5614
5614
|
return m[g] * k[0] + m[g + 1] * k[1] + m[g + 2] * k[2] + m[g + 3] * k[3];
|
|
5615
5615
|
}
|
|
5616
5616
|
function L(m, g, k) {
|
|
5617
|
-
const T = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
5617
|
+
const T = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], N = [0, 0, 0, 0], U = k - g >> 2;
|
|
5618
5618
|
for (let A = g; A < k; A += 4) {
|
|
5619
5619
|
const _ = m[A] * 0.00392156862745098, w = m[A + 1] * (1 / 255), p = m[A + 2] * (1 / 255), M = m[A + 3] * (1 / 255);
|
|
5620
|
-
|
|
5620
|
+
N[0] += _, N[1] += w, N[2] += p, N[3] += M, T[0] += _ * _, T[1] += _ * w, T[2] += _ * p, T[3] += _ * M, T[5] += w * w, T[6] += w * p, T[7] += w * M, T[10] += p * p, T[11] += p * M, T[15] += M * M;
|
|
5621
5621
|
}
|
|
5622
|
-
return T[4] = T[1], T[8] = T[2], T[9] = T[6], T[12] = T[3], T[13] = T[7], T[14] = T[11], { R: T, m:
|
|
5622
|
+
return T[4] = T[1], T[8] = T[2], T[9] = T[6], T[12] = T[3], T[13] = T[7], T[14] = T[11], { R: T, m: N, N: U };
|
|
5623
5623
|
}
|
|
5624
5624
|
function b(m) {
|
|
5625
|
-
const { R: g } = m, { m: k } = m, { N: T } = m,
|
|
5626
|
-
let V = [Math.random(), Math.random(), Math.random(), Math.random()],
|
|
5627
|
-
if (T != 0) for (let
|
|
5628
|
-
const
|
|
5629
|
-
return { Cov: p, q
|
|
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, P = 0;
|
|
5627
|
+
if (T != 0) for (let $ = 0; $ < 16 && (V = x.multVec(M, V), P = Math.sqrt(x.dot(V, V)), V = x.sml(1 / P, V), !($ != 0 && Math.abs(P - Z) < 1e-9)); $++) Z = P;
|
|
5628
|
+
const q = [N * w, U * w, A * w, _ * w];
|
|
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
|
-
Xe.encode = function(g, k, T,
|
|
5633
|
-
|
|
5634
|
-
const w = l(g, k, T,
|
|
5632
|
+
Xe.encode = function(g, k, T, N, U, A, _) {
|
|
5633
|
+
N == null && (N = 0), _ == null && (_ = !1);
|
|
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
|
-
}, Xe.encodeLL = function(g, k, T,
|
|
5637
|
-
const p = { ctype: 0 + (
|
|
5636
|
+
}, Xe.encodeLL = function(g, k, T, N, U, A, _, w) {
|
|
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
|
-
}, Xe.encode.compress = l, Xe.encode.dither = a, Xe.quantize =
|
|
5640
|
+
}, Xe.encode.compress = l, Xe.encode.dither = a, Xe.quantize = F, Xe.quantize.getKDtree = I, Xe.quantize.getNearest = C;
|
|
5641
5641
|
})();
|
|
5642
|
-
const
|
|
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,
|
|
5644
|
+
let f, y, F, I, C = d, R = 0, O = 0, v = 0;
|
|
5645
5645
|
function L(m) {
|
|
5646
5646
|
u.setUint16(O, m, !0), O += 2;
|
|
5647
5647
|
}
|
|
@@ -5653,19 +5653,19 @@ const qr = { toArrayBuffer(s, e) {
|
|
|
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
5655
|
for (; R < n && C > 0; ) {
|
|
5656
|
-
for (
|
|
5656
|
+
for (I = 122 + R * a, f = 0; f < r; ) C--, y = o[v++], F = y >>> 24, u.setUint32(I + f, y << 8 | F), f += 4;
|
|
5657
5657
|
R++;
|
|
5658
5658
|
}
|
|
5659
|
-
v < o.length ? (C = d, setTimeout(m,
|
|
5659
|
+
v < o.length ? (C = 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
|
|
5668
|
-
function
|
|
5666
|
+
var $e = { CHROME: "CHROME", FIREFOX: "FIREFOX", DESKTOP_SAFARI: "DESKTOP_SAFARI", IE: "IE", IOS: "IOS", ETC: "ETC" }, Ps = { [$e.CHROME]: 16384, [$e.FIREFOX]: 11180, [$e.DESKTOP_SAFARI]: 16384, [$e.IE]: 8192, [$e.IOS]: 4096, [$e.ETC]: 8192 };
|
|
5667
|
+
const Qn = typeof window < "u", Kr = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, An = Qn && window.cordova && window.cordova.require && window.cordova.require("cordova/modulemapper"), Ws = (Qn || Kr) && (An && An.getOriginalSymbol(window, "File") || typeof File < "u" && File), zr = (Qn || Kr) && (An && An.getOriginalSymbol(window, "FileReader") || typeof FileReader < "u" && FileReader);
|
|
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]);
|
|
5671
5671
|
let a = o.length;
|
|
@@ -5677,7 +5677,7 @@ function Qn(s, e, t = Date.now()) {
|
|
|
5677
5677
|
}
|
|
5678
5678
|
function Xr(s) {
|
|
5679
5679
|
return new Promise((e, t) => {
|
|
5680
|
-
const n = new
|
|
5680
|
+
const n = new zr();
|
|
5681
5681
|
n.onload = () => e(n.result), n.onerror = (r) => t(r), n.readAsDataURL(s);
|
|
5682
5682
|
});
|
|
5683
5683
|
}
|
|
@@ -5689,9 +5689,9 @@ 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 = $e.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 = $e.CHROME : /iP(ad|od|hone)/i.test(e) && /WebKit/i.test(e) ? s = $e.IOS : /Safari/i.test(e) ? s = $e.DESKTOP_SAFARI : /Firefox/i.test(e) ? s = $e.FIREFOX : (/MSIE/i.test(e) || document.documentMode) && (s = $e.IE), _t.cachedResult = s, _t.cachedResult;
|
|
5695
5695
|
}
|
|
5696
5696
|
function Jr(s, e) {
|
|
5697
5697
|
const t = _t(), n = Ps[t];
|
|
@@ -5712,7 +5712,7 @@ function xn(s, e) {
|
|
|
5712
5712
|
}
|
|
5713
5713
|
return t.width = s, t.height = e, [t, n];
|
|
5714
5714
|
}
|
|
5715
|
-
function
|
|
5715
|
+
function Qr(s, e) {
|
|
5716
5716
|
const { width: t, height: n } = Jr(s.width, s.height), [r, i] = xn(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
|
}
|
|
@@ -5724,7 +5724,7 @@ function kn(s, e = {}) {
|
|
|
5724
5724
|
let r, i;
|
|
5725
5725
|
var o = function() {
|
|
5726
5726
|
try {
|
|
5727
|
-
return i =
|
|
5727
|
+
return i = Qr(r, e.fileType || s.type), t([r, i]);
|
|
5728
5728
|
} catch (c) {
|
|
5729
5729
|
return n(c);
|
|
5730
5730
|
}
|
|
@@ -5766,7 +5766,7 @@ function kn(s, e = {}) {
|
|
|
5766
5766
|
}
|
|
5767
5767
|
};
|
|
5768
5768
|
try {
|
|
5769
|
-
if (yn() || [
|
|
5769
|
+
if (yn() || [$e.DESKTOP_SAFARI, $e.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,7 +5779,7 @@ function kn(s, e = {}) {
|
|
|
5779
5779
|
}
|
|
5780
5780
|
});
|
|
5781
5781
|
}
|
|
5782
|
-
function
|
|
5782
|
+
function Fn(s, e, t, n, r = 1) {
|
|
5783
5783
|
return new Promise(function(i, o) {
|
|
5784
5784
|
let a;
|
|
5785
5785
|
if (e === "image/png") {
|
|
@@ -5790,7 +5790,7 @@ function In(s, e, t, n, r = 1) {
|
|
|
5790
5790
|
let h = function() {
|
|
5791
5791
|
return c.call(this);
|
|
5792
5792
|
};
|
|
5793
|
-
if (e === "image/bmp") return new Promise((l) =>
|
|
5793
|
+
if (e === "image/bmp") return new Promise((l) => Zr.toBlob(s, l)).then((function(l) {
|
|
5794
5794
|
try {
|
|
5795
5795
|
return a = l, a.name = t, a.lastModified = n, h.call(this);
|
|
5796
5796
|
} catch (u) {
|
|
@@ -5810,7 +5810,7 @@ function In(s, e, t, n, r = 1) {
|
|
|
5810
5810
|
}).bind(this), o);
|
|
5811
5811
|
{
|
|
5812
5812
|
let u;
|
|
5813
|
-
return u = s.toDataURL(e, r),
|
|
5813
|
+
return u = s.toDataURL(e, r), Yn(u, t, n).then((function(d) {
|
|
5814
5814
|
try {
|
|
5815
5815
|
return a = d, l.call(this);
|
|
5816
5816
|
} catch (f) {
|
|
@@ -5828,18 +5828,18 @@ function In(s, e, t, n, r = 1) {
|
|
|
5828
5828
|
function ht(s) {
|
|
5829
5829
|
s.width = 0, s.height = 0;
|
|
5830
5830
|
}
|
|
5831
|
-
function
|
|
5831
|
+
function $t() {
|
|
5832
5832
|
return new Promise(function(s, e) {
|
|
5833
5833
|
let t, n, r, i;
|
|
5834
|
-
return
|
|
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
5836
|
return t = o, kn(t).then(function(a) {
|
|
5837
5837
|
try {
|
|
5838
|
-
return n = a[1],
|
|
5838
|
+
return n = a[1], Fn(n, t.type, t.name, t.lastModified).then(function(c) {
|
|
5839
5839
|
try {
|
|
5840
5840
|
return r = c, ht(n), kn(r).then(function(h) {
|
|
5841
5841
|
try {
|
|
5842
|
-
return i = h[0],
|
|
5842
|
+
return i = h[0], $t.cachedResult = i.width === 1 && i.height === 2, s($t.cachedResult);
|
|
5843
5843
|
} catch (l) {
|
|
5844
5844
|
return e(l);
|
|
5845
5845
|
}
|
|
@@ -5858,9 +5858,9 @@ function Wt() {
|
|
|
5858
5858
|
}, e);
|
|
5859
5859
|
});
|
|
5860
5860
|
}
|
|
5861
|
-
function
|
|
5861
|
+
function Yr(s) {
|
|
5862
5862
|
return new Promise((e, t) => {
|
|
5863
|
-
const n = new
|
|
5863
|
+
const n = new zr();
|
|
5864
5864
|
n.onload = (r) => {
|
|
5865
5865
|
const i = new DataView(r.target.result);
|
|
5866
5866
|
if (i.getUint16(0, !1) != 65496) return e(-2);
|
|
@@ -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,
|
|
5921
|
+
let i, o, a, c, h, l, u, d, f, y, F, I, C, 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));
|
|
@@ -5929,9 +5929,9 @@ function Ar(s, e, t = 0) {
|
|
|
5929
5929
|
}
|
|
5930
5930
|
return i = t, o = e.maxIteration || 10, a = 1024 * e.maxSizeMB * 1024, g(), kn(s, e).then((function(T) {
|
|
5931
5931
|
try {
|
|
5932
|
-
return [, c] = T, g(), h = ei(c, e), g(), new Promise(function(
|
|
5932
|
+
return [, c] = T, g(), h = ei(c, e), g(), new Promise(function(N, U) {
|
|
5933
5933
|
var A;
|
|
5934
|
-
if (!(A = e.exifOrientation)) return
|
|
5934
|
+
if (!(A = e.exifOrientation)) return Yr(s).then((function(w) {
|
|
5935
5935
|
try {
|
|
5936
5936
|
return A = w, _.call(this);
|
|
5937
5937
|
} catch (p) {
|
|
@@ -5939,24 +5939,24 @@ function Ar(s, e, t = 0) {
|
|
|
5939
5939
|
}
|
|
5940
5940
|
}).bind(this), U);
|
|
5941
5941
|
function _() {
|
|
5942
|
-
return
|
|
5942
|
+
return N(A);
|
|
5943
5943
|
}
|
|
5944
5944
|
return _.call(this);
|
|
5945
|
-
}).then((function(
|
|
5945
|
+
}).then((function(N) {
|
|
5946
5946
|
try {
|
|
5947
|
-
return l =
|
|
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, Fn(u, f, s.name, s.lastModified, d).then((function(A) {
|
|
5950
5950
|
try {
|
|
5951
5951
|
{
|
|
5952
5952
|
let w = function() {
|
|
5953
5953
|
if (o-- && (O > a || O > C)) {
|
|
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] = xn(M, x), b.drawImage(B, 0, 0, M, x), d *= f === "image/png" ? 0.85 : 0.95,
|
|
5955
|
+
return M = m ? 0.95 * B.width : B.width, x = m ? 0.95 * B.height : B.height, [L, b] = xn(M, x), b.drawImage(B, 0, 0, M, x), d *= f === "image/png" ? 0.85 : 0.95, Fn(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
|
-
} catch (
|
|
5959
|
-
return r(
|
|
5958
|
+
} catch (Z) {
|
|
5959
|
+
return r(Z);
|
|
5960
5960
|
}
|
|
5961
5961
|
}, r);
|
|
5962
5962
|
}
|
|
@@ -5964,9 +5964,9 @@ function Ar(s, e, t = 0) {
|
|
|
5964
5964
|
}, p = function() {
|
|
5965
5965
|
return ht(B), ht(L), ht(h), ht(u), ht(c), k(100), n(v);
|
|
5966
5966
|
};
|
|
5967
|
-
if (y = A, g(),
|
|
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 C = s.size, R = y.size, O = R, B = u, m = !e.alwaysKeepResolution &&
|
|
5969
|
+
return C = 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 {
|
|
@@ -5992,13 +5992,13 @@ function Ar(s, e, t = 0) {
|
|
|
5992
5992
|
return r(U);
|
|
5993
5993
|
}
|
|
5994
5994
|
}).bind(this), r);
|
|
5995
|
-
} catch (
|
|
5996
|
-
return r(
|
|
5995
|
+
} catch (N) {
|
|
5996
|
+
return r(N);
|
|
5997
5997
|
}
|
|
5998
5998
|
}).bind(this), r);
|
|
5999
5999
|
});
|
|
6000
6000
|
}
|
|
6001
|
-
const
|
|
6001
|
+
const js = `
|
|
6002
6002
|
let scriptImported = false
|
|
6003
6003
|
self.addEventListener('message', async (e) => {
|
|
6004
6004
|
const { file, id, imageCompressionLibUrl, options } = e.data
|
|
@@ -6019,12 +6019,12 @@ self.addEventListener('message', async (e) => {
|
|
|
6019
6019
|
})
|
|
6020
6020
|
`;
|
|
6021
6021
|
let Hn;
|
|
6022
|
-
function
|
|
6022
|
+
function qs(s, e) {
|
|
6023
6023
|
return new Promise((t, n) => {
|
|
6024
6024
|
Hn || (Hn = function(o) {
|
|
6025
6025
|
const a = [];
|
|
6026
6026
|
return a.push(o), URL.createObjectURL(new Blob(a));
|
|
6027
|
-
}(
|
|
6027
|
+
}(js));
|
|
6028
6028
|
const r = new Worker(Hn);
|
|
6029
6029
|
r.addEventListener("message", function(o) {
|
|
6030
6030
|
if (e.signal && e.signal.aborted) r.terminate();
|
|
@@ -6042,7 +6042,7 @@ function Be(s, e) {
|
|
|
6042
6042
|
let r, i, o, a, c, h;
|
|
6043
6043
|
if (r = { ...e }, o = 0, { onProgress: a } = r, r.maxSizeMB = r.maxSizeMB || Number.POSITIVE_INFINITY, c = typeof r.useWebWorker != "boolean" || r.useWebWorker, delete r.useWebWorker, r.onProgress = (f) => {
|
|
6044
6044
|
o = f, typeof a == "function" && a(o);
|
|
6045
|
-
}, !(s instanceof Blob || s instanceof
|
|
6045
|
+
}, !(s instanceof Blob || s instanceof Ws)) return n(new Error("The file given is not an instance of Blob or File"));
|
|
6046
6046
|
if (!/^image/.test(s.type)) return n(new Error("The file given is not an image"));
|
|
6047
6047
|
if (h = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, !c || typeof Worker != "function" || h) return Ar(s, r).then((function(f) {
|
|
6048
6048
|
try {
|
|
@@ -6062,8 +6062,8 @@ function Be(s, e) {
|
|
|
6062
6062
|
return Ar(s, r).then(function(y) {
|
|
6063
6063
|
try {
|
|
6064
6064
|
return i = y, l();
|
|
6065
|
-
} catch (
|
|
6066
|
-
return n(
|
|
6065
|
+
} catch (F) {
|
|
6066
|
+
return n(F);
|
|
6067
6067
|
}
|
|
6068
6068
|
}, n);
|
|
6069
6069
|
} catch (y) {
|
|
@@ -6071,7 +6071,7 @@ function Be(s, e) {
|
|
|
6071
6071
|
}
|
|
6072
6072
|
};
|
|
6073
6073
|
try {
|
|
6074
|
-
return r.libURL = r.libURL || "https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",
|
|
6074
|
+
return r.libURL = r.libURL || "https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js", qs(s, r).then(function(f) {
|
|
6075
6075
|
try {
|
|
6076
6076
|
return i = f, l();
|
|
6077
6077
|
} catch {
|
|
@@ -6087,15 +6087,15 @@ function Be(s, e) {
|
|
|
6087
6087
|
} catch {
|
|
6088
6088
|
}
|
|
6089
6089
|
try {
|
|
6090
|
-
r.preserveExif && s.type === "image/jpeg" && (!r.fileType || r.fileType && r.fileType === s.type) && (i =
|
|
6090
|
+
r.preserveExif && s.type === "image/jpeg" && (!r.fileType || r.fileType && r.fileType === s.type) && (i = qr(s, i));
|
|
6091
6091
|
} catch {
|
|
6092
6092
|
}
|
|
6093
6093
|
return t(i);
|
|
6094
6094
|
}
|
|
6095
6095
|
});
|
|
6096
6096
|
}
|
|
6097
|
-
Be.getDataUrlFromFile = Xr, Be.getFilefromDataUrl =
|
|
6098
|
-
class
|
|
6097
|
+
Be.getDataUrlFromFile = Xr, Be.getFilefromDataUrl = Yn, Be.loadImage = Gr, Be.drawImageInCanvas = Qr, Be.drawFileInCanvas = kn, Be.canvasToFile = Fn, 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
|
+
class Zs extends Fe {
|
|
6099
6099
|
constructor() {
|
|
6100
6100
|
super("com.hamropatro.grpc.common.ImageUploadRequest", [
|
|
6101
6101
|
{
|
|
@@ -6131,13 +6131,13 @@ class qs extends Ie {
|
|
|
6131
6131
|
return i;
|
|
6132
6132
|
}
|
|
6133
6133
|
internalBinaryWrite(e, t, n) {
|
|
6134
|
-
e.mimeType !== "" && t.tag(1,
|
|
6134
|
+
e.mimeType !== "" && t.tag(1, W.LengthDelimited).string(e.mimeType);
|
|
6135
6135
|
let r = n.writeUnknownFields;
|
|
6136
6136
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
6137
6137
|
}
|
|
6138
6138
|
}
|
|
6139
|
-
const
|
|
6140
|
-
class
|
|
6139
|
+
const Nn = new Zs();
|
|
6140
|
+
class Ks extends Fe {
|
|
6141
6141
|
constructor() {
|
|
6142
6142
|
super("com.hamropatro.grpc.common.ImageUploadResponse", [
|
|
6143
6143
|
{
|
|
@@ -6195,20 +6195,20 @@ class zs extends Ie {
|
|
|
6195
6195
|
return i;
|
|
6196
6196
|
}
|
|
6197
6197
|
internalBinaryWrite(e, t, n) {
|
|
6198
|
-
e.key !== "" && t.tag(1,
|
|
6198
|
+
e.key !== "" && t.tag(1, W.LengthDelimited).string(e.key), e.uploadUrl !== "" && t.tag(2, W.LengthDelimited).string(e.uploadUrl), e.accessUrl !== "" && t.tag(3, W.LengthDelimited).string(e.accessUrl);
|
|
6199
6199
|
let r = n.writeUnknownFields;
|
|
6200
6200
|
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
6201
6201
|
}
|
|
6202
6202
|
}
|
|
6203
|
-
const kr = new
|
|
6204
|
-
{ name: "Upload", options: {}, I:
|
|
6205
|
-
{ name: "UploadUserImage", options: {}, I:
|
|
6203
|
+
const kr = new Ks(), $n = new Gn("com.hamropatro.grpc.common.ImageUploadService", [
|
|
6204
|
+
{ name: "Upload", options: {}, I: Nn, O: kr },
|
|
6205
|
+
{ name: "UploadUserImage", options: {}, I: Nn, O: kr }
|
|
6206
6206
|
]);
|
|
6207
6207
|
class ni {
|
|
6208
6208
|
constructor(e) {
|
|
6209
|
-
he(this, "typeName",
|
|
6210
|
-
he(this, "methods",
|
|
6211
|
-
he(this, "options",
|
|
6209
|
+
he(this, "typeName", $n.typeName);
|
|
6210
|
+
he(this, "methods", $n.methods);
|
|
6211
|
+
he(this, "options", $n.options);
|
|
6212
6212
|
this._transport = e;
|
|
6213
6213
|
}
|
|
6214
6214
|
/**
|
|
@@ -6226,9 +6226,9 @@ class ni {
|
|
|
6226
6226
|
return Me("unary", this._transport, n, r, e);
|
|
6227
6227
|
}
|
|
6228
6228
|
}
|
|
6229
|
-
const
|
|
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 = Nn.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 Ks = 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 = Nn.create();
|
|
6243
6243
|
try {
|
|
6244
6244
|
return i.mimeType = s, await r.uploadUserImage(
|
|
6245
6245
|
i,
|
|
@@ -6253,10 +6253,10 @@ const Ks = async (s, e, t = !0) => {
|
|
|
6253
6253
|
} catch (c) {
|
|
6254
6254
|
throw c;
|
|
6255
6255
|
}
|
|
6256
|
-
},
|
|
6256
|
+
}, Fr = async (s, e, t, n = !0) => {
|
|
6257
6257
|
var r, i;
|
|
6258
6258
|
try {
|
|
6259
|
-
const o = await
|
|
6259
|
+
const o = await zs(e == null ? void 0 : e.type, t, n), a = (r = o.response) == null ? void 0 : r.uploadUrl, c = (i = o == null ? void 0 : o.response) == null ? void 0 : i.accessUrl;
|
|
6260
6260
|
return await ri(s, a, e), c;
|
|
6261
6261
|
} catch (o) {
|
|
6262
6262
|
throw o;
|
|
@@ -6291,7 +6291,7 @@ const Ks = async (s, e, t = !0) => {
|
|
|
6291
6291
|
i[o] = r.charCodeAt(o);
|
|
6292
6292
|
return i;
|
|
6293
6293
|
};
|
|
6294
|
-
async function
|
|
6294
|
+
async function Nr(s) {
|
|
6295
6295
|
const e = {
|
|
6296
6296
|
maxSizeMB: 2,
|
|
6297
6297
|
useWebWorker: !1,
|
|
@@ -6303,7 +6303,7 @@ async function Fr(s) {
|
|
|
6303
6303
|
throw t;
|
|
6304
6304
|
}
|
|
6305
6305
|
}
|
|
6306
|
-
function
|
|
6306
|
+
function Qs(s = "24px", e = "24px", t = "#000") {
|
|
6307
6307
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
6308
6308
|
n.setAttribute("xmlns", "http://www.w3.org/2000/svg"), n.setAttribute("height", e), n.setAttribute("viewBox", "0 -960 960 960"), n.setAttribute("width", s), n.setAttribute("fill", t);
|
|
6309
6309
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -6312,55 +6312,55 @@ function Ys(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, Je, Pe, Bt, kt, at, De,
|
|
6316
|
-
class
|
|
6315
|
+
var mt, we, Ee, gt, ue, ke, Je, Pe, Bt, kt, at, De, Qe, Ot, zn, Ft, Nt, wt, St, lt, Ze, It, Tt, yt, Wt, rn, Oe, Rt, sn, In, on, ct, jt, Lt, qt, Zt, Kt, zt, Xt, an, ln, Gt, dt, Jt, cn;
|
|
6316
|
+
class eo {
|
|
6317
6317
|
constructor(e) {
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
H(this, on, e.isAdmin), H(this, Je, !1), H(this,
|
|
6318
|
+
z(this, mt);
|
|
6319
|
+
z(this, we);
|
|
6320
|
+
z(this, Ee);
|
|
6321
|
+
z(this, gt);
|
|
6322
|
+
z(this, ue, []);
|
|
6323
|
+
z(this, ke, []);
|
|
6324
|
+
z(this, Je);
|
|
6325
|
+
z(this, Pe);
|
|
6326
|
+
z(this, Bt);
|
|
6327
|
+
z(this, kt);
|
|
6328
|
+
z(this, at, []);
|
|
6329
|
+
z(this, De);
|
|
6330
|
+
z(this, Qe);
|
|
6331
|
+
z(this, Ot);
|
|
6332
|
+
z(this, zn);
|
|
6333
|
+
z(this, Ft);
|
|
6334
|
+
z(this, Nt);
|
|
6335
|
+
z(this, wt);
|
|
6336
|
+
z(this, St);
|
|
6337
|
+
z(this, lt);
|
|
6338
|
+
z(this, Ze);
|
|
6339
|
+
z(this, It);
|
|
6340
|
+
z(this, Tt);
|
|
6341
|
+
z(this, yt);
|
|
6342
|
+
z(this, Wt);
|
|
6343
|
+
z(this, rn);
|
|
6344
|
+
z(this, Oe);
|
|
6345
|
+
z(this, Rt);
|
|
6346
|
+
z(this, sn, !1);
|
|
6347
|
+
z(this, In);
|
|
6348
|
+
z(this, on);
|
|
6349
|
+
z(this, ct);
|
|
6350
|
+
z(this, jt);
|
|
6351
|
+
z(this, Lt);
|
|
6352
|
+
z(this, qt);
|
|
6353
|
+
z(this, Zt);
|
|
6354
|
+
z(this, Kt);
|
|
6355
|
+
z(this, zt);
|
|
6356
|
+
z(this, Xt);
|
|
6357
|
+
z(this, an);
|
|
6358
|
+
z(this, ln);
|
|
6359
|
+
z(this, Gt);
|
|
6360
|
+
z(this, dt);
|
|
6361
|
+
z(this, Jt);
|
|
6362
|
+
z(this, cn);
|
|
6363
|
+
H(this, on, e.isAdmin), H(this, Je, !1), H(this, qt, e == null ? void 0 : e.mode), e.handleUpload && H(this, Ot, e.handleUpload.bind(this)), e != null && e.accessToken && (H(this, rn, e.accessToken), this._grpcOptionInitializer()), this._init(e).then(() => {
|
|
6364
6364
|
H(this, sn, !0), e != null && e.parentContainerId && this._renderView(e), this.updateWindowObject({ initialized: !0 }), this._initializeGrpcConfig(e.mode, e.endPoint);
|
|
6365
6365
|
});
|
|
6366
6366
|
}
|
|
@@ -6377,7 +6377,7 @@ class Qs {
|
|
|
6377
6377
|
}
|
|
6378
6378
|
_renderView(e) {
|
|
6379
6379
|
var t, n, r;
|
|
6380
|
-
return this._isAdminOptions(e) ? (H(this, Pe, !1), H(this, Bt, !1), H(this,
|
|
6380
|
+
return this._isAdminOptions(e) ? (H(this, Pe, !1), H(this, Bt, !1), H(this, Ft, 0), H(this, Ze, ""), H(this, yt, !1), H(this, qt, e.mode), H(this, It, !1), H(this, Lt, ""), H(this, Rt, null), H(this, cn, e.enableDialog), this._removeToastContainer(), this._renderAdminView(e)) : (H(this, jt, ""), H(this, Zt, 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, an, (t = e == null ? void 0 : e.removeImageConfirm) == null ? void 0 : t.bind(this)), H(this, ln, (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)), this._removeUserToast(), this._renderUserView(e));
|
|
6381
6381
|
}
|
|
6382
6382
|
_renderAdminView(e) {
|
|
6383
6383
|
if (!E(this, sn)) return;
|
|
@@ -6405,34 +6405,34 @@ class Qs {
|
|
|
6405
6405
|
async _grpcOptionInitializer() {
|
|
6406
6406
|
H(this, Oe, await Ss(
|
|
6407
6407
|
E(this, rn),
|
|
6408
|
-
E(this,
|
|
6408
|
+
E(this, qt)
|
|
6409
6409
|
));
|
|
6410
6410
|
}
|
|
6411
6411
|
_commonImageContainer() {
|
|
6412
6412
|
var h;
|
|
6413
|
-
H(this,
|
|
6414
|
-
const e =
|
|
6413
|
+
H(this, Nt, K("folder-container")), H(this, wt, K("folder-list-wrapper")), this._fetchAllFolders(), H(this, we, K("browse-container"));
|
|
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
6416
|
const t = en("Folders", "folder-title"), n = He("", "add-folder-btn");
|
|
6417
|
-
n.append(br()), this._createUpdateFolderDialog(n, "create"), e.append(t, n), E(this,
|
|
6418
|
-
const r = this._renderSearchField(), i = this._createBrowseMoreContainer(), o = this._createBrowseImageMain(), a =
|
|
6419
|
-
H(this,
|
|
6417
|
+
n.append(br()), this._createUpdateFolderDialog(n, "create"), e.append(t, n), E(this, Nt).append(e, E(this, wt));
|
|
6418
|
+
const r = this._renderSearchField(), i = this._createBrowseMoreContainer(), o = this._createBrowseImageMain(), a = K("footer");
|
|
6419
|
+
H(this, Qe, He(
|
|
6420
6420
|
`Save (${(h = E(this, ue)) == null ? void 0 : h.length})`,
|
|
6421
6421
|
"dialog-btn confirm"
|
|
6422
6422
|
));
|
|
6423
|
-
const c =
|
|
6424
|
-
return c.append(r, i, o, a), E(this, we).append(E(this,
|
|
6423
|
+
const c = K("container-right-main");
|
|
6424
|
+
return c.append(r, i, o, a), E(this, we).append(E(this, Nt), c), { footer: a, wrapper: c };
|
|
6425
6425
|
}
|
|
6426
6426
|
_selectedImageContainer() {
|
|
6427
6427
|
const { footer: e } = this._commonImageContainer();
|
|
6428
|
-
return E(this,
|
|
6428
|
+
return E(this, Qe).onclick = () => {
|
|
6429
6429
|
E(this, Ot).call(this), H(this, ue, []), H(this, ke, []);
|
|
6430
|
-
}, e.appendChild(E(this,
|
|
6430
|
+
}, e.appendChild(E(this, Qe)), E(this, we);
|
|
6431
6431
|
}
|
|
6432
6432
|
_selectedImageContainerDialog() {
|
|
6433
6433
|
var r;
|
|
6434
6434
|
const { footer: e } = this._commonImageContainer();
|
|
6435
|
-
H(this,
|
|
6435
|
+
H(this, Qe, He(
|
|
6436
6436
|
`Save (${(r = E(this, ue)) == null ? void 0 : r.length})`,
|
|
6437
6437
|
"dialog-btn confirm"
|
|
6438
6438
|
));
|
|
@@ -6446,22 +6446,22 @@ class Qs {
|
|
|
6446
6446
|
).addEventListener("click", () => {
|
|
6447
6447
|
gn.hide(), H(this, ue, []), H(this, ke, []);
|
|
6448
6448
|
}), t.onclick = () => {
|
|
6449
|
-
gn.hide(), H(this,
|
|
6450
|
-
}, E(this,
|
|
6451
|
-
E(this, Ot).call(this), gn.hide(), H(this,
|
|
6452
|
-
}, e.append(t, E(this,
|
|
6449
|
+
gn.hide(), H(this, Ze, ""), H(this, ke, []), H(this, ue, []);
|
|
6450
|
+
}, E(this, Qe).onclick = () => {
|
|
6451
|
+
E(this, Ot).call(this), gn.hide(), H(this, Ze, ""), H(this, ue, []), H(this, ke, []);
|
|
6452
|
+
}, e.append(t, E(this, Qe)), gn.show({
|
|
6453
6453
|
content: E(this, we)
|
|
6454
6454
|
});
|
|
6455
6455
|
}
|
|
6456
6456
|
_renderUserView(e) {
|
|
6457
6457
|
const { parentContainerId: t, restrictedFileSize: n, imagePreview: r } = e;
|
|
6458
|
-
H(this, mt, document.getElementById(t)), H(this, ct,
|
|
6459
|
-
const i =
|
|
6458
|
+
H(this, mt, document.getElementById(t)), H(this, ct, Q("div", "user-view-container"));
|
|
6459
|
+
const i = K(
|
|
6460
6460
|
"user-view-browse-wrapper",
|
|
6461
6461
|
"user-view-browse-wrapper"
|
|
6462
|
-
), o =
|
|
6462
|
+
), o = Q("span", "", "", ""), a = this._renderUserViewBrowseButton(), c = Q("p", "", "margin-block: 0px; font-size:14px");
|
|
6463
6463
|
if (c.append(o, a), n) {
|
|
6464
|
-
const h =
|
|
6464
|
+
const h = Q(
|
|
6465
6465
|
"p",
|
|
6466
6466
|
"",
|
|
6467
6467
|
"margin-block: 0px; font-size: 13px; color: #777",
|
|
@@ -6473,18 +6473,18 @@ class Qs {
|
|
|
6473
6473
|
return E(this, ct).append(i), r && this._renderImagePreview(r, "", i, !0), E(this, mt).appendChild(E(this, ct)), E(this, mt);
|
|
6474
6474
|
}
|
|
6475
6475
|
_renderImagePreview(e, t, n, r = !1) {
|
|
6476
|
-
var
|
|
6476
|
+
var I;
|
|
6477
6477
|
const i = document.getElementById(
|
|
6478
6478
|
"user-view-browse-wrapper"
|
|
6479
6479
|
), o = i || n;
|
|
6480
6480
|
o && (o.style.display = "none");
|
|
6481
6481
|
const a = document.getElementById("user-image-preview");
|
|
6482
6482
|
a && a.remove();
|
|
6483
|
-
const c =
|
|
6483
|
+
const c = Q("div", "user-image-preview");
|
|
6484
6484
|
c.id = "user-image-preview";
|
|
6485
6485
|
const h = this._renderImageLoadingContainer();
|
|
6486
6486
|
c.appendChild(h);
|
|
6487
|
-
const l =
|
|
6487
|
+
const l = Q(
|
|
6488
6488
|
"img",
|
|
6489
6489
|
"",
|
|
6490
6490
|
`max-width: ${E(this, dt) ? E(this, dt) : 230}px;max-height:${E(this, Jt) ? E(this, Jt) : 250}px;object-fit:cover;`
|
|
@@ -6500,24 +6500,24 @@ class Qs {
|
|
|
6500
6500
|
d == null || d.addEventListener("click", () => {
|
|
6501
6501
|
h.style.display = "flex", u.style.display = "none", f.style.display = "none", l.src = e;
|
|
6502
6502
|
});
|
|
6503
|
-
const f =
|
|
6503
|
+
const f = Q(
|
|
6504
6504
|
"div",
|
|
6505
6505
|
"",
|
|
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 = Kn();
|
|
6510
6510
|
y.style.fill = "#fff", f == null || f.appendChild(y), f.addEventListener("click", () => {
|
|
6511
6511
|
E(this, an).call(this);
|
|
6512
6512
|
});
|
|
6513
|
-
const
|
|
6514
|
-
|
|
6513
|
+
const F = Q("button", "", "display:none");
|
|
6514
|
+
F.id = "image-preview-hidden-btn", F.addEventListener("click", (C) => {
|
|
6515
6515
|
var R;
|
|
6516
6516
|
C.preventDefault(), C.stopPropagation(), (R = E(this, ct)) == null || R.removeChild(c), E(this, ln).call(this), this._removeUserToast(), o && (o.style.display = "flex");
|
|
6517
|
-
}), c == null || c.append(l, f,
|
|
6517
|
+
}), c == null || c.append(l, f, F), (I = E(this, ct)) == null || I.append(c);
|
|
6518
6518
|
}
|
|
6519
6519
|
_renderImageErrorContainer() {
|
|
6520
|
-
const e =
|
|
6520
|
+
const e = Q(
|
|
6521
6521
|
"div",
|
|
6522
6522
|
"",
|
|
6523
6523
|
"display: none; text-align: center;"
|
|
@@ -6532,7 +6532,7 @@ class Qs {
|
|
|
6532
6532
|
`, e;
|
|
6533
6533
|
}
|
|
6534
6534
|
_renderImageLoadingContainer() {
|
|
6535
|
-
const e =
|
|
6535
|
+
const e = Q("div", "image-loader");
|
|
6536
6536
|
return e.innerHTML = `
|
|
6537
6537
|
<div style="display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%;">
|
|
6538
6538
|
<div style="width: 20px; height: 20px; border: 3px solid #f3f3f3; border-top: 3px solid #3498db; border-radius: 50%; animation: spin 1s linear infinite;"></div>
|
|
@@ -6545,17 +6545,17 @@ class Qs {
|
|
|
6545
6545
|
e && (e.style.display = "flex");
|
|
6546
6546
|
}
|
|
6547
6547
|
async _readFileAsBase64(e) {
|
|
6548
|
-
const t = E(this,
|
|
6548
|
+
const t = E(this, Zt) * 1024 * 1024;
|
|
6549
6549
|
if (e.size > t) {
|
|
6550
6550
|
this._renderUserToast(
|
|
6551
|
-
E(this,
|
|
6551
|
+
E(this, Kt) ? E(this, Kt) : `File size must be less than ${E(this, Zt)}MB.`,
|
|
6552
6552
|
"error"
|
|
6553
6553
|
);
|
|
6554
6554
|
return;
|
|
6555
6555
|
}
|
|
6556
6556
|
H(this, Je, !0), E(this, Gt).call(this, !0);
|
|
6557
6557
|
try {
|
|
6558
|
-
const n = await
|
|
6558
|
+
const n = await Nr(e);
|
|
6559
6559
|
this._removeUserToast();
|
|
6560
6560
|
const r = new FileReader();
|
|
6561
6561
|
r.readAsDataURL(n), r.onload = () => {
|
|
@@ -6571,13 +6571,13 @@ class Qs {
|
|
|
6571
6571
|
}
|
|
6572
6572
|
}
|
|
6573
6573
|
_renderUserToast(e, t = "success") {
|
|
6574
|
-
const n =
|
|
6574
|
+
const n = Q(
|
|
6575
6575
|
"div",
|
|
6576
6576
|
"",
|
|
6577
6577
|
"display:flex;align-items:center;gap:5px;margin-top:5px;"
|
|
6578
6578
|
);
|
|
6579
6579
|
n.id = "user-toast-container";
|
|
6580
|
-
const r =
|
|
6580
|
+
const r = Q(
|
|
6581
6581
|
"p",
|
|
6582
6582
|
"",
|
|
6583
6583
|
"margin-block:0px;font-size:14px;padding-top:3px"
|
|
@@ -6593,7 +6593,7 @@ class Qs {
|
|
|
6593
6593
|
_renderUserViewBrowseButton() {
|
|
6594
6594
|
const e = Vn("file");
|
|
6595
6595
|
e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*");
|
|
6596
|
-
const t =
|
|
6596
|
+
const t = Q(
|
|
6597
6597
|
"a",
|
|
6598
6598
|
"user-upload-btn",
|
|
6599
6599
|
"",
|
|
@@ -6607,13 +6607,13 @@ class Qs {
|
|
|
6607
6607
|
}), t;
|
|
6608
6608
|
}
|
|
6609
6609
|
_renderUserUploading() {
|
|
6610
|
-
const e =
|
|
6610
|
+
const e = Q(
|
|
6611
6611
|
"div",
|
|
6612
6612
|
"",
|
|
6613
6613
|
"margin-top:5px;margin-bottom:8px;display:flex;flex-direction:column;align-items:center;gap:5px;font-weight:600;font-size:14px"
|
|
6614
6614
|
);
|
|
6615
6615
|
e.id = "user-uploading", e.innerHTML = "Uploading...";
|
|
6616
|
-
const t =
|
|
6616
|
+
const t = Q(
|
|
6617
6617
|
"div",
|
|
6618
6618
|
"linear-loader",
|
|
6619
6619
|
`width:${E(this, dt) ? E(this, dt) : 230}px;max-width:${E(this, dt) ? E(this, dt) : 230}px`
|
|
@@ -6628,11 +6628,11 @@ class Qs {
|
|
|
6628
6628
|
this._renderUserUploading();
|
|
6629
6629
|
try {
|
|
6630
6630
|
this._renderImagePreview(e, t.name);
|
|
6631
|
-
const n = await
|
|
6631
|
+
const n = await Fr(e, t, E(this, Oe), !1);
|
|
6632
6632
|
await this._uploadForUser(n, t), E(this, Xt) && this._renderUserToast(E(this, Xt), "success");
|
|
6633
6633
|
} catch {
|
|
6634
6634
|
this._renderUserToast(
|
|
6635
|
-
E(this,
|
|
6635
|
+
E(this, zt) ? E(this, zt) : "Error uploading. Please try again later.",
|
|
6636
6636
|
"error"
|
|
6637
6637
|
);
|
|
6638
6638
|
} finally {
|
|
@@ -6644,16 +6644,16 @@ class Qs {
|
|
|
6644
6644
|
try {
|
|
6645
6645
|
const r = await as(
|
|
6646
6646
|
e,
|
|
6647
|
-
|
|
6647
|
+
Ye[Mn((n = t.type) == null ? void 0 : n.split("/")[0])],
|
|
6648
6648
|
E(this, Oe)
|
|
6649
6649
|
);
|
|
6650
|
-
H(this,
|
|
6650
|
+
H(this, jt, r == null ? void 0 : r.response), E(this, Ot).call(this);
|
|
6651
6651
|
} catch (r) {
|
|
6652
6652
|
throw Error(r);
|
|
6653
6653
|
}
|
|
6654
6654
|
}
|
|
6655
6655
|
_createAllAndSelectedTab(e) {
|
|
6656
|
-
const t =
|
|
6656
|
+
const t = K("select-options"), n = en("Browse", "select"), r = en(
|
|
6657
6657
|
"Selected",
|
|
6658
6658
|
"select",
|
|
6659
6659
|
"selected-images-tab"
|
|
@@ -6661,7 +6661,7 @@ class Qs {
|
|
|
6661
6661
|
n.classList.add("selected"), [n, r].forEach((o, a) => {
|
|
6662
6662
|
o.addEventListener("click", () => {
|
|
6663
6663
|
var c;
|
|
6664
|
-
H(this,
|
|
6664
|
+
H(this, Ft, a), (c = document.querySelector(".select.selected")) == null || c.classList.remove("selected"), o.classList.add("selected"), this._updateSelectedImageListContainerUI();
|
|
6665
6665
|
});
|
|
6666
6666
|
}), t.append(n, r), e.appendChild(t);
|
|
6667
6667
|
}
|
|
@@ -6697,7 +6697,7 @@ class Qs {
|
|
|
6697
6697
|
}
|
|
6698
6698
|
_renderSearchField() {
|
|
6699
6699
|
let e;
|
|
6700
|
-
const t =
|
|
6700
|
+
const t = K("search-browse-container"), n = K(
|
|
6701
6701
|
"search-input-wrapper",
|
|
6702
6702
|
"search-input-wrapper"
|
|
6703
6703
|
);
|
|
@@ -6706,37 +6706,37 @@ class Qs {
|
|
|
6706
6706
|
const o = i.target;
|
|
6707
6707
|
e && clearTimeout(e), e = setTimeout(() => {
|
|
6708
6708
|
if (!o.value) {
|
|
6709
|
-
H(this,
|
|
6709
|
+
H(this, Ze, ""), H(this, It, !1), H(this, yt, !1), this._fetchFilesFromFolder(E(this, kt));
|
|
6710
6710
|
return;
|
|
6711
6711
|
}
|
|
6712
|
-
H(this, yt, !0), H(this,
|
|
6712
|
+
H(this, yt, !0), H(this, Wt, o.value), this._search(E(this, Wt));
|
|
6713
6713
|
}, 750);
|
|
6714
6714
|
}), E(this, Tt).setAttribute("placeholder", "Search");
|
|
6715
6715
|
const r = Ls();
|
|
6716
6716
|
return r.style.position = "absolute", r.style.top = "50%", r.style.left = "5%", r.style.transform = "translate(-5%, -50%)", n.append(r, E(this, Tt)), t.append(n), t;
|
|
6717
6717
|
}
|
|
6718
6718
|
_createBrowseMoreContainer() {
|
|
6719
|
-
H(this, St,
|
|
6719
|
+
H(this, St, K("browse-more-btn-container")), this._createAllAndSelectedTab(E(this, St));
|
|
6720
6720
|
const e = this._renderUploadButton(), t = this._renderCreateFolderBtn(), n = document.createElement("div");
|
|
6721
6721
|
return n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "10px", n.append(e, t), E(this, St).appendChild(n), E(this, St);
|
|
6722
6722
|
}
|
|
6723
6723
|
_createBrowseImageMain() {
|
|
6724
|
-
const e =
|
|
6725
|
-
return H(this, Ee,
|
|
6724
|
+
const e = K("browse-image-main");
|
|
6725
|
+
return H(this, Ee, K("selected-image-container")), E(this, Ee).addEventListener("scroll", () => {
|
|
6726
6726
|
const t = E(this, Ee).clientHeight, n = E(this, Ee).scrollTop, r = E(this, Ee).scrollHeight;
|
|
6727
|
-
t + n >= r - 5 && E(this,
|
|
6727
|
+
t + n >= r - 5 && E(this, It) && (E(this, yt) ? this._search(E(this, Wt)) : this._fetchFilesFromFolder(E(this, kt)));
|
|
6728
6728
|
}), e.appendChild(E(this, Ee)), e;
|
|
6729
6729
|
}
|
|
6730
6730
|
_renderFetchingSkeletonUI() {
|
|
6731
6731
|
for (let e = 0; e < 20; e++) {
|
|
6732
|
-
const t =
|
|
6732
|
+
const t = K("skeleton");
|
|
6733
6733
|
t.innerHTML = "", E(this, Ee).append(t);
|
|
6734
6734
|
}
|
|
6735
6735
|
}
|
|
6736
6736
|
_renderEmptyImageContainer() {
|
|
6737
6737
|
if (E(this, Pe) || E(this, Je)) return;
|
|
6738
|
-
const e =
|
|
6739
|
-
E(this, yt) && E(this,
|
|
6738
|
+
const e = K(), t = K(), n = document.createElement("p");
|
|
6739
|
+
E(this, yt) && E(this, Ft) === 0 ? (t.innerHTML = `
|
|
6740
6740
|
<svg width="300" height="300" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6741
6741
|
<g clip-path="url(#clip0_2304_257)">
|
|
6742
6742
|
<path d="M564.829 772.4H336.658V948.386H564.829V772.4Z" fill="#EBEBEB"/>
|
|
@@ -6823,12 +6823,12 @@ class Qs {
|
|
|
6823
6823
|
`, n.textContent = "Looks Empty!"), e.append(t, n), E(this, Ee).appendChild(e);
|
|
6824
6824
|
}
|
|
6825
6825
|
_renderLoadingUI() {
|
|
6826
|
-
const e =
|
|
6826
|
+
const e = K("skeleton");
|
|
6827
6827
|
e.innerHTML = "", E(this, Ee).appendChild(e);
|
|
6828
6828
|
}
|
|
6829
6829
|
_fileCardBody(e) {
|
|
6830
6830
|
var st, Mt, dn, Vt;
|
|
6831
|
-
const t =
|
|
6831
|
+
const t = K("selected-image-content"), n = K("selected-image-top-bar"), r = He(
|
|
6832
6832
|
"",
|
|
6833
6833
|
"selected-image-btn",
|
|
6834
6834
|
"",
|
|
@@ -6836,33 +6836,33 @@ class Qs {
|
|
|
6836
6836
|
'<svg width="20px" height="20px" viewBox="0 0 20 20" focusable="false" fill="currentColor"><path fill="none" d="M0 0h20v20H0V0z"></path><path d="M10 6c.82 0 1.5-.68 1.5-1.5S10.82 3 10 3s-1.5.67-1.5 1.5S9.18 6 10 6zm0 5.5c.82 0 1.5-.68 1.5-1.5s-.68-1.5-1.5-1.5-1.5.68-1.5 1.5.68 1.5 1.5 1.5zm0 5.5c.82 0 1.5-.67 1.5-1.5 0-.82-.68-1.5-1.5-1.5s-1.5.68-1.5 1.5c0 .83.68 1.5 1.5 1.5z"></path></svg>'
|
|
6837
6837
|
);
|
|
6838
6838
|
let i, o;
|
|
6839
|
-
(e == null ? void 0 : e.type) ===
|
|
6840
|
-
const a =
|
|
6839
|
+
(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
|
+
const a = K("selected-image-wrapper");
|
|
6841
6841
|
a.setAttribute("data-key", e == null ? void 0 : e.key);
|
|
6842
6842
|
const c = en(e == null ? void 0 : e.name, "selected-image-name"), h = le("", "selected-image-type");
|
|
6843
6843
|
h.append(o), n.append(h, r);
|
|
6844
|
-
const l =
|
|
6844
|
+
const l = K();
|
|
6845
6845
|
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
|
-
const u =
|
|
6846
|
+
const u = K("action-wrapper"), d = He("", "action-option preview"), f = le("Preview", ""), y = Ts();
|
|
6847
6847
|
d.append(y, f);
|
|
6848
|
-
const
|
|
6849
|
-
|
|
6848
|
+
const F = He("", "action-option move"), I = le("Move", ""), C = Is();
|
|
6849
|
+
F.append(C, I);
|
|
6850
6850
|
const R = He("", "action-option rename"), O = le("Rename", ""), v = yr();
|
|
6851
6851
|
R.append(v, O);
|
|
6852
6852
|
const L = He("", "action-option delete"), b = le("Delete", ""), B = Cr();
|
|
6853
6853
|
L.append(B, b);
|
|
6854
|
-
const m = e.name.split(".")[0], g = e.name.split(".")[1], k = tn[e.type], T =
|
|
6854
|
+
const m = e.name.split(".")[0], g = e.name.split(".")[1], k = tn[e.type], T = K("edit-form-wrapper"), N = K("move-form-wrapper"), U = K("preview-details-container"), A = K("preview-details-wrapper"), _ = K(
|
|
6855
6855
|
"preview-option-image-wrapper"
|
|
6856
|
-
), w =
|
|
6856
|
+
), w = K("preview-option-wrapper"), p = K("preview-option-wrapper"), M = K(
|
|
6857
6857
|
"preview-option-wrapper"
|
|
6858
|
-
), x =
|
|
6858
|
+
), x = K("preview-option-wrapper"), V = K(
|
|
6859
6859
|
"preview-option-wrapper"
|
|
6860
|
-
),
|
|
6860
|
+
), Z = K("preview-option-wrapper"), P = K(
|
|
6861
6861
|
"preview-option-wrapper"
|
|
6862
|
-
),
|
|
6863
|
-
_.append(
|
|
6864
|
-
const
|
|
6865
|
-
S.innerHTML = e.name, w.append(
|
|
6862
|
+
), q = vr(e.url, "preview-option-image");
|
|
6863
|
+
_.append(q);
|
|
6864
|
+
const $ = le("File name", "preview-title"), S = K("preview-option-name");
|
|
6865
|
+
S.innerHTML = e.name, w.append($, S);
|
|
6866
6866
|
const X = le("Folder name", "preview-title"), oe = le(
|
|
6867
6867
|
e.folderName,
|
|
6868
6868
|
"preview-option-name"
|
|
@@ -6874,13 +6874,13 @@ class Qs {
|
|
|
6874
6874
|
const te = le(
|
|
6875
6875
|
"File Extension",
|
|
6876
6876
|
"preview-title"
|
|
6877
|
-
),
|
|
6877
|
+
), Y = le(
|
|
6878
6878
|
g,
|
|
6879
6879
|
"preview-option-name extension"
|
|
6880
6880
|
);
|
|
6881
6881
|
M.append(
|
|
6882
6882
|
te,
|
|
6883
|
-
|
|
6883
|
+
Y
|
|
6884
6884
|
);
|
|
6885
6885
|
const re = le("File type", "preview-title"), fe = le(k, "preview-option-name");
|
|
6886
6886
|
x.append(
|
|
@@ -6895,15 +6895,15 @@ class Qs {
|
|
|
6895
6895
|
be,
|
|
6896
6896
|
ft
|
|
6897
6897
|
);
|
|
6898
|
-
const
|
|
6898
|
+
const We = le("URL", "preview-title"), de = le(
|
|
6899
6899
|
e.url,
|
|
6900
6900
|
"preview-option-name url"
|
|
6901
6901
|
);
|
|
6902
|
-
|
|
6903
|
-
|
|
6902
|
+
Z.append(
|
|
6903
|
+
We,
|
|
6904
6904
|
de
|
|
6905
6905
|
);
|
|
6906
|
-
const
|
|
6906
|
+
const Ne = le(
|
|
6907
6907
|
"Parent folder",
|
|
6908
6908
|
"preview-title"
|
|
6909
6909
|
), ae = le(
|
|
@@ -6911,7 +6911,7 @@ class Qs {
|
|
|
6911
6911
|
"preview-option-name"
|
|
6912
6912
|
);
|
|
6913
6913
|
P.append(
|
|
6914
|
-
|
|
6914
|
+
Ne,
|
|
6915
6915
|
ae
|
|
6916
6916
|
), A.append(
|
|
6917
6917
|
p,
|
|
@@ -6919,49 +6919,49 @@ class Qs {
|
|
|
6919
6919
|
M,
|
|
6920
6920
|
x,
|
|
6921
6921
|
((dn = e == null ? void 0 : e.metadata) == null ? void 0 : dn.width) > 0 && ((Vt = e == null ? void 0 : e.metadata) == null ? void 0 : Vt.height) > 0 ? V : "",
|
|
6922
|
-
|
|
6922
|
+
Z,
|
|
6923
6923
|
e.nestedFolderName ? P : ""
|
|
6924
6924
|
), U.append(
|
|
6925
6925
|
_,
|
|
6926
6926
|
A
|
|
6927
6927
|
);
|
|
6928
|
-
const ne =
|
|
6928
|
+
const ne = K("form-control"), me = document.createElement("input");
|
|
6929
6929
|
ne.appendChild(me), me.classList.add("input-field"), me.value = e.name;
|
|
6930
|
-
const
|
|
6931
|
-
Te.textContent = e.folderName, Te.prepend(
|
|
6932
|
-
const pe =
|
|
6930
|
+
const Ie = K("form-control"), ge = le("Current Folder:", "input-label"), Te = K("folder-field current");
|
|
6931
|
+
Te.textContent = e.folderName, Te.prepend(Yt()), Ie.append(ge, Te);
|
|
6932
|
+
const pe = K("form-control"), ee = K();
|
|
6933
6933
|
ee.style.width = "100%", ee.style.display = "flex", ee.style.alignItems = "center", ee.style.justifyContent = "space-between";
|
|
6934
6934
|
const Re = le(
|
|
6935
6935
|
"Suggested Folder List:",
|
|
6936
6936
|
"input-label"
|
|
6937
6937
|
), Ue = le();
|
|
6938
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(Rn("14px", "14px", "#333")), ee.append(Re, Ue);
|
|
6939
|
-
const rt =
|
|
6939
|
+
const rt = K();
|
|
6940
6940
|
rt.style.width = "100%", rt.style.maxHeight = "250px", rt.style.overflowY = "auto";
|
|
6941
6941
|
const Ae = document.createElement("ul");
|
|
6942
6942
|
Ae.className = "folders", rt.append(Ae), pe.append(ee, rt), E(this, at).forEach((ce) => {
|
|
6943
|
-
const
|
|
6944
|
-
Ae.appendChild(
|
|
6943
|
+
const je = this._renderEditFolderListContainer(ce);
|
|
6944
|
+
Ae.appendChild(je);
|
|
6945
6945
|
});
|
|
6946
|
-
const it =
|
|
6946
|
+
const it = K("form-control"), Le = le("Destination Folder:", "input-label"), Ve = K(
|
|
6947
6947
|
"folder-field source",
|
|
6948
6948
|
"source-folder-wrapper"
|
|
6949
6949
|
), xe = document.createElement("span");
|
|
6950
|
-
xe.id = "source-folder-name", xe.textContent = E(this, Lt) ? E(this, Lt) : e.folderName, Ve.append(
|
|
6950
|
+
xe.id = "source-folder-name", xe.textContent = E(this, Lt) ? E(this, Lt) : e.folderName, Ve.append(Yt(), xe);
|
|
6951
6951
|
let _e = "";
|
|
6952
6952
|
it.append(Le, Ve), me.onchange = (ce) => {
|
|
6953
6953
|
_e = ce.target.value;
|
|
6954
|
-
}, _e = _e !== "" ? _e : e.name, T.append(ne),
|
|
6955
|
-
|
|
6954
|
+
}, _e = _e !== "" ? _e : e.name, T.append(ne), N.append(
|
|
6955
|
+
Ie,
|
|
6956
6956
|
pe,
|
|
6957
6957
|
it
|
|
6958
6958
|
), u.append(
|
|
6959
6959
|
d,
|
|
6960
|
-
|
|
6960
|
+
F,
|
|
6961
6961
|
R,
|
|
6962
6962
|
L
|
|
6963
6963
|
), d.onclick = (ce) => {
|
|
6964
|
-
ce.stopPropagation(),
|
|
6964
|
+
ce.stopPropagation(), ze.hide(), Ce.show({
|
|
6965
6965
|
content: U,
|
|
6966
6966
|
header: m,
|
|
6967
6967
|
dialogContentStyle: {
|
|
@@ -6970,9 +6970,9 @@ class Qs {
|
|
|
6970
6970
|
},
|
|
6971
6971
|
showCloseBtn: !0
|
|
6972
6972
|
});
|
|
6973
|
-
},
|
|
6974
|
-
ce.stopPropagation(),
|
|
6975
|
-
content:
|
|
6973
|
+
}, F.onclick = (ce) => {
|
|
6974
|
+
ce.stopPropagation(), ze.hide(), Ce.show({
|
|
6975
|
+
content: N,
|
|
6976
6976
|
header: `Move "${e.name}"`,
|
|
6977
6977
|
confirmButtonText: "Move",
|
|
6978
6978
|
dialogContentStyle: {
|
|
@@ -6989,7 +6989,7 @@ class Qs {
|
|
|
6989
6989
|
}
|
|
6990
6990
|
});
|
|
6991
6991
|
}, R.onclick = (ce) => {
|
|
6992
|
-
ce.stopPropagation(),
|
|
6992
|
+
ce.stopPropagation(), ze.hide(), Ce.show({
|
|
6993
6993
|
content: T,
|
|
6994
6994
|
header: "Rename",
|
|
6995
6995
|
confirmButtonText: "Update",
|
|
@@ -7006,7 +7006,7 @@ class Qs {
|
|
|
7006
7006
|
}
|
|
7007
7007
|
});
|
|
7008
7008
|
}, L.onclick = (ce) => {
|
|
7009
|
-
ce.stopPropagation(),
|
|
7009
|
+
ce.stopPropagation(), ze.hide(), Ce.show({
|
|
7010
7010
|
content: "",
|
|
7011
7011
|
dialogContentStyle: {
|
|
7012
7012
|
minWidth: "32rem",
|
|
@@ -7021,7 +7021,7 @@ class Qs {
|
|
|
7021
7021
|
}
|
|
7022
7022
|
});
|
|
7023
7023
|
}, r.addEventListener("click", (ce) => {
|
|
7024
|
-
ce.stopPropagation(),
|
|
7024
|
+
ce.stopPropagation(), ze.hide(), ze.show({
|
|
7025
7025
|
content: u,
|
|
7026
7026
|
mainContainer: n,
|
|
7027
7027
|
divId: e.key
|
|
@@ -7031,9 +7031,9 @@ class Qs {
|
|
|
7031
7031
|
(ot) => (ot == null ? void 0 : ot.key) === (e == null ? void 0 : e.key)
|
|
7032
7032
|
);
|
|
7033
7033
|
if (t.classList.contains("checked"))
|
|
7034
|
-
t.classList.remove("checked"), ce !== -1 && (E(this, ue).splice(ce, 1), E(this,
|
|
7034
|
+
t.classList.remove("checked"), ce !== -1 && (E(this, ue).splice(ce, 1), E(this, Ft) === 1 && a.remove());
|
|
7035
7035
|
else {
|
|
7036
|
-
if (E(this,
|
|
7036
|
+
if (E(this, In))
|
|
7037
7037
|
E(this, ue).push(e);
|
|
7038
7038
|
else {
|
|
7039
7039
|
const ot = document.querySelector(
|
|
@@ -7045,8 +7045,8 @@ class Qs {
|
|
|
7045
7045
|
}
|
|
7046
7046
|
this._updateContent();
|
|
7047
7047
|
}), document.addEventListener("click", (ce) => {
|
|
7048
|
-
const
|
|
7049
|
-
|
|
7048
|
+
const je = document.querySelector(`#${E(this, Rt)}`);
|
|
7049
|
+
je && (ce.composedPath().includes(je) || ze.hide());
|
|
7050
7050
|
}), E(this, ue).findIndex(
|
|
7051
7051
|
(ce) => (ce == null ? void 0 : ce.key) === (e == null ? void 0 : e.key)
|
|
7052
7052
|
) !== -1 ? (t.classList.add("checked"), E(this, yt) ? E(this, Ee).prepend(a) : E(this, Ee).appendChild(a)) : E(this, Ee).appendChild(a);
|
|
@@ -7070,7 +7070,7 @@ class Qs {
|
|
|
7070
7070
|
const e = document.createElement("div");
|
|
7071
7071
|
e.style.paddingInline = "20px";
|
|
7072
7072
|
for (let t = 0; t < 4; t++) {
|
|
7073
|
-
const n =
|
|
7073
|
+
const n = K("skeleton");
|
|
7074
7074
|
n.className = "skeleton folder", n.innerHTML = "", e.appendChild(n);
|
|
7075
7075
|
}
|
|
7076
7076
|
return e;
|
|
@@ -7082,7 +7082,7 @@ class Qs {
|
|
|
7082
7082
|
const n = document.createElement("div");
|
|
7083
7083
|
n.style.position = "relative", n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "2px";
|
|
7084
7084
|
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(
|
|
7085
|
+
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, r.appendChild(Yt()), n.append(r, i), t.append(n), e.children && Object.keys(e.children).length > 0) {
|
|
7086
7086
|
const v = document.createElement("button");
|
|
7087
7087
|
v.classList.add("expand-icon"), v.appendChild(pn()), n.prepend(v);
|
|
7088
7088
|
const L = document.createElement("ul");
|
|
@@ -7101,23 +7101,23 @@ class Qs {
|
|
|
7101
7101
|
"moveToInputField.disabled",
|
|
7102
7102
|
!1,
|
|
7103
7103
|
'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-ellipsis"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>'
|
|
7104
|
-
), a =
|
|
7104
|
+
), a = K("action-wrapper"), c = He("", "action-option edit"), h = le("Edit", ""), l = yr();
|
|
7105
7105
|
c.append(l, h);
|
|
7106
|
-
const u =
|
|
7106
|
+
const u = K("edit-form-wrapper"), d = K("name-field-wrapper"), f = le("Name", "input-label"), y = document.createElement("input");
|
|
7107
7107
|
y.classList.add("input-field"), y.value = e.name, y.onchange = (v) => {
|
|
7108
7108
|
v.target.value;
|
|
7109
7109
|
}, d.append(f, y), u.append(d);
|
|
7110
|
-
const
|
|
7110
|
+
const F = {
|
|
7111
7111
|
key: e.key,
|
|
7112
7112
|
name: e.name,
|
|
7113
7113
|
nestedFolderName: e.nestedFolderName,
|
|
7114
7114
|
createdBy: e.createdBy,
|
|
7115
7115
|
forUser: !0
|
|
7116
7116
|
};
|
|
7117
|
-
this._createUpdateFolderDialog(c, "update",
|
|
7118
|
-
const
|
|
7119
|
-
return
|
|
7120
|
-
v.stopPropagation(),
|
|
7117
|
+
this._createUpdateFolderDialog(c, "update", F);
|
|
7118
|
+
const I = He("", "action-option delete"), C = le("Delete", ""), R = Cr();
|
|
7119
|
+
return I.append(R, C), a.append(c, I), I.onclick = (v) => {
|
|
7120
|
+
v.stopPropagation(), ze.hide(), Ce.show({
|
|
7121
7121
|
content: "",
|
|
7122
7122
|
dialogContentStyle: {
|
|
7123
7123
|
minWidth: "32rem",
|
|
@@ -7132,14 +7132,14 @@ class Qs {
|
|
|
7132
7132
|
}
|
|
7133
7133
|
});
|
|
7134
7134
|
}, o.addEventListener("click", (v) => {
|
|
7135
|
-
v.stopPropagation(),
|
|
7135
|
+
v.stopPropagation(), ze.hide(), ze.show({
|
|
7136
7136
|
content: a,
|
|
7137
7137
|
mainContainer: n,
|
|
7138
7138
|
divId: e.key
|
|
7139
7139
|
}), H(this, Rt, e.key);
|
|
7140
7140
|
}), n.appendChild(o), t.addEventListener("click", (v) => {
|
|
7141
7141
|
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,
|
|
7142
|
+
v.stopPropagation(), H(this, De, e), H(this, kt, e == null ? void 0 : e.name), H(this, ue, []), H(this, ke, []), H(this, Ze, ""), H(this, It, !1), (L = document.querySelector(".folder.selected")) == null || L.classList.remove("selected"), t.classList.add("selected"), this._fetchFilesFromFolder(e.name);
|
|
7143
7143
|
}), ((O = E(this, De)) == null ? void 0 : O.key) === (e == null ? void 0 : e.key) && t.classList.add("selected"), t;
|
|
7144
7144
|
}
|
|
7145
7145
|
_renderEditFolderListContainer(e) {
|
|
@@ -7149,7 +7149,7 @@ class Qs {
|
|
|
7149
7149
|
const n = document.createElement("div");
|
|
7150
7150
|
n.style.position = "relative", n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "2px";
|
|
7151
7151
|
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(
|
|
7152
|
+
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, r.appendChild(Yt()), n.append(r, i), t.append(n), e.children && Object.keys(e.children).length > 0) {
|
|
7153
7153
|
const a = document.createElement("button");
|
|
7154
7154
|
a.classList.add("expand-icon"), a.appendChild(pn()), n.prepend(a);
|
|
7155
7155
|
const c = document.createElement("ul");
|
|
@@ -7170,7 +7170,7 @@ class Qs {
|
|
|
7170
7170
|
}), ((o = E(this, De)) == null ? void 0 : o.key) === (e == null ? void 0 : e.key) && t.classList.add("selected"), t;
|
|
7171
7171
|
}
|
|
7172
7172
|
_updateFolderListContainer() {
|
|
7173
|
-
if (E(this,
|
|
7173
|
+
if (E(this, Nt))
|
|
7174
7174
|
if (E(this, wt).innerHTML = "", E(this, Bt)) {
|
|
7175
7175
|
const e = this._renderFolderListLoadingUI();
|
|
7176
7176
|
E(this, wt).appendChild(e);
|
|
@@ -7179,14 +7179,14 @@ class Qs {
|
|
|
7179
7179
|
e.className = "folders", E(this, wt).appendChild(e), E(this, at).forEach((t) => {
|
|
7180
7180
|
const n = this._renderFolderListContainer(t);
|
|
7181
7181
|
e.appendChild(n);
|
|
7182
|
-
}), E(this,
|
|
7182
|
+
}), E(this, Nt).appendChild(E(this, wt));
|
|
7183
7183
|
}
|
|
7184
7184
|
}
|
|
7185
7185
|
_renderToastContainer(e, t, n) {
|
|
7186
7186
|
this._removeToastContainer(), H(this, lt, document.createElement("div")), E(this, lt).className = `message-container ${t}`;
|
|
7187
7187
|
const r = en(e, "message"), i = t === "success" ? wr() : Rn(), o = He("");
|
|
7188
7188
|
o.style.cursor = "pointer", o.style.border = "0", o.style.outline = "none", o.style.background = "transparent", o.appendChild(
|
|
7189
|
-
|
|
7189
|
+
Kn(t === "error" ? "#ee3f3f" : "#4caf50")
|
|
7190
7190
|
), o.setAttribute(
|
|
7191
7191
|
"fill",
|
|
7192
7192
|
t === "error" ? "#ee3f3f" : "#4caf50"
|
|
@@ -7204,7 +7204,7 @@ class Qs {
|
|
|
7204
7204
|
const e = document.getElementById(
|
|
7205
7205
|
"search-input-wrapper"
|
|
7206
7206
|
);
|
|
7207
|
-
E(this,
|
|
7207
|
+
E(this, Ft) === 0 ? (e && (e.style.visibility = "visible"), ((t = E(this, ke)) == null ? void 0 : t.length) === 0 && !E(this, Pe) ? (E(this, Ee).classList.add(
|
|
7208
7208
|
"no-selected-image-container"
|
|
7209
7209
|
), this._renderEmptyImageContainer()) : (E(this, Ee).classList.remove(
|
|
7210
7210
|
"no-selected-image-container"
|
|
@@ -7217,17 +7217,17 @@ class Qs {
|
|
|
7217
7217
|
_updateContent() {
|
|
7218
7218
|
var t, n, r;
|
|
7219
7219
|
const e = document.getElementById("selected-images-tab");
|
|
7220
|
-
e && (e.textContent = `Selected (${(t = E(this, ue)) == null ? void 0 : t.length})`), E(this,
|
|
7220
|
+
e && (e.textContent = `Selected (${(t = E(this, ue)) == null ? void 0 : t.length})`), E(this, Qe).textContent = `Save (${(n = E(this, ue)) == null ? void 0 : n.length})`, E(this, Qe).disabled = ((r = E(this, ue)) == null ? void 0 : r.length) === 0;
|
|
7221
7221
|
}
|
|
7222
7222
|
async _uploadAndAddSelectedImageList(e, t) {
|
|
7223
7223
|
var n, r;
|
|
7224
7224
|
this._updateSelectedImageListContainerUI();
|
|
7225
7225
|
try {
|
|
7226
|
-
const i = await
|
|
7226
|
+
const i = await Fr(e, t, E(this, Oe)), o = await os(
|
|
7227
7227
|
t == null ? void 0 : t.name,
|
|
7228
7228
|
"",
|
|
7229
7229
|
i,
|
|
7230
|
-
|
|
7230
|
+
Ye[Mn((n = t.type) == null ? void 0 : n.split("/")[0])],
|
|
7231
7231
|
(r = E(this, De)) == null ? void 0 : r.name,
|
|
7232
7232
|
E(this, Oe)
|
|
7233
7233
|
);
|
|
@@ -7328,13 +7328,13 @@ class Qs {
|
|
|
7328
7328
|
}
|
|
7329
7329
|
}
|
|
7330
7330
|
async _upload() {
|
|
7331
|
-
return E(this, on) ? E(this, ue) : E(this,
|
|
7331
|
+
return E(this, on) ? E(this, ue) : E(this, jt);
|
|
7332
7332
|
}
|
|
7333
7333
|
async _uploadFromSource(e, t) {
|
|
7334
7334
|
this._removeUserToast();
|
|
7335
7335
|
const n = 200 * 1024;
|
|
7336
7336
|
try {
|
|
7337
|
-
const r = e.size > n ? await
|
|
7337
|
+
const r = e.size > n ? await Nr(e) : e;
|
|
7338
7338
|
return await new Promise((o, a) => {
|
|
7339
7339
|
const c = new FileReader();
|
|
7340
7340
|
c.readAsDataURL(r), c.onerror = () => {
|
|
@@ -7348,7 +7348,7 @@ class Qs {
|
|
|
7348
7348
|
t
|
|
7349
7349
|
), u = await ls(
|
|
7350
7350
|
l,
|
|
7351
|
-
|
|
7351
|
+
Ye[Mn((h = r.type) == null ? void 0 : h.split("/")[0])],
|
|
7352
7352
|
t
|
|
7353
7353
|
);
|
|
7354
7354
|
o(u);
|
|
@@ -7370,11 +7370,11 @@ class Qs {
|
|
|
7370
7370
|
try {
|
|
7371
7371
|
const i = await cs(
|
|
7372
7372
|
e,
|
|
7373
|
-
E(this,
|
|
7373
|
+
E(this, Ze),
|
|
7374
7374
|
20,
|
|
7375
7375
|
E(this, Oe)
|
|
7376
7376
|
), o = (t = i.response) == null ? void 0 : t.files;
|
|
7377
|
-
E(this, ke).push(...o), H(this,
|
|
7377
|
+
E(this, ke).push(...o), H(this, Ze, (n = i.response) == null ? void 0 : n.nextCursor), H(this, It, (r = i.response) == null ? void 0 : r.hasMore);
|
|
7378
7378
|
} catch {
|
|
7379
7379
|
throw this._renderToastContainer(
|
|
7380
7380
|
"Error while fetching files from folder" + e,
|
|
@@ -7409,11 +7409,11 @@ class Qs {
|
|
|
7409
7409
|
try {
|
|
7410
7410
|
const r = await ds(
|
|
7411
7411
|
e,
|
|
7412
|
-
E(this,
|
|
7412
|
+
E(this, Ze),
|
|
7413
7413
|
10,
|
|
7414
7414
|
E(this, Oe)
|
|
7415
7415
|
), i = (t = r.response) == null ? void 0 : t.items;
|
|
7416
|
-
E(this, ke).push(...i), H(this,
|
|
7416
|
+
E(this, ke).push(...i), H(this, Ze, (n = r.response) == null ? void 0 : n.nextPageCursor);
|
|
7417
7417
|
} catch {
|
|
7418
7418
|
this._renderToastContainer(
|
|
7419
7419
|
"Error while searching files",
|
|
@@ -7465,13 +7465,13 @@ class Qs {
|
|
|
7465
7465
|
_createUpdateFolderDialog(e, t, n) {
|
|
7466
7466
|
e.addEventListener("click", (r) => {
|
|
7467
7467
|
var R, O, v, L;
|
|
7468
|
-
r.stopPropagation(),
|
|
7468
|
+
r.stopPropagation(), ze.hide();
|
|
7469
7469
|
let i;
|
|
7470
|
-
const o =
|
|
7470
|
+
const o = K("edit-form-wrapper"), a = K("form-control"), c = Q(
|
|
7471
7471
|
"div",
|
|
7472
7472
|
"",
|
|
7473
7473
|
"display:flex;align-items:center;gap:5px;"
|
|
7474
|
-
), h =
|
|
7474
|
+
), h = Qs("20px", "20px"), l = pn("20px", "20px"), u = pn("20px", "20px"), d = (R = E(this, De)) != null && R.nestedFolderName ? (O = E(this, De)) == null ? void 0 : O.nestedFolderName : "", f = (v = E(this, De)) != null && v.name ? (L = E(this, De)) == null ? void 0 : L.name : "";
|
|
7475
7475
|
d ? c.append(
|
|
7476
7476
|
h,
|
|
7477
7477
|
l,
|
|
@@ -7479,21 +7479,21 @@ class Qs {
|
|
|
7479
7479
|
u,
|
|
7480
7480
|
f
|
|
7481
7481
|
) : c.append(h, l, f);
|
|
7482
|
-
const y = le("Folder Name", "input-label"),
|
|
7483
|
-
|
|
7484
|
-
const
|
|
7485
|
-
|
|
7486
|
-
const C =
|
|
7482
|
+
const y = le("Folder Name", "input-label"), F = K();
|
|
7483
|
+
F.style.position = "relative";
|
|
7484
|
+
const I = document.createElement("input");
|
|
7485
|
+
I.style.paddingLeft = "40px";
|
|
7486
|
+
const C = Q(
|
|
7487
7487
|
"span",
|
|
7488
7488
|
"",
|
|
7489
7489
|
"position:absolute;top:50%;left:5%;transform:translate(-40%,-40%)"
|
|
7490
7490
|
);
|
|
7491
|
-
C.appendChild(
|
|
7491
|
+
C.appendChild(Yt()), I.classList.add("input-field"), F.append(I, C), t === "update" && (I.value = n.name), I.onchange = (b) => {
|
|
7492
7492
|
i = b.target.value;
|
|
7493
7493
|
}, a.append(
|
|
7494
7494
|
c,
|
|
7495
7495
|
y,
|
|
7496
|
-
|
|
7496
|
+
F
|
|
7497
7497
|
), o.append(a), Ce.show({
|
|
7498
7498
|
content: o,
|
|
7499
7499
|
header: t === "update" ? "Update Folder" : "Create Folder",
|
|
@@ -7519,25 +7519,13 @@ class Qs {
|
|
|
7519
7519
|
_initializeGrpcConfig(e, t) {
|
|
7520
7520
|
let n = "https://hamro-cms-backend-grpc.hamrostack.com";
|
|
7521
7521
|
t && (e === "production" || e === "development") ? n = t : e === "production" && (n = "https://page-api-grpc.hamropatro.com");
|
|
7522
|
-
const r = new
|
|
7522
|
+
const r = new Zi({
|
|
7523
7523
|
baseUrl: n
|
|
7524
7524
|
});
|
|
7525
7525
|
this.updateWindowObject({ grpcConfig: r });
|
|
7526
7526
|
}
|
|
7527
7527
|
}
|
|
7528
|
-
mt = new WeakMap(), we = new WeakMap(), Ee = new WeakMap(), gt = new WeakMap(), ue = new WeakMap(), ke = new WeakMap(), Je = new WeakMap(), Pe = new WeakMap(), Bt = new WeakMap(), kt = new WeakMap(), at = new WeakMap(), De = new WeakMap(),
|
|
7529
|
-
const eo = new Qs({
|
|
7530
|
-
parentContainerId: "app",
|
|
7531
|
-
accessToken: "mBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJtaW5pLWFwcC1zZXJ2aWNlIiwic3ViIjoiZW5ma0JmQ0tqQ2U4S2t1VGRmZXZoMVV6QW1MMiIsImlhdCI6MTc0NDc3NjU5OSwiZXhwIjoxNzQ0OTQ5Mzk5LCJhcHBJZCI6ImhhbXJvcGF0cm8tYW5kcm9pZCIsIm1pbmlBcHBJZCI6IjNhM2NhYWIwLTJmYzItMTFlZi1iNDQ4LWU2OGRhNmVmOWU4MCIsInByb2ZpbGVJbWFnZSI6Imh0dHBzOi8vbGgzLmdvb2dsZXVzZXJjb250ZW50LmNvbS9hL0FMbTV3dTNuZFpxZEVTcVZiajNmd1FHbV80bkFDTDlubzJJT19tTFA1eFY3PXM5Ni1jIiwiZGlzcGxheU5hbWUiOiJOaXJhaiBMYW1hIiwiZW1haWwiOiJubGFtYUBoYW1yb3BhdHJvLmNvbSIsInBob25lTnVtYmVyIjoiIiwiYWRtaW4iOnRydWUsImJ1c2luZXNzIjpbIjIxNzBlMjEwLTJjOTUtMTFlZi1iNDQ4LWU2OGRhNmVmOWU4MDowIiwiM2EzY2FhYjAtMmZjMi0xMWVmLWI0NDgtZTY4ZGE2ZWY5ZTgwOjEiLCIxYTM1NGY4MC03NDAzLTExZWYtOGU5Ni1iNjk4ZjZiMWJlNzU6MSIsIjg0ZDUzYWU4LTgyYTQtNDJjZi05MzkwLWExYTJiZmY4Yjk5YzoxIl0sInN1c3BlbmRlZCI6ZmFsc2UsInZlcmlmaWVkIjpmYWxzZX0.KZhHP5xUERZg3O3swoQLsdofiJ8P-574_rzLv222-KM",
|
|
7532
|
-
mode: "development",
|
|
7533
|
-
isAdmin: !0,
|
|
7534
|
-
handleUpload: () => {
|
|
7535
|
-
to();
|
|
7536
|
-
},
|
|
7537
|
-
enableDialog: !0
|
|
7538
|
-
}), to = () => {
|
|
7539
|
-
eo._upload().then((s) => console.log("res", s));
|
|
7540
|
-
};
|
|
7528
|
+
mt = new WeakMap(), we = new WeakMap(), Ee = new WeakMap(), gt = new WeakMap(), ue = new WeakMap(), ke = new WeakMap(), Je = new WeakMap(), Pe = new WeakMap(), Bt = new WeakMap(), kt = new WeakMap(), at = new WeakMap(), De = new WeakMap(), Qe = new WeakMap(), Ot = new WeakMap(), zn = new WeakMap(), Ft = new WeakMap(), Nt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), lt = new WeakMap(), Ze = new WeakMap(), It = new WeakMap(), Tt = new WeakMap(), yt = new WeakMap(), Wt = new WeakMap(), rn = new WeakMap(), Oe = new WeakMap(), Rt = new WeakMap(), sn = new WeakMap(), In = new WeakMap(), on = new WeakMap(), ct = new WeakMap(), jt = new WeakMap(), Lt = new WeakMap(), qt = new WeakMap(), Zt = new WeakMap(), Kt = new WeakMap(), zt = new WeakMap(), Xt = new WeakMap(), an = new WeakMap(), ln = new WeakMap(), Gt = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), cn = new WeakMap();
|
|
7541
7529
|
export {
|
|
7542
|
-
|
|
7530
|
+
eo as default
|
|
7543
7531
|
};
|