image-salon-sdk 1.0.75 → 1.0.76
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
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
var
|
|
3
|
-
var
|
|
2
|
+
var ii = Object.defineProperty;
|
|
3
|
+
var tr = (s) => {
|
|
4
4
|
throw TypeError(s);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
7
|
-
var he = (s, e, t) =>
|
|
8
|
-
var
|
|
9
|
-
function
|
|
6
|
+
var si = (s, e, t) => e in s ? ii(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
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)), 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, r) => (nr(s, e, "write to private field"), r ? r.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))
|
|
@@ -16,20 +16,20 @@ function Nr(s) {
|
|
|
16
16
|
}
|
|
17
17
|
return e;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function oi(s) {
|
|
20
20
|
return s !== null && typeof s == "object" && !Array.isArray(s);
|
|
21
21
|
}
|
|
22
|
-
let
|
|
23
|
-
for (let s = 0; s <
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
function
|
|
22
|
+
let Ct = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), In = [];
|
|
23
|
+
for (let s = 0; s < Ct.length; s++)
|
|
24
|
+
In[Ct[s].charCodeAt(0)] = s;
|
|
25
|
+
In[45] = Ct.indexOf("+");
|
|
26
|
+
In[95] = Ct.indexOf("/");
|
|
27
|
+
function Tr(s) {
|
|
28
28
|
let e = s.length * 3 / 4;
|
|
29
29
|
s[s.length - 2] == "=" ? e -= 2 : s[s.length - 1] == "=" && (e -= 1);
|
|
30
30
|
let t = new Uint8Array(e), r = 0, n = 0, i, o = 0;
|
|
31
31
|
for (let a = 0; a < s.length; a++) {
|
|
32
|
-
if (i =
|
|
32
|
+
if (i = In[s.charCodeAt(a)], i === void 0)
|
|
33
33
|
switch (s[a]) {
|
|
34
34
|
case "=":
|
|
35
35
|
n = 0;
|
|
@@ -61,21 +61,21 @@ function Ir(s) {
|
|
|
61
61
|
throw Error("invalid base64 string.");
|
|
62
62
|
return t.subarray(0, r);
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Lr(s) {
|
|
65
65
|
let e = "", t = 0, r, n = 0;
|
|
66
66
|
for (let i = 0; i < s.length; i++)
|
|
67
67
|
switch (r = s[i], t) {
|
|
68
68
|
case 0:
|
|
69
|
-
e +=
|
|
69
|
+
e += Ct[r >> 2], n = (r & 3) << 4, t = 1;
|
|
70
70
|
break;
|
|
71
71
|
case 1:
|
|
72
|
-
e +=
|
|
72
|
+
e += Ct[n | r >> 4], n = (r & 15) << 2, t = 2;
|
|
73
73
|
break;
|
|
74
74
|
case 2:
|
|
75
|
-
e +=
|
|
75
|
+
e += Ct[n | r >> 6], e += Ct[r & 63], t = 0;
|
|
76
76
|
break;
|
|
77
77
|
}
|
|
78
|
-
return t && (e +=
|
|
78
|
+
return t && (e += Ct[n], e += "=", t == 1 && (e += "=")), e;
|
|
79
79
|
}
|
|
80
80
|
var G;
|
|
81
81
|
(function(s) {
|
|
@@ -93,14 +93,14 @@ var G;
|
|
|
93
93
|
}, s.last = (t, r) => s.list(t, r).slice(-1)[0];
|
|
94
94
|
const e = (t) => t && Array.isArray(t[s.symbol]);
|
|
95
95
|
})(G || (G = {}));
|
|
96
|
-
function
|
|
96
|
+
function ai(s, e) {
|
|
97
97
|
return Object.assign(Object.assign({}, s), e);
|
|
98
98
|
}
|
|
99
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
|
-
function
|
|
103
|
+
function li() {
|
|
104
104
|
let s = 0, e = 0;
|
|
105
105
|
for (let r = 0; r < 28; r += 7) {
|
|
106
106
|
let n = this.buf[this.pos++];
|
|
@@ -117,7 +117,7 @@ function ai() {
|
|
|
117
117
|
}
|
|
118
118
|
throw new Error("invalid varint");
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function xn(s, e, t) {
|
|
121
121
|
for (let i = 0; i < 28; i = i + 7) {
|
|
122
122
|
const o = s >>> i, a = !(!(o >>> 7) && e == 0), c = (a ? o | 128 : o) & 255;
|
|
123
123
|
if (t.push(c), !a)
|
|
@@ -133,21 +133,21 @@ function Un(s, e, t) {
|
|
|
133
133
|
t.push(e >>> 31 & 1);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
const
|
|
137
|
-
function
|
|
136
|
+
const gn = 65536 * 65536;
|
|
137
|
+
function Ur(s) {
|
|
138
138
|
let e = s[0] == "-";
|
|
139
139
|
e && (s = s.slice(1));
|
|
140
140
|
const t = 1e6;
|
|
141
141
|
let r = 0, n = 0;
|
|
142
142
|
function i(o, a) {
|
|
143
143
|
const c = Number(s.slice(o, a));
|
|
144
|
-
n *= t, r = r * t + c, r >=
|
|
144
|
+
n *= t, r = r * t + c, r >= gn && (n = n + (r / gn | 0), r = r % gn);
|
|
145
145
|
}
|
|
146
146
|
return i(-24, -18), i(-18, -12), i(-12, -6), i(-6), [e, r, n];
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function Pn(s, e) {
|
|
149
149
|
if (e >>> 0 <= 2097151)
|
|
150
|
-
return "" + (
|
|
150
|
+
return "" + (gn * e + (s >>> 0));
|
|
151
151
|
let t = s & 16777215, r = (s >>> 24 | e << 8) >>> 0 & 16777215, n = e >> 16 & 65535, i = t + r * 6777216 + n * 6710656, o = r + n * 8147497, a = n * 2, c = 1e7;
|
|
152
152
|
i >= c && (o += Math.floor(i / c), i %= c), o >= c && (a += Math.floor(o / c), o %= c);
|
|
153
153
|
function h(l, u) {
|
|
@@ -170,7 +170,7 @@ function Hn(s, e) {
|
|
|
170
170
|
1
|
|
171
171
|
);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function rr(s, e) {
|
|
174
174
|
if (s >= 0) {
|
|
175
175
|
for (; s > 127; )
|
|
176
176
|
e.push(s & 127 | 128), s = s >>> 7;
|
|
@@ -181,7 +181,7 @@ function tr(s, e) {
|
|
|
181
181
|
e.push(1);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function ci() {
|
|
185
185
|
let s = this.buf[this.pos++], e = s & 127;
|
|
186
186
|
if (!(s & 128))
|
|
187
187
|
return this.assertBounds(), e;
|
|
@@ -199,7 +199,7 @@ function li() {
|
|
|
199
199
|
return this.assertBounds(), e >>> 0;
|
|
200
200
|
}
|
|
201
201
|
let oe;
|
|
202
|
-
function
|
|
202
|
+
function di() {
|
|
203
203
|
const s = new DataView(new ArrayBuffer(8));
|
|
204
204
|
oe = globalThis.BigInt !== void 0 && typeof s.getBigInt64 == "function" && typeof s.getBigUint64 == "function" && typeof s.setBigInt64 == "function" && typeof s.setBigUint64 == "function" ? {
|
|
205
205
|
MIN: BigInt("-9223372036854775808"),
|
|
@@ -210,13 +210,13 @@ function ci() {
|
|
|
210
210
|
V: s
|
|
211
211
|
} : void 0;
|
|
212
212
|
}
|
|
213
|
-
|
|
214
|
-
function
|
|
213
|
+
di();
|
|
214
|
+
function xr(s) {
|
|
215
215
|
if (!s)
|
|
216
216
|
throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support");
|
|
217
217
|
}
|
|
218
|
-
const
|
|
219
|
-
class
|
|
218
|
+
const _r = /^-?[0-9]+$/, yn = 4294967296, hn = 2147483648;
|
|
219
|
+
class Br {
|
|
220
220
|
/**
|
|
221
221
|
* Create a new instance with the given bits.
|
|
222
222
|
*/
|
|
@@ -233,13 +233,13 @@ class _r {
|
|
|
233
233
|
* Convert to a native number.
|
|
234
234
|
*/
|
|
235
235
|
toNumber() {
|
|
236
|
-
let e = this.hi *
|
|
236
|
+
let e = this.hi * yn + (this.lo >>> 0);
|
|
237
237
|
if (!Number.isSafeInteger(e))
|
|
238
238
|
throw new Error("cannot convert to safe number");
|
|
239
239
|
return e;
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
-
class Se extends
|
|
242
|
+
class Se extends Br {
|
|
243
243
|
/**
|
|
244
244
|
* Create instance from a `string`, `number` or `bigint`.
|
|
245
245
|
*/
|
|
@@ -270,9 +270,9 @@ class Se extends _r {
|
|
|
270
270
|
case "string":
|
|
271
271
|
if (e == "0")
|
|
272
272
|
return this.ZERO;
|
|
273
|
-
if (e = e.trim(), !
|
|
273
|
+
if (e = e.trim(), !_r.test(e))
|
|
274
274
|
throw new Error("string is no integer");
|
|
275
|
-
let [t, r, n] =
|
|
275
|
+
let [t, r, n] = Ur(e);
|
|
276
276
|
if (t)
|
|
277
277
|
throw new Error("signed value for ulong");
|
|
278
278
|
return new Se(r, n);
|
|
@@ -283,7 +283,7 @@ class Se extends _r {
|
|
|
283
283
|
throw new Error("number is no integer");
|
|
284
284
|
if (e < 0)
|
|
285
285
|
throw new Error("signed value for ulong");
|
|
286
|
-
return new Se(e, e /
|
|
286
|
+
return new Se(e, e / yn);
|
|
287
287
|
}
|
|
288
288
|
throw new Error("unknown value " + typeof e);
|
|
289
289
|
}
|
|
@@ -291,17 +291,17 @@ class Se extends _r {
|
|
|
291
291
|
* Convert to decimal string.
|
|
292
292
|
*/
|
|
293
293
|
toString() {
|
|
294
|
-
return oe ? this.toBigInt().toString() :
|
|
294
|
+
return oe ? this.toBigInt().toString() : Pn(this.lo, this.hi);
|
|
295
295
|
}
|
|
296
296
|
/**
|
|
297
297
|
* Convert to native bigint.
|
|
298
298
|
*/
|
|
299
299
|
toBigInt() {
|
|
300
|
-
return
|
|
300
|
+
return xr(oe), oe.V.setInt32(0, this.lo, !0), oe.V.setInt32(4, this.hi, !0), oe.V.getBigUint64(0, !0);
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
Se.ZERO = new Se(0, 0);
|
|
304
|
-
class ve extends
|
|
304
|
+
class ve extends Br {
|
|
305
305
|
/**
|
|
306
306
|
* Create instance from a `string`, `number` or `bigint`.
|
|
307
307
|
*/
|
|
@@ -332,13 +332,13 @@ class ve extends _r {
|
|
|
332
332
|
case "string":
|
|
333
333
|
if (e == "0")
|
|
334
334
|
return this.ZERO;
|
|
335
|
-
if (e = e.trim(), !
|
|
335
|
+
if (e = e.trim(), !_r.test(e))
|
|
336
336
|
throw new Error("string is no integer");
|
|
337
|
-
let [t, r, n] =
|
|
337
|
+
let [t, r, n] = Ur(e);
|
|
338
338
|
if (t) {
|
|
339
|
-
if (n >
|
|
339
|
+
if (n > hn || n == hn && r != 0)
|
|
340
340
|
throw new Error("signed long too small");
|
|
341
|
-
} else if (n >=
|
|
341
|
+
} else if (n >= hn)
|
|
342
342
|
throw new Error("signed long too large");
|
|
343
343
|
let i = new ve(r, n);
|
|
344
344
|
return t ? i.negate() : i;
|
|
@@ -347,7 +347,7 @@ class ve extends _r {
|
|
|
347
347
|
return this.ZERO;
|
|
348
348
|
if (!Number.isSafeInteger(e))
|
|
349
349
|
throw new Error("number is no integer");
|
|
350
|
-
return e > 0 ? new ve(e, e /
|
|
350
|
+
return e > 0 ? new ve(e, e / yn) : new ve(-e, -e / yn).negate();
|
|
351
351
|
}
|
|
352
352
|
throw new Error("unknown value " + typeof e);
|
|
353
353
|
}
|
|
@@ -355,7 +355,7 @@ class ve extends _r {
|
|
|
355
355
|
* Do we have a minus sign?
|
|
356
356
|
*/
|
|
357
357
|
isNegative() {
|
|
358
|
-
return (this.hi &
|
|
358
|
+
return (this.hi & hn) !== 0;
|
|
359
359
|
}
|
|
360
360
|
/**
|
|
361
361
|
* Negate two's complement.
|
|
@@ -373,28 +373,28 @@ class ve extends _r {
|
|
|
373
373
|
return this.toBigInt().toString();
|
|
374
374
|
if (this.isNegative()) {
|
|
375
375
|
let e = this.negate();
|
|
376
|
-
return "-" +
|
|
376
|
+
return "-" + Pn(e.lo, e.hi);
|
|
377
377
|
}
|
|
378
|
-
return
|
|
378
|
+
return Pn(this.lo, this.hi);
|
|
379
379
|
}
|
|
380
380
|
/**
|
|
381
381
|
* Convert to native bigint.
|
|
382
382
|
*/
|
|
383
383
|
toBigInt() {
|
|
384
|
-
return
|
|
384
|
+
return xr(oe), oe.V.setInt32(0, this.lo, !0), oe.V.setInt32(4, this.hi, !0), oe.V.getBigInt64(0, !0);
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
ve.ZERO = new ve(0, 0);
|
|
388
|
-
const
|
|
388
|
+
const ir = {
|
|
389
389
|
readUnknownField: !0,
|
|
390
|
-
readerFactory: (s) => new
|
|
390
|
+
readerFactory: (s) => new ui(s)
|
|
391
391
|
};
|
|
392
|
-
function
|
|
393
|
-
return s ? Object.assign(Object.assign({},
|
|
392
|
+
function hi(s) {
|
|
393
|
+
return s ? Object.assign(Object.assign({}, ir), s) : ir;
|
|
394
394
|
}
|
|
395
|
-
class
|
|
395
|
+
class ui {
|
|
396
396
|
constructor(e, t) {
|
|
397
|
-
this.varint64 =
|
|
397
|
+
this.varint64 = li, this.uint32 = ci, this.buf = e, this.len = e.length, this.pos = 0, this.view = new DataView(e.buffer, e.byteOffset, e.byteLength), this.textDecoder = t ?? new TextDecoder("utf-8", {
|
|
398
398
|
fatal: !0,
|
|
399
399
|
ignoreBOM: !0
|
|
400
400
|
});
|
|
@@ -538,33 +538,33 @@ function J(s, e) {
|
|
|
538
538
|
if (!s)
|
|
539
539
|
throw new Error(e);
|
|
540
540
|
}
|
|
541
|
-
const
|
|
541
|
+
const fi = 34028234663852886e22, pi = -34028234663852886e22, mi = 4294967295, gi = 2147483647, wi = -2147483648;
|
|
542
542
|
function nn(s) {
|
|
543
543
|
if (typeof s != "number")
|
|
544
544
|
throw new Error("invalid int 32: " + typeof s);
|
|
545
|
-
if (!Number.isInteger(s) || s >
|
|
545
|
+
if (!Number.isInteger(s) || s > gi || s < wi)
|
|
546
546
|
throw new Error("invalid int 32: " + s);
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function bn(s) {
|
|
549
549
|
if (typeof s != "number")
|
|
550
550
|
throw new Error("invalid uint 32: " + typeof s);
|
|
551
|
-
if (!Number.isInteger(s) || s >
|
|
551
|
+
if (!Number.isInteger(s) || s > mi || s < 0)
|
|
552
552
|
throw new Error("invalid uint 32: " + s);
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Xn(s) {
|
|
555
555
|
if (typeof s != "number")
|
|
556
556
|
throw new Error("invalid float 32: " + typeof s);
|
|
557
|
-
if (Number.isFinite(s) && (s >
|
|
557
|
+
if (Number.isFinite(s) && (s > fi || s < pi))
|
|
558
558
|
throw new Error("invalid float 32: " + s);
|
|
559
559
|
}
|
|
560
|
-
const
|
|
560
|
+
const sr = {
|
|
561
561
|
writeUnknownFields: !0,
|
|
562
|
-
writerFactory: () => new
|
|
562
|
+
writerFactory: () => new bi()
|
|
563
563
|
};
|
|
564
|
-
function
|
|
565
|
-
return s ? Object.assign(Object.assign({},
|
|
564
|
+
function yi(s) {
|
|
565
|
+
return s ? Object.assign(Object.assign({}, sr), s) : sr;
|
|
566
566
|
}
|
|
567
|
-
class
|
|
567
|
+
class bi {
|
|
568
568
|
constructor(e) {
|
|
569
569
|
this.stack = [], this.textEncoder = e ?? new TextEncoder(), this.chunks = [], this.buf = [];
|
|
570
570
|
}
|
|
@@ -620,7 +620,7 @@ class yi {
|
|
|
620
620
|
* Write a `uint32` value, an unsigned 32 bit varint.
|
|
621
621
|
*/
|
|
622
622
|
uint32(e) {
|
|
623
|
-
for (
|
|
623
|
+
for (bn(e); e > 127; )
|
|
624
624
|
this.buf.push(e & 127 | 128), e = e >>> 7;
|
|
625
625
|
return this.buf.push(e), this;
|
|
626
626
|
}
|
|
@@ -628,7 +628,7 @@ class yi {
|
|
|
628
628
|
* Write a `int32` value, a signed 32 bit varint.
|
|
629
629
|
*/
|
|
630
630
|
int32(e) {
|
|
631
|
-
return nn(e),
|
|
631
|
+
return nn(e), rr(e, this.buf), this;
|
|
632
632
|
}
|
|
633
633
|
/**
|
|
634
634
|
* Write a `bool` value, a variant.
|
|
@@ -653,7 +653,7 @@ class yi {
|
|
|
653
653
|
* Write a `float` value, 32-bit floating point number.
|
|
654
654
|
*/
|
|
655
655
|
float(e) {
|
|
656
|
-
|
|
656
|
+
Xn(e);
|
|
657
657
|
let t = new Uint8Array(4);
|
|
658
658
|
return new DataView(t.buffer).setFloat32(0, e, !0), this.raw(t);
|
|
659
659
|
}
|
|
@@ -668,7 +668,7 @@ class yi {
|
|
|
668
668
|
* Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
|
|
669
669
|
*/
|
|
670
670
|
fixed32(e) {
|
|
671
|
-
|
|
671
|
+
bn(e);
|
|
672
672
|
let t = new Uint8Array(4);
|
|
673
673
|
return new DataView(t.buffer).setUint32(0, e, !0), this.raw(t);
|
|
674
674
|
}
|
|
@@ -684,7 +684,7 @@ class yi {
|
|
|
684
684
|
* Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
|
|
685
685
|
*/
|
|
686
686
|
sint32(e) {
|
|
687
|
-
return nn(e), e = (e << 1 ^ e >> 31) >>> 0,
|
|
687
|
+
return nn(e), e = (e << 1 ^ e >> 31) >>> 0, rr(e, this.buf), this;
|
|
688
688
|
}
|
|
689
689
|
/**
|
|
690
690
|
* Write a `fixed64` value, a signed, fixed-length 64-bit integer.
|
|
@@ -705,44 +705,44 @@ class yi {
|
|
|
705
705
|
*/
|
|
706
706
|
int64(e) {
|
|
707
707
|
let t = ve.from(e);
|
|
708
|
-
return
|
|
708
|
+
return xn(t.lo, t.hi, this.buf), this;
|
|
709
709
|
}
|
|
710
710
|
/**
|
|
711
711
|
* Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
|
|
712
712
|
*/
|
|
713
713
|
sint64(e) {
|
|
714
714
|
let t = ve.from(e), r = t.hi >> 31, n = t.lo << 1 ^ r, i = (t.hi << 1 | t.lo >>> 31) ^ r;
|
|
715
|
-
return
|
|
715
|
+
return xn(n, i, this.buf), this;
|
|
716
716
|
}
|
|
717
717
|
/**
|
|
718
718
|
* Write a `uint64` value, an unsigned 64-bit varint.
|
|
719
719
|
*/
|
|
720
720
|
uint64(e) {
|
|
721
721
|
let t = Se.from(e);
|
|
722
|
-
return
|
|
722
|
+
return xn(t.lo, t.hi, this.buf), this;
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
|
-
const
|
|
725
|
+
const or = {
|
|
726
726
|
emitDefaultValues: !1,
|
|
727
727
|
enumAsInteger: !1,
|
|
728
728
|
useProtoFieldName: !1,
|
|
729
729
|
prettySpaces: 0
|
|
730
|
-
},
|
|
730
|
+
}, ar = {
|
|
731
731
|
ignoreUnknownFields: !1
|
|
732
732
|
};
|
|
733
|
-
function bi(s) {
|
|
734
|
-
return s ? Object.assign(Object.assign({}, sr), s) : sr;
|
|
735
|
-
}
|
|
736
733
|
function Ci(s) {
|
|
737
|
-
return s ? Object.assign(Object.assign({},
|
|
734
|
+
return s ? Object.assign(Object.assign({}, ar), s) : ar;
|
|
738
735
|
}
|
|
739
|
-
function Ei(s
|
|
736
|
+
function Ei(s) {
|
|
737
|
+
return s ? Object.assign(Object.assign({}, or), s) : or;
|
|
738
|
+
}
|
|
739
|
+
function vi(s, e) {
|
|
740
740
|
var t, r;
|
|
741
741
|
let n = Object.assign(Object.assign({}, s), e);
|
|
742
742
|
return n.typeRegistry = [...(t = s == null ? void 0 : s.typeRegistry) !== null && t !== void 0 ? t : [], ...(r = e == null ? void 0 : e.typeRegistry) !== null && r !== void 0 ? r : []], n;
|
|
743
743
|
}
|
|
744
|
-
const
|
|
745
|
-
function
|
|
744
|
+
const Or = Symbol.for("protobuf-ts/message-type");
|
|
745
|
+
function Wn(s) {
|
|
746
746
|
let e = !1;
|
|
747
747
|
const t = [];
|
|
748
748
|
for (let r = 0; r < s.length; r++) {
|
|
@@ -755,19 +755,19 @@ var D;
|
|
|
755
755
|
(function(s) {
|
|
756
756
|
s[s.DOUBLE = 1] = "DOUBLE", s[s.FLOAT = 2] = "FLOAT", s[s.INT64 = 3] = "INT64", s[s.UINT64 = 4] = "UINT64", s[s.INT32 = 5] = "INT32", s[s.FIXED64 = 6] = "FIXED64", s[s.FIXED32 = 7] = "FIXED32", s[s.BOOL = 8] = "BOOL", s[s.STRING = 9] = "STRING", s[s.BYTES = 12] = "BYTES", s[s.UINT32 = 13] = "UINT32", s[s.SFIXED32 = 15] = "SFIXED32", s[s.SFIXED64 = 16] = "SFIXED64", s[s.SINT32 = 17] = "SINT32", s[s.SINT64 = 18] = "SINT64";
|
|
757
757
|
})(D || (D = {}));
|
|
758
|
-
var
|
|
758
|
+
var pt;
|
|
759
759
|
(function(s) {
|
|
760
760
|
s[s.BIGINT = 0] = "BIGINT", s[s.STRING = 1] = "STRING", s[s.NUMBER = 2] = "NUMBER";
|
|
761
|
-
})(
|
|
762
|
-
var
|
|
761
|
+
})(pt || (pt = {}));
|
|
762
|
+
var Cn;
|
|
763
763
|
(function(s) {
|
|
764
764
|
s[s.NO = 0] = "NO", s[s.PACKED = 1] = "PACKED", s[s.UNPACKED = 2] = "UNPACKED";
|
|
765
|
-
})(
|
|
766
|
-
function
|
|
765
|
+
})(Cn || (Cn = {}));
|
|
766
|
+
function Ai(s) {
|
|
767
767
|
var e, t, r, n;
|
|
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 = (r = s.repeat) !== null && r !== void 0 ? r : Cn.NO, s.opt = (n = s.opt) !== null && n !== void 0 ? n : s.repeat || s.oneof ? !1 : s.kind == "message", s;
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function ki(s) {
|
|
771
771
|
if (typeof s != "object" || s === null || !s.hasOwnProperty("oneofKind"))
|
|
772
772
|
return !1;
|
|
773
773
|
switch (typeof s.oneofKind) {
|
|
@@ -779,7 +779,7 @@ function Ai(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 : [];
|
|
@@ -839,7 +839,7 @@ class ki {
|
|
|
839
839
|
return !0;
|
|
840
840
|
for (const o of i.oneofs) {
|
|
841
841
|
const a = e[o];
|
|
842
|
-
if (!
|
|
842
|
+
if (!ki(a))
|
|
843
843
|
return !1;
|
|
844
844
|
if (a.oneofKind === void 0)
|
|
845
845
|
continue;
|
|
@@ -907,9 +907,9 @@ class ki {
|
|
|
907
907
|
case D.SFIXED64:
|
|
908
908
|
case D.SINT64:
|
|
909
909
|
switch (r) {
|
|
910
|
-
case
|
|
910
|
+
case pt.BIGINT:
|
|
911
911
|
return n == "bigint";
|
|
912
|
-
case
|
|
912
|
+
case pt.NUMBER:
|
|
913
913
|
return n == "number" && !isNaN(e);
|
|
914
914
|
default:
|
|
915
915
|
return n == "string";
|
|
@@ -951,21 +951,21 @@ class ki {
|
|
|
951
951
|
case D.BOOL:
|
|
952
952
|
return this.scalars(n.slice(0, r).map((i) => i == "true" ? !0 : i == "false" ? !1 : i), t, r);
|
|
953
953
|
default:
|
|
954
|
-
return this.scalars(n, t, r,
|
|
954
|
+
return this.scalars(n, t, r, pt.STRING);
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
|
-
function
|
|
958
|
+
function tt(s, e) {
|
|
959
959
|
switch (e) {
|
|
960
|
-
case
|
|
960
|
+
case pt.BIGINT:
|
|
961
961
|
return s.toBigInt();
|
|
962
|
-
case
|
|
962
|
+
case pt.NUMBER:
|
|
963
963
|
return s.toNumber();
|
|
964
964
|
default:
|
|
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, r) {
|
|
983
983
|
if (!e) {
|
|
984
|
-
let n =
|
|
984
|
+
let n = Ir(r);
|
|
985
985
|
throw (n == "number" || n == "boolean") && (n = r.toString()), new Error(`Cannot parse JSON ${n} for ${this.info.typeName}#${t}`);
|
|
986
986
|
}
|
|
987
987
|
}
|
|
@@ -1019,7 +1019,7 @@ class Fi {
|
|
|
1019
1019
|
if (a.kind == "map") {
|
|
1020
1020
|
if (o === null)
|
|
1021
1021
|
continue;
|
|
1022
|
-
this.assert(
|
|
1022
|
+
this.assert(oi(o), a.name, o);
|
|
1023
1023
|
const l = h[c];
|
|
1024
1024
|
for (const [u, d] of Object.entries(o)) {
|
|
1025
1025
|
this.assert(d !== null, a.name + " map value", null);
|
|
@@ -1038,7 +1038,7 @@ class Fi {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
this.assert(f !== void 0, a.name + " map value", d);
|
|
1040
1040
|
let y = u;
|
|
1041
|
-
a.K == D.BOOL && (y = y == "true" ? !0 : y == "false" ? !1 : y), y = this.scalar(y, a.K,
|
|
1041
|
+
a.K == D.BOOL && (y = y == "true" ? !0 : y == "false" ? !1 : y), y = this.scalar(y, a.K, pt.STRING, a.name).toString(), l[y] = f;
|
|
1042
1042
|
}
|
|
1043
1043
|
} else if (a.repeat) {
|
|
1044
1044
|
if (o === null)
|
|
@@ -1135,7 +1135,7 @@ class Fi {
|
|
|
1135
1135
|
i = "too large or small";
|
|
1136
1136
|
break;
|
|
1137
1137
|
}
|
|
1138
|
-
return t == D.FLOAT &&
|
|
1138
|
+
return t == D.FLOAT && Xn(o), o;
|
|
1139
1139
|
case D.INT32:
|
|
1140
1140
|
case D.FIXED32:
|
|
1141
1141
|
case D.SFIXED32:
|
|
@@ -1146,22 +1146,22 @@ class Fi {
|
|
|
1146
1146
|
let a;
|
|
1147
1147
|
if (typeof e == "number" ? a = e : e === "" ? i = "empty string" : typeof e == "string" && (e.trim().length !== e.length ? i = "extra whitespace" : a = Number(e)), a === void 0)
|
|
1148
1148
|
break;
|
|
1149
|
-
return t == D.UINT32 ?
|
|
1149
|
+
return t == D.UINT32 ? bn(a) : nn(a), a;
|
|
1150
1150
|
case D.INT64:
|
|
1151
1151
|
case D.SFIXED64:
|
|
1152
1152
|
case D.SINT64:
|
|
1153
1153
|
if (e === null)
|
|
1154
|
-
return
|
|
1154
|
+
return tt(ve.ZERO, r);
|
|
1155
1155
|
if (typeof e != "number" && typeof e != "string")
|
|
1156
1156
|
break;
|
|
1157
|
-
return
|
|
1157
|
+
return tt(ve.from(e), r);
|
|
1158
1158
|
case D.FIXED64:
|
|
1159
1159
|
case D.UINT64:
|
|
1160
1160
|
if (e === null)
|
|
1161
|
-
return
|
|
1161
|
+
return tt(Se.ZERO, r);
|
|
1162
1162
|
if (typeof e != "number" && typeof e != "string")
|
|
1163
1163
|
break;
|
|
1164
|
-
return
|
|
1164
|
+
return tt(Se.from(e), r);
|
|
1165
1165
|
case D.BOOL:
|
|
1166
1166
|
if (e === null)
|
|
1167
1167
|
return !1;
|
|
@@ -1187,7 +1187,7 @@ class Fi {
|
|
|
1187
1187
|
return new Uint8Array(0);
|
|
1188
1188
|
if (typeof e != "string")
|
|
1189
1189
|
break;
|
|
1190
|
-
return
|
|
1190
|
+
return Tr(e);
|
|
1191
1191
|
}
|
|
1192
1192
|
} catch (o) {
|
|
1193
1193
|
i = o.message;
|
|
@@ -1195,7 +1195,7 @@ class Fi {
|
|
|
1195
1195
|
this.assert(!1, n + (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 : [];
|
|
@@ -1319,9 +1319,9 @@ class Ni {
|
|
|
1319
1319
|
return t === 0 ? o ? 0 : void 0 : (nn(t), t);
|
|
1320
1320
|
case D.FIXED32:
|
|
1321
1321
|
case D.UINT32:
|
|
1322
|
-
return t === 0 ? o ? 0 : void 0 : (
|
|
1322
|
+
return t === 0 ? o ? 0 : void 0 : (bn(t), t);
|
|
1323
1323
|
case D.FLOAT:
|
|
1324
|
-
|
|
1324
|
+
Xn(t);
|
|
1325
1325
|
case D.DOUBLE:
|
|
1326
1326
|
return t === 0 ? o ? 0 : void 0 : (J(typeof t == "number"), Number.isNaN(t) ? "NaN" : t === Number.POSITIVE_INFINITY ? "Infinity" : t === Number.NEGATIVE_INFINITY ? "-Infinity" : t);
|
|
1327
1327
|
case D.STRING:
|
|
@@ -1340,21 +1340,21 @@ class Ni {
|
|
|
1340
1340
|
let c = ve.from(t);
|
|
1341
1341
|
return c.isZero() && !o ? void 0 : c.toString();
|
|
1342
1342
|
case D.BYTES:
|
|
1343
|
-
return J(t instanceof Uint8Array), t.byteLength ?
|
|
1343
|
+
return J(t instanceof Uint8Array), t.byteLength ? Lr(t) : o ? "" : void 0;
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function jn(s, e = pt.STRING) {
|
|
1348
1348
|
switch (s) {
|
|
1349
1349
|
case D.BOOL:
|
|
1350
1350
|
return !1;
|
|
1351
1351
|
case D.UINT64:
|
|
1352
1352
|
case D.FIXED64:
|
|
1353
|
-
return
|
|
1353
|
+
return tt(Se.ZERO, e);
|
|
1354
1354
|
case D.INT64:
|
|
1355
1355
|
case D.SFIXED64:
|
|
1356
1356
|
case D.SINT64:
|
|
1357
|
-
return
|
|
1357
|
+
return tt(ve.ZERO, e);
|
|
1358
1358
|
case D.DOUBLE:
|
|
1359
1359
|
case D.FLOAT:
|
|
1360
1360
|
return 0;
|
|
@@ -1366,7 +1366,7 @@ function Pn(s, e = ht.STRING) {
|
|
|
1366
1366
|
return 0;
|
|
1367
1367
|
}
|
|
1368
1368
|
}
|
|
1369
|
-
class
|
|
1369
|
+
class Ti {
|
|
1370
1370
|
constructor(e) {
|
|
1371
1371
|
this.info = e;
|
|
1372
1372
|
}
|
|
@@ -1440,7 +1440,7 @@ class Ii {
|
|
|
1440
1440
|
let [c, h] = t.tag();
|
|
1441
1441
|
switch (c) {
|
|
1442
1442
|
case 1:
|
|
1443
|
-
e.K == D.BOOL ? o = t.bool().toString() : o = this.scalar(t, e.K,
|
|
1443
|
+
e.K == D.BOOL ? o = t.bool().toString() : o = this.scalar(t, e.K, pt.STRING);
|
|
1444
1444
|
break;
|
|
1445
1445
|
case 2:
|
|
1446
1446
|
switch (e.V.kind) {
|
|
@@ -1460,13 +1460,13 @@ class Ii {
|
|
|
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;
|
|
@@ -1490,11 +1490,11 @@ class Ii {
|
|
|
1490
1490
|
case D.FLOAT:
|
|
1491
1491
|
return e.float();
|
|
1492
1492
|
case D.INT64:
|
|
1493
|
-
return
|
|
1493
|
+
return tt(e.int64(), r);
|
|
1494
1494
|
case D.UINT64:
|
|
1495
|
-
return
|
|
1495
|
+
return tt(e.uint64(), r);
|
|
1496
1496
|
case D.FIXED64:
|
|
1497
|
-
return
|
|
1497
|
+
return tt(e.fixed64(), r);
|
|
1498
1498
|
case D.FIXED32:
|
|
1499
1499
|
return e.fixed32();
|
|
1500
1500
|
case D.BYTES:
|
|
@@ -1504,15 +1504,15 @@ class Ii {
|
|
|
1504
1504
|
case D.SFIXED32:
|
|
1505
1505
|
return e.sfixed32();
|
|
1506
1506
|
case D.SFIXED64:
|
|
1507
|
-
return
|
|
1507
|
+
return tt(e.sfixed64(), r);
|
|
1508
1508
|
case D.SINT32:
|
|
1509
1509
|
return e.sint32();
|
|
1510
1510
|
case D.SINT64:
|
|
1511
|
-
return
|
|
1511
|
+
return tt(e.sint64(), r);
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
1514
|
}
|
|
1515
|
-
class
|
|
1515
|
+
class Li {
|
|
1516
1516
|
constructor(e) {
|
|
1517
1517
|
this.info = e;
|
|
1518
1518
|
}
|
|
@@ -1541,7 +1541,7 @@ class Ti {
|
|
|
1541
1541
|
case "enum":
|
|
1542
1542
|
let l = i.kind == "enum" ? D.INT32 : i.T;
|
|
1543
1543
|
if (c)
|
|
1544
|
-
if (J(Array.isArray(o)), c ==
|
|
1544
|
+
if (J(Array.isArray(o)), c == Cn.PACKED)
|
|
1545
1545
|
this.packed(t, l, i.no, o);
|
|
1546
1546
|
else
|
|
1547
1547
|
for (const u of o)
|
|
@@ -1678,8 +1678,8 @@ class Ti {
|
|
|
1678
1678
|
return [r, n, i || o];
|
|
1679
1679
|
}
|
|
1680
1680
|
}
|
|
1681
|
-
function
|
|
1682
|
-
const e = s.messagePrototype ? Object.create(s.messagePrototype) : Object.defineProperty({},
|
|
1681
|
+
function Ui(s) {
|
|
1682
|
+
const e = s.messagePrototype ? Object.create(s.messagePrototype) : Object.defineProperty({}, Or, { value: s });
|
|
1683
1683
|
for (let t of s.fields) {
|
|
1684
1684
|
let r = t.localName;
|
|
1685
1685
|
if (!t.opt)
|
|
@@ -1690,7 +1690,7 @@ function Li(s) {
|
|
|
1690
1690
|
else
|
|
1691
1691
|
switch (t.kind) {
|
|
1692
1692
|
case "scalar":
|
|
1693
|
-
e[r] =
|
|
1693
|
+
e[r] = jn(t.T, t.L);
|
|
1694
1694
|
break;
|
|
1695
1695
|
case "enum":
|
|
1696
1696
|
e[r] = 0;
|
|
@@ -1702,7 +1702,7 @@ function Li(s) {
|
|
|
1702
1702
|
}
|
|
1703
1703
|
return e;
|
|
1704
1704
|
}
|
|
1705
|
-
function
|
|
1705
|
+
function ye(s, e, t) {
|
|
1706
1706
|
let r, n = t, i;
|
|
1707
1707
|
for (let o of s.fields) {
|
|
1708
1708
|
let a = o.localName;
|
|
@@ -1748,7 +1748,7 @@ function we(s, e, t) {
|
|
|
1748
1748
|
}
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function xi(s, e, t) {
|
|
1752
1752
|
if (e === t)
|
|
1753
1753
|
return !0;
|
|
1754
1754
|
if (!e || !t)
|
|
@@ -1759,24 +1759,24 @@ function Ui(s, e, t) {
|
|
|
1759
1759
|
case "enum":
|
|
1760
1760
|
case "scalar":
|
|
1761
1761
|
let a = r.kind == "enum" ? D.INT32 : r.T;
|
|
1762
|
-
if (!(r.repeat ?
|
|
1762
|
+
if (!(r.repeat ? lr(a, i, o) : Sr(a, i, o)))
|
|
1763
1763
|
return !1;
|
|
1764
1764
|
break;
|
|
1765
1765
|
case "map":
|
|
1766
|
-
if (!(r.V.kind == "message" ?
|
|
1766
|
+
if (!(r.V.kind == "message" ? cr(r.V.T(), un(i), un(o)) : lr(r.V.kind == "enum" ? D.INT32 : r.V.T, un(i), un(o))))
|
|
1767
1767
|
return !1;
|
|
1768
1768
|
break;
|
|
1769
1769
|
case "message":
|
|
1770
1770
|
let c = r.T();
|
|
1771
|
-
if (!(r.repeat ?
|
|
1771
|
+
if (!(r.repeat ? cr(c, i, o) : c.equals(i, o)))
|
|
1772
1772
|
return !1;
|
|
1773
1773
|
break;
|
|
1774
1774
|
}
|
|
1775
1775
|
}
|
|
1776
1776
|
return !0;
|
|
1777
1777
|
}
|
|
1778
|
-
const
|
|
1779
|
-
function
|
|
1778
|
+
const un = Object.values;
|
|
1779
|
+
function Sr(s, e, t) {
|
|
1780
1780
|
if (e === t)
|
|
1781
1781
|
return !0;
|
|
1782
1782
|
if (s !== D.BYTES)
|
|
@@ -1789,15 +1789,15 @@ function Or(s, e, t) {
|
|
|
1789
1789
|
return !1;
|
|
1790
1790
|
return !0;
|
|
1791
1791
|
}
|
|
1792
|
-
function
|
|
1792
|
+
function lr(s, e, t) {
|
|
1793
1793
|
if (e.length !== t.length)
|
|
1794
1794
|
return !1;
|
|
1795
1795
|
for (let r = 0; r < e.length; r++)
|
|
1796
|
-
if (!
|
|
1796
|
+
if (!Sr(s, e[r], t[r]))
|
|
1797
1797
|
return !1;
|
|
1798
1798
|
return !0;
|
|
1799
1799
|
}
|
|
1800
|
-
function
|
|
1800
|
+
function cr(s, e, t) {
|
|
1801
1801
|
if (e.length !== t.length)
|
|
1802
1802
|
return !1;
|
|
1803
1803
|
for (let r = 0; r < e.length; r++)
|
|
@@ -1805,14 +1805,14 @@ function ar(s, e, t) {
|
|
|
1805
1805
|
return !1;
|
|
1806
1806
|
return !0;
|
|
1807
1807
|
}
|
|
1808
|
-
const
|
|
1808
|
+
const _i = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
|
|
1809
1809
|
class Fe {
|
|
1810
1810
|
constructor(e, t, r) {
|
|
1811
|
-
this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(
|
|
1811
|
+
this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(Ai), this.options = r ?? {}, 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
|
-
let t =
|
|
1815
|
-
return e !== void 0 &&
|
|
1814
|
+
let t = Ui(this);
|
|
1815
|
+
return e !== void 0 && ye(this, t, e), t;
|
|
1816
1816
|
}
|
|
1817
1817
|
/**
|
|
1818
1818
|
* Clone the message.
|
|
@@ -1821,7 +1821,7 @@ class Fe {
|
|
|
1821
1821
|
*/
|
|
1822
1822
|
clone(e) {
|
|
1823
1823
|
let t = this.create();
|
|
1824
|
-
return
|
|
1824
|
+
return ye(this, t, e), t;
|
|
1825
1825
|
}
|
|
1826
1826
|
/**
|
|
1827
1827
|
* Determines whether two message of the same type have the same field values.
|
|
@@ -1830,7 +1830,7 @@ class Fe {
|
|
|
1830
1830
|
* Will also return true if both messages are `undefined`.
|
|
1831
1831
|
*/
|
|
1832
1832
|
equals(e, t) {
|
|
1833
|
-
return
|
|
1833
|
+
return xi(this, e, t);
|
|
1834
1834
|
}
|
|
1835
1835
|
/**
|
|
1836
1836
|
* Is the given value assignable to our message type
|
|
@@ -1850,20 +1850,20 @@ class Fe {
|
|
|
1850
1850
|
* Copy partial data into the target message.
|
|
1851
1851
|
*/
|
|
1852
1852
|
mergePartial(e, t) {
|
|
1853
|
-
|
|
1853
|
+
ye(this, e, t);
|
|
1854
1854
|
}
|
|
1855
1855
|
/**
|
|
1856
1856
|
* Create a new message from binary format.
|
|
1857
1857
|
*/
|
|
1858
1858
|
fromBinary(e, t) {
|
|
1859
|
-
let r =
|
|
1859
|
+
let r = hi(t);
|
|
1860
1860
|
return this.internalBinaryRead(r.readerFactory(e), e.byteLength, r);
|
|
1861
1861
|
}
|
|
1862
1862
|
/**
|
|
1863
1863
|
* Read a new message from a JSON value.
|
|
1864
1864
|
*/
|
|
1865
1865
|
fromJson(e, t) {
|
|
1866
|
-
return this.internalJsonRead(e,
|
|
1866
|
+
return this.internalJsonRead(e, Ci(t));
|
|
1867
1867
|
}
|
|
1868
1868
|
/**
|
|
1869
1869
|
* Read a new message from a JSON string.
|
|
@@ -1877,7 +1877,7 @@ class Fe {
|
|
|
1877
1877
|
* Write the message to canonical JSON value.
|
|
1878
1878
|
*/
|
|
1879
1879
|
toJson(e, t) {
|
|
1880
|
-
return this.internalJsonWrite(e,
|
|
1880
|
+
return this.internalJsonWrite(e, Ei(t));
|
|
1881
1881
|
}
|
|
1882
1882
|
/**
|
|
1883
1883
|
* Convert the message to canonical JSON string.
|
|
@@ -1892,7 +1892,7 @@ class Fe {
|
|
|
1892
1892
|
* Write the message to binary format.
|
|
1893
1893
|
*/
|
|
1894
1894
|
toBinary(e, t) {
|
|
1895
|
-
let r =
|
|
1895
|
+
let r = yi(t);
|
|
1896
1896
|
return this.internalBinaryWrite(e, r.writerFactory(), r).finish();
|
|
1897
1897
|
}
|
|
1898
1898
|
/**
|
|
@@ -1908,7 +1908,7 @@ class Fe {
|
|
|
1908
1908
|
let n = r ?? this.create();
|
|
1909
1909
|
return this.refJsonReader.read(e, n, t), n;
|
|
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
|
|
@@ -1942,14 +1942,14 @@ class Fe {
|
|
|
1942
1942
|
return this.refBinReader.read(e, i, r, t), i;
|
|
1943
1943
|
}
|
|
1944
1944
|
}
|
|
1945
|
-
function
|
|
1945
|
+
function Bi(s, e) {
|
|
1946
1946
|
var t, r, n;
|
|
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 = (r = i.options) !== null && r !== void 0 ? r : {}, i.idempotency = (n = i.idempotency) !== null && n !== void 0 ? n : void 0, i;
|
|
1949
1949
|
}
|
|
1950
|
-
class
|
|
1950
|
+
class Gn {
|
|
1951
1951
|
constructor(e, t, r) {
|
|
1952
|
-
this.typeName = e, this.methods = t.map((n) =>
|
|
1952
|
+
this.typeName = e, this.methods = t.map((n) => Bi(n, this)), this.options = r ?? {};
|
|
1953
1953
|
}
|
|
1954
1954
|
}
|
|
1955
1955
|
class se extends Error {
|
|
@@ -1969,22 +1969,22 @@ class se extends Error {
|
|
|
1969
1969
|
`);
|
|
1970
1970
|
}
|
|
1971
1971
|
}
|
|
1972
|
-
function
|
|
1972
|
+
function Oi(s, e) {
|
|
1973
1973
|
if (!e)
|
|
1974
1974
|
return s;
|
|
1975
1975
|
let t = {};
|
|
1976
|
-
|
|
1976
|
+
fn(s, t), fn(e, t);
|
|
1977
1977
|
for (let r of Object.keys(e)) {
|
|
1978
1978
|
let n = e[r];
|
|
1979
1979
|
switch (r) {
|
|
1980
1980
|
case "jsonOptions":
|
|
1981
|
-
t.jsonOptions =
|
|
1981
|
+
t.jsonOptions = vi(s.jsonOptions, t.jsonOptions);
|
|
1982
1982
|
break;
|
|
1983
1983
|
case "binaryOptions":
|
|
1984
|
-
t.binaryOptions =
|
|
1984
|
+
t.binaryOptions = ai(s.binaryOptions, t.binaryOptions);
|
|
1985
1985
|
break;
|
|
1986
1986
|
case "meta":
|
|
1987
|
-
t.meta = {},
|
|
1987
|
+
t.meta = {}, fn(s.meta, t.meta), fn(e.meta, t.meta);
|
|
1988
1988
|
break;
|
|
1989
1989
|
case "interceptors":
|
|
1990
1990
|
t.interceptors = s.interceptors ? s.interceptors.concat(n) : n.concat();
|
|
@@ -1993,7 +1993,7 @@ function Bi(s, e) {
|
|
|
1993
1993
|
}
|
|
1994
1994
|
return t;
|
|
1995
1995
|
}
|
|
1996
|
-
function
|
|
1996
|
+
function fn(s, e) {
|
|
1997
1997
|
if (!s)
|
|
1998
1998
|
return;
|
|
1999
1999
|
let t = e;
|
|
@@ -2004,7 +2004,7 @@ var je;
|
|
|
2004
2004
|
(function(s) {
|
|
2005
2005
|
s[s.PENDING = 0] = "PENDING", s[s.REJECTED = 1] = "REJECTED", s[s.RESOLVED = 2] = "RESOLVED";
|
|
2006
2006
|
})(je || (je = {}));
|
|
2007
|
-
class
|
|
2007
|
+
class kt {
|
|
2008
2008
|
/**
|
|
2009
2009
|
* @param preventUnhandledRejectionWarning - prevents the warning
|
|
2010
2010
|
* "Unhandled Promise rejection" by adding a noop rejection handler.
|
|
@@ -2064,7 +2064,7 @@ class Et {
|
|
|
2064
2064
|
this._state === je.PENDING && this.reject(e);
|
|
2065
2065
|
}
|
|
2066
2066
|
}
|
|
2067
|
-
class
|
|
2067
|
+
class Si {
|
|
2068
2068
|
constructor() {
|
|
2069
2069
|
this._lis = {
|
|
2070
2070
|
nxt: [],
|
|
@@ -2155,7 +2155,7 @@ class Oi {
|
|
|
2155
2155
|
let e = this._itState;
|
|
2156
2156
|
J(e, "bad state"), J(!e.p, "iterator contract broken");
|
|
2157
2157
|
let t = e.q.shift();
|
|
2158
|
-
return t ? "value" in t ? Promise.resolve(t) : Promise.reject(t) : (e.p = new
|
|
2158
|
+
return t ? "value" in t ? Promise.resolve(t) : Promise.reject(t) : (e.p = new kt(), e.p.promise);
|
|
2159
2159
|
}
|
|
2160
2160
|
};
|
|
2161
2161
|
}
|
|
@@ -2171,7 +2171,7 @@ class Oi {
|
|
|
2171
2171
|
t.q.push(e);
|
|
2172
2172
|
}
|
|
2173
2173
|
}
|
|
2174
|
-
var
|
|
2174
|
+
var Ri = function(s, e, t, r) {
|
|
2175
2175
|
function n(i) {
|
|
2176
2176
|
return i instanceof t ? i : new t(function(o) {
|
|
2177
2177
|
o(i);
|
|
@@ -2198,7 +2198,7 @@ var Si = function(s, e, t, r) {
|
|
|
2198
2198
|
h((r = r.apply(s, e || [])).next());
|
|
2199
2199
|
});
|
|
2200
2200
|
};
|
|
2201
|
-
class
|
|
2201
|
+
class Di {
|
|
2202
2202
|
constructor(e, t, r, n, i, o, a) {
|
|
2203
2203
|
this.method = e, this.requestHeaders = t, this.request = r, this.headers = n, this.response = i, this.status = o, this.trailers = a;
|
|
2204
2204
|
}
|
|
@@ -2210,7 +2210,7 @@ class Ri {
|
|
|
2210
2210
|
return this.promiseFinished().then((r) => e ? Promise.resolve(e(r)) : r, (r) => t ? Promise.resolve(t(r)) : Promise.reject(r));
|
|
2211
2211
|
}
|
|
2212
2212
|
promiseFinished() {
|
|
2213
|
-
return
|
|
2213
|
+
return Ri(this, void 0, void 0, function* () {
|
|
2214
2214
|
let [e, t, r, n] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);
|
|
2215
2215
|
return {
|
|
2216
2216
|
method: this.method,
|
|
@@ -2224,7 +2224,7 @@ class Ri {
|
|
|
2224
2224
|
});
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
|
-
var
|
|
2227
|
+
var Mi = function(s, e, t, r) {
|
|
2228
2228
|
function n(i) {
|
|
2229
2229
|
return i instanceof t ? i : new t(function(o) {
|
|
2230
2230
|
o(i);
|
|
@@ -2251,7 +2251,7 @@ var Di = function(s, e, t, r) {
|
|
|
2251
2251
|
h((r = r.apply(s, e || [])).next());
|
|
2252
2252
|
});
|
|
2253
2253
|
};
|
|
2254
|
-
class
|
|
2254
|
+
class Vi {
|
|
2255
2255
|
constructor(e, t, r, n, i, o, a) {
|
|
2256
2256
|
this.method = e, this.requestHeaders = t, this.request = r, this.headers = n, this.responses = i, this.status = o, this.trailers = a;
|
|
2257
2257
|
}
|
|
@@ -2265,7 +2265,7 @@ class Mi {
|
|
|
2265
2265
|
return this.promiseFinished().then((r) => e ? Promise.resolve(e(r)) : r, (r) => t ? Promise.resolve(t(r)) : Promise.reject(r));
|
|
2266
2266
|
}
|
|
2267
2267
|
promiseFinished() {
|
|
2268
|
-
return
|
|
2268
|
+
return Mi(this, void 0, void 0, function* () {
|
|
2269
2269
|
let [e, t, r] = yield Promise.all([this.headers, this.status, this.trailers]);
|
|
2270
2270
|
return {
|
|
2271
2271
|
method: this.method,
|
|
@@ -2278,7 +2278,7 @@ class Mi {
|
|
|
2278
2278
|
});
|
|
2279
2279
|
}
|
|
2280
2280
|
}
|
|
2281
|
-
function
|
|
2281
|
+
function Me(s, e, t, r, n) {
|
|
2282
2282
|
var i;
|
|
2283
2283
|
{
|
|
2284
2284
|
let o = (a, c, h) => e.unary(a, c, h);
|
|
@@ -2293,7 +2293,7 @@ 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
|
-
var
|
|
2296
|
+
var Hi = function(s, e, t, r) {
|
|
2297
2297
|
function n(i) {
|
|
2298
2298
|
return i instanceof t ? i : new t(function(o) {
|
|
2299
2299
|
o(i);
|
|
@@ -2320,7 +2320,7 @@ var Vi = function(s, e, t, r) {
|
|
|
2320
2320
|
h((r = r.apply(s, e || [])).next());
|
|
2321
2321
|
});
|
|
2322
2322
|
};
|
|
2323
|
-
function
|
|
2323
|
+
function dr(s, e, t, r, n) {
|
|
2324
2324
|
if (r)
|
|
2325
2325
|
for (let [i, o] of Object.entries(r))
|
|
2326
2326
|
if (typeof o == "string")
|
|
@@ -2340,14 +2340,14 @@ function lr(s, e, t, r, n) {
|
|
|
2340
2340
|
}
|
|
2341
2341
|
return s;
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2343
|
+
function hr(s, e) {
|
|
2344
2344
|
let t = new Uint8Array(5 + s.length);
|
|
2345
|
-
t[0] =
|
|
2345
|
+
t[0] = nt.DATA;
|
|
2346
2346
|
for (let r = s.length, n = 4; n > 0; n--)
|
|
2347
2347
|
t[n] = r % 256, r >>>= 8;
|
|
2348
|
-
return t.set(s, 5), e === "binary" ? t :
|
|
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 {
|
|
@@ -2360,23 +2360,23 @@ function Wn(s, e, t) {
|
|
|
2360
2360
|
case "opaqueredirect":
|
|
2361
2361
|
throw new se(`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
|
-
let r = s, n = e >= 200 && e < 300, i =
|
|
2366
|
-
return (o === void 0 || o === j.OK) && !n && (o =
|
|
2365
|
+
let r = s, n = e >= 200 && e < 300, i = Dr(r), [o, a] = Rr(r);
|
|
2366
|
+
return (o === void 0 || o === j.OK) && !n && (o = qi(e), a = t), [o, a, i];
|
|
2367
2367
|
}
|
|
2368
|
-
function
|
|
2369
|
-
let e =
|
|
2368
|
+
function ur(s) {
|
|
2369
|
+
let e = Wi(s), [t, r] = Rr(e), n = Dr(e);
|
|
2370
2370
|
return [t ?? j.OK, r, n];
|
|
2371
2371
|
}
|
|
2372
|
-
var
|
|
2372
|
+
var nt;
|
|
2373
2373
|
(function(s) {
|
|
2374
2374
|
s[s.DATA = 0] = "DATA", s[s.TRAILER = 128] = "TRAILER";
|
|
2375
|
-
})(
|
|
2376
|
-
function
|
|
2377
|
-
return
|
|
2378
|
-
let r, n = "", i = new Uint8Array(0), o =
|
|
2379
|
-
if (
|
|
2375
|
+
})(nt || (nt = {}));
|
|
2376
|
+
function fr(s, e, t) {
|
|
2377
|
+
return Hi(this, void 0, void 0, function* () {
|
|
2378
|
+
let r, n = "", i = new Uint8Array(0), o = Pi(e);
|
|
2379
|
+
if ($i(s)) {
|
|
2380
2380
|
let a = s.getReader();
|
|
2381
2381
|
r = {
|
|
2382
2382
|
next: () => a.read()
|
|
@@ -2392,15 +2392,15 @@ function hr(s, e, t) {
|
|
|
2392
2392
|
let c = n.length - n.length % 4;
|
|
2393
2393
|
if (c === 0)
|
|
2394
2394
|
continue;
|
|
2395
|
-
i =
|
|
2395
|
+
i = pr(i, Tr(n.substring(0, c))), n = n.substring(c);
|
|
2396
2396
|
} else
|
|
2397
|
-
i =
|
|
2398
|
-
for (; i.length >= 5 && i[0] ===
|
|
2397
|
+
i = pr(i, a.value);
|
|
2398
|
+
for (; i.length >= 5 && i[0] === nt.DATA; ) {
|
|
2399
2399
|
let c = 0;
|
|
2400
2400
|
for (let h = 1; h < 5; h++)
|
|
2401
2401
|
c = (c << 8) + i[h];
|
|
2402
2402
|
if (i.length - 5 >= c)
|
|
2403
|
-
t(
|
|
2403
|
+
t(nt.DATA, i.subarray(5, 5 + c)), i = i.subarray(5 + c);
|
|
2404
2404
|
else
|
|
2405
2405
|
break;
|
|
2406
2406
|
}
|
|
@@ -2408,20 +2408,20 @@ function hr(s, e, t) {
|
|
|
2408
2408
|
if (a.done) {
|
|
2409
2409
|
if (i.length === 0)
|
|
2410
2410
|
break;
|
|
2411
|
-
if (i[0] !==
|
|
2411
|
+
if (i[0] !== nt.TRAILER || i.length < 5)
|
|
2412
2412
|
throw new se("premature EOF", j[j.DATA_LOSS]);
|
|
2413
|
-
t(
|
|
2413
|
+
t(nt.TRAILER, i.subarray(5));
|
|
2414
2414
|
break;
|
|
2415
2415
|
}
|
|
2416
2416
|
}
|
|
2417
2417
|
});
|
|
2418
2418
|
}
|
|
2419
|
-
const
|
|
2420
|
-
function
|
|
2419
|
+
const $i = (s) => typeof s.getReader == "function";
|
|
2420
|
+
function pr(s, e) {
|
|
2421
2421
|
let t = new Uint8Array(s.length + e.length);
|
|
2422
2422
|
return t.set(s), t.set(e, s.length), t;
|
|
2423
2423
|
}
|
|
2424
|
-
function
|
|
2424
|
+
function Pi(s) {
|
|
2425
2425
|
switch (s) {
|
|
2426
2426
|
case "application/grpc-web-text":
|
|
2427
2427
|
case "application/grpc-web-text+proto":
|
|
@@ -2436,7 +2436,7 @@ function $i(s) {
|
|
|
2436
2436
|
throw new se("unexpected response content type: " + s, j[j.INTERNAL]);
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
2439
|
-
function
|
|
2439
|
+
function Rr(s) {
|
|
2440
2440
|
let e, t, r = s["grpc-message"];
|
|
2441
2441
|
if (r !== void 0) {
|
|
2442
2442
|
if (Array.isArray(r))
|
|
@@ -2452,7 +2452,7 @@ function Sr(s) {
|
|
|
2452
2452
|
}
|
|
2453
2453
|
return [e, t];
|
|
2454
2454
|
}
|
|
2455
|
-
function
|
|
2455
|
+
function Dr(s) {
|
|
2456
2456
|
let e = {};
|
|
2457
2457
|
for (let [t, r] of Object.entries(s))
|
|
2458
2458
|
switch (t) {
|
|
@@ -2465,7 +2465,7 @@ function Rr(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,14 +2479,14 @@ function Pi(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, r) => {
|
|
2485
2485
|
let n = e[r];
|
|
2486
2486
|
typeof n == "string" ? e[r] = [n, t] : Array.isArray(n) ? n.push(t) : e[r] = t;
|
|
2487
2487
|
}), e;
|
|
2488
2488
|
}
|
|
2489
|
-
function
|
|
2489
|
+
function qi(s) {
|
|
2490
2490
|
switch (s) {
|
|
2491
2491
|
case 200:
|
|
2492
2492
|
return j.OK;
|
|
@@ -2518,12 +2518,12 @@ function ji(s) {
|
|
|
2518
2518
|
return j.UNKNOWN;
|
|
2519
2519
|
}
|
|
2520
2520
|
}
|
|
2521
|
-
class
|
|
2521
|
+
class Zi {
|
|
2522
2522
|
constructor(e) {
|
|
2523
2523
|
this.defaultOptions = e;
|
|
2524
2524
|
}
|
|
2525
2525
|
mergeOptions(e) {
|
|
2526
|
-
return
|
|
2526
|
+
return Oi(this.defaultOptions, e);
|
|
2527
2527
|
}
|
|
2528
2528
|
/**
|
|
2529
2529
|
* Create an URI for a gRPC web call.
|
|
@@ -2555,15 +2555,15 @@ class qi {
|
|
|
2555
2555
|
}
|
|
2556
2556
|
serverStreaming(e, t, r) {
|
|
2557
2557
|
var n, i, o, a;
|
|
2558
|
-
let c = r, h = (n = c.format) !== null && n !== void 0 ? n : "text", l = (i = c.fetchInit) !== null && i !== void 0 ? i : {}, u = this.makeUrl(e, c), d = e.I.toBinary(t, c.binaryOptions), f = new
|
|
2558
|
+
let c = r, h = (n = c.format) !== null && n !== void 0 ? n : "text", l = (i = c.fetchInit) !== null && i !== void 0 ? i : {}, u = this.makeUrl(e, c), d = e.I.toBinary(t, c.binaryOptions), f = new kt(), y = new Si(), N = !0, T, C = new kt(), R, O = new kt();
|
|
2559
2559
|
return globalThis.fetch(u, Object.assign(Object.assign({}, l), {
|
|
2560
2560
|
method: "POST",
|
|
2561
|
-
headers:
|
|
2562
|
-
body:
|
|
2561
|
+
headers: dr(new globalThis.Headers(), h, c.timeout, c.meta),
|
|
2562
|
+
body: hr(d, h),
|
|
2563
2563
|
signal: (o = r.abort) !== null && o !== void 0 ? o : null
|
|
2564
2564
|
// node-fetch@3.0.0-beta.9 rejects `undefined`
|
|
2565
2565
|
})).then((A) => {
|
|
2566
|
-
let [U, b, B] =
|
|
2566
|
+
let [U, b, B] = qn(A);
|
|
2567
2567
|
if (f.resolve(B), U != null && U !== j.OK)
|
|
2568
2568
|
throw new se(b ?? j[U], j[U], B);
|
|
2569
2569
|
return U != null && (T = {
|
|
@@ -2573,14 +2573,14 @@ class qi {
|
|
|
2573
2573
|
}).then((A) => {
|
|
2574
2574
|
if (!A.body)
|
|
2575
2575
|
throw new se("missing response body", j[j.INTERNAL]);
|
|
2576
|
-
return
|
|
2576
|
+
return fr(A.body, A.headers.get("content-type"), (U, b) => {
|
|
2577
2577
|
switch (U) {
|
|
2578
|
-
case
|
|
2578
|
+
case nt.DATA:
|
|
2579
2579
|
y.notifyMessage(e.O.fromBinary(b, c.binaryOptions)), N = !1;
|
|
2580
2580
|
break;
|
|
2581
|
-
case
|
|
2581
|
+
case nt.TRAILER:
|
|
2582
2582
|
let B, m;
|
|
2583
|
-
[B, m, R] =
|
|
2583
|
+
[B, m, R] = ur(b), T = {
|
|
2584
2584
|
code: j[B],
|
|
2585
2585
|
detail: m ?? j[B]
|
|
2586
2586
|
};
|
|
@@ -2598,19 +2598,19 @@ class qi {
|
|
|
2598
2598
|
}).catch((A) => {
|
|
2599
2599
|
let U;
|
|
2600
2600
|
A instanceof se ? U = A : A instanceof Error && A.name === "AbortError" ? U = new se(A.message, j[j.CANCELLED]) : U = new se(A instanceof Error ? A.message : "" + A, j[j.INTERNAL]), U.methodName = e.name, U.serviceName = e.service.typeName, f.rejectPending(U), y.notifyError(U), C.rejectPending(U), O.rejectPending(U);
|
|
2601
|
-
}), new
|
|
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, r) {
|
|
2604
2604
|
var n, i, o, a;
|
|
2605
|
-
let c = r, h = (n = c.format) !== null && n !== void 0 ? n : "text", l = (i = c.fetchInit) !== null && i !== void 0 ? i : {}, u = this.makeUrl(e, c), d = e.I.toBinary(t, c.binaryOptions), f = new
|
|
2605
|
+
let c = r, h = (n = c.format) !== null && n !== void 0 ? n : "text", l = (i = c.fetchInit) !== null && i !== void 0 ? i : {}, u = this.makeUrl(e, c), d = e.I.toBinary(t, c.binaryOptions), f = new kt(), y, N = new kt(), T, C = new kt(), R, O = new kt();
|
|
2606
2606
|
return globalThis.fetch(u, Object.assign(Object.assign({}, l), {
|
|
2607
2607
|
method: "POST",
|
|
2608
|
-
headers:
|
|
2609
|
-
body:
|
|
2608
|
+
headers: dr(new globalThis.Headers(), h, c.timeout, c.meta),
|
|
2609
|
+
body: hr(d, h),
|
|
2610
2610
|
signal: (o = r.abort) !== null && o !== void 0 ? o : null
|
|
2611
2611
|
// node-fetch@3.0.0-beta.9 rejects `undefined`
|
|
2612
2612
|
})).then((A) => {
|
|
2613
|
-
let [U, b, B] =
|
|
2613
|
+
let [U, b, B] = qn(A);
|
|
2614
2614
|
if (f.resolve(B), U != null && U !== j.OK)
|
|
2615
2615
|
throw new se(b ?? j[U], j[U], B);
|
|
2616
2616
|
return U != null && (T = {
|
|
@@ -2620,16 +2620,16 @@ class qi {
|
|
|
2620
2620
|
}).then((A) => {
|
|
2621
2621
|
if (!A.body)
|
|
2622
2622
|
throw new se("missing response body", j[j.INTERNAL]);
|
|
2623
|
-
return
|
|
2623
|
+
return fr(A.body, A.headers.get("content-type"), (U, b) => {
|
|
2624
2624
|
switch (U) {
|
|
2625
|
-
case
|
|
2625
|
+
case nt.DATA:
|
|
2626
2626
|
if (y)
|
|
2627
2627
|
throw new se("unary call received 2nd message", j[j.DATA_LOSS]);
|
|
2628
2628
|
y = e.O.fromBinary(b, c.binaryOptions);
|
|
2629
2629
|
break;
|
|
2630
|
-
case
|
|
2630
|
+
case nt.TRAILER:
|
|
2631
2631
|
let B, m;
|
|
2632
|
-
[B, m, R] =
|
|
2632
|
+
[B, m, R] = ur(b), T = {
|
|
2633
2633
|
code: j[B],
|
|
2634
2634
|
detail: m ?? j[B]
|
|
2635
2635
|
};
|
|
@@ -2651,11 +2651,11 @@ class qi {
|
|
|
2651
2651
|
}).catch((A) => {
|
|
2652
2652
|
let U;
|
|
2653
2653
|
A instanceof se ? U = A : A instanceof Error && A.name === "AbortError" ? U = new se(A.message, j[j.CANCELLED]) : U = new se(A instanceof Error ? A.message : "" + A, j[j.INTERNAL]), U.methodName = e.name, U.serviceName = e.service.typeName, f.rejectPending(U), N.rejectPending(U), C.rejectPending(U), O.rejectPending(U);
|
|
2654
|
-
}), new
|
|
2654
|
+
}), new Di(e, (a = c.meta) !== null && a !== void 0 ? a : {}, t, f.promise, N.promise, C.promise, O.promise);
|
|
2655
2655
|
}
|
|
2656
2656
|
}
|
|
2657
|
-
var
|
|
2658
|
-
class
|
|
2657
|
+
var Tn = /* @__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))(Tn || {});
|
|
2658
|
+
class Ki extends Fe {
|
|
2659
2659
|
constructor() {
|
|
2660
2660
|
super("com.hamropatro.grpc.common.SearchRequest", [
|
|
2661
2661
|
{
|
|
@@ -2683,7 +2683,7 @@ class Zi extends Fe {
|
|
|
2683
2683
|
}
|
|
2684
2684
|
create(e) {
|
|
2685
2685
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2686
|
-
return t.searchValue = "", t.cursor = "", t.limit = 0, e !== void 0 &&
|
|
2686
|
+
return t.searchValue = "", t.cursor = "", t.limit = 0, e !== void 0 && ye(this, t, e), t;
|
|
2687
2687
|
}
|
|
2688
2688
|
internalBinaryRead(e, t, r, n) {
|
|
2689
2689
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -2718,11 +2718,11 @@ class Zi extends Fe {
|
|
|
2718
2718
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
2719
2719
|
}
|
|
2720
2720
|
}
|
|
2721
|
-
const
|
|
2722
|
-
class
|
|
2721
|
+
const Mr = new Ki();
|
|
2722
|
+
class zi extends Fe {
|
|
2723
2723
|
constructor() {
|
|
2724
2724
|
super("com.hamropatro.grpc.common.SearchResult", [
|
|
2725
|
-
{ no: 1, name: "items", kind: "message", repeat: 1, T: () =>
|
|
2725
|
+
{ no: 1, name: "items", kind: "message", repeat: 1, T: () => rt },
|
|
2726
2726
|
{
|
|
2727
2727
|
no: 2,
|
|
2728
2728
|
name: "next_page_cursor",
|
|
@@ -2734,7 +2734,7 @@ class Ki extends Fe {
|
|
|
2734
2734
|
}
|
|
2735
2735
|
create(e) {
|
|
2736
2736
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2737
|
-
return t.items = [], t.nextPageCursor = "", e !== void 0 &&
|
|
2737
|
+
return t.items = [], t.nextPageCursor = "", e !== void 0 && ye(this, t, e), t;
|
|
2738
2738
|
}
|
|
2739
2739
|
internalBinaryRead(e, t, r, n) {
|
|
2740
2740
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -2743,7 +2743,7 @@ class Ki extends Fe {
|
|
|
2743
2743
|
switch (a) {
|
|
2744
2744
|
case /* repeated com.hamropatro.grpc.common.File items */
|
|
2745
2745
|
1:
|
|
2746
|
-
i.items.push(
|
|
2746
|
+
i.items.push(rt.internalBinaryRead(e, e.uint32(), r));
|
|
2747
2747
|
break;
|
|
2748
2748
|
case /* string next_page_cursor */
|
|
2749
2749
|
2:
|
|
@@ -2761,14 +2761,14 @@ class Ki extends Fe {
|
|
|
2761
2761
|
}
|
|
2762
2762
|
internalBinaryWrite(e, t, r) {
|
|
2763
2763
|
for (let i = 0; i < e.items.length; i++)
|
|
2764
|
-
|
|
2764
|
+
rt.internalBinaryWrite(e.items[i], t.tag(1, W.LengthDelimited).fork(), r).join();
|
|
2765
2765
|
e.nextPageCursor !== "" && t.tag(2, W.LengthDelimited).string(e.nextPageCursor);
|
|
2766
2766
|
let n = r.writeUnknownFields;
|
|
2767
2767
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
2768
2768
|
}
|
|
2769
2769
|
}
|
|
2770
|
-
const
|
|
2771
|
-
class
|
|
2770
|
+
const Xi = new zi();
|
|
2771
|
+
class Gi extends Fe {
|
|
2772
2772
|
constructor() {
|
|
2773
2773
|
super("com.hamropatro.grpc.common.CreateFileRequest", [
|
|
2774
2774
|
{
|
|
@@ -2799,7 +2799,7 @@ class Xi extends Fe {
|
|
|
2799
2799
|
T: 9
|
|
2800
2800
|
/*ScalarType.STRING*/
|
|
2801
2801
|
},
|
|
2802
|
-
{ no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType",
|
|
2802
|
+
{ no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType", Tn] },
|
|
2803
2803
|
{
|
|
2804
2804
|
no: 6,
|
|
2805
2805
|
name: "extension",
|
|
@@ -2811,7 +2811,7 @@ class Xi extends Fe {
|
|
|
2811
2811
|
}
|
|
2812
2812
|
create(e) {
|
|
2813
2813
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2814
|
-
return t.name = "", t.folderName = "", t.nestedFolderName = "", t.url = "", t.type = 0, t.extension = "", e !== void 0 &&
|
|
2814
|
+
return t.name = "", t.folderName = "", t.nestedFolderName = "", t.url = "", t.type = 0, t.extension = "", e !== void 0 && ye(this, t, e), t;
|
|
2815
2815
|
}
|
|
2816
2816
|
internalBinaryRead(e, t, r, n) {
|
|
2817
2817
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -2858,8 +2858,8 @@ class Xi extends Fe {
|
|
|
2858
2858
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
2859
2859
|
}
|
|
2860
2860
|
}
|
|
2861
|
-
const
|
|
2862
|
-
class
|
|
2861
|
+
const Vr = new Gi();
|
|
2862
|
+
class Ji extends Fe {
|
|
2863
2863
|
constructor() {
|
|
2864
2864
|
super("com.hamropatro.grpc.common.CreateUserFileRequest", [
|
|
2865
2865
|
{
|
|
@@ -2869,7 +2869,7 @@ class Gi extends Fe {
|
|
|
2869
2869
|
T: 9
|
|
2870
2870
|
/*ScalarType.STRING*/
|
|
2871
2871
|
},
|
|
2872
|
-
{ no: 2, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType",
|
|
2872
|
+
{ no: 2, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType", Tn] },
|
|
2873
2873
|
{
|
|
2874
2874
|
no: 3,
|
|
2875
2875
|
name: "extension",
|
|
@@ -2881,7 +2881,7 @@ class Gi extends Fe {
|
|
|
2881
2881
|
}
|
|
2882
2882
|
create(e) {
|
|
2883
2883
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2884
|
-
return t.url = "", t.type = 0, t.extension = "", e !== void 0 &&
|
|
2884
|
+
return t.url = "", t.type = 0, t.extension = "", e !== void 0 && ye(this, t, e), t;
|
|
2885
2885
|
}
|
|
2886
2886
|
internalBinaryRead(e, t, r, n) {
|
|
2887
2887
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -2916,8 +2916,8 @@ class Gi extends Fe {
|
|
|
2916
2916
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
2917
2917
|
}
|
|
2918
2918
|
}
|
|
2919
|
-
const
|
|
2920
|
-
class
|
|
2919
|
+
const Jn = new Ji();
|
|
2920
|
+
class Qi extends Fe {
|
|
2921
2921
|
constructor() {
|
|
2922
2922
|
super("com.hamropatro.grpc.common.File", [
|
|
2923
2923
|
{
|
|
@@ -2969,13 +2969,13 @@ class Ji extends Fe {
|
|
|
2969
2969
|
T: 9
|
|
2970
2970
|
/*ScalarType.STRING*/
|
|
2971
2971
|
},
|
|
2972
|
-
{ no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType",
|
|
2973
|
-
{ no: 9, name: "metadata", kind: "message", T: () =>
|
|
2972
|
+
{ no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.common.FileType", Tn] },
|
|
2973
|
+
{ no: 9, name: "metadata", kind: "message", T: () => _n }
|
|
2974
2974
|
]);
|
|
2975
2975
|
}
|
|
2976
2976
|
create(e) {
|
|
2977
2977
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2978
|
-
return t.key = "", t.name = "", t.folderName = "", t.nestedFolderName = "", t.url = "", t.thumborUrl = "", t.proxyUrl = "", t.type = 0, e !== void 0 &&
|
|
2978
|
+
return t.key = "", t.name = "", t.folderName = "", t.nestedFolderName = "", t.url = "", t.thumborUrl = "", t.proxyUrl = "", t.type = 0, e !== void 0 && ye(this, t, e), t;
|
|
2979
2979
|
}
|
|
2980
2980
|
internalBinaryRead(e, t, r, n) {
|
|
2981
2981
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -3016,7 +3016,7 @@ class Ji extends Fe {
|
|
|
3016
3016
|
break;
|
|
3017
3017
|
case /* com.hamropatro.grpc.common.FileMetadata metadata */
|
|
3018
3018
|
9:
|
|
3019
|
-
i.metadata =
|
|
3019
|
+
i.metadata = _n.internalBinaryRead(e, e.uint32(), r, i.metadata);
|
|
3020
3020
|
break;
|
|
3021
3021
|
default:
|
|
3022
3022
|
let h = r.readUnknownField;
|
|
@@ -3029,13 +3029,13 @@ class Ji extends Fe {
|
|
|
3029
3029
|
return i;
|
|
3030
3030
|
}
|
|
3031
3031
|
internalBinaryWrite(e, t, r) {
|
|
3032
|
-
e.key !== "" && t.tag(1, W.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, W.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(3, W.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(4, W.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(5, W.LengthDelimited).string(e.url), e.thumborUrl !== "" && t.tag(6, W.LengthDelimited).string(e.thumborUrl), e.proxyUrl !== "" && t.tag(7, W.LengthDelimited).string(e.proxyUrl), e.type !== 0 && t.tag(8, W.Varint).int32(e.type), e.metadata &&
|
|
3032
|
+
e.key !== "" && t.tag(1, W.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, W.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(3, W.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(4, W.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(5, W.LengthDelimited).string(e.url), e.thumborUrl !== "" && t.tag(6, W.LengthDelimited).string(e.thumborUrl), e.proxyUrl !== "" && t.tag(7, W.LengthDelimited).string(e.proxyUrl), e.type !== 0 && t.tag(8, W.Varint).int32(e.type), e.metadata && _n.internalBinaryWrite(e.metadata, t.tag(9, W.LengthDelimited).fork(), r).join();
|
|
3033
3033
|
let n = r.writeUnknownFields;
|
|
3034
3034
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
3035
3035
|
}
|
|
3036
3036
|
}
|
|
3037
|
-
const
|
|
3038
|
-
class
|
|
3037
|
+
const rt = new Qi();
|
|
3038
|
+
class Yi extends Fe {
|
|
3039
3039
|
constructor() {
|
|
3040
3040
|
super("com.hamropatro.grpc.common.FileMetadata", [
|
|
3041
3041
|
{
|
|
@@ -3070,7 +3070,7 @@ class Qi extends Fe {
|
|
|
3070
3070
|
}
|
|
3071
3071
|
create(e) {
|
|
3072
3072
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3073
|
-
return t.height = 0, t.width = 0, t.backgroundColor = "", t.aspectRatio = 0, e !== void 0 &&
|
|
3073
|
+
return t.height = 0, t.width = 0, t.backgroundColor = "", t.aspectRatio = 0, e !== void 0 && ye(this, t, e), t;
|
|
3074
3074
|
}
|
|
3075
3075
|
internalBinaryRead(e, t, r, n) {
|
|
3076
3076
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -3109,8 +3109,8 @@ class Qi extends Fe {
|
|
|
3109
3109
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
3110
3110
|
}
|
|
3111
3111
|
}
|
|
3112
|
-
const
|
|
3113
|
-
class
|
|
3112
|
+
const _n = new Yi();
|
|
3113
|
+
class es extends Fe {
|
|
3114
3114
|
constructor() {
|
|
3115
3115
|
super("com.hamropatro.grpc.common.DeleteFileRequest", [
|
|
3116
3116
|
{
|
|
@@ -3124,7 +3124,7 @@ class Yi extends Fe {
|
|
|
3124
3124
|
}
|
|
3125
3125
|
create(e) {
|
|
3126
3126
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3127
|
-
return t.key = "", e !== void 0 &&
|
|
3127
|
+
return t.key = "", e !== void 0 && ye(this, t, e), t;
|
|
3128
3128
|
}
|
|
3129
3129
|
internalBinaryRead(e, t, r, n) {
|
|
3130
3130
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -3151,8 +3151,8 @@ class Yi extends Fe {
|
|
|
3151
3151
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
3152
3152
|
}
|
|
3153
3153
|
}
|
|
3154
|
-
const
|
|
3155
|
-
class
|
|
3154
|
+
const Hr = new es();
|
|
3155
|
+
class ts extends Fe {
|
|
3156
3156
|
constructor() {
|
|
3157
3157
|
super("com.hamropatro.grpc.common.DeleteFileResponse", [
|
|
3158
3158
|
{
|
|
@@ -3166,7 +3166,7 @@ class es extends Fe {
|
|
|
3166
3166
|
}
|
|
3167
3167
|
create(e) {
|
|
3168
3168
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3169
|
-
return t.isDeleted = !1, e !== void 0 &&
|
|
3169
|
+
return t.isDeleted = !1, e !== void 0 && ye(this, t, e), t;
|
|
3170
3170
|
}
|
|
3171
3171
|
internalBinaryRead(e, t, r, n) {
|
|
3172
3172
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -3193,8 +3193,8 @@ class es extends Fe {
|
|
|
3193
3193
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
3194
3194
|
}
|
|
3195
3195
|
}
|
|
3196
|
-
const
|
|
3197
|
-
class
|
|
3196
|
+
const ns = new ts();
|
|
3197
|
+
class rs extends Fe {
|
|
3198
3198
|
constructor() {
|
|
3199
3199
|
super("com.hamropatro.grpc.common.GetFilesByFolderRequest", [
|
|
3200
3200
|
{
|
|
@@ -3222,7 +3222,7 @@ class ns extends Fe {
|
|
|
3222
3222
|
}
|
|
3223
3223
|
create(e) {
|
|
3224
3224
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3225
|
-
return t.folderName = "", t.cursor = "", t.limit = 0, e !== void 0 &&
|
|
3225
|
+
return t.folderName = "", t.cursor = "", t.limit = 0, e !== void 0 && ye(this, t, e), t;
|
|
3226
3226
|
}
|
|
3227
3227
|
internalBinaryRead(e, t, r, n) {
|
|
3228
3228
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -3257,11 +3257,11 @@ class ns extends Fe {
|
|
|
3257
3257
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
3258
3258
|
}
|
|
3259
3259
|
}
|
|
3260
|
-
const
|
|
3261
|
-
class
|
|
3260
|
+
const $r = new rs();
|
|
3261
|
+
class is extends Fe {
|
|
3262
3262
|
constructor() {
|
|
3263
3263
|
super("com.hamropatro.grpc.common.GetFilesByFolderResponse", [
|
|
3264
|
-
{ no: 1, name: "files", kind: "message", repeat: 1, T: () =>
|
|
3264
|
+
{ no: 1, name: "files", kind: "message", repeat: 1, T: () => rt },
|
|
3265
3265
|
{
|
|
3266
3266
|
no: 2,
|
|
3267
3267
|
name: "next_cursor",
|
|
@@ -3280,7 +3280,7 @@ class rs extends Fe {
|
|
|
3280
3280
|
}
|
|
3281
3281
|
create(e) {
|
|
3282
3282
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3283
|
-
return t.files = [], t.nextCursor = "", t.hasMore = !1, e !== void 0 &&
|
|
3283
|
+
return t.files = [], t.nextCursor = "", t.hasMore = !1, e !== void 0 && ye(this, t, e), t;
|
|
3284
3284
|
}
|
|
3285
3285
|
internalBinaryRead(e, t, r, n) {
|
|
3286
3286
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -3289,7 +3289,7 @@ class rs extends Fe {
|
|
|
3289
3289
|
switch (a) {
|
|
3290
3290
|
case /* repeated com.hamropatro.grpc.common.File files */
|
|
3291
3291
|
1:
|
|
3292
|
-
i.files.push(
|
|
3292
|
+
i.files.push(rt.internalBinaryRead(e, e.uint32(), r));
|
|
3293
3293
|
break;
|
|
3294
3294
|
case /* string next_cursor */
|
|
3295
3295
|
2:
|
|
@@ -3311,25 +3311,25 @@ class rs extends Fe {
|
|
|
3311
3311
|
}
|
|
3312
3312
|
internalBinaryWrite(e, t, r) {
|
|
3313
3313
|
for (let i = 0; i < e.files.length; i++)
|
|
3314
|
-
|
|
3314
|
+
rt.internalBinaryWrite(e.files[i], t.tag(1, W.LengthDelimited).fork(), r).join();
|
|
3315
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 n = r.writeUnknownFields;
|
|
3317
3317
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
3318
3318
|
}
|
|
3319
3319
|
}
|
|
3320
|
-
const
|
|
3321
|
-
{ name: "createFile", options: {}, I:
|
|
3322
|
-
{ name: "updateFile", options: {}, I:
|
|
3323
|
-
{ name: "deleteFile", options: {}, I:
|
|
3324
|
-
{ name: "getFilesByFolder", options: {}, I:
|
|
3325
|
-
{ name: "createUserFile", options: {}, I:
|
|
3326
|
-
{ name: "search", options: {}, I:
|
|
3320
|
+
const ss = new is(), Bn = new Gn("com.hamropatro.grpc.common.FileService", [
|
|
3321
|
+
{ name: "createFile", options: {}, I: Vr, O: rt },
|
|
3322
|
+
{ name: "updateFile", options: {}, I: rt, O: rt },
|
|
3323
|
+
{ name: "deleteFile", options: {}, I: Hr, O: ns },
|
|
3324
|
+
{ name: "getFilesByFolder", options: {}, I: $r, O: ss },
|
|
3325
|
+
{ name: "createUserFile", options: {}, I: Jn, O: rt },
|
|
3326
|
+
{ name: "search", options: {}, I: Mr, O: Xi }
|
|
3327
3327
|
]);
|
|
3328
|
-
class
|
|
3328
|
+
class Dt {
|
|
3329
3329
|
constructor(e) {
|
|
3330
|
-
he(this, "typeName",
|
|
3331
|
-
he(this, "methods",
|
|
3332
|
-
he(this, "options",
|
|
3330
|
+
he(this, "typeName", Bn.typeName);
|
|
3331
|
+
he(this, "methods", Bn.methods);
|
|
3332
|
+
he(this, "options", Bn.options);
|
|
3333
3333
|
this._transport = e;
|
|
3334
3334
|
}
|
|
3335
3335
|
/**
|
|
@@ -3337,28 +3337,28 @@ class Rt {
|
|
|
3337
3337
|
*/
|
|
3338
3338
|
createFile(e, t) {
|
|
3339
3339
|
const r = this.methods[0], n = this._transport.mergeOptions(t);
|
|
3340
|
-
return
|
|
3340
|
+
return Me("unary", this._transport, r, n, e);
|
|
3341
3341
|
}
|
|
3342
3342
|
/**
|
|
3343
3343
|
* @generated from protobuf rpc: updateFile(com.hamropatro.grpc.common.File) returns (com.hamropatro.grpc.common.File);
|
|
3344
3344
|
*/
|
|
3345
3345
|
updateFile(e, t) {
|
|
3346
3346
|
const r = this.methods[1], n = this._transport.mergeOptions(t);
|
|
3347
|
-
return
|
|
3347
|
+
return Me("unary", this._transport, r, n, e);
|
|
3348
3348
|
}
|
|
3349
3349
|
/**
|
|
3350
3350
|
* @generated from protobuf rpc: deleteFile(com.hamropatro.grpc.common.DeleteFileRequest) returns (com.hamropatro.grpc.common.DeleteFileResponse);
|
|
3351
3351
|
*/
|
|
3352
3352
|
deleteFile(e, t) {
|
|
3353
3353
|
const r = this.methods[2], n = this._transport.mergeOptions(t);
|
|
3354
|
-
return
|
|
3354
|
+
return Me("unary", this._transport, r, n, e);
|
|
3355
3355
|
}
|
|
3356
3356
|
/**
|
|
3357
3357
|
* @generated from protobuf rpc: getFilesByFolder(com.hamropatro.grpc.common.GetFilesByFolderRequest) returns (com.hamropatro.grpc.common.GetFilesByFolderResponse);
|
|
3358
3358
|
*/
|
|
3359
3359
|
getFilesByFolder(e, t) {
|
|
3360
3360
|
const r = this.methods[3], n = this._transport.mergeOptions(t);
|
|
3361
|
-
return
|
|
3361
|
+
return Me("unary", this._transport, r, n, e);
|
|
3362
3362
|
}
|
|
3363
3363
|
/**
|
|
3364
3364
|
* user sepecific file
|
|
@@ -3367,20 +3367,20 @@ class Rt {
|
|
|
3367
3367
|
*/
|
|
3368
3368
|
createUserFile(e, t) {
|
|
3369
3369
|
const r = this.methods[4], n = this._transport.mergeOptions(t);
|
|
3370
|
-
return
|
|
3370
|
+
return Me("unary", this._transport, r, n, e);
|
|
3371
3371
|
}
|
|
3372
3372
|
/**
|
|
3373
3373
|
* @generated from protobuf rpc: search(com.hamropatro.grpc.common.SearchRequest) returns (com.hamropatro.grpc.common.SearchResult);
|
|
3374
3374
|
*/
|
|
3375
3375
|
search(e, t) {
|
|
3376
3376
|
const r = this.methods[5], n = this._transport.mergeOptions(t);
|
|
3377
|
-
return
|
|
3377
|
+
return Me("unary", this._transport, r, n, e);
|
|
3378
3378
|
}
|
|
3379
3379
|
}
|
|
3380
|
-
const
|
|
3380
|
+
const os = async (s, e, t, r, n, i) => {
|
|
3381
3381
|
var o;
|
|
3382
3382
|
try {
|
|
3383
|
-
const a = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, c = new
|
|
3383
|
+
const a = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, c = new Dt(a), h = Vr.create();
|
|
3384
3384
|
return h.name = s, h.nestedFolderName = e, h.url = t, h.type = r, h.folderName = n, await c.createFile(
|
|
3385
3385
|
h,
|
|
3386
3386
|
i
|
|
@@ -3388,10 +3388,10 @@ const ss = async (s, e, t, r, n, i) => {
|
|
|
3388
3388
|
} catch (a) {
|
|
3389
3389
|
throw a;
|
|
3390
3390
|
}
|
|
3391
|
-
},
|
|
3391
|
+
}, as = async (s, e, t) => {
|
|
3392
3392
|
var r;
|
|
3393
3393
|
try {
|
|
3394
|
-
const n = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, i = new
|
|
3394
|
+
const n = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, i = new Dt(n), o = Jn.create();
|
|
3395
3395
|
return o.url = s, o.type = e, await i.createUserFile(
|
|
3396
3396
|
o,
|
|
3397
3397
|
t
|
|
@@ -3399,10 +3399,10 @@ const ss = async (s, e, t, r, n, i) => {
|
|
|
3399
3399
|
} catch (n) {
|
|
3400
3400
|
throw n;
|
|
3401
3401
|
}
|
|
3402
|
-
},
|
|
3402
|
+
}, ls = async (s, e, t) => {
|
|
3403
3403
|
var r, n;
|
|
3404
3404
|
try {
|
|
3405
|
-
const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = (n = window.ImageSalonSDK) == null ? void 0 : n.mode, a = new
|
|
3405
|
+
const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = (n = window.ImageSalonSDK) == null ? void 0 : n.mode, a = new Dt(i), c = Jn.create();
|
|
3406
3406
|
return c.url = s, c.type = e, await a.createUserFile(
|
|
3407
3407
|
c,
|
|
3408
3408
|
{
|
|
@@ -3415,10 +3415,10 @@ const ss = async (s, e, t, r, n, i) => {
|
|
|
3415
3415
|
} catch (i) {
|
|
3416
3416
|
throw i;
|
|
3417
3417
|
}
|
|
3418
|
-
},
|
|
3418
|
+
}, cs = async (s, e, t, r) => {
|
|
3419
3419
|
var n;
|
|
3420
3420
|
try {
|
|
3421
|
-
const i = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, o = new
|
|
3421
|
+
const i = (n = window.ImageSalonSDK) == null ? void 0 : n.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
|
r
|
|
@@ -3426,10 +3426,10 @@ const ss = async (s, e, t, r, n, i) => {
|
|
|
3426
3426
|
} catch (i) {
|
|
3427
3427
|
throw i;
|
|
3428
3428
|
}
|
|
3429
|
-
},
|
|
3429
|
+
}, ds = async (s, e, t = 20, r) => {
|
|
3430
3430
|
var n;
|
|
3431
3431
|
try {
|
|
3432
|
-
const i = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, o = new
|
|
3432
|
+
const i = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, o = new Dt(i), a = Mr.create();
|
|
3433
3433
|
return a.searchValue = s, a.cursor = e, a.limit = t, await o.search(
|
|
3434
3434
|
a,
|
|
3435
3435
|
r
|
|
@@ -3437,10 +3437,10 @@ const ss = async (s, e, t, r, n, i) => {
|
|
|
3437
3437
|
} catch (i) {
|
|
3438
3438
|
throw i;
|
|
3439
3439
|
}
|
|
3440
|
-
},
|
|
3440
|
+
}, hs = async (s, e, t, r, n, i, o, a, c) => {
|
|
3441
3441
|
var h;
|
|
3442
3442
|
try {
|
|
3443
|
-
const l = (h = window.ImageSalonSDK) == null ? void 0 : h.grpcConfig, u = new
|
|
3443
|
+
const l = (h = window.ImageSalonSDK) == null ? void 0 : h.grpcConfig, u = new Dt(l), d = rt.create();
|
|
3444
3444
|
return d.key = s, d.name = e, d.nestedFolderName = t, d.url = r, d.thumborUrl = n, d.proxyUrl = i, d.type = o, d.folderName = a, await u.updateFile(
|
|
3445
3445
|
d,
|
|
3446
3446
|
c
|
|
@@ -3448,10 +3448,10 @@ const ss = async (s, e, t, r, n, i) => {
|
|
|
3448
3448
|
} catch (l) {
|
|
3449
3449
|
throw l;
|
|
3450
3450
|
}
|
|
3451
|
-
},
|
|
3451
|
+
}, us = async (s, e) => {
|
|
3452
3452
|
var t;
|
|
3453
3453
|
try {
|
|
3454
|
-
const r = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, n = new
|
|
3454
|
+
const r = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, n = new Dt(r), i = Hr.create();
|
|
3455
3455
|
return i.key = s, await n.deleteFile(
|
|
3456
3456
|
i,
|
|
3457
3457
|
e
|
|
@@ -3460,7 +3460,7 @@ const ss = async (s, e, t, r, n, i) => {
|
|
|
3460
3460
|
throw r;
|
|
3461
3461
|
}
|
|
3462
3462
|
};
|
|
3463
|
-
class
|
|
3463
|
+
class fs extends Fe {
|
|
3464
3464
|
constructor() {
|
|
3465
3465
|
super("com.hamropatro.grpc.common.DeleteFolderRequest", [
|
|
3466
3466
|
{
|
|
@@ -3474,7 +3474,7 @@ class us extends Fe {
|
|
|
3474
3474
|
}
|
|
3475
3475
|
create(e) {
|
|
3476
3476
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3477
|
-
return t.key = "", e !== void 0 &&
|
|
3477
|
+
return t.key = "", e !== void 0 && ye(this, t, e), t;
|
|
3478
3478
|
}
|
|
3479
3479
|
internalBinaryRead(e, t, r, n) {
|
|
3480
3480
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -3501,8 +3501,8 @@ class us extends Fe {
|
|
|
3501
3501
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
3502
3502
|
}
|
|
3503
3503
|
}
|
|
3504
|
-
const
|
|
3505
|
-
class
|
|
3504
|
+
const Pr = new fs();
|
|
3505
|
+
class ps extends Fe {
|
|
3506
3506
|
constructor() {
|
|
3507
3507
|
super("com.hamropatro.grpc.common.CreateFolderRequest", [
|
|
3508
3508
|
{
|
|
@@ -3537,7 +3537,7 @@ class fs extends Fe {
|
|
|
3537
3537
|
}
|
|
3538
3538
|
create(e) {
|
|
3539
3539
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3540
|
-
return t.name = "", t.nestedFolderName = "", t.createdBy = "", t.forUser = !1, e !== void 0 &&
|
|
3540
|
+
return t.name = "", t.nestedFolderName = "", t.createdBy = "", t.forUser = !1, e !== void 0 && ye(this, t, e), t;
|
|
3541
3541
|
}
|
|
3542
3542
|
internalBinaryRead(e, t, r, n) {
|
|
3543
3543
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -3576,8 +3576,8 @@ class fs extends Fe {
|
|
|
3576
3576
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
3577
3577
|
}
|
|
3578
3578
|
}
|
|
3579
|
-
const
|
|
3580
|
-
class
|
|
3579
|
+
const Wr = new ps();
|
|
3580
|
+
class ms extends Fe {
|
|
3581
3581
|
constructor() {
|
|
3582
3582
|
super("com.hamropatro.grpc.common.GetAllFoldersRequest", [
|
|
3583
3583
|
{
|
|
@@ -3598,7 +3598,7 @@ class ps extends Fe {
|
|
|
3598
3598
|
}
|
|
3599
3599
|
create(e) {
|
|
3600
3600
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3601
|
-
return t.cursor = "", t.limit = 0, e !== void 0 &&
|
|
3601
|
+
return t.cursor = "", t.limit = 0, e !== void 0 && ye(this, t, e), t;
|
|
3602
3602
|
}
|
|
3603
3603
|
internalBinaryRead(e, t, r, n) {
|
|
3604
3604
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -3629,11 +3629,11 @@ class ps extends Fe {
|
|
|
3629
3629
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
3630
3630
|
}
|
|
3631
3631
|
}
|
|
3632
|
-
const
|
|
3633
|
-
class
|
|
3632
|
+
const Zn = new ms();
|
|
3633
|
+
class gs extends Fe {
|
|
3634
3634
|
constructor() {
|
|
3635
3635
|
super("com.hamropatro.grpc.common.GetAllFoldersResponse", [
|
|
3636
|
-
{ no: 1, name: "folder", kind: "message", repeat: 1, T: () =>
|
|
3636
|
+
{ no: 1, name: "folder", kind: "message", repeat: 1, T: () => Et },
|
|
3637
3637
|
{
|
|
3638
3638
|
no: 2,
|
|
3639
3639
|
name: "next_cursor",
|
|
@@ -3652,7 +3652,7 @@ class ms extends Fe {
|
|
|
3652
3652
|
}
|
|
3653
3653
|
create(e) {
|
|
3654
3654
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3655
|
-
return t.folder = [], t.nextCursor = "", t.hasMore = !1, e !== void 0 &&
|
|
3655
|
+
return t.folder = [], t.nextCursor = "", t.hasMore = !1, e !== void 0 && ye(this, t, e), t;
|
|
3656
3656
|
}
|
|
3657
3657
|
internalBinaryRead(e, t, r, n) {
|
|
3658
3658
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -3661,7 +3661,7 @@ class ms extends Fe {
|
|
|
3661
3661
|
switch (a) {
|
|
3662
3662
|
case /* repeated com.hamropatro.grpc.common.Folder folder */
|
|
3663
3663
|
1:
|
|
3664
|
-
i.folder.push(
|
|
3664
|
+
i.folder.push(Et.internalBinaryRead(e, e.uint32(), r));
|
|
3665
3665
|
break;
|
|
3666
3666
|
case /* string next_cursor */
|
|
3667
3667
|
2:
|
|
@@ -3683,20 +3683,20 @@ class ms extends Fe {
|
|
|
3683
3683
|
}
|
|
3684
3684
|
internalBinaryWrite(e, t, r) {
|
|
3685
3685
|
for (let i = 0; i < e.folder.length; i++)
|
|
3686
|
-
|
|
3686
|
+
Et.internalBinaryWrite(e.folder[i], t.tag(1, W.LengthDelimited).fork(), r).join();
|
|
3687
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 n = r.writeUnknownFields;
|
|
3689
3689
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
3690
3690
|
}
|
|
3691
3691
|
}
|
|
3692
|
-
const
|
|
3693
|
-
class
|
|
3692
|
+
const mr = new gs();
|
|
3693
|
+
class ws extends Fe {
|
|
3694
3694
|
constructor() {
|
|
3695
3695
|
super("com.hamropatro.grpc.common.Empty", []);
|
|
3696
3696
|
}
|
|
3697
3697
|
create(e) {
|
|
3698
3698
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3699
|
-
return e !== void 0 &&
|
|
3699
|
+
return e !== void 0 && ye(this, t, e), t;
|
|
3700
3700
|
}
|
|
3701
3701
|
internalBinaryRead(e, t, r, n) {
|
|
3702
3702
|
return n ?? this.create();
|
|
@@ -3706,8 +3706,8 @@ class gs extends Fe {
|
|
|
3706
3706
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
3707
3707
|
}
|
|
3708
3708
|
}
|
|
3709
|
-
const
|
|
3710
|
-
class
|
|
3709
|
+
const gr = new ws();
|
|
3710
|
+
class ys extends Fe {
|
|
3711
3711
|
constructor() {
|
|
3712
3712
|
super("com.hamropatro.grpc.common.Folder", [
|
|
3713
3713
|
{
|
|
@@ -3749,7 +3749,7 @@ class ws extends Fe {
|
|
|
3749
3749
|
}
|
|
3750
3750
|
create(e) {
|
|
3751
3751
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3752
|
-
return t.key = "", t.name = "", t.nestedFolderName = "", t.createdBy = "", t.forUser = !1, e !== void 0 &&
|
|
3752
|
+
return t.key = "", t.name = "", t.nestedFolderName = "", t.createdBy = "", t.forUser = !1, e !== void 0 && ye(this, t, e), t;
|
|
3753
3753
|
}
|
|
3754
3754
|
internalBinaryRead(e, t, r, n) {
|
|
3755
3755
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -3792,8 +3792,8 @@ class ws extends Fe {
|
|
|
3792
3792
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
3793
3793
|
}
|
|
3794
3794
|
}
|
|
3795
|
-
const
|
|
3796
|
-
class
|
|
3795
|
+
const Et = new ys();
|
|
3796
|
+
class bs extends Fe {
|
|
3797
3797
|
constructor() {
|
|
3798
3798
|
super("com.hamropatro.grpc.common.ChangeNestedFolderRequest", [
|
|
3799
3799
|
{
|
|
@@ -3814,7 +3814,7 @@ class ys extends Fe {
|
|
|
3814
3814
|
}
|
|
3815
3815
|
create(e) {
|
|
3816
3816
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3817
|
-
return t.folderKey = "", t.nestedFolderName = "", e !== void 0 &&
|
|
3817
|
+
return t.folderKey = "", t.nestedFolderName = "", e !== void 0 && ye(this, t, e), t;
|
|
3818
3818
|
}
|
|
3819
3819
|
internalBinaryRead(e, t, r, n) {
|
|
3820
3820
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -3845,20 +3845,20 @@ class ys extends Fe {
|
|
|
3845
3845
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
3846
3846
|
}
|
|
3847
3847
|
}
|
|
3848
|
-
const
|
|
3849
|
-
{ name: "createFolder", options: {}, I:
|
|
3850
|
-
{ name: "getFolders", options: {}, I:
|
|
3851
|
-
{ name: "getUserFolders", options: {}, I:
|
|
3852
|
-
{ name: "updateFolder", options: {}, I:
|
|
3853
|
-
{ name: "deleteFolder", options: {}, I:
|
|
3854
|
-
{ name: "ChangeNestedFolderName", options: {}, I:
|
|
3855
|
-
{ name: "setBooleanForUserFolder", options: {}, I:
|
|
3848
|
+
const Cs = new bs(), On = new Gn("com.hamropatro.grpc.common.FolderService", [
|
|
3849
|
+
{ name: "createFolder", options: {}, I: Wr, O: Et },
|
|
3850
|
+
{ name: "getFolders", options: {}, I: Zn, O: mr },
|
|
3851
|
+
{ name: "getUserFolders", options: {}, I: Zn, O: mr },
|
|
3852
|
+
{ name: "updateFolder", options: {}, I: Et, O: Et },
|
|
3853
|
+
{ name: "deleteFolder", options: {}, I: Pr, O: Et },
|
|
3854
|
+
{ name: "ChangeNestedFolderName", options: {}, I: Cs, O: Et },
|
|
3855
|
+
{ name: "setBooleanForUserFolder", options: {}, I: gr, O: gr }
|
|
3856
3856
|
]);
|
|
3857
|
-
class
|
|
3857
|
+
class Ln {
|
|
3858
3858
|
constructor(e) {
|
|
3859
|
-
he(this, "typeName",
|
|
3860
|
-
he(this, "methods",
|
|
3861
|
-
he(this, "options",
|
|
3859
|
+
he(this, "typeName", On.typeName);
|
|
3860
|
+
he(this, "methods", On.methods);
|
|
3861
|
+
he(this, "options", On.options);
|
|
3862
3862
|
this._transport = e;
|
|
3863
3863
|
}
|
|
3864
3864
|
/**
|
|
@@ -3866,42 +3866,42 @@ class Tn {
|
|
|
3866
3866
|
*/
|
|
3867
3867
|
createFolder(e, t) {
|
|
3868
3868
|
const r = this.methods[0], n = this._transport.mergeOptions(t);
|
|
3869
|
-
return
|
|
3869
|
+
return Me("unary", this._transport, r, n, e);
|
|
3870
3870
|
}
|
|
3871
3871
|
/**
|
|
3872
3872
|
* @generated from protobuf rpc: getFolders(com.hamropatro.grpc.common.GetAllFoldersRequest) returns (com.hamropatro.grpc.common.GetAllFoldersResponse);
|
|
3873
3873
|
*/
|
|
3874
3874
|
getFolders(e, t) {
|
|
3875
3875
|
const r = this.methods[1], n = this._transport.mergeOptions(t);
|
|
3876
|
-
return
|
|
3876
|
+
return Me("unary", this._transport, r, n, e);
|
|
3877
3877
|
}
|
|
3878
3878
|
/**
|
|
3879
3879
|
* @generated from protobuf rpc: getUserFolders(com.hamropatro.grpc.common.GetAllFoldersRequest) returns (com.hamropatro.grpc.common.GetAllFoldersResponse);
|
|
3880
3880
|
*/
|
|
3881
3881
|
getUserFolders(e, t) {
|
|
3882
3882
|
const r = this.methods[2], n = this._transport.mergeOptions(t);
|
|
3883
|
-
return
|
|
3883
|
+
return Me("unary", this._transport, r, n, e);
|
|
3884
3884
|
}
|
|
3885
3885
|
/**
|
|
3886
3886
|
* @generated from protobuf rpc: updateFolder(com.hamropatro.grpc.common.Folder) returns (com.hamropatro.grpc.common.Folder);
|
|
3887
3887
|
*/
|
|
3888
3888
|
updateFolder(e, t) {
|
|
3889
3889
|
const r = this.methods[3], n = this._transport.mergeOptions(t);
|
|
3890
|
-
return
|
|
3890
|
+
return Me("unary", this._transport, r, n, e);
|
|
3891
3891
|
}
|
|
3892
3892
|
/**
|
|
3893
3893
|
* @generated from protobuf rpc: deleteFolder(com.hamropatro.grpc.common.DeleteFolderRequest) returns (com.hamropatro.grpc.common.Folder);
|
|
3894
3894
|
*/
|
|
3895
3895
|
deleteFolder(e, t) {
|
|
3896
3896
|
const r = this.methods[4], n = this._transport.mergeOptions(t);
|
|
3897
|
-
return
|
|
3897
|
+
return Me("unary", this._transport, r, n, e);
|
|
3898
3898
|
}
|
|
3899
3899
|
/**
|
|
3900
3900
|
* @generated from protobuf rpc: ChangeNestedFolderName(com.hamropatro.grpc.common.ChangeNestedFolderRequest) returns (com.hamropatro.grpc.common.Folder);
|
|
3901
3901
|
*/
|
|
3902
3902
|
changeNestedFolderName(e, t) {
|
|
3903
3903
|
const r = this.methods[5], n = this._transport.mergeOptions(t);
|
|
3904
|
-
return
|
|
3904
|
+
return Me("unary", this._transport, r, n, e);
|
|
3905
3905
|
}
|
|
3906
3906
|
/**
|
|
3907
3907
|
* for-refactoring entites in database
|
|
@@ -3910,12 +3910,12 @@ class Tn {
|
|
|
3910
3910
|
*/
|
|
3911
3911
|
setBooleanForUserFolder(e, t) {
|
|
3912
3912
|
const r = this.methods[6], n = this._transport.mergeOptions(t);
|
|
3913
|
-
return
|
|
3913
|
+
return Me("unary", this._transport, r, n, e);
|
|
3914
3914
|
}
|
|
3915
3915
|
}
|
|
3916
|
-
const
|
|
3916
|
+
const Es = async (s, e = 20, t) => {
|
|
3917
3917
|
var o;
|
|
3918
|
-
const r = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, n = new
|
|
3918
|
+
const r = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, n = new Ln(r), i = Zn.create();
|
|
3919
3919
|
try {
|
|
3920
3920
|
return i.cursor = s, i.limit = e, await n.getFolders(
|
|
3921
3921
|
i,
|
|
@@ -3924,10 +3924,10 @@ const Cs = async (s, e = 20, t) => {
|
|
|
3924
3924
|
} catch (a) {
|
|
3925
3925
|
throw a;
|
|
3926
3926
|
}
|
|
3927
|
-
},
|
|
3927
|
+
}, vs = async (s, e, t, r, n) => {
|
|
3928
3928
|
var i;
|
|
3929
3929
|
try {
|
|
3930
|
-
const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new
|
|
3930
|
+
const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new Ln(o), c = Wr.create();
|
|
3931
3931
|
return c.name = s, c.nestedFolderName = e, c.createdBy = t, c.forUser = r, await a.createFolder(
|
|
3932
3932
|
c,
|
|
3933
3933
|
n
|
|
@@ -3935,10 +3935,10 @@ const Cs = async (s, e = 20, t) => {
|
|
|
3935
3935
|
} catch (o) {
|
|
3936
3936
|
throw o;
|
|
3937
3937
|
}
|
|
3938
|
-
},
|
|
3938
|
+
}, As = async (s, e, t, r, n) => {
|
|
3939
3939
|
var i;
|
|
3940
3940
|
try {
|
|
3941
|
-
const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new
|
|
3941
|
+
const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new Ln(o), c = Et.create();
|
|
3942
3942
|
return c.name = e, c.key = s, c.nestedFolderName = t, c.createdBy = r, await a.updateFolder(
|
|
3943
3943
|
c,
|
|
3944
3944
|
n
|
|
@@ -3946,10 +3946,10 @@ const Cs = async (s, e = 20, t) => {
|
|
|
3946
3946
|
} catch (o) {
|
|
3947
3947
|
throw o;
|
|
3948
3948
|
}
|
|
3949
|
-
},
|
|
3949
|
+
}, ks = async (s, e) => {
|
|
3950
3950
|
var t;
|
|
3951
3951
|
try {
|
|
3952
|
-
const r = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, n = new
|
|
3952
|
+
const r = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, n = new Ln(r), i = Pr.create();
|
|
3953
3953
|
return i.key = s, await n.deleteFolder(
|
|
3954
3954
|
i,
|
|
3955
3955
|
e
|
|
@@ -3957,7 +3957,7 @@ const Cs = async (s, e = 20, t) => {
|
|
|
3957
3957
|
} catch (r) {
|
|
3958
3958
|
throw r;
|
|
3959
3959
|
}
|
|
3960
|
-
},
|
|
3960
|
+
}, Sn = (s, e, t) => {
|
|
3961
3961
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3962
3962
|
r.setAttribute("xmlns", "http://www.w3.org/2000/svg"), r.setAttribute("width", s || "20"), r.setAttribute("height", e || "20"), r.setAttribute("viewBox", "0 0 24 24"), r.setAttribute("fill", "none"), r.setAttribute("stroke", t || "#ee3f3f"), r.setAttribute("stroke-width", "2"), r.setAttribute("stroke-linecap", "round"), r.setAttribute("stroke-linejoin", "round"), r.classList.add("lucide", "lucide-circle-alert");
|
|
3963
3963
|
const n = document.createElementNS(
|
|
@@ -3970,7 +3970,7 @@ const Cs = async (s, e = 20, t) => {
|
|
|
3970
3970
|
const o = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
3971
3971
|
return o.setAttribute("x1", "12"), o.setAttribute("x2", "12.01"), o.setAttribute("y1", "16"), o.setAttribute("y2", "16"), r.appendChild(n), r.appendChild(i), r.appendChild(o), r;
|
|
3972
3972
|
};
|
|
3973
|
-
function
|
|
3973
|
+
function wr() {
|
|
3974
3974
|
const s = document.createElementNS(
|
|
3975
3975
|
"http://www.w3.org/2000/svg",
|
|
3976
3976
|
"svg"
|
|
@@ -3982,7 +3982,7 @@ function mr() {
|
|
|
3982
3982
|
"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"
|
|
3983
3983
|
), s.appendChild(e), s;
|
|
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");
|
|
@@ -4000,7 +4000,7 @@ function ks() {
|
|
|
4000
4000
|
);
|
|
4001
4001
|
return n.setAttribute("cx", "18"), n.setAttribute("cy", "16"), n.setAttribute("r", "3"), s.appendChild(e), s.appendChild(t), s.appendChild(r), s.appendChild(n), document.body.appendChild(s), s;
|
|
4002
4002
|
}
|
|
4003
|
-
const
|
|
4003
|
+
const yr = (s) => {
|
|
4004
4004
|
const e = document.createElementNS(
|
|
4005
4005
|
"http://www.w3.org/2000/svg",
|
|
4006
4006
|
"svg"
|
|
@@ -4011,7 +4011,7 @@ const gr = (s) => {
|
|
|
4011
4011
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4012
4012
|
return r.setAttribute("d", "m9 11 3 3L22 4"), e.appendChild(t), e.appendChild(r), 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");
|
|
@@ -4020,7 +4020,7 @@ function qn(s = "#333") {
|
|
|
4020
4020
|
"M 9.15625 6.3125 L 6.3125 9.15625 L 22.15625 25 L 6.21875 40.96875 L 9.03125 43.78125 L 25 27.84375 L 40.9375 43.78125 L 43.78125 40.9375 L 27.84375 25 L 43.6875 9.15625 L 40.84375 6.3125 L 25 22.15625 Z"
|
|
4021
4021
|
), e.appendChild(t), e;
|
|
4022
4022
|
}
|
|
4023
|
-
function
|
|
4023
|
+
function br() {
|
|
4024
4024
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4025
4025
|
s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("width", "16"), s.setAttribute("height", "16"), s.setAttribute("viewBox", "0 0 24 24"), s.setAttribute("fill", "none"), s.setAttribute("stroke", "#2c96f8"), s.setAttribute("stroke-width", "2"), s.setAttribute("stroke-linecap", "round"), s.setAttribute("stroke-linejoin", "round"), s.classList.add("lucide", "lucide-pencil");
|
|
4026
4026
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -4031,7 +4031,7 @@ function wr() {
|
|
|
4031
4031
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4032
4032
|
return t.setAttribute("d", "m15 5 4 4"), s.appendChild(e), s.appendChild(t), document.body.appendChild(s), s;
|
|
4033
4033
|
}
|
|
4034
|
-
function
|
|
4034
|
+
function en() {
|
|
4035
4035
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4036
4036
|
s.setAttribute("xmlns", "http://www.w3.org/2000/folder"), s.setAttribute("x", "0px"), s.setAttribute("y", "0px"), s.setAttribute("width", "24"), s.setAttribute("height", "24"), s.setAttribute("viewBox", "0 0 48 48");
|
|
4037
4037
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -4045,7 +4045,7 @@ function Yt() {
|
|
|
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 n = document.createElementNS(s, "path");
|
|
4056
4056
|
return n.setAttribute("d", "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"), e.appendChild(t), e.appendChild(r), e.appendChild(n), 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(
|
|
@@ -4067,13 +4067,13 @@ function Ns() {
|
|
|
4067
4067
|
"m488-400-65 65 56 56 161-161-161-161-56 56 65 65H320v80h168ZM160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h240l80 80h320q33 0 56.5 23.5T880-640v400q0 33-23.5 56.5T800-160H160Zm0-80h640v-400H447l-80-80H160v480Zm0 0v-480 480Z"
|
|
4068
4068
|
), s.appendChild(e), s;
|
|
4069
4069
|
}
|
|
4070
|
-
function
|
|
4070
|
+
function Rn() {
|
|
4071
4071
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4072
4072
|
s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("fill", "none"), s.setAttribute("width", "20"), s.setAttribute("height", "20"), s.setAttribute("viewBox", "0 0 24 24"), s.setAttribute("stroke-width", "1.5"), s.setAttribute("stroke", "currentColor"), s.setAttribute("class", "size-2");
|
|
4073
4073
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4074
4074
|
return e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("d", "M12 4.5v15m7.5-7.5h-15"), s.appendChild(e), s;
|
|
4075
4075
|
}
|
|
4076
|
-
function
|
|
4076
|
+
function Ts() {
|
|
4077
4077
|
const s = "http://www.w3.org/2000/svg", e = document.createElementNS(s, "svg");
|
|
4078
4078
|
e.setAttribute("width", "16"), e.setAttribute("height", "16"), e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "2"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.classList.add("lucide", "lucide-eye");
|
|
4079
4079
|
const t = document.createElementNS(s, "path");
|
|
@@ -4084,7 +4084,7 @@ function Is() {
|
|
|
4084
4084
|
const r = document.createElementNS(s, "circle");
|
|
4085
4085
|
return r.setAttribute("cx", "12"), r.setAttribute("cy", "12"), r.setAttribute("r", "3"), e.appendChild(r), document.body.appendChild(e), e;
|
|
4086
4086
|
}
|
|
4087
|
-
function
|
|
4087
|
+
function Ls() {
|
|
4088
4088
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4089
4089
|
s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("height", "24px"), s.setAttribute("width", "24px"), s.setAttribute("viewBox", "0 0 30 30"), s.setAttribute("fill", "#999");
|
|
4090
4090
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -4093,7 +4093,7 @@ function Ts() {
|
|
|
4093
4093
|
"M 13 3 C 7.4889971 3 3 7.4889971 3 13 C 3 18.511003 7.4889971 23 13 23 C 15.396508 23 17.597385 22.148986 19.322266 20.736328 L 25.292969 26.707031 A 1.0001 1.0001 0 1 0 26.707031 25.292969 L 20.736328 19.322266 C 22.148986 17.597385 23 15.396508 23 13 C 23 7.4889971 18.511003 3 13 3 z M 13 5 C 17.430123 5 21 8.5698774 21 13 C 21 17.430123 17.430123 21 13 21 C 8.5698774 21 5 17.430123 5 13 C 5 8.5698774 8.5698774 5 13 5 z"
|
|
4094
4094
|
), s.appendChild(e), s;
|
|
4095
4095
|
}
|
|
4096
|
-
function
|
|
4096
|
+
function Cr() {
|
|
4097
4097
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4098
4098
|
s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("width", "16"), s.setAttribute("height", "16"), s.setAttribute("viewBox", "0 0 24 24"), s.setAttribute("fill", "none"), s.setAttribute("stroke", "#f14b4b"), s.setAttribute("stroke-width", "2"), s.setAttribute("stroke-linecap", "round"), s.setAttribute("stroke-linejoin", "round"), s.classList.add("lucide", "lucide-trash-2");
|
|
4099
4099
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -4107,7 +4107,7 @@ function br() {
|
|
|
4107
4107
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
4108
4108
|
return i.setAttribute("x1", "14"), i.setAttribute("x2", "14"), i.setAttribute("y1", "11"), i.setAttribute("y2", "17"), s.appendChild(e), s.appendChild(t), s.appendChild(r), s.appendChild(n), s.appendChild(i), document.body.appendChild(s), s;
|
|
4109
4109
|
}
|
|
4110
|
-
function
|
|
4110
|
+
function Dn() {
|
|
4111
4111
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4112
4112
|
s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("width", "24"), s.setAttribute("height", "24"), s.setAttribute("viewBox", "0 0 24 24"), s.setAttribute("fill", "none"), s.setAttribute("stroke", "currentColor"), s.setAttribute("stroke-width", "2"), s.setAttribute("stroke-linecap", "round"), s.setAttribute("stroke-linejoin", "round"), s.classList.add("lucide", "lucide-upload");
|
|
4113
4113
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -4120,7 +4120,7 @@ function Sn() {
|
|
|
4120
4120
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
4121
4121
|
return r.setAttribute("x1", "12"), r.setAttribute("x2", "12"), r.setAttribute("y1", "3"), r.setAttribute("y2", "15"), s.appendChild(e), s.appendChild(t), s.appendChild(r), s;
|
|
4122
4122
|
}
|
|
4123
|
-
function
|
|
4123
|
+
function Us() {
|
|
4124
4124
|
const s = "http://www.w3.org/2000/svg", e = document.createElementNS(s, "svg");
|
|
4125
4125
|
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-video");
|
|
4126
4126
|
const t = document.createElementNS(s, "path");
|
|
@@ -4135,31 +4135,31 @@ function Q(s, e, t, r, n) {
|
|
|
4135
4135
|
let i = document.createElement(s);
|
|
4136
4136
|
return e && (i.className += e), t && (i.style.cssText = t), r && (i.textContent = r), n && n.appendChild(i), i;
|
|
4137
4137
|
}
|
|
4138
|
-
var
|
|
4139
|
-
class
|
|
4138
|
+
var gt, ze, Wt;
|
|
4139
|
+
class xs {
|
|
4140
4140
|
constructor() {
|
|
4141
|
-
z(this,
|
|
4141
|
+
z(this, gt);
|
|
4142
4142
|
z(this, ze);
|
|
4143
4143
|
// Store the circle element as a private property
|
|
4144
|
-
z(this,
|
|
4145
|
-
H(this,
|
|
4144
|
+
z(this, Wt, "#fff");
|
|
4145
|
+
H(this, gt, document.createElementNS(
|
|
4146
4146
|
"http://www.w3.org/2000/svg",
|
|
4147
4147
|
"svg"
|
|
4148
|
-
)),
|
|
4148
|
+
)), E(this, gt).setAttribute("viewBox", "25 25 50 50"), E(this, gt).classList.add("loader-svg"), H(this, ze, document.createElementNS(
|
|
4149
4149
|
"http://www.w3.org/2000/svg",
|
|
4150
4150
|
"circle"
|
|
4151
|
-
)),
|
|
4151
|
+
)), E(this, ze).setAttribute("r", "20"), E(this, ze).setAttribute("cy", "50"), E(this, ze).setAttribute("cx", "50"), E(this, ze).setAttribute("stroke", E(this, Wt)), E(this, ze).classList.add("loader-circle"), E(this, gt).appendChild(E(this, ze));
|
|
4152
4152
|
}
|
|
4153
4153
|
show(e, t) {
|
|
4154
|
-
t && (H(this,
|
|
4154
|
+
t && (H(this, Wt, t), E(this, ze).setAttribute("stroke", E(this, Wt))), e.appendChild(E(this, gt));
|
|
4155
4155
|
}
|
|
4156
4156
|
hide() {
|
|
4157
|
-
|
|
4157
|
+
E(this, gt).remove();
|
|
4158
4158
|
}
|
|
4159
4159
|
}
|
|
4160
|
-
|
|
4161
|
-
const
|
|
4162
|
-
class
|
|
4160
|
+
gt = new WeakMap(), ze = new WeakMap(), Wt = new WeakMap();
|
|
4161
|
+
const Er = new xs(), pn = document.body;
|
|
4162
|
+
class jr {
|
|
4163
4163
|
constructor() {
|
|
4164
4164
|
he(this, "main");
|
|
4165
4165
|
he(this, "dialogContainer");
|
|
@@ -4181,7 +4181,7 @@ class Wr {
|
|
|
4181
4181
|
"dialog-presentation",
|
|
4182
4182
|
"",
|
|
4183
4183
|
"",
|
|
4184
|
-
|
|
4184
|
+
pn
|
|
4185
4185
|
), this.main.setAttribute("role", "presentation"), this.dialogContainer = Q(
|
|
4186
4186
|
"div",
|
|
4187
4187
|
"dialog-container",
|
|
@@ -4222,9 +4222,9 @@ class Wr {
|
|
|
4222
4222
|
"",
|
|
4223
4223
|
this.dialogContent
|
|
4224
4224
|
);
|
|
4225
|
-
r.appendChild(
|
|
4225
|
+
r.appendChild(Kn()), r.onclick = () => this.hide();
|
|
4226
4226
|
}
|
|
4227
|
-
return e.header && this._setHeader(e), this._setBody(e), this._setFooter(e), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel",
|
|
4227
|
+
return e.header && this._setHeader(e), this._setBody(e), this._setFooter(e), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", pn.style.overflow = "hidden", this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", pn.classList.add("dialog-visible"), new Promise((r) => {
|
|
4228
4228
|
const n = (i) => () => {
|
|
4229
4229
|
this.hide(), r(i === "confirm");
|
|
4230
4230
|
};
|
|
@@ -4276,16 +4276,16 @@ class Wr {
|
|
|
4276
4276
|
}, 150);
|
|
4277
4277
|
}
|
|
4278
4278
|
hide() {
|
|
4279
|
-
this.main ||
|
|
4279
|
+
this.main || pn.style.removeProperty("overflow"), this.dialog.style.transform = "scale(0.8)", this.dialog.style.transition = "transform 150ms ease-out", this.dialogBackdrop.style.opacity = "0", setTimeout(() => {
|
|
4280
4280
|
this.dialogContainer.style.opacity = "0", this.dialog.style.opacity = "0", this.dialogContent.style.opacity = "0", this.main.remove();
|
|
4281
4281
|
}, 150);
|
|
4282
4282
|
}
|
|
4283
4283
|
updateUploadBtn(e) {
|
|
4284
|
-
e ? (
|
|
4284
|
+
e ? (Er.show(this.confirmButton), this.confirmButton.disabled = !0) : (Er.hide(), this.confirmButton.disabled = !1);
|
|
4285
4285
|
}
|
|
4286
4286
|
}
|
|
4287
|
-
const
|
|
4288
|
-
class
|
|
4287
|
+
const mn = new jr(), Ce = new jr();
|
|
4288
|
+
class _s {
|
|
4289
4289
|
constructor() {
|
|
4290
4290
|
he(this, "main");
|
|
4291
4291
|
he(this, "dialogBody");
|
|
@@ -4298,8 +4298,8 @@ class xs {
|
|
|
4298
4298
|
this.main.remove();
|
|
4299
4299
|
}
|
|
4300
4300
|
}
|
|
4301
|
-
const Ze = new
|
|
4302
|
-
var
|
|
4301
|
+
const Ze = new _s();
|
|
4302
|
+
var et = /* @__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))(et || {});
|
|
4303
4303
|
const tn = {
|
|
4304
4304
|
0: "IMAGE",
|
|
4305
4305
|
1: "AUDIO",
|
|
@@ -4307,19 +4307,19 @@ const tn = {
|
|
|
4307
4307
|
3: "ALL",
|
|
4308
4308
|
4: "FOLDER"
|
|
4309
4309
|
};
|
|
4310
|
-
function
|
|
4310
|
+
function Mn(s) {
|
|
4311
4311
|
switch (s) {
|
|
4312
4312
|
case "image":
|
|
4313
|
-
return tn[
|
|
4313
|
+
return tn[et.IMAGE];
|
|
4314
4314
|
case "video":
|
|
4315
|
-
return tn[
|
|
4315
|
+
return tn[et.VIDEO];
|
|
4316
4316
|
case "audio":
|
|
4317
|
-
return tn[
|
|
4317
|
+
return tn[et.AUDIO];
|
|
4318
4318
|
default:
|
|
4319
|
-
return tn[
|
|
4319
|
+
return tn[et.ALL];
|
|
4320
4320
|
}
|
|
4321
4321
|
}
|
|
4322
|
-
function
|
|
4322
|
+
function Bs(s) {
|
|
4323
4323
|
const e = {};
|
|
4324
4324
|
s.forEach((n) => {
|
|
4325
4325
|
e[n.key] = { ...n, children: {} };
|
|
@@ -4331,7 +4331,7 @@ function _s(s) {
|
|
|
4331
4331
|
}), n);
|
|
4332
4332
|
return s.reduce((n, i) => (i.nestedFolderName || n.push(t(e[i.key])), n), []);
|
|
4333
4333
|
}
|
|
4334
|
-
function
|
|
4334
|
+
function Os(s, e) {
|
|
4335
4335
|
const t = (r) => {
|
|
4336
4336
|
if (r.key === e.nestedFolderName)
|
|
4337
4337
|
return r.children[e.key] = { ...e, children: {} }, !0;
|
|
@@ -4347,7 +4347,7 @@ function Bs(s, e) {
|
|
|
4347
4347
|
break;
|
|
4348
4348
|
return s;
|
|
4349
4349
|
}
|
|
4350
|
-
const
|
|
4350
|
+
const Ss = async (s, e) => {
|
|
4351
4351
|
let t;
|
|
4352
4352
|
try {
|
|
4353
4353
|
s && (t = {
|
|
@@ -4365,7 +4365,7 @@ function K(s, e) {
|
|
|
4365
4365
|
const t = document.createElement("div");
|
|
4366
4366
|
return s && (t.className = s), e && (t.id = e), t;
|
|
4367
4367
|
}
|
|
4368
|
-
function
|
|
4368
|
+
function $t(s, e, t) {
|
|
4369
4369
|
const r = document.createElement("p");
|
|
4370
4370
|
return e && (r.className = e), t && (r.id = t), s && (r.textContent = s), r;
|
|
4371
4371
|
}
|
|
@@ -4373,27 +4373,27 @@ function ie(s, e) {
|
|
|
4373
4373
|
const t = document.createElement("span");
|
|
4374
4374
|
return e && (t.className = e), s && (t.textContent = s), t;
|
|
4375
4375
|
}
|
|
4376
|
-
function
|
|
4376
|
+
function vr(s, e, t, r) {
|
|
4377
4377
|
const n = document.createElement("img");
|
|
4378
4378
|
return e && (n.className = e), n.src = s, n;
|
|
4379
4379
|
}
|
|
4380
|
-
function
|
|
4380
|
+
function Rs(s, e, t) {
|
|
4381
4381
|
const r = document.createElement("video"), n = document.createElement("source");
|
|
4382
4382
|
return r.className = e, n.src = s, r.appendChild(n), r;
|
|
4383
4383
|
}
|
|
4384
|
-
function
|
|
4384
|
+
function Ds(s, e, t) {
|
|
4385
4385
|
const r = document.createElement("audio"), n = document.createElement("source");
|
|
4386
4386
|
return r.className = e, r.controls = !0, n.src = s, r.appendChild(n), r;
|
|
4387
4387
|
}
|
|
4388
|
-
function
|
|
4388
|
+
function De(s, e, t, r, n) {
|
|
4389
4389
|
const i = document.createElement("button");
|
|
4390
4390
|
return e && (i.className = e), t && (i.id = t), s && (i.textContent = s), n && (i.innerHTML = n), i.disabled = r, i;
|
|
4391
4391
|
}
|
|
4392
|
-
function
|
|
4392
|
+
function Vn(s, e, t) {
|
|
4393
4393
|
const r = document.createElement("input");
|
|
4394
4394
|
return r.className = e, r.defaultValue = t, s && (r.type = s), r;
|
|
4395
4395
|
}
|
|
4396
|
-
function
|
|
4396
|
+
function Ms(s, e) {
|
|
4397
4397
|
return e.forEach(function(t) {
|
|
4398
4398
|
t && typeof t != "string" && !Array.isArray(t) && Object.keys(t).forEach(function(r) {
|
|
4399
4399
|
if (r !== "default" && !(r in s)) {
|
|
@@ -4405,10 +4405,10 @@ function Ds(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, r) {
|
|
4410
4410
|
let n;
|
|
4411
|
-
return
|
|
4411
|
+
return Vs(s).then(function(i) {
|
|
4412
4412
|
try {
|
|
4413
4413
|
return n = i, t(new Blob([e.slice(0, 2), n, e.slice(2)], { type: "image/jpeg" }));
|
|
4414
4414
|
} catch (o) {
|
|
@@ -4417,7 +4417,7 @@ function jr(s, e) {
|
|
|
4417
4417
|
}, r);
|
|
4418
4418
|
});
|
|
4419
4419
|
}
|
|
4420
|
-
const
|
|
4420
|
+
const Vs = (s) => new Promise((e, t) => {
|
|
4421
4421
|
const r = new FileReader();
|
|
4422
4422
|
r.addEventListener("load", ({ target: { result: n } }) => {
|
|
4423
4423
|
const i = new DataView(n);
|
|
@@ -4456,14 +4456,14 @@ const Ms = (s) => new Promise((e, t) => {
|
|
|
4456
4456
|
return e(new Blob());
|
|
4457
4457
|
}), r.readAsArrayBuffer(s);
|
|
4458
4458
|
});
|
|
4459
|
-
var
|
|
4460
|
-
return
|
|
4459
|
+
var En = {}, Hs = { get exports() {
|
|
4460
|
+
return En;
|
|
4461
4461
|
}, set exports(s) {
|
|
4462
|
-
|
|
4462
|
+
En = s;
|
|
4463
4463
|
} };
|
|
4464
4464
|
(function(s) {
|
|
4465
4465
|
var e, t, r = {};
|
|
4466
|
-
|
|
4466
|
+
Hs.exports = r, r.parse = function(n, i) {
|
|
4467
4467
|
for (var o = r.bin.readUshort, a = r.bin.readUint, c = 0, h = {}, l = new Uint8Array(n), u = l.length - 4; a(l, u) != 101010256; ) u--;
|
|
4468
4468
|
c = u, c += 4;
|
|
4469
4469
|
var d = o(l, c += 4);
|
|
@@ -4624,8 +4624,8 @@ var Cn = {}, Vs = { get exports() {
|
|
|
4624
4624
|
F = 65535 & k;
|
|
4625
4625
|
var L = l(I = k >>> 16, h.of0);
|
|
4626
4626
|
h.lhst[257 + L]++;
|
|
4627
|
-
var
|
|
4628
|
-
h.dhst[
|
|
4627
|
+
var v = l(F, h.df0);
|
|
4628
|
+
h.dhst[v]++, b += h.exb[L] + h.dxb[v], T[O] = I << 23 | d - y, T[O + 1] = F << 16 | L << 8 | v, O += 2, y = d + I;
|
|
4629
4629
|
} else h.lhst[n[d]]++;
|
|
4630
4630
|
A++;
|
|
4631
4631
|
}
|
|
@@ -4670,20 +4670,20 @@ var Cn = {}, Vs = { get exports() {
|
|
|
4670
4670
|
for (; 7 & d; ) d++;
|
|
4671
4671
|
d = r.F._copyExact(c, h, l, u, d);
|
|
4672
4672
|
} else {
|
|
4673
|
-
var
|
|
4674
|
-
if (L == 1 && (
|
|
4675
|
-
r.F.makeCodes(b.ltree, y), r.F.revCodes(b.ltree, y), r.F.makeCodes(b.dtree, N), r.F.revCodes(b.dtree, N), r.F.makeCodes(b.itree, T), r.F.revCodes(b.itree, T),
|
|
4673
|
+
var v, _;
|
|
4674
|
+
if (L == 1 && (v = b.fltree, _ = b.fdtree), L == 2) {
|
|
4675
|
+
r.F.makeCodes(b.ltree, y), r.F.revCodes(b.ltree, y), r.F.makeCodes(b.dtree, N), r.F.revCodes(b.dtree, N), r.F.makeCodes(b.itree, T), r.F.revCodes(b.itree, T), v = 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 = r.F._codeTiny(A, b.itree, u, d), d = r.F._codeTiny(U, 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, Z = p + (8388607 & x); p < Z; ) d = r.F._writeLit(c[p++],
|
|
4680
|
+
for (var x = i[M], V = x >>> 23, Z = p + (8388607 & x); p < Z; ) d = r.F._writeLit(c[p++], v, u, d);
|
|
4681
4681
|
if (V != 0) {
|
|
4682
4682
|
var P = i[M + 1], q = P >> 16, $ = P >> 8 & 255, S = 255 & P;
|
|
4683
|
-
m(u, d = r.F._writeLit(257 + $,
|
|
4683
|
+
m(u, d = r.F._writeLit(257 + $, v, u, d), V - b.of0[$]), d += b.exb[$], B(u, d = r.F._writeLit(S, _, u, d), q - b.df0[S]), d += b.dxb[S], p += V;
|
|
4684
4684
|
}
|
|
4685
4685
|
}
|
|
4686
|
-
d = r.F._writeLit(256,
|
|
4686
|
+
d = r.F._writeLit(256, v, u, d);
|
|
4687
4687
|
}
|
|
4688
4688
|
return d;
|
|
4689
4689
|
}, r.F._copyExact = function(n, i, o, a, c) {
|
|
@@ -4777,10 +4777,10 @@ var Cn = {}, Vs = { get exports() {
|
|
|
4777
4777
|
y.itree[1 + (y.ordr[I] << 1)] = L, L > F && (F = L);
|
|
4778
4778
|
}
|
|
4779
4779
|
k += 3 * b, u(y.itree, F), d(y.itree, F, y.imap), T = y.lmap, C = y.dmap, k = l(y.imap, (1 << F) - 1, A + U, n, k, y.ttree);
|
|
4780
|
-
var
|
|
4781
|
-
B = (1 <<
|
|
4780
|
+
var v = a._copyOut(y.ttree, 0, A, y.ltree);
|
|
4781
|
+
B = (1 << v) - 1;
|
|
4782
4782
|
var _ = a._copyOut(y.ttree, A, U, y.dtree);
|
|
4783
|
-
m = (1 << _) - 1, u(y.ltree,
|
|
4783
|
+
m = (1 << _) - 1, u(y.ltree, v), d(y.ltree, v, T), u(y.dtree, _), d(y.dtree, _, C);
|
|
4784
4784
|
}
|
|
4785
4785
|
for (; ; ) {
|
|
4786
4786
|
var w = T[f(n, k) & B];
|
|
@@ -4874,7 +4874,7 @@ var Cn = {}, Vs = { get exports() {
|
|
|
4874
4874
|
a(n.fltree, 144, 8), a(n.fltree, 112, 9), a(n.fltree, 24, 7), a(n.fltree, 8, 8), r.F.makeCodes(n.fltree, 9), r.F.codes2map(n.fltree, 9, n.flmap), r.F.revCodes(n.fltree, 9), a(n.fdtree, 32, 5), r.F.makeCodes(n.fdtree, 5), r.F.codes2map(n.fdtree, 5, n.fdmap), r.F.revCodes(n.fdtree, 5), a(n.itree, 19, 0), a(n.ltree, 286, 0), a(n.dtree, 30, 0), a(n.ttree, 320, 0);
|
|
4875
4875
|
}();
|
|
4876
4876
|
})();
|
|
4877
|
-
var
|
|
4877
|
+
var $s = Ms({ __proto__: null, default: En }, [En]);
|
|
4878
4878
|
const Ke = function() {
|
|
4879
4879
|
var s = { nextZero(l, u) {
|
|
4880
4880
|
for (; l[u] != 0; ) u++;
|
|
@@ -4934,17 +4934,17 @@ const Ke = function() {
|
|
|
4934
4934
|
var I = k * T, F = k * u;
|
|
4935
4935
|
for (b = 0; b < u; b++) {
|
|
4936
4936
|
g = F + b << 2;
|
|
4937
|
-
var L = 3 * (
|
|
4938
|
-
C[g] = x[L], C[g + 1] = x[L + 1], C[g + 2] = x[L + 2], C[g + 3] =
|
|
4937
|
+
var L = 3 * (v = l[I + (b >> 3)] >> 7 - ((7 & b) << 0) & 1);
|
|
4938
|
+
C[g] = x[L], C[g + 1] = x[L + 1], C[g + 2] = x[L + 2], C[g + 3] = v < Z ? V[v] : 255;
|
|
4939
4939
|
}
|
|
4940
4940
|
}
|
|
4941
4941
|
if (A == 2) for (k = 0; k < d; k++) for (I = k * T, F = k * u, b = 0; b < u; b++)
|
|
4942
|
-
g = F + b << 2, L = 3 * (
|
|
4942
|
+
g = F + b << 2, L = 3 * (v = l[I + (b >> 2)] >> 6 - ((3 & b) << 1) & 3), C[g] = x[L], C[g + 1] = x[L + 1], C[g + 2] = x[L + 2], C[g + 3] = v < Z ? V[v] : 255;
|
|
4943
4943
|
if (A == 4) for (k = 0; k < d; k++) for (I = k * T, F = k * u, b = 0; b < u; b++)
|
|
4944
|
-
g = F + b << 2, L = 3 * (
|
|
4944
|
+
g = F + b << 2, L = 3 * (v = l[I + (b >> 1)] >> 4 - ((1 & b) << 2) & 15), C[g] = x[L], C[g + 1] = x[L + 1], C[g + 2] = x[L + 2], C[g + 3] = v < Z ? V[v] : 255;
|
|
4945
4945
|
if (A == 8) for (b = 0; b < y; b++) {
|
|
4946
|
-
var
|
|
4947
|
-
g = b << 2, L = 3 * (
|
|
4946
|
+
var v;
|
|
4947
|
+
g = b << 2, L = 3 * (v = l[b]), C[g] = x[L], C[g + 1] = x[L + 1], C[g + 2] = x[L + 2], C[g + 3] = v < Z ? V[v] : 255;
|
|
4948
4948
|
}
|
|
4949
4949
|
} else if (O == 4) {
|
|
4950
4950
|
if (A == 8) for (b = 0; b < y; b++) {
|
|
@@ -4978,10 +4978,10 @@ const Ke = function() {
|
|
|
4978
4978
|
return u = l.tabs.CgBI ? n(u, T) : r(u, T), l.interlace == 0 ? u = o(u, l, 0, d, f) : l.interlace == 1 && (u = function(R, O) {
|
|
4979
4979
|
const A = O.width, U = O.height, b = i(O), B = b >> 3, m = Math.ceil(A * b / 8), g = new Uint8Array(U * m);
|
|
4980
4980
|
let k = 0;
|
|
4981
|
-
const I = [0, 0, 4, 0, 2, 0, 1], F = [0, 4, 0, 2, 0, 1, 0], L = [8, 8, 8, 4, 4, 2, 2],
|
|
4981
|
+
const I = [0, 0, 4, 0, 2, 0, 1], F = [0, 4, 0, 2, 0, 1, 0], L = [8, 8, 8, 4, 4, 2, 2], v = [8, 8, 4, 4, 2, 2, 1];
|
|
4982
4982
|
let _ = 0;
|
|
4983
4983
|
for (; _ < 7; ) {
|
|
4984
|
-
const p = L[_], M =
|
|
4984
|
+
const p = L[_], M = v[_];
|
|
4985
4985
|
let x = 0, V = 0, Z = I[_];
|
|
4986
4986
|
for (; Z < U; ) Z += p, V++;
|
|
4987
4987
|
let P = F[_];
|
|
@@ -5015,7 +5015,7 @@ const Ke = function() {
|
|
|
5015
5015
|
const f = Uint8Array;
|
|
5016
5016
|
let y, N, T = 0, C = 0, R = 0, O = 0, A = 0, U = 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, I = g.e, F = g.R, L = g.n,
|
|
5018
|
+
const g = l.H, k = g.b, I = g.e, F = g.R, L = g.n, v = g.A, _ = g.Z, w = g.m, p = d == null;
|
|
5019
5019
|
for (p && (d = new f(u.length >>> 2 << 5)); T == 0; ) if (T = k(u, m, 1), C = k(u, m + 1, 2), m += 3, C != 0) {
|
|
5020
5020
|
if (p && (d = l.H.W(d, B + (1 << 17))), C == 1 && (y = w.J, N = w.h, U = 511, b = 31), C == 2) {
|
|
5021
5021
|
R = I(u, m, 5) + 257, O = I(u, m + 5, 5) + 1, A = I(u, m + 10, 4) + 4, m += 14;
|
|
@@ -5025,11 +5025,11 @@ const Ke = function() {
|
|
|
5025
5025
|
const P = I(u, m + 3 * M, 3);
|
|
5026
5026
|
w.Q[1 + (w.X[M] << 1)] = P, P > x && (x = P);
|
|
5027
5027
|
}
|
|
5028
|
-
m += 3 * A, L(w.Q, x),
|
|
5028
|
+
m += 3 * A, L(w.Q, x), v(w.Q, x, w.u), y = w.w, N = w.d, m = F(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
|
U = (1 << V) - 1;
|
|
5031
5031
|
const Z = g.V(w.v, R, O, w.D);
|
|
5032
|
-
b = (1 << Z) - 1, L(w.C, V),
|
|
5032
|
+
b = (1 << Z) - 1, L(w.C, V), v(w.C, V, y), L(w.D, Z), v(w.D, Z, N);
|
|
5033
5033
|
}
|
|
5034
5034
|
for (; ; ) {
|
|
5035
5035
|
const x = y[_(u, m) & U];
|
|
@@ -5180,13 +5180,13 @@ const Ke = function() {
|
|
|
5180
5180
|
let U = 0, b = 0;
|
|
5181
5181
|
for (let _ = 0; _ < A; _++) for (let w = 0; w < O; w++) if (T >= 0 && C >= 0 ? (U = _ * u + w << 2, b = (C + _) * y + T + w << 2) : (U = (-C + _) * u - T + w << 2, b = _ * y + w << 2), R == 0) f[b] = l[U], f[b + 1] = l[U + 1], f[b + 2] = l[U + 2], f[b + 3] = l[U + 3];
|
|
5182
5182
|
else if (R == 1) {
|
|
5183
|
-
var B = l[U + 3] * 0.00392156862745098, m = l[U] * B, g = l[U + 1] * B, k = l[U + 2] * B, I = f[b + 3] * (1 / 255), F = f[b] * I, L = f[b + 1] * I,
|
|
5183
|
+
var B = l[U + 3] * 0.00392156862745098, m = l[U] * B, g = l[U + 1] * B, k = l[U + 2] * B, I = f[b + 3] * (1 / 255), F = f[b] * I, L = f[b + 1] * I, v = f[b + 2] * I;
|
|
5184
5184
|
const p = 1 - B, M = B + I * p, x = M == 0 ? 0 : 1 / M;
|
|
5185
|
-
f[b + 3] = 255 * M, f[b + 0] = (m + F * p) * x, f[b + 1] = (g + L * p) * x, f[b + 2] = (k +
|
|
5185
|
+
f[b + 3] = 255 * M, f[b + 0] = (m + F * p) * x, f[b + 1] = (g + L * p) * x, f[b + 2] = (k + v * p) * x;
|
|
5186
5186
|
} else if (R == 2)
|
|
5187
|
-
B = l[U + 3], m = l[U], g = l[U + 1], k = l[U + 2], I = f[b + 3], F = f[b], L = f[b + 1],
|
|
5187
|
+
B = l[U + 3], m = l[U], g = l[U + 1], k = l[U + 2], I = f[b + 3], F = f[b], L = f[b + 1], v = f[b + 2], B == I && m == F && g == L && k == v ? (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[U + 3], m = l[U], g = l[U + 1], k = l[U + 2], I = f[b + 3], F = f[b], L = f[b + 1],
|
|
5189
|
+
if (B = l[U + 3], m = l[U], g = l[U + 1], k = l[U + 2], I = f[b + 3], F = f[b], L = f[b + 1], v = f[b + 2], B == I && m == F && g == L && k == v) continue;
|
|
5190
5190
|
if (B < 220 && I > 20) return !1;
|
|
5191
5191
|
}
|
|
5192
5192
|
return !0;
|
|
@@ -5220,7 +5220,7 @@ const Ke = function() {
|
|
|
5220
5220
|
A += _;
|
|
5221
5221
|
} else if (w == "acTL") C.tabs[w] = { num_frames: T(d, f), num_plays: T(d, f + 4) }, O = new Uint8Array(d.length);
|
|
5222
5222
|
else if (w == "fcTL") {
|
|
5223
|
-
U != 0 && ((
|
|
5223
|
+
U != 0 && ((v = C.frames[C.frames.length - 1]).data = t(C, O.slice(0, U), v.rect.width, v.rect.height), U = 0);
|
|
5224
5224
|
const p = { x: T(d, f + 12), y: T(d, f + 16), width: T(d, f + 4), height: T(d, f + 8) };
|
|
5225
5225
|
let M = N(d, f + 22);
|
|
5226
5226
|
M = N(d, f + 20) / (M == 0 ? 100 : M);
|
|
@@ -5257,8 +5257,8 @@ const Ke = function() {
|
|
|
5257
5257
|
else if (w == "IEND") break;
|
|
5258
5258
|
f += _, y.readUint(d, f), f += 4;
|
|
5259
5259
|
}
|
|
5260
|
-
var
|
|
5261
|
-
return U != 0 && ((
|
|
5260
|
+
var v;
|
|
5261
|
+
return U != 0 && ((v = C.frames[C.frames.length - 1]).data = t(C, O.slice(0, U), v.rect.width, v.rect.height)), C.data = t(C, R, C.width, C.height), delete C.compress, delete C.interlace, delete C.filter, C;
|
|
5262
5262
|
}, toRGBA8: function(u) {
|
|
5263
5263
|
const d = u.width, f = u.height;
|
|
5264
5264
|
if (u.tabs.acTL == null) return [e(u.data, d, f, u).buffer];
|
|
@@ -5300,8 +5300,8 @@ const Ke = function() {
|
|
|
5300
5300
|
const k = m[0] - g[0], I = m[1] - g[1], F = m[2] - g[2], L = m[3] - g[3];
|
|
5301
5301
|
return k * k + I * I + F * F + L * L;
|
|
5302
5302
|
}
|
|
5303
|
-
function a(m, g, k, I, F, L,
|
|
5304
|
-
|
|
5303
|
+
function a(m, g, k, I, F, L, v) {
|
|
5304
|
+
v == null && (v = 1);
|
|
5305
5305
|
const _ = I.length, w = [];
|
|
5306
5306
|
for (var p = 0; p < _; p++) {
|
|
5307
5307
|
const S = I[p];
|
|
@@ -5318,19 +5318,19 @@ const Ke = function() {
|
|
|
5318
5318
|
for (p = 0; p < q.length; p++) q[p] = 255 * ((q[p] + 0.5) / 16 - 0.5);
|
|
5319
5319
|
for (let S = 0; S < k; S++) for (let X = 0; X < g; X++) {
|
|
5320
5320
|
var $;
|
|
5321
|
-
p = 4 * (S * g + X),
|
|
5321
|
+
p = 4 * (S * g + X), v != 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 ae = 16777215;
|
|
5323
5323
|
for (x = 0; x < _; x++) {
|
|
5324
5324
|
const re = o($, w[x]);
|
|
5325
5325
|
re < ae && (ae = re, M = x);
|
|
5326
5326
|
}
|
|
5327
5327
|
const te = w[M], Y = [$[0] - te[0], $[1] - te[1], $[2] - te[2], $[3] - te[3]];
|
|
5328
|
-
|
|
5328
|
+
v == 1 && (X != g - 1 && n(Y, P, p + 4, 7), S != k - 1 && (X != 0 && n(Y, P, p + 4 * g - 4, 3), n(Y, P, p + 4 * g, 5), X != g - 1 && n(Y, P, p + 4 * g + 4, 1))), L[p >> 2] = M, Z[p >> 2] = I[M];
|
|
5329
5329
|
}
|
|
5330
5330
|
}
|
|
5331
5331
|
function c(m, g, k, I, F) {
|
|
5332
5332
|
F == null && (F = {});
|
|
5333
|
-
const { crc: L } = r,
|
|
5333
|
+
const { crc: L } = r, v = e.writeUint, _ = e.writeUshort, w = e.writeASCII;
|
|
5334
5334
|
let p = 8;
|
|
5335
5335
|
const M = m.frames.length > 1;
|
|
5336
5336
|
let x, V = !1, Z = 33 + (M ? 20 : 0);
|
|
@@ -5343,117 +5343,117 @@ const Ke = function() {
|
|
|
5343
5343
|
Z += 12;
|
|
5344
5344
|
const S = new Uint8Array(Z), X = [137, 80, 78, 71, 13, 10, 26, 10];
|
|
5345
5345
|
for (q = 0; q < 8; q++) S[q] = X[q];
|
|
5346
|
-
if (
|
|
5346
|
+
if (v(S, p, 13), p += 4, w(S, p, "IHDR"), p += 4, v(S, p, g), p += 4, v(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++, v(S, p, L(S, p - 17, 17)), p += 4, F.sRGB != null && (v(S, p, 1), p += 4, w(S, p, "sRGB"), p += 4, S[p] = F.sRGB, p++, v(S, p, L(S, p - 5, 5)), p += 4), F.iCCP != null) {
|
|
5347
5347
|
const Y = 13 + x.length;
|
|
5348
|
-
|
|
5348
|
+
v(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, v(S, p, L(S, p - (Y + 4), Y + 4)), p += 4;
|
|
5349
5349
|
}
|
|
5350
|
-
if (F.pHYs != null && (
|
|
5351
|
-
for (
|
|
5352
|
-
const Y = 3 * q, re = m.plte[q],
|
|
5353
|
-
S[p + Y + 0] =
|
|
5350
|
+
if (F.pHYs != null && (v(S, p, 9), p += 4, w(S, p, "pHYs"), p += 4, v(S, p, F.pHYs[0]), p += 4, v(S, p, F.pHYs[1]), p += 4, S[p] = F.pHYs[2], p++, v(S, p, L(S, p - 13, 13)), p += 4), M && (v(S, p, 8), p += 4, w(S, p, "acTL"), p += 4, v(S, p, m.frames.length), p += 4, v(S, p, F.loop != null ? F.loop : 0), p += 4, v(S, p, L(S, p - 12, 12)), p += 4), m.ctype == 3) {
|
|
5351
|
+
for (v(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], pe = 255 & re, be = re >>> 8 & 255, mt = re >>> 16 & 255;
|
|
5353
|
+
S[p + Y + 0] = pe, S[p + Y + 1] = be, S[p + Y + 2] = mt;
|
|
5354
5354
|
}
|
|
5355
|
-
if (p += 3 * P,
|
|
5356
|
-
for (
|
|
5357
|
-
p += P,
|
|
5355
|
+
if (p += 3 * P, v(S, p, L(S, p - 3 * P - 4, 3 * P + 4)), p += 4, V) {
|
|
5356
|
+
for (v(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
|
+
p += P, v(S, p, L(S, p - P - 4, P + 4)), p += 4;
|
|
5358
5358
|
}
|
|
5359
5359
|
}
|
|
5360
5360
|
let ae = 0;
|
|
5361
5361
|
for ($ = 0; $ < m.frames.length; $++) {
|
|
5362
5362
|
var te = m.frames[$];
|
|
5363
|
-
M && (
|
|
5363
|
+
M && (v(S, p, 26), p += 4, w(S, p, "fcTL"), p += 4, v(S, p, ae++), p += 4, v(S, p, te.rect.width), p += 4, v(S, p, te.rect.height), p += 4, v(S, p, te.rect.x), p += 4, v(S, p, te.rect.y), p += 4, _(S, p, I[$]), p += 2, _(S, p, 1e3), p += 2, S[p] = te.dispose, p++, S[p] = te.blend, p++, v(S, p, L(S, p - 30, 30)), p += 4);
|
|
5364
5364
|
const Y = te.cimg;
|
|
5365
|
-
|
|
5365
|
+
v(S, p, (P = Y.length) + ($ == 0 ? 0 : 4)), p += 4;
|
|
5366
5366
|
const re = p;
|
|
5367
|
-
w(S, p, $ == 0 ? "IDAT" : "fdAT"), p += 4, $ != 0 && (
|
|
5367
|
+
w(S, p, $ == 0 ? "IDAT" : "fdAT"), p += 4, $ != 0 && (v(S, p, ae++), p += 4), S.set(Y, p), p += P, v(S, p, L(S, re, p - re)), p += 4;
|
|
5368
5368
|
}
|
|
5369
|
-
return
|
|
5369
|
+
return v(S, p, 0), p += 4, w(S, p, "IEND"), p += 4, v(S, p, L(S, p - 4, 4)), p += 4, S.buffer;
|
|
5370
5370
|
}
|
|
5371
5371
|
function h(m, g, k) {
|
|
5372
5372
|
for (let I = 0; I < m.frames.length; I++) {
|
|
5373
5373
|
const F = m.frames[I];
|
|
5374
5374
|
F.rect.width;
|
|
5375
|
-
const L = F.rect.height,
|
|
5376
|
-
F.cimg = f(F.img, L, F.bpp, F.bpl,
|
|
5375
|
+
const L = F.rect.height, v = new Uint8Array(L * F.bpl + L);
|
|
5376
|
+
F.cimg = f(F.img, L, F.bpp, F.bpl, v, g, k);
|
|
5377
5377
|
}
|
|
5378
5378
|
}
|
|
5379
5379
|
function l(m, g, k, I, F) {
|
|
5380
|
-
const L = F[0],
|
|
5380
|
+
const L = F[0], v = F[1], _ = F[2], w = F[3], p = F[4], M = F[5];
|
|
5381
5381
|
let x = 6, V = 8, Z = 255;
|
|
5382
5382
|
for (var P = 0; P < m.length; P++) {
|
|
5383
5383
|
const Ne = new Uint8Array(m[P]);
|
|
5384
5384
|
for (var q = Ne.length, $ = 0; $ < q; $ += 4) Z &= Ne[$ + 3];
|
|
5385
5385
|
}
|
|
5386
|
-
const S = Z != 255, X = function(le, ne,
|
|
5387
|
-
const
|
|
5386
|
+
const S = Z != 255, X = function(le, ne, ge, Ie, we, Te) {
|
|
5387
|
+
const me = [];
|
|
5388
5388
|
for (var ee = 0; ee < le.length; ee++) {
|
|
5389
|
-
const Le = new Uint8Array(le[ee]),
|
|
5389
|
+
const Le = new Uint8Array(le[ee]), Ve = new Uint32Array(Le.buffer);
|
|
5390
5390
|
var Re;
|
|
5391
|
-
let xe = 0, _e = 0, qe = ne,
|
|
5391
|
+
let xe = 0, _e = 0, qe = ne, ot = ge, Mt = Ie ? 1 : 0;
|
|
5392
5392
|
if (ee != 0) {
|
|
5393
|
-
const
|
|
5394
|
-
let
|
|
5395
|
-
for (let We = 0; We <
|
|
5393
|
+
const dn = Te || Ie || ee == 1 || me[ee - 2].dispose != 0 ? 1 : 2;
|
|
5394
|
+
let Vt = 0, ce = 1e9;
|
|
5395
|
+
for (let We = 0; We < dn; We++) {
|
|
5396
5396
|
var Ue = new Uint8Array(le[ee - 1 - We]);
|
|
5397
|
-
const
|
|
5398
|
-
let
|
|
5399
|
-
for (let Ut = 0; Ut <
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
const
|
|
5403
|
-
|
|
5397
|
+
const at = new Uint32Array(le[ee - 1 - We]);
|
|
5398
|
+
let vt = ne, At = ge, Ht = -1, Yt = -1;
|
|
5399
|
+
for (let Ut = 0; Ut < ge; Ut++) for (let xt = 0; xt < ne; xt++)
|
|
5400
|
+
Ve[Ae = Ut * ne + xt] != at[Ae] && (xt < vt && (vt = xt), xt > Ht && (Ht = xt), Ut < At && (At = Ut), Ut > Yt && (Yt = Ut));
|
|
5401
|
+
Ht == -1 && (vt = At = Ht = Yt = 0), we && ((1 & vt) == 1 && vt--, (1 & At) == 1 && At--);
|
|
5402
|
+
const er = (Ht - vt + 1) * (Yt - At + 1);
|
|
5403
|
+
er < ce && (ce = er, Vt = We, xe = vt, _e = At, qe = Ht - vt + 1, ot = Yt - At + 1);
|
|
5404
5404
|
}
|
|
5405
|
-
Ue = new Uint8Array(le[ee - 1 -
|
|
5405
|
+
Ue = new Uint8Array(le[ee - 1 - Vt]), Vt == 1 && (me[ee - 1].dispose = 2), Re = new Uint8Array(qe * ot * 4), s(Ue, ne, ge, Re, qe, ot, -xe, -_e, 0), Mt = s(Le, ne, ge, Re, qe, ot, -xe, -_e, 3) ? 1 : 0, Mt == 1 ? d(Le, ne, ge, Re, { x: xe, y: _e, width: qe, height: ot }) : s(Le, ne, ge, Re, qe, ot, -xe, -_e, 0);
|
|
5406
5406
|
} else Re = Le.slice(0);
|
|
5407
|
-
|
|
5407
|
+
me.push({ rect: { x: xe, y: _e, width: qe, height: ot }, img: Re, blend: Mt, dispose: 0 });
|
|
5408
5408
|
}
|
|
5409
|
-
if (Ie) for (ee = 0; ee <
|
|
5410
|
-
if ((
|
|
5411
|
-
const Le =
|
|
5412
|
-
|
|
5409
|
+
if (Ie) for (ee = 0; ee < me.length; ee++) {
|
|
5410
|
+
if ((st = me[ee]).blend == 1) continue;
|
|
5411
|
+
const Le = st.rect, Ve = me[ee - 1].rect, xe = Math.min(Le.x, Ve.x), _e = Math.min(Le.y, Ve.y), qe = { 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
|
+
me[ee - 1].dispose = 1, ee - 1 != 0 && u(le, ne, ge, me, ee - 1, qe, we), u(le, ne, ge, me, ee, qe, we);
|
|
5413
5413
|
}
|
|
5414
|
-
let
|
|
5415
|
-
if (le.length != 1) for (var Ae = 0; Ae <
|
|
5416
|
-
var
|
|
5417
|
-
|
|
5414
|
+
let it = 0;
|
|
5415
|
+
if (le.length != 1) for (var Ae = 0; Ae < me.length; Ae++) {
|
|
5416
|
+
var st;
|
|
5417
|
+
it += (st = me[Ae]).rect.width * st.rect.height;
|
|
5418
5418
|
}
|
|
5419
|
-
return
|
|
5420
|
-
}(m, g, k, L,
|
|
5419
|
+
return me;
|
|
5420
|
+
}(m, g, k, L, v, _), ae = {}, te = [], Y = [];
|
|
5421
5421
|
if (I != 0) {
|
|
5422
5422
|
const Ne = [];
|
|
5423
5423
|
for ($ = 0; $ < X.length; $++) Ne.push(X[$].img.buffer);
|
|
5424
|
-
const le = function(
|
|
5424
|
+
const le = function(we) {
|
|
5425
5425
|
let Te = 0;
|
|
5426
|
-
for (var
|
|
5426
|
+
for (var me = 0; me < we.length; me++) Te += we[me].byteLength;
|
|
5427
5427
|
const ee = new Uint8Array(Te);
|
|
5428
5428
|
let Re = 0;
|
|
5429
|
-
for (
|
|
5430
|
-
const Ue = new Uint8Array(me
|
|
5431
|
-
for (let Ae = 0; Ae <
|
|
5432
|
-
let
|
|
5429
|
+
for (me = 0; me < we.length; me++) {
|
|
5430
|
+
const Ue = new Uint8Array(we[me]), it = Ue.length;
|
|
5431
|
+
for (let Ae = 0; Ae < it; Ae += 4) {
|
|
5432
|
+
let st = Ue[Ae], Le = Ue[Ae + 1], Ve = Ue[Ae + 2];
|
|
5433
5433
|
const xe = Ue[Ae + 3];
|
|
5434
|
-
xe == 0 && (
|
|
5434
|
+
xe == 0 && (st = Le = Ve = 0), ee[Re + Ae] = st, ee[Re + Ae + 1] = Le, ee[Re + Ae + 2] = Ve, ee[Re + Ae + 3] = xe;
|
|
5435
5435
|
}
|
|
5436
|
-
Re +=
|
|
5436
|
+
Re += it;
|
|
5437
5437
|
}
|
|
5438
5438
|
return ee.buffer;
|
|
5439
5439
|
}(Ne), ne = N(le, I);
|
|
5440
5440
|
for ($ = 0; $ < ne.plte.length; $++) te.push(ne.plte[$].est.rgba);
|
|
5441
|
-
let
|
|
5441
|
+
let ge = 0;
|
|
5442
5442
|
for ($ = 0; $ < X.length; $++) {
|
|
5443
|
-
const Ie = (
|
|
5444
|
-
var re = new Uint8Array(ne.inds.buffer,
|
|
5443
|
+
const Ie = (pe = X[$]).img.length;
|
|
5444
|
+
var re = new Uint8Array(ne.inds.buffer, ge >> 2, Ie >> 2);
|
|
5445
5445
|
Y.push(re);
|
|
5446
|
-
const
|
|
5447
|
-
M && a(
|
|
5446
|
+
const we = new Uint8Array(ne.abuf, ge, Ie);
|
|
5447
|
+
M && a(pe.img, pe.rect.width, pe.rect.height, te, we, re), pe.img.set(we), ge += Ie;
|
|
5448
5448
|
}
|
|
5449
5449
|
} else for (P = 0; P < X.length; P++) {
|
|
5450
|
-
var
|
|
5451
|
-
const Ne = new Uint32Array(
|
|
5452
|
-
var
|
|
5450
|
+
var pe = X[P];
|
|
5451
|
+
const Ne = new Uint32Array(pe.img.buffer);
|
|
5452
|
+
var be = pe.rect.width;
|
|
5453
5453
|
for (q = Ne.length, re = new Uint8Array(q), Y.push(re), $ = 0; $ < q; $++) {
|
|
5454
5454
|
const le = Ne[$];
|
|
5455
5455
|
if ($ != 0 && le == Ne[$ - 1]) re[$] = re[$ - 1];
|
|
5456
|
-
else if ($ >
|
|
5456
|
+
else if ($ > be && le == Ne[$ - be]) re[$] = re[$ - be];
|
|
5457
5457
|
else {
|
|
5458
5458
|
let ne = ae[le];
|
|
5459
5459
|
if (ne == null && (ae[le] = ne = te.length, te.push(le), te.length >= 300)) break;
|
|
@@ -5461,58 +5461,58 @@ const Ke = function() {
|
|
|
5461
5461
|
}
|
|
5462
5462
|
}
|
|
5463
5463
|
}
|
|
5464
|
-
const
|
|
5465
|
-
for (
|
|
5466
|
-
(
|
|
5467
|
-
const Ne =
|
|
5468
|
-
let le =
|
|
5464
|
+
const mt = te.length;
|
|
5465
|
+
for (mt <= 256 && p == 0 && (V = mt <= 2 ? 1 : mt <= 4 ? 2 : mt <= 16 ? 4 : 8, V = Math.max(V, w)), P = 0; P < X.length; P++) {
|
|
5466
|
+
(pe = X[P]).rect.x, pe.rect.y, be = pe.rect.width;
|
|
5467
|
+
const Ne = pe.rect.height;
|
|
5468
|
+
let le = pe.img;
|
|
5469
5469
|
new Uint32Array(le.buffer);
|
|
5470
|
-
let ne = 4 *
|
|
5471
|
-
if (
|
|
5472
|
-
ne = Math.ceil(V *
|
|
5470
|
+
let ne = 4 * be, ge = 4;
|
|
5471
|
+
if (mt <= 256 && p == 0) {
|
|
5472
|
+
ne = Math.ceil(V * be / 8);
|
|
5473
5473
|
var Pe = new Uint8Array(ne * Ne);
|
|
5474
5474
|
const Ie = Y[P];
|
|
5475
|
-
for (let
|
|
5476
|
-
$ =
|
|
5477
|
-
const Te =
|
|
5478
|
-
if (V == 8) for (var de = 0; de <
|
|
5479
|
-
else if (V == 4) for (de = 0; de <
|
|
5480
|
-
else if (V == 2) for (de = 0; de <
|
|
5481
|
-
else if (V == 1) for (de = 0; de <
|
|
5475
|
+
for (let we = 0; we < Ne; we++) {
|
|
5476
|
+
$ = we * ne;
|
|
5477
|
+
const Te = we * be;
|
|
5478
|
+
if (V == 8) for (var de = 0; de < be; de++) Pe[$ + de] = Ie[Te + de];
|
|
5479
|
+
else if (V == 4) for (de = 0; de < be; de++) Pe[$ + (de >> 1)] |= Ie[Te + de] << 4 - 4 * (1 & de);
|
|
5480
|
+
else if (V == 2) for (de = 0; de < be; de++) Pe[$ + (de >> 2)] |= Ie[Te + de] << 6 - 2 * (3 & de);
|
|
5481
|
+
else if (V == 1) for (de = 0; de < be; de++) Pe[$ + (de >> 3)] |= Ie[Te + de] << 7 - 1 * (7 & de);
|
|
5482
5482
|
}
|
|
5483
|
-
le = Pe, x = 3,
|
|
5483
|
+
le = Pe, x = 3, ge = 1;
|
|
5484
5484
|
} else if (S == 0 && X.length == 1) {
|
|
5485
|
-
Pe = new Uint8Array(
|
|
5486
|
-
const Ie =
|
|
5485
|
+
Pe = new Uint8Array(be * Ne * 3);
|
|
5486
|
+
const Ie = be * Ne;
|
|
5487
5487
|
for ($ = 0; $ < Ie; $++) {
|
|
5488
|
-
const
|
|
5489
|
-
Pe[
|
|
5488
|
+
const we = 3 * $, Te = 4 * $;
|
|
5489
|
+
Pe[we] = le[Te], Pe[we + 1] = le[Te + 1], Pe[we + 2] = le[Te + 2];
|
|
5490
5490
|
}
|
|
5491
|
-
le = Pe, x = 2,
|
|
5491
|
+
le = Pe, x = 2, ge = 3, ne = 3 * be;
|
|
5492
5492
|
}
|
|
5493
|
-
|
|
5493
|
+
pe.img = le, pe.bpl = ne, pe.bpp = ge;
|
|
5494
5494
|
}
|
|
5495
5495
|
return { ctype: x, depth: V, plte: te, frames: X };
|
|
5496
5496
|
}
|
|
5497
|
-
function u(m, g, k, I, F, L,
|
|
5497
|
+
function u(m, g, k, I, F, L, v) {
|
|
5498
5498
|
const _ = Uint8Array, w = Uint32Array, p = new _(m[F - 1]), M = new w(m[F - 1]), x = F + 1 < m.length ? new _(m[F + 1]) : null, V = new _(m[F]), Z = new w(V.buffer);
|
|
5499
5499
|
let P = g, q = k, $ = -1, S = -1;
|
|
5500
5500
|
for (let ae = 0; ae < L.height; ae++) for (let te = 0; te < L.width; te++) {
|
|
5501
|
-
const Y = L.x + te, re = L.y + ae,
|
|
5502
|
-
|
|
5501
|
+
const Y = L.x + te, re = L.y + ae, pe = re * g + Y, be = Z[pe];
|
|
5502
|
+
be == 0 || I[F - 1].dispose == 0 && M[pe] == be && (x == null || x[4 * pe + 3] != 0) || (Y < P && (P = Y), Y > $ && ($ = Y), re < q && (q = re), re > S && (S = re));
|
|
5503
5503
|
}
|
|
5504
|
-
$ == -1 && (P = q = $ = S = 0),
|
|
5504
|
+
$ == -1 && (P = q = $ = S = 0), v && ((1 & P) == 1 && P--, (1 & q) == 1 && q--), L = { x: P, y: q, width: $ - P + 1, height: S - q + 1 };
|
|
5505
5505
|
const X = I[F];
|
|
5506
5506
|
X.rect = L, X.blend = 1, X.img = new Uint8Array(L.width * L.height * 4), I[F - 1].dispose == 0 ? (s(p, g, k, X.img, L.width, L.height, -L.x, -L.y, 0), d(V, g, k, X.img, L)) : s(V, g, k, X.img, L.width, L.height, -L.x, -L.y, 0);
|
|
5507
5507
|
}
|
|
5508
5508
|
function d(m, g, k, I, F) {
|
|
5509
5509
|
s(m, g, k, I, F.width, F.height, -F.x, -F.y, 2);
|
|
5510
5510
|
}
|
|
5511
|
-
function f(m, g, k, I, F, L,
|
|
5511
|
+
function f(m, g, k, I, F, L, v) {
|
|
5512
5512
|
const _ = [];
|
|
5513
5513
|
let w, p = [0, 1, 2, 3, 4];
|
|
5514
|
-
L != -1 ? p = [L] : (g * I > 5e5 || k == 1) && (p = [0]),
|
|
5515
|
-
const M =
|
|
5514
|
+
L != -1 ? p = [L] : (g * I > 5e5 || k == 1) && (p = [0]), v && (w = { level: 0 });
|
|
5515
|
+
const M = $s;
|
|
5516
5516
|
for (var x = 0; x < p.length; x++) {
|
|
5517
5517
|
for (let P = 0; P < g; P++) y(F, m, P, I, k, p[x]);
|
|
5518
5518
|
_.push(M.deflate(F, w));
|
|
@@ -5522,38 +5522,38 @@ const Ke = function() {
|
|
|
5522
5522
|
return _[V];
|
|
5523
5523
|
}
|
|
5524
5524
|
function y(m, g, k, I, F, L) {
|
|
5525
|
-
const
|
|
5526
|
-
let _ =
|
|
5527
|
-
if (m[_] = L, _++, L == 0) if (I < 500) for (var w = 0; w < I; w++) m[_ + w] = g[
|
|
5528
|
-
else m.set(new Uint8Array(g.buffer,
|
|
5525
|
+
const v = k * I;
|
|
5526
|
+
let _ = v + k;
|
|
5527
|
+
if (m[_] = L, _++, L == 0) if (I < 500) for (var w = 0; w < I; w++) m[_ + w] = g[v + w];
|
|
5528
|
+
else m.set(new Uint8Array(g.buffer, v, I), _);
|
|
5529
5529
|
else if (L == 1) {
|
|
5530
|
-
for (w = 0; w < F; w++) m[_ + w] = g[
|
|
5531
|
-
for (w = F; w < I; w++) m[_ + w] = g[
|
|
5530
|
+
for (w = 0; w < F; w++) m[_ + w] = g[v + w];
|
|
5531
|
+
for (w = F; w < I; w++) m[_ + w] = g[v + w] - g[v + w - F] + 256 & 255;
|
|
5532
5532
|
} else if (k == 0) {
|
|
5533
|
-
for (w = 0; w < F; w++) m[_ + w] = g[
|
|
5534
|
-
if (L == 2) for (w = F; w < I; w++) m[_ + w] = g[
|
|
5535
|
-
if (L == 3) for (w = F; w < I; w++) m[_ + w] = g[
|
|
5536
|
-
if (L == 4) for (w = F; w < I; w++) m[_ + w] = g[
|
|
5533
|
+
for (w = 0; w < F; w++) m[_ + w] = g[v + w];
|
|
5534
|
+
if (L == 2) for (w = F; w < I; w++) m[_ + w] = g[v + w];
|
|
5535
|
+
if (L == 3) for (w = F; w < I; w++) m[_ + w] = g[v + w] - (g[v + w - F] >> 1) + 256 & 255;
|
|
5536
|
+
if (L == 4) for (w = F; w < I; w++) m[_ + w] = g[v + w] - t(g[v + w - F], 0, 0) + 256 & 255;
|
|
5537
5537
|
} else {
|
|
5538
|
-
if (L == 2) for (w = 0; w < I; w++) m[_ + w] = g[
|
|
5538
|
+
if (L == 2) for (w = 0; w < I; w++) m[_ + w] = g[v + w] + 256 - g[v + w - I] & 255;
|
|
5539
5539
|
if (L == 3) {
|
|
5540
|
-
for (w = 0; w < F; w++) m[_ + w] = g[
|
|
5541
|
-
for (w = F; w < I; w++) m[_ + w] = g[
|
|
5540
|
+
for (w = 0; w < F; w++) m[_ + w] = g[v + w] + 256 - (g[v + w - I] >> 1) & 255;
|
|
5541
|
+
for (w = F; w < I; w++) m[_ + w] = g[v + w] + 256 - (g[v + w - I] + g[v + w - F] >> 1) & 255;
|
|
5542
5542
|
}
|
|
5543
5543
|
if (L == 4) {
|
|
5544
|
-
for (w = 0; w < F; w++) m[_ + w] = g[
|
|
5545
|
-
for (w = F; w < I; w++) m[_ + w] = g[
|
|
5544
|
+
for (w = 0; w < F; w++) m[_ + w] = g[v + w] + 256 - t(0, g[v + w - I], 0) & 255;
|
|
5545
|
+
for (w = F; w < I; w++) m[_ + w] = g[v + w] + 256 - t(g[v + w - F], g[v + w - I], g[v + w - F - I]) & 255;
|
|
5546
5546
|
}
|
|
5547
5547
|
}
|
|
5548
5548
|
}
|
|
5549
5549
|
function N(m, g) {
|
|
5550
|
-
const k = new Uint8Array(m), I = k.slice(0), F = new Uint32Array(I.buffer), L = T(I, g),
|
|
5550
|
+
const k = new Uint8Array(m), I = k.slice(0), F = new Uint32Array(I.buffer), L = T(I, g), v = L[0], _ = L[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(
|
|
5553
|
+
M = C(v, 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, F[x >> 2] = M.est.rgba;
|
|
5554
5554
|
else for (x = 0; x < w; x += 4) {
|
|
5555
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 =
|
|
5556
|
+
for (M = v; M.left; ) M = R(M.est, V, Z, P, q) <= 0 ? M.left : M.right;
|
|
5557
5557
|
p[x >> 2] = M.ind, F[x >> 2] = M.est.rgba;
|
|
5558
5558
|
}
|
|
5559
5559
|
return { abuf: I.buffer, inds: p, plte: _ };
|
|
@@ -5565,7 +5565,7 @@ const Ke = function() {
|
|
|
5565
5565
|
const L = [F];
|
|
5566
5566
|
for (; L.length < g; ) {
|
|
5567
5567
|
let _ = 0, w = 0;
|
|
5568
|
-
for (var
|
|
5568
|
+
for (var v = 0; v < L.length; v++) L[v].est.L > _ && (_ = L[v].est.L, w = v);
|
|
5569
5569
|
if (_ < k) break;
|
|
5570
5570
|
const p = L[w], M = O(m, I, p.i0, p.i1, p.est.e, p.est.eMq255);
|
|
5571
5571
|
if (p.i0 >= M || p.i1 <= M) {
|
|
@@ -5575,11 +5575,11 @@ const Ke = function() {
|
|
|
5575
5575
|
const x = { i0: p.i0, i1: M, bst: null, est: null, tdst: 0, left: null, right: null };
|
|
5576
5576
|
x.bst = U(m, x.i0, x.i1), x.est = b(x.bst);
|
|
5577
5577
|
const V = { i0: M, i1: p.i1, bst: null, est: null, tdst: 0, left: null, right: null };
|
|
5578
|
-
for (V.bst = { R: [], m: [], N: p.bst.N - x.bst.N },
|
|
5579
|
-
for (
|
|
5578
|
+
for (V.bst = { R: [], m: [], N: p.bst.N - x.bst.N }, v = 0; v < 16; v++) V.bst.R[v] = p.bst.R[v] - x.bst.R[v];
|
|
5579
|
+
for (v = 0; v < 4; v++) V.bst.m[v] = p.bst.m[v] - x.bst.m[v];
|
|
5580
5580
|
V.est = b(V.bst), p.left = x, p.right = V, L[w] = x, L.push(V);
|
|
5581
5581
|
}
|
|
5582
|
-
for (L.sort((_, w) => w.bst.N - _.bst.N),
|
|
5582
|
+
for (L.sort((_, w) => w.bst.N - _.bst.N), v = 0; v < L.length; v++) L[v].ind = v;
|
|
5583
5583
|
return [F, L];
|
|
5584
5584
|
}
|
|
5585
5585
|
function C(m, g, k, I, F) {
|
|
@@ -5588,9 +5588,9 @@ const Ke = function() {
|
|
|
5588
5588
|
return $ * $ + S * S + X * X + ae * ae;
|
|
5589
5589
|
}(m.est.q, g, k, I, F), m;
|
|
5590
5590
|
const L = R(m.est, g, k, I, F);
|
|
5591
|
-
let
|
|
5592
|
-
L > 0 && (
|
|
5593
|
-
const w = C(
|
|
5591
|
+
let v = m.left, _ = m.right;
|
|
5592
|
+
L > 0 && (v = m.right, _ = m.left);
|
|
5593
|
+
const w = C(v, g, k, I, F);
|
|
5594
5594
|
if (w.tdst <= L * L) return w;
|
|
5595
5595
|
const p = C(_, g, k, I, F);
|
|
5596
5596
|
return p.tdst < w.tdst ? p : w;
|
|
@@ -5604,8 +5604,8 @@ const Ke = function() {
|
|
|
5604
5604
|
for (; A(m, k, F) <= L; ) k += 4;
|
|
5605
5605
|
for (; A(m, I, F) > L; ) I -= 4;
|
|
5606
5606
|
if (k >= I) break;
|
|
5607
|
-
const
|
|
5608
|
-
g[k >> 2] = g[I >> 2], g[I >> 2] =
|
|
5607
|
+
const v = g[k >> 2];
|
|
5608
|
+
g[k >> 2] = g[I >> 2], g[I >> 2] = v, k += 4, I -= 4;
|
|
5609
5609
|
}
|
|
5610
5610
|
for (; A(m, k, F) > L; ) k -= 4;
|
|
5611
5611
|
return k + 4;
|
|
@@ -5615,31 +5615,31 @@ const Ke = function() {
|
|
|
5615
5615
|
}
|
|
5616
5616
|
function U(m, g, k) {
|
|
5617
5617
|
const I = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], F = [0, 0, 0, 0], L = k - g >> 2;
|
|
5618
|
-
for (let
|
|
5619
|
-
const _ = m[
|
|
5618
|
+
for (let v = g; v < k; v += 4) {
|
|
5619
|
+
const _ = m[v] * 0.00392156862745098, w = m[v + 1] * (1 / 255), p = m[v + 2] * (1 / 255), M = m[v + 3] * (1 / 255);
|
|
5620
5620
|
F[0] += _, F[1] += w, F[2] += p, F[3] += M, I[0] += _ * _, I[1] += _ * w, I[2] += _ * p, I[3] += _ * M, I[5] += w * w, I[6] += w * p, I[7] += w * M, I[10] += p * p, I[11] += p * M, I[15] += M * M;
|
|
5621
5621
|
}
|
|
5622
5622
|
return I[4] = I[1], I[8] = I[2], I[9] = I[6], I[12] = I[3], I[13] = I[7], I[14] = I[11], { R: I, m: F, N: L };
|
|
5623
5623
|
}
|
|
5624
5624
|
function b(m) {
|
|
5625
|
-
const { R: g } = m, { m: k } = m, { N: I } = m, F = k[0], L = k[1],
|
|
5625
|
+
const { R: g } = m, { m: k } = m, { N: I } = m, F = k[0], L = k[1], v = k[2], _ = k[3], w = I == 0 ? 0 : 1 / I, p = [g[0] - F * F * w, g[1] - F * L * w, g[2] - F * v * w, g[3] - F * _ * w, g[4] - L * F * w, g[5] - L * L * w, g[6] - L * v * w, g[7] - L * _ * w, g[8] - v * F * w, g[9] - v * L * w, g[10] - v * v * w, g[11] - v * _ * w, g[12] - _ * F * w, g[13] - _ * L * w, g[14] - _ * v * w, g[15] - _ * _ * w], M = p, x = B;
|
|
5626
5626
|
let V = [Math.random(), Math.random(), Math.random(), Math.random()], Z = 0, P = 0;
|
|
5627
5627
|
if (I != 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 = [F * w, L * w,
|
|
5628
|
+
const q = [F * w, L * w, v * w, _ * w];
|
|
5629
5629
|
return { Cov: p, q, e: V, L: Z, eMq255: x.dot(x.sml(255, q), V), eMq: x.dot(V, q), rgba: (Math.round(255 * q[3]) << 24 | Math.round(255 * q[2]) << 16 | Math.round(255 * q[1]) << 8 | Math.round(255 * q[0]) << 0) >>> 0 };
|
|
5630
5630
|
}
|
|
5631
5631
|
var B = { multVec: (m, g) => [m[0] * g[0] + m[1] * g[1] + m[2] * g[2] + m[3] * g[3], m[4] * g[0] + m[5] * g[1] + m[6] * g[2] + m[7] * g[3], m[8] * g[0] + m[9] * g[1] + m[10] * g[2] + m[11] * g[3], m[12] * g[0] + m[13] * g[1] + m[14] * g[2] + m[15] * g[3]], dot: (m, g) => m[0] * g[0] + m[1] * g[1] + m[2] * g[2] + m[3] * g[3], sml: (m, g) => [m * g[0], m * g[1], m * g[2], m * g[3]] };
|
|
5632
|
-
Ke.encode = function(g, k, I, F, L,
|
|
5632
|
+
Ke.encode = function(g, k, I, F, L, v, _) {
|
|
5633
5633
|
F == null && (F = 0), _ == null && (_ = !1);
|
|
5634
5634
|
const w = l(g, k, I, F, [!1, !1, !1, 0, _, !1]);
|
|
5635
|
-
return h(w, -1), c(w, k, I, L,
|
|
5636
|
-
}, Ke.encodeLL = function(g, k, I, F, L,
|
|
5637
|
-
const p = { ctype: 0 + (F == 1 ? 0 : 2) + (L == 0 ? 0 : 4), depth:
|
|
5635
|
+
return h(w, -1), c(w, k, I, L, v);
|
|
5636
|
+
}, Ke.encodeLL = function(g, k, I, F, L, v, _, w) {
|
|
5637
|
+
const p = { ctype: 0 + (F == 1 ? 0 : 2) + (L == 0 ? 0 : 4), depth: v, frames: [] }, M = (F + L) * v, x = M * k;
|
|
5638
5638
|
for (let V = 0; V < g.length; V++) p.frames.push({ rect: { x: 0, y: 0, width: k, height: I }, 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, I, _, w);
|
|
5640
5640
|
}, Ke.encode.compress = l, Ke.encode.dither = a, Ke.quantize = N, Ke.quantize.getKDtree = T, Ke.quantize.getNearest = C;
|
|
5641
5641
|
})();
|
|
5642
|
-
const
|
|
5642
|
+
const Zr = { toArrayBuffer(s, e) {
|
|
5643
5643
|
const t = s.width, r = s.height, n = t << 2, i = s.getContext("2d").getImageData(0, 0, t, r), o = new Uint32Array(i.data.buffer), a = (32 * t + 31) / 32 << 2, c = a * r, h = 122 + c, l = new ArrayBuffer(h), u = new DataView(l), d = 1 << 20;
|
|
5644
5644
|
let f, y, N, T, C = d, R = 0, O = 0, A = 0;
|
|
5645
5645
|
function U(m) {
|
|
@@ -5656,16 +5656,16 @@ const qr = { toArrayBuffer(s, e) {
|
|
|
5656
5656
|
for (T = 122 + R * a, f = 0; f < n; ) C--, y = o[A++], N = y >>> 24, u.setUint32(T + f, y << 8 | N), f += 4;
|
|
5657
5657
|
R++;
|
|
5658
5658
|
}
|
|
5659
|
-
A < o.length ? (C = d, setTimeout(m,
|
|
5659
|
+
A < 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 He = { CHROME: "CHROME", FIREFOX: "FIREFOX", DESKTOP_SAFARI: "DESKTOP_SAFARI", IE: "IE", IOS: "IOS", ETC: "ETC" }, Ps = { [He.CHROME]: 16384, [He.FIREFOX]: 11180, [He.DESKTOP_SAFARI]: 16384, [He.IE]: 8192, [He.IOS]: 4096, [He.ETC]: 8192 };
|
|
5667
|
+
const Qn = typeof window < "u", Kr = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, vn = Qn && window.cordova && window.cordova.require && window.cordova.require("cordova/modulemapper"), Ws = (Qn || Kr) && (vn && vn.getOriginalSymbol(window, "File") || typeof File < "u" && File), zr = (Qn || Kr) && (vn && vn.getOriginalSymbol(window, "FileReader") || typeof FileReader < "u" && FileReader);
|
|
5668
|
+
function Yn(s, e, t = Date.now()) {
|
|
5669
5669
|
return new Promise((r) => {
|
|
5670
5670
|
const n = s.split(","), i = n[0].match(/:(.*?);/)[1], o = globalThis.atob(n[1]);
|
|
5671
5671
|
let a = o.length;
|
|
@@ -5675,13 +5675,13 @@ function Jn(s, e, t = Date.now()) {
|
|
|
5675
5675
|
h.name = e, h.lastModified = t, r(h);
|
|
5676
5676
|
});
|
|
5677
5677
|
}
|
|
5678
|
-
function
|
|
5678
|
+
function Xr(s) {
|
|
5679
5679
|
return new Promise((e, t) => {
|
|
5680
|
-
const r = new
|
|
5680
|
+
const r = new zr();
|
|
5681
5681
|
r.onload = () => e(r.result), r.onerror = (n) => t(n), r.readAsDataURL(s);
|
|
5682
5682
|
});
|
|
5683
5683
|
}
|
|
5684
|
-
function
|
|
5684
|
+
function Gr(s) {
|
|
5685
5685
|
return new Promise((e, t) => {
|
|
5686
5686
|
const r = new Image();
|
|
5687
5687
|
r.onload = () => e(r), r.onerror = (n) => t(n), r.src = s;
|
|
@@ -5689,12 +5689,12 @@ function Xr(s) {
|
|
|
5689
5689
|
}
|
|
5690
5690
|
function _t() {
|
|
5691
5691
|
if (_t.cachedResult !== void 0) return _t.cachedResult;
|
|
5692
|
-
let s =
|
|
5692
|
+
let s = He.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 = He.CHROME : /iP(ad|od|hone)/i.test(e) && /WebKit/i.test(e) ? s = He.IOS : /Safari/i.test(e) ? s = He.DESKTOP_SAFARI : /Firefox/i.test(e) ? s = He.FIREFOX : (/MSIE/i.test(e) || document.documentMode) && (s = He.IE), _t.cachedResult = s, _t.cachedResult;
|
|
5695
5695
|
}
|
|
5696
|
-
function
|
|
5697
|
-
const t = _t(), r =
|
|
5696
|
+
function Jr(s, e) {
|
|
5697
|
+
const t = _t(), r = Ps[t];
|
|
5698
5698
|
let n = s, i = e, o = n * i;
|
|
5699
5699
|
const a = n > i ? i / n : n / i;
|
|
5700
5700
|
for (; o > r * r; ) {
|
|
@@ -5703,7 +5703,7 @@ function Gr(s, e) {
|
|
|
5703
5703
|
}
|
|
5704
5704
|
return { width: n, height: i };
|
|
5705
5705
|
}
|
|
5706
|
-
function
|
|
5706
|
+
function Un(s, e) {
|
|
5707
5707
|
let t, r;
|
|
5708
5708
|
try {
|
|
5709
5709
|
if (t = new OffscreenCanvas(s, e), r = t.getContext("2d"), r === null) throw new Error("getContext of OffscreenCanvas returns null");
|
|
@@ -5712,19 +5712,19 @@ function Ln(s, e) {
|
|
|
5712
5712
|
}
|
|
5713
5713
|
return t.width = s, t.height = e, [t, r];
|
|
5714
5714
|
}
|
|
5715
|
-
function
|
|
5716
|
-
const { width: t, height: r } =
|
|
5715
|
+
function Qr(s, e) {
|
|
5716
|
+
const { width: t, height: r } = Jr(s.width, s.height), [n, i] = Un(t, r);
|
|
5717
5717
|
return e && /jpe?g/.test(e) && (i.fillStyle = "white", i.fillRect(0, 0, n.width, n.height)), i.drawImage(s, 0, 0, n.width, n.height), n;
|
|
5718
5718
|
}
|
|
5719
|
-
function
|
|
5720
|
-
return
|
|
5719
|
+
function wn() {
|
|
5720
|
+
return wn.cachedResult !== void 0 || (wn.cachedResult = ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && typeof document < "u" && "ontouchend" in document), wn.cachedResult;
|
|
5721
5721
|
}
|
|
5722
|
-
function
|
|
5722
|
+
function An(s, e = {}) {
|
|
5723
5723
|
return new Promise(function(t, r) {
|
|
5724
5724
|
let n, i;
|
|
5725
5725
|
var o = function() {
|
|
5726
5726
|
try {
|
|
5727
|
-
return i =
|
|
5727
|
+
return i = Qr(n, e.fileType || s.type), t([n, i]);
|
|
5728
5728
|
} catch (c) {
|
|
5729
5729
|
return r(c);
|
|
5730
5730
|
}
|
|
@@ -5739,9 +5739,9 @@ function vn(s, e = {}) {
|
|
|
5739
5739
|
};
|
|
5740
5740
|
try {
|
|
5741
5741
|
let l;
|
|
5742
|
-
return
|
|
5742
|
+
return Xr(s).then(function(u) {
|
|
5743
5743
|
try {
|
|
5744
|
-
return l = u,
|
|
5744
|
+
return l = u, Gr(l).then(function(d) {
|
|
5745
5745
|
try {
|
|
5746
5746
|
return n = d, function() {
|
|
5747
5747
|
try {
|
|
@@ -5766,7 +5766,7 @@ function vn(s, e = {}) {
|
|
|
5766
5766
|
}
|
|
5767
5767
|
};
|
|
5768
5768
|
try {
|
|
5769
|
-
if (
|
|
5769
|
+
if (wn() || [He.DESKTOP_SAFARI, He.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 n = c, o();
|
|
@@ -5779,7 +5779,7 @@ function vn(s, e = {}) {
|
|
|
5779
5779
|
}
|
|
5780
5780
|
});
|
|
5781
5781
|
}
|
|
5782
|
-
function
|
|
5782
|
+
function kn(s, e, t, r, n = 1) {
|
|
5783
5783
|
return new Promise(function(i, o) {
|
|
5784
5784
|
let a;
|
|
5785
5785
|
if (e === "image/png") {
|
|
@@ -5790,7 +5790,7 @@ function An(s, e, t, r, n = 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 = r, h.call(this);
|
|
5796
5796
|
} catch (u) {
|
|
@@ -5810,7 +5810,7 @@ function An(s, e, t, r, n = 1) {
|
|
|
5810
5810
|
}).bind(this), o);
|
|
5811
5811
|
{
|
|
5812
5812
|
let u;
|
|
5813
|
-
return u = s.toDataURL(e, n),
|
|
5813
|
+
return u = s.toDataURL(e, n), Yn(u, t, r).then((function(d) {
|
|
5814
5814
|
try {
|
|
5815
5815
|
return a = d, l.call(this);
|
|
5816
5816
|
} catch (f) {
|
|
@@ -5825,21 +5825,21 @@ function An(s, e, t, r, n = 1) {
|
|
|
5825
5825
|
}
|
|
5826
5826
|
});
|
|
5827
5827
|
}
|
|
5828
|
-
function
|
|
5828
|
+
function ft(s) {
|
|
5829
5829
|
s.width = 0, s.height = 0;
|
|
5830
5830
|
}
|
|
5831
|
-
function
|
|
5831
|
+
function Pt() {
|
|
5832
5832
|
return new Promise(function(s, e) {
|
|
5833
5833
|
let t, r, n, i;
|
|
5834
|
-
return
|
|
5834
|
+
return Pt.cachedResult !== void 0 ? s(Pt.cachedResult) : Yn("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==", "test.jpg", Date.now()).then(function(o) {
|
|
5835
5835
|
try {
|
|
5836
|
-
return t = o,
|
|
5836
|
+
return t = o, An(t).then(function(a) {
|
|
5837
5837
|
try {
|
|
5838
|
-
return r = a[1],
|
|
5838
|
+
return r = a[1], kn(r, t.type, t.name, t.lastModified).then(function(c) {
|
|
5839
5839
|
try {
|
|
5840
|
-
return n = c,
|
|
5840
|
+
return n = c, ft(r), An(n).then(function(h) {
|
|
5841
5841
|
try {
|
|
5842
|
-
return i = h[0],
|
|
5842
|
+
return i = h[0], Pt.cachedResult = i.width === 1 && i.height === 2, s(Pt.cachedResult);
|
|
5843
5843
|
} catch (l) {
|
|
5844
5844
|
return e(l);
|
|
5845
5845
|
}
|
|
@@ -5858,9 +5858,9 @@ function Ht() {
|
|
|
5858
5858
|
}, e);
|
|
5859
5859
|
});
|
|
5860
5860
|
}
|
|
5861
|
-
function
|
|
5861
|
+
function Yr(s) {
|
|
5862
5862
|
return new Promise((e, t) => {
|
|
5863
|
-
const r = new
|
|
5863
|
+
const r = new zr();
|
|
5864
5864
|
r.onload = (n) => {
|
|
5865
5865
|
const i = new DataView(n.target.result);
|
|
5866
5866
|
if (i.getUint16(0, !1) != 65496) return e(-2);
|
|
@@ -5885,13 +5885,13 @@ function Qr(s) {
|
|
|
5885
5885
|
}, r.onerror = (n) => t(n), r.readAsArrayBuffer(s);
|
|
5886
5886
|
});
|
|
5887
5887
|
}
|
|
5888
|
-
function
|
|
5888
|
+
function ei(s, e) {
|
|
5889
5889
|
const { width: t } = s, { height: r } = s, { maxWidthOrHeight: n } = e;
|
|
5890
5890
|
let i, o = s;
|
|
5891
|
-
return isFinite(n) && (t > n || r > n) && ([o, i] =
|
|
5891
|
+
return isFinite(n) && (t > n || r > n) && ([o, i] = Un(t, r), t > r ? (o.width = n, o.height = r / t * n) : (o.width = t / r * n, o.height = n), i.drawImage(s, 0, 0, o.width, o.height), ft(s)), o;
|
|
5892
5892
|
}
|
|
5893
|
-
function
|
|
5894
|
-
const { width: t } = s, { height: r } = s, [n, i] =
|
|
5893
|
+
function ti(s, e) {
|
|
5894
|
+
const { width: t } = s, { height: r } = s, [n, i] = Un(t, r);
|
|
5895
5895
|
switch (e > 4 && e < 9 ? (n.width = r, n.height = t) : (n.width = t, n.height = r), e) {
|
|
5896
5896
|
case 2:
|
|
5897
5897
|
i.transform(-1, 0, 0, 1, t, 0);
|
|
@@ -5914,9 +5914,9 @@ function ei(s, e) {
|
|
|
5914
5914
|
case 8:
|
|
5915
5915
|
i.transform(0, -1, 1, 0, 0, t);
|
|
5916
5916
|
}
|
|
5917
|
-
return i.drawImage(s, 0, 0, t, r),
|
|
5917
|
+
return i.drawImage(s, 0, 0, t, r), ft(s), n;
|
|
5918
5918
|
}
|
|
5919
|
-
function
|
|
5919
|
+
function Ar(s, e, t = 0) {
|
|
5920
5920
|
return new Promise(function(r, n) {
|
|
5921
5921
|
let i, o, a, c, h, l, u, d, f, y, N, T, C, R, O, A, U, b, B, m;
|
|
5922
5922
|
function g(I = 5) {
|
|
@@ -5927,34 +5927,34 @@ function vr(s, e, t = 0) {
|
|
|
5927
5927
|
if (e.signal && e.signal.aborted) throw e.signal.reason;
|
|
5928
5928
|
i = Math.min(Math.max(I, i), 100), e.onProgress(i);
|
|
5929
5929
|
}
|
|
5930
|
-
return i = t, o = e.maxIteration || 10, a = 1024 * e.maxSizeMB * 1024, g(),
|
|
5930
|
+
return i = t, o = e.maxIteration || 10, a = 1024 * e.maxSizeMB * 1024, g(), An(s, e).then((function(I) {
|
|
5931
5931
|
try {
|
|
5932
|
-
return [, c] = I, g(), h =
|
|
5933
|
-
var
|
|
5934
|
-
if (!(
|
|
5932
|
+
return [, c] = I, g(), h = ei(c, e), g(), new Promise(function(F, L) {
|
|
5933
|
+
var v;
|
|
5934
|
+
if (!(v = e.exifOrientation)) return Yr(s).then((function(w) {
|
|
5935
5935
|
try {
|
|
5936
|
-
return
|
|
5936
|
+
return v = w, _.call(this);
|
|
5937
5937
|
} catch (p) {
|
|
5938
5938
|
return L(p);
|
|
5939
5939
|
}
|
|
5940
5940
|
}).bind(this), L);
|
|
5941
5941
|
function _() {
|
|
5942
|
-
return F(
|
|
5942
|
+
return F(v);
|
|
5943
5943
|
}
|
|
5944
5944
|
return _.call(this);
|
|
5945
5945
|
}).then((function(F) {
|
|
5946
5946
|
try {
|
|
5947
|
-
return l = F, g(),
|
|
5947
|
+
return l = F, g(), Pt().then((function(L) {
|
|
5948
5948
|
try {
|
|
5949
|
-
return u = L ? h :
|
|
5949
|
+
return u = L ? h : ti(h, l), g(), d = e.initialQuality || 1, f = e.fileType || s.type, kn(u, f, s.name, s.lastModified, d).then((function(v) {
|
|
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, [U, b] =
|
|
5955
|
+
return M = m ? 0.95 * B.width : B.width, x = m ? 0.95 * B.height : B.height, [U, b] = Un(M, x), b.drawImage(B, 0, 0, M, x), d *= f === "image/png" ? 0.85 : 0.95, kn(U, f, s.name, s.lastModified, d).then(function(V) {
|
|
5956
5956
|
try {
|
|
5957
|
-
return A = V,
|
|
5957
|
+
return A = V, ft(B), B = U, O = A.size, k(Math.min(99, Math.floor((R - O) / (R - a) * 100))), w;
|
|
5958
5958
|
} catch (Z) {
|
|
5959
5959
|
return n(Z);
|
|
5960
5960
|
}
|
|
@@ -5962,9 +5962,9 @@ function vr(s, e, t = 0) {
|
|
|
5962
5962
|
}
|
|
5963
5963
|
return [1];
|
|
5964
5964
|
}, p = function() {
|
|
5965
|
-
return
|
|
5965
|
+
return ft(B), ft(U), ft(h), ft(u), ft(c), k(100), r(A);
|
|
5966
5966
|
};
|
|
5967
|
-
if (y =
|
|
5967
|
+
if (y = v, g(), N = y.size > a, T = y.size > s.size, !N && !T) return k(100), r(y);
|
|
5968
5968
|
var _;
|
|
5969
5969
|
return C = s.size, R = y.size, O = R, B = u, m = !e.alwaysKeepResolution && N, (_ = (function(M) {
|
|
5970
5970
|
for (; M; ) {
|
|
@@ -5984,8 +5984,8 @@ function vr(s, e, t = 0) {
|
|
|
5984
5984
|
return n(w);
|
|
5985
5985
|
}
|
|
5986
5986
|
}).bind(this), n);
|
|
5987
|
-
} catch (
|
|
5988
|
-
return n(
|
|
5987
|
+
} catch (v) {
|
|
5988
|
+
return n(v);
|
|
5989
5989
|
}
|
|
5990
5990
|
}).bind(this), n);
|
|
5991
5991
|
} catch (L) {
|
|
@@ -5998,7 +5998,7 @@ function vr(s, e, t = 0) {
|
|
|
5998
5998
|
}).bind(this), n);
|
|
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
|
|
@@ -6018,14 +6018,14 @@ self.addEventListener('message', async (e) => {
|
|
|
6018
6018
|
}
|
|
6019
6019
|
})
|
|
6020
6020
|
`;
|
|
6021
|
-
let
|
|
6022
|
-
function
|
|
6021
|
+
let Hn;
|
|
6022
|
+
function qs(s, e) {
|
|
6023
6023
|
return new Promise((t, r) => {
|
|
6024
|
-
|
|
6024
|
+
Hn || (Hn = function(o) {
|
|
6025
6025
|
const a = [];
|
|
6026
6026
|
return a.push(o), URL.createObjectURL(new Blob(a));
|
|
6027
|
-
}(
|
|
6028
|
-
const n = new Worker(
|
|
6027
|
+
}(js));
|
|
6028
|
+
const n = new Worker(Hn);
|
|
6029
6029
|
n.addEventListener("message", function(o) {
|
|
6030
6030
|
if (e.signal && e.signal.aborted) n.terminate();
|
|
6031
6031
|
else if (o.data.progress === void 0) {
|
|
@@ -6042,9 +6042,9 @@ function Be(s, e) {
|
|
|
6042
6042
|
let n, i, o, a, c, h;
|
|
6043
6043
|
if (n = { ...e }, o = 0, { onProgress: a } = n, n.maxSizeMB = n.maxSizeMB || Number.POSITIVE_INFINITY, c = typeof n.useWebWorker != "boolean" || n.useWebWorker, delete n.useWebWorker, n.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 r(new Error("The file given is not an instance of Blob or File"));
|
|
6046
6046
|
if (!/^image/.test(s.type)) return r(new Error("The file given is not an image"));
|
|
6047
|
-
if (h = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, !c || typeof Worker != "function" || h) return
|
|
6047
|
+
if (h = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, !c || typeof Worker != "function" || h) return Ar(s, n).then((function(f) {
|
|
6048
6048
|
try {
|
|
6049
6049
|
return i = f, d.call(this);
|
|
6050
6050
|
} catch (y) {
|
|
@@ -6059,7 +6059,7 @@ function Be(s, e) {
|
|
|
6059
6059
|
}
|
|
6060
6060
|
}).bind(this), u = function(f) {
|
|
6061
6061
|
try {
|
|
6062
|
-
return
|
|
6062
|
+
return Ar(s, n).then(function(y) {
|
|
6063
6063
|
try {
|
|
6064
6064
|
return i = y, l();
|
|
6065
6065
|
} catch (N) {
|
|
@@ -6071,7 +6071,7 @@ function Be(s, e) {
|
|
|
6071
6071
|
}
|
|
6072
6072
|
};
|
|
6073
6073
|
try {
|
|
6074
|
-
return n.libURL = n.libURL || "https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",
|
|
6074
|
+
return n.libURL = n.libURL || "https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js", qs(s, n).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
|
-
n.preserveExif && s.type === "image/jpeg" && (!n.fileType || n.fileType && n.fileType === s.type) && (i =
|
|
6090
|
+
n.preserveExif && s.type === "image/jpeg" && (!n.fileType || n.fileType && n.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 =
|
|
6098
|
-
class
|
|
6097
|
+
Be.getDataUrlFromFile = Xr, Be.getFilefromDataUrl = Yn, Be.loadImage = Gr, Be.drawImageInCanvas = Qr, Be.drawFileInCanvas = An, Be.canvasToFile = kn, Be.getExifOrientation = Yr, Be.handleMaxWidthOrHeight = ei, Be.followExifOrientation = ti, Be.cleanupCanvasMemory = ft, Be.isAutoOrientationInBrowser = Pt, 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
|
{
|
|
@@ -6109,7 +6109,7 @@ class qs extends Fe {
|
|
|
6109
6109
|
}
|
|
6110
6110
|
create(e) {
|
|
6111
6111
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
6112
|
-
return t.mimeType = "", e !== void 0 &&
|
|
6112
|
+
return t.mimeType = "", e !== void 0 && ye(this, t, e), t;
|
|
6113
6113
|
}
|
|
6114
6114
|
internalBinaryRead(e, t, r, n) {
|
|
6115
6115
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -6136,8 +6136,8 @@ class qs extends Fe {
|
|
|
6136
6136
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
6137
6137
|
}
|
|
6138
6138
|
}
|
|
6139
|
-
const
|
|
6140
|
-
class
|
|
6139
|
+
const Fn = new Zs();
|
|
6140
|
+
class Ks extends Fe {
|
|
6141
6141
|
constructor() {
|
|
6142
6142
|
super("com.hamropatro.grpc.common.ImageUploadResponse", [
|
|
6143
6143
|
{
|
|
@@ -6165,7 +6165,7 @@ class Zs extends Fe {
|
|
|
6165
6165
|
}
|
|
6166
6166
|
create(e) {
|
|
6167
6167
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
6168
|
-
return t.key = "", t.uploadUrl = "", t.accessUrl = "", e !== void 0 &&
|
|
6168
|
+
return t.key = "", t.uploadUrl = "", t.accessUrl = "", e !== void 0 && ye(this, t, e), t;
|
|
6169
6169
|
}
|
|
6170
6170
|
internalBinaryRead(e, t, r, n) {
|
|
6171
6171
|
let i = n ?? this.create(), o = e.pos + t;
|
|
@@ -6200,15 +6200,15 @@ class Zs extends Fe {
|
|
|
6200
6200
|
return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
|
|
6201
6201
|
}
|
|
6202
6202
|
}
|
|
6203
|
-
const
|
|
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: Fn, O: kr },
|
|
6205
|
+
{ name: "UploadUserImage", options: {}, I: Fn, O: kr }
|
|
6206
6206
|
]);
|
|
6207
|
-
class
|
|
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
|
/**
|
|
@@ -6216,19 +6216,19 @@ class ti {
|
|
|
6216
6216
|
*/
|
|
6217
6217
|
upload(e, t) {
|
|
6218
6218
|
const r = this.methods[0], n = this._transport.mergeOptions(t);
|
|
6219
|
-
return
|
|
6219
|
+
return Me("unary", this._transport, r, n, e);
|
|
6220
6220
|
}
|
|
6221
6221
|
/**
|
|
6222
6222
|
* @generated from protobuf rpc: UploadUserImage(com.hamropatro.grpc.common.ImageUploadRequest) returns (com.hamropatro.grpc.common.ImageUploadResponse);
|
|
6223
6223
|
*/
|
|
6224
6224
|
uploadUserImage(e, t) {
|
|
6225
6225
|
const r = this.methods[1], n = this._transport.mergeOptions(t);
|
|
6226
|
-
return
|
|
6226
|
+
return Me("unary", this._transport, r, n, e);
|
|
6227
6227
|
}
|
|
6228
6228
|
}
|
|
6229
|
-
const
|
|
6229
|
+
const zs = async (s, e, t = !0) => {
|
|
6230
6230
|
var o;
|
|
6231
|
-
const r = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, n = new
|
|
6231
|
+
const r = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, n = new ni(r), i = Fn.create();
|
|
6232
6232
|
try {
|
|
6233
6233
|
return i.mimeType = s, t ? await n.upload(i, e) : await n.uploadUserImage(
|
|
6234
6234
|
i,
|
|
@@ -6237,9 +6237,9 @@ const Ks = async (s, e, t = !0) => {
|
|
|
6237
6237
|
} catch (a) {
|
|
6238
6238
|
throw a;
|
|
6239
6239
|
}
|
|
6240
|
-
},
|
|
6240
|
+
}, Xs = async (s, e) => {
|
|
6241
6241
|
var o, a;
|
|
6242
|
-
const t = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = (a = window.ImageSalonSDK) == null ? void 0 : a.mode, n = new
|
|
6242
|
+
const t = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = (a = window.ImageSalonSDK) == null ? void 0 : a.mode, n = new ni(t), i = Fn.create();
|
|
6243
6243
|
try {
|
|
6244
6244
|
return i.mimeType = s, await n.uploadUserImage(
|
|
6245
6245
|
i,
|
|
@@ -6253,16 +6253,16 @@ const Ks = async (s, e, t = !0) => {
|
|
|
6253
6253
|
} catch (c) {
|
|
6254
6254
|
throw c;
|
|
6255
6255
|
}
|
|
6256
|
-
},
|
|
6256
|
+
}, Fr = async (s, e, t, r = !0) => {
|
|
6257
6257
|
var n, i;
|
|
6258
6258
|
try {
|
|
6259
|
-
const o = await
|
|
6260
|
-
return await
|
|
6259
|
+
const o = await zs(e == null ? void 0 : e.type, t, r), a = (n = o.response) == null ? void 0 : n.uploadUrl, c = (i = o == null ? void 0 : o.response) == null ? void 0 : i.accessUrl;
|
|
6260
|
+
return await ri(s, a, e), c;
|
|
6261
6261
|
} catch (o) {
|
|
6262
6262
|
throw o;
|
|
6263
6263
|
}
|
|
6264
|
-
},
|
|
6265
|
-
const r =
|
|
6264
|
+
}, ri = async (s, e, t) => {
|
|
6265
|
+
const r = Js(s, t);
|
|
6266
6266
|
try {
|
|
6267
6267
|
await fetch(e, {
|
|
6268
6268
|
method: "PUT",
|
|
@@ -6274,15 +6274,15 @@ const Ks = async (s, e, t = !0) => {
|
|
|
6274
6274
|
} catch (n) {
|
|
6275
6275
|
throw n;
|
|
6276
6276
|
}
|
|
6277
|
-
},
|
|
6277
|
+
}, Gs = async (s, e, t) => {
|
|
6278
6278
|
var r, n;
|
|
6279
6279
|
try {
|
|
6280
|
-
const i = await
|
|
6281
|
-
return await
|
|
6280
|
+
const i = await Xs(e == null ? void 0 : e.type, t), o = (r = i.response) == null ? void 0 : r.uploadUrl, a = (n = i == null ? void 0 : i.response) == null ? void 0 : n.accessUrl;
|
|
6281
|
+
return await ri(s, o, e), a;
|
|
6282
6282
|
} catch (i) {
|
|
6283
6283
|
throw i;
|
|
6284
6284
|
}
|
|
6285
|
-
},
|
|
6285
|
+
}, Js = (s, e) => {
|
|
6286
6286
|
const t = e.type.split("/")[0];
|
|
6287
6287
|
let r = "";
|
|
6288
6288
|
t === "video" ? r = s == null ? void 0 : s.replace(/^data:video\/\w+;base64,/, "") : t === "image" ? r = s == null ? void 0 : s.replace(/^data:image\/\w+;base64,/, "") : t === "audio" && (r = s == null ? void 0 : s.replace(/^data:audio\/\w+;base64,/, ""));
|
|
@@ -6291,7 +6291,7 @@ const Ks = async (s, e, t = !0) => {
|
|
|
6291
6291
|
i[o] = n.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,54 +6303,55 @@ async function Fr(s) {
|
|
|
6303
6303
|
throw t;
|
|
6304
6304
|
}
|
|
6305
6305
|
}
|
|
6306
|
-
var
|
|
6307
|
-
class
|
|
6306
|
+
var wt, ue, Ee, yt, fe, ke, Xe, $e, Bt, Ft, lt, Ge, Je, Ot, zn, Nt, Qe, Ye, St, ct, dt, It, Tt, bt, jt, rn, Oe, Rt, sn, Nn, on, ht, qt, Lt, Zt, Kt, zt, Xt, Gt, an, ln, Jt, ut, Qt, cn;
|
|
6307
|
+
class Ys {
|
|
6308
6308
|
constructor(e) {
|
|
6309
|
-
z(this,
|
|
6310
|
-
z(this,
|
|
6309
|
+
z(this, wt);
|
|
6310
|
+
z(this, ue);
|
|
6311
6311
|
z(this, Ee);
|
|
6312
|
-
z(this,
|
|
6313
|
-
z(this,
|
|
6312
|
+
z(this, yt);
|
|
6313
|
+
z(this, fe, []);
|
|
6314
6314
|
z(this, ke, []);
|
|
6315
6315
|
z(this, Xe);
|
|
6316
6316
|
z(this, $e);
|
|
6317
6317
|
z(this, Bt);
|
|
6318
|
-
z(this, At);
|
|
6319
|
-
z(this, st, []);
|
|
6320
|
-
z(this, Ge);
|
|
6321
|
-
z(this, kt);
|
|
6322
|
-
z(this, Pt);
|
|
6323
|
-
z(this, Zn);
|
|
6324
6318
|
z(this, Ft);
|
|
6325
|
-
z(this,
|
|
6326
|
-
z(this,
|
|
6319
|
+
z(this, lt, []);
|
|
6320
|
+
z(this, Ge);
|
|
6321
|
+
z(this, Je);
|
|
6327
6322
|
z(this, Ot);
|
|
6328
|
-
z(this,
|
|
6329
|
-
z(this,
|
|
6323
|
+
z(this, zn);
|
|
6324
|
+
z(this, Nt);
|
|
6325
|
+
z(this, Qe);
|
|
6326
|
+
z(this, Ye);
|
|
6327
|
+
z(this, St);
|
|
6328
|
+
z(this, ct);
|
|
6329
|
+
z(this, dt);
|
|
6330
6330
|
z(this, It);
|
|
6331
6331
|
z(this, Tt);
|
|
6332
|
-
z(this,
|
|
6333
|
-
z(this,
|
|
6332
|
+
z(this, bt);
|
|
6333
|
+
z(this, jt);
|
|
6334
6334
|
z(this, rn);
|
|
6335
6335
|
z(this, Oe);
|
|
6336
|
-
z(this,
|
|
6336
|
+
z(this, Rt);
|
|
6337
6337
|
z(this, sn, !1);
|
|
6338
|
-
z(this,
|
|
6338
|
+
z(this, Nn);
|
|
6339
6339
|
z(this, on);
|
|
6340
|
-
z(this,
|
|
6341
|
-
z(this, jt);
|
|
6342
|
-
z(this, Lt);
|
|
6340
|
+
z(this, ht);
|
|
6343
6341
|
z(this, qt);
|
|
6342
|
+
z(this, Lt);
|
|
6344
6343
|
z(this, Zt);
|
|
6345
6344
|
z(this, Kt);
|
|
6346
6345
|
z(this, zt);
|
|
6347
6346
|
z(this, Xt);
|
|
6347
|
+
z(this, Gt);
|
|
6348
6348
|
z(this, an);
|
|
6349
6349
|
z(this, ln);
|
|
6350
|
-
z(this, Gt);
|
|
6351
|
-
z(this, ct);
|
|
6352
6350
|
z(this, Jt);
|
|
6353
|
-
|
|
6351
|
+
z(this, ut);
|
|
6352
|
+
z(this, Qt);
|
|
6353
|
+
z(this, cn);
|
|
6354
|
+
H(this, on, e.isAdmin), H(this, Xe, !1), H(this, Zt, e == null ? void 0 : e.mode), e.handleUpload && H(this, Ot, e.handleUpload.bind(this)), e != null && e.accessToken && (H(this, rn, e.accessToken), this._grpcOptionInitializer()), this._init(e).then(() => {
|
|
6354
6355
|
H(this, sn, !0), e != null && e.parentContainerId && this._renderView(e), this.updateWindowObject({ initialized: !0 }), this._initializeGrpcConfig(e.mode, e.endPoint);
|
|
6355
6356
|
});
|
|
6356
6357
|
}
|
|
@@ -6367,65 +6368,88 @@ class Qs {
|
|
|
6367
6368
|
}
|
|
6368
6369
|
_renderView(e) {
|
|
6369
6370
|
var t, r, n;
|
|
6370
|
-
return this._isAdminOptions(e) ? (H(this, $e, !1), H(this, Bt, !1), H(this,
|
|
6371
|
+
return this._isAdminOptions(e) ? (H(this, $e, !1), H(this, Bt, !1), H(this, Nt, 0), H(this, dt, ""), H(this, bt, !1), H(this, Zt, 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, qt, ""), H(this, Kt, e == null ? void 0 : e.restrictedFileSize), H(this, zt, e == null ? void 0 : e.localizedFileRestrictedMessage), H(this, Gt, e == null ? void 0 : e.localizedSuccessMessage), H(this, Xt, e == null ? void 0 : e.localizedErrorMessage), H(this, ut, e == null ? void 0 : e.imagePreviewWidth), H(this, Qt, 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, (r = e == null ? void 0 : e.removeImagePreviewCB) == null ? void 0 : r.bind(this)), H(this, Jt, (n = e == null ? void 0 : e.getUploadingState) == null ? void 0 : n.bind(this)), this._removeUserToast(), this._renderUserView(e));
|
|
6371
6372
|
}
|
|
6372
6373
|
_renderAdminView(e) {
|
|
6373
|
-
if (!
|
|
6374
|
+
if (!E(this, sn)) return;
|
|
6374
6375
|
const { parentContainerId: t } = e;
|
|
6375
6376
|
if (e.isAdmin === !0)
|
|
6376
6377
|
var { buttonProps: r } = e;
|
|
6377
|
-
H(this,
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6378
|
+
if (H(this, wt, document.getElementById(t)), !E(this, cn))
|
|
6379
|
+
setTimeout(() => {
|
|
6380
|
+
const n = this._selectedImageContainer();
|
|
6381
|
+
E(this, wt).appendChild(n);
|
|
6382
|
+
}, 0);
|
|
6383
|
+
else {
|
|
6384
|
+
const n = document.createElement("button");
|
|
6385
|
+
n.className = r != null && r.buttonClass ? r == null ? void 0 : r.buttonClass : "browse-image-button", n.addEventListener("focus", () => {
|
|
6386
|
+
n.blur();
|
|
6387
|
+
});
|
|
6388
|
+
const i = document.createElement("span");
|
|
6389
|
+
i.textContent = r != null && r.buttonText ? r == null ? void 0 : r.buttonText : "Browse Files";
|
|
6390
|
+
const o = document.createElement("span");
|
|
6391
|
+
o.innerHTML = r != null && r.buttonIcon ? r == null ? void 0 : r.buttonIcon : "", n.type = "button", n.append(i, o), r != null && r.buttonStyle && Object.assign(n.style, r == null ? void 0 : r.buttonStyle), n.addEventListener("click", () => {
|
|
6392
|
+
this._selectedImageContainerDialog();
|
|
6393
|
+
}), E(this, wt).appendChild(n);
|
|
6394
|
+
}
|
|
6388
6395
|
}
|
|
6389
6396
|
async _grpcOptionInitializer() {
|
|
6390
|
-
H(this, Oe, await
|
|
6391
|
-
|
|
6392
|
-
|
|
6397
|
+
H(this, Oe, await Ss(
|
|
6398
|
+
E(this, rn),
|
|
6399
|
+
E(this, Zt)
|
|
6393
6400
|
));
|
|
6394
6401
|
}
|
|
6395
6402
|
_selectedImageContainer() {
|
|
6403
|
+
var h;
|
|
6404
|
+
H(this, Qe, K("folder-container")), H(this, Ye, K("folder-list-wrapper")), this._fetchAllFolders(), H(this, ue, K("browse-container")), H(this, Je, De(
|
|
6405
|
+
`Save (${(h = E(this, fe)) == null ? void 0 : h.length})`,
|
|
6406
|
+
"dialog-btn confirm"
|
|
6407
|
+
));
|
|
6408
|
+
const e = K();
|
|
6409
|
+
e.style.display = "flex", e.style.alignItems = "center", e.style.justifyContent = "space-between", e.style.padding = "10px 20px";
|
|
6410
|
+
const t = $t("Folders", "folder-title"), r = De("", "add-folder-btn");
|
|
6411
|
+
r.append(Rn()), this._createUpdateFolderDialog(r, "create"), e.append(t, r), E(this, Qe).append(e, E(this, Ye));
|
|
6412
|
+
const n = this._renderSearchField(), i = this._createBrowseMoreContainer(), o = this._createBrowseImageMain(), a = K("footer");
|
|
6413
|
+
a.appendChild(E(this, Je)), E(this, Je).onclick = () => {
|
|
6414
|
+
E(this, Ot).call(this), H(this, fe, []), H(this, ke, []);
|
|
6415
|
+
};
|
|
6416
|
+
const c = K("container-right-main");
|
|
6417
|
+
return c.append(n, i, o, a), E(this, ue).append(E(this, Qe), c), E(this, ue);
|
|
6418
|
+
}
|
|
6419
|
+
_selectedImageContainerDialog() {
|
|
6396
6420
|
var u;
|
|
6397
|
-
H(this,
|
|
6398
|
-
`Save (${(u =
|
|
6421
|
+
H(this, Je, De(
|
|
6422
|
+
`Save (${(u = E(this, fe)) == null ? void 0 : u.length})`,
|
|
6399
6423
|
"dialog-btn confirm"
|
|
6400
|
-
)), H(this,
|
|
6401
|
-
const e =
|
|
6402
|
-
|
|
6424
|
+
)), H(this, Qe, K("folder-container")), H(this, Ye, K("folder-list-wrapper")), this._fetchAllFolders();
|
|
6425
|
+
const e = De("Cancel", "dialog-btn cancel");
|
|
6426
|
+
De(
|
|
6403
6427
|
"",
|
|
6404
6428
|
"dialog-modal-close-btn",
|
|
6405
6429
|
"",
|
|
6406
6430
|
!1,
|
|
6407
6431
|
'<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="24" height="24" viewBox="0 0 50 50"> <path d="M 9.15625 6.3125 L 6.3125 9.15625 L 22.15625 25 L 6.21875 40.96875 L 9.03125 43.78125 L 25 27.84375 L 40.9375 43.78125 L 43.78125 40.9375 L 27.84375 25 L 43.6875 9.15625 L 40.84375 6.3125 L 25 22.15625 Z"></path> </svg>'
|
|
6408
6432
|
).addEventListener("click", () => {
|
|
6409
|
-
|
|
6410
|
-
}), H(this,
|
|
6433
|
+
mn.hide(), H(this, fe, []), H(this, ke, []);
|
|
6434
|
+
}), H(this, ue, K("browse-container"));
|
|
6411
6435
|
const r = K();
|
|
6412
6436
|
r.style.display = "flex", r.style.alignItems = "center", r.style.justifyContent = "space-between", r.style.padding = "10px 20px";
|
|
6413
|
-
const n =
|
|
6414
|
-
i.append(
|
|
6437
|
+
const n = $t("Folders", "folder-title"), i = De("", "add-folder-btn");
|
|
6438
|
+
i.append(Rn()), this._createUpdateFolderDialog(i, "create"), r.append(n, i), E(this, Qe).append(r, E(this, Ye));
|
|
6415
6439
|
const o = this._renderSearchField(), a = this._createBrowseMoreContainer(), c = this._createBrowseImageMain(), h = K("footer");
|
|
6416
6440
|
e.onclick = () => {
|
|
6417
|
-
|
|
6418
|
-
},
|
|
6419
|
-
|
|
6420
|
-
}, h.append(e,
|
|
6441
|
+
mn.hide(), H(this, ke, []), H(this, fe, []);
|
|
6442
|
+
}, E(this, Je).onclick = () => {
|
|
6443
|
+
E(this, Ot).call(this), mn.hide(), H(this, fe, []), H(this, ke, []);
|
|
6444
|
+
}, h.append(e, E(this, Je));
|
|
6421
6445
|
const l = K("container-right-main");
|
|
6422
|
-
l.append(o, a, c, h),
|
|
6423
|
-
content:
|
|
6446
|
+
l.append(o, a, c, h), E(this, ue).append(E(this, Qe), l), mn.show({
|
|
6447
|
+
content: E(this, ue)
|
|
6424
6448
|
});
|
|
6425
6449
|
}
|
|
6426
6450
|
_renderUserView(e) {
|
|
6427
6451
|
const { parentContainerId: t, restrictedFileSize: r, imagePreview: n } = e;
|
|
6428
|
-
H(this,
|
|
6452
|
+
H(this, wt, document.getElementById(t)), H(this, ht, Q("div", "user-view-container"));
|
|
6429
6453
|
const i = K(
|
|
6430
6454
|
"user-view-browse-wrapper",
|
|
6431
6455
|
"user-view-browse-wrapper"
|
|
@@ -6437,10 +6461,10 @@ class Qs {
|
|
|
6437
6461
|
"margin-block: 0px; font-size: 13px; color: #777",
|
|
6438
6462
|
`Max File size: ${r}MB`
|
|
6439
6463
|
);
|
|
6440
|
-
i.append(
|
|
6464
|
+
i.append(Dn(), c, h);
|
|
6441
6465
|
} else
|
|
6442
|
-
i.append(
|
|
6443
|
-
return
|
|
6466
|
+
i.append(Dn(), c);
|
|
6467
|
+
return E(this, ht).append(i), n && this._renderImagePreview(n, "", i, !0), E(this, wt).appendChild(E(this, ht)), E(this, wt);
|
|
6444
6468
|
}
|
|
6445
6469
|
_renderImagePreview(e, t, r, n = !1) {
|
|
6446
6470
|
var T;
|
|
@@ -6457,7 +6481,7 @@ class Qs {
|
|
|
6457
6481
|
const l = Q(
|
|
6458
6482
|
"img",
|
|
6459
6483
|
"",
|
|
6460
|
-
`max-width: ${
|
|
6484
|
+
`max-width: ${E(this, ut) ? E(this, ut) : 230}px;max-height:${E(this, Qt) ? E(this, Qt) : 250}px;object-fit:cover;`
|
|
6461
6485
|
);
|
|
6462
6486
|
l.src = e, l.alt = t || "";
|
|
6463
6487
|
const u = this._renderImageErrorContainer();
|
|
@@ -6476,15 +6500,15 @@ class Qs {
|
|
|
6476
6500
|
"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"
|
|
6477
6501
|
);
|
|
6478
6502
|
f.id = "remove-preview-btn";
|
|
6479
|
-
const y =
|
|
6503
|
+
const y = Kn();
|
|
6480
6504
|
y.style.fill = "#fff", f == null || f.appendChild(y), f.addEventListener("click", () => {
|
|
6481
|
-
|
|
6505
|
+
E(this, an).call(this);
|
|
6482
6506
|
});
|
|
6483
6507
|
const N = Q("button", "", "display:none");
|
|
6484
6508
|
N.id = "image-preview-hidden-btn", N.addEventListener("click", (C) => {
|
|
6485
6509
|
var R;
|
|
6486
|
-
C.preventDefault(), C.stopPropagation(), (R =
|
|
6487
|
-
}), c == null || c.append(l, f, N), (T =
|
|
6510
|
+
C.preventDefault(), C.stopPropagation(), (R = E(this, ht)) == null || R.removeChild(c), E(this, ln).call(this), this._removeUserToast(), o && (o.style.display = "flex");
|
|
6511
|
+
}), c == null || c.append(l, f, N), (T = E(this, ht)) == null || T.append(c);
|
|
6488
6512
|
}
|
|
6489
6513
|
_renderImageErrorContainer() {
|
|
6490
6514
|
const e = Q(
|
|
@@ -6515,17 +6539,17 @@ class Qs {
|
|
|
6515
6539
|
e && (e.style.display = "flex");
|
|
6516
6540
|
}
|
|
6517
6541
|
async _readFileAsBase64(e) {
|
|
6518
|
-
const t =
|
|
6542
|
+
const t = E(this, Kt) * 1024 * 1024;
|
|
6519
6543
|
if (e.size > t) {
|
|
6520
6544
|
this._renderUserToast(
|
|
6521
|
-
|
|
6545
|
+
E(this, zt) ? E(this, zt) : `File size must be less than ${E(this, Kt)}MB.`,
|
|
6522
6546
|
"error"
|
|
6523
6547
|
);
|
|
6524
6548
|
return;
|
|
6525
6549
|
}
|
|
6526
|
-
H(this, Xe, !0),
|
|
6550
|
+
H(this, Xe, !0), E(this, Jt).call(this, !0);
|
|
6527
6551
|
try {
|
|
6528
|
-
const r = await
|
|
6552
|
+
const r = await Nr(e);
|
|
6529
6553
|
this._removeUserToast();
|
|
6530
6554
|
const n = new FileReader();
|
|
6531
6555
|
n.readAsDataURL(r), n.onload = () => {
|
|
@@ -6553,15 +6577,15 @@ class Qs {
|
|
|
6553
6577
|
"margin-block:0px;font-size:14px;padding-top:3px"
|
|
6554
6578
|
);
|
|
6555
6579
|
n.textContent = e, n.style.color = t === "success" ? "#4caf50" : "#ee3f3f";
|
|
6556
|
-
const i = t === "success" ?
|
|
6557
|
-
i.style.width = "15px", i.style.height = "15px", r.append(i, n),
|
|
6580
|
+
const i = t === "success" ? yr("#4caf50") : Sn();
|
|
6581
|
+
i.style.width = "15px", i.style.height = "15px", r.append(i, n), E(this, ht).appendChild(r);
|
|
6558
6582
|
}
|
|
6559
6583
|
_removeUserToast() {
|
|
6560
6584
|
const e = document.getElementById("user-toast-container");
|
|
6561
6585
|
e && e.remove();
|
|
6562
6586
|
}
|
|
6563
6587
|
_renderUserViewBrowseButton() {
|
|
6564
|
-
const e =
|
|
6588
|
+
const e = Vn("file");
|
|
6565
6589
|
e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*");
|
|
6566
6590
|
const t = Q(
|
|
6567
6591
|
"a",
|
|
@@ -6586,9 +6610,9 @@ class Qs {
|
|
|
6586
6610
|
const t = Q(
|
|
6587
6611
|
"div",
|
|
6588
6612
|
"linear-loader",
|
|
6589
|
-
`width:${
|
|
6613
|
+
`width:${E(this, ut) ? E(this, ut) : 230}px;max-width:${E(this, ut) ? E(this, ut) : 230}px`
|
|
6590
6614
|
);
|
|
6591
|
-
e.appendChild(t),
|
|
6615
|
+
e.appendChild(t), E(this, ht).append(e);
|
|
6592
6616
|
}
|
|
6593
6617
|
_removeUserUploading() {
|
|
6594
6618
|
const e = document.getElementById("user-uploading");
|
|
@@ -6598,32 +6622,32 @@ class Qs {
|
|
|
6598
6622
|
this._renderUserUploading();
|
|
6599
6623
|
try {
|
|
6600
6624
|
this._renderImagePreview(e, t.name);
|
|
6601
|
-
const r = await
|
|
6602
|
-
await this._uploadForUser(r, t),
|
|
6625
|
+
const r = await Fr(e, t, E(this, Oe), !1);
|
|
6626
|
+
await this._uploadForUser(r, t), E(this, Gt) && this._renderUserToast(E(this, Gt), "success");
|
|
6603
6627
|
} catch {
|
|
6604
6628
|
this._renderUserToast(
|
|
6605
|
-
|
|
6629
|
+
E(this, Xt) ? E(this, Xt) : "Error uploading. Please try again later.",
|
|
6606
6630
|
"error"
|
|
6607
6631
|
);
|
|
6608
6632
|
} finally {
|
|
6609
|
-
H(this, Xe, !1),
|
|
6633
|
+
H(this, Xe, !1), E(this, Jt).call(this, !1), this._removeUserUploading(), this._renderRemovePreviewBtn();
|
|
6610
6634
|
}
|
|
6611
6635
|
}
|
|
6612
6636
|
async _uploadForUser(e, t) {
|
|
6613
6637
|
var r;
|
|
6614
6638
|
try {
|
|
6615
|
-
const n = await
|
|
6639
|
+
const n = await as(
|
|
6616
6640
|
e,
|
|
6617
|
-
|
|
6618
|
-
|
|
6641
|
+
et[Mn((r = t.type) == null ? void 0 : r.split("/")[0])],
|
|
6642
|
+
E(this, Oe)
|
|
6619
6643
|
);
|
|
6620
|
-
H(this,
|
|
6644
|
+
H(this, qt, n == null ? void 0 : n.response), E(this, Ot).call(this);
|
|
6621
6645
|
} catch (n) {
|
|
6622
6646
|
throw Error(n);
|
|
6623
6647
|
}
|
|
6624
6648
|
}
|
|
6625
6649
|
_createAllAndSelectedTab(e) {
|
|
6626
|
-
const t = K("select-options"), r =
|
|
6650
|
+
const t = K("select-options"), r = $t("Browse", "select"), n = $t(
|
|
6627
6651
|
"Selected",
|
|
6628
6652
|
"select",
|
|
6629
6653
|
"selected-images-tab"
|
|
@@ -6631,15 +6655,15 @@ class Qs {
|
|
|
6631
6655
|
r.classList.add("selected"), [r, n].forEach((o, a) => {
|
|
6632
6656
|
o.addEventListener("click", () => {
|
|
6633
6657
|
var c;
|
|
6634
|
-
H(this,
|
|
6658
|
+
H(this, Nt, a), (c = document.querySelector(".select.selected")) == null || c.classList.remove("selected"), o.classList.add("selected"), this._updateSelectedImageListContainerUI();
|
|
6635
6659
|
});
|
|
6636
6660
|
}), t.append(r, n), e.appendChild(t);
|
|
6637
6661
|
}
|
|
6638
6662
|
_renderUploadButton() {
|
|
6639
|
-
const e =
|
|
6640
|
-
e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*,video/*,audio/*,.gif"), H(this,
|
|
6663
|
+
const e = Vn("file");
|
|
6664
|
+
e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*,video/*,audio/*,.gif"), H(this, yt, document.createElement("button")), E(this, yt).className = "browse-more-btn";
|
|
6641
6665
|
const t = document.createElement("span");
|
|
6642
|
-
return t.textContent = "Upload",
|
|
6666
|
+
return t.textContent = "Upload", E(this, yt).append(Dn(), t), E(this, yt).type = "button", E(this, yt).addEventListener(
|
|
6643
6667
|
"click",
|
|
6644
6668
|
() => e.click()
|
|
6645
6669
|
), e.addEventListener("change", async () => {
|
|
@@ -6654,16 +6678,16 @@ class Qs {
|
|
|
6654
6678
|
);
|
|
6655
6679
|
};
|
|
6656
6680
|
} catch (n) {
|
|
6657
|
-
this._renderToastContainer(n, "error",
|
|
6681
|
+
this._renderToastContainer(n, "error", E(this, ue));
|
|
6658
6682
|
}
|
|
6659
6683
|
e.value = "";
|
|
6660
|
-
}),
|
|
6684
|
+
}), E(this, yt);
|
|
6661
6685
|
}
|
|
6662
6686
|
_renderCreateFolderBtn() {
|
|
6663
6687
|
const e = document.createElement("button");
|
|
6664
6688
|
e.className = "create-folder-btn";
|
|
6665
6689
|
const t = document.createElement("span");
|
|
6666
|
-
return t.textContent = "Create", e.append(
|
|
6690
|
+
return t.textContent = "Create", e.append(Rn(), t), this._createUpdateFolderDialog(e, "create"), e;
|
|
6667
6691
|
}
|
|
6668
6692
|
_renderSearchField() {
|
|
6669
6693
|
let e;
|
|
@@ -6671,42 +6695,42 @@ class Qs {
|
|
|
6671
6695
|
"search-input-wrapper",
|
|
6672
6696
|
"search-input-wrapper"
|
|
6673
6697
|
);
|
|
6674
|
-
H(this, Tt,
|
|
6698
|
+
H(this, Tt, Vn("search")), E(this, Tt).value = "", E(this, Tt).addEventListener("input", (i) => {
|
|
6675
6699
|
H(this, ke, []);
|
|
6676
6700
|
const o = i.target;
|
|
6677
6701
|
e && clearTimeout(e), e = setTimeout(() => {
|
|
6678
6702
|
if (!o.value) {
|
|
6679
|
-
H(this,
|
|
6703
|
+
H(this, dt, ""), H(this, It, !1), H(this, bt, !1), this._fetchFilesFromFolder(E(this, Ft));
|
|
6680
6704
|
return;
|
|
6681
6705
|
}
|
|
6682
|
-
H(this,
|
|
6706
|
+
H(this, bt, !0), H(this, jt, o.value), this._search(E(this, jt));
|
|
6683
6707
|
}, 750);
|
|
6684
|
-
}),
|
|
6685
|
-
const n =
|
|
6686
|
-
return n.style.position = "absolute", n.style.top = "50%", n.style.left = "5%", n.style.transform = "translate(-5%, -50%)", r.append(n,
|
|
6708
|
+
}), E(this, Tt).setAttribute("placeholder", "Search");
|
|
6709
|
+
const n = Ls();
|
|
6710
|
+
return n.style.position = "absolute", n.style.top = "50%", n.style.left = "5%", n.style.transform = "translate(-5%, -50%)", r.append(n, E(this, Tt)), t.append(r), t;
|
|
6687
6711
|
}
|
|
6688
6712
|
_createBrowseMoreContainer() {
|
|
6689
|
-
H(this,
|
|
6713
|
+
H(this, St, K("browse-more-btn-container")), this._createAllAndSelectedTab(E(this, St));
|
|
6690
6714
|
const e = this._renderUploadButton(), t = this._renderCreateFolderBtn(), r = document.createElement("div");
|
|
6691
|
-
return r.style.display = "flex", r.style.alignItems = "center", r.style.gap = "10px", r.append(e, t),
|
|
6715
|
+
return r.style.display = "flex", r.style.alignItems = "center", r.style.gap = "10px", r.append(e, t), E(this, St).appendChild(r), E(this, St);
|
|
6692
6716
|
}
|
|
6693
6717
|
_createBrowseImageMain() {
|
|
6694
6718
|
const e = K("browse-image-main");
|
|
6695
|
-
return H(this, Ee, K("selected-image-container")),
|
|
6696
|
-
const t =
|
|
6697
|
-
t + r >= n - 5 &&
|
|
6698
|
-
}), e.appendChild(
|
|
6719
|
+
return H(this, Ee, K("selected-image-container")), E(this, Ee).addEventListener("scroll", () => {
|
|
6720
|
+
const t = E(this, Ee).clientHeight, r = E(this, Ee).scrollTop, n = E(this, Ee).scrollHeight;
|
|
6721
|
+
t + r >= n - 5 && E(this, It) && (E(this, bt) ? this._search(E(this, jt)) : this._fetchFilesFromFolder(E(this, Ft)));
|
|
6722
|
+
}), e.appendChild(E(this, Ee)), e;
|
|
6699
6723
|
}
|
|
6700
6724
|
_renderFetchingSkeletonUI() {
|
|
6701
6725
|
for (let e = 0; e < 20; e++) {
|
|
6702
6726
|
const t = K("skeleton");
|
|
6703
|
-
t.innerHTML = "",
|
|
6727
|
+
t.innerHTML = "", E(this, Ee).append(t);
|
|
6704
6728
|
}
|
|
6705
6729
|
}
|
|
6706
6730
|
_renderEmptyImageContainer() {
|
|
6707
|
-
if (
|
|
6731
|
+
if (E(this, $e) || E(this, Xe)) return;
|
|
6708
6732
|
const e = K(), t = K(), r = document.createElement("p");
|
|
6709
|
-
|
|
6733
|
+
E(this, bt) && E(this, Nt) === 0 ? (t.innerHTML = `
|
|
6710
6734
|
<svg width="300" height="300" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6711
6735
|
<g clip-path="url(#clip0_2304_257)">
|
|
6712
6736
|
<path d="M564.829 772.4H336.658V948.386H564.829V772.4Z" fill="#EBEBEB"/>
|
|
@@ -6790,15 +6814,15 @@ class Qs {
|
|
|
6790
6814
|
</clipPath>
|
|
6791
6815
|
</defs>
|
|
6792
6816
|
</svg>
|
|
6793
|
-
`, r.textContent = "Looks Empty!"), e.append(t, r),
|
|
6817
|
+
`, r.textContent = "Looks Empty!"), e.append(t, r), E(this, Ee).appendChild(e);
|
|
6794
6818
|
}
|
|
6795
6819
|
_renderLoadingUI() {
|
|
6796
6820
|
const e = K("skeleton");
|
|
6797
|
-
e.innerHTML = "",
|
|
6821
|
+
e.innerHTML = "", E(this, Ee).appendChild(e);
|
|
6798
6822
|
}
|
|
6799
6823
|
_fileCardBody(e) {
|
|
6800
|
-
var
|
|
6801
|
-
const t = K("selected-image-content"), r = K("selected-image-top-bar"), n =
|
|
6824
|
+
var ot, Mt, dn, Vt;
|
|
6825
|
+
const t = K("selected-image-content"), r = K("selected-image-top-bar"), n = De(
|
|
6802
6826
|
"",
|
|
6803
6827
|
"selected-image-btn",
|
|
6804
6828
|
"",
|
|
@@ -6806,22 +6830,22 @@ class Qs {
|
|
|
6806
6830
|
'<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>'
|
|
6807
6831
|
);
|
|
6808
6832
|
let i, o;
|
|
6809
|
-
(e == null ? void 0 : e.type) ===
|
|
6833
|
+
(e == null ? void 0 : e.type) === et.IMAGE && (i = vr(e == null ? void 0 : e.url, "selected-image"), o = Ns()), (e == null ? void 0 : e.type) === et.VIDEO && (i = Rs(e == null ? void 0 : e.url, "uploaded-video"), o = Us()), (e == null ? void 0 : e.type) === et.AUDIO && (i = Ds(e == null ? void 0 : e.url, "uploaded-audio"), o = Fs());
|
|
6810
6834
|
const a = K("selected-image-wrapper");
|
|
6811
6835
|
a.setAttribute("data-key", e == null ? void 0 : e.key);
|
|
6812
|
-
const c =
|
|
6836
|
+
const c = $t(e == null ? void 0 : e.name, "selected-image-name"), h = ie("", "selected-image-type");
|
|
6813
6837
|
h.append(o), r.append(h, n);
|
|
6814
6838
|
const l = K();
|
|
6815
6839
|
l.style.marginTop = "10px", l.style.display = "flex", l.style.justifyContent = "space-between", l.style.alignItems = "center", l.append(c), t.append(r, i), a.append(t, l);
|
|
6816
|
-
const u = K("action-wrapper"), d =
|
|
6840
|
+
const u = K("action-wrapper"), d = De("", "action-option preview"), f = ie("Preview", ""), y = Ts();
|
|
6817
6841
|
d.append(y, f);
|
|
6818
|
-
const N =
|
|
6842
|
+
const N = De("", "action-option move"), T = ie("Move", ""), C = Is();
|
|
6819
6843
|
N.append(C, T);
|
|
6820
|
-
const R =
|
|
6844
|
+
const R = De("", "action-option rename"), O = ie("Rename", ""), A = br();
|
|
6821
6845
|
R.append(A, O);
|
|
6822
|
-
const U =
|
|
6846
|
+
const U = De("", "action-option delete"), b = ie("Delete", ""), B = Cr();
|
|
6823
6847
|
U.append(B, b);
|
|
6824
|
-
const m = e.name.split(".")[0], g = e.name.split(".")[1], k = tn[e.type], I = K("edit-form-wrapper"), F = K("move-form-wrapper"), L = K("preview-details-container"),
|
|
6848
|
+
const m = e.name.split(".")[0], g = e.name.split(".")[1], k = tn[e.type], I = K("edit-form-wrapper"), F = K("move-form-wrapper"), L = K("preview-details-container"), v = K("preview-details-wrapper"), _ = K(
|
|
6825
6849
|
"preview-option-image-wrapper"
|
|
6826
6850
|
), w = K("preview-option-wrapper"), p = K("preview-option-wrapper"), M = K(
|
|
6827
6851
|
"preview-option-wrapper"
|
|
@@ -6829,7 +6853,7 @@ class Qs {
|
|
|
6829
6853
|
"preview-option-wrapper"
|
|
6830
6854
|
), Z = K("preview-option-wrapper"), P = K(
|
|
6831
6855
|
"preview-option-wrapper"
|
|
6832
|
-
), q =
|
|
6856
|
+
), q = vr(e.url, "preview-option-image");
|
|
6833
6857
|
_.append(q);
|
|
6834
6858
|
const $ = ie("File name", "preview-title"), S = K("preview-option-name");
|
|
6835
6859
|
S.innerHTML = e.name, w.append($, S);
|
|
@@ -6852,18 +6876,18 @@ class Qs {
|
|
|
6852
6876
|
te,
|
|
6853
6877
|
Y
|
|
6854
6878
|
);
|
|
6855
|
-
const re = ie("File type", "preview-title"),
|
|
6879
|
+
const re = ie("File type", "preview-title"), pe = ie(k, "preview-option-name");
|
|
6856
6880
|
x.append(
|
|
6857
6881
|
re,
|
|
6858
|
-
|
|
6882
|
+
pe
|
|
6859
6883
|
);
|
|
6860
|
-
const
|
|
6861
|
-
`${(
|
|
6884
|
+
const be = ie("Dimension", "preview-title"), mt = ie(
|
|
6885
|
+
`${(ot = e == null ? void 0 : e.metadata) == null ? void 0 : ot.width} * ${(Mt = e == null ? void 0 : e.metadata) == null ? void 0 : Mt.height}`,
|
|
6862
6886
|
"preview-option-name"
|
|
6863
6887
|
);
|
|
6864
6888
|
V.append(
|
|
6865
|
-
|
|
6866
|
-
|
|
6889
|
+
be,
|
|
6890
|
+
mt
|
|
6867
6891
|
);
|
|
6868
6892
|
const Pe = ie("URL", "preview-title"), de = ie(
|
|
6869
6893
|
e.url,
|
|
@@ -6883,55 +6907,55 @@ class Qs {
|
|
|
6883
6907
|
P.append(
|
|
6884
6908
|
Ne,
|
|
6885
6909
|
le
|
|
6886
|
-
),
|
|
6910
|
+
), v.append(
|
|
6887
6911
|
p,
|
|
6888
6912
|
w,
|
|
6889
6913
|
M,
|
|
6890
6914
|
x,
|
|
6891
|
-
((
|
|
6915
|
+
((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 : "",
|
|
6892
6916
|
Z,
|
|
6893
6917
|
e.nestedFolderName ? P : ""
|
|
6894
6918
|
), L.append(
|
|
6895
6919
|
_,
|
|
6896
|
-
|
|
6920
|
+
v
|
|
6897
6921
|
);
|
|
6898
|
-
const ne = K("form-control"),
|
|
6899
|
-
ne.appendChild(
|
|
6900
|
-
const Ie = K("form-control"),
|
|
6901
|
-
Te.textContent = e.folderName, Te.prepend(
|
|
6902
|
-
const
|
|
6922
|
+
const ne = K("form-control"), ge = document.createElement("input");
|
|
6923
|
+
ne.appendChild(ge), ge.classList.add("input-field"), ge.value = e.name;
|
|
6924
|
+
const Ie = K("form-control"), we = ie("Current Folder:", "input-label"), Te = K("folder-field current");
|
|
6925
|
+
Te.textContent = e.folderName, Te.prepend(en()), Ie.append(we, Te);
|
|
6926
|
+
const me = K("form-control"), ee = K();
|
|
6903
6927
|
ee.style.width = "100%", ee.style.display = "flex", ee.style.alignItems = "center", ee.style.justifyContent = "space-between";
|
|
6904
6928
|
const Re = ie(
|
|
6905
6929
|
"Suggested Folder List:",
|
|
6906
6930
|
"input-label"
|
|
6907
6931
|
), Ue = ie();
|
|
6908
|
-
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(
|
|
6909
|
-
const
|
|
6910
|
-
|
|
6932
|
+
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(Sn("14px", "14px", "#333")), ee.append(Re, Ue);
|
|
6933
|
+
const it = K();
|
|
6934
|
+
it.style.width = "100%", it.style.maxHeight = "250px", it.style.overflowY = "auto";
|
|
6911
6935
|
const Ae = document.createElement("ul");
|
|
6912
|
-
Ae.className = "folders",
|
|
6936
|
+
Ae.className = "folders", it.append(Ae), me.append(ee, it), E(this, lt).forEach((ce) => {
|
|
6913
6937
|
const We = this._renderEditFolderListContainer(ce);
|
|
6914
6938
|
Ae.appendChild(We);
|
|
6915
6939
|
});
|
|
6916
|
-
const
|
|
6940
|
+
const st = K("form-control"), Le = ie("Destination Folder:", "input-label"), Ve = K(
|
|
6917
6941
|
"folder-field source",
|
|
6918
6942
|
"source-folder-wrapper"
|
|
6919
6943
|
), xe = document.createElement("span");
|
|
6920
|
-
xe.id = "source-folder-name", xe.textContent =
|
|
6944
|
+
xe.id = "source-folder-name", xe.textContent = E(this, Lt) ? E(this, Lt) : e.folderName, Ve.append(en(), xe);
|
|
6921
6945
|
let _e = "";
|
|
6922
|
-
|
|
6946
|
+
st.append(Le, Ve), ge.onchange = (ce) => {
|
|
6923
6947
|
_e = ce.target.value;
|
|
6924
6948
|
}, _e = _e !== "" ? _e : e.name, I.append(ne), F.append(
|
|
6925
6949
|
Ie,
|
|
6926
|
-
|
|
6927
|
-
|
|
6950
|
+
me,
|
|
6951
|
+
st
|
|
6928
6952
|
), u.append(
|
|
6929
6953
|
d,
|
|
6930
6954
|
N,
|
|
6931
6955
|
R,
|
|
6932
6956
|
U
|
|
6933
6957
|
), d.onclick = (ce) => {
|
|
6934
|
-
ce.stopPropagation(), Ze.hide(),
|
|
6958
|
+
ce.stopPropagation(), Ze.hide(), Ce.show({
|
|
6935
6959
|
content: L,
|
|
6936
6960
|
header: m,
|
|
6937
6961
|
dialogContentStyle: {
|
|
@@ -6941,7 +6965,7 @@ class Qs {
|
|
|
6941
6965
|
showCloseBtn: !0
|
|
6942
6966
|
});
|
|
6943
6967
|
}, N.onclick = (ce) => {
|
|
6944
|
-
ce.stopPropagation(), Ze.hide(),
|
|
6968
|
+
ce.stopPropagation(), Ze.hide(), Ce.show({
|
|
6945
6969
|
content: F,
|
|
6946
6970
|
header: `Move "${e.name}"`,
|
|
6947
6971
|
confirmButtonText: "Move",
|
|
@@ -6952,14 +6976,14 @@ class Qs {
|
|
|
6952
6976
|
showCloseBtn: !0,
|
|
6953
6977
|
showFooter: !0,
|
|
6954
6978
|
onCancel: () => {
|
|
6955
|
-
|
|
6979
|
+
Ce.hide();
|
|
6956
6980
|
},
|
|
6957
6981
|
onConfirm: () => {
|
|
6958
6982
|
this._updateFile(_e, e);
|
|
6959
6983
|
}
|
|
6960
6984
|
});
|
|
6961
6985
|
}, R.onclick = (ce) => {
|
|
6962
|
-
ce.stopPropagation(), Ze.hide(),
|
|
6986
|
+
ce.stopPropagation(), Ze.hide(), Ce.show({
|
|
6963
6987
|
content: I,
|
|
6964
6988
|
header: "Rename",
|
|
6965
6989
|
confirmButtonText: "Update",
|
|
@@ -6969,14 +6993,14 @@ class Qs {
|
|
|
6969
6993
|
showCloseBtn: !0,
|
|
6970
6994
|
showFooter: !0,
|
|
6971
6995
|
onCancel: () => {
|
|
6972
|
-
|
|
6996
|
+
Ce.hide();
|
|
6973
6997
|
},
|
|
6974
6998
|
onConfirm: () => {
|
|
6975
6999
|
this._updateFile(_e, e);
|
|
6976
7000
|
}
|
|
6977
7001
|
});
|
|
6978
7002
|
}, U.onclick = (ce) => {
|
|
6979
|
-
ce.stopPropagation(), Ze.hide(),
|
|
7003
|
+
ce.stopPropagation(), Ze.hide(), Ce.show({
|
|
6980
7004
|
content: "",
|
|
6981
7005
|
dialogContentStyle: {
|
|
6982
7006
|
minWidth: "32rem",
|
|
@@ -6995,44 +7019,44 @@ class Qs {
|
|
|
6995
7019
|
content: u,
|
|
6996
7020
|
mainContainer: r,
|
|
6997
7021
|
divId: e.key
|
|
6998
|
-
}), H(this,
|
|
7022
|
+
}), H(this, Rt, e.key);
|
|
6999
7023
|
}), i.addEventListener("click", () => {
|
|
7000
|
-
const ce =
|
|
7001
|
-
(
|
|
7024
|
+
const ce = E(this, fe).findIndex(
|
|
7025
|
+
(at) => (at == null ? void 0 : at.key) === (e == null ? void 0 : e.key)
|
|
7002
7026
|
);
|
|
7003
7027
|
if (t.classList.contains("checked"))
|
|
7004
|
-
t.classList.remove("checked"), ce !== -1 && (
|
|
7028
|
+
t.classList.remove("checked"), ce !== -1 && (E(this, fe).splice(ce, 1), E(this, Nt) === 1 && a.remove());
|
|
7005
7029
|
else {
|
|
7006
|
-
if (
|
|
7007
|
-
|
|
7030
|
+
if (E(this, Nn))
|
|
7031
|
+
E(this, fe).push(e);
|
|
7008
7032
|
else {
|
|
7009
|
-
const
|
|
7033
|
+
const at = document.querySelector(
|
|
7010
7034
|
".selected-image-wrapper .checked"
|
|
7011
7035
|
);
|
|
7012
|
-
|
|
7036
|
+
at == null || at.classList.remove("checked"), H(this, fe, [e]);
|
|
7013
7037
|
}
|
|
7014
7038
|
t.classList.add("checked");
|
|
7015
7039
|
}
|
|
7016
7040
|
this._updateContent();
|
|
7017
7041
|
}), document.addEventListener("click", (ce) => {
|
|
7018
|
-
const We = document.querySelector(`#${
|
|
7042
|
+
const We = document.querySelector(`#${E(this, Rt)}`);
|
|
7019
7043
|
We && (ce.composedPath().includes(We) || Ze.hide());
|
|
7020
|
-
}),
|
|
7044
|
+
}), E(this, fe).findIndex(
|
|
7021
7045
|
(ce) => (ce == null ? void 0 : ce.key) === (e == null ? void 0 : e.key)
|
|
7022
|
-
) !== -1 ? (t.classList.add("checked"),
|
|
7046
|
+
) !== -1 ? (t.classList.add("checked"), E(this, bt) ? E(this, Ee).prepend(a) : E(this, Ee).appendChild(a)) : E(this, Ee).appendChild(a);
|
|
7023
7047
|
}
|
|
7024
7048
|
_renderImageCard(e) {
|
|
7025
7049
|
this._fileCardBody(e);
|
|
7026
7050
|
}
|
|
7027
7051
|
_renderImageListContainer() {
|
|
7028
7052
|
var e, t;
|
|
7029
|
-
((e =
|
|
7053
|
+
((e = E(this, ke)) == null ? void 0 : e.length) > 0 && ((t = E(this, ke)) == null || t.forEach((r) => {
|
|
7030
7054
|
this._renderImageCard(r);
|
|
7031
7055
|
}));
|
|
7032
7056
|
}
|
|
7033
7057
|
_renderSelectedImageListContainer() {
|
|
7034
7058
|
var e;
|
|
7035
|
-
((e =
|
|
7059
|
+
((e = E(this, fe)) == null ? void 0 : e.length) > 0 && E(this, fe).forEach((t) => {
|
|
7036
7060
|
this._renderImageCard(t);
|
|
7037
7061
|
});
|
|
7038
7062
|
}
|
|
@@ -7052,9 +7076,9 @@ class Qs {
|
|
|
7052
7076
|
const r = document.createElement("div");
|
|
7053
7077
|
r.style.position = "relative", r.style.display = "flex", r.style.alignItems = "center", r.style.gap = "2px";
|
|
7054
7078
|
const n = document.createElement("span"), i = document.createElement("span");
|
|
7055
|
-
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, n.appendChild(
|
|
7079
|
+
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, n.appendChild(en()), r.append(n, i), t.append(r), e.children && Object.keys(e.children).length > 0) {
|
|
7056
7080
|
const A = document.createElement("button");
|
|
7057
|
-
A.classList.add("expand-icon"), A.appendChild(
|
|
7081
|
+
A.classList.add("expand-icon"), A.appendChild(wr()), r.prepend(A);
|
|
7058
7082
|
const U = document.createElement("ul");
|
|
7059
7083
|
U.className = "folders nested", t.appendChild(U), A.addEventListener("click", (b) => {
|
|
7060
7084
|
b.stopPropagation(), t.classList.toggle("active"), U.classList.toggle("visible");
|
|
@@ -7065,13 +7089,13 @@ class Qs {
|
|
|
7065
7089
|
}
|
|
7066
7090
|
);
|
|
7067
7091
|
}
|
|
7068
|
-
const o =
|
|
7092
|
+
const o = De(
|
|
7069
7093
|
"",
|
|
7070
7094
|
"folder-option-btn",
|
|
7071
7095
|
"moveToInputField.disabled",
|
|
7072
7096
|
!1,
|
|
7073
7097
|
'<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>'
|
|
7074
|
-
), a = K("action-wrapper"), c =
|
|
7098
|
+
), a = K("action-wrapper"), c = De("", "action-option edit"), h = ie("Edit", ""), l = br();
|
|
7075
7099
|
c.append(l, h);
|
|
7076
7100
|
const u = K("edit-form-wrapper"), d = K("name-field-wrapper"), f = ie("Name", "input-label"), y = document.createElement("input");
|
|
7077
7101
|
y.classList.add("input-field"), y.value = e.name, y.onchange = (A) => {
|
|
@@ -7085,9 +7109,9 @@ class Qs {
|
|
|
7085
7109
|
forUser: !0
|
|
7086
7110
|
};
|
|
7087
7111
|
this._createUpdateFolderDialog(c, "update", N);
|
|
7088
|
-
const T =
|
|
7112
|
+
const T = De("", "action-option delete"), C = ie("Delete", ""), R = Cr();
|
|
7089
7113
|
return T.append(R, C), a.append(c, T), T.onclick = (A) => {
|
|
7090
|
-
A.stopPropagation(), Ze.hide(),
|
|
7114
|
+
A.stopPropagation(), Ze.hide(), Ce.show({
|
|
7091
7115
|
content: "",
|
|
7092
7116
|
dialogContentStyle: {
|
|
7093
7117
|
minWidth: "32rem",
|
|
@@ -7106,11 +7130,11 @@ class Qs {
|
|
|
7106
7130
|
content: a,
|
|
7107
7131
|
mainContainer: r,
|
|
7108
7132
|
divId: e.key
|
|
7109
|
-
}), H(this,
|
|
7133
|
+
}), H(this, Rt, e.key);
|
|
7110
7134
|
}), r.appendChild(o), t.addEventListener("click", (A) => {
|
|
7111
7135
|
var U;
|
|
7112
|
-
A.stopPropagation(), H(this, Ge, e), H(this,
|
|
7113
|
-
}), ((O =
|
|
7136
|
+
A.stopPropagation(), H(this, Ge, e), H(this, Ft, e == null ? void 0 : e.name), H(this, fe, []), H(this, ke, []), H(this, dt, ""), H(this, It, !1), (U = document.querySelector(".folder.selected")) == null || U.classList.remove("selected"), t.classList.add("selected"), this._fetchFilesFromFolder(e.name);
|
|
7137
|
+
}), ((O = E(this, Ge)) == null ? void 0 : O.key) === (e == null ? void 0 : e.key) && t.classList.add("selected"), t;
|
|
7114
7138
|
}
|
|
7115
7139
|
_renderEditFolderListContainer(e) {
|
|
7116
7140
|
var o;
|
|
@@ -7119,9 +7143,9 @@ class Qs {
|
|
|
7119
7143
|
const r = document.createElement("div");
|
|
7120
7144
|
r.style.position = "relative", r.style.display = "flex", r.style.alignItems = "center", r.style.gap = "2px";
|
|
7121
7145
|
const n = document.createElement("span"), i = document.createElement("span");
|
|
7122
|
-
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, n.appendChild(
|
|
7146
|
+
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, n.appendChild(en()), r.append(n, i), t.append(r), e.children && Object.keys(e.children).length > 0) {
|
|
7123
7147
|
const a = document.createElement("button");
|
|
7124
|
-
a.classList.add("expand-icon"), a.appendChild(
|
|
7148
|
+
a.classList.add("expand-icon"), a.appendChild(wr()), r.prepend(a);
|
|
7125
7149
|
const c = document.createElement("ul");
|
|
7126
7150
|
c.className = "folders nested", t.appendChild(c), a.addEventListener("click", (h) => {
|
|
7127
7151
|
h.stopPropagation(), t.classList.toggle("active"), c.classList.toggle("visible");
|
|
@@ -7137,89 +7161,89 @@ class Qs {
|
|
|
7137
7161
|
"#source-folder-name"
|
|
7138
7162
|
);
|
|
7139
7163
|
c.textContent = "", c.textContent = e == null ? void 0 : e.name, (h = document.querySelector(".folder-move.selected")) == null || h.classList.remove("selected"), t.classList.add("selected");
|
|
7140
|
-
}), ((o =
|
|
7164
|
+
}), ((o = E(this, Ge)) == null ? void 0 : o.key) === (e == null ? void 0 : e.key) && t.classList.add("selected"), t;
|
|
7141
7165
|
}
|
|
7142
7166
|
_updateFolderListContainer() {
|
|
7143
|
-
if (
|
|
7144
|
-
if (
|
|
7167
|
+
if (E(this, Qe))
|
|
7168
|
+
if (E(this, Ye).innerHTML = "", E(this, Bt)) {
|
|
7145
7169
|
const e = this._renderFolderListLoadingUI();
|
|
7146
|
-
|
|
7170
|
+
E(this, Ye).appendChild(e);
|
|
7147
7171
|
} else {
|
|
7148
7172
|
const e = document.createElement("ul");
|
|
7149
|
-
e.className = "folders",
|
|
7173
|
+
e.className = "folders", E(this, Ye).appendChild(e), E(this, lt).forEach((t) => {
|
|
7150
7174
|
const r = this._renderFolderListContainer(t);
|
|
7151
7175
|
e.appendChild(r);
|
|
7152
|
-
}),
|
|
7176
|
+
}), E(this, Qe).appendChild(E(this, Ye));
|
|
7153
7177
|
}
|
|
7154
7178
|
}
|
|
7155
7179
|
_renderToastContainer(e, t, r) {
|
|
7156
|
-
this._removeToastContainer(), H(this,
|
|
7157
|
-
const n =
|
|
7180
|
+
this._removeToastContainer(), H(this, ct, document.createElement("div")), E(this, ct).className = `message-container ${t}`;
|
|
7181
|
+
const n = $t(e, "message"), i = t === "success" ? yr() : Sn(), o = De("");
|
|
7158
7182
|
o.style.cursor = "pointer", o.style.border = "0", o.style.outline = "none", o.style.background = "transparent", o.appendChild(
|
|
7159
|
-
|
|
7183
|
+
Kn(t === "error" ? "#ee3f3f" : "#4caf50")
|
|
7160
7184
|
), o.setAttribute(
|
|
7161
7185
|
"fill",
|
|
7162
7186
|
t === "error" ? "#ee3f3f" : "#4caf50"
|
|
7163
|
-
), o.onclick = () => this._removeToastContainer(),
|
|
7187
|
+
), o.onclick = () => this._removeToastContainer(), E(this, ct).append(i, n, o), r.appendChild(E(this, ct)), setTimeout(() => {
|
|
7164
7188
|
this._removeToastContainer();
|
|
7165
7189
|
}, 5e3);
|
|
7166
7190
|
}
|
|
7167
7191
|
_removeToastContainer() {
|
|
7168
|
-
|
|
7192
|
+
E(this, ct) && (E(this, ct).remove(), H(this, ct, null));
|
|
7169
7193
|
}
|
|
7170
7194
|
_updateSelectedImageListContainerUI() {
|
|
7171
7195
|
var t, r;
|
|
7172
|
-
if (!
|
|
7173
|
-
|
|
7196
|
+
if (!E(this, Ee)) return;
|
|
7197
|
+
E(this, Ee).innerHTML = "", E(this, Xe) && this._renderLoadingUI(), E(this, $e) && this._renderFetchingSkeletonUI();
|
|
7174
7198
|
const e = document.getElementById(
|
|
7175
7199
|
"search-input-wrapper"
|
|
7176
7200
|
);
|
|
7177
|
-
|
|
7201
|
+
E(this, Nt) === 0 ? (e && (e.style.visibility = "visible"), ((t = E(this, ke)) == null ? void 0 : t.length) === 0 && !E(this, $e) ? (E(this, Ee).classList.add(
|
|
7178
7202
|
"no-selected-image-container"
|
|
7179
|
-
), this._renderEmptyImageContainer()) : (
|
|
7203
|
+
), this._renderEmptyImageContainer()) : (E(this, Ee).classList.remove(
|
|
7180
7204
|
"no-selected-image-container"
|
|
7181
|
-
), this._renderImageListContainer())) : (e && (e.style.visibility = "hidden"), ((r =
|
|
7205
|
+
), this._renderImageListContainer())) : (e && (e.style.visibility = "hidden"), ((r = E(this, fe)) == null ? void 0 : r.length) === 0 ? (E(this, Ee).classList.add(
|
|
7182
7206
|
"no-selected-image-container"
|
|
7183
|
-
), this._renderEmptyImageContainer()) : (
|
|
7207
|
+
), this._renderEmptyImageContainer()) : (E(this, Ee).classList.remove(
|
|
7184
7208
|
"no-selected-image-container"
|
|
7185
7209
|
), this._renderSelectedImageListContainer())), this._updateContent();
|
|
7186
7210
|
}
|
|
7187
7211
|
_updateContent() {
|
|
7188
7212
|
var t, r, n;
|
|
7189
7213
|
const e = document.getElementById("selected-images-tab");
|
|
7190
|
-
e && (e.textContent = `Selected (${(t =
|
|
7214
|
+
e && (e.textContent = `Selected (${(t = E(this, fe)) == null ? void 0 : t.length})`), E(this, Je).textContent = `Save (${(r = E(this, fe)) == null ? void 0 : r.length})`, E(this, Je).disabled = ((n = E(this, fe)) == null ? void 0 : n.length) === 0;
|
|
7191
7215
|
}
|
|
7192
7216
|
async _uploadAndAddSelectedImageList(e, t) {
|
|
7193
7217
|
var r, n;
|
|
7194
7218
|
this._updateSelectedImageListContainerUI();
|
|
7195
7219
|
try {
|
|
7196
|
-
const i = await
|
|
7220
|
+
const i = await Fr(e, t, E(this, Oe)), o = await os(
|
|
7197
7221
|
t == null ? void 0 : t.name,
|
|
7198
7222
|
"",
|
|
7199
7223
|
i,
|
|
7200
|
-
|
|
7201
|
-
(n =
|
|
7202
|
-
|
|
7224
|
+
et[Mn((r = t.type) == null ? void 0 : r.split("/")[0])],
|
|
7225
|
+
(n = E(this, Ge)) == null ? void 0 : n.name,
|
|
7226
|
+
E(this, Oe)
|
|
7203
7227
|
);
|
|
7204
|
-
|
|
7228
|
+
E(this, ke).unshift(o == null ? void 0 : o.response), this._renderToastContainer(
|
|
7205
7229
|
"File Uploaded Successfully",
|
|
7206
7230
|
"success",
|
|
7207
|
-
|
|
7231
|
+
E(this, ue)
|
|
7208
7232
|
);
|
|
7209
7233
|
} catch {
|
|
7210
7234
|
this._renderToastContainer(
|
|
7211
7235
|
"Something went wrong while uploading file. Please try again later.",
|
|
7212
7236
|
"error",
|
|
7213
|
-
|
|
7237
|
+
E(this, ue)
|
|
7214
7238
|
);
|
|
7215
7239
|
} finally {
|
|
7216
7240
|
H(this, Xe, !1), this._updateSelectedImageListContainerUI();
|
|
7217
7241
|
}
|
|
7218
7242
|
}
|
|
7219
7243
|
async _updateFile(e, t) {
|
|
7220
|
-
|
|
7244
|
+
Ce.updateUploadBtn(!0);
|
|
7221
7245
|
try {
|
|
7222
|
-
const r = await
|
|
7246
|
+
const r = await hs(
|
|
7223
7247
|
t.key,
|
|
7224
7248
|
e,
|
|
7225
7249
|
t.nestedFolderName,
|
|
@@ -7227,60 +7251,60 @@ class Qs {
|
|
|
7227
7251
|
t.thumborUrl,
|
|
7228
7252
|
t.proxyUrl,
|
|
7229
7253
|
t.type,
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
), n =
|
|
7254
|
+
E(this, Lt),
|
|
7255
|
+
E(this, Oe)
|
|
7256
|
+
), n = E(this, ke).find(
|
|
7233
7257
|
(i) => i.key === r.response.key
|
|
7234
7258
|
);
|
|
7235
|
-
n.name = e, this._fetchFilesFromFolder(
|
|
7259
|
+
n.name = e, this._fetchFilesFromFolder(E(this, Ge).name), H(this, ke, []), H(this, fe, []), this._renderToastContainer(
|
|
7236
7260
|
"File Updated Successfully",
|
|
7237
7261
|
"success",
|
|
7238
|
-
|
|
7262
|
+
E(this, ue)
|
|
7239
7263
|
);
|
|
7240
7264
|
} catch {
|
|
7241
7265
|
this._renderToastContainer(
|
|
7242
7266
|
"Something went wrong while updating the file. Please try again later.",
|
|
7243
7267
|
"error",
|
|
7244
|
-
|
|
7268
|
+
E(this, ue)
|
|
7245
7269
|
);
|
|
7246
7270
|
} finally {
|
|
7247
|
-
|
|
7271
|
+
Ce.updateUploadBtn(!1), Ce.hide(), this._updateSelectedImageListContainerUI();
|
|
7248
7272
|
}
|
|
7249
7273
|
}
|
|
7250
7274
|
async _deleteFile(e) {
|
|
7251
|
-
|
|
7275
|
+
Ce.updateUploadBtn(!0);
|
|
7252
7276
|
try {
|
|
7253
|
-
await
|
|
7277
|
+
await us(e, E(this, Oe)), H(this, ke, E(this, ke).filter((t) => e !== t.key)), this._renderToastContainer(
|
|
7254
7278
|
"File Deleted Successfully",
|
|
7255
7279
|
"success",
|
|
7256
|
-
|
|
7280
|
+
E(this, ue)
|
|
7257
7281
|
);
|
|
7258
7282
|
} catch {
|
|
7259
7283
|
this._renderToastContainer(
|
|
7260
7284
|
"Something went wrong while deleting the file. Please try again later.",
|
|
7261
7285
|
"error",
|
|
7262
|
-
|
|
7286
|
+
E(this, ue)
|
|
7263
7287
|
);
|
|
7264
7288
|
} finally {
|
|
7265
|
-
|
|
7289
|
+
Ce.updateUploadBtn(!1), Ce.hide(), this._updateSelectedImageListContainerUI();
|
|
7266
7290
|
}
|
|
7267
7291
|
}
|
|
7268
7292
|
async _createFolder(e, t = 2) {
|
|
7269
7293
|
var r;
|
|
7270
7294
|
try {
|
|
7271
|
-
const n = await
|
|
7295
|
+
const n = await vs(
|
|
7272
7296
|
e,
|
|
7273
|
-
(r =
|
|
7297
|
+
(r = E(this, Ge)) == null ? void 0 : r.name,
|
|
7274
7298
|
"",
|
|
7275
7299
|
!1,
|
|
7276
|
-
|
|
7300
|
+
E(this, Oe)
|
|
7277
7301
|
);
|
|
7278
|
-
H(this,
|
|
7279
|
-
const i =
|
|
7280
|
-
H(this,
|
|
7302
|
+
H(this, fe, []), H(this, ke, []);
|
|
7303
|
+
const i = Os(E(this, lt), n == null ? void 0 : n.response);
|
|
7304
|
+
H(this, lt, i), H(this, Ft, e), H(this, Ge, { ...n == null ? void 0 : n.response, children: {} }), this._fetchFilesFromFolder(e), this._renderToastContainer(
|
|
7281
7305
|
`Folder ${e} created successfully`,
|
|
7282
7306
|
"success",
|
|
7283
|
-
|
|
7307
|
+
E(this, ue)
|
|
7284
7308
|
);
|
|
7285
7309
|
} catch {
|
|
7286
7310
|
if (t > 1)
|
|
@@ -7289,7 +7313,7 @@ class Qs {
|
|
|
7289
7313
|
throw this._renderToastContainer(
|
|
7290
7314
|
`Error creating folder "${e}". Either folder already exist or failed to create folder`,
|
|
7291
7315
|
"error",
|
|
7292
|
-
|
|
7316
|
+
E(this, ue)
|
|
7293
7317
|
), new Error(
|
|
7294
7318
|
`Error creating folder "${e}". Either folder already exist or failed to create folder`
|
|
7295
7319
|
);
|
|
@@ -7298,13 +7322,13 @@ class Qs {
|
|
|
7298
7322
|
}
|
|
7299
7323
|
}
|
|
7300
7324
|
async _upload() {
|
|
7301
|
-
return
|
|
7325
|
+
return E(this, on) ? E(this, fe) : E(this, qt);
|
|
7302
7326
|
}
|
|
7303
7327
|
async _uploadFromSource(e, t) {
|
|
7304
7328
|
this._removeUserToast();
|
|
7305
7329
|
const r = 200 * 1024;
|
|
7306
7330
|
try {
|
|
7307
|
-
const n = e.size > r ? await
|
|
7331
|
+
const n = e.size > r ? await Nr(e) : e;
|
|
7308
7332
|
return await new Promise((o, a) => {
|
|
7309
7333
|
const c = new FileReader();
|
|
7310
7334
|
c.readAsDataURL(n), c.onerror = () => {
|
|
@@ -7312,13 +7336,13 @@ class Qs {
|
|
|
7312
7336
|
}, c.onload = async () => {
|
|
7313
7337
|
var h;
|
|
7314
7338
|
try {
|
|
7315
|
-
const l = await
|
|
7339
|
+
const l = await Gs(
|
|
7316
7340
|
c.result,
|
|
7317
7341
|
n,
|
|
7318
7342
|
t
|
|
7319
|
-
), u = await
|
|
7343
|
+
), u = await ls(
|
|
7320
7344
|
l,
|
|
7321
|
-
|
|
7345
|
+
et[Mn((h = n.type) == null ? void 0 : h.split("/")[0])],
|
|
7322
7346
|
t
|
|
7323
7347
|
);
|
|
7324
7348
|
o(u);
|
|
@@ -7332,24 +7356,24 @@ class Qs {
|
|
|
7332
7356
|
}
|
|
7333
7357
|
}
|
|
7334
7358
|
_uploadingState() {
|
|
7335
|
-
return
|
|
7359
|
+
return E(this, Xe);
|
|
7336
7360
|
}
|
|
7337
7361
|
async _fetchFilesFromFolder(e) {
|
|
7338
7362
|
var t, r, n;
|
|
7339
7363
|
H(this, $e, !0), this._updateSelectedImageListContainerUI();
|
|
7340
7364
|
try {
|
|
7341
|
-
const i = await
|
|
7365
|
+
const i = await cs(
|
|
7342
7366
|
e,
|
|
7343
|
-
|
|
7367
|
+
E(this, dt),
|
|
7344
7368
|
20,
|
|
7345
|
-
|
|
7369
|
+
E(this, Oe)
|
|
7346
7370
|
), o = (t = i.response) == null ? void 0 : t.files;
|
|
7347
|
-
|
|
7371
|
+
E(this, ke).push(...o), H(this, dt, (r = i.response) == null ? void 0 : r.nextCursor), H(this, It, (n = i.response) == null ? void 0 : n.hasMore);
|
|
7348
7372
|
} catch {
|
|
7349
7373
|
throw this._renderToastContainer(
|
|
7350
7374
|
"Error while fetching files from folder" + e,
|
|
7351
7375
|
"error",
|
|
7352
|
-
|
|
7376
|
+
E(this, ue)
|
|
7353
7377
|
), new Error(
|
|
7354
7378
|
"Something went wrong. Error while fetching files from folder" + e
|
|
7355
7379
|
);
|
|
@@ -7361,13 +7385,13 @@ class Qs {
|
|
|
7361
7385
|
var e, t;
|
|
7362
7386
|
H(this, $e, !0), H(this, Bt, !0), this._updateSelectedImageListContainerUI(), this._updateFolderListContainer(), this._removeToastContainer();
|
|
7363
7387
|
try {
|
|
7364
|
-
const n = (await
|
|
7365
|
-
H(this,
|
|
7388
|
+
const n = (await Es("", 1e3, E(this, Oe))).response.folder, i = Bs(n);
|
|
7389
|
+
H(this, Ft, (e = i[0]) == null ? void 0 : e.name), this._fetchFilesFromFolder((t = i[0]) == null ? void 0 : t.name), H(this, Ge, i[0]), H(this, lt, i);
|
|
7366
7390
|
} catch {
|
|
7367
7391
|
H(this, $e, !1), this._renderToastContainer(
|
|
7368
7392
|
"Folder not found. Please create a folder or try again later",
|
|
7369
7393
|
"error",
|
|
7370
|
-
|
|
7394
|
+
E(this, ue)
|
|
7371
7395
|
);
|
|
7372
7396
|
} finally {
|
|
7373
7397
|
H(this, Bt, !1), this._updateFolderListContainer();
|
|
@@ -7377,59 +7401,59 @@ class Qs {
|
|
|
7377
7401
|
var t, r;
|
|
7378
7402
|
H(this, $e, !0), this._updateSelectedImageListContainerUI(), this._removeToastContainer();
|
|
7379
7403
|
try {
|
|
7380
|
-
const n = await
|
|
7404
|
+
const n = await ds(
|
|
7381
7405
|
e,
|
|
7382
|
-
|
|
7406
|
+
E(this, dt),
|
|
7383
7407
|
10,
|
|
7384
|
-
|
|
7408
|
+
E(this, Oe)
|
|
7385
7409
|
), i = (t = n.response) == null ? void 0 : t.items;
|
|
7386
|
-
|
|
7410
|
+
E(this, ke).push(...i), H(this, dt, (r = n.response) == null ? void 0 : r.nextPageCursor);
|
|
7387
7411
|
} catch {
|
|
7388
7412
|
this._renderToastContainer(
|
|
7389
7413
|
"Error while searching files",
|
|
7390
7414
|
"error",
|
|
7391
|
-
|
|
7415
|
+
E(this, ue)
|
|
7392
7416
|
);
|
|
7393
7417
|
} finally {
|
|
7394
7418
|
H(this, $e, !1), this._updateSelectedImageListContainerUI();
|
|
7395
7419
|
}
|
|
7396
7420
|
}
|
|
7397
7421
|
async _updateFolder(e, t) {
|
|
7398
|
-
|
|
7422
|
+
Ce.updateUploadBtn(!0);
|
|
7399
7423
|
try {
|
|
7400
|
-
const r = await
|
|
7424
|
+
const r = await As(
|
|
7401
7425
|
t.key,
|
|
7402
7426
|
e,
|
|
7403
7427
|
t.nestedFolderName,
|
|
7404
7428
|
t.createdBy,
|
|
7405
|
-
|
|
7429
|
+
E(this, Oe)
|
|
7406
7430
|
);
|
|
7407
7431
|
} catch {
|
|
7408
7432
|
throw this._renderToastContainer(
|
|
7409
7433
|
"Something went wrong while updating the folder. Please try again later.",
|
|
7410
7434
|
"error",
|
|
7411
|
-
|
|
7435
|
+
E(this, ue)
|
|
7412
7436
|
), new Error("Error updating the folder ");
|
|
7413
7437
|
} finally {
|
|
7414
|
-
|
|
7438
|
+
Ce.updateUploadBtn(!1), Ce.hide(), this._updateFolderListContainer();
|
|
7415
7439
|
}
|
|
7416
7440
|
}
|
|
7417
7441
|
async _deleteFolder(e) {
|
|
7418
|
-
|
|
7442
|
+
Ce.updateUploadBtn(!0);
|
|
7419
7443
|
try {
|
|
7420
|
-
await
|
|
7444
|
+
await ks(e, E(this, Oe)), H(this, lt, E(this, lt).filter((t) => t.key !== e)), this._renderToastContainer(
|
|
7421
7445
|
"Folder Deleted Successfully",
|
|
7422
7446
|
"success",
|
|
7423
|
-
|
|
7447
|
+
E(this, ue)
|
|
7424
7448
|
);
|
|
7425
7449
|
} catch {
|
|
7426
7450
|
throw this._renderToastContainer(
|
|
7427
7451
|
"Something went wrong while deleting the folder. Please try again later.",
|
|
7428
7452
|
"error",
|
|
7429
|
-
|
|
7453
|
+
E(this, ue)
|
|
7430
7454
|
), new Error("Error deleting the folder ");
|
|
7431
7455
|
} finally {
|
|
7432
|
-
|
|
7456
|
+
Ce.updateUploadBtn(!1), Ce.hide(), this._updateFolderListContainer();
|
|
7433
7457
|
}
|
|
7434
7458
|
}
|
|
7435
7459
|
_createUpdateFolderDialog(e, t, r) {
|
|
@@ -7441,9 +7465,9 @@ class Qs {
|
|
|
7441
7465
|
const l = document.createElement("input");
|
|
7442
7466
|
l.style.paddingLeft = "40px";
|
|
7443
7467
|
const u = ie();
|
|
7444
|
-
u.appendChild(
|
|
7468
|
+
u.appendChild(en()), u.style.position = "absolute", u.style.top = "50%", u.style.left = "5%", u.style.transform = "translate(-40%, -40%)", l.classList.add("input-field"), h.append(l, u), t === "update" && (l.value = r.name), l.onchange = (d) => {
|
|
7445
7469
|
i = d.target.value;
|
|
7446
|
-
}, a.append(c, h), o.append(a),
|
|
7470
|
+
}, a.append(c, h), o.append(a), Ce.show({
|
|
7447
7471
|
content: o,
|
|
7448
7472
|
header: t === "update" ? "Update Folder" : "Create Folder",
|
|
7449
7473
|
confirmButtonText: t === "create" ? "Save" : "Update",
|
|
@@ -7454,7 +7478,7 @@ class Qs {
|
|
|
7454
7478
|
showFooter: !0,
|
|
7455
7479
|
showCloseBtn: !0,
|
|
7456
7480
|
onConfirm: () => {
|
|
7457
|
-
t === "create" ? this._createFolder(i) : this._updateFolder(i, r),
|
|
7481
|
+
t === "create" ? this._createFolder(i) : this._updateFolder(i, r), Ce.hide();
|
|
7458
7482
|
}
|
|
7459
7483
|
});
|
|
7460
7484
|
});
|
|
@@ -7468,13 +7492,13 @@ class Qs {
|
|
|
7468
7492
|
_initializeGrpcConfig(e, t) {
|
|
7469
7493
|
let r = "https://hamro-cms-backend-grpc.hamrostack.com";
|
|
7470
7494
|
t && (e === "production" || e === "development") ? r = t : e === "production" && (r = "https://page-api-grpc.hamropatro.com");
|
|
7471
|
-
const n = new
|
|
7495
|
+
const n = new Zi({
|
|
7472
7496
|
baseUrl: r
|
|
7473
7497
|
});
|
|
7474
7498
|
this.updateWindowObject({ grpcConfig: n });
|
|
7475
7499
|
}
|
|
7476
7500
|
}
|
|
7477
|
-
|
|
7501
|
+
wt = new WeakMap(), ue = new WeakMap(), Ee = new WeakMap(), yt = new WeakMap(), fe = new WeakMap(), ke = new WeakMap(), Xe = new WeakMap(), $e = new WeakMap(), Bt = new WeakMap(), Ft = new WeakMap(), lt = new WeakMap(), Ge = new WeakMap(), Je = new WeakMap(), Ot = new WeakMap(), zn = new WeakMap(), Nt = new WeakMap(), Qe = new WeakMap(), Ye = new WeakMap(), St = new WeakMap(), ct = new WeakMap(), dt = new WeakMap(), It = new WeakMap(), Tt = new WeakMap(), bt = new WeakMap(), jt = new WeakMap(), rn = new WeakMap(), Oe = new WeakMap(), Rt = new WeakMap(), sn = new WeakMap(), Nn = new WeakMap(), on = new WeakMap(), ht = new WeakMap(), qt = new WeakMap(), Lt = new WeakMap(), Zt = new WeakMap(), Kt = new WeakMap(), zt = new WeakMap(), Xt = new WeakMap(), Gt = new WeakMap(), an = new WeakMap(), ln = new WeakMap(), Jt = new WeakMap(), ut = new WeakMap(), Qt = new WeakMap(), cn = new WeakMap();
|
|
7478
7502
|
export {
|
|
7479
|
-
|
|
7503
|
+
Ys as default
|
|
7480
7504
|
};
|